@zhivex-ai/harness 1.4.0-rc.8 → 1.4.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 +13 -0
- package/README.md +124 -72
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/dist/acp-cli.js +13 -12
- package/dist/{cli-3bzvq594.js → cli-2h37qyvg.js} +4 -4
- package/dist/{cli-entry-yqwa1943.js → cli-entry-20w6nh0k.js} +321 -16
- package/dist/{cli-entry-25xefnws.js → cli-entry-4ngptr62.js} +3 -3
- package/dist/{cli-entry-qav71mxw.js → cli-entry-w0hterjs.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/compat/code-support.js +8 -7
- package/dist/{config-pwbnze4g.js → config-j9624t6t.js} +1 -1
- package/dist/{config-depqpsae.js → config-qt69hkqj.js} +4 -3
- package/dist/engine/acp.js +12 -11
- package/dist/engine/client.js +11 -10
- package/dist/engine/desktop-providers-v1.js +2 -1
- package/dist/engine/desktop-state-v1.js +8 -7
- package/dist/engine/index.js +15 -14
- package/dist/engine/mcp-stdio-v1.js +7 -6
- package/dist/engine/protocol.js +12 -0
- package/dist/engine/service.js +12 -11
- package/dist/hostile-repository-demo.js +322 -17
- package/dist/{index-1k248k0w.js → index-5jhgatga.js} +5 -5
- package/dist/{index-pcn2bk8j.js → index-61gthdz6.js} +1 -1
- package/dist/{index-sbzvrpm7.js → index-6dft2vev.js} +2 -2
- package/dist/{index-09zphhwt.js → index-8zjmnyw5.js} +2 -2
- package/dist/{index-txrqqd2r.js → index-937cb7y8.js} +6 -6
- package/dist/{index-jdb1q8yn.js → index-bpc596v3.js} +15 -10
- package/dist/index-fm84men1.js +239 -0
- package/dist/{index-zmx264xy.js → index-m34q25jj.js} +2 -2
- package/dist/index-m49jx72n.js +220 -0
- package/dist/{index-9v72fpya.js → index-m82cfspw.js} +16 -10
- package/dist/{index-ngg2168h.js → index-nmjdwd4p.js} +1 -1
- package/dist/{index-w9pjt7td.js → index-pdmevfxv.js} +3 -3
- package/dist/{index-nqhnh1hz.js → index-pp474137.js} +5 -5
- package/dist/{index-vga76vmb.js → index-rkbf7dqg.js} +2 -2
- package/dist/{index-fny13znr.js → index-s2k2edts.js} +3 -3
- package/dist/{index-7y6b4yjx.js → index-tfzta544.js} +4 -4
- package/dist/index.js +15 -14
- package/dist/providers/vertex-auth.d.ts +5 -1
- package/dist/runtime/error-diagnostics.d.ts +8 -0
- package/dist/runtime/provider-transient.d.ts +33 -0
- package/dist/runtime/time-to-safe-fix.d.ts +8 -0
- package/dist/service-cli.js +12 -11
- package/dist/{service-client-cli-ra3yzvjg.js → service-client-cli-fn54ev6w.js} +3 -3
- package/dist/verify-historical-migrations.js +322 -17
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +1 -1
- package/docs/CODE_RELEASE.md +38 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/PROJECT_MEMORY.md +1 -1
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/examples/README.md +5 -5
- package/package.json +1 -1
- package/dist/index-8705zxpr.js +0 -145
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
withFreshSystemInstructions,
|
|
43
43
|
withRuntimeInstruction,
|
|
44
44
|
workBudgetReached
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-s2k2edts.js";
|
|
46
46
|
import {
|
|
47
47
|
HARNESS_MCP_CONFIG_SCHEMA_VERSION,
|
|
48
48
|
HARNESS_VERSION,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
mcpConfigurationFingerprintInput,
|
|
53
53
|
normalizeHarnessMcpConfiguration,
|
|
54
54
|
resolveMcpHostSession
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-pdmevfxv.js";
|
|
56
56
|
import {
|
|
57
57
|
EnvironmentPatchDriftError,
|
|
58
58
|
FileSizeLimitError,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
validateEditProposal,
|
|
83
83
|
withTaskAcceptanceDelivery,
|
|
84
84
|
workspaceFilePathSchema
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-m34q25jj.js";
|
|
86
86
|
import {
|
|
87
87
|
DEFAULT_PROVIDER_REGISTRY,
|
|
88
88
|
HARNESS_CONFIG_SCHEMA_VERSION,
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
isTaskTransportModel,
|
|
91
91
|
resolveHarnessConfig,
|
|
92
92
|
withReasoningEffort
|
|
93
|
-
} from "./index-
|
|
93
|
+
} from "./index-8zjmnyw5.js";
|
|
94
94
|
import {
|
|
95
95
|
HarnessConfigError,
|
|
96
96
|
HarnessError,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
HarnessStateConflictError,
|
|
99
99
|
HarnessWorkspaceError,
|
|
100
100
|
normalizeHarnessError
|
|
101
|
-
} from "./index-
|
|
101
|
+
} from "./index-bpc596v3.js";
|
|
102
102
|
|
|
103
103
|
// src/providers/capabilities.ts
|
|
104
104
|
var inspectHarnessModelCapabilities = (model) => ({
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
combineMcpHostSessions,
|
|
4
4
|
createHarnessMcpTools,
|
|
5
5
|
issueMcpHostSession
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-pdmevfxv.js";
|
|
7
7
|
import {
|
|
8
8
|
collectSnapshotInventory,
|
|
9
9
|
readRegularFileNoFollow,
|
|
10
10
|
readSnapshotFile,
|
|
11
11
|
runPortableProcess
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-m34q25jj.js";
|
|
13
13
|
|
|
14
14
|
// src/execution/mcp-workspace-snapshot.ts
|
|
15
15
|
import { createHash } from "node:crypto";
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
taskAcceptanceOutcome,
|
|
7
7
|
taskCheckReceiptSchema,
|
|
8
8
|
workspaceFilePathSchema
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-m34q25jj.js";
|
|
10
10
|
import {
|
|
11
11
|
defaultHarnessNamespace
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8zjmnyw5.js";
|
|
13
13
|
import {
|
|
14
14
|
HarnessConfigError,
|
|
15
15
|
HarnessStateConflictError,
|
|
16
16
|
HarnessWorkspaceError
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-bpc596v3.js";
|
|
18
18
|
|
|
19
19
|
// src/persistence/state-directory.ts
|
|
20
20
|
import { lstat } from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
workspaceCheckpointSchema,
|
|
3
3
|
workspaceRestoreOperationSchema
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-6dft2vev.js";
|
|
5
5
|
import {
|
|
6
6
|
HARNESS_OPERATIONS_SCHEMA_VERSION,
|
|
7
7
|
HARNESS_SESSION_SCHEMA_VERSION,
|
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
projectMemoryRecordKey,
|
|
14
14
|
sqliteAdapter,
|
|
15
15
|
validateStateDirectory
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-s2k2edts.js";
|
|
17
17
|
import {
|
|
18
18
|
SqliteDatabase,
|
|
19
19
|
readRegularFileChunksNoFollow
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-m34q25jj.js";
|
|
21
21
|
import {
|
|
22
22
|
HarnessStateConflictError,
|
|
23
23
|
HarnessWorkspaceError
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-bpc596v3.js";
|
|
25
25
|
|
|
26
26
|
// src/persistence/recorded-workspace.ts
|
|
27
27
|
import { lstat, realpath } from "node:fs/promises";
|
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
timeToSafeFixLatencyStatistics,
|
|
72
72
|
timeToSafeFixTaskSchema,
|
|
73
73
|
verifyChangeEnvelope
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-m82cfspw.js";
|
|
75
75
|
import {
|
|
76
76
|
HARNESS_STATE_BACKUP_MAX_BYTES,
|
|
77
77
|
HARNESS_STATE_BACKUP_SCHEMA_VERSION,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
inspectHarnessState,
|
|
83
83
|
readHarnessStateBackup,
|
|
84
84
|
stateBackupBundleSchema
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-tfzta544.js";
|
|
86
86
|
import {
|
|
87
87
|
CLI_COMMAND_OPTION_CONTRACTS,
|
|
88
88
|
CLI_OPTION_DEFINITIONS,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
resolveHarnessModelRoutes,
|
|
93
93
|
serializeHarnessModelRoutes,
|
|
94
94
|
validateCliCommandOptions
|
|
95
|
-
} from "./index-
|
|
95
|
+
} from "./index-61gthdz6.js";
|
|
96
96
|
import {
|
|
97
97
|
harnessLocalCredentialsSchema,
|
|
98
98
|
openHarnessActivityStore,
|
|
@@ -100,17 +100,17 @@ import {
|
|
|
100
100
|
recoverHarnessLocalService,
|
|
101
101
|
requestHarnessLocalService,
|
|
102
102
|
startHarnessLocalService
|
|
103
|
-
} from "./index-
|
|
103
|
+
} from "./index-5jhgatga.js";
|
|
104
104
|
import {
|
|
105
105
|
createAcpConnection,
|
|
106
106
|
serveAcpStdio
|
|
107
107
|
} from "./index-3ah1f369.js";
|
|
108
108
|
import {
|
|
109
109
|
createHarnessClientAdapter
|
|
110
|
-
} from "./index-
|
|
110
|
+
} from "./index-937cb7y8.js";
|
|
111
111
|
import {
|
|
112
112
|
openWorkspaceCheckpointStore
|
|
113
|
-
} from "./index-
|
|
113
|
+
} from "./index-6dft2vev.js";
|
|
114
114
|
import {
|
|
115
115
|
DEFAULT_HARNESS_CONTEXT_MANIFEST,
|
|
116
116
|
DEFAULT_HARNESS_PROJECT_INSTRUCTIONS,
|
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
runHarness,
|
|
153
153
|
runHarnessReviewGroup,
|
|
154
154
|
selectHarnessModel
|
|
155
|
-
} from "./index-
|
|
155
|
+
} from "./index-pp474137.js";
|
|
156
156
|
import {
|
|
157
157
|
HARNESS_OPERATIONS_SCHEMA_VERSION,
|
|
158
158
|
HARNESS_SESSION_INDEX_FILE,
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
openHarnessPersistence,
|
|
171
171
|
openSessionStore,
|
|
172
172
|
validateStateDirectory
|
|
173
|
-
} from "./index-
|
|
173
|
+
} from "./index-s2k2edts.js";
|
|
174
174
|
import {
|
|
175
175
|
BUN_ENGINE_RANGE,
|
|
176
176
|
HARNESS_MCP_CONFIG_SCHEMA_VERSION,
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
createHttpMcpClient,
|
|
182
182
|
loadHarnessMcpConfiguration,
|
|
183
183
|
normalizeHarnessMcpConfiguration
|
|
184
|
-
} from "./index-
|
|
184
|
+
} from "./index-pdmevfxv.js";
|
|
185
185
|
import {
|
|
186
186
|
CliOciRuntimeAdapter,
|
|
187
187
|
EDIT_CONTRACT_SCHEMA_VERSION,
|
|
@@ -214,7 +214,7 @@ import {
|
|
|
214
214
|
restoreFileInputSchema,
|
|
215
215
|
validateEditProposal,
|
|
216
216
|
workspaceFilePathSchema
|
|
217
|
-
} from "./index-
|
|
217
|
+
} from "./index-m34q25jj.js";
|
|
218
218
|
import {
|
|
219
219
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
|
220
220
|
DEFAULT_ALLOWED_CHECKS,
|
|
@@ -239,8 +239,8 @@ import {
|
|
|
239
239
|
providerAvailability,
|
|
240
240
|
providerDescriptor,
|
|
241
241
|
resolveHarnessConfig
|
|
242
|
-
} from "./index-
|
|
243
|
-
import"./index-
|
|
242
|
+
} from "./index-8zjmnyw5.js";
|
|
243
|
+
import"./index-m49jx72n.js";
|
|
244
244
|
import"./index-xqxeypt5.js";
|
|
245
245
|
import {
|
|
246
246
|
CLI_EVENT_SCHEMA_VERSION,
|
|
@@ -252,7 +252,7 @@ import {
|
|
|
252
252
|
serializeStreamResult,
|
|
253
253
|
streamEventDocument,
|
|
254
254
|
streamResultDocument
|
|
255
|
-
} from "./index-
|
|
255
|
+
} from "./index-nmjdwd4p.js";
|
|
256
256
|
import {
|
|
257
257
|
HARNESS_ERROR_CODES,
|
|
258
258
|
HARNESS_ERROR_SCHEMA_VERSION,
|
|
@@ -265,7 +265,8 @@ import {
|
|
|
265
265
|
HarnessWorkspaceError,
|
|
266
266
|
harnessErrorDocument,
|
|
267
267
|
normalizeHarnessError
|
|
268
|
-
} from "./index-
|
|
268
|
+
} from "./index-bpc596v3.js";
|
|
269
|
+
import"./index-fm84men1.js";
|
|
269
270
|
import"./index-1bx83sw4.js";
|
|
270
271
|
export {
|
|
271
272
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
|
@@ -23,5 +23,9 @@ export declare class VertexAuthenticationError extends Error {
|
|
|
23
23
|
readonly retryable = false;
|
|
24
24
|
constructor();
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export interface VertexRetryOptions {
|
|
27
|
+
attempts?: number;
|
|
28
|
+
delayMs?: (attempt: number) => number;
|
|
29
|
+
}
|
|
30
|
+
export declare function createVertexModel(model: string, env: NodeJS.ProcessEnv, createAuth?: AuthFactory, retry?: VertexRetryOptions): import("@zhivex-ai/core").LanguageModel<import("@zhivex-ai/vertex").VertexLanguageModelOptions>;
|
|
27
31
|
export {};
|
|
@@ -765,6 +765,14 @@ export declare const errorDetailsSchema: z.ZodObject<{
|
|
|
765
765
|
unavailable: "unavailable";
|
|
766
766
|
}>;
|
|
767
767
|
}, z.core.$strict>>;
|
|
768
|
+
providerStatus: z.ZodOptional<z.ZodEnum<{
|
|
769
|
+
ABORTED: "ABORTED";
|
|
770
|
+
DEADLINE_EXCEEDED: "DEADLINE_EXCEEDED";
|
|
771
|
+
INTERNAL: "INTERNAL";
|
|
772
|
+
RESOURCE_EXHAUSTED: "RESOURCE_EXHAUSTED";
|
|
773
|
+
STREAM_RESET: "STREAM_RESET";
|
|
774
|
+
UNAVAILABLE: "UNAVAILABLE";
|
|
775
|
+
}>>;
|
|
768
776
|
status: z.ZodOptional<z.ZodNumber>;
|
|
769
777
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
770
778
|
acceptanceReason: z.ZodOptional<z.ZodEnum<{
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Closed categories for transient Vertex/Google failures.
|
|
3
|
+
* Sanitized diagnostics may record one of these labels and an HTTP status.
|
|
4
|
+
* They must not record provider messages, resource names, or credentials.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PROVIDER_STATUS_CATEGORIES: readonly ["ABORTED", "RESOURCE_EXHAUSTED", "UNAVAILABLE", "DEADLINE_EXCEEDED", "INTERNAL", "STREAM_RESET"];
|
|
7
|
+
export type ProviderStatusCategory = (typeof PROVIDER_STATUS_CATEGORIES)[number];
|
|
8
|
+
export declare const VERTEX_TRANSIENT_ATTEMPTS = 3;
|
|
9
|
+
export interface ProviderFailureClassification {
|
|
10
|
+
retryable: boolean;
|
|
11
|
+
httpStatus?: number;
|
|
12
|
+
providerStatus?: ProviderStatusCategory;
|
|
13
|
+
}
|
|
14
|
+
/** Signals on one error object. Cause walking is owned by classifyProviderFailure. */
|
|
15
|
+
export declare function readProviderFailureRecord(record: Record<string, unknown>, depth?: number): ProviderFailureClassification;
|
|
16
|
+
/** Walk a Vertex/Google error chain without retaining its message or payload. */
|
|
17
|
+
export declare function classifyProviderFailure(error: unknown): ProviderFailureClassification;
|
|
18
|
+
export declare function isRetryableProviderFailure(error: unknown): boolean;
|
|
19
|
+
/** Full jitter on a capped exponential delay. Attempt 0 is the first retry. */
|
|
20
|
+
export declare function transientBackoffMs(attempt: number, baseMs?: number): number;
|
|
21
|
+
/** A model turn the caller cannot act on: no visible text and no tool call. */
|
|
22
|
+
export declare function isEmptyModelTurn(result: {
|
|
23
|
+
text?: string;
|
|
24
|
+
finishReason?: unknown;
|
|
25
|
+
messages?: readonly {
|
|
26
|
+
parts?: readonly {
|
|
27
|
+
type?: string;
|
|
28
|
+
text?: string;
|
|
29
|
+
}[];
|
|
30
|
+
}[];
|
|
31
|
+
images?: readonly unknown[];
|
|
32
|
+
audio?: readonly unknown[];
|
|
33
|
+
}): boolean;
|
|
@@ -471,6 +471,14 @@ export declare const timeToSafeFixDriverResultSchema: z.ZodObject<{
|
|
|
471
471
|
unavailable: "unavailable";
|
|
472
472
|
}>;
|
|
473
473
|
}, z.core.$strict>>;
|
|
474
|
+
providerStatus: z.ZodOptional<z.ZodEnum<{
|
|
475
|
+
ABORTED: "ABORTED";
|
|
476
|
+
DEADLINE_EXCEEDED: "DEADLINE_EXCEEDED";
|
|
477
|
+
INTERNAL: "INTERNAL";
|
|
478
|
+
RESOURCE_EXHAUSTED: "RESOURCE_EXHAUSTED";
|
|
479
|
+
STREAM_RESET: "STREAM_RESET";
|
|
480
|
+
UNAVAILABLE: "UNAVAILABLE";
|
|
481
|
+
}>>;
|
|
474
482
|
status: z.ZodOptional<z.ZodNumber>;
|
|
475
483
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
476
484
|
acceptanceReason: z.ZodOptional<z.ZodEnum<{
|
package/dist/service-cli.js
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
recoverHarnessLocalService,
|
|
4
4
|
startHarnessLocalService
|
|
5
|
-
} from "./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
5
|
+
} from "./index-5jhgatga.js";
|
|
6
|
+
import"./index-937cb7y8.js";
|
|
7
|
+
import"./index-6dft2vev.js";
|
|
8
8
|
import {
|
|
9
9
|
createHarness
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
10
|
+
} from "./index-pp474137.js";
|
|
11
|
+
import"./index-s2k2edts.js";
|
|
12
|
+
import"./index-pdmevfxv.js";
|
|
13
|
+
import"./index-m34q25jj.js";
|
|
14
|
+
import"./index-8zjmnyw5.js";
|
|
15
|
+
import"./index-m49jx72n.js";
|
|
16
16
|
import"./index-xqxeypt5.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-nmjdwd4p.js";
|
|
18
|
+
import"./index-bpc596v3.js";
|
|
19
|
+
import"./index-fm84men1.js";
|
|
19
20
|
import"./index-1bx83sw4.js";
|
|
20
21
|
|
|
21
22
|
// src/service-cli.ts
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
printPolicyInspection,
|
|
15
15
|
sanitizeTerminalText,
|
|
16
16
|
serializeStreamResult
|
|
17
|
-
} from "./cli-entry-
|
|
17
|
+
} from "./cli-entry-4ngptr62.js";
|
|
18
18
|
import {
|
|
19
19
|
HARNESS_VERSION
|
|
20
|
-
} from "./cli-entry-
|
|
20
|
+
} from "./cli-entry-w0hterjs.js";
|
|
21
21
|
import {
|
|
22
22
|
HARNESS_ERROR_CODES,
|
|
23
23
|
HARNESS_ERROR_SCHEMA_VERSION,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
HarnessStateConflictError,
|
|
26
26
|
PROVIDERS,
|
|
27
27
|
reasoningEffortSchema
|
|
28
|
-
} from "./cli-entry-
|
|
28
|
+
} from "./cli-entry-20w6nh0k.js";
|
|
29
29
|
import {
|
|
30
30
|
__require
|
|
31
31
|
} from "./cli-entry-1bx83sw4.js";
|