@zhivex-ai/harness 1.2.0-rc.9 → 1.2.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +7 -7
  3. package/contracts/public-api.json +5 -0
  4. package/contracts/stable-api-signatures.json +28 -28
  5. package/dist/acp-cli.js +804 -545
  6. package/dist/cli/arguments.d.ts +2 -0
  7. package/dist/cli/cli-credentials.d.ts +1 -1
  8. package/dist/cli/cli-options.d.ts +1 -1
  9. package/dist/cli/cli-profiles.d.ts +15 -0
  10. package/dist/cli/cli-stream.d.ts +3 -3
  11. package/dist/cli/console/console-commands.d.ts +3 -3
  12. package/dist/cli/console/console-input.d.ts +22 -3
  13. package/dist/cli/console/console-navigation.d.ts +3 -0
  14. package/dist/cli/console/console-presentation.d.ts +8 -2
  15. package/dist/cli/console/console-reasoning.d.ts +3 -0
  16. package/dist/cli/presentation.d.ts +3 -0
  17. package/dist/cli/run-document.d.ts +4 -4
  18. package/dist/cli/terminal/activity-history.d.ts +15 -0
  19. package/dist/cli/terminal/tool-activity.d.ts +3 -1
  20. package/dist/{cli-2dxcfrz5.js → cli-3jmy4h5h.js} +348 -187
  21. package/dist/{cli-entry-t3bay5k5.js → cli-entry-427869g9.js} +287 -180
  22. package/dist/{cli-entry-0mhbpe8j.js → cli-entry-b1mfvmxe.js} +2 -1
  23. package/dist/{cli-entry-gddtj1db.js → cli-entry-c2f58zj2.js} +699 -139
  24. package/dist/cli.js +2 -2
  25. package/dist/client/json-contracts.d.ts +20 -0
  26. package/dist/{config-w1npe8mp.js → config-1k9t4jhh.js} +1 -1
  27. package/dist/context/task-memory.d.ts +2 -2
  28. package/dist/hostile-repository-demo.js +661 -448
  29. package/dist/index.js +1517 -1074
  30. package/dist/persistence/operations.d.ts +5 -1
  31. package/dist/persistence/state-backup-stream.d.ts +4 -0
  32. package/dist/providers/meta-replay.d.ts +1 -1
  33. package/dist/providers/qwen-context.d.ts +2 -0
  34. package/dist/providers/qwen-hosted-policy.d.ts +5 -0
  35. package/dist/providers/reasoning.d.ts +18 -0
  36. package/dist/runtime/config.d.ts +3 -0
  37. package/dist/runtime/error-diagnostics.d.ts +2 -0
  38. package/dist/runtime/harness.d.ts +1 -1
  39. package/dist/runtime/model-edit-references.d.ts +4 -2
  40. package/dist/runtime/runtime-policy.d.ts +5 -4
  41. package/dist/runtime/time-to-safe-fix.d.ts +6 -1
  42. package/dist/service-cli.js +820 -575
  43. package/dist/{service-client-cli-1c9j6xah.js → service-client-cli-yx56n0hc.js} +66 -8
  44. package/dist/tools/execution.d.ts +8 -8
  45. package/dist/tools/workspace.d.ts +16 -16
  46. package/dist/verify-historical-migrations.js +830 -574
  47. package/dist/workspace/file-security.d.ts +6 -0
  48. package/dist/zhx.js +2 -2
  49. package/docs/CLI.md +52 -1
  50. package/docs/DURABLE_OPERATIONS.md +8 -0
  51. package/docs/EXTENSIBILITY.md +1 -1
  52. package/docs/FIRST_USE.md +6 -6
  53. package/docs/MODEL_CATALOG.md +28 -1
  54. package/evaluations/representative-assembly-matrix.json +46 -1
  55. package/evaluations/representative-repositories-v2.jsonl +7 -0
  56. package/examples/README.md +4 -4
  57. package/package.json +7 -7
@@ -1,3 +1,4 @@
1
+ import { type HarnessReasoningEffort } from "../providers/reasoning.js";
1
2
  import { type AgentStatus } from "@zhivex-ai/agents";
