@sellable/mcp 0.1.859 → 0.1.860

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.
@@ -157,6 +157,17 @@ export declare function createMcpCredentialBoundary<T extends {
157
157
  approvalId: null;
158
158
  sessionId: null;
159
159
  };
160
+ } | {
161
+ mode: "agent_service";
162
+ authorization: unknown;
163
+ context: {
164
+ principal: McpAgentServiceContext;
165
+ requesterId: null;
166
+ channelId: null;
167
+ providerRequestId: null;
168
+ approvalId: null;
169
+ sessionId: null;
170
+ };
160
171
  } | {
161
172
  mode: "agent_service";
162
173
  authorization: unknown;
@@ -288,6 +288,29 @@ export function createMcpCredentialBoundary(input) {
288
288
  const requesterId = call.requesterId?.trim();
289
289
  const channelId = call.channelId?.trim();
290
290
  const providerRequestId = call.providerRequestId?.trim();
291
+ if (!requesterId && !channelId && !providerRequestId) {
292
+ // Non-Slack runtime sessions (console/TUI, cron) authenticate with
293
+ // the service credential alone and carry no actor triplet. They
294
+ // authorize with a null-requester context, exactly like consumed
295
+ // endpoint-run principals above; per-tool actor gates still apply.
296
+ const context = {
297
+ principal: resolved.principal,
298
+ requesterId: null,
299
+ channelId: null,
300
+ providerRequestId: null,
301
+ approvalId: null,
302
+ sessionId: null,
303
+ };
304
+ return {
305
+ mode: "agent_service",
306
+ authorization: await input.agentAuthorization.authorizeCall({
307
+ name: call.name,
308
+ args: call.args,
309
+ context,
310
+ }),
311
+ context,
312
+ };
313
+ }
291
314
  if (!requesterId ||
292
315
  requesterId.length > 160 ||
293
316
  !channelId ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.859",
3
+ "version": "0.1.860",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code, Codex, and Hermes campaign workflows",
6
6
  "main": "dist/index.js",