@tryarcanist/cli 0.1.51 → 0.1.53

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.
Files changed (2) hide show
  1. package/dist/index.js +39 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -524,7 +524,7 @@ function isRecord(value) {
524
524
  // ../../shared/transcript/projector.ts
525
525
  var DUPLICATE_TEXT_DELTA_MIN_CHARS = 24;
526
526
  var SUBAGENT_EVENT_TYPES = /* @__PURE__ */ new Set(["subagent_start", "subagent_complete", "subagent_tool_call", "subagent_text"]);
527
- var RAW_OPENCODE_NOISE = /* @__PURE__ */ new Set([
527
+ var RAW_CODEX_NOISE = /* @__PURE__ */ new Set([
528
528
  "session.updated",
529
529
  "session.diff",
530
530
  "server.heartbeat",
@@ -610,7 +610,7 @@ function getRawSessionEventKind(event) {
610
610
  return bridgeEventType ?? "agent_timeline";
611
611
  case "idle":
612
612
  return bridgeEventType ?? "session_idle";
613
- case "opencode.session.create":
613
+ case "codex.session.create":
614
614
  case "git.push":
615
615
  case "pr.open":
616
616
  case "session.create":
@@ -911,13 +911,13 @@ function projectSessionResumedCold(data, index) {
911
911
  ...resolvePromptId(data) ? { promptId: resolvePromptId(data) } : {}
912
912
  };
913
913
  }
914
- function projectRawOpencode(data, index) {
914
+ function projectRawCodex(data, index) {
915
915
  const partType = typeof data?.partType === "string" ? data.partType : void 0;
916
916
  const eventType = typeof data?.eventType === "string" ? data.eventType : void 0;
917
917
  if (partType === "text") return null;
918
- if (eventType && RAW_OPENCODE_NOISE.has(eventType)) return null;
918
+ if (eventType && RAW_CODEX_NOISE.has(eventType)) return null;
919
919
  return {
920
- type: "raw_opencode",
920
+ type: "raw_codex",
921
921
  id: resolveEventId(data, "raw", index),
922
922
  ...resolvePromptId(data) ? { promptId: resolvePromptId(data) } : {},
923
923
  ...partType ? { partType } : {},
@@ -1066,8 +1066,8 @@ function flattenSessionEvents(raw) {
1066
1066
  case "session_resumed_cold":
1067
1067
  pushEvent(state, projectSessionResumedCold(data, state.merged.length));
1068
1068
  break;
1069
- case "raw_opencode":
1070
- pushEvent(state, projectRawOpencode(data, state.merged.length));
1069
+ case "raw_codex":
1070
+ pushEvent(state, projectRawCodex(data, state.merged.length));
1071
1071
  break;
1072
1072
  case "reasoning":
1073
1073
  projectStream("reasoning", data, state);
@@ -1216,12 +1216,12 @@ var ERROR_CODES = [
1216
1216
  "sandbox_terminated",
1217
1217
  "sandbox_disconnected",
1218
1218
  "sandbox_callback",
1219
- "opencode_startup_timeout",
1220
- "opencode_api_readiness_timeout",
1221
- "opencode_session_create_timeout",
1222
- "opencode_prompt_dispatch_timeout",
1223
- "opencode_not_ready",
1224
- "opencode_unrecoverable",
1219
+ "codex_startup_timeout",
1220
+ "codex_api_readiness_timeout",
1221
+ "codex_session_create_timeout",
1222
+ "codex_prompt_dispatch_timeout",
1223
+ "codex_not_ready",
1224
+ "codex_unrecoverable",
1225
1225
  "unknown"
1226
1226
  ];
1227
1227
  var ERROR_CODE_SET = new Set(ERROR_CODES);
@@ -1250,12 +1250,12 @@ var ERROR_CODE_LABELS = {
1250
1250
  sandbox_terminated: "Sandbox terminated",
1251
1251
  sandbox_disconnected: "Sandbox disconnected",
1252
1252
  sandbox_callback: "Sandbox callback failed",
1253
- opencode_startup_timeout: "OpenCode startup timed out",
1254
- opencode_api_readiness_timeout: "OpenCode API readiness timed out",
1255
- opencode_session_create_timeout: "OpenCode session creation timed out",
1256
- opencode_prompt_dispatch_timeout: "OpenCode prompt dispatch timed out",
1257
- opencode_not_ready: "OpenCode did not become ready",
1258
- opencode_unrecoverable: "OpenCode unrecoverable failure",
1253
+ codex_startup_timeout: "Codex startup timed out",
1254
+ codex_api_readiness_timeout: "Codex API readiness timed out",
1255
+ codex_session_create_timeout: "Codex session creation timed out",
1256
+ codex_prompt_dispatch_timeout: "Codex prompt dispatch timed out",
1257
+ codex_not_ready: "Codex did not become ready",
1258
+ codex_unrecoverable: "Codex unrecoverable failure",
1259
1259
  unknown: "Unknown failure"
1260
1260
  };
1261
1261
  function isErrorCode(value) {
@@ -1350,7 +1350,7 @@ ${event.answer ? `**Answer:** ${event.answer}
1350
1350
  case "customer_activity":
1351
1351
  return `**${event.title}:** ${event.summary}
1352
1352
  `;
1353
- case "raw_opencode":
1353
+ case "raw_codex":
1354
1354
  return "";
1355
1355
  }
1356
1356
  }
@@ -1890,6 +1890,9 @@ async function listSessionsCommand(options, command) {
1890
1890
  const query = new URLSearchParams();
1891
1891
  if (options.status) query.set("status", options.status);
1892
1892
  if (options.scope) query.set("scope", options.scope);
1893
+ if (options.search) query.set("q", options.search);
1894
+ if (options.tag) query.set("tag", options.tag);
1895
+ if (options.repo) query.set("repo", options.repo);
1893
1896
  if (options.limit) query.set("limit", options.limit);
1894
1897
  if (options.cursor) query.set("cursor", options.cursor);
1895
1898
  const payload = await apiFetch(
@@ -1908,10 +1911,15 @@ async function listSessionsCommand(options, command) {
1908
1911
  const id = String(session.id ?? session.sessionId ?? "");
1909
1912
  const status = String(session.status ?? "");
1910
1913
  const title = typeof session.title === "string" ? ` ${session.title}` : "";
1911
- console.log(`${id} ${status}${title}`);
1914
+ const tags = Array.isArray(session.titleTags) ? session.titleTags.filter((tag) => typeof tag === "string") : [];
1915
+ const tagText = tags.length > 0 ? ` tags: ${tags.join(", ")}` : "";
1916
+ console.log(`${id} ${status}${title}${tagText}`);
1912
1917
  }
1913
1918
  if (payload.nextCursor) console.log(`Next cursor: ${payload.nextCursor}`);
1914
1919
  }
1920
+ async function searchSessionsCommand(query, options, command) {
1921
+ await listSessionsCommand({ ...options, search: query }, command);
1922
+ }
1915
1923
  async function getSessionCommand(sessionId, options, command) {
1916
1924
  const runtime = getRuntimeOptions(command, options);
1917
1925
  const config = requireConfig(runtime);
@@ -2194,14 +2202,23 @@ Examples:
2194
2202
  arcanist sessions get <session-id> --json
2195
2203
  `
2196
2204
  ).action((sessionId, options, command) => getSessionCommand(sessionId, options, command));
2197
- sessions.command("list").description("List sessions").option("--status <status>", "Filter by session status").option("--scope <scope>", "Session scope: mine or business").option("--limit <n>", "Maximum sessions to return").option("--cursor <cursor>", "Pagination cursor").addHelpText(
2205
+ sessions.command("list").description("List sessions").option("--status <status>", "Filter by session status").option("--scope <scope>", "Session scope: mine or business").option("--search <query>", "Search session titles, tags, and repo metadata").option("--tag <tag>", "Filter by generated session tag").option("--repo <repo>", "Filter by repo metadata").option("--limit <n>", "Maximum sessions to return").option("--cursor <cursor>", "Pagination cursor").addHelpText(
2198
2206
  "after",
2199
2207
  `
2200
2208
  Examples:
2201
2209
  arcanist sessions list
2202
2210
  arcanist sessions list --status idle --json
2211
+ arcanist sessions list --search "architect agent" --tag codex
2203
2212
  `
2204
2213
  ).action((options, command) => listSessionsCommand(options, command));
2214
+ sessions.command("search").description("Search sessions by title, tag, and repo metadata").argument("<query>", "Search query").option("--status <status>", "Filter by session status").option("--scope <scope>", "Session scope: mine or business").option("--tag <tag>", "Filter by generated session tag").option("--repo <repo>", "Filter by repo metadata").option("--limit <n>", "Maximum sessions to return").option("--cursor <cursor>", "Pagination cursor").addHelpText(
2215
+ "after",
2216
+ `
2217
+ Examples:
2218
+ arcanist sessions search "architect agent"
2219
+ arcanist sessions search "mcp debugging" --tag codex --json
2220
+ `
2221
+ ).action((query, options, command) => searchSessionsCommand(query, options, command));
2205
2222
  sessions.command("events").description("Read or follow session replay events").argument("<session-id>", "Session ID").option("--after-sequence <n>", "Return events after this sequence").option("--before-sequence <n>", "Return events before this sequence").option("--prompt-id <id>", "Filter events by prompt ID").option("--limit <n>", "Maximum events to return").option("--follow", "Follow events until the session is idle").option("--poll-interval <ms>", "Polling interval in milliseconds", String(DEFAULT_WATCH_POLL_INTERVAL_MS)).addHelpText(
2206
2223
  "after",
2207
2224
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryarcanist/cli",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "CLI for Arcanist — create and manage coding agent sessions",
5
5
  "type": "module",
6
6
  "bin": {