@dudko.dev/agent-web 0.0.47 → 0.0.48

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 (42) hide show
  1. package/README.md +12 -2
  2. package/dist/agent-web.js +124 -124
  3. package/dist/agent-web.js.map +1 -1
  4. package/dist/{chunk-Y6CD3WOK.js → chunk-6D4RB3H5.js} +11 -213
  5. package/dist/chunk-6D4RB3H5.js.map +1 -0
  6. package/dist/{chunk-PTJA7V23.js → chunk-6XHCPSZE.js} +5 -3
  7. package/dist/{chunk-PTJA7V23.js.map → chunk-6XHCPSZE.js.map} +1 -1
  8. package/dist/{chunk-Y4MIIBPB.js → chunk-7D2CJQB2.js} +1 -100
  9. package/dist/chunk-7D2CJQB2.js.map +1 -0
  10. package/dist/chunk-7Y5UC6L7.js +52 -0
  11. package/dist/chunk-7Y5UC6L7.js.map +1 -0
  12. package/dist/chunk-IT77BVAD.js +99 -0
  13. package/dist/chunk-IT77BVAD.js.map +1 -0
  14. package/dist/chunk-JTZEUPIG.js +217 -0
  15. package/dist/chunk-JTZEUPIG.js.map +1 -0
  16. package/dist/index.cjs +33 -24
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +25 -66
  19. package/dist/index.d.ts +25 -66
  20. package/dist/index.js +35 -68
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp.cjs +28 -20
  23. package/dist/mcp.cjs.map +1 -1
  24. package/dist/mcp.d.cts +4 -3
  25. package/dist/mcp.d.ts +4 -3
  26. package/dist/mcp.js +9 -5
  27. package/dist/mcp.js.map +1 -1
  28. package/dist/{sandbox-ZXWD5IWZ.js → sandbox-IGTCMOOX.js} +4 -3
  29. package/dist/{sandbox-ZXWD5IWZ.js.map → sandbox-IGTCMOOX.js.map} +1 -1
  30. package/dist/secrets.cjs +329 -0
  31. package/dist/secrets.cjs.map +1 -0
  32. package/dist/secrets.d.cts +63 -0
  33. package/dist/secrets.d.ts +63 -0
  34. package/dist/secrets.js +20 -0
  35. package/dist/secrets.js.map +1 -0
  36. package/dist/{vault-Mar2CY0J.d.ts → skills-ufoyTJ-B.d.cts} +2 -36
  37. package/dist/{vault-Mar2CY0J.d.cts → skills-ufoyTJ-B.d.ts} +2 -36
  38. package/dist/vault-BBGybouF.d.cts +35 -0
  39. package/dist/vault-BBGybouF.d.ts +35 -0
  40. package/package.json +11 -1
  41. package/dist/chunk-Y4MIIBPB.js.map +0 -1
  42. package/dist/chunk-Y6CD3WOK.js.map +0 -1
package/README.md CHANGED
@@ -107,7 +107,8 @@ import {
107
107
  } from '@dudko.dev/agent-web'
108
108
  import { z } from 'zod'
109
109
 
110
- // 1. Store the user's key once (e.g. from a settings form). Encrypted at rest.
110
+ // 1. Store the user's key once (e.g. from a settings form). Encrypted at rest. (A settings page
111
+ // that only stores keys can import it from '@dudko.dev/agent-web/secrets': no agent loaded.)
111
112
  const credentials = new VaultCredentialStore()
112
113
  await credentials.setApiKey('openai', userProvidedKey)
113
114
 
@@ -995,7 +996,8 @@ await watch.stop()
995
996
  - **Change notices** (`credentials`, `oauth`, `files`, `session`, `runs`, `skills`, and the React
996
997
  package's `chats`): one channel per database name, sent after the transaction completed, never for
997
998
  a failed write, never heard by the tab that wrote. A store of your own posts with
998
- `postStorageChange`. `agent.reloadLearnedSkills()` re-reads the notebook after a `skills` notice.
999
+ `postStorageChange` (kind `host` for one that keeps none of those: which store, which record -
1000
+ names only). `agent.reloadLearnedSkills()` re-reads the notebook after a `skills` notice.
999
1001
  - **`sessionLock`** (`'wait'` default, `'fail'`, `'off'`): the session's Web Lock for the run's whole
1000
1002
  duration, released however it ends (and by the browser when the tab closes). Subagents that share
1001
1003
  the session run under the parent's hold; helpers and pipeline nodes have sessions of their own.
@@ -1009,6 +1011,14 @@ await watch.stop()
1009
1011
  - **`watchSession`**: the run's events (clipped), its state (`running`, `ended: 'done' | 'stopped' |
1010
1012
  'gone'`), a replay for a tab that joins late, `send` and `stop`. Tool approvals never cross: they
1011
1013
  are answered in the tab that runs the tool.
1014
+ - **A deletion or an upgrade in another tab is never held up**: the one connection per database
1015
+ closes on `versionchange`; the next use opens a new, empty database after a deletion (the vault
1016
+ makes a new key there), and fails with a `VersionError` after an upgrade by a newer copy, until a
1017
+ reload.
1018
+ - **The vault without the agent**: `@dudko.dev/agent-web/secrets` (`IndexedDBVault`,
1019
+ `VaultCredentialStore`, `MemoryCredentialStore`, `getOrCreateVaultKey`, `encryptJSON`,
1020
+ `decryptJSON`) loads `idb` and the vault only - for a page that stores or lists keys before (or
1021
+ without) the agent. The same objects as the main entry's.
1012
1022
 
1013
1023
  Details: [Several tabs](docs/capabilities.md#several-tabs) ·
1014
1024
  [what crosses, and who can post](docs/security.md#several-tabs-what-crosses-and-who-can-post) ·