@zhivex-ai/harness 1.1.1 → 1.2.0-rc.8
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 +125 -0
- package/README.md +14 -7
- package/SECURITY.md +1 -1
- package/SUPPORT.md +3 -3
- package/benchmarks/README.md +17 -0
- package/contracts/public-api.json +90 -5
- package/contracts/stable-api-signatures.json +37 -37
- package/dist/acp-cli.d.ts +2 -0
- package/dist/acp-cli.js +15451 -0
- package/dist/cli/arguments.d.ts +5 -1
- package/dist/cli/cli-credentials.d.ts +5 -0
- package/dist/cli/cli-options.d.ts +1 -1
- package/dist/cli/console/console-budget.d.ts +9 -0
- package/dist/cli/console/console-commands.d.ts +3 -3
- package/dist/cli/console/console-compaction.d.ts +18 -0
- package/dist/cli/console/console-input.d.ts +1 -1
- package/dist/cli/console/console-presentation.d.ts +1 -0
- package/dist/cli/console/console-progress.d.ts +6 -0
- package/dist/cli/doctor.d.ts +2 -2
- package/dist/cli/presentation.d.ts +5 -1
- package/dist/cli/qwen-connection.d.ts +23 -0
- package/dist/cli/terminal/session-grants.d.ts +4 -0
- package/dist/cli/terminal/terminal-markdown.d.ts +7 -4
- package/dist/cli/terminal/terminal-table.d.ts +6 -0
- package/dist/cli/terminal/terminal-ui.d.ts +3 -0
- package/dist/cli/terminal/tool-activity.d.ts +10 -9
- package/dist/cli/tool-execution.d.ts +1 -0
- package/dist/cli-7nj89dq0.js +5630 -0
- package/dist/cli-entry-0mhbpe8j.js +375 -0
- package/dist/cli-entry-1bx83sw4.js +4 -0
- package/dist/cli-entry-64pdp3k5.js +17 -0
- package/dist/cli-entry-hkxakkng.js +12814 -0
- package/dist/cli-entry-t3bay5k5.js +1902 -0
- package/dist/cli-entry.d.ts +2 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +15 -19168
- package/dist/client/acp-stdio.d.ts +9 -0
- package/dist/client/acp.d.ts +18 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/json-contracts.d.ts +2 -8
- package/dist/config-w1npe8mp.js +59 -0
- package/dist/context/adaptive-compaction.d.ts +2 -0
- package/dist/context/compaction.d.ts +3 -1
- package/dist/context/qwen-reasoning.d.ts +5 -0
- package/dist/context/scoped-context.d.ts +61 -0
- package/dist/context/semantic-compaction.d.ts +21 -0
- package/dist/context/task-memory.d.ts +11 -6
- package/dist/execution/execution-environment.d.ts +5 -0
- package/dist/execution/oci-observability.d.ts +2 -0
- package/dist/execution/patch-diagnostics.d.ts +6 -0
- package/dist/hostile-repository-demo.js +4034 -1791
- package/dist/index.d.ts +13 -1
- package/dist/index.js +14954 -11676
- package/dist/integrations/mcp.d.ts +23 -3
- package/dist/models/catalog.d.ts +76 -0
- package/dist/models/compaction-recommendations.d.ts +28 -0
- package/dist/models/sdk-catalog-adapter.d.ts +7 -0
- package/dist/persistence/operations.d.ts +5 -5
- package/dist/persistence/state-backup.d.ts +52 -0
- package/dist/persistence/state-gitignore.d.ts +2 -0
- package/dist/persistence/workspace-checkpoints.d.ts +149 -0
- package/dist/providers/meta-continuation.d.ts +1 -1
- package/dist/providers/meta-errors.d.ts +2 -0
- package/dist/providers/meta-replay.d.ts +2 -0
- package/dist/runtime/config.d.ts +9 -3
- package/dist/runtime/context-runtime.d.ts +12 -0
- package/dist/runtime/error-diagnostics.d.ts +639 -0
- package/dist/runtime/harness.d.ts +13 -4
- package/dist/runtime/model-edit-references.d.ts +6 -0
- package/dist/runtime/oci-delivery.d.ts +17 -0
- package/dist/runtime/progress-monitor.d.ts +29 -0
- package/dist/runtime/provider-diagnostics.d.ts +35 -0
- package/dist/runtime/runtime-checkpoints.d.ts +3 -0
- package/dist/runtime/runtime-diagnostics.d.ts +5 -5
- package/dist/runtime/runtime-policy.d.ts +9 -2
- package/dist/runtime/time-to-safe-fix.d.ts +303 -1
- package/dist/runtime/tool-execution.d.ts +11 -0
- package/dist/runtime/tool-policy.d.ts +55 -0
- package/dist/runtime/tool-scheduling.d.ts +5 -0
- package/dist/runtime/usage-ledger.d.ts +1 -0
- package/dist/service-cli.js +9810 -7483
- package/dist/service-client-cli-s3ee2hrj.js +1028 -0
- package/dist/tools/dependency-read.d.ts +16 -0
- package/dist/tools/workspace.d.ts +5 -0
- package/dist/verify-historical-migrations.js +4435 -2084
- package/dist/zhx.js +15 -19168
- package/docs/ACP.md +55 -0
- package/docs/CLI.md +238 -27
- package/docs/CONTEXT_ENGINEERING.md +162 -18
- package/docs/CREDENTIALS.md +38 -6
- package/docs/DURABLE_OPERATIONS.md +2 -0
- package/docs/EXTENSIBILITY.md +101 -4
- package/docs/FIRST_USE.md +7 -5
- package/docs/MODEL_CATALOG.md +24 -0
- package/docs/README.md +1 -0
- package/docs/REPOSITORY_EDITING.md +42 -0
- package/docs/STABILITY.md +2 -0
- package/docs/SUPPORT_MATRIX_1_1.md +17 -0
- package/docs/USAGE.md +9 -0
- package/docs/WORKSPACE_CHECKPOINTS.md +27 -0
- package/docs/images/cli-conversation.png +0 -0
- package/docs/support-matrix-1.1.json +29 -0
- package/evaluations/golden-expectations.json +5 -0
- package/evaluations/representative-assembly-matrix.json +100 -1
- package/examples/README.md +2 -2
- package/package.json +17 -11
package/dist/cli/arguments.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ type SessionsCommand = (typeof CLI_SESSIONS_COMMANDS)[number];
|
|
|
12
12
|
type ChangesCommand = (typeof CLI_CHANGES_COMMANDS)[number];
|
|
13
13
|
type StateCommand = (typeof CLI_STATE_COMMANDS)[number];
|
|
14
14
|
export interface CliOptions {
|
|
15
|
+
compactionModel?: string;
|
|
16
|
+
compactionProvider?: string;
|
|
15
17
|
serviceFile?: string;
|
|
16
18
|
command: Command;
|
|
17
19
|
helpTopic?: string;
|
|
@@ -30,6 +32,7 @@ export interface CliOptions {
|
|
|
30
32
|
maxToolCalls?: number;
|
|
31
33
|
maxToolErrors?: number;
|
|
32
34
|
unlimitedTokens?: boolean;
|
|
35
|
+
compactionMaxEstimatedInputTokens?: number;
|
|
33
36
|
maxInputTokens?: number;
|
|
34
37
|
maxOutputTokens?: number;
|
|
35
38
|
maxTotalTokens?: number;
|
|
@@ -50,7 +53,7 @@ export interface CliOptions {
|
|
|
50
53
|
subagentTimeoutMs?: number;
|
|
51
54
|
maxParallelReviews?: number;
|
|
52
55
|
executionBackend?: string;
|
|
53
|
-
|
|
56
|
+
requireVerifiedDelivery?: boolean;
|
|
54
57
|
ociRuntime?: string;
|
|
55
58
|
ociImage?: string;
|
|
56
59
|
ociAllowedCommands?: string[];
|
|
@@ -94,6 +97,7 @@ export interface CliOptions {
|
|
|
94
97
|
final: boolean;
|
|
95
98
|
apply: boolean;
|
|
96
99
|
yes: boolean;
|
|
100
|
+
approvalMode?: "ask" | "auto" | "restricted";
|
|
97
101
|
approve?: boolean;
|
|
98
102
|
json: boolean;
|
|
99
103
|
jsonl: boolean;
|
|
@@ -11,6 +11,7 @@ export interface CredentialInput {
|
|
|
11
11
|
detail?: string;
|
|
12
12
|
}[]): Promise<T | undefined>;
|
|
13
13
|
secret(prompt: string): Promise<string>;
|
|
14
|
+
question?(prompt: string): Promise<string>;
|
|
14
15
|
}
|
|
15
16
|
export type EntryFactory = (provider: string) => Promise<SecretEntry>;
|
|
16
17
|
export type CredentialStatus = {
|
|
@@ -29,10 +30,14 @@ export declare class CliCredentials {
|
|
|
29
30
|
private readonly write;
|
|
30
31
|
private readonly temporary;
|
|
31
32
|
revision: number;
|
|
33
|
+
private qwenManaged;
|
|
34
|
+
private qwenOverrideAccepted;
|
|
32
35
|
constructor(entry?: EntryFactory, environment?: NodeJS.ProcessEnv, write?: (text: string) => void);
|
|
33
36
|
private environmentKey;
|
|
34
37
|
private validate;
|
|
35
38
|
private saved;
|
|
39
|
+
private readonly destinations;
|
|
40
|
+
destination(provider: HarnessProvider): string;
|
|
36
41
|
private readonly sources;
|
|
37
42
|
source(provider: HarnessProvider): "blocked" | "environment" | "keychain" | "missing" | "temporary" | "unavailable";
|
|
38
43
|
private endpointOverride;
|
|
@@ -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 ["--provider", "--model", "--profile", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--
|
|
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"];
|
|
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: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliOptions } from "../arguments.js";
|
|
2
|
+
import { type HarnessConfig } from "../../runtime/config.js";
|
|
3
|
+
import type { TokenUsage } from "@zhivex-ai/core";
|
|
4
|
+
/** Only new local console sessions change defaults. Explicit limits always opt
|
|
5
|
+
* into bounded execution; SDK, service hosts and automation retain their policy. */
|
|
6
|
+
export declare const consoleBudgetOptions: (options: CliOptions, env?: NodeJS.ProcessEnv) => CliOptions;
|
|
7
|
+
/** A saved run owns its budget, including legacy runs without a mode flag. */
|
|
8
|
+
export declare const restoreConsoleOptions: (current: CliOptions, saved: Partial<CliOptions>) => CliOptions;
|
|
9
|
+
export declare const formatConsoleBudget: (config: HarnessConfig, usage?: TokenUsage) => string;
|
|
@@ -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 ["/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 ["/compact", "Compact conversation context", 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 ["/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", 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]];
|
|
3
3
|
export type ConsoleMode = "direct" | "service";
|
|
4
|
-
export declare const consoleCommands: (mode?: ConsoleMode) => (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 ["/context", "Inspect project rules and selected context", 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 ["/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 ["/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 ["/context", "Inspect project rules and selected context", 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 ["/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 ["/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])[];
|
|
6
6
|
export declare const formatConsoleHelp: (mode?: ConsoleMode, all?: boolean) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CliOptions } from "../arguments.js";
|
|
2
|
+
import type { HarnessConfig, HarnessProvider } from "../../runtime/config.js";
|
|
3
|
+
import { type CatalogSnapshot } from "../../models/catalog-store.js";
|
|
4
|
+
export interface ConsoleCompactionDependencies {
|
|
5
|
+
config: HarnessConfig;
|
|
6
|
+
options: CliOptions;
|
|
7
|
+
hasActiveTurn(): Promise<unknown>;
|
|
8
|
+
/** Rebuild the harness atomically; leave conversation and approval state intact. */
|
|
9
|
+
replaceOptions(options: CliOptions): Promise<void>;
|
|
10
|
+
inspectCredential(provider: HarnessProvider): Promise<{
|
|
11
|
+
configured: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
loadCatalog?(): Promise<CatalogSnapshot>;
|
|
14
|
+
write?(message: string): void;
|
|
15
|
+
now?: number;
|
|
16
|
+
}
|
|
17
|
+
/** A route change is session-scoped and applies only after a successful rebuild. */
|
|
18
|
+
export declare function handleConsoleCompaction(command: string, deps: ConsoleCompactionDependencies): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Readable, Writable } from "node:stream";
|
|
2
2
|
import { type ConsoleMode } from "./console-commands.js";
|
|
3
|
-
export declare const CONSOLE_COMMANDS: ("/approve" | "/attach" | "/attachments" | "/cancel" | "/clear" | "/compact" | "/context" | "/credentials" | "/deny" | "/detach" | "/diff" | "/exit" | "/help" | "/menu" | "/model" | "/new" | "/paste" | "/pending" | "/provider" | "/rename" | "/resume" | "/review" | "/route" | "/sessions" | "/status" | "/usage" | "/verbose")[];
|
|
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
4
|
export declare const MAX_CONSOLE_INPUT_BYTES: number;
|
|
5
5
|
export declare const completeConsoleCommand: (line: string) => [string[], string];
|
|
6
6
|
/** Lines received without an active question are discarded, never replayed as approvals. */
|
|
@@ -6,6 +6,7 @@ export declare const formatComposer: (input: {
|
|
|
6
6
|
status: string;
|
|
7
7
|
attachments?: number;
|
|
8
8
|
automaticApprovals?: boolean;
|
|
9
|
+
approvalMode?: "ask" | "auto" | "restricted";
|
|
9
10
|
}, columns?: number, color?: boolean) => string;
|
|
10
11
|
export declare const CONSOLE_SHORTCUTS: string;
|
|
11
12
|
export declare const chooseConsoleItem: <T>(title: string, items: readonly {
|
package/dist/cli/doctor.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface DoctorReport {
|
|
|
25
25
|
scope: ReturnType<typeof resolveHarnessConfig>["scope"];
|
|
26
26
|
maxSteps: number;
|
|
27
27
|
timeoutMs: number;
|
|
28
|
-
|
|
28
|
+
requireVerifiedDelivery: boolean;
|
|
29
29
|
budget: ReturnType<typeof resolveHarnessConfig>["budget"];
|
|
30
30
|
costBudget?: ReturnType<typeof resolveHarnessConfig>["costBudget"];
|
|
31
31
|
compaction: ReturnType<typeof resolveHarnessConfig>["compaction"];
|
|
@@ -47,6 +47,6 @@ export interface DoctorContext {
|
|
|
47
47
|
bunVersion?: string;
|
|
48
48
|
ociRuntimeAdapter?: HarnessOciRuntimeAdapter;
|
|
49
49
|
}
|
|
50
|
-
export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "
|
|
50
|
+
export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "requireVerifiedDelivery" | "timeoutMs" | "maxToolCalls" | "maxToolErrors" | "unlimitedTokens" | "maxInputTokens" | "maxOutputTokens" | "maxTotalTokens" | "maxCostUsd" | "inputCostPerMillion" | "outputCostPerMillion" | "allowedChecks" | "requiredCapabilities" | "subagentProfiles" | "subagentMaxSteps" | "subagentMaxToolCalls" | "subagentMaxToolErrors" | "subagentMaxInputTokens" | "subagentMaxOutputTokens" | "subagentMaxTotalTokens" | "subagentTimeoutMs" | "maxParallelReviews" | "executionBackend" | "ociRuntime" | "ociImage" | "ociAllowedCommands" | "ociShellMode" | "ociMaxProcessRuntimeMs" | "ociMaxProcessOutputBytes" | "ociMaxMemoryMb" | "ociMaxPids" | "ociMaxCpus" | "ociMaxWorkspaceBytes" | "ociMaxFileWriteBytes" | "ociTmpfsMb" | "mcpConfigPath" | "contextConfigPath" | "projectContext">, context?: DoctorContext) => Promise<DoctorReport>;
|
|
51
51
|
export declare const formatDoctorReport: (report: DoctorReport) => string;
|
|
52
52
|
export declare const doctor: (options: CliOptions) => Promise<void>;
|
|
@@ -8,7 +8,11 @@ export declare const cliStreamErrorSequence: (error: unknown) => number;
|
|
|
8
8
|
export declare const terminalErrorMessage: (error: unknown) => string;
|
|
9
9
|
export declare const summarizeApproval: (approval: AgentApprovalRequest) => string;
|
|
10
10
|
export declare const approvalResponses: (approvals: readonly AgentApprovalRequest[], approve: boolean, reason: string) => AgentApprovalResponse[];
|
|
11
|
-
export declare const terminalApprovalResolver: (automaticallyApprove: boolean, ask?: (question: string) => Promise<string
|
|
11
|
+
export declare const terminalApprovalResolver: (automaticallyApprove: boolean | "ask" | "auto" | "restricted", ask?: (question: string) => Promise<string>, ui?: {
|
|
12
|
+
select: import("./cli-credentials.js").CredentialInput["select"];
|
|
13
|
+
workspace: string;
|
|
14
|
+
sessionGrants?: Set<string>;
|
|
15
|
+
}) => NonNullable<HarnessRunOptions["resolveApprovals"]>;
|
|
12
16
|
export declare const printTerminalResult: (result: AgentRunOutput, harness: ZhivexHarness, output: Pick<CliOptions, "json" | "jsonl">, tracker: {
|
|
13
17
|
streamedText: boolean;
|
|
14
18
|
sequence?: number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CredentialInput } from "./cli-credentials.js";
|
|
2
|
+
declare const regions: {
|
|
3
|
+
readonly singapore: readonly ["Singapore", "ap-southeast-1", "dashscope-intl.aliyuncs.com"];
|
|
4
|
+
readonly beijing: readonly ["Beijing", "cn-beijing", "dashscope.aliyuncs.com"];
|
|
5
|
+
readonly "hong-kong": readonly ["Hong Kong", "cn-hongkong", "cn-hongkong.dashscope.aliyuncs.com"];
|
|
6
|
+
readonly tokyo: readonly ["Tokyo", "ap-northeast-1", ""];
|
|
7
|
+
readonly frankfurt: readonly ["Frankfurt", "eu-central-1", ""];
|
|
8
|
+
readonly virginia: readonly ["Virginia", "us-east-1", ""];
|
|
9
|
+
};
|
|
10
|
+
export type QwenConnection = {
|
|
11
|
+
service: "api";
|
|
12
|
+
region: keyof typeof regions;
|
|
13
|
+
workspace?: string;
|
|
14
|
+
} | {
|
|
15
|
+
service: "token-plan";
|
|
16
|
+
};
|
|
17
|
+
export declare function qwenEndpoint(connection: QwenConnection): string;
|
|
18
|
+
export declare function decodeQwenCredential(value: string): {
|
|
19
|
+
key: string;
|
|
20
|
+
connection: QwenConnection;
|
|
21
|
+
};
|
|
22
|
+
export declare function selectQwenConnection(input: CredentialInput): Promise<QwenConnection | undefined>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentApprovalRequest } from "@zhivex-ai/agents";
|
|
2
|
+
/** Never grant by command prefix or tool name alone. Unknown payload fields
|
|
3
|
+
* prevent reuse so an expanded tool contract cannot inherit an old grant. */
|
|
4
|
+
export declare function checkApprovalGrant(approval: AgentApprovalRequest, workspace: string): string | undefined;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Small streaming Markdown renderer. Formatting survives pauses between tokens. */
|
|
2
2
|
export declare class TerminalMarkdown {
|
|
3
3
|
private readonly output;
|
|
4
4
|
private readonly color;
|
|
5
|
+
private readonly columns;
|
|
5
6
|
private pending;
|
|
6
7
|
private code;
|
|
8
|
+
private heading;
|
|
9
|
+
private lineStart;
|
|
7
10
|
private timer;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
+
private tableLines;
|
|
12
|
+
constructor(output: (text: string) => void, color: boolean, columns?: () => number);
|
|
13
|
+
private drain;
|
|
11
14
|
write(delta: string): void;
|
|
12
15
|
flush(): void;
|
|
13
16
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Terminal cell width, including combining marks, CJK and emoji clusters. */
|
|
2
|
+
export declare const terminalCellWidth: (value: string) => number;
|
|
3
|
+
export declare function tableCells(line: string): string[];
|
|
4
|
+
export declare const isTableSeparator: (line: string, columns: number) => boolean;
|
|
5
|
+
/** Input has already passed sanitizeTerminalText; only generated styles are emitted. */
|
|
6
|
+
export declare function renderTerminalTable(lines: readonly string[], columns: number, color: boolean): string;
|
|
@@ -18,6 +18,9 @@ export interface ApprovalFormatOptions {
|
|
|
18
18
|
export declare const formatApproval: (approval: AgentApprovalRequest, options?: ApprovalFormatOptions) => string;
|
|
19
19
|
export interface TerminalApprovalResolverOptions {
|
|
20
20
|
ask(question: string): Promise<string>;
|
|
21
|
+
select?: import("../cli-credentials.js").CredentialInput["select"];
|
|
22
|
+
workspace?: string;
|
|
23
|
+
sessionGrants?: Set<string>;
|
|
21
24
|
write(text: string): void;
|
|
22
25
|
maxSummaryCharacters?: number;
|
|
23
26
|
approvedReason?: string;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Live progress plus a bounded, durable summary per activity group. No tool payloads. */
|
|
2
2
|
export declare class ToolActivity {
|
|
3
3
|
private write;
|
|
4
4
|
private tty;
|
|
5
5
|
private columns;
|
|
6
|
-
private completed;
|
|
7
6
|
private active;
|
|
8
7
|
private visible;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
8
|
+
private label;
|
|
9
|
+
private completed;
|
|
10
|
+
private started;
|
|
11
|
+
private timer;
|
|
13
12
|
constructor(write: (text: string) => void, tty: boolean, columns?: () => number);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
phase(label: "Waiting for model response" | "Waiting for approval" | "Updating context", _step?: number): void;
|
|
14
|
+
start(name?: string): void;
|
|
15
|
+
finish(name: string, success?: boolean): void;
|
|
16
|
+
private begin;
|
|
17
17
|
private render;
|
|
18
|
+
private clear;
|
|
18
19
|
flush(): void;
|
|
19
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { harnessToolExecution as cliToolExecution } from "../runtime/tool-execution.js";
|