super-dsh 0.3.2 → 0.3.3-c
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 +15 -14
- package/agent-agy/dist/agent.d.ts +4 -1
- package/agent-agy/dist/agent.js +15 -1
- package/agent-agy/dist/index.js +5 -8
- package/agent-agy/package.json +6 -6
- package/agent-agy-sdk/dist/agent.d.ts +4 -1
- package/agent-agy-sdk/dist/agent.js +15 -1
- package/agent-agy-sdk/dist/index.js +5 -8
- package/agent-agy-sdk/package.json +5 -5
- package/agent-claude/dist/agent.js +15 -1
- package/agent-claude/package.json +8 -8
- package/agent-codex/dist/agent.js +15 -1
- package/agent-codex/package.json +7 -7
- package/agent-codex-sdk/dist/agent.js +15 -1
- package/agent-codex-sdk/dist/index.js +5 -11
- package/agent-codex-sdk/package.json +7 -7
- package/agent-hermes/dist/agent.js +15 -1
- package/agent-hermes/dist/index.js +5 -8
- package/agent-hermes/package.json +7 -7
- package/agent-omp/dist/agent.js +26 -2
- package/agent-omp/package.json +8 -8
- package/agent-omp-sdk/dist/agent.d.ts +4 -1
- package/agent-omp-sdk/dist/agent.js +15 -1
- package/agent-omp-sdk/package.json +8 -8
- package/agent-pi/dist/agent.js +20 -2
- package/agent-pi/dist/index.js +5 -11
- package/agent-pi/package.json +7 -7
- package/client/index.js +106 -249
- package/cordis.patch.yml +0 -6
- package/package.json +22 -27
- package/remote/hub-pty-pump.mjs +97 -0
- package/remote/plugin.d.ts +476 -200
- package/remote/plugin.js +1448 -667
- package/remote/provenance.json +22 -17
- package/superd-hub/dist/agent-model-face.d.ts +93 -0
- package/superd-hub/dist/agent-model-face.js +113 -0
- package/superd-hub/dist/exec.d.ts +3 -2
- package/superd-hub/dist/exec.js +6 -5
- package/superd-hub/dist/fusion-transport.js +0 -1
- package/superd-hub/dist/hub-tool.d.ts +1 -1
- package/superd-hub/dist/hub-tool.js +6 -6
- package/superd-hub/dist/index.d.ts +1 -0
- package/superd-hub/dist/index.js +1 -0
- package/superd-hub/dist/remote-provider.js +70 -36
- package/superd-hub/dist/world-entry.js +30 -0
- package/superd-hub/lib/client/index.js +106 -249
- package/superd-hub/package.json +14 -10
- package/superd-hub/dist/bundle-setup.d.ts +0 -27
- package/superd-hub/dist/bundle-setup.js +0 -94
- package/superd-hub/dist/client/companion-api.d.ts +0 -5
- package/superd-hub/dist/client/companion-api.js +0 -30
- package/superd-hub/dist/companion-contract.d.ts +0 -9
- package/superd-hub/dist/companion-contract.js +0 -1
- package/superd-hub/dist/companions.d.ts +0 -30
- package/superd-hub/dist/companions.js +0 -211
- package/superd-hub/dist/exec-pty-channel.d.ts +0 -58
- package/superd-hub/dist/exec-pty-channel.js +0 -162
- package/superd-hub/dist/exec-pty-framing.d.ts +0 -34
- package/superd-hub/dist/exec-pty-framing.js +0 -89
- package/superd-hub/dist/exec-pty-session.d.ts +0 -78
- package/superd-hub/dist/exec-pty-session.js +0 -228
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* are synthesized around the OMP stream.
|
|
21
21
|
*/
|
|
22
22
|
import type { Context } from "@deepseek-ai/cordis";
|
|
23
|
-
import type { Agent, AgentOptions, AgentStatus, CancelOptions, InboxTarget } from "@deepseek-ai/dsh-agent";
|
|
23
|
+
import type { Agent, AgentOptions, AgentStatus, CancelOptions, InboxTarget, Model } from "@deepseek-ai/dsh-agent";
|
|
24
24
|
import { Inbox } from "./inbox.js";
|
|
25
25
|
import type { AgentCancelCause, Session, SessionId, UserMessage } from "@deepseek-ai/dsh-session";
|
|
26
26
|
import type { ContentBlock, TokenUsage } from "@deepseek-ai/dsh-llm";
|
|
@@ -61,6 +61,9 @@ export declare class OmpAgent implements Agent {
|
|
|
61
61
|
readonly session: WithSystemHead<Session>;
|
|
62
62
|
readonly inbox: Inbox;
|
|
63
63
|
readonly ctx: Context;
|
|
64
|
+
/** Durable model selection (0.2.2 Agent face): the shared hub face over
|
|
65
|
+
* `model/selection` events — see superd-hub agent-model-face.ts. */
|
|
66
|
+
readonly model: Model;
|
|
64
67
|
constructor(loopCtx: Context, id: SessionId, options: AgentOptions, session: Session, rpc: OmpAgentRpc, onIdleExit?: () => void);
|
|
65
68
|
get status(): AgentStatus;
|
|
66
69
|
send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;
|
|
@@ -4,7 +4,7 @@ import { LlmAttemptId, ToolCallId, QUOTA_EXCEEDED_CODE, createAssistantMessage,
|
|
|
4
4
|
import { createScope } from "@deepseek-ai/dsh-scope";
|
|
5
5
|
import { ompPermissionCommand } from "./permission.js";
|
|
6
6
|
import { getBridgeStore } from "./store/index.js";
|
|
7
|
-
import { withSystemHead } from "../../superd-hub/dist/index.js";
|
|
7
|
+
import { createAgentModelFace, withSystemHead } from "../../superd-hub/dist/index.js";
|
|
8
8
|
/**
|
|
9
9
|
* v2 live assistant-stream publication for the OMP bridge — the same frame
|
|
10
10
|
* protocol the reference loop's AssistantStreamAttempt speaks (start marker,
|
|
@@ -254,6 +254,9 @@ export class OmpAgent {
|
|
|
254
254
|
session;
|
|
255
255
|
inbox;
|
|
256
256
|
ctx;
|
|
257
|
+
/** Durable model selection (0.2.2 Agent face): the shared hub face over
|
|
258
|
+
* `model/selection` events — see superd-hub agent-model-face.ts. */
|
|
259
|
+
model;
|
|
257
260
|
#rpc;
|
|
258
261
|
#loopCtx;
|
|
259
262
|
#scope;
|
|
@@ -304,6 +307,17 @@ export class OmpAgent {
|
|
|
304
307
|
this.id = id;
|
|
305
308
|
this.options = options;
|
|
306
309
|
this.session = withSystemHead(session, () => createSystemMessage(""));
|
|
310
|
+
this.model = createAgentModelFace({
|
|
311
|
+
session: this.session,
|
|
312
|
+
options: this.options,
|
|
313
|
+
appendSelection: (selection) => {
|
|
314
|
+
this.session.append("model/selection", selection);
|
|
315
|
+
},
|
|
316
|
+
readDefault: () => {
|
|
317
|
+
const service = this.ctx.get("agentDefaultModel");
|
|
318
|
+
return service?.currentSelection?.();
|
|
319
|
+
},
|
|
320
|
+
});
|
|
307
321
|
this.#rpc = rpc;
|
|
308
322
|
this.#onIdleExit = onIdleExit;
|
|
309
323
|
this.#dispatch = agentEvents(loopCtx, this);
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
29
|
-
"@deepseek-ai/dsh-agent": ">=0.
|
|
30
|
-
"@deepseek-ai/dsh-agent-presets": ">=0.
|
|
31
|
-
"@deepseek-ai/dsh-llm": ">=0.
|
|
32
|
-
"@deepseek-ai/dsh-scope": ">=0.
|
|
33
|
-
"@deepseek-ai/dsh-session": ">=0.
|
|
34
|
-
"@deepseek-ai/dsh-session-persistence": ">=0.
|
|
35
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.
|
|
36
|
-
"@deepseek-ai/dsh-home-paths": ">=0.
|
|
29
|
+
"@deepseek-ai/dsh-agent": ">=0.2.0-0 <1.0.0-0",
|
|
30
|
+
"@deepseek-ai/dsh-agent-presets": ">=0.2.0-0 <1.0.0-0",
|
|
31
|
+
"@deepseek-ai/dsh-llm": ">=0.2.0-0 <1.0.0-0",
|
|
32
|
+
"@deepseek-ai/dsh-scope": ">=0.2.0-0 <1.0.0-0",
|
|
33
|
+
"@deepseek-ai/dsh-session": ">=0.2.0-0 <1.0.0-0",
|
|
34
|
+
"@deepseek-ai/dsh-session-persistence": ">=0.2.0-0 <1.0.0-0",
|
|
35
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.2.0-0 <1.0.0-0",
|
|
36
|
+
"@deepseek-ai/dsh-home-paths": ">=0.2.0-0 <1.0.0-0",
|
|
37
37
|
"@pgmi-builds/superd-hub": "*"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
package/agent-pi/dist/agent.js
CHANGED
|
@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import { agentEvents } from "@deepseek-ai/dsh-agent";
|
|
4
4
|
import { Inbox } from "./inbox.js";
|
|
5
5
|
import { LlmAttemptId, ToolCallId, QUOTA_EXCEEDED_CODE, createAssistantMessage, createSystemMessage, createToolResultMessage, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
6
|
-
import { withSystemHead } from "../../superd-hub/dist/index.js";
|
|
6
|
+
import { createAgentModelFace, recordedModelSelection, withSystemHead } from "../../superd-hub/dist/index.js";
|
|
7
7
|
import { createScope } from "@deepseek-ai/dsh-scope";
|
|
8
8
|
import { PI_IDLE_EXIT_MS } from "./knobs.js";
|
|
9
9
|
import { trace } from "./knobs.js";
|
|
@@ -176,6 +176,9 @@ export class PiAgent {
|
|
|
176
176
|
session;
|
|
177
177
|
inbox;
|
|
178
178
|
ctx;
|
|
179
|
+
/** Durable model selection (0.2.2 Agent face): the shared hub face over
|
|
180
|
+
* `model/selection` events — see superd-hub agent-model-face.ts. */
|
|
181
|
+
model;
|
|
179
182
|
#client;
|
|
180
183
|
#loopCtx;
|
|
181
184
|
#scope;
|
|
@@ -237,6 +240,17 @@ export class PiAgent {
|
|
|
237
240
|
this.id = id;
|
|
238
241
|
this.options = options;
|
|
239
242
|
this.session = withSystemHead(session, () => createSystemMessage(""));
|
|
243
|
+
this.model = createAgentModelFace({
|
|
244
|
+
session: this.session,
|
|
245
|
+
options: this.options,
|
|
246
|
+
appendSelection: (selection) => {
|
|
247
|
+
this.session.append("model/selection", selection);
|
|
248
|
+
},
|
|
249
|
+
readDefault: () => {
|
|
250
|
+
const service = this.ctx.get("agentDefaultModel");
|
|
251
|
+
return service?.currentSelection?.();
|
|
252
|
+
},
|
|
253
|
+
});
|
|
240
254
|
this.#client = client;
|
|
241
255
|
this.#onIdleExit = onIdleExit;
|
|
242
256
|
this.#runtimeInfo = runtimeInfo;
|
|
@@ -522,7 +536,11 @@ export class PiAgent {
|
|
|
522
536
|
* LIVE (an upgrade over the codex SDK line's next-turn switch).
|
|
523
537
|
*/
|
|
524
538
|
async #syncModelSelection() {
|
|
525
|
-
|
|
539
|
+
// 0.2.2: the recorded-selection fold (pending ?? last-used) leads the
|
|
540
|
+
// waterfall, so a `model.select` switch lands on the NEXT turn — the
|
|
541
|
+
// native precedence (pending retires only on a matching request header).
|
|
542
|
+
const recorded = recordedModelSelection(this.session.snapshotEvents());
|
|
543
|
+
const persisted = recorded ?? this.session.requestHeader()?.config;
|
|
526
544
|
const service = this.ctx.get("agentDefaultModel");
|
|
527
545
|
const selection = service?.currentSelection();
|
|
528
546
|
const target = persisted !== undefined && persisted.provider !== "" && persisted.model !== ""
|
package/agent-pi/dist/index.js
CHANGED
|
@@ -29,7 +29,6 @@ import { bindForeignHub } from '@pgmi-builds/superd-hub/foreign-hub';
|
|
|
29
29
|
import { realpathSync, statSync } from "node:fs";
|
|
30
30
|
import { join } from "node:path";
|
|
31
31
|
import { Service } from "@deepseek-ai/cordis";
|
|
32
|
-
import { installModelSelection } from "@deepseek-ai/dsh-agent";
|
|
33
32
|
import { SessionLogOffset, SessionPreparation, interruptedTurnClosers, } from "@deepseek-ai/dsh-session";
|
|
34
33
|
import { PiSessionClient } from "./pi-client.js";
|
|
35
34
|
import { PiAgent } from "./agent.js";
|
|
@@ -514,16 +513,11 @@ async function setupAndPublish(loopCtx, ownerCtx, id, agentOptions, setup, sessi
|
|
|
514
513
|
const route = runtimeInfo?.routeContext(agentOptions);
|
|
515
514
|
if (route !== undefined) {
|
|
516
515
|
const selection = { provider: route.provider, model: route.model };
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
});
|
|
523
|
-
// `model/selection` is contributed to `SessionEventMap` by the upstream
|
|
524
|
-
// session-controller package (declaration merging); this adapter does
|
|
525
|
-
// not depend on it, so the append goes through a narrow local cast.
|
|
526
|
-
session.append("model/selection", selection);
|
|
516
|
+
// 0.2.2: installModelSelection dropped its injected-ref parameter — the
|
|
517
|
+
// durable face (`agent.model`, the same mechanism session/selectModel
|
|
518
|
+
// uses) carries the pin: select() appends the typed, deduped
|
|
519
|
+
// `model/selection` event.
|
|
520
|
+
agent.model.select(selection);
|
|
527
521
|
trace(`session route pinned: ${route.provider}/${route.model}`);
|
|
528
522
|
}
|
|
529
523
|
}
|
package/agent-pi/package.json
CHANGED
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
30
|
-
"@deepseek-ai/dsh-agent": ">=0.
|
|
31
|
-
"@deepseek-ai/dsh-agent-presets": ">=0.
|
|
32
|
-
"@deepseek-ai/dsh-llm": ">=0.
|
|
33
|
-
"@deepseek-ai/dsh-scope": ">=0.
|
|
34
|
-
"@deepseek-ai/dsh-session": ">=0.
|
|
35
|
-
"@deepseek-ai/dsh-session-persistence": ">=0.
|
|
36
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.
|
|
30
|
+
"@deepseek-ai/dsh-agent": ">=0.2.0-0 <1.0.0-0",
|
|
31
|
+
"@deepseek-ai/dsh-agent-presets": ">=0.2.0-0 <1.0.0-0",
|
|
32
|
+
"@deepseek-ai/dsh-llm": ">=0.2.0-0 <1.0.0-0",
|
|
33
|
+
"@deepseek-ai/dsh-scope": ">=0.2.0-0 <1.0.0-0",
|
|
34
|
+
"@deepseek-ai/dsh-session": ">=0.2.0-0 <1.0.0-0",
|
|
35
|
+
"@deepseek-ai/dsh-session-persistence": ">=0.2.0-0 <1.0.0-0",
|
|
36
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.2.0-0 <1.0.0-0",
|
|
37
37
|
"@pgmi-builds/superd-hub": "*"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
package/client/index.js
CHANGED
|
@@ -2271,145 +2271,6 @@ async function removeProvider(agentKey, namespace, id, doFetch) {
|
|
|
2271
2271
|
return requireProvidersView(await callRuntimeSettings(agentKey, namespace, "remove", { request: { id } }, doFetch));
|
|
2272
2272
|
}
|
|
2273
2273
|
|
|
2274
|
-
//#endregion
|
|
2275
|
-
//#region src/client/companion-api.ts
|
|
2276
|
-
async function callCompanion(operation, doFetch) {
|
|
2277
|
-
const method = `superdCompanions/${operation}`;
|
|
2278
|
-
const response = await (doFetch ?? ((path, init) => fetch(path, init)))(`/api/${method}`, {
|
|
2279
|
-
method: "POST",
|
|
2280
|
-
credentials: "same-origin",
|
|
2281
|
-
headers: { "content-type": "application/json" },
|
|
2282
|
-
body: JSON.stringify({
|
|
2283
|
-
type: "client-request",
|
|
2284
|
-
rpcId: mintRpcId(),
|
|
2285
|
-
method,
|
|
2286
|
-
payload: { args: {} }
|
|
2287
|
-
})
|
|
2288
|
-
});
|
|
2289
|
-
if (!response.ok) throw new Error(`Better Dash: HTTP ${response.status}`);
|
|
2290
|
-
let body;
|
|
2291
|
-
try {
|
|
2292
|
-
body = JSON.parse(await response.text());
|
|
2293
|
-
} catch {
|
|
2294
|
-
throw new Error("Better Dash: unreadable response");
|
|
2295
|
-
}
|
|
2296
|
-
const result = body?.result;
|
|
2297
|
-
if (result?.ok !== true) throw new Error(result?.error?.message ?? "Better Dash: request failed");
|
|
2298
|
-
const value = result.value;
|
|
2299
|
-
if (value === null || typeof value !== "object" || typeof value.installed !== "boolean" || typeof value.installing !== "boolean" || typeof value.requestedVersion !== "string" || value.version !== void 0 && typeof value.version !== "string" || value.enabled !== void 0 && typeof value.enabled !== "boolean" || value.error !== void 0 && typeof value.error !== "string") throw new Error("Better Dash: invalid status");
|
|
2300
|
-
return value;
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
//#endregion
|
|
2304
|
-
//#region src/client/CompanionSettings.tsx
|
|
2305
|
-
/** Native plugin switches remain in Plugin Manager; this row provides explicit recovery. */
|
|
2306
|
-
function CompanionSettings() {
|
|
2307
|
-
const [status, setStatus] = react.default.useState();
|
|
2308
|
-
const [error, setError] = react.default.useState();
|
|
2309
|
-
const [busy, setBusy] = react.default.useState(false);
|
|
2310
|
-
const live = react.default.useRef(false);
|
|
2311
|
-
const operation = react.default.useRef(false);
|
|
2312
|
-
react.default.useEffect(() => {
|
|
2313
|
-
live.current = true;
|
|
2314
|
-
let reading = false;
|
|
2315
|
-
const refresh = async () => {
|
|
2316
|
-
if (reading || operation.current) return;
|
|
2317
|
-
reading = true;
|
|
2318
|
-
try {
|
|
2319
|
-
const next = await callCompanion("getBetterDash");
|
|
2320
|
-
if (live.current) {
|
|
2321
|
-
setStatus(next);
|
|
2322
|
-
setError(next.error);
|
|
2323
|
-
}
|
|
2324
|
-
} catch (cause) {
|
|
2325
|
-
if (live.current) setError(cause instanceof Error ? cause.message : String(cause));
|
|
2326
|
-
} finally {
|
|
2327
|
-
reading = false;
|
|
2328
|
-
}
|
|
2329
|
-
};
|
|
2330
|
-
refresh();
|
|
2331
|
-
const timer = window.setInterval(() => {
|
|
2332
|
-
refresh();
|
|
2333
|
-
}, 5e3);
|
|
2334
|
-
return () => {
|
|
2335
|
-
live.current = false;
|
|
2336
|
-
window.clearInterval(timer);
|
|
2337
|
-
};
|
|
2338
|
-
}, []);
|
|
2339
|
-
const install = async () => {
|
|
2340
|
-
if (operation.current) return;
|
|
2341
|
-
operation.current = true;
|
|
2342
|
-
setBusy(true);
|
|
2343
|
-
setError(void 0);
|
|
2344
|
-
try {
|
|
2345
|
-
const next = await callCompanion("installBetterDash");
|
|
2346
|
-
if (live.current) {
|
|
2347
|
-
setStatus(next);
|
|
2348
|
-
setError(next.error);
|
|
2349
|
-
}
|
|
2350
|
-
} catch (cause) {
|
|
2351
|
-
if (live.current) setError(cause instanceof Error ? cause.message : String(cause));
|
|
2352
|
-
} finally {
|
|
2353
|
-
operation.current = false;
|
|
2354
|
-
if (live.current) setBusy(false);
|
|
2355
|
-
}
|
|
2356
|
-
};
|
|
2357
|
-
const installing = busy || status?.installing === true;
|
|
2358
|
-
const label = status === void 0 ? "Loading…" : status.installed ? `Installed${status.version ? " · " + status.version : ""}${status.enabled === false ? " · Disabled" : ""}` : "Not installed";
|
|
2359
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2360
|
-
style: {
|
|
2361
|
-
borderRadius: 12,
|
|
2362
|
-
padding: "12px 14px",
|
|
2363
|
-
background: "var(--dsw-alias-interactive-bg-hover)"
|
|
2364
|
-
},
|
|
2365
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2366
|
-
style: {
|
|
2367
|
-
display: "flex",
|
|
2368
|
-
alignItems: "center",
|
|
2369
|
-
gap: 16
|
|
2370
|
-
},
|
|
2371
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2372
|
-
style: { flex: 1 },
|
|
2373
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2374
|
-
style: {
|
|
2375
|
-
fontSize: 14,
|
|
2376
|
-
fontWeight: 600
|
|
2377
|
-
},
|
|
2378
|
-
children: "Better Dash"
|
|
2379
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2380
|
-
role: "status",
|
|
2381
|
-
style: {
|
|
2382
|
-
fontSize: 12,
|
|
2383
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
2384
|
-
marginTop: 4
|
|
2385
|
-
},
|
|
2386
|
-
children: installing ? "Installing…" : label
|
|
2387
|
-
})]
|
|
2388
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2389
|
-
type: "button",
|
|
2390
|
-
disabled: installing || status?.installed === true,
|
|
2391
|
-
onClick: () => {
|
|
2392
|
-
install();
|
|
2393
|
-
},
|
|
2394
|
-
style: {
|
|
2395
|
-
padding: "6px 12px",
|
|
2396
|
-
borderRadius: 8,
|
|
2397
|
-
cursor: installing || status?.installed ? "default" : "pointer"
|
|
2398
|
-
},
|
|
2399
|
-
children: installing ? "Installing…" : status?.installed ? "Installed" : "Install"
|
|
2400
|
-
})]
|
|
2401
|
-
}), error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2402
|
-
role: "alert",
|
|
2403
|
-
style: {
|
|
2404
|
-
fontSize: 12,
|
|
2405
|
-
margin: "8px 0 0",
|
|
2406
|
-
color: "var(--dsw-alias-state-error-primary)"
|
|
2407
|
-
},
|
|
2408
|
-
children: error
|
|
2409
|
-
})]
|
|
2410
|
-
});
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
2274
|
//#endregion
|
|
2414
2275
|
//#region src/client/HubPage.tsx
|
|
2415
2276
|
const EMPTY_DRAFT = {
|
|
@@ -2440,6 +2301,16 @@ const chipMonoId = {
|
|
|
2440
2301
|
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
2441
2302
|
fontSize: 10.5
|
|
2442
2303
|
};
|
|
2304
|
+
/** Machine-row display name: shrinkable, so an arbitrarily long name can
|
|
2305
|
+
* never force the row wider than the viewport — it ellipsizes like the
|
|
2306
|
+
* origin URL beside it. */
|
|
2307
|
+
const rowNameStyle = {
|
|
2308
|
+
fontWeight: 500,
|
|
2309
|
+
whiteSpace: "nowrap",
|
|
2310
|
+
minWidth: 0,
|
|
2311
|
+
overflow: "hidden",
|
|
2312
|
+
textOverflow: "ellipsis"
|
|
2313
|
+
};
|
|
2443
2314
|
/** The status dot's fixed part (the color is decided per row). */
|
|
2444
2315
|
const dotStyle = {
|
|
2445
2316
|
width: 8,
|
|
@@ -2449,7 +2320,7 @@ const dotStyle = {
|
|
|
2449
2320
|
};
|
|
2450
2321
|
/** The machine origin column: monospace, eats the leftover row width. */
|
|
2451
2322
|
const originStyle = {
|
|
2452
|
-
flex: 1,
|
|
2323
|
+
flex: "1 1 150px",
|
|
2453
2324
|
minWidth: 0,
|
|
2454
2325
|
overflow: "hidden",
|
|
2455
2326
|
textOverflow: "ellipsis",
|
|
@@ -2563,7 +2434,7 @@ const sectionHeadStyle = {
|
|
|
2563
2434
|
* keeps the surface lit while its panel is open, so the open row stays
|
|
2564
2435
|
* identifiable after the pointer leaves. The switch lives in the row's button.
|
|
2565
2436
|
*/
|
|
2566
|
-
function HoverRow({ children, onClick, clickable, expanded }) {
|
|
2437
|
+
function HoverRow({ children, onClick, clickable, expanded, wrap }) {
|
|
2567
2438
|
const [hover, setHover] = react.useState(false);
|
|
2568
2439
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
2569
2440
|
onClick,
|
|
@@ -2577,7 +2448,8 @@ function HoverRow({ children, onClick, clickable, expanded }) {
|
|
|
2577
2448
|
style: {
|
|
2578
2449
|
display: "flex",
|
|
2579
2450
|
alignItems: "center",
|
|
2580
|
-
|
|
2451
|
+
flexWrap: wrap ? "wrap" : "nowrap",
|
|
2452
|
+
gap: wrap ? "4px 12px" : 12,
|
|
2581
2453
|
margin: "0 -8px",
|
|
2582
2454
|
padding: "9px 8px",
|
|
2583
2455
|
borderRadius: 12,
|
|
@@ -3573,11 +3445,7 @@ function HubPage() {
|
|
|
3573
3445
|
gap: 4,
|
|
3574
3446
|
borderBottom: "1px solid var(--dsw-alias-border-l3)"
|
|
3575
3447
|
},
|
|
3576
|
-
children: [
|
|
3577
|
-
["home", "Home"],
|
|
3578
|
-
["workflows", "Workflows"],
|
|
3579
|
-
["settings", "Settings"]
|
|
3580
|
-
].map(([id, label]) => {
|
|
3448
|
+
children: [["home", "Home"], ["workflows", "Workflows"]].map(([id, label]) => {
|
|
3581
3449
|
const active = tab === id;
|
|
3582
3450
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3583
3451
|
type: "button",
|
|
@@ -3619,17 +3487,6 @@ function HubPage() {
|
|
|
3619
3487
|
children: "Orchestration across the machines and runtimes above — workflow authoring lands with the hub service."
|
|
3620
3488
|
})]
|
|
3621
3489
|
}),
|
|
3622
|
-
tab === "settings" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3623
|
-
style: {
|
|
3624
|
-
display: "flex",
|
|
3625
|
-
flexDirection: "column",
|
|
3626
|
-
gap: 8
|
|
3627
|
-
},
|
|
3628
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupHead, {
|
|
3629
|
-
title: "Settings",
|
|
3630
|
-
count: 1
|
|
3631
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CompanionSettings, {})]
|
|
3632
|
-
}),
|
|
3633
3490
|
tab === "home" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3634
3491
|
style: {
|
|
3635
3492
|
display: "flex",
|
|
@@ -3716,98 +3573,98 @@ function HubPage() {
|
|
|
3716
3573
|
},
|
|
3717
3574
|
children: "No machines yet — add the first one with its token URL."
|
|
3718
3575
|
}),
|
|
3719
|
-
mesh.self !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HoverRow, {
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
children: "self"
|
|
3760
|
-
})
|
|
3761
|
-
] }),
|
|
3762
|
-
mesh.machines.map((machine) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HoverRow, { children: [
|
|
3763
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3764
|
-
title: machine.status,
|
|
3765
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusMark, {
|
|
3766
|
-
status: machine.status,
|
|
3767
|
-
size: 16
|
|
3576
|
+
mesh.self !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HoverRow, {
|
|
3577
|
+
wrap: true,
|
|
3578
|
+
children: [
|
|
3579
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3580
|
+
"aria-hidden": true,
|
|
3581
|
+
style: {
|
|
3582
|
+
...dotStyle,
|
|
3583
|
+
background: "var(--dsw-alias-state-success-primary)"
|
|
3584
|
+
}
|
|
3585
|
+
}),
|
|
3586
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3587
|
+
style: rowNameStyle,
|
|
3588
|
+
children: mesh.self.label
|
|
3589
|
+
}),
|
|
3590
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3591
|
+
style: {
|
|
3592
|
+
...originStyle,
|
|
3593
|
+
flex: "0 1 auto"
|
|
3594
|
+
},
|
|
3595
|
+
children: [hereOrigin, mesh.self.tokenPreview !== void 0 ? `/?token=${mesh.self.tokenPreview}` : ""]
|
|
3596
|
+
}),
|
|
3597
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3598
|
+
type: "button",
|
|
3599
|
+
"aria-label": "Copy this machine's pairing URL",
|
|
3600
|
+
title: pairingBusy ? "Minting pairing URL…" : "Copy the token URL another machine can Add machine with",
|
|
3601
|
+
disabled: pairingBusy,
|
|
3602
|
+
onClick: () => {
|
|
3603
|
+
copyPairingUrl();
|
|
3604
|
+
},
|
|
3605
|
+
style: iconActionStyle,
|
|
3606
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconCopyOutlineRegular, { size: 15 })
|
|
3607
|
+
}),
|
|
3608
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { style: { flex: 1 } }),
|
|
3609
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3610
|
+
style: chipMonoId,
|
|
3611
|
+
children: mesh.self.id
|
|
3612
|
+
}),
|
|
3613
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3614
|
+
style: chipSelf,
|
|
3615
|
+
children: "self"
|
|
3768
3616
|
})
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3617
|
+
]
|
|
3618
|
+
}),
|
|
3619
|
+
mesh.machines.map((machine) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HoverRow, {
|
|
3620
|
+
wrap: true,
|
|
3621
|
+
children: [
|
|
3622
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3623
|
+
title: machine.status,
|
|
3624
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusMark, {
|
|
3625
|
+
status: machine.status,
|
|
3626
|
+
size: 16
|
|
3627
|
+
})
|
|
3628
|
+
}),
|
|
3629
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3630
|
+
style: rowNameStyle,
|
|
3631
|
+
children: machine.name
|
|
3632
|
+
}),
|
|
3633
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3634
|
+
style: originStyle,
|
|
3635
|
+
children: machine.origin
|
|
3636
|
+
}),
|
|
3637
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3638
|
+
style: chipMonoId,
|
|
3639
|
+
children: machine.id
|
|
3640
|
+
}),
|
|
3641
|
+
machineVersionChip(machine) !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3642
|
+
style: chipWarn,
|
|
3643
|
+
title: `machine ${machine.id}`,
|
|
3644
|
+
children: machine.versionWarning
|
|
3645
|
+
}),
|
|
3646
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3647
|
+
type: "button",
|
|
3648
|
+
"aria-label": `Refresh ${machine.name}`,
|
|
3649
|
+
title: `Refresh ${machine.name}`,
|
|
3650
|
+
onClick: () => {
|
|
3651
|
+
reprobeRemote(machine.id);
|
|
3652
|
+
},
|
|
3653
|
+
style: iconActionStyle,
|
|
3654
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 15 })
|
|
3655
|
+
}),
|
|
3656
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3657
|
+
type: "button",
|
|
3658
|
+
"aria-label": `Remove ${machine.name}`,
|
|
3659
|
+
title: `Remove ${machine.name}`,
|
|
3660
|
+
onClick: () => {
|
|
3661
|
+
removeRemote(machine.id);
|
|
3662
|
+
},
|
|
3663
|
+
style: iconActionStyle,
|
|
3664
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 15 })
|
|
3665
|
+
})
|
|
3666
|
+
]
|
|
3667
|
+
}, machine.id))
|
|
3811
3668
|
]
|
|
3812
3669
|
}),
|
|
3813
3670
|
showAdd && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
package/cordis.patch.yml
CHANGED
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
# Profile-layer values (webserver port/host, settings path) stay in the USER's
|
|
23
23
|
# profile patch layer, never here.
|
|
24
24
|
- insert:
|
|
25
|
-
# Expose native companion management and perform first-use installation.
|
|
26
|
-
- id: superd-bundle-setup
|
|
27
|
-
name: 'super-dsh/setup'
|
|
28
25
|
# BARE package row: subpath rows (…/agents/omp) are permanently not client
|
|
29
26
|
# rows in client-modules' scan (exactPackageSpecifier), so THIS row is
|
|
30
27
|
# what registers the package's client half — the sidebar selector.
|
|
@@ -51,9 +48,6 @@
|
|
|
51
48
|
# get their own injection in P5, spec §10). Dormant without tools.
|
|
52
49
|
# Off: restate with `disabled: true` or drop the row — nothing else
|
|
53
50
|
# registers the tool.
|
|
54
|
-
# Independent build of Better's canonical remote source; default-on per Agent.
|
|
55
|
-
- id: superd-remote
|
|
56
|
-
name: 'super-dsh/remote'
|
|
57
51
|
- id: superd-a2a
|
|
58
52
|
name: 'super-dsh/a2a'
|
|
59
53
|
- id: agent-omp
|