@eddyskywalker/dsh-chatgpt-subscription 0.3.4 → 0.3.6
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/CHANGELOG.md +13 -0
- package/README.md +10 -7
- package/lib/client.js +13 -2
- package/lib/client.js.map +1 -1
- package/lib/index.js +682 -151
- package/lib/types/client/CodexComposerQuota.d.ts +1 -1
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -1
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +1 -1
- package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +1 -1
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +1 -1
- package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +1 -1
- package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -1
- package/lib/types/client/store.d.ts +19 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/host/preset-sync.d.ts +41 -2
- package/lib/types/host/preset-sync.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts +4 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/subagent-model-authorization.d.ts +114 -4
- package/lib/types/host/subagent-model-authorization.d.ts.map +1 -1
- package/lib/types/host/subagent-route-audit.d.ts +142 -0
- package/lib/types/host/subagent-route-audit.d.ts.map +1 -0
- package/lib/types/index.d.ts +11 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +22 -1
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/package.json +29 -30
- package/presets/dispatch/agent.cordis.yml +13 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
1
|
import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
3
2
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
3
|
import { SubscriptionApi } from './api.ts';
|
|
5
4
|
import { NS } from './locales.ts';
|
|
5
|
+
import type { SnapshotStore } from './store.ts';
|
|
6
6
|
type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS> & {
|
|
7
7
|
api: SubscriptionApi;
|
|
8
8
|
directory: SnapshotStore<ModelDirectoryState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodexComposerQuota.d.ts","sourceRoot":"","sources":["../../../src/client/CodexComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"CodexComposerQuota.d.ts","sourceRoot":"","sources":["../../../src/client/CodexComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGjF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IAC/E,GAAG,EAAE,eAAe,CAAA;IACpB,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAwD7G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
1
|
import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
3
2
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { SnapshotStore } from '../store.ts';
|
|
4
4
|
import { NS_ANTIGRAVITY } from './locales.ts';
|
|
5
5
|
type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_ANTIGRAVITY> & {
|
|
6
6
|
directory: SnapshotStore<ModelDirectoryState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AntigravityComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/AntigravityComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"AntigravityComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/AntigravityComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAmB7C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GACnD,WAAW,CAAC,OAAO,cAAc,CAAC,GAAG;IACnC,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAqCH,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkF3G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
1
|
import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
3
2
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
3
|
import type { CommandCodeWebStatus } from '../../shared/command-code-contracts.ts';
|
|
4
|
+
import type { SnapshotStore } from '../store.ts';
|
|
5
5
|
import { NS_COMMAND_CODE } from './locales.ts';
|
|
6
6
|
type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_COMMAND_CODE> & {
|
|
7
7
|
directory: SnapshotStore<ModelDirectoryState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/command-code/CommandCodeComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"CommandCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/command-code/CommandCodeComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAmB9C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GACnD,WAAW,CAAC,OAAO,eAAe,CAAC,GAAG;IACpC,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAEH,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAiCvF;AAED,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgE3G"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientContext } from '@deepseek-ai/
|
|
1
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
2
2
|
import { type LocaleKey } from './locales.ts';
|
|
3
3
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
4
4
|
interface LocaleNamespaceMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAenE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAY/D,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,0BAA0B,EAAE,SAAS,CAAA;QACrC,iBAAiB,EAAE,GAAG,CAAA;QACtB,kBAAkB,EAAE,GAAG,CAAA;QACvB,eAAe,EAAE,GAAG,CAAA;KACrB;CACF;AAED,eAAO,MAAM,MAAM,UAA0D,CAAA;AAE7E,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAoH9C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
1
|
import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
|
|
3
2
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
3
|
import type { KimiCodeWebStatus } from '../../shared/kimi-code-contracts.ts';
|
|
4
|
+
import type { SnapshotStore } from '../store.ts';
|
|
5
5
|
import { NS_KIMI_CODE } from './locales.ts';
|
|
6
6
|
type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_KIMI_CODE> & {
|
|
7
7
|
directory: SnapshotStore<ModelDirectoryState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KimiCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"KimiCodeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/kimi-code/KimiCodeComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAmB3C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GACnD,WAAW,CAAC,OAAO,YAAY,CAAC,GAAG;IACjC,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAEH,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CA+BpF;AAED,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgExG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The observable a model-directory store exposes to a composer badge.
|
|
3
|
+
*
|
|
4
|
+
* Harness 0.1.1 and earlier declared this shape in
|
|
5
|
+
* `@deepseek-ai/dsh-client-runtime`; 0.1.2 replaced that package with
|
|
6
|
+
* `@deepseek-ai/dsh-client-store`. A badge reads only the observable members,
|
|
7
|
+
* so the two it needs are declared here instead of imported from either home.
|
|
8
|
+
*/
|
|
9
|
+
export interface SnapshotStore<T> {
|
|
10
|
+
/** Read the cached snapshot reference. */
|
|
11
|
+
getSnapshot(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Subscribe to snapshot invalidation.
|
|
14
|
+
* @param listener - invalidation callback.
|
|
15
|
+
* @returns unsubscribe function.
|
|
16
|
+
*/
|
|
17
|
+
subscribe(listener: () => void): () => void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/client/store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,0CAA0C;IAC1C,WAAW,IAAI,CAAC,CAAA;IAChB;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C"}
|
|
@@ -18,10 +18,47 @@
|
|
|
18
18
|
* Windows it can abort the process with STATUS_STACK_BUFFER_OVERRUN when the
|
|
19
19
|
* source path contains non-ASCII characters (nodejs/node#54476). The copy is
|
|
20
20
|
* per-entry instead, which also lets source mtimes ride along.
|
|
21
|
+
*
|
|
22
|
+
* A preset row names the package it mounts, so a name the running installation
|
|
23
|
+
* does not ship makes the whole preset unresolvable. Text naming a package the
|
|
24
|
+
* harness renamed is therefore reconciled with the installation before it is
|
|
25
|
+
* compared or written.
|
|
21
26
|
* @module dsh-chatgpt-subscription/preset-sync
|
|
22
27
|
*/
|
|
23
28
|
/** The preset directory this package ships. */
|
|
24
29
|
export declare const BUNDLED_PRESET_IDS: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Whether a bare specifier resolves from this module in the running
|
|
32
|
+
* installation. A harness whose Node build exposes no `import.meta.resolve`
|
|
33
|
+
* answers `false` for everything, which leaves every bundled spelling in place.
|
|
34
|
+
* @param specifier - bare package specifier.
|
|
35
|
+
* @returns whether the specifier resolves.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolvesFromHere(specifier: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Point every renamed package name at the spelling this installation ships.
|
|
40
|
+
*
|
|
41
|
+
* A name that still resolves is left alone, and so is a rename whose
|
|
42
|
+
* replacement does not resolve: with neither spelling present the preset is
|
|
43
|
+
* unresolvable either way, and rewriting would only hide which name was tried.
|
|
44
|
+
* @param content - bundled preset file text.
|
|
45
|
+
* @param resolves - whether a bare specifier resolves in this installation.
|
|
46
|
+
* @returns the text to write, equal to `content` when no rename applies.
|
|
47
|
+
*/
|
|
48
|
+
export declare function reconcilePackageNames(content: string, resolves: (specifier: string) => boolean): string;
|
|
49
|
+
/**
|
|
50
|
+
* Reconcile one bundled preset file with the packages this installation ships:
|
|
51
|
+
* a renamed package takes the spelling it carries, and a row it cannot mount is
|
|
52
|
+
* disabled rather than left to mark the whole preset unresolvable.
|
|
53
|
+
* @param content - bundled preset file text.
|
|
54
|
+
* @param resolves - whether a bare specifier resolves in this installation.
|
|
55
|
+
* @returns the text to write.
|
|
56
|
+
*/
|
|
57
|
+
export declare function reconcilePreset(content: string, resolves: (specifier: string) => boolean): string;
|
|
58
|
+
/** One preset file's text, rewritten for the running installation. */
|
|
59
|
+
export type PresetFileRewrite = (relativePath: string, content: string) => string;
|
|
60
|
+
/** Rewrite bundled preset text for the packages this installation ships. */
|
|
61
|
+
export declare const rewritePresetFile: PresetFileRewrite;
|
|
25
62
|
/** One sync run's outcome, grouped for diagnostics. */
|
|
26
63
|
export interface PresetSyncResult {
|
|
27
64
|
/** Preset ids whose tree was (re)written this run. */
|
|
@@ -57,9 +94,10 @@ export declare function presetTargetRoot(home: string): string;
|
|
|
57
94
|
* Copy `sourceDir` into `targetDir` idempotently.
|
|
58
95
|
* @param sourceDir - bundled preset directory.
|
|
59
96
|
* @param targetDir - discovery-root directory for the same preset id.
|
|
97
|
+
* @param rewrites - replacement text by path relative to `sourceDir`; a rewritten file is compared by content, since its target carries no source mtime.
|
|
60
98
|
* @returns whether anything was written.
|
|
61
99
|
*/
|
|
62
|
-
export declare function syncOnePreset(sourceDir: string, targetDir: string): 'synced' | 'current';
|
|
100
|
+
export declare function syncOnePreset(sourceDir: string, targetDir: string, rewrites?: ReadonlyMap<string, string>): 'synced' | 'current';
|
|
63
101
|
/**
|
|
64
102
|
* Sync every bundled preset into `targetRoot`, then remove ids named in
|
|
65
103
|
* `retire` that the bundle no longer ships. Only those exact ids are removed;
|
|
@@ -67,7 +105,8 @@ export declare function syncOnePreset(sourceDir: string, targetDir: string): 'sy
|
|
|
67
105
|
* @param sourceRoot - this package's bundled `presets/` directory.
|
|
68
106
|
* @param targetRoot - harness-home agent-presets discovery root.
|
|
69
107
|
* @param retire - previously bundled preset ids to remove when absent from the source.
|
|
108
|
+
* @param rewrite - rewrites preset text for the running installation; omission copies the bundle verbatim.
|
|
70
109
|
* @returns the grouped outcome of the run.
|
|
71
110
|
*/
|
|
72
|
-
export declare function syncPresetTrees(sourceRoot: string, targetRoot: string, retire?: readonly string[]): PresetSyncResult;
|
|
111
|
+
export declare function syncPresetTrees(sourceRoot: string, targetRoot: string, retire?: readonly string[], rewrite?: PresetFileRewrite): PresetSyncResult;
|
|
73
112
|
//# sourceMappingURL=preset-sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-sync.d.ts","sourceRoot":"","sources":["../../../src/host/preset-sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"preset-sync.d.ts","sourceRoot":"","sources":["../../../src/host/preset-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAiB,CAAA;AAuCjE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAS3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAQvG;AA6CD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAEjG;AAED,sEAAsE;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;AAEjF,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,EAAE,iBACY,CAAA;AAE5C,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,iEAAiE;IACjE,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACvC,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAQpC;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AA0FD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAChD,QAAQ,GAAG,SAAS,CA+CtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,SAAS,MAAM,EAAO,EAC9B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,gBAAgB,CAiClB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { SubagentRouteAuditDto } from '../shared/contracts.ts';
|
|
2
3
|
import { OAuthService } from './oauth-service.ts';
|
|
3
4
|
import { type SubscriptionPreferenceStore } from './preferences.ts';
|
|
4
5
|
import type { ProxyManager } from './proxy-manager.ts';
|
|
5
6
|
import type { SearchProviderSwitcher } from './search-provider-switcher.ts';
|
|
6
7
|
import { UsageService } from './usage-service.ts';
|
|
7
|
-
|
|
8
|
+
/** Read-only audit provider the optional route serves. */
|
|
9
|
+
export type RouteAuditReader = (sessionId: string) => Promise<SubagentRouteAuditDto>;
|
|
10
|
+
export declare function registerRoutes(ctx: Context, oauth: OAuthService, usage: UsageService, preferences: SubscriptionPreferenceStore, proxyManager?: ProxyManager, searchSwitcher?: SearchProviderSwitcher, routeAudit?: RouteAuditReader): () => void;
|
|
8
11
|
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAIV,qBAAqB,EAEtB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAmB,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AAIpE,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAEpF,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,2BAA2B,EACxC,YAAY,CAAC,EAAE,YAAY,EAC3B,cAAc,CAAC,EAAE,sBAAsB,EACvC,UAAU,CAAC,EAAE,gBAAgB,GAC5B,MAAM,IAAI,CA2LZ"}
|
|
@@ -24,6 +24,33 @@ export declare const SUBAGENT_MODEL_SELECTION_NAMESPACE = "subagent-model-select
|
|
|
24
24
|
export declare const SUBAGENT_POLICY_EVENT = "subagent/model-selection-policy";
|
|
25
25
|
/** Delegation tools whose child routes this guard authorizes. */
|
|
26
26
|
export declare const DEFAULT_DELEGATION_TOOLS: readonly string[];
|
|
27
|
+
/**
|
|
28
|
+
* Delegation tools that start their child on the caller's own route by design.
|
|
29
|
+
* `subagent_fork` is the shipped one: it omits `modelSelectionSettings`, so it
|
|
30
|
+
* exposes no route parameters and seeds the child from the parent's own
|
|
31
|
+
* conversation — a child on any other route would discard the inherited prefix
|
|
32
|
+
* and its cache. Inherit mode is what keeps that design honest: the fork still
|
|
33
|
+
* cannot choose, but an allowlist-carrying Session now refuses to let it run on
|
|
34
|
+
* a route the user did not authorize.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_SUBAGENT_INHERIT_TOOLS: readonly string[];
|
|
37
|
+
/**
|
|
38
|
+
* How one delegation tool resolves the child route this guard authorizes.
|
|
39
|
+
*
|
|
40
|
+
* `explicit` — the tool exposes `provider`/`model`, so the call must name the
|
|
41
|
+
* pair and that pair must be on the allowlist.
|
|
42
|
+
* `inherit` — the tool declares no route parameters and starts the child on the
|
|
43
|
+
* caller's own route (the fork backend, whose whole value is reusing the
|
|
44
|
+
* parent's conversation and its cache). The guard then forbids a route override
|
|
45
|
+
* and checks the effective inherited route against the same allowlist, because
|
|
46
|
+
* "the tool cannot choose" is not the same as "the choice is authorized".
|
|
47
|
+
*/
|
|
48
|
+
export type DelegationToolMode = 'explicit' | 'inherit';
|
|
49
|
+
/** One delegation tool name paired with the mode the guard enforces on it. */
|
|
50
|
+
export interface DelegationToolPolicy {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
readonly mode: DelegationToolMode;
|
|
53
|
+
}
|
|
27
54
|
/** One exact provider/model route the user authorized for children. */
|
|
28
55
|
export interface AllowedModelRoute {
|
|
29
56
|
readonly provider: string;
|
|
@@ -44,6 +71,17 @@ export interface PolicySession {
|
|
|
44
71
|
readonly origin?: unknown;
|
|
45
72
|
readonly parentSession?: unknown;
|
|
46
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* The request header in force after the log's last header snapshot — the
|
|
76
|
+
* route the NEXT request uses. Read only by `inherit` mode, and optional so
|
|
77
|
+
* a minimal durable record still satisfies this interface.
|
|
78
|
+
*/
|
|
79
|
+
requestHeader?(): {
|
|
80
|
+
readonly config?: {
|
|
81
|
+
readonly provider?: unknown;
|
|
82
|
+
readonly model?: unknown;
|
|
83
|
+
};
|
|
84
|
+
} | undefined;
|
|
47
85
|
}
|
|
48
86
|
/** Session lookup the guard walks from the calling agent to its ancestors. */
|
|
49
87
|
export interface SessionsResolver {
|
|
@@ -62,6 +100,12 @@ export interface DelegationArguments {
|
|
|
62
100
|
readonly provider?: unknown;
|
|
63
101
|
readonly model?: unknown;
|
|
64
102
|
}
|
|
103
|
+
/** The route an inherit-mode child would run on, as far as it can be resolved. */
|
|
104
|
+
export interface InheritedRoute {
|
|
105
|
+
readonly provider?: string;
|
|
106
|
+
readonly model?: string;
|
|
107
|
+
readonly reasoningEffort?: string;
|
|
108
|
+
}
|
|
65
109
|
/**
|
|
66
110
|
* Parse the allowlist out of a durable route-policy event.
|
|
67
111
|
* @param data - `subagent/model-selection-policy` event payload.
|
|
@@ -90,6 +134,19 @@ export declare function authorizedRoutesFor(agent: AuthorizationAgent | undefine
|
|
|
90
134
|
* @returns the resolved preference, or undefined without a settings service.
|
|
91
135
|
*/
|
|
92
136
|
export declare function subagentModelSelectionPreference(settings: SettingsProvider | undefined): SubagentModelSelectionPreference | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Read the route an inherit-mode child would run on: the calling agent's own
|
|
139
|
+
* effective request route. This mirrors the delegation seam's
|
|
140
|
+
* `parentAgentOptionsForDelegation`, where the latest request header owns
|
|
141
|
+
* provider/model after request-time model selection and the creation options
|
|
142
|
+
* remain the fallback before the first request. `AuthorizationAgent.options` is
|
|
143
|
+
* deliberately NOT a fallback while a header exists — after a mid-session model
|
|
144
|
+
* switch the creation options are stale, and trusting them would authorize the
|
|
145
|
+
* route the session no longer uses.
|
|
146
|
+
* @param agent - Calling agent.
|
|
147
|
+
* @returns the inherited route fields, each absent when its source did not supply it.
|
|
148
|
+
*/
|
|
149
|
+
export declare function inheritedRouteOf(agent: AuthorizationAgent | undefined): InheritedRoute;
|
|
93
150
|
/**
|
|
94
151
|
* Build the denial reason for a delegation that named no explicit route.
|
|
95
152
|
* A policy-carrying Session requires the model to choose, so the reason names
|
|
@@ -118,6 +175,29 @@ export declare function partialRouteReason(missing: 'provider' | 'model', suppli
|
|
|
118
175
|
* @returns the corrective reason handed back to the model.
|
|
119
176
|
*/
|
|
120
177
|
export declare function unauthorizedRouteReason(provider: string | undefined, model: string | undefined, allowed: readonly AllowedModelRoute[], explicit: boolean): string;
|
|
178
|
+
/**
|
|
179
|
+
* Build the denial reason for an inherit-mode delegation that named a route.
|
|
180
|
+
* The fork backend accepts no route parameters, so a named pair is not a
|
|
181
|
+
* partial override the backend would ignore — it is a request to change the
|
|
182
|
+
* route, which is exactly what an inherit-mode tool exists to prevent.
|
|
183
|
+
* @param toolName - the tool the model called.
|
|
184
|
+
* @param provider - the provider the call named.
|
|
185
|
+
* @param model - the model the call named.
|
|
186
|
+
* @returns the corrective reason handed back to the model.
|
|
187
|
+
*/
|
|
188
|
+
export declare function inheritOverrideReason(toolName: string, provider: string, model: string): string;
|
|
189
|
+
/**
|
|
190
|
+
* Build the denial reason for an inherit-mode delegation whose inherited route
|
|
191
|
+
* is outside the allowlist. Unlike the explicit case this is not something the
|
|
192
|
+
* call can fix by naming a route, so the reason points at the tool that can.
|
|
193
|
+
* @param toolName - the tool the model called.
|
|
194
|
+
* @param provider - the parent route the child would inherit, when known.
|
|
195
|
+
* @param model - the parent model the child would inherit, when known.
|
|
196
|
+
* @param allowed - Routes the calling Session authorizes.
|
|
197
|
+
* @param reasoningEffort - the inherited effort, when the header recorded one.
|
|
198
|
+
* @returns the corrective reason handed back to the model.
|
|
199
|
+
*/
|
|
200
|
+
export declare function inheritRouteDenialReason(toolName: string, provider: string | undefined, model: string | undefined, allowed: readonly AllowedModelRoute[], reasoningEffort?: string): string;
|
|
121
201
|
/** Which Session's recorded allowlist a delegation must respect. */
|
|
122
202
|
export type AuthorizationScope =
|
|
123
203
|
/**
|
|
@@ -132,6 +212,15 @@ export type AuthorizationScope =
|
|
|
132
212
|
* Session. A Session that recorded its own routes still outranks it.
|
|
133
213
|
*/
|
|
134
214
|
| 'preference';
|
|
215
|
+
/**
|
|
216
|
+
* Resolve one tool's enforcement mode from the configured policies. An
|
|
217
|
+
* unconfigured name is `undefined`: the guard does not police it, which is how
|
|
218
|
+
* the plain-name configuration keeps its existing meaning.
|
|
219
|
+
* @param policies - Configured tool policies in precedence order.
|
|
220
|
+
* @param toolName - Tool being dispatched.
|
|
221
|
+
* @returns the first matching mode, or undefined when the guard ignores the tool.
|
|
222
|
+
*/
|
|
223
|
+
export declare function delegationModeOf(policies: readonly DelegationToolPolicy[], toolName: string): DelegationToolMode | undefined;
|
|
135
224
|
/**
|
|
136
225
|
* Decide whether one delegation call may start its child.
|
|
137
226
|
* @param agent - Calling agent.
|
|
@@ -139,19 +228,22 @@ export type AuthorizationScope =
|
|
|
139
228
|
* @param args - Parsed tool arguments.
|
|
140
229
|
* @param preference - Current Host preference, when the settings service exists.
|
|
141
230
|
* @param sessions - Session registry used for ancestor lookup.
|
|
142
|
-
* @param toolNames - Delegation tool names this guard authorizes.
|
|
231
|
+
* @param toolNames - Delegation tool names this guard authorizes (explicit mode).
|
|
143
232
|
* @param scope - Whether an unrecorded Session falls back to the preference.
|
|
233
|
+
* @param inheritToolNames - Delegation tools that start a child on the caller's own route.
|
|
144
234
|
* @returns a denial reason, or undefined to leave the call untouched.
|
|
145
235
|
*/
|
|
146
|
-
export declare function delegationDenialReason(agent: AuthorizationAgent | undefined, toolName: string, args: unknown, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, toolNames?: readonly string[], scope?: AuthorizationScope): string | undefined;
|
|
236
|
+
export declare function delegationDenialReason(agent: AuthorizationAgent | undefined, toolName: string, args: unknown, preference: SubagentModelSelectionPreference | undefined, sessions: SessionsResolver, toolNames?: readonly string[], scope?: AuthorizationScope, inheritToolNames?: readonly string[]): string | undefined;
|
|
147
237
|
/** Runtime inputs the guard closes over. */
|
|
148
238
|
export interface SubagentAuthorizationOptions {
|
|
149
239
|
/** Live settings service, when composed; absent leaves recorded policies in charge. */
|
|
150
240
|
readonly settings?: SettingsProvider;
|
|
151
241
|
/** Session registry used for ancestor lookup. */
|
|
152
242
|
readonly sessions: SessionsResolver;
|
|
153
|
-
/** Exact delegation tool names this guard authorizes. */
|
|
243
|
+
/** Exact delegation tool names this guard authorizes (explicit route selection). */
|
|
154
244
|
readonly toolNames: readonly string[];
|
|
245
|
+
/** Delegation tools that run their child on the caller's own route. */
|
|
246
|
+
readonly inheritToolNames?: readonly string[];
|
|
155
247
|
/** Whether an unrecorded Session falls back to the current preference. */
|
|
156
248
|
readonly scope?: AuthorizationScope;
|
|
157
249
|
}
|
|
@@ -167,6 +259,22 @@ export type DelegationGuard = (agent: AuthorizationAgent | undefined, toolName:
|
|
|
167
259
|
export declare function createSubagentAuthorization(options: SubagentAuthorizationOptions): DelegationGuard;
|
|
168
260
|
/** Delegation names this guard recognizes when configuration omits them. */
|
|
169
261
|
export declare function normalizeDelegationToolNames(value: unknown): string[];
|
|
262
|
+
/**
|
|
263
|
+
* Normalize the configured inherit-mode names. Unlike
|
|
264
|
+
* {@link normalizeDelegationToolNames}, an empty array is a deliberate opt-out
|
|
265
|
+
* (`[]`) rather than a request for the default, and `undefined` selects the
|
|
266
|
+
* shipped default.
|
|
267
|
+
* @param value - Candidate configuration value.
|
|
268
|
+
* @returns the exact inherit-mode names this guard enforces.
|
|
269
|
+
*/
|
|
270
|
+
export declare function normalizeInheritToolNames(value: unknown): string[];
|
|
271
|
+
/**
|
|
272
|
+
* Validate the configured inherit-mode names. Emptiness is legal here — it
|
|
273
|
+
* disables inherit enforcement — but a malformed entry is not.
|
|
274
|
+
* @param toolNames - Candidate inherit-mode delegation tool names.
|
|
275
|
+
* @returns the exact names this guard enforces in inherit mode.
|
|
276
|
+
*/
|
|
277
|
+
export declare function validateInheritToolNames(toolNames: readonly string[]): string[];
|
|
170
278
|
/**
|
|
171
279
|
* Validate the plugin configuration that owns this guard.
|
|
172
280
|
* @param toolNames - Candidate delegation tool names.
|
|
@@ -175,8 +283,10 @@ export declare function normalizeDelegationToolNames(value: unknown): string[];
|
|
|
175
283
|
export declare function validateDelegationToolNames(toolNames: readonly string[]): string[];
|
|
176
284
|
/** Configuration accepted by {@link installSubagentModelAuthorization}. */
|
|
177
285
|
export interface SubagentModelAuthorizationConfig {
|
|
178
|
-
/** Delegation tool names the guard authorizes. */
|
|
286
|
+
/** Delegation tool names the guard authorizes (explicit route selection). */
|
|
179
287
|
readonly toolNames?: readonly string[];
|
|
288
|
+
/** Delegation tools that run their child on the caller's own route. */
|
|
289
|
+
readonly inheritToolNames?: readonly string[];
|
|
180
290
|
/** Whether an unrecorded Session falls back to the current preference. */
|
|
181
291
|
readonly scope?: AuthorizationScope;
|
|
182
292
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-model-authorization.d.ts","sourceRoot":"","sources":["../../../src/host/subagent-model-authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAIjE,kEAAkE;AAClE,eAAO,MAAM,kCAAkC,6BAA6B,CAAA;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,oCAAoC,CAAA;AAEtE,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAiB,CAAA;AAEvE,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,gFAAgF;AAChF,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;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@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post-hoc visibility for child routes the delegation guard cannot pre-empt.
|
|
3
|
+
*
|
|
4
|
+
* `subagentModelAuthorization` gates one model-authored tool call. Two whole
|
|
5
|
+
* classes of child creation never pass through such a call, so no tool guard can
|
|
6
|
+
* see them:
|
|
7
|
+
*
|
|
8
|
+
* - a delegation tool that exposes no route parameters and inherits the
|
|
9
|
+
* caller's route (`subagent_fork`);
|
|
10
|
+
* - a subsystem that starts children itself without any delegation tool at all
|
|
11
|
+
* (`ralph`, the `workflow` engine, a plugin calling `ctx.subagents.start`).
|
|
12
|
+
*
|
|
13
|
+
* Every session-backed child still leaves two durable facts, which is enough to
|
|
14
|
+
* reconstruct what actually ran:
|
|
15
|
+
*
|
|
16
|
+
* - the parent records one `subagent/catalog` event per continuable child, and
|
|
17
|
+
* the child's own session header names its `parentSession`;
|
|
18
|
+
* - the child records one immutable `subagent/descriptor` whose
|
|
19
|
+
* `agentProvider`/`agentModel` are the resolved child route (absent when the
|
|
20
|
+
* child inherited the parent's route, which is the common case).
|
|
21
|
+
*
|
|
22
|
+
* This module folds those facts into an advisory list. It never blocks and never
|
|
23
|
+
* mutates a session: its whole job is to make an unauthorized child route
|
|
24
|
+
* visible instead of silent.
|
|
25
|
+
* @module dsh-chatgpt-subscription/subagent-route-audit
|
|
26
|
+
*/
|
|
27
|
+
/** One record of a child session whose route is known. */
|
|
28
|
+
export interface ChildRouteFinding {
|
|
29
|
+
/** The child session id. */
|
|
30
|
+
readonly childId: string;
|
|
31
|
+
/** The parent session id, when the child's header names one. */
|
|
32
|
+
readonly parentId?: string;
|
|
33
|
+
/** The `ctx.subagents` provider that established the child. */
|
|
34
|
+
readonly provider?: string;
|
|
35
|
+
/** The child's own resolved provider, absent when it inherited the parent's. */
|
|
36
|
+
readonly childProvider?: string;
|
|
37
|
+
/** The child's own resolved model, absent when it inherited the parent's. */
|
|
38
|
+
readonly childModel?: string;
|
|
39
|
+
/** Short display label recorded with the descriptor. */
|
|
40
|
+
readonly label?: string;
|
|
41
|
+
}
|
|
42
|
+
/** One child that ran on a route the governing allowlist does not authorize. */
|
|
43
|
+
export interface RouteViolation {
|
|
44
|
+
/** The child that ran on the unauthorized route. */
|
|
45
|
+
readonly finding: ChildRouteFinding;
|
|
46
|
+
/**
|
|
47
|
+
* The route the child actually ran on. For a route-preserving child this is
|
|
48
|
+
* the parent's route, which is why the finding keeps both.
|
|
49
|
+
*/
|
|
50
|
+
readonly route: {
|
|
51
|
+
readonly provider?: string;
|
|
52
|
+
readonly model?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Whether the child's route equals its parent's current route.
|
|
56
|
+
*
|
|
57
|
+
* This is deliberately a comparison rather than a claim about which mechanism
|
|
58
|
+
* chose the route. A forked child's descriptor DOES record the route it ran
|
|
59
|
+
* on — the delegation seam stamps the parent's route into the child's options
|
|
60
|
+
* — so a descriptor alone cannot prove whether the child inherited the route
|
|
61
|
+
* or was handed it explicitly. Equality is the checkable fact, and it is the
|
|
62
|
+
* one that decides whether re-delegating through an explicit tool would even
|
|
63
|
+
* change anything.
|
|
64
|
+
*/
|
|
65
|
+
readonly sameAsParent: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** One exact provider/model route authorized for children. */
|
|
68
|
+
export interface AuditedRoute {
|
|
69
|
+
readonly provider: string;
|
|
70
|
+
readonly model: string;
|
|
71
|
+
}
|
|
72
|
+
/** Minimal session view this fold reads: the header and the ordered event log. */
|
|
73
|
+
export interface AuditedSession {
|
|
74
|
+
readonly id?: unknown;
|
|
75
|
+
readonly header?: {
|
|
76
|
+
readonly parentSession?: unknown;
|
|
77
|
+
readonly origin?: unknown;
|
|
78
|
+
};
|
|
79
|
+
readonly events?: readonly {
|
|
80
|
+
readonly type?: unknown;
|
|
81
|
+
readonly data?: unknown;
|
|
82
|
+
}[];
|
|
83
|
+
}
|
|
84
|
+
/** Session lookup used to resolve a child's parent for inherited-route attribution. */
|
|
85
|
+
export interface AuditedSessions {
|
|
86
|
+
get(id: string): AuditedSession | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Extract the child route a descriptor recorded.
|
|
90
|
+
* @param data - `subagent/descriptor` payload.
|
|
91
|
+
* @returns the declared route fields plus provider and label, each when present.
|
|
92
|
+
*/
|
|
93
|
+
export declare function readChildDescriptor(data: unknown): Omit<ChildRouteFinding, 'childId' | 'parentId'> | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Read the child-route allowlist a session recorded, from its own log.
|
|
96
|
+
*
|
|
97
|
+
* The live guard reads the same event through `policyRoutesOf`, which walks a
|
|
98
|
+
* session's `eventAt` accessor. The audit holds a resolved session instead, so
|
|
99
|
+
* it scans the snapshot it already has rather than reopening the log per child.
|
|
100
|
+
* @param session - the session whose policy is read.
|
|
101
|
+
* @returns the authorized routes, or undefined when the session recorded none.
|
|
102
|
+
*/
|
|
103
|
+
export declare function auditedRoutesOf(session: AuditedSession): AuditedRoute[] | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Collect the child routes one parent session recorded.
|
|
106
|
+
*
|
|
107
|
+
* Discovery uses both durable signals because they cover different backends: a
|
|
108
|
+
* `subagent/catalog` event names every continuable child the parent created,
|
|
109
|
+
* while a descriptor-less or one-shot child is only reachable by scanning the
|
|
110
|
+
* registry for a session whose header names this parent.
|
|
111
|
+
* @param parent - the parent session to inspect.
|
|
112
|
+
* @param sessions - registry used to resolve each child's own log and header.
|
|
113
|
+
* @returns one finding per child whose route could be read.
|
|
114
|
+
*/
|
|
115
|
+
export declare function childRoutesOf(parent: AuditedSession, sessions: AuditedSessions): ChildRouteFinding[];
|
|
116
|
+
/**
|
|
117
|
+
* Resolve the route a finding actually ran on, following the parent when the
|
|
118
|
+
* child recorded none, and report whether it matches the parent's.
|
|
119
|
+
* @param finding - the child under audit.
|
|
120
|
+
* @param sessions - registry used to resolve the parent.
|
|
121
|
+
* @returns the effective route and whether it equals the parent's route.
|
|
122
|
+
*/
|
|
123
|
+
export declare function effectiveRouteOf(finding: ChildRouteFinding, sessions: AuditedSessions): RouteViolation['route'] & {
|
|
124
|
+
sameAsParent: boolean;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Fold one parent session's children into the violations worth reporting.
|
|
128
|
+
* A finding with an unresolvable route is reported as neither: guessing would
|
|
129
|
+
* turn this advisory list into a source of false accusations.
|
|
130
|
+
* @param parent - the parent session to audit.
|
|
131
|
+
* @param sessions - registry used to resolve children and parents.
|
|
132
|
+
* @param allowed - routes the parent Session authorized, when it recorded any.
|
|
133
|
+
* @returns violations, ordered as the children were discovered.
|
|
134
|
+
*/
|
|
135
|
+
export declare function auditChildRoutes(parent: AuditedSession, sessions: AuditedSessions, allowed: readonly AuditedRoute[] | undefined): RouteViolation[];
|
|
136
|
+
/**
|
|
137
|
+
* Render one violation as a single model-facing line.
|
|
138
|
+
* @param violation - the violation to describe.
|
|
139
|
+
* @returns a one-line summary naming the child, its route, and its origin.
|
|
140
|
+
*/
|
|
141
|
+
export declare function violationText(violation: RouteViolation): string;
|
|
142
|
+
//# sourceMappingURL=subagent-route-audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-route-audit.d.ts","sourceRoot":"","sources":["../../../src/host/subagent-route-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,wDAAwD;IAC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G,YAAY,EAAE,GAAG,SAAS,CAcnF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,GAAG,iBAAiB,EAAE,CAqCpG;AA4CD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,eAAe,GACxB,cAAc,CAAC,OAAO,CAAC,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,CAarD;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAC3C,cAAc,EAAE,CAalB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,MAAM,CAW/D"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,6 +18,14 @@ export interface Config {
|
|
|
18
18
|
subagentModelAuthorization?: boolean;
|
|
19
19
|
/** Delegation tool names the authorization guard recognizes (default `subagent`). */
|
|
20
20
|
subagentModelTools?: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Delegation tools that always run their child on the calling agent's route
|
|
23
|
+
* and therefore expose no `provider`/`model` (default `['subagent_fork']`).
|
|
24
|
+
* An allowlist-carrying Session then still denies the call when the inherited
|
|
25
|
+
* route is not authorized, instead of silently running an unauthorized child.
|
|
26
|
+
* Set `[]` to leave these tools on the built-in behavior.
|
|
27
|
+
*/
|
|
28
|
+
subagentModelInheritTools?: string[];
|
|
21
29
|
/**
|
|
22
30
|
* `session` (default) enforces the allowlist a Session recorded, matching the
|
|
23
31
|
* delegation tool's snapshot; `preference` also enforces the current Settings
|
|
@@ -31,7 +39,9 @@ export declare function apply(ctx: Context, pluginConfig?: Config): void;
|
|
|
31
39
|
export { RELAY_PROBE_ENV, RELAY_PROBE_FILE_ENV, RELAY_PROBE_FILE_NAME, RELAY_PROBE_MAX_BYTES, RELAY_SOURCE_KINDS, RelayProbe, createFileRelayProbeSink, installRelayProbe, relayProbeEnabled, relayProbeEnvFile, relayProbeEnvValue, relayProbeLogPath, } from './host/relay-probe.ts';
|
|
32
40
|
export type { AgentsLookup, ProbeAgent, ProbeEvent, ProbeSession, RelayProbeContext, RelayProbeOptions, RelayProbeSink, } from './host/relay-probe.ts';
|
|
33
41
|
export { ProxyManager, detectSystemProxy } from './host/proxy-manager.ts';
|
|
34
|
-
export { SUBAGENT_MODEL_SELECTION_NAMESPACE, SUBAGENT_POLICY_EVENT, authorizedRoutesFor, createSubagentAuthorization, delegationDenialReason, installSubagentModelAuthorization, normalizeDelegationToolNames, parseAllowedRoutes, policyRoutesOf, subagentModelSelectionPreference, unauthorizedRouteReason, validateAuthorizationScope, validateDelegationToolNames, } from './host/subagent-model-authorization.ts';
|
|
42
|
+
export { DEFAULT_SUBAGENT_INHERIT_TOOLS, SUBAGENT_MODEL_SELECTION_NAMESPACE, SUBAGENT_POLICY_EVENT, authorizedRoutesFor, createSubagentAuthorization, delegationDenialReason, delegationModeOf, inheritOverrideReason, inheritRouteDenialReason, inheritedRouteOf, installSubagentModelAuthorization, normalizeDelegationToolNames, normalizeInheritToolNames, parseAllowedRoutes, policyRoutesOf, subagentModelSelectionPreference, unauthorizedRouteReason, validateAuthorizationScope, validateDelegationToolNames, validateInheritToolNames, } from './host/subagent-model-authorization.ts';
|
|
43
|
+
export { auditChildRoutes, auditedRoutesOf, childRoutesOf, effectiveRouteOf, readChildDescriptor, violationText, } from './host/subagent-route-audit.ts';
|
|
44
|
+
export type { AuditedRoute, AuditedSession, AuditedSessions, ChildRouteFinding, RouteViolation, } from './host/subagent-route-audit.ts';
|
|
35
45
|
export { OAuthService } from './host/oauth-service.ts';
|
|
36
46
|
export { CodexChatGptAdapter } from './host/adapter.ts';
|
|
37
47
|
export { createCodexImageTool } from './host/codex-images.ts';
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAkFxC,yDAAyD;AACzD,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAA;IACpC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;CAC9C;AAED,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAM3B,CAAA;AAEF,eAAO,MAAM,MAAM,UAAqE,CAAA;AAExF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,GAAE,MAAW,GAAG,IAAI,CAwTnE;AAED,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAA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