@codelia/runtime 0.1.74 → 0.1.75

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.
@@ -5471,8 +5471,8 @@ var CONTENT_SHA256_PATTERN = /^[a-f0-9]{64}$/;
5471
5471
  var expectedContentHashSchema = z5.string().regex(
5472
5472
  CONTENT_SHA256_PATTERN,
5473
5473
  "expected_hash must be a lowercase 64-character SHA-256 hash"
5474
- ).nullable().default(null).describe(
5475
- "Current full-content SHA-256 guard. Copy content_sha256 from a current read/read_line result or explicitly compute the same UTF-8 content hash."
5474
+ ).optional().describe(
5475
+ "Current full-content SHA-256 guard from read/read_line metadata. Omit when unavailable."
5476
5476
  );
5477
5477
  var hashUtf8Content = (content) => crypto4.createHash("sha256").update(content).digest("hex");
5478
5478
  var assertExpectedContentHash = (input) => {
@@ -7447,19 +7447,19 @@ var shellRunSchema = z11.object({
7447
7447
  "Shell command to execute as a runtime-managed child process in the current workspace."
7448
7448
  ),
7449
7449
  label: z11.string().max(SHELL_LABEL_MAX_CHARS).optional().describe(
7450
- `Optional short task label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7450
+ `Short label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7451
7451
  ),
7452
7452
  timeout: z11.number().int().positive().optional().describe(
7453
- `Execution timeout in seconds. Foreground default: ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached-wait mode accepts larger values up to ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit to keep the managed child job running until completion, cancel, or runtime exit.`
7453
+ `Execution timeout in seconds. Foreground: default ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached: max ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit for no execution timer.`
7454
7454
  ),
7455
7455
  detached_wait: z11.boolean().optional().describe(
7456
- "Skip the attached wait and return the task key immediately. The runtime still owns the child process. Use this only for finite jobs you will later inspect, wait on, or cancel. If you need a service-style process to keep running independently, start it with an explicit OS/shell-native out-of-process method such as `nohup`, `setsid`, `disown`, a service manager, or `docker compose up -d`, and verify readiness separately. Default: false."
7456
+ "Return a task key immediately instead of waiting. The runtime owns the child until completion, cancellation, or runtime exit; use follow-up shell tools. Default: false."
7457
7457
  ),
7458
7458
  stdin_mode: shellStdinModeSchema.optional().describe(
7459
- "Child stdin behavior. Default: closed (immediate EOF). Use pipe only with detached_wait=true, then send bounded UTF-8 text with shell_stdin_write."
7459
+ "Child stdin: closed (default) or pipe. pipe requires detached_wait=true and shell_stdin_write."
7460
7460
  ),
7461
7461
  include_stderr_on_success: z11.boolean().optional().describe(
7462
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7462
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7463
7463
  )
7464
7464
  }).superRefine((input, ctx) => {
7465
7465
  if (input.stdin_mode === "pipe" && input.detached_wait !== true) {
@@ -7517,7 +7517,7 @@ var shellStdinWriteSchema = shellTaskKeySchema.extend({
7517
7517
  });
7518
7518
  var shellSuccessStderrSchema = {
7519
7519
  include_stderr_on_success: z11.boolean().optional().describe(
7520
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7520
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7521
7521
  )
7522
7522
  };
7523
7523
  var shellWaitSchema = shellTaskKeySchema.extend({
@@ -7891,7 +7891,7 @@ var createShellTool = (sandboxKey, options = {}) => {
7891
7891
  const shared = getSharedDeps(options);
7892
7892
  return defineTool9({
7893
7893
  name: "shell",
7894
- description: "Run a shell command as a runtime-managed child process in the sandbox. Terminal results use `stdout`/`stderr` stream fields; successful results suppress `stderr` by default unless `include_stderr_on_success=true`, and `shell_logs` is available when you need explicit stream reads. By default wait for completion with stdin closed; with `detached_wait=true`, skip the attached wait and return compact JSON with the task key. Set stdin_mode=pipe only for detached tasks that need bounded follow-up writes through shell_stdin_write.",
7894
+ description: "Run a shell command as a managed child process in the sandbox. It waits with stdin closed by default; use detached_wait for a task key and stdin_mode=pipe only when follow-up shell_stdin_write calls are needed.",
7895
7895
  input: shellRunSchema,
7896
7896
  execute: async (input, ctx) => {
7897
7897
  const sandbox = await getSandboxContext(ctx, sandboxKey);
@@ -7959,7 +7959,7 @@ var createShellStdinWriteTool = (options = {}) => {
7959
7959
  const shared = getSharedDeps(options);
7960
7960
  return defineTool9({
7961
7961
  name: "shell_stdin_write",
7962
- description: "Write at most 64 KiB of UTF-8 text to a live local shell task started with detached_wait=true and stdin_mode=pipe. Writes are serialized and restricted to the same runtime and originating agent session. Use shell_logs to inspect output and shell_wait for completion.",
7962
+ description: "Write up to 64 KiB of UTF-8 text to a live shell task started with detached_wait=true and stdin_mode=pipe; use shell_logs or shell_wait afterward.",
7963
7963
  input: shellStdinWriteSchema,
7964
7964
  execute: async (input, ctx) => {
7965
7965
  try {
@@ -8056,7 +8056,7 @@ var createShellWaitTool = (options = {}) => {
8056
8056
  const shared = getSharedDeps(options);
8057
8057
  return defineTool9({
8058
8058
  name: "shell_wait",
8059
- description: "Wait for a shell task within a bounded window and return compact JSON describing either the running status or a terminal result with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8059
+ description: "Wait within a bounded window for a shell task, returning compact running status or its terminal stdout/stderr result.",
8060
8060
  input: shellWaitSchema,
8061
8061
  execute: async (input, ctx) => {
8062
8062
  try {
@@ -8091,7 +8091,7 @@ var createShellResultTool = (options = {}) => {
8091
8091
  const shared = getSharedDeps(options);
8092
8092
  return defineTool9({
8093
8093
  name: "shell_result",
8094
- description: "Read the retained terminal result for a shell task as compact JSON with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8094
+ description: "Read a shell task's retained terminal stdout/stderr result, or its current status if still running.",
8095
8095
  input: shellResultSchema,
8096
8096
  execute: async (input) => {
8097
8097
  try {
@@ -8329,22 +8329,24 @@ var todoStore = /* @__PURE__ */ new Map();
8329
8329
  var todoStatusSchema = z14.enum(["pending", "in_progress", "completed"]);
8330
8330
  var todoPrioritySchema = z14.number().int().min(1).max(5);
8331
8331
  var todoItemSchema = z14.object({
8332
- id: z14.string().min(1).optional().describe("Optional stable ID. Keep if the task already exists."),
8332
+ id: z14.string().min(1).optional().describe(
8333
+ "Stable ID. Omit to generate one; preserve the existing ID when replacing a known item."
8334
+ ),
8333
8335
  content: z14.string().min(1).describe("Todo item text."),
8334
8336
  status: todoStatusSchema.describe("Todo status."),
8335
8337
  priority: todoPrioritySchema.optional().describe("Priority 1(high)-5(low). Default is 3."),
8336
- notes: z14.string().optional().describe("Optional implementation notes."),
8337
- activeForm: z14.string().optional().describe("Optional in-progress phrasing for UI display.")
8338
+ notes: z14.string().optional().describe("Implementation notes."),
8339
+ activeForm: z14.string().optional().describe("In-progress phrasing for UI display.")
8338
8340
  });
8339
8341
  var todoPatchItemSchema = z14.object({
8340
8342
  id: z14.string().min(1).describe("Target todo ID."),
8341
8343
  remove: z14.boolean().optional().describe("Set true to remove the todo item."),
8342
- content: z14.string().min(1).nullable().default(null).describe("Updated todo text (null keeps current)."),
8343
- status: todoStatusSchema.nullable().default(null).describe("Updated status (null keeps current)."),
8344
- priority: todoPrioritySchema.nullable().default(null).describe("Updated priority (null keeps current)."),
8345
- notes: z14.string().nullable().default(null).describe("Updated notes (null keeps current, empty clears)."),
8346
- activeForm: z14.string().nullable().default(null).describe(
8347
- "Updated in-progress phrasing (null keeps current, empty clears)."
8344
+ content: z14.string().min(1).optional().describe("New todo text; omit to keep the current value."),
8345
+ status: todoStatusSchema.optional().describe("New status; omit to keep the current value."),
8346
+ priority: todoPrioritySchema.optional().describe("New priority; omit to keep the current value."),
8347
+ notes: z14.string().optional().describe("New notes; omit to keep the current value, empty clears."),
8348
+ activeForm: z14.string().optional().describe(
8349
+ "New in-progress phrasing; omit to keep the current value, empty clears."
8348
8350
  )
8349
8351
  });
8350
8352
  var todoNewInputSchema = z14.object({
@@ -8411,11 +8413,11 @@ var withPatchApplied = (currentTodos, updates) => {
8411
8413
  const previous = nextInputs[index];
8412
8414
  nextInputs[index] = {
8413
8415
  ...previous,
8414
- content: update.content !== null ? update.content : previous.content,
8415
- status: update.status !== null ? update.status : previous.status,
8416
- priority: update.priority !== null ? update.priority : previous.priority,
8417
- notes: update.notes !== null ? update.notes : previous.notes,
8418
- activeForm: update.activeForm !== null ? update.activeForm : previous.activeForm
8416
+ content: update.content !== void 0 ? update.content : previous.content,
8417
+ status: update.status !== void 0 ? update.status : previous.status,
8418
+ priority: update.priority !== void 0 ? update.priority : previous.priority,
8419
+ notes: update.notes !== void 0 ? update.notes : previous.notes,
8420
+ activeForm: update.activeForm !== void 0 ? update.activeForm : previous.activeForm
8419
8421
  };
8420
8422
  }
8421
8423
  return { todos: normalizeTodoItems(nextInputs) };
package/dist/index.cjs CHANGED
@@ -5456,8 +5456,8 @@ var CONTENT_SHA256_PATTERN = /^[a-f0-9]{64}$/;
5456
5456
  var expectedContentHashSchema = import_zod5.z.string().regex(
5457
5457
  CONTENT_SHA256_PATTERN,
5458
5458
  "expected_hash must be a lowercase 64-character SHA-256 hash"
5459
- ).nullable().default(null).describe(
5460
- "Current full-content SHA-256 guard. Copy content_sha256 from a current read/read_line result or explicitly compute the same UTF-8 content hash."
5459
+ ).optional().describe(
5460
+ "Current full-content SHA-256 guard from read/read_line metadata. Omit when unavailable."
5461
5461
  );
5462
5462
  var hashUtf8Content = (content) => import_node_crypto4.default.createHash("sha256").update(content).digest("hex");
5463
5463
  var assertExpectedContentHash = (input) => {
@@ -7430,19 +7430,19 @@ var shellRunSchema = import_zod11.z.object({
7430
7430
  "Shell command to execute as a runtime-managed child process in the current workspace."
7431
7431
  ),
7432
7432
  label: import_zod11.z.string().max(SHELL_LABEL_MAX_CHARS).optional().describe(
7433
- `Optional short task label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7433
+ `Short label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7434
7434
  ),
7435
7435
  timeout: import_zod11.z.number().int().positive().optional().describe(
7436
- `Execution timeout in seconds. Foreground default: ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached-wait mode accepts larger values up to ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit to keep the managed child job running until completion, cancel, or runtime exit.`
7436
+ `Execution timeout in seconds. Foreground: default ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached: max ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit for no execution timer.`
7437
7437
  ),
7438
7438
  detached_wait: import_zod11.z.boolean().optional().describe(
7439
- "Skip the attached wait and return the task key immediately. The runtime still owns the child process. Use this only for finite jobs you will later inspect, wait on, or cancel. If you need a service-style process to keep running independently, start it with an explicit OS/shell-native out-of-process method such as `nohup`, `setsid`, `disown`, a service manager, or `docker compose up -d`, and verify readiness separately. Default: false."
7439
+ "Return a task key immediately instead of waiting. The runtime owns the child until completion, cancellation, or runtime exit; use follow-up shell tools. Default: false."
7440
7440
  ),
7441
7441
  stdin_mode: shellStdinModeSchema.optional().describe(
7442
- "Child stdin behavior. Default: closed (immediate EOF). Use pipe only with detached_wait=true, then send bounded UTF-8 text with shell_stdin_write."
7442
+ "Child stdin: closed (default) or pipe. pipe requires detached_wait=true and shell_stdin_write."
7443
7443
  ),
7444
7444
  include_stderr_on_success: import_zod11.z.boolean().optional().describe(
7445
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7445
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7446
7446
  )
7447
7447
  }).superRefine((input, ctx) => {
7448
7448
  if (input.stdin_mode === "pipe" && input.detached_wait !== true) {
@@ -7500,7 +7500,7 @@ var shellStdinWriteSchema = shellTaskKeySchema.extend({
7500
7500
  });
7501
7501
  var shellSuccessStderrSchema = {
7502
7502
  include_stderr_on_success: import_zod11.z.boolean().optional().describe(
7503
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7503
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7504
7504
  )
7505
7505
  };
7506
7506
  var shellWaitSchema = shellTaskKeySchema.extend({
@@ -7874,7 +7874,7 @@ var createShellTool = (sandboxKey, options = {}) => {
7874
7874
  const shared = getSharedDeps(options);
7875
7875
  return (0, import_core12.defineTool)({
7876
7876
  name: "shell",
7877
- description: "Run a shell command as a runtime-managed child process in the sandbox. Terminal results use `stdout`/`stderr` stream fields; successful results suppress `stderr` by default unless `include_stderr_on_success=true`, and `shell_logs` is available when you need explicit stream reads. By default wait for completion with stdin closed; with `detached_wait=true`, skip the attached wait and return compact JSON with the task key. Set stdin_mode=pipe only for detached tasks that need bounded follow-up writes through shell_stdin_write.",
7877
+ description: "Run a shell command as a managed child process in the sandbox. It waits with stdin closed by default; use detached_wait for a task key and stdin_mode=pipe only when follow-up shell_stdin_write calls are needed.",
7878
7878
  input: shellRunSchema,
7879
7879
  execute: async (input, ctx) => {
7880
7880
  const sandbox = await getSandboxContext(ctx, sandboxKey);
@@ -7942,7 +7942,7 @@ var createShellStdinWriteTool = (options = {}) => {
7942
7942
  const shared = getSharedDeps(options);
7943
7943
  return (0, import_core12.defineTool)({
7944
7944
  name: "shell_stdin_write",
7945
- description: "Write at most 64 KiB of UTF-8 text to a live local shell task started with detached_wait=true and stdin_mode=pipe. Writes are serialized and restricted to the same runtime and originating agent session. Use shell_logs to inspect output and shell_wait for completion.",
7945
+ description: "Write up to 64 KiB of UTF-8 text to a live shell task started with detached_wait=true and stdin_mode=pipe; use shell_logs or shell_wait afterward.",
7946
7946
  input: shellStdinWriteSchema,
7947
7947
  execute: async (input, ctx) => {
7948
7948
  try {
@@ -8039,7 +8039,7 @@ var createShellWaitTool = (options = {}) => {
8039
8039
  const shared = getSharedDeps(options);
8040
8040
  return (0, import_core12.defineTool)({
8041
8041
  name: "shell_wait",
8042
- description: "Wait for a shell task within a bounded window and return compact JSON describing either the running status or a terminal result with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8042
+ description: "Wait within a bounded window for a shell task, returning compact running status or its terminal stdout/stderr result.",
8043
8043
  input: shellWaitSchema,
8044
8044
  execute: async (input, ctx) => {
8045
8045
  try {
@@ -8074,7 +8074,7 @@ var createShellResultTool = (options = {}) => {
8074
8074
  const shared = getSharedDeps(options);
8075
8075
  return (0, import_core12.defineTool)({
8076
8076
  name: "shell_result",
8077
- description: "Read the retained terminal result for a shell task as compact JSON with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8077
+ description: "Read a shell task's retained terminal stdout/stderr result, or its current status if still running.",
8078
8078
  input: shellResultSchema,
8079
8079
  execute: async (input) => {
8080
8080
  try {
@@ -8312,22 +8312,24 @@ var todoStore = /* @__PURE__ */ new Map();
8312
8312
  var todoStatusSchema = import_zod14.z.enum(["pending", "in_progress", "completed"]);
8313
8313
  var todoPrioritySchema = import_zod14.z.number().int().min(1).max(5);
8314
8314
  var todoItemSchema = import_zod14.z.object({
8315
- id: import_zod14.z.string().min(1).optional().describe("Optional stable ID. Keep if the task already exists."),
8315
+ id: import_zod14.z.string().min(1).optional().describe(
8316
+ "Stable ID. Omit to generate one; preserve the existing ID when replacing a known item."
8317
+ ),
8316
8318
  content: import_zod14.z.string().min(1).describe("Todo item text."),
8317
8319
  status: todoStatusSchema.describe("Todo status."),
8318
8320
  priority: todoPrioritySchema.optional().describe("Priority 1(high)-5(low). Default is 3."),
8319
- notes: import_zod14.z.string().optional().describe("Optional implementation notes."),
8320
- activeForm: import_zod14.z.string().optional().describe("Optional in-progress phrasing for UI display.")
8321
+ notes: import_zod14.z.string().optional().describe("Implementation notes."),
8322
+ activeForm: import_zod14.z.string().optional().describe("In-progress phrasing for UI display.")
8321
8323
  });
8322
8324
  var todoPatchItemSchema = import_zod14.z.object({
8323
8325
  id: import_zod14.z.string().min(1).describe("Target todo ID."),
8324
8326
  remove: import_zod14.z.boolean().optional().describe("Set true to remove the todo item."),
8325
- content: import_zod14.z.string().min(1).nullable().default(null).describe("Updated todo text (null keeps current)."),
8326
- status: todoStatusSchema.nullable().default(null).describe("Updated status (null keeps current)."),
8327
- priority: todoPrioritySchema.nullable().default(null).describe("Updated priority (null keeps current)."),
8328
- notes: import_zod14.z.string().nullable().default(null).describe("Updated notes (null keeps current, empty clears)."),
8329
- activeForm: import_zod14.z.string().nullable().default(null).describe(
8330
- "Updated in-progress phrasing (null keeps current, empty clears)."
8327
+ content: import_zod14.z.string().min(1).optional().describe("New todo text; omit to keep the current value."),
8328
+ status: todoStatusSchema.optional().describe("New status; omit to keep the current value."),
8329
+ priority: todoPrioritySchema.optional().describe("New priority; omit to keep the current value."),
8330
+ notes: import_zod14.z.string().optional().describe("New notes; omit to keep the current value, empty clears."),
8331
+ activeForm: import_zod14.z.string().optional().describe(
8332
+ "New in-progress phrasing; omit to keep the current value, empty clears."
8331
8333
  )
8332
8334
  });
8333
8335
  var todoNewInputSchema = import_zod14.z.object({
@@ -8394,11 +8396,11 @@ var withPatchApplied = (currentTodos, updates) => {
8394
8396
  const previous = nextInputs[index];
8395
8397
  nextInputs[index] = {
8396
8398
  ...previous,
8397
- content: update.content !== null ? update.content : previous.content,
8398
- status: update.status !== null ? update.status : previous.status,
8399
- priority: update.priority !== null ? update.priority : previous.priority,
8400
- notes: update.notes !== null ? update.notes : previous.notes,
8401
- activeForm: update.activeForm !== null ? update.activeForm : previous.activeForm
8399
+ content: update.content !== void 0 ? update.content : previous.content,
8400
+ status: update.status !== void 0 ? update.status : previous.status,
8401
+ priority: update.priority !== void 0 ? update.priority : previous.priority,
8402
+ notes: update.notes !== void 0 ? update.notes : previous.notes,
8403
+ activeForm: update.activeForm !== void 0 ? update.activeForm : previous.activeForm
8402
8404
  };
8403
8405
  }
8404
8406
  return { todos: normalizeTodoItems(nextInputs) };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  startRuntime
3
- } from "./chunk-2IAS4F2W.js";
3
+ } from "./chunk-XOARD2XH.js";
4
4
 
5
5
  // src/index.ts
6
6
  void startRuntime().catch((error) => {
package/dist/sdk.cjs CHANGED
@@ -5468,8 +5468,8 @@ var CONTENT_SHA256_PATTERN = /^[a-f0-9]{64}$/;
5468
5468
  var expectedContentHashSchema = import_zod5.z.string().regex(
5469
5469
  CONTENT_SHA256_PATTERN,
5470
5470
  "expected_hash must be a lowercase 64-character SHA-256 hash"
5471
- ).nullable().default(null).describe(
5472
- "Current full-content SHA-256 guard. Copy content_sha256 from a current read/read_line result or explicitly compute the same UTF-8 content hash."
5471
+ ).optional().describe(
5472
+ "Current full-content SHA-256 guard from read/read_line metadata. Omit when unavailable."
5473
5473
  );
5474
5474
  var hashUtf8Content = (content) => import_node_crypto4.default.createHash("sha256").update(content).digest("hex");
5475
5475
  var assertExpectedContentHash = (input) => {
@@ -7442,19 +7442,19 @@ var shellRunSchema = import_zod11.z.object({
7442
7442
  "Shell command to execute as a runtime-managed child process in the current workspace."
7443
7443
  ),
7444
7444
  label: import_zod11.z.string().max(SHELL_LABEL_MAX_CHARS).optional().describe(
7445
- `Optional short task label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7445
+ `Short label used to build the returned task key. Max ${SHELL_LABEL_MAX_CHARS} chars.`
7446
7446
  ),
7447
7447
  timeout: import_zod11.z.number().int().positive().optional().describe(
7448
- `Execution timeout in seconds. Foreground default: ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached-wait mode accepts larger values up to ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit to keep the managed child job running until completion, cancel, or runtime exit.`
7448
+ `Execution timeout in seconds. Foreground: default ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}. Detached: max ${MAX_EXECUTION_TIMEOUT_SECONDS}; omit for no execution timer.`
7449
7449
  ),
7450
7450
  detached_wait: import_zod11.z.boolean().optional().describe(
7451
- "Skip the attached wait and return the task key immediately. The runtime still owns the child process. Use this only for finite jobs you will later inspect, wait on, or cancel. If you need a service-style process to keep running independently, start it with an explicit OS/shell-native out-of-process method such as `nohup`, `setsid`, `disown`, a service manager, or `docker compose up -d`, and verify readiness separately. Default: false."
7451
+ "Return a task key immediately instead of waiting. The runtime owns the child until completion, cancellation, or runtime exit; use follow-up shell tools. Default: false."
7452
7452
  ),
7453
7453
  stdin_mode: shellStdinModeSchema.optional().describe(
7454
- "Child stdin behavior. Default: closed (immediate EOF). Use pipe only with detached_wait=true, then send bounded UTF-8 text with shell_stdin_write."
7454
+ "Child stdin: closed (default) or pipe. pipe requires detached_wait=true and shell_stdin_write."
7455
7455
  ),
7456
7456
  include_stderr_on_success: import_zod11.z.boolean().optional().describe(
7457
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7457
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7458
7458
  )
7459
7459
  }).superRefine((input, ctx) => {
7460
7460
  if (input.stdin_mode === "pipe" && input.detached_wait !== true) {
@@ -7512,7 +7512,7 @@ var shellStdinWriteSchema = shellTaskKeySchema.extend({
7512
7512
  });
7513
7513
  var shellSuccessStderrSchema = {
7514
7514
  include_stderr_on_success: import_zod11.z.boolean().optional().describe(
7515
- `Include stderr when the command succeeds. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}. Set true to include success-case stderr in terminal results.`
7515
+ `Include stderr on success. Default: ${String(SHELL_INCLUDE_STDERR_ON_SUCCESS_DEFAULT)}.`
7516
7516
  )
7517
7517
  };
7518
7518
  var shellWaitSchema = shellTaskKeySchema.extend({
@@ -7886,7 +7886,7 @@ var createShellTool = (sandboxKey, options = {}) => {
7886
7886
  const shared = getSharedDeps(options);
7887
7887
  return (0, import_core12.defineTool)({
7888
7888
  name: "shell",
7889
- description: "Run a shell command as a runtime-managed child process in the sandbox. Terminal results use `stdout`/`stderr` stream fields; successful results suppress `stderr` by default unless `include_stderr_on_success=true`, and `shell_logs` is available when you need explicit stream reads. By default wait for completion with stdin closed; with `detached_wait=true`, skip the attached wait and return compact JSON with the task key. Set stdin_mode=pipe only for detached tasks that need bounded follow-up writes through shell_stdin_write.",
7889
+ description: "Run a shell command as a managed child process in the sandbox. It waits with stdin closed by default; use detached_wait for a task key and stdin_mode=pipe only when follow-up shell_stdin_write calls are needed.",
7890
7890
  input: shellRunSchema,
7891
7891
  execute: async (input, ctx) => {
7892
7892
  const sandbox = await getSandboxContext(ctx, sandboxKey);
@@ -7954,7 +7954,7 @@ var createShellStdinWriteTool = (options = {}) => {
7954
7954
  const shared = getSharedDeps(options);
7955
7955
  return (0, import_core12.defineTool)({
7956
7956
  name: "shell_stdin_write",
7957
- description: "Write at most 64 KiB of UTF-8 text to a live local shell task started with detached_wait=true and stdin_mode=pipe. Writes are serialized and restricted to the same runtime and originating agent session. Use shell_logs to inspect output and shell_wait for completion.",
7957
+ description: "Write up to 64 KiB of UTF-8 text to a live shell task started with detached_wait=true and stdin_mode=pipe; use shell_logs or shell_wait afterward.",
7958
7958
  input: shellStdinWriteSchema,
7959
7959
  execute: async (input, ctx) => {
7960
7960
  try {
@@ -8051,7 +8051,7 @@ var createShellWaitTool = (options = {}) => {
8051
8051
  const shared = getSharedDeps(options);
8052
8052
  return (0, import_core12.defineTool)({
8053
8053
  name: "shell_wait",
8054
- description: "Wait for a shell task within a bounded window and return compact JSON describing either the running status or a terminal result with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8054
+ description: "Wait within a bounded window for a shell task, returning compact running status or its terminal stdout/stderr result.",
8055
8055
  input: shellWaitSchema,
8056
8056
  execute: async (input, ctx) => {
8057
8057
  try {
@@ -8086,7 +8086,7 @@ var createShellResultTool = (options = {}) => {
8086
8086
  const shared = getSharedDeps(options);
8087
8087
  return (0, import_core12.defineTool)({
8088
8088
  name: "shell_result",
8089
- description: "Read the retained terminal result for a shell task as compact JSON with `stdout`/`stderr` stream fields. Successful terminal results suppress `stderr` by default unless `include_stderr_on_success=true`; use `shell_logs` for explicit stream reads.",
8089
+ description: "Read a shell task's retained terminal stdout/stderr result, or its current status if still running.",
8090
8090
  input: shellResultSchema,
8091
8091
  execute: async (input) => {
8092
8092
  try {
@@ -8324,22 +8324,24 @@ var todoStore = /* @__PURE__ */ new Map();
8324
8324
  var todoStatusSchema = import_zod14.z.enum(["pending", "in_progress", "completed"]);
8325
8325
  var todoPrioritySchema = import_zod14.z.number().int().min(1).max(5);
8326
8326
  var todoItemSchema = import_zod14.z.object({
8327
- id: import_zod14.z.string().min(1).optional().describe("Optional stable ID. Keep if the task already exists."),
8327
+ id: import_zod14.z.string().min(1).optional().describe(
8328
+ "Stable ID. Omit to generate one; preserve the existing ID when replacing a known item."
8329
+ ),
8328
8330
  content: import_zod14.z.string().min(1).describe("Todo item text."),
8329
8331
  status: todoStatusSchema.describe("Todo status."),
8330
8332
  priority: todoPrioritySchema.optional().describe("Priority 1(high)-5(low). Default is 3."),
8331
- notes: import_zod14.z.string().optional().describe("Optional implementation notes."),
8332
- activeForm: import_zod14.z.string().optional().describe("Optional in-progress phrasing for UI display.")
8333
+ notes: import_zod14.z.string().optional().describe("Implementation notes."),
8334
+ activeForm: import_zod14.z.string().optional().describe("In-progress phrasing for UI display.")
8333
8335
  });
8334
8336
  var todoPatchItemSchema = import_zod14.z.object({
8335
8337
  id: import_zod14.z.string().min(1).describe("Target todo ID."),
8336
8338
  remove: import_zod14.z.boolean().optional().describe("Set true to remove the todo item."),
8337
- content: import_zod14.z.string().min(1).nullable().default(null).describe("Updated todo text (null keeps current)."),
8338
- status: todoStatusSchema.nullable().default(null).describe("Updated status (null keeps current)."),
8339
- priority: todoPrioritySchema.nullable().default(null).describe("Updated priority (null keeps current)."),
8340
- notes: import_zod14.z.string().nullable().default(null).describe("Updated notes (null keeps current, empty clears)."),
8341
- activeForm: import_zod14.z.string().nullable().default(null).describe(
8342
- "Updated in-progress phrasing (null keeps current, empty clears)."
8339
+ content: import_zod14.z.string().min(1).optional().describe("New todo text; omit to keep the current value."),
8340
+ status: todoStatusSchema.optional().describe("New status; omit to keep the current value."),
8341
+ priority: todoPrioritySchema.optional().describe("New priority; omit to keep the current value."),
8342
+ notes: import_zod14.z.string().optional().describe("New notes; omit to keep the current value, empty clears."),
8343
+ activeForm: import_zod14.z.string().optional().describe(
8344
+ "New in-progress phrasing; omit to keep the current value, empty clears."
8343
8345
  )
8344
8346
  });
8345
8347
  var todoNewInputSchema = import_zod14.z.object({
@@ -8406,11 +8408,11 @@ var withPatchApplied = (currentTodos, updates) => {
8406
8408
  const previous = nextInputs[index];
8407
8409
  nextInputs[index] = {
8408
8410
  ...previous,
8409
- content: update.content !== null ? update.content : previous.content,
8410
- status: update.status !== null ? update.status : previous.status,
8411
- priority: update.priority !== null ? update.priority : previous.priority,
8412
- notes: update.notes !== null ? update.notes : previous.notes,
8413
- activeForm: update.activeForm !== null ? update.activeForm : previous.activeForm
8411
+ content: update.content !== void 0 ? update.content : previous.content,
8412
+ status: update.status !== void 0 ? update.status : previous.status,
8413
+ priority: update.priority !== void 0 ? update.priority : previous.priority,
8414
+ notes: update.notes !== void 0 ? update.notes : previous.notes,
8415
+ activeForm: update.activeForm !== void 0 ? update.activeForm : previous.activeForm
8414
8416
  };
8415
8417
  }
8416
8418
  return { todos: normalizeTodoItems(nextInputs) };
package/dist/sdk.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  startRuntime
3
- } from "./chunk-2IAS4F2W.js";
3
+ } from "./chunk-XOARD2XH.js";
4
4
  export {
5
5
  startRuntime
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codelia/runtime",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20 <25"
@@ -28,14 +28,14 @@
28
28
  "typecheck": "tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@codelia/config": "0.1.74",
32
- "@codelia/config-loader": "0.1.74",
33
- "@codelia/core": "0.1.74",
34
- "@codelia/logger": "0.1.74",
35
- "@codelia/model-metadata": "0.1.74",
36
- "@codelia/protocol": "0.1.74",
37
- "@codelia/shared-types": "0.1.74",
38
- "@codelia/storage": "0.1.74",
31
+ "@codelia/config": "0.1.75",
32
+ "@codelia/config-loader": "0.1.75",
33
+ "@codelia/core": "0.1.75",
34
+ "@codelia/logger": "0.1.75",
35
+ "@codelia/model-metadata": "0.1.75",
36
+ "@codelia/protocol": "0.1.75",
37
+ "@codelia/shared-types": "0.1.75",
38
+ "@codelia/storage": "0.1.75",
39
39
  "eventsource-parser": "^3.0.6",
40
40
  "oauth4webapi": "^3.8.4",
41
41
  "zod": "^4.3.5"