super-dsh 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- 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 +16 -21
- 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 +15 -20
- 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 +16 -21
- 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 +22 -19
- 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 +16 -21
- package/agent-pi/package.json +14 -11
- package/cordis.patch.yml +31 -21
- package/package.json +30 -38
- package/{agent-hub → superd-hub}/cordis.patch.yml +3 -3
- package/{agent-hub → superd-hub}/dist/carrier.d.ts +9 -3
- package/{agent-hub → superd-hub}/dist/carrier.js +29 -3
- package/{agent-hub → superd-hub}/dist/gateway.d.ts +2 -2
- package/{agent-hub → superd-hub}/dist/gateway.js +1 -1
- package/{agent-hub → superd-hub}/dist/index.d.ts +5 -3
- package/{agent-hub → superd-hub}/dist/index.js +5 -3
- 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 +277 -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/{agent-hub → superd-hub}/dist/world-entry.d.ts +2 -2
- package/{agent-hub → superd-hub}/dist/world-entry.js +4 -4
- package/{agent-hub → superd-hub}/dist/world-host.d.ts +1 -1
- package/{agent-hub → superd-hub}/dist/world-join.d.ts +2 -1
- package/{agent-hub → superd-hub}/dist/world-join.js +16 -21
- package/{agent-hub → superd-hub}/dist/world-mount.d.ts +14 -6
- package/{agent-hub → superd-hub}/dist/world-mount.js +28 -7
- 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 +196 -0
- package/{agent-hub → superd-hub}/dist/world-web-server.js +7 -1
- package/{agent-hub → superd-hub}/package.json +9 -16
- package/agent-hub/dist/spawn-world.js +0 -72
- package/agent-hub/dist/world-mux.js +0 -224
- package/agent-hub/dist/world-provision.js +0 -122
- package/agent-hub/lib/client/index.js +0 -242
- package/client/index.js +0 -242
- /package/{agent-hub → superd-hub}/dist/agent-roster.d.ts +0 -0
- /package/{agent-hub → superd-hub}/dist/agent-roster.js +0 -0
- /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/{agent-hub → superd-hub}/dist/world-host.js +0 -0
- /package/{agent-hub → superd-hub}/dist/world-web-server.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
foreign-agent runtimes into the DSH Web UI:
|
|
5
|
-
|
|
4
|
+
foreign-agent runtimes into the DSH Web UI: one zero-port world per runtime
|
|
5
|
+
mounted under `/<label>` —
|
|
6
6
|
same browser shell, same auth domain, per-world session separation.
|
|
7
7
|
|
|
8
8
|
**Owns no runtimes and stores no conversations.** Every adapter keeps its
|
|
@@ -14,12 +14,12 @@ the foreign store.
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
dsh plugin --profile <name> add super-dsh@0.1.
|
|
17
|
+
dsh plugin --profile <name> add super-dsh@0.1.4
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
That single package composes the whole line (`@pgmi-builds/
|
|
21
|
-
six `@pgmi-builds/agent
|
|
22
|
-
|
|
20
|
+
That single package composes the whole line (`@pgmi-builds/superd-hub` plus the
|
|
21
|
+
six `@pgmi-builds/agent-*` packages). Restart the profile and each world
|
|
22
|
+
provisions its own nested DSH
|
|
23
23
|
home under `<DSH_HOME>/agents/<label>/` on first boot.
|
|
24
24
|
|
|
25
25
|
## Runtimes
|
|
@@ -35,7 +35,8 @@ home under `<DSH_HOME>/agents/<label>/` on first boot.
|
|
|
35
35
|
|
|
36
36
|
## Design
|
|
37
37
|
|
|
38
|
-
- **S1**
|
|
38
|
+
- **S1** addressing is one hop: the addressed world is the request's mount
|
|
39
|
+
path; the dispatcher never addresses sessions.
|
|
39
40
|
- **S2** activation is roster membership; worlds spawn as sibling roots
|
|
40
41
|
(`boot()` on the CTX0 tree), never through `runProfile()`.
|
|
41
42
|
- **S3/S7** `<DSH_HOME>/agents/<runtime>/` is that runtime's whole world; native
|
|
@@ -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,9 +1,9 @@
|
|
|
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 URL scheme (DL1–DL5), mirroring `@pgmi-builds/agent-
|
|
6
|
-
* and `@pgmi-builds/agent-
|
|
5
|
+
* AW-B URL scheme (DL1–DL5), mirroring `@pgmi-builds/agent-omp/world`
|
|
6
|
+
* and `@pgmi-builds/agent-codex/world` so the hub sees every foreign
|
|
7
7
|
* runtime through one shape: the world is spawned as a sibling ROOT context
|
|
8
8
|
* with NO listener (`worldMountPatches`) and mounts itself under `/agy`.
|
|
9
9
|
*
|
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
import { mkdirSync } from 'node:fs';
|
|
17
17
|
import { resolveDshHome } from '@deepseek-ai/dsh-home-paths';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
|
-
import { spawnWorld, registerAgent, setReady, registerForeignTarget, registerHostMount, mountWorld, worldMountPatches, provisionWorldProfile, } from '../../
|
|
20
|
-
export const name = '
|
|
19
|
+
import { spawnWorld, registerAgent, setReady, registerForeignTarget, registerHostMount, mountWorld, worldMountPatches, provisionWorldProfile, resolveInstallAnchor, } from '../../superd-hub/dist/index.js';
|
|
20
|
+
export const name = 'agent-agy';
|
|
21
21
|
/** Runtime key — also the mount label. */
|
|
22
22
|
const KEY = 'agy';
|
|
23
|
-
const ANCHOR = process.env.SUPERD_DSH_ANCHOR
|
|
24
|
-
?? '/home/u1/.local/lib/node_modules/@deepseek-ai/dsh/package.json';
|
|
25
23
|
export function apply(ctx) {
|
|
26
24
|
registerAgent({ key: KEY, label: 'Antigravity', ready: false });
|
|
27
25
|
// Harness resolver (env → ~/.dsh): a consumer install has no DSH_HOME and
|
|
@@ -35,12 +33,10 @@ export function apply(ctx) {
|
|
|
35
33
|
const worldHome = join(root, 'agents', KEY);
|
|
36
34
|
mkdirSync(join(worldHome, 'profiles'), { recursive: true });
|
|
37
35
|
// 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({
|
|
36
|
+
// profile + @pgmi-builds links are provisioned HERE (idempotent).
|
|
37
|
+
provisionWorldProfile({
|
|
42
38
|
key: KEY,
|
|
43
|
-
adapterPkg: '@pgmi-builds/agent-
|
|
39
|
+
adapterPkg: '@pgmi-builds/agent-agy',
|
|
44
40
|
worldHome,
|
|
45
41
|
});
|
|
46
42
|
const world = (async () => {
|
|
@@ -60,16 +56,15 @@ export function apply(ctx) {
|
|
|
60
56
|
authorize: (req, res) => connection.authorizeIndex(req, res),
|
|
61
57
|
});
|
|
62
58
|
const ctxW = await spawnWorld({
|
|
63
|
-
appName: `
|
|
59
|
+
appName: `superd-${KEY}`,
|
|
64
60
|
profileName: 'web',
|
|
65
|
-
installAnchor:
|
|
61
|
+
installAnchor: resolveInstallAnchor(ctx), // lazy: never at module scope — import must stay side-effect-free
|
|
66
62
|
home: worldHome,
|
|
67
63
|
dataHome: worldHome,
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
bareModuleBaseUrl: process.env.AW_BARE_BASE ?? bareBase ?? undefined,
|
|
64
|
+
// The host's live table carries this world: spawnWorld republishes a
|
|
65
|
+
// widened successor before boot imports anything (spec §2.1), and
|
|
66
|
+
// @pgmi-builds rows resolve from the profile-local links written above.
|
|
67
|
+
host: ctx,
|
|
73
68
|
extraPatches: worldMountPatches(KEY),
|
|
74
69
|
});
|
|
75
70
|
const gateway = ctxW.get('typertGateway');
|
|
@@ -85,7 +80,7 @@ export function apply(ctx) {
|
|
|
85
80
|
ctx.effect?.(() => () => {
|
|
86
81
|
mounted.dispose();
|
|
87
82
|
dropHostMount();
|
|
88
|
-
}, `
|
|
83
|
+
}, `agent-${KEY}: mount`);
|
|
89
84
|
return ctxW;
|
|
90
85
|
})().catch((cause) => {
|
|
91
86
|
// A failed world degrades to a not-ready roster row; a rejected provided
|
|
@@ -93,5 +88,5 @@ export function apply(ctx) {
|
|
|
93
88
|
console.error(`[super-dsh] ${KEY} world failed:`, cause);
|
|
94
89
|
return null;
|
|
95
90
|
});
|
|
96
|
-
ctx.provide(`
|
|
91
|
+
ctx.provide(`superd.world.${KEY}`, world);
|
|
97
92
|
}
|
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": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @pgmi-builds/agent-
|
|
1
|
+
# @pgmi-builds/agent-claude bundle patch (standalone web app form).
|
|
2
2
|
- insert:
|
|
3
3
|
- id: claude-provider
|
|
4
|
-
name: '@pgmi-builds/agent-
|
|
4
|
+
name: '@pgmi-builds/agent-claude'
|
|
5
5
|
|
|
6
6
|
- id: agent-loop
|
|
7
7
|
disabled: true
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
disabled: true
|
|
10
10
|
- id: llm-pi-ai
|
|
11
11
|
disabled: true
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
# 0.1.7: the host AgentPresetRegistry row (renamed `agent-presets` ->
|
|
13
|
+
# `agent-preset-registry`) stays MOUNTED — the adapter registers its one
|
|
14
|
+
# fixed preset into it (src/agent-preset-claude.ts); pin only the default.
|
|
15
|
+
- id: agent-preset-registry
|
|
16
|
+
config:
|
|
17
|
+
default: claude
|
|
14
18
|
|
|
15
19
|
# The upstream jsonl persistence row STAYS MOUNTED: the provider owns the DSH
|
|
16
20
|
# session log write channel, so list/read/replay are ordinary DSH services.
|