@zhivex-ai/harness 1.2.0-rc.8 → 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.
- package/CHANGELOG.md +43 -0
- package/README.md +7 -7
- package/contracts/public-api.json +5 -0
- package/contracts/stable-api-signatures.json +28 -28
- package/dist/acp-cli.js +1096 -609
- package/dist/cli/arguments.d.ts +2 -0
- package/dist/cli/cli-credentials.d.ts +1 -1
- package/dist/cli/cli-options.d.ts +1 -1
- package/dist/cli/cli-profiles.d.ts +15 -0
- package/dist/cli/cli-stream.d.ts +3 -3
- package/dist/cli/console/console-commands.d.ts +3 -3
- package/dist/cli/console/console-input.d.ts +22 -3
- package/dist/cli/console/console-navigation.d.ts +3 -0
- package/dist/cli/console/console-presentation.d.ts +8 -2
- package/dist/cli/console/console-reasoning.d.ts +3 -0
- package/dist/cli/presentation.d.ts +3 -0
- package/dist/cli/run-document.d.ts +4 -4
- package/dist/cli/terminal/activity-history.d.ts +15 -0
- package/dist/cli/terminal/tool-activity.d.ts +11 -1
- package/dist/{cli-7nj89dq0.js → cli-3jmy4h5h.js} +385 -217
- package/dist/{cli-entry-t3bay5k5.js → cli-entry-427869g9.js} +287 -180
- package/dist/{cli-entry-0mhbpe8j.js → cli-entry-b1mfvmxe.js} +2 -1
- package/dist/{cli-entry-hkxakkng.js → cli-entry-c2f58zj2.js} +998 -210
- package/dist/cli.js +2 -2
- package/dist/client/json-contracts.d.ts +20 -0
- package/dist/{config-w1npe8mp.js → config-1k9t4jhh.js} +1 -1
- package/dist/context/compaction.d.ts +1 -1
- package/dist/context/semantic-compaction.d.ts +1 -1
- package/dist/context/task-memory.d.ts +2 -2
- package/dist/hostile-repository-demo.js +950 -509
- package/dist/index.js +1803 -1132
- package/dist/persistence/operations.d.ts +5 -1
- package/dist/persistence/state-backup-stream.d.ts +4 -0
- package/dist/providers/meta-replay.d.ts +1 -1
- package/dist/providers/qwen-context.d.ts +2 -0
- package/dist/providers/qwen-hosted-policy.d.ts +5 -0
- package/dist/providers/reasoning.d.ts +18 -0
- package/dist/runtime/config.d.ts +3 -0
- package/dist/runtime/error-diagnostics.d.ts +2 -0
- package/dist/runtime/harness.d.ts +1 -1
- package/dist/runtime/model-edit-references.d.ts +4 -2
- package/dist/runtime/progress-monitor.d.ts +6 -2
- package/dist/runtime/runtime-policy.d.ts +5 -4
- package/dist/runtime/time-to-safe-fix.d.ts +6 -1
- package/dist/service-cli.js +1112 -639
- package/dist/{service-client-cli-s3ee2hrj.js → service-client-cli-yx56n0hc.js} +66 -8
- package/dist/tools/dependency-read.d.ts +51 -4
- package/dist/tools/execution.d.ts +8 -8
- package/dist/tools/workspace.d.ts +27 -16
- package/dist/verify-historical-migrations.js +1122 -638
- package/dist/workspace/file-security.d.ts +6 -0
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +75 -23
- package/docs/CONTEXT_ENGINEERING.md +25 -5
- package/docs/DURABLE_OPERATIONS.md +8 -0
- package/docs/EXTENSIBILITY.md +1 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/MODEL_CATALOG.md +28 -1
- package/evaluations/representative-assembly-matrix.json +55 -1
- package/evaluations/representative-repositories-v2.jsonl +7 -0
- package/examples/README.md +4 -4
- package/package.json +7 -7
package/dist/cli/arguments.d.ts
CHANGED
|
@@ -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/
|
|
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
|
}>;
|
package/dist/cli/cli-stream.d.ts
CHANGED
|
@@ -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/
|
|
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/
|
|
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/
|
|
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
|
-
/**
|
|
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
|
-
|
|
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
|
|
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
|
-
}
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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,18 +3,28 @@ 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;
|
|
16
18
|
private begin;
|
|
17
19
|
private render;
|
|
20
|
+
/** Hide progress while prose or a receipt is printed, preserving the cumulative counts. */
|
|
21
|
+
pause(): void;
|
|
18
22
|
private clear;
|
|
19
23
|
flush(): void;
|
|
20
24
|
}
|
|
25
|
+
/** Render only fixed categories. Never echo paths, arguments, outputs, or arbitrary errors. */
|
|
26
|
+
export declare const compactToolResult: (result: {
|
|
27
|
+
toolName: string;
|
|
28
|
+
isError?: boolean;
|
|
29
|
+
error?: unknown;
|
|
30
|
+
}) => string | undefined;
|