diff --git a/cordisx-package.json b/cordisx-package.json index 0fc1fa5..b5caff6 100644 --- a/cordisx-package.json +++ b/cordisx-package.json @@ -20,6 +20,6 @@ "runtimeManifest": { "path": "./runtime-manifest.json", "schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v8.schema.json", - "digest": "sha256:855fde2c4267a477140677f4a35f69b792f9ed2f0eb62e6bdc58120dd75f4cbe" + "digest": "sha256:8e5285fb4ec1908c85e67c43006f89a4d70343c751c95a753db10b108da5c62a" } } diff --git a/runtime-manifest.json b/runtime-manifest.json index c8d230b..8ba6103 100644 --- a/runtime-manifest.json +++ b/runtime-manifest.json @@ -4,59 +4,108 @@ "id": "channel", "name": "Channels", "capabilities": [ - { "name": "channel.accounts.read", "required": true, "scope": {} }, + { + "name": "channel.accounts.read", + "required": true, + "scope": {} + }, { "name": "channel.accounts.connect", "required": false, - "scope": { "channelAccounts": [{ "adapterId": "simulator", "accountId": "local" }] } + "scope": { + "channelAccounts": [ + { + "adapterId": "simulator", + "accountId": "local" + } + ] + } }, { "name": "channel.events.receive", "required": false, - "scope": { "channelTenants": [{ "adapterId": "simulator", "accountId": "local", "tenantId": "test" }] } + "scope": { + "channelTenants": [ + { + "adapterId": "simulator", + "accountId": "local", + "tenantId": "test" + } + ] + } }, { "name": "channel.events.subscribe", "required": false, - "scope": { "channelTenants": [{ "adapterId": "simulator", "accountId": "local", "tenantId": "test" }] } + "scope": { + "channelTenants": [ + { + "adapterId": "simulator", + "accountId": "local", + "tenantId": "test" + } + ] + } }, { "name": "channel.messages.send", "required": false, "scope": { - "channelConversations": [{ - "adapterId": "simulator", - "accountId": "local", - "tenantId": "test", - "conversationId": "direct-alice", - "kind": "direct" - }] + "channelConversations": [ + { + "adapterId": "simulator", + "accountId": "local", + "tenantId": "test", + "conversationId": "direct-alice", + "kind": "direct" + } + ] + } + }, + { + "name": "channel.bindings.read", + "required": false, + "scope": {} + }, + { + "name": "channel.bindings.write", + "required": false, + "scope": { + "channelTenants": [ + { + "adapterId": "simulator", + "accountId": "local", + "tenantId": "test" + } + ] } }, - { "name": "channel.bindings.read", "required": false, "scope": {} }, - { "name": "channel.bindings.write", "required": false, "scope": {} }, { "name": "channel.attachments.read", "required": false, "scope": { - "channelConversations": [{ - "adapterId": "simulator", - "accountId": "local", - "tenantId": "test", - "conversationId": "direct-alice", - "kind": "direct" - }] + "channelConversations": [ + { + "adapterId": "simulator", + "accountId": "local", + "tenantId": "test", + "conversationId": "direct-alice", + "kind": "direct" + } + ] } } ], - "services": [{ - "id": "runtime", - "kind": "channel-adapter", - "entry": "./dist/service.mjs", - "configuration": { - "kind": "host", - "schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/channel-service-config.v1.schema.json", - "configApplies": "restart" + "services": [ + { + "id": "runtime", + "kind": "channel-adapter", + "entry": "./dist/service.mjs", + "configuration": { + "kind": "host", + "schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/channel-service-config.v1.schema.json", + "configApplies": "restart" + } } - }] + ] } diff --git a/src/channel.ts b/src/channel.ts index e28ffe0..155b564 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -55,7 +55,11 @@ export const manifest = { }, }, { name: "channel.bindings.read", required: false, scope: {} }, - { name: "channel.bindings.write", required: false, scope: {} }, + { + name: "channel.bindings.write", + required: false, + scope: { channelTenants: [{ adapterId: "simulator", accountId: "local", tenantId: "test" }] }, + }, { name: "channel.attachments.read", required: false, diff --git a/test/scaffold.test.mjs b/test/scaffold.test.mjs index 2f8d1c2..638445f 100644 --- a/test/scaffold.test.mjs +++ b/test/scaffold.test.mjs @@ -27,3 +27,11 @@ test("owns maintained Channel styles as a real stylesheet", async () => { assert.match(styles, /@media\s*\(width\s*<=\s*700px\)/); assert.doesNotMatch(styles, /