agentplane 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AGENTS.md +4 -2
- package/assets/agents/CODER.json +1 -1
- package/assets/policy/dod.core.md +1 -1
- package/assets/policy/governance.md +3 -0
- package/assets/policy/incidents.md +22 -11
- package/assets/policy/workflow.branch_pr.md +2 -0
- package/assets/policy/workflow.direct.md +3 -1
- package/dist/.build-manifest.json +323 -128
- package/dist/cli/bootstrap-guide.d.ts +1 -0
- package/dist/cli/bootstrap-guide.d.ts.map +1 -1
- package/dist/cli/bootstrap-guide.js +19 -1
- package/dist/cli/command-invocations.d.ts.map +1 -1
- package/dist/cli/command-invocations.js +2 -0
- package/dist/cli/command-snippets.d.ts +2 -0
- package/dist/cli/command-snippets.d.ts.map +1 -1
- package/dist/cli/command-snippets.js +2 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +10 -0
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +13 -0
- package/dist/cli/run-cli.js +2 -2
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +34 -8
- package/dist/commands/backend.d.ts.map +1 -1
- package/dist/commands/backend.js +4 -0
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +8 -4
- package/dist/commands/incidents/advise.command.d.ts +15 -0
- package/dist/commands/incidents/advise.command.d.ts.map +1 -0
- package/dist/commands/incidents/advise.command.js +139 -0
- package/dist/commands/incidents/collect.command.d.ts +11 -0
- package/dist/commands/incidents/collect.command.d.ts.map +1 -0
- package/dist/commands/incidents/collect.command.js +67 -0
- package/dist/commands/incidents/incidents.command.d.ts +5 -0
- package/dist/commands/incidents/incidents.command.d.ts.map +1 -0
- package/dist/commands/incidents/incidents.command.js +21 -0
- package/dist/commands/incidents/shared.d.ts +42 -0
- package/dist/commands/incidents/shared.d.ts.map +1 -0
- package/dist/commands/incidents/shared.js +107 -0
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +73 -2
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +4 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts +4 -0
- package/dist/commands/pr/integrate/internal/merge.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/merge.js +23 -2
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +26 -1
- package/dist/commands/pr/internal/note-store.d.ts +18 -0
- package/dist/commands/pr/internal/note-store.d.ts.map +1 -0
- package/dist/commands/pr/internal/note-store.js +66 -0
- package/dist/commands/pr/internal/pr-paths.d.ts +3 -0
- package/dist/commands/pr/internal/pr-paths.d.ts.map +1 -1
- package/dist/commands/pr/internal/pr-paths.js +3 -0
- package/dist/commands/pr/internal/review-template.d.ts +24 -4
- package/dist/commands/pr/internal/review-template.d.ts.map +1 -1
- package/dist/commands/pr/internal/review-template.js +188 -33
- package/dist/commands/pr/internal/sync.d.ts +32 -0
- package/dist/commands/pr/internal/sync.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync.js +258 -0
- package/dist/commands/pr/note.d.ts.map +1 -1
- package/dist/commands/pr/note.js +37 -4
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +7 -54
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +6 -3
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +5 -79
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +1 -1
- package/dist/commands/recipes/impl/commands/cache-prune.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/cache-prune.js +14 -0
- package/dist/commands/recipes/impl/commands/explain.js +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +3 -2
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list-remote.js +1 -0
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +9 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +2 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +2 -1
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +1 -1
- package/dist/commands/recipes.d.ts +4 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +3 -3
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +9 -0
- package/dist/commands/release.test-helpers.d.ts +14 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.js +14 -3
- package/dist/commands/shared/approval-requirements.d.ts +5 -7
- package/dist/commands/shared/approval-requirements.d.ts.map +1 -1
- package/dist/commands/shared/approval-requirements.js +3 -73
- package/dist/commands/shared/network-approval.d.ts +2 -0
- package/dist/commands/shared/network-approval.d.ts.map +1 -1
- package/dist/commands/shared/network-approval.js +1 -1
- package/dist/commands/shared/pr-meta.d.ts +9 -0
- package/dist/commands/shared/pr-meta.d.ts.map +1 -1
- package/dist/commands/shared/pr-meta.js +27 -3
- package/dist/commands/shared/task-backend.d.ts +2 -0
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-local-freshness.d.ts +13 -0
- package/dist/commands/shared/task-local-freshness.d.ts.map +1 -0
- package/dist/commands/shared/task-local-freshness.js +20 -0
- package/dist/commands/shared/task-mutation.d.ts +2 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -1
- package/dist/commands/shared/task-mutation.js +7 -0
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +1 -0
- package/dist/commands/task/close-shared.d.ts.map +1 -1
- package/dist/commands/task/close-shared.js +1 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +5 -2
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +24 -0
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +69 -29
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +1 -0
- package/dist/commands/task/shared/transition-command.d.ts +2 -0
- package/dist/commands/task/shared/transition-command.d.ts.map +1 -1
- package/dist/commands/task/shared/transition-command.js +1 -0
- package/dist/commands/task/start-ready.d.ts.map +1 -1
- package/dist/commands/task/start-ready.js +12 -1
- package/dist/commands/task/start.d.ts.map +1 -1
- package/dist/commands/task/start.js +11 -0
- package/dist/commands/task/verify-record.d.ts.map +1 -1
- package/dist/commands/task/verify-record.js +27 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +6 -1
- package/dist/policy/engine.d.ts +3 -1
- package/dist/policy/engine.d.ts.map +1 -1
- package/dist/policy/engine.js +5 -6
- package/dist/policy/taxonomy.d.ts +17 -0
- package/dist/policy/taxonomy.d.ts.map +1 -0
- package/dist/policy/taxonomy.js +302 -0
- package/dist/policy/types.d.ts +2 -1
- package/dist/policy/types.d.ts.map +1 -1
- package/dist/runner/artifacts.d.ts.map +1 -1
- package/dist/runner/artifacts.js +2 -0
- package/dist/runner/context/base-prompts.d.ts +25 -0
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +182 -54
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/recipe-context.js +5 -0
- package/dist/runner/types.d.ts +12 -0
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.js +81 -11
- package/dist/runner/usecases/task-run-inspect.d.ts.map +1 -1
- package/dist/runner/usecases/task-run-inspect.js +9 -7
- package/dist/runner/usecases/task-run-lifecycle-shared.d.ts.map +1 -1
- package/dist/runner/usecases/task-run-lifecycle-shared.js +8 -6
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +59 -12
- package/dist/runtime/approvals/index.d.ts +3 -0
- package/dist/runtime/approvals/index.d.ts.map +1 -0
- package/dist/runtime/approvals/index.js +1 -0
- package/dist/runtime/approvals/runtime.d.ts +12 -0
- package/dist/runtime/approvals/runtime.d.ts.map +1 -0
- package/dist/runtime/approvals/runtime.js +154 -0
- package/dist/runtime/approvals/types.d.ts +31 -0
- package/dist/runtime/approvals/types.d.ts.map +1 -0
- package/dist/runtime/approvals/types.js +1 -0
- package/dist/runtime/behavior/index.d.ts +3 -0
- package/dist/runtime/behavior/index.d.ts.map +1 -0
- package/dist/runtime/behavior/index.js +1 -0
- package/dist/runtime/behavior/resolve.d.ts +7 -0
- package/dist/runtime/behavior/resolve.d.ts.map +1 -0
- package/dist/runtime/behavior/resolve.js +66 -0
- package/dist/runtime/behavior/types.d.ts +25 -0
- package/dist/runtime/behavior/types.d.ts.map +1 -0
- package/dist/runtime/behavior/types.js +1 -0
- package/dist/runtime/capabilities/backend.d.ts +7 -0
- package/dist/runtime/capabilities/backend.d.ts.map +1 -0
- package/dist/runtime/capabilities/backend.js +104 -0
- package/dist/runtime/capabilities/index.d.ts +6 -0
- package/dist/runtime/capabilities/index.d.ts.map +1 -0
- package/dist/runtime/capabilities/index.js +4 -0
- package/dist/runtime/capabilities/recipe.d.ts +10 -0
- package/dist/runtime/capabilities/recipe.d.ts.map +1 -0
- package/dist/runtime/capabilities/recipe.js +123 -0
- package/dist/runtime/capabilities/registry.d.ts +6 -0
- package/dist/runtime/capabilities/registry.d.ts.map +1 -0
- package/dist/runtime/capabilities/registry.js +69 -0
- package/dist/runtime/capabilities/runner.d.ts +8 -0
- package/dist/runtime/capabilities/runner.d.ts.map +1 -0
- package/dist/runtime/capabilities/runner.js +73 -0
- package/dist/runtime/capabilities/types.d.ts +28 -0
- package/dist/runtime/capabilities/types.d.ts.map +1 -0
- package/dist/runtime/capabilities/types.js +1 -0
- package/dist/runtime/execution-profile/index.d.ts +3 -0
- package/dist/runtime/execution-profile/index.d.ts.map +1 -0
- package/dist/runtime/execution-profile/index.js +1 -0
- package/dist/runtime/execution-profile/resolve.d.ts +9 -0
- package/dist/runtime/execution-profile/resolve.d.ts.map +1 -0
- package/dist/runtime/execution-profile/resolve.js +80 -0
- package/dist/runtime/execution-profile/types.d.ts +27 -0
- package/dist/runtime/execution-profile/types.d.ts.map +1 -0
- package/dist/runtime/execution-profile/types.js +1 -0
- package/dist/runtime/explain/index.d.ts +3 -0
- package/dist/runtime/explain/index.d.ts.map +1 -0
- package/dist/runtime/explain/index.js +1 -0
- package/dist/runtime/explain/resolve.d.ts +14 -0
- package/dist/runtime/explain/resolve.d.ts.map +1 -0
- package/dist/runtime/explain/resolve.js +50 -0
- package/dist/runtime/explain/types.d.ts +28 -0
- package/dist/runtime/explain/types.d.ts.map +1 -0
- package/dist/runtime/explain/types.js +1 -0
- package/dist/runtime/harness/index.d.ts +4 -0
- package/dist/runtime/harness/index.d.ts.map +1 -0
- package/dist/runtime/harness/index.js +2 -0
- package/dist/runtime/harness/resolve-from-command-context.d.ts +4 -0
- package/dist/runtime/harness/resolve-from-command-context.d.ts.map +1 -0
- package/dist/runtime/harness/resolve-from-command-context.js +11 -0
- package/dist/runtime/harness/resolve.d.ts +13 -0
- package/dist/runtime/harness/resolve.d.ts.map +1 -0
- package/dist/runtime/harness/resolve.js +146 -0
- package/dist/runtime/harness/types.d.ts +65 -0
- package/dist/runtime/harness/types.d.ts.map +1 -0
- package/dist/runtime/harness/types.js +1 -0
- package/dist/runtime/incidents/index.d.ts +3 -0
- package/dist/runtime/incidents/index.d.ts.map +1 -0
- package/dist/runtime/incidents/index.js +1 -0
- package/dist/runtime/incidents/resolve.d.ts +26 -0
- package/dist/runtime/incidents/resolve.d.ts.map +1 -0
- package/dist/runtime/incidents/resolve.js +437 -0
- package/dist/runtime/incidents/types.d.ts +72 -0
- package/dist/runtime/incidents/types.d.ts.map +1 -0
- package/dist/runtime/incidents/types.js +1 -0
- package/dist/runtime/protocol/index.d.ts +3 -0
- package/dist/runtime/protocol/index.d.ts.map +1 -0
- package/dist/runtime/protocol/index.js +2 -0
- package/dist/runtime/protocol/resolve.d.ts +16 -0
- package/dist/runtime/protocol/resolve.d.ts.map +1 -0
- package/dist/runtime/protocol/resolve.js +36 -0
- package/dist/runtime/protocol/types.d.ts +36 -0
- package/dist/runtime/protocol/types.d.ts.map +1 -0
- package/dist/runtime/protocol/types.js +1 -0
- package/dist/runtime/task-intake/index.d.ts +3 -0
- package/dist/runtime/task-intake/index.d.ts.map +1 -0
- package/dist/runtime/task-intake/index.js +1 -0
- package/dist/runtime/task-intake/resolve.d.ts +48 -0
- package/dist/runtime/task-intake/resolve.d.ts.map +1 -0
- package/dist/runtime/task-intake/resolve.js +316 -0
- package/dist/runtime/task-intake/types.d.ts +117 -0
- package/dist/runtime/task-intake/types.d.ts.map +1 -0
- package/dist/runtime/task-intake/types.js +1 -0
- package/dist/shared/protected-paths.d.ts +4 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +4 -4
- package/dist/usecases/context/resolve-context.d.ts +55 -6
- package/dist/usecases/context/resolve-context.d.ts.map +1 -1
- package/dist/usecases/context/resolve-context.js +96 -6
- package/dist/usecases/task/task-list-usecase.d.ts.map +1 -1
- package/dist/usecases/task/task-list-usecase.js +8 -2
- package/dist/usecases/task/task-new-usecase.js +4 -4
- package/package.json +2 -3
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
const POLICY_ACTIONS = {
|
|
2
|
+
guard_commit: {
|
|
3
|
+
family: "git",
|
|
4
|
+
summary: "Guard a scoped git commit before mutating repository history.",
|
|
5
|
+
mutates_state: true,
|
|
6
|
+
risky: true,
|
|
7
|
+
destructive: false,
|
|
8
|
+
approval: null,
|
|
9
|
+
enforcement: "git_rules",
|
|
10
|
+
},
|
|
11
|
+
commit: {
|
|
12
|
+
family: "git",
|
|
13
|
+
summary: "Create a repository commit under agentplane policy rules.",
|
|
14
|
+
mutates_state: true,
|
|
15
|
+
risky: true,
|
|
16
|
+
destructive: false,
|
|
17
|
+
approval: null,
|
|
18
|
+
enforcement: "git_rules",
|
|
19
|
+
},
|
|
20
|
+
hook_pre_commit: {
|
|
21
|
+
family: "git",
|
|
22
|
+
summary: "Validate staged changes in the pre-commit hook.",
|
|
23
|
+
mutates_state: false,
|
|
24
|
+
risky: true,
|
|
25
|
+
destructive: false,
|
|
26
|
+
approval: null,
|
|
27
|
+
enforcement: "git_rules",
|
|
28
|
+
},
|
|
29
|
+
hook_commit_msg: {
|
|
30
|
+
family: "git",
|
|
31
|
+
summary: "Validate the commit subject in the commit-msg hook.",
|
|
32
|
+
mutates_state: false,
|
|
33
|
+
risky: true,
|
|
34
|
+
destructive: false,
|
|
35
|
+
approval: null,
|
|
36
|
+
enforcement: "git_rules",
|
|
37
|
+
},
|
|
38
|
+
network_access: {
|
|
39
|
+
family: "network",
|
|
40
|
+
summary: "Access the network from a command or adapter path.",
|
|
41
|
+
mutates_state: false,
|
|
42
|
+
risky: true,
|
|
43
|
+
destructive: false,
|
|
44
|
+
approval: "network_access",
|
|
45
|
+
enforcement: "approval_only",
|
|
46
|
+
},
|
|
47
|
+
force_action: {
|
|
48
|
+
family: "workflow",
|
|
49
|
+
summary: "Override a guarded workflow or validation boundary.",
|
|
50
|
+
mutates_state: true,
|
|
51
|
+
risky: true,
|
|
52
|
+
destructive: true,
|
|
53
|
+
approval: "force_action",
|
|
54
|
+
enforcement: "approval_only",
|
|
55
|
+
},
|
|
56
|
+
policy_write: {
|
|
57
|
+
family: "policy",
|
|
58
|
+
summary: "Modify policy gateway files or canonical policy modules.",
|
|
59
|
+
mutates_state: true,
|
|
60
|
+
risky: true,
|
|
61
|
+
destructive: false,
|
|
62
|
+
approval: "policy_write",
|
|
63
|
+
enforcement: "approval_only",
|
|
64
|
+
},
|
|
65
|
+
config_write: {
|
|
66
|
+
family: "config",
|
|
67
|
+
summary: "Modify repository configuration that changes runtime behavior.",
|
|
68
|
+
mutates_state: true,
|
|
69
|
+
risky: true,
|
|
70
|
+
destructive: false,
|
|
71
|
+
approval: "config_write",
|
|
72
|
+
enforcement: "approval_only",
|
|
73
|
+
},
|
|
74
|
+
dangerous_fs: {
|
|
75
|
+
family: "filesystem",
|
|
76
|
+
summary: "Perform potentially dangerous filesystem mutations.",
|
|
77
|
+
mutates_state: true,
|
|
78
|
+
risky: true,
|
|
79
|
+
destructive: true,
|
|
80
|
+
approval: "dangerous_fs",
|
|
81
|
+
enforcement: "approval_only",
|
|
82
|
+
},
|
|
83
|
+
git_push: {
|
|
84
|
+
family: "git",
|
|
85
|
+
summary: "Push local refs to a remote git endpoint.",
|
|
86
|
+
mutates_state: true,
|
|
87
|
+
risky: true,
|
|
88
|
+
destructive: false,
|
|
89
|
+
approval: "git_push",
|
|
90
|
+
enforcement: "approval_only",
|
|
91
|
+
},
|
|
92
|
+
task_list: {
|
|
93
|
+
family: "task",
|
|
94
|
+
summary: "Read the current task collection without mutating repository state.",
|
|
95
|
+
mutates_state: false,
|
|
96
|
+
risky: false,
|
|
97
|
+
destructive: false,
|
|
98
|
+
approval: null,
|
|
99
|
+
enforcement: "none",
|
|
100
|
+
},
|
|
101
|
+
task_new: {
|
|
102
|
+
family: "task",
|
|
103
|
+
summary: "Create a new task record and its task-local artifacts.",
|
|
104
|
+
mutates_state: true,
|
|
105
|
+
risky: false,
|
|
106
|
+
destructive: false,
|
|
107
|
+
approval: null,
|
|
108
|
+
enforcement: "none",
|
|
109
|
+
},
|
|
110
|
+
task_mutation: {
|
|
111
|
+
family: "task",
|
|
112
|
+
summary: "Mutate persisted task state through the task backend.",
|
|
113
|
+
mutates_state: true,
|
|
114
|
+
risky: false,
|
|
115
|
+
destructive: false,
|
|
116
|
+
approval: null,
|
|
117
|
+
enforcement: "none",
|
|
118
|
+
},
|
|
119
|
+
task_status_transition: {
|
|
120
|
+
family: "task",
|
|
121
|
+
summary: "Transition a task lifecycle status and record workflow evidence.",
|
|
122
|
+
mutates_state: true,
|
|
123
|
+
risky: false,
|
|
124
|
+
destructive: false,
|
|
125
|
+
approval: null,
|
|
126
|
+
enforcement: "none",
|
|
127
|
+
},
|
|
128
|
+
task_start: {
|
|
129
|
+
family: "task",
|
|
130
|
+
summary: "Move a task into DOING after task-start invariants pass.",
|
|
131
|
+
mutates_state: true,
|
|
132
|
+
risky: false,
|
|
133
|
+
destructive: false,
|
|
134
|
+
approval: null,
|
|
135
|
+
enforcement: "none",
|
|
136
|
+
},
|
|
137
|
+
task_block: {
|
|
138
|
+
family: "task",
|
|
139
|
+
summary: "Move a task into BLOCKED and persist blocking evidence.",
|
|
140
|
+
mutates_state: true,
|
|
141
|
+
risky: false,
|
|
142
|
+
destructive: false,
|
|
143
|
+
approval: null,
|
|
144
|
+
enforcement: "none",
|
|
145
|
+
},
|
|
146
|
+
task_set_status: {
|
|
147
|
+
family: "task",
|
|
148
|
+
summary: "Apply an explicit task status mutation outside the default lifecycle path.",
|
|
149
|
+
mutates_state: true,
|
|
150
|
+
risky: true,
|
|
151
|
+
destructive: false,
|
|
152
|
+
approval: null,
|
|
153
|
+
enforcement: "none",
|
|
154
|
+
},
|
|
155
|
+
task_finish: {
|
|
156
|
+
family: "task",
|
|
157
|
+
summary: "Close work on a task and persist verified result metadata.",
|
|
158
|
+
mutates_state: true,
|
|
159
|
+
risky: false,
|
|
160
|
+
destructive: false,
|
|
161
|
+
approval: null,
|
|
162
|
+
enforcement: "none",
|
|
163
|
+
},
|
|
164
|
+
task_plan_set: {
|
|
165
|
+
family: "task",
|
|
166
|
+
summary: "Update the task plan body and reset plan approval state as needed.",
|
|
167
|
+
mutates_state: true,
|
|
168
|
+
risky: false,
|
|
169
|
+
destructive: false,
|
|
170
|
+
approval: null,
|
|
171
|
+
enforcement: "none",
|
|
172
|
+
},
|
|
173
|
+
task_plan_approve: {
|
|
174
|
+
family: "task",
|
|
175
|
+
summary: "Approve a task plan and advance workflow gating state.",
|
|
176
|
+
mutates_state: true,
|
|
177
|
+
risky: false,
|
|
178
|
+
destructive: false,
|
|
179
|
+
approval: null,
|
|
180
|
+
enforcement: "none",
|
|
181
|
+
},
|
|
182
|
+
task_verify: {
|
|
183
|
+
family: "task",
|
|
184
|
+
summary: "Record task verification evidence and outcome.",
|
|
185
|
+
mutates_state: true,
|
|
186
|
+
risky: false,
|
|
187
|
+
destructive: false,
|
|
188
|
+
approval: null,
|
|
189
|
+
enforcement: "none",
|
|
190
|
+
},
|
|
191
|
+
task_run: {
|
|
192
|
+
family: "runner",
|
|
193
|
+
summary: "Prepare or execute a runner invocation for a task.",
|
|
194
|
+
mutates_state: true,
|
|
195
|
+
risky: true,
|
|
196
|
+
destructive: false,
|
|
197
|
+
approval: null,
|
|
198
|
+
enforcement: "none",
|
|
199
|
+
},
|
|
200
|
+
scenario_execute: {
|
|
201
|
+
family: "runner",
|
|
202
|
+
summary: "Prepare or execute a runner invocation for a recipe scenario.",
|
|
203
|
+
mutates_state: true,
|
|
204
|
+
risky: true,
|
|
205
|
+
destructive: false,
|
|
206
|
+
approval: null,
|
|
207
|
+
enforcement: "none",
|
|
208
|
+
},
|
|
209
|
+
recipe_install: {
|
|
210
|
+
family: "recipe",
|
|
211
|
+
summary: "Install recipe assets into the repository or project recipe cache.",
|
|
212
|
+
mutates_state: true,
|
|
213
|
+
risky: true,
|
|
214
|
+
destructive: false,
|
|
215
|
+
approval: "network_access",
|
|
216
|
+
enforcement: "approval_only",
|
|
217
|
+
},
|
|
218
|
+
recipe_list_remote: {
|
|
219
|
+
family: "recipe",
|
|
220
|
+
summary: "Fetch and list recipe catalog entries from a remote source.",
|
|
221
|
+
mutates_state: false,
|
|
222
|
+
risky: true,
|
|
223
|
+
destructive: false,
|
|
224
|
+
approval: "network_access",
|
|
225
|
+
enforcement: "approval_only",
|
|
226
|
+
},
|
|
227
|
+
backend_sync: {
|
|
228
|
+
family: "backend",
|
|
229
|
+
summary: "Synchronize task state between the local repo and the configured backend.",
|
|
230
|
+
mutates_state: true,
|
|
231
|
+
risky: true,
|
|
232
|
+
destructive: false,
|
|
233
|
+
approval: "network_access",
|
|
234
|
+
enforcement: "approval_only",
|
|
235
|
+
},
|
|
236
|
+
backend_migrate_canonical_state: {
|
|
237
|
+
family: "backend",
|
|
238
|
+
summary: "Mutate backend-managed canonical task state through a migration path.",
|
|
239
|
+
mutates_state: true,
|
|
240
|
+
risky: true,
|
|
241
|
+
destructive: false,
|
|
242
|
+
approval: "network_access",
|
|
243
|
+
enforcement: "approval_only",
|
|
244
|
+
},
|
|
245
|
+
backend_inspect: {
|
|
246
|
+
family: "backend",
|
|
247
|
+
summary: "Inspect backend configuration and canonical-state metadata.",
|
|
248
|
+
mutates_state: false,
|
|
249
|
+
risky: true,
|
|
250
|
+
destructive: false,
|
|
251
|
+
approval: "network_access",
|
|
252
|
+
enforcement: "approval_only",
|
|
253
|
+
},
|
|
254
|
+
upgrade_apply: {
|
|
255
|
+
family: "upgrade",
|
|
256
|
+
summary: "Apply an agentplane upgrade that may fetch remote release metadata.",
|
|
257
|
+
mutates_state: true,
|
|
258
|
+
risky: true,
|
|
259
|
+
destructive: false,
|
|
260
|
+
approval: "network_access",
|
|
261
|
+
enforcement: "approval_only",
|
|
262
|
+
},
|
|
263
|
+
release_apply: {
|
|
264
|
+
family: "release",
|
|
265
|
+
summary: "Apply and optionally publish a release across git and package registries.",
|
|
266
|
+
mutates_state: true,
|
|
267
|
+
risky: true,
|
|
268
|
+
destructive: false,
|
|
269
|
+
approval: "network_access",
|
|
270
|
+
enforcement: "approval_only",
|
|
271
|
+
},
|
|
272
|
+
doctor_fix: {
|
|
273
|
+
family: "diagnostics",
|
|
274
|
+
summary: "Apply automatic repair actions suggested by doctor diagnostics.",
|
|
275
|
+
mutates_state: true,
|
|
276
|
+
risky: true,
|
|
277
|
+
destructive: false,
|
|
278
|
+
approval: null,
|
|
279
|
+
enforcement: "none",
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
export function resolvePolicyActionDescriptor(action) {
|
|
283
|
+
const builtin = POLICY_ACTIONS[action];
|
|
284
|
+
if (builtin) {
|
|
285
|
+
return {
|
|
286
|
+
id: action,
|
|
287
|
+
...builtin,
|
|
288
|
+
source: "builtin",
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
id: action,
|
|
293
|
+
family: "custom",
|
|
294
|
+
summary: `Unclassified policy action: ${action}`,
|
|
295
|
+
mutates_state: false,
|
|
296
|
+
risky: false,
|
|
297
|
+
destructive: false,
|
|
298
|
+
approval: null,
|
|
299
|
+
enforcement: "none",
|
|
300
|
+
source: "custom",
|
|
301
|
+
};
|
|
302
|
+
}
|
package/dist/policy/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentplaneConfig } from "@agentplaneorg/core";
|
|
2
|
-
|
|
2
|
+
import type { PolicyActionId } from "./taxonomy.js";
|
|
3
|
+
export type PolicyAction = PolicyActionId;
|
|
3
4
|
export type PolicyProblemCode = "E_USAGE" | "E_GIT" | "E_INTERNAL";
|
|
4
5
|
export type PolicyProblem = {
|
|
5
6
|
code: PolicyProblemCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/policy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/policy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,YAAY,CAAC;IAErB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IAGf,GAAG,EAAE;QACH,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QAChC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;IAEF,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IAEF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/runner/artifacts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EAErB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAUpB,wBAAgB,8BAA8B,CAC5C,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,GACnC,wBAAwB,CAuB1B;
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/runner/artifacts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EAErB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAUpB,wBAAgB,8BAA8B,CAC5C,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,GACnC,wBAAwB,CAuB1B;AAyBD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,CAAC;CACzD,GAAG,cAAc,CAuBjB;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE;IACvD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,GAAG,OAAO,CAAC,cAAc,CAAC,CAmD1B;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhB;AAED,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAS3F;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC,GAAG,cAAc,CASjB;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhB"}
|
package/dist/runner/artifacts.js
CHANGED
|
@@ -42,6 +42,7 @@ function buildPreparedMetadata(opts) {
|
|
|
42
42
|
trace_policy: opts.bundle.execution.trace_policy,
|
|
43
43
|
timeout_policy: opts.bundle.execution.timeout_policy,
|
|
44
44
|
adapter_capabilities: opts.bundle.execution.adapter_capabilities,
|
|
45
|
+
adapter_capability_registry: opts.bundle.execution.adapter_capability_registry,
|
|
45
46
|
policy_decision: opts.bundle.execution.policy_decision,
|
|
46
47
|
invocation: createRunnerInvocationSnapshot(opts.invocation),
|
|
47
48
|
};
|
|
@@ -111,6 +112,7 @@ export async function writePreparedRunnerArtifacts(opts) {
|
|
|
111
112
|
trace_policy: preparedMetadata.trace_policy,
|
|
112
113
|
timeout_policy: preparedMetadata.timeout_policy,
|
|
113
114
|
adapter_capabilities: preparedMetadata.adapter_capabilities,
|
|
115
|
+
adapter_capability_registry: preparedMetadata.adapter_capability_registry,
|
|
114
116
|
policy_decision: preparedMetadata.policy_decision,
|
|
115
117
|
invocation: preparedMetadata.invocation,
|
|
116
118
|
},
|
|
@@ -1,10 +1,35 @@
|
|
|
1
|
+
import { type ResolvedBehavior } from "../../runtime/behavior/index.js";
|
|
1
2
|
import { type PolicyGatewayFlavor } from "../../shared/policy-gateway.js";
|
|
3
|
+
import type { ResolvedExecutionProfileRuntime } from "../../runtime/execution-profile/index.js";
|
|
4
|
+
import type { ResolvedHarnessContract } from "../../runtime/harness/index.js";
|
|
2
5
|
import type { RunnerPromptBlock, RunnerRecipeContext } from "../types.js";
|
|
6
|
+
type PromptSourcePayload = {
|
|
7
|
+
source: string;
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
};
|
|
11
|
+
type PromptSourceTraceMetadata = {
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
type ResolvedPromptSource = ResolvedBehavior<PromptSourcePayload, PromptSourceTraceMetadata>;
|
|
15
|
+
export declare function resolveOwnerProfilePromptSource(opts: {
|
|
16
|
+
git_root: string;
|
|
17
|
+
agents_dir: string;
|
|
18
|
+
owner_id: string;
|
|
19
|
+
}): Promise<ResolvedPromptSource>;
|
|
20
|
+
export declare function resolvePolicyGatewayPromptSource(opts: {
|
|
21
|
+
git_root: string;
|
|
22
|
+
fallback_flavor: PolicyGatewayFlavor;
|
|
23
|
+
harness?: ResolvedHarnessContract;
|
|
24
|
+
}): Promise<ResolvedPromptSource>;
|
|
3
25
|
export declare function collectRunnerBasePrompts(opts: {
|
|
4
26
|
git_root: string;
|
|
5
27
|
owner_id: string;
|
|
6
28
|
agents_dir?: string;
|
|
7
29
|
fallback_policy_gateway_flavor?: PolicyGatewayFlavor;
|
|
8
30
|
recipe?: RunnerRecipeContext;
|
|
31
|
+
harness?: ResolvedHarnessContract;
|
|
32
|
+
execution_profile?: ResolvedExecutionProfileRuntime;
|
|
9
33
|
}): Promise<RunnerPromptBlock[]>;
|
|
34
|
+
export {};
|
|
10
35
|
//# sourceMappingURL=base-prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-prompts.d.ts","sourceRoot":"","sources":["../../../src/runner/context/base-prompts.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAoB,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"base-prompts.d.ts","sourceRoot":"","sources":["../../../src/runner/context/base-prompts.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAoB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA8D5F,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,oBAAoB,GAAG,gBAAgB,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,CAAC;AAmD7F,wBAAsB,+BAA+B,CAAC,IAAI,EAAE;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2ChC;AAwCD,wBAAsB,gCAAgC,CAAC,IAAI,EAAE;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,mBAAmB,CAAC;IACrC,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyChC;AA8MD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B,CAAC,EAAE,mBAAmB,CAAC;IACrD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,iBAAiB,CAAC,EAAE,+BAA+B,CAAC;CACrD,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAgC/B"}
|