@miadi/tide 0.6.15 → 0.6.16

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/package.json +1 -1
  2. package/src/client.ts +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miadi/tide",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
4
4
  "description": "Typed client boundary for the ironsilk `tide` runtime. Daemon Unix-socket transport with CLI fallback.",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/client.ts CHANGED
@@ -486,6 +486,10 @@ export interface CompanionOpenOptions {
486
486
  seat?: string
487
487
  /** The person's word to rename the existing session `-arch-<yyMMddHHmm>` and open a new one. */
488
488
  archive?: boolean
489
+ /** The model the seat's agent starts on, `claude-<family>-<version>` (ironsilk ≥ 0.9.85). */
490
+ model?: string
491
+ /** Start the seat's agent in Code Mode, CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 (ironsilk ≥ 0.9.85). */
492
+ codeMode?: boolean
489
493
  /** Act instead of returning the plan. */
490
494
  run?: boolean
491
495
  timeoutMs?: number
@@ -517,9 +521,14 @@ export async function openCompanion(opts: CompanionOpenOptions): Promise<TideCom
517
521
  throw new TideError(`companion ${name} must be letters, digits, '.', '_' or '-': ${JSON.stringify(value)}`)
518
522
  }
519
523
  }
524
+ if (opts.model !== undefined && !/^claude-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(opts.model)) {
525
+ throw new TideError(`companion model must be a model id such as claude-fable-5-2: ${JSON.stringify(opts.model)}`)
526
+ }
520
527
  const args = ["companion", "open", "--episode", opts.episode, "--format", "json"]
521
528
  if (opts.seat) args.push("--seat", opts.seat)
522
529
  if (opts.archive) args.push("--archive")
530
+ if (opts.model) args.push("--model", opts.model)
531
+ if (opts.codeMode) args.push("--code-mode")
523
532
  if (opts.run) args.push("--run")
524
533
  const bin = await resolveTideBin()
525
534
  const timeoutMs = opts.timeoutMs ?? (opts.run ? 420_000 : 30_000)
@@ -1177,6 +1186,11 @@ export interface TeamSessionOptions extends TideRunOptions {
1177
1186
  /** A name `teamStartChoices` offers, or null for a shell alone. */
1178
1187
  launch: string | null
1179
1188
  remote?: boolean
1189
+ /**
1190
+ * Code Mode: `--env CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 --no-remote` (chronicle-tui ≥ 0.27.1).
1191
+ * It does not start with Remote Control, so `remote` is ignored while it is on.
1192
+ */
1193
+ codeMode?: boolean
1180
1194
  /** The first prompt, pasted once the agent is ready. */
1181
1195
  prompt?: string | null
1182
1196
  /** Start it; without this the answer is the plan. */
@@ -1251,7 +1265,8 @@ export function startTeamSession(opts: TeamSessionOptions): Promise<TeamSessionA
1251
1265
  const args = ["new", opts.team, opts.session, "--cwd", opts.cwd, "--json"]
1252
1266
  if (opts.launch === null) args.push("--no-launch")
1253
1267
  else args.push("--launch", opts.launch)
1254
- if (opts.remote && opts.launch !== null) args.push("--remote")
1268
+ if (opts.codeMode && opts.launch !== null) args.push("--env", "CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1", "--no-remote")
1269
+ else if (opts.remote && opts.launch !== null) args.push("--remote")
1255
1270
  const prompt = opts.launch !== null && opts.prompt ? opts.prompt : undefined
1256
1271
  if (prompt !== undefined) args.push("--prompt-file", "-")
1257
1272
  if (!opts.run) args.push("--dry-run")