@xn-intenton-z2a/agentic-lib 7.1.37 → 7.1.39
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/package.json +1 -1
- package/src/actions/agentic-step/action.yml +1 -1
- package/src/actions/agentic-step/tasks/supervise.js +20 -0
- package/src/agents/agent-supervisor.md +17 -0
- package/src/seeds/zero-package.json +1 -1
- package/src/workflows/agent-discussions-bot.yml +3 -3
- package/src/workflows/agent-flow-fix-code.yml +3 -3
- package/src/workflows/agent-flow-maintain.yml +3 -3
- package/src/workflows/agent-flow-review.yml +3 -3
- package/src/workflows/agent-flow-transform.yml +3 -3
- package/src/workflows/agent-supervisor.yml +19 -3
package/package.json
CHANGED
|
@@ -132,6 +132,10 @@ function buildPrompt(ctx, agentInstructions) {
|
|
|
132
132
|
"",
|
|
133
133
|
"### Communication",
|
|
134
134
|
"- `respond:discussions | message: <text> | discussion-url: <url>` — Reply via discussions bot",
|
|
135
|
+
"",
|
|
136
|
+
"### Schedule Control",
|
|
137
|
+
"- `set-schedule:<frequency>` — Change supervisor schedule (off, weekly, daily, hourly, continuous). Use `set-schedule:weekly` when mission is substantially complete, `set-schedule:continuous` to ramp up.",
|
|
138
|
+
"",
|
|
135
139
|
"- `nop` — No action needed this cycle",
|
|
136
140
|
"",
|
|
137
141
|
"## Output Format",
|
|
@@ -235,8 +239,24 @@ const ACTION_HANDLERS = {
|
|
|
235
239
|
"respond:discussions": executeRespondDiscussions,
|
|
236
240
|
};
|
|
237
241
|
|
|
242
|
+
async function executeSetSchedule(octokit, repo, frequency) {
|
|
243
|
+
const valid = ["off", "weekly", "daily", "hourly", "continuous"];
|
|
244
|
+
if (!valid.includes(frequency)) {
|
|
245
|
+
return `skipped:invalid-frequency:${frequency}`;
|
|
246
|
+
}
|
|
247
|
+
core.info(`Setting supervisor schedule to: ${frequency}`);
|
|
248
|
+
await octokit.rest.actions.createWorkflowDispatch({
|
|
249
|
+
...repo,
|
|
250
|
+
workflow_id: "agent-supervisor-schedule.yml",
|
|
251
|
+
ref: "main",
|
|
252
|
+
inputs: { frequency },
|
|
253
|
+
});
|
|
254
|
+
return `set-schedule:${frequency}`;
|
|
255
|
+
}
|
|
256
|
+
|
|
238
257
|
async function executeAction(octokit, repo, action, params) {
|
|
239
258
|
if (action.startsWith("dispatch:")) return executeDispatch(octokit, repo, action, params);
|
|
259
|
+
if (action.startsWith("set-schedule:")) return executeSetSchedule(octokit, repo, action.replace("set-schedule:", ""));
|
|
240
260
|
if (action === "nop") return "nop";
|
|
241
261
|
const handler = ACTION_HANDLERS[action];
|
|
242
262
|
if (handler) return handler(octokit, repo, params);
|
|
@@ -26,10 +26,27 @@ You are the supervisor of an autonomous coding repository. Your job is to advanc
|
|
|
26
26
|
- **github:label-issue** — When an issue needs better categorisation for prioritisation.
|
|
27
27
|
- **github:close-issue** — When an issue is clearly resolved or no longer relevant.
|
|
28
28
|
- **respond:discussions** — When replying to a user request that came through the discussions bot. Include the discussion URL and a clear message.
|
|
29
|
+
- **set-schedule:\<frequency\>** — Change the supervisor schedule. Use `weekly` when mission is substantially achieved, `continuous` to ramp up for active development.
|
|
29
30
|
- **nop** — When everything is running optimally: transform is active, issues are flowing, no failures.
|
|
30
31
|
|
|
31
32
|
## Guidelines
|
|
32
33
|
|
|
34
|
+
## Mission Lifecycle
|
|
35
|
+
|
|
36
|
+
### Mission Initialised (init completed)
|
|
37
|
+
When recent workflow runs show an init completion, the repository has a fresh or updated mission.
|
|
38
|
+
Dispatch the discussions bot to announce the new mission to the community.
|
|
39
|
+
|
|
40
|
+
### Mission Complete
|
|
41
|
+
When the recent activity log shows the transform agent declaring the mission substantially complete
|
|
42
|
+
(all features implemented, tests passing, examples generated), take these steps together:
|
|
43
|
+
1. `dispatch:agent-discussions-bot` — announce completion in the discussions thread
|
|
44
|
+
2. `set-schedule:weekly` — reduce to weekly maintenance check-ins
|
|
45
|
+
|
|
46
|
+
Do NOT use `set-schedule:off` — the repository still needs periodic review for regressions and user requests.
|
|
47
|
+
|
|
48
|
+
## Guidelines
|
|
49
|
+
|
|
33
50
|
- Pick multiple actions when appropriate — concurrent work is encouraged.
|
|
34
51
|
- Always explain your reasoning — this helps future cycles understand the trajectory.
|
|
35
52
|
- When a user has made a request via discussions, prioritise responding to it.
|
|
@@ -35,10 +35,10 @@ on:
|
|
|
35
35
|
description: "Copilot SDK model to use"
|
|
36
36
|
type: choice
|
|
37
37
|
required: false
|
|
38
|
-
default: "
|
|
38
|
+
default: "gpt-5-mini"
|
|
39
39
|
options:
|
|
40
|
-
- claude-sonnet-4
|
|
41
40
|
- gpt-5-mini
|
|
41
|
+
- claude-sonnet-4
|
|
42
42
|
- gpt-4.1
|
|
43
43
|
|
|
44
44
|
permissions:
|
|
@@ -58,7 +58,7 @@ jobs:
|
|
|
58
58
|
shell: bash
|
|
59
59
|
run: |
|
|
60
60
|
MODEL='${{ inputs.model }}'
|
|
61
|
-
echo "model=${MODEL:-
|
|
61
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
62
62
|
outputs:
|
|
63
63
|
model: ${{ steps.normalise.outputs.model }}
|
|
64
64
|
|
|
@@ -25,10 +25,10 @@ on:
|
|
|
25
25
|
description: "Copilot SDK model to use"
|
|
26
26
|
type: choice
|
|
27
27
|
required: false
|
|
28
|
-
default: "
|
|
28
|
+
default: "gpt-5-mini"
|
|
29
29
|
options:
|
|
30
|
-
- claude-sonnet-4
|
|
31
30
|
- gpt-5-mini
|
|
31
|
+
- claude-sonnet-4
|
|
32
32
|
- gpt-4.1
|
|
33
33
|
|
|
34
34
|
permissions:
|
|
@@ -48,7 +48,7 @@ jobs:
|
|
|
48
48
|
shell: bash
|
|
49
49
|
run: |
|
|
50
50
|
MODEL='${{ inputs.model }}'
|
|
51
|
-
echo "model=${MODEL:-
|
|
51
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
52
52
|
outputs:
|
|
53
53
|
model: ${{ steps.normalise.outputs.model }}
|
|
54
54
|
|
|
@@ -29,10 +29,10 @@ on:
|
|
|
29
29
|
description: "Copilot SDK model to use"
|
|
30
30
|
type: choice
|
|
31
31
|
required: false
|
|
32
|
-
default: "
|
|
32
|
+
default: "gpt-5-mini"
|
|
33
33
|
options:
|
|
34
|
-
- claude-sonnet-4
|
|
35
34
|
- gpt-5-mini
|
|
35
|
+
- claude-sonnet-4
|
|
36
36
|
- gpt-4.1
|
|
37
37
|
|
|
38
38
|
permissions:
|
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
STEP='${{ inputs.step }}'
|
|
54
54
|
echo "step=${STEP:-all}" >> $GITHUB_OUTPUT
|
|
55
55
|
MODEL='${{ inputs.model }}'
|
|
56
|
-
echo "model=${MODEL:-
|
|
56
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
57
57
|
outputs:
|
|
58
58
|
step: ${{ steps.normalise.outputs.step }}
|
|
59
59
|
model: ${{ steps.normalise.outputs.model }}
|
|
@@ -28,10 +28,10 @@ on:
|
|
|
28
28
|
description: "Copilot SDK model to use"
|
|
29
29
|
type: choice
|
|
30
30
|
required: false
|
|
31
|
-
default: "
|
|
31
|
+
default: "gpt-5-mini"
|
|
32
32
|
options:
|
|
33
|
-
- claude-sonnet-4
|
|
34
33
|
- gpt-5-mini
|
|
34
|
+
- claude-sonnet-4
|
|
35
35
|
- gpt-4.1
|
|
36
36
|
|
|
37
37
|
permissions:
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
STEP='${{ inputs.step }}'
|
|
53
53
|
echo "step=${STEP:-all}" >> $GITHUB_OUTPUT
|
|
54
54
|
MODEL='${{ inputs.model }}'
|
|
55
|
-
echo "model=${MODEL:-
|
|
55
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
56
56
|
outputs:
|
|
57
57
|
step: ${{ steps.normalise.outputs.step }}
|
|
58
58
|
model: ${{ steps.normalise.outputs.model }}
|
|
@@ -20,10 +20,10 @@ on:
|
|
|
20
20
|
description: "Copilot SDK model to use"
|
|
21
21
|
type: choice
|
|
22
22
|
required: false
|
|
23
|
-
default: "
|
|
23
|
+
default: "gpt-5-mini"
|
|
24
24
|
options:
|
|
25
|
-
- claude-sonnet-4
|
|
26
25
|
- gpt-5-mini
|
|
26
|
+
- claude-sonnet-4
|
|
27
27
|
- gpt-4.1
|
|
28
28
|
|
|
29
29
|
permissions:
|
|
@@ -43,7 +43,7 @@ jobs:
|
|
|
43
43
|
shell: bash
|
|
44
44
|
run: |
|
|
45
45
|
MODEL='${{ inputs.model }}'
|
|
46
|
-
echo "model=${MODEL:-
|
|
46
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
47
47
|
outputs:
|
|
48
48
|
model: ${{ steps.normalise.outputs.model }}
|
|
49
49
|
|
|
@@ -26,6 +26,7 @@ on:
|
|
|
26
26
|
- agent-flow-maintain
|
|
27
27
|
- agent-flow-review
|
|
28
28
|
- ci-automerge
|
|
29
|
+
- init
|
|
29
30
|
types:
|
|
30
31
|
- completed
|
|
31
32
|
workflow_dispatch:
|
|
@@ -34,10 +35,10 @@ on:
|
|
|
34
35
|
description: "Copilot SDK model to use"
|
|
35
36
|
type: choice
|
|
36
37
|
required: false
|
|
37
|
-
default: "
|
|
38
|
+
default: "gpt-5-mini"
|
|
38
39
|
options:
|
|
39
|
-
- claude-sonnet-4
|
|
40
40
|
- gpt-5-mini
|
|
41
|
+
- claude-sonnet-4
|
|
41
42
|
- gpt-4.1
|
|
42
43
|
|
|
43
44
|
permissions:
|
|
@@ -62,7 +63,7 @@ jobs:
|
|
|
62
63
|
shell: bash
|
|
63
64
|
run: |
|
|
64
65
|
MODEL='${{ inputs.model }}'
|
|
65
|
-
echo "model=${MODEL:-
|
|
66
|
+
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
66
67
|
outputs:
|
|
67
68
|
model: ${{ steps.normalise.outputs.model }}
|
|
68
69
|
|
|
@@ -189,6 +190,21 @@ jobs:
|
|
|
189
190
|
core.warning(`Post-transform review dispatch failed: ${err.message}`);
|
|
190
191
|
}
|
|
191
192
|
|
|
193
|
+
// ─── 4. Successful init → dispatch discussions bot to announce new mission ───
|
|
194
|
+
try {
|
|
195
|
+
if (workflowRun && workflowName === 'init' && conclusion === 'success') {
|
|
196
|
+
core.info('Init completed successfully — dispatching discussions bot to announce.');
|
|
197
|
+
await github.rest.actions.createWorkflowDispatch({
|
|
198
|
+
owner, repo,
|
|
199
|
+
workflow_id: 'agent-discussions-bot.yml',
|
|
200
|
+
ref: 'main',
|
|
201
|
+
inputs: {},
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
} catch (err) {
|
|
205
|
+
core.warning(`Post-init discussions dispatch failed: ${err.message}`);
|
|
206
|
+
}
|
|
207
|
+
|
|
192
208
|
# ─── Proactive: LLM-driven strategic decisions ───────────────────────
|
|
193
209
|
supervise:
|
|
194
210
|
needs: params
|