@eddyskywalker/dsh-chatgpt-subscription 0.80.3 → 0.80.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/lib/index.js CHANGED
@@ -832,7 +832,7 @@ const ROUTE_PREFIX$5 = "/api/dsh-chatgpt-subscription";
832
832
  * `test/responses-client.test.ts` asserts the two agree, so a release that
833
833
  * forgets this constant fails the suite instead of shipping quietly.
834
834
  */
835
- const PLUGIN_VERSION = "0.80.3";
835
+ const PLUGIN_VERSION = "0.80.4";
836
836
  const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
837
837
  const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
838
838
  const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
@@ -32247,7 +32247,7 @@ const STREAM_IDLE_TIMEOUT_CODE$4 = "LLM_STREAM_IDLE_TIMEOUT";
32247
32247
  * body bytes arrive. Six minutes is the product choice for that phase; once the
32248
32248
  * first chunk arrives, the ordinary 120 s activity budget above takes over.
32249
32249
  */
32250
- const STREAM_FIRST_OUTPUT_TIMEOUT_MS = 36e4;
32250
+ const STREAM_FIRST_OUTPUT_TIMEOUT_MS$1 = 36e4;
32251
32251
  /**
32252
32252
  * Transport safety net for response headers, strictly beyond the app deadline.
32253
32253
  * The watchdog must settle a slow first chunk as TIMEOUT before undici can turn
@@ -40130,7 +40130,7 @@ var KimiCodeAdapter = class extends LlmAdapter {
40130
40130
  ...options,
40131
40131
  reasoningEffort: ReasoningEffortId(String(effort))
40132
40132
  };
40133
- yield* wrapStreamWithWatchdog((watchdogSignal, activity) => this.requestStream(effectiveOptions, watchdogSignal, activity), options.signal, STREAM_IDLE_TIMEOUT_MS$4, STREAM_IDLE_TIMEOUT_CODE$4, PROVIDER_NAME$10, STREAM_FIRST_OUTPUT_TIMEOUT_MS);
40133
+ yield* wrapStreamWithWatchdog((watchdogSignal, activity) => this.requestStream(effectiveOptions, watchdogSignal, activity), options.signal, STREAM_IDLE_TIMEOUT_MS$4, STREAM_IDLE_TIMEOUT_CODE$4, PROVIDER_NAME$10, STREAM_FIRST_OUTPUT_TIMEOUT_MS$1);
40134
40134
  }
40135
40135
  async *requestStream(options, signal, activity) {
40136
40136
  const fetchFn = this.options.fetchFn ?? fetch;
@@ -52616,6 +52616,14 @@ const CALLBACK_PATH = "/callback";
52616
52616
  * `host/common/idle-watchdog.ts` for the measured basis.
52617
52617
  */
52618
52618
  const STREAM_IDLE_TIMEOUT_MS$2 = 12e4;
52619
+ /**
52620
+ * Separate ceiling before the first streamed value arrives.
52621
+ *
52622
+ * A large prompt can spend much longer in prefill than a healthy stream may
52623
+ * remain silent between values. Once the first value arrives, the watchdog
52624
+ * returns to STREAM_IDLE_TIMEOUT_MS; this is not a whole-response deadline.
52625
+ */
52626
+ const STREAM_FIRST_OUTPUT_TIMEOUT_MS = 36e4;
52619
52627
  /** Failure code the adapter reports for that stall. */
52620
52628
  const STREAM_IDLE_TIMEOUT_CODE$2 = "LLM_STREAM_IDLE_TIMEOUT";
52621
52629
  /** Ceiling for a model-listing or usage fetch. */
@@ -58652,7 +58660,7 @@ var ClaudeAdapter = class ClaudeAdapter extends LlmAdapter {
58652
58660
  };
58653
58661
  }
58654
58662
  async *stream(options) {
58655
- yield* wrapStreamWithWatchdog((watchdogSignal, activity) => this.requestStream(options, watchdogSignal, activity), options.signal, STREAM_IDLE_TIMEOUT_MS$2, STREAM_IDLE_TIMEOUT_CODE$2, PROVIDER_NAME);
58663
+ yield* wrapStreamWithWatchdog((watchdogSignal, activity) => this.requestStream(options, watchdogSignal, activity), options.signal, STREAM_IDLE_TIMEOUT_MS$2, STREAM_IDLE_TIMEOUT_CODE$2, "Claude", STREAM_FIRST_OUTPUT_TIMEOUT_MS);
58656
58664
  }
58657
58665
  /**
58658
58666
  * Read one credential for this attempt.
@@ -58846,7 +58854,7 @@ var ClaudeAdapter = class ClaudeAdapter extends LlmAdapter {
58846
58854
  throw verdict.error;
58847
58855
  }
58848
58856
  if (signal.aborted) throw new LlmError$1("Claude request aborted", "ABORTED", { cause: error });
58849
- throw new LlmError$1("Claude stream failed: " + (error instanceof Error ? error.message : String(error)), outputStarted ? "PROVIDER_ERROR" : "TRANSPORT", { cause: error });
58857
+ throw new LlmError$1("Claude stream failed: " + (error instanceof Error ? error.message : String(error)), "TRANSPORT", { cause: error });
58850
58858
  }
58851
58859
  } finally {
58852
58860
  reader.cancel().catch(() => void 0);
@@ -87788,6 +87796,7 @@ var MinimaxCodeCheckinService = class {
87788
87796
  const SUBAGENT_MODEL_SELECTION_NAMESPACE = "subagent-model-selection";
87789
87797
  /** Durable Session event carrying one Session's authorized child routes. */
87790
87798
  const SUBAGENT_POLICY_EVENT = "subagent/model-selection-policy";
87799
+ const NO_COMPATIBLE_ROUTES_REASON = "subagent model selection: none of the configured child routes match this Session’s recorded policy. Save the desired models in Subagents settings and start a new Session to use them.";
87791
87800
  /** Delegation tools whose child routes this guard authorizes. */
87792
87801
  const DEFAULT_DELEGATION_TOOLS = ["subagent"];
87793
87802
  /**
@@ -87941,22 +87950,14 @@ function subagentModelSelectionPreference(settings) {
87941
87950
  */
87942
87951
  const lockedRootMainRoutes = /* @__PURE__ */ new WeakMap();
87943
87952
  /**
87944
- * Authorized child routes per root Session, locked the first time they are used.
87945
- *
87946
- * Locking the main ROUTE is not enough on its own: the route is only the key
87947
- * into `byMainModel`, and the list it resolves to is read from the live
87948
- * preference on every step. A Settings edit made at step 5 of a running session
87949
- * would therefore swap the list under it — the prompt-assembly hook rewrites the
87950
- * `subagent` tool description and the `tools:sdk` section from that list, so the
87951
- * next request would carry a different prefix, drop the provider's prefix cache,
87952
- * and contradict the Settings card's promise that a routing change applies to
87953
- * new sessions only. The first resolved list is frozen here for the same reason
87954
- * the durable policy event is a snapshot: one Session is governed by one policy.
87953
+ * Configured route filter per root Session. Null keeps the Session policy as-is.
87954
+ * Cache the filter independently of the caller's policy so the root and each
87955
+ * descendant still have to match their own recorded routes.
87955
87956
  */
87956
- const lockedRootAllowedRoutes = /* @__PURE__ */ new WeakMap();
87957
+ const lockedRootRouteFilters = /* @__PURE__ */ new WeakMap();
87957
87958
  /**
87958
87959
  * Authorized `allowParentFork` posture per root Session, locked on first evaluation
87959
- * alongside {@link lockedRootAllowedRoutes} so one Session is governed by one policy.
87960
+ * alongside {@link lockedRootRouteFilters} so one Session is governed by one policy.
87960
87961
  */
87961
87962
  const lockedRootAllowParentFork = /* @__PURE__ */ new WeakMap();
87962
87963
  /**
@@ -88255,20 +88256,21 @@ function delegationModeOf(policies, toolName) {
88255
88256
  }
88256
88257
  /**
88257
88258
  * Resolve the effective allowlist that governs delegations from this agent:
88258
- * empty when the Host preference explicitly disables enforcement, otherwise
88259
+ * absent when the Host preference explicitly disables enforcement, otherwise
88259
88260
  * the Session's (or nearest subagent ancestor's) recorded policy, falling
88260
88261
  * back to the live preference only under `preference` scope.
88261
88262
  * @param agent - Calling agent.
88262
88263
  * @param preference - Current Host preference, when the settings service exists.
88263
88264
  * @param sessions - Session registry used for ancestor lookup.
88264
88265
  * @param scope - Whether an unrecorded Session falls back to the preference.
88265
- * @returns the authorized routes in force for this agent, or an empty list when unrestricted.
88266
+ * @returns undefined without a policy, or the effective list (possibly empty).
88266
88267
  */
88267
88268
  function effectiveAllowedRoutes(agent, preference, sessions, scope = "session", lockSnapshot = false) {
88268
- if (preference !== void 0 && !preference.enabled) return [];
88269
- const baseRoutes = authorizedRoutesFor(agent, sessions) ?? (scope === "preference" ? preference?.allowedModels ?? [] : []);
88270
- if (baseRoutes.length === 0) return [];
88271
- return mainModelRoutesFor(agent, sessions, preference, baseRoutes, lockSnapshot);
88269
+ if (preference?.enabled === false) return void 0;
88270
+ const recorded = authorizedRoutesFor(agent, sessions);
88271
+ const baseRoutes = recorded ?? (scope === "preference" ? preference?.allowedModels : void 0);
88272
+ if (baseRoutes === void 0 || baseRoutes.length === 0) return void 0;
88273
+ return mainModelRoutesFor(agent, sessions, preference, baseRoutes, lockSnapshot, recorded !== void 0);
88272
88274
  }
88273
88275
  /**
88274
88276
  * Apply the per-main-model override to a Session's authorized routes.
@@ -88280,20 +88282,23 @@ function effectiveAllowedRoutes(agent, preference, sessions, scope = "session",
88280
88282
  * @param agent - Calling agent.
88281
88283
  * @param sessions - Session registry used for ancestor lookup.
88282
88284
  * @param preference - Current Host preference, when the settings service exists.
88283
- * @param baseRoutes - Routes the Session itself authorized; never empty here.
88284
- * @param lockSnapshot - Freeze the resolved main route AND the resolved route
88285
- * list for this Session now.
88285
+ * @param baseRoutes - Non-empty recorded allowlist or legacy preference fallback.
88286
+ * @param lockSnapshot - Freeze the root's configured route filter now.
88287
+ * @param hasRecordedPolicy - Whether the base is also enforced by the host.
88286
88288
  * @returns the routes that actually govern this delegation.
88287
88289
  */
88288
- function mainModelRoutesFor(agent, sessions, preference, baseRoutes, lockSnapshot = false) {
88290
+ function mainModelRoutesFor(agent, sessions, preference, baseRoutes, lockSnapshot, hasRecordedPolicy) {
88289
88291
  const { rootSession, mainRoute } = resolveRootSessionAndMainRoute(agent, sessions, void 0, lockSnapshot);
88290
88292
  const lockable = typeof rootSession === "object" && rootSession !== null;
88291
- const locked = lockable ? lockedRootAllowedRoutes.get(rootSession) : void 0;
88292
- if (locked !== void 0) return locked;
88293
- const overrideRoutes = mainRoute === void 0 ? void 0 : preference?.byMainModel?.[`${mainRoute.provider}/${mainRoute.model}`];
88294
- const resolved = overrideRoutes !== void 0 && overrideRoutes.length > 0 ? overrideRoutes : preference?.defaultAllowedModels !== void 0 && preference.defaultAllowedModels.length > 0 ? preference.defaultAllowedModels : baseRoutes;
88295
- if (lockable && (lockSnapshot || headerRouteOf(rootSession) !== void 0)) lockedRootAllowedRoutes.set(rootSession, [...resolved]);
88296
- return resolved;
88293
+ let filter = lockable ? lockedRootRouteFilters.get(rootSession) : void 0;
88294
+ if (filter === void 0) {
88295
+ const override = mainRoute === void 0 ? void 0 : preference?.byMainModel?.[`${mainRoute.provider}/${mainRoute.model}`];
88296
+ const fallback = preference?.defaultAllowedModels;
88297
+ filter = override?.length ? override : fallback?.length ? fallback : null;
88298
+ if (lockable && (lockSnapshot || headerRouteOf(rootSession) !== void 0)) lockedRootRouteFilters.set(rootSession, filter === null ? null : [...filter]);
88299
+ }
88300
+ if (filter === null) return baseRoutes;
88301
+ return hasRecordedPolicy ? filter.filter((route) => routesInclude(baseRoutes, route.provider, route.model)) : filter;
88297
88302
  }
88298
88303
  /**
88299
88304
  * Resolve whether `subagent_fork` is authorized to inherit the root main model's
@@ -88334,14 +88339,15 @@ function effectiveAllowParentFork(agent, preference, sessions, lockSnapshot = fa
88334
88339
  * delegation policy. On 0.2.2 the latter still limits explicit selection to the
88335
88340
  * parent route, so calling this posture "unrestricted" would be false.
88336
88341
  * @param output - Original text returned by `list_subagent_models`.
88337
- * @param allowed - Routes the calling Session authorizes, empty when none is in force.
88342
+ * @param allowed - Routes the calling Session authorizes, or undefined without a policy.
88338
88343
  * @returns the output with the Session routing posture appended.
88339
88344
  */
88340
88345
  function enrichListSubagentModelsOutput(output, allowed) {
88341
- if (allowed.length === 0) {
88346
+ if (allowed === void 0) {
88342
88347
  if (output.includes("No allowlist is in force for this Session. Omitting provider/model follows the delegation tool's normal inheritance/default behavior; explicit selection may still be limited to the parent route by the host.")) return output;
88343
88348
  return output.trim().length === 0 ? NO_ALLOWLIST_ROUTING_NOTICE : `${output}\n\n${NO_ALLOWLIST_ROUTING_NOTICE}`;
88344
88349
  }
88350
+ if (allowed.length === 0) return "Authorized child routes for this Session: (none)\nsubagent model selection: none of the configured child routes match this Session’s recorded policy. Save the desired models in Subagents settings and start a new Session to use them.";
88345
88351
  const header = "Authorized child routes for this Session (already filtered by the Session allowlist; only these routes are accepted, and `provider` and `model` must be passed as separate fields):";
88346
88352
  if (output.includes(header)) return output;
88347
88353
  const filtered = filterListSubagentModelsOutput(output, allowed);
@@ -88499,12 +88505,13 @@ function inheritRouteNoticeSentence(explicitTools, inheritTools, target) {
88499
88505
  * @returns the updated assembly, or the original object when nothing changed.
88500
88506
  */
88501
88507
  function rewriteAuthorizedPromptAssembly(assembly, allowed, toolNames = DEFAULT_DELEGATION_TOOLS, inheritToolNames = DEFAULT_SUBAGENT_INHERIT_TOOLS) {
88502
- if (allowed.length === 0) return assembly;
88508
+ if (allowed === void 0) return assembly;
88509
+ const noCompatibleRoutes = allowed.length === 0;
88503
88510
  let sectionsChanged = false;
88504
88511
  const sections = Array.isArray(assembly.sections) ? assembly.sections.map((section) => {
88505
88512
  if (section?.name !== "tools:sdk" || typeof section.text !== "string") return section;
88506
88513
  const rewritten = rewriteAuthorizedToolDescriptions(section.text, allowed);
88507
- const notice = inheritRouteNoticeSentence(toolNames, inheritToolNames, "explicit");
88514
+ const notice = noCompatibleRoutes ? NO_COMPATIBLE_ROUTES_REASON : inheritRouteNoticeSentence(toolNames, inheritToolNames, "explicit");
88508
88515
  const text = notice.length > 0 && !rewritten.includes(notice) ? rewritten + "\n\n" + notice : rewritten;
88509
88516
  if (text === section.text) return section;
88510
88517
  sectionsChanged = true;
@@ -88521,7 +88528,9 @@ function rewriteAuthorizedPromptAssembly(assembly, allowed, toolNames = DEFAULT_
88521
88528
  const isInherit = inheritToolNames.includes(name);
88522
88529
  if (name !== "list_subagent_models" && !isExplicit && !isInherit) return tool;
88523
88530
  const rewrittenDescription = typeof tool.description === "string" ? rewriteAuthorizedToolDescriptions(tool.description, allowed) : tool.description;
88524
- const notice = isExplicit || isInherit ? inheritRouteNoticeSentence(toolNames, inheritToolNames, isExplicit ? "explicit" : "inherit") : "";
88531
+ let notice = "";
88532
+ if (noCompatibleRoutes) notice = isInherit ? "" : NO_COMPATIBLE_ROUTES_REASON;
88533
+ else if (isExplicit || isInherit) notice = inheritRouteNoticeSentence(toolNames, inheritToolNames, isExplicit ? "explicit" : "inherit");
88525
88534
  const description = typeof rewrittenDescription === "string" && notice.length > 0 && !rewrittenDescription.includes(notice) ? rewrittenDescription + " " + notice : rewrittenDescription;
88526
88535
  let params = tool.parameters;
88527
88536
  const paramsRecord = asRecord$2(params);
@@ -88585,15 +88594,16 @@ function delegationDenialReason(agent, toolName, args, preference, sessions, too
88585
88594
  }))], toolName);
88586
88595
  if (mode === void 0) return void 0;
88587
88596
  const allowed = effectiveAllowedRoutes(agent, preference, sessions, scope, lockSnapshot);
88588
- if (allowed.length === 0) return void 0;
88597
+ if (allowed === void 0) return void 0;
88589
88598
  const request = asRecord$2(args) ?? {};
88590
88599
  const requestedProvider = asString$7(request["provider"]);
88591
88600
  const requestedModel = asString$7(request["model"]);
88592
88601
  if (mode === "inherit") {
88593
88602
  if (requestedProvider !== void 0 || requestedModel !== void 0) return inheritOverrideReason(toolName, requestedProvider ?? "", requestedModel ?? "", toolNames);
88594
88603
  if (parentForkToolNames.includes(toolName) && effectiveAllowParentFork(agent, preference, sessions, lockSnapshot)) return;
88595
- return inheritedRouteDenial(agent, toolName, allowed);
88604
+ return allowed.length === 0 ? NO_COMPATIBLE_ROUTES_REASON : inheritedRouteDenial(agent, toolName, allowed);
88596
88605
  }
88606
+ if (allowed.length === 0) return NO_COMPATIBLE_ROUTES_REASON;
88597
88607
  if (declaresRouteParameters?.(agent, toolName) === false) {
88598
88608
  if (requestedProvider === void 0 && requestedModel === void 0) return inheritedRouteDenial(agent, toolName, allowed);
88599
88609
  if (requestedProvider === void 0 || requestedModel === void 0) return routeFieldsUnavailableReason(toolName, inheritedRouteOf(agent), allowed);
@@ -88613,7 +88623,7 @@ function delegationDenialReason(agent, toolName, args, preference, sessions, too
88613
88623
  * @returns a guard that denies delegations outside the Session allowlist.
88614
88624
  */
88615
88625
  function createSubagentAuthorization(options) {
88616
- return (agent, toolName, args) => delegationDenialReason(agent, toolName, args, mergedPreference(options), options.sessions, options.toolNames, options.scope ?? "session", options.inheritToolNames ?? [], options.declaresRouteParameters);
88626
+ return (agent, toolName, args) => delegationDenialReason(agent, toolName, args, readSubagentRoutingPreference(options), options.sessions, options.toolNames, options.scope ?? "session", options.inheritToolNames ?? [], options.declaresRouteParameters);
88617
88627
  }
88618
88628
  /**
88619
88629
  * Resolve the preference one guard evaluation uses.
@@ -88625,7 +88635,7 @@ function createSubagentAuthorization(options) {
88625
88635
  * @param options - Runtime inputs the guard closed over.
88626
88636
  * @returns the merged preference, or undefined when neither seam says anything.
88627
88637
  */
88628
- function mergedPreference(options) {
88638
+ function readSubagentRoutingPreference(options) {
88629
88639
  let overrides;
88630
88640
  try {
88631
88641
  overrides = options.routingOverrides?.();
@@ -88727,11 +88737,26 @@ function installSubagentModelAuthorization(ctx, sessions, config = {}) {
88727
88737
  declaresRouteParameters: routeParameterProbe(ctx),
88728
88738
  routingOverrides: config.routingOverrides
88729
88739
  });
88730
- const currentPreference = () => mergedPreference({
88740
+ const currentPreference = () => readSubagentRoutingPreference({
88731
88741
  settings,
88732
88742
  routingOverrides: config.routingOverrides
88733
88743
  });
88734
- const disposeGuard = ctx.tools.guard((exec) => authorize(exec.agent, exec.name, exec.arguments));
88744
+ const disposeGuard = ctx.tools.guard((exec) => {
88745
+ const agent = exec.agent;
88746
+ if (exec.name === "list_subagent_models") {
88747
+ const request = asRecord$2(exec.arguments);
88748
+ const provider = asString$7(request?.["provider"]);
88749
+ const model = asString$7(request?.["model"]);
88750
+ if (provider === void 0 || provider.length === 0 || model === "") return void 0;
88751
+ const allowed = effectiveAllowedRoutes(agent, currentPreference(), sessions, scope, true);
88752
+ if (allowed === void 0) return void 0;
88753
+ if (allowed.length === 0) return NO_COMPATIBLE_ROUTES_REASON;
88754
+ if (model !== void 0) return routesInclude(allowed, provider, model) ? void 0 : unauthorizedRouteReason(provider, model, allowed, true);
88755
+ if (!allowed.some((route) => route.provider === provider)) return "subagent model selection: provider " + JSON.stringify(provider) + " is not on the Session allowlist. Authorized child routes are " + authorizedRoutesText(allowed) + ".";
88756
+ return;
88757
+ }
88758
+ return authorize(agent, exec.name, exec.arguments);
88759
+ });
88735
88760
  const eventHost = ctx;
88736
88761
  const disposePostExecute = eventHost.on?.("tools/post-execute", async (exec, result, next) => {
88737
88762
  const decision = await next();
@@ -93186,7 +93211,7 @@ function routeAllowed(allowed, route) {
93186
93211
  * @returns violations, ordered as the children were discovered.
93187
93212
  */
93188
93213
  function auditChildRoutes(parent, sessions, allowed, options) {
93189
- if (allowed === void 0 || allowed.length === 0) return [];
93214
+ if (allowed === void 0 || allowed.length === 0 && options?.enforceEmptyAllowlist !== true) return [];
93190
93215
  const violations = [];
93191
93216
  for (const finding of childRoutesOf(parent, sessions)) {
93192
93217
  const effective = effectiveRouteOf(finding, sessions);
@@ -110869,6 +110894,18 @@ function apply(ctx, pluginConfig = {}) {
110869
110894
  };
110870
110895
  }
110871
110896
  });
110897
+ const readSubagentRoutingOverrides = () => {
110898
+ const current = preferences.status();
110899
+ const defaultAllowedModels = current.subagentDefaultModels ?? [];
110900
+ const byMainModel = current.subagentModelsByMainModel ?? {};
110901
+ const allowParentForkByMainModel = current.subagentAllowParentForkByMainModel ?? {};
110902
+ return {
110903
+ ...defaultAllowedModels.length > 0 ? { defaultAllowedModels } : {},
110904
+ ...Object.keys(byMainModel).length > 0 ? { byMainModel } : {},
110905
+ ...current.subagentDefaultAllowParentFork === true ? { defaultAllowParentFork: true } : {},
110906
+ ...Object.keys(allowParentForkByMainModel).length > 0 ? { allowParentForkByMainModel } : {}
110907
+ };
110908
+ };
110872
110909
  const delegationToolNames = normalizeDelegationToolNames(pluginConfig.subagentModelTools);
110873
110910
  const delegationInheritNames = normalizeInheritToolNames(pluginConfig.subagentModelInheritTools);
110874
110911
  if (pluginConfig.subagentModelAuthorization !== false) ctx.inject(["sessions"], (scoped) => {
@@ -110880,19 +110917,7 @@ function apply(ctx, pluginConfig = {}) {
110880
110917
  toolNames: delegationToolNames,
110881
110918
  inheritToolNames: delegationInheritNames,
110882
110919
  scope: pluginConfig.subagentModelScope ?? "session",
110883
- routingOverrides: () => {
110884
- const current = preferences.status();
110885
- const defaultAllowedModels = current.subagentDefaultModels ?? [];
110886
- const byMainModel = current.subagentModelsByMainModel ?? {};
110887
- const defaultAllowParentFork = current.subagentDefaultAllowParentFork;
110888
- const allowParentForkByMainModel = current.subagentAllowParentForkByMainModel ?? {};
110889
- return {
110890
- ...defaultAllowedModels.length > 0 ? { defaultAllowedModels } : {},
110891
- ...Object.keys(byMainModel).length > 0 ? { byMainModel } : {},
110892
- ...defaultAllowParentFork === true ? { defaultAllowParentFork: true } : {},
110893
- ...Object.keys(allowParentForkByMainModel).length > 0 ? { allowParentForkByMainModel } : {}
110894
- };
110895
- }
110920
+ routingOverrides: readSubagentRoutingOverrides
110896
110921
  });
110897
110922
  }, "dsh-chatgpt-subscription: subagent model authorization");
110898
110923
  });
@@ -111395,21 +111420,23 @@ function apply(ctx, pluginConfig = {}) {
111395
111420
  const sessions = ctx.get("sessions");
111396
111421
  const target = sessions.get(sessionId);
111397
111422
  if (target === void 0) throw new Error(`Unknown session "${sessionId}".`);
111398
- const audited = auditedRoutesOf(target);
111399
- const current = preferences.status();
111400
- const mainRoute = resolveRootSessionAndMainRoute({ session: target }, sessions).mainRoute;
111401
- const override = mainRoute === void 0 ? void 0 : (current.subagentModelsByMainModel ?? {})[`${mainRoute.provider}/${mainRoute.model}`];
111402
- const fallback = current.subagentDefaultModels ?? [];
111403
- const allowed = audited === void 0 ? audited : override !== void 0 && override.length > 0 ? override : fallback.length > 0 ? fallback : audited;
111404
- const forkOverride = mainRoute === void 0 ? void 0 : (current.subagentAllowParentForkByMainModel ?? {})[`${mainRoute.provider}/${mainRoute.model}`];
111405
- const allowParentFork = typeof forkOverride === "boolean" ? forkOverride : current.subagentDefaultAllowParentFork === true;
111423
+ const agent = { session: target };
111424
+ const preference = readSubagentRoutingPreference({
111425
+ settings: ctx.settings,
111426
+ routingOverrides: readSubagentRoutingOverrides
111427
+ });
111428
+ const allowed = effectiveAllowedRoutes(agent, preference, sessions, pluginConfig.subagentModelScope);
111429
+ const allowParentFork = allowed !== void 0 && effectiveAllowParentFork(agent, preference, sessions);
111406
111430
  return Promise.resolve({
111407
111431
  sessionId,
111408
111432
  allowedModels: (allowed ?? []).map((route) => ({
111409
111433
  provider: route.provider,
111410
111434
  model: route.model
111411
111435
  })),
111412
- violations: auditChildRoutes(target, sessions, allowed, { allowParentFork }).map((violation) => ({
111436
+ violations: auditChildRoutes(target, sessions, allowed, {
111437
+ allowParentFork,
111438
+ enforceEmptyAllowlist: true
111439
+ }).map((violation) => ({
111413
111440
  childId: violation.finding.childId,
111414
111441
  parentId: violation.finding.parentId ?? null,
111415
111442
  provider: violation.finding.provider ?? null,
@@ -1 +1 @@
1
- {"version":3,"file":"subagent-card-controller.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/subagent-card-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,sBAAsB;AACtB,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAE5C,sBAAsB;AACtB,eAAO,MAAM,2BAA2B,sCAAsC,CAAA;AAE9E,2BAA2B;AAC3B,eAAO,MAAM,aAAa,YAAY,CAAA;AAKtC,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,8BAA8B;AAC9B,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,SAAS,EAAE,OAAO,CAAA;IAClB,oBAAoB;IACpB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAwB;AACxB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,C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;OAEG;IACH,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,eAAe;IAMvB,sCAAsC;IACtC,OAAO,CAAC,qBAAqB;IAgB7B,iCAAiC;IACjC,OAAO,CAAC,qBAAqB;IAU7B,yCAAyC;IACzC,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,OAAO;IAQf,qCAAqC;IACrC,OAAO,CAAC,UAAU;IAyClB,qCAAqC;IACrC,OAAO,CAAC,eAAe;IAkBvB,iCAAiC;IACjC,OAAO,CAAC,gBAAgB;IAWxB;;OAEG;YACW,IAAI;IA4HlB,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,UAAU;IA2ElB,OAAO,CAAC,OAAO;CAIhB"}
1
+ {"version":3,"file":"subagent-card-controller.d.ts","sourceRoot":"","sources":["../../../../src/client/subagent/subagent-card-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,sBAAsB;AACtB,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAE5C,sBAAsB;AACtB,eAAO,MAAM,2BAA2B,sCAAsC,CAAA;AAE9E,2BAA2B;AAC3B,eAAO,MAAM,aAAa,YAAY,CAAA;AAKtC,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,8BAA8B;AAC9B,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,SAAS,EAAE,OAAO,CAAA;IAClB,oBAAoB;IACpB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAwB;AACxB,MAAM,WAAW,sBAAsB;IACrC,Q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AAY;IAMpB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,aAAa;IAUrB;;OAEG;IACH,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,eAAe;IAMvB,sCAAsC;IACtC,OAAO,CAAC,qBAAqB;IAgB7B,iCAAiC;IACjC,OAAO,CAAC,qBAAqB;IAU7B,yCAAyC;IACzC,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,OAAO;IAQf,qCAAqC;IACrC,OAAO,CAAC,UAAU;IAyClB,qCAAqC;IACrC,OAAO,CAAC,eAAe;IAkBvB,iCAAiC;IACjC,OAAO,CAAC,gBAAgB;IAWxB;;OAEG;YACW,IAAI;IAuHlB,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,UAAU;IA0ElB,OAAO,CAAC,OAAO;CAIhB"}
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
76
76
  * `test/responses-client.test.ts` asserts the two agree, so a release that
77
77
  * forgets this constant fails the suite instead of shipping quietly.
78
78
  */
79
- export declare const PLUGIN_VERSION: "0.80.3";
79
+ export declare const PLUGIN_VERSION: "0.80.4";
80
80
  export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
81
81
  export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
82
82
  export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyHG;AAOH,O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AAS,MAAM,EAAE,EAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAC/B,iBAAiB,GAAG,SAAS,CAI/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAI3F;AAiBD,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,CAUtF;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAO7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,QAAQ,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,OAAO,EAAE,OAAO,GACf,mBAAmB,CAcrB;AAED,sFAAsF;AACtF,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,KAAK,EAAE,QAAQ,CAAA;IACf;;;;OAIG;IACH,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAkE3D;AAED,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAA"}
@@ -248,6 +248,14 @@ export declare const CALLBACK_PATH = "/callback";
248
248
  * `host/common/idle-watchdog.ts` for the measured basis.
249
249
  */
250
250
  export declare const STREAM_IDLE_TIMEOUT_MS = 120000;
251
+ /**
252
+ * Separate ceiling before the first streamed value arrives.
253
+ *
254
+ * A large prompt can spend much longer in prefill than a healthy stream may
255
+ * remain silent between values. Once the first value arrives, the watchdog
256
+ * returns to STREAM_IDLE_TIMEOUT_MS; this is not a whole-response deadline.
257
+ */
258
+ export declare const STREAM_FIRST_OUTPUT_TIMEOUT_MS = 360000;
251
259
  /** Failure code the adapter reports for that stall. */
252
260
  export declare const STREAM_IDLE_TIMEOUT_CODE = "LLM_STREAM_IDLE_TIMEOUT";
253
261
  /** Ceiling for a model-listing or usage fetch. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uCAAuC;AACvC,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,kEAAkE;AAClE,eAAO,MAAM,aAAa,mCAAe,CAAA;AAEzC,kFAAkF;AAClF,eAAO,MAAM,QAAQ,8BAA8B,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,2BAA2B,CAAA;AACrD,2EAA2E;AAC3E,eAAO,MAAM,WAAW,eAAe,CAAA;AACvC,gEAAgE;AAChE,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,sCAAsC,CAAA;AACtE,wEAAwE;AACxE,eAAO,MAAM,eAAe,+CAA+C,CAAA;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,oDAAoD,CAAA;AAE1F;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,yCAAyC,CAAA;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,+GAA+G,CAAA;AAExI;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,4FAA4F,CAAA;AAEtI;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAC5C,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,yBAAyB,CAAA;AACtD,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,oCAAoC,CAAA;AAC1E;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kCAAkC,CAAA;AACtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AACxC,2EAA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;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAA8B,GAAG,MAAM,CAEhF"}
@@ -17,7 +17,6 @@
17
17
  * @module dsh-chatgpt-subscription/subagent-model-authorization
18
18
  */
19
19
  import type { Context } from '@deepseek-ai/cordis';
20
- import { type SettingsService } from './common/settings-compat.ts';
21
20
  /** DSH settings namespace owned by the Subagent settings card. */
22
21
  export declare const SUBAGENT_MODEL_SELECTION_NAMESPACE = "subagent-model-selection";
23
22
  /** Durable Session event carrying one Session's authorized child routes. */
@@ -72,11 +71,9 @@ export interface AllowedModelRoute {
72
71
  /**
73
72
  * Per-main-model routing overrides, as the Settings card stores them.
74
73
  *
75
- * These are read LIVE on every guard evaluation rather than sampled into the
76
- * Session: which routes a main model may delegate to is a deployment choice,
77
- * and a settings edit must take effect without rebuilding a Session. The
78
- * Session's own recorded allowlist stays the outer bound — an override can
79
- * narrow it, never widen it beyond what the Session authorized.
74
+ * The first configured list observed for a root Session is kept for that
75
+ * Session. Its recorded allowlist stays the outer bound: a per-main-model
76
+ * entry can only narrow the native policy.
80
77
  */
81
78
  export interface SubagentRoutingOverrides {
82
79
  /** Routes used when the Session's main model matches no `byMainModel` entry. */
@@ -211,7 +208,7 @@ export declare function authorizedRoutesFor(agent: AuthorizationAgent | undefine
211
208
  * exposes the register seam (harness 0.1.7 replaced it with forms).
212
209
  * @returns the resolved preference, or undefined without a settings service.
213
210
  */
214
- export declare function subagentModelSelectionPreference(settings: SettingsService | undefined): SubagentModelSelectionPreference | undefined;
211
+ export declare function subagentModelSelectionPreference(settings: unknown): SubagentModelSelectionPreference | undefined;
215
212
  /**
216
213
  * Resolve the top-level Session of one agent's lineage, together with the route
217
214
  * its main model runs on.
@@ -389,32 +386,16 @@ export type AuthorizationScope =
389
386
  export declare function delegationModeOf(policies: readonly DelegationToolPolicy[], toolName: string): DelegationToolMode | undefined;
390
387
  /**
391
388
  * Resolve the effective allowlist that governs delegations from this agent:
392
- * empty when the Host preference explicitly disables enforcement, otherwise
389
+ * absent when the Host preference explicitly disables enforcement, otherwise
393
390
  * the Session's (or nearest subagent ancestor's) recorded policy, falling
394
391
  * back to the live preference only under `preference` scope.
395
392
  * @param agent - Calling agent.
396
393
  * @param preference - Current Host preference, when the settings service exists.
397
394
  * @param sessions - Session registry used for ancestor lookup.
398
395
  * @param scope - Whether an unrecorded Session falls back to the preference.
399
- * @returns the authorized routes in force for this agent, or an empty list when unrestricted.
396
+ * @returns undefined without a policy, or the effective list (possibly empty).
400
397
  */
401
- export declare function effectiveAllowedRoutes(agent: AuthorizationAgent | undefined, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, scope?: AuthorizationScope, lockSnapshot?: boolean): readonly AllowedModelRoute[];
402
- /**
403
- * Apply the per-main-model override to a Session's authorized routes.
404
- *
405
- * Precedence is exact-match, then fallback, then the Session's own list: an
406
- * entry for the main model the Session actually runs is the most specific
407
- * statement available, the fallback list covers every other main model, and the
408
- * Session policy is what governs when the deployment configured neither.
409
- * @param agent - Calling agent.
410
- * @param sessions - Session registry used for ancestor lookup.
411
- * @param preference - Current Host preference, when the settings service exists.
412
- * @param baseRoutes - Routes the Session itself authorized; never empty here.
413
- * @param lockSnapshot - Freeze the resolved main route AND the resolved route
414
- * list for this Session now.
415
- * @returns the routes that actually govern this delegation.
416
- */
417
- export declare function mainModelRoutesFor(agent: AuthorizationAgent | undefined, sessions: SessionsResolver, preference: SubagentModelSelectionPreference | undefined, baseRoutes: readonly AllowedModelRoute[], lockSnapshot?: boolean): readonly AllowedModelRoute[];
398
+ export declare function effectiveAllowedRoutes(agent: AuthorizationAgent | undefined, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, scope?: AuthorizationScope, lockSnapshot?: boolean): readonly AllowedModelRoute[] | undefined;
418
399
  /**
419
400
  * Resolve whether `subagent_fork` is authorized to inherit the root main model's
420
401
  * own route even when that route is absent from the cold-spawn allowlist.
@@ -440,10 +421,10 @@ export declare function effectiveAllowParentFork(agent: AuthorizationAgent | und
440
421
  * delegation policy. On 0.2.2 the latter still limits explicit selection to the
441
422
  * parent route, so calling this posture "unrestricted" would be false.
442
423
  * @param output - Original text returned by `list_subagent_models`.
443
- * @param allowed - Routes the calling Session authorizes, empty when none is in force.
424
+ * @param allowed - Routes the calling Session authorizes, or undefined without a policy.
444
425
  * @returns the output with the Session routing posture appended.
445
426
  */
446
- export declare function enrichListSubagentModelsOutput(output: string, allowed: readonly AllowedModelRoute[]): string;
427
+ export declare function enrichListSubagentModelsOutput(output: string, allowed: readonly AllowedModelRoute[] | undefined): string;
447
428
  /**
448
429
  * Drop the upstream lines that name a route this Session does not authorize.
449
430
  *
@@ -537,7 +518,7 @@ export declare function inheritRouteNoticeSentence(explicitTools: readonly strin
537
518
  * descriptions gain the matching route notice.
538
519
  * @returns the updated assembly, or the original object when nothing changed.
539
520
  */
540
- export declare function rewriteAuthorizedPromptAssembly<T extends MutablePromptAssembly>(assembly: T, allowed: readonly AllowedModelRoute[], toolNames?: readonly string[], inheritToolNames?: readonly string[]): T;
521
+ export declare function rewriteAuthorizedPromptAssembly<T extends MutablePromptAssembly>(assembly: T, allowed: readonly AllowedModelRoute[] | undefined, toolNames?: readonly string[], inheritToolNames?: readonly string[]): T;
541
522
  /**
542
523
  * Decide whether one delegation call may start its child.
543
524
  * @param agent - Calling agent.
@@ -554,7 +535,7 @@ export declare function delegationDenialReason(agent: AuthorizationAgent | undef
554
535
  /** Runtime inputs the guard closes over. */
555
536
  export interface SubagentAuthorizationOptions {
556
537
  /** Live settings service, when composed; absent leaves recorded policies in charge. */
557
- readonly settings?: SettingsService;
538
+ readonly settings?: unknown;
558
539
  /** Session registry used for ancestor lookup. */
559
540
  readonly sessions: SessionsResolver;
560
541
  /** Exact delegation tool names this guard authorizes (explicit route selection). */
@@ -572,9 +553,8 @@ export interface SubagentAuthorizationOptions {
572
553
  /**
573
554
  * Live per-main-model overrides, read from this plugin's own preferences.
574
555
  *
575
- * A function rather than a value for the same reason the settings document is
576
- * sampled per call: a Settings edit must take effect without rebuilding the
577
- * guard or the Sessions it governs.
556
+ * The reader lets a new Session sample updated settings without reinstalling
557
+ * the guard.
578
558
  */
579
559
  readonly routingOverrides?: () => SubagentRoutingOverrides | undefined;
580
560
  }
@@ -588,6 +568,20 @@ export type DelegationGuard = (agent: AuthorizationAgent | undefined, toolName:
588
568
  * @returns a guard that denies delegations outside the Session allowlist.
589
569
  */
590
570
  export declare function createSubagentAuthorization(options: SubagentAuthorizationOptions): DelegationGuard;
571
+ /**
572
+ * Resolve the preference one guard evaluation uses.
573
+ *
574
+ * The namespace preference and this plugin's per-main-model overrides are
575
+ * separate seams — the override document outlives a harness that cannot register
576
+ * the namespace at all — so they are merged here, once, rather than at each of
577
+ * the four call sites that need the result.
578
+ * @param options - Runtime inputs the guard closed over.
579
+ * @returns the merged preference, or undefined when neither seam says anything.
580
+ */
581
+ export declare function readSubagentRoutingPreference(options: {
582
+ readonly settings?: unknown;
583
+ readonly routingOverrides?: () => SubagentRoutingOverrides | undefined;
584
+ }): SubagentModelSelectionPreference | undefined;
591
585
  /** Delegation names this guard recognizes when configuration omits them. */
592
586
  export declare function normalizeDelegationToolNames(value: unknown): string[];
593
587
  /**
@@ -623,8 +617,7 @@ export interface SubagentModelAuthorizationConfig {
623
617
  /**
624
618
  * Live per-main-model overrides read from this plugin's preferences.
625
619
  *
626
- * Read on every evaluation instead of sampled once, so a Settings edit applies
627
- * to Sessions that are already running.
620
+ * Read on demand so each new Session can sample the updated preferences.
628
621
  */
629
622
  readonly routingOverrides?: () => SubagentRoutingOverrides | undefined;
630
623
  }