Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workspace-dep-closures.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"crates/broadcast",
"crates/channel_sender",
"crates/channels",
"crates/claude_cloud_agents",
"crates/codex_cloud_agents",
"crates/codex_connection",
"crates/comms_db_client",
Expand Down Expand Up @@ -275,6 +276,7 @@
"crates/channel_sender",
"crates/channels",
"crates/chat",
"crates/claude_cloud_agents",
"crates/codex_cloud_agents",
"crates/codex_connection",
"crates/comms_db_client",
Expand Down Expand Up @@ -1833,6 +1835,26 @@
"crates/share_permission_db_utils",
"crates/workspace-hack"
],
"claude_cloud_agents": [
"crates/agent_runtime_protocol",
"crates/bot_id",
"crates/bot_token",
"crates/claude_cloud_agents",
"crates/cowlike",
"crates/cursor_api_key",
"crates/harness_id",
"crates/harness_token",
"crates/macro_auth",
"crates/macro_authorization",
"crates/macro_env",
"crates/macro_env_var",
"crates/macro_user_id",
"crates/macro_uuid",
"crates/model-error-response",
"crates/model_user",
"crates/remote_env_var",
"crates/workspace-hack"
],
"codex_cloud_agents": [
"crates/activity",
"crates/agent",
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ infra/local/generated/
# Per-developer macrod config contains this machine's harness bearer token.
/macrod.toml
/macrod.webhook-state.json

# Owner-bound subscription OAuth credentials for the internal Claude demo.
/.claude-cloud/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ members = [
"crates/crm",
"crates/cursor_api_key",
"crates/cursor_cloud_agents",
"crates/claude_cloud_agents",
"crates/embedding",
"crates/email_api_client",
"crates/entity_mutation",
Expand Down Expand Up @@ -302,6 +303,7 @@ sqlx = { version = "0.8.6", features = [
"uuid",
] }
sqlx-core = { version = "0.8.6" }
sse-core = { version = "0.2.3", default-features = false, features = ["std"] }
strum = { version = "0.27.1", features = ["derive"] }
tempfile = "3"
thiserror = "2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function AgentSplitHeader(props: {
{
label: () => {
const provider = props.session?.external?.provider;
if (provider === 'claude-cloud') return 'Open in Claude';
if (!provider) return 'Open externally';
return `Open in ${provider.charAt(0).toUpperCase()}${provider.slice(1)}`;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ describe('isManagedHarness', () => {
expect(isManagedHarness('in-memory')).toBe(true);
expect(isManagedHarness('macro-inmem')).toBe(true);
expect(isManagedHarness('cursor')).toBe(true);
expect(isManagedHarness('claude-cloud')).toBe(true);
});

it('refuses external daemons', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export function isManagedHarness(harness: string): boolean {
harness === 'in-memory' ||
harness === 'macro-inmem' ||
harness === 'cursor' ||
harness === 'codex-cloud'
harness === 'codex-cloud' ||
harness === 'claude-cloud'
);
}

Expand Down Expand Up @@ -78,6 +79,9 @@ export function agentRuntimeDescription(
}
if (persona.harness === 'codex-cloud')
return 'Runs in your selected Codex cloud environment';
if (persona.harness === 'claude-cloud') {
return 'Runs in Claude’s cloud using your subscription. Demo: text prompts, no Macro connectors';
}
if (persona.harness === 'macrod') {
return `Do work locally using ${persona.name}${ownerName ? ` owned by ${ownerName}` : ''}`;
}
Expand All @@ -98,6 +102,8 @@ export function harnessDisplayName(harness: string): string {
return 'Cursor';
case 'codex-cloud':
return 'Codex';
case 'claude-cloud':
return 'Claude Cloud';
default:
return harness;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function AgentSessionProvider(
}

/**
* Compensating read for a Cursor session whose provider url arrived after
* Compensating read for a cloud session whose provider URL arrived after
* the feed's snapshot. Lives in its own Suspense so the rest of the block
* stays mounted while this query's first fetch is in flight.
*/
Expand All @@ -234,13 +234,15 @@ function CloudExternalUrlPoll(props: {
session: Accessor<AgentSessionResponse | undefined>;
applySnapshot: (session: AgentSessionResponse) => void;
}) {
// Only a loaded Cursor session whose provider url is still missing polls;
// Only a loaded cloud session whose provider URL is still missing polls;
// everything else passes `undefined`, which disables the query.
const query = useAgentSessionExternalUrlQuery(() => {
const id = props.sessionId();
const session = props.session();
if (!id || !session || session.external?.url) return undefined;
return isCursorBotId(session.botId) || isCodexBotId(session.botId)
return isCursorBotId(session.botId) ||
isCodexBotId(session.botId) ||
session.harness === 'claude-cloud'
? id
: undefined;
});
Expand Down
41 changes: 41 additions & 0 deletions apps/web/src/features/claude-connection/claude-connection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { useUserId } from '@core/context/user';
import { useClaudeConnectionSource } from '@queries/claude-auth/connection';
import { Suspense } from 'solid-js';
import { ConnectionCard } from './components/connection-card';
import { openClaudeSignIn } from './open-sign-in';
import { createClaudeConnection } from './primitives/connection';

function ConnectedCard() {
const connection = createClaudeConnection(
useClaudeConnectionSource(useUserId()),
openClaudeSignIn
);
return (
<ConnectionCard
status={connection.status()}
failed={connection.failed()}
login={connection.login()}
code={connection.code()}
busy={connection.busy()}
error={connection.error()}
onCode={connection.setCode}
onBegin={() => void connection.begin()}
onComplete={() => void connection.complete()}
onDisconnect={() => void connection.disconnect()}
onRefresh={() => void connection.refresh()}
/>
);
}

/** Production composition, isolated from the parent Settings suspense boundary. */
export function ClaudeConnection() {
return (
<Suspense
fallback={
<p class="text-sm text-ink-muted">Loading Claude connection…</p>
}
>
<ConnectedCard />
</Suspense>
);
}
Loading
Loading