2
3
  import { type HarnessSubagentProfile } from "../runtime/config.js";
3
4
  import { HarnessError } from "../runtime/errors.js";
@@ -21,6 +22,7 @@ export interface CliOptions {
21
22
  updateProfile?: boolean;
22
23
  provider?: string;
23
24
  model?: string;
25
+ reasoningEffort?: HarnessReasoningEffort;
24
26
  workspace?: string;
25
27
  stateDirectory?: string;
26
28
  storeBackend?: string;
@@ -52,4 +52,4 @@ export declare class CliCredentials {
52
52
  export declare function credentialModel(config: {
53
53
  provider: HarnessProvider;
54
54
  model: string;
55
- }, env: NodeJS.ProcessEnv, modelFactory?: typeof import("../runtime/config.js").createProviderModel): Promise<import("@zhivex-ai/agents").LanguageModel<import("@zhivex-ai/core").ProviderOptions>>;
55
+ }, env: NodeJS.ProcessEnv, modelFactory?: typeof import("../runtime/config.js").createProviderModel): Promise<import("@zhivex-ai/core").LanguageModel<import("@zhivex-ai/core").ProviderOptions>>;
@@ -8,7 +8,7 @@ export interface CliCommandOptionContract {
8
8
  repeatable: readonly string[];
9
9
  conflicts: Readonly<Record<string, readonly string[]>>;
10
10
  }
11
- export declare const CLI_OPTION_NAMES: readonly ["--compaction-model", "--compaction-provider", "--provider", "--model", "--profile", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--require-verified-delivery", "--execution", "--oci-runtime", "--oci-image", "--oci-allow-command", "--oci-shell", "--oci-max-process-runtime-ms", "--oci-max-process-output-bytes", "--oci-max-memory-mb", "--oci-max-pids", "--oci-max-cpus", "--oci-max-workspace-bytes", "--oci-max-file-write-bytes", "--oci-tmpfs-mb", "--store", "--tenant", "--user", "--namespace", "--idempotency-key", "--token-budget", "--context-tokens", "--no-token-budget", "--max-steps", "--timeout-ms", "--max-tool-calls", "--max-tool-errors", "--max-input-tokens", "--max-output-tokens", "--max-total-tokens", "--subagent-max-steps", "--subagent-max-tool-calls", "--subagent-max-tool-errors", "--subagent-max-input-tokens", "--subagent-max-output-tokens", "--subagent-max-total-tokens", "--subagent-timeout-ms", "--max-parallel-reviews", "--max-cost-usd", "--input-cost-per-million", "--output-cost-per-million", "--allow-check", "--require-capability", "--subagent", "--reviewer", "--approval-mode", "--yes", "--approve", "--deny", "--json", "--jsonl", "--session", "--continue", "--update", "--status", "--limit", "--cursor", "--before", "--reason", "--cascade", "--final", "--service", "--apply", "--help", "--version", "--search", "--pricing-file", "--usage-limit-usd"];
11
+ export declare const CLI_OPTION_NAMES: readonly ["--compaction-model", "--compaction-provider", "--provider", "--model", "--reasoning", "--profile", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--require-verified-delivery", "--execution", "--oci-runtime", "--oci-image", "--oci-allow-command", "--oci-shell", "--oci-max-process-runtime-ms", "--oci-max-process-output-bytes", "--oci-max-memory-mb", "--oci-max-pids", "--oci-max-cpus", "--oci-max-workspace-bytes", "--oci-max-file-write-bytes", "--oci-tmpfs-mb", "--store", "--tenant", "--user", "--namespace", "--idempotency-key", "--token-budget", "--context-tokens", "--no-token-budget", "--max-steps", "--timeout-ms", "--max-tool-calls", "--max-tool-errors", "--max-input-tokens", "--max-output-tokens", "--max-total-tokens", "--subagent-max-steps", "--subagent-max-tool-calls", "--subagent-max-tool-errors", "--subagent-max-input-tokens", "--subagent-max-output-tokens", "--subagent-max-total-tokens", "--subagent-timeout-ms", "--max-parallel-reviews", "--max-cost-usd", "--input-cost-per-million", "--output-cost-per-million", "--allow-check", "--require-capability", "--subagent", "--reviewer", "--approval-mode", "--yes", "--approve", "--deny", "--json", "--jsonl", "--session", "--continue", "--update", "--status", "--limit", "--cursor", "--before", "--reason", "--cascade", "--final", "--service", "--apply", "--help", "--version", "--search", "--pricing-file", "--usage-limit-usd"];
12
12
  export type CliOptionName = (typeof CLI_OPTION_NAMES)[number];
13
13
  export declare const CLI_OPTION_DEFINITIONS: Readonly<Record<CliOptionName, CliOptionDefinition>>;
14
14
  export declare const CLI_COMMAND_OPTION_CONTRACTS: {
@@ -1,3 +1,4 @@
1
+ import { type HarnessReasoningEffort } from "../providers/reasoning.js";
1
2
  import { z } from "zod";
2
3
  import { type HarnessConfigInput, type HarnessProvider } from "../runtime/config.js";
3
4
  export declare const CLI_PROFILE_SCHEMA_VERSION: 1;
@@ -11,6 +12,16 @@ export declare const cliProfileSchema: z.ZodObject<{
11
12
  openai: "openai";
12
13
  qwen: "qwen";
13
14
  }>;
15
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
16
+ default: "default";
17
+ high: "high";
18
+ low: "low";
19
+ max: "max";
20
+ medium: "medium";
21
+ minimal: "minimal";
22
+ none: "none";
23
+ xhigh: "xhigh";
24
+ }>>;
14
25
  model: z.ZodString;
15
26
  }, z.core.$strict>;
16
27
  export type CliProfile = z.infer<typeof cliProfileSchema>;
@@ -26,11 +37,13 @@ export declare const loadCliProfile: (name: string, context?: CliProfilePathCont
26
37
  export declare const createCliProfile: (name: string, input: {
27
38
  provider: HarnessProvider;
28
39
  model: string;
40
+ reasoningEffort?: HarnessReasoningEffort;
29
41
  }, context?: CliProfilePathContext) => Promise<{
30
42
  path: string;
31
43
  profile: {
32
44
  schemaVersion: 1;
33
45
  provider: "gemini" | "meta" | "openai" | "qwen";
46
+ reasoningEffort?: "default" | "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | undefined;
34
47
  model: string;
35
48
  };
36
49
  }>;
@@ -38,11 +51,13 @@ export declare const createCliProfile: (name: string, input: {
38
51
  export declare const updateCliProfile: (name: string, input: {
39
52
  provider: HarnessProvider;
40
53
  model: string;
54
+ reasoningEffort?: HarnessReasoningEffort;
41
55
  }, context?: CliProfilePathContext) => Promise<{
42
56
  path: string;
43
57
  profile: {
44
58
  schemaVersion: 1;
45
59
  provider: "gemini" | "meta" | "openai" | "qwen";
60
+ reasoningEffort?: "default" | "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | undefined;
46
61
  model: string;
47
62
  };
48
63
  }>;
@@ -112,7 +112,7 @@ export declare const streamEventDocument: (event: AgentStreamEvent, sequence?: n
112
112
  sequence: number;
113
113
  type: "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish" | "agent-run-start" | "agent-run-update" | "agent-step-finish" | "agent-step-start" | "error" | "finish" | "image-generation" | "provider-data" | "text-delta" | "tool-approval-request" | "tool-call" | "tool-result";
114
114
  stepIndex: number;
115
- status: import("@zhivex-ai/agents").AgentStepStatus;
115
+ status: import("@zhivex-ai/core").AgentStepStatus;
116
116
  toolCalls: number;
117
117
  } | {
118
118
  schemaVersion: 1;
@@ -120,7 +120,7 @@ export declare const streamEventDocument: (event: AgentStreamEvent, sequence?: n
120
120
  sequence: number;
121
121
  type: "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish" | "agent-run-start" | "agent-run-update" | "agent-step-finish" | "agent-step-start" | "error" | "finish" | "image-generation" | "provider-data" | "text-delta" | "tool-approval-request" | "tool-call" | "tool-result";
122
122
  compactionId: string;
123
- reasons: import("@zhivex-ai/agents").AgentCompactionReason[];
123
+ reasons: import("@zhivex-ai/core").AgentCompactionReason[];
124
124
  messageCountBefore: number;
125
125
  messageCountAfter: number;
126
126
  } | {
@@ -129,7 +129,7 @@ export declare const streamEventDocument: (event: AgentStreamEvent, sequence?: n
129
129
  sequence: number;
130
130
  type: "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish" | "agent-run-start" | "agent-run-update" | "agent-step-finish" | "agent-step-start" | "error" | "finish" | "image-generation" | "provider-data" | "text-delta" | "tool-approval-request" | "tool-call" | "tool-result";
131
131
  runId: string;
132
- status: import("@zhivex-ai/agents").AgentStatus;
132
+ status: import("@zhivex-ai/core").AgentStatus;
133
133
  provider: string;
134
134
  model: string;
135
135
  } | undefined;
@@ -1,6 +1,6 @@
1
1
  /** Presentation shared by the direct console and the local-service client. */
2
- export declare const CONSOLE_COMMAND_CATALOG: readonly [readonly ["/menu", "Open navigation menu", true], readonly ["/help", "Show commands; /help all shows everything", true], readonly ["/connection", "Inspect credentials and optionally test selected model access", false], readonly ["/credentials", "Manage provider keys in the system keychain or this session", false], readonly ["/provider", "Select a provider", false], readonly ["/model", "Select a model", false], readonly ["/route", "Configure specialist model routes", false], readonly ["/status", "Inspect the current session and run", true], readonly ["/diff", "Review workspace changes", false], readonly ["/review", "Review a task", false], readonly ["/resume", "Reopen a conversation by session ID", true], readonly ["/pending", "Inspect pending approvals", true], readonly ["/approve", "Approve the pending actions", true], readonly ["/deny", "Deny the pending actions", true], readonly ["/approvals", "Change approval mode for this CLI session", false], readonly ["/continue", "Continue an interrupted task with retained results in a new run", false], readonly ["/compact", "Compact conversation context", false], readonly ["/compaction", "Choose a compaction model or inspect recommendations", false], readonly ["/new", "Start a new conversation", true], readonly ["/rename", "Rename the current conversation", true], readonly ["/clear", "Clear conversation context", false], readonly ["/exit", "Exit the console", true], readonly ["/paste", "Compose a literal multiline draft", true], readonly ["/verbose", "Toggle full or compact activity details", false], readonly ["/context", "Inspect project rules and selected context", false], readonly ["/attach", "Attach a workspace file to the next request", false], readonly ["/attachments", "List selected attachments", false], readonly ["/detach", "Remove selected attachments", false], readonly ["/sessions", "Find saved conversations", true], readonly ["/limits", "Inspect or change the step limit for next turns", false], readonly ["/usage", "Inspect transport usage", false], readonly ["/cancel", "Cancel the active run", true]];
2
+ export declare const CONSOLE_COMMAND_CATALOG: readonly [readonly ["/menu", "Open navigation menu", true], readonly ["/help", "Show commands; /help all shows everything", true], readonly ["/connection", "Inspect credentials and optionally test selected model access", false], readonly ["/credentials", "Manage provider keys in the system keychain or this session", false], readonly ["/provider", "Select a provider", false], readonly ["/model", "Select a model and reasoning effort", false], readonly ["/reasoning", "Choose reasoning effort for the current model", false], readonly ["/route", "Configure specialist model routes", false], readonly ["/status", "Inspect the current session and run", true], readonly ["/diff", "Review workspace changes", false], readonly ["/review", "Review a task", false], readonly ["/resume", "Reopen a conversation by session ID", true], readonly ["/pending", "Inspect pending approvals", true], readonly ["/approve", "Approve the pending actions", true], readonly ["/deny", "Deny the pending actions", true], readonly ["/approvals", "Change approval mode for this CLI session", false], readonly ["/continue", "Continue an interrupted task with retained results in a new run", false], readonly ["/compact", "Compact conversation context", false], readonly ["/compaction", "Choose a compaction model or inspect recommendations", false], readonly ["/new", "Start a new conversation", true], readonly ["/rename", "Rename the current conversation", true], readonly ["/clear", "Clear conversation context", false], readonly ["/exit", "Exit the console", true], readonly ["/paste", "Compose a literal multiline draft", true], readonly ["/activity", "Show recent activity; /activity clear resets it", true], readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true], readonly ["/verbose", "Toggle full or compact activity details", false], readonly ["/context", "Inspect project rules and selected context", false], readonly ["/attach", "Attach a workspace file to the next request", false], readonly ["/attachments", "List selected attachments", false], readonly ["/detach", "Remove selected attachments", false], readonly ["/sessions", "Find saved conversations", true], readonly ["/limits", "Inspect or change the step limit for next turns", false], readonly ["/usage", "Inspect transport usage", false], readonly ["/cancel", "Cancel the active run", true]];
3
3
  export type ConsoleMode = "direct" | "service";
4
- export declare const consoleCommands: (mode?: ConsoleMode) => (readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
5
- export declare const searchConsoleCommands: (query: string, mode?: ConsoleMode) => (readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
4
+ export declare const consoleCommands: (mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
5
+ export declare const searchConsoleCommands: (query: string, mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
6
6
  export declare const formatConsoleHelp: (mode?: ConsoleMode, all?: boolean) => string;
@@ -1,14 +1,20 @@
1
1
  import { type Readable, Writable } from "node:stream";
2
+ import { type ConsoleComposerInput } from "./console-presentation.js";
2
3
  import { type ConsoleMode } from "./console-commands.js";
3
- export declare const CONSOLE_COMMANDS: ("/approvals" | "/approve" | "/attach" | "/attachments" | "/cancel" | "/clear" | "/compact" | "/compaction" | "/connection" | "/context" | "/continue" | "/credentials" | "/deny" | "/detach" | "/diff" | "/exit" | "/help" | "/limits" | "/menu" | "/model" | "/new" | "/paste" | "/pending" | "/provider" | "/rename" | "/resume" | "/review" | "/route" | "/sessions" | "/status" | "/usage" | "/verbose")[];
4
+ export declare const CONSOLE_COMMANDS: ("/activity" | "/approvals" | "/approve" | "/attach" | "/attachments" | "/cancel" | "/clear" | "/compact" | "/compaction" | "/connection" | "/context" | "/continue" | "/credentials" | "/deny" | "/detach" | "/diff" | "/exit" | "/help" | "/limits" | "/menu" | "/model" | "/new" | "/paste" | "/pending" | "/provider" | "/queue" | "/reasoning" | "/rename" | "/resume" | "/review" | "/route" | "/sessions" | "/status" | "/usage" | "/verbose")[];
4
5
  export declare const MAX_CONSOLE_INPUT_BYTES: number;
5
6
  export declare const completeConsoleCommand: (line: string) => [string[], string];
6
- /** Lines received without an active question are discarded, never replayed as approvals. */
7
+ /** Background drafts and queued tasks are separate from fresh approval answers. */
7
8
  export declare class ConsoleInput {
8
9
  private readonly input;
9
10
  private readonly output;
10
11
  private readonly terminal;
11
12
  private readonly mode;
13
+ private background;
14
+ private backgroundDraft;
15
+ private queued;
16
+ private queueNotice;
17
+ private queueEnabled;
12
18
  private hidden;
13
19
  private readonly reader;
14
20
  private readonly keyboard;
@@ -44,12 +50,18 @@ export declare class ConsoleInput {
44
50
  private historyMatches;
45
51
  private finishHistorySearch;
46
52
  private menuVisible;
53
+ private placeholderVisible;
54
+ private focusComposer;
47
55
  private menuSelection;
48
56
  private menuQuery;
49
57
  private menuDismissed;
50
58
  private escapeMenuTimer;
51
59
  private standaloneMenuEscape;
52
60
  private hideMenu;
61
+ /** Place overlays after the entire draft, even when editing an earlier line. */
62
+ private draftPosition;
63
+ private showOverlay;
64
+ private renderFocus;
53
65
  private renderMenu;
54
66
  private readonly onEnd;
55
67
  private readonly onResize;
@@ -59,10 +71,17 @@ export declare class ConsoleInput {
59
71
  private insert;
60
72
  private readonly onKeypress;
61
73
  rememberPrompt(prompt: string, literal?: boolean): void;
74
+ startBackground(): void;
75
+ stopBackground(): void;
76
+ get backgroundStatus(): string;
77
+ queueSummary(): string;
78
+ setQueueEnabled(enabled: boolean): void;
79
+ clearQueue(): void;
62
80
  clearHistory(): void;
63
81
  private interrupt;
64
82
  get isClosed(): boolean;
65
- question(prompt: string, completeCommands?: boolean): Promise<string>;
83
+ compose(input: ConsoleComposerInput): Promise<string>;
84
+ question(prompt: string, completeCommands?: boolean, focus?: boolean): Promise<string>;
66
85
  multiline(): Promise<string>;
67
86
  close(): void;
68
87
  }
@@ -1,3 +1,4 @@
1
+ import type { HarnessReasoningEffort } from "../../providers/reasoning.js";
1
2
  import type { ConsoleInput } from "./console-input.js";
2
3
  import { type ModelCatalog } from "../../models/catalog.js";
3
4
  import type { ProviderAvailability } from "../../providers/providers.js";
@@ -12,12 +13,14 @@ export type ConsoleNavigationResult = {
12
13
  } | {
13
14
  provider: string;
14
15
  model: string;
16
+ reasoningEffort?: HarnessReasoningEffort;
15
17
  };
16
18
  export declare const navigateConsole: (input: Pick<ConsoleInput, "select" | "question">, options: {
17
19
  entry: "menu" | "provider" | "model";
18
20
  current: {
19
21
  provider: string;
20
22
  model: string;
23
+ reasoningEffort?: HarnessReasoningEffort;
21
24
  };
22
25
  providers: readonly ProviderAvailability[];
23
26
  sessions: () => Promise<readonly {
@@ -1,13 +1,19 @@
1
1
  /** Bound presentation metadata without allowing paths/titles to control the terminal. */
2
2
  export declare const consoleLabel: (text: string, width: number) => string;
3
- export declare const formatComposer: (input: {
3
+ export interface ConsoleComposerInput {
4
4
  model: string;
5
+ reasoning?: string;
5
6
  title?: string;
6
7
  status: string;
7
8
  attachments?: number;
8
9
  automaticApprovals?: boolean;
9
10
  approvalMode?: "ask" | "auto" | "restricted";
10
- }, columns?: number, color?: boolean) => string;
11
+ }
12
+ export declare const consoleWidth: (columns?: number) => number;
13
+ /** Focus keeps policy and pending decisions ahead of optional presentation metadata. */
14
+ export declare const formatComposer: (input: ConsoleComposerInput, columns?: number, color?: boolean) => string;
15
+ export declare const formatComposerFooter: (columns?: number, color?: boolean) => string[];
16
+ export declare const formatComposerPlaceholder: (columns?: number, color?: boolean) => string;
11
17
  export declare const CONSOLE_SHORTCUTS: string;
12
18
  export declare const chooseConsoleItem: <T>(title: string, items: readonly {
13
19
  value: T;
@@ -0,0 +1,3 @@
1
+ import { type HarnessReasoningEffort } from "../../providers/reasoning.js";
2
+ import type { ConsoleInput } from "./console-input.js";
3
+ export declare const chooseReasoning: (input: Pick<ConsoleInput, "select">, provider: string, model: string, current?: HarnessReasoningEffort) => Promise<HarnessReasoningEffort | undefined>;
@@ -1,3 +1,4 @@
1
+ import type { ActivityHistory } from "./terminal/activity-history.js";
1
2
  import { TerminalMarkdown } from "./terminal/terminal-markdown.js";
2
3
  import { type AgentApprovalRequest, type AgentApprovalResponse, type AgentRunOutput, type AgentStreamEvent } from "@zhivex-ai/agents";
3
4
  import { type HarnessRunOptions, type ZhivexHarness } from "../runtime/harness.js";
@@ -23,5 +24,7 @@ export declare const streamSink: (output: Pick<CliOptions, "json" | "jsonl">, tr
23
24
  streamedText: boolean;
24
25
  sequence?: number;
25
26
  markdown?: TerminalMarkdown;
27
+ activityHistory?: ActivityHistory;
28
+ inputStatus?: () => string;
26
29
  }, compact?: boolean) => (event: AgentStreamEvent) => Promise<void>;
27
30
  export declare const orchestrationObserver: (json: boolean) => AgentTelemetryObserver;
@@ -4,7 +4,7 @@ export declare const runResultDocument: (result: AgentRunOutput, harness: Zhivex
4
4
  schemaVersion: 1;
5
5
  kind: "run-result";
6
6
  runId: string;
7
- status: import("@zhivex-ai/agents").AgentStatus;
7
+ status: import("@zhivex-ai/core").AgentStatus;
8
8
  provider: string;
9
9
  model: string;
10
10
  output: string;
@@ -32,7 +32,7 @@ export declare const runResultDocument: (result: AgentRunOutput, harness: Zhivex
32
32
  runId: string;
33
33
  agentId: string | undefined;
34
34
  toolName: string | undefined;
35
- status: import("@zhivex-ai/agents").AgentStatus;
35
+ status: import("@zhivex-ai/core").AgentStatus;
36
36
  steps: number;
37
37
  toolCalls: number;
38
38
  toolErrors: number;
@@ -61,7 +61,7 @@ export declare const runResultDocument: (result: AgentRunOutput, harness: Zhivex
61
61
  priceStatuses: ("estimate" | "missing" | "stale")[];
62
62
  }[];
63
63
  } | null;
64
- budget: import("@zhivex-ai/agents").AgentBudgetStatus;
64
+ budget: import("@zhivex-ai/core").AgentBudgetStatus;
65
65
  costBudget?: {
66
66
  limitUsd: number;
67
67
  estimate: import("@zhivex-ai/core").CostEstimate;
@@ -75,7 +75,7 @@ export declare const runResultDocument: (result: AgentRunOutput, harness: Zhivex
75
75
  };
76
76
  execution: {
77
77
  backend: "oci";
78
- binding: import("@zhivex-ai/agents").AgentExecutionEnvironmentBinding | undefined;
78
+ binding: import("@zhivex-ai/core").AgentExecutionEnvironmentBinding | undefined;
79
79
  image: import("../index.js").OciImageInspection;
80
80
  } | {
81
81
  binding?: never;
@@ -0,0 +1,15 @@
1
+ import type { AgentStreamEvent } from "@zhivex-ai/agents";
2
+ import type { MutationAuditEntry } from "../../workspace/edit-contracts.js";
3
+ /** Bounded in-memory activity, not model reasoning or raw tool payloads. */
4
+ export declare class ActivityHistory {
5
+ private lines;
6
+ private started;
7
+ private dropped;
8
+ clear(): void;
9
+ add(text: string): void;
10
+ observe(event: AgentStreamEvent): void;
11
+ observeService(event: Record<string, unknown>): void;
12
+ render(): string;
13
+ }
14
+ /** Only workspace-owned committed mutation receipts may supply file labels. */
15
+ export declare const formatAppliedFiles: (entries: readonly Pick<MutationAuditEntry, "operation" | "path" | "destination">[], reviewHint?: string) => string;
@@ -3,13 +3,15 @@ export declare class ToolActivity {
3
3
  private write;
4
4
  private tty;
5
5
  private columns;
6
+ private inputStatus;
6
7
  private active;
7
8
  private visible;
8
9
  private label;
9
10
  private completed;
10
11
  private started;
12
+ private readonly runStarted;
11
13
  private timer;
12
- constructor(write: (text: string) => void, tty: boolean, columns?: () => number);
14
+ constructor(write: (text: string) => void, tty: boolean, columns?: () => number, inputStatus?: () => string);
13
15
  phase(label: "Waiting for model response" | "Waiting for approval" | "Updating context", _step?: number): void;
14
16
  start(name?: string): void;
15
17
  finish(name: string, success?: boolean): void;