@robota-sdk/agent-keyring 0.0.0-stage → 3.1.1

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 (62) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +661 -0
  3. package/README.md +91 -2
  4. package/dist/node/index.cjs +1 -0
  5. package/dist/node/index.d.cts +470 -0
  6. package/dist/node/index.d.cts.map +1 -0
  7. package/dist/node/index.d.ts +470 -0
  8. package/dist/node/index.d.ts.map +1 -0
  9. package/dist/node/index.js +2 -0
  10. package/dist/node/index.js.map +1 -0
  11. package/package.json +74 -3
  12. package/src/__tests__/authorship-constant-time.test.ts +46 -0
  13. package/src/__tests__/authorship.test.ts +65 -0
  14. package/src/__tests__/crypto-failures.test.ts +89 -0
  15. package/src/__tests__/fixtures/keyring-v1.json +25 -0
  16. package/src/__tests__/fixtures/sealed-v1.json +8 -0
  17. package/src/__tests__/helpers.ts +130 -0
  18. package/src/__tests__/kdf-bounds.test.ts +154 -0
  19. package/src/__tests__/keyring-document.test.ts +251 -0
  20. package/src/__tests__/keyring.test.ts +329 -0
  21. package/src/__tests__/keyslot.test.ts +98 -0
  22. package/src/__tests__/known-answers.test.ts +110 -0
  23. package/src/__tests__/link-helpers.ts +228 -0
  24. package/src/__tests__/owner-handover-derivation.test.ts +50 -0
  25. package/src/__tests__/owner-handover-dispose.test.ts +64 -0
  26. package/src/__tests__/owner-handover.test.ts +145 -0
  27. package/src/__tests__/owner-link-adversarial.test.ts +712 -0
  28. package/src/__tests__/owner-link-grant-wipe.test.ts +75 -0
  29. package/src/__tests__/owner-link-known-answers.test.ts +117 -0
  30. package/src/__tests__/owner-link-secret-wipe.test.ts +116 -0
  31. package/src/__tests__/owner-link.test.ts +229 -0
  32. package/src/__tests__/read-keys.test.ts +67 -0
  33. package/src/__tests__/recovery-key.test.ts +76 -0
  34. package/src/__tests__/runtime-identity.test.ts +171 -0
  35. package/src/__tests__/sealed-format-vectors.test.ts +91 -0
  36. package/src/__tests__/sealing.test.ts +376 -0
  37. package/src/__tests__/spawner-exchange.test.ts +127 -0
  38. package/src/__tests__/transient-key-pair.test.ts +36 -0
  39. package/src/aead.ts +62 -0
  40. package/src/authorship.ts +61 -0
  41. package/src/bytes.ts +67 -0
  42. package/src/errors.ts +106 -0
  43. package/src/fingerprint.ts +32 -0
  44. package/src/index.ts +77 -0
  45. package/src/kdf.ts +111 -0
  46. package/src/key-pairs.ts +148 -0
  47. package/src/keyring-document.ts +168 -0
  48. package/src/keyring-types.ts +51 -0
  49. package/src/keyring.ts +307 -0
  50. package/src/keyslot.ts +66 -0
  51. package/src/link-entropy.ts +24 -0
  52. package/src/link-frames.ts +271 -0
  53. package/src/link-primitives.ts +77 -0
  54. package/src/owner-handover.ts +155 -0
  55. package/src/owner-link.ts +508 -0
  56. package/src/read-keys.ts +78 -0
  57. package/src/recovery-key.ts +79 -0
  58. package/src/runtime-certificate.ts +129 -0
  59. package/src/runtime-identity.ts +166 -0
  60. package/src/sealing.ts +281 -0
  61. package/src/signatures.ts +45 -0
  62. package/src/spawner-exchange.ts +155 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # @robota-sdk/agent-keyring
2
+
3
+ ## 3.1.1
4
+
5
+ ## 3.1.0
6
+ ### Minor Changes
7
+
8
+ - bc8de21: `@robota-sdk/agent-keyring` is published for the first time (issue #3679, secure conversation). It
9
+ keeps a master key wrapped by a passphrase and by a recovery key, derives the sealing and attach key
10
+ pairs and an authorship key from it (`tagAuthorship`/`verifyAuthorship` on the unlocked keys: an
11
+ HMAC-SHA256 tag only an unlocked keyring makes or checks), and seals artifacts to the sealing public
12
+ key, on `node:crypto` only;
13
+ `generateTransientSealingKeyPair()` makes a sealing key pair for a key that lives only in one
14
+ process's memory. It is in the
15
+ changeset fixed group, so it versions and publishes with the other `@robota-sdk/*` packages. Nothing
16
+ depends on it unless you add it; the CLI uses it for `secure` keyring custody.
17
+ - 246c814: **Breaking (`@robota-sdk/agent-keyring`):** `IUnlockedKeys` is removed. `unlockWithPassphrase`,
18
+ `unlockWithRecoveryKey` and `createKeyring` now return `IReadKeys`: the sealing keypair and the
19
+ authorship key, with no attach keypair. `checkSealingPublicKey` and `repairSealingPublicKey` take the
20
+ read keys. Code that read `unlocked.attach` has no replacement on the read keys: the attach key is
21
+ reachable only inside `openOwnerHandover(keyring, credential)`, which certifies a runtime
22
+ (`certify(instancePublicKey, binding)`) and proves the owner on an owner link, and never hands out a
23
+ key.
24
+
25
+ The keyring also gains the owner link: `startSpawnerExchange()` and `createRuntimeIdentity()` for the
26
+ key a runtime shares with the process that started it, `createLinkInitiator()` and
27
+ `createLinkResponder()` for the handshake in which the runtime proves itself first, sealed frames
28
+ per direction, and a read grant that gives a runtime the read keys and never the attach key or the
29
+ master key. Refusals are `LinkRefusedError`, whose `reason` names the failed check.
30
+
31
+ `@robota-sdk/agent-transport-link` is published for the first time. It carries the owner link over a
32
+ local byte stream (`serveRuntimeLink`, `openSpawnerLink`, `openOwnerLink`) with a strict owner
33
+ vocabulary. It is dormant: nothing in the CLI or the desktop app uses it yet.