codeam-cli 2.53.3 → 2.54.0
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/CHANGELOG.md +17 -0
- package/dist/index.js +291 -84
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.53.4] — 2026-07-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **jetbrains:** Eliminate all 8 internal-API usages flagged by Plugin Verifier
|
|
12
|
+
- **shared:** Phase 1 anti-drift — sync wire contracts, USER_EVENTS constants, zod RemoteCommand guard, JB respondWith + drift tests
|
|
13
|
+
|
|
14
|
+
### Tests
|
|
15
|
+
|
|
16
|
+
- **cli:** Backend contract fixtures for beads_action + migrate off deprecated BeadsActionPayload alias
|
|
17
|
+
|
|
18
|
+
## [2.53.3] — 2026-07-06
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Phase 0 hygiene — 8 verified bugs across cli/shared/vsc/jetbrains
|
|
23
|
+
|
|
7
24
|
## [2.53.2] — 2026-07-06
|
|
8
25
|
|
|
9
26
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -276,8 +276,16 @@ var AGENT_REGISTRY = {
|
|
|
276
276
|
displayName: "Claude Code",
|
|
277
277
|
binaryName: "claude",
|
|
278
278
|
enabled: true,
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
// Mirrors the backend registry (codeagent-mobile
|
|
280
|
+
// apps/api-v2/src/codespaces/agent.ts — authoritative for auth
|
|
281
|
+
// capabilities). `setup_token` is the bare `sk-ant-oat01-…` from
|
|
282
|
+
// `claude setup-token` → delivered via CLAUDE_CODE_OAUTH_TOKEN.
|
|
283
|
+
supportedAuthKinds: ["setup_token", "oauth_token", "api_key"],
|
|
284
|
+
preferredAuthKind: "setup_token",
|
|
285
|
+
headroomWrappable: true,
|
|
286
|
+
headroomKind: "claude",
|
|
287
|
+
// npm adapter `@agentclientprotocol/claude-agent-acp`.
|
|
288
|
+
acp: true
|
|
281
289
|
},
|
|
282
290
|
codex: {
|
|
283
291
|
id: "codex",
|
|
@@ -285,7 +293,15 @@ var AGENT_REGISTRY = {
|
|
|
285
293
|
binaryName: "codex",
|
|
286
294
|
enabled: true,
|
|
287
295
|
supportedAuthKinds: ["oauth_token", "api_key"],
|
|
288
|
-
preferredAuthKind: "oauth_token"
|
|
296
|
+
preferredAuthKind: "oauth_token",
|
|
297
|
+
headroomWrappable: true,
|
|
298
|
+
headroomKind: "codex",
|
|
299
|
+
// npm adapter `@agentclientprotocol/codex-acp`.
|
|
300
|
+
acp: true,
|
|
301
|
+
// OAuth device-code flow; the user_code on the OpenAI page IS a real
|
|
302
|
+
// human-typed code — surfaces render it (with a copy affordance).
|
|
303
|
+
deviceFlow: true,
|
|
304
|
+
showsUserCode: true
|
|
289
305
|
},
|
|
290
306
|
copilot: {
|
|
291
307
|
id: "copilot",
|
|
@@ -293,23 +309,47 @@ var AGENT_REGISTRY = {
|
|
|
293
309
|
binaryName: "gh",
|
|
294
310
|
enabled: false,
|
|
295
311
|
supportedAuthKinds: ["oauth_token"],
|
|
296
|
-
preferredAuthKind: "oauth_token"
|
|
312
|
+
preferredAuthKind: "oauth_token",
|
|
313
|
+
// `headroom init --global copilot` exists even though the agent is
|
|
314
|
+
// still disabled here (no runtime builder yet).
|
|
315
|
+
headroomWrappable: true,
|
|
316
|
+
headroomKind: "copilot",
|
|
317
|
+
acp: false
|
|
297
318
|
},
|
|
298
319
|
coderabbit: {
|
|
299
320
|
id: "coderabbit",
|
|
300
321
|
displayName: "CodeRabbit",
|
|
301
322
|
binaryName: "coderabbit",
|
|
302
323
|
enabled: true,
|
|
303
|
-
|
|
304
|
-
|
|
324
|
+
// Backend registry is authoritative: CodeRabbit links via a real
|
|
325
|
+
// API key only (no OAuth flow exists in api-v2).
|
|
326
|
+
supportedAuthKinds: ["api_key"],
|
|
327
|
+
preferredAuthKind: "api_key",
|
|
328
|
+
headroomWrappable: false,
|
|
329
|
+
// Legacy PTY runtime — no ACP adapter registered.
|
|
330
|
+
acp: false
|
|
305
331
|
},
|
|
306
332
|
cursor: {
|
|
307
333
|
id: "cursor",
|
|
308
334
|
displayName: "Cursor Agent",
|
|
309
335
|
binaryName: "cursor-agent",
|
|
310
336
|
enabled: true,
|
|
311
|
-
|
|
312
|
-
|
|
337
|
+
// Backend registry is authoritative: since the Cursor OAuth
|
|
338
|
+
// device-flow shipped, new links are oauth_token only (the login
|
|
339
|
+
// blob written to ~/.config/cursor/auth.json). Legacy vaulted
|
|
340
|
+
// api_key rows may still exist server-side, but the link surface
|
|
341
|
+
// no longer offers api_key.
|
|
342
|
+
supportedAuthKinds: ["oauth_token"],
|
|
343
|
+
preferredAuthKind: "oauth_token",
|
|
344
|
+
// `headroom wrap cursor` is "manual/print-only" (IDE settings; the
|
|
345
|
+
// headless cursor-agent CLI has no base-URL override) — runs native.
|
|
346
|
+
headroomWrappable: false,
|
|
347
|
+
// Native ACP server: `cursor-agent acp`.
|
|
348
|
+
acp: true,
|
|
349
|
+
// Reverse-engineered device/poll flow; `userCode` is the secret PKCE
|
|
350
|
+
// verifier echoed back on poll — NEVER human-facing.
|
|
351
|
+
deviceFlow: true,
|
|
352
|
+
showsUserCode: false
|
|
313
353
|
},
|
|
314
354
|
aider: {
|
|
315
355
|
id: "aider",
|
|
@@ -320,7 +360,10 @@ var AGENT_REGISTRY = {
|
|
|
320
360
|
// / etc. env vars or `~/.aider.conf.yml`. The link flow surfaces
|
|
321
361
|
// this via the existing --api-key escape hatch in commands/link.ts.
|
|
322
362
|
supportedAuthKinds: ["api_key"],
|
|
323
|
-
preferredAuthKind: "api_key"
|
|
363
|
+
preferredAuthKind: "api_key",
|
|
364
|
+
headroomWrappable: false,
|
|
365
|
+
// Legacy PTY runtime — no ACP adapter registered.
|
|
366
|
+
acp: false
|
|
324
367
|
},
|
|
325
368
|
gemini: {
|
|
326
369
|
id: "gemini",
|
|
@@ -332,7 +375,11 @@ var AGENT_REGISTRY = {
|
|
|
332
375
|
// accepted by the backend's GeminiProvisioningStrategy and propagated
|
|
333
376
|
// into codespace deploys.
|
|
334
377
|
supportedAuthKinds: ["oauth_token", "api_key"],
|
|
335
|
-
preferredAuthKind: "oauth_token"
|
|
378
|
+
preferredAuthKind: "oauth_token",
|
|
379
|
+
// Not listed by `headroom wrap --help` — runs native.
|
|
380
|
+
headroomWrappable: false,
|
|
381
|
+
// Native ACP server: `gemini --skip-trust --acp`.
|
|
382
|
+
acp: true
|
|
336
383
|
}
|
|
337
384
|
};
|
|
338
385
|
function getEnabledAgents() {
|
|
@@ -344,7 +391,57 @@ function getAgent(id) {
|
|
|
344
391
|
return meta;
|
|
345
392
|
}
|
|
346
393
|
function isKnownAgentId(id) {
|
|
347
|
-
return id
|
|
394
|
+
return id in AGENT_REGISTRY;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// ../../packages/shared/src/agents/identity.ts
|
|
398
|
+
var HOUSE_AGENT_ID = "house-codeagent-cloud";
|
|
399
|
+
var PUBLIC_TO_INTERNAL = {
|
|
400
|
+
claude_code: "claude",
|
|
401
|
+
// CLI-side extra: self-hosted deploy payloads may carry the internal id.
|
|
402
|
+
claude: "claude",
|
|
403
|
+
codex: "codex",
|
|
404
|
+
// CLI-side extra: copilot has no public LinkedAgentId (backend doesn't
|
|
405
|
+
// expose it) but the self-hosted path accepts it.
|
|
406
|
+
copilot: "copilot",
|
|
407
|
+
cursor: "cursor",
|
|
408
|
+
aider: "aider",
|
|
409
|
+
coderabbit: "coderabbit",
|
|
410
|
+
gemini: "gemini",
|
|
411
|
+
// The house agent runs Claude Code under the hood (pointed at the
|
|
412
|
+
// MiniMax proxy). Its internal runtime is therefore `claude`.
|
|
413
|
+
[HOUSE_AGENT_ID]: "claude"
|
|
414
|
+
};
|
|
415
|
+
var TERMINAL_AGENT_PREFIX = "__terminal__:";
|
|
416
|
+
var AGENT_ID_ALIASES = {
|
|
417
|
+
claude_code: "claude",
|
|
418
|
+
"claude-code": "claude",
|
|
419
|
+
"anthropic.claude-code": "claude",
|
|
420
|
+
"anthropics.claude": "claude",
|
|
421
|
+
"anthropic.claude-ce": "claude",
|
|
422
|
+
"anthropic.claude": "claude",
|
|
423
|
+
"com.anthropic.claudecode": "claude",
|
|
424
|
+
"com.anthropic.claude": "claude",
|
|
425
|
+
"openai.chatgpt": "codex",
|
|
426
|
+
"coderabbitai.coderabbit-vscode": "coderabbit"
|
|
427
|
+
};
|
|
428
|
+
function normalizeAgentId(raw) {
|
|
429
|
+
const value = (raw ?? "").trim().toLowerCase();
|
|
430
|
+
if (!value) return null;
|
|
431
|
+
if (isKnownAgentId(value)) return value;
|
|
432
|
+
const unprefixed = value.startsWith(TERMINAL_AGENT_PREFIX) ? value.slice(TERMINAL_AGENT_PREFIX.length) : value;
|
|
433
|
+
if (isKnownAgentId(unprefixed)) return unprefixed;
|
|
434
|
+
return AGENT_ID_ALIASES[unprefixed] ?? null;
|
|
435
|
+
}
|
|
436
|
+
function headroomKindFor(agentId) {
|
|
437
|
+
const normalized = (agentId ?? "").toLowerCase().replace(/[_-]/g, "");
|
|
438
|
+
if (!normalized) return null;
|
|
439
|
+
for (const meta of Object.values(AGENT_REGISTRY)) {
|
|
440
|
+
if (meta.headroomKind !== void 0 && normalized.startsWith(meta.id)) {
|
|
441
|
+
return meta.headroomKind;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
return null;
|
|
348
445
|
}
|
|
349
446
|
|
|
350
447
|
// ../../packages/shared/src/api-url.ts
|
|
@@ -359,6 +456,112 @@ function resolveApiBaseUrl() {
|
|
|
359
456
|
return DEFAULT_API_BASE_URL;
|
|
360
457
|
}
|
|
361
458
|
|
|
459
|
+
// ../../packages/shared/src/headroom/manifest.ts
|
|
460
|
+
var HEADROOM_PIP_COMPANIONS = [
|
|
461
|
+
"fastapi",
|
|
462
|
+
"uvicorn",
|
|
463
|
+
"httpx[http2]",
|
|
464
|
+
"websockets",
|
|
465
|
+
"zstandard"
|
|
466
|
+
];
|
|
467
|
+
var HEADROOM_EXTRAS_BY_SURFACE = {
|
|
468
|
+
codespace: ["proxy", "code"],
|
|
469
|
+
selfHosted: ["proxy", "code"],
|
|
470
|
+
onDemand: ["proxy", "code", "image"]
|
|
471
|
+
};
|
|
472
|
+
function headroomPipPackage(extras) {
|
|
473
|
+
return `headroom-ai[${extras.join(",")}]`;
|
|
474
|
+
}
|
|
475
|
+
var HEADROOM_MODELS = [
|
|
476
|
+
{
|
|
477
|
+
repo: "chopratejas/kompress-v2-base",
|
|
478
|
+
allowPatterns: ["*.json", "onnx/*.onnx", "kompress-int8-wo.onnx"]
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
repo: "answerdotai/ModernBERT-base",
|
|
482
|
+
allowPatterns: ["*.json", "tokenizer*", "*.txt", "vocab*", "merges*"]
|
|
483
|
+
}
|
|
484
|
+
];
|
|
485
|
+
function headroomSnapshotDownloadLine(model, opts = {}) {
|
|
486
|
+
const sep7 = opts.spaceAfterComma ? ", " : ",";
|
|
487
|
+
const patterns = model.allowPatterns.map((p2) => `"${p2}"`).join(sep7);
|
|
488
|
+
return `snapshot_download("${model.repo}", allow_patterns=[${patterns}])`;
|
|
489
|
+
}
|
|
490
|
+
function headroomModelPredownloadScript(opts = {}) {
|
|
491
|
+
return [
|
|
492
|
+
"from huggingface_hub import snapshot_download",
|
|
493
|
+
...HEADROOM_MODELS.map((m) => headroomSnapshotDownloadLine(m, opts))
|
|
494
|
+
].join("\n");
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// ../../packages/shared/src/types/events.ts
|
|
498
|
+
var USER_EVENTS = {
|
|
499
|
+
PAIRED_SESSION_STATUS: "paired_session_status",
|
|
500
|
+
PAIRED_SESSION_ADDED: "paired_session_added",
|
|
501
|
+
PAIRED_SESSION_REMOVED: "paired_session_removed",
|
|
502
|
+
PAIRED_SESSION_BRANCH_CHANGED: "paired_session_branch_changed",
|
|
503
|
+
SHARED_WITH_ME_ADDED: "shared_with_me_added",
|
|
504
|
+
SHARED_WITH_ME_REVOKED: "shared_with_me_revoked",
|
|
505
|
+
USAGE_CHANGED: "usage_changed",
|
|
506
|
+
TASK_DONE: "task_done",
|
|
507
|
+
HUNK_PENDING_REVIEW_ADDED: "hunk_pending_review_added",
|
|
508
|
+
HUNK_REVIEW_RESOLVED: "hunk_review_resolved",
|
|
509
|
+
FILE_CHANGED: "file_changed",
|
|
510
|
+
FILES_BATCH_CHANGED: "files_batch_changed",
|
|
511
|
+
AGENT_STREAMING_CHUNK: "agent_streaming_chunk",
|
|
512
|
+
AGENT_AWAITING_ANSWER: "agent_awaiting_answer",
|
|
513
|
+
AWAITING_INPUT_ADDED: "awaiting_input_added",
|
|
514
|
+
AGENT_ANSWER_RESOLVED: "agent_answer_resolved",
|
|
515
|
+
TEMPLATE_ADDED: "template_added",
|
|
516
|
+
TEMPLATE_REMOVED: "template_removed",
|
|
517
|
+
TEMPLATE_UPDATED: "template_updated",
|
|
518
|
+
AGENT_TASK_DISPATCHED: "agent_task_dispatched",
|
|
519
|
+
AGENT_TASK_COMPLETED: "agent_task_completed",
|
|
520
|
+
LINKED_AGENT_ADDED: "linked_agent_added",
|
|
521
|
+
QUOTA_REACHED: "quota_reached",
|
|
522
|
+
LINKED_AGENT_LINK_FAILED: "linked_agent_link_failed",
|
|
523
|
+
CODESPACE_AGENT_INSTALLED: "codespace_agent_installed",
|
|
524
|
+
AGENT_CREDENTIALS_REFRESHED: "agent_credentials_refreshed",
|
|
525
|
+
CREDENTIAL_INVALID: "credential_invalid",
|
|
526
|
+
CODESPACE_WAKING: "codespace_waking",
|
|
527
|
+
CODESPACE_BILLING_BLOCKED: "codespace_billing_blocked",
|
|
528
|
+
COST_SAVING_UPDATED: "cost_saving_updated",
|
|
529
|
+
COMMAND_COMPLETED: "command_completed",
|
|
530
|
+
AI_SUMMARY_PENDING: "ai_summary_pending",
|
|
531
|
+
AI_SUMMARY_READY: "ai_summary_ready",
|
|
532
|
+
AI_INSIGHT_PENDING: "ai_insight_pending",
|
|
533
|
+
AI_INSIGHT_READY: "ai_insight_ready",
|
|
534
|
+
PUSH_TOKEN_INVALIDATED: "push_token_invalidated",
|
|
535
|
+
PREVIEW_DETECTION_PENDING: "preview_detection_pending",
|
|
536
|
+
PREVIEW_DETECTION_READY: "preview_detection_ready",
|
|
537
|
+
PREVIEW_STARTING: "preview_starting",
|
|
538
|
+
PREVIEW_READY: "preview_ready",
|
|
539
|
+
PREVIEW_STOPPED: "preview_stopped",
|
|
540
|
+
PREVIEW_ERROR: "preview_error",
|
|
541
|
+
PREVIEW_PROGRESS: "preview_progress",
|
|
542
|
+
BEADS_STATE_CHANGED: "beads_state_changed",
|
|
543
|
+
BEADS_PROVISIONING: "beads_provisioning",
|
|
544
|
+
BEADS_TEAM_MEMORY_CHANGED: "beads_team_memory_changed",
|
|
545
|
+
AUDIT_EVENT_ADDED: "audit_event_added",
|
|
546
|
+
SELF_HOSTED_HOST_ADDED: "self_hosted_host_added",
|
|
547
|
+
SELF_HOSTED_HOST_STATUS: "self_hosted_host_status",
|
|
548
|
+
SELF_HOSTED_HOST_REMOVED: "self_hosted_host_removed",
|
|
549
|
+
SELF_HOSTED_HOST_TELEMETRY: "self_hosted_host_telemetry",
|
|
550
|
+
SELF_HOSTED_HOST_METRICS: "self_hosted_host_metrics",
|
|
551
|
+
SELF_HOSTED_HOST_SESSIONS: "self_hosted_host_sessions",
|
|
552
|
+
SELF_HOSTED_DEPLOY_PROGRESS: "self_hosted_deploy_progress",
|
|
553
|
+
REFERRAL_REWARD_EARNED: "referral_reward_earned",
|
|
554
|
+
HEADROOM_PROGRESS: "headroom_progress",
|
|
555
|
+
HEADROOM_STATUS: "headroom_status",
|
|
556
|
+
BEADS_STATUS: "beads_status",
|
|
557
|
+
LINKED_AGENT_HEADROOM_BUDGET_UPDATED: "linked_agent_headroom_budget_updated",
|
|
558
|
+
CLI_UPDATE_AVAILABLE: "cli_update_available",
|
|
559
|
+
AGENT_INSTALL_PROGRESS: "agent_install_progress",
|
|
560
|
+
AGENT_INSTALL_FAILED: "agent_install_failed",
|
|
561
|
+
CLI_UPDATE_PROGRESS: "cli_update_progress",
|
|
562
|
+
CLI_UPDATE_FAILED: "cli_update_failed"
|
|
563
|
+
};
|
|
564
|
+
|
|
362
565
|
// ../../packages/shared/src/preview-prompts.ts
|
|
363
566
|
var PREVIEW_DETECT_PROMPT = `
|
|
364
567
|
Analyze the project in the current working directory and return how to start
|
|
@@ -5418,7 +5621,7 @@ function readAnonId() {
|
|
|
5418
5621
|
}
|
|
5419
5622
|
function superProperties() {
|
|
5420
5623
|
return {
|
|
5421
|
-
cliVersion: true ? "2.
|
|
5624
|
+
cliVersion: true ? "2.54.0" : "0.0.0-dev",
|
|
5422
5625
|
nodeVersion: process.version,
|
|
5423
5626
|
platform: process.platform,
|
|
5424
5627
|
arch: process.arch,
|
|
@@ -5599,7 +5802,7 @@ var os4 = __toESM(require("os"));
|
|
|
5599
5802
|
// package.json
|
|
5600
5803
|
var package_default = {
|
|
5601
5804
|
name: "codeam-cli",
|
|
5602
|
-
version: "2.
|
|
5805
|
+
version: "2.54.0",
|
|
5603
5806
|
description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
|
|
5604
5807
|
type: "commonjs",
|
|
5605
5808
|
main: "dist/index.js",
|
|
@@ -5687,7 +5890,7 @@ var package_default = {
|
|
|
5687
5890
|
"@beads/bd": "1.0.5"
|
|
5688
5891
|
},
|
|
5689
5892
|
devDependencies: {
|
|
5690
|
-
"@
|
|
5893
|
+
"@codeam/shared": "*",
|
|
5691
5894
|
"@types/node": "^22.0.0",
|
|
5692
5895
|
"@types/qrcode-terminal": "^0.12.0",
|
|
5693
5896
|
"@types/which": "^3.0.4",
|
|
@@ -5952,6 +6155,8 @@ async function postBeadsProvisioning(input) {
|
|
|
5952
6155
|
try {
|
|
5953
6156
|
await _transport.postJsonAuthed(
|
|
5954
6157
|
`${API_BASE}/api/beads/provisioning`,
|
|
6158
|
+
// The CLI is the producer of this hop — the body is the shared wire
|
|
6159
|
+
// shape (`@codeam/shared` `BeadsProvisioningPayload`), validated here.
|
|
5955
6160
|
{
|
|
5956
6161
|
sessionId: input.sessionId,
|
|
5957
6162
|
pluginId: input.pluginId,
|
|
@@ -6633,7 +6838,7 @@ var CommandRelayService = class {
|
|
|
6633
6838
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
6634
6839
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
6635
6840
|
// pair/reconnect). Older backends ignore the extra field.
|
|
6636
|
-
..."2.
|
|
6841
|
+
..."2.54.0" ? { ideVersion: "2.54.0" } : {}
|
|
6637
6842
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
6638
6843
|
}
|
|
6639
6844
|
/**
|
|
@@ -8115,7 +8320,7 @@ var startCommandSchema = import_zod.z.object({
|
|
|
8115
8320
|
}).optional(),
|
|
8116
8321
|
// `preview_start` carries the agent-detected `PreviewDetection`
|
|
8117
8322
|
// shape from the mobile / web confirmation sheet. Mirrors
|
|
8118
|
-
// `@
|
|
8323
|
+
// `@codeam/shared`'s `PreviewDetection` byte-for-byte. Kept
|
|
8119
8324
|
// loose (`unknown` for env / setup_commands) so a CLI version
|
|
8120
8325
|
// running against a newer backend that adds optional fields still
|
|
8121
8326
|
// accepts the payload; the handler validates the shape it needs
|
|
@@ -15133,7 +15338,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
15133
15338
|
if (process.env.NODE_ENV === "test") return;
|
|
15134
15339
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
15135
15340
|
if (process.env.CI) return;
|
|
15136
|
-
const current = true ? "2.
|
|
15341
|
+
const current = true ? "2.54.0" : null;
|
|
15137
15342
|
if (!current) return;
|
|
15138
15343
|
const cache = readCache();
|
|
15139
15344
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15150,7 +15355,7 @@ function checkForUpdates() {
|
|
|
15150
15355
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
15151
15356
|
if (process.env.CI) return;
|
|
15152
15357
|
if (!process.stdout.isTTY) return;
|
|
15153
|
-
const current = true ? "2.
|
|
15358
|
+
const current = true ? "2.54.0" : null;
|
|
15154
15359
|
if (!current) return;
|
|
15155
15360
|
const cache = readCache();
|
|
15156
15361
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15313,7 +15518,10 @@ var CONTROL_AGENT_META = {
|
|
|
15313
15518
|
binaryName: "codeam",
|
|
15314
15519
|
enabled: true,
|
|
15315
15520
|
supportedAuthKinds: ["oauth_token"],
|
|
15316
|
-
preferredAuthKind: "oauth_token"
|
|
15521
|
+
preferredAuthKind: "oauth_token",
|
|
15522
|
+
// Synthetic control channel — capability flags are moot (no agent runs).
|
|
15523
|
+
headroomWrappable: false,
|
|
15524
|
+
acp: false
|
|
15317
15525
|
};
|
|
15318
15526
|
var PEP668_MARKER = "externally-managed-environment";
|
|
15319
15527
|
var PM_INSTALL_TIMEOUT_MS = 18e4;
|
|
@@ -15484,15 +15692,10 @@ async function ensurePip(runner) {
|
|
|
15484
15692
|
return true;
|
|
15485
15693
|
}
|
|
15486
15694
|
function agentIdToHeadroomKind(agentId) {
|
|
15487
|
-
|
|
15488
|
-
if (normalized.startsWith("claude")) return "claude";
|
|
15489
|
-
if (normalized.startsWith("codex")) return "codex";
|
|
15490
|
-
if (normalized.startsWith("copilot")) return "copilot";
|
|
15491
|
-
return "claude";
|
|
15695
|
+
return headroomKindFor(agentId) ?? "claude";
|
|
15492
15696
|
}
|
|
15493
15697
|
function isHeadroomSupportedAgent(agentId) {
|
|
15494
|
-
|
|
15495
|
-
return n.startsWith("claude") || n.startsWith("codex") || n.startsWith("copilot");
|
|
15698
|
+
return headroomKindFor(agentId) !== null;
|
|
15496
15699
|
}
|
|
15497
15700
|
function headroomConfigPath() {
|
|
15498
15701
|
return path38.join(os31.homedir(), ".codeam", "headroom-config.json");
|
|
@@ -15745,10 +15948,10 @@ async function ensureModernPython(runner) {
|
|
|
15745
15948
|
return py;
|
|
15746
15949
|
}
|
|
15747
15950
|
async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner, opts = {}) {
|
|
15748
|
-
const extras = opts.extras ?? [
|
|
15951
|
+
const extras = opts.extras ?? [...HEADROOM_EXTRAS_BY_SURFACE.selfHosted];
|
|
15749
15952
|
const onProgress = opts.onProgress ?? (() => {
|
|
15750
15953
|
});
|
|
15751
|
-
const SERVER_DEPS =
|
|
15954
|
+
const SERVER_DEPS = HEADROOM_PIP_COMPANIONS;
|
|
15752
15955
|
const pipAvailable = await ensurePip(runner);
|
|
15753
15956
|
if (!pipAvailable) {
|
|
15754
15957
|
return false;
|
|
@@ -15773,7 +15976,7 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
|
|
|
15773
15976
|
return false;
|
|
15774
15977
|
};
|
|
15775
15978
|
onProgress("pip");
|
|
15776
|
-
const headroomPkg =
|
|
15979
|
+
const headroomPkg = headroomPipPackage(extras);
|
|
15777
15980
|
const installOk = await pipInstall([headroomPkg, ...SERVER_DEPS], [], ENGINE_INSTALL_TIMEOUT_MS);
|
|
15778
15981
|
if (!installOk) {
|
|
15779
15982
|
log.warn("host-agent", `headroom engine install failed (${headroomPkg}) \u2014 skipping Headroom`);
|
|
@@ -15781,11 +15984,7 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
|
|
|
15781
15984
|
}
|
|
15782
15985
|
log.info("host-agent", `headroom + ONNX engines installed (${headroomPkg})`);
|
|
15783
15986
|
onProgress("model");
|
|
15784
|
-
const predownloadPy =
|
|
15785
|
-
"from huggingface_hub import snapshot_download",
|
|
15786
|
-
'snapshot_download("chopratejas/kompress-v2-base", allow_patterns=["*.json","onnx/*.onnx","kompress-int8-wo.onnx"])',
|
|
15787
|
-
'snapshot_download("answerdotai/ModernBERT-base", allow_patterns=["*.json","tokenizer*","*.txt","vocab*","merges*"])'
|
|
15788
|
-
].join("\n");
|
|
15987
|
+
const predownloadPy = headroomModelPredownloadScript();
|
|
15789
15988
|
const dl = await runner.run(py, ["-c", predownloadPy], {
|
|
15790
15989
|
timeoutMs: ENGINE_INSTALL_TIMEOUT_MS
|
|
15791
15990
|
});
|
|
@@ -15861,7 +16060,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process16.s
|
|
|
15861
16060
|
detached: false
|
|
15862
16061
|
});
|
|
15863
16062
|
function currentCliVersion() {
|
|
15864
|
-
return true ? "2.
|
|
16063
|
+
return true ? "2.54.0" : null;
|
|
15865
16064
|
}
|
|
15866
16065
|
function runCmd(cmd, args2, timeoutMs) {
|
|
15867
16066
|
return new Promise((resolve7) => {
|
|
@@ -16573,11 +16772,13 @@ async function configureHeadroom(action, ctx, deps) {
|
|
|
16573
16772
|
if (action === "enable") {
|
|
16574
16773
|
if (!isHeadroomSupportedAgent(ctx.agent)) return { supported: false };
|
|
16575
16774
|
const ok = await deps.setup(ctx.agent, void 0, {
|
|
16576
|
-
|
|
16577
|
-
|
|
16775
|
+
// On-demand surface ships the extra `image` compression support — see
|
|
16776
|
+
// the shared Headroom manifest (`HEADROOM_EXTRAS_BY_SURFACE`).
|
|
16777
|
+
extras: [...HEADROOM_EXTRAS_BY_SURFACE.onDemand],
|
|
16778
|
+
onProgress: (step) => deps.emit({ type: USER_EVENTS.HEADROOM_PROGRESS, step })
|
|
16578
16779
|
});
|
|
16579
16780
|
if (!ok) {
|
|
16580
|
-
deps.emit({ type:
|
|
16781
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "error" });
|
|
16581
16782
|
return { enabled: false };
|
|
16582
16783
|
}
|
|
16583
16784
|
deps.persist({ enabled: true, agent: kind, ingestUrl: ctx.savingsIngestUrl });
|
|
@@ -16588,14 +16789,14 @@ async function configureHeadroom(action, ctx, deps) {
|
|
|
16588
16789
|
pluginAuthToken: ctx.pluginAuthToken
|
|
16589
16790
|
});
|
|
16590
16791
|
}
|
|
16591
|
-
deps.emit({ type:
|
|
16792
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "enabled" });
|
|
16592
16793
|
return { enabled: true };
|
|
16593
16794
|
}
|
|
16594
16795
|
deps.restoreAgentHeadroomConfig(kind);
|
|
16595
16796
|
deps.stopProxy();
|
|
16596
16797
|
deps.persist({ enabled: false });
|
|
16597
16798
|
deps.stopReporter();
|
|
16598
|
-
deps.emit({ type:
|
|
16799
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "disabled" });
|
|
16599
16800
|
return { enabled: false };
|
|
16600
16801
|
}
|
|
16601
16802
|
|
|
@@ -17575,9 +17776,12 @@ function coerceIssue(row, projectKey) {
|
|
|
17575
17776
|
owner: typeof r.owner === "string" && r.owner.length > 0 ? r.owner : null,
|
|
17576
17777
|
created_at: typeof r.created_at === "string" ? r.created_at : "",
|
|
17577
17778
|
updated_at: typeof r.updated_at === "string" ? r.updated_at : "",
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
|
|
17779
|
+
// The backend ingest DTO validates the counts as REQUIRED ints — an
|
|
17780
|
+
// omitted count would 400 the whole snapshot. Default to 0 when a bd
|
|
17781
|
+
// version omits one instead of dropping the field.
|
|
17782
|
+
dependency_count: typeof r.dependency_count === "number" ? r.dependency_count : 0,
|
|
17783
|
+
dependent_count: typeof r.dependent_count === "number" ? r.dependent_count : 0,
|
|
17784
|
+
comment_count: typeof r.comment_count === "number" ? r.comment_count : 0,
|
|
17581
17785
|
projectKey
|
|
17582
17786
|
};
|
|
17583
17787
|
}
|
|
@@ -18414,9 +18618,10 @@ var BeadsWatcher = class {
|
|
|
18414
18618
|
projectLabel,
|
|
18415
18619
|
fullSnapshot: true,
|
|
18416
18620
|
issues,
|
|
18417
|
-
//
|
|
18418
|
-
//
|
|
18419
|
-
//
|
|
18621
|
+
// We don't track edges in the P0 snapshot yet, so send an empty array.
|
|
18622
|
+
// (The backend DTO marks `dependencies` optional and tolerates absence,
|
|
18623
|
+
// but the wire contract in @codeam/shared says "always sent" — keep
|
|
18624
|
+
// the payload deterministic.)
|
|
18420
18625
|
dependencies: [],
|
|
18421
18626
|
memories: [],
|
|
18422
18627
|
// Always send a summary — a null `bd status` yields a zeroed block rather
|
|
@@ -19022,7 +19227,7 @@ var headroomConfigureH = async (ctx, cmd, parsed) => {
|
|
|
19022
19227
|
}
|
|
19023
19228
|
const savingsIngestUrl = parsed.savingsIngestUrl;
|
|
19024
19229
|
let rawAgentId = ctx.agentId || (typeof parsed.agentId === "string" ? parsed.agentId : "");
|
|
19025
|
-
|
|
19230
|
+
rawAgentId = normalizeAgentId(rawAgentId) ?? rawAgentId;
|
|
19026
19231
|
let configuredAgent = rawAgentId;
|
|
19027
19232
|
if (!configuredAgent) {
|
|
19028
19233
|
try {
|
|
@@ -19136,9 +19341,9 @@ var headroomConfigureH = async (ctx, cmd, parsed) => {
|
|
|
19136
19341
|
var headroomBudgetH = async (ctx, cmd) => {
|
|
19137
19342
|
const payload = cmd.payload;
|
|
19138
19343
|
let rawAgentId = ctx.agentId || (typeof payload.agentId === "string" ? payload.agentId : "");
|
|
19139
|
-
|
|
19344
|
+
rawAgentId = normalizeAgentId(rawAgentId) ?? rawAgentId;
|
|
19140
19345
|
let payloadAgentId = typeof payload.agentId === "string" ? payload.agentId : "";
|
|
19141
|
-
|
|
19346
|
+
payloadAgentId = normalizeAgentId(payloadAgentId) ?? payloadAgentId;
|
|
19142
19347
|
if (!rawAgentId || !isHeadroomSupportedAgent(rawAgentId)) {
|
|
19143
19348
|
await ctx.relay.sendResult(cmd.id, "completed", { applied: false });
|
|
19144
19349
|
return;
|
|
@@ -19198,7 +19403,7 @@ var beadsConfigureH = async (ctx, cmd, parsed) => {
|
|
|
19198
19403
|
return;
|
|
19199
19404
|
}
|
|
19200
19405
|
let rawAgentId = ctx.agentId || (typeof parsed.agentId === "string" ? parsed.agentId : "");
|
|
19201
|
-
|
|
19406
|
+
rawAgentId = normalizeAgentId(rawAgentId) ?? rawAgentId;
|
|
19202
19407
|
const agentIds = rawAgentId && isKnownAgentId(rawAgentId) ? [rawAgentId] : [];
|
|
19203
19408
|
const deps = {
|
|
19204
19409
|
provision: async () => {
|
|
@@ -19238,7 +19443,7 @@ var beadsConfigureH = async (ctx, cmd, parsed) => {
|
|
|
19238
19443
|
sessionId: ctx.sessionId,
|
|
19239
19444
|
pluginId: ctx.pluginId,
|
|
19240
19445
|
pluginAuthToken: token,
|
|
19241
|
-
type:
|
|
19446
|
+
type: USER_EVENTS.BEADS_STATUS,
|
|
19242
19447
|
payload: Object.fromEntries(
|
|
19243
19448
|
Object.entries(event).filter(([k2]) => k2 !== "type")
|
|
19244
19449
|
)
|
|
@@ -19293,12 +19498,14 @@ function buildNpmInstallInvocation(opts) {
|
|
|
19293
19498
|
async function runNpmInstallLatest() {
|
|
19294
19499
|
let lastError = "";
|
|
19295
19500
|
const invocation = buildNpmInstallInvocation();
|
|
19501
|
+
const useShell = process.platform === "win32";
|
|
19502
|
+
const command2 = useShell && invocation.command.includes(" ") ? `"${invocation.command}"` : invocation.command;
|
|
19296
19503
|
for (let attempt = 1; attempt <= CLI_UPDATE_MAX_ATTEMPTS; attempt++) {
|
|
19297
19504
|
const result = await new Promise((resolve7) => {
|
|
19298
19505
|
(0, import_child_process22.execFile)(
|
|
19299
|
-
|
|
19506
|
+
command2,
|
|
19300
19507
|
invocation.args,
|
|
19301
|
-
{ timeout: CLI_UPDATE_INSTALL_TIMEOUT_MS },
|
|
19508
|
+
{ timeout: CLI_UPDATE_INSTALL_TIMEOUT_MS, shell: useShell },
|
|
19302
19509
|
(err, _stdout, stderr) => {
|
|
19303
19510
|
if (!err) {
|
|
19304
19511
|
resolve7({ ok: true });
|
|
@@ -19465,9 +19672,9 @@ var requestLinkCredentialsH = (ctx, _cmd, parsed) => {
|
|
|
19465
19672
|
log.trace("auto-link", "skipped \u2014 no pluginAuthToken on this paired session");
|
|
19466
19673
|
return;
|
|
19467
19674
|
}
|
|
19468
|
-
const internalId = publicId
|
|
19469
|
-
if (!
|
|
19470
|
-
log.trace("auto-link", `unknown / disabled agent: ${
|
|
19675
|
+
const internalId = normalizeAgentId(publicId);
|
|
19676
|
+
if (!internalId || !AGENT_REGISTRY[internalId].enabled) {
|
|
19677
|
+
log.trace("auto-link", `unknown / disabled agent: ${publicId}`);
|
|
19471
19678
|
return;
|
|
19472
19679
|
}
|
|
19473
19680
|
const pluginAuthToken = ctx.pluginAuthToken;
|
|
@@ -19629,7 +19836,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19629
19836
|
sessionId: ctx.sessionId,
|
|
19630
19837
|
pluginId: ctx.pluginId,
|
|
19631
19838
|
pluginAuthToken: ctx.pluginAuthToken,
|
|
19632
|
-
type:
|
|
19839
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19633
19840
|
payload: {
|
|
19634
19841
|
stage: "detection",
|
|
19635
19842
|
message: `Preview detection isn't available on ${ctx.runtime.id} sessions yet \u2014 link a Claude or Codex agent.`
|
|
@@ -19646,7 +19853,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19646
19853
|
sessionId: ctx.sessionId,
|
|
19647
19854
|
pluginId: ctx.pluginId,
|
|
19648
19855
|
pluginAuthToken,
|
|
19649
|
-
type:
|
|
19856
|
+
type: USER_EVENTS.PREVIEW_DETECTION_READY,
|
|
19650
19857
|
payload: { detection: fromFile }
|
|
19651
19858
|
});
|
|
19652
19859
|
return;
|
|
@@ -19655,7 +19862,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19655
19862
|
sessionId: ctx.sessionId,
|
|
19656
19863
|
pluginId: ctx.pluginId,
|
|
19657
19864
|
pluginAuthToken,
|
|
19658
|
-
type:
|
|
19865
|
+
type: USER_EVENTS.PREVIEW_DETECTION_PENDING
|
|
19659
19866
|
});
|
|
19660
19867
|
log.info("preview", "detect: invoking generateOneShot");
|
|
19661
19868
|
const startedAt = Date.now();
|
|
@@ -19671,7 +19878,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19671
19878
|
sessionId: ctx.sessionId,
|
|
19672
19879
|
pluginId: ctx.pluginId,
|
|
19673
19880
|
pluginAuthToken,
|
|
19674
|
-
type:
|
|
19881
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19675
19882
|
payload: {
|
|
19676
19883
|
stage: "detection",
|
|
19677
19884
|
message: "Agent returned invalid JSON. Try again, or add a .codeam/preview.json override."
|
|
@@ -19685,7 +19892,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19685
19892
|
sessionId: ctx.sessionId,
|
|
19686
19893
|
pluginId: ctx.pluginId,
|
|
19687
19894
|
pluginAuthToken,
|
|
19688
|
-
type:
|
|
19895
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19689
19896
|
payload: {
|
|
19690
19897
|
stage: "unsupported",
|
|
19691
19898
|
message: detection.notes ?? "No dev server applies to this project."
|
|
@@ -19701,7 +19908,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19701
19908
|
sessionId: ctx.sessionId,
|
|
19702
19909
|
pluginId: ctx.pluginId,
|
|
19703
19910
|
pluginAuthToken,
|
|
19704
|
-
type:
|
|
19911
|
+
type: USER_EVENTS.PREVIEW_DETECTION_READY,
|
|
19705
19912
|
payload: { detection }
|
|
19706
19913
|
});
|
|
19707
19914
|
})();
|
|
@@ -19818,7 +20025,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19818
20025
|
sessionId: ctx.sessionId,
|
|
19819
20026
|
pluginId: ctx.pluginId,
|
|
19820
20027
|
pluginAuthToken,
|
|
19821
|
-
type:
|
|
20028
|
+
type: USER_EVENTS.PREVIEW_PROGRESS,
|
|
19822
20029
|
payload: { step, message, timestamp: Date.now() }
|
|
19823
20030
|
});
|
|
19824
20031
|
};
|
|
@@ -19834,7 +20041,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19834
20041
|
sessionId: ctx.sessionId,
|
|
19835
20042
|
pluginId: ctx.pluginId,
|
|
19836
20043
|
pluginAuthToken,
|
|
19837
|
-
type:
|
|
20044
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
19838
20045
|
payload: { url: existing.url, framework: existing.framework, port: detection.port }
|
|
19839
20046
|
});
|
|
19840
20047
|
return;
|
|
@@ -19843,7 +20050,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19843
20050
|
sessionId: ctx.sessionId,
|
|
19844
20051
|
pluginId: ctx.pluginId,
|
|
19845
20052
|
pluginAuthToken,
|
|
19846
|
-
type:
|
|
20053
|
+
type: USER_EVENTS.PREVIEW_STARTING,
|
|
19847
20054
|
payload: { framework: detection.framework, port: detection.port }
|
|
19848
20055
|
});
|
|
19849
20056
|
emitProgress("ENV_DETECTED", `${detection.framework}`);
|
|
@@ -19870,7 +20077,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19870
20077
|
sessionId: ctx.sessionId,
|
|
19871
20078
|
pluginId: ctx.pluginId,
|
|
19872
20079
|
pluginAuthToken,
|
|
19873
|
-
type:
|
|
20080
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19874
20081
|
payload: {
|
|
19875
20082
|
stage: "spawn",
|
|
19876
20083
|
message: `This project uses yarn but yarn isn't installed, and installing it automatically failed (npm install -g yarn, exit ${ensured.code}). Install yarn in this environment and try the preview again.`
|
|
@@ -19895,7 +20102,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19895
20102
|
sessionId: ctx.sessionId,
|
|
19896
20103
|
pluginId: ctx.pluginId,
|
|
19897
20104
|
pluginAuthToken,
|
|
19898
|
-
type:
|
|
20105
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19899
20106
|
payload: {
|
|
19900
20107
|
stage: "ready_timeout",
|
|
19901
20108
|
message: `Dependency install (${missingDeps.cmd} ${missingDeps.args.join(" ")}) didn't finish within ${Math.round(INSTALL_TIMEOUT_MS / 1e3)}s and was stopped. Run it manually in this project, then try the preview again.`
|
|
@@ -19908,7 +20115,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19908
20115
|
sessionId: ctx.sessionId,
|
|
19909
20116
|
pluginId: ctx.pluginId,
|
|
19910
20117
|
pluginAuthToken,
|
|
19911
|
-
type:
|
|
20118
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19912
20119
|
payload: {
|
|
19913
20120
|
stage: "spawn",
|
|
19914
20121
|
message: `Dependency install failed (${missingDeps.cmd} ${missingDeps.args.join(" ")}, exit ${result.code}). Run it manually in this project and try again.`
|
|
@@ -19945,7 +20152,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19945
20152
|
sessionId: ctx.sessionId,
|
|
19946
20153
|
pluginId: ctx.pluginId,
|
|
19947
20154
|
pluginAuthToken,
|
|
19948
|
-
type:
|
|
20155
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19949
20156
|
payload: {
|
|
19950
20157
|
stage: "ready_timeout",
|
|
19951
20158
|
message: `Setup step (${setup.cmd} ${setup.args.join(" ")}) didn't finish within ${Math.round(timeoutMs / 1e3)}s and was stopped.`
|
|
@@ -19958,7 +20165,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19958
20165
|
sessionId: ctx.sessionId,
|
|
19959
20166
|
pluginId: ctx.pluginId,
|
|
19960
20167
|
pluginAuthToken,
|
|
19961
|
-
type:
|
|
20168
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19962
20169
|
payload: {
|
|
19963
20170
|
stage: "spawn",
|
|
19964
20171
|
message: `Setup failed (${setup.cmd} ${setup.args.join(" ")}, exit ${result.code}).`
|
|
@@ -19979,7 +20186,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19979
20186
|
sessionId: ctx.sessionId,
|
|
19980
20187
|
pluginId: ctx.pluginId,
|
|
19981
20188
|
pluginAuthToken,
|
|
19982
|
-
type:
|
|
20189
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
19983
20190
|
payload: { url: raceExisting.url, framework: raceExisting.framework, port: detection.port }
|
|
19984
20191
|
});
|
|
19985
20192
|
return;
|
|
@@ -19999,7 +20206,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19999
20206
|
sessionId: ctx.sessionId,
|
|
20000
20207
|
pluginId: ctx.pluginId,
|
|
20001
20208
|
pluginAuthToken,
|
|
20002
|
-
type:
|
|
20209
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20003
20210
|
payload: {
|
|
20004
20211
|
stage: "spawn",
|
|
20005
20212
|
message: `Port ${detection.port} is still in use after stopping the previous preview. Wait a moment and try again.`
|
|
@@ -20012,7 +20219,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20012
20219
|
sessionId: ctx.sessionId,
|
|
20013
20220
|
pluginId: ctx.pluginId,
|
|
20014
20221
|
pluginAuthToken,
|
|
20015
|
-
type:
|
|
20222
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20016
20223
|
payload: {
|
|
20017
20224
|
stage: "spawn",
|
|
20018
20225
|
message: `Port ${detection.port} is already in use by another process, so the dev server can't start there. Stop whatever is listening on port ${detection.port} and try the preview again.`
|
|
@@ -20060,7 +20267,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20060
20267
|
sessionId: ctx.sessionId,
|
|
20061
20268
|
pluginId: ctx.pluginId,
|
|
20062
20269
|
pluginAuthToken,
|
|
20063
|
-
type:
|
|
20270
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20064
20271
|
payload: {
|
|
20065
20272
|
stage: "spawn",
|
|
20066
20273
|
message: `The dev server exited (code ${outcome.code}) before it was ready. It may need a database or other services.`,
|
|
@@ -20075,7 +20282,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20075
20282
|
sessionId: ctx.sessionId,
|
|
20076
20283
|
pluginId: ctx.pluginId,
|
|
20077
20284
|
pluginAuthToken,
|
|
20078
|
-
type:
|
|
20285
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20079
20286
|
payload: {
|
|
20080
20287
|
stage: "ready_timeout",
|
|
20081
20288
|
message: "The dev server didn't become ready in time. It may be stuck waiting on a database or other service.",
|
|
@@ -20104,7 +20311,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20104
20311
|
sessionId: ctx.sessionId,
|
|
20105
20312
|
pluginId: ctx.pluginId,
|
|
20106
20313
|
pluginAuthToken,
|
|
20107
|
-
type:
|
|
20314
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20108
20315
|
payload: { stage: "tunnel", message: "Expo did not report a tunnel URL." }
|
|
20109
20316
|
});
|
|
20110
20317
|
return;
|
|
@@ -20120,7 +20327,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20120
20327
|
sessionId: ctx.sessionId,
|
|
20121
20328
|
pluginId: ctx.pluginId,
|
|
20122
20329
|
pluginAuthToken,
|
|
20123
|
-
type:
|
|
20330
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20124
20331
|
payload: { stage: "tunnel", message: e.message }
|
|
20125
20332
|
});
|
|
20126
20333
|
return;
|
|
@@ -20214,7 +20421,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20214
20421
|
sessionId: ctx.sessionId,
|
|
20215
20422
|
pluginId: ctx.pluginId,
|
|
20216
20423
|
pluginAuthToken,
|
|
20217
|
-
type:
|
|
20424
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20218
20425
|
payload: {
|
|
20219
20426
|
stage: "tunnel",
|
|
20220
20427
|
message: `Tunnel did not become reachable after ${MAX_TUNNEL_ATTEMPTS} attempts (${lastTunnelErr}). Cloudflare Quick Tunnels occasionally fail to register \u2014 please retry.`
|
|
@@ -20238,7 +20445,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20238
20445
|
sessionId: ctx.sessionId,
|
|
20239
20446
|
pluginId: ctx.pluginId,
|
|
20240
20447
|
pluginAuthToken,
|
|
20241
|
-
type:
|
|
20448
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
20242
20449
|
payload: { url, framework: detection.framework, port: detection.port }
|
|
20243
20450
|
});
|
|
20244
20451
|
})().catch((err) => {
|
|
@@ -20248,7 +20455,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20248
20455
|
sessionId: ctx.sessionId,
|
|
20249
20456
|
pluginId: ctx.pluginId,
|
|
20250
20457
|
pluginAuthToken,
|
|
20251
|
-
type:
|
|
20458
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20252
20459
|
payload: { stage: "spawn", message: `Preview failed to start: ${message}` }
|
|
20253
20460
|
});
|
|
20254
20461
|
});
|
|
@@ -20266,7 +20473,7 @@ var previewStopH = (ctx) => {
|
|
|
20266
20473
|
sessionId: ctx.sessionId,
|
|
20267
20474
|
pluginId: ctx.pluginId,
|
|
20268
20475
|
pluginAuthToken,
|
|
20269
|
-
type:
|
|
20476
|
+
type: USER_EVENTS.PREVIEW_STOPPED,
|
|
20270
20477
|
payload: { reason: "user" }
|
|
20271
20478
|
});
|
|
20272
20479
|
})();
|
|
@@ -21255,7 +21462,7 @@ function resolveClaudeNativeBinary(deps = {}) {
|
|
|
21255
21462
|
const sdkDir = deps.sdkDir !== void 0 ? deps.sdkDir : defaultSdkDir();
|
|
21256
21463
|
if (!sdkDir) return null;
|
|
21257
21464
|
const scopeDir = import_path8.default.dirname(sdkDir);
|
|
21258
|
-
const binName =
|
|
21465
|
+
const binName = platformKey.startsWith("win32-") ? "claude.exe" : "claude";
|
|
21259
21466
|
const candidate = import_path8.default.join(scopeDir, `claude-agent-sdk-${platformKey}`, binName);
|
|
21260
21467
|
return existsSync21(candidate) ? candidate : null;
|
|
21261
21468
|
}
|
|
@@ -31719,7 +31926,7 @@ function checkChokidar() {
|
|
|
31719
31926
|
}
|
|
31720
31927
|
async function doctor(args2 = []) {
|
|
31721
31928
|
const json = args2.includes("--json");
|
|
31722
|
-
const cliVersion = true ? "2.
|
|
31929
|
+
const cliVersion = true ? "2.54.0" : "0.0.0-dev";
|
|
31723
31930
|
const apiBase2 = resolveApiBaseUrl();
|
|
31724
31931
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
31725
31932
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -31918,7 +32125,7 @@ async function completion(args2) {
|
|
|
31918
32125
|
// src/commands/version.ts
|
|
31919
32126
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
31920
32127
|
function version2() {
|
|
31921
|
-
const v = true ? "2.
|
|
32128
|
+
const v = true ? "2.54.0" : "unknown";
|
|
31922
32129
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
31923
32130
|
}
|
|
31924
32131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.0",
|
|
4
4
|
"description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@beads/bd": "1.0.5"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@
|
|
91
|
+
"@codeam/shared": "*",
|
|
92
92
|
"@types/node": "^22.0.0",
|
|
93
93
|
"@types/qrcode-terminal": "^0.12.0",
|
|
94
94
|
"@types/which": "^3.0.4",
|