@kody-ade/kody-engine 0.4.238 → 0.4.240
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/README.md +18 -18
- package/dist/{executables → agent-actions}/types.ts +52 -52
- package/dist/agent-responsibilities/run/agent-responsibility.md +10 -0
- package/dist/{duties → agent-responsibilities}/run/profile.json +1 -1
- package/dist/bin/kody.js +807 -801
- package/dist/plugins/hooks/block-write.json +1 -1
- package/kody.config.schema.json +8 -8
- package/package.json +2 -2
- package/dist/duties/run/duty.md +0 -10
- package/dist/scripts/preview-build-templates/default-Dockerfile.preview.dev +0 -43
- package/dist/scripts/preview-build-templates/default-Dockerfile.preview.prod +0 -40
- /package/dist/{executables → agent-actions}/run/profile.json +0 -0
- /package/dist/{executables → agent-actions}/run/prompt.md +0 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ kody: reads the issue → writes the code → runs your tests → opens a PR
|
|
|
27
27
|
- **No infrastructure.** Runs on the GitHub Actions you already have. One ~20-line
|
|
28
28
|
workflow file, installed via `npx`. Nothing to deploy or keep online.
|
|
29
29
|
- **Whole PR lifecycle, not just authoring.** `run`, `resolve`, `sync`, `merge`,
|
|
30
|
-
`revert`, previews, releases, and scheduled
|
|
30
|
+
`revert`, previews, releases, and scheduled agentResponsibilities — one executor, many verbs.
|
|
31
31
|
- **Declarative & extensible.** Every command is a folder of `profile.json` +
|
|
32
32
|
`prompt.md` + shell. Add a command by dropping a folder — no engine changes.
|
|
33
33
|
- **Bring your own model.** Anthropic native, or any provider via the built-in
|
|
@@ -74,19 +74,19 @@ See [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
|
74
74
|
┌─────────────────────────────────────────────┐
|
|
75
75
|
│ kody-engine CLI (@kody-ade/kody-engine) │
|
|
76
76
|
│ bin/kody.ts — entrypoint │
|
|
77
|
-
│ src/dispatch.ts —
|
|
78
|
-
│ src/executor.ts — runs
|
|
79
|
-
│ .kody/
|
|
80
|
-
│ profile.json ·
|
|
81
|
-
│ src/
|
|
77
|
+
│ src/dispatch.ts — agentResponsibility-driven routing │
|
|
78
|
+
│ src/executor.ts — runs agentResponsibility implementations│
|
|
79
|
+
│ .kody/agent-responsibilities/<slug>/ │
|
|
80
|
+
│ profile.json · agent-responsibility.md │
|
|
81
|
+
│ src/agent-actions/<name>/ │
|
|
82
82
|
│ profile.json · prompt.md · *.sh │
|
|
83
83
|
│ src/scripts/*.ts — cross-cutting catalog │
|
|
84
84
|
└─────────────────────────────────────────────┘
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Every top-level command is an auto-discovered
|
|
87
|
+
Every top-level command is an auto-discovered agentResponsibility action. The router has **zero agentAction names hardcoded** — comment dispatch resolves the first token after `@kody` through `config.aliases`, then falls back to the legacy-named `config.defaultAgentAction` / `config.defaultPrAgentAction` fields as default agentResponsibility actions. Drop a new `.kody/agent-responsibilities/<slug>/` directory with `profile.json` + `agent-responsibility.md`; that agentResponsibility chooses its implementation agentAction.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
AgentAction directories are private implementation units and contain **only** three kinds of files: `profile.json` (declaration), `prompt.md` (agent instructions), and `.sh` scripts (mechanical side-effect work). Cross-cutting TypeScript lives in [src/scripts/](src/scripts/); it can't import from `src/agent-actions/` and can't branch on `profile.name`.
|
|
90
90
|
|
|
91
91
|
## Install in a consumer repo
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ Executable directories are private implementation units and contain **only** thr
|
|
|
94
94
|
npx -y -p @kody-ade/kody-engine@latest kody-engine init
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
`kody-engine init` scaffolds [kody.config.json](kody.config.schema.json), `.github/workflows/kody.yml` (generated from `WORKFLOW_TEMPLATE` in [src/scripts/initFlow.ts](src/scripts/initFlow.ts)), and per-scheduled-
|
|
97
|
+
`kody-engine init` scaffolds [kody.config.json](kody.config.schema.json), `.github/workflows/kody.yml` (generated from `WORKFLOW_TEMPLATE` in [src/scripts/initFlow.ts](src/scripts/initFlow.ts)), and per-scheduled-agentResponsibility workflow files. Idempotent — pass `--force` to overwrite.
|
|
98
98
|
|
|
99
99
|
Required repo secrets: at least one model provider key (e.g. `MINIMAX_API_KEY`, `ANTHROPIC_API_KEY`). Recommended: `KODY_TOKEN` PAT so kody's commits trigger downstream CI and can modify `.github/workflows/*`.
|
|
100
100
|
|
|
@@ -123,10 +123,10 @@ kody-engine release-publish --issue <N> [--dry-run]
|
|
|
123
123
|
kody-engine release-deploy --issue <N> [--dry-run]
|
|
124
124
|
kody-engine npm-publish [--tag latest] [--access public] [--dry-run]
|
|
125
125
|
|
|
126
|
-
# scheduled
|
|
127
|
-
kody-engine
|
|
128
|
-
kody-engine
|
|
129
|
-
kody-engine
|
|
126
|
+
# scheduled agentResponsibilities and goals
|
|
127
|
+
kody-engine agent-responsibility-scheduler # fan out due .kody/agent-responsibilities/<slug>/ folders
|
|
128
|
+
kody-engine agent-responsibility-tick --agentResponsibility <slug> [--force] # one agent tick for one agentResponsibility
|
|
129
|
+
kody-engine agent-responsibility-tick-scripted --agentResponsibility <slug> [--force] # one deterministic tickScript agentResponsibility tick
|
|
130
130
|
kody-engine goal-scheduler # fan out active .kody/goals/instances/* state files
|
|
131
131
|
kody-engine goal-manager --goal <id> # advance one managed goal instance
|
|
132
132
|
|
|
@@ -138,15 +138,15 @@ kody-engine serve # LiteLLM/editor h
|
|
|
138
138
|
kody-engine brain-serve # Brain SSE server
|
|
139
139
|
kody-engine pool-serve # warm-pool owner
|
|
140
140
|
kody-engine runner-serve # warm-pool one-shot runner
|
|
141
|
-
kody-engine
|
|
141
|
+
kody-engine agent-ask --agent <slug> --message "..." # ad-hoc agent run
|
|
142
142
|
kody-engine stats # inspect run/event history
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
###
|
|
145
|
+
### AgentResponsibilities
|
|
146
146
|
|
|
147
|
-
A **
|
|
147
|
+
A **agentResponsibility** is a folder at `.kody/agent-responsibilities/<slug>/` with `profile.json` metadata (`every`, `agent`, `action`, `agentAction`, `stage`, and related fields) plus human-owned prose in `agent-responsibility.md`. `agent-responsibility-scheduler` wakes on cron, finds due agentResponsibilities, and dispatches either `agent-responsibility-tick` for an agent tick or `agent-responsibility-tick-scripted` for a deterministic `tickScript` agentResponsibility. `kody-engine init` copies built-in starter agentResponsibilities and scaffolds `.kody/agents/kody.md`.
|
|
148
148
|
|
|
149
|
-
Locked-toolbox
|
|
149
|
+
Locked-toolbox agentResponsibilities can declare `"tools": [...]` in `profile.json` to run with only the named high-level MCP intents plus `submit_state`; agentResponsibilities without `tools` keep the legacy Bash/gh toolbox.
|
|
150
150
|
|
|
151
151
|
### `release`
|
|
152
152
|
|
|
@@ -154,7 +154,7 @@ Locked-toolbox duties can declare `"tools": [...]` in `profile.json` to run with
|
|
|
154
154
|
|
|
155
155
|
## Profiles
|
|
156
156
|
|
|
157
|
-
A profile is declarative JSON + an adjacent `prompt.md`. See any directory under [src/
|
|
157
|
+
A profile is declarative JSON + an adjacent `prompt.md`. See any directory under [src/agent-actions/](src/agent-actions/) for examples. Adding a new command = new directory + profile + prompt + any `.sh` scripts + registering any new shared TS utilities under [src/scripts/](src/scripts/). No executor, entry, or dispatch changes.
|
|
158
158
|
|
|
159
159
|
See [AGENTS.md](AGENTS.md) for the full architectural contract.
|
|
160
160
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Types shared by the generic executor and
|
|
2
|
+
* Types shared by the generic executor and agentActions.
|
|
3
3
|
*
|
|
4
4
|
* The executor reads a Profile, validates the user's CLI args against
|
|
5
5
|
* Profile.inputs, then runs the declared preflight scripts → agent →
|
|
@@ -20,49 +20,49 @@ export type CapabilityKind = "observe" | "act" | "verify"
|
|
|
20
20
|
export interface Profile {
|
|
21
21
|
name: string
|
|
22
22
|
/**
|
|
23
|
-
* Public action name owned by a
|
|
24
|
-
* dispatch resolves that action to the
|
|
25
|
-
* implementation
|
|
23
|
+
* Public action name owned by a agentResponsibility. A user may type `@kody <action>`;
|
|
24
|
+
* dispatch resolves that action to the agentResponsibility, then the agentResponsibility selects the
|
|
25
|
+
* implementation agentAction. Absent → the agentResponsibility slug/name is the action.
|
|
26
26
|
*/
|
|
27
27
|
action?: string
|
|
28
28
|
/**
|
|
29
|
-
* Optional agent this
|
|
29
|
+
* Optional agent this agentAction runs *as*. When set, the executor
|
|
30
30
|
* loads `.kody/agents/<agent>.md` and injects that agent (authoritative
|
|
31
|
-
* identity) ahead of the
|
|
32
|
-
* unification hook: a "
|
|
31
|
+
* identity) ahead of the agentAction's own system-prompt append. This is the
|
|
32
|
+
* unification hook: a "agentResponsibility" is just an agentAction + an agent. Absent →
|
|
33
33
|
* runs with no agent (unchanged legacy behaviour). A declared-but-missing
|
|
34
34
|
* agent file is fatal at run time (see src/agents.ts).
|
|
35
35
|
*/
|
|
36
36
|
agent?: string
|
|
37
37
|
describe: string
|
|
38
38
|
/**
|
|
39
|
-
* Author-facing capability promise for a
|
|
39
|
+
* Author-facing capability promise for a agentResponsibility/agentAction. This classifies the
|
|
40
40
|
* shape of result it should return; it does not change executor control flow.
|
|
41
41
|
*/
|
|
42
42
|
capabilityKind?: CapabilityKind
|
|
43
43
|
/**
|
|
44
|
-
* Semantic role — what this
|
|
44
|
+
* Semantic role — what this agentAction IS, not when it runs.
|
|
45
45
|
* - primitive: single-step agent executor (flow → agent → verify → commit → PR).
|
|
46
46
|
* - orchestrator: no-agent, drives primitives via a postflight transition table
|
|
47
47
|
* (comment-based, one GHA run per step).
|
|
48
48
|
* - container: no-agent, runs declared `children` sequentially in-process
|
|
49
49
|
* (one GHA run for the whole flow). Routing is done by per-child
|
|
50
50
|
* `next` maps over action types — no @kody comments dispatched.
|
|
51
|
-
* - watch: scheduled observer that inspects repo state and may trigger other
|
|
51
|
+
* - watch: scheduled observer that inspects repo state and may trigger other agentActions.
|
|
52
52
|
* - utility: no-agent, one-off administrative work (scaffolding, release, etc.).
|
|
53
53
|
*
|
|
54
54
|
* Roles enforce shape at profile-load time and let help/dispatch treat
|
|
55
|
-
*
|
|
55
|
+
* agentActions differently by category.
|
|
56
56
|
*/
|
|
57
57
|
role: "primitive" | "orchestrator" | "container" | "watch" | "utility"
|
|
58
58
|
/**
|
|
59
|
-
* A
|
|
60
|
-
* rather than embedding it. When set, the loader resolves that
|
|
61
|
-
* full profile (claudeCode/scripts/prompt/agents) and overlays this
|
|
59
|
+
* A agentResponsibility is the WHY/WHEN layer: it references an agentAction (the HOW) by name
|
|
60
|
+
* rather than embedding it. When set, the loader resolves that agentAction's
|
|
61
|
+
* full profile (claudeCode/scripts/prompt/agents) and overlays this agentResponsibility's
|
|
62
62
|
* name + agent (WHO) + every (WHEN) + mentions. Absent → this profile IS an
|
|
63
|
-
*
|
|
63
|
+
* agentAction (defines its own how). agentAction = how, agent = who, agentResponsibility = why.
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
agentAction?: string
|
|
66
66
|
/**
|
|
67
67
|
* Execution model — orthogonal to `role`.
|
|
68
68
|
* `oneshot` (default): single invocation on demand.
|
|
@@ -71,31 +71,31 @@ export interface Profile {
|
|
|
71
71
|
*/
|
|
72
72
|
kind: "oneshot" | "scheduled"
|
|
73
73
|
/**
|
|
74
|
-
* Recurrence cadence for a
|
|
75
|
-
* markdown
|
|
76
|
-
* ("15m".."7d" | "manual"). Present → the
|
|
74
|
+
* Recurrence cadence for a agentResponsibility that runs on a timer (unified successor to a
|
|
75
|
+
* markdown agentResponsibility's `every:` metadata). One of the ScheduleEvery values
|
|
76
|
+
* ("15m".."7d" | "manual"). Present → the agent-responsibility-scheduler fires a one-shot run
|
|
77
77
|
* when due (no target). Absent → on-demand only (runs against an issue/PR).
|
|
78
|
-
* This is what makes "scheduled" just a field on the one
|
|
78
|
+
* This is what makes "scheduled" just a field on the one agentResponsibility shape.
|
|
79
79
|
*/
|
|
80
80
|
every?: string
|
|
81
81
|
/**
|
|
82
|
-
* Locked-toolbox palette (unified successor to a markdown
|
|
83
|
-
* metadata). When non-empty,
|
|
84
|
-
* executor spins up the in-process kody-
|
|
82
|
+
* Locked-toolbox palette (unified successor to a markdown agentResponsibility's `tools:`
|
|
83
|
+
* metadata). When non-empty, loadAgentResponsibilityState sets ctx.data.agentResponsibilityTools so the
|
|
84
|
+
* executor spins up the in-process kody-agentResponsibility MCP server and the agent runs
|
|
85
85
|
* MCP-only (Bash/Read revoked unless also in claudeCode.tools). Absent →
|
|
86
86
|
* normal SDK tools.
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
agentResponsibilityTools?: string[]
|
|
89
89
|
/**
|
|
90
|
-
* GitHub logins (no leading `@`) this
|
|
91
|
-
* to `@a @b` and exposed to the prompt as {{mentions}} (and as the
|
|
92
|
-
* operator mention), mirroring a markdown
|
|
90
|
+
* GitHub logins (no leading `@`) this agentResponsibility's output should mention. Rendered
|
|
91
|
+
* to `@a @b` and exposed to the prompt as {{mentions}} (and as the agentResponsibility-MCP
|
|
92
|
+
* operator mention), mirroring a markdown agentResponsibility's `mentions:` metadata.
|
|
93
93
|
*/
|
|
94
94
|
mentions?: string[]
|
|
95
95
|
/** Cron expression for scheduled profiles (e.g. "0 8 * * MON"). */
|
|
96
96
|
schedule?: string
|
|
97
97
|
/**
|
|
98
|
-
* Task-state phase label emitted when this
|
|
98
|
+
* Task-state phase label emitted when this agentAction completes successfully.
|
|
99
99
|
* Failing actions always set phase to "failed" regardless. Omitted → "idle".
|
|
100
100
|
* Lets state.ts stay generic — phase semantics live on the profile.
|
|
101
101
|
*/
|
|
@@ -111,7 +111,7 @@ export interface Profile {
|
|
|
111
111
|
*
|
|
112
112
|
* Lifecycles exist to consolidate orchestration boilerplate (label,
|
|
113
113
|
* context loading, verify, commit, comment) that recurs across many
|
|
114
|
-
*
|
|
114
|
+
* agentActions. Per-agentAction specifics still go in `scripts.preflight`
|
|
115
115
|
* and `scripts.postflight` — the lifecycle wraps them, it doesn't
|
|
116
116
|
* replace them.
|
|
117
117
|
*/
|
|
@@ -127,14 +127,14 @@ export interface Profile {
|
|
|
127
127
|
}
|
|
128
128
|
outputContract?: OutputContract
|
|
129
129
|
/**
|
|
130
|
-
* Declared artifacts consumed by this
|
|
130
|
+
* Declared artifacts consumed by this agentAction. The resolveArtifacts
|
|
131
131
|
* preflight loads each into ctx.data.artifacts[name] from the task-state
|
|
132
|
-
* comment. If `required: true` and the artifact is absent, the
|
|
132
|
+
* comment. If `required: true` and the artifact is absent, the agentAction
|
|
133
133
|
* fails fast.
|
|
134
134
|
*/
|
|
135
135
|
inputArtifacts: InputArtifactSpec[]
|
|
136
136
|
/**
|
|
137
|
-
* Declared artifacts produced by this
|
|
137
|
+
* Declared artifacts produced by this agentAction. The persistArtifacts
|
|
138
138
|
* postflight reads the named source field from ctx.data and writes an
|
|
139
139
|
* Artifact entry into the task-state comment's `artifacts` map.
|
|
140
140
|
*/
|
|
@@ -175,16 +175,16 @@ export interface Profile {
|
|
|
175
175
|
* preflight runs. composePrompt prefers these over a fresh disk read so the
|
|
176
176
|
* template survives working-tree churn from runFlow's branch setup — on the CI
|
|
177
177
|
* runner a branch checkout can drop the tracked-but-ignore-negated
|
|
178
|
-
* `.kody/
|
|
178
|
+
* `.kody/agent-actions/<name>/` dir, and reading prompt.md afterwards fails with
|
|
179
179
|
* ENOENT even though profile.json (read here, earlier) loaded fine.
|
|
180
180
|
*/
|
|
181
181
|
promptTemplates?: Record<string, string>
|
|
182
182
|
/**
|
|
183
183
|
* Subagent markdown captured (by declared name) at load time, BEFORE any
|
|
184
184
|
* task branch switch — same rationale as promptTemplates. loadSubagents
|
|
185
|
-
* prefers this snapshot so a
|
|
186
|
-
* checkout (e.g. `.kody/
|
|
187
|
-
* crash a PR-targeted
|
|
185
|
+
* prefers this snapshot so a agentResponsibility's `agents/` surviving only on the default
|
|
186
|
+
* checkout (e.g. `.kody/agent-responsibilities/<slug>/agents/` absent on a PR branch) doesn't
|
|
187
|
+
* crash a PR-targeted agentResponsibility. Populated by captureSubagentTemplates.
|
|
188
188
|
*/
|
|
189
189
|
subagentTemplates?: Record<string, string>
|
|
190
190
|
}
|
|
@@ -200,7 +200,7 @@ export interface Profile {
|
|
|
200
200
|
* - no match → container aborts
|
|
201
201
|
*/
|
|
202
202
|
export interface ContainerChild {
|
|
203
|
-
/** Name of the
|
|
203
|
+
/** Name of the agentAction to invoke (must resolve via the registry). */
|
|
204
204
|
exec: string
|
|
205
205
|
/**
|
|
206
206
|
* Where to source the target identifier from when invoking this child.
|
|
@@ -221,7 +221,7 @@ export interface ContainerChild {
|
|
|
221
221
|
export interface InputArtifactSpec {
|
|
222
222
|
/** Artifact name (the key in state.artifacts). */
|
|
223
223
|
name: string
|
|
224
|
-
/** If true, the
|
|
224
|
+
/** If true, the agentAction fails when this artifact is missing from state. */
|
|
225
225
|
required?: boolean
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -302,7 +302,7 @@ export interface ClaudeCodeSpec {
|
|
|
302
302
|
/**
|
|
303
303
|
* Opt-in: expose an in-process `submit_state` tool the agent calls to
|
|
304
304
|
* persist its next state, instead of relying on a trailing fenced
|
|
305
|
-
* `kody-job-next-state` block it must remember to emit. Used by
|
|
305
|
+
* `kody-job-next-state` block it must remember to emit. Used by agent-responsibility-tick.
|
|
306
306
|
* The fenced block stays supported as a fallback. Default false.
|
|
307
307
|
*/
|
|
308
308
|
enableSubmitTool?: boolean
|
|
@@ -312,7 +312,7 @@ export interface ClaudeCodeSpec {
|
|
|
312
312
|
* first attempt). Set to 0 or omit to use the default.
|
|
313
313
|
*/
|
|
314
314
|
verifyAttempts?: number | null
|
|
315
|
-
/** SDK built-in tools this
|
|
315
|
+
/** SDK built-in tools this agentAction is allowed to use (capability pack). */
|
|
316
316
|
tools: string[]
|
|
317
317
|
/**
|
|
318
318
|
* Names of bundled hook configs to load (from src/plugins/hooks/<name>.json).
|
|
@@ -360,7 +360,7 @@ export interface ScriptEntry {
|
|
|
360
360
|
*/
|
|
361
361
|
script?: string
|
|
362
362
|
/**
|
|
363
|
-
* Filename of a shell script colocated with the
|
|
363
|
+
* Filename of a shell script colocated with the agentAction
|
|
364
364
|
* (e.g. "apply-prefer.sh"). Resolved relative to the profile's
|
|
365
365
|
* directory. Invoked via `bash <path> <with-args>` with ctx.args
|
|
366
366
|
* exposed as env vars (KODY_ARG_<UPPER_NAME>=<value>). A stdout
|
|
@@ -477,11 +477,11 @@ export interface Context {
|
|
|
477
477
|
* `@kody <next>` comment, which is silently ignored when Kody comments as
|
|
478
478
|
* a GitHub App (bot author), stalling the pipeline at classify.
|
|
479
479
|
*/
|
|
480
|
-
nextDispatch?: { action?: string;
|
|
480
|
+
nextDispatch?: { action?: string; agentResponsibility?: string; agentAction?: string; cliArgs: Record<string, unknown> }
|
|
481
481
|
/** In-process hand-off to a full Job, preserving job identity in task state. */
|
|
482
482
|
nextJob?: Job
|
|
483
483
|
/** Where to return after nextJob succeeds. Used by task-jobs to keep draining pending work. */
|
|
484
|
-
afterNextJob?: { action?: string;
|
|
484
|
+
afterNextJob?: { action?: string; agentResponsibility?: string; agentAction?: string; cliArgs: Record<string, unknown> }
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
487
|
* If a preflight script sets this to true, the executor skips the agent
|
|
@@ -513,26 +513,26 @@ export type AnyScript = PreflightScript | PostflightScript
|
|
|
513
513
|
// Job — the unified work request (task-state jobs collect run attempts).
|
|
514
514
|
//
|
|
515
515
|
// A Job is the required work the engine tries to execute, regardless of how it
|
|
516
|
-
// was triggered. It must reference a
|
|
517
|
-
// the
|
|
516
|
+
// was triggered. It must reference a agentResponsibility/action (why). The agentAction is only
|
|
517
|
+
// the agentResponsibility-selected implementation detail (how), never a standalone request.
|
|
518
518
|
// Task state stores this durable job separately from individual run attempts.
|
|
519
519
|
// Two flavors:
|
|
520
520
|
// - "instant" — run once now (an `@kody <verb>` comment or a manual dispatch)
|
|
521
521
|
// - "scheduled" — fired on `schedule` (cron) by the tick path
|
|
522
522
|
//
|
|
523
523
|
// `runJob` (src/job.ts) lowers a Job onto the private executor after resolving
|
|
524
|
-
// the
|
|
524
|
+
// the agentResponsibility, and seeds both stable job metadata and per-run metadata.
|
|
525
525
|
// ────────────────────────────────────────────────────────────────────────────
|
|
526
526
|
|
|
527
527
|
export type JobFlavor = "instant" | "scheduled"
|
|
528
528
|
|
|
529
529
|
export interface Job {
|
|
530
|
-
/** Public action the user/operator invoked. Mirrors the
|
|
530
|
+
/** Public action the user/operator invoked. Mirrors the agentResponsibility action. */
|
|
531
531
|
action?: string
|
|
532
|
-
/** How: implementation profile selected by the
|
|
533
|
-
|
|
534
|
-
/** Why (referenced): a
|
|
535
|
-
|
|
532
|
+
/** How: implementation profile selected by the agentResponsibility. Not valid by itself. */
|
|
533
|
+
agentAction?: string
|
|
534
|
+
/** Why (referenced): a agentResponsibility slug whose intent drives the run. */
|
|
535
|
+
agentResponsibility?: string
|
|
536
536
|
/** Why (inline): free-text intent, e.g. an `@kody` comment body. Untrusted —
|
|
537
537
|
* fenced where it enters a prompt, not here. */
|
|
538
538
|
why?: string
|
|
@@ -542,7 +542,7 @@ export interface Job {
|
|
|
542
542
|
schedule?: string
|
|
543
543
|
/** The issue/PR number this job acts on, when applicable. */
|
|
544
544
|
target?: number
|
|
545
|
-
/** Args passed through to the
|
|
545
|
+
/** Args passed through to the agentAction (mirrors DispatchResult.cliArgs). */
|
|
546
546
|
cliArgs: Record<string, unknown>
|
|
547
547
|
/** Run once now ("instant") or on the schedule ("scheduled"). */
|
|
548
548
|
flavor: JobFlavor
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Run
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Implement a GitHub issue end-to-end.
|
|
6
|
+
|
|
7
|
+
## Instructions
|
|
8
|
+
|
|
9
|
+
Use the `run` agentAction for the implementation details.
|
|
10
|
+
The agentResponsibility owns the public action name and the reason this action exists; the agentAction owns the method.
|