super-dsh 0.1.3 → 0.1.5-a
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 +3 -3
- package/agent-agy/cordis.patch.yml +8 -4
- package/agent-agy/dist/agent-preset-agy.d.ts +23 -43
- package/agent-agy/dist/agent-preset-agy.js +29 -166
- package/agent-agy/dist/agent.d.ts +2 -1
- package/agent-agy/dist/agent.js +3 -2
- package/agent-agy/dist/agy-sessions.d.ts +2 -1
- package/agent-agy/dist/agy-sessions.js +2 -11
- package/agent-agy/dist/index.js +13 -12
- package/agent-agy/dist/world-plugin.d.ts +2 -1
- package/agent-agy/dist/world-plugin.js +31 -51
- package/agent-agy/package.json +6 -6
- package/agent-claude/cordis.patch.yml +8 -4
- package/agent-claude/dist/agent-preset-claude.js +29 -166
- package/agent-claude/dist/agent.js +10 -10
- package/agent-claude/dist/claude-client.js +22 -3
- package/agent-claude/dist/claude-home.js +0 -8
- package/agent-claude/dist/index.js +12 -15
- package/agent-claude/dist/session-map.js +2 -5
- package/agent-claude/dist/world-plugin.js +3 -3
- package/agent-claude/package.json +9 -9
- package/agent-codex/README.md +8 -8
- package/agent-codex/cordis.patch.yml +9 -5
- package/agent-codex/dist/agent-preset-codex.js +29 -168
- package/agent-codex/dist/agent.js +17 -12
- package/agent-codex/dist/codex-store.js +0 -9
- package/agent-codex/dist/index.js +13 -16
- package/agent-codex/dist/session-map.js +2 -5
- package/agent-codex/dist/world-plugin.js +31 -51
- package/agent-codex/package.json +14 -11
- package/agent-hermes/README.md +9 -8
- package/agent-hermes/cordis.patch.yml +8 -4
- package/agent-hermes/dist/agent-preset-hermes.js +29 -168
- package/agent-hermes/dist/agent.js +33 -19
- package/agent-hermes/dist/hermes-client.js +5 -5
- package/agent-hermes/dist/hermes-store.js +2 -11
- package/agent-hermes/dist/index.js +13 -12
- package/agent-hermes/dist/world-plugin.js +31 -52
- package/agent-hermes/package.json +14 -11
- package/agent-omp/README.md +2 -2
- package/agent-omp/cordis.patch.yml +12 -7
- package/agent-omp/dist/agent-preset-omp.js +30 -169
- package/agent-omp/dist/agent.js +13 -5
- package/agent-omp/dist/index.js +12 -22
- package/agent-omp/dist/mobile/gesture.js +2 -2
- package/agent-omp/dist/mobile/zoom-guard.js +4 -4
- package/agent-omp/dist/mobile-boot.js +2 -2
- package/agent-omp/dist/omp-cli.js +1 -1
- package/agent-omp/dist/omp-disk-discovery.js +1 -1
- package/agent-omp/dist/protocol.js +1 -1
- package/agent-omp/dist/sidecar-client.js +1 -1
- package/agent-omp/dist/world-plugin.js +37 -50
- package/agent-omp/package.json +18 -14
- package/agent-omp/sidecar/main.ts +2 -2
- package/agent-pi/README.md +5 -5
- package/agent-pi/cordis.patch.yml +8 -4
- package/agent-pi/dist/agent-preset-pi.js +29 -166
- package/agent-pi/dist/agent.js +18 -12
- package/agent-pi/dist/index.js +14 -16
- package/agent-pi/dist/pi-home.js +2 -12
- package/agent-pi/dist/world-plugin.js +31 -51
- package/agent-pi/package.json +14 -11
- package/client/index.js +1994 -150
- package/cordis.patch.yml +39 -15
- package/package.json +32 -30
- package/{agent-hub → superd-hub}/cordis.patch.yml +3 -3
- package/{agent-hub → superd-hub}/dist/agent-roster.d.ts +3 -1
- package/{agent-hub → superd-hub}/dist/agent-roster.js +4 -2
- package/superd-hub/dist/carrier.d.ts +62 -0
- package/superd-hub/dist/carrier.js +213 -0
- package/superd-hub/dist/fusion-transport.d.ts +150 -0
- package/superd-hub/dist/fusion-transport.js +369 -0
- package/{agent-hub → superd-hub}/dist/gateway.d.ts +9 -4
- package/superd-hub/dist/gateway.js +44 -0
- package/superd-hub/dist/hub-route.d.ts +74 -0
- package/superd-hub/dist/hub-route.js +188 -0
- package/{agent-hub → superd-hub}/dist/index.d.ts +14 -6
- package/{agent-hub → superd-hub}/dist/index.js +14 -6
- package/{agent-hub → superd-hub}/dist/roster.d.ts +2 -2
- package/{agent-hub → superd-hub}/dist/rpc.js +1 -1
- package/{agent-hub → superd-hub}/dist/spawn-world.d.ts +27 -6
- package/superd-hub/dist/spawn-world.js +279 -0
- package/superd-hub/dist/switch-core.d.ts +630 -0
- package/superd-hub/dist/switch-core.js +734 -0
- package/superd-hub/dist/system-head.d.ts +69 -0
- package/superd-hub/dist/system-head.js +194 -0
- package/superd-hub/dist/web-trust.d.ts +112 -0
- package/superd-hub/dist/web-trust.js +126 -0
- package/superd-hub/dist/world-entry.d.ts +38 -0
- package/superd-hub/dist/world-entry.js +47 -0
- package/{agent-hub → superd-hub}/dist/world-host.d.ts +15 -20
- package/superd-hub/dist/world-host.js +65 -0
- package/{agent-hub → superd-hub}/dist/world-join.d.ts +2 -1
- package/{agent-hub → superd-hub}/dist/world-join.js +30 -50
- package/superd-hub/dist/world-mount.d.ts +82 -0
- package/superd-hub/dist/world-mount.js +105 -0
- package/{agent-hub → superd-hub}/dist/world-mux.d.ts +21 -6
- package/superd-hub/dist/world-mux.js +392 -0
- package/{agent-hub → superd-hub}/dist/world-provision.d.ts +20 -4
- package/superd-hub/dist/world-provision.js +203 -0
- package/superd-hub/dist/world-web-server.d.ts +113 -0
- package/superd-hub/dist/world-web-server.js +99 -0
- package/superd-hub/lib/client/index.js +2086 -0
- package/{agent-hub → superd-hub}/package.json +12 -7
- package/agent-hub/dist/carrier.d.ts +0 -43
- package/agent-hub/dist/carrier.js +0 -241
- package/agent-hub/dist/gateway.js +0 -18
- package/agent-hub/dist/spawn-world.js +0 -72
- package/agent-hub/dist/world-entry.d.ts +0 -31
- package/agent-hub/dist/world-entry.js +0 -51
- package/agent-hub/dist/world-host.js +0 -44
- package/agent-hub/dist/world-mount.d.ts +0 -52
- package/agent-hub/dist/world-mount.js +0 -52
- package/agent-hub/dist/world-mux.js +0 -224
- package/agent-hub/dist/world-provision.js +0 -122
- package/agent-hub/dist/world-web-server.d.ts +0 -162
- package/agent-hub/dist/world-web-server.js +0 -248
- package/agent-hub/lib/client/index.js +0 -242
- /package/{agent-hub → superd-hub}/dist/client-shim.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/client-shim.js +0 -0
- /package/{agent-hub → superd-hub}/dist/envelope.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/envelope.js +0 -0
- /package/{agent-hub → superd-hub}/dist/index-pass.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/index-pass.js +0 -0
- /package/{agent-hub → superd-hub}/dist/labels.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/labels.js +0 -0
- /package/{agent-hub → superd-hub}/dist/ownership.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/ownership.js +0 -0
- /package/{agent-hub → superd-hub}/dist/roster.js +0 -0
- /package/{agent-hub → superd-hub}/dist/rpc.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/targets.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/targets.js +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# super-dsh —
|
|
1
|
+
# super-dsh — Super D agent hub for the DeepSeek Harness
|
|
2
2
|
|
|
3
3
|
One [DSH](https://www.npmjs.com/package/@deepseek-ai/dsh) plugin that joins local
|
|
4
4
|
foreign-agent runtimes into the DSH Web UI: a runtime selector in the sidebar,
|
|
@@ -17,8 +17,8 @@ the foreign store.
|
|
|
17
17
|
dsh plugin --profile <name> add super-dsh@0.1.0
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
That single package composes the whole line (`@pgmi-builds/
|
|
21
|
-
six `@pgmi-builds/agent
|
|
20
|
+
That single package composes the whole line (`@pgmi-builds/superd-hub` plus the
|
|
21
|
+
six `@pgmi-builds/agent-*` packages). Restart the profile and the
|
|
22
22
|
sidebar gains the runtime selector; each world provisions its own nested DSH
|
|
23
23
|
home under `<DSH_HOME>/agents/<label>/` on first boot.
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @pgmi-builds/agent-
|
|
1
|
+
# @pgmi-builds/agent-agy bundle patch (AW-G SDK line, pi/hermes form).
|
|
2
2
|
# The `dsh.bundle.patch` layer of the adapter package: mounts the agy provider
|
|
3
3
|
# and disables the native components it replaces. Port/webserver posture is
|
|
4
4
|
# NOT here (worldMountPatches owns it); the world profile patch pins the home.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
- insert:
|
|
11
11
|
- id: agy-provider
|
|
12
|
-
name: '@pgmi-builds/agent-
|
|
12
|
+
name: '@pgmi-builds/agent-agy'
|
|
13
13
|
|
|
14
14
|
# The SDK bridge owns the live transcript; disable the built-in loop so it
|
|
15
15
|
# does not double-run alongside the bridge session.
|
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
|
|
24
24
|
# Single-preset roster like pi: launch-only permission mapping (headless bridge
|
|
25
25
|
# has no per-action approval channel). Full 3-preset restatement per §4.1.
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
# 0.1.7: the host AgentPresetRegistry row (renamed `agent-presets` ->
|
|
27
|
+
# `agent-preset-registry`) stays MOUNTED — the adapter registers its one
|
|
28
|
+
# fixed preset into it (src/agent-preset-agy.ts); pin only the default.
|
|
29
|
+
- id: agent-preset-registry
|
|
30
|
+
config:
|
|
31
|
+
default: agy
|
|
28
32
|
- id: permission
|
|
29
33
|
config:
|
|
30
34
|
presets:
|
|
@@ -1,47 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Antigravity preset registration — the profile's one fixed Agent preset.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* 0.1.7 alignment (upstream split `dsh-agent-presets` into `dsh-agent-preset`
|
|
5
|
+
* + `dsh-agent-preset-registry` and moved roster, selection, document RPC and
|
|
6
|
+
* the `agentPreset` session projection into the host `AgentPresetRegistry`,
|
|
7
|
+
* mounted by the dsh-web-app bundle's `agent-preset-registry` row): the
|
|
8
|
+
* adapter no longer implements the `agentPresets` service — the 0.1.6
|
|
9
|
+
* SingleAgyPresetRoster and its own projection fold are retired. It only REGISTERS the
|
|
10
|
+
* single fixed preset into the host registry.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* API gateway's root-level remote enumeration and every agentPresets/* call
|
|
16
|
-
* 404s.
|
|
12
|
+
* Antigravity is single-mode: the foreign agent drives its own tools, so no
|
|
13
|
+
* Dash-side preset composition exists to choose from. The preset's
|
|
14
|
+
* composition deliberately mounts nothing.
|
|
17
15
|
*/
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
mount(_agentCtx: Context, id?: string): Promise<AgentPreset>;
|
|
31
|
-
recompose(_agentCtx: Context, id: string): Promise<AgentPreset>;
|
|
32
|
-
read(id: string): Promise<string>;
|
|
33
|
-
remoteList(): Promise<AgentPresetRoster>;
|
|
34
|
-
remoteRead(agentPreset: string): Promise<AgentPresetDocument>;
|
|
35
|
-
remoteCopy(from: string, id: string, name?: string): Promise<void>;
|
|
36
|
-
remoteDelete(id: string): Promise<void>;
|
|
37
|
-
/** Fixed roster: one preset, so selecting it is a no-op ack; anything else is unknown. */
|
|
38
|
-
remoteSelect(agent: Agent, agentPreset: string): Promise<string>;
|
|
39
|
-
copy(_from: string, id: string, _name?: string): Promise<void>;
|
|
40
|
-
remove(id: string): Promise<void>;
|
|
41
|
-
serviceFor(_agent: {
|
|
42
|
-
ctx: Context;
|
|
43
|
-
}, _name: string): undefined;
|
|
44
|
-
composeFrom(_agentCtx: Context, _parentCtx: Context): undefined;
|
|
45
|
-
composedPreset(_agentCtx: Context): string | undefined;
|
|
46
|
-
standingKeyFor(id?: string): Promise<ScopeKey>;
|
|
47
|
-
}
|
|
16
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
17
|
+
import type { PresetDefinition } from "@deepseek-ai/dsh-agent-preset-registry";
|
|
18
|
+
export declare const AGY_PRESET_ID = "agy";
|
|
19
|
+
/** The single fixed Antigravity preset: mounting it composes nothing. */
|
|
20
|
+
export declare const AGY_PRESET: PresetDefinition;
|
|
21
|
+
/**
|
|
22
|
+
* Register the fixed preset into the host `AgentPresetRegistry` once the
|
|
23
|
+
* service is up. Registration failure keeps the roster row visible as
|
|
24
|
+
* `broken` inside the registry (upstream owns that lifecycle) — the adapter
|
|
25
|
+
* only owns the disposer.
|
|
26
|
+
*/
|
|
27
|
+
export declare function registerAntigravityPreset(ctx: Context): void;
|
|
@@ -1,169 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
return useValue ? value : void 0;
|
|
7
|
-
};
|
|
8
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
-
var _, done = false;
|
|
14
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
-
var context = {};
|
|
16
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
-
if (kind === "accessor") {
|
|
21
|
-
if (result === void 0) continue;
|
|
22
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
-
}
|
|
27
|
-
else if (_ = accept(result)) {
|
|
28
|
-
if (kind === "field") initializers.unshift(_);
|
|
29
|
-
else descriptor[key] = _;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
-
done = true;
|
|
34
|
-
};
|
|
35
|
-
import { Remote, RemoteError, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
36
|
-
const AGY_PRESET = Object.freeze({
|
|
37
|
-
id: "agy",
|
|
38
|
-
trust: "system",
|
|
39
|
-
path: "",
|
|
1
|
+
export const AGY_PRESET_ID = "agy";
|
|
2
|
+
/** The single fixed Antigravity preset: mounting it composes nothing. */
|
|
3
|
+
export const AGY_PRESET = Object.freeze({
|
|
4
|
+
id: AGY_PRESET_ID,
|
|
40
5
|
name: "Antigravity",
|
|
41
6
|
description: "Google Antigravity (Gemini) via the agent-agy adapter",
|
|
7
|
+
plugins: Object.freeze([]),
|
|
42
8
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
_remoteList_decorators = [Remote("list")];
|
|
68
|
-
_remoteRead_decorators = [Remote("read")];
|
|
69
|
-
_remoteCopy_decorators = [Remote("copy")];
|
|
70
|
-
_remoteDelete_decorators = [Remote("deletePreset")];
|
|
71
|
-
_remoteSelect_decorators = [Remote("select")];
|
|
72
|
-
__esDecorate(this, null, _remoteList_decorators, { kind: "method", name: "remoteList", static: false, private: false, access: { has: obj => "remoteList" in obj, get: obj => obj.remoteList }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
73
|
-
__esDecorate(this, null, _remoteRead_decorators, { kind: "method", name: "remoteRead", static: false, private: false, access: { has: obj => "remoteRead" in obj, get: obj => obj.remoteRead }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
74
|
-
__esDecorate(this, null, _remoteCopy_decorators, { kind: "method", name: "remoteCopy", static: false, private: false, access: { has: obj => "remoteCopy" in obj, get: obj => obj.remoteCopy }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
75
|
-
__esDecorate(this, null, _remoteDelete_decorators, { kind: "method", name: "remoteDelete", static: false, private: false, access: { has: obj => "remoteDelete" in obj, get: obj => obj.remoteDelete }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
76
|
-
__esDecorate(this, null, _remoteSelect_decorators, { kind: "method", name: "remoteSelect", static: false, private: false, access: { has: obj => "remoteSelect" in obj, get: obj => obj.remoteSelect }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
77
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
78
|
-
}
|
|
79
|
-
constructor(ctx) {
|
|
80
|
-
super(ctx, "agentPresets");
|
|
81
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
82
|
-
}
|
|
83
|
-
get defaultId() {
|
|
84
|
-
return AGY_PRESET.id;
|
|
85
|
-
}
|
|
86
|
-
get roots() {
|
|
87
|
-
return [];
|
|
88
|
-
}
|
|
89
|
-
get authorable() {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
async list() {
|
|
93
|
-
return [AGY_PRESET];
|
|
94
|
-
}
|
|
95
|
-
async resolve(id) {
|
|
96
|
-
if (id === undefined || id === AGY_PRESET.id)
|
|
97
|
-
return AGY_PRESET;
|
|
98
|
-
throw new RemoteError("agent-preset/not-found", `agent-presets: preset "${id}" not found (available: agy)`, { agentPreset: id, available: [AGY_PRESET.id] });
|
|
99
|
-
}
|
|
100
|
-
async mount(_agentCtx, id) {
|
|
101
|
-
return this.resolve(id);
|
|
102
|
-
}
|
|
103
|
-
async recompose(_agentCtx, id) {
|
|
104
|
-
return this.resolve(id);
|
|
105
|
-
}
|
|
106
|
-
async read(id) {
|
|
107
|
-
await this.resolve(id);
|
|
108
|
-
return COMPOSITION_TEXT;
|
|
109
|
-
}
|
|
110
|
-
// ── Remote RPC surface (alpha: agentPresets routes come from @Remote) ────
|
|
111
|
-
async remoteList() {
|
|
112
|
-
if (process.env.AGY_TRACE === "1")
|
|
113
|
-
process.stderr.write("[agy-roster] remoteList INVOKED\n");
|
|
114
|
-
return {
|
|
115
|
-
presets: [
|
|
116
|
-
{
|
|
117
|
-
id: AGY_PRESET.id,
|
|
118
|
-
trust: AGY_PRESET.trust,
|
|
119
|
-
isDefault: true,
|
|
120
|
-
name: AGY_PRESET.name,
|
|
121
|
-
description: AGY_PRESET.description,
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
authorable: this.authorable,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
async remoteRead(agentPreset) {
|
|
128
|
-
const preset = await this.resolve(agentPreset);
|
|
129
|
-
return {
|
|
130
|
-
agentPreset: preset.id,
|
|
131
|
-
trust: preset.trust,
|
|
132
|
-
content: await this.read(preset.id),
|
|
133
|
-
name: preset.name,
|
|
134
|
-
description: preset.description,
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
async remoteCopy(from, id, name) {
|
|
138
|
-
await this.copy(from, id, name);
|
|
139
|
-
}
|
|
140
|
-
async remoteDelete(id) {
|
|
141
|
-
await this.remove(id);
|
|
142
|
-
}
|
|
143
|
-
/** Fixed roster: one preset, so selecting it is a no-op ack; anything else is unknown. */
|
|
144
|
-
async remoteSelect(agent, agentPreset) {
|
|
145
|
-
const preset = await this.resolve(agentPreset);
|
|
146
|
-
return preset.id;
|
|
147
|
-
}
|
|
148
|
-
async copy(_from, id, _name) {
|
|
149
|
-
throw new RemoteError("agent-preset/read-only", `agent-presets: preset "${id}" cannot be written: the Antigravity roster is fixed and ships exactly one preset`, { agentPreset: id, reason: "the Antigravity roster is fixed and ships exactly one preset" });
|
|
150
|
-
}
|
|
151
|
-
async remove(id) {
|
|
152
|
-
throw new RemoteError("agent-preset/read-only", `agent-presets: preset "${id}" cannot be written: the Antigravity roster is fixed and ships exactly one preset`, { agentPreset: id, reason: "the Antigravity roster is fixed and ships exactly one preset" });
|
|
153
|
-
}
|
|
154
|
-
serviceFor(_agent, _name) {
|
|
155
|
-
return undefined;
|
|
156
|
-
}
|
|
157
|
-
composeFrom(_agentCtx, _parentCtx) {
|
|
158
|
-
return undefined;
|
|
159
|
-
}
|
|
160
|
-
composedPreset(_agentCtx) {
|
|
161
|
-
return AGY_PRESET.id;
|
|
162
|
-
}
|
|
163
|
-
async standingKeyFor(id) {
|
|
164
|
-
await this.resolve(id);
|
|
165
|
-
return STANDING_KEY;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
})();
|
|
169
|
-
export { SingleAgyPresetRoster };
|
|
9
|
+
/**
|
|
10
|
+
* Register the fixed preset into the host `AgentPresetRegistry` once the
|
|
11
|
+
* service is up. Registration failure keeps the roster row visible as
|
|
12
|
+
* `broken` inside the registry (upstream owns that lifecycle) — the adapter
|
|
13
|
+
* only owns the disposer.
|
|
14
|
+
*/
|
|
15
|
+
export function registerAntigravityPreset(ctx) {
|
|
16
|
+
ctx.inject(["agentPresets"], (scoped) => {
|
|
17
|
+
let dispose;
|
|
18
|
+
let settled = false;
|
|
19
|
+
void scoped.agentPresets.register(AGY_PRESET).then((unregister) => {
|
|
20
|
+
if (settled) {
|
|
21
|
+
void unregister();
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
dispose = unregister;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
ctx.effect(() => async () => {
|
|
28
|
+
settled = true;
|
|
29
|
+
await dispose?.();
|
|
30
|
+
}, "agyAdapter.preset");
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -30,6 +30,7 @@ import { Inbox } from "./inbox.js";
|
|
|
30
30
|
import type { AgentCancelCause, Session, SessionId, UserMessage } from "@deepseek-ai/dsh-session";
|
|
31
31
|
import type { TokenUsage } from "@deepseek-ai/dsh-llm";
|
|
32
32
|
import type { AgyBridgeClient } from "./agy-client.js";
|
|
33
|
+
import { type WithSystemHead } from "../../superd-hub/dist/index.js";
|
|
33
34
|
/** Structural union of the two live transports (SDK bridge | CLI stream). */
|
|
34
35
|
export type LiveAgyClient = Pick<AgyBridgeClient, "conversationId" | "lastUsage" | "onThinkingDelta" | "onToolEvent" | "setApprovalHandler" | "turn" | "close"> & {
|
|
35
36
|
setSystemMessageHandler?(handler: (text: string) => void): void;
|
|
@@ -59,7 +60,7 @@ export interface AgyAgentRuntimeInfo {
|
|
|
59
60
|
export declare class AgyAgent implements Agent {
|
|
60
61
|
readonly id: SessionId;
|
|
61
62
|
readonly options: AgentOptions;
|
|
62
|
-
readonly session: Session
|
|
63
|
+
readonly session: WithSystemHead<Session>;
|
|
63
64
|
readonly inbox: Inbox;
|
|
64
65
|
readonly ctx: Context;
|
|
65
66
|
private readonly client;
|
package/agent-agy/dist/agent.js
CHANGED
|
@@ -2,6 +2,7 @@ import { agentEvents } from "@deepseek-ai/dsh-agent";
|
|
|
2
2
|
import { Inbox } from "./inbox.js";
|
|
3
3
|
import { LlmAttemptId, ToolCallId, createAssistantMessage, createSystemMessage, createToolResultMessage } from "@deepseek-ai/dsh-llm";
|
|
4
4
|
import { createScope } from "@deepseek-ai/dsh-scope";
|
|
5
|
+
import { withSystemHead } from "../../superd-hub/dist/index.js";
|
|
5
6
|
/** v2 live assistant-stream publication (same frame protocol as hermes). */
|
|
6
7
|
class AssistantStreamBridge {
|
|
7
8
|
attemptId;
|
|
@@ -104,7 +105,7 @@ export class AgyAgent {
|
|
|
104
105
|
this.loopCtx = loopCtx;
|
|
105
106
|
this.id = id;
|
|
106
107
|
this.options = options;
|
|
107
|
-
this.session = session;
|
|
108
|
+
this.session = withSystemHead(session, () => createSystemMessage(""));
|
|
108
109
|
this.client = client;
|
|
109
110
|
this.onIdleExit = onIdleExit;
|
|
110
111
|
this.runtimeInfo = runtimeInfo;
|
|
@@ -333,7 +334,7 @@ export class AgyAgent {
|
|
|
333
334
|
appendSystemNotice(text) {
|
|
334
335
|
if (!this.turnOpen)
|
|
335
336
|
return;
|
|
336
|
-
this.session.append("system/message", { turn: this.dashTurn, step: this.step, message: createSystemMessage(text
|
|
337
|
+
this.session.append("system/message", { turn: this.dashTurn, step: this.step, message: createSystemMessage(text) }, { surfaceOp: "append" });
|
|
337
338
|
}
|
|
338
339
|
appendAssistantMessage(text, extras) {
|
|
339
340
|
const content = [];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Prod homes that must never be resolved into (repo red line). */
|
|
1
2
|
/** One persisted DSH → Antigravity conversation pairing. */
|
|
2
3
|
export interface AgySessionRecord {
|
|
3
4
|
/** The SDK conversation id; `null` until the first turn materializes it. */
|
|
@@ -12,7 +13,7 @@ export interface AgySessionRecord {
|
|
|
12
13
|
export type AgySessionMap = Record<string, AgySessionRecord>;
|
|
13
14
|
/**
|
|
14
15
|
* The adapter's DSH-side world home. Form-A (boot home = DSH home root) nests
|
|
15
|
-
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
16
|
+
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
16
17
|
*/
|
|
17
18
|
export declare function resolveAgyWorldHome(home?: string): string;
|
|
18
19
|
export declare function sessionMapPath(home?: string): string;
|
|
@@ -12,23 +12,14 @@
|
|
|
12
12
|
* `conversationId` is `null` until the first turn materializes it.
|
|
13
13
|
*/
|
|
14
14
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
15
|
-
import { homedir } from "node:os";
|
|
16
15
|
import { basename, dirname, join, resolve } from "node:path";
|
|
17
|
-
/** Prod homes that must never be resolved into (repo red line). */
|
|
18
|
-
const PROD_HOMES = [join(homedir(), ".dsh"), join(homedir(), ".superd")];
|
|
19
|
-
function assertNotProdHome(path, label) {
|
|
20
|
-
if (PROD_HOMES.includes(path) || PROD_HOMES.some((p) => path.startsWith(`${p}/`))) {
|
|
21
|
-
throw new Error(`agy-sessions: refusing prod home as ${label}: ${path}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
16
|
/**
|
|
25
17
|
* The adapter's DSH-side world home. Form-A (boot home = DSH home root) nests
|
|
26
|
-
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
18
|
+
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
27
19
|
*/
|
|
28
20
|
export function resolveAgyWorldHome(home) {
|
|
29
|
-
const base = resolve(home ?? process.env.DSH_HOME ?? join(process.cwd(), ".tests", "
|
|
21
|
+
const base = resolve(home ?? process.env.DSH_HOME ?? join(process.cwd(), ".tests", "superd"));
|
|
30
22
|
const dir = basename(base) === "agy" && basename(dirname(base)) === "agents" ? base : join(base, "agents", "agy");
|
|
31
|
-
assertNotProdHome(dir, "agy world home");
|
|
32
23
|
return dir;
|
|
33
24
|
}
|
|
34
25
|
export function sessionMapPath(home) {
|
package/agent-agy/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* agent-agy provider — Google Antigravity (Gemini) provider plugin for DeepSeek
|
|
3
|
-
* Harness (
|
|
3
|
+
* Harness (Super D, consumer-first line, 2026-09-18).
|
|
4
4
|
*
|
|
5
5
|
* An `AgentFactory` that drives an `AgyBridgeClient` (the Python google-
|
|
6
6
|
* antigravity SDK bridge child — localharness materializes inside it on the
|
|
@@ -19,12 +19,11 @@
|
|
|
19
19
|
import { realpathSync, statSync } from "node:fs";
|
|
20
20
|
import { join } from "node:path";
|
|
21
21
|
import { Service } from "@deepseek-ai/cordis";
|
|
22
|
-
import {
|
|
22
|
+
import { installModelSelection } from "@deepseek-ai/dsh-agent";
|
|
23
23
|
import { SessionLogOffset, SessionPreparation, interruptedTurnClosers, } from "@deepseek-ai/dsh-session";
|
|
24
24
|
import { AgyBridgeClient } from "./agy-client.js";
|
|
25
25
|
import { AgyCliClient } from "./agy-cli-client.js";
|
|
26
|
-
import {
|
|
27
|
-
import { agyAgentPresetProjection } from "./agent-preset-projection.js";
|
|
26
|
+
import { registerAntigravityPreset } from "./agent-preset-agy.js";
|
|
28
27
|
import { readAdapterState, writeAdapterState, readNativeDefaultModel, hasAdcEvidence, readGcloudProject } from "./agy-store.js";
|
|
29
28
|
import { AgyLlmAdapter, AGY_PROVIDER_ID } from "./adapter.js";
|
|
30
29
|
import { AgyAgent } from "./agent.js";
|
|
@@ -91,11 +90,12 @@ export class AgyProvider extends Service {
|
|
|
91
90
|
ctx.effect(() => ctx.agents.setFactory(this), "agyProvider.setFactory()");
|
|
92
91
|
// The roster must be visible to the API gateway's root-level remote
|
|
93
92
|
// enumeration; register it on this plugin's own (top-level) fiber.
|
|
94
|
-
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
// 0.1.7: roster/selection/document RPC + the `agentPreset` session
|
|
94
|
+
// projection all live in the host AgentPresetRegistry (mounted by the
|
|
95
|
+
// dsh-web-app bundle's `agent-preset-registry` row; the adapter patch
|
|
96
|
+
// pins its `default` to the Antigravity preset). The adapter only registers
|
|
97
|
+
// its one fixed preset into the registry.
|
|
98
|
+
registerAntigravityPreset(ctx);
|
|
99
99
|
this.registerModelCatalog();
|
|
100
100
|
this.registerDefaultModel();
|
|
101
101
|
}
|
|
@@ -109,7 +109,7 @@ export class AgyProvider extends Service {
|
|
|
109
109
|
if (typeof resolved === "string" && resolved !== "")
|
|
110
110
|
return resolved;
|
|
111
111
|
}
|
|
112
|
-
return process.env.DSH_HOME ?? join(process.cwd(), ".tests", "
|
|
112
|
+
return process.env.DSH_HOME ?? join(process.cwd(), ".tests", "superd");
|
|
113
113
|
}
|
|
114
114
|
/** Effective Gemini API key: adapter state first, then the environment. */
|
|
115
115
|
resolveApiKey() {
|
|
@@ -464,8 +464,9 @@ async function setupAndPublish(loopCtx, ownerCtx, id, agentOptions, setup, sessi
|
|
|
464
464
|
agent.ctx.sessions.announce(session);
|
|
465
465
|
}
|
|
466
466
|
detachAgent = loopCtx.agents.enter(agent, parentAgent);
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
// 0.1.6: announce(agent, source) is required, async, and emits agent/created
|
|
468
|
+
// itself — the manual agent/session-start emission is gone upstream.
|
|
469
|
+
await loopCtx.agents.announce(agent, source);
|
|
469
470
|
let disposed = false;
|
|
470
471
|
let unfollowOwner;
|
|
471
472
|
const dispose = async () => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export declare const name = "
|
|
1
|
+
export declare const name = "agent-agy";
|
|
2
2
|
/** Structural slice of the ctx0 services the mount needs. */
|
|
3
3
|
interface HostContext {
|
|
4
4
|
provide(name: string, value: unknown): void;
|
|
5
5
|
inject(deps: string[], callback: (ctx: unknown) => void): unknown;
|
|
6
6
|
effect?(callback: () => () => void, label?: string): unknown;
|
|
7
|
+
get(name: string): unknown;
|
|
7
8
|
}
|
|
8
9
|
export declare function apply(ctx: HostContext): void;
|
|
9
10
|
export {};
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agent-agy — the Antigravity (agy) adapter's WORLD plugin (spec S2):
|
|
3
3
|
* activation IS roster membership.
|
|
4
4
|
*
|
|
5
|
-
* AW-B
|
|
6
|
-
* and `@pgmi-builds/agent-
|
|
7
|
-
* runtime through one shape: the world is spawned as a
|
|
8
|
-
* with NO listener
|
|
5
|
+
* AW-B data-plane shape (DL1–DL5 → path-separation T-D), mirroring
|
|
6
|
+
* `@pgmi-builds/agent-omp/world` and `@pgmi-builds/agent-codex/world` so the
|
|
7
|
+
* hub sees every foreign runtime through one shape: the world is spawned as a
|
|
8
|
+
* sibling ROOT context with NO listener and NO webui composition
|
|
9
|
+
* (`worldMountPatches`) — a pure data plane behind the hub's `/hub` family.
|
|
9
10
|
*
|
|
10
|
-
* 1. ctx0 publishes the host mount (
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* 1. ctx0 publishes the host mount record (the world's addressability
|
|
12
|
+
* entry — no webServer, no fence: those legs retired with the world
|
|
13
|
+
* pages) before spawn;
|
|
14
|
+
* 2. the world's entry row provides the virtual `webServer` (a silent
|
|
15
|
+
* sink) plus the neutral `webRuntime` facts its connection row injects;
|
|
16
|
+
* 3. the hub's `/hub` family answers `?agent=agy` traffic in ctx0's auth
|
|
17
|
+
* domain and dispatches into this world's gateway instance (the
|
|
18
|
+
* per-label `/<label>/api` + `/<label>/api/remote.mux` mounts retired
|
|
19
|
+
* in T-C, `mountWorld` deleted in T-D).
|
|
15
20
|
*/
|
|
16
21
|
import { mkdirSync } from 'node:fs';
|
|
17
22
|
import { resolveDshHome } from '@deepseek-ai/dsh-home-paths';
|
|
18
23
|
import { join } from 'node:path';
|
|
19
|
-
import { spawnWorld, registerAgent, setReady, registerForeignTarget, registerHostMount,
|
|
20
|
-
export const name = '
|
|
24
|
+
import { spawnWorld, registerAgent, setReady, registerForeignTarget, registerHostMount, worldMountPatches, provisionWorldProfile, resolveInstallAnchor, } from '../../superd-hub/dist/index.js';
|
|
25
|
+
export const name = 'agent-agy';
|
|
21
26
|
/** Runtime key — also the mount label. */
|
|
22
27
|
const KEY = 'agy';
|
|
23
|
-
const ANCHOR = process.env.SUPERD_DSH_ANCHOR
|
|
24
|
-
?? '/home/u1/.local/lib/node_modules/@deepseek-ai/dsh/package.json';
|
|
25
28
|
export function apply(ctx) {
|
|
26
29
|
registerAgent({ key: KEY, label: 'Antigravity', ready: false });
|
|
27
30
|
// Harness resolver (env → ~/.dsh): a consumer install has no DSH_HOME and
|
|
@@ -35,57 +38,34 @@ export function apply(ctx) {
|
|
|
35
38
|
const worldHome = join(root, 'agents', KEY);
|
|
36
39
|
mkdirSync(join(worldHome, 'profiles'), { recursive: true });
|
|
37
40
|
// Publish story: a foreign install has no line bootstrap, so the nested
|
|
38
|
-
// profile + @pgmi-builds links are provisioned HERE (idempotent
|
|
39
|
-
|
|
40
|
-
// overrides the resolved base).
|
|
41
|
-
const bareBase = provisionWorldProfile({
|
|
41
|
+
// profile + @pgmi-builds links are provisioned HERE (idempotent).
|
|
42
|
+
provisionWorldProfile({
|
|
42
43
|
key: KEY,
|
|
43
|
-
adapterPkg: '@pgmi-builds/agent-
|
|
44
|
+
adapterPkg: '@pgmi-builds/agent-agy',
|
|
44
45
|
worldHome,
|
|
45
46
|
});
|
|
46
47
|
const world = (async () => {
|
|
47
|
-
//
|
|
48
|
-
// the
|
|
49
|
-
const
|
|
50
|
-
ctx.inject(['webServer', 'connection'], (hostCtx) => { resolve(hostCtx); });
|
|
51
|
-
});
|
|
52
|
-
const real = host['webServer'];
|
|
53
|
-
const connection = host['connection'];
|
|
54
|
-
const dropHostMount = registerHostMount({
|
|
55
|
-
key: KEY,
|
|
56
|
-
labelPath: `/${KEY}`,
|
|
57
|
-
real,
|
|
58
|
-
// ctx0's index gate, applied by the mount to this world's pages and assets:
|
|
59
|
-
// the world is reached in-ctx and owns no listener, so ctx0 decides auth.
|
|
60
|
-
authorize: (req, res) => connection.authorizeIndex(req, res),
|
|
61
|
-
});
|
|
48
|
+
// T-D: no ctx0 listening-stack wait — the mount record is addressability
|
|
49
|
+
// only and the /hub family wires its own gate in ctx0 (gateway.ts).
|
|
50
|
+
const dropHostMount = registerHostMount({ key: KEY, labelPath: `/${KEY}` });
|
|
62
51
|
const ctxW = await spawnWorld({
|
|
63
|
-
appName: `
|
|
52
|
+
appName: `superd-${KEY}`,
|
|
64
53
|
profileName: 'web',
|
|
65
|
-
installAnchor:
|
|
54
|
+
installAnchor: resolveInstallAnchor(ctx), // lazy: never at module scope — import must stay side-effect-free
|
|
66
55
|
home: worldHome,
|
|
67
56
|
dataHome: worldHome,
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
bareModuleBaseUrl: process.env.AW_BARE_BASE ?? bareBase ?? undefined,
|
|
57
|
+
// The host's live table carries this world: spawnWorld republishes a
|
|
58
|
+
// widened successor before boot imports anything (spec §2.1), and
|
|
59
|
+
// @pgmi-builds rows resolve from the profile-local links written above.
|
|
60
|
+
host: ctx,
|
|
73
61
|
extraPatches: worldMountPatches(KEY),
|
|
74
62
|
});
|
|
75
63
|
const gateway = ctxW.get('typertGateway');
|
|
76
64
|
registerForeignTarget({ key: KEY, gateway });
|
|
77
|
-
const mounted = mountWorld({
|
|
78
|
-
real,
|
|
79
|
-
label: KEY,
|
|
80
|
-
gateway,
|
|
81
|
-
requestRejection: (request) => connection
|
|
82
|
-
.requestRejection(request),
|
|
83
|
-
});
|
|
84
65
|
setReady(KEY, true);
|
|
85
66
|
ctx.effect?.(() => () => {
|
|
86
|
-
mounted.dispose();
|
|
87
67
|
dropHostMount();
|
|
88
|
-
}, `
|
|
68
|
+
}, `agent-${KEY}: mount`);
|
|
89
69
|
return ctxW;
|
|
90
70
|
})().catch((cause) => {
|
|
91
71
|
// A failed world degrades to a not-ready roster row; a rejected provided
|
|
@@ -93,5 +73,5 @@ export function apply(ctx) {
|
|
|
93
73
|
console.error(`[super-dsh] ${KEY} world failed:`, cause);
|
|
94
74
|
return null;
|
|
95
75
|
});
|
|
96
|
-
ctx.provide(`
|
|
76
|
+
ctx.provide(`superd.world.${KEY}`, world);
|
|
97
77
|
}
|
package/agent-agy/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@pgmi-builds/agent-
|
|
2
|
+
"name": "@pgmi-builds/agent-agy",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Google Antigravity (Gemini) provider for DeepSeek Harness (dsh) — drives the google-antigravity Python SDK through a JSONL stdio bridge (bridge/agy_bridge.py, localharness embedded). Consumer-first auth: Gemini API key stored adapter-side; ADC picked up transparently by the SDK. The agy CLI is never invoked.",
|
|
5
5
|
"type": "module",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
30
|
-
"@deepseek-ai/dsh-agent": "0.1.5-
|
|
31
|
-
"@deepseek-ai/dsh-llm": "0.1.5-
|
|
32
|
-
"@deepseek-ai/dsh-scope": "0.1.5-
|
|
33
|
-
"@deepseek-ai/dsh-session": "0.1.5-
|
|
34
|
-
"@deepseek-ai/dsh-session-persistence": "0.1.5-
|
|
30
|
+
"@deepseek-ai/dsh-agent": ">=0.1.5-0 <0.3.0-0",
|
|
31
|
+
"@deepseek-ai/dsh-llm": ">=0.1.5-0 <0.3.0-0",
|
|
32
|
+
"@deepseek-ai/dsh-scope": ">=0.1.5-0 <0.3.0-0",
|
|
33
|
+
"@deepseek-ai/dsh-session": ">=0.1.5-0 <0.3.0-0",
|
|
34
|
+
"@deepseek-ai/dsh-session-persistence": ">=0.1.5-0 <0.3.0-0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@deepseek-ai/cordis": {
|