codeam-cli 2.53.3 → 2.53.4
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 +6 -0
- package/dist/index.js +223 -126
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.3] — 2026-07-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Phase 0 hygiene — 8 verified bugs across cli/shared/vsc/jetbrains
|
|
12
|
+
|
|
7
13
|
## [2.53.2] — 2026-07-06
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -199,6 +199,20 @@ function renderToLines(raw) {
|
|
|
199
199
|
return screen;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
// ../../packages/shared/src/protocol/remote-command.ts
|
|
203
|
+
var import_zod = require("zod");
|
|
204
|
+
var remoteCommandSchema = import_zod.z.object({
|
|
205
|
+
id: import_zod.z.string(),
|
|
206
|
+
sessionId: import_zod.z.string(),
|
|
207
|
+
pluginId: import_zod.z.string(),
|
|
208
|
+
type: import_zod.z.string(),
|
|
209
|
+
// The backend may omit `payload` (or send null) for payload-less commands;
|
|
210
|
+
// clients have always normalized that to `{}` — keep that behavior here.
|
|
211
|
+
payload: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).nullish(),
|
|
212
|
+
status: import_zod.z.string(),
|
|
213
|
+
createdAt: import_zod.z.number()
|
|
214
|
+
});
|
|
215
|
+
|
|
202
216
|
// ../../packages/shared/src/models/pricing.ts
|
|
203
217
|
var MODEL_PRICING = {
|
|
204
218
|
// ── Anthropic / Claude ────────────────────────────────────
|
|
@@ -276,8 +290,12 @@ var AGENT_REGISTRY = {
|
|
|
276
290
|
displayName: "Claude Code",
|
|
277
291
|
binaryName: "claude",
|
|
278
292
|
enabled: true,
|
|
279
|
-
|
|
280
|
-
|
|
293
|
+
// Mirrors the backend registry (codeagent-mobile
|
|
294
|
+
// apps/api-v2/src/codespaces/agent.ts — authoritative for auth
|
|
295
|
+
// capabilities). `setup_token` is the bare `sk-ant-oat01-…` from
|
|
296
|
+
// `claude setup-token` → delivered via CLAUDE_CODE_OAUTH_TOKEN.
|
|
297
|
+
supportedAuthKinds: ["setup_token", "oauth_token", "api_key"],
|
|
298
|
+
preferredAuthKind: "setup_token"
|
|
281
299
|
},
|
|
282
300
|
codex: {
|
|
283
301
|
id: "codex",
|
|
@@ -300,15 +318,22 @@ var AGENT_REGISTRY = {
|
|
|
300
318
|
displayName: "CodeRabbit",
|
|
301
319
|
binaryName: "coderabbit",
|
|
302
320
|
enabled: true,
|
|
303
|
-
|
|
304
|
-
|
|
321
|
+
// Backend registry is authoritative: CodeRabbit links via a real
|
|
322
|
+
// API key only (no OAuth flow exists in api-v2).
|
|
323
|
+
supportedAuthKinds: ["api_key"],
|
|
324
|
+
preferredAuthKind: "api_key"
|
|
305
325
|
},
|
|
306
326
|
cursor: {
|
|
307
327
|
id: "cursor",
|
|
308
328
|
displayName: "Cursor Agent",
|
|
309
329
|
binaryName: "cursor-agent",
|
|
310
330
|
enabled: true,
|
|
311
|
-
|
|
331
|
+
// Backend registry is authoritative: since the Cursor OAuth
|
|
332
|
+
// device-flow shipped, new links are oauth_token only (the login
|
|
333
|
+
// blob written to ~/.config/cursor/auth.json). Legacy vaulted
|
|
334
|
+
// api_key rows may still exist server-side, but the link surface
|
|
335
|
+
// no longer offers api_key.
|
|
336
|
+
supportedAuthKinds: ["oauth_token"],
|
|
312
337
|
preferredAuthKind: "oauth_token"
|
|
313
338
|
},
|
|
314
339
|
aider: {
|
|
@@ -344,7 +369,7 @@ function getAgent(id) {
|
|
|
344
369
|
return meta;
|
|
345
370
|
}
|
|
346
371
|
function isKnownAgentId(id) {
|
|
347
|
-
return id
|
|
372
|
+
return id in AGENT_REGISTRY;
|
|
348
373
|
}
|
|
349
374
|
|
|
350
375
|
// ../../packages/shared/src/api-url.ts
|
|
@@ -359,6 +384,74 @@ function resolveApiBaseUrl() {
|
|
|
359
384
|
return DEFAULT_API_BASE_URL;
|
|
360
385
|
}
|
|
361
386
|
|
|
387
|
+
// ../../packages/shared/src/types/events.ts
|
|
388
|
+
var USER_EVENTS = {
|
|
389
|
+
PAIRED_SESSION_STATUS: "paired_session_status",
|
|
390
|
+
PAIRED_SESSION_ADDED: "paired_session_added",
|
|
391
|
+
PAIRED_SESSION_REMOVED: "paired_session_removed",
|
|
392
|
+
PAIRED_SESSION_BRANCH_CHANGED: "paired_session_branch_changed",
|
|
393
|
+
SHARED_WITH_ME_ADDED: "shared_with_me_added",
|
|
394
|
+
SHARED_WITH_ME_REVOKED: "shared_with_me_revoked",
|
|
395
|
+
USAGE_CHANGED: "usage_changed",
|
|
396
|
+
TASK_DONE: "task_done",
|
|
397
|
+
HUNK_PENDING_REVIEW_ADDED: "hunk_pending_review_added",
|
|
398
|
+
HUNK_REVIEW_RESOLVED: "hunk_review_resolved",
|
|
399
|
+
FILE_CHANGED: "file_changed",
|
|
400
|
+
FILES_BATCH_CHANGED: "files_batch_changed",
|
|
401
|
+
AGENT_STREAMING_CHUNK: "agent_streaming_chunk",
|
|
402
|
+
AGENT_AWAITING_ANSWER: "agent_awaiting_answer",
|
|
403
|
+
AWAITING_INPUT_ADDED: "awaiting_input_added",
|
|
404
|
+
AGENT_ANSWER_RESOLVED: "agent_answer_resolved",
|
|
405
|
+
TEMPLATE_ADDED: "template_added",
|
|
406
|
+
TEMPLATE_REMOVED: "template_removed",
|
|
407
|
+
TEMPLATE_UPDATED: "template_updated",
|
|
408
|
+
AGENT_TASK_DISPATCHED: "agent_task_dispatched",
|
|
409
|
+
AGENT_TASK_COMPLETED: "agent_task_completed",
|
|
410
|
+
LINKED_AGENT_ADDED: "linked_agent_added",
|
|
411
|
+
QUOTA_REACHED: "quota_reached",
|
|
412
|
+
LINKED_AGENT_LINK_FAILED: "linked_agent_link_failed",
|
|
413
|
+
CODESPACE_AGENT_INSTALLED: "codespace_agent_installed",
|
|
414
|
+
AGENT_CREDENTIALS_REFRESHED: "agent_credentials_refreshed",
|
|
415
|
+
CREDENTIAL_INVALID: "credential_invalid",
|
|
416
|
+
CODESPACE_WAKING: "codespace_waking",
|
|
417
|
+
CODESPACE_BILLING_BLOCKED: "codespace_billing_blocked",
|
|
418
|
+
COST_SAVING_UPDATED: "cost_saving_updated",
|
|
419
|
+
COMMAND_COMPLETED: "command_completed",
|
|
420
|
+
AI_SUMMARY_PENDING: "ai_summary_pending",
|
|
421
|
+
AI_SUMMARY_READY: "ai_summary_ready",
|
|
422
|
+
AI_INSIGHT_PENDING: "ai_insight_pending",
|
|
423
|
+
AI_INSIGHT_READY: "ai_insight_ready",
|
|
424
|
+
PUSH_TOKEN_INVALIDATED: "push_token_invalidated",
|
|
425
|
+
PREVIEW_DETECTION_PENDING: "preview_detection_pending",
|
|
426
|
+
PREVIEW_DETECTION_READY: "preview_detection_ready",
|
|
427
|
+
PREVIEW_STARTING: "preview_starting",
|
|
428
|
+
PREVIEW_READY: "preview_ready",
|
|
429
|
+
PREVIEW_STOPPED: "preview_stopped",
|
|
430
|
+
PREVIEW_ERROR: "preview_error",
|
|
431
|
+
PREVIEW_PROGRESS: "preview_progress",
|
|
432
|
+
BEADS_STATE_CHANGED: "beads_state_changed",
|
|
433
|
+
BEADS_PROVISIONING: "beads_provisioning",
|
|
434
|
+
BEADS_TEAM_MEMORY_CHANGED: "beads_team_memory_changed",
|
|
435
|
+
AUDIT_EVENT_ADDED: "audit_event_added",
|
|
436
|
+
SELF_HOSTED_HOST_ADDED: "self_hosted_host_added",
|
|
437
|
+
SELF_HOSTED_HOST_STATUS: "self_hosted_host_status",
|
|
438
|
+
SELF_HOSTED_HOST_REMOVED: "self_hosted_host_removed",
|
|
439
|
+
SELF_HOSTED_HOST_TELEMETRY: "self_hosted_host_telemetry",
|
|
440
|
+
SELF_HOSTED_HOST_METRICS: "self_hosted_host_metrics",
|
|
441
|
+
SELF_HOSTED_HOST_SESSIONS: "self_hosted_host_sessions",
|
|
442
|
+
SELF_HOSTED_DEPLOY_PROGRESS: "self_hosted_deploy_progress",
|
|
443
|
+
REFERRAL_REWARD_EARNED: "referral_reward_earned",
|
|
444
|
+
HEADROOM_PROGRESS: "headroom_progress",
|
|
445
|
+
HEADROOM_STATUS: "headroom_status",
|
|
446
|
+
BEADS_STATUS: "beads_status",
|
|
447
|
+
LINKED_AGENT_HEADROOM_BUDGET_UPDATED: "linked_agent_headroom_budget_updated",
|
|
448
|
+
CLI_UPDATE_AVAILABLE: "cli_update_available",
|
|
449
|
+
AGENT_INSTALL_PROGRESS: "agent_install_progress",
|
|
450
|
+
AGENT_INSTALL_FAILED: "agent_install_failed",
|
|
451
|
+
CLI_UPDATE_PROGRESS: "cli_update_progress",
|
|
452
|
+
CLI_UPDATE_FAILED: "cli_update_failed"
|
|
453
|
+
};
|
|
454
|
+
|
|
362
455
|
// ../../packages/shared/src/preview-prompts.ts
|
|
363
456
|
var PREVIEW_DETECT_PROMPT = `
|
|
364
457
|
Analyze the project in the current working directory and return how to start
|
|
@@ -5418,7 +5511,7 @@ function readAnonId() {
|
|
|
5418
5511
|
}
|
|
5419
5512
|
function superProperties() {
|
|
5420
5513
|
return {
|
|
5421
|
-
cliVersion: true ? "2.53.
|
|
5514
|
+
cliVersion: true ? "2.53.4" : "0.0.0-dev",
|
|
5422
5515
|
nodeVersion: process.version,
|
|
5423
5516
|
platform: process.platform,
|
|
5424
5517
|
arch: process.arch,
|
|
@@ -5599,7 +5692,7 @@ var os4 = __toESM(require("os"));
|
|
|
5599
5692
|
// package.json
|
|
5600
5693
|
var package_default = {
|
|
5601
5694
|
name: "codeam-cli",
|
|
5602
|
-
version: "2.53.
|
|
5695
|
+
version: "2.53.4",
|
|
5603
5696
|
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
5697
|
type: "commonjs",
|
|
5605
5698
|
main: "dist/index.js",
|
|
@@ -6633,7 +6726,7 @@ var CommandRelayService = class {
|
|
|
6633
6726
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
6634
6727
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
6635
6728
|
// pair/reconnect). Older backends ignore the extra field.
|
|
6636
|
-
..."2.53.
|
|
6729
|
+
..."2.53.4" ? { ideVersion: "2.53.4" } : {}
|
|
6637
6730
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
6638
6731
|
}
|
|
6639
6732
|
/**
|
|
@@ -8015,68 +8108,68 @@ var import_child_process22 = require("child_process");
|
|
|
8015
8108
|
var import_which2 = __toESM(require("which"));
|
|
8016
8109
|
|
|
8017
8110
|
// src/lib/payload.ts
|
|
8018
|
-
var
|
|
8019
|
-
var fileEntrySchema =
|
|
8020
|
-
filename:
|
|
8021
|
-
mimeType:
|
|
8022
|
-
base64:
|
|
8111
|
+
var import_zod2 = require("zod");
|
|
8112
|
+
var fileEntrySchema = import_zod2.z.object({
|
|
8113
|
+
filename: import_zod2.z.string().min(1).max(256),
|
|
8114
|
+
mimeType: import_zod2.z.string(),
|
|
8115
|
+
base64: import_zod2.z.string()
|
|
8023
8116
|
});
|
|
8024
|
-
var startCommandSchema =
|
|
8025
|
-
prompt:
|
|
8026
|
-
files:
|
|
8027
|
-
input:
|
|
8028
|
-
index:
|
|
8029
|
-
from:
|
|
8030
|
-
id:
|
|
8031
|
-
auto:
|
|
8117
|
+
var startCommandSchema = import_zod2.z.object({
|
|
8118
|
+
prompt: import_zod2.z.string().optional(),
|
|
8119
|
+
files: import_zod2.z.array(fileEntrySchema).optional(),
|
|
8120
|
+
input: import_zod2.z.string().optional(),
|
|
8121
|
+
index: import_zod2.z.number().optional(),
|
|
8122
|
+
from: import_zod2.z.number().optional(),
|
|
8123
|
+
id: import_zod2.z.string().optional(),
|
|
8124
|
+
auto: import_zod2.z.boolean().optional(),
|
|
8032
8125
|
// `read_file` / `write_file` for the mobile + landing mini-IDE modal.
|
|
8033
8126
|
// `path` is bounded to 4096 chars (a comfortable POSIX path max) so a
|
|
8034
8127
|
// malformed payload can't blow up the disk-side validator.
|
|
8035
|
-
path:
|
|
8036
|
-
content:
|
|
8128
|
+
path: import_zod2.z.string().min(1).max(4096).optional(),
|
|
8129
|
+
content: import_zod2.z.string().optional(),
|
|
8037
8130
|
// Mini-IDE / project ops. `paths` (plural, strings) is used for
|
|
8038
8131
|
// git_commit's optional file selection — distinct from `files`
|
|
8039
8132
|
// (FileEntry[]) used by `start_task` for attachments.
|
|
8040
|
-
query:
|
|
8041
|
-
message:
|
|
8042
|
-
paths:
|
|
8133
|
+
query: import_zod2.z.string().max(256).optional(),
|
|
8134
|
+
message: import_zod2.z.string().max(8e3).optional(),
|
|
8135
|
+
paths: import_zod2.z.array(import_zod2.z.string().max(4096)).optional(),
|
|
8043
8136
|
// `show_install_command` — backend pushes the self-hosted install
|
|
8044
8137
|
// one-liner the user copies onto their own box. DISPLAY-ONLY: the
|
|
8045
8138
|
// CLI prints it to the terminal and never executes it. Bounded to
|
|
8046
8139
|
// 8192 chars so a malformed payload can't flood the terminal.
|
|
8047
|
-
command:
|
|
8048
|
-
side:
|
|
8049
|
-
limit:
|
|
8140
|
+
command: import_zod2.z.string().min(1).max(8192).optional(),
|
|
8141
|
+
side: import_zod2.z.enum(["ours", "theirs"]).optional(),
|
|
8142
|
+
limit: import_zod2.z.number().int().min(1).max(500).optional(),
|
|
8050
8143
|
// search_files options. `query` is the haystack/needle string,
|
|
8051
8144
|
// declared above for list_files. The rest mirror VS Code's
|
|
8052
8145
|
// search panel toggles + the @codeam/ide-core SearchOptions
|
|
8053
8146
|
// contract.
|
|
8054
|
-
caseSensitive:
|
|
8055
|
-
wholeWord:
|
|
8056
|
-
regex:
|
|
8057
|
-
include:
|
|
8058
|
-
exclude:
|
|
8059
|
-
maxResults:
|
|
8147
|
+
caseSensitive: import_zod2.z.boolean().optional(),
|
|
8148
|
+
wholeWord: import_zod2.z.boolean().optional(),
|
|
8149
|
+
regex: import_zod2.z.boolean().optional(),
|
|
8150
|
+
include: import_zod2.z.array(import_zod2.z.string().max(512)).max(64).optional(),
|
|
8151
|
+
exclude: import_zod2.z.array(import_zod2.z.string().max(512)).max(64).optional(),
|
|
8152
|
+
maxResults: import_zod2.z.number().int().min(1).max(500).optional(),
|
|
8060
8153
|
// terminal_open / _write / _resize / _close. `sessionId` is the
|
|
8061
8154
|
// opaque uuid returned by `terminal_open` and required by every
|
|
8062
8155
|
// subsequent op. `data` carries keystrokes (any UTF-8 string).
|
|
8063
8156
|
// `cwd` lets the host pin the spawn directory.
|
|
8064
|
-
sessionId:
|
|
8065
|
-
data:
|
|
8066
|
-
cwd:
|
|
8067
|
-
cols:
|
|
8068
|
-
rows:
|
|
8157
|
+
sessionId: import_zod2.z.string().min(1).max(128).optional(),
|
|
8158
|
+
data: import_zod2.z.string().max(64 * 1024).optional(),
|
|
8159
|
+
cwd: import_zod2.z.string().max(4096).optional(),
|
|
8160
|
+
cols: import_zod2.z.number().int().min(1).max(500).optional(),
|
|
8161
|
+
rows: import_zod2.z.number().int().min(1).max(200).optional(),
|
|
8069
8162
|
// `apply_file_review` (Epic B follow-up — backend pushes this when
|
|
8070
8163
|
// the user clicks APPROVE_CHANGES / REJECT_CHANGES in the diff
|
|
8071
8164
|
// drawer). `filePath` is relative to the enclosing git repo; the
|
|
8072
8165
|
// handler walks up from it to find `.git/` and runs `git add` or
|
|
8073
8166
|
// `git restore` from there. `action='approved'` stages the edit,
|
|
8074
8167
|
// `action='rejected'` discards every worktree change on the file.
|
|
8075
|
-
filePath:
|
|
8076
|
-
action:
|
|
8168
|
+
filePath: import_zod2.z.string().min(1).max(4096).optional(),
|
|
8169
|
+
action: import_zod2.z.enum(["approved", "rejected", "enable", "disable", "status"]).optional(),
|
|
8077
8170
|
// `headroom_configure` — savings ingest URL delivered from the session
|
|
8078
8171
|
// when enabling Headroom on-demand. Bounded to 2048 chars.
|
|
8079
|
-
savingsIngestUrl:
|
|
8172
|
+
savingsIngestUrl: import_zod2.z.string().url().max(2048).optional(),
|
|
8080
8173
|
// `request_link_credentials` — backend fires this from the
|
|
8081
8174
|
// heartbeat handler when it notices the user is running an agent
|
|
8082
8175
|
// they haven't vaulted yet. Also reused by `get_context` /
|
|
@@ -8092,7 +8185,7 @@ var startCommandSchema = import_zod.z.object({
|
|
|
8092
8185
|
// Without nullable() zod rejects the whole payload, the dispatcher
|
|
8093
8186
|
// logs "Ignoring malformed list_models payload" and the model
|
|
8094
8187
|
// picker / context never load.
|
|
8095
|
-
agentId:
|
|
8188
|
+
agentId: import_zod2.z.string().max(64).nullable().optional(),
|
|
8096
8189
|
// `request_ai_summary` / `request_ai_insight` — backend fires
|
|
8097
8190
|
// these on turn-end (+ file selection) when LinkedAgent.
|
|
8098
8191
|
// aiInsightsEnabled is true. The CLI spawns the agent in
|
|
@@ -8106,12 +8199,12 @@ var startCommandSchema = import_zod.z.object({
|
|
|
8106
8199
|
// unchanged on the result POST so the backend doesn't have to
|
|
8107
8200
|
// recompute (numbers came from file_changes; the agent only
|
|
8108
8201
|
// writes the narrative).
|
|
8109
|
-
turnId:
|
|
8110
|
-
fileChangeId:
|
|
8111
|
-
stats:
|
|
8112
|
-
added:
|
|
8113
|
-
removed:
|
|
8114
|
-
complexityShift:
|
|
8202
|
+
turnId: import_zod2.z.string().max(128).optional(),
|
|
8203
|
+
fileChangeId: import_zod2.z.string().max(128).optional(),
|
|
8204
|
+
stats: import_zod2.z.object({
|
|
8205
|
+
added: import_zod2.z.number().int(),
|
|
8206
|
+
removed: import_zod2.z.number().int(),
|
|
8207
|
+
complexityShift: import_zod2.z.number().int()
|
|
8115
8208
|
}).optional(),
|
|
8116
8209
|
// `preview_start` carries the agent-detected `PreviewDetection`
|
|
8117
8210
|
// shape from the mobile / web confirmation sheet. Mirrors
|
|
@@ -8120,23 +8213,23 @@ var startCommandSchema = import_zod.z.object({
|
|
|
8120
8213
|
// running against a newer backend that adds optional fields still
|
|
8121
8214
|
// accepts the payload; the handler validates the shape it needs
|
|
8122
8215
|
// before spawning.
|
|
8123
|
-
detection:
|
|
8124
|
-
framework:
|
|
8125
|
-
command:
|
|
8126
|
-
args:
|
|
8127
|
-
port:
|
|
8128
|
-
ready_pattern:
|
|
8129
|
-
env:
|
|
8216
|
+
detection: import_zod2.z.object({
|
|
8217
|
+
framework: import_zod2.z.string().max(64),
|
|
8218
|
+
command: import_zod2.z.string().min(1).max(256),
|
|
8219
|
+
args: import_zod2.z.array(import_zod2.z.string().max(1024)).max(64),
|
|
8220
|
+
port: import_zod2.z.number().int().min(1).max(65535),
|
|
8221
|
+
ready_pattern: import_zod2.z.string().min(1).max(4096),
|
|
8222
|
+
env: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string().max(8192)).optional(),
|
|
8130
8223
|
// The agent emits entries as either {cmd,args} objects OR bare command
|
|
8131
8224
|
// strings ("npx prisma generate"). Accept both and normalize strings to
|
|
8132
8225
|
// {cmd,args} so a string entry doesn't reject the whole detection (which
|
|
8133
8226
|
// would silently drop the preview) and downstream always gets objects.
|
|
8134
|
-
setup_commands:
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
cmd:
|
|
8139
|
-
args:
|
|
8227
|
+
setup_commands: import_zod2.z.array(
|
|
8228
|
+
import_zod2.z.union([
|
|
8229
|
+
import_zod2.z.string().min(1).max(1024),
|
|
8230
|
+
import_zod2.z.object({
|
|
8231
|
+
cmd: import_zod2.z.string().min(1).max(256),
|
|
8232
|
+
args: import_zod2.z.array(import_zod2.z.string().max(1024)).max(64)
|
|
8140
8233
|
})
|
|
8141
8234
|
]).transform((entry) => {
|
|
8142
8235
|
if (typeof entry !== "string") return entry;
|
|
@@ -8144,15 +8237,15 @@ var startCommandSchema = import_zod.z.object({
|
|
|
8144
8237
|
return { cmd: parts[0] ?? "", args: parts.slice(1) };
|
|
8145
8238
|
})
|
|
8146
8239
|
).max(32).optional(),
|
|
8147
|
-
notes:
|
|
8240
|
+
notes: import_zod2.z.string().max(4096).nullable().optional()
|
|
8148
8241
|
}).optional(),
|
|
8149
8242
|
// `env_write` carries the full desired set of environment variables
|
|
8150
8243
|
// for the project `.env`. Bounded so a malformed payload can't flood
|
|
8151
8244
|
// the disk-side serializer. `env_read` / `preview_restart` send no payload.
|
|
8152
|
-
vars:
|
|
8153
|
-
|
|
8154
|
-
key:
|
|
8155
|
-
value:
|
|
8245
|
+
vars: import_zod2.z.array(
|
|
8246
|
+
import_zod2.z.object({
|
|
8247
|
+
key: import_zod2.z.string().min(1).max(256),
|
|
8248
|
+
value: import_zod2.z.string().max(32768)
|
|
8156
8249
|
})
|
|
8157
8250
|
).max(512).optional()
|
|
8158
8251
|
});
|
|
@@ -8817,7 +8910,7 @@ __export(dist_exports, {
|
|
|
8817
8910
|
S_ERROR: () => ge,
|
|
8818
8911
|
S_INFO: () => he,
|
|
8819
8912
|
S_PASSWORD_MASK: () => xe,
|
|
8820
|
-
S_RADIO_ACTIVE: () =>
|
|
8913
|
+
S_RADIO_ACTIVE: () => z4,
|
|
8821
8914
|
S_RADIO_INACTIVE: () => H2,
|
|
8822
8915
|
S_STEP_ACTIVE: () => _e,
|
|
8823
8916
|
S_STEP_CANCEL: () => oe,
|
|
@@ -9296,7 +9389,7 @@ function w(r, t2) {
|
|
|
9296
9389
|
const e = r;
|
|
9297
9390
|
e.isTTY && e.setRawMode(t2);
|
|
9298
9391
|
}
|
|
9299
|
-
function
|
|
9392
|
+
function z3({ input: r = import_node_process.stdin, output: t2 = import_node_process.stdout, overwrite: e = true, hideCursor: s = true } = {}) {
|
|
9300
9393
|
const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
|
|
9301
9394
|
_.emitKeypressEvents(r, i), r instanceof import_node_tty.ReadStream && r.isTTY && r.setRawMode(true);
|
|
9302
9395
|
const n = (o, { name: a, sequence: h }) => {
|
|
@@ -9908,7 +10001,7 @@ var d2 = w2("\u2502", "|");
|
|
|
9908
10001
|
var E2 = w2("\u2514", "\u2014");
|
|
9909
10002
|
var Ie = w2("\u2510", "T");
|
|
9910
10003
|
var Ee = w2("\u2518", "\u2014");
|
|
9911
|
-
var
|
|
10004
|
+
var z4 = w2("\u25CF", ">");
|
|
9912
10005
|
var H2 = w2("\u25CB", " ");
|
|
9913
10006
|
var te = w2("\u25FB", "[\u2022]");
|
|
9914
10007
|
var U = w2("\u25FC", "[+]");
|
|
@@ -10000,7 +10093,7 @@ var Ae = (e) => new H({ options: e.options, initialValue: e.initialValue ? [e.in
|
|
|
10000
10093
|
const $2 = Me(a), y2 = a.hint && a.value === this.focusedValue ? (0, import_node_util2.styleText)("dim", ` (${a.hint})`) : "";
|
|
10001
10094
|
switch (l) {
|
|
10002
10095
|
case "active":
|
|
10003
|
-
return `${(0, import_node_util2.styleText)("green",
|
|
10096
|
+
return `${(0, import_node_util2.styleText)("green", z4)} ${$2}${y2}`;
|
|
10004
10097
|
case "inactive":
|
|
10005
10098
|
return `${(0, import_node_util2.styleText)("dim", H2)} ${(0, import_node_util2.styleText)("dim", $2)}`;
|
|
10006
10099
|
case "disabled":
|
|
@@ -10113,9 +10206,9 @@ ${(0, import_node_util2.styleText)("gray", d2)}` : ""}`;
|
|
|
10113
10206
|
}
|
|
10114
10207
|
default: {
|
|
10115
10208
|
const l = r ? `${(0, import_node_util2.styleText)("cyan", d2)} ` : "", $2 = r ? (0, import_node_util2.styleText)("cyan", E2) : "";
|
|
10116
|
-
return `${c2}${l}${this.value ? `${(0, import_node_util2.styleText)("green",
|
|
10209
|
+
return `${c2}${l}${this.value ? `${(0, import_node_util2.styleText)("green", z4)} ${i}` : `${(0, import_node_util2.styleText)("dim", H2)} ${(0, import_node_util2.styleText)("dim", i)}`}${e.vertical ? r ? `
|
|
10117
10210
|
${(0, import_node_util2.styleText)("cyan", d2)} ` : `
|
|
10118
|
-
` : ` ${(0, import_node_util2.styleText)("dim", "/")} `}${this.value ? `${(0, import_node_util2.styleText)("dim", H2)} ${(0, import_node_util2.styleText)("dim", s)}` : `${(0, import_node_util2.styleText)("green",
|
|
10211
|
+
` : ` ${(0, import_node_util2.styleText)("dim", "/")} `}${this.value ? `${(0, import_node_util2.styleText)("dim", H2)} ${(0, import_node_util2.styleText)("dim", s)}` : `${(0, import_node_util2.styleText)("green", z4)} ${s}`}
|
|
10119
10212
|
${$2}
|
|
10120
10213
|
`;
|
|
10121
10214
|
}
|
|
@@ -10446,7 +10539,7 @@ var fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, canc
|
|
|
10446
10539
|
const A2 = (performance.now() - _2) / 1e3, k2 = Math.floor(A2 / 60), L2 = Math.floor(A2 % 60);
|
|
10447
10540
|
return k2 > 0 ? `[${k2}m ${L2}s]` : `[${L2}s]`;
|
|
10448
10541
|
}, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
|
|
10449
|
-
p2 = true, $2 =
|
|
10542
|
+
p2 = true, $2 = z3({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${(0, import_node_util2.styleText)("gray", d2)}
|
|
10450
10543
|
`);
|
|
10451
10544
|
let A2 = 0, k2 = 0;
|
|
10452
10545
|
x(), y2 = setInterval(() => {
|
|
@@ -10517,7 +10610,7 @@ var _t = (e) => {
|
|
|
10517
10610
|
case "selected":
|
|
10518
10611
|
return `${re(u2, (n) => (0, import_node_util2.styleText)("dim", n))}`;
|
|
10519
10612
|
case "active":
|
|
10520
|
-
return `${(0, import_node_util2.styleText)("green",
|
|
10613
|
+
return `${(0, import_node_util2.styleText)("green", z4)} ${u2}${s.hint ? ` ${(0, import_node_util2.styleText)("dim", `(${s.hint})`)}` : ""}`;
|
|
10521
10614
|
case "cancelled":
|
|
10522
10615
|
return `${re(u2, (n) => (0, import_node_util2.styleText)(["strikethrough", "dim"], n))}`;
|
|
10523
10616
|
default:
|
|
@@ -15133,7 +15226,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
15133
15226
|
if (process.env.NODE_ENV === "test") return;
|
|
15134
15227
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
15135
15228
|
if (process.env.CI) return;
|
|
15136
|
-
const current = true ? "2.53.
|
|
15229
|
+
const current = true ? "2.53.4" : null;
|
|
15137
15230
|
if (!current) return;
|
|
15138
15231
|
const cache = readCache();
|
|
15139
15232
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15150,7 +15243,7 @@ function checkForUpdates() {
|
|
|
15150
15243
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
15151
15244
|
if (process.env.CI) return;
|
|
15152
15245
|
if (!process.stdout.isTTY) return;
|
|
15153
|
-
const current = true ? "2.53.
|
|
15246
|
+
const current = true ? "2.53.4" : null;
|
|
15154
15247
|
if (!current) return;
|
|
15155
15248
|
const cache = readCache();
|
|
15156
15249
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15861,7 +15954,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process16.s
|
|
|
15861
15954
|
detached: false
|
|
15862
15955
|
});
|
|
15863
15956
|
function currentCliVersion() {
|
|
15864
|
-
return true ? "2.53.
|
|
15957
|
+
return true ? "2.53.4" : null;
|
|
15865
15958
|
}
|
|
15866
15959
|
function runCmd(cmd, args2, timeoutMs) {
|
|
15867
15960
|
return new Promise((resolve7) => {
|
|
@@ -16574,10 +16667,10 @@ async function configureHeadroom(action, ctx, deps) {
|
|
|
16574
16667
|
if (!isHeadroomSupportedAgent(ctx.agent)) return { supported: false };
|
|
16575
16668
|
const ok = await deps.setup(ctx.agent, void 0, {
|
|
16576
16669
|
extras: ["proxy", "code", "image"],
|
|
16577
|
-
onProgress: (step) => deps.emit({ type:
|
|
16670
|
+
onProgress: (step) => deps.emit({ type: USER_EVENTS.HEADROOM_PROGRESS, step })
|
|
16578
16671
|
});
|
|
16579
16672
|
if (!ok) {
|
|
16580
|
-
deps.emit({ type:
|
|
16673
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "error" });
|
|
16581
16674
|
return { enabled: false };
|
|
16582
16675
|
}
|
|
16583
16676
|
deps.persist({ enabled: true, agent: kind, ingestUrl: ctx.savingsIngestUrl });
|
|
@@ -16588,14 +16681,14 @@ async function configureHeadroom(action, ctx, deps) {
|
|
|
16588
16681
|
pluginAuthToken: ctx.pluginAuthToken
|
|
16589
16682
|
});
|
|
16590
16683
|
}
|
|
16591
|
-
deps.emit({ type:
|
|
16684
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "enabled" });
|
|
16592
16685
|
return { enabled: true };
|
|
16593
16686
|
}
|
|
16594
16687
|
deps.restoreAgentHeadroomConfig(kind);
|
|
16595
16688
|
deps.stopProxy();
|
|
16596
16689
|
deps.persist({ enabled: false });
|
|
16597
16690
|
deps.stopReporter();
|
|
16598
|
-
deps.emit({ type:
|
|
16691
|
+
deps.emit({ type: USER_EVENTS.HEADROOM_STATUS, state: "disabled" });
|
|
16599
16692
|
return { enabled: false };
|
|
16600
16693
|
}
|
|
16601
16694
|
|
|
@@ -17575,9 +17668,12 @@ function coerceIssue(row, projectKey) {
|
|
|
17575
17668
|
owner: typeof r.owner === "string" && r.owner.length > 0 ? r.owner : null,
|
|
17576
17669
|
created_at: typeof r.created_at === "string" ? r.created_at : "",
|
|
17577
17670
|
updated_at: typeof r.updated_at === "string" ? r.updated_at : "",
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
|
|
17671
|
+
// The backend ingest DTO validates the counts as REQUIRED ints — an
|
|
17672
|
+
// omitted count would 400 the whole snapshot. Default to 0 when a bd
|
|
17673
|
+
// version omits one instead of dropping the field.
|
|
17674
|
+
dependency_count: typeof r.dependency_count === "number" ? r.dependency_count : 0,
|
|
17675
|
+
dependent_count: typeof r.dependent_count === "number" ? r.dependent_count : 0,
|
|
17676
|
+
comment_count: typeof r.comment_count === "number" ? r.comment_count : 0,
|
|
17581
17677
|
projectKey
|
|
17582
17678
|
};
|
|
17583
17679
|
}
|
|
@@ -18414,9 +18510,10 @@ var BeadsWatcher = class {
|
|
|
18414
18510
|
projectLabel,
|
|
18415
18511
|
fullSnapshot: true,
|
|
18416
18512
|
issues,
|
|
18417
|
-
//
|
|
18418
|
-
//
|
|
18419
|
-
//
|
|
18513
|
+
// We don't track edges in the P0 snapshot yet, so send an empty array.
|
|
18514
|
+
// (The backend DTO marks `dependencies` optional and tolerates absence,
|
|
18515
|
+
// but the wire contract in @codeagent/shared says "always sent" — keep
|
|
18516
|
+
// the payload deterministic.)
|
|
18420
18517
|
dependencies: [],
|
|
18421
18518
|
memories: [],
|
|
18422
18519
|
// Always send a summary — a null `bd status` yields a zeroed block rather
|
|
@@ -19238,7 +19335,7 @@ var beadsConfigureH = async (ctx, cmd, parsed) => {
|
|
|
19238
19335
|
sessionId: ctx.sessionId,
|
|
19239
19336
|
pluginId: ctx.pluginId,
|
|
19240
19337
|
pluginAuthToken: token,
|
|
19241
|
-
type:
|
|
19338
|
+
type: USER_EVENTS.BEADS_STATUS,
|
|
19242
19339
|
payload: Object.fromEntries(
|
|
19243
19340
|
Object.entries(event).filter(([k2]) => k2 !== "type")
|
|
19244
19341
|
)
|
|
@@ -19629,7 +19726,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19629
19726
|
sessionId: ctx.sessionId,
|
|
19630
19727
|
pluginId: ctx.pluginId,
|
|
19631
19728
|
pluginAuthToken: ctx.pluginAuthToken,
|
|
19632
|
-
type:
|
|
19729
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19633
19730
|
payload: {
|
|
19634
19731
|
stage: "detection",
|
|
19635
19732
|
message: `Preview detection isn't available on ${ctx.runtime.id} sessions yet \u2014 link a Claude or Codex agent.`
|
|
@@ -19646,7 +19743,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19646
19743
|
sessionId: ctx.sessionId,
|
|
19647
19744
|
pluginId: ctx.pluginId,
|
|
19648
19745
|
pluginAuthToken,
|
|
19649
|
-
type:
|
|
19746
|
+
type: USER_EVENTS.PREVIEW_DETECTION_READY,
|
|
19650
19747
|
payload: { detection: fromFile }
|
|
19651
19748
|
});
|
|
19652
19749
|
return;
|
|
@@ -19655,7 +19752,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19655
19752
|
sessionId: ctx.sessionId,
|
|
19656
19753
|
pluginId: ctx.pluginId,
|
|
19657
19754
|
pluginAuthToken,
|
|
19658
|
-
type:
|
|
19755
|
+
type: USER_EVENTS.PREVIEW_DETECTION_PENDING
|
|
19659
19756
|
});
|
|
19660
19757
|
log.info("preview", "detect: invoking generateOneShot");
|
|
19661
19758
|
const startedAt = Date.now();
|
|
@@ -19671,7 +19768,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19671
19768
|
sessionId: ctx.sessionId,
|
|
19672
19769
|
pluginId: ctx.pluginId,
|
|
19673
19770
|
pluginAuthToken,
|
|
19674
|
-
type:
|
|
19771
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19675
19772
|
payload: {
|
|
19676
19773
|
stage: "detection",
|
|
19677
19774
|
message: "Agent returned invalid JSON. Try again, or add a .codeam/preview.json override."
|
|
@@ -19685,7 +19782,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19685
19782
|
sessionId: ctx.sessionId,
|
|
19686
19783
|
pluginId: ctx.pluginId,
|
|
19687
19784
|
pluginAuthToken,
|
|
19688
|
-
type:
|
|
19785
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19689
19786
|
payload: {
|
|
19690
19787
|
stage: "unsupported",
|
|
19691
19788
|
message: detection.notes ?? "No dev server applies to this project."
|
|
@@ -19701,7 +19798,7 @@ var requestPreviewDetectH = (ctx) => {
|
|
|
19701
19798
|
sessionId: ctx.sessionId,
|
|
19702
19799
|
pluginId: ctx.pluginId,
|
|
19703
19800
|
pluginAuthToken,
|
|
19704
|
-
type:
|
|
19801
|
+
type: USER_EVENTS.PREVIEW_DETECTION_READY,
|
|
19705
19802
|
payload: { detection }
|
|
19706
19803
|
});
|
|
19707
19804
|
})();
|
|
@@ -19818,7 +19915,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19818
19915
|
sessionId: ctx.sessionId,
|
|
19819
19916
|
pluginId: ctx.pluginId,
|
|
19820
19917
|
pluginAuthToken,
|
|
19821
|
-
type:
|
|
19918
|
+
type: USER_EVENTS.PREVIEW_PROGRESS,
|
|
19822
19919
|
payload: { step, message, timestamp: Date.now() }
|
|
19823
19920
|
});
|
|
19824
19921
|
};
|
|
@@ -19834,7 +19931,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19834
19931
|
sessionId: ctx.sessionId,
|
|
19835
19932
|
pluginId: ctx.pluginId,
|
|
19836
19933
|
pluginAuthToken,
|
|
19837
|
-
type:
|
|
19934
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
19838
19935
|
payload: { url: existing.url, framework: existing.framework, port: detection.port }
|
|
19839
19936
|
});
|
|
19840
19937
|
return;
|
|
@@ -19843,7 +19940,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19843
19940
|
sessionId: ctx.sessionId,
|
|
19844
19941
|
pluginId: ctx.pluginId,
|
|
19845
19942
|
pluginAuthToken,
|
|
19846
|
-
type:
|
|
19943
|
+
type: USER_EVENTS.PREVIEW_STARTING,
|
|
19847
19944
|
payload: { framework: detection.framework, port: detection.port }
|
|
19848
19945
|
});
|
|
19849
19946
|
emitProgress("ENV_DETECTED", `${detection.framework}`);
|
|
@@ -19870,7 +19967,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19870
19967
|
sessionId: ctx.sessionId,
|
|
19871
19968
|
pluginId: ctx.pluginId,
|
|
19872
19969
|
pluginAuthToken,
|
|
19873
|
-
type:
|
|
19970
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19874
19971
|
payload: {
|
|
19875
19972
|
stage: "spawn",
|
|
19876
19973
|
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 +19992,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19895
19992
|
sessionId: ctx.sessionId,
|
|
19896
19993
|
pluginId: ctx.pluginId,
|
|
19897
19994
|
pluginAuthToken,
|
|
19898
|
-
type:
|
|
19995
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19899
19996
|
payload: {
|
|
19900
19997
|
stage: "ready_timeout",
|
|
19901
19998
|
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 +20005,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19908
20005
|
sessionId: ctx.sessionId,
|
|
19909
20006
|
pluginId: ctx.pluginId,
|
|
19910
20007
|
pluginAuthToken,
|
|
19911
|
-
type:
|
|
20008
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19912
20009
|
payload: {
|
|
19913
20010
|
stage: "spawn",
|
|
19914
20011
|
message: `Dependency install failed (${missingDeps.cmd} ${missingDeps.args.join(" ")}, exit ${result.code}). Run it manually in this project and try again.`
|
|
@@ -19945,7 +20042,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19945
20042
|
sessionId: ctx.sessionId,
|
|
19946
20043
|
pluginId: ctx.pluginId,
|
|
19947
20044
|
pluginAuthToken,
|
|
19948
|
-
type:
|
|
20045
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19949
20046
|
payload: {
|
|
19950
20047
|
stage: "ready_timeout",
|
|
19951
20048
|
message: `Setup step (${setup.cmd} ${setup.args.join(" ")}) didn't finish within ${Math.round(timeoutMs / 1e3)}s and was stopped.`
|
|
@@ -19958,7 +20055,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19958
20055
|
sessionId: ctx.sessionId,
|
|
19959
20056
|
pluginId: ctx.pluginId,
|
|
19960
20057
|
pluginAuthToken,
|
|
19961
|
-
type:
|
|
20058
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
19962
20059
|
payload: {
|
|
19963
20060
|
stage: "spawn",
|
|
19964
20061
|
message: `Setup failed (${setup.cmd} ${setup.args.join(" ")}, exit ${result.code}).`
|
|
@@ -19979,7 +20076,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19979
20076
|
sessionId: ctx.sessionId,
|
|
19980
20077
|
pluginId: ctx.pluginId,
|
|
19981
20078
|
pluginAuthToken,
|
|
19982
|
-
type:
|
|
20079
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
19983
20080
|
payload: { url: raceExisting.url, framework: raceExisting.framework, port: detection.port }
|
|
19984
20081
|
});
|
|
19985
20082
|
return;
|
|
@@ -19999,7 +20096,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
19999
20096
|
sessionId: ctx.sessionId,
|
|
20000
20097
|
pluginId: ctx.pluginId,
|
|
20001
20098
|
pluginAuthToken,
|
|
20002
|
-
type:
|
|
20099
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20003
20100
|
payload: {
|
|
20004
20101
|
stage: "spawn",
|
|
20005
20102
|
message: `Port ${detection.port} is still in use after stopping the previous preview. Wait a moment and try again.`
|
|
@@ -20012,7 +20109,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20012
20109
|
sessionId: ctx.sessionId,
|
|
20013
20110
|
pluginId: ctx.pluginId,
|
|
20014
20111
|
pluginAuthToken,
|
|
20015
|
-
type:
|
|
20112
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20016
20113
|
payload: {
|
|
20017
20114
|
stage: "spawn",
|
|
20018
20115
|
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 +20157,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20060
20157
|
sessionId: ctx.sessionId,
|
|
20061
20158
|
pluginId: ctx.pluginId,
|
|
20062
20159
|
pluginAuthToken,
|
|
20063
|
-
type:
|
|
20160
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20064
20161
|
payload: {
|
|
20065
20162
|
stage: "spawn",
|
|
20066
20163
|
message: `The dev server exited (code ${outcome.code}) before it was ready. It may need a database or other services.`,
|
|
@@ -20075,7 +20172,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20075
20172
|
sessionId: ctx.sessionId,
|
|
20076
20173
|
pluginId: ctx.pluginId,
|
|
20077
20174
|
pluginAuthToken,
|
|
20078
|
-
type:
|
|
20175
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20079
20176
|
payload: {
|
|
20080
20177
|
stage: "ready_timeout",
|
|
20081
20178
|
message: "The dev server didn't become ready in time. It may be stuck waiting on a database or other service.",
|
|
@@ -20104,7 +20201,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20104
20201
|
sessionId: ctx.sessionId,
|
|
20105
20202
|
pluginId: ctx.pluginId,
|
|
20106
20203
|
pluginAuthToken,
|
|
20107
|
-
type:
|
|
20204
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20108
20205
|
payload: { stage: "tunnel", message: "Expo did not report a tunnel URL." }
|
|
20109
20206
|
});
|
|
20110
20207
|
return;
|
|
@@ -20120,7 +20217,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20120
20217
|
sessionId: ctx.sessionId,
|
|
20121
20218
|
pluginId: ctx.pluginId,
|
|
20122
20219
|
pluginAuthToken,
|
|
20123
|
-
type:
|
|
20220
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20124
20221
|
payload: { stage: "tunnel", message: e.message }
|
|
20125
20222
|
});
|
|
20126
20223
|
return;
|
|
@@ -20214,7 +20311,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20214
20311
|
sessionId: ctx.sessionId,
|
|
20215
20312
|
pluginId: ctx.pluginId,
|
|
20216
20313
|
pluginAuthToken,
|
|
20217
|
-
type:
|
|
20314
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20218
20315
|
payload: {
|
|
20219
20316
|
stage: "tunnel",
|
|
20220
20317
|
message: `Tunnel did not become reachable after ${MAX_TUNNEL_ATTEMPTS} attempts (${lastTunnelErr}). Cloudflare Quick Tunnels occasionally fail to register \u2014 please retry.`
|
|
@@ -20238,7 +20335,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20238
20335
|
sessionId: ctx.sessionId,
|
|
20239
20336
|
pluginId: ctx.pluginId,
|
|
20240
20337
|
pluginAuthToken,
|
|
20241
|
-
type:
|
|
20338
|
+
type: USER_EVENTS.PREVIEW_READY,
|
|
20242
20339
|
payload: { url, framework: detection.framework, port: detection.port }
|
|
20243
20340
|
});
|
|
20244
20341
|
})().catch((err) => {
|
|
@@ -20248,7 +20345,7 @@ function startPreviewFromDetection(ctx, detection, pluginAuthToken) {
|
|
|
20248
20345
|
sessionId: ctx.sessionId,
|
|
20249
20346
|
pluginId: ctx.pluginId,
|
|
20250
20347
|
pluginAuthToken,
|
|
20251
|
-
type:
|
|
20348
|
+
type: USER_EVENTS.PREVIEW_ERROR,
|
|
20252
20349
|
payload: { stage: "spawn", message: `Preview failed to start: ${message}` }
|
|
20253
20350
|
});
|
|
20254
20351
|
});
|
|
@@ -20266,7 +20363,7 @@ var previewStopH = (ctx) => {
|
|
|
20266
20363
|
sessionId: ctx.sessionId,
|
|
20267
20364
|
pluginId: ctx.pluginId,
|
|
20268
20365
|
pluginAuthToken,
|
|
20269
|
-
type:
|
|
20366
|
+
type: USER_EVENTS.PREVIEW_STOPPED,
|
|
20270
20367
|
payload: { reason: "user" }
|
|
20271
20368
|
});
|
|
20272
20369
|
})();
|
|
@@ -21457,15 +21554,15 @@ var path54 = __toESM(require("path"));
|
|
|
21457
21554
|
var os40 = __toESM(require("os"));
|
|
21458
21555
|
var https7 = __toESM(require("https"));
|
|
21459
21556
|
var http6 = __toESM(require("http"));
|
|
21460
|
-
var
|
|
21461
|
-
var historyRecordSchema =
|
|
21462
|
-
type:
|
|
21463
|
-
timestamp:
|
|
21464
|
-
uuid:
|
|
21465
|
-
isMeta:
|
|
21466
|
-
message:
|
|
21557
|
+
var import_zod3 = require("zod");
|
|
21558
|
+
var historyRecordSchema = import_zod3.z.object({
|
|
21559
|
+
type: import_zod3.z.string().optional(),
|
|
21560
|
+
timestamp: import_zod3.z.union([import_zod3.z.string(), import_zod3.z.number()]).optional(),
|
|
21561
|
+
uuid: import_zod3.z.string().optional(),
|
|
21562
|
+
isMeta: import_zod3.z.boolean().optional(),
|
|
21563
|
+
message: import_zod3.z.object({
|
|
21467
21564
|
// Claude content is either a string or an array of typed blocks.
|
|
21468
|
-
content:
|
|
21565
|
+
content: import_zod3.z.union([import_zod3.z.string(), import_zod3.z.array(import_zod3.z.unknown())]).optional()
|
|
21469
21566
|
}).passthrough().optional()
|
|
21470
21567
|
}).passthrough();
|
|
21471
21568
|
var API_BASE8 = resolveApiBaseUrl();
|
|
@@ -31719,7 +31816,7 @@ function checkChokidar() {
|
|
|
31719
31816
|
}
|
|
31720
31817
|
async function doctor(args2 = []) {
|
|
31721
31818
|
const json = args2.includes("--json");
|
|
31722
|
-
const cliVersion = true ? "2.53.
|
|
31819
|
+
const cliVersion = true ? "2.53.4" : "0.0.0-dev";
|
|
31723
31820
|
const apiBase2 = resolveApiBaseUrl();
|
|
31724
31821
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
31725
31822
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -31918,7 +32015,7 @@ async function completion(args2) {
|
|
|
31918
32015
|
// src/commands/version.ts
|
|
31919
32016
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
31920
32017
|
function version2() {
|
|
31921
|
-
const v = true ? "2.53.
|
|
32018
|
+
const v = true ? "2.53.4" : "unknown";
|
|
31922
32019
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
31923
32020
|
}
|
|
31924
32021
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.4",
|
|
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",
|