@agentrouter-top/relay-dsh-plugin-codex 0.2.2-agentrouter.3 → 0.2.2-agentrouter.5
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/docs/presentation-policy.md +29 -0
- package/docs/quiet-activity.md +17 -0
- package/lib/client.js +268 -33
- package/lib/client.js.map +1 -1
- package/package.json +14 -4
- package/presentation-api.d.mts +20 -0
- package/presentation-api.mjs +25 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentrouter-top/relay-dsh-plugin-codex",
|
|
3
|
-
"version": "0.2.2-agentrouter.
|
|
4
|
-
"description": "Codex conversation backend for DeepSeek Harness, powered by the Codex App Server with approvals and DSH tool support. AgentRouter fork: optional launch/native-behavior configuration, context admission, kernel/model consistency and pinned Codex runtime.",
|
|
3
|
+
"version": "0.2.2-agentrouter.5",
|
|
4
|
+
"description": "Codex conversation backend for DeepSeek Harness, powered by the Codex App Server with approvals and DSH tool support. AgentRouter fork: optional launch/native-behavior configuration, context admission, kernel/model consistency, public presentation policy and pinned Codex runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|
|
7
7
|
"deepseek-harness",
|
|
@@ -40,7 +40,11 @@
|
|
|
40
40
|
".": "./lib/host-plugin.js",
|
|
41
41
|
"./client": "./lib/client.js",
|
|
42
42
|
"./typert": "./lib/typert.host.js",
|
|
43
|
-
"./package.json": "./package.json"
|
|
43
|
+
"./package.json": "./package.json",
|
|
44
|
+
"./presentation": {
|
|
45
|
+
"types": "./presentation-api.d.mts",
|
|
46
|
+
"default": "./presentation-api.mjs"
|
|
47
|
+
}
|
|
44
48
|
},
|
|
45
49
|
"files": [
|
|
46
50
|
"README.zh.md",
|
|
@@ -63,11 +67,15 @@
|
|
|
63
67
|
"dsh-compat.mjs",
|
|
64
68
|
"dsh-client-compat.mjs",
|
|
65
69
|
"dsh-client-compat.d.mts",
|
|
70
|
+
"presentation-api.mjs",
|
|
71
|
+
"presentation-api.d.mts",
|
|
72
|
+
"docs/presentation-policy.md",
|
|
66
73
|
"AGENTROUTER-FORK.md",
|
|
67
74
|
"docs/behavior-defaults.md",
|
|
68
75
|
"docs/context-admission.md",
|
|
69
76
|
"docs/kernel-policy.md",
|
|
70
|
-
"docs/transcript-presentation.md"
|
|
77
|
+
"docs/transcript-presentation.md",
|
|
78
|
+
"docs/quiet-activity.md"
|
|
71
79
|
],
|
|
72
80
|
"dsh": {
|
|
73
81
|
"client": {
|
|
@@ -132,6 +140,8 @@
|
|
|
132
140
|
"tsdown": "0.22.2",
|
|
133
141
|
"typescript": "6.0.3",
|
|
134
142
|
"vitest": "^4.1.8",
|
|
143
|
+
"@deepseek-ai/dsh-agent-presets": "0.1.2-rc.1",
|
|
144
|
+
"@deepseek-ai/dsh-client-ui-message-feedback": "0.1.2-rc.1",
|
|
135
145
|
"@deepseek-ai/cordis": "4.0.2",
|
|
136
146
|
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.2-rc.1",
|
|
137
147
|
"@deepseek-ai/dsh-llm": "0.1.2-rc.1",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface PresentationOptions {
|
|
2
|
+
/** Product UI only; the integrating host must enforce its own execution policy. */
|
|
3
|
+
kernelMode?: 'coexist' | 'codex-only';
|
|
4
|
+
/** Hide the native feedback leaf for Codex sessions, not other action providers. */
|
|
5
|
+
hideFeedback?: boolean;
|
|
6
|
+
/** Hide the native composer statistics leaf for Codex sessions. */
|
|
7
|
+
hideStatistics?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface RelayCodexPresentation {
|
|
10
|
+
readonly version: 1;
|
|
11
|
+
/** One owner at a time. Dispose to restore the unconfigured presentation. */
|
|
12
|
+
configure(options?: PresentationOptions): () => void;
|
|
13
|
+
}
|
|
14
|
+
export function createPresentationController(
|
|
15
|
+
install: (options: Readonly<Required<PresentationOptions>>) => () => void,
|
|
16
|
+
): { service: RelayCodexPresentation; dispose(): void };
|
|
17
|
+
|
|
18
|
+
declare module '@deepseek-ai/cordis' {
|
|
19
|
+
interface Context { relayCodexPresentation: RelayCodexPresentation }
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Public, optional browser presentation policy. No account/runtime configuration. */
|
|
2
|
+
export function createPresentationController(install) {
|
|
3
|
+
let active;
|
|
4
|
+
const service = Object.freeze({
|
|
5
|
+
version: 1,
|
|
6
|
+
configure(options = {}) {
|
|
7
|
+
if (active) throw new Error('Relay Codex presentation already has a configuration owner');
|
|
8
|
+
const { kernelMode = 'coexist', hideFeedback = false, hideStatistics = false } = options;
|
|
9
|
+
if (!['coexist', 'codex-only'].includes(kernelMode)
|
|
10
|
+
|| typeof hideFeedback !== 'boolean' || typeof hideStatistics !== 'boolean'
|
|
11
|
+
|| Object.keys(options).some(key => !['kernelMode', 'hideFeedback', 'hideStatistics'].includes(key))) {
|
|
12
|
+
throw new TypeError('Unsupported Relay Codex presentation policy');
|
|
13
|
+
}
|
|
14
|
+
const remove = install(Object.freeze({ kernelMode, hideFeedback, hideStatistics }));
|
|
15
|
+
const release = () => {
|
|
16
|
+
if (active !== release) return;
|
|
17
|
+
active = undefined;
|
|
18
|
+
remove();
|
|
19
|
+
};
|
|
20
|
+
active = release;
|
|
21
|
+
return release;
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return { service, dispose: () => active?.() };
|
|
25
|
+
}
|