{"_id":"@enc-protocol/dm-cli","name":"@enc-protocol/dm-cli","description":"Per-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.","dist-tags":{"latest":"0.4.2","local":"0.3.2-local"},"versions":{"0.1.0":{"name":"@enc-protocol/dm-cli","version":"0.1.0","type":"module","description":"ENC Protocol per-app SDK + skill for the \"dm\" app. Enclaves: DM,Personal,Registry.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.1.0"},"keywords":["enc-protocol","dm","sdk","skill"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"ERROR: No README data found!","_id":"@enc-protocol/dm-cli@0.1.0","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.1.0.tgz","shasum":"3bd85a8146945fc4eb115038b332eff80ab1b18f","integrity":"sha512-SjTL1/SJ9Kqgc4L7e6lQTj9lqTV8fohYbNCBFeB5bKdywWCGzdI+Y3C7O0SCTHQjrsc5fivVexa20cmCh0epZQ=="}},"0.1.1":{"name":"@enc-protocol/dm-cli","version":"0.1.1","type":"module","description":"ENC Protocol per-app SDK + skill for the \"dm\" app. Enclaves: DM,Personal,Registry.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.1.1"},"keywords":["enc-protocol","dm","sdk","skill"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.1.1","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.1.1.tgz","shasum":"22fa65dd769e10c1ae63e11166a58a8e0a0939d0","integrity":"sha512-5CrLGqZ77VMJ4WfBqkQPK/dn8pyP42ImYn0aWgM9ICwri9oW4vc76dSkY2aZOF4fCC6YGTKOxVqUN1n8IgrVyA=="}},"0.1.2":{"name":"@enc-protocol/dm-cli","version":"0.1.2","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app (typed methods, encryption hook). Enclaves: DM,Personal,Registry. For the Claude Code skill, use @enc-protocol/skill-dm (or `enc skill add dm`).","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.1.1"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.1.2","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.1.2.tgz","shasum":"79764856c8ccaf3e997cc4587367cd28f1ce0bf7","integrity":"sha512-CuG6poLSKjonx7Q6jDhdvxV5z23kyNIz0Kpb6g0ThDZJb2O/7MvLNz8N1lwA/4VZ0yzawccfG+yE3PGQ7AVqZw=="}},"0.2.0":{"name":"@enc-protocol/dm-cli","version":"0.2.0","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app — direct messages. Enclaves: DM, Personal, Registry. Encrypted: messages, invites.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.2.0"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.2.0","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.2.0.tgz","shasum":"242e36f88bb784ad1b51c24b302ee963cb3e5704","integrity":"sha512-Ma/iTY907Z2ZdOGMHD16KkQ0U2l9aXRzxGyBFJnsCcyv20fJeIucOFGxqIIv6dQhXIL7KGDtfroSdhnPZF1RVg=="}},"0.3.0":{"name":"@enc-protocol/dm-cli","version":"0.3.0","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app — direct messages. Enclaves: DM, Personal, Registry. Encrypted: messages, invites.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.3.0"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.3.0","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.3.0.tgz","shasum":"6dddf9486ba392260bfd2c8f13b5ada9c8ed3ce2","integrity":"sha512-qJGvzE4EWZD7z0EPgYs/AMxARE6GNnd80MUdgtqDT6nZg7hzWLIvUrgYdxYYl0Ble1kfIbynlVmI2CTykA+t6w=="}},"0.3.1":{"name":"@enc-protocol/dm-cli","version":"0.3.1","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app — direct messages. Enclaves: DM, Personal, Registry. Encrypted: messages, invites.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.3.0"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.3.1","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.3.1.tgz","shasum":"689e81dc159cdceecafb3521dffb4b428ce35c6f","integrity":"sha512-vEheSYtadg0Cu8QEEWjd83gnjlN4Jj6fImptaaLV5CX+pxmPdkcD0LtGAKkKX1DB0DUqceHmt5IW1KfcKgdcNQ=="}},"0.4.1":{"name":"@enc-protocol/dm-cli","version":"0.4.1","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app — direct messages. Enclaves: DM, Personal, Registry. Encrypted: messages, invites.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.4.0"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.4.1","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.4.1.tgz","shasum":"0c1639c17d515cf287276b2dacf4ab2f07dc5062","integrity":"sha512-imqtpTZrGtxYkpZ+acqbKbhV8gsBOdxnNfoswBF3+Bq7Bl2XBBZqMFXFppFLxbZ+4ZE62hcDii2v1P+iAAnrsw=="}},"0.4.2":{"name":"@enc-protocol/dm-cli","version":"0.4.2","type":"module","description":"ENC Protocol per-app SDK for the \"dm\" app — direct messages. Enclaves: DM, Personal, Registry. Encrypted: messages, invites.","main":"sdk.mjs","files":["sdk.mjs","cli.json","skill/SKILL.md","README.md"],"exports":{".":"./sdk.mjs","./sdk":"./sdk.mjs","./cli.json":"./cli.json","./skill":"./skill/SKILL.md"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.4.0"},"keywords":["enc-protocol","dm","sdk","cli"],"license":"MIT","publishConfig":{"registry":"https://npm-registry.ocrybit.workers.dev/"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","_id":"@enc-protocol/dm-cli@0.4.2","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.4.2.tgz","shasum":"8069f26af94f88e137569d53ef12cf1ffe2c2b04","integrity":"sha512-FFrWlZjBEd9ORqZn7DHa3mK2ehevdyssrZWUD3VCTJs+N285V6M+drhM5bRhnh0wxQmouZGFgoo6LfrjOCt9ig=="}},"0.3.2-local":{"name":"@enc-protocol/dm-cli","version":"0.3.2-local","type":"module","main":"sdk.mjs","exports":{".":"./sdk.mjs","./sdk.mjs":"./sdk.mjs"},"dependencies":{"@enc-protocol/cli-sdk-base":"^0.3.1"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n","readmeFilename":"README.md","gitHead":"9d8f216d0d69913d9f915ddcdc914e183a2ea52a","_id":"@enc-protocol/dm-cli@0.3.2-local","description":"Per-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"tarball":"https://npm-registry.ocrybit.workers.dev/@enc-protocol/dm-cli/-/@enc-protocol/dm-cli-0.3.2-local.tgz","shasum":"3571ac96d79c874de1a61a9a21ca22a39ac79407","integrity":"sha512-S8FqfjX5KMM33icM0xVZFbeJAlc8JjDQ2yXXSAtBCizUpXAuDiSEcCw+5a/djPYJ3Ng9+POlefoiZSyxIFwEaQ=="}}},"time":{"created":"2026-05-14T14:59:25.661Z","modified":"2026-06-12T21:35:37.358Z","0.1.0":"2026-05-14T14:59:25.661Z","0.1.1":"2026-05-14T15:08:18.575Z","0.1.2":"2026-05-14T15:18:29.186Z","0.2.0":"2026-05-14T16:18:50.867Z","0.3.0":"2026-05-15T19:19:13.644Z","0.3.1":"2026-05-15T19:53:48.589Z","0.4.1":"2026-05-19T02:59:30.840Z","0.4.2":"2026-05-19T17:59:42.695Z","0.3.2-local":"2026-06-12T21:35:37.358Z"},"readme":"# @enc-protocol/dm-cli\n\nPer-app SDK for the `dm` app on ENC Protocol. Enclaves: DM, Personal, Registry.\n\n> Auto-generated by `lib/codegen/readme-codegen.mjs` from `apps/dm/{app,schema}.json`. Do not hand-edit — regenerate via `enc gen readme dm`.\n\n## Install\n\n### Recommended — via the `enc` CLI\n\n```bash\n# Install the global enc CLI once (any project)\nnpm install -g @enc-protocol/cli --registry https://npm-registry.ocrybit.workers.dev/\n\n# Install the skill into the current project (.claude/commands/dm.md)\nenc skill add dm\n```\n\nThe skill is the recommended consumption surface for Claude Code — adds an `/enc dm` slash command. The skill package is published as `@enc-protocol/skill-dm`.\n\n### Programmatic — for direct SDK use\n\n```bash\necho \"@enc-protocol:registry=https://npm-registry.ocrybit.workers.dev/\" >> .npmrc\nnpm install @enc-protocol/dm-cli\n```\n\n## Quick example\n\n```js\nimport { DmSdk } from '@enc-protocol/dm-cli'\n\nconst sdk = new DmSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL })\nawait sdk.init()\nawait sdk.submitMessages({\"message_draft\":\"example\"})\nconst events = await sdk.queryProfiles()\n```\n\n## API reference\n\n### `new DmSdk(opts)`\n\nConstructor. Accepts:\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `mode` | `'mem' \\| 'cf'` | Backend: in-process mem or HTTP cf |\n| `identity` | `Identity` | Required for cf mode (signing keypair) |\n| `nodeUrl` | `string` | cf-mode node URL (or set `NODE_URL` env) |\n| `repoRoot` | `string` | Path to repo root for finding `apps/<id>/` and `enclaves/<Name>.json` (defaults to package location) |\n| `encHome` | `string` | Optional state directory (defaults to `~/.enc`) |\n\n### `async init()`\n\nInitialize the SDK: load app definition, register all 3 enclaves (DM, Personal, Registry), wire dataview, mint cf enclaves if needed.\n\n### Write methods\n\n| Method | Data type | Resolves to | Encrypted | Ops | Operators |\n|--------|-----------|-------------|-----------|-----|-----------|\n| `submitMessages(args)` | `messages` | `DM.message` | ✓ | CDU | FRIEND \\| OWNER \\| Sender |\n\n### Read methods\n\n| Method | Read | Source | Fields |\n|--------|------|--------|--------|\n| `queryProfiles()` | `profiles` | *dataview (cross_enclave)* | *all* |\n| `queryInvites()` | `invites` | `DM.invite` | `greeting`, `pub`, `accept`, `reject` |\n| `queryMessages()` | `messages` | `DM.message` | `body`, `outgoing` |\n\n### Encryption\n\nData types `messages`, `invites` are flagged `encrypt` in the app schema. The SDK calls `this._encrypt(dataType, args)` before submit. The default `_encrypt` is a pass-through.\n\nTo add real encryption (e.g. MLS for DM), subclass and override:\n\n```js\nclass EncryptedDmSdk extends DmSdk {\n  async _encrypt(dataType, args) {\n    // produce ciphertext for `args`\n    return { ciphertext: /* ... */ }\n  }\n}\n```\n\n## Composition\n\n- **Enclaves**: `DM`, `Personal`, `Registry`\n- **tableMap**: `messages` → `message`, `invites` → `invite`\n- **encrypt**: `messages`, `invites`\n- **derived views**: `contacts`\n\n## See also\n\n- [`cli.json`](./cli.json) — full app metadata + fuzz contract\n- [`skill/SKILL.md`](./skill/SKILL.md) — Claude Code skill bundle (install via `enc skill install dm`)\n- `@enc-protocol/cli-sdk-base` — base class (`AppSdk`, `AppClient`, `DataView`)\n"}