🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat(agent-share): let granted visitors run every local CLI Agent (#23515)
YuTengjing43358e80057f
diff --git a/apps/server/src/services/agent/index.ts b/apps/server/src/services/agent/index.tsindex c20372de8a4..da8bddff38c 100644--- a/apps/server/src/services/agent/index.ts+++ b/apps/server/src/services/agent/index.ts@@ -128,7 +128,7 @@ export class AgentService {* Validate the effective selection at configuration boundaries, including inherited defaults.** Returns the resolved selection to pin, or `undefined` when there is nothing to check.- * A Claude Code / Codex agent is exempt (`isAgentShareModelRestrictionExempt`): it runs on the+ * A locally executed CLI agent (Claude Code, Codex, …) is exempt (`isAgentShareModelRestrictionExempt`): it runs on the* creator's device and calls none of `provider`'s models. The decision reads the effective* driver, the stored one merged with the patch, so switching back to LobeHub* (`heterogeneousProvider: null`) is checked as usual, and a real provider saved next to thediff --git a/apps/server/src/services/aiAgent/__tests__/execAgent.shareVisitorHetero.test.ts b/apps/server/src/services/aiAgent/__tests__/execAgent.shareVisitorHetero.test.tsindex b249d8d922c..225fa99bad9 100644--- a/apps/server/src/services/aiAgent/__tests__/execAgent.shareVisitorHetero.test.ts+++ b/apps/server/src/services/aiAgent/__tests__/execAgent.shareVisitorHetero.test.ts@@ -232,17 +232,20 @@ describe('AiAgentService.execAgent - share visitors and heterogeneous agents', (expect(mockCreateOperation).not.toHaveBeenCalled();});- it('rejects a heterogeneous type other than Claude Code / Codex even with the grant', async () => {- mockGetAgentConfig.mockResolvedValue(- agentConfig({ boundDeviceId: 'device-1', heterogeneousProvider: { type: 'openclaw' } }),- );- mockGetScopedOnlineDevices.mockResolvedValue([{ deviceId: 'device-1', online: true }]);-- await expect(run(true)).rejects.toMatchObject({- message: 'ShareHeterogeneousAgentUnsupported',- });- expect(mockMessageCreate).not.toHaveBeenCalled();- });+ it.each(['openclaw', 'hermes'])(+ 'rejects the remote %s runtime even with the grant',+ async (type) => {+ mockGetAgentConfig.mockResolvedValue(+ agentConfig({ boundDeviceId: 'device-1', heterogeneousProvider: { type } }),+ );+ mockGetScopedOnlineDevices.mockResolvedValue([{ deviceId: 'device-1', online: true }]);++ await expect(run(true)).rejects.toMatchObject({+ message: 'ShareHeterogeneousAgentUnsupported',+ });+ expect(mockMessageCreate).not.toHaveBeenCalled();+ },+ );// No cloud-sandbox fallback: a granted visitor runs on the creator's device// or not at all, and learns it is offline before any row is written.@@ -269,6 +272,29 @@ describe('AiAgentService.execAgent - share visitors and heterogeneous agents', (expect(error?.message).not.toBe('ShareHeteroDeviceUnavailable');});+ // Every runtime that executes on the creator's machine shares the same device+ // dispatch, so the grant covers it as it covers Claude Code / Codex.+ it.each(['opencode', 'kimi-code', 'deepseek-harness'])(+ 'lets a granted visitor run the local %s runtime on the bound device',+ async (type) => {+ mockGetAgentConfig.mockResolvedValue(+ agentConfig({+ boundDeviceId: 'device-1',+ executionTarget: 'device',+ heterogeneousProvider: { type },+ }),+ );+ mockGetScopedOnlineDevices.mockResolvedValue([{ deviceId: 'device-1', online: true }]);++ const error = await run(true).then(+ () => undefined,+ (e: unknown) => e as { message?: string },+ );+ expect(error?.message).not.toBe('ShareHeterogeneousAgentUnsupported');+ expect(error?.message).not.toBe('ShareHeteroDeviceUnavailable');+ },+ );+it('resolves an auto Agent to its only online device', async () => {mockGetAgentConfig.mockResolvedValue(agentConfig({ executionTarget: 'auto', heterogeneousProvider: { type: 'codex' } }),diff --git a/apps/server/src/services/aiAgent/pipeline/shareHeteroGate.ts b/apps/server/src/services/aiAgent/pipeline/shareHeteroGate.tsindex 1adcf485638..ecfb3bc236f 100644--- a/apps/server/src/services/aiAgent/pipeline/shareHeteroGate.ts+++ b/apps/server/src/services/aiAgent/pipeline/shareHeteroGate.ts@@ -25,10 +25,11 @@ export interface AssertShareHeteroAllowedParams {/*** Share-visitor fail-closed gate for heterogeneous agents, checked BEFORE any* topic/message row is written (and so before the visitor's topic quota is- * spent). A visitor may run Claude Code / Codex only when the share grants+ * spent). A visitor may run a locally executed runtime (Claude Code, Codex and+ * the other local CLIs) only when the share grants* them the Agent's device (`shareGate.canUseDevice`), and only there: the CLI* then has a shell on the creator's machine, which is exactly what that grant- * hands over. Every other heterogeneous runtime, and every visitor without the+ * hands over. Remote platform runtimes (OpenClaw / Hermes), and every visitor without the* grant, is refused.** The run goes to the Agent's device or nowhere — never the cloud sandbox,diff --git a/apps/server/src/services/aiAgent/pipeline/turnSetup.ts b/apps/server/src/services/aiAgent/pipeline/turnSetup.tsindex 578f8e081a6..b8093b098c3 100644--- a/apps/server/src/services/aiAgent/pipeline/turnSetup.ts+++ b/apps/server/src/services/aiAgent/pipeline/turnSetup.ts@@ -555,7 +555,7 @@ export const setupTurn = async (: providerOverride;let topicEditingGroupId: string | undefined;- // Share visitors run Claude Code / Codex only on the granted device. Checked+ // Share visitors run a local CLI Agent only on the granted device. Checked// against the agent-level config before any row is written, and re-asserted// once a reused topic's pinned model and device are applied.const assertShareHetero = async (runModel: string) => {diff --git a/apps/server/src/services/aiAgent/shareGate/README.md b/apps/server/src/services/aiAgent/shareGate/README.mdindex db203638c40..65b34a8a71b 100644--- a/apps/server/src/services/aiAgent/shareGate/README.md+++ b/apps/server/src/services/aiAgent/shareGate/README.md@@ -86,7 +86,7 @@ tool does not ship):except the `lobe-remote-device` picker: with it the visitor's model couldlist and activate the creator's other machines, so it stays default-deniedeven under the grant. The same grant lets the visitor run a heterogeneous- Agent (Claude Code / Codex) on that device; without it the run is refused,+ Agent that runs locally (Claude Code, Codex and the other local CLIs) on that device; without it the run is refused,and a share run never falls back to the cloud sandbox.- `lobe-web-onboarding`: reads and WRITES the creator's own onboardingdiff --git a/apps/server/src/services/channel/ChannelCoordinator.ts b/apps/server/src/services/channel/ChannelCoordinator.tsindex 35d1c39e019..262cc0d6c67 100644--- a/apps/server/src/services/channel/ChannelCoordinator.ts+++ b/apps/server/src/services/channel/ChannelCoordinator.ts@@ -58,8 +58,8 @@ class ChannelDispatchError extends Error {/*** Refusals of a shared Agent's run its visitor can act on, raised by the run's share guards before- * the visitor's message is written: the share grants them no device for a Claude Code / Codex- * Agent, the owner's device is offline, or the visitor has sent all the messages the share allows.+ * the visitor's message is written: the share grants them no device for a local CLI Agent+ * (Claude Code, Codex, …), the owner's device is offline, or the visitor has sent all the messages the share allows.* Kept as the job's failure type, as the share page shows them.*/const SHARE_REFUSAL_TYPES = new Set<string>([diff --git a/locales/en-US/agent.json b/locales/en-US/agent.jsonindex 260a81544b6..35c3bd6ddd0 100644--- a/locales/en-US/agent.json+++ b/locales/en-US/agent.json@@ -691,7 +691,7 @@"channel.wecom.secret": "Secret","channel.wecom.secretHint": "The bot's long-connection Secret. A bot can be connected in only one place at a time: saving here takes over a connection it has elsewhere, and connecting it elsewhere later disconnects it here.","share.entry": "Share this Agent",- "share.settings.device.desc": "Choose who may run this Agent on your execution environment, for example to read files or run commands. Claude Code and Codex Agents run only there, so other visitors can’t use them. Chatting with the Agent doesn’t include device access.",+ "share.settings.device.desc": "Choose who may run this Agent on your execution environment, for example to read files or run commands. Local CLI Agents such as Claude Code and Codex run only there, so other visitors can’t use them. Chatting with the Agent doesn’t include device access.","share.settings.device.title": "Device access","share.settings.device.who": "Who can use your device","share.settings.limits.desc": "Every visitor run is billed to your account, so these caps are what keep a shared link from running up your bill. They always apply — you can change the numbers, but not turn them off.",@@ -743,13 +743,13 @@"share.settings.permissions.allowReadMemory": "Allow reading my memory","share.settings.permissions.allowReadMemoryHint": "The Agent may draw on your long-term memory while answering a visitor.","share.settings.permissions.desc": "What a visitor’s run may read, and whether you can read visitor conversations.",- "share.settings.permissions.deviceAccessConfirm.commands": "They can run any command and read or write any file on the machine this Agent runs on, including through Claude Code or Codex.",+ "share.settings.permissions.deviceAccessConfirm.commands": "They can run any command and read or write any file on the machine this Agent runs on, including through a local CLI Agent such as Claude Code or Codex.","share.settings.permissions.deviceAccessConfirm.contactsScope": "Anyone added to this Agent’s contacts later gets this access too, not only the people there now.","share.settings.permissions.deviceAccessConfirm.intro": "People you grant access will run this Agent on your execution environment:","share.settings.permissions.deviceAccessConfirm.messageLimit": "The monthly spend cap does not limit that usage. Only the message limit per visitor does.","share.settings.permissions.deviceAccessConfirm.ok": "Allow listed people","share.settings.permissions.deviceAccessConfirm.okContacts": "Allow everyone in contacts",- "share.settings.permissions.deviceAccessConfirm.subscription": "Claude Code and Codex runs use the model subscription signed in on that machine.",+ "share.settings.permissions.deviceAccessConfirm.subscription": "Local CLI Agents such as Claude Code and Codex use the model subscription or key signed in on that machine.","share.settings.permissions.deviceAccessConfirm.title": "Let people use your execution environment?","share.settings.permissions.deviceAccessOption.allowlist": "Specific people from contacts","share.settings.permissions.deviceAccessOption.allowlistDesc": "Only the people you pick below from this Agent’s contacts can use it.",diff --git a/locales/zh-CN/agent.json b/locales/zh-CN/agent.jsonindex 309105c3f67..a35f64731ff 100644--- a/locales/zh-CN/agent.json+++ b/locales/zh-CN/agent.json@@ -691,7 +691,7 @@"channel.wecom.secret": "Secret","channel.wecom.secretHint": "机器人的长连接 Secret。同一个机器人同一时间只能接入一处:在这里保存会接管它在别处的连接,之后在别处接入也会让这里断开。","share.entry": "分享此助手",- "share.settings.device.desc": "设定哪些人可以在你的执行环境上运行这个助手,例如读取文件、执行命令。Claude Code 和 Codex 助手只能在这里运行,其他访客无法使用。能和助手对话不代表有设备权限。",+ "share.settings.device.desc": "设定哪些人可以在你的执行环境上运行这个助手,例如读取文件、执行命令。Claude Code、Codex 等本地 CLI 助手只能在这里运行,其他访客无法使用。能和助手对话不代表有设备权限。","share.settings.device.title": "设备权限","share.settings.device.who": "谁可以使用你的设备","share.settings.limits.desc": "访客的每次运行都记在你的账户上,这些上限是分享链接不会跑出高额账单的唯一保障。上限始终生效,你可以调整数值,但不能关闭。",@@ -743,13 +743,13 @@"share.settings.permissions.allowReadMemory": "允许读取我的记忆","share.settings.permissions.allowReadMemoryHint": "助手在回答访客时可以参考你的长期记忆。","share.settings.permissions.desc": "访客的运行可以读取什么,以及你能否查看访客的对话。",- "share.settings.permissions.deviceAccessConfirm.commands": "他们可以在这个助手运行的机器上执行任意命令、读写任意文件,包括通过 Claude Code 或 Codex。",+ "share.settings.permissions.deviceAccessConfirm.commands": "他们可以在这个助手运行的机器上执行任意命令、读写任意文件,包括通过 Claude Code、Codex 等本地 CLI 助手。","share.settings.permissions.deviceAccessConfirm.contactsScope": "之后加入这个助手所在通讯录的人也会自动获得这项权限,而不只是现在的联系人。","share.settings.permissions.deviceAccessConfirm.intro": "获得权限的人会在你的执行环境上运行这个助手:","share.settings.permissions.deviceAccessConfirm.messageLimit": "这部分用量不受每月消耗上限限制,只受每位访客的消息数上限约束。","share.settings.permissions.deviceAccessConfirm.ok": "允许指定的人","share.settings.permissions.deviceAccessConfirm.okContacts": "允许通讯录中的所有人",- "share.settings.permissions.deviceAccessConfirm.subscription": "Claude Code 和 Codex 会使用那台机器上登录的模型订阅。",+ "share.settings.permissions.deviceAccessConfirm.subscription": "Claude Code、Codex 等本地 CLI 助手会使用那台机器上登录的模型订阅或密钥。","share.settings.permissions.deviceAccessConfirm.title": "允许他人使用你的执行环境?","share.settings.permissions.deviceAccessOption.allowlist": "通讯录中指定的人","share.settings.permissions.deviceAccessOption.allowlistDesc": "只有你在下方从通讯录中选出的人可以使用。",diff --git a/packages/const/src/agentShare.test.ts b/packages/const/src/agentShare.test.tsindex 747ab728475..adb3d7195b8 100644--- a/packages/const/src/agentShare.test.ts+++ b/packages/const/src/agentShare.test.ts@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest';import {hasShareToolGrant,isAgentShareModelRestrictionExempt,+ isAgentShareVisitorHeteroType,isShareToolApiGranted,resolveShareAllowedSkillIds,resolveShareToolGrants,@@ -112,6 +113,22 @@ describe('resolveShareAllowedSkillIds', () => {});});+describe('isAgentShareVisitorHeteroType', () => {+ it.each(['claude-code', 'codex', 'opencode', 'cursor', 'kimi-code', 'deepseek-harness'])(+ 'lets a visitor run the locally executed runtime %s',+ (type) => {+ expect(isAgentShareVisitorHeteroType(type)).toBe(true);+ },+ );++ it.each(['openclaw', 'hermes', 'unknown-cli', '', null, undefined])(+ 'refuses %s, which has no visitor-scoped device dispatch',+ (type) => {+ expect(isAgentShareVisitorHeteroType(type)).toBe(false);+ },+ );+});+describe('isAgentShareModelRestrictionExempt', () => {const driver = (type: string) => ({ heterogeneousProvider: { type } });@@ -127,6 +144,15 @@ describe('isAgentShareModelRestrictionExempt', () => {).toBe(true);});+ it.each(['opencode', 'kimi-code', 'deepseek-harness'])(+ 'exempts the other locally executed runtime %s',+ (type) => {+ expect(+ isAgentShareModelRestrictionExempt({ agencyConfig: driver(type), provider: type }),+ ).toBe(true);+ },+ );+it('keeps LobeHub agents and runtimes a visitor cannot run restricted', () => {expect(isAgentShareModelRestrictionExempt(undefined)).toBe(false);expect(isAgentShareModelRestrictionExempt({ agencyConfig: null, provider: 'lobehub' })).toBe(diff --git a/packages/const/src/agentShare.ts b/packages/const/src/agentShare.tsindex 7ccd8295705..d64f78da8d3 100644--- a/packages/const/src/agentShare.ts+++ b/packages/const/src/agentShare.ts@@ -1,4 +1,5 @@import type { AgentShareToolGrant } from '@lobechat/types';+import { LocalExecutionHeterogeneousAgentTypeSchema } from '@lobechat/types';/*** Default `AgentShareConfig.maxMessagesPerVisitor` applied when a share is@@ -231,23 +232,28 @@ export const isShareToolApiGranted = (export const AGENT_SHARE_DEVICE_ALLOW_USERS_LIMIT = 100;/**- * Heterogeneous runtimes a share visitor may run, on a device the share grants- * them. Both run as a local CLI on that device; platform agents (OpenClaw /- * Hermes) and the other CLIs have no visitor-scoped dispatch.+ * Whether a share visitor may run this heterogeneous runtime type, on a device+ * the share grants them: every runtime that executes on the creator's machine+ * (descriptor-backed CLIs such as Claude Code / Codex / OpenCode, plus+ * protocol-driven ones such as DeepSeek Harness). They share one device+ * dispatch, so the device grant covers them alike. Platform agents (OpenClaw /+ * Hermes) run as remote tasks with no visitor-scoped dispatch and stay excluded.+ *+ * The schema is read on call, not at module load: `@lobechat/const` is imported+ * almost everywhere, and a module-level read would crash every test that+ * replaces `@lobechat/types` with a partial `vi.mock` factory.*/-export const AGENT_SHARE_VISITOR_HETERO_TYPES: readonly string[] = ['claude-code', 'codex'];--/** Whether a share visitor may run this heterogeneous runtime type. */export const isAgentShareVisitorHeteroType = (type?: string | null): boolean =>- !!type && AGENT_SHARE_VISITOR_HETERO_TYPES.includes(type);+ !!type &&+ (LocalExecutionHeterogeneousAgentTypeSchema.options as readonly string[]).includes(type);/*** Whether an agent's effective config is exempt from the shared-agent model* provider restriction (`AGENT_SHARE_ALLOWED_PROVIDERS`).** The restriction keeps visitors from spending the creator's third-party model- * quota. A Claude Code / Codex agent runs its own CLI on the creator's device and- * calls none of `provider`'s models — `provider` only stamps the runtime type — so+ * quota. An agent on a locally executed runtime (Claude Code, Codex, OpenCode, …)+ * runs its own CLI on the creator's device and calls none of `provider`'s models — `provider` only stamps the runtime type — so* it is exempt. Every other driver, including heterogeneous runtimes a visitor* cannot run, stays restricted. Server save/publish checks and every client hint* must use this one predicate so they never disagree.diff --git a/packages/database/src/repositories/channel/__tests__/sharedAgent.test.ts b/packages/database/src/repositories/channel/__tests__/sharedAgent.test.tsindex 68dfac7bcbc..b8fcf569989 100644--- a/packages/database/src/repositories/channel/__tests__/sharedAgent.test.ts+++ b/packages/database/src/repositories/channel/__tests__/sharedAgent.test.ts@@ -164,56 +164,62 @@ describe('a contact’s shared Agent in a direct conversation', () => {// The run uses the owner's device, so its presence is the owner's: asking about the visitor// left every visitor waiting for a device that was online.- it("checks the owner's routed device as the owner, in the owner's scope", async () => {- await db- .update(agents)- .set({- agencyConfig: {- boundDeviceId: 'owner-device',- executionTarget: 'device',- heterogeneousProvider: { command: 'claude-code', type: 'claude-code' },- },- })- .where(eq(agents.id, agentId));- const { channel } = await new ChannelRepository(db, visitorId, fixture.workspaceId).create({- agentId,- sharedAgent: true,- title: 'Shared Helper',- });- const message = await new ChannelRepository(db, visitorId, fixture.workspaceId).send(- channel.id,- { content: 'Hello', requestKey: 'routed', routing: 'fallback' },- );- const [job] = await jobsOf(db, message.id);- const routedDevice = vi.fn(async () => ({ deviceId: 'owner-device', online: true }));-- const claim = await execution.claim(channel.id, job.id, {- ...lease,- onlineDeviceIds: [],- routedDevice,- });- expect(routedDevice).toHaveBeenCalledWith(- expect.objectContaining({ agentId, userId: ownerId, workspaceId: null }),- );- expect(claim?.job).toMatchObject({ blockedCode: null });- });-- it('is blocked for a runtime its share page cannot run', async () => {- await db- .update(agents)- .set({ agencyConfig: { heterogeneousProvider: { command: 'kimi', type: 'kimi-code' } } })- .where(eq(agents.id, agentId));- const { channel } = await visitor.create({- agentId,- sharedAgent: true,- title: 'Shared Helper',- });- const job = await send(channel.id, 'kimi');+ it.each(['claude-code', 'kimi-code'])(+ "checks the owner's routed %s device as the owner, in the owner's scope",+ async (type) => {+ await db+ .update(agents)+ .set({+ agencyConfig: {+ boundDeviceId: 'owner-device',+ executionTarget: 'device',+ heterogeneousProvider: { command: type, type },+ },+ })+ .where(eq(agents.id, agentId));+ const { channel } = await new ChannelRepository(db, visitorId, fixture.workspaceId).create({+ agentId,+ sharedAgent: true,+ title: 'Shared Helper',+ });+ const message = await new ChannelRepository(db, visitorId, fixture.workspaceId).send(+ channel.id,+ { content: 'Hello', requestKey: 'routed', routing: 'fallback' },+ );+ const [job] = await jobsOf(db, message.id);+ const routedDevice = vi.fn(async () => ({ deviceId: 'owner-device', online: true }));++ const claim = await execution.claim(channel.id, job.id, {+ ...lease,+ onlineDeviceIds: [],+ routedDevice,+ });+ expect(routedDevice).toHaveBeenCalledWith(+ expect.objectContaining({ agentId, userId: ownerId, workspaceId: null }),+ );+ expect(claim?.job).toMatchObject({ blockedCode: null });+ },+ );++ it.each(['openclaw', 'hermes'])(+ 'is blocked for the remote %s runtime its share page cannot run',+ async (type) => {+ await db+ .update(agents)+ .set({ agencyConfig: { heterogeneousProvider: { command: type, type } } })+ .where(eq(agents.id, agentId));+ const { channel } = await visitor.create({+ agentId,+ sharedAgent: true,+ title: 'Shared Helper',+ });+ const job = await send(channel.id, type);- expect(await execution.claim(channel.id, job.id, lease)).toBeNull();- const [blocked] = await db.select().from(channelJobs).where(eq(channelJobs.id, job.id));- expect(blocked.blockedCode).toBe('unavailable');- });+ expect(await execution.claim(channel.id, job.id, lease)).toBeNull();+ const [blocked] = await db.select().from(channelJobs).where(eq(channelJobs.id, job.id));+ expect(blocked.blockedCode).toBe('unavailable');+ },+ );it('is blocked once the owner pauses the share', async () => {const { channel } = await visitor.create({diff --git a/packages/database/src/repositories/channel/agent.ts b/packages/database/src/repositories/channel/agent.tsindex db1b9915bc9..541cd96cdae 100644--- a/packages/database/src/repositories/channel/agent.ts+++ b/packages/database/src/repositories/channel/agent.ts@@ -290,7 +290,7 @@ export const resolveExecutionConfig = async (.for('share');if (!owned) return null;const config = await mergeDefaults(tx, owned, share.ownerId, share.workspaceId, serverDefault);- // The runtimes its share page runs: Native, or Claude Code / Codex. The visitor picks no device;+ // The runtimes its share page runs: Native, or a locally executed CLI runtime. The visitor picks no device;// the run's share gate decides whether the share grants the owner's device and routes there.const runtime = agentRuntime(config);if (diff --git a/packages/database/src/schemas/agentShare.ts b/packages/database/src/schemas/agentShare.tsindex 43953ddfd12..ec1bb95e488 100644--- a/packages/database/src/schemas/agentShare.ts+++ b/packages/database/src/schemas/agentShare.ts@@ -34,7 +34,7 @@ export interface AgentShareConfig {* (its bound or auto-selected device):** - `none` (default): no visitor reaches a device; device tools are dropped- * and a heterogeneous (Claude Code / Codex) Agent refuses the run.+ * and a local CLI (Claude Code, Codex, …) Agent refuses the run.* - `allowlist`: only the people in {@link deviceAllowUserIds} who are* still in the Agent's address book. They get the device tools and, for a* heterogeneous Agent, run it on the device.diff --git a/packages/locales/src/default/agent.ts b/packages/locales/src/default/agent.tsindex bdf882ce6e6..9502224fec2 100644--- a/packages/locales/src/default/agent.ts+++ b/packages/locales/src/default/agent.ts@@ -890,7 +890,7 @@ export default {'share.entry': 'Share this Agent','share.settings.device.desc':- 'Choose who may run this Agent on your execution environment, for example to read files or run commands. Claude Code and Codex Agents run only there, so other visitors can’t use them. Chatting with the Agent doesn’t include device access.',+ 'Choose who may run this Agent on your execution environment, for example to read files or run commands. Local CLI Agents such as Claude Code and Codex run only there, so other visitors can’t use them. Chatting with the Agent doesn’t include device access.','share.settings.device.title': 'Device access','share.settings.device.who': 'Who can use your device','share.settings.limits.desc':@@ -978,14 +978,14 @@ export default {'Only the people you pick below from this Agent’s contacts can use it.','share.settings.limits.saved': 'Limits saved','share.settings.permissions.deviceAccessConfirm.commands':- 'They can run any command and read or write any file on the machine this Agent runs on, including through Claude Code or Codex.',+ 'They can run any command and read or write any file on the machine this Agent runs on, including through a local CLI Agent such as Claude Code or Codex.','share.settings.permissions.deviceAccessConfirm.contactsScope':'Anyone added to this Agent’s contacts later gets this access too, not only the people there now.','share.settings.permissions.deviceAccessConfirm.intro':'People you grant access will run this Agent on your execution environment:','share.settings.permissions.deviceAccessConfirm.ok': 'Allow listed people','share.settings.permissions.deviceAccessConfirm.subscription':- 'Claude Code and Codex runs use the model subscription signed in on that machine.',+ 'Local CLI Agents such as Claude Code and Codex use the model subscription or key signed in on that machine.','share.settings.permissions.deviceAccessConfirm.title':'Let people use your execution environment?','share.settings.permissions.deviceAllowContactsUnavailable':diff --git a/packages/types/src/fetch.ts b/packages/types/src/fetch.tsindex c3b4abdab6d..1e1c103db49 100644--- a/packages/types/src/fetch.ts+++ b/packages/types/src/fetch.ts@@ -13,7 +13,7 @@ export const ChatErrorType = {ShareMessageLimitExceeded: 'ShareMessageLimitExceeded', // Visitor hit shareConfig.maxMessagesPerVisitor on this shared agentShareSpendLimitExceeded: 'ShareSpendLimitExceeded', // Shared agent reached shareConfig.monthlySpendLimit for the current month — recovers on the next resetShareHeterogeneousAgentUnsupported: 'ShareHeterogeneousAgentUnsupported', // This agent configuration is not supported for shared visitors- ShareHeteroDeviceUnavailable: 'ShareHeteroDeviceUnavailable', // The shared Claude Code / Codex agent's device is offline or not set — visitor can retry later+ ShareHeteroDeviceUnavailable: 'ShareHeteroDeviceUnavailable', // The shared local CLI agent's device is offline or not set — visitor can retry laterAgentShareProviderNotSupported: 'AgentShareProviderNotSupported', // This shared agent uses a provider that is not supported for shared visitorsSupervisorDecisionFailed: 'SupervisorDecisionFailed', // Supervisor decision failedAgentConcurrencyLimitExceeded: 'AgentConcurrencyLimitExceeded', // The user already has as many agent runs in flight as allowed — recovers when one finishes