@te-river/opencode-team-mode 1.5.15 → 1.6.1
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 +853 -690
- package/README.zh-CN.md +761 -631
- package/dist/agents.d.ts +5 -3
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +19 -8
- package/dist/agents.js.map +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/capabilities.js +2 -2
- package/dist/capabilities.js.map +1 -1
- package/dist/host/note.d.ts +7 -0
- package/dist/host/note.d.ts.map +1 -0
- package/dist/host/note.js +28 -0
- package/dist/host/note.js.map +1 -0
- package/dist/host/v1.d.ts +14 -0
- package/dist/host/v1.d.ts.map +1 -0
- package/dist/host/v1.js +340 -0
- package/dist/host/v1.js.map +1 -0
- package/dist/host/v2-browser-gate.d.ts +45 -0
- package/dist/host/v2-browser-gate.d.ts.map +1 -0
- package/dist/host/v2-browser-gate.js +319 -0
- package/dist/host/v2-browser-gate.js.map +1 -0
- package/dist/host/v2-capabilities.d.ts +68 -0
- package/dist/host/v2-capabilities.d.ts.map +1 -0
- package/dist/host/v2-capabilities.js +146 -0
- package/dist/host/v2-capabilities.js.map +1 -0
- package/dist/host/v2-client.d.ts +53 -0
- package/dist/host/v2-client.d.ts.map +1 -0
- package/dist/host/v2-client.js +193 -0
- package/dist/host/v2-client.js.map +1 -0
- package/dist/host/v2-events.d.ts +56 -0
- package/dist/host/v2-events.d.ts.map +1 -0
- package/dist/host/v2-events.js +158 -0
- package/dist/host/v2-events.js.map +1 -0
- package/dist/host/v2-guard.d.ts +101 -0
- package/dist/host/v2-guard.d.ts.map +1 -0
- package/dist/host/v2-guard.js +199 -0
- package/dist/host/v2-guard.js.map +1 -0
- package/dist/host/v2-offload.d.ts +148 -0
- package/dist/host/v2-offload.d.ts.map +1 -0
- package/dist/host/v2-offload.js +288 -0
- package/dist/host/v2-offload.js.map +1 -0
- package/dist/host/v2-permissions.d.ts +123 -0
- package/dist/host/v2-permissions.d.ts.map +1 -0
- package/dist/host/v2-permissions.js +190 -0
- package/dist/host/v2-permissions.js.map +1 -0
- package/dist/host/v2-probe.d.ts +85 -0
- package/dist/host/v2-probe.d.ts.map +1 -0
- package/dist/host/v2-probe.js +268 -0
- package/dist/host/v2-probe.js.map +1 -0
- package/dist/host/v2-scope.d.ts +51 -0
- package/dist/host/v2-scope.d.ts.map +1 -0
- package/dist/host/v2-scope.js +58 -0
- package/dist/host/v2-scope.js.map +1 -0
- package/dist/host/v2-session-client.d.ts +74 -0
- package/dist/host/v2-session-client.d.ts.map +1 -0
- package/dist/host/v2-session-client.js +171 -0
- package/dist/host/v2-session-client.js.map +1 -0
- package/dist/host/v2-session.d.ts +85 -0
- package/dist/host/v2-session.d.ts.map +1 -0
- package/dist/host/v2-session.js +171 -0
- package/dist/host/v2-session.js.map +1 -0
- package/dist/host/v2-subagent.d.ts +157 -0
- package/dist/host/v2-subagent.d.ts.map +1 -0
- package/dist/host/v2-subagent.js +286 -0
- package/dist/host/v2-subagent.js.map +1 -0
- package/dist/host/v2-tool.d.ts +67 -0
- package/dist/host/v2-tool.d.ts.map +1 -0
- package/dist/host/v2-tool.js +209 -0
- package/dist/host/v2-tool.js.map +1 -0
- package/dist/host/v2-transcript.d.ts +73 -0
- package/dist/host/v2-transcript.d.ts.map +1 -0
- package/dist/host/v2-transcript.js +151 -0
- package/dist/host/v2-transcript.js.map +1 -0
- package/dist/host/v2-types.d.ts +229 -0
- package/dist/host/v2-types.d.ts.map +1 -0
- package/dist/host/v2-types.js +17 -0
- package/dist/host/v2-types.js.map +1 -0
- package/dist/host/v2.d.ts +42 -0
- package/dist/host/v2.d.ts.map +1 -0
- package/dist/host/v2.js +706 -0
- package/dist/host/v2.js.map +1 -0
- package/dist/host-hooks.d.ts +13 -2
- package/dist/host-hooks.d.ts.map +1 -1
- package/dist/host-hooks.js +18 -5
- package/dist/host-hooks.js.map +1 -1
- package/dist/index.d.ts +23 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -326
- package/dist/index.js.map +1 -1
- package/dist/prompts/lead.d.ts +1 -1
- package/dist/prompts/lead.d.ts.map +1 -1
- package/dist/prompts/lead.js +452 -359
- package/dist/prompts/lead.js.map +1 -1
- package/dist/prompts/shared.d.ts +2 -2
- package/dist/prompts/shared.d.ts.map +1 -1
- package/dist/prompts/shared.js +89 -17
- package/dist/prompts/shared.js.map +1 -1
- package/dist/prompts/specialists.d.ts +2 -2
- package/dist/prompts/specialists.d.ts.map +1 -1
- package/dist/prompts/specialists.js +44 -10
- package/dist/prompts/specialists.js.map +1 -1
- package/dist/task-offload.d.ts +83 -0
- package/dist/task-offload.d.ts.map +1 -0
- package/dist/task-offload.js +174 -0
- package/dist/task-offload.js.map +1 -0
- package/dist/tm/args-schema.d.ts +4 -0
- package/dist/tm/args-schema.d.ts.map +1 -1
- package/dist/tm/args-schema.js +36 -3
- package/dist/tm/args-schema.js.map +1 -1
- package/dist/tm/board.d.ts +113 -0
- package/dist/tm/board.d.ts.map +1 -0
- package/dist/tm/board.js +275 -0
- package/dist/tm/board.js.map +1 -0
- package/dist/tm/browser.d.ts +325 -6
- package/dist/tm/browser.d.ts.map +1 -1
- package/dist/tm/browser.js +1360 -135
- package/dist/tm/browser.js.map +1 -1
- package/dist/tm/config.d.ts +36 -25
- package/dist/tm/config.d.ts.map +1 -1
- package/dist/tm/config.js +29 -7
- package/dist/tm/config.js.map +1 -1
- package/dist/tm/dispatch.d.ts +133 -53
- package/dist/tm/dispatch.d.ts.map +1 -1
- package/dist/tm/dispatch.js +481 -279
- package/dist/tm/dispatch.js.map +1 -1
- package/dist/tm/dupe-guard.d.ts +16 -3
- package/dist/tm/dupe-guard.d.ts.map +1 -1
- package/dist/tm/dupe-guard.js +27 -7
- package/dist/tm/dupe-guard.js.map +1 -1
- package/dist/tm/egress.d.ts +44 -0
- package/dist/tm/egress.d.ts.map +1 -0
- package/dist/tm/egress.js +191 -0
- package/dist/tm/egress.js.map +1 -0
- package/dist/tm/guard.js +1 -1
- package/dist/tm/guard.js.map +1 -1
- package/dist/tm/index.d.ts +67 -2
- package/dist/tm/index.d.ts.map +1 -1
- package/dist/tm/index.js +228 -20
- package/dist/tm/index.js.map +1 -1
- package/dist/tm/ledger.d.ts +114 -0
- package/dist/tm/ledger.d.ts.map +1 -0
- package/dist/tm/ledger.js +308 -0
- package/dist/tm/ledger.js.map +1 -0
- package/dist/tm/perm-ask.d.ts +45 -5
- package/dist/tm/perm-ask.d.ts.map +1 -1
- package/dist/tm/perm-ask.js +107 -7
- package/dist/tm/perm-ask.js.map +1 -1
- package/dist/tm/pipelines.d.ts.map +1 -1
- package/dist/tm/pipelines.js +24 -2
- package/dist/tm/pipelines.js.map +1 -1
- package/dist/tm/preview.d.ts +55 -0
- package/dist/tm/preview.d.ts.map +1 -1
- package/dist/tm/preview.js +225 -0
- package/dist/tm/preview.js.map +1 -1
- package/dist/tm/ptc/tool.d.ts.map +1 -1
- package/dist/tm/ptc/tool.js +2 -4
- package/dist/tm/ptc/tool.js.map +1 -1
- package/dist/tm/pty.d.ts.map +1 -1
- package/dist/tm/pty.js +6 -3
- package/dist/tm/pty.js.map +1 -1
- package/dist/tm/search.d.ts +5 -0
- package/dist/tm/search.d.ts.map +1 -1
- package/dist/tm/search.js +40 -8
- package/dist/tm/search.js.map +1 -1
- package/dist/tm/serp-loop.d.ts +45 -0
- package/dist/tm/serp-loop.d.ts.map +1 -0
- package/dist/tm/serp-loop.js +80 -0
- package/dist/tm/serp-loop.js.map +1 -0
- package/dist/tm/stats.d.ts +26 -0
- package/dist/tm/stats.d.ts.map +1 -1
- package/dist/tm/stats.js +194 -4
- package/dist/tm/stats.js.map +1 -1
- package/dist/tm/webfetch.d.ts +56 -0
- package/dist/tm/webfetch.d.ts.map +1 -1
- package/dist/tm/webfetch.js +187 -19
- package/dist/tm/webfetch.js.map +1 -1
- package/dist/tool-coerce.d.ts +24 -0
- package/dist/tool-coerce.d.ts.map +1 -0
- package/dist/tool-coerce.js +63 -0
- package/dist/tool-coerce.js.map +1 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/installation-v2.md +436 -0
- package/docs/installation.md +81 -2
- package/docs/research/agent-data-exchange.md +117 -0
- package/docs/research/browser-pane.md +89 -0
- package/docs/research/host-http-api.md +132 -0
- package/docs/research/host-subagent-injection.md +187 -0
- package/docs/research/plugin-loader-contract.md +261 -0
- package/docs/research/v2-builtin-tools.md +447 -0
- package/docs/v2-port-notes.md +315 -0
- package/index.js +7 -0
- package/package.json +4 -1
- package/scripts/gen-v2-config.mjs +304 -0
- package/scripts/lib/config-surgery.cjs +239 -0
- package/scripts/lib/fake-ctx.mjs +146 -0
package/dist/agents.d.ts
CHANGED
|
@@ -28,9 +28,11 @@
|
|
|
28
28
|
* - All agents run at temperature 0.2 for format discipline.
|
|
29
29
|
*/
|
|
30
30
|
import type { AgentConfig, AgentPermission } from "./types.js";
|
|
31
|
-
/** Grant the async
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
/** Grant the async COLLECT lever to the lead only (issue #6 + #7). No agent
|
|
32
|
+
* may spawn: `tm_dispatch` is denied unconditionally above and never
|
|
33
|
+
* registered on the tool surface, so delegation has exactly one route — the
|
|
34
|
+
* host's `task`. These matrix entries and the tools' own runtime `ctx.agent`
|
|
35
|
+
* checks are two independent locks. */
|
|
34
36
|
export declare function applyDispatcherPermission(permission: AgentPermission, isTeamLead: boolean): void;
|
|
35
37
|
export declare const agents: Record<string, AgentConfig>;
|
|
36
38
|
//# sourceMappingURL=agents.d.ts.map
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA6H9D;;;;wCAIwC;AACxC,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAIhG;AAiLD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
|
package/dist/agents.js
CHANGED
|
@@ -92,7 +92,14 @@ const PER_AGENT_TOOLS = ["edit", "write", "task", "bash", "todowrite", "question
|
|
|
92
92
|
* not a network channel, available to all six agents. tm_stats reads this
|
|
93
93
|
* plugin's own trajectory (no network, no shell, no secrets) so any role can
|
|
94
94
|
* answer "what did we spend" — and after a host upgrade, "what broke". */
|
|
95
|
-
|
|
95
|
+
/** tm_board_write is in this set on purpose. The blackboard is the ONLY
|
|
96
|
+
* oversized-deliverable channel, and two roles (architect, researcher) own no
|
|
97
|
+
* write/edit/bash at all — so a board write through the host's file tools is
|
|
98
|
+
* impossible for them by construction, and the rule that keeps a report from
|
|
99
|
+
* becoming a wall of text was un-followable exactly where it mattered. A
|
|
100
|
+
* governed writer scoped to <board-root>/<session>/<task>/ is the small fix;
|
|
101
|
+
* it is not a file tool, because it can neither overwrite nor leave the board. */
|
|
102
|
+
const TM_TOOLS = ["tm_read", "tm_grep", "tm_bash", "tm_fetch", "tm_memory", "tm_stats", "tm_board_write"];
|
|
96
103
|
/** M3: tm_ptc_run — explicit per-agent grant. v1.5.4 revised the original
|
|
97
104
|
* M3 ruling (five specialists = allow, team = deny): ALL SIX agents now
|
|
98
105
|
* get `allow` (per user request, CHANGELOG 1.5.4), overriding the tm_*
|
|
@@ -118,9 +125,11 @@ const whitelist = (...granted) => {
|
|
|
118
125
|
permission["tm_webfetch"] = "deny";
|
|
119
126
|
permission["tm_search"] = "deny";
|
|
120
127
|
permission["tm_browser"] = "deny";
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
128
|
+
// Nobody creates sub-agents through us any more: a tm_dispatch child is a
|
|
129
|
+
// session the user can neither open from a card nor stop from the UI, so
|
|
130
|
+
// delegation goes through the host's own `task` (governed, visible,
|
|
131
|
+
// killable). tm_join stays the lead's tool — it COLLECTS children (including
|
|
132
|
+
// host `task` children by id) and adopts leftovers from before the change.
|
|
124
133
|
permission["tm_dispatch"] = "deny";
|
|
125
134
|
permission["tm_join"] = "deny";
|
|
126
135
|
// tm_pty starts a real process, so it must pop the OFFICIAL dialog on
|
|
@@ -130,11 +139,13 @@ const whitelist = (...granted) => {
|
|
|
130
139
|
permission["tm_pty"] = "deny";
|
|
131
140
|
return permission;
|
|
132
141
|
};
|
|
133
|
-
/** Grant the async
|
|
134
|
-
*
|
|
135
|
-
*
|
|
142
|
+
/** Grant the async COLLECT lever to the lead only (issue #6 + #7). No agent
|
|
143
|
+
* may spawn: `tm_dispatch` is denied unconditionally above and never
|
|
144
|
+
* registered on the tool surface, so delegation has exactly one route — the
|
|
145
|
+
* host's `task`. These matrix entries and the tools' own runtime `ctx.agent`
|
|
146
|
+
* checks are two independent locks. */
|
|
136
147
|
export function applyDispatcherPermission(permission, isTeamLead) {
|
|
137
|
-
permission["tm_dispatch"] =
|
|
148
|
+
permission["tm_dispatch"] = "deny";
|
|
138
149
|
permission["tm_join"] = isTeamLead ? "allow" : "deny";
|
|
139
150
|
permission["tm_pty"] = isTeamLead ? { ...WEB_ASK_MAP } : "deny";
|
|
140
151
|
}
|
package/dist/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,E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AI,QAAQ,CAAC,UAAU,EAAE,CAAC;IACxB,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IAC7C,sBAAsB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IACjD,yBAAyB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACtD,CAAC;AACD,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;IACvE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;QACjB,kBAAkB,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACvC,wEAAwE;QACxE,sBAAsB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;QACpE,yBAAyB,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;AACH,CAAC;AAED,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,MAAM,CAAC,MAAM,MAAM,GAAgC;IACjD,MAAM,EAAE,QAAQ;IAChB,SAAS;IACT,WAAW;IACX,QAAQ;IACR,MAAM;IACN,UAAU;CACX,CAAA"}
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Everything this plugin does interesting leans on a host surface that is NOT
|
|
5
5
|
* part of a stability promise: `ctx.ask`, the `permission.asked` event,
|
|
6
|
-
* `client.session.
|
|
6
|
+
* `client.session.messages/children/status/abort`, `client.pty.*`, `tui.showToast`,
|
|
7
7
|
* and the handful of hooks the host agrees to call (`tool.definition`,
|
|
8
8
|
* `chat.params`, `shell.env`, the compaction pair). Each of our features
|
|
9
9
|
* already degrades gracefully when one of those disappears — which is exactly
|
package/dist/capabilities.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Everything this plugin does interesting leans on a host surface that is NOT
|
|
5
5
|
* part of a stability promise: `ctx.ask`, the `permission.asked` event,
|
|
6
|
-
* `client.session.
|
|
6
|
+
* `client.session.messages/children/status/abort`, `client.pty.*`, `tui.showToast`,
|
|
7
7
|
* and the handful of hooks the host agrees to call (`tool.definition`,
|
|
8
8
|
* `chat.params`, `shell.env`, the compaction pair). Each of our features
|
|
9
9
|
* already degrades gracefully when one of those disappears — which is exactly
|
|
@@ -35,7 +35,7 @@ const SEAMS = [
|
|
|
35
35
|
required: true,
|
|
36
36
|
note: "first observed by whichever tm_* tool runs",
|
|
37
37
|
},
|
|
38
|
-
{ seam: "client.session.
|
|
38
|
+
{ seam: "client.session.messages", feature: "tm_join (collecting a sub-agent reply)", evidence: "static", path: "session.messages", required: true },
|
|
39
39
|
{ seam: "client.session.children", feature: "tm_join recovery after a restart", evidence: "static", path: "session.children" },
|
|
40
40
|
{ seam: "client.session.status", feature: "tm_join bounded wait", evidence: "static", path: "session.status" },
|
|
41
41
|
{ seam: "client.session.abort", feature: "tm_join cancel:true", evidence: "static", path: "session.abort" },
|
package/dist/capabilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAiCH,MAAM,KAAK,GAAe;IACxB;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,gEAAgE;QACzE,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,4CAA4C;KACnD;IACD,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAiCH,M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AC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC;QAChF,MAAM;KACP,CAAA;AACH,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,sBAAsB,CAAC,IAA8B;IACnE,MAAM,KAAK,GAAG,CAAC,CAAW,EAAU,EAAE,CACpC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAA;IACtH,MAAM,KAAK,GAAG,CAAC,uBAAuB,EAAE,eAAe,CAAC,CAAA;IACxD,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,OAAO,MAAM,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;IACnG,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime prompt addendum both plugin personalities hand to the team
|
|
3
|
+
* agent. It lives here rather than inside a personality because the board
|
|
4
|
+
* root and the TTL sweeper are the same regardless of host generation.
|
|
5
|
+
*/
|
|
6
|
+
export declare function blackboardNote(root: string, ttlDays: number): string;
|
|
7
|
+
//# sourceMappingURL=note.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../src/host/note.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAqBpE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime prompt addendum both plugin personalities hand to the team
|
|
3
|
+
* agent. It lives here rather than inside a personality because the board
|
|
4
|
+
* root and the TTL sweeper are the same regardless of host generation.
|
|
5
|
+
*/
|
|
6
|
+
export function blackboardNote(root, ttlDays) {
|
|
7
|
+
return [
|
|
8
|
+
"",
|
|
9
|
+
"",
|
|
10
|
+
"## Team Blackboard — resolved for this workspace",
|
|
11
|
+
`Root directory: \`${root}\``,
|
|
12
|
+
`- Hybrid channel: specialist replies (the STATUS/CHANGES/FINDINGS/EVIDENCE/HANDOFF`,
|
|
13
|
+
` skeleton) are the PRIMARY transport — normal work needs no files at all.`,
|
|
14
|
+
`- Board files exist ONLY for oversized deliverables (>~50 lines), and they`,
|
|
15
|
+
` go through \`tm_board_write { task, topic, content, session? }\` — the board's`,
|
|
16
|
+
` write side, carried by every role including the ones with no file tool. It`,
|
|
17
|
+
` places \`<root>/<session-key>/<task-slug>/NN-<role>-<topic>[-rN].md\`, never`,
|
|
18
|
+
` overwrites, and answers with the PATH (never the content).`,
|
|
19
|
+
` On the FIRST board write of this conversation pass a session folder made from`,
|
|
20
|
+
` a compact clock timestamp (PowerShell: \`Get-Date -Format yyyyMMdd-HHmmss\`;`,
|
|
21
|
+
` POSIX: \`date +%Y%m%d-%H%M%S\`) and reuse it for every later task; omit it and`,
|
|
22
|
+
` the tool stamps one — that is how a role with no bash reaches the board at`,
|
|
23
|
+
` all. Never write into another conversation's session folder.`,
|
|
24
|
+
`- Auto-cleanup: the plugin sweeps task directories idle for more than ${ttlDays} days (at startup and hourly).`,
|
|
25
|
+
` This is the ONLY cleanup path — never delete task or session directories yourself.`,
|
|
26
|
+
].join("\n");
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../src/host/note.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,OAAe;IAC1D,OAAO;QACL,EAAE;QACF,EAAE;QACF,kDAAkD;QAClD,qBAAqB,IAAI,IAAI;QAC7B,oFAAoF;QACpF,4EAA4E;QAC5E,4EAA4E;QAC5E,kFAAkF;QAClF,+EAA+E;QAC/E,gFAAgF;QAChF,8DAA8D;QAC9D,iFAAiF;QACjF,gFAAgF;QAChF,kFAAkF;QAClF,8EAA8E;QAC9E,iEAAiE;QACjE,yEAAyE,OAAO,gCAAgC;QAChH,sFAAsF;KACvF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The v1 personality: everything this plugin does through the OpenCode 1.18.x
|
|
3
|
+
* `server(input, options)` hook object. Moved out of `src/index.ts` verbatim
|
|
4
|
+
* for the v2 port (see docs plan) — no behaviour change is allowed here; a v1
|
|
5
|
+
* host must observe byte-identical hooks, and the ~1700 assertions in
|
|
6
|
+
* test-*.mjs are the oracle that keeps that promise.
|
|
7
|
+
*
|
|
8
|
+
* v1-only by construction: the single composed `tool.execute.before` slot, the
|
|
9
|
+
* permission-event approval gate, the `{"*": "ask"}` bash escalation object,
|
|
10
|
+
* and `tui.showToast` notification.
|
|
11
|
+
*/
|
|
12
|
+
import type { PluginInput, Hooks } from "../types.js";
|
|
13
|
+
export declare function createV1Personality(input: PluginInput, options?: Record<string, unknown>): Promise<Hooks>;
|
|
14
|
+
//# sourceMappingURL=v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/host/v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAA8C,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAqCjG,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,KAAK,CAAC,CA4UhB"}
|
package/dist/host/v1.js
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The v1 personality: everything this plugin does through the OpenCode 1.18.x
|
|
3
|
+
* `server(input, options)` hook object. Moved out of `src/index.ts` verbatim
|
|
4
|
+
* for the v2 port (see docs plan) — no behaviour change is allowed here; a v1
|
|
5
|
+
* host must observe byte-identical hooks, and the ~1700 assertions in
|
|
6
|
+
* test-*.mjs are the oracle that keeps that promise.
|
|
7
|
+
*
|
|
8
|
+
* v1-only by construction: the single composed `tool.execute.before` slot, the
|
|
9
|
+
* permission-event approval gate, the `{"*": "ask"}` bash escalation object,
|
|
10
|
+
* and `tui.showToast` notification.
|
|
11
|
+
*/
|
|
12
|
+
import { agents } from "../agents.js";
|
|
13
|
+
import { commands } from "../commands.js";
|
|
14
|
+
import { startBlackboardMaintenance, resolveTtlMs, DEFAULT_TTL_DAYS, } from "../blackboard.js";
|
|
15
|
+
import { createEnvProtectHook, parseExtraDeny, resolveEnvProtectMode, bashAskPatterns, } from "../envprotect.js";
|
|
16
|
+
import { createApprovalGate, resolveAskTimeoutMs, hasPermissionReplyCapability, } from "../approval-gate.js";
|
|
17
|
+
import { createTmTools } from "../tm/index.js";
|
|
18
|
+
import { createBashTimeoutHook } from "../tm/bash-timeout.js";
|
|
19
|
+
import { createCapabilityProbe } from "../capabilities.js";
|
|
20
|
+
import { createTaskOffload } from "../task-offload.js";
|
|
21
|
+
import { coerceToolArgs } from "../tool-coerce.js";
|
|
22
|
+
import { ASK_GRACE_MS, setAskBridgeObserver, setAskWaitMs } from "../tm/perm-ask.js";
|
|
23
|
+
import { applyToolDefinition, applyChatParams, applySessionCompacting, applyCompactionAutoContinue, applyShellEnv, hookSwitches, TASK_HINT_BACKGROUND, } from "../host-hooks.js";
|
|
24
|
+
import { hostBackgroundSubagentsEnabled } from "../tm/dispatch.js";
|
|
25
|
+
import { blackboardNote } from "./note.js";
|
|
26
|
+
export async function createV1Personality(input, options) {
|
|
27
|
+
// ---------- blackboard maintenance (code-level TTL sweeper) ----------
|
|
28
|
+
const directory = typeof input?.directory === "string" && input.directory.length > 0
|
|
29
|
+
? input.directory
|
|
30
|
+
: process.cwd();
|
|
31
|
+
const ttlMs = resolveTtlMs(options);
|
|
32
|
+
const ttlDays = Math.round(ttlMs / (24 * 60 * 60 * 1000)) || DEFAULT_TTL_DAYS;
|
|
33
|
+
const boardRoot = startBlackboardMaintenance(directory, ttlMs);
|
|
34
|
+
const note = blackboardNote(boardRoot, ttlDays);
|
|
35
|
+
// ---------- R6 env protection (code-level interception) ----------
|
|
36
|
+
// Plugin option envProtect (default false): opt-in env protection.
|
|
37
|
+
// When disabled, R6 hook is not installed at all — no interception,
|
|
38
|
+
// no approval gate, no audit logging for env reads.
|
|
39
|
+
// When enabled, TM_ENV_PROTECT / TM_ENV_PROTECT_EXTRA_DENY still apply.
|
|
40
|
+
const envProtectMode = options?.envProtect
|
|
41
|
+
? resolveEnvProtectMode(process.env.TM_ENV_PROTECT)
|
|
42
|
+
: "off";
|
|
43
|
+
const envProtectExtra = parseExtraDeny(process.env.TM_ENV_PROTECT_EXTRA_DENY);
|
|
44
|
+
// ---------- unified approval gate (R6 env face + R2 danger face) ----------
|
|
45
|
+
// Layer 2: ONE timer that auto-REJECTS unanswered official-dialog requests
|
|
46
|
+
// after TM_ASK_TIMEOUT_MIN and (Layer 3) fails closed if the SDK reply is
|
|
47
|
+
// broken. Armed ONLY when R6 is not off AND the client exposes a
|
|
48
|
+
// permission-reply path — otherwise there is no live auto-reject and the
|
|
49
|
+
// R6 hook must keep hard-throwing every env read (fail-closed).
|
|
50
|
+
// Attention hook for EVERY official dialog the plugin observes (bash R2/R6
|
|
51
|
+
// asks AND the tm_* ctx.ask web dialogs): the host's `tui.showToast` RPC
|
|
52
|
+
// (verified 1.18.30 route: payload { title?, message, variant, duration })
|
|
53
|
+
// surfaces a toast so a user not staring at the screen still learns a
|
|
54
|
+
// confirmation is waiting. Best-effort — never breaks the gate.
|
|
55
|
+
const notifyAsk = (message) => {
|
|
56
|
+
try {
|
|
57
|
+
const tui = input?.client
|
|
58
|
+
?.tui;
|
|
59
|
+
if (typeof tui?.showToast === "function") {
|
|
60
|
+
const r = tui.showToast({
|
|
61
|
+
title: "OpenCode TeamMode",
|
|
62
|
+
message,
|
|
63
|
+
variant: "warning",
|
|
64
|
+
duration: 15_000,
|
|
65
|
+
});
|
|
66
|
+
if (r && typeof r.catch === "function") {
|
|
67
|
+
;
|
|
68
|
+
r.catch(() => { });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
/* notification is best-effort */
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const approvalGate = envProtectMode !== "off" && hasPermissionReplyCapability(input?.client)
|
|
77
|
+
? createApprovalGate({
|
|
78
|
+
client: input?.client,
|
|
79
|
+
timeoutMs: resolveAskTimeoutMs(process.env),
|
|
80
|
+
notify: notifyAsk,
|
|
81
|
+
})
|
|
82
|
+
: null;
|
|
83
|
+
if (approvalGate)
|
|
84
|
+
approvalGate.start();
|
|
85
|
+
// Sessions are only allowed to DEFER expressible env reads to the dialog
|
|
86
|
+
// once the gate registered them as carrying our injected bash ask set
|
|
87
|
+
// (reviewer C1: a global isArmed() deferral let stock build/plan agents
|
|
88
|
+
// run printenv silently). The authoritative source of that fact is the
|
|
89
|
+
// config hook below: it records exactly which agents got the escalated
|
|
90
|
+
// ask object, and a `message.updated`/`chat.message` user prompt routed
|
|
91
|
+
// to one of those agents registers its session (live-proven ordering:
|
|
92
|
+
// the user message event arrives before the session's first
|
|
93
|
+
// tool.execute.before, while permission.asked arrives AFTER it).
|
|
94
|
+
const injectedExecAgents = new Set();
|
|
95
|
+
const envProtectHook = createEnvProtectHook(input?.client, envProtectMode, envProtectExtra, { deferToApproval: (sessionID) => approvalGate?.canDefer(sessionID) ?? false,
|
|
96
|
+
envApproved: (sessionID) => approvalGate?.isEnvApproved(sessionID) ?? false });
|
|
97
|
+
// ---------- JIT layer-2 tools (tm_read / tm_grep / tm_bash / tm_fetch) ----------
|
|
98
|
+
// T0.4-verified static registration: server() hooks gain a `tool` segment.
|
|
99
|
+
// The R6 mode/extra resolved above are passed in so the tm_* pipelines
|
|
100
|
+
// share the SAME interception source as the built-in tools (anti-backdoor:
|
|
101
|
+
// the global hook ALSO aliases tm_* onto read/grep/bash — see envprotect).
|
|
102
|
+
// ---------- host-capability probe (see src/capabilities.ts) ----------
|
|
103
|
+
// The plugin's features degrade quietly when a host surface disappears;
|
|
104
|
+
// this records what is actually present and says so once, at startup,
|
|
105
|
+
// instead of letting an OpenCode upgrade surface as an agent working
|
|
106
|
+
// around something the user never agreed to lose.
|
|
107
|
+
let capabilityProbe = null;
|
|
108
|
+
const tmRuntime = await createTmTools(input, {
|
|
109
|
+
mode: envProtectMode,
|
|
110
|
+
extra: envProtectExtra,
|
|
111
|
+
notify: notifyAsk,
|
|
112
|
+
// The capability probe is built from the tm runtime (it needs the run
|
|
113
|
+
// store to log into), and tm_stats needs the probe back — a declaration
|
|
114
|
+
// before construction breaks the cycle without weakening either side.
|
|
115
|
+
capabilities: () => capabilityProbe?.snapshot() ?? [],
|
|
116
|
+
// A child session we take over (adopted from the host tree, or named to
|
|
117
|
+
// tm_join) is registered the moment it is recognised (the message.updated
|
|
118
|
+
// route below re-confirms it): an exec-role sub-agent whose session were
|
|
119
|
+
// NOT registered would hard-throw its own protected reads instead of
|
|
120
|
+
// opening the dialog.
|
|
121
|
+
onChildSession: (sessionID, agent) => {
|
|
122
|
+
if (approvalGate && injectedExecAgents.has(agent))
|
|
123
|
+
approvalGate.registerExecSession(sessionID);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
// ---------- host-hook switches (TM_TOOL_HINTS / TM_COMPACTION_*) ------
|
|
127
|
+
const hostSwitches = hookSwitches(process.env);
|
|
128
|
+
capabilityProbe = createCapabilityProbe({
|
|
129
|
+
client: input?.client,
|
|
130
|
+
hasShellBridge: typeof input?.$ === "function",
|
|
131
|
+
hasPermissionReply: hasPermissionReplyCapability(input?.client),
|
|
132
|
+
trajectory: (event) => tmRuntime.pipelines.store.appendTrajectory(event),
|
|
133
|
+
notify: notifyAsk,
|
|
134
|
+
});
|
|
135
|
+
// ctx.ask is only observable from inside a tool call — perm-ask reports
|
|
136
|
+
// every lookup it makes, which is how this row ever reaches 已验证.
|
|
137
|
+
// The tool-side backstop for a dialog nobody answers. It is deliberately
|
|
138
|
+
// LONGER than the gate's own auto-reject so the gate stays authoritative when it
|
|
139
|
+
// is armed; when it is not (R6 off, no reply capability) this is the only thing
|
|
140
|
+
// that keeps a governed call from hanging until the user interrupts the turn.
|
|
141
|
+
setAskWaitMs(resolveAskTimeoutMs(process.env) + ASK_GRACE_MS);
|
|
142
|
+
setAskBridgeObserver((present) => capabilityProbe?.observeAskBridge(present));
|
|
143
|
+
// Plan B's other half: keep the host's background-task result injection
|
|
144
|
+
// inside the context budget. Built here because it needs the tm runtime's
|
|
145
|
+
// thresholds and its trajectory writer.
|
|
146
|
+
const taskOffloadHook = createTaskOffload({
|
|
147
|
+
enabled: tmRuntime.config.taskOffload === "on",
|
|
148
|
+
thresholdTokens: tmRuntime.config.offloadThresholdText,
|
|
149
|
+
previewLines: tmRuntime.config.previewLines,
|
|
150
|
+
previewMaxTokens: tmRuntime.config.previewMaxTokens,
|
|
151
|
+
log: (event) => tmRuntime.pipelines.store.appendTrajectory(event),
|
|
152
|
+
});
|
|
153
|
+
// Startup report: one trajectory line always, one toast ONLY when a
|
|
154
|
+
// required surface is gone (a missing 待观察 row is not an alarm).
|
|
155
|
+
capabilityProbe.report();
|
|
156
|
+
// ---------- bash timeout clamp (issue #6, see tm/bash-timeout.ts) ------
|
|
157
|
+
const bashTimeoutHook = createBashTimeoutHook({
|
|
158
|
+
probeMs: tmRuntime.config.bashTimeoutProbeMs,
|
|
159
|
+
maxMs: tmRuntime.config.bashTimeoutMaxMs,
|
|
160
|
+
readonlyAllowed: tmRuntime.config.bashReadonlyAllowed,
|
|
161
|
+
onClamp: (info) => {
|
|
162
|
+
try {
|
|
163
|
+
tmRuntime.pipelines.store.appendTrajectory({
|
|
164
|
+
tool: "bash",
|
|
165
|
+
step_id: "timeout-clamp",
|
|
166
|
+
event: info.via,
|
|
167
|
+
from_ms: info.from,
|
|
168
|
+
to_ms: info.to,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
/* observability only */
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
return {
|
|
177
|
+
// ---------- v1 config hook: inject agents & commands ----------
|
|
178
|
+
config(cfg) {
|
|
179
|
+
if (!cfg.agent)
|
|
180
|
+
cfg.agent = {};
|
|
181
|
+
// Execution roles carry permission.bash === "allow"; escalate it to a
|
|
182
|
+
// pattern object so the host opens its official confirmation dialog
|
|
183
|
+
// for the R6 env face + R2 danger face (default `*` stays allow). A
|
|
184
|
+
// shallow copy keeps the module-level `agents` object pristine. The
|
|
185
|
+
// R6 env face is only injected while the approval gate can arm: with
|
|
186
|
+
// no arming client the R6 hook hard-throws env reads BEFORE any
|
|
187
|
+
// dialog could be satisfied, so those patterns would be dead popups.
|
|
188
|
+
const bashAsk = bashAskPatterns(envProtectMode, approvalGate !== null);
|
|
189
|
+
for (const [name, def] of Object.entries(agents)) {
|
|
190
|
+
// Respect user-defined overrides: never clobber an existing entry.
|
|
191
|
+
if (cfg.agent[name])
|
|
192
|
+
continue;
|
|
193
|
+
const permission = def.permission
|
|
194
|
+
? {
|
|
195
|
+
...def.permission,
|
|
196
|
+
...(def.permission.bash === "allow" ? { bash: bashAsk } : null),
|
|
197
|
+
}
|
|
198
|
+
: def.permission;
|
|
199
|
+
cfg.agent[name] = {
|
|
200
|
+
...def,
|
|
201
|
+
permission,
|
|
202
|
+
prompt: name === "team" ? (def.prompt ?? "") + note : def.prompt,
|
|
203
|
+
};
|
|
204
|
+
// deferral-registry seed: agents that ACTUALLY carry our escalated
|
|
205
|
+
// bash ask object (user-overridden agents never get added)
|
|
206
|
+
if (def.permission && def.permission.bash === "allow")
|
|
207
|
+
injectedExecAgents.add(name);
|
|
208
|
+
}
|
|
209
|
+
if (!cfg.command)
|
|
210
|
+
cfg.command = {};
|
|
211
|
+
for (const [name, def] of Object.entries(commands)) {
|
|
212
|
+
if (cfg.command[name])
|
|
213
|
+
continue;
|
|
214
|
+
cfg.command[name] = def;
|
|
215
|
+
}
|
|
216
|
+
// ---------- make Team the default agent (opt-out: defaultAgent:false)
|
|
217
|
+
const promote = options?.defaultAgent !== false;
|
|
218
|
+
if (promote && (!cfg.default_agent || cfg.default_agent === "build")) {
|
|
219
|
+
cfg.default_agent = "team";
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
// ---------- R6: block the model's env-var read paths in code ----------
|
|
223
|
+
// ONE hook, two independent jobs (the host calls the single
|
|
224
|
+
// `tool.execute.before` slot per plugin): first clamp a wasteful
|
|
225
|
+
// model-set bash timeout, then run the R6 interception. The clamp
|
|
226
|
+
// runs BEFORE R6 so a blocked call is never also a slow one.
|
|
227
|
+
"tool.execute.before": async (input, output) => {
|
|
228
|
+
capabilityProbe?.observeHook("tool.execute.before");
|
|
229
|
+
// First, and narrowest: a built-in boolean the model sent as a string
|
|
230
|
+
// (the host's schema rejects it — two dead `task {background}` calls
|
|
231
|
+
// proved the trap). Then the timeout clamp, then R6.
|
|
232
|
+
const coerced = coerceToolArgs(input, output);
|
|
233
|
+
if (coerced.length) {
|
|
234
|
+
tmRuntime.pipelines.store.appendTrajectory({
|
|
235
|
+
tool: String(input?.tool ?? "task"),
|
|
236
|
+
step_id: "args-coerce",
|
|
237
|
+
event: "coerced",
|
|
238
|
+
keys: coerced.join(","),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
bashTimeoutHook(input, output);
|
|
242
|
+
await envProtectHook(input, output);
|
|
243
|
+
},
|
|
244
|
+
// ---------- host-hook leverage beyond the tool surface (audit #2) ----
|
|
245
|
+
// Every one of these rides a published hook and mutates ONLY the
|
|
246
|
+
// fields whose shape is verified; each is independently switchable,
|
|
247
|
+
// because this host's d.ts has shipped surfaces the runtime never
|
|
248
|
+
// fires (permission.ask), so adapters must fail soft, not assume.
|
|
249
|
+
// The `observeHook` calls are that "not assume" made observable: a row
|
|
250
|
+
// stays 待观察 until the host actually calls the hook, and tm_stats
|
|
251
|
+
// reports it either way.
|
|
252
|
+
"tool.definition": (input, output) => {
|
|
253
|
+
capabilityProbe?.observeHook("tool.definition");
|
|
254
|
+
applyToolDefinition(input, output, hostSwitches.toolHints, hostBackgroundSubagentsEnabled() ? TASK_HINT_BACKGROUND : undefined);
|
|
255
|
+
},
|
|
256
|
+
"chat.params": (input, output) => {
|
|
257
|
+
capabilityProbe?.observeHook("chat.params");
|
|
258
|
+
applyChatParams(input, output, process.env);
|
|
259
|
+
},
|
|
260
|
+
"experimental.session.compacting": (input, output) => {
|
|
261
|
+
capabilityProbe?.observeHook("session.compacting");
|
|
262
|
+
applySessionCompacting(output, hostSwitches.compactionContext);
|
|
263
|
+
},
|
|
264
|
+
"experimental.compaction.autocontinue": (input, output) => {
|
|
265
|
+
capabilityProbe?.observeHook("compaction.autocontinue");
|
|
266
|
+
applyCompactionAutoContinue(output, process.env);
|
|
267
|
+
},
|
|
268
|
+
"shell.env": (input, output) => {
|
|
269
|
+
capabilityProbe?.observeHook("shell.env");
|
|
270
|
+
applyShellEnv(output, process.env);
|
|
271
|
+
},
|
|
272
|
+
// ---------- unified approval gate: watch the host permission dialog ---
|
|
273
|
+
event: ({ event }) => {
|
|
274
|
+
capabilityProbe?.observeEvent(event?.type ?? "");
|
|
275
|
+
// Async dispatch bookkeeping runs FIRST and independently of R6:
|
|
276
|
+
// session.idle / .error are what tell the lead its children settled.
|
|
277
|
+
tmRuntime.observeDispatchEvent(event);
|
|
278
|
+
if (!approvalGate)
|
|
279
|
+
return;
|
|
280
|
+
// Pre-tool session registration: the live host emits message.updated
|
|
281
|
+
// with the full UserMessage ({ sessionID, role:"user", agent }) when
|
|
282
|
+
// a prompt enters a session — BEFORE any tool.execute.before of that
|
|
283
|
+
// turn, which is exactly when the R6 hook needs to know the session
|
|
284
|
+
// carries our injected ask set (permission.asked only fires AFTER
|
|
285
|
+
// the hook, so it can never be the first-command registration).
|
|
286
|
+
if (event?.type === "message.updated") {
|
|
287
|
+
const info = event.properties?.info;
|
|
288
|
+
if (info &&
|
|
289
|
+
info.role === "user" &&
|
|
290
|
+
typeof info.agent === "string" &&
|
|
291
|
+
typeof info.sessionID === "string") {
|
|
292
|
+
// UserMessage.agent is a REQUIRED string in the host schema
|
|
293
|
+
// (verified in the desktop binary), so a user prompt always names
|
|
294
|
+
// its agent. Deferral stays live only while the CURRENT prompt
|
|
295
|
+
// runs an exec-role agent: a prompt routed to any other agent
|
|
296
|
+
// revokes the registration (stock agents' sessions would never
|
|
297
|
+
// open our dialogs, so a stale registration = silent env reads).
|
|
298
|
+
if (injectedExecAgents.has(info.agent)) {
|
|
299
|
+
approvalGate.registerExecSession(info.sessionID);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
approvalGate.revokeExecSession(info.sessionID);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
approvalGate.handleEvent(event);
|
|
308
|
+
},
|
|
309
|
+
// secondary registration channel (official 1.18.x contract; the event
|
|
310
|
+
// route above is the one verified against the live 1.18.29 bus)
|
|
311
|
+
"chat.message": (input, output) => {
|
|
312
|
+
// Plan B: the host's background sub-agent injects the child's FULL
|
|
313
|
+
// reply here. Governance first, and independent of the approval gate —
|
|
314
|
+
// it only ever touches synthetic parts carrying the host's own
|
|
315
|
+
// task envelope (see src/task-offload.ts).
|
|
316
|
+
taskOffloadHook(input, output ?? { message: undefined, parts: undefined });
|
|
317
|
+
if (!approvalGate)
|
|
318
|
+
return;
|
|
319
|
+
if (input &&
|
|
320
|
+
typeof input.sessionID === "string" &&
|
|
321
|
+
typeof input.agent === "string") {
|
|
322
|
+
if (injectedExecAgents.has(input.agent)) {
|
|
323
|
+
approvalGate.registerExecSession(input.sessionID);
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
approvalGate.revokeExecSession(input.sessionID);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
dispose: async () => {
|
|
331
|
+
approvalGate?.dispose();
|
|
332
|
+
// tm_browser owns a browser child process — kill it on teardown and
|
|
333
|
+
// WAIT, or the process can exit with the window still on screen.
|
|
334
|
+
await tmRuntime.dispose();
|
|
335
|
+
},
|
|
336
|
+
// ---------- JIT layer-2: tm_read / tm_grep / tm_bash / tm_fetch ----------
|
|
337
|
+
tool: tmRuntime.tools,
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/host/v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM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