@te-river/opencode-team-mode 1.7.3 → 1.7.4
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 +0 -1
- package/README.zh-CN.md +0 -1
- package/dist/host/v2-events.d.ts +8 -2
- package/dist/host/v2-events.d.ts.map +1 -1
- package/dist/host/v2-events.js +16 -2
- package/dist/host/v2-events.js.map +1 -1
- package/dist/host/v2-guard.d.ts +0 -44
- package/dist/host/v2-guard.d.ts.map +1 -1
- package/dist/host/v2-guard.js +8 -71
- package/dist/host/v2-guard.js.map +1 -1
- package/dist/host/v2-retry.d.ts +1 -1
- package/dist/host/v2-retry.js +1 -1
- package/dist/host/v2.d.ts +0 -10
- package/dist/host/v2.d.ts.map +1 -1
- package/dist/host/v2.js +3 -47
- package/dist/host/v2.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 +24 -12
- package/dist/prompts/lead.js.map +1 -1
- package/dist/prompts/shared.d.ts +1 -1
- package/dist/prompts/shared.d.ts.map +1 -1
- package/dist/prompts/shared.js +16 -0
- package/dist/prompts/shared.js.map +1 -1
- package/dist/tm/config-layers.d.ts.map +1 -1
- package/dist/tm/config-layers.js +0 -1
- package/dist/tm/config-layers.js.map +1 -1
- package/dist/tm/config.d.ts +0 -2
- package/dist/tm/config.d.ts.map +1 -1
- package/dist/tm/config.js.map +1 -1
- package/dist/tm/dispatch.d.ts +0 -9
- package/dist/tm/dispatch.d.ts.map +1 -1
- package/dist/tm/dispatch.js +14 -16
- package/dist/tm/dispatch.js.map +1 -1
- package/dist/tm/index.d.ts +1 -9
- package/dist/tm/index.d.ts.map +1 -1
- package/dist/tm/index.js +2 -10
- package/dist/tm/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/gen-v2-config.mjs +8 -7
package/README.md
CHANGED
|
@@ -723,7 +723,6 @@ for overrides, extra agents and disabling roles.
|
|
|
723
723
|
|
|
724
724
|
| Key | Type | Default | Meaning |
|
|
725
725
|
|---|---|---|---|
|
|
726
|
-
| `maxConcurrentSubagents` | number | `3` | Hard cap on concurrent `subagent` calls (`0` disables). Measured: `permission.evaluate` really fires for that action, so this is a gate and not a suggestion. |
|
|
727
726
|
| `prune` | `on`/`off` | `on` | Context pruning: replace a SETTLED message body with a self-explaining pointer (an offload handle, a child id, a note). Evidence is never destroyed — the reply skeleton, GOAL/ACCEPTANCE, provenance, system messages, a still-running child and an uncollected child id are protected whole, and the untouched messages stay byte-exact. `off` disables. |
|
|
728
727
|
| `pruneAtPercent` | number | `70` | Prune once the request reaches this share of the model's window, derived from `limit.context` — never a hard-coded token count. **Clamped to 40–90.** |
|
|
729
728
|
| `pruneKeepTailPercent` | number | `40` | Share of the window kept verbatim at the tail; the newest message is always kept. |
|
package/README.zh-CN.md
CHANGED
|
@@ -641,7 +641,6 @@ Team Lead 自己从不删黑板,你可以随时审计任何一次运行。
|
|
|
641
641
|
|
|
642
642
|
| 键 | 类型 | 默认 | 含义 |
|
|
643
643
|
|---|---|---|---|
|
|
644
|
-
| `maxConcurrentSubagents` | number | `3` | 并发 `subagent` 调用的硬上限(`0` 关闭)。实测 `permission.evaluate` 对这个动作真的会触发,所以这是道闸而不是建议。 |
|
|
645
644
|
| `prune` | `on`/`off` | `on` | 上下文裁剪:把**已结算**的消息正文替换成一个自解释的指针(卸载句柄、子代理 id、说明)。证据绝不被销毁——回复骨架、GOAL/ACCEPTANCE、来源说明、系统消息、仍在跑的子代理、尚未收集的子代理 id 全部完整保留,被动的消息逐字节不变。`off` 关闭。 |
|
|
646
645
|
| `pruneAtPercent` | number | `70` | 请求达到模型窗口的这份占比时开始裁剪,由 `limit.context` 推导——绝不是写死的 token 数。**夹在 40–90。** |
|
|
647
646
|
| `pruneKeepTailPercent` | number | `40` | 尾部逐字保留的窗口占比;最新一条消息永远保留。 |
|
package/dist/host/v2-events.d.ts
CHANGED
|
@@ -31,8 +31,14 @@
|
|
|
31
31
|
import type { HostEvent } from "../types.js";
|
|
32
32
|
import type { V2Registration } from "./v2-types.js";
|
|
33
33
|
/** The types the dispatcher understands, plus the v2 spellings we have observed.
|
|
34
|
-
* Anything else is counted, not forwarded.
|
|
35
|
-
|
|
34
|
+
* Anything else is counted, not forwarded.
|
|
35
|
+
*
|
|
36
|
+
* The `session.execution.*` entries are the 2.0.28 spellings, read off a live
|
|
37
|
+
* `v2-surface` row's `event_unknown_types` (measured, not guessed): the host
|
|
38
|
+
* publishes `session.execution.succeeded` / `.failed` / `.interrupted` where
|
|
39
|
+
* older generations said `session.idle` / `session.error`. They are listed
|
|
40
|
+
* because they were observed; a name we have not seen still stays counted. */
|
|
41
|
+
export declare const FEED_TYPES: readonly ["session.idle", "session.error", "session.status", "session.statused", "session.updated", "session.execution.succeeded", "session.execution.failed", "session.execution.interrupted"];
|
|
36
42
|
export interface V2EventFeedReport {
|
|
37
43
|
/** subscribe() existed and returned something iterable */
|
|
38
44
|
active: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-events.d.ts","sourceRoot":"","sources":["../../src/host/v2-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD
|
|
1
|
+
{"version":3,"file":"v2-events.d.ts","sourceRoot":"","sources":["../../src/host/v2-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD;;;;;;;+EAO+E;AAC/E,eAAO,MAAM,UAAU,iMASb,CAAA;AAEV,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B;iCAC6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,aAAa,EAAE,cAAc,EAAE,CAAA;IAC/B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1B;AAeD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE;IAAE,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GAC1G,OAAO,CAAC,WAAW,CAAC,CAwHtB"}
|
package/dist/host/v2-events.js
CHANGED
|
@@ -29,13 +29,22 @@
|
|
|
29
29
|
* of an exception in the host's event loop.
|
|
30
30
|
*/
|
|
31
31
|
/** The types the dispatcher understands, plus the v2 spellings we have observed.
|
|
32
|
-
* Anything else is counted, not forwarded.
|
|
32
|
+
* Anything else is counted, not forwarded.
|
|
33
|
+
*
|
|
34
|
+
* The `session.execution.*` entries are the 2.0.28 spellings, read off a live
|
|
35
|
+
* `v2-surface` row's `event_unknown_types` (measured, not guessed): the host
|
|
36
|
+
* publishes `session.execution.succeeded` / `.failed` / `.interrupted` where
|
|
37
|
+
* older generations said `session.idle` / `session.error`. They are listed
|
|
38
|
+
* because they were observed; a name we have not seen still stays counted. */
|
|
33
39
|
export const FEED_TYPES = [
|
|
34
40
|
"session.idle",
|
|
35
41
|
"session.error",
|
|
36
42
|
"session.status",
|
|
37
43
|
"session.statused",
|
|
38
44
|
"session.updated",
|
|
45
|
+
"session.execution.succeeded",
|
|
46
|
+
"session.execution.failed",
|
|
47
|
+
"session.execution.interrupted",
|
|
39
48
|
];
|
|
40
49
|
/** Event shapes the host has used across generations; read defensively because
|
|
41
50
|
* none of them is a promised interface. */
|
|
@@ -102,7 +111,12 @@ export async function applyV2EventFeed(ctx, opts) {
|
|
|
102
111
|
// tap with the same never-throw discipline as the usage tap. The payload
|
|
103
112
|
// never reaches the trajectory; only the classification count does (R6 binds
|
|
104
113
|
// a diagnostic).
|
|
105
|
-
|
|
114
|
+
//
|
|
115
|
+
// 2.0.28 renamed the failure event: a live `v2-surface` row shows
|
|
116
|
+
// `session.execution.failed` where older hosts said `session.error`, so the
|
|
117
|
+
// tap matches BOTH spellings. The governor's own `errorTextOf` does the
|
|
118
|
+
// extraction; this only routes the event to it.
|
|
119
|
+
if ((type === "session.error" || type === "session.execution.failed") && typeof opts.onError === "function") {
|
|
106
120
|
try {
|
|
107
121
|
opts.onError(ev);
|
|
108
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-events.js","sourceRoot":"","sources":["../../src/host/v2-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH
|
|
1
|
+
{"version":3,"file":"v2-events.js","sourceRoot":"","sources":["../../src/host/v2-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH;;;;;;;+EAO+E;AAC/E,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,6BAA6B;IAC7B,0BAA0B;IAC1B,+BAA+B;CACvB,CAAA;AAoBV;4CAC4C;AAC5C,SAAS,OAAO,CAAC,GAAY;IAC3B,MAAM,CAAC,GAAG,GAAiD,CAAA;IAC3D,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,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KAAK,UAAU,EAAE,CAAC;QACtC,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC;gBACH,CAAC;gBAAC,QAAqE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;YACvF,CAAC;YAAC,MAAM,CAAC;gBACP,uDAAuD;YACzD,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,8EAA8E;IAC9E,kFAAkF;IAClF,4EAA4E;IAC5E,6EAA6E;IAC7E,MAAM,IAAI,GAAI,QAAmC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,CAAA;IAC3E,IAAI,IAAI;QAAE,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;IAC7C,KAAK,CAAC,KAAK,IAAI,EAAE;QACf,IAAI,CAAC;YACH,IAAI,CAAC,IAAI;gBAAE,OAAM;YACjB,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,EAA4B,EAAE,CAAC;gBACzF,IAAI,MAAM;oBAAE,MAAK;gBACjB,MAAM,CAAC,GAAG,CAAC,CAAA;YACb,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,OAAO,GAAG,iBAAiB,MAAM,CAAE,GAAa,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;QAC1F,CAAC;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/host/v2-guard.d.ts
CHANGED
|
@@ -73,27 +73,6 @@ export declare function webGuard(resources: readonly string[]): GuardDecision |
|
|
|
73
73
|
export declare function pathGuard(action: string, resources: readonly string[], mode: EnvProtectMode): GuardDecision | null;
|
|
74
74
|
/** R6's env face and R2's danger face, per command line. */
|
|
75
75
|
export declare function shellGuard(command: string | undefined, mode: EnvProtectMode): GuardDecision | null;
|
|
76
|
-
/** One running child, as the concurrency refusal renders it. */
|
|
77
|
-
export interface RunningChild {
|
|
78
|
-
sessionID: string;
|
|
79
|
-
agent?: string;
|
|
80
|
-
elapsedMs?: number;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* The concurrency cap (#49 feature 2). `permission.evaluate` fires for
|
|
84
|
-
* `subagent` (measured live: `guard_actions: … subagent=16 …`), so the cap is a
|
|
85
|
-
* HARD gate on the same seam as the env-file / address red lines — not a prompt
|
|
86
|
-
* hint a model can talk itself past.
|
|
87
|
-
*
|
|
88
|
-
* When the caller's OWN running children reach the cap, the next dispatch is
|
|
89
|
-
* denied with a Chinese, actionable refusal that names the running ids and the
|
|
90
|
-
* two ways out (collect with `tm_join`, or stop with `tm_join {cancel:true}`).
|
|
91
|
-
*
|
|
92
|
-
* Pure and total: `cap <= 0` disables it (never denies), an empty running list
|
|
93
|
-
* never denies, and it never throws. Only ever stricter — the caller applies it
|
|
94
|
-
* through the same `rank` floor as every other guard.
|
|
95
|
-
*/
|
|
96
|
-
export declare function concurrencyGuard(action: string, running: readonly RunningChild[], cap: number): GuardDecision | null;
|
|
97
76
|
export interface GuardReport {
|
|
98
77
|
seen: number;
|
|
99
78
|
byAction: Record<string, number>;
|
|
@@ -122,15 +101,6 @@ export interface GuardReport {
|
|
|
122
101
|
envFileInputForeignSkipped: number;
|
|
123
102
|
/** …where the guard itself threw and the call was allowed through. */
|
|
124
103
|
envFileInputThrew: number;
|
|
125
|
-
/** #49 feature 2: `subagent` evaluations the concurrency cap looked at. */
|
|
126
|
-
concurrencySeen: number;
|
|
127
|
-
/** …where the cap fired and the dispatch was denied. */
|
|
128
|
-
concurrencyDenied: number;
|
|
129
|
-
/** The largest number of the caller's running children seen at one evaluation
|
|
130
|
-
* — the peak the cap is measured against, so "we never hit it" is a number. */
|
|
131
|
-
concurrencyRunningMax: number;
|
|
132
|
-
/** …where the running-children read threw and the call was allowed through. */
|
|
133
|
-
concurrencyThrew: number;
|
|
134
104
|
}
|
|
135
105
|
export interface BackgroundForceReport {
|
|
136
106
|
seen: number;
|
|
@@ -161,20 +131,6 @@ export declare function applyV2BackgroundForce(ctx: V2Context, opts?: {
|
|
|
161
131
|
export declare function applyV2PermissionGuards(ctx: V2Context, opts: {
|
|
162
132
|
envProtectMode: EnvProtectMode;
|
|
163
133
|
scope?: TeamScope;
|
|
164
|
-
/** #49 feature 2: the caller's own running children, read from the plugin's
|
|
165
|
-
* ONE children registry. Absent = the cap is not enforced (a host with no
|
|
166
|
-
* registry to read must not be denied on a guess). */
|
|
167
|
-
runningChildren?: (callerSessionID: string) => RunningChild[];
|
|
168
|
-
/** The cap. `<= 0` disables it. Defaults to 0 (off) so a caller that does
|
|
169
|
-
* not opt in keeps the pre-#49 behaviour byte-exactly. */
|
|
170
|
-
maxConcurrent?: number;
|
|
171
|
-
/** Fired once per denial so the personality can write the `v2-concurrency`
|
|
172
|
-
* trajectory line — the guard owns no store. */
|
|
173
|
-
onConcurrencyDenied?: (info: {
|
|
174
|
-
caller: string;
|
|
175
|
-
running: RunningChild[];
|
|
176
|
-
cap: number;
|
|
177
|
-
}) => void;
|
|
178
134
|
}): Promise<{
|
|
179
135
|
registrations: V2Registration[];
|
|
180
136
|
report: GuardReport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-guard.d.ts","sourceRoot":"","sources":["../../src/host/v2-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,MAAM,WAAW,aAAa;IAC5B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AAM,CAAA;IACtB;;qDAEiD;IACjD,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,SAAS,EACd,IAAI,EAAE;IACJ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACxF,GACA,OAAO,CAAC;IAAE,aAAa,EAAE,cAAc,EAAE,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC,CA8C1E"}
|
package/dist/host/v2-guard.js
CHANGED
|
@@ -142,39 +142,6 @@ export function shellGuard(command, mode) {
|
|
|
142
142
|
}
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
145
|
-
/**
|
|
146
|
-
* The concurrency cap (#49 feature 2). `permission.evaluate` fires for
|
|
147
|
-
* `subagent` (measured live: `guard_actions: … subagent=16 …`), so the cap is a
|
|
148
|
-
* HARD gate on the same seam as the env-file / address red lines — not a prompt
|
|
149
|
-
* hint a model can talk itself past.
|
|
150
|
-
*
|
|
151
|
-
* When the caller's OWN running children reach the cap, the next dispatch is
|
|
152
|
-
* denied with a Chinese, actionable refusal that names the running ids and the
|
|
153
|
-
* two ways out (collect with `tm_join`, or stop with `tm_join {cancel:true}`).
|
|
154
|
-
*
|
|
155
|
-
* Pure and total: `cap <= 0` disables it (never denies), an empty running list
|
|
156
|
-
* never denies, and it never throws. Only ever stricter — the caller applies it
|
|
157
|
-
* through the same `rank` floor as every other guard.
|
|
158
|
-
*/
|
|
159
|
-
export function concurrencyGuard(action, running, cap) {
|
|
160
|
-
if (action !== "subagent")
|
|
161
|
-
return null;
|
|
162
|
-
if (!Number.isFinite(cap) || cap <= 0)
|
|
163
|
-
return null;
|
|
164
|
-
if (running.length < cap)
|
|
165
|
-
return null;
|
|
166
|
-
const list = running
|
|
167
|
-
.map((c) => {
|
|
168
|
-
const secs = typeof c.elapsedMs === "number" && c.elapsedMs >= 0 ? ` 运行中 ${Math.round(c.elapsedMs / 1000)}s` : "";
|
|
169
|
-
return `${c.sessionID}${secs}`;
|
|
170
|
-
})
|
|
171
|
-
.join("、");
|
|
172
|
-
return {
|
|
173
|
-
effect: "deny",
|
|
174
|
-
why: "concurrency-cap",
|
|
175
|
-
message: `本会话已有 ${running.length} 个子代理在跑(上限 ${cap}):${list}。先 tm_join 收取已结算的,或 tm_join {cancel:true} 停掉不需要的,再派新的。`,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
145
|
/**
|
|
179
146
|
* Every sub-agent dispatch runs in the background.
|
|
180
147
|
*
|
|
@@ -218,7 +185,7 @@ export async function applyV2BackgroundForce(ctx, opts = {}) {
|
|
|
218
185
|
return { registrations, report };
|
|
219
186
|
}
|
|
220
187
|
export async function applyV2PermissionGuards(ctx, opts) {
|
|
221
|
-
const report = { seen: 0, byAction: {}, strictened: 0, denied: 0, shellMatched: 0, foreignSkipped: 0, envFileDenied: 0, envFileDeniedByInput: 0, envFileInputSeen: 0, envFileInputForeignSkipped: 0, envFileInputThrew: 0
|
|
188
|
+
const report = { seen: 0, byAction: {}, strictened: 0, denied: 0, shellMatched: 0, foreignSkipped: 0, envFileDenied: 0, envFileDeniedByInput: 0, envFileInputSeen: 0, envFileInputForeignSkipped: 0, envFileInputThrew: 0 };
|
|
222
189
|
const permission = ctx.permission;
|
|
223
190
|
if (!permission || typeof permission.hook !== "function") {
|
|
224
191
|
return { registrations: [], report, installed: false };
|
|
@@ -242,50 +209,20 @@ export async function applyV2PermissionGuards(ctx, opts) {
|
|
|
242
209
|
: action === "shell"
|
|
243
210
|
? shellGuard(resources[0], opts.envProtectMode)
|
|
244
211
|
: pathGuard(action, resources, opts.envProtectMode);
|
|
245
|
-
|
|
246
|
-
// `subagent` (measured live), so this is a hard gate on the same seam as the
|
|
247
|
-
// red lines. A read that throws is swallowed and counted — a throughput cap
|
|
248
|
-
// that fails OPEN is the honest failure mode, and it never loosens a host
|
|
249
|
-
// decision (the `rank` floor below still applies).
|
|
250
|
-
let concurrency = null;
|
|
251
|
-
if (action === "subagent") {
|
|
252
|
-
report.concurrencySeen++;
|
|
253
|
-
try {
|
|
254
|
-
const caller = String(event?.sessionID ?? "");
|
|
255
|
-
const running = opts.runningChildren ? opts.runningChildren(caller) : [];
|
|
256
|
-
if (running.length > report.concurrencyRunningMax)
|
|
257
|
-
report.concurrencyRunningMax = running.length;
|
|
258
|
-
concurrency = concurrencyGuard(action, running, opts.maxConcurrent ?? 0);
|
|
259
|
-
if (concurrency) {
|
|
260
|
-
report.concurrencyDenied++;
|
|
261
|
-
try {
|
|
262
|
-
opts.onConcurrencyDenied?.({ caller, running, cap: opts.maxConcurrent ?? 0 });
|
|
263
|
-
}
|
|
264
|
-
catch {
|
|
265
|
-
/* the trajectory line is an extra, never a reason to fail the call */
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
catch {
|
|
270
|
-
report.concurrencyThrew++;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
// The stricter of the two wins; a null on either side is not a decision.
|
|
274
|
-
const chosen = !decision ? concurrency : !concurrency ? decision : rank[concurrency.effect] > rank[decision.effect] ? concurrency : decision;
|
|
275
|
-
if (!chosen)
|
|
212
|
+
if (!decision)
|
|
276
213
|
return;
|
|
277
214
|
if (action === "shell")
|
|
278
215
|
report.shellMatched++;
|
|
279
|
-
if (
|
|
216
|
+
if (decision.why === "env-file-path")
|
|
280
217
|
report.envFileDenied++;
|
|
281
218
|
// Only ever stricter. A host that already decided to ask or deny keeps
|
|
282
219
|
// that decision — our classifier is a floor, not an override of the user.
|
|
283
|
-
if (rank[
|
|
220
|
+
if (rank[decision.effect] <= rank[event.effect ?? "allow"])
|
|
284
221
|
return;
|
|
285
|
-
event.effect =
|
|
286
|
-
if (
|
|
287
|
-
event.message =
|
|
288
|
-
if (
|
|
222
|
+
event.effect = decision.effect;
|
|
223
|
+
if (decision.message)
|
|
224
|
+
event.message = decision.message;
|
|
225
|
+
if (decision.effect === "deny")
|
|
289
226
|
report.denied++;
|
|
290
227
|
else
|
|
291
228
|
report.strictened++;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-guard.js","sourceRoot":"","sources":["../../src/host/v2-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,aAAa,GAEd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAWxD,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAW,CAAA;AAEnD;2DAC2D;AAC3D,SAAS,MAAM,CAAC,IAAY;IAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IACrB,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACnB,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC;YACH,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;IACD,wCAAwC;IACxC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAA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C,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAA;oBACnF,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAA;gBACrF,CAAC;gBAAC,MAAM,CAAC;oBACP,qEAAqE;oBACrE,yEAAyE;oBACzE,MAAM,CAAC,KAAK,EAAE,CAAA;gBAChB,CAAC;YACH,CAAC,CAAC;SACH,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2EAA2E;QAC3E,yEAAyE;QACzE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,CAAA;IACtC,CAAC;IACD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;AAClC,CAAC"}
|
package/dist/host/v2-retry.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* replays the hook in-process cannot duplicate it.
|
|
17
17
|
* 3. COOL DOWN: after `breakAfter` consecutive throttle errors the breaker
|
|
18
18
|
* trips and new `subagent` dispatches are DENIED for `cooldownMs`, on the
|
|
19
|
-
* same `permission.evaluate` seam the
|
|
19
|
+
* same `permission.evaluate` seam the permission guards use. Both only ever
|
|
20
20
|
* make a rule stricter, so they compose without fighting.
|
|
21
21
|
*
|
|
22
22
|
* Discipline (the same as every other v2 layer): Team-scoped, never throws (a
|
package/dist/host/v2-retry.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* replays the hook in-process cannot duplicate it.
|
|
17
17
|
* 3. COOL DOWN: after `breakAfter` consecutive throttle errors the breaker
|
|
18
18
|
* trips and new `subagent` dispatches are DENIED for `cooldownMs`, on the
|
|
19
|
-
* same `permission.evaluate` seam the
|
|
19
|
+
* same `permission.evaluate` seam the permission guards use. Both only ever
|
|
20
20
|
* make a rule stricter, so they compose without fighting.
|
|
21
21
|
*
|
|
22
22
|
* Discipline (the same as every other v2 layer): Team-scoped, never throws (a
|
package/dist/host/v2.d.ts
CHANGED
|
@@ -35,15 +35,5 @@ import type { V2Plugin } from "./v2-types.js";
|
|
|
35
35
|
* the host's own permission config, and the address red line is excluded from
|
|
36
36
|
* "ask the user" because that one has no consent path at all. */
|
|
37
37
|
export declare const V2_NO_DIALOG_NOTE: string;
|
|
38
|
-
/** #49 feature 2: the concurrency cap. Default 3 (matches "at most 3 parallel
|
|
39
|
-
* reviewers" and leaves a normal user headroom); `0` disables it. A missing or
|
|
40
|
-
* unparseable value falls back to the default rather than to 0, because a typo
|
|
41
|
-
* must not silently turn a safety cap off. A NEGATIVE is "off" too: the
|
|
42
|
-
* registry already clamps it to `min: 0` before this function sees it, so the
|
|
43
|
-
* `Math.max(0, …)` below is the defensive half of that same rule — a direct
|
|
44
|
-
* caller must not get a different answer than the file path. */
|
|
45
|
-
export declare function resolveMaxConcurrentSubagents(config: {
|
|
46
|
-
maxConcurrentSubagents: number;
|
|
47
|
-
}): number;
|
|
48
38
|
export declare const v2Personality: V2Plugin;
|
|
49
39
|
//# sourceMappingURL=v2.d.ts.map
|
package/dist/host/v2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/host/v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8BH,OAAO,KAAK,EAA0B,QAAQ,EAA8B,MAAM,eAAe,CAAA;AAEjG;;;;;kEAKkE;AAClE,eAAO,MAAM,iBAAiB,QAGmB,CAAA;AASjD
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/host/v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8BH,OAAO,KAAK,EAA0B,QAAQ,EAA8B,MAAM,eAAe,CAAA;AAEjG;;;;;kEAKkE;AAClE,eAAO,MAAM,iBAAiB,QAGmB,CAAA;AASjD,eAAO,MAAM,aAAa,EAAE,QAwlC3B,CAAA"}
|
package/dist/host/v2.js
CHANGED
|
@@ -71,19 +71,6 @@ function directoryOf(ctx) {
|
|
|
71
71
|
return loc.project.directory;
|
|
72
72
|
return process.cwd();
|
|
73
73
|
}
|
|
74
|
-
/** #49 feature 2: the concurrency cap. Default 3 (matches "at most 3 parallel
|
|
75
|
-
* reviewers" and leaves a normal user headroom); `0` disables it. A missing or
|
|
76
|
-
* unparseable value falls back to the default rather than to 0, because a typo
|
|
77
|
-
* must not silently turn a safety cap off. A NEGATIVE is "off" too: the
|
|
78
|
-
* registry already clamps it to `min: 0` before this function sees it, so the
|
|
79
|
-
* `Math.max(0, …)` below is the defensive half of that same rule — a direct
|
|
80
|
-
* caller must not get a different answer than the file path. */
|
|
81
|
-
export function resolveMaxConcurrentSubagents(config) {
|
|
82
|
-
const n = Number(config.maxConcurrentSubagents);
|
|
83
|
-
if (!Number.isFinite(n))
|
|
84
|
-
return 3;
|
|
85
|
-
return Math.max(0, Math.floor(n));
|
|
86
|
-
}
|
|
87
74
|
export const v2Personality = {
|
|
88
75
|
// #45: the display id (host plugin list) — the npm package name. NOT the
|
|
89
76
|
// storage/audit names (`team-mode/selfcheck`, `team-mode/ledger/`,
|
|
@@ -300,27 +287,6 @@ export const v2Personality = {
|
|
|
300
287
|
const guards = await applyV2PermissionGuards(ctx, {
|
|
301
288
|
envProtectMode,
|
|
302
289
|
scope,
|
|
303
|
-
// #49 feature 2: the concurrency cap reads the plugin's ONE children
|
|
304
|
-
// registry (the same rows tm_join collects), so a session cannot exceed the
|
|
305
|
-
// cap by dispatching faster than the lead collects. `0` disables it.
|
|
306
|
-
runningChildren: (caller) => tmRuntime.runningChildren(caller),
|
|
307
|
-
maxConcurrent: resolveMaxConcurrentSubagents(cfg),
|
|
308
|
-
onConcurrencyDenied: (info) => {
|
|
309
|
-
try {
|
|
310
|
-
tmRuntime.pipelines.store.appendTrajectory({
|
|
311
|
-
tool: "host",
|
|
312
|
-
step_id: "v2-concurrency",
|
|
313
|
-
event: "denied",
|
|
314
|
-
caller: info.caller,
|
|
315
|
-
cap: info.cap,
|
|
316
|
-
running: info.running.length,
|
|
317
|
-
ids: info.running.map((c) => c.sessionID).join(","),
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
catch {
|
|
321
|
-
/* the trajectory is an extra, never a reason to fail the call */
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
290
|
});
|
|
325
291
|
// Said out loud because it is a promise with a boundary: the user's rule is
|
|
326
292
|
// that nothing outside Team may be touched, and the honest consequence is that
|
|
@@ -757,9 +723,9 @@ export const v2Personality = {
|
|
|
757
723
|
// retry, so this layer only (1) recognises a provider throttle from the event
|
|
758
724
|
// feed, (2) injects an exact wait into the next request, and (3) denies new
|
|
759
725
|
// dispatches during the breaker's cooldown. Registered AFTER the permission
|
|
760
|
-
// guards so its `evaluate` hook runs after
|
|
761
|
-
//
|
|
762
|
-
//
|
|
726
|
+
// guards so its `evaluate` hook runs after them — both only ever deny, so
|
|
727
|
+
// whichever fires first keeps its message and the stricter effect (deny)
|
|
728
|
+
// stands either way.
|
|
763
729
|
const retryConfig = resolveRetryConfig(cfg);
|
|
764
730
|
// The layer owns no store, so the trajectory sink is wired here — same shape
|
|
765
731
|
// as the shell-timeout clamp's `onClamp` and the SERP guard's `onSerp`.
|
|
@@ -888,12 +854,6 @@ export const v2Personality = {
|
|
|
888
854
|
guard_envfile_input_threw: guards.report.envFileInputThrew,
|
|
889
855
|
guard_envfile_input_foreign_skipped: guards.report.envFileInputForeignSkipped,
|
|
890
856
|
guard_foreign_skipped: guards.report.foreignSkipped,
|
|
891
|
-
// #49 feature 2: the concurrency cap — how many `subagent` evaluations it
|
|
892
|
-
// looked at, how many it denied, and the peak running count it saw.
|
|
893
|
-
concurrency_seen: guards.report.concurrencySeen,
|
|
894
|
-
concurrency_denied: guards.report.concurrencyDenied,
|
|
895
|
-
concurrency_running_max: guards.report.concurrencyRunningMax,
|
|
896
|
-
concurrency_threw: guards.report.concurrencyThrew,
|
|
897
857
|
subagent_seen: bgForce.report.seen,
|
|
898
858
|
subagent_forced: bgForce.report.forced,
|
|
899
859
|
shell_timeout_seen: shellTimeout.report.seen,
|
|
@@ -1092,10 +1052,6 @@ export const v2Personality = {
|
|
|
1092
1052
|
guard_envfile_input_seen: guards.report.envFileInputSeen,
|
|
1093
1053
|
guard_envfile_input_threw: guards.report.envFileInputThrew,
|
|
1094
1054
|
guard_envfile_input_foreign_skipped: guards.report.envFileInputForeignSkipped,
|
|
1095
|
-
concurrency_seen: guards.report.concurrencySeen,
|
|
1096
|
-
concurrency_denied: guards.report.concurrencyDenied,
|
|
1097
|
-
concurrency_running_max: guards.report.concurrencyRunningMax,
|
|
1098
|
-
concurrency_threw: guards.report.concurrencyThrew,
|
|
1099
1055
|
subagent_seen: bgForce.report.seen,
|
|
1100
1056
|
subagent_forced: bgForce.report.forced,
|
|
1101
1057
|
shell_timeout_seen: shellTimeout.report.seen,
|