@0gfoundation/0g-agentdna 0.2.1 → 0.2.3

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.
Files changed (86) hide show
  1. package/GUIDE.md +67 -18
  2. package/MIGRATION.md +8 -0
  3. package/MIGRATION.zh.md +5 -0
  4. package/PROVIDERS.md +6 -4
  5. package/PROVIDERS.zh.md +4 -3
  6. package/README.md +20 -4
  7. package/dist/AgentClient.d.ts +175 -2
  8. package/dist/AgentClient.d.ts.map +1 -1
  9. package/dist/AgentClient.js +166 -7
  10. package/dist/AgentClient.js.map +1 -1
  11. package/dist/AgenticID.d.ts +47 -7
  12. package/dist/AgenticID.d.ts.map +1 -1
  13. package/dist/AgenticID.js +44 -13
  14. package/dist/AgenticID.js.map +1 -1
  15. package/dist/AgenticIDClient.d.ts +1 -1
  16. package/dist/AgenticIDClient.js +1 -1
  17. package/dist/AttestorClient.d.ts +67 -2
  18. package/dist/AttestorClient.d.ts.map +1 -1
  19. package/dist/AttestorClient.js +162 -33
  20. package/dist/AttestorClient.js.map +1 -1
  21. package/dist/ReputationClient.d.ts +1 -1
  22. package/dist/ReputationClient.js +1 -1
  23. package/dist/SandboxClient.d.ts +1 -1
  24. package/dist/SandboxClient.js +1 -1
  25. package/dist/cli/commands/doctor.d.ts.map +1 -1
  26. package/dist/cli/commands/doctor.js +8 -2
  27. package/dist/cli/commands/doctor.js.map +1 -1
  28. package/dist/cli/commands/interactive.d.ts +71 -2
  29. package/dist/cli/commands/interactive.d.ts.map +1 -1
  30. package/dist/cli/commands/interactive.js +423 -46
  31. package/dist/cli/commands/interactive.js.map +1 -1
  32. package/dist/cli/commands/settings.d.ts.map +1 -1
  33. package/dist/cli/commands/settings.js +23 -0
  34. package/dist/cli/commands/settings.js.map +1 -1
  35. package/dist/cli/config.d.ts +10 -0
  36. package/dist/cli/config.d.ts.map +1 -1
  37. package/dist/cli/config.js +38 -0
  38. package/dist/cli/config.js.map +1 -1
  39. package/dist/cli/env.js +1 -1
  40. package/dist/cli/env.js.map +1 -1
  41. package/dist/cli/inference.d.ts +25 -0
  42. package/dist/cli/inference.d.ts.map +1 -1
  43. package/dist/cli/inference.js +67 -6
  44. package/dist/cli/inference.js.map +1 -1
  45. package/dist/cli/main.js +12 -2
  46. package/dist/cli/main.js.map +1 -1
  47. package/dist/cli/sdk.d.ts +1 -1
  48. package/dist/cli/sdk.js +1 -1
  49. package/dist/cli/settings.d.ts +20 -0
  50. package/dist/cli/settings.d.ts.map +1 -1
  51. package/dist/cli/settings.js +40 -1
  52. package/dist/cli/settings.js.map +1 -1
  53. package/dist/constants.d.ts +3 -3
  54. package/dist/constants.js +2 -2
  55. package/dist/context.d.ts +2 -2
  56. package/dist/context.d.ts.map +1 -1
  57. package/dist/context.js +1 -1
  58. package/dist/index.d.ts +4 -3
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +6 -2
  61. package/dist/index.js.map +1 -1
  62. package/dist/secretEnv.js +1 -1
  63. package/dist/secretEnv.js.map +1 -1
  64. package/dist/types.d.ts +1 -1
  65. package/dist/types.js +1 -1
  66. package/package.json +1 -1
  67. package/src/AgentClient.ts +326 -9
  68. package/src/AgenticID.ts +66 -11
  69. package/src/AgenticIDClient.ts +1 -1
  70. package/src/AttestorClient.ts +207 -51
  71. package/src/ReputationClient.ts +1 -1
  72. package/src/SandboxClient.ts +1 -1
  73. package/src/cli/commands/doctor.ts +8 -2
  74. package/src/cli/commands/interactive.ts +405 -51
  75. package/src/cli/commands/settings.ts +22 -1
  76. package/src/cli/config.ts +36 -0
  77. package/src/cli/env.ts +1 -1
  78. package/src/cli/inference.ts +82 -5
  79. package/src/cli/main.ts +13 -3
  80. package/src/cli/sdk.ts +1 -1
  81. package/src/cli/settings.ts +41 -0
  82. package/src/constants.ts +3 -3
  83. package/src/context.ts +2 -2
  84. package/src/index.ts +7 -3
  85. package/src/secretEnv.ts +1 -1
  86. package/src/types.ts +1 -1
package/GUIDE.md CHANGED
@@ -8,12 +8,12 @@ Protocol docs & full source: **[github.com/0gfoundation/0g-agentic-id](https://g
8
8
 
9
9
  ## Setup
10
10
 
11
- **Fastest path — bootstrap from one URL.** The attestor's `GET /config` self-describes its environment (contract set, chain RPC, component appIds), so the URL alone pins the environment; switching environments is switching URLs. The public 0G attestors are `https://agenticid.0g.ai` (0G mainnet, chain 16661 — real funds) and `https://agenticid-testnet.0g.ai` (0G Galileo testnet, chain 16602):
11
+ **Fastest path — bootstrap from one URL.** The attestor's `GET /config` self-describes its environment (contract set, chain RPC, component appIds), so the URL alone pins the environment; switching environments is switching URLs. The public 0G attestors are `https://agentdna.0g.ai` (0G mainnet, chain 16661 — real funds) and `https://agentdna-testnet.0g.ai` (0G Galileo testnet, chain 16602):
12
12
 
13
13
  ```ts
14
14
  import { AgentDNA } from '@0gfoundation/0g-agentdna';
15
15
 
16
- const ag = await AgentDNA.fromAttestor('https://agenticid.0g.ai', {
16
+ const ag = await AgentDNA.fromAttestor('https://agentdna.0g.ai', {
17
17
  account: process.env.PRIVATE_KEY as `0x${string}`, // omit for read-only; env values are string|undefined, so strict TS needs the assertion
18
18
  });
19
19
  // Verifying addresses out-of-band instead of trusting the attestor?
@@ -66,9 +66,9 @@ const ag = new AgentDNA({
66
66
  **Mainnet by hand.** `rpcUrl` and `chain` default independently to Galileo (`https://evmrpc-testnet.0g.ai` / `ZERO_G_TESTNET`, chain 16602). For the 0G mainnet set (`contracts/DEPLOYMENT.md` §6.2m, chain 16661) pass **both**: `rpcUrl` picks the node, `chain` the chain id every write is signed for — mainnet addresses with the default chain sign every tx for 16602, so writes fail.
67
67
 
68
68
  ```ts
69
- import { AgenticID, ZERO_G_MAINNET } from '@0gfoundation/0g-agenticid-sdk';
69
+ import { AgentDNA, ZERO_G_MAINNET } from '@0gfoundation/0g-agentdna';
70
70
 
71
- const main = new AgenticID({
71
+ const main = new AgentDNA({
72
72
  addresses, // the §6.2m set
73
73
  account: process.env.PRIVATE_KEY as `0x${string}`,
74
74
  rpcUrl: 'https://evmrpc.0g.ai',
@@ -76,7 +76,7 @@ const main = new AgenticID({
76
76
  });
77
77
  ```
78
78
 
79
- Or skip the hand wiring: `AgenticID.fromAttestor('https://agenticid.0g.ai', …)` takes the addresses, RPC and chain from the attestor's `/config`.
79
+ Or skip the hand wiring: `AgentDNA.fromAttestor('https://agentdna.0g.ai', …)` takes the addresses, RPC and chain from the attestor's `/config`.
80
80
 
81
81
  **What you pass grows with what you do** — three tiers:
82
82
 
@@ -226,8 +226,16 @@ await ag.agent.reset(sealId, { apiKey }); // recreate an EXISTING container: r
226
226
  // from chain, reselect the framework adapter.
227
227
  // apiKey required in practice (attestor doesn't
228
228
  // cache the model key); sealedImage optional.
229
+ // A booting agent with no settings document uses the model pinned in its minted
230
+ // persona, which leaves the chain at its first commit. So start and reset of an
231
+ // agent that has no document and is a clone or has provisioned before first
232
+ // store DEFAULT_PERSONA_INFERENCE (0g-compute) as its settings: one more owner
233
+ // signature, after every check that can refuse the call; an existing document is
234
+ // never replaced. To start such an agent on another provider, write its settings
235
+ // (setSettings) first. The CLI's reset applies the same rule (needsDefaultSettings).
229
236
  await ag.agent.listDeployments();
230
- // → [{ agentId, sealId, phase, sandboxId, url, owner, name, createdAt, lastProvisionError }, …]
237
+ // → [{ agentId, sealId, phase, sandboxId, url, owner, name, createdAt, lastProvisionError,
238
+ // containerStatus }, …]
231
239
  // phase: 'deploying' | 'running' | 'stopped' (owner-stopped, start() to resume)
232
240
  // | 'offline' (no running container — never provisioned (mint-only) / failure / timeout /
233
241
  // transfer-teardown; on-chain identity persists, use start({apiKey}) or reset) | 'failed'
@@ -249,7 +257,7 @@ await ag.agent.setSettings(sealId, { ...(settings ?? {}), model: '0gm-1.0-35b-a3
249
257
  }); // → { version: 12 }
250
258
  ```
251
259
 
252
- **Whole-document write.** `setSettings` replaces the document — read it first and spread it to change one field.
260
+ **Whole-document write.** `setSettings` replaces the document — read it first and spread it to change one field. A `thinking` outside `low|high|max` (case-insensitive, as the container compares it) is refused before signing.
253
261
 
254
262
  **Who may read or write it.** Owner-signed, both directions, against the **live on-chain owner** read at request time — so a seller cannot keep configuring (or reading) an agent they already sold. The SDK signs `AgenticID.Settings.v1:<sealId>:<ts>:<base_version>:<sha256 of the document>` (EIP-191) for a write, and the same message minus the digest for a read (`GET /settings`, no body, base version 0). A rejected call is a clearly-worded HTTP 401. The document is on **no** listing tier and on no public deployment row: `getSettings` is the only way to read it.
255
263
 
@@ -490,10 +498,13 @@ whose runtime isn't in the default image ship their own — openclaw runs on the
490
498
  default `sandbox_snapshot`, hermes on a Python/uv image. **You don't pass it at
491
499
  deploy** (nor at `reset`/`retry`): at deploy the SDK resolves the right image
492
500
  for your `framework` from `GET /config`'s `frameworks[]` (each entry
493
- `{ name, image? }`; no image → the default snapshot). For an EXISTING agent,
501
+ `{ name, image? }`; no image → the default snapshot). With your own `iData`,
502
+ the framework is the one its `role: 'framework'` binding names, and a
503
+ `framework` that names another one is refused. For an EXISTING agent,
494
504
  `reset`/`start`/`retry` need neither — the SDK reads the framework off the
495
- agent's own deployment row and resolves the same way (an unreadable row
496
- refuses rather than guessing the default). Pass `framework` only to override
505
+ agent's own deployment row and resolves the same way (an unreadable row, or
506
+ a framework `/config.frameworks[]` does not list, refuses rather than
507
+ guessing the default). Pass `framework` only to override
497
508
  the row, and `sandbox.sealedImage` (or `sealedImage` on reset/retry) only to
498
509
  pin a specific image. Which frameworks are live is whatever
499
510
  `/config.frameworks[]` advertises.
@@ -540,7 +551,8 @@ minting is the owner's freedom; whether the content actually boots is the
540
551
  **sealed runtime's contract**. Each framework runs on the sealed image
541
552
  `/config.frameworks[]` declares for it (openclaw = the default snapshot,
542
553
  hermes = its own Python/uv image); at **deploy** the SDK resolves that image
543
- from `framework`, so you don't pass one. **reset**/**start**/**retry** on an
554
+ from `framework` (or from your own iData's framework binding), so you don't
555
+ pass one. **reset**/**start**/**retry** on an
544
556
  existing agent resolve it from the agent's own deployment row, so a bare call
545
557
  is enough (`framework` overrides the row; `sealedImage` pins a specific
546
558
  image). Pick with `framework`;
@@ -640,8 +652,8 @@ await ag.agent.runtimeCosts(agentId); // = estimateCosts + that agent's evolu
640
652
  `authenticate`/`connect`) resolve it on chain (`tokenURI` → the AgentCard's
641
653
  serve `url`). Reach for `listDeployments()` when you want the URL or `phase`
642
654
  explicitly. It's the **public** listing (needs `attestorUrl`, no wallet), so it
643
- returns only non-sensitive fields; `sandboxId` and `lastProvisionError` come
644
- back **null** (`owner` and `agentSeal` are present on minted rows — both
655
+ returns only non-sensitive fields; `sandboxId`, `lastProvisionError` and
656
+ `containerStatus` come back **null** (`owner` and `agentSeal` are present on minted rows — both
645
657
  chain-public — which is what makes nesting visible: a child's `owner` matches
646
658
  its parent's `agentSeal`). To see the withheld fields for your OWN agents (and
647
659
  the `sandboxId` you
@@ -650,7 +662,8 @@ pass to `stop`/`start`), use `listMyDeployments()`, which signs with your wallet
650
662
  ```ts
651
663
  const me = (await ag.agent.listDeployments()).find((d) => d.agentId === agentId);
652
664
  // me → { agentId, sealId, phase, url, name, createdAt } populated;
653
- // owner, sandboxId, lastProvisionError come back NULL on this public listing.
665
+ // owner, sandboxId, lastProvisionError, containerStatus come back NULL on this
666
+ // public listing.
654
667
  // For those (and to debug a stuck deploy), list your own with the wallet:
655
668
  const mine = await ag.agent.listMyDeployments(); // owner-signed; full detail
656
669
  const agentUrl = me?.url; // null until the container is provisioned
@@ -659,6 +672,12 @@ const agentUrl = me?.url; // null until the container is provision
659
672
  // validFrameworkHashes") or mint/storage-pipeline failures (e.g. "mint
660
673
  // submit: … replacement transaction underpriced" — folded in from the
661
674
  // failed stage's reason).
675
+ // A 'running' agent that does not answer: read mine's containerStatus
676
+ // ({ level, reason, at }, the container's last report). phase shows a
677
+ // 'warning' as 'running'; e.g. level 'warning' with reason "owner settings
678
+ // unusable (settings: model is required)…" means the agent has no model:
679
+ // write its settings (setSettings), then pushSettingsToContainer applies them
680
+ // to the running container (a later boot applies them anyway).
662
681
 
663
682
  // A 'failed' row is recoverable — retry() FIRST, don't redeploy (that
664
683
  // orphans the already-minted identity). It re-runs the failed idempotent
@@ -739,7 +758,7 @@ if (me.phase === 'failed') await ag.agent.retry(me.sealId, { apiKey });
739
758
  // `ag.agent.clearConversation(base, agentId)` (CLI `/clear`) wipes it
740
759
  // without a reset; chain-tracked memory is untouched.
741
760
  // `ag.agent.compactConversation(base, agentId)` (CLI `/compact`) keeps it
742
- // but has the framework summarize the older part now (dsh, openclaw from
761
+ // but has the framework summarize the older part now (0g-harness, openclaw from
743
762
  // 2026.7.1; other frameworks answer 501). One or more model calls — it can
744
763
  // take minutes, longer than Node's fetch waits for an answer (300s); the
745
764
  // compaction finishes anyway, and the runtime log has the outcome. HTTP 409
@@ -820,6 +839,36 @@ does not rewind or branch the conversation the way it does against openclaw or
820
839
  hermes (which are real OpenAI-compatible servers). Turns are also serialized
821
840
  per agent, since one SDK session is one conversation.
822
841
 
842
+ **0g-harness** is stateful in the same way, and its agents also work on their own.
843
+ With the owner's `toolJobs`, `subagents` or `schedule` switches on (the
844
+ settings document's `others`), a 0g-harness agent runs commands and read-only
845
+ subagents in the background and sets itself reminders. When one finishes or
846
+ comes due while the agent is idle, the agent opens a turn that no message
847
+ asked for, and its words go to the agent's inbox. The handle exposes that
848
+ surface. Each method is present only when `/hello` declares its kind
849
+ (`inbox`, `events`, `tasks`, `schedules`; the other frameworks declare none)
850
+ and the handle holds the owner key:
851
+
852
+ ```ts
853
+ const box = await agent.inbox!(); // { data, unread, read_through, cursor }: unread messages, oldest first
854
+ await agent.ackInbox!(lastSeq); // the read position is the agent's: every client sees the same unread count
855
+
856
+ // The live feed: resumes from the last event after a cut or a stall, and
857
+ // runs until the signal aborts.
858
+ for await (const e of agent.events!({ after: box.cursor, signal })) {
859
+ if (e.type === 'inbox.message') { /* e.data: an AgentInboxMessage */ }
860
+ if (e.type === 'reset') { /* the agent could not serve the position: re-read the inbox */ }
861
+ }
862
+
863
+ const tasks = await agent.tasks!({ status: 'active' });
864
+ // every turn (yours and the agent's), command (bash-N) and subagent (subagent-N):
865
+ // actor = who does the work (agent | subagent), trigger = who asked
866
+ await agent.taskInfo!('subagent-1'); // includes a finished subagent's answer
867
+ await agent.stopTask!('bash-2'); // a turn is cancelled, a command or subagent is killed
868
+ await agent.stopAllTasks!(); // everything running
869
+ await agent.schedules!(); // { enabled, data }: the reminders the agent set for itself
870
+ ```
871
+
823
872
  ## Agents as owners (nested agents)
824
873
 
825
874
  An agent inside a sealed container can run this SDK **as itself** — deploy
@@ -868,7 +917,7 @@ digest change does not close it.
868
917
 
869
918
  Contract addresses are a **deployment artifact, not baked into the SDK** — an RPC + these addresses fully determine the target contracts, and keeping them out of the library means a proxy upgrade or redeploy can't silently stale a bundled constant.
870
919
 
871
- **Source of truth: the attestor's `GET /config`** — `AgentDNA.fromAttestor(url)` reads it and fills every address for you, so pointing `attestorUrl` at an attestor selects its deployment set. Several canonical-bound deployments run in parallel: on 0G mainnet (`chainId 16661`, served by `https://agenticid.0g.ai`) and on 0G Galileo Testnet (`chainId 16602`, e.g. `https://agenticid-testnet.0g.ai`). To wire addresses manually instead, copy the set into a `ContractAddresses` object (shape above), or load them from your own config/env.
920
+ **Source of truth: the attestor's `GET /config`** — `AgentDNA.fromAttestor(url)` reads it and fills every address for you, so pointing `attestorUrl` at an attestor selects its deployment set. Several canonical-bound deployments run in parallel: on 0G mainnet (`chainId 16661`, served by `https://agentdna.0g.ai`) and on 0G Galileo Testnet (`chainId 16602`, e.g. `https://agentdna-testnet.0g.ai`). To wire addresses manually instead, copy the set into a `ContractAddresses` object (shape above), or load them from your own config/env.
872
921
 
873
922
  The stable protocol-level constants **are** exported: `ZERO_G_TESTNET` / `ZERO_G_MAINNET` (viem chains), `RPC_URL`, `CHAIN_ID`, `RECEIPT_WAIT`.
874
923
 
@@ -951,7 +1000,7 @@ For the old CLI update path and automatic local-config migration, see
951
1000
 
952
1001
  Two levels. The **manager** (`0g-agentdna>`): `list` (public listing with sealIds and the same FRAMEWORK/AGENTSEAL/OWNER columns as `0g-agentdna list`, `⇄ #<agentId>` on agent-owned agents, `*` marks your wallet's agents), `use <agentId|sealId>` (enter an agent's session in **any** phase), `hello <id>` (any agent's public /hello — with a wallet configured it also banks a rating ticket), `call <id> [path [json-body]]` (use an agent's registered public service as a client; bare `call <id>` lists its services; the response banks a rating ticket), `rate <id> [score] [/endpoint]` (rate an agent on-chain, spending a ticket banked by call/hello — no interaction, no rating; owners cannot rate their own agents), `deploy` (framework + model wizard), `start`/`stop`/`reset <id>`, `settings <id> [key=value …]` (show or change the agent's configuration document), `balance` / `deposit [og]` / `withdraw [og]` (prepaid sandbox account), `ack`, `login [provider]` (guided setup: attestor URL → owner key → provider → inference key; Enter keeps the current value, keys echo `*`), `whoami` (bare Enter does the same), `quit`.
953
1002
 
954
- The **session** (`agent 286 ›`): type to chat — **Esc / Ctrl-C interrupts the turn in flight** (the runtime cancels server-side on every bundled framework) and also cancels a `/start`//`/reset` wait. Slash commands: `/hello` `/balance` `/topup [og]` `/stop` `/start` `/reset` `/settings [key=value …]` `/think [level]` `/clear` (wipe the agent's conversation and start fresh — chain-tracked memory is untouched, unlike `/reset`) `/compact` (keep the conversation but have the framework summarize its older part now — dsh, and openclaw 2026.7.1 or later; one or more model calls, can take minutes) `/tasks` `/result [id]` `/cancel [id]` `/agentlog [n]` `/startuplog [n]` `/back` (alias `/unuse`) `/quit`. The framework (used by `/reset` and the chat model selector) is picked by you from the attestor's list — never guessed.
1003
+ The **session** (`agent 286 ›`): type to chat — **Esc / Ctrl-C interrupts the turn in flight** (the runtime cancels server-side on every bundled framework) and also cancels a `/start`//`/reset` wait. Slash commands: `/hello` `/balance` `/topup [og]` `/stop` `/start` `/reset` `/settings [key=value …]` `/think [level]` `/clear` (wipe the agent's conversation and start fresh — chain-tracked memory is untouched, unlike `/reset`) `/compact` (keep the conversation but have the framework summarize its older part now — 0g-harness, and openclaw 2026.7.1 or later; one or more model calls, can take minutes) `/tasks` `/result [id]` `/cancel [id|all]` `/inbox [all]` `/schedules` `/agentlog [n]` `/startuplog [n]` `/back` (alias `/unuse`) `/quit`. The framework (used by `/reset` and the chat model selector) is picked by you from the attestor's list — never guessed. On a 0g-harness agent, what the agent says on its own (a background job finished, a reminder came due) prints above the prompt as it arrives, and what came while you were away prints when you enter; `/tasks` lists every turn, background command and subagent with who did it, `/cancel <id>` stops any of them and `/cancel all` everything running. On the other frameworks `/inbox` and `/schedules` say the agent has none.
955
1004
 
956
1005
  Configuration persists under `~/.config/0g-agentdna/` — `config.json` (attestor URL), `credentials` (owner key + provider-scoped inference keys, JSON, chmod 600), and `proofs.json` (the **rating-ticket jar**, chmod 600): serve-proofs banked by `call`/`hello`, spent by `rate`. Ticket physics: they expire ~1 hour after the interaction (the sealed proxy sets the deadline; the chain enforces it), are single-use, capped at 5 per (agent, wallet) pair, and are redeemable ONLY by the wallet named in the proof's `submitter` — a leaked jar is useless to anyone else. `rate` checks a ticket on what the registry checks — expiry and the signature — and discards one that fails on its own merits (bad signature — e.g. one banked from a pre-1.2.0 sealed image — or expiry), but keeps one that fails only because no VerifiedFeedbackRegistry, or a different one, is configured on this side. A ticket whose data hashes the agent has since replaced (it commits state drift every 30 s) still redeems — the registry records the version that served you without comparing it to current chain state — so `rate` only notes it and goes ahead. The `AGENTIC_*` environment variables always override the files, so CI and one-off runs need no disk.
957
1006
 
@@ -967,7 +1016,7 @@ Configuration persists under `~/.config/0g-agentdna/` — `config.json` (attesto
967
1016
  Environment variables (override the config files):
968
1017
 
969
1018
  ```bash
970
- export AGENTIC_ATTESTOR_URL=https://agenticid.0g.ai # required — one URL selects the environment
1019
+ export AGENTIC_ATTESTOR_URL=https://agentdna.0g.ai # required — one URL selects the environment
971
1020
  export AGENTIC_PRIVATE_KEY=0x… # optional — owner surfaces; env only, no flag by design
972
1021
  export AGENTIC_RPC_URL=https://… # optional — overrides the attestor-advertised RPC
973
1022
  ```
package/MIGRATION.md CHANGED
@@ -48,6 +48,14 @@ directory is left intact. A failed move stops with a migration error instead
48
48
  of creating an empty replacement. Existing `AGENTIC_*` environment variables
49
49
  remain supported.
50
50
 
51
+ The public attestors' earlier addresses, `https://agenticid.0g.ai` and
52
+ `https://agenticid-testnet.0g.ai`, are now `https://agentdna.0g.ai` and
53
+ `https://agentdna-testnet.0g.ai`; both names reach the same attestor. From
54
+ 0.2.3 the CLI replaces a saved earlier address with the current one on its next
55
+ run, moves its secret-env downgrade pin along, and says so on stderr. An
56
+ `AGENTIC_ATTESTOR_URL` set in the environment is left as it is; update it
57
+ yourself (`doctor` points it out). SDK code that passes an earlier address
58
+ keeps working; switch it to the current one.
51
59
 
52
60
  The old credential field `apiKey` is atomically converted to
53
61
  `inferenceKeys["0g-compute"]`, preserving wallet and other provider keys.
package/MIGRATION.zh.md CHANGED
@@ -39,6 +39,11 @@ npm install -g @0gfoundation/0g-agentdna
39
39
  如果新旧目录同时存在,使用 AgentDNA 目录,保留旧目录。如果移动失败,明确报告
40
40
  迁移错误,不创建空配置替代。已有的 `AGENTIC_*` 环境变量继续支持。
41
41
 
42
+ 公共 attestor 的旧地址 `https://agenticid.0g.ai`、`https://agenticid-testnet.0g.ai`
43
+ 现为 `https://agentdna.0g.ai`、`https://agentdna-testnet.0g.ai`,新旧地址指向同一个
44
+ attestor。从 0.2.3 起,CLI 在下次运行时把保存的旧地址换成新地址,secret-env
45
+ 降级保护记录随之迁移,并在 stderr 提示。环境变量 `AGENTIC_ATTESTOR_URL` 保持
46
+ 不变,请自行更新(`doctor` 会提示)。SDK 代码传入旧地址仍可用,建议换成新地址。
42
47
 
43
48
  旧凭据字段 `apiKey` 会原子转换为 `inferenceKeys["0g-compute"]`,保留钱包及
44
49
  其他 provider 的 key。旧 `AGENTIC_API_KEY` / `API_KEY` 覆盖仅属于 compute。
package/PROVIDERS.md CHANGED
@@ -130,14 +130,16 @@ the registry, read failures including 404 stop credential sealing/signing;
130
130
  they never substitute the built-in seed. Version 0 is the
131
131
  built-in seed from `sealed/internal/inference/providers.json`; SDK builds also
132
132
  bundle that seed for old attestors/offline discovery. Published data is not
133
- compiled into the SDK or image. The API stores a KMS-derived acceptance MAC over
134
- the environment, Tapp, version, publisher, and exact signed envelope. Database
135
- edits cannot forge that receipt. Accepted revisions remain readable after a
133
+ compiled into the SDK or image. The API stores each accepted revision with its
134
+ publisher and exact signed envelope in Postgres, which lives on the attestor's
135
+ tapp FDE volume; every read re-checks that the stored document belongs to this
136
+ environment and to its version. Accepted revisions remain readable after a
136
137
  Tapp ownership transfer or wallet-policy change; every new write checks the
137
138
  current owner again, so an old owner cannot continue publishing.
138
139
 
139
140
  The trusted attestor's `/config` publishes `provider_registry_version` and
140
- `provider_registry_digest`, computed only from a verified acceptance record.
141
+ `provider_registry_digest`, computed only from an accepted revision that passed
142
+ those checks.
141
143
  SDK and sealed check that fingerprint, the exact document contents, and scope
142
144
  before using the registry. This uses the same trusted-attestor discovery
143
145
  boundary as contract addresses and snapshots; it is not an independent trust
package/PROVIDERS.zh.md CHANGED
@@ -111,12 +111,13 @@ EOA 使用 EIP-191 签名,合约钱包 owner 通过
111
111
  `document` 和 `signature`。`/config` 已声明注册表能力时,包括 404 在内的读取失败
112
112
  都会在封装凭据、签名前终止,不回退到内置名单。版本 0 是 `sealed/internal/inference/providers.json`
113
113
  提供的内置初始名单,SDK 构建时也打包它以兼容旧 attestor、支持离线查询。
114
- 已发布配置不编进 SDK 或镜像。API 使用 KMS 派生的密钥,对环境、Tapp、版本、
115
- 发布者及完整签名原文生成接受凭据 MAC,数据库修改无法伪造该凭据。
114
+ 已发布配置不编进 SDK 或镜像。API 把每个已接受版本连同发布者和完整签名原文存进
115
+ Postgres,该数据库落在 attestor 的 tapp FDE 卷上;每次读取都会重新核对存储的文档
116
+ 属于当前环境、且与其版本号相符。
116
117
  Tapp owner 转让或合约钱包策略变化后,已接受配置仍可读取;新写入始终重新查询
117
118
  当前 owner,旧 owner 不能继续发布。
118
119
 
119
- 受信任 attestor 的 `/config` 仅从已验证的接受凭据生成并提供
120
+ 受信任 attestor 的 `/config` 仅从通过上述核对的已接受版本生成并提供
120
121
  `provider_registry_version`、`provider_registry_digest`。SDK 与 sealed 使用它核对
121
122
  配置指纹、原始文档及范围,再使用注册表。这里沿用合约地址、snapshot 发现的
122
123
  attestor 信任边界,不额外构成独立信任根。SDK 实例会拒绝低于已见版本、或同版本
package/README.md CHANGED
@@ -38,8 +38,8 @@ Backends (AgenticID / the canonical ERC-8004 ReputationRegistry + VerifiedFeedba
38
38
  ```ts
39
39
  import { AgentDNA } from '@0gfoundation/0g-agentdna';
40
40
 
41
- // 0G mainnet; for the Galileo testnet use 'https://agenticid-testnet.0g.ai'
42
- const ag = await AgentDNA.fromAttestor('https://agenticid.0g.ai', {
41
+ // 0G mainnet; for the Galileo testnet use 'https://agentdna-testnet.0g.ai'
42
+ const ag = await AgentDNA.fromAttestor('https://agentdna.0g.ai', {
43
43
  account: process.env.PRIVATE_KEY as `0x${string}`, // omit for read-only
44
44
  });
45
45
  ```
@@ -124,11 +124,16 @@ await ag.agent.stop(sealId, sandboxId);
124
124
  await ag.agent.start(sealId, sandboxId); // resume a STOPPED container
125
125
  await ag.agent.start(sealId, { apiKey }); // FIRST provision of a mint-only agent
126
126
  await ag.agent.reset(sealId, { framework, apiKey }); // recreate an EXISTING container
127
+ // start/reset of an agent with no settings document that is a clone or has
128
+ // provisioned before first store the default model (0g-compute) as its settings
129
+ // (one more owner signature), so it does not boot without a model.
127
130
  await ag.agent.retry(sealId, { apiKey }); // resume a 'failed' deploy (do NOT redeploy — that orphans the mint)
128
- await ag.agent.listDeployments(); // public listing; sandboxId/lastProvisionError null (owner+agentSeal present on minted rows)
131
+ await ag.agent.listDeployments(); // public listing; sandboxId/lastProvisionError/containerStatus null (owner+agentSeal present on minted rows)
129
132
  await ag.agent.listMyDeployments(); // owner-signed; full detail
130
- // row → { agentId, sealId, phase, sandboxId, url, owner, agentSeal, name, createdAt, lastProvisionError }
133
+ // row → { agentId, sealId, phase, sandboxId, url, owner, agentSeal, name, createdAt, lastProvisionError, containerStatus }
131
134
  // phase: 'deploying' | 'running' | 'stopped' | 'offline' | 'failed'
135
+ // containerStatus: { level, reason, at } | null — the container's last report. phase
136
+ // shows a 'warning' as 'running' (e.g. reason "owner settings unusable…": no model).
132
137
 
133
138
  // settings — the owner's configuration document (which model the agent thinks
134
139
  // with, and how hard). Stored by the attestor as an OPAQUE blob and applied by
@@ -314,6 +319,17 @@ await agent.task!(taskId); // poll {status, output_text}
314
319
  for await (const d of agent.followTask!(taskId)) process.stdout.write(d); // re-attach: replay + live
315
320
  await agent.cancelTask!(taskId); // stop the turn
316
321
 
322
+ // The agent's own work (0g-harness): turns it opens by itself (a background job
323
+ // finished, a reminder came due) and what runs in the background. Each method
324
+ // is present only when /hello declares its kind (inbox / events / tasks /
325
+ // schedules) and this handle holds the owner key:
326
+ const box = await agent.inbox!(); // unread messages + the cursor
327
+ if (box.data.length) await agent.ackInbox!(box.data[box.data.length - 1].seq); // read, for every client
328
+ for await (const e of agent.events!({ after: box.cursor, signal })) { /* inbox.message, turn.*, task.updated, … */ }
329
+ await agent.tasks!(); // turns, commands, subagents: who did each, who asked
330
+ await agent.stopTask!('subagent-1'); // one task; stopAllTasks() for everything running
331
+ await agent.schedules!(); // reminders the agent set for itself
332
+
317
333
  // opinionated shortcuts over client():
318
334
  const auth = await ag.agent.authenticate(agentId); // mints the owner token up front (needs a wallet)
319
335
  const pub = await ag.agent.connect(agentId); // explicit PUBLIC handle (never attaches a token)
@@ -135,6 +135,114 @@ export interface ChatCompletion {
135
135
  }>;
136
136
  [k: string]: unknown;
137
137
  }
138
+ /**
139
+ * One unit of work on the agent, as its task list shows it
140
+ * ({@link AgentClient.tasks}): a turn of its conversation, a background
141
+ * command, or a subagent. `actor` says who does the work, `trigger` who asked
142
+ * for it.
143
+ */
144
+ export interface AgentTaskInfo {
145
+ /** A turn: `resp_…` (the id {@link AgentClient.task} and
146
+ * {@link AgentClient.followTask} take). A command: `bash-N`. A subagent:
147
+ * `subagent-N`. */
148
+ id: string;
149
+ type: 'turn' | 'command' | 'subagent';
150
+ status: AgentTask['status'];
151
+ /** Who does the work: `agent` (the main agent) or `subagent`. */
152
+ actor: 'agent' | 'subagent';
153
+ /** Who asked. A turn: `user` | `job` | `schedule` | `plugin`. A command or
154
+ * a subagent: `agent` (the main agent started it). */
155
+ trigger: string;
156
+ /** What the task is: the prompt, the job notice, the reminder's text. */
157
+ label: string;
158
+ /** Unix seconds. */
159
+ created_at: number;
160
+ started_at?: number;
161
+ finished_at?: number;
162
+ error?: string;
163
+ detail?: string;
164
+ /** Notices that reached the agent while this turn ran, merged into it. */
165
+ merged_notices?: string[];
166
+ /** {@link AgentClient.taskInfo} only: a turn's text, or a finished
167
+ * subagent's final answer. A command's output is never returned. */
168
+ output_text?: string;
169
+ }
170
+ /** What stopping one task did ({@link AgentClient.stopTask}). */
171
+ export interface AgentTaskStop {
172
+ id: string;
173
+ outcome: 'cancelled' | 'already-finished' | 'not-running';
174
+ }
175
+ /**
176
+ * The words of a turn the agent opened itself (a background job finished, a
177
+ * reminder came due), kept in the agent's inbox until the owner reads them.
178
+ */
179
+ export interface AgentInboxMessage {
180
+ /** Its position in the agent's cursor: ack through it with
181
+ * {@link AgentClient.ackInbox}. */
182
+ seq: number;
183
+ /** The turn's id. */
184
+ id: string;
185
+ /** What opened the turn: `job` | `schedule` | `plugin`. */
186
+ trigger: string;
187
+ /** The job notice, or the reminder's text. */
188
+ label: string;
189
+ status: AgentTask['status'];
190
+ /** What the agent said in that turn. */
191
+ text: string;
192
+ error?: string;
193
+ created_at: number;
194
+ finished_at?: number;
195
+ }
196
+ /** One page of the inbox ({@link AgentClient.inbox}). */
197
+ export interface AgentInbox {
198
+ data: AgentInboxMessage[];
199
+ /** Messages after the read position. The position is the agent's, so every
200
+ * client sees the same count. */
201
+ unread: number;
202
+ read_through: number;
203
+ /** The agent's cursor now: pass it to {@link AgentClient.events} as
204
+ * `after` and the feed misses nothing that happens after this read. */
205
+ cursor: number;
206
+ }
207
+ /** A reminder the agent set for itself ({@link AgentClient.schedules}). */
208
+ export interface AgentSchedule {
209
+ id: string;
210
+ kind: 'after' | 'at' | 'every';
211
+ /** The reminder's own text. */
212
+ prompt: string;
213
+ afterSeconds?: number;
214
+ everySeconds?: number;
215
+ /** When it comes due next (ISO 8601). */
216
+ scheduledAt: string;
217
+ state: 'scheduled' | 'overdue';
218
+ }
219
+ /**
220
+ * One event of the agent's live feed ({@link AgentClient.events}). `data` is
221
+ * the payload as the agent sent it (its `seq` and `time` included), by
222
+ * `type`:
223
+ *
224
+ * | type | data |
225
+ * |---|---|
226
+ * | `turn.queued` / `turn.started` / `turn.completed` / `turn.failed` / `turn.cancelled` | an {@link AgentTaskInfo} (a turn) |
227
+ * | `task.updated` | an {@link AgentTaskInfo} (a command or a subagent) |
228
+ * | `inbox.message` | an {@link AgentInboxMessage} |
229
+ * | `inbox.read` | `{ read_through }` |
230
+ * | `schedule.changed` | `{ operation: "create" \| "delete" \| "dispatch", id }` |
231
+ * | `reset` | `{ cursor, read_through }` |
232
+ *
233
+ * `reset` means the agent could not serve the position asked for (it is
234
+ * older than the agent's in-memory window, or from before a `/clear`):
235
+ * re-read the inbox, tasks and schedules; the feed carries on from `cursor`.
236
+ * A type this list does not name is passed through as it came.
237
+ */
238
+ export interface AgentEvent {
239
+ type: string;
240
+ /** Its position in the agent's cursor. */
241
+ seq: number;
242
+ /** Agent clock, ms since the epoch. */
243
+ time: number;
244
+ data: Record<string, unknown>;
245
+ }
138
246
  /**
139
247
  * A live handle to an agent. Always carries `base` and the declared
140
248
  * `services`/`routes`. Owner affordances (`chat`/`chatStream`) are
@@ -196,14 +304,15 @@ export interface AgentClient {
196
304
  *
197
305
  * Pass `signal` to interrupt a turn in flight: aborting tears down the HTTP
198
306
  * connection, which is the OpenAI-conventional cancel signal — the runtime
199
- * side stops the turn where the framework supports cancellation (dsh does).
307
+ * side stops the turn where the framework supports cancellation (0g-harness
308
+ * does).
200
309
  * The generator then throws the abort error (`err.name === "AbortError"`).
201
310
  */
202
311
  chatStream?(messages: ChatMessage[], opts?: {
203
312
  model?: string;
204
313
  signal?: AbortSignal;
205
314
  /** Tool-activity progress, when the agent's bridge streams it (SSE
206
- * ": activity tool/call <name>" comments — dsh does). Labels like
315
+ * ": activity tool/call <name>" comments — 0g-harness does). Labels like
207
316
  * "tool/call bash", "tool/result", "turn/end". Advisory: absence just
208
317
  * means the bridge doesn't narrate. */
209
318
  onActivity?: (label: string) => void;
@@ -270,6 +379,70 @@ export interface AgentClient {
270
379
  logs?(opts?: {
271
380
  tail?: number;
272
381
  }): Promise<string>;
382
+ /**
383
+ * Read the agent's inbox: the words of turns the agent opened itself (a
384
+ * background job finished, a reminder came due), oldest first. Without
385
+ * `after`, the messages after the read position; `after: 0` returns all of
386
+ * them. Present only when the agent declares a `kind: "inbox"` route and
387
+ * this handle holds the owner token.
388
+ */
389
+ inbox?(opts?: {
390
+ after?: number;
391
+ limit?: number;
392
+ }): Promise<AgentInbox>;
393
+ /** Move the inbox read position forward to `through` (it never moves
394
+ * back). Present under the same conditions as {@link inbox}. */
395
+ ackInbox?(through: number): Promise<{
396
+ read_through: number;
397
+ unread: number;
398
+ }>;
399
+ /**
400
+ * Follow the agent's live feed: turn, task, inbox and schedule changes, as
401
+ * they happen. Runs until `signal` aborts: a dropped or silent connection
402
+ * is reopened from the last event seen, so nothing is lost or repeated. Pass
403
+ * `after` (e.g. {@link AgentInbox.cursor}) to start from a known position;
404
+ * without it the feed starts at the agent's current one. Throws only on an
405
+ * answer that retrying cannot change (an HTTP 4xx). Present only when the
406
+ * agent declares a `kind: "events"` route and this handle holds the owner
407
+ * token.
408
+ */
409
+ events?(opts?: {
410
+ after?: number;
411
+ signal?: AbortSignal;
412
+ }): AsyncGenerator<AgentEvent>;
413
+ /**
414
+ * Everything running or that has run on the agent, newest first: turns,
415
+ * background commands and subagents, with who does each (`actor`) and who
416
+ * asked (`trigger`). `status` filters: `"active"` (queued or running) or one
417
+ * status name. Present only when the agent declares a `kind: "tasks"` route
418
+ * and this handle holds the owner token.
419
+ */
420
+ tasks?(opts?: {
421
+ status?: string;
422
+ limit?: number;
423
+ }): Promise<AgentTaskInfo[]>;
424
+ /** One task of {@link tasks}, by id, with its `output_text` where there
425
+ * is one. Present under the same conditions as {@link tasks}. */
426
+ taskInfo?(id: string): Promise<AgentTaskInfo>;
427
+ /**
428
+ * Stop one task of {@link tasks}: a turn is cancelled (a queued one never
429
+ * starts), a command or subagent is killed. Already-executed actions are
430
+ * not rolled back. Present under the same conditions as {@link tasks}.
431
+ */
432
+ stopTask?(id: string): Promise<AgentTaskStop>;
433
+ /** Stop everything: queued turns first, then the running turn, then every
434
+ * running command and subagent. Present under the same conditions as
435
+ * {@link tasks}. */
436
+ stopAllTasks?(): Promise<AgentTaskStop[]>;
437
+ /**
438
+ * The reminders the agent set for itself. `enabled: false` means the
439
+ * agent's reminders are switched off. Present only when the agent declares
440
+ * a `kind: "schedules"` route and this handle holds the owner token.
441
+ */
442
+ schedules?(): Promise<{
443
+ enabled: boolean;
444
+ data: AgentSchedule[];
445
+ }>;
273
446
  }
274
447
  /**
275
448
  * Build an {@link AgentClient} from a base URL, the agent's declared surface,
@@ -1 +1 @@
1
- {"version":3,"file":"AgentClient.d.ts","sourceRoot":"","sources":["../src/AgentClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAuD,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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