@0gfoundation/0g-agentdna 0.4.0 → 0.5.0
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/GUIDE.md +190 -40
- package/OPERATORS.md +164 -0
- package/OPERATORS.zh.md +141 -0
- package/PROVIDERS.md +6 -0
- package/PROVIDERS.zh.md +3 -1
- package/README.md +84 -11
- package/dist/AgentClient.d.ts +374 -26
- package/dist/AgentClient.d.ts.map +1 -1
- package/dist/AgentClient.js +323 -40
- package/dist/AgentClient.js.map +1 -1
- package/dist/AgenticID.d.ts +170 -80
- package/dist/AgenticID.d.ts.map +1 -1
- package/dist/AgenticID.js +300 -42
- package/dist/AgenticID.js.map +1 -1
- package/dist/AttestorClient.d.ts +115 -31
- package/dist/AttestorClient.d.ts.map +1 -1
- package/dist/AttestorClient.js +276 -56
- package/dist/AttestorClient.js.map +1 -1
- package/dist/Credentials.d.ts +574 -0
- package/dist/Credentials.d.ts.map +1 -0
- package/dist/Credentials.js +838 -0
- package/dist/Credentials.js.map +1 -0
- package/dist/Operators.d.ts +60 -0
- package/dist/Operators.d.ts.map +1 -0
- package/dist/Operators.js +38 -0
- package/dist/Operators.js.map +1 -0
- package/dist/Providers.d.ts +13 -0
- package/dist/Providers.d.ts.map +1 -1
- package/dist/Providers.js +20 -1
- package/dist/Providers.js.map +1 -1
- package/dist/Releases.d.ts +51 -0
- package/dist/Releases.d.ts.map +1 -0
- package/dist/Releases.js +72 -0
- package/dist/Releases.js.map +1 -0
- package/dist/ReputationClient.d.ts +47 -3
- package/dist/ReputationClient.d.ts.map +1 -1
- package/dist/ReputationClient.js +204 -78
- package/dist/ReputationClient.js.map +1 -1
- package/dist/ServeProof.d.ts +70 -23
- package/dist/ServeProof.d.ts.map +1 -1
- package/dist/ServeProof.js +94 -35
- package/dist/ServeProof.js.map +1 -1
- package/dist/ServeSession.d.ts +17 -2
- package/dist/ServeSession.d.ts.map +1 -1
- package/dist/ServeSession.js +77 -9
- package/dist/ServeSession.js.map +1 -1
- package/dist/Settings.d.ts +25 -1
- package/dist/Settings.d.ts.map +1 -1
- package/dist/Settings.js +53 -1
- package/dist/Settings.js.map +1 -1
- package/dist/TrustRegistry.d.ts +28 -0
- package/dist/TrustRegistry.d.ts.map +1 -0
- package/dist/TrustRegistry.js +67 -0
- package/dist/TrustRegistry.js.map +1 -0
- package/dist/abi.d.ts +346 -34
- package/dist/abi.d.ts.map +1 -1
- package/dist/abi.js +150 -30
- package/dist/abi.js.map +1 -1
- package/dist/cli/attach.d.ts +79 -0
- package/dist/cli/attach.d.ts.map +1 -0
- package/dist/cli/attach.js +253 -0
- package/dist/cli/attach.js.map +1 -0
- package/dist/cli/commands/cells.d.ts +45 -0
- package/dist/cli/commands/cells.d.ts.map +1 -1
- package/dist/cli/commands/cells.js +77 -0
- package/dist/cli/commands/cells.js.map +1 -1
- package/dist/cli/commands/cred.d.ts +12 -0
- package/dist/cli/commands/cred.d.ts.map +1 -0
- package/dist/cli/commands/cred.js +43 -0
- package/dist/cli/commands/cred.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +44 -35
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/interactive.d.ts +597 -21
- package/dist/cli/commands/interactive.d.ts.map +1 -1
- package/dist/cli/commands/interactive.js +5082 -1323
- package/dist/cli/commands/interactive.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -5
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +21 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/providers.d.ts +4 -0
- package/dist/cli/commands/providers.d.ts.map +1 -1
- package/dist/cli/commands/providers.js +19 -5
- package/dist/cli/commands/providers.js.map +1 -1
- package/dist/cli/commands/releases.d.ts +13 -0
- package/dist/cli/commands/releases.d.ts.map +1 -0
- package/dist/cli/commands/releases.js +65 -0
- package/dist/cli/commands/releases.js.map +1 -0
- package/dist/cli/commands/settings.d.ts +5 -0
- package/dist/cli/commands/settings.d.ts.map +1 -1
- package/dist/cli/commands/settings.js +70 -24
- package/dist/cli/commands/settings.js.map +1 -1
- package/dist/cli/commands/status.d.ts +2 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +22 -19
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/config.d.ts +48 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +114 -5
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/credentials.d.ts +179 -0
- package/dist/cli/credentials.d.ts.map +1 -0
- package/dist/cli/credentials.js +1443 -0
- package/dist/cli/credentials.js.map +1 -0
- package/dist/cli/download.d.ts +21 -0
- package/dist/cli/download.d.ts.map +1 -0
- package/dist/cli/download.js +89 -0
- package/dist/cli/download.js.map +1 -0
- package/dist/cli/env.d.ts +6 -0
- package/dist/cli/env.d.ts.map +1 -1
- package/dist/cli/env.js +18 -6
- package/dist/cli/env.js.map +1 -1
- package/dist/cli/envelope.d.ts +4 -2
- package/dist/cli/envelope.d.ts.map +1 -1
- package/dist/cli/envelope.js +10 -6
- package/dist/cli/envelope.js.map +1 -1
- package/dist/cli/errors.d.ts +45 -1
- package/dist/cli/errors.d.ts.map +1 -1
- package/dist/cli/errors.js +77 -0
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/inference.d.ts.map +1 -1
- package/dist/cli/inference.js +7 -0
- package/dist/cli/inference.js.map +1 -1
- package/dist/cli/inkView.d.ts +341 -0
- package/dist/cli/inkView.d.ts.map +1 -0
- package/dist/cli/inkView.js +1019 -0
- package/dist/cli/inkView.js.map +1 -0
- package/dist/cli/legacy/modelKey.d.ts +24 -0
- package/dist/cli/legacy/modelKey.d.ts.map +1 -0
- package/dist/cli/legacy/modelKey.js +32 -0
- package/dist/cli/legacy/modelKey.js.map +1 -0
- package/dist/cli/livePrompt.d.ts +212 -0
- package/dist/cli/livePrompt.d.ts.map +1 -0
- package/dist/cli/livePrompt.js +576 -0
- package/dist/cli/livePrompt.js.map +1 -0
- package/dist/cli/main.js +206 -72
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/modelkey.d.ts +64 -0
- package/dist/cli/modelkey.d.ts.map +1 -0
- package/dist/cli/modelkey.js +113 -0
- package/dist/cli/modelkey.js.map +1 -0
- package/dist/cli/outboxSync.d.ts +51 -0
- package/dist/cli/outboxSync.d.ts.map +1 -0
- package/dist/cli/outboxSync.js +210 -0
- package/dist/cli/outboxSync.js.map +1 -0
- package/dist/cli/plain.d.ts +46 -0
- package/dist/cli/plain.d.ts.map +1 -0
- package/dist/cli/plain.js +260 -0
- package/dist/cli/plain.js.map +1 -0
- package/dist/cli/proofs.d.ts +5 -0
- package/dist/cli/proofs.d.ts.map +1 -1
- package/dist/cli/proofs.js +20 -0
- package/dist/cli/proofs.js.map +1 -1
- package/dist/cli/ref.d.ts.map +1 -1
- package/dist/cli/ref.js +3 -2
- package/dist/cli/ref.js.map +1 -1
- package/dist/cli/releaseNotice.d.ts +64 -0
- package/dist/cli/releaseNotice.d.ts.map +1 -0
- package/dist/cli/releaseNotice.js +194 -0
- package/dist/cli/releaseNotice.js.map +1 -0
- package/dist/cli/sdk.d.ts +18 -0
- package/dist/cli/sdk.d.ts.map +1 -1
- package/dist/cli/sdk.js +99 -1
- package/dist/cli/sdk.js.map +1 -1
- package/dist/cli/settings.d.ts +87 -6
- package/dist/cli/settings.d.ts.map +1 -1
- package/dist/cli/settings.js +270 -18
- package/dist/cli/settings.js.map +1 -1
- package/dist/cli/textfit.d.ts +28 -0
- package/dist/cli/textfit.d.ts.map +1 -0
- package/dist/cli/textfit.js +111 -0
- package/dist/cli/textfit.js.map +1 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/context.d.ts +26 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -0
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy/modelKey.d.ts +67 -0
- package/dist/legacy/modelKey.d.ts.map +1 -0
- package/dist/legacy/modelKey.js +80 -0
- package/dist/legacy/modelKey.js.map +1 -0
- package/dist/legacy/serveProofV1.d.ts +56 -0
- package/dist/legacy/serveProofV1.d.ts.map +1 -0
- package/dist/legacy/serveProofV1.js +91 -0
- package/dist/legacy/serveProofV1.js.map +1 -0
- package/dist/provider-catalog.json +3 -2
- package/dist/secretEnv.d.ts +18 -3
- package/dist/secretEnv.d.ts.map +1 -1
- package/dist/secretEnv.js +16 -2
- package/dist/secretEnv.js.map +1 -1
- package/dist/types.d.ts +63 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/viemErrors.d.ts +30 -0
- package/dist/viemErrors.d.ts.map +1 -0
- package/dist/viemErrors.js +36 -0
- package/dist/viemErrors.js.map +1 -0
- package/package.json +5 -1
- package/src/AgentClient.ts +622 -68
- package/src/AgenticID.ts +345 -56
- package/src/AttestorClient.ts +330 -83
- package/src/Credentials.ts +1027 -0
- package/src/Operators.ts +71 -0
- package/src/Providers.ts +20 -0
- package/src/Releases.ts +95 -0
- package/src/ReputationClient.ts +231 -79
- package/src/ServeProof.ts +123 -39
- package/src/ServeSession.ts +91 -9
- package/src/Settings.ts +61 -1
- package/src/TrustRegistry.ts +75 -0
- package/src/abi.ts +153 -30
- package/src/cli/attach.ts +257 -0
- package/src/cli/commands/cells.ts +104 -0
- package/src/cli/commands/cred.ts +44 -0
- package/src/cli/commands/doctor.ts +45 -37
- package/src/cli/commands/interactive.ts +4120 -664
- package/src/cli/commands/list.ts +21 -30
- package/src/cli/commands/providers.ts +17 -4
- package/src/cli/commands/releases.ts +60 -0
- package/src/cli/commands/settings.ts +75 -28
- package/src/cli/commands/status.ts +24 -21
- package/src/cli/config.ts +119 -4
- package/src/cli/credentials.ts +1379 -0
- package/src/cli/download.ts +80 -0
- package/src/cli/env.ts +22 -7
- package/src/cli/envelope.ts +10 -6
- package/src/cli/errors.ts +92 -0
- package/src/cli/inference.ts +8 -1
- package/src/cli/inkView.ts +969 -0
- package/src/cli/legacy/modelKey.ts +35 -0
- package/src/cli/livePrompt.ts +615 -0
- package/src/cli/main.ts +206 -76
- package/src/cli/modelkey.ts +124 -0
- package/src/cli/outboxSync.ts +231 -0
- package/src/cli/plain.ts +260 -0
- package/src/cli/proofs.ts +27 -0
- package/src/cli/ref.ts +5 -4
- package/src/cli/releaseNotice.ts +200 -0
- package/src/cli/sdk.ts +87 -7
- package/src/cli/settings.ts +272 -22
- package/src/cli/textfit.ts +95 -0
- package/src/constants.ts +1 -1
- package/src/context.ts +28 -0
- package/src/index.ts +50 -7
- package/src/legacy/modelKey.ts +80 -0
- package/src/legacy/serveProofV1.ts +124 -0
- package/src/provider-catalog.json +3 -2
- package/src/secretEnv.ts +18 -3
- package/src/types.ts +60 -1
- package/src/viemErrors.ts +39 -0
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* JSON mode: `data` IS the row array (empty list → `[]`, exit 0 — not an
|
|
12
12
|
* error) and carries the FULL row (sealId, url, sandboxId, framework, whole
|
|
13
13
|
* addresses, …). Human mode is the glance: the columns that identify a row
|
|
14
|
-
* and expose nesting
|
|
15
|
-
* AGENTID cell (`0x` + 10
|
|
16
|
-
*
|
|
17
|
-
* handle); NAME is last and sanitized
|
|
18
|
-
* the table).
|
|
14
|
+
* and expose nesting, fitted to the terminal's width (./cells: listLayout).
|
|
15
|
+
* Unminted rows render their sealId prefix in the AGENTID cell (`0x` + 10
|
|
16
|
+
* hex, the paste-back form the sealPrefix ref resolves — an unminted row has
|
|
17
|
+
* no agentId, so the prefix is its only handle); NAME is last and sanitized
|
|
18
|
+
* (owner-controlled JSON cannot forge the table).
|
|
19
19
|
*
|
|
20
20
|
* Nesting visibility (follow-up to #187 / #183-c4): the AGENTSEAL and OWNER
|
|
21
21
|
* columns use the same short form, so an agent-owned agent is visible at a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,wBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C5D"}
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* JSON mode: `data` IS the row array (empty list → `[]`, exit 0 — not an
|
|
13
13
|
* error) and carries the FULL row (sealId, url, sandboxId, framework, whole
|
|
14
14
|
* addresses, …). Human mode is the glance: the columns that identify a row
|
|
15
|
-
* and expose nesting
|
|
16
|
-
* AGENTID cell (`0x` + 10
|
|
17
|
-
*
|
|
18
|
-
* handle); NAME is last and sanitized
|
|
19
|
-
* the table).
|
|
15
|
+
* and expose nesting, fitted to the terminal's width (./cells: listLayout).
|
|
16
|
+
* Unminted rows render their sealId prefix in the AGENTID cell (`0x` + 10
|
|
17
|
+
* hex, the paste-back form the sealPrefix ref resolves — an unminted row has
|
|
18
|
+
* no agentId, so the prefix is its only handle); NAME is last and sanitized
|
|
19
|
+
* (owner-controlled JSON cannot forge the table).
|
|
20
20
|
*
|
|
21
21
|
* Nesting visibility (follow-up to #187 / #183-c4): the AGENTSEAL and OWNER
|
|
22
22
|
* columns use the same short form, so an agent-owned agent is visible at a
|
|
@@ -31,6 +31,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.run = run;
|
|
32
32
|
const sdk_1 = require("../sdk");
|
|
33
33
|
const cells_1 = require("./cells");
|
|
34
|
+
const textfit_1 = require("../textfit");
|
|
34
35
|
const errors_1 = require("../errors");
|
|
35
36
|
const envelope_1 = require("../envelope");
|
|
36
37
|
/** The deployment phases derive_phase() can produce — the valid --phase values. */
|
|
@@ -38,6 +39,14 @@ const PHASES = ['deploying', 'running', 'stopped', 'offline', 'failed'];
|
|
|
38
39
|
async function run(ctx) {
|
|
39
40
|
// Validate --phase BEFORE any network work: a typo'd phase must be a loud
|
|
40
41
|
// exit-2, not a plausible-looking empty success (agent-walkthrough finding).
|
|
42
|
+
if (ctx.positionals.length) {
|
|
43
|
+
// An agent ref there wants that agent's picture; anything else, the help.
|
|
44
|
+
const word = (0, cells_1.cleanCell)(ctx.positionals[0]);
|
|
45
|
+
const isRef = /^(?:\d+|0x[0-9a-fA-F]{8,64})$/.test(ctx.positionals[0]);
|
|
46
|
+
throw new errors_1.CliError('BAD_FLAG', `list takes no argument (got "${word}")`, {
|
|
47
|
+
remedy: isRef ? `0g-agentdna status ${word} # one agent's full picture` : '0g-agentdna --help',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
41
50
|
if (ctx.flags.phase && !PHASES.includes(ctx.flags.phase)) {
|
|
42
51
|
throw new errors_1.CliError('BAD_FLAG', `--phase must be one of ${PHASES.join('|')}, got "${ctx.flags.phase}"`, {
|
|
43
52
|
remedy: '0g-agentdna list --phase failed',
|
|
@@ -63,28 +72,14 @@ async function run(ctx) {
|
|
|
63
72
|
// Nesting annotation map, built from `all`, not `rows`: a --phase filter
|
|
64
73
|
// must not strip the annotation off a child row whose parent falls outside
|
|
65
74
|
// the filtered view (./cells: sealToAgentMap). The OWNER cell pads but
|
|
66
|
-
// never truncates its trusted annotation (./cells: trustedCell).
|
|
75
|
+
// never truncates its trusted annotation (./cells: trustedCell). Cells are
|
|
76
|
+
// sanitized in ./cells (shared with the shell's listing — a name must not
|
|
77
|
+
// be able to forge a row in either), and the columns fit the terminal.
|
|
67
78
|
const sealToAgent = (0, cells_1.sealToAgentMap)(all);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const cell = cells_1.cellText;
|
|
73
|
-
// An unminted row has no agentId, owner, agentSeal or name — its sealId
|
|
74
|
-
// prefix is the only handle (F12: paste it back into any command; the
|
|
75
|
-
// sealPrefix ref resolves it uniquely). Render it in the AGENTID cell so
|
|
76
|
-
// two unminted rows stay distinguishable in human mode.
|
|
77
|
-
const idCell = (r) => {
|
|
78
|
-
if (r.agentId != null)
|
|
79
|
-
return cell(r.agentId, 13);
|
|
80
|
-
return cell(`0x${r.sealId.slice(2, 12)}`, 13);
|
|
81
|
-
};
|
|
82
|
-
(0, envelope_1.print)(`${'AGENTID'.padEnd(13)}${'PHASE'.padEnd(11)}${'FRAMEWORK'.padEnd(12)}` +
|
|
83
|
-
`${'AGENTSEAL'.padEnd(13)}${'OWNER'.padEnd(24)}NAME`);
|
|
84
|
-
for (const r of rows) {
|
|
85
|
-
(0, envelope_1.print)(`${idCell(r)}${cell(r.phase, 11)}${cell(r.framework, 12)}` +
|
|
86
|
-
`${cell((0, cells_1.shortAddr)(r.agentSeal), 13)}${(0, cells_1.trustedCell)(ownerCell(r.owner), 24)}${cell(r.name, 19)}`);
|
|
87
|
-
}
|
|
79
|
+
const layout = (0, cells_1.listLayout)((0, textfit_1.termWidth)(), 0, (0, cells_1.ownerColumnWidth)(rows.map((r) => r.owner), sealToAgent), 19);
|
|
80
|
+
(0, envelope_1.print)((0, cells_1.listHeader)(layout));
|
|
81
|
+
for (const r of rows)
|
|
82
|
+
(0, envelope_1.print)((0, cells_1.listCells)(r, r.owner, sealToAgent, layout));
|
|
88
83
|
(0, envelope_1.print)('');
|
|
89
84
|
(0, envelope_1.print)(`${rows.length} deployment(s)${ctx.flags.phase ? ` (phase=${ctx.flags.phase})` : ''}${ctx.flags.mine ? ' — owner tier' : ''}`);
|
|
90
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;
|
|
1
|
+
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AAS,EAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACxE,IAAA,gBAAK,EAAC,EAAE,CAAC,CAAC;IACV,IAAA,gBAAK,EAAC,GAAG,IAAI,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACvI,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { type InferenceProvider } from '../../Providers';
|
|
1
2
|
import type { CommandContext } from '../types';
|
|
3
|
+
/** The registry as an aligned table: id, name, formats, web search. On a
|
|
4
|
+
* terminal narrower than the table, NAME (the id says it) goes first. */
|
|
5
|
+
export declare function renderProviders(providers: readonly InferenceProvider[], width?: number): string[];
|
|
2
6
|
export declare function run(ctx: CommandContext): Promise<void>;
|
|
3
7
|
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/providers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/providers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAK5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;0EAC0E;AAC1E,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CASjG;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5D"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderProviders = renderProviders;
|
|
3
4
|
exports.run = run;
|
|
4
5
|
/** Read-only discovery of the platform provider registry. */
|
|
5
6
|
const sdk_1 = require("../sdk");
|
|
7
|
+
const Providers_1 = require("../../Providers");
|
|
6
8
|
const errors_1 = require("../errors");
|
|
7
9
|
const envelope_1 = require("../envelope");
|
|
10
|
+
const cells_1 = require("./cells");
|
|
11
|
+
const textfit_1 = require("../textfit");
|
|
12
|
+
/** The registry as an aligned table: id, name, formats, web search. On a
|
|
13
|
+
* terminal narrower than the table, NAME (the id says it) goes first. */
|
|
14
|
+
function renderProviders(providers, width) {
|
|
15
|
+
const all = [
|
|
16
|
+
['ID', 'NAME', 'FORMATS', 'WEB SEARCH'],
|
|
17
|
+
...providers.map((p) => [p.id, p.name, p.formats.join(', '), (0, Providers_1.providerWebSearch)(p) ?? '-'].map((c) => (0, cells_1.cleanCell)(c))),
|
|
18
|
+
];
|
|
19
|
+
const span = (rs) => rs[0].reduce((n, _, i) => n + Math.max(...rs.map((r) => [...r[i]].length)) + 2, 0);
|
|
20
|
+
const rows = width && span(all) > width ? all.map((r) => r.filter((_, i) => i !== 1)) : all;
|
|
21
|
+
const widths = rows[0].map((_, i) => Math.max(...rows.map((r) => [...r[i]].length)));
|
|
22
|
+
return rows.map((r) => r.map((c, i) => (i === r.length - 1 ? c : c.padEnd(widths[i] + 2))).join('').trimEnd());
|
|
23
|
+
}
|
|
8
24
|
async function run(ctx) {
|
|
9
25
|
if (ctx.positionals.length)
|
|
10
26
|
throw new errors_1.CliError('BAD_FLAG', 'usage: providers (read-only)');
|
|
@@ -12,10 +28,8 @@ async function run(ctx) {
|
|
|
12
28
|
const current = await ag.agent.getProviderRegistry();
|
|
13
29
|
if (ctx.json)
|
|
14
30
|
(0, envelope_1.emitOk)(current);
|
|
15
|
-
else
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(0, envelope_1.print)(`${provider.id}\t${provider.name}\t${provider.formats.join(', ')}`);
|
|
19
|
-
}
|
|
31
|
+
else
|
|
32
|
+
for (const line of renderProviders(current.providers, (0, textfit_1.termWidth)()))
|
|
33
|
+
(0, envelope_1.print)(line);
|
|
20
34
|
}
|
|
21
35
|
//# sourceMappingURL=providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/cli/commands/providers.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/cli/commands/providers.ts"],"names":[],"mappings":";;AAWA,0CASC;AAED,kBAMC;AA5BD,6DAA6D;AAC7D,gCAAqC;AACrC,+CAA4E;AAC5E,sCAAqC;AACrC,0CAA4C;AAC5C,mCAAoC;AACpC,wCAAuC;AAGvC;0EAC0E;AAC1E,SAAgB,eAAe,CAAC,SAAuC,EAAE,KAAc;IACrF,MAAM,GAAG,GAAG;QACV,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC;QACvC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAA,6BAAiB,EAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,iBAAS,EAAC,CAAC,CAAC,CAAC,CAAC;KACpH,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,EAAc,EAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,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GAAG,MAAM,IAAA,iBAAW,EAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC;IACrD,IAAI,GAAG,CAAC,IAAI;QAAE,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC;;QACzB,KAAK,MAAM,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,IAAA,mBAAS,GAAE,CAAC;YAAE,IAAA,gBAAK,EAAC,IAAI,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file releases.ts
|
|
3
|
+
* @description `0g-agentdna releases` — the attestor's release notices,
|
|
4
|
+
* newest first (what changed, the images each release replaces and the end
|
|
5
|
+
* of their transition period), and, with AGENTIC_PRIVATE_KEY, which of your
|
|
6
|
+
* agents still run a replaced image and by when to reset them.
|
|
7
|
+
*
|
|
8
|
+
* JSON mode: `data` is `{ releases, agents }`; `agents` is null without a
|
|
9
|
+
* wallet, else `[{ agent, migrate }]`.
|
|
10
|
+
*/
|
|
11
|
+
import type { CommandContext } from '../types';
|
|
12
|
+
export declare function run(ctx: CommandContext): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=releases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/releases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQ/C,wBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC5D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file releases.ts
|
|
4
|
+
* @description `0g-agentdna releases` — the attestor's release notices,
|
|
5
|
+
* newest first (what changed, the images each release replaces and the end
|
|
6
|
+
* of their transition period), and, with AGENTIC_PRIVATE_KEY, which of your
|
|
7
|
+
* agents still run a replaced image and by when to reset them.
|
|
8
|
+
*
|
|
9
|
+
* JSON mode: `data` is `{ releases, agents }`; `agents` is null without a
|
|
10
|
+
* wallet, else `[{ agent, migrate }]`.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.run = run;
|
|
14
|
+
const Releases_1 = require("../../Releases");
|
|
15
|
+
const errors_1 = require("../errors");
|
|
16
|
+
const sdk_1 = require("../sdk");
|
|
17
|
+
const envelope_1 = require("../envelope");
|
|
18
|
+
const env_1 = require("../env");
|
|
19
|
+
const releaseNotice_1 = require("../releaseNotice");
|
|
20
|
+
const STATE_TEXT = {
|
|
21
|
+
recommended: 'please move',
|
|
22
|
+
soon: '7 days or less left',
|
|
23
|
+
overdue: 'transition period over: its next boot may be refused',
|
|
24
|
+
};
|
|
25
|
+
async function run(ctx) {
|
|
26
|
+
if (ctx.positionals.length)
|
|
27
|
+
throw new errors_1.CliError('BAD_FLAG', 'usage: releases (read-only)');
|
|
28
|
+
const url = (0, env_1.requireAttestorUrl)(ctx.env);
|
|
29
|
+
const releases = await (0, Releases_1.fetchReleases)(url).catch((e) => { throw (0, sdk_1.attestorUnreachable)(ctx.env, e); });
|
|
30
|
+
let agents = null;
|
|
31
|
+
const key = ctx.env.privateKey;
|
|
32
|
+
if (key && /^0x[0-9a-fA-F]{64}$/.test(key))
|
|
33
|
+
agents = await (0, releaseNotice_1.myMigrations)(url, key);
|
|
34
|
+
if (ctx.json) {
|
|
35
|
+
(0, envelope_1.emitOk)({ releases, agents });
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!releases.length) {
|
|
39
|
+
(0, envelope_1.print)('no release notices on this attestor');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const zh = (0, releaseNotice_1.zhLocale)();
|
|
43
|
+
for (const r of releases) {
|
|
44
|
+
(0, envelope_1.print)(`AgentDNA ${r.version} (${(0, releaseNotice_1.dateOf)(r.publishedAt)})`);
|
|
45
|
+
for (const line of (0, releaseNotice_1.notesOf)(r, zh).split('\n'))
|
|
46
|
+
(0, envelope_1.print)(` ${line}`);
|
|
47
|
+
for (const m of r.migrate) {
|
|
48
|
+
(0, envelope_1.print)(` replaces the ${m.framework} image ${m.imageHash.slice(0, 10)}…: move by ${(0, releaseNotice_1.dateOf)(m.until)}${m.urgent ? ' (security fix: may be retired sooner)' : ''}`);
|
|
49
|
+
}
|
|
50
|
+
(0, envelope_1.print)('');
|
|
51
|
+
}
|
|
52
|
+
if (agents === null) {
|
|
53
|
+
(0, envelope_1.print)('Set AGENTIC_PRIVATE_KEY to see which of your agents to move.');
|
|
54
|
+
}
|
|
55
|
+
else if (!agents.length) {
|
|
56
|
+
(0, envelope_1.print)('Your agents: none runs a replaced image.');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
(0, envelope_1.print)(`Your agents to move — they keep running meanwhile; ${(0, errors_1.shellTo)('reset <agent>', 'move one')}:`);
|
|
60
|
+
for (const a of agents) {
|
|
61
|
+
(0, envelope_1.print)(` ${a.agent} ${a.migrate.framework} by ${(0, releaseNotice_1.dateOf)(a.migrate.until)} ${STATE_TEXT[a.migrate.state] ?? a.migrate.state}${a.migrate.urgent ? ', security fix' : ''}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=releases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../../../src/cli/commands/releases.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAgBH,kBAkCC;AAhDD,6CAA+C;AAC/C,sCAA8C;AAC9C,gCAA6C;AAC7C,0CAA4C;AAC5C,gCAA4C;AAC5C,oDAA+F;AAG/F,MAAM,UAAU,GAA2B;IACzC,WAAW,EAAE,aAAa;IAC1B,IAA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CAAC"}
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
* changes require a matching local key and runtime capability, then wait
|
|
18
18
|
* for reset to deliver that key rather than pushing the old credential.
|
|
19
19
|
*/
|
|
20
|
+
import type { Hash } from 'viem';
|
|
21
|
+
import type { AgenticID } from '../../AgenticID';
|
|
22
|
+
import { type AgentRef } from '../ref';
|
|
20
23
|
import type { CommandContext } from '../types';
|
|
24
|
+
/** agentId | sealId | unique sealId prefix → the sealId the attestor keys on. */
|
|
25
|
+
export declare function resolveSealId(ag: AgenticID, ref: AgentRef, raw: string): Promise<Hash>;
|
|
21
26
|
export declare function run(ctx: CommandContext): Promise<void>;
|
|
22
27
|
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAMtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO/C,iFAAiF;AACjF,wBAAsB,aAAa,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5F;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6J5D"}
|
|
@@ -19,15 +19,18 @@
|
|
|
19
19
|
* for reset to deliver that key rather than pushing the old credential.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.resolveSealId = resolveSealId;
|
|
22
23
|
exports.run = run;
|
|
23
24
|
const sdk_1 = require("../sdk");
|
|
24
25
|
const errors_1 = require("../errors");
|
|
26
|
+
const plain_1 = require("../plain");
|
|
25
27
|
const envelope_1 = require("../envelope");
|
|
26
28
|
const ref_1 = require("../ref");
|
|
27
29
|
const settings_1 = require("../settings");
|
|
28
30
|
const Settings_1 = require("../../Settings");
|
|
29
31
|
const Providers_1 = require("../../Providers");
|
|
30
32
|
const inference_1 = require("../inference");
|
|
33
|
+
const credentials_1 = require("../credentials");
|
|
31
34
|
const ZERO_HASH = `0x${'0'.repeat(64)}`;
|
|
32
35
|
/** agentId | sealId | unique sealId prefix → the sealId the attestor keys on. */
|
|
33
36
|
async function resolveSealId(ag, ref, raw) {
|
|
@@ -38,14 +41,14 @@ async function resolveSealId(ag, ref, raw) {
|
|
|
38
41
|
if (hits.length !== 1) {
|
|
39
42
|
throw new errors_1.CliError(hits.length ? 'BAD_AGENT_REF' : 'AGENT_NOT_FOUND', hits.length
|
|
40
43
|
? `"${raw}" matches ${hits.length} agents — add more hex chars`
|
|
41
|
-
: `
|
|
44
|
+
: `agent ${raw} does not exist on this attestor`, { remedy: `${(0, errors_1.cmdStep)('list')} shows the agents here` });
|
|
42
45
|
}
|
|
43
46
|
return hits[0].sealId;
|
|
44
47
|
}
|
|
45
48
|
const seal = await ag.agent.getSealId(ref.agentId).catch(() => ZERO_HASH);
|
|
46
49
|
if (seal === ZERO_HASH) {
|
|
47
50
|
throw new errors_1.CliError('AGENT_NOT_FOUND', `agent ${ref.agentId} has no sealId on chain`, {
|
|
48
|
-
remedy: '
|
|
51
|
+
remedy: `${(0, errors_1.cmdStep)('list')} shows the agents here`,
|
|
49
52
|
});
|
|
50
53
|
}
|
|
51
54
|
return seal;
|
|
@@ -53,8 +56,10 @@ async function resolveSealId(ag, ref, raw) {
|
|
|
53
56
|
async function run(ctx) {
|
|
54
57
|
const raw = ctx.positionals[0];
|
|
55
58
|
const ref = (0, ref_1.parseAgentRef)(raw);
|
|
59
|
+
(0, errors_1.setAgentAtHand)(raw ?? null);
|
|
56
60
|
// Grammar errors are usage errors — raise them before any network work.
|
|
57
|
-
|
|
61
|
+
// `versions` alone asks for the versions to pick from.
|
|
62
|
+
const { versions: versionsView, assignments } = (0, settings_1.settingsArgs)(ctx.positionals.slice(1));
|
|
58
63
|
const writing = assignments.length > 0;
|
|
59
64
|
// The document is owner-gated in both directions, so a show needs the key
|
|
60
65
|
// just as a write does.
|
|
@@ -64,41 +69,83 @@ async function run(ctx) {
|
|
|
64
69
|
// No row for this seal — a wrong attestor or a wrong id, not an internal fault.
|
|
65
70
|
if (/HTTP 404/.test(e.message)) {
|
|
66
71
|
throw new errors_1.CliError('AGENT_NOT_FOUND', `no deployment for seal ${sealId} on this attestor`, {
|
|
67
|
-
remedy: '
|
|
72
|
+
remedy: `${(0, errors_1.cmdStep)('list')} shows the agents here`,
|
|
68
73
|
});
|
|
69
74
|
}
|
|
70
75
|
throw e;
|
|
71
76
|
});
|
|
72
77
|
if (!writing) {
|
|
78
|
+
// A 0g-harness agent can be pinned to versions the trust registry lists:
|
|
79
|
+
// the show says which it runs on one line, `versions` lists them all.
|
|
80
|
+
// Advisory: no registry, or an unreadable one, shows nothing.
|
|
81
|
+
const framework = await frameworkOf(ctx.env.attestorUrl, sealId);
|
|
82
|
+
const harness = (0, settings_1.isHarnessFramework)(framework);
|
|
83
|
+
const listed = harness ? await ag.agent.listedVersions().catch(() => null) : null;
|
|
73
84
|
if (ctx.json) {
|
|
74
|
-
(0, envelope_1.emitOk)({ sealId, settings: current, version });
|
|
85
|
+
(0, envelope_1.emitOk)({ sealId, settings: current, version, ...(listed ? { listedVersions: { sealed: listed.sealed, harness: listed.harness } } : {}) });
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (versionsView) {
|
|
89
|
+
if (!harness)
|
|
90
|
+
(0, envelope_1.print)(`this agent runs ${framework ?? 'another framework'} — only a 0g-harness agent has versions to pick`);
|
|
91
|
+
else if (!listed)
|
|
92
|
+
(0, envelope_1.print)('the trust registry could not be read — no versions to show');
|
|
93
|
+
else
|
|
94
|
+
for (const line of (0, settings_1.renderListedVersions)(listed, current?.versions))
|
|
95
|
+
(0, envelope_1.print)(line);
|
|
75
96
|
return;
|
|
76
97
|
}
|
|
77
98
|
for (const line of (0, settings_1.renderSettings)(current))
|
|
78
99
|
(0, envelope_1.print)(line);
|
|
100
|
+
if (listed) {
|
|
101
|
+
(0, envelope_1.print)((0, settings_1.renderVersionsLine)(listed, current?.versions));
|
|
102
|
+
(0, envelope_1.print)(`pin a version: 0g-agentdna settings ${raw} versions`);
|
|
103
|
+
}
|
|
79
104
|
return;
|
|
80
105
|
}
|
|
81
|
-
// Before anything is signed: a 0g-harness switch in others
|
|
82
|
-
// another framework does nothing there, or
|
|
83
|
-
|
|
84
|
-
|
|
106
|
+
// Before anything is signed: a 0g-harness switch in others=, or a version
|
|
107
|
+
// pick, for an agent that runs another framework does nothing there, or
|
|
108
|
+
// worse (cli/settings.ts).
|
|
109
|
+
const frameworkBound = assignments.some((a) => (a.key === 'others' || settings_1.VERSION_KEYS.includes(a.key)) && a.value !== undefined);
|
|
110
|
+
if (frameworkBound) {
|
|
111
|
+
const framework = await frameworkOf(ctx.env.attestorUrl, sealId);
|
|
112
|
+
(0, settings_1.assertOthersFitFramework)(assignments, framework);
|
|
113
|
+
(0, settings_1.assertVersionsFitFramework)(assignments, framework);
|
|
85
114
|
}
|
|
86
115
|
const next = (0, settings_1.applyAssignments)(current, assignments);
|
|
87
116
|
// Before anything is signed: a document with no model is the one state the
|
|
88
|
-
// container cannot boot from and last-known-good cannot cover
|
|
117
|
+
// container cannot boot from and last-known-good cannot cover; a model
|
|
118
|
+
// that cannot call tools fails every turn of a tool-driven framework.
|
|
89
119
|
(0, settings_1.assertModelPresent)(next, current !== null);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
120
|
+
(0, settings_1.assertSubagentDefaultOffered)(next);
|
|
121
|
+
await (0, settings_1.assertModelFitsFramework)(assignments, next, await frameworkOf(ctx.env.attestorUrl, sealId), (provider) => ag.agent.listModelCaps({ provider }));
|
|
122
|
+
const base = await runningServeBase(ctx.env.attestorUrl, sealId);
|
|
123
|
+
// The agent takes a provider switch only with a key for the new provider
|
|
124
|
+
// in its credential set: asked for (Enter takes the key login saved) and
|
|
125
|
+
// stored first. An image from before model keys in the set takes it at a
|
|
126
|
+
// reset with the key.
|
|
127
|
+
let pendingReset = false;
|
|
128
|
+
if ((0, Providers_1.changesProvider)(current, next)) {
|
|
129
|
+
const provider = next.provider ?? '0g-compute';
|
|
130
|
+
const keyIO = { json: ctx.json, out: envelope_1.note, secret: credentials_1.readSecret, keyPrompt: (0, credentials_1.commandKeyPrompt)(ctx.json, envelope_1.note, { readPipe: false }) };
|
|
131
|
+
if (await (0, credentials_1.ensureModelKey)(ag, sealId, provider, keyIO, base ? { agentUrl: base } : undefined) === 'unsupported') {
|
|
132
|
+
(0, inference_1.requireConfiguredInferenceKey)(provider);
|
|
133
|
+
pendingReset = true;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
93
136
|
const warnings = [];
|
|
94
137
|
// The catalog advisory runs inside setSettings, before it signs.
|
|
95
138
|
const written = await ag.agent
|
|
96
139
|
.setSettings(sealId, next, {
|
|
97
140
|
baseVersion: version,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
141
|
+
// Only a write that sets the model or the provider: the advisory is
|
|
142
|
+
// about that choice, not repeated on every later write.
|
|
143
|
+
...((0, settings_1.touchesModel)(assignments) ? {
|
|
144
|
+
onWarn: (w) => {
|
|
145
|
+
warnings.push(w);
|
|
146
|
+
(0, envelope_1.note)(`warning: ${w}`);
|
|
147
|
+
},
|
|
148
|
+
} : {}),
|
|
102
149
|
})
|
|
103
150
|
.catch((e) => {
|
|
104
151
|
// Someone else wrote this document since the read a moment ago. Report
|
|
@@ -123,7 +170,6 @@ async function run(ctx) {
|
|
|
123
170
|
// the agent stays on its last-known-good. Telling the owner "applies next
|
|
124
171
|
// boot" for a rejection is a lie that hides an un-bootable document.
|
|
125
172
|
let rejected = false;
|
|
126
|
-
const base = await runningServeBase(ctx.env.attestorUrl, sealId);
|
|
127
173
|
if (base && !pendingReset) {
|
|
128
174
|
const agentId = await ag.agent.getAgentIdBySealId(sealId);
|
|
129
175
|
await ag.agent
|
|
@@ -136,11 +182,11 @@ async function run(ctx) {
|
|
|
136
182
|
pendingReset = true;
|
|
137
183
|
return;
|
|
138
184
|
}
|
|
139
|
-
const msg =
|
|
185
|
+
const msg = (0, plain_1.explainError)(e).message;
|
|
140
186
|
// pushSettingsToContainer throws `… HTTP <n>: …` when the container
|
|
141
187
|
// ANSWERED and refused; a bare fetch failure (no HTTP status) means
|
|
142
188
|
// it was unreachable.
|
|
143
|
-
rejected = /HTTP \d/.test(
|
|
189
|
+
rejected = /HTTP \d/.test(e instanceof Error ? e.message : String(e));
|
|
144
190
|
const w = rejected
|
|
145
191
|
? `stored, but the running container REFUSED it: ${msg} — a refused document does not boot, so the agent keeps its current configuration until you store one it accepts (e.g. an openai-format model for hermes)`
|
|
146
192
|
: `stored, but the running container was unreachable: ${msg} — it applies on the next boot`;
|
|
@@ -155,12 +201,12 @@ async function run(ctx) {
|
|
|
155
201
|
for (const line of (0, settings_1.renderSettings)(next))
|
|
156
202
|
(0, envelope_1.print)(line);
|
|
157
203
|
(0, envelope_1.note)(pendingReset
|
|
158
|
-
? `
|
|
204
|
+
? `saved; provider change pending — reset agent ${raw} with the ${next.provider} key (${(0, errors_1.shellStep)(`reset ${raw}`)})`
|
|
159
205
|
: applied
|
|
160
|
-
? `
|
|
206
|
+
? `saved; ${applied}`
|
|
161
207
|
: rejected
|
|
162
|
-
?
|
|
163
|
-
:
|
|
208
|
+
? 'saved, but the running container refused it (see the warning above); it will not boot as-is.'
|
|
209
|
+
: 'saved. The container applies it on its next boot.');
|
|
164
210
|
}
|
|
165
211
|
/**
|
|
166
212
|
* The framework the deployment row records, or undefined when it cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/cli/commands/settings.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/cli/commands/settings.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;AAsBH,sCAwBC;AAED,kBA6JC;AAzMD,gCAAqC;AACrC,sCAAyE;AACzE,oCAAwC;AACxC,0CAAkD;AAClD,gCAAsD;AACtD,0CAGqB;AACrB,6CAAuD;AAEvD,+CAAkD;AAClD,4CAA4G;AAC5G,gDAA8E;AAE9E,MAAM,SAAS,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAU,CAAC;AAEhD,iFAAiF;AAC1E,KAAK,UAAU,aAAa,CAAC,EAAa,EAAE,GAAa,EAAE,GAAW;IAC3E,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC,MAAM,CAAC;IAC7C,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3D,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAC/C,CAAC;QACF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,iBAAQ,CAChB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,EACjD,IAAI,CAAC,MAAM;gBACT,CAAC,CAAC,IAAI,GAAG,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IAAI,CAAC,EAAE,CAAC,CAAC;QACpG,IAAI,CAAC,CAAC,CAAC,EAAE;YAAE,OAAO,SAAS,CAAC;QAC5B,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAoE,CAAC;QAC9F,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC5C,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC;IAC1E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @file status.ts
|
|
3
3
|
* @description `0g-agentdna status <agent>` — one agent's full picture
|
|
4
4
|
* (spec v0.03 §3.2): all three coordinates (agentId / sealId / agentSeal),
|
|
5
|
-
* phase,
|
|
5
|
+
* phase, and the FOLDED failure reason (`--json` also carries the container
|
|
6
|
+
* url, which the human output leaves out). `<agent>` is a decimal agentId
|
|
6
7
|
* or a 0x… sealId; the command resolves the other coordinates from chain +
|
|
7
8
|
* the attestor listing.
|
|
8
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAsB/C,wBAAsB,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA+H5D"}
|