@mida-context/sdk 0.1.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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +7115 -0
  5. package/dist/types/api/app.d.ts +99 -0
  6. package/dist/types/api/auth-pure.d.ts +51 -0
  7. package/dist/types/api/auth.d.ts +17 -0
  8. package/dist/types/api/authorize.d.ts +24 -0
  9. package/dist/types/api/batch-deny.d.ts +22 -0
  10. package/dist/types/api/batch-routes.d.ts +69 -0
  11. package/dist/types/api/batch-store.d.ts +96 -0
  12. package/dist/types/api/batcher.d.ts +220 -0
  13. package/dist/types/api/browser.d.ts +14 -0
  14. package/dist/types/api/chain-budget.d.ts +61 -0
  15. package/dist/types/api/chain-views.d.ts +87 -0
  16. package/dist/types/api/client.d.ts +295 -0
  17. package/dist/types/api/deny-overlay.d.ts +81 -0
  18. package/dist/types/api/errors.d.ts +30 -0
  19. package/dist/types/api/file-stores.d.ts +7 -0
  20. package/dist/types/api/index.d.ts +17 -0
  21. package/dist/types/api/secure-fs.d.ts +12 -0
  22. package/dist/types/api/store.d.ts +51 -0
  23. package/dist/types/api/stores.d.ts +171 -0
  24. package/dist/types/api/verify-assertion.d.ts +22 -0
  25. package/dist/types/api/wire.d.ts +27 -0
  26. package/dist/types/chain/abis.d.ts +2125 -0
  27. package/dist/types/chain/browser.d.ts +20 -0
  28. package/dist/types/chain/deployment-fs.d.ts +15 -0
  29. package/dist/types/chain/deployment.d.ts +33 -0
  30. package/dist/types/chain/deployments.generated.d.ts +1 -0
  31. package/dist/types/chain/gas.d.ts +47 -0
  32. package/dist/types/chain/history.d.ts +52 -0
  33. package/dist/types/chain/index.d.ts +13 -0
  34. package/dist/types/chain/local.d.ts +34 -0
  35. package/dist/types/chain/logs.d.ts +62 -0
  36. package/dist/types/chain/placements.d.ts +92 -0
  37. package/dist/types/chain/read-scope.d.ts +66 -0
  38. package/dist/types/chain/registry.d.ts +16 -0
  39. package/dist/types/chain/sponsored.d.ts +93 -0
  40. package/dist/types/chain/transport.d.ts +53 -0
  41. package/dist/types/chain/writes.d.ts +165 -0
  42. package/dist/types/crypto/aead.d.ts +5 -0
  43. package/dist/types/crypto/bytes.d.ts +4 -0
  44. package/dist/types/crypto/derive.d.ts +20 -0
  45. package/dist/types/crypto/index.d.ts +6 -0
  46. package/dist/types/crypto/object.d.ts +42 -0
  47. package/dist/types/crypto/payload.d.ts +21 -0
  48. package/dist/types/crypto/wraps.d.ts +36 -0
  49. package/dist/types/grant-advisor/advise.d.ts +23 -0
  50. package/dist/types/grant-advisor/authority.d.ts +44 -0
  51. package/dist/types/grant-advisor/index.d.ts +5 -0
  52. package/dist/types/grant-advisor/manifest.d.ts +66 -0
  53. package/dist/types/grant-advisor/policy.d.ts +91 -0
  54. package/dist/types/grant-advisor/signatures.d.ts +10 -0
  55. package/dist/types/mida-context-sdk/daemon.d.ts +27 -0
  56. package/dist/types/mida-context-sdk/errors.d.ts +27 -0
  57. package/dist/types/mida-context-sdk/index.d.ts +5 -0
  58. package/dist/types/mida-context-sdk/local.d.ts +40 -0
  59. package/dist/types/mida-context-sdk/mida.d.ts +65 -0
  60. package/dist/types/mida-context-sdk/transport.d.ts +137 -0
  61. package/dist/types/protocol/batch.d.ts +161 -0
  62. package/dist/types/protocol/constants.d.ts +56 -0
  63. package/dist/types/protocol/errors.d.ts +15 -0
  64. package/dist/types/protocol/ids.d.ts +72 -0
  65. package/dist/types/protocol/index.d.ts +11 -0
  66. package/dist/types/protocol/namespaces.d.ts +15 -0
  67. package/dist/types/protocol/owner-link.d.ts +146 -0
  68. package/dist/types/protocol/typed-data.d.ts +365 -0
  69. package/dist/types/protocol/types.d.ts +215 -0
  70. package/dist/types/protocol/webauthn-assertion.d.ts +29 -0
  71. package/dist/types/protocol/wire.d.ts +8 -0
  72. package/dist/types/sdk/agent.d.ts +279 -0
  73. package/dist/types/sdk/batched.d.ts +68 -0
  74. package/dist/types/sdk/connect.d.ts +88 -0
  75. package/dist/types/sdk/index.d.ts +7 -0
  76. package/dist/types/sdk/request-store.d.ts +26 -0
  77. package/dist/types/storage/index.d.ts +23 -0
  78. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Akinyemi Damilola
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @mida-context/sdk
2
+
3
+ **Give your agent the memory a user approved, and nothing more.** The Mida SDK reads and writes a
4
+ user's Mida memory through the Mida service on their machine. The user approves your agent once,
5
+ every read passes the grants they signed, and they can revoke your agent at any time.
6
+
7
+ ```ts
8
+ import { Mida } from "@mida-context/sdk"
9
+
10
+ const mida = new Mida({ agent: "my-agent" })
11
+ const { items } = await mida.context({ namespace: "projects.current", limit: 8192 })
12
+ await mida.remember({ namespace: "projects.current", content: { note: "user prefers pnpm" } })
13
+ ```
14
+
15
+ You need Node 22 or later and the `mida` command (`npm install -g mida-context`). It registers your
16
+ agent (`mida add-agent my-agent`), lets the user approve it (`mida approve my-agent`), and runs the
17
+ local service this SDK talks to. Your app never holds the user's owner keys.
18
+
19
+ Seven calls: `status`, `requestAccess`, `context`, `remember`, `verify`, `handoff`, `whatsNew`.
20
+ Reference: [docs/sdk.md](https://github.com/damli40/mida-context/blob/main/docs/sdk.md).
21
+
22
+ **Pre-release. Monad testnet only. Not audited.**
23
+
24
+ ## License
25
+
26
+ MIT.
@@ -0,0 +1 @@
1
+ export * from "./types/mida-context-sdk/index.js"