@agent-native/core 0.98.7 → 0.98.8
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.
- package/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/docs/content/external-agents.mdx +17 -11
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +6 -2
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +6 -2
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/session-replay.ts +29 -7
- package/corpus/core/src/integrations/adapters/slack.ts +13 -2
- package/corpus/core/src/integrations/pending-tasks-retry-job.ts +2 -1
- package/corpus/core/src/integrations/pending-tasks-store.ts +1 -1
- package/corpus/core/src/integrations/plugin.ts +183 -48
- package/corpus/core/src/integrations/types.ts +7 -0
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +24 -7
- package/dist/client/session-replay.js.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/integrations/adapters/slack.js +11 -2
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.js +2 -1
- package/dist/integrations/pending-tasks-retry-job.js.map +1 -1
- package/dist/integrations/pending-tasks-store.js +1 -1
- package/dist/integrations/pending-tasks-store.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +140 -34
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/types.d.ts +7 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/docs/content/external-agents.mdx +17 -11
- package/docs/content/locales/ar-SA/external-agents.mdx +6 -2
- package/docs/content/locales/de-DE/external-agents.mdx +6 -2
- package/docs/content/locales/es-ES/external-agents.mdx +6 -2
- package/docs/content/locales/fr-FR/external-agents.mdx +6 -2
- package/docs/content/locales/hi-IN/external-agents.mdx +6 -2
- package/docs/content/locales/ja-JP/external-agents.mdx +6 -2
- package/docs/content/locales/ko-KR/external-agents.mdx +6 -2
- package/docs/content/locales/pt-BR/external-agents.mdx +6 -2
- package/docs/content/locales/zh-CN/external-agents.mdx +6 -2
- package/docs/content/locales/zh-TW/external-agents.mdx +6 -2
- package/package.json +1 -1
|
@@ -368,6 +368,13 @@ export interface IntegrationsPluginOptions {
|
|
|
368
368
|
* linked user. When present this supersedes `resolveOwner`.
|
|
369
369
|
*/
|
|
370
370
|
resolveExecutionContext?: (incoming: IncomingMessage) => IntegrationExecutionContext | Promise<IntegrationExecutionContext>;
|
|
371
|
+
/**
|
|
372
|
+
* Explicitly allow an unlinked, verified Slack workspace member to run a DM
|
|
373
|
+
* with the installation organization's shared/service visibility. Disabled
|
|
374
|
+
* by default: DM identity resolution fails closed unless an app deliberately
|
|
375
|
+
* accepts this wider access tier.
|
|
376
|
+
*/
|
|
377
|
+
allowAnonymousOrgScopedSlackDm?: boolean;
|
|
371
378
|
/**
|
|
372
379
|
* Optional preprocessor for inbound platform messages. Can intercept special
|
|
373
380
|
* commands (such as `/link`) before the agent loop runs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,KAAK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ACH,aAAa,CAAC,EAAE,CACd,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,eAAe,KACrB,OAAO,CACR;QACE,OAAO,EAAE,IAAI,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACD;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CACrB,CAAC;CACH;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AA8NA,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IAIhD,QAAQ;IACR,UAAU;IAJZ,IAAI,GAAG,iCAAiC,CAAC;IAElD,YACW,QAAgB,EAChB,UAA6C;QAEtD,KAAK,CAAC,YAAY,QAAQ,qBAAqB,UAAU,EAAE,CAAC,CAAC;wBAHpD,QAAQ;0BACR,UAAU;QAGnB,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IACnD,CAAC;CACF;AAkKD,MAAM,UAAU,wBAAwB,CACtC,OAAwB,EACxB,UAA6C;IAE7C,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,kCAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC","sourcesContent":["import type { H3Event } from \"h3\";\n\nimport type { AgentChatEvent } from \"../agent/types.js\";\nimport type { EnvKeyConfig } from \"../server/create-server.js\";\n\nexport type IntegrationConversationType =\n | \"channel\"\n | \"private_channel\"\n | \"dm\"\n | \"group_dm\"\n | \"unknown\";\n\nexport type IntegrationTriggerKind = \"mention\" | \"dm\" | \"thread_reply\";\n\nexport interface IntegrationActorTrust {\n memberType: \"owner\" | \"admin\" | \"member\" | \"guest\" | \"external\" | \"unknown\";\n verified: boolean;\n}\n\nexport interface IntegrationContextMessage {\n senderId?: string;\n senderName?: string;\n text: string;\n timestamp: number;\n sourceUrl?: string;\n reactions?: Array<{ name: string; count: number }>;\n files?: IntegrationFileReference[];\n}\n\nexport interface IntegrationFileReference {\n id: string;\n name?: string;\n mimetype?: string;\n size?: number;\n permalink?: string;\n downloadUrl?: string;\n}\n\n/**\n * Normalized incoming message from any messaging platform.\n */\nexport interface IncomingMessage {\n /** Platform identifier (e.g., \"slack\", \"telegram\", \"whatsapp\") */\n platform: string;\n /** Platform-specific thread/conversation identifier */\n externalThreadId: string;\n /** Message text content */\n text: string;\n /** Display name of the sender */\n senderName?: string;\n /** Verified sender email, when the platform can provide one */\n senderEmail?: string;\n /** Platform-specific sender ID */\n senderId?: string;\n /** How this message intentionally invoked an agent. */\n triggerKind?: IntegrationTriggerKind;\n /** Normalized provider conversation type for policy evaluation. */\n conversationType?: IntegrationConversationType;\n /** Provider tenant/workspace identifier. */\n tenantId?: string;\n /** Authorized integration scope resolved before execution. */\n integrationScopeId?: string;\n /** Normalized actor trust; unknown/unverified callers fail closed. */\n actorTrust?: IntegrationActorTrust;\n /** Bounded provider-native conversation context hydrated at run time. */\n contextMessages?: IntegrationContextMessage[];\n /** Provider file references only. Raw file bodies never belong here. */\n files?: IntegrationFileReference[];\n /** Server-verified approval grants carried by an interaction continuation. */\n approvedToolCalls?: string[];\n /**\n * Whether the platform cryptographically authenticated that the message\n * genuinely came from the claimed sender (e.g. inbound email that passed\n * DKIM, or an aligned SPF pass, for the From domain). Defaults to\n * undefined/false for platforms that don't provide sender authentication.\n *\n * Owner-resolution paths that grant a real user's identity/credentials\n * MUST treat a missing/false value as \"unverified\" and fail closed —\n * never derive a privileged acting identity from an unverified sender.\n */\n senderVerified?: boolean;\n /** Raw platform-specific context needed for routing responses */\n platformContext: Record<string, unknown>;\n /**\n * Short-lived delivery context needed only while the queued task is active.\n * Secrets such as Discord interaction tokens belong here, never in\n * `platformContext`, thread mappings, logs, or agent-visible context.\n */\n responseContext?: Record<string, unknown>;\n /** Provider-native thread/topic reference, when one exists. */\n threadRef?: string;\n /**\n * Canonical provider URL for the originating message thread, when the\n * provider can resolve one. This is safe agent-visible provenance (not a\n * credential) and should be preserved across A2A delegation so created\n * artifacts can link back to their request source.\n */\n sourceUrl?: string;\n /**\n * Trusted app-side routing guidance added after provider parsing. Adapters\n * should not copy this from user-controlled webhook payload fields.\n */\n routingHint?: {\n targetAgent?: string;\n instruction: string;\n };\n /**\n * Trusted app-side note about the caller's identity/visibility tier, set\n * after execution-context resolution (e.g. an anonymous org-scoped Slack\n * member). Surfaced to the agent as integration context. Adapters must not\n * copy this from user-controlled webhook payload fields.\n */\n identityNote?: string;\n /** Provider-native message/activity reference for contextual replies. */\n replyRef?: string;\n /** Message timestamp (epoch ms) */\n timestamp: number;\n}\n\n/**\n * Outgoing message to send back to a messaging platform.\n */\nexport interface OutgoingMessage {\n /** Text content of the response */\n text: string;\n /** Platform-specific payload (e.g., Slack blocks, Telegram parse_mode) */\n platformContext: Record<string, unknown>;\n}\n\n/**\n * Proactive outbound message target for a platform.\n * Used when the agent needs to send to a saved destination instead of replying\n * to the current inbound thread.\n */\nexport interface OutboundTarget {\n /** Canonical platform-specific destination id (channel, chat, thread, etc.) */\n destination: string;\n /** Optional thread reference when the destination supports threading */\n threadRef?: string | null;\n /** Optional fallback display label */\n label?: string;\n /** Provider tenant/workspace used to select an installation credential. */\n tenantId?: string;\n /** Managed installation id when the caller already resolved it. */\n installationId?: string;\n}\n\n/**\n * Connection status for a platform integration.\n */\nexport interface IntegrationStatus {\n platform: string;\n /** Human-readable label (e.g., \"Slack\", \"Telegram\") */\n label: string;\n /** Whether the integration is explicitly enabled */\n enabled: boolean;\n /** Whether all required credentials are configured */\n configured: boolean;\n /** Platform-specific details (workspace name, bot username, etc.) */\n details?: Record<string, unknown>;\n /** Error message if something is wrong */\n error?: string;\n /** The webhook URL that should be configured in the platform */\n webhookUrl?: string;\n /** The full list of env keys (required + optional) the adapter recognizes,\n * including UI hints. Surfaced on the integrations status endpoint so the\n * frontend can render fields without hard-coding them per platform. */\n requiredEnvKeys?: import(\"../server/create-server.js\").EnvKeyConfig[];\n}\n\nexport interface PlatformAdapterCapabilities {\n /** The adapter can deliver a response to the current inbound event. */\n replyText: boolean;\n /** The adapter can send without an active inbound event. */\n proactiveMessages: boolean;\n /** The adapter preserves a provider-native thread or topic reference. */\n nativeThreads: boolean;\n /** The adapter can quote/reply to a specific inbound message. */\n contextualReplies: boolean;\n /** The provider requires an immediate deferred webhook acknowledgement. */\n deferredWebhookResponse: boolean;\n /** The adapter only receives explicit interactions, not ordinary messages. */\n interactionOnly?: boolean;\n /** The adapter can hydrate bounded native thread/file/reaction context. */\n nativeContextHydration?: boolean;\n /** The adapter can surface live agent progress in the provider UI. */\n liveRunProgress?: boolean;\n}\n\nexport interface PlatformRunProgress {\n /**\n * Opaque, provider-owned reference for resuming this progress surface from a\n * durable continuation. It deliberately contains no user content,\n * credentials, or provider payload.\n */\n ref?: PlatformRunProgressRef;\n /** Receive normalized agent events. Implementations should throttle writes. */\n onEvent(event: AgentChatEvent): Promise<void> | void;\n /** Finalize the provider-native progress surface with the answer. */\n complete(message: OutgoingMessage): Promise<void>;\n /** Mark the provider-native surface failed and leave a retryable explanation. */\n fail?(message: string): Promise<void>;\n}\n\n/**\n * Safe, minimal reference to a provider-native run-progress surface.\n *\n * The field values are opaque to the framework. Adapters may use `kind` to\n * distinguish their own resume strategy and `streamTs` to identify the\n * provider-side stream. No incoming message text, platform payload, or\n * credential belongs here.\n */\nexport interface PlatformRunProgressRef {\n kind: string;\n streamTs: string;\n}\n\nexport interface ImmediateWebhookResponse {\n status: number;\n body: unknown;\n}\n\nexport class UnsupportedPlatformCapabilityError extends Error {\n readonly code = \"UNSUPPORTED_PLATFORM_CAPABILITY\";\n\n constructor(\n readonly platform: string,\n readonly capability: keyof PlatformAdapterCapabilities,\n ) {\n super(`Platform ${platform} does not support ${capability}`);\n this.name = \"UnsupportedPlatformCapabilityError\";\n }\n}\n\n/**\n * Platform adapter interface — implement this for each messaging platform.\n *\n * Each adapter handles the platform-specific concerns:\n * - Webhook verification (HMAC signatures, challenge responses)\n * - Message parsing (platform events → normalized IncomingMessage)\n * - Response formatting (agent text → platform-specific format)\n * - Response delivery (POST back to platform API)\n */\nexport interface PlatformAdapter {\n /** Unique platform identifier */\n readonly platform: string;\n /** Human-readable label */\n readonly label: string;\n /** Explicit runtime behavior. Missing fields are treated as unsupported. */\n readonly capabilities?: Partial<PlatformAdapterCapabilities>;\n\n /** Env keys this adapter needs (tokens, secrets, etc.) */\n getRequiredEnvKeys(): EnvKeyConfig[];\n\n /**\n * Handle platform-specific verification challenges.\n * For example, Slack sends a `url_verification` event when setting up.\n * Return `{ handled: true, response }` to short-circuit the webhook handler.\n */\n handleVerification(event: H3Event): Promise<{\n handled: boolean;\n response?: unknown;\n }>;\n\n /**\n * Validate the webhook request signature.\n * Returns true if the request is authentic.\n */\n verifyWebhook(event: H3Event): Promise<boolean>;\n\n /**\n * Parse the webhook payload into a normalized IncomingMessage.\n * Return null to silently ignore the event (bot messages, edits, etc.).\n */\n parseIncomingMessage(event: H3Event): Promise<IncomingMessage | null>;\n\n /**\n * Hydrate bounded provider-native context after durable enqueue, outside the\n * provider acknowledgement budget. Implementations must return references,\n * metadata, and text only — never persist file bodies or credentials.\n */\n hydrateIncomingMessage?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Hydrate only verified sender identity before execution-context selection.\n * This runs on the provider acknowledgement path and must avoid fetching\n * conversation history or file bodies.\n */\n hydrateIncomingIdentity?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Provider-specific response returned only after a message is verified and\n * durably enqueued. Discord uses this to return a type-5 deferred response\n * within its three-second interaction deadline.\n */\n getImmediateWebhookResponse?(\n incoming: IncomingMessage,\n ): ImmediateWebhookResponse | null;\n\n /**\n * Return pre-canonical thread ids used by older adapter versions. The\n * integration handler checks these only when the canonical mapping is\n * missing, then aliases a match to the canonical id without forking history.\n */\n getLegacyExternalThreadIds?(incoming: IncomingMessage): string[];\n\n /**\n * Send the agent's response back to the messaging platform.\n *\n * If `opts.placeholderRef` is provided (returned earlier by\n * `postProcessingPlaceholder`), adapters that support in-place edits should\n * update that placeholder message rather than posting a new one. Adapters\n * without an \"update message\" API can ignore the ref and post fresh.\n */\n sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n opts?: { placeholderRef?: string },\n ): Promise<void>;\n\n /**\n * Send a short best-effort system notice to the conversation the incoming\n * message arrived on (polite identity declines, one-time access guidance).\n * Bypasses agent formatting. When `dedupeKey` is provided, the adapter may\n * drop the notice if the same key was sent recently. Callers must treat\n * failures as non-fatal.\n */\n sendSystemNotice?(\n incoming: IncomingMessage,\n text: string,\n opts?: {\n dedupeKey?: string;\n /** Dedupe window for `dedupeKey`. Adapters pick a default when omitted. */\n dedupeTtlMs?: number;\n },\n ): Promise<void>;\n\n /**\n * Optionally post a \"working on it…\" placeholder message immediately when a\n * webhook arrives, before the agent loop runs. Adapters that support\n * in-place message edits (Slack via `chat.update`, etc.) return an opaque\n * `placeholderRef` that the webhook flow threads through to `sendResponse`\n * so the same message is updated with the final answer once ready.\n *\n * Adapters without edit support should leave this undefined; the webhook\n * handler will skip the placeholder step entirely.\n */\n postProcessingPlaceholder?(\n incoming: IncomingMessage,\n ): Promise<{ placeholderRef: string } | null>;\n\n /** Start a provider-native progress/streaming surface for an agent run. */\n startRunProgress?(\n incoming: IncomingMessage,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Reattach a durable continuation to a provider-native progress surface\n * previously started by this adapter. Adapters that cannot resume a native\n * surface should omit this and the continuation will use its normal reply\n * path instead.\n */\n resumeRunProgress?(\n incoming: IncomingMessage,\n ref: PlatformRunProgressRef,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Send a proactive outbound message to a platform destination. Adapters that\n * only support direct replies can omit this.\n */\n sendMessageToTarget?(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void>;\n\n /**\n * Format plain agent response text into a platform-appropriate message.\n * Handles markdown conversion, message splitting for length limits, etc.\n *\n * `opts.threadDeepLinkUrl`, when present, is a URL back to the originating\n * thread in the dispatch UI. Adapters that support rich blocks should\n * render this as a button (Slack); adapters that don't may inline it as a\n * link or simply omit it.\n */\n formatAgentResponse(\n text: string,\n opts?: { threadDeepLinkUrl?: string },\n ): OutgoingMessage;\n\n /** Return current connection/configuration status for the settings UI. */\n getStatus(baseUrl?: string): Promise<IntegrationStatus>;\n}\n\nexport function assertPlatformCapability(\n adapter: PlatformAdapter,\n capability: keyof PlatformAdapterCapabilities,\n): void {\n if (adapter.capabilities?.[capability] !== true) {\n throw new UnsupportedPlatformCapabilityError(adapter.platform, capability);\n }\n}\n\n/**\n * Options for the integrations plugin.\n */\nexport interface IntegrationsPluginOptions {\n /** App identifier used by call-agent to prevent self-calls (e.g. \"dispatch\"). */\n appId?: string;\n /** Platform adapters to enable. Default: all built-in adapters with configured env keys. */\n adapters?: PlatformAdapter[];\n /** System prompt for the agent (same as agent-chat). Inherited from agent-chat plugin if not set. */\n systemPrompt?: string;\n /** Actions registry (same as agent-chat). */\n actions?: Record<string, import(\"../agent/production-agent.js\").ActionEntry>;\n /** Model to use. Defaults to the resolved engine's default model. */\n model?: string;\n /** Anthropic API key. Falls back to ANTHROPIC_API_KEY env var. */\n apiKey?: string;\n /** Agent engine to use. Defaults to the same engine resolver as web chat. */\n engine?:\n | import(\"../agent/engine/types.js\").AgentEngine\n | string\n | {\n name: string;\n config: Record<string, unknown>;\n };\n /**\n * Resolve which owner should receive personal resource context and own the\n * created chat thread for an incoming platform message.\n */\n resolveOwner?: (incoming: IncomingMessage) => string | Promise<string>;\n /**\n * Resolve the durable execution principal for an inbound provider message.\n * Shared channels should use a service principal; DMs may use a verified\n * linked user. When present this supersedes `resolveOwner`.\n */\n resolveExecutionContext?: (\n incoming: IncomingMessage,\n ) => IntegrationExecutionContext | Promise<IntegrationExecutionContext>;\n /**\n * Optional preprocessor for inbound platform messages. Can intercept special\n * commands (such as `/link`) before the agent loop runs.\n */\n beforeProcess?: (\n incoming: IncomingMessage,\n adapter: PlatformAdapter,\n ) => Promise<\n | {\n handled: true;\n responseText?: string;\n }\n | { handled: false }\n >;\n}\n\nexport interface IntegrationExecutionContext {\n ownerEmail: string;\n orgId: string | null;\n principalType: \"user\" | \"service\";\n installationId?: string;\n scopeId?: string;\n /**\n * True when a hydrated full workspace member could not be matched to an\n * organization member and runs with the anonymous org-scoped service\n * principal (org-wide visibility only, nothing user-private).\n */\n anonymousMember?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AA8NA,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IAIhD,QAAQ;IACR,UAAU;IAJZ,IAAI,GAAG,iCAAiC,CAAC;IAElD,YACW,QAAgB,EAChB,UAA6C;QAEtD,KAAK,CAAC,YAAY,QAAQ,qBAAqB,UAAU,EAAE,CAAC,CAAC;wBAHpD,QAAQ;0BACR,UAAU;QAGnB,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IACnD,CAAC;CACF;AAkKD,MAAM,UAAU,wBAAwB,CACtC,OAAwB,EACxB,UAA6C;IAE7C,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,kCAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC","sourcesContent":["import type { H3Event } from \"h3\";\n\nimport type { AgentChatEvent } from \"../agent/types.js\";\nimport type { EnvKeyConfig } from \"../server/create-server.js\";\n\nexport type IntegrationConversationType =\n | \"channel\"\n | \"private_channel\"\n | \"dm\"\n | \"group_dm\"\n | \"unknown\";\n\nexport type IntegrationTriggerKind = \"mention\" | \"dm\" | \"thread_reply\";\n\nexport interface IntegrationActorTrust {\n memberType: \"owner\" | \"admin\" | \"member\" | \"guest\" | \"external\" | \"unknown\";\n verified: boolean;\n}\n\nexport interface IntegrationContextMessage {\n senderId?: string;\n senderName?: string;\n text: string;\n timestamp: number;\n sourceUrl?: string;\n reactions?: Array<{ name: string; count: number }>;\n files?: IntegrationFileReference[];\n}\n\nexport interface IntegrationFileReference {\n id: string;\n name?: string;\n mimetype?: string;\n size?: number;\n permalink?: string;\n downloadUrl?: string;\n}\n\n/**\n * Normalized incoming message from any messaging platform.\n */\nexport interface IncomingMessage {\n /** Platform identifier (e.g., \"slack\", \"telegram\", \"whatsapp\") */\n platform: string;\n /** Platform-specific thread/conversation identifier */\n externalThreadId: string;\n /** Message text content */\n text: string;\n /** Display name of the sender */\n senderName?: string;\n /** Verified sender email, when the platform can provide one */\n senderEmail?: string;\n /** Platform-specific sender ID */\n senderId?: string;\n /** How this message intentionally invoked an agent. */\n triggerKind?: IntegrationTriggerKind;\n /** Normalized provider conversation type for policy evaluation. */\n conversationType?: IntegrationConversationType;\n /** Provider tenant/workspace identifier. */\n tenantId?: string;\n /** Authorized integration scope resolved before execution. */\n integrationScopeId?: string;\n /** Normalized actor trust; unknown/unverified callers fail closed. */\n actorTrust?: IntegrationActorTrust;\n /** Bounded provider-native conversation context hydrated at run time. */\n contextMessages?: IntegrationContextMessage[];\n /** Provider file references only. Raw file bodies never belong here. */\n files?: IntegrationFileReference[];\n /** Server-verified approval grants carried by an interaction continuation. */\n approvedToolCalls?: string[];\n /**\n * Whether the platform cryptographically authenticated that the message\n * genuinely came from the claimed sender (e.g. inbound email that passed\n * DKIM, or an aligned SPF pass, for the From domain). Defaults to\n * undefined/false for platforms that don't provide sender authentication.\n *\n * Owner-resolution paths that grant a real user's identity/credentials\n * MUST treat a missing/false value as \"unverified\" and fail closed —\n * never derive a privileged acting identity from an unverified sender.\n */\n senderVerified?: boolean;\n /** Raw platform-specific context needed for routing responses */\n platformContext: Record<string, unknown>;\n /**\n * Short-lived delivery context needed only while the queued task is active.\n * Secrets such as Discord interaction tokens belong here, never in\n * `platformContext`, thread mappings, logs, or agent-visible context.\n */\n responseContext?: Record<string, unknown>;\n /** Provider-native thread/topic reference, when one exists. */\n threadRef?: string;\n /**\n * Canonical provider URL for the originating message thread, when the\n * provider can resolve one. This is safe agent-visible provenance (not a\n * credential) and should be preserved across A2A delegation so created\n * artifacts can link back to their request source.\n */\n sourceUrl?: string;\n /**\n * Trusted app-side routing guidance added after provider parsing. Adapters\n * should not copy this from user-controlled webhook payload fields.\n */\n routingHint?: {\n targetAgent?: string;\n instruction: string;\n };\n /**\n * Trusted app-side note about the caller's identity/visibility tier, set\n * after execution-context resolution (e.g. an anonymous org-scoped Slack\n * member). Surfaced to the agent as integration context. Adapters must not\n * copy this from user-controlled webhook payload fields.\n */\n identityNote?: string;\n /** Provider-native message/activity reference for contextual replies. */\n replyRef?: string;\n /** Message timestamp (epoch ms) */\n timestamp: number;\n}\n\n/**\n * Outgoing message to send back to a messaging platform.\n */\nexport interface OutgoingMessage {\n /** Text content of the response */\n text: string;\n /** Platform-specific payload (e.g., Slack blocks, Telegram parse_mode) */\n platformContext: Record<string, unknown>;\n}\n\n/**\n * Proactive outbound message target for a platform.\n * Used when the agent needs to send to a saved destination instead of replying\n * to the current inbound thread.\n */\nexport interface OutboundTarget {\n /** Canonical platform-specific destination id (channel, chat, thread, etc.) */\n destination: string;\n /** Optional thread reference when the destination supports threading */\n threadRef?: string | null;\n /** Optional fallback display label */\n label?: string;\n /** Provider tenant/workspace used to select an installation credential. */\n tenantId?: string;\n /** Managed installation id when the caller already resolved it. */\n installationId?: string;\n}\n\n/**\n * Connection status for a platform integration.\n */\nexport interface IntegrationStatus {\n platform: string;\n /** Human-readable label (e.g., \"Slack\", \"Telegram\") */\n label: string;\n /** Whether the integration is explicitly enabled */\n enabled: boolean;\n /** Whether all required credentials are configured */\n configured: boolean;\n /** Platform-specific details (workspace name, bot username, etc.) */\n details?: Record<string, unknown>;\n /** Error message if something is wrong */\n error?: string;\n /** The webhook URL that should be configured in the platform */\n webhookUrl?: string;\n /** The full list of env keys (required + optional) the adapter recognizes,\n * including UI hints. Surfaced on the integrations status endpoint so the\n * frontend can render fields without hard-coding them per platform. */\n requiredEnvKeys?: import(\"../server/create-server.js\").EnvKeyConfig[];\n}\n\nexport interface PlatformAdapterCapabilities {\n /** The adapter can deliver a response to the current inbound event. */\n replyText: boolean;\n /** The adapter can send without an active inbound event. */\n proactiveMessages: boolean;\n /** The adapter preserves a provider-native thread or topic reference. */\n nativeThreads: boolean;\n /** The adapter can quote/reply to a specific inbound message. */\n contextualReplies: boolean;\n /** The provider requires an immediate deferred webhook acknowledgement. */\n deferredWebhookResponse: boolean;\n /** The adapter only receives explicit interactions, not ordinary messages. */\n interactionOnly?: boolean;\n /** The adapter can hydrate bounded native thread/file/reaction context. */\n nativeContextHydration?: boolean;\n /** The adapter can surface live agent progress in the provider UI. */\n liveRunProgress?: boolean;\n}\n\nexport interface PlatformRunProgress {\n /**\n * Opaque, provider-owned reference for resuming this progress surface from a\n * durable continuation. It deliberately contains no user content,\n * credentials, or provider payload.\n */\n ref?: PlatformRunProgressRef;\n /** Receive normalized agent events. Implementations should throttle writes. */\n onEvent(event: AgentChatEvent): Promise<void> | void;\n /** Finalize the provider-native progress surface with the answer. */\n complete(message: OutgoingMessage): Promise<void>;\n /** Mark the provider-native surface failed and leave a retryable explanation. */\n fail?(message: string): Promise<void>;\n}\n\n/**\n * Safe, minimal reference to a provider-native run-progress surface.\n *\n * The field values are opaque to the framework. Adapters may use `kind` to\n * distinguish their own resume strategy and `streamTs` to identify the\n * provider-side stream. No incoming message text, platform payload, or\n * credential belongs here.\n */\nexport interface PlatformRunProgressRef {\n kind: string;\n streamTs: string;\n}\n\nexport interface ImmediateWebhookResponse {\n status: number;\n body: unknown;\n}\n\nexport class UnsupportedPlatformCapabilityError extends Error {\n readonly code = \"UNSUPPORTED_PLATFORM_CAPABILITY\";\n\n constructor(\n readonly platform: string,\n readonly capability: keyof PlatformAdapterCapabilities,\n ) {\n super(`Platform ${platform} does not support ${capability}`);\n this.name = \"UnsupportedPlatformCapabilityError\";\n }\n}\n\n/**\n * Platform adapter interface — implement this for each messaging platform.\n *\n * Each adapter handles the platform-specific concerns:\n * - Webhook verification (HMAC signatures, challenge responses)\n * - Message parsing (platform events → normalized IncomingMessage)\n * - Response formatting (agent text → platform-specific format)\n * - Response delivery (POST back to platform API)\n */\nexport interface PlatformAdapter {\n /** Unique platform identifier */\n readonly platform: string;\n /** Human-readable label */\n readonly label: string;\n /** Explicit runtime behavior. Missing fields are treated as unsupported. */\n readonly capabilities?: Partial<PlatformAdapterCapabilities>;\n\n /** Env keys this adapter needs (tokens, secrets, etc.) */\n getRequiredEnvKeys(): EnvKeyConfig[];\n\n /**\n * Handle platform-specific verification challenges.\n * For example, Slack sends a `url_verification` event when setting up.\n * Return `{ handled: true, response }` to short-circuit the webhook handler.\n */\n handleVerification(event: H3Event): Promise<{\n handled: boolean;\n response?: unknown;\n }>;\n\n /**\n * Validate the webhook request signature.\n * Returns true if the request is authentic.\n */\n verifyWebhook(event: H3Event): Promise<boolean>;\n\n /**\n * Parse the webhook payload into a normalized IncomingMessage.\n * Return null to silently ignore the event (bot messages, edits, etc.).\n */\n parseIncomingMessage(event: H3Event): Promise<IncomingMessage | null>;\n\n /**\n * Hydrate bounded provider-native context after durable enqueue, outside the\n * provider acknowledgement budget. Implementations must return references,\n * metadata, and text only — never persist file bodies or credentials.\n */\n hydrateIncomingMessage?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Hydrate only verified sender identity before execution-context selection.\n * This runs on the provider acknowledgement path and must avoid fetching\n * conversation history or file bodies.\n */\n hydrateIncomingIdentity?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Provider-specific response returned only after a message is verified and\n * durably enqueued. Discord uses this to return a type-5 deferred response\n * within its three-second interaction deadline.\n */\n getImmediateWebhookResponse?(\n incoming: IncomingMessage,\n ): ImmediateWebhookResponse | null;\n\n /**\n * Return pre-canonical thread ids used by older adapter versions. The\n * integration handler checks these only when the canonical mapping is\n * missing, then aliases a match to the canonical id without forking history.\n */\n getLegacyExternalThreadIds?(incoming: IncomingMessage): string[];\n\n /**\n * Send the agent's response back to the messaging platform.\n *\n * If `opts.placeholderRef` is provided (returned earlier by\n * `postProcessingPlaceholder`), adapters that support in-place edits should\n * update that placeholder message rather than posting a new one. Adapters\n * without an \"update message\" API can ignore the ref and post fresh.\n */\n sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n opts?: { placeholderRef?: string },\n ): Promise<void>;\n\n /**\n * Send a short best-effort system notice to the conversation the incoming\n * message arrived on (polite identity declines, one-time access guidance).\n * Bypasses agent formatting. When `dedupeKey` is provided, the adapter may\n * drop the notice if the same key was sent recently. Callers must treat\n * failures as non-fatal.\n */\n sendSystemNotice?(\n incoming: IncomingMessage,\n text: string,\n opts?: {\n dedupeKey?: string;\n /** Dedupe window for `dedupeKey`. Adapters pick a default when omitted. */\n dedupeTtlMs?: number;\n },\n ): Promise<void>;\n\n /**\n * Optionally post a \"working on it…\" placeholder message immediately when a\n * webhook arrives, before the agent loop runs. Adapters that support\n * in-place message edits (Slack via `chat.update`, etc.) return an opaque\n * `placeholderRef` that the webhook flow threads through to `sendResponse`\n * so the same message is updated with the final answer once ready.\n *\n * Adapters without edit support should leave this undefined; the webhook\n * handler will skip the placeholder step entirely.\n */\n postProcessingPlaceholder?(\n incoming: IncomingMessage,\n ): Promise<{ placeholderRef: string } | null>;\n\n /** Start a provider-native progress/streaming surface for an agent run. */\n startRunProgress?(\n incoming: IncomingMessage,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Reattach a durable continuation to a provider-native progress surface\n * previously started by this adapter. Adapters that cannot resume a native\n * surface should omit this and the continuation will use its normal reply\n * path instead.\n */\n resumeRunProgress?(\n incoming: IncomingMessage,\n ref: PlatformRunProgressRef,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Send a proactive outbound message to a platform destination. Adapters that\n * only support direct replies can omit this.\n */\n sendMessageToTarget?(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void>;\n\n /**\n * Format plain agent response text into a platform-appropriate message.\n * Handles markdown conversion, message splitting for length limits, etc.\n *\n * `opts.threadDeepLinkUrl`, when present, is a URL back to the originating\n * thread in the dispatch UI. Adapters that support rich blocks should\n * render this as a button (Slack); adapters that don't may inline it as a\n * link or simply omit it.\n */\n formatAgentResponse(\n text: string,\n opts?: { threadDeepLinkUrl?: string },\n ): OutgoingMessage;\n\n /** Return current connection/configuration status for the settings UI. */\n getStatus(baseUrl?: string): Promise<IntegrationStatus>;\n}\n\nexport function assertPlatformCapability(\n adapter: PlatformAdapter,\n capability: keyof PlatformAdapterCapabilities,\n): void {\n if (adapter.capabilities?.[capability] !== true) {\n throw new UnsupportedPlatformCapabilityError(adapter.platform, capability);\n }\n}\n\n/**\n * Options for the integrations plugin.\n */\nexport interface IntegrationsPluginOptions {\n /** App identifier used by call-agent to prevent self-calls (e.g. \"dispatch\"). */\n appId?: string;\n /** Platform adapters to enable. Default: all built-in adapters with configured env keys. */\n adapters?: PlatformAdapter[];\n /** System prompt for the agent (same as agent-chat). Inherited from agent-chat plugin if not set. */\n systemPrompt?: string;\n /** Actions registry (same as agent-chat). */\n actions?: Record<string, import(\"../agent/production-agent.js\").ActionEntry>;\n /** Model to use. Defaults to the resolved engine's default model. */\n model?: string;\n /** Anthropic API key. Falls back to ANTHROPIC_API_KEY env var. */\n apiKey?: string;\n /** Agent engine to use. Defaults to the same engine resolver as web chat. */\n engine?:\n | import(\"../agent/engine/types.js\").AgentEngine\n | string\n | {\n name: string;\n config: Record<string, unknown>;\n };\n /**\n * Resolve which owner should receive personal resource context and own the\n * created chat thread for an incoming platform message.\n */\n resolveOwner?: (incoming: IncomingMessage) => string | Promise<string>;\n /**\n * Resolve the durable execution principal for an inbound provider message.\n * Shared channels should use a service principal; DMs may use a verified\n * linked user. When present this supersedes `resolveOwner`.\n */\n resolveExecutionContext?: (\n incoming: IncomingMessage,\n ) => IntegrationExecutionContext | Promise<IntegrationExecutionContext>;\n /**\n * Explicitly allow an unlinked, verified Slack workspace member to run a DM\n * with the installation organization's shared/service visibility. Disabled\n * by default: DM identity resolution fails closed unless an app deliberately\n * accepts this wider access tier.\n */\n allowAnonymousOrgScopedSlackDm?: boolean;\n /**\n * Optional preprocessor for inbound platform messages. Can intercept special\n * commands (such as `/link`) before the agent loop runs.\n */\n beforeProcess?: (\n incoming: IncomingMessage,\n adapter: PlatformAdapter,\n ) => Promise<\n | {\n handled: true;\n responseText?: string;\n }\n | { handled: false }\n >;\n}\n\nexport interface IntegrationExecutionContext {\n ownerEmail: string;\n orgId: string | null;\n principalType: \"user\" | \"service\";\n installationId?: string;\n scopeId?: string;\n /**\n * True when a hydrated full workspace member could not be matched to an\n * organization member and runs with the anonymous org-scoped service\n * principal (org-wide visibility only, nothing user-private).\n */\n anonymousMember?: boolean;\n}\n"]}
|
|
@@ -381,7 +381,7 @@ Apps that want direct tools to "just work" without maintaining a long allow-list
|
|
|
381
381
|
|
|
382
382
|
```ts
|
|
383
383
|
export default createAgentChatPlugin({
|
|
384
|
-
appId: "
|
|
384
|
+
appId: "example-app",
|
|
385
385
|
externalAgents: {
|
|
386
386
|
authenticatedReads: "auto",
|
|
387
387
|
writes: "ask_app_only",
|
|
@@ -391,6 +391,8 @@ export default createAgentChatPlugin({
|
|
|
391
391
|
});
|
|
392
392
|
```
|
|
393
393
|
|
|
394
|
+
This is a generic policy example. Analytics intentionally sets `authenticatedReads: "off"` and exposes only its reviewed `connectorCatalog` actions.
|
|
395
|
+
|
|
394
396
|
`authenticatedReads: "auto"` adds only actions that explicitly declare all of the following:
|
|
395
397
|
|
|
396
398
|
- `http: { method: "GET" }`
|
|
@@ -415,23 +417,27 @@ record. Actions must still use the normal `accessFilter`, `resolveAccess`, or
|
|
|
415
417
|
shared resources follow their share/org rules, and cross-organization reads are
|
|
416
418
|
rejected.
|
|
417
419
|
|
|
420
|
+
An app that supplies `resolveExecutionContext` explicitly replaces this default identity ladder. Its resolver must independently reject unverified callers, guests, external members, and unlinked workspaces before returning a principal.
|
|
421
|
+
|
|
418
422
|
The default Slack integration follows the same rule. A verified Slack DM is
|
|
419
423
|
matched to an existing Agent Native organization member and persisted as a
|
|
420
424
|
workspace/user identity link before the agent runs, and the resulting user/org
|
|
421
|
-
context loads that user's resources, instructions, and skills.
|
|
422
|
-
workspace
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
context loads that user's resources, instructions, and skills. By default, a
|
|
426
|
+
hydrated workspace member whose email is missing or is not yet an organization
|
|
427
|
+
member is declined. Apps may explicitly set
|
|
428
|
+
`allowAnonymousOrgScopedSlackDm: true` to run those members as an anonymous
|
|
429
|
+
org-scoped service principal instead — the same org-wide-visibility tier shared
|
|
430
|
+
channels get, never user-private access — with an agent-visible note and a
|
|
431
|
+
one-time Slack heads-up explaining how to gain personal access. This opt-in
|
|
432
|
+
never admits hydration failures, unverified callers, guests or external (Slack
|
|
433
|
+
Connect) members, or workspaces not connected to an organization; those receive
|
|
434
|
+
a polite decline reply instead of a silent drop. Shared Slack channels use a service principal instead of
|
|
429
435
|
borrowing one participant's private permissions. Managed Slack OAuth requests
|
|
430
436
|
the `users:read.email` bot scope, and the generated Slack app manifest
|
|
431
437
|
requests it too. Existing Slack installs must be reconnected/reinstalled to
|
|
432
438
|
grant a newly added scope; legacy bot-token installs must add the scope in
|
|
433
|
-
Slack manually. Without it, DMs
|
|
434
|
-
|
|
439
|
+
Slack manually. Without it, DMs fail closed unless the app explicitly enables
|
|
440
|
+
`allowAnonymousOrgScopedSlackDm`.
|
|
435
441
|
|
|
436
442
|
### Full tier (explicit opt-in only) {#full-tier}
|
|
437
443
|
|
|
@@ -380,7 +380,7 @@ https://dispatch.agent-native.com/_agent-native/mcp
|
|
|
380
380
|
|
|
381
381
|
```ts
|
|
382
382
|
export default createAgentChatPlugin({
|
|
383
|
-
appId: "
|
|
383
|
+
appId: "example-app",
|
|
384
384
|
externalAgents: {
|
|
385
385
|
authenticatedReads: "auto",
|
|
386
386
|
writes: "ask_app_only",
|
|
@@ -390,6 +390,8 @@ export default createAgentChatPlugin({
|
|
|
390
390
|
});
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
+
هذا مثال عام للسياسة. يضبط Analytics الخيار `authenticatedReads: "off"` عمدًا، ولا يعرض سوى إجراءات `connectorCatalog` التي خضعت للمراجعة.
|
|
394
|
+
|
|
393
395
|
يضيف `authenticatedReads: "auto"` فقط الإجراءات التي تعلن صراحةً كل ما يلي:
|
|
394
396
|
|
|
395
397
|
- `http: { method: "GET" }`
|
|
@@ -404,7 +406,9 @@ export default createAgentChatPlugin({
|
|
|
404
406
|
|
|
405
407
|
هذا استبعاد صارم يعتمد على الاسم، وليس مجرد إغفال في البيانات الوصفية: أدوات قاعدة البيانات وseed وجلسة المتصفح والامتدادات وسياق الأشعة السينية العامة لا يُكشف عنها تلقائيًا أبدًا، حتى لو وسم تغيير مستقبلي إحداها عن طريق الخطأ بمجموعة أعلام القراءة المصادق عليها الكاملة — فهي تتطلب دائمًا إدخالًا صريحًا في `connectorCatalog`.
|
|
406
408
|
|
|
407
|
-
|
|
409
|
+
يستبدل التطبيق الذي يوفّر `resolveExecutionContext` تسلسل الهوية الافتراضي هذا صراحةً. ويجب على أداة الحل الخاصة به أن ترفض بشكل مستقل المتصلين غير المتحقق منهم والضيوف والأعضاء الخارجيين ومساحات العمل غير المرتبطة قبل إرجاع هوية رئيسية.
|
|
410
|
+
|
|
411
|
+
تطابق رسائل Slack الخاصة التي تم التحقق منها عضوًا موجودًا في مؤسسة Agent Native، وتحفظ رابط هوية مساحة العمل/المستخدم قبل تشغيل الوكيل؛ ثم يحمّل سياق المستخدم/المؤسسة الناتج موارد ذلك المستخدم وتعليماته ومهاراته. يُرفض افتراضيًا عضو مساحة العمل الذي نجح جلب بياناته لكن بريده الإلكتروني مفقود أو لم ينضم بعد إلى المؤسسة. يمكن للتطبيقات ضبط `allowAnonymousOrgScopedSlackDm: true` صراحةً لتشغيل هؤلاء الأعضاء بهوية خدمة مجهولة ضمن نطاق المؤسسة — وهي طبقة الرؤية نفسها على مستوى المؤسسة التي تستخدمها القنوات المشتركة، من دون أي وصول خاص بالمستخدم — مع ملاحظة يراها الوكيل وتنبيه لمرة واحدة في Slack يشرح كيفية الحصول على وصول شخصي. لا يسمح هذا الاشتراك أبدًا بحالات فشل جلب البيانات أو المتصلين غير المتحقق منهم أو الضيوف أو الأعضاء الخارجيين (Slack Connect) أو مساحات العمل غير المرتبطة بمؤسسة؛ بل تتلقى هذه الحالات ردًا مهذبًا بالرفض بدل إسقاط الرسالة بصمت. تستخدم قنوات Slack المشتركة هوية خدمة ولا تستعير الأذونات الخاصة لأي مشارك. يطلب OAuth المُدار والنموذج المُنشأ لتطبيق Slack نطاق البوت `users:read.email`. يجب إعادة ربط/تثبيت عمليات التثبيت الحالية لمنح نطاق أُضيف حديثًا، بينما يجب أن تضيف عمليات التثبيت القديمة التي تستخدم رمز بوت النطاق يدويًا في Slack. ومن دونه، تُرفض الرسائل الخاصة ما لم يفعّل التطبيق `allowAnonymousOrgScopedSlackDm` صراحةً.
|
|
408
412
|
|
|
409
413
|
### الطبقة الكاملة (الاشتراك الصريح فقط) {#full-tier}
|
|
410
414
|
|
|
@@ -382,7 +382,7 @@ Apps, deren direkte Lesetools ohne lange Zulassungsliste funktionieren sollen, k
|
|
|
382
382
|
|
|
383
383
|
```ts
|
|
384
384
|
export default createAgentChatPlugin({
|
|
385
|
-
appId: "
|
|
385
|
+
appId: "example-app",
|
|
386
386
|
externalAgents: {
|
|
387
387
|
authenticatedReads: "auto",
|
|
388
388
|
writes: "ask_app_only",
|
|
@@ -392,6 +392,8 @@ export default createAgentChatPlugin({
|
|
|
392
392
|
});
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
+
Dies ist ein allgemeines Richtlinienbeispiel. Analytics setzt `authenticatedReads: "off"` absichtlich und stellt nur die geprüften `connectorCatalog`-Actions bereit.
|
|
396
|
+
|
|
395
397
|
`authenticatedReads: "auto"` fügt nur Actions hinzu, die ausdrücklich alle folgenden Merkmale deklarieren:
|
|
396
398
|
|
|
397
399
|
- `http: { method: "GET" }`
|
|
@@ -406,7 +408,9 @@ Core-`db-schema` und `db-query` werden nicht automatisch als externe Lesezugriff
|
|
|
406
408
|
|
|
407
409
|
Dies ist ein harter, namensbasierter Ausschluss und keine bloße Auslassung in den Metadaten: generische Datenbank-, Seed-, Browser-Sitzungs-, Erweiterungs- und Kontext-Röntgen-Tools werden niemals automatisch freigegeben, selbst wenn eine zukünftige Änderung eines davon versehentlich mit dem vollständigen Satz an Flags für authentifizierte Lesezugriffe versieht — sie benötigen immer einen expliziten `connectorCatalog`-Eintrag.
|
|
408
410
|
|
|
409
|
-
Eine
|
|
411
|
+
Eine App, die `resolveExecutionContext` bereitstellt, ersetzt diese standardmäßige Identitätsprüfung ausdrücklich. Ihr Resolver muss nicht verifizierte Aufrufer, Gäste, externe Mitglieder und nicht verknüpfte Workspaces eigenständig ablehnen, bevor er einen Principal zurückgibt.
|
|
412
|
+
|
|
413
|
+
Eine verifizierte Slack-DM wird vor dem Start des Agenten einem bestehenden Mitglied der Agent-Native-Organisation zugeordnet und als Identitätsverknüpfung zwischen Workspace und Benutzer gespeichert. Der daraus entstehende Benutzer-/Organisationskontext lädt die Ressourcen, Anweisungen und Skills dieses Benutzers. Standardmäßig werden erfolgreich geladene Workspace-Mitglieder abgelehnt, wenn ihre E-Mail-Adresse fehlt oder sie noch kein Organisationsmitglied sind. Apps können ausdrücklich `allowAnonymousOrgScopedSlackDm: true` setzen, um diese Mitglieder stattdessen als anonymen, auf die Organisation begrenzten Service-Principal auszuführen — mit derselben organisationsweiten Sichtbarkeit wie gemeinsame Kanäle, aber niemals mit benutzerprivatem Zugriff. Der Agent erhält dazu einen sichtbaren Hinweis, und Slack erklärt einmalig, wie persönlicher Zugriff erlangt werden kann. Dieses Opt-in lässt niemals fehlgeschlagene Profilladungen, nicht verifizierte Aufrufer, Gäste, externe Mitglieder (Slack Connect) oder Workspaces ohne Organisationsverknüpfung zu; diese werden höflich abgelehnt, statt die Nachricht stillschweigend zu verwerfen. Gemeinsame Slack-Kanäle verwenden einen Service-Principal und übernehmen keine privaten Berechtigungen eines Teilnehmers. Managed OAuth und das generierte Slack-App-Manifest fordern den Bot-Scope `users:read.email`. Bestehende Installationen müssen erneut verbunden/installiert werden, um einen neu hinzugefügten Scope zu gewähren; ältere Bot-Token-Installationen müssen ihn in Slack manuell hinzufügen. Ohne diesen Scope werden DMs abgelehnt, sofern die App `allowAnonymousOrgScopedSlackDm` nicht ausdrücklich aktiviert.
|
|
410
414
|
|
|
411
415
|
### Vollständige Stufe (nur explizites Opt-in) {#full-tier}
|
|
412
416
|
|
|
@@ -382,7 +382,7 @@ Las aplicaciones que quieran que las herramientas de lectura directas funcionen
|
|
|
382
382
|
|
|
383
383
|
```ts
|
|
384
384
|
export default createAgentChatPlugin({
|
|
385
|
-
appId: "
|
|
385
|
+
appId: "example-app",
|
|
386
386
|
externalAgents: {
|
|
387
387
|
authenticatedReads: "auto",
|
|
388
388
|
writes: "ask_app_only",
|
|
@@ -392,6 +392,8 @@ export default createAgentChatPlugin({
|
|
|
392
392
|
});
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
+
Este es un ejemplo genérico de la política. Analytics configura intencionadamente `authenticatedReads: "off"` y solo expone las actions revisadas de `connectorCatalog`.
|
|
396
|
+
|
|
395
397
|
`authenticatedReads: "auto"` añade solo las actions que declaran explícitamente todo lo siguiente:
|
|
396
398
|
|
|
397
399
|
- `http: { method: "GET" }`
|
|
@@ -406,7 +408,9 @@ La política es autenticada, no anónima. La identidad de MCP OAuth/connect se c
|
|
|
406
408
|
|
|
407
409
|
Se trata de una exclusión estricta basada en el nombre, no solo de una omisión de metadatos: las herramientas genéricas de base de datos, seed, sesión del navegador, extensiones y rayos X de contexto nunca se exponen automáticamente, aunque un cambio futuro anote alguna de ellas por error con el conjunto completo de indicadores de lectura autenticada — siempre requieren una entrada explícita en `connectorCatalog`.
|
|
408
410
|
|
|
409
|
-
|
|
411
|
+
Una aplicación que proporciona `resolveExecutionContext` sustituye explícitamente esta secuencia de identidad predeterminada. Su resolver debe rechazar de forma independiente a los autores no verificados, invitados, miembros externos y espacios de trabajo no vinculados antes de devolver un principal.
|
|
412
|
+
|
|
413
|
+
Antes de ejecutar el agente, un mensaje directo verificado de Slack se asocia a un miembro existente de la organización de Agent Native y se guarda el vínculo de identidad entre el espacio de trabajo y el usuario. El contexto resultante del usuario y la organización carga los recursos, las instrucciones y las habilidades de ese usuario. De forma predeterminada, se rechaza a los miembros del espacio de trabajo cuyo perfil se obtuvo correctamente pero que no tienen correo electrónico o aún no pertenecen a la organización. Las aplicaciones pueden configurar explícitamente `allowAnonymousOrgScopedSlackDm: true` para ejecutar a esos miembros como un principal de servicio anónimo limitado a la organización: el mismo nivel de visibilidad para toda la organización que usan los canales compartidos, pero nunca acceso privado del usuario. El agente recibe una nota visible y Slack muestra una sola vez cómo obtener acceso personal. Esta opción nunca admite fallos de obtención del perfil, autores no verificados, invitados, miembros externos (Slack Connect) ni espacios de trabajo no vinculados a una organización; esos casos reciben una respuesta cortés de rechazo. Los canales compartidos de Slack usan un principal de servicio y no heredan los permisos privados de ningún participante. OAuth administrado y el manifiesto generado de la aplicación de Slack solicitan el ámbito de bot `users:read.email`. Las instalaciones existentes deben volver a conectarse o instalarse para conceder un ámbito recién añadido; las instalaciones antiguas con token de bot deben añadirlo manualmente en Slack. Sin él, los mensajes directos se rechazan salvo que la aplicación habilite explícitamente `allowAnonymousOrgScopedSlackDm`.
|
|
410
414
|
|
|
411
415
|
### Nivel completo (solo suscripción explícita) {#full-tier}
|
|
412
416
|
|
|
@@ -382,7 +382,7 @@ Les applications qui souhaitent que les outils de lecture directe fonctionnent s
|
|
|
382
382
|
|
|
383
383
|
```ts
|
|
384
384
|
export default createAgentChatPlugin({
|
|
385
|
-
appId: "
|
|
385
|
+
appId: "example-app",
|
|
386
386
|
externalAgents: {
|
|
387
387
|
authenticatedReads: "auto",
|
|
388
388
|
writes: "ask_app_only",
|
|
@@ -392,6 +392,8 @@ export default createAgentChatPlugin({
|
|
|
392
392
|
});
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
+
Il s'agit d'un exemple de politique générique. Analytics définit intentionnellement `authenticatedReads: "off"` et n'expose que les actions `connectorCatalog` qui ont été examinées.
|
|
396
|
+
|
|
395
397
|
`authenticatedReads: "auto"` ajoute uniquement les actions qui déclarent explicitement tous les éléments suivants :
|
|
396
398
|
|
|
397
399
|
- `http: { method: "GET" }`
|
|
@@ -406,7 +408,9 @@ Les outils Core `db-schema` et `db-query` ne sont pas automatiquement exposés c
|
|
|
406
408
|
|
|
407
409
|
Il s'agit d'une exclusion stricte basée sur le nom, et non d'une simple omission de métadonnées : les outils génériques de base de données, de seed, de session de navigateur, d'extensions et de radiographie contextuelle ne sont jamais exposés automatiquement, même si une modification future annote accidentellement l'un d'eux avec l'ensemble complet des indicateurs de lecture authentifiée — ils nécessitent toujours une entrée explicite dans `connectorCatalog`.
|
|
408
410
|
|
|
409
|
-
|
|
411
|
+
Une application qui fournit `resolveExecutionContext` remplace explicitement cette chaîne d'identité par défaut. Son résolveur doit refuser indépendamment les appelants non vérifiés, les invités, les membres externes et les espaces de travail non liés avant de renvoyer un principal.
|
|
412
|
+
|
|
413
|
+
Avant l'exécution de l'agent, un message direct Slack vérifié est associé à un membre existant de l'organisation Agent Native et le lien d'identité entre l'espace de travail et l'utilisateur est enregistré. Le contexte utilisateur/organisation qui en résulte charge les ressources, les instructions et les compétences de cet utilisateur. Par défaut, les membres de l'espace de travail dont le profil a bien été chargé, mais dont l'adresse e-mail est absente ou qui ne sont pas encore membres de l'organisation, sont refusés. Les applications peuvent définir explicitement `allowAnonymousOrgScopedSlackDm: true` pour exécuter ces membres comme principal de service anonyme limité à l'organisation : le même niveau de visibilité à l'échelle de l'organisation que celui des canaux partagés, sans jamais accéder aux données privées de l'utilisateur. L'agent reçoit une note visible et Slack explique une fois comment obtenir un accès personnel. Cette option n'admet jamais les échecs de chargement du profil, les appelants non vérifiés, les invités, les membres externes (Slack Connect) ni les espaces de travail non liés à une organisation ; ces cas reçoivent une réponse de refus polie. Les canaux Slack partagés utilisent un principal de service et n'empruntent pas les autorisations privées d'un participant. OAuth géré et le manifeste d'application Slack généré demandent la portée de bot `users:read.email`. Les installations existantes doivent être reconnectées ou réinstallées pour accorder une portée nouvellement ajoutée ; les anciennes installations par jeton de bot doivent l'ajouter manuellement dans Slack. Sans cette portée, les messages directs sont refusés sauf si l'application active explicitement `allowAnonymousOrgScopedSlackDm`.
|
|
410
414
|
|
|
411
415
|
### Niveau complet (adhésion explicite uniquement) {#full-tier}
|
|
412
416
|
|
|
@@ -380,7 +380,7 @@ MCP सर्वर प्रत्येक कॉलर को डिफ़ॉ
|
|
|
380
380
|
|
|
381
381
|
```ts
|
|
382
382
|
export default createAgentChatPlugin({
|
|
383
|
-
appId: "
|
|
383
|
+
appId: "example-app",
|
|
384
384
|
externalAgents: {
|
|
385
385
|
authenticatedReads: "auto",
|
|
386
386
|
writes: "ask_app_only",
|
|
@@ -390,6 +390,8 @@ export default createAgentChatPlugin({
|
|
|
390
390
|
});
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
+
यह नीति का सामान्य उदाहरण है। Analytics जानबूझकर `authenticatedReads: "off"` सेट करता है और केवल समीक्षा किए गए `connectorCatalog` actions को उपलब्ध कराता है।
|
|
394
|
+
|
|
393
395
|
`authenticatedReads: "auto"` केवल उन actions को जोड़ता है जो स्पष्ट रूप से ये सभी घोषित करते हैं:
|
|
394
396
|
|
|
395
397
|
- `http: { method: "GET" }`
|
|
@@ -404,7 +406,9 @@ Core के `db-schema` और `db-query` को स्वचालित बा
|
|
|
404
406
|
|
|
405
407
|
यह नाम-आधारित सख्त बहिष्करण है, केवल मेटाडेटा की चूक नहीं: सामान्य डेटाबेस/seed/ब्राउज़र-सत्र/एक्सटेंशन/संदर्भ-एक्सरे टूल कभी भी स्वचालित रूप से उजागर नहीं होते, भले ही भविष्य का कोई बदलाव गलती से इनमें से किसी एक को पूर्ण authenticated-read फ़्लैग सेट के साथ चिह्नित कर दे — उन्हें हमेशा एक स्पष्ट `connectorCatalog` प्रविष्टि की आवश्यकता होती है।
|
|
406
408
|
|
|
407
|
-
|
|
409
|
+
`resolveExecutionContext` देने वाला ऐप इस डिफ़ॉल्ट पहचान क्रम को स्पष्ट रूप से बदल देता है। उसके resolver को principal लौटाने से पहले असत्यापित callers, guests, external members और unlinked workspaces को स्वतंत्र रूप से अस्वीकार करना होगा।
|
|
410
|
+
|
|
411
|
+
एजेंट चलने से पहले सत्यापित Slack DM को Agent Native संगठन के किसी मौजूदा सदस्य से मिलाया जाता है और workspace/user पहचान लिंक सहेजा जाता है। इससे बने user/org संदर्भ में उस उपयोगकर्ता के संसाधन, निर्देश और skills लोड होते हैं। डिफ़ॉल्ट रूप से सफलतापूर्वक प्रोफ़ाइल मिले ऐसे workspace सदस्य अस्वीकार किए जाते हैं जिनका ईमेल उपलब्ध नहीं है या जो अभी संगठन के सदस्य नहीं हैं। ऐप इन सदस्यों को संगठन-स्कोप वाले अनाम service principal के रूप में चलाने के लिए स्पष्ट रूप से `allowAnonymousOrgScopedSlackDm: true` सेट कर सकते हैं — साझा चैनलों वाली संगठन-व्यापी दृश्यता के उसी स्तर पर, लेकिन कभी भी उपयोगकर्ता-निजी पहुँच के साथ नहीं — साथ में एजेंट को दिखाई देने वाला नोट और व्यक्तिगत पहुँच पाने का तरीका बताने वाली एक बार की Slack सूचना। यह opt-in प्रोफ़ाइल लोड न होने, असत्यापित callers, guests, external (Slack Connect) members या किसी संगठन से न जुड़े workspace को कभी अनुमति नहीं देता; उन्हें विनम्र अस्वीकृति मिलती है। साझा Slack चैनल service principal का उपयोग करते हैं और किसी प्रतिभागी की निजी permissions नहीं लेते। Managed OAuth और generated Slack app manifest दोनों bot scope `users:read.email` मांगते हैं। नया scope देने के लिए मौजूदा installations को reconnect/reinstall करना होगा; पुराने bot-token installations को इसे Slack में manually जोड़ना होगा। इसके बिना DM fail closed होते हैं, जब तक ऐप स्पष्ट रूप से `allowAnonymousOrgScopedSlackDm` सक्षम न करे।
|
|
408
412
|
|
|
409
413
|
### पूर्ण स्तरीय (केवल स्पष्ट ऑप्ट-इन) {#full-tier}
|
|
410
414
|
|
|
@@ -380,7 +380,7 @@ MCP サーバーは、ホスト型コネクタ (ChatGPT、Claude)、コード
|
|
|
380
380
|
|
|
381
381
|
```ts
|
|
382
382
|
export default createAgentChatPlugin({
|
|
383
|
-
appId: "
|
|
383
|
+
appId: "example-app",
|
|
384
384
|
externalAgents: {
|
|
385
385
|
authenticatedReads: "auto",
|
|
386
386
|
writes: "ask_app_only",
|
|
@@ -390,6 +390,8 @@ export default createAgentChatPlugin({
|
|
|
390
390
|
});
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
+
これは一般的なポリシーの例です。Analytics は意図的に `authenticatedReads: "off"` を設定し、レビュー済みの `connectorCatalog` アクションだけを公開します。
|
|
394
|
+
|
|
393
395
|
`authenticatedReads: "auto"` が追加するのは、次のすべてを明示的に宣言したアクションだけです。
|
|
394
396
|
|
|
395
397
|
- `http: { method: "GET" }`
|
|
@@ -404,7 +406,9 @@ Core の `db-schema` と `db-query` は外部の自動読み取りとして公
|
|
|
404
406
|
|
|
405
407
|
これは名前ベースの厳格な除外であり、単なるメタデータの記載漏れではありません。汎用のデータベース、seed、ブラウザ セッション、拡張、コンテキスト Xray のツールは、将来の変更で誤って完全な認証済み読み取りフラグセットが付与された場合でも、自動的に公開されることは決してありません — これらには常に明示的な `connectorCatalog` エントリが必要です。
|
|
406
408
|
|
|
407
|
-
|
|
409
|
+
`resolveExecutionContext` を指定するアプリは、このデフォルトの ID 判定を明示的に置き換えます。そのリゾルバーはプリンシパルを返す前に、未検証の呼び出し元、ゲスト、外部メンバー、未接続のワークスペースを独自に拒否する必要があります。
|
|
410
|
+
|
|
411
|
+
検証済みの Slack DM は、エージェントを実行する前に既存の Agent Native 組織メンバーと照合され、ワークスペース/ユーザーの ID リンクとして保存されます。生成されたユーザー/組織コンテキストには、そのユーザーのリソース、指示、スキルが読み込まれます。デフォルトでは、プロフィールの取得に成功しても、メールアドレスがない、またはまだ組織メンバーではないワークスペース メンバーは拒否されます。アプリは `allowAnonymousOrgScopedSlackDm: true` を明示的に設定することで、それらのメンバーを組織スコープの匿名サービスプリンシパルとして実行できます。これは共有チャンネルと同じ組織全体の可視性レベルですが、ユーザーの非公開データには決してアクセスしません。エージェントに表示される注記と、個人アクセスの取得方法を説明する 1 回限りの Slack 通知が付きます。この opt-in は、プロフィール取得の失敗、未検証の呼び出し元、ゲストや外部 (Slack Connect) メンバー、組織に接続されていないワークスペースを許可しません。それらには丁寧な拒否応答を返します。Slack の共有チャンネルはサービスプリンシパルを使い、参加者の個人的な権限を借用しません。管理対象 OAuth と生成される Slack アプリ マニフェストは、bot スコープ `users:read.email` を要求します。新たに追加されたスコープを付与するには、既存のインストールを再接続/再インストールする必要があります。従来の bot トークンによるインストールでは、Slack でスコープを手動追加してください。このスコープがない場合、アプリが `allowAnonymousOrgScopedSlackDm` を明示的に有効にしない限り、DM は拒否されます。
|
|
408
412
|
|
|
409
413
|
### フルティア (明示的なオプトインのみ) {#full-tier}
|
|
410
414
|
|
|
@@ -380,7 +380,7 @@ MCP 서버는 호스팅된 커넥터(ChatGPT, Claude), 코드 클라이언트(Cl
|
|
|
380
380
|
|
|
381
381
|
```ts
|
|
382
382
|
export default createAgentChatPlugin({
|
|
383
|
-
appId: "
|
|
383
|
+
appId: "example-app",
|
|
384
384
|
externalAgents: {
|
|
385
385
|
authenticatedReads: "auto",
|
|
386
386
|
writes: "ask_app_only",
|
|
@@ -390,6 +390,8 @@ export default createAgentChatPlugin({
|
|
|
390
390
|
});
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
+
이는 일반적인 정책 예시입니다. Analytics는 의도적으로 `authenticatedReads: "off"`를 설정하고 검토된 `connectorCatalog` action만 노출합니다.
|
|
394
|
+
|
|
393
395
|
`authenticatedReads: "auto"`는 다음을 모두 명시적으로 선언한 action만 추가합니다.
|
|
394
396
|
|
|
395
397
|
- `http: { method: "GET" }`
|
|
@@ -404,7 +406,9 @@ Core `db-schema`와 `db-query`는 자동 외부 읽기로 공개되지 않습니
|
|
|
404
406
|
|
|
405
407
|
이는 이름 기반의 강력한 제외이며 단순한 메타데이터 누락이 아닙니다. 일반 데이터베이스, seed, 브라우저 세션, 확장, context-xray 도구는 향후 변경으로 인해 실수로 전체 인증된 읽기 플래그 집합이 지정되더라도 절대 자동으로 노출되지 않습니다 — 이러한 도구는 항상 명시적인 `connectorCatalog` 항목이 필요합니다.
|
|
406
408
|
|
|
407
|
-
|
|
409
|
+
`resolveExecutionContext`를 제공하는 앱은 이 기본 ID 확인 절차를 명시적으로 대체합니다. 해당 resolver는 principal을 반환하기 전에 검증되지 않은 호출자, 게스트, 외부 구성원, 연결되지 않은 workspace를 독립적으로 거부해야 합니다.
|
|
410
|
+
|
|
411
|
+
검증된 Slack DM은 에이전트가 실행되기 전에 기존 Agent Native 조직 구성원과 연결되고 workspace/user ID 링크로 저장됩니다. 그 결과 생성된 사용자/조직 컨텍스트에는 해당 사용자의 리소스, 지침 및 skills가 로드됩니다. 기본적으로 프로필을 정상적으로 가져왔지만 이메일이 없거나 아직 조직 구성원이 아닌 workspace 구성원은 거부됩니다. 앱은 `allowAnonymousOrgScopedSlackDm: true`를 명시적으로 설정해 이러한 구성원을 조직 범위의 익명 service principal로 실행할 수 있습니다. 이는 공유 채널과 동일한 조직 전체 공개 수준이지만 사용자 비공개 데이터에는 절대 접근하지 않습니다. 에이전트에 표시되는 메모와 개인 액세스를 얻는 방법을 설명하는 일회성 Slack 안내가 함께 제공됩니다. 이 opt-in은 프로필 가져오기 실패, 검증되지 않은 호출자, 게스트, 외부(Slack Connect) 구성원 또는 조직에 연결되지 않은 workspace를 허용하지 않으며, 이들에게는 정중한 거절 응답을 보냅니다. Slack 공유 채널은 service principal을 사용하며 참여자의 개인 권한을 빌리지 않습니다. 관리형 OAuth와 생성된 Slack 앱 매니페스트는 모두 bot scope `users:read.email`을 요청합니다. 새로 추가된 scope를 부여하려면 기존 설치를 다시 연결/설치해야 하며, 이전 bot-token 설치는 Slack에서 scope를 수동으로 추가해야 합니다. 이 scope가 없으면 앱이 `allowAnonymousOrgScopedSlackDm`을 명시적으로 활성화하지 않는 한 DM은 거부됩니다.
|
|
408
412
|
|
|
409
413
|
### 전체 등급(명시적 선택만 해당) {#full-tier}
|
|
410
414
|
|
|
@@ -382,7 +382,7 @@ Aplicativos que desejam que as ferramentas de leitura direta funcionem sem mante
|
|
|
382
382
|
|
|
383
383
|
```ts
|
|
384
384
|
export default createAgentChatPlugin({
|
|
385
|
-
appId: "
|
|
385
|
+
appId: "example-app",
|
|
386
386
|
externalAgents: {
|
|
387
387
|
authenticatedReads: "auto",
|
|
388
388
|
writes: "ask_app_only",
|
|
@@ -392,6 +392,8 @@ export default createAgentChatPlugin({
|
|
|
392
392
|
});
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
+
Este é um exemplo genérico da política. O Analytics define intencionalmente `authenticatedReads: "off"` e expõe somente as actions revisadas de `connectorCatalog`.
|
|
396
|
+
|
|
395
397
|
`authenticatedReads: "auto"` adiciona somente actions que declaram explicitamente todos os itens a seguir:
|
|
396
398
|
|
|
397
399
|
- `http: { method: "GET" }`
|
|
@@ -406,7 +408,9 @@ Os `db-schema` e `db-query` do Core não são expostos automaticamente como leit
|
|
|
406
408
|
|
|
407
409
|
Trata-se de uma exclusão rígida baseada em nome, não apenas uma omissão de metadados: ferramentas genéricas de banco de dados, seed, sessão de navegador, extensões e raio X de contexto nunca são expostas automaticamente, mesmo que uma mudança futura marque acidentalmente uma delas com o conjunto completo de flags de leitura autenticada — elas sempre exigem uma entrada explícita em `connectorCatalog`.
|
|
408
410
|
|
|
409
|
-
|
|
411
|
+
Um aplicativo que fornece `resolveExecutionContext` substitui explicitamente essa cadeia de identidade padrão. O resolver deve rejeitar de forma independente autores não verificados, convidados, membros externos e workspaces não vinculados antes de retornar um principal.
|
|
412
|
+
|
|
413
|
+
Antes de o agente ser executado, uma DM verificada do Slack é associada a um membro existente da organização Agent Native e o vínculo de identidade entre workspace e usuário é salvo. O contexto resultante de usuário/organização carrega os recursos, as instruções e as skills desse usuário. Por padrão, membros do workspace cujo perfil foi carregado, mas cujo e-mail está ausente ou que ainda não pertencem à organização, são recusados. Os aplicativos podem definir explicitamente `allowAnonymousOrgScopedSlackDm: true` para executar esses membros como um principal de serviço anônimo com escopo da organização — o mesmo nível de visibilidade para toda a organização usado pelos canais compartilhados, mas nunca acesso privado do usuário — com uma observação visível ao agente e um aviso único no Slack explicando como obter acesso pessoal. Essa opção nunca admite falhas no carregamento do perfil, autores não verificados, convidados, membros externos (Slack Connect) ou workspaces não conectados a uma organização; esses casos recebem uma resposta educada de recusa. Canais compartilhados do Slack usam um principal de serviço e não herdam as permissões privadas de um participante. O OAuth gerenciado e o manifesto gerado do aplicativo Slack solicitam o escopo de bot `users:read.email`. Instalações existentes precisam ser reconectadas/reinstaladas para conceder um escopo recém-adicionado; instalações antigas com token de bot precisam adicioná-lo manualmente no Slack. Sem ele, as DMs são recusadas, a menos que o aplicativo habilite explicitamente `allowAnonymousOrgScopedSlackDm`.
|
|
410
414
|
|
|
411
415
|
### Nível completo (somente aceitação explícita) {#full-tier}
|
|
412
416
|
|
|
@@ -379,7 +379,7 @@ MCP 服务器默认为每个调用者提供一个**紧凑的目录** — 托管
|
|
|
379
379
|
|
|
380
380
|
```ts
|
|
381
381
|
export default createAgentChatPlugin({
|
|
382
|
-
appId: "
|
|
382
|
+
appId: "example-app",
|
|
383
383
|
externalAgents: {
|
|
384
384
|
authenticatedReads: "auto",
|
|
385
385
|
writes: "ask_app_only",
|
|
@@ -389,6 +389,8 @@ export default createAgentChatPlugin({
|
|
|
389
389
|
});
|
|
390
390
|
```
|
|
391
391
|
|
|
392
|
+
这是一个通用政策示例。Analytics 会有意设置 `authenticatedReads: "off"`,并且只公开经过审核的 `connectorCatalog` action。
|
|
393
|
+
|
|
392
394
|
`authenticatedReads: "auto"` 只会添加明确声明了以下全部内容的 action:
|
|
393
395
|
|
|
394
396
|
- `http: { method: "GET" }`
|
|
@@ -403,7 +405,9 @@ Core `db-schema` 和 `db-query` 不会自动作为外部读取公开。它们仍
|
|
|
403
405
|
|
|
404
406
|
这是一种基于名称的硬性排除,而不仅仅是元数据遗漏:通用的数据库、seed、浏览器会话、扩展和上下文 X 射线工具永远不会被自动公开,即使未来的更改意外地为其中某个工具标注了完整的已认证读取标志组合也是如此 — 它们始终需要在 `connectorCatalog` 中显式声明。
|
|
405
407
|
|
|
406
|
-
|
|
408
|
+
提供 `resolveExecutionContext` 的应用会明确替换此默认身份判定流程。其解析器必须在返回主体前自行拒绝未经验证的调用者、访客、外部成员以及未关联的工作区。
|
|
409
|
+
|
|
410
|
+
经过验证的 Slack 私信会在代理运行前匹配现有的 Agent Native 组织成员,并保存工作区/用户身份关联;由此生成的用户/组织上下文会加载该用户的资源、指令和技能。默认情况下,已成功获取资料但缺少电子邮件或尚未成为组织成员的工作区成员会被拒绝。应用可以明确设置 `allowAnonymousOrgScopedSlackDm: true`,让这些成员改用组织范围的匿名服务主体运行——其组织级可见性与共享频道相同,但绝不包含用户私有访问——同时向代理显示说明,并通过 Slack 一次性提示如何获得个人访问权限。此选择加入绝不会允许资料获取失败、未经验证的调用者、访客、外部(Slack Connect)成员或尚未连接组织的工作区;这些情况会收到礼貌的拒绝回复。Slack 共享频道使用服务主体,不会借用任何参与者的私人权限。托管 OAuth 和生成的 Slack 应用 manifest 都会请求 bot scope `users:read.email`。已有安装必须重新连接/安装才能授予新增的 scope;旧版 bot token 安装则必须在 Slack 中手动添加该 scope。没有此 scope 时,私信会被拒绝,除非应用明确启用 `allowAnonymousOrgScopedSlackDm`。
|
|
407
411
|
|
|
408
412
|
### 完整层(仅限明确选择加入) {#full-tier}
|
|
409
413
|
|
|
@@ -379,7 +379,7 @@ MCP 伺服器預設為每個呼叫者提供一個**緊湊的目錄** — 託管
|
|
|
379
379
|
|
|
380
380
|
```ts
|
|
381
381
|
export default createAgentChatPlugin({
|
|
382
|
-
appId: "
|
|
382
|
+
appId: "example-app",
|
|
383
383
|
externalAgents: {
|
|
384
384
|
authenticatedReads: "auto",
|
|
385
385
|
writes: "ask_app_only",
|
|
@@ -389,6 +389,8 @@ export default createAgentChatPlugin({
|
|
|
389
389
|
});
|
|
390
390
|
```
|
|
391
391
|
|
|
392
|
+
這是一般政策範例。Analytics 會刻意設定 `authenticatedReads: "off"`,而且只公開經過審查的 `connectorCatalog` action。
|
|
393
|
+
|
|
392
394
|
`authenticatedReads: "auto"` 只會加入明確宣告以下全部內容的 action:
|
|
393
395
|
|
|
394
396
|
- `http: { method: "GET" }`
|
|
@@ -403,7 +405,9 @@ Core `db-schema` 與 `db-query` 不會自動公開為外部讀取。它們仍可
|
|
|
403
405
|
|
|
404
406
|
這是一種以名稱為依據的硬性排除,而不只是中繼資料的遺漏:通用的資料庫、seed、瀏覽器工作階段、擴充功能與 context-xray 工具永遠不會自動公開,即使未來的變更意外為其中某個工具標註了完整的已驗證讀取旗標組合也一樣 — 它們一律需要在 `connectorCatalog` 中明確宣告。
|
|
405
407
|
|
|
406
|
-
|
|
408
|
+
提供 `resolveExecutionContext` 的應用程式會明確取代這套預設身分判定流程。其解析器必須在傳回主體之前,自行拒絕未經驗證的呼叫者、訪客、外部成員以及未連結的工作區。
|
|
409
|
+
|
|
410
|
+
經過驗證的 Slack 私訊會在代理執行前配對現有的 Agent Native 組織成員,並儲存工作區/使用者身分連結;由此產生的使用者/組織內容會載入該使用者的資源、指示和技能。預設情況下,已成功取得資料但缺少電子郵件或尚未成為組織成員的工作區成員會被拒絕。應用程式可以明確設定 `allowAnonymousOrgScopedSlackDm: true`,讓這些成員改用組織範圍的匿名服務主體執行——其組織級可見性與共用頻道相同,但絕不包含使用者私人存取——同時向代理顯示說明,並透過 Slack 一次性提示如何取得個人存取權。這項選擇加入絕不允許資料取得失敗、未經驗證的呼叫者、訪客、外部(Slack Connect)成員或尚未連接組織的工作區;這些情況會收到禮貌的拒絕回覆。Slack 共用頻道使用服務主體,不會借用任何參與者的私人權限。託管 OAuth 與產生的 Slack 應用程式 manifest 都會要求 bot scope `users:read.email`。現有安裝必須重新連接/安裝,才能授予新增的 scope;舊版 bot token 安裝則必須在 Slack 中手動加入該 scope。若沒有此 scope,私訊會被拒絕,除非應用程式明確啟用 `allowAnonymousOrgScopedSlackDm`。
|
|
407
411
|
|
|
408
412
|
### 完整層(僅限明確選取加入) {#full-tier}
|
|
409
413
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.98.
|
|
3
|
+
"version": "0.98.8",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|