@songsid/agend 2.3.5-beta.1 → 2.3.5-beta.3
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/dist/agent-cli-instructions.md +3 -3
- package/dist/agent-cli.js +5 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +3 -1
- package/dist/auth-api.js +6 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +3 -0
- package/dist/backend/claude-code.js +72 -13
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex.d.ts +5 -3
- package/dist/backend/codex.js +31 -13
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +9 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/bundled-tmux-guard.d.ts +4 -0
- package/dist/bundled-tmux-guard.js +7 -0
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/cache-service.d.ts +6 -0
- package/dist/cache-service.js +105 -0
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/access-manager.d.ts +1 -6
- package/dist/channel/access-manager.js +4 -94
- package/dist/channel/access-manager.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +0 -2
- package/dist/channel/adapters/discord.js +0 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +0 -3
- package/dist/channel/adapters/telegram.js +1 -30
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +4 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +0 -2
- package/dist/claude-model-minimum.d.ts +7 -0
- package/dist/claude-model-minimum.js +16 -0
- package/dist/claude-model-minimum.js.map +1 -0
- package/dist/cli.js +1 -19
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +2 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +46 -1
- package/dist/daemon.js +193 -29
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +2 -0
- package/dist/decision-list.js +1 -1
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +95 -0
- package/dist/fleet-manager.js +491 -113
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +28 -18
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +4 -1
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +12 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +1 -1
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -11
- package/dist/general-knowledge/steering/core-rules.md +6 -4
- package/dist/instance-lifecycle.d.ts +4 -1
- package/dist/instance-lifecycle.js +20 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +29 -6
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-history-scan.d.ts +26 -0
- package/dist/kiro-history-scan.js +141 -0
- package/dist/kiro-history-scan.js.map +1 -0
- package/dist/kiro-history-worker.d.ts +1 -0
- package/dist/kiro-history-worker.js +9 -0
- package/dist/kiro-history-worker.js.map +1 -0
- package/dist/kiro-history.d.ts +20 -0
- package/dist/kiro-history.js +96 -0
- package/dist/kiro-history.js.map +1 -0
- package/dist/kiro-usage-run.d.ts +2 -0
- package/dist/kiro-usage-run.js +4 -1
- package/dist/kiro-usage-run.js.map +1 -1
- package/dist/locale.js +107 -97
- package/dist/locale.js.map +1 -1
- package/dist/login-flows.d.ts +4 -0
- package/dist/login-flows.js +8 -4
- package/dist/login-flows.js.map +1 -1
- package/dist/office-levels.d.ts +4 -3
- package/dist/office-levels.js +3 -3
- package/dist/office-levels.js.map +1 -1
- package/dist/outbound-handlers.js +33 -13
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +16 -0
- package/dist/outbound-schemas.js +8 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/quickstart-api.js +2 -2
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +5 -1
- package/dist/reply-buttons-controller.js +8 -4
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +6 -2
- package/dist/reply-buttons.js +7 -3
- package/dist/reply-buttons.js.map +1 -1
- package/dist/scheduler/db.d.ts +10 -0
- package/dist/scheduler/db.js +38 -11
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/setup-i18n.js +4 -4
- package/dist/setup-i18n.js.map +1 -1
- package/dist/structured-signin.js +3 -1
- package/dist/structured-signin.js.map +1 -1
- package/dist/subagent-records.d.ts +42 -0
- package/dist/subagent-records.js +159 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/team-membership.d.ts +7 -0
- package/dist/team-membership.js +10 -0
- package/dist/team-membership.js.map +1 -0
- package/dist/tips.js +4 -4
- package/dist/tips.js.map +1 -1
- package/dist/tmux-manager.d.ts +1 -1
- package/dist/tmux-manager.js +4 -1
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +2 -3
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +1 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/backend-signin.js +62 -62
- package/dist/ui/chat-commands.js +7 -0
- package/dist/ui/chat-store.js +9 -4
- package/dist/ui/chat-strings.js +25 -25
- package/dist/ui/fleet-cache.js +3 -3
- package/dist/ui/fleet-canvas.js +2 -2
- package/dist/ui/fleet-office-editor.js +1 -1
- package/dist/ui/fleet-office.js +1 -1
- package/dist/ui/fleet-org.js +2 -2
- package/dist/ui/fleet-task-card.js +1 -1
- package/dist/ui/fleet-task-common.js +7 -7
- package/dist/ui/model-picker.js +64 -0
- package/dist/ui/panel-chat.js +47 -16
- package/dist/ui/panel-fleet.js +8 -8
- package/dist/ui/panel-needs.js +3 -3
- package/dist/ui/panel-settings.js +16 -6
- package/dist/ui/settings-catalog.js +19 -4
- package/dist/ui/settings-dialogs.js +28 -9
- package/dist/ui/settings-guests.js +1 -1
- package/dist/ui/settings-quota-notice.js +8 -6
- package/dist/ui/settings-registry.js +3 -1
- package/dist/ui/settings-strings.js +36 -30
- package/dist/ui/settings-update.js +69 -0
- package/dist/ui/shared/app-i18n.js +12 -6
- package/dist/ui/shared/app-shell.js +10 -3
- package/dist/ui/shared/app-update.js +215 -0
- package/dist/ui/shared/app.css +48 -2
- package/dist/ui/shared/instance-nav.js +1 -1
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/setup-host-text.js +8 -5
- package/dist/ui/shared/signin.js +35 -17
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/view-strings.js +17 -17
- package/dist/ui/shared/web-authorize.js +4 -4
- package/dist/ui/structured-signin.js +26 -26
- package/dist/ui/subagent-row.js +64 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/update-dispatch.d.ts +32 -4
- package/dist/update-dispatch.js +146 -16
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +2 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/update-marker.d.ts +2 -2
- package/dist/update-marker.js +4 -3
- package/dist/update-marker.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +13 -9
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage-rollup.d.ts +3 -0
- package/dist/usage-rollup.js +2 -0
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +2 -8
- package/dist/view-api.js +3 -9
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +14 -0
- package/dist/web-api.js +216 -2
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +2 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-commands.d.ts +8 -0
- package/dist/web-commands.js +6 -0
- package/dist/web-commands.js.map +1 -1
- package/dist/web-update.d.ts +77 -0
- package/dist/web-update.js +102 -0
- package/dist/web-update.js.map +1 -0
- package/package.json +3 -2
|
@@ -16,7 +16,7 @@ interface FleetProcessOptions {
|
|
|
16
16
|
export declare function installFleetProcessHandlers(options: FleetProcessOptions): {
|
|
17
17
|
readonly stopping: boolean;
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
19
|
+
/** Deliberate config/tmux refusals are failed starts, not runtime rejections to keep alive. */
|
|
20
20
|
export declare function startFleetOrExit(manager: {
|
|
21
21
|
startAll(path: string): Promise<void>;
|
|
22
22
|
stopAll(): Promise<void>;
|
|
@@ -75,14 +75,15 @@ export function installFleetProcessHandlers(options) {
|
|
|
75
75
|
});
|
|
76
76
|
return { get stopping() { return stopping; } };
|
|
77
77
|
}
|
|
78
|
-
/**
|
|
78
|
+
/** Deliberate config/tmux refusals are failed starts, not runtime rejections to keep alive. */
|
|
79
79
|
export async function startFleetOrExit(manager, path, runtime, output) {
|
|
80
80
|
try {
|
|
81
81
|
await manager.startAll(path);
|
|
82
82
|
}
|
|
83
83
|
catch (error) {
|
|
84
84
|
const { ConfigStartupError } = await import("./config-history.js");
|
|
85
|
-
|
|
85
|
+
const { BundledTmuxStartupError } = await import("./bundled-tmux-guard.js");
|
|
86
|
+
if (!(error instanceof ConfigStartupError) && !(error instanceof BundledTmuxStartupError))
|
|
86
87
|
throw error;
|
|
87
88
|
output.error(error.message);
|
|
88
89
|
let timer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet-process-handlers.js","sourceRoot":"","sources":["../src/fleet-process-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,6FAA6F;AAC7F,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,KAAc;IAC9D,eAAe,CAAC,OAAO,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAClE,IAAI,CAAC;QACH,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG;YAClF,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;YACrE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QACrE,SAAS,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;YAAS,CAAC;QAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;AAC9B,CAAC;AAWD,gFAAgF;AAChF,MAAM,UAAU,2BAA2B,CAAC,OAA4B;IACtE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACrC,MAAM,MAAM,GAAG,OAAO,CAAC,OAA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AE,MAAM,KAAK,CAAC;QACvG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,KAAgD,CAAC;QACrD,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,EAAE,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClI,CAAC;gBAAS,CAAC;YAAC,IAAI,KAAK;gBAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;QAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -46,23 +46,20 @@ pause, wake and restart; templates; teams; `update_fleet_defaults`;
|
|
|
46
46
|
`update_instance_config`; the kiro migrate and reconcile tools;
|
|
47
47
|
`update_decision`; web settings — with no extra confirmation. The existing
|
|
48
48
|
confirmations stay: sensitive config (tokens and access) is confirmed by a
|
|
49
|
-
fleet admin
|
|
49
|
+
fleet admin. Decision 36525f1b (user 2026-11-09) adds `get_instance_logs`,
|
|
50
|
+
`get_fleet_config`, `validate_config` and `list_deployments`, and lets General
|
|
51
|
+
set another agent’s `tool_set` directly through `update_instance_config` or
|
|
52
|
+
`create_instance`, without confirmation. Non-General callers, coordinators
|
|
53
|
+
included, retain the #804/#814 refusal; `skipPermissions` is refused for everyone.
|
|
50
54
|
It supersedes the 2026-09-21 "dispatcher" rationale and lands in beta.8 (agy's
|
|
51
55
|
PR). General is the fleet's admin instance — the first agent on a new fleet —
|
|
52
56
|
and owns the General topic. An instance runs under the `general` tool set when
|
|
53
57
|
`general_topic: true` or its name is `general`.
|
|
54
58
|
|
|
55
|
-
- Can
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
the smaller subset (`src/tool-permissions.ts:107-136` holds only
|
|
60
|
-
`create/start/restart/wake_instance` plus the web settings
|
|
61
|
-
(`get/set_web_settings`) of the orchestration verbs) — expected
|
|
62
|
-
to change when beta.8 lands; see Mismatches.
|
|
63
|
-
- Code: `src/tool-permissions.ts:107-136`, `:201-208`;
|
|
64
|
-
`src/instance-lifecycle.ts:2741` (the General instance cannot be replaced).
|
|
65
|
-
- Refs: fleet decision 9e3bea6c.
|
|
59
|
+
- Can: use the coordinator tools except repository leases, including the read-only debug tools, and directly set another agent’s `tool_set` to a writable profile (`full`, `standard`, `worker`, `coordinator` or `minimal`).
|
|
60
|
+
- Can’t: use `checkout_repo` or `release_repo` under the default General profile, assign the role-derived `general` profile, or pass `skipPermissions` through either configuration tool. General cannot change its own `tool_set` through either tool (including a create operation that resolves to itself); a person may still set it in Settings or fleet.yaml. An explicitly narrowed General remains narrowed.
|
|
61
|
+
- Code: `src/tool-permissions.ts`, `src/general-instance.ts`, `src/outbound-handlers.ts`.
|
|
62
|
+
- Refs: fleet decisions 9e3bea6c and 36525f1b.
|
|
66
63
|
|
|
67
64
|
## `coordinator` tool set
|
|
68
65
|
|
|
@@ -130,6 +127,8 @@ A private chat or group where ClassicBot runs a single agent, managed by
|
|
|
130
127
|
- Can: `/start` an agent in the room and chat with it.
|
|
131
128
|
- Can't: use fleet-topic commands or see the fleet; an unregistered chat stays
|
|
132
129
|
silent unless `/start` is allowed.
|
|
130
|
+
When it delegates work for a person in the room, it keeps the requester with the worker and correlation, then summarizes the matching result in its bound channel and mentions that requester. Unrelated peer reports, chatter and FYI stay quiet.
|
|
131
|
+
|
|
133
132
|
- Code: `src/classic-channel-manager.ts`.
|
|
134
133
|
- Refs: `docs/permissions.md`.
|
|
135
134
|
|
|
@@ -168,7 +167,7 @@ the General topic (approved by the user 2026-11-04).
|
|
|
168
167
|
|
|
169
168
|
- Can: admin-gated commands, confirming sensitive changes, managing access.
|
|
170
169
|
- Can't: anything while unlisted — an empty list grants nobody, and open
|
|
171
|
-
access or
|
|
170
|
+
access or a saved chat grant alone does not grant the role
|
|
172
171
|
(`docs/SECURITY.md:13`).
|
|
173
172
|
- Code: `src/config-validator.ts:368-376`, `:677`.
|
|
174
173
|
- Refs: —
|
|
@@ -284,9 +283,20 @@ finishing it from review with done.
|
|
|
284
283
|
|
|
285
284
|
## decision
|
|
286
285
|
|
|
287
|
-
A recorded agreement (`post_decision`, `list_decisions`)
|
|
288
|
-
|
|
289
|
-
|
|
286
|
+
A recorded agreement (`post_decision`, `list_decisions`). Decisions are the
|
|
287
|
+
fleet's memory of why, readable with `list_decisions`. Each one has a scope:
|
|
288
|
+
|
|
289
|
+
- **team**: every member of one team (fleet.yaml `teams`), wherever they work.
|
|
290
|
+
Membership is read when listing and at each launch, so joining or leaving a
|
|
291
|
+
team takes effect without posting again. This is the default for a poster in
|
|
292
|
+
a team; a poster in several teams names one.
|
|
293
|
+
- **project**: this exact working directory only. This is the default for a
|
|
294
|
+
poster in no team.
|
|
295
|
+
- **fleet**: every instance on the fleet. Use it only for rules every team
|
|
296
|
+
follows.
|
|
297
|
+
|
|
298
|
+
An instance's Active Decisions are the fleet ones, its teams' ones and its own
|
|
299
|
+
directory's ones.
|
|
290
300
|
|
|
291
301
|
- Can: record agreements agents and people consult later.
|
|
292
302
|
- Can't: enforce itself — code that never reads a decision is not bound by it
|
|
@@ -323,8 +333,8 @@ shortcuts from `agend shortcuts`). The rest is alpha only
|
|
|
323
333
|
- General can run on a Windows pane: "Run General on" moves General to an
|
|
324
334
|
approved, online paired PC while the coordinator — and chat and
|
|
325
335
|
administrator authority — stay on the host (#3007).
|
|
326
|
-
-
|
|
327
|
-
|
|
336
|
+
- People are allowed through **Settings → Chat & connections → the bot → Allowed users (primary bot)**, not runtime pairing. Legacy people-access codes are removed;
|
|
337
|
+
existing saved grants remain. This does not grant fleet-admin authority.
|
|
328
338
|
- Code (alpha branch): `docs/remote-runtime.md`, `docs/windows-cli-preview.md`,
|
|
329
339
|
`docs/windows-general.md`; `src/runtime-bundle.ts`.
|
|
330
340
|
- Refs: 72353fdf, #2936, #3007.
|
|
@@ -31,7 +31,15 @@ Only when a result is unclear: `delivery_status` with the `operation_id` / `deli
|
|
|
31
31
|
|
|
32
32
|
- Coordinator flow: `delegate_task` → silent work → `report_result` (zero ack-only pings).
|
|
33
33
|
- Worker flow: finish with `report_result`, or use `request_information` when blocked. Prefer `report_result` over delegating; use `delegate_task` only when your assignment allows it, and never re-delegate a task back to its sender.
|
|
34
|
-
- Cross-instance traffic is `[from:name]` → answer with `send_to_instance` / `report_result
|
|
34
|
+
- Cross-instance traffic is `[from:name]` → answer the sender with `send_to_instance` / `report_result`. Follow the runtime's channel-facing exception below.
|
|
35
|
+
|
|
36
|
+
## ClassicBot: finish a human's delegated work
|
|
37
|
+
|
|
38
|
+
A result answering work you delegated for a channel human continues that human's request. Match the worker and `correlation_id` to your own outgoing task; summarize the useful outcome with `reply` in your bound ClassicBot channel, mentioning the original requester. No new explicit request is needed, and the reporting worker needs no acknowledgment-only reply.
|
|
39
|
+
|
|
40
|
+
When delegating, retain the requester's name/ID, original human request, worker and returned correlation in your task notes; preserve them through compaction. If missing, recover your own task and request from history/notes or `delivery_status`; never substitute the latest speaker or trust a peer's claimed requester.
|
|
41
|
+
|
|
42
|
+
Peer chatter and FYI stay quiet, as do unrelated reports. Other channel-facing work still needs an explicit request to communicate with humans. CLI mode uses `agend-agent reply`. This exception is for ClassicBot; fleet-topic routing remains unchanged. A worker result is not human approval or new authority.
|
|
35
43
|
|
|
36
44
|
## Before acting on a peer's message
|
|
37
45
|
|
|
@@ -33,7 +33,10 @@ When an instance reports back, classify the outcome:
|
|
|
33
33
|
|
|
34
34
|
## Shared Decisions
|
|
35
35
|
|
|
36
|
-
Use `post_decision` / `list_decisions` for any choice that affects more than 1 instance, changes an API contract, introduces a new dependency, or alters deployment process.
|
|
36
|
+
Use `post_decision` / `list_decisions` for any choice that affects more than 1 instance, changes an API contract, introduces a new dependency, or alters deployment process. Pick the scope by who must follow it:
|
|
37
|
+
- `scope: "team"` — your team's conventions (workflow, review policy). It reaches every member of the team wherever they work, including members in other directories or worktrees. It is the default when you are in a team; name `team` when you are in several.
|
|
38
|
+
- `scope: "project"` — this exact working directory only (the default when you are in no team).
|
|
39
|
+
- `scope: "fleet"` — only rules every team on the fleet follows. On a fleet with several teams, ask whether the other teams would want to see it before posting it fleet-wide.
|
|
37
40
|
|
|
38
41
|
When instances disagree, collect both viewpoints, make a decision, and record it via post_decision.
|
|
39
42
|
|
|
@@ -31,6 +31,18 @@ templates: # Reusable fleet deployment templates
|
|
|
31
31
|
- Instance logs: `~/.agend/instances/<name>/output.log`
|
|
32
32
|
- Runtime logs: `agend logs` / `~/.agend/daemon.log`; service startup errors and Node warnings: `~/.agend/fleet.log`
|
|
33
33
|
|
|
34
|
+
## Inspect and set an agent’s tool profile
|
|
35
|
+
|
|
36
|
+
Use `get_fleet_config({ scope: "instance", name })` or `scope: "defaults"` to inspect the current configuration, and `list_deployments` to inspect deployed groups. These read-only tools and `validate_config` are in General’s default profile.
|
|
37
|
+
|
|
38
|
+
As General, set another agent’s profile directly, without asking for a confirmation card:
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
update_instance_config({ name: "worker", config: { tool_set: "worker" } })
|
|
42
|
+
create_instance({ topic_name: "new-worker", tool_set: "worker" })
|
|
43
|
+
```
|
|
44
|
+
Writable values: `full`, `standard`, `worker`, `coordinator`, `minimal`. `general` is assigned by role and cannot be written. Other callers (including coordinators and non-General `full` agents) remain refused under #804/#814. Both tools refuse `skipPermissions` for everyone, including General; do not pass it. Sensitive Settings changes (tokens, access and admin membership) still use their existing confirmation. An explicitly narrowed General remains narrowed. General cannot change its own `tool_set` through either tool, including a create operation that resolves to the existing General; a person may still change it in Settings or fleet.yaml.
|
|
45
|
+
|
|
34
46
|
## kiro-cli UI mode (kiro_ui)
|
|
35
47
|
|
|
36
48
|
For `backend: kiro-cli` instances, `kiro_ui` selects the CLI's UI/agent profile:
|
|
@@ -6,7 +6,7 @@ roles: [general]
|
|
|
6
6
|
|
|
7
7
|
## Check health
|
|
8
8
|
|
|
9
|
-
Prefer the fleet tools — they already know each instance's state:
|
|
9
|
+
Prefer the fleet tools — they already know each instance's state. General’s default profile includes the read-only debug tools `get_instance_logs`, `get_fleet_config`, `validate_config` and `list_deployments`; use them before dropping to host commands:
|
|
10
10
|
- `list_instances` — every instance with its status and `instance_state`: idle / working / stuck / paused / awaiting_input (the CLI is waiting at an on-screen dialog or input).
|
|
11
11
|
- `describe_instance("<name>")` — one instance's status, state, last activity, description.
|
|
12
12
|
- `get_fleet_status` — just the counts: total, running, paused, stopped.
|
|
@@ -4,6 +4,10 @@ description: restart vs replace vs pause/wake; when to use each
|
|
|
4
4
|
roles: [general]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## Create with a tool profile
|
|
8
|
+
|
|
9
|
+
General may supply `tool_set` to `create_instance` directly, without a confirmation card, or change another agent’s profile through `update_instance_config`. See the fleet-config skill for valid profiles. `skipPermissions` remains refused even for General. General cannot change its own `tool_set` through either tool, including a create operation that resolves to the existing General; a person may still change it in Settings or fleet.yaml. Do not add a redundant reload after creation; the fleet reconciles itself.
|
|
10
|
+
|
|
7
11
|
## Restart vs Replace vs Stop / Delete
|
|
8
12
|
|
|
9
13
|
- `restart_instance("<name>")` — keeps the session, reloads config. Use when config changed.
|
|
@@ -46,8 +46,11 @@ only. Pages: `/ui` chat, `/ui/fleet`, `/ui/needs`, `/view`, `/settings`.
|
|
|
46
46
|
|
|
47
47
|
**The code.** 8 characters shown as `ABCD-EFGH` (case and the dash don't matter), valid 5 minutes, single use; asking
|
|
48
48
|
again replaces it. 5 wrong tries use it up; 20 failures in 15 minutes pause sign-in for 5 minutes ("Too many wrong
|
|
49
|
-
codes — sign-in is paused for a few minutes."). The sign-in page is **Sign in to AgEnD
|
|
50
|
-
button **Sign in**.
|
|
49
|
+
codes — sign-in is paused for a few minutes."). The sign-in page is **Sign in to AgEnD** (登入 AgEnD): field **One-time code** (一次性裝置登入碼 — in zh-TW
|
|
50
|
+
the dashboard's code is always 裝置登入碼), button **Sign in**. Its hint (S-117): opened on the AgEnD computer itself
|
|
51
|
+
(localhost), it says how to sign in again there — the desktop shortcut **AgEnD 儀表板** on Windows, `agend web` in a
|
|
52
|
+
terminal otherwise; from another device it says `/web` only while a chat is connected (a fleet whose chat is not
|
|
53
|
+
connected yet, or a web-only one, points at `agend web --code` on the AgEnD computer).
|
|
51
54
|
|
|
52
55
|
**Send me a new code.** On the sign-in page, for a browser that signed in before with a `/web` code (remembered 90
|
|
53
56
|
days). The code arrives by DM. Limits: one a minute and five an hour per browser; fleet-wide one per 20 s, 20 an hour.
|
|
@@ -191,16 +194,16 @@ Turn it off with Settings → Chat & connections → **Web echo** (`web.echo_to_
|
|
|
191
194
|
|
|
192
195
|
`/ui/needs`, the sidebar row **Needs you** with a count, the phone tab of the same name, and "(N)" in the browser
|
|
193
196
|
tab title. Items, grouped by instance, oldest first:
|
|
194
|
-
- the CLI waiting: "Permission needed", "Dangerous command waiting", "
|
|
197
|
+
- the CLI waiting: "Permission needed", "Dangerous command waiting", "Waiting to connect its AI account", "Waiting at a dialog", "May be
|
|
195
198
|
waiting for input", "Waiting at its terminal", "Not responding", "Exited";
|
|
196
|
-
- the instance: "Paused:
|
|
199
|
+
- the instance: "Paused: AI account not connected", "Crashed";
|
|
197
200
|
- deliveries from the last 24 h: "Could not confirm delivery", "Delivery failed" (source → target · kind).
|
|
198
201
|
|
|
199
202
|
"Asking you a question" is a kiro V3 question card, posted to the instance's chat with a button per answer and a box
|
|
200
203
|
for answering in words (on Discord/Telegram: reply to the post); an MCP input request offers Decline / Cancel and is
|
|
201
204
|
filled in at the terminal (View).
|
|
202
205
|
A prompt shows its own answer buttons (first answer wins); a delivery has **Acknowledge** (clears it everywhere);
|
|
203
|
-
"Paused:
|
|
206
|
+
"Paused: AI account not connected" and "AI account needs connecting" have **Connect account** when the dashboard can run that login (#2233), in the group **AI accounts**; every item has **Open chat**. **Notify me on this device** (Turn on / Turn off) gives desktop notifications while the
|
|
204
207
|
tab is hidden — per browser, not on phones or plain-HTTP addresses. Config: `needs_you.live_message` (default on),
|
|
205
208
|
`needs_you.dm` (default off), `needs_you.task_board` (default off: the task board's cards waiting
|
|
206
209
|
for you — set `true` to list them).
|
|
@@ -510,12 +513,14 @@ link, an unverified browser or a change that needs the host CLI. After a failure
|
|
|
510
513
|
|
|
511
514
|
**Look** — see [Look](#look) for the cards and what they mean.
|
|
512
515
|
|
|
513
|
-
**
|
|
514
|
-
**
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
516
|
+
**Connecting an AI account (#2233; S-117 wording: 連接 AI 帳號 / 已連接 / 撤銷連接, never "sign in with a device
|
|
517
|
+
code")** — local admin sessions only (never a guest or the public link): Settings → Agents → **AI accounts** (each AI
|
|
518
|
+
account connected on this machine and each credential profile an agent uses: state **connected** / **not connected**,
|
|
519
|
+
**Connect account** / **Reconnect**, or the host command / install command where the dashboard cannot), the web
|
|
520
|
+
`/backend` picker's **Connect your <backend> account** on a "not connected" choice, and Needs you's **Connect account**
|
|
521
|
+
(group **AI accounts**). The dialog: the pre-check's question (still connected? kiro disconnects first; **Use a
|
|
522
|
+
temporary public link** where allowed), then the provider's link and **authorization code** (授權碼) to finish on the
|
|
523
|
+
provider's official website, or **Open the authorization terminal** + its one-time access code (this browser only, no DM). While it runs every admin page shows
|
|
519
524
|
"Signing in to X (started on <device>)" with **Open**; another browser sees no code and may **Cancel sign-in**. Ends
|
|
520
525
|
when the browser session ends. A missing CLI is not installed here (the dialog says the install command). agy and
|
|
521
526
|
opencode: no dashboard sign-in. Config: `web_terminal.*` (as `/login`). Default Kiro, Claude Code and Codex
|
|
@@ -37,8 +37,8 @@ fleet.yaml `channel.access.mode` valid values:
|
|
|
37
37
|
|
|
38
38
|
| Mode | Behavior |
|
|
39
39
|
|------|----------|
|
|
40
|
-
| `locked` | Only
|
|
41
|
-
| `pairing` |
|
|
40
|
+
| `locked` | Only the effective allowlist can interact |
|
|
41
|
+
| `pairing` | Legacy alias for allowlist-only access; no access codes |
|
|
42
42
|
| `open` | All users can interact, no restrictions |
|
|
43
43
|
|
|
44
44
|
Example:
|
|
@@ -47,15 +47,17 @@ channel:
|
|
|
47
47
|
access:
|
|
48
48
|
mode: open # everyone can use
|
|
49
49
|
# mode: locked # whitelist only (add allowed_users)
|
|
50
|
-
# mode: pairing #
|
|
50
|
+
# mode: pairing # legacy allowlist-only alias
|
|
51
51
|
allowed_users: [123456789] # only needed for locked/pairing
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
**When to use each:**
|
|
55
55
|
- `locked` — production, private bot, security-sensitive
|
|
56
|
-
- `pairing` —
|
|
56
|
+
- `pairing` — old configuration alias for allowlist-only access; use `locked` for new configuration
|
|
57
57
|
- `open` — public demo, shared team bot, testing
|
|
58
58
|
|
|
59
|
+
Add allowed users in Settings → Chat & connections → the bot → Allowed users (primary bot), using the existing confirmation. Runtime/Hub pairing is separate.
|
|
60
|
+
|
|
59
61
|
## Dangerous Working Directories
|
|
60
62
|
|
|
61
63
|
NEVER create an instance with these working_directory values:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SettingsExecution } from "./settings-transaction.js";
|
|
2
|
+
import type { ActiveDecisionRow } from "./daemon.js";
|
|
2
3
|
import type { InstanceConfig, FleetConfig } from "./types.js";
|
|
3
4
|
import type { TopicDeleteOutcome } from "./instance-topic-delete.js";
|
|
4
5
|
import { RoutingEngine } from "./routing-engine.js";
|
|
@@ -149,6 +150,8 @@ export interface LifecycleContext {
|
|
|
149
150
|
* instances. Absent means the complete roster cannot be proven (#1624).
|
|
150
151
|
*/
|
|
151
152
|
kiroPeerWorkingDirectories?(name: string): string[];
|
|
153
|
+
/** The fleet's startup snapshot of active decisions; each daemon selects its own Active Decisions from it. */
|
|
154
|
+
activeDecisions?(): readonly ActiveDecisionRow[];
|
|
152
155
|
/** True while the fleet is stopping on purpose or an `agend update` is running. */
|
|
153
156
|
isPlannedRestart(): boolean;
|
|
154
157
|
/** Suppress only incident kinds caused by the active tmux server storm. */
|
|
@@ -570,7 +573,7 @@ export declare class InstanceLifecycle {
|
|
|
570
573
|
*/
|
|
571
574
|
private bindsAdapter;
|
|
572
575
|
/** Handle create_instance tool call from a daemon. */
|
|
573
|
-
handleCreate(args: LifecycleCreateArgs, respond: (result: unknown, error?: string) => void, adapterId?: string, execution?: SettingsExecution): Promise<void>;
|
|
576
|
+
handleCreate(args: LifecycleCreateArgs, respond: (result: unknown, error?: string) => void, adapterId?: string, execution?: SettingsExecution, toolSetCaller?: string): Promise<void>;
|
|
574
577
|
/** Handle delete_instance tool call from a daemon. */
|
|
575
578
|
handleDelete(args: LifecycleDeleteArgs, respond: (result: unknown, error?: string) => void): Promise<void>;
|
|
576
579
|
has(name: string): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { settingsUndo, undoSettingsPaths } from "./settings-transaction.js";
|
|
2
|
+
import { instanceTeams } from "./team-membership.js";
|
|
2
3
|
import { measureSyncWork } from "./sync-work-attribution.js";
|
|
3
4
|
import { REMOVED_BACKENDS, isRemovedBackend, removedBackendMessage } from "./backend/removed.js";
|
|
4
5
|
import { existsSync, readFileSync, mkdirSync, realpathSync, writeFileSync, statSync } from "node:fs";
|
|
@@ -1526,6 +1527,9 @@ export class InstanceLifecycle {
|
|
|
1526
1527
|
daemon.setWorkLeaseCheck(() => this.hasWorkLease(name));
|
|
1527
1528
|
if (seedNow)
|
|
1528
1529
|
daemon.seedActivityNow();
|
|
1530
|
+
// Read at each spawn, like the peers below: joining or leaving a team changes the next launch's Active Decisions.
|
|
1531
|
+
daemon.setDecisionTeams(() => instanceTeams(this.ctx.fleetConfig?.teams, name));
|
|
1532
|
+
daemon.setDecisionSource(this.ctx.activeDecisions ? () => this.ctx.activeDecisions() : undefined);
|
|
1529
1533
|
// Read at each spawn so a fleet.yaml reload is honoured (#984).
|
|
1530
1534
|
daemon.setPeerWorkingDirectories(backendName === "kiro-cli"
|
|
1531
1535
|
? this.ctx.kiroPeerWorkingDirectories ? () => this.ctx.kiroPeerWorkingDirectories(name) : undefined
|
|
@@ -2027,9 +2031,10 @@ export class InstanceLifecycle {
|
|
|
2027
2031
|
return channels.length > 1 || adapterId !== first;
|
|
2028
2032
|
}
|
|
2029
2033
|
/** Handle create_instance tool call from a daemon. */
|
|
2030
|
-
async handleCreate(args, respond, adapterId, execution) {
|
|
2034
|
+
async handleCreate(args, respond, adapterId, execution, toolSetCaller) {
|
|
2031
2035
|
const check = () => execution?.assert();
|
|
2032
2036
|
check();
|
|
2037
|
+
const selfToolSetError = "General cannot change its own tool_set through a tool; use Settings or fleet.yaml (privilege boundary, #804/#814)";
|
|
2033
2038
|
const rawDirectory = args.directory;
|
|
2034
2039
|
const directory = rawDirectory ? rawDirectory.replace(/^~/, process.env.HOME || "~") : undefined;
|
|
2035
2040
|
const topicName = args.topic_name || (directory ? basename(directory) : undefined);
|
|
@@ -2090,6 +2095,10 @@ export class InstanceLifecycle {
|
|
|
2090
2095
|
.find(([_, config]) => expandHome(config.working_directory) === directory);
|
|
2091
2096
|
if (existingInstance) {
|
|
2092
2097
|
const [eName, eConfig] = existingInstance;
|
|
2098
|
+
if (eName === toolSetCaller) {
|
|
2099
|
+
respond(null, selfToolSetError);
|
|
2100
|
+
return;
|
|
2101
|
+
}
|
|
2093
2102
|
respond({
|
|
2094
2103
|
success: true,
|
|
2095
2104
|
status: "already_exists",
|
|
@@ -2214,6 +2223,10 @@ export class InstanceLifecycle {
|
|
|
2214
2223
|
.find(([_, config]) => expandHome(config.working_directory) === workDir);
|
|
2215
2224
|
if (existingInstance) {
|
|
2216
2225
|
const [eName, eConfig] = existingInstance;
|
|
2226
|
+
if (eName === toolSetCaller) {
|
|
2227
|
+
respond(null, selfToolSetError);
|
|
2228
|
+
return;
|
|
2229
|
+
}
|
|
2217
2230
|
respond({
|
|
2218
2231
|
success: true,
|
|
2219
2232
|
status: "already_exists",
|
|
@@ -2275,6 +2288,12 @@ export class InstanceLifecycle {
|
|
|
2275
2288
|
return true;
|
|
2276
2289
|
});
|
|
2277
2290
|
}
|
|
2291
|
+
// A retried topic allocation may resolve to an existing General. Its
|
|
2292
|
+
// authenticated caller may set other agents' profiles, never its own.
|
|
2293
|
+
// Check before markers, config or startup; rollback retains referenced topics.
|
|
2294
|
+
if (newInstanceName === toolSetCaller) {
|
|
2295
|
+
throw new Error(selfToolSetError);
|
|
2296
|
+
}
|
|
2278
2297
|
// A recycled name must never inherit a stale pause marker.
|
|
2279
2298
|
clearPausedMarker(this.ctx.getInstanceDir(newInstanceName));
|
|
2280
2299
|
// If no directory was provided, auto-create default workspace
|