-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflow.yaml
More file actions
78 lines (78 loc) · 2.05 KB
/
Copy pathworkflow.yaml
File metadata and controls
78 lines (78 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
apiVersion: agentctl.dev/v1
kind: Workflow
metadata:
name: acceptance-mock-tool
spec:
inputs:
reportPath: artifacts/mock-report.txt
outputs:
verdict: "${{ tasks.inspect.output.text }}"
artifact: "${{ inputs.reportPath }}"
providers:
fake:
kind: fake
policy:
workspaceRoot: .
writableRoots: [artifacts]
approval: never
tools:
read_fixture:
kind: builtin.workspace.read
description: Read a UTF-8 file inside the authorized workspace.
inputSchema:
type: object
properties:
path: { type: string }
required: [path]
additionalProperties: false
outputSchema:
type: object
properties:
path: { type: string }
content: { type: string }
bytes: { type: integer }
sha256: { type: string }
required: [path, content, bytes, sha256]
additionalProperties: false
capability: filesystem.read
risk: low
effectClass: observe
idempotency: idempotent
retrySafe: true
timeoutSeconds: 5
approval: never
agents:
inspector:
provider: fake
model: scripted
instructions: Read the fixture and report its marker.
tools: [read_fixture]
maxTurns: 2
maxToolCalls: 1
maxOutputTokens: 32
timeoutSeconds: 5
providerOptions:
toolInput: { path: fixture/service.txt }
finalText: AGENTCTL_MOCK_FIXTURE_VERIFIED
actions:
assert:
kind: builtin.assert
write:
kind: builtin.write
tasks:
- id: inspect
uses: agent:inspector
with:
prompt: Use read_fixture before answering.
- id: verify
uses: action:assert
needs: [inspect]
with:
that: "${{ tasks.inspect.output.text == 'AGENTCTL_MOCK_FIXTURE_VERIFIED' }}"
message: the mock provider did not complete its tool continuation
- id: report
uses: action:write
needs: [inspect, verify]
with:
path: "${{ inputs.reportPath }}"
content: "${{ tasks.inspect.output.text }}"