@zhivex-ai/harness 1.1.1 → 1.2.0-rc.13
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 +160 -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 +95 -5
- package/contracts/stable-api-signatures.json +38 -38
- package/dist/acp-cli.d.ts +2 -0
- package/dist/acp-cli.js +15938 -0
- package/dist/cli/arguments.d.ts +7 -1
- package/dist/cli/cli-credentials.d.ts +6 -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-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 +22 -3
- package/dist/cli/console/console-navigation.d.ts +3 -0
- package/dist/cli/console/console-presentation.d.ts +9 -2
- package/dist/cli/console/console-progress.d.ts +6 -0
- package/dist/cli/console/console-reasoning.d.ts +3 -0
- package/dist/cli/doctor.d.ts +2 -2
- package/dist/cli/presentation.d.ts +8 -1
- package/dist/cli/qwen-connection.d.ts +23 -0
- package/dist/cli/run-document.d.ts +4 -4
- package/dist/cli/terminal/activity-history.d.ts +15 -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 +21 -10
- package/dist/cli/tool-execution.d.ts +1 -0
- package/dist/cli-3jmy4h5h.js +5798 -0
- package/dist/cli-entry-1bx83sw4.js +4 -0
- package/dist/cli-entry-427869g9.js +2009 -0
- package/dist/cli-entry-64pdp3k5.js +17 -0
- package/dist/cli-entry-b1mfvmxe.js +376 -0
- package/dist/cli-entry-c2f58zj2.js +13602 -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 +22 -8
- package/dist/config-1k9t4jhh.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 +13 -8
- 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 +4614 -1930
- package/dist/index.d.ts +13 -1
- package/dist/index.js +16435 -12486
- 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 +10 -6
- package/dist/persistence/state-backup-stream.d.ts +4 -0
- 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/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 +12 -3
- package/dist/runtime/context-runtime.d.ts +12 -0
- package/dist/runtime/error-diagnostics.d.ts +641 -0
- package/dist/runtime/harness.d.ts +13 -4
- package/dist/runtime/model-edit-references.d.ts +8 -0
- package/dist/runtime/oci-delivery.d.ts +17 -0
- package/dist/runtime/progress-monitor.d.ts +33 -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 +14 -6
- package/dist/runtime/time-to-safe-fix.d.ts +308 -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 +9422 -6622
- package/dist/service-client-cli-yx56n0hc.js +1086 -0
- package/dist/tools/dependency-read.d.ts +63 -0
- package/dist/tools/execution.d.ts +8 -8
- package/dist/tools/workspace.d.ts +31 -15
- package/dist/verify-historical-migrations.js +5272 -2437
- package/dist/workspace/file-security.d.ts +6 -0
- package/dist/zhx.js +15 -19168
- package/docs/ACP.md +55 -0
- package/docs/CLI.md +292 -29
- package/docs/CONTEXT_ENGINEERING.md +184 -20
- package/docs/CREDENTIALS.md +38 -6
- package/docs/DURABLE_OPERATIONS.md +10 -0
- package/docs/EXTENSIBILITY.md +101 -4
- package/docs/FIRST_USE.md +7 -5
- package/docs/MODEL_CATALOG.md +52 -1
- 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 +145 -1
- package/evaluations/representative-repositories-v2.jsonl +7 -0
- package/examples/README.md +2 -2
- package/package.json +19 -13
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ToolSet } from "@zhivex-ai/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const harnessToolPolicySchema: z.ZodObject<{
|
|
4
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
tools: z.ZodArray<z.ZodString>;
|
|
8
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
decision: z.ZodEnum<{
|
|
10
|
+
allow: "allow";
|
|
11
|
+
ask_user: "ask_user";
|
|
12
|
+
deny: "deny";
|
|
13
|
+
}>;
|
|
14
|
+
reason: z.ZodString;
|
|
15
|
+
}, z.core.$strict>>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type HarnessToolPolicy = z.infer<typeof harnessToolPolicySchema>;
|
|
18
|
+
export type HarnessToolPolicyDecision = {
|
|
19
|
+
decision: "allow" | "ask_user" | "deny";
|
|
20
|
+
ruleIds: string[];
|
|
21
|
+
reason: string;
|
|
22
|
+
};
|
|
23
|
+
/** Trusted application configuration only. No rule can grant a missing permission. */
|
|
24
|
+
export declare const createHarnessToolPolicy: (input: HarnessToolPolicy) => {
|
|
25
|
+
digest: string;
|
|
26
|
+
evaluate: (request: {
|
|
27
|
+
toolName: string;
|
|
28
|
+
paths?: readonly string[];
|
|
29
|
+
requiresApproval?: boolean;
|
|
30
|
+
hardDenied?: boolean;
|
|
31
|
+
}) => HarnessToolPolicyDecision;
|
|
32
|
+
policy: {
|
|
33
|
+
schemaVersion: number;
|
|
34
|
+
rules: {
|
|
35
|
+
id: string;
|
|
36
|
+
paths?: string[] | undefined;
|
|
37
|
+
decision: "allow" | "ask_user" | "deny";
|
|
38
|
+
reason: string;
|
|
39
|
+
tools: string[];
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare class HarnessToolPolicyDeniedError extends Error {
|
|
44
|
+
readonly policyDecision: HarnessToolPolicyDecision;
|
|
45
|
+
constructor(policyDecision: HarnessToolPolicyDecision);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Retains original executors and hard permission checks. SDK approval metadata is
|
|
49
|
+
* static, so a path-scoped ask rule conservatively requires approval for the whole
|
|
50
|
+
* named tool. Paths must be extracted by trusted, tool-specific integration code.
|
|
51
|
+
*/
|
|
52
|
+
export declare const applyHarnessToolPolicy: (tools: ToolSet, input: HarnessToolPolicy, options?: {
|
|
53
|
+
resolvePaths?: (toolName: string, input: unknown) => readonly string[];
|
|
54
|
+
onDecision?: (toolName: string, decision: HarnessToolPolicyDecision) => void | Promise<void>;
|
|
55
|
+
}) => ToolSet;
|
|
@@ -19,6 +19,7 @@ export type UsagePricing = z.infer<typeof usagePricingSchema>;
|
|
|
19
19
|
export interface UsageAccountingOptions {
|
|
20
20
|
pricing?: UsagePricing;
|
|
21
21
|
limitUsd?: number;
|
|
22
|
+
requireCompleteUsage?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare const inspectUsageLedger: (value: unknown) => {
|
|
24
25
|
calls: number;
|