@agentrouter-top/relay-dsh-plugin-codex 0.2.2-agentrouter.2 → 0.2.2-agentrouter.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agentrouter-top/relay-dsh-plugin-codex",
3
- "version": "0.2.2-agentrouter.2",
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 and pinned Codex runtime.",
3
+ "version": "0.2.2-agentrouter.4",
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,8 +67,14 @@
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
- "docs/behavior-defaults.md"
74
+ "docs/behavior-defaults.md",
75
+ "docs/context-admission.md",
76
+ "docs/kernel-policy.md",
77
+ "docs/transcript-presentation.md"
68
78
  ],
69
79
  "dsh": {
70
80
  "client": {
@@ -129,6 +139,8 @@
129
139
  "tsdown": "0.22.2",
130
140
  "typescript": "6.0.3",
131
141
  "vitest": "^4.1.8",
142
+ "@deepseek-ai/dsh-agent-presets": "0.1.2-rc.1",
143
+ "@deepseek-ai/dsh-client-ui-message-feedback": "0.1.2-rc.1",
132
144
  "@deepseek-ai/cordis": "4.0.2",
133
145
  "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.2-rc.1",
134
146
  "@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
+ }