super-dsh 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/agent-agy/cordis.patch.yml +7 -4
- package/agent-agy/dist/agent.d.ts +12 -11
- package/agent-agy/dist/agy-auth-gateway.d.ts +124 -0
- package/agent-agy/dist/agy-auth-gateway.js +233 -0
- package/agent-agy/dist/agy-auth.d.ts +153 -0
- package/agent-agy/dist/agy-auth.js +179 -0
- package/agent-agy/dist/agy-cli-client.d.ts +39 -9
- package/agent-agy/dist/agy-cli-client.js +82 -18
- package/agent-agy/dist/agy-store.d.ts +8 -0
- package/agent-agy/dist/index.d.ts +46 -16
- package/agent-agy/dist/index.js +82 -56
- package/agent-agy/dist/models.d.ts +70 -0
- package/agent-agy/dist/models.js +102 -3
- package/agent-agy/package.json +7 -5
- package/agent-agy-sdk/cordis.patch.yml +58 -0
- package/agent-agy-sdk/dist/adapter.d.ts +15 -0
- package/agent-agy-sdk/dist/adapter.js +42 -0
- package/agent-agy-sdk/dist/agent-preset-agy.d.ts +27 -0
- package/agent-agy-sdk/dist/agent-preset-agy.js +32 -0
- package/agent-agy-sdk/dist/agent.d.ts +138 -0
- package/agent-agy-sdk/dist/agent.js +494 -0
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.d.ts +26 -6
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.js +43 -25
- package/agent-agy-sdk/dist/agy-sessions.d.ts +25 -0
- package/agent-agy-sdk/dist/agy-sessions.js +107 -0
- package/agent-agy-sdk/dist/agy-store.d.ts +39 -0
- package/agent-agy-sdk/dist/agy-store.js +83 -0
- package/agent-agy-sdk/dist/inbox.d.ts +26 -0
- package/agent-agy-sdk/dist/inbox.js +53 -0
- package/agent-agy-sdk/dist/index.d.ts +93 -0
- package/agent-agy-sdk/dist/index.js +476 -0
- package/agent-agy-sdk/dist/models.d.ts +41 -0
- package/agent-agy-sdk/dist/models.js +74 -0
- package/agent-agy-sdk/dist/sdk-venv.d.ts +76 -0
- package/agent-agy-sdk/dist/sdk-venv.js +173 -0
- package/agent-agy-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-agy-sdk/dist/world-plugin.js +82 -0
- package/agent-agy-sdk/package.json +64 -0
- package/agent-codex/README.md +141 -36
- package/agent-codex/cordis.patch.yml +14 -10
- package/agent-codex/dist/adapter.js +64 -28
- package/agent-codex/dist/agent.js +255 -81
- package/agent-codex/dist/app-server-approvals.js +165 -0
- package/agent-codex/dist/app-server-client.js +723 -0
- package/agent-codex/dist/app-server-events.js +432 -0
- package/agent-codex/dist/app-server-protocol.js +95 -0
- package/agent-codex/dist/app-server-wire.js +299 -0
- package/agent-codex/dist/codex-launch.js +78 -0
- package/agent-codex/dist/codex-native-config.js +392 -0
- package/agent-codex/dist/codex-provider-gateway.js +402 -0
- package/agent-codex/dist/codex-providers.js +376 -0
- package/agent-codex/dist/codex-route.js +86 -0
- package/agent-codex/dist/index.js +256 -115
- package/agent-codex/dist/permission.js +75 -1
- package/agent-codex/package.json +1 -2
- package/agent-codex-sdk/README.md +79 -0
- package/agent-codex-sdk/cordis.patch.yml +81 -0
- package/agent-codex-sdk/dist/adapter.js +91 -0
- package/agent-codex-sdk/dist/agent-preset-codex.js +32 -0
- package/agent-codex-sdk/dist/agent.js +1085 -0
- package/agent-codex-sdk/dist/codex-native-config.js +392 -0
- package/agent-codex-sdk/dist/codex-provider-gateway.js +402 -0
- package/agent-codex-sdk/dist/codex-providers.js +376 -0
- package/agent-codex-sdk/dist/codex-route.js +86 -0
- package/{agent-codex/dist/codex-client.js → agent-codex-sdk/dist/codex-sdk-client.js} +253 -32
- package/agent-codex-sdk/dist/codex-sdk-launch.js +92 -0
- package/agent-codex-sdk/dist/codex-store.js +180 -0
- package/agent-codex-sdk/dist/inbox.js +53 -0
- package/agent-codex-sdk/dist/index.js +739 -0
- package/agent-codex-sdk/dist/permission.js +71 -0
- package/agent-codex-sdk/dist/sdk-runtime.js +307 -0
- package/agent-codex-sdk/dist/session-map.js +167 -0
- package/agent-codex-sdk/dist/world-plugin.js +93 -0
- package/agent-codex-sdk/package.json +79 -0
- package/agent-codex-sdk/scripts/fetch-sdk-runtime.mjs +57 -0
- package/agent-omp/README.md +72 -55
- package/agent-omp/dist/agent.js +36 -11
- package/agent-omp/dist/index.js +92 -52
- package/agent-omp/dist/lazy-rpc.js +11 -4
- package/agent-omp/dist/omp-cli.js +114 -97
- package/agent-omp/dist/omp-store.js +12 -4
- package/agent-omp/dist/permission.js +70 -5
- package/agent-omp/dist/rpc-client.js +409 -0
- package/agent-omp/dist/world-plugin.js +36 -3
- package/agent-omp/package.json +2 -6
- package/agent-omp-sdk/README.md +103 -0
- package/agent-omp-sdk/cordis.patch.yml +108 -0
- package/agent-omp-sdk/dist/adapter.d.ts +21 -0
- package/agent-omp-sdk/dist/adapter.js +36 -0
- package/agent-omp-sdk/dist/agent-preset-omp.d.ts +31 -0
- package/agent-omp-sdk/dist/agent-preset-omp.js +32 -0
- package/agent-omp-sdk/dist/agent.d.ts +64 -0
- package/agent-omp-sdk/dist/agent.js +1178 -0
- package/agent-omp-sdk/dist/discovery.d.ts +57 -0
- package/agent-omp-sdk/dist/discovery.js +116 -0
- package/agent-omp-sdk/dist/inbox.d.ts +28 -0
- package/agent-omp-sdk/dist/inbox.js +53 -0
- package/agent-omp-sdk/dist/index.d.ts +60 -0
- package/agent-omp-sdk/dist/index.js +632 -0
- package/agent-omp-sdk/dist/knobs.d.ts +34 -0
- package/agent-omp-sdk/dist/knobs.js +50 -0
- package/agent-omp-sdk/dist/lazy-rpc.d.ts +98 -0
- package/agent-omp-sdk/dist/lazy-rpc.js +178 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.d.ts +187 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.js +294 -0
- package/agent-omp-sdk/dist/mobile-boot.d.ts +49 -0
- package/agent-omp-sdk/dist/mobile-boot.js +38 -0
- package/agent-omp-sdk/dist/models.d.ts +39 -0
- package/agent-omp-sdk/dist/models.js +299 -0
- package/agent-omp-sdk/dist/omp-cli.d.ts +67 -0
- package/agent-omp-sdk/dist/omp-cli.js +164 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.d.ts +27 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.js +178 -0
- package/agent-omp-sdk/dist/omp-executable.d.ts +2 -0
- package/agent-omp-sdk/dist/omp-executable.js +30 -0
- package/agent-omp-sdk/dist/omp-store.d.ts +134 -0
- package/agent-omp-sdk/dist/omp-store.js +526 -0
- package/agent-omp-sdk/dist/pairing.d.ts +7 -0
- package/agent-omp-sdk/dist/pairing.js +45 -0
- package/agent-omp-sdk/dist/permission.d.ts +138 -0
- package/agent-omp-sdk/dist/permission.js +161 -0
- package/agent-omp-sdk/dist/protocol.d.ts +189 -0
- package/agent-omp-sdk/dist/rpc-types.d.ts +77 -0
- package/agent-omp-sdk/dist/rpc-types.js +1 -0
- package/agent-omp-sdk/dist/sdk-client.d.ts +160 -0
- package/{agent-omp → agent-omp-sdk}/dist/sdk-client.js +108 -56
- package/agent-omp-sdk/dist/sdk-runtime.d.ts +211 -0
- package/agent-omp-sdk/dist/sdk-runtime.js +418 -0
- package/agent-omp-sdk/dist/sidecar-client.d.ts +87 -0
- package/agent-omp-sdk/dist/sidecar-client.js +197 -0
- package/agent-omp-sdk/dist/store/adapter.d.ts +17 -0
- package/agent-omp-sdk/dist/store/adapter.js +47 -0
- package/agent-omp-sdk/dist/store/db.d.ts +70 -0
- package/agent-omp-sdk/dist/store/db.js +210 -0
- package/agent-omp-sdk/dist/store/index.d.ts +23 -0
- package/agent-omp-sdk/dist/store/index.js +59 -0
- package/agent-omp-sdk/dist/store/reconcile.d.ts +15 -0
- package/agent-omp-sdk/dist/store/reconcile.js +51 -0
- package/agent-omp-sdk/dist/store/schema.d.ts +8 -0
- package/agent-omp-sdk/dist/store/schema.js +40 -0
- package/agent-omp-sdk/dist/transport.d.ts +49 -0
- package/agent-omp-sdk/dist/transport.js +35 -0
- package/agent-omp-sdk/dist/world-home.d.ts +4 -0
- package/agent-omp-sdk/dist/world-home.js +23 -0
- package/agent-omp-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-omp-sdk/dist/world-plugin.js +137 -0
- package/agent-omp-sdk/package.json +87 -0
- package/client/index.js +1115 -93
- package/cordis.patch.yml +64 -0
- package/package.json +17 -7
- package/superd-hub/dist/client/agent-settings.d.ts +156 -0
- package/superd-hub/dist/client/agent-settings.js +229 -0
- package/superd-hub/dist/client/roster.js +6 -0
- package/superd-hub/dist/client/runtime-settings-api.d.ts +76 -0
- package/superd-hub/dist/client/runtime-settings-api.js +137 -0
- package/superd-hub/dist/client/switch.d.ts +165 -0
- package/superd-hub/dist/client/switch.js +295 -0
- package/superd-hub/lib/client/index.js +1115 -93
- package/agent-codex/dist/models.js +0 -152
- package/agent-omp/dist/sidecar-client.js +0 -195
- /package/{agent-agy → agent-agy-sdk}/bridge/agy_bridge.py +0 -0
- /package/{agent-agy → agent-agy-sdk}/bridge/gemini_openai_server.mjs +0 -0
- /package/{agent-codex/dist/codex-events.js → agent-codex-sdk/dist/codex-sdk-events.js} +0 -0
- /package/{agent-omp → agent-omp-sdk}/dist/protocol.js +0 -0
- /package/{agent-omp → agent-omp-sdk}/sidecar/main.ts +0 -0
package/cordis.patch.yml
CHANGED
|
@@ -71,6 +71,70 @@
|
|
|
71
71
|
name: 'super-dsh/agents/hermes'
|
|
72
72
|
- id: agent-agy
|
|
73
73
|
name: 'super-dsh/agents/agy'
|
|
74
|
+
# Opt-IN SDK half of the Antigravity split (2026-10-02 user ruling). The
|
|
75
|
+
# CLI row above is the PRIMARY path: the user already runs Antigravity, so
|
|
76
|
+
# the CLI reuses that environment (their ~/.gemini, ADC and keyring) for
|
|
77
|
+
# free, while this row drives the Python `google-antigravity` SDK instead.
|
|
78
|
+
#
|
|
79
|
+
# DISABLED BY DEFAULT — turning the row on IS the switch
|
|
80
|
+
# (`plugin-presence IS the roster`): no env var, no config key. It runs as
|
|
81
|
+
# world key `agy-sdk` (roster label "Antigravity (SDK)", world home
|
|
82
|
+
# `agents/agy-sdk`), deliberately distinct from `agy` because the hub's
|
|
83
|
+
# registerAgent hard-throws on a duplicate key and this row ships beside
|
|
84
|
+
# the CLI row — the two can therefore both be enabled harmlessly.
|
|
85
|
+
#
|
|
86
|
+
# No Python is installed at `dsh plugin add` time and this package declares
|
|
87
|
+
# no SDK dependency: the durable venv is fetched into that world home on
|
|
88
|
+
# first real use (agent-agy-sdk/src/sdk-venv.ts).
|
|
89
|
+
- id: agent-agy-sdk
|
|
90
|
+
name: 'super-dsh/agents/agy-sdk'
|
|
91
|
+
disabled: true
|
|
92
|
+
# Opt-IN SDK transport for OMP (2026-10-03 user ruling). `agent-omp` is the
|
|
93
|
+
# PRIMARY path: it drives the operator's own `omp` binary, so the plugin
|
|
94
|
+
# ships no runtime at all. This row drives the SAME agent through the
|
|
95
|
+
# package's in-process SDK face instead — one bun sidecar hosting every
|
|
96
|
+
# session (shared authStorage/modelRegistry), which is the cheaper memory
|
|
97
|
+
# shape for many concurrent sessions, at the cost of fetching a ~900 MB
|
|
98
|
+
# runtime tree.
|
|
99
|
+
#
|
|
100
|
+
# DISABLED BY DEFAULT — turning the row on IS the switch
|
|
101
|
+
# (`plugin-presence IS the roster`): no env var, no config key. It runs as
|
|
102
|
+
# world key `omp-sdk` (roster label "OMP (SDK)", world home
|
|
103
|
+
# `agents/omp-sdk`), deliberately distinct from `omp` because the hub's
|
|
104
|
+
# registerAgent hard-throws on a duplicate key and this row ships beside
|
|
105
|
+
# the RPC row — the two can therefore both be enabled harmlessly.
|
|
106
|
+
#
|
|
107
|
+
# Nothing is installed at `dsh plugin add` time and this package declares no
|
|
108
|
+
# dependency: the durable bun runtime + `@oh-my-pi/pi-coding-agent` tree is
|
|
109
|
+
# fetched into that world home on first real use
|
|
110
|
+
# (agent-omp-sdk/src/sdk-runtime.ts).
|
|
111
|
+
- id: agent-omp-sdk
|
|
112
|
+
name: 'super-dsh/agents/omp-sdk'
|
|
113
|
+
disabled: true
|
|
114
|
+
# PRESERVED SDK line for Codex (2026-10-04 user ruling). `agent-codex` is the
|
|
115
|
+
# PRIMARY path — it drives a `codex app-server` child process, so the plugin
|
|
116
|
+
# bundles no SDK: the CLI the operator already has is the runtime. This row
|
|
117
|
+
# drives the SAME agent through the older in-process `@openai/codex-sdk` face
|
|
118
|
+
# instead, kept because the code was already written and it is a real option
|
|
119
|
+
# (no child process per session, and it works with no `codex` binary on PATH
|
|
120
|
+
# once its runtime is fetched).
|
|
121
|
+
#
|
|
122
|
+
# DISABLED BY DEFAULT — turning the row on IS the switch (`plugin-presence IS
|
|
123
|
+
# the roster`): no env var, no config key. It runs as world key `codex-sdk`
|
|
124
|
+
# (roster label "Codex (SDK)", world home `agents/codex-sdk`), deliberately
|
|
125
|
+
# distinct from `codex` because the hub's registerAgent hard-throws on a
|
|
126
|
+
# duplicate key and this row ships beside the app-server row — the two can
|
|
127
|
+
# therefore both be enabled harmlessly.
|
|
128
|
+
#
|
|
129
|
+
# Nothing is installed at `dsh plugin add` time and this package declares NO
|
|
130
|
+
# dependency — not a dependency, not an optionalDependency, not a peer: the
|
|
131
|
+
# SDK tree (`@openai/codex-sdk` + the codex binary package, pinned together)
|
|
132
|
+
# is fetched into that world home on the first real prompt and is durable
|
|
133
|
+
# there (agent-codex-sdk/src/sdk-runtime.ts; pre-warm with
|
|
134
|
+
# `npm run fetch-sdk-runtime`). Zero-spawn, zero-download window before it.
|
|
135
|
+
- id: agent-codex-sdk
|
|
136
|
+
name: 'super-dsh/agents/codex-sdk'
|
|
137
|
+
disabled: true
|
|
74
138
|
# R2 (2026-09-16): the claude adapter ships STANDALONE only — its /world
|
|
75
139
|
# entry is inert. The HUB side joins it: one generic joiner row with the
|
|
76
140
|
# key; spawn/roster/mount wiring lives in super-dsh/join.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-dsh",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Super D for the DeepSeek Harness (DSH)
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"description": "Super D for the DeepSeek Harness (DSH) \u2014 one dsh plugin that mounts the superd hub (runtime selector, roster, per-runtime agents) and joins local foreign-agent runtimes (OMP, Codex, Claude, Pi, Hermes, Antigravity) into the DSH Web UI. Each runtime keeps its native home and session store; the hub only bridges.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"./agents/pi": "./agent-pi/dist/world-plugin.js",
|
|
19
19
|
"./agents/hermes": "./agent-hermes/dist/world-plugin.js",
|
|
20
20
|
"./agents/agy": "./agent-agy/dist/world-plugin.js",
|
|
21
|
+
"./agents/agy-sdk": "./agent-agy-sdk/dist/world-plugin.js",
|
|
22
|
+
"./agents/omp-sdk": "./agent-omp-sdk/dist/world-plugin.js",
|
|
23
|
+
"./agents/codex-sdk": "./agent-codex-sdk/dist/world-plugin.js",
|
|
21
24
|
"./client": "./client/index.js",
|
|
22
25
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
23
26
|
"./package.json": "./package.json",
|
|
@@ -36,10 +39,17 @@
|
|
|
36
39
|
"agent-omp/dist",
|
|
37
40
|
"agent-omp/package.json",
|
|
38
41
|
"agent-omp/cordis.patch.yml",
|
|
39
|
-
"agent-omp/
|
|
42
|
+
"agent-omp-sdk/dist",
|
|
43
|
+
"agent-omp-sdk/sidecar",
|
|
44
|
+
"agent-omp-sdk/package.json",
|
|
45
|
+
"agent-omp-sdk/cordis.patch.yml",
|
|
40
46
|
"agent-codex/dist",
|
|
41
47
|
"agent-codex/package.json",
|
|
42
48
|
"agent-codex/cordis.patch.yml",
|
|
49
|
+
"agent-codex-sdk/dist",
|
|
50
|
+
"agent-codex-sdk/scripts",
|
|
51
|
+
"agent-codex-sdk/package.json",
|
|
52
|
+
"agent-codex-sdk/cordis.patch.yml",
|
|
43
53
|
"agent-claude/dist",
|
|
44
54
|
"agent-claude/package.json",
|
|
45
55
|
"agent-claude/cordis.patch.yml",
|
|
@@ -52,7 +62,10 @@
|
|
|
52
62
|
"agent-agy/dist",
|
|
53
63
|
"agent-agy/package.json",
|
|
54
64
|
"agent-agy/cordis.patch.yml",
|
|
55
|
-
"agent-agy/
|
|
65
|
+
"agent-agy-sdk/dist",
|
|
66
|
+
"agent-agy-sdk/package.json",
|
|
67
|
+
"agent-agy-sdk/cordis.patch.yml",
|
|
68
|
+
"agent-agy-sdk/bridge"
|
|
56
69
|
],
|
|
57
70
|
"dsh": {
|
|
58
71
|
"bundle": {
|
|
@@ -68,10 +81,7 @@
|
|
|
68
81
|
"dependencies": {
|
|
69
82
|
"@anthropic-ai/claude-agent-sdk": "0.3.263",
|
|
70
83
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
71
|
-
"@oh-my-pi/pi-coding-agent": "^18.1.14",
|
|
72
84
|
"@openai/codex": "0.154.0",
|
|
73
|
-
"@openai/codex-sdk": "0.154.0",
|
|
74
|
-
"bun": "^1.4.2",
|
|
75
85
|
"ws": "^8.21.0",
|
|
76
86
|
"zod": "4.4.3",
|
|
77
87
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime settings panels for the Hub's Agent Runtimes rows (P3, 2026-10-02
|
|
3
|
+
* user ruling).
|
|
4
|
+
*
|
|
5
|
+
* Interaction contract the UI follows (ruling, verbatim intent):
|
|
6
|
+
* - clicking the ROW BODY expands that runtime's OWN settings inline
|
|
7
|
+
* (accordion: at most one row open at a time);
|
|
8
|
+
* - the row's existing right-hand `switch` affordance is the ONLY switch —
|
|
9
|
+
* the panel never carries a second one.
|
|
10
|
+
*
|
|
11
|
+
* Config belongs to the adapter (agent-adapter-dev-rules §12), so this module
|
|
12
|
+
* owns only the presentation-side logic: which runtimes have a panel, the
|
|
13
|
+
* accordion transition, and a defensive parse of whatever the adapter's
|
|
14
|
+
* `*Auth/get` RPC returns. The adapter decides which auth methods exist, which
|
|
15
|
+
* are available on this machine, and which one is in force.
|
|
16
|
+
*
|
|
17
|
+
* Node-safe by construction (no DOM, no React, no fetch) — the host tsconfig
|
|
18
|
+
* dual-emits this file to `dist/client/agent-settings.js` so
|
|
19
|
+
* test/client-agent-settings.test.mjs can pin the parse and accordion rules
|
|
20
|
+
* under `node --test` (the roster.ts / mesh-api.ts precedent).
|
|
21
|
+
*
|
|
22
|
+
* @module superd-hub/client/agent-settings
|
|
23
|
+
*/
|
|
24
|
+
/** One selectable auth method as the adapter describes it. */
|
|
25
|
+
export interface AuthMethodOption {
|
|
26
|
+
/** Stable id the RPC round-trips (`apiKey` | `oauth` | `adc`). */
|
|
27
|
+
readonly key: string;
|
|
28
|
+
/** Human label rendered on the option. */
|
|
29
|
+
readonly label: string;
|
|
30
|
+
/** Detected on THIS machine. Drives the availability annotation. */
|
|
31
|
+
readonly available: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Rendered but not selectable this round (the OAuth placeholder): the UI
|
|
34
|
+
* shows the shape and says why it is inert, instead of hiding it.
|
|
35
|
+
*/
|
|
36
|
+
readonly placeholder: boolean;
|
|
37
|
+
/** One short line explaining the option (or why it is inert). */
|
|
38
|
+
readonly hint: string;
|
|
39
|
+
}
|
|
40
|
+
/** The adapter's answer to `<runtime>Auth/get`. */
|
|
41
|
+
export interface RuntimeAuthView {
|
|
42
|
+
readonly methods: readonly AuthMethodOption[];
|
|
43
|
+
/** The user's explicit persisted choice; `null` when they have not made one. */
|
|
44
|
+
readonly selected: string | null;
|
|
45
|
+
/** What a new session would ACTUALLY use right now (ladder fallback applied). */
|
|
46
|
+
readonly effective: string | null;
|
|
47
|
+
/** Native file the adapter maintains for this runtime, when it owns one. */
|
|
48
|
+
readonly settingsPath?: string;
|
|
49
|
+
/** Free-form note from the adapter (e.g. why a mode is unavailable). */
|
|
50
|
+
readonly note?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A runtime's settings panel: which adapter Remote answers for it.
|
|
54
|
+
*
|
|
55
|
+
* The namespace is the adapter's own service key — the hub forwards
|
|
56
|
+
* `envelope.method` verbatim, so the client needs only the name. A runtime absent
|
|
57
|
+
* from this table has no panel yet: its row still expands, to an explicit empty
|
|
58
|
+
* state rather than a dead control (the interaction stays uniform, and a runtime
|
|
59
|
+
* with nothing to configure SAYS so).
|
|
60
|
+
*/
|
|
61
|
+
export interface SettingsPanelSpec {
|
|
62
|
+
/** The adapter's Remote namespace (`agyAuth`). */
|
|
63
|
+
readonly namespace: string;
|
|
64
|
+
/**
|
|
65
|
+
* Which body the expanded row mounts. A runtime's config is not always a
|
|
66
|
+
* choice among a fixed set: Antigravity picks one sign-in form from a ladder,
|
|
67
|
+
* while Codex carries a LIST of providers the user adds, edits and removes
|
|
68
|
+
* (2026-10-03 ruling; the former active/select toggle is gone — which provider
|
|
69
|
+
* a Codex session runs on is DSH's own per-session model selection, not a
|
|
70
|
+
* hub-side switch). One namespace, two shapes — the kind discriminates.
|
|
71
|
+
*/
|
|
72
|
+
readonly kind: 'auth' | 'providers';
|
|
73
|
+
}
|
|
74
|
+
/** The panel spec for a runtime, or `undefined` when it has none yet. */
|
|
75
|
+
export declare function settingsPanelFor(agentKey: string): SettingsPanelSpec | undefined;
|
|
76
|
+
/** Whether this runtime's row body expands into a real settings panel. */
|
|
77
|
+
export declare function hasSettingsPanel(agentKey: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Accordion transition: at most one row open. Clicking the open row closes it;
|
|
80
|
+
* clicking another moves the panel there in one click.
|
|
81
|
+
*/
|
|
82
|
+
export declare function toggleExpanded(current: string | null, key: string): string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Defensive parse of the RPC answer. Returns `undefined` for anything that is
|
|
85
|
+
* not a usable view (no methods, wrong shape, adapter absent) so the panel can
|
|
86
|
+
* render an explicit failure instead of an empty list that looks like success.
|
|
87
|
+
*/
|
|
88
|
+
export declare function parseAuthView(raw: unknown): RuntimeAuthView | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* The option the panel marks as in force: the effective one when the adapter
|
|
91
|
+
* named it, else the explicit selection. `undefined` when neither is known —
|
|
92
|
+
* the panel then marks nothing rather than guessing.
|
|
93
|
+
*/
|
|
94
|
+
export declare function activeMethod(view: RuntimeAuthView): AuthMethodOption | undefined;
|
|
95
|
+
/** Whether an option may be picked (placeholders are rendered, never selected). */
|
|
96
|
+
export declare function selectable(option: AuthMethodOption): boolean;
|
|
97
|
+
/** One model behind a provider, as the panel lists it. */
|
|
98
|
+
export interface ProviderModelOption {
|
|
99
|
+
readonly id: string;
|
|
100
|
+
/** Human label; the adapter sends one, else the id stands in. */
|
|
101
|
+
readonly label: string;
|
|
102
|
+
readonly contextWindow?: number;
|
|
103
|
+
}
|
|
104
|
+
/** One configured provider, listed but never carrying its key. */
|
|
105
|
+
export interface ProviderOption {
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly label: string;
|
|
108
|
+
readonly baseUrl: string;
|
|
109
|
+
readonly protocol: string;
|
|
110
|
+
readonly models: readonly ProviderModelOption[];
|
|
111
|
+
readonly authKind: 'apiKey' | 'env';
|
|
112
|
+
/** The variable an env-shaped provider expects. */
|
|
113
|
+
readonly envName?: string;
|
|
114
|
+
/** Whether a key is available — the ONLY thing the wire says about it. */
|
|
115
|
+
readonly hasKey: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** One wire protocol the adapter offers, and whether it may be picked. */
|
|
118
|
+
export interface ProviderProtocolOption {
|
|
119
|
+
readonly value: string;
|
|
120
|
+
readonly label: string;
|
|
121
|
+
readonly available: boolean;
|
|
122
|
+
readonly hint: string;
|
|
123
|
+
}
|
|
124
|
+
/** The files this surface reads and writes, shown so where an edit lands is never a surprise. */
|
|
125
|
+
export interface ProviderPaths {
|
|
126
|
+
readonly store: string;
|
|
127
|
+
readonly config: string;
|
|
128
|
+
readonly auth: string;
|
|
129
|
+
readonly catalogs: string;
|
|
130
|
+
}
|
|
131
|
+
/** The adapter's answer to `codexProviders/get` (and to every mutation). */
|
|
132
|
+
export interface RuntimeProvidersView {
|
|
133
|
+
readonly providers: readonly ProviderOption[];
|
|
134
|
+
/**
|
|
135
|
+
* What the user's OWN ~/.codex/config.toml currently names. Informational
|
|
136
|
+
* only — there is no action attached to it, and DSH's per-session model
|
|
137
|
+
* selection (not this list) decides what a session runs.
|
|
138
|
+
*/
|
|
139
|
+
readonly native: {
|
|
140
|
+
readonly providerId?: string;
|
|
141
|
+
readonly model?: string;
|
|
142
|
+
} | null;
|
|
143
|
+
readonly protocols: readonly ProviderProtocolOption[];
|
|
144
|
+
readonly paths: ProviderPaths;
|
|
145
|
+
/** Epoch ms of the last reconcile against config.toml, when one has happened. */
|
|
146
|
+
readonly syncedAt?: number;
|
|
147
|
+
readonly note?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Defensive parse of the adapter's providers answer.
|
|
151
|
+
*
|
|
152
|
+
* `undefined` for anything that is not a usable view — but an empty `providers`
|
|
153
|
+
* array WITH a usable protocol list is valid (a fresh install), and so is a
|
|
154
|
+
* provider whose `models` array is empty.
|
|
155
|
+
*/
|
|
156
|
+
export declare function parseProvidersView(raw: unknown): RuntimeProvidersView | undefined;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime settings panels for the Hub's Agent Runtimes rows (P3, 2026-10-02
|
|
3
|
+
* user ruling).
|
|
4
|
+
*
|
|
5
|
+
* Interaction contract the UI follows (ruling, verbatim intent):
|
|
6
|
+
* - clicking the ROW BODY expands that runtime's OWN settings inline
|
|
7
|
+
* (accordion: at most one row open at a time);
|
|
8
|
+
* - the row's existing right-hand `switch` affordance is the ONLY switch —
|
|
9
|
+
* the panel never carries a second one.
|
|
10
|
+
*
|
|
11
|
+
* Config belongs to the adapter (agent-adapter-dev-rules §12), so this module
|
|
12
|
+
* owns only the presentation-side logic: which runtimes have a panel, the
|
|
13
|
+
* accordion transition, and a defensive parse of whatever the adapter's
|
|
14
|
+
* `*Auth/get` RPC returns. The adapter decides which auth methods exist, which
|
|
15
|
+
* are available on this machine, and which one is in force.
|
|
16
|
+
*
|
|
17
|
+
* Node-safe by construction (no DOM, no React, no fetch) — the host tsconfig
|
|
18
|
+
* dual-emits this file to `dist/client/agent-settings.js` so
|
|
19
|
+
* test/client-agent-settings.test.mjs can pin the parse and accordion rules
|
|
20
|
+
* under `node --test` (the roster.ts / mesh-api.ts precedent).
|
|
21
|
+
*
|
|
22
|
+
* @module superd-hub/client/agent-settings
|
|
23
|
+
*/
|
|
24
|
+
const SETTINGS_PANELS = {
|
|
25
|
+
// The one runtime with a settings surface this round: the CLI adapter owns the
|
|
26
|
+
// auth ladder and is the configuration surface for the user's local Antigravity.
|
|
27
|
+
agy: { namespace: 'agyAuth', kind: 'auth' },
|
|
28
|
+
// Codex's own config.toml names exactly one `model_provider`, but that file
|
|
29
|
+
// is the USER's and no longer the hub's toggle: Super D hosts the list
|
|
30
|
+
// cc-switch otherwise holds (add / edit / remove) and the adapter owns both
|
|
31
|
+
// the list and whatever it does with the native file.
|
|
32
|
+
codex: { namespace: 'codexProviders', kind: 'providers' },
|
|
33
|
+
// Both Codex lines host the SAME provider list (2026-10-04): the SDK half is
|
|
34
|
+
// the same agent through a different transport, so it carries the same panel
|
|
35
|
+
// and the same Remote namespace. The two worlds keep separate stores under
|
|
36
|
+
// their own `agents/<key>/`, so neither sees the other's list.
|
|
37
|
+
'codex-sdk': { namespace: 'codexProviders', kind: 'providers' },
|
|
38
|
+
};
|
|
39
|
+
/** The panel spec for a runtime, or `undefined` when it has none yet. */
|
|
40
|
+
export function settingsPanelFor(agentKey) {
|
|
41
|
+
return SETTINGS_PANELS[agentKey];
|
|
42
|
+
}
|
|
43
|
+
/** Whether this runtime's row body expands into a real settings panel. */
|
|
44
|
+
export function hasSettingsPanel(agentKey) {
|
|
45
|
+
return settingsPanelFor(agentKey) !== undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Accordion transition: at most one row open. Clicking the open row closes it;
|
|
49
|
+
* clicking another moves the panel there in one click.
|
|
50
|
+
*/
|
|
51
|
+
export function toggleExpanded(current, key) {
|
|
52
|
+
return current === key ? null : key;
|
|
53
|
+
}
|
|
54
|
+
function str(value) {
|
|
55
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
56
|
+
}
|
|
57
|
+
function methodOption(raw) {
|
|
58
|
+
if (typeof raw !== 'object' || raw === null)
|
|
59
|
+
return undefined;
|
|
60
|
+
const record = raw;
|
|
61
|
+
const key = str(record.key);
|
|
62
|
+
const label = str(record.label);
|
|
63
|
+
if (key === undefined || label === undefined)
|
|
64
|
+
return undefined;
|
|
65
|
+
return {
|
|
66
|
+
key,
|
|
67
|
+
label,
|
|
68
|
+
// Absent flags read as the conservative value: an older adapter that omits
|
|
69
|
+
// `available` must not render an option as usable when we cannot tell.
|
|
70
|
+
available: record.available === true,
|
|
71
|
+
placeholder: record.placeholder === true,
|
|
72
|
+
hint: str(record.hint) ?? '',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Defensive parse of the RPC answer. Returns `undefined` for anything that is
|
|
77
|
+
* not a usable view (no methods, wrong shape, adapter absent) so the panel can
|
|
78
|
+
* render an explicit failure instead of an empty list that looks like success.
|
|
79
|
+
*/
|
|
80
|
+
export function parseAuthView(raw) {
|
|
81
|
+
if (typeof raw !== 'object' || raw === null)
|
|
82
|
+
return undefined;
|
|
83
|
+
const record = raw;
|
|
84
|
+
if (!Array.isArray(record.methods))
|
|
85
|
+
return undefined;
|
|
86
|
+
const methods = record.methods.map(methodOption).filter((m) => m !== undefined);
|
|
87
|
+
if (methods.length === 0)
|
|
88
|
+
return undefined;
|
|
89
|
+
const settingsPath = str(record.settingsPath);
|
|
90
|
+
const note = str(record.note);
|
|
91
|
+
return {
|
|
92
|
+
methods,
|
|
93
|
+
selected: str(record.selected) ?? null,
|
|
94
|
+
effective: str(record.effective) ?? null,
|
|
95
|
+
...(settingsPath === undefined ? {} : { settingsPath }),
|
|
96
|
+
...(note === undefined ? {} : { note }),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The option the panel marks as in force: the effective one when the adapter
|
|
101
|
+
* named it, else the explicit selection. `undefined` when neither is known —
|
|
102
|
+
* the panel then marks nothing rather than guessing.
|
|
103
|
+
*/
|
|
104
|
+
export function activeMethod(view) {
|
|
105
|
+
const wanted = view.effective ?? view.selected;
|
|
106
|
+
if (wanted === null)
|
|
107
|
+
return undefined;
|
|
108
|
+
return view.methods.find((method) => method.key === wanted);
|
|
109
|
+
}
|
|
110
|
+
/** Whether an option may be picked (placeholders are rendered, never selected). */
|
|
111
|
+
export function selectable(option) {
|
|
112
|
+
return !option.placeholder;
|
|
113
|
+
}
|
|
114
|
+
function nonEmpty(value) {
|
|
115
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
116
|
+
}
|
|
117
|
+
function modelOption(raw) {
|
|
118
|
+
if (typeof raw !== 'object' || raw === null)
|
|
119
|
+
return undefined;
|
|
120
|
+
const record = raw;
|
|
121
|
+
const id = nonEmpty(record.id);
|
|
122
|
+
if (id === undefined)
|
|
123
|
+
return undefined;
|
|
124
|
+
const contextWindow = record.contextWindow;
|
|
125
|
+
return {
|
|
126
|
+
id,
|
|
127
|
+
label: nonEmpty(record.displayName) ?? id,
|
|
128
|
+
...(typeof contextWindow === 'number' && Number.isSafeInteger(contextWindow) && contextWindow > 0
|
|
129
|
+
? { contextWindow }
|
|
130
|
+
: {}),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function providerOption(raw) {
|
|
134
|
+
if (typeof raw !== 'object' || raw === null)
|
|
135
|
+
return undefined;
|
|
136
|
+
const record = raw;
|
|
137
|
+
const id = nonEmpty(record.id);
|
|
138
|
+
const label = nonEmpty(record.label);
|
|
139
|
+
const baseUrl = nonEmpty(record.baseUrl);
|
|
140
|
+
if (id === undefined || label === undefined || baseUrl === undefined)
|
|
141
|
+
return undefined;
|
|
142
|
+
const models = Array.isArray(record.models)
|
|
143
|
+
? record.models.map(modelOption).filter((entry) => entry !== undefined)
|
|
144
|
+
: [];
|
|
145
|
+
const envName = nonEmpty(record.envName);
|
|
146
|
+
return {
|
|
147
|
+
id,
|
|
148
|
+
label,
|
|
149
|
+
baseUrl,
|
|
150
|
+
// An unknown protocol is never echoed into a control; the only value this
|
|
151
|
+
// harness can actually run is the safe default.
|
|
152
|
+
protocol: record.protocol === 'chat' ? 'chat' : 'responses',
|
|
153
|
+
models,
|
|
154
|
+
authKind: record.authKind === 'env' ? 'env' : 'apiKey',
|
|
155
|
+
...(envName === undefined ? {} : { envName }),
|
|
156
|
+
hasKey: record.hasKey === true,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function protocolOption(raw) {
|
|
160
|
+
if (typeof raw !== 'object' || raw === null)
|
|
161
|
+
return undefined;
|
|
162
|
+
const record = raw;
|
|
163
|
+
const value = nonEmpty(record.value);
|
|
164
|
+
const label = nonEmpty(record.label);
|
|
165
|
+
if (value === undefined || label === undefined)
|
|
166
|
+
return undefined;
|
|
167
|
+
return { value, label, available: record.available === true, hint: nonEmpty(record.hint) ?? '' };
|
|
168
|
+
}
|
|
169
|
+
function providerPaths(raw) {
|
|
170
|
+
if (typeof raw !== 'object' || raw === null)
|
|
171
|
+
return undefined;
|
|
172
|
+
const record = raw;
|
|
173
|
+
const store = nonEmpty(record.store);
|
|
174
|
+
const config = nonEmpty(record.config);
|
|
175
|
+
const auth = nonEmpty(record.auth);
|
|
176
|
+
const catalogs = nonEmpty(record.catalogs);
|
|
177
|
+
if (store === undefined || config === undefined || auth === undefined || catalogs === undefined)
|
|
178
|
+
return undefined;
|
|
179
|
+
return { store, config, auth, catalogs };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Defensive parse of the adapter's providers answer.
|
|
183
|
+
*
|
|
184
|
+
* `undefined` for anything that is not a usable view — but an empty `providers`
|
|
185
|
+
* array WITH a usable protocol list is valid (a fresh install), and so is a
|
|
186
|
+
* provider whose `models` array is empty.
|
|
187
|
+
*/
|
|
188
|
+
export function parseProvidersView(raw) {
|
|
189
|
+
if (typeof raw !== 'object' || raw === null)
|
|
190
|
+
return undefined;
|
|
191
|
+
const record = raw;
|
|
192
|
+
if (!Array.isArray(record.providers))
|
|
193
|
+
return undefined;
|
|
194
|
+
if (!Array.isArray(record.protocols))
|
|
195
|
+
return undefined;
|
|
196
|
+
const protocols = record.protocols.map(protocolOption).filter((entry) => entry !== undefined);
|
|
197
|
+
if (protocols.length === 0)
|
|
198
|
+
return undefined;
|
|
199
|
+
const paths = providerPaths(record.paths);
|
|
200
|
+
if (paths === undefined)
|
|
201
|
+
return undefined;
|
|
202
|
+
const providers = record.providers.map(providerOption).filter((entry) => entry !== undefined);
|
|
203
|
+
const syncedAt = record.syncedAt;
|
|
204
|
+
const note = nonEmpty(record.note);
|
|
205
|
+
return {
|
|
206
|
+
providers,
|
|
207
|
+
native: nativeConfig(record.native),
|
|
208
|
+
protocols,
|
|
209
|
+
paths,
|
|
210
|
+
...(typeof syncedAt === 'number' && Number.isFinite(syncedAt) ? { syncedAt } : {}),
|
|
211
|
+
...(note === undefined ? {} : { note }),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* The user's own config.toml as the adapter last read it. `null` when the
|
|
216
|
+
* adapter said nothing; otherwise an object carrying whichever halves were
|
|
217
|
+
* named (an empty one is still news — the panel says the file names nothing).
|
|
218
|
+
*/
|
|
219
|
+
function nativeConfig(raw) {
|
|
220
|
+
if (typeof raw !== 'object' || raw === null)
|
|
221
|
+
return null;
|
|
222
|
+
const record = raw;
|
|
223
|
+
const providerId = nonEmpty(record.providerId);
|
|
224
|
+
const model = nonEmpty(record.model);
|
|
225
|
+
return {
|
|
226
|
+
...(providerId === undefined ? {} : { providerId }),
|
|
227
|
+
...(model === undefined ? {} : { model }),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
@@ -25,6 +25,12 @@ const FALLBACK_LABELS = {
|
|
|
25
25
|
pi: 'Pi',
|
|
26
26
|
hermes: 'Hermes',
|
|
27
27
|
agy: 'Antigravity',
|
|
28
|
+
// The opt-in SDK halves carry their own keys so a host that reports only keys
|
|
29
|
+
// still renders a distinguishable label (the composite rows are `disabled: true`
|
|
30
|
+
// by default, so these appear only once an operator turns one on).
|
|
31
|
+
'omp-sdk': 'OMP (SDK)',
|
|
32
|
+
'agy-sdk': 'Antigravity (SDK)',
|
|
33
|
+
'codex-sdk': 'Codex (SDK)',
|
|
28
34
|
};
|
|
29
35
|
/** Coerce a wire `agents` array into links; undefined when unusable/empty. */
|
|
30
36
|
function coerceAgents(raw) {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* runtime-settings-api.ts — the browser half of a runtime's settings panel.
|
|
3
|
+
*
|
|
4
|
+
* The panel's config belongs to the ADAPTER, so nothing here knows what an auth
|
|
5
|
+
* method is: it posts a `client-request` envelope at the runtime's own world and
|
|
6
|
+
* hands the adapter's answer to `parseAuthView` (agent-settings.ts).
|
|
7
|
+
*
|
|
8
|
+
* POST /hub/api?agent=agy
|
|
9
|
+
* { type:'client-request', rpcId, method:'agyAuth/get'|'agyAuth/set',
|
|
10
|
+
* payload:{ args: {} | { request: { mode } } } }
|
|
11
|
+
*
|
|
12
|
+
* `/hub/api` is the hub family's prefix mount (`hub-route.ts`), which forwards
|
|
13
|
+
* `method` verbatim to the addressed world's `typertGateway`. The path needs no
|
|
14
|
+
* `CONTROL` exemption in fusion-transport.ts: the rewrite only touches same-origin
|
|
15
|
+
* `/api/...` paths, and `/hub/...` is never one of them.
|
|
16
|
+
*
|
|
17
|
+
* Node-safe: no DOM reach at module scope and `fetch` is injectable, so
|
|
18
|
+
* test/client-runtime-settings.test.mjs pins the envelope and every failure
|
|
19
|
+
* branch under `node --test` (the mesh-api.ts precedent).
|
|
20
|
+
*
|
|
21
|
+
* @module superd-hub/client/runtime-settings-api
|
|
22
|
+
*/
|
|
23
|
+
import { type RuntimeAuthView, type RuntimeProvidersView } from './agent-settings.js';
|
|
24
|
+
/** Structural slice of `fetch` — the bundle uses the global, tests inject a stub. */
|
|
25
|
+
export type FetchLike = (input: string, init: RequestInit) => Promise<{
|
|
26
|
+
ok: boolean;
|
|
27
|
+
status: number;
|
|
28
|
+
text(): Promise<string>;
|
|
29
|
+
}>;
|
|
30
|
+
/** One rpcId for request/response correlation. `randomUUID` needs a secure context. */
|
|
31
|
+
export declare function mintRpcId(): string;
|
|
32
|
+
/** The wire body of one unary call. */
|
|
33
|
+
export interface ClientRequestEnvelope {
|
|
34
|
+
type: 'client-request';
|
|
35
|
+
rpcId: string;
|
|
36
|
+
method: string;
|
|
37
|
+
payload: {
|
|
38
|
+
args: Record<string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Build the envelope for one panel call (exported so tests pin the exact wire shape). */
|
|
42
|
+
/** The operation names the adapter Remotes accept (auth ladder + providers). */
|
|
43
|
+
export type RuntimeSettingsOp = 'get' | 'set' | 'save' | 'remove';
|
|
44
|
+
export declare function settingsEnvelope(namespace: string, op: RuntimeSettingsOp, args: Record<string, unknown>): ClientRequestEnvelope;
|
|
45
|
+
/** What a caller can do with a failed panel call — kept structural for the tests. */
|
|
46
|
+
declare function messageOf(error: unknown): string;
|
|
47
|
+
/**
|
|
48
|
+
* One unary call at a runtime's world, unwrapped to the RPC's value.
|
|
49
|
+
*
|
|
50
|
+
* Every failure mode is reported as a thrown `Error` carrying the adapter's own
|
|
51
|
+
* message where one exists: a transport failure, a malformed answer, and the
|
|
52
|
+
* gateway's business error (`{ok:false,error}`) must not look alike to the panel.
|
|
53
|
+
*
|
|
54
|
+
* @param agentKey - roster key addressing the world (`?agent=`).
|
|
55
|
+
* @param namespace - the adapter's Remote namespace (`agyAuth`).
|
|
56
|
+
* @param op - the Remote method.
|
|
57
|
+
* @param args - exact named wire arguments.
|
|
58
|
+
* @param doFetch - fetch implementation (tests inject).
|
|
59
|
+
* @returns the raw RPC value.
|
|
60
|
+
* @throws {Error} on transport, framing, or gateway failure.
|
|
61
|
+
*/
|
|
62
|
+
export declare function callRuntimeSettings(agentKey: string, namespace: string, op: RuntimeSettingsOp, args: Record<string, unknown>, doFetch?: FetchLike): Promise<unknown>;
|
|
63
|
+
/** Read one runtime's panel state, parsed. */
|
|
64
|
+
export declare function fetchAuthView(agentKey: string, namespace: string, doFetch?: FetchLike): Promise<RuntimeAuthView>;
|
|
65
|
+
/** Adopt one auth form (`null` clears the explicit choice). */
|
|
66
|
+
export declare function setAuthMode(agentKey: string, namespace: string, mode: string | null, doFetch?: FetchLike): Promise<RuntimeAuthView>;
|
|
67
|
+
/** Read the multi-provider state of one runtime. */
|
|
68
|
+
export declare function fetchProvidersView(agentKey: string, namespace: string, doFetch?: FetchLike): Promise<RuntimeProvidersView>;
|
|
69
|
+
/**
|
|
70
|
+
* Add or edit one provider in the adapter's list. Which provider a session runs
|
|
71
|
+
* on is DSH's own per-session model selection, so this touches no active half.
|
|
72
|
+
*/
|
|
73
|
+
export declare function saveProvider(agentKey: string, namespace: string, provider: unknown, doFetch?: FetchLike): Promise<RuntimeProvidersView>;
|
|
74
|
+
/** Drop one provider from the list. Does not rewrite the runtime's own config. */
|
|
75
|
+
export declare function removeProvider(agentKey: string, namespace: string, id: string, doFetch?: FetchLike): Promise<RuntimeProvidersView>;
|
|
76
|
+
export { messageOf as settingsErrorText };
|