@zhivex-ai/harness 1.4.0 → 1.4.1
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 +29 -10
- package/README.md +7 -5
- package/SUPPORT.md +2 -2
- package/contracts/client-protocol-v1.schema.json +593 -0
- package/contracts/engine-api.json +156 -0
- package/contracts/public-api.json +12 -0
- package/contracts/stable-api-signatures.json +33 -33
- package/dist/acp-cli.js +54 -20
- package/dist/audit/index.d.ts +3 -0
- package/dist/audit/index.js +482 -0
- package/dist/audit/pack.d.ts +72 -0
- package/dist/audit-pack-e4vaq7np.js +532 -0
- package/dist/cli/arguments.d.ts +3 -1
- package/dist/cli/audit-pack.d.ts +24 -0
- package/dist/cli/cli-credentials.d.ts +6 -0
- package/dist/cli/cli-profiles.d.ts +4 -2
- package/dist/cli/node-engine.d.ts +2 -0
- package/dist/{cli-2h37qyvg.js → cli-1cf4dcnj.js} +245 -642
- package/dist/{cli-entry-w0hterjs.js → cli-entry-3s63zn4w.js} +40 -13
- package/dist/cli-entry-7f0cen32.js +9990 -0
- package/dist/cli-entry-a890x3kq.js +10348 -0
- package/dist/{cli-entry-20w6nh0k.js → cli-entry-hdtfef27.js} +439 -19
- package/dist/cli-entry-rgs6bxmy.js +484 -0
- package/dist/cli.js +27 -2
- package/dist/client/json-contracts.d.ts +4 -0
- package/dist/client/protocol.d.ts +133 -0
- package/dist/client/task-control-host.d.ts +400 -0
- package/dist/client/task-projection-host.d.ts +12 -0
- package/dist/client/task-projection.d.ts +168 -0
- package/dist/compat/code-support.js +28 -22
- package/dist/{config-qt69hkqj.js → config-r9fdhce6.js} +3 -3
- package/dist/{config-j9624t6t.js → config-vyajmksy.js} +1 -1
- package/dist/engine/acp.js +15 -11
- package/dist/engine/client.js +14 -10
- package/dist/engine/desktop-providers-v1.d.ts +2 -0
- package/dist/engine/desktop-providers-v1.js +23 -3
- package/dist/engine/desktop-state-v1.js +11 -8
- package/dist/engine/index.d.ts +3 -0
- package/dist/engine/index.js +101 -554
- package/dist/engine/mcp-stdio-v1.js +8 -6
- package/dist/engine/models.js +76 -4
- package/dist/engine/protocol.d.ts +2 -0
- package/dist/engine/protocol.js +110 -0
- package/dist/engine/service.js +15 -11
- package/dist/hostile-repository-demo.js +1095 -505
- package/dist/{index-937cb7y8.js → index-02pqtbbg.js} +559 -33
- package/dist/{index-pp474137.js → index-0zs2dz26.js} +766 -931
- package/dist/{index-8zjmnyw5.js → index-1265j7t2.js} +73 -6
- package/dist/index-4fx5f3k5.js +269 -0
- package/dist/{index-nmjdwd4p.js → index-4gt045j0.js} +109 -1
- package/dist/{index-6dft2vev.js → index-6599mpmy.js} +5 -3
- package/dist/{index-tfzta544.js → index-74kkpyqk.js} +9 -7
- package/dist/{index-61gthdz6.js → index-8sm2a1wa.js} +1 -1
- package/dist/index-c39197wq.js +552 -0
- package/dist/{index-5jhgatga.js → index-crta5wzv.js} +7 -6
- package/dist/{index-m34q25jj.js → index-d9zkmhz3.js} +143 -824
- package/dist/{index-pdmevfxv.js → index-dtb2c6ds.js} +5 -259
- package/dist/index-f6mqa5gk.js +1535 -0
- package/dist/index-j6zxnc8m.js +490 -0
- package/dist/{index-rkbf7dqg.js → index-mv8sb1ns.js} +5 -3
- package/dist/{index-xqxeypt5.js → index-mzydbzp8.js} +76 -4
- package/dist/{index-wg1sd3at.js → index-qfsrrnz6.js} +1 -1
- package/dist/{index-m82cfspw.js → index-sk3cap35.js} +877 -963
- package/dist/index-sstgcsr0.js +511 -0
- package/dist/index-wm9xeq1n.js +329 -0
- package/dist/index-xdbkcccf.js +719 -0
- package/dist/{index-s2k2edts.js → index-zxg4ve4j.js} +41 -1548
- package/dist/index.d.ts +3 -0
- package/dist/index.js +93 -77
- package/dist/internal/desktop/providers.d.ts +2 -0
- package/dist/models/catalog.d.ts +2 -0
- package/dist/persistence/sqlite-database.d.ts +1 -0
- package/dist/providers/azure-openai.d.ts +14 -0
- package/dist/providers/bedrock.d.ts +23 -0
- package/dist/providers/providers.d.ts +1 -1
- package/dist/runtime/durable-review-group.d.ts +33 -0
- package/dist/runtime/harness.d.ts +11 -0
- package/dist/runtime/run-interruption.d.ts +7 -0
- package/dist/runtime/shared-budget.d.ts +30 -0
- package/dist/runtime/task-continuity.d.ts +300 -77
- package/dist/service-cli.js +15 -11
- package/dist/{service-client-cli-fn54ev6w.js → service-client-cli-eqrdc9zq.js} +400 -305
- package/dist/verify-historical-migrations.js +1095 -505
- package/dist/zhx.js +27 -2
- package/docs/AUDIT_PACK.md +99 -0
- package/docs/AZURE_OPENAI.md +53 -0
- package/docs/BEDROCK.md +56 -0
- package/docs/CLI.md +15 -0
- package/docs/CLIENT_PROTOCOL.md +178 -0
- package/docs/CODE_RELEASE.md +31 -1
- package/docs/CODE_WEB_TASKS.md +116 -0
- package/docs/CONTEXT_ENGINEERING.md +59 -0
- package/docs/CREDENTIALS.md +21 -0
- package/docs/DURABLE_OPERATIONS.md +93 -1
- package/docs/ENGINE_API.md +5 -2
- package/docs/EXTENSIBILITY.md +2 -2
- package/docs/FIRST_USE.md +6 -6
- package/docs/MINIMUM_TASK_AUTHORITY.md +3 -3
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/README.md +6 -1
- package/docs/STABILITY.md +3 -1
- package/docs/SUPPORT_MATRIX.md +1 -1
- package/docs/SUPPORT_MATRIX_1_1.md +1 -1
- package/docs/USAGE.md +3 -1
- package/docs/VERTEX.md +2 -2
- package/docs/WEB_LIMITS.md +4 -3
- package/docs/adr/0002-isolated-mcp-stdio.md +6 -3
- package/docs/support-matrix-1.1.json +3 -1
- package/docs/support-matrix.json +6 -4
- package/evaluations/code-task-ui.json +20 -0
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/evaluations/task-projection.json +10 -0
- package/evaluations/task-recovery-lab.json +60 -0
- package/examples/README.md +3 -3
- package/package.json +23 -13
- package/dist/cli-entry-4ngptr62.js +0 -19900
- package/dist/index-m49jx72n.js +0 -220
|
@@ -8,12 +8,14 @@ import {
|
|
|
8
8
|
mcpResourcePlanSchema,
|
|
9
9
|
prepareMcpWorkspaceSnapshot,
|
|
10
10
|
recoverDockerMcpResources
|
|
11
|
-
} from "../index-
|
|
12
|
-
import"../index-
|
|
13
|
-
import"../index-
|
|
14
|
-
import"../index-
|
|
15
|
-
import"../index-
|
|
16
|
-
import"../index-
|
|
11
|
+
} from "../index-mv8sb1ns.js";
|
|
12
|
+
import"../index-dtb2c6ds.js";
|
|
13
|
+
import"../index-d9zkmhz3.js";
|
|
14
|
+
import"../index-1265j7t2.js";
|
|
15
|
+
import"../index-c39197wq.js";
|
|
16
|
+
import"../index-mzydbzp8.js";
|
|
17
|
+
import"../index-4fx5f3k5.js";
|
|
18
|
+
import"../index-xdbkcccf.js";
|
|
17
19
|
import"../index-bpc596v3.js";
|
|
18
20
|
import"../index-fm84men1.js";
|
|
19
21
|
import"../index-1bx83sw4.js";
|
package/dist/engine/models.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
// src/models/catalog.json
|
|
4
4
|
var catalog_default = {
|
|
5
5
|
schemaVersion: 1,
|
|
6
|
-
revision: "2026-
|
|
6
|
+
revision: "2026-10-15-bedrock-azure",
|
|
7
7
|
providers: [
|
|
8
8
|
{
|
|
9
9
|
id: "openai",
|
|
@@ -768,6 +768,78 @@ var catalog_default = {
|
|
|
768
768
|
reason: "Provisional Vertex route; availability depends on project, region and IAM. No live certification."
|
|
769
769
|
}
|
|
770
770
|
]
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
id: "bedrock",
|
|
774
|
+
defaultModel: "anthropic.claude-haiku-5-5",
|
|
775
|
+
models: [
|
|
776
|
+
{
|
|
777
|
+
id: "anthropic.claude-haiku-5-5",
|
|
778
|
+
name: "Claude Haiku 5.5 (Bedrock)",
|
|
779
|
+
group: "primary",
|
|
780
|
+
order: 0,
|
|
781
|
+
lifecycle: "unknown",
|
|
782
|
+
validation: "unverified",
|
|
783
|
+
capabilities: ["chat", "tools"],
|
|
784
|
+
reason: "Provisional Bedrock Converse route. Account access, region, and live Harness certification are not verified. No prices or context limits are inferred."
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
id: "anthropic.claude-sonnet-5-5",
|
|
788
|
+
name: "Claude Sonnet 5.5 (Bedrock)",
|
|
789
|
+
group: "other",
|
|
790
|
+
order: 1,
|
|
791
|
+
lifecycle: "unknown",
|
|
792
|
+
validation: "unverified",
|
|
793
|
+
capabilities: ["chat", "tools"],
|
|
794
|
+
reason: "Provisional Bedrock model id. Availability depends on the account and region. No live certification."
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
id: "amazon.nova-2-lite-v1:0",
|
|
798
|
+
name: "Amazon Nova 2 Lite (Bedrock)",
|
|
799
|
+
group: "other",
|
|
800
|
+
order: 2,
|
|
801
|
+
lifecycle: "unknown",
|
|
802
|
+
validation: "unverified",
|
|
803
|
+
capabilities: ["chat", "tools"],
|
|
804
|
+
reason: "Provisional Bedrock model id. Availability depends on the account and region. No live certification."
|
|
805
|
+
}
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: "azure-openai",
|
|
810
|
+
defaultModel: "gpt-5.4",
|
|
811
|
+
models: [
|
|
812
|
+
{
|
|
813
|
+
id: "gpt-5.4",
|
|
814
|
+
name: "GPT-5.4 (Azure OpenAI)",
|
|
815
|
+
group: "primary",
|
|
816
|
+
order: 0,
|
|
817
|
+
lifecycle: "unknown",
|
|
818
|
+
validation: "unverified",
|
|
819
|
+
capabilities: ["chat", "tools"],
|
|
820
|
+
reason: "Provisional Azure OpenAI route. Deployment name, API version, and live Harness certification are not verified. No prices are copied from the OpenAI API."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
id: "gpt-5",
|
|
824
|
+
name: "GPT-5 (Azure OpenAI)",
|
|
825
|
+
group: "other",
|
|
826
|
+
order: 1,
|
|
827
|
+
lifecycle: "unknown",
|
|
828
|
+
validation: "unverified",
|
|
829
|
+
capabilities: ["chat", "tools"],
|
|
830
|
+
reason: "Provisional Azure OpenAI model id. Use AZURE_OPENAI_DEPLOYMENTS when the deployment name differs. No live certification."
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
id: "gpt-6-astra",
|
|
834
|
+
name: "GPT-6 Astra (Azure OpenAI)",
|
|
835
|
+
group: "other",
|
|
836
|
+
order: 2,
|
|
837
|
+
lifecycle: "unknown",
|
|
838
|
+
validation: "unverified",
|
|
839
|
+
capabilities: ["chat", "tools"],
|
|
840
|
+
reason: "Provisional Azure OpenAI model id. Account rollout and deployment availability are not verified. No live certification."
|
|
841
|
+
}
|
|
842
|
+
]
|
|
771
843
|
}
|
|
772
844
|
]
|
|
773
845
|
};
|
|
@@ -830,13 +902,13 @@ var modelCatalogSchema = z.object({
|
|
|
830
902
|
schemaVersion: z.literal(1),
|
|
831
903
|
revision: z.string().min(1).max(80).regex(/^[a-zA-Z0-9._-]+$/),
|
|
832
904
|
providers: z.array(z.object({
|
|
833
|
-
id: z.enum(["openai", "qwen", "gemini", "meta", "anthropic", "vertex"]),
|
|
905
|
+
id: z.enum(["openai", "qwen", "gemini", "meta", "anthropic", "vertex", "bedrock", "azure-openai"]),
|
|
834
906
|
defaultModel: modelId,
|
|
835
907
|
models: z.array(catalogModelSchema).min(1).max(500)
|
|
836
|
-
}).strict()).length(
|
|
908
|
+
}).strict()).length(8)
|
|
837
909
|
}).strict().superRefine((catalog, ctx) => {
|
|
838
910
|
const invalid = (message) => ctx.addIssue({ code: "custom", message });
|
|
839
|
-
if (new Set(catalog.providers.map((p) => p.id)).size !==
|
|
911
|
+
if (new Set(catalog.providers.map((p) => p.id)).size !== 8)
|
|
840
912
|
invalid("Duplicate providers");
|
|
841
913
|
for (const provider of catalog.providers) {
|
|
842
914
|
const ids = new Set(provider.models.map((m) => m.id));
|
|
@@ -5,3 +5,5 @@ export { CLI_JSON_SCHEMA_VERSION, CLI_EVENT_SCHEMA_VERSION, streamEventDocument,
|
|
|
5
5
|
export type { StreamRunResultSource } from "../client/stream.js";
|
|
6
6
|
export type { HarnessActivityEvent, HarnessActivityRun, HarnessActivitySnapshot, HarnessActivityPage } from "../client/service-events.js";
|
|
7
7
|
export type { ApprovalDecisionView } from "../approvals/approval-history.js";
|
|
8
|
+
export { HARNESS_TASK_PROJECTION_VERSION, harnessTaskProjectionSchema, reduceHarnessTaskProjection } from '../client/task-projection.js';
|
|
9
|
+
export type { HarnessTaskProjection, HarnessTaskProjectionScope } from '../client/task-projection.js';
|
package/dist/engine/protocol.js
CHANGED
|
@@ -38,6 +38,24 @@ var harnessClientCommandSchema = z.discriminatedUnion("method", [
|
|
|
38
38
|
z.object({ method: z.literal("restore.apply"), ...restore, ...mutation, expectedRevision: revision, reviewedProposalId: fileDigest }).strict(),
|
|
39
39
|
z.object({ method: z.literal("restore.recoverFork"), ...restore, ...mutation, expectedRevision: revision, forkSessionId: id }).strict(),
|
|
40
40
|
z.object({ method: z.literal("run.start"), ...session, ...mutation, expectedRevision: revision, prompt: z.string().min(1).max(64 * 1024) }).strict(),
|
|
41
|
+
z.object({
|
|
42
|
+
method: z.literal("task.start"),
|
|
43
|
+
...session,
|
|
44
|
+
...mutation,
|
|
45
|
+
expectedRevision: revision,
|
|
46
|
+
brief: z.strictObject({
|
|
47
|
+
goal: z.string().trim().min(1).max(2000),
|
|
48
|
+
paths: z.array(z.string().min(1).max(1024)).min(1).max(20),
|
|
49
|
+
checks: z.array(id).min(1).max(8),
|
|
50
|
+
constraints: z.array(z.string().trim().min(1).max(500)).max(8),
|
|
51
|
+
budget: z.strictObject({ inputTokens: z.number().int().positive().safe(), outputTokens: z.number().int().positive().safe(), totalTokens: z.number().int().positive().safe() })
|
|
52
|
+
})
|
|
53
|
+
}).strict(),
|
|
54
|
+
z.object({ method: z.literal("task.review"), ...run }).strict(),
|
|
55
|
+
z.object({ method: z.literal("task.keep"), ...run, ...mutation, reviewId: z.string().uuid() }).strict(),
|
|
56
|
+
z.object({ method: z.literal("task.revise"), ...run, ...mutation, reviewId: z.string().uuid(), correction: z.string().trim().min(1).max(500) }).strict(),
|
|
57
|
+
z.object({ method: z.literal("task.continue"), ...run, ...mutation, reviewId: z.string().uuid(), prompt: z.string().trim().min(1).max(2000) }).strict(),
|
|
58
|
+
z.object({ method: z.literal("task.get"), ...run, projectionVersion: z.number().int().nonnegative().safe() }).strict(),
|
|
41
59
|
z.object({ method: z.literal("run.get"), ...run, includeReview: z.boolean().optional(), includeDiff: z.boolean().optional(), decisionOffset: z.number().int().min(0).max(512).optional() }).strict(),
|
|
42
60
|
z.object({
|
|
43
61
|
method: z.literal("approval.resolve"),
|
|
@@ -197,12 +215,104 @@ var streamResultDocument = (result, sequence = 0) => {
|
|
|
197
215
|
};
|
|
198
216
|
};
|
|
199
217
|
var serializeStreamResult = (result, sequence = 0) => JSON.stringify(streamResultDocument(result, sequence));
|
|
218
|
+
// src/client/task-projection.ts
|
|
219
|
+
import { z as z3 } from "zod";
|
|
220
|
+
var HARNESS_TASK_PROJECTION_VERSION = 1;
|
|
221
|
+
var id2 = z3.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
222
|
+
var count = z3.number().int().nonnegative().safe();
|
|
223
|
+
var digest = z3.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
224
|
+
var text = z3.string().max(2048);
|
|
225
|
+
var tokens = z3.strictObject({ inputTokens: count, outputTokens: count, totalTokens: count });
|
|
226
|
+
var harnessTaskProjectionSchema = z3.strictObject({
|
|
227
|
+
schemaVersion: z3.literal(1),
|
|
228
|
+
connectionId: id2,
|
|
229
|
+
sequence: count,
|
|
230
|
+
projectId: id2,
|
|
231
|
+
sessionId: id2,
|
|
232
|
+
runId: id2,
|
|
233
|
+
task: z3.strictObject({
|
|
234
|
+
reference: digest,
|
|
235
|
+
contractRevision: count,
|
|
236
|
+
contractDigest: digest,
|
|
237
|
+
runRevision: count,
|
|
238
|
+
objective: text.nullable(),
|
|
239
|
+
objectiveSource: z3.enum(["operator_brief", "retained_operator_source", "unavailable"]),
|
|
240
|
+
observedRunId: id2,
|
|
241
|
+
historicalRequest: z3.boolean(),
|
|
242
|
+
execution: z3.enum(["created", "queued", "running", "waiting_approval", "cancel_requested", "completed", "failed", "cancelled", "timed_out", "unknown"]),
|
|
243
|
+
artifact: z3.strictObject({
|
|
244
|
+
observedDigest: digest.nullable(),
|
|
245
|
+
deliveredDigest: digest.nullable(),
|
|
246
|
+
correspondence: z3.enum(["current", "stale", "missing"]),
|
|
247
|
+
paths: z3.array(text).max(256),
|
|
248
|
+
contents: z3.literal("not_included")
|
|
249
|
+
}),
|
|
250
|
+
review: z3.strictObject({
|
|
251
|
+
structure: z3.enum(["verified", "incomplete"]),
|
|
252
|
+
semantic: z3.literal("pending"),
|
|
253
|
+
acceptance: z3.literal("not_recorded"),
|
|
254
|
+
human: z3.array(z3.strictObject({ id: text, requirement: text, status: z3.literal("pending") })).max(32),
|
|
255
|
+
checks: z3.array(z3.strictObject({ id: text, status: z3.enum(["confirmed", "missing", "missing_or_stale", "host_policy_changed"]), provenance: z3.literal("contract_snapshot_and_tool_journal") })).max(32)
|
|
256
|
+
}),
|
|
257
|
+
budget: z3.strictObject({
|
|
258
|
+
availability: z3.enum(["authoritative", "legacy_not_enabled"]),
|
|
259
|
+
revision: count.nullable(),
|
|
260
|
+
confirmed: tokens.nullable(),
|
|
261
|
+
reserved: tokens.nullable(),
|
|
262
|
+
unknown: tokens.nullable(),
|
|
263
|
+
remaining: tokens.nullable(),
|
|
264
|
+
limits: tokens.nullable(),
|
|
265
|
+
estimated: z3.null(),
|
|
266
|
+
estimation: z3.literal("not_separately_recorded"),
|
|
267
|
+
usageComplete: z3.boolean().nullable(),
|
|
268
|
+
admissionsClosed: z3.boolean().nullable(),
|
|
269
|
+
monetary: z3.strictObject({ estimatedConfirmedUsd: z3.number().finite().nonnegative().nullable(), reservedUsd: z3.number().finite().nonnegative().nullable(), unknownHeldUsd: z3.number().finite().nonnegative().nullable(), remainingUsd: z3.number().finite().nonnegative().nullable(), unknown: z3.boolean(), costKind: z3.literal("estimate-not-invoice") })
|
|
270
|
+
}),
|
|
271
|
+
effects: z3.strictObject({ readOnly: count, recorded: count, unknown: count, missingEvidence: z3.boolean(), automaticReplay: z3.literal(false), providerStopped: z3.literal("unconfirmed") }),
|
|
272
|
+
nextAction: z3.strictObject({
|
|
273
|
+
kind: z3.enum(["wait", "reconcile", "review_approval", "review_delivery", "explicit_continuation"]),
|
|
274
|
+
permitted: z3.literal("read_only"),
|
|
275
|
+
authorization: z3.literal("required_for_execution"),
|
|
276
|
+
preserves: z3.literal("contract_receipts_budget_and_effects"),
|
|
277
|
+
automaticReplay: z3.literal(false)
|
|
278
|
+
}),
|
|
279
|
+
diagnostic: z3.strictObject({ code: z3.enum(["EXECUTION_FAILED", "EXECUTION_CANCELLED", "EXECUTION_TIMED_OUT", "EVIDENCE_INCOMPLETE"]), cause: z3.enum(["execution_terminal_failure", "operator_or_runtime_cancellation", "execution_deadline", "receipts_missing_or_stale"]), impact: z3.literal("acceptance_not_established"), safeAction: z3.enum(["review_configuration", "reconcile", "review_delivery"]) }).nullable(),
|
|
280
|
+
reasons: z3.array(z3.string().regex(/^[A-Z][A-Z0-9_]{0,95}$/)).max(32),
|
|
281
|
+
provenance: z3.literal("host_durable_contract_journal_budget_and_fresh_native_snapshot"),
|
|
282
|
+
textTruncated: z3.boolean()
|
|
283
|
+
})
|
|
284
|
+
});
|
|
285
|
+
function reduceHarnessTaskProjection(current, incoming, expected) {
|
|
286
|
+
const inScope = (value) => ["connectionId", "projectId", "sessionId", "runId"].every((key) => value[key] === expected[key]);
|
|
287
|
+
const previous = harnessTaskProjectionSchema.safeParse(current);
|
|
288
|
+
const retained = previous.success && inScope(previous.data) ? previous.data : null;
|
|
289
|
+
let encoded;
|
|
290
|
+
try {
|
|
291
|
+
encoded = JSON.stringify(incoming);
|
|
292
|
+
} catch {
|
|
293
|
+
return { status: "refresh_required", snapshot: retained };
|
|
294
|
+
}
|
|
295
|
+
if (new TextEncoder().encode(encoded).length > 64 * 1024)
|
|
296
|
+
return { status: "refresh_required", snapshot: retained };
|
|
297
|
+
const parsed = harnessTaskProjectionSchema.safeParse(incoming);
|
|
298
|
+
if (!parsed.success || !inScope(parsed.data))
|
|
299
|
+
return { status: "refresh_required", snapshot: retained };
|
|
300
|
+
if (retained && parsed.data.sequence <= retained.sequence) {
|
|
301
|
+
if (parsed.data.sequence === retained.sequence && JSON.stringify(parsed.data) !== JSON.stringify(retained))
|
|
302
|
+
return { status: "refresh_required", snapshot: retained };
|
|
303
|
+
return { status: "ignored", snapshot: retained };
|
|
304
|
+
}
|
|
305
|
+
return { status: "applied", snapshot: parsed.data };
|
|
306
|
+
}
|
|
200
307
|
export {
|
|
201
308
|
CLI_EVENT_SCHEMA_VERSION,
|
|
202
309
|
CLI_JSON_SCHEMA_VERSION,
|
|
203
310
|
HARNESS_CLIENT_PROTOCOL_VERSION,
|
|
311
|
+
HARNESS_TASK_PROJECTION_VERSION,
|
|
204
312
|
harnessClientCommandSchema,
|
|
205
313
|
harnessClientRequestSchema,
|
|
314
|
+
harnessTaskProjectionSchema,
|
|
315
|
+
reduceHarnessTaskProjection,
|
|
206
316
|
serializeStreamEvent,
|
|
207
317
|
serializeStreamResult,
|
|
208
318
|
streamEventDocument,
|
package/dist/engine/service.js
CHANGED
|
@@ -5,17 +5,21 @@ import {
|
|
|
5
5
|
recoverHarnessLocalService,
|
|
6
6
|
requestHarnessLocalService,
|
|
7
7
|
startHarnessLocalService
|
|
8
|
-
} from "../index-
|
|
9
|
-
import"../index-
|
|
10
|
-
import"../index-
|
|
11
|
-
import"../index-
|
|
12
|
-
import"../index-
|
|
13
|
-
import"../index-
|
|
14
|
-
import"../index-
|
|
15
|
-
import"../index-
|
|
16
|
-
import"../index-
|
|
17
|
-
import"../index-
|
|
18
|
-
import"../index-
|
|
8
|
+
} from "../index-crta5wzv.js";
|
|
9
|
+
import"../index-02pqtbbg.js";
|
|
10
|
+
import"../index-6599mpmy.js";
|
|
11
|
+
import"../index-0zs2dz26.js";
|
|
12
|
+
import"../index-f6mqa5gk.js";
|
|
13
|
+
import"../index-dtb2c6ds.js";
|
|
14
|
+
import"../index-d9zkmhz3.js";
|
|
15
|
+
import"../index-1265j7t2.js";
|
|
16
|
+
import"../index-c39197wq.js";
|
|
17
|
+
import"../index-mzydbzp8.js";
|
|
18
|
+
import"../index-wm9xeq1n.js";
|
|
19
|
+
import"../index-zxg4ve4j.js";
|
|
20
|
+
import"../index-4fx5f3k5.js";
|
|
21
|
+
import"../index-xdbkcccf.js";
|
|
22
|
+
import"../index-4gt045j0.js";
|
|
19
23
|
import"../index-bpc596v3.js";
|
|
20
24
|
import"../index-fm84men1.js";
|
|
21
25
|
import"../index-1bx83sw4.js";
|