@zhivex-ai/harness 1.3.0 → 1.4.0-rc.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 +15 -0
- package/README.md +11 -8
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/contracts/engine-api.json +50 -0
- package/contracts/public-api.json +162 -0
- package/contracts/stable-api-signatures.json +9 -9
- package/dist/acp-cli.js +36 -10
- package/dist/cli/arguments.d.ts +5 -1
- package/dist/cli/memory.d.ts +2 -0
- package/dist/{cli-entry-1gfg3brj.js → cli-entry-0c8vd42w.js} +725 -388
- package/dist/{cli-entry-bx3vjw7h.js → cli-entry-645q3vwx.js} +29 -3
- package/dist/{cli-etsmtst3.js → cli-mejgq79m.js} +94 -6
- package/dist/cli.js +2 -2
- package/dist/compat/cli-options.d.ts +12 -1
- package/dist/compat/code-support.js +2 -2
- package/dist/context/project-memory-context.d.ts +6 -0
- package/dist/engine/acp.js +6 -6
- package/dist/engine/client.js +5 -5
- package/dist/engine/desktop-state-v1.js +3 -3
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +85 -8
- package/dist/engine/mcp-stdio-v1.js +2 -2
- package/dist/engine/service.js +6 -6
- package/dist/hostile-repository-demo.js +1019 -696
- package/dist/{index-hnaxfpb5.js → index-4nf70nq1.js} +53 -6
- package/dist/{index-h0mqx2ed.js → index-aqe7236b.js} +279 -2
- package/dist/{index-42gp2hy8.js → index-ds5e9x3a.js} +1 -1
- package/dist/{index-azmwjp95.js → index-fm6ahk8m.js} +3 -2
- package/dist/{index-8zzhggxv.js → index-g0wfcb65.js} +1 -1
- package/dist/{index-a97bezbz.js → index-hwff3qx5.js} +10 -4
- package/dist/{index-6m08wvab.js → index-ma9a5re7.js} +1 -1
- package/dist/{index-w2sj0wkw.js → index-n86069yc.js} +2 -2
- package/dist/{index-2jrdcj6b.js → index-wq2tax80.js} +15 -1
- package/dist/index.js +8 -8
- package/dist/persistence/project-memory-command.d.ts +11 -0
- package/dist/persistence/project-memory.d.ts +109 -0
- package/dist/persistence/sessions.d.ts +4 -0
- package/dist/runtime/harness.d.ts +4 -0
- package/dist/service-cli.js +6 -6
- package/dist/{service-client-cli-3365rfav.js → service-client-cli-2ye331s3.js} +2 -2
- package/dist/verify-historical-migrations.js +716 -392
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +4 -0
- package/docs/CODE_RELEASE.md +57 -17
- package/docs/CONTEXT_ENGINEERING.md +2 -0
- package/docs/DURABLE_OPERATIONS.md +2 -0
- package/docs/ENGINE_API.md +11 -7
- package/docs/FIRST_USE.md +6 -6
- package/docs/PROJECT_MEMORY.md +157 -0
- package/docs/README.md +2 -0
- package/docs/STABILITY.md +1 -1
- package/docs/WORKSPACE_CHECKPOINTS.md +11 -1
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/examples/README.md +4 -4
- package/package.json +3 -2
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentStoreScope } from "@zhivex-ai/agents/ops";
|
|
3
|
+
export declare const HARNESS_PROJECT_MEMORY_SCHEMA_VERSION: 1;
|
|
4
|
+
export declare const HARNESS_PROJECT_MEMORY_LIMITS: Readonly<{
|
|
5
|
+
entries: 128;
|
|
6
|
+
entryBytes: 4096;
|
|
7
|
+
documentBytes: number;
|
|
8
|
+
contextBytes: 6000;
|
|
9
|
+
contextEntries: 3;
|
|
10
|
+
staleAfterMs: number;
|
|
11
|
+
}>;
|
|
12
|
+
declare const entrySchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
content: z.ZodString;
|
|
15
|
+
source: z.ZodObject<{
|
|
16
|
+
kind: z.ZodEnum<{
|
|
17
|
+
operator: "operator";
|
|
18
|
+
suggestion: "suggestion";
|
|
19
|
+
}>;
|
|
20
|
+
reference: z.ZodString;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
status: z.ZodEnum<{
|
|
23
|
+
accepted: "accepted";
|
|
24
|
+
pending: "pending";
|
|
25
|
+
}>;
|
|
26
|
+
revision: z.ZodNumber;
|
|
27
|
+
createdAt: z.ZodNumber;
|
|
28
|
+
updatedAt: z.ZodNumber;
|
|
29
|
+
reviewedAt: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type HarnessProjectMemoryEntry = z.infer<typeof entrySchema>;
|
|
33
|
+
export interface HarnessProjectMemoryInput {
|
|
34
|
+
content: string;
|
|
35
|
+
source: string;
|
|
36
|
+
expiresAt?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface HarnessProjectMemoryOptions {
|
|
39
|
+
workspace: string;
|
|
40
|
+
stateDirectory: string;
|
|
41
|
+
scope: AgentStoreScope;
|
|
42
|
+
now?: () => number;
|
|
43
|
+
}
|
|
44
|
+
export interface HarnessProjectMemoryView {
|
|
45
|
+
schemaVersion: 1;
|
|
46
|
+
kind: "project-memory";
|
|
47
|
+
workspaceKey: string;
|
|
48
|
+
scopeKey: string;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
entries: (HarnessProjectMemoryEntry & {
|
|
51
|
+
freshness: "fresh" | "stale" | "expired" | "pending";
|
|
52
|
+
})[];
|
|
53
|
+
limits: typeof HARNESS_PROJECT_MEMORY_LIMITS;
|
|
54
|
+
}
|
|
55
|
+
export interface HarnessProjectMemory {
|
|
56
|
+
readonly databasePath: string;
|
|
57
|
+
list(): HarnessProjectMemoryView;
|
|
58
|
+
read(id: string): HarnessProjectMemoryView["entries"][number];
|
|
59
|
+
remember(input: HarnessProjectMemoryInput): HarnessProjectMemoryEntry;
|
|
60
|
+
suggest(input: HarnessProjectMemoryInput): HarnessProjectMemoryEntry;
|
|
61
|
+
update(id: string, expectedRevision: number, input: HarnessProjectMemoryInput): HarnessProjectMemoryEntry;
|
|
62
|
+
accept(id: string, expectedRevision: number): HarnessProjectMemoryEntry;
|
|
63
|
+
forget(id: string, expectedRevision: number): void;
|
|
64
|
+
clear(): number;
|
|
65
|
+
setEnabled(enabled: boolean): void;
|
|
66
|
+
retrieve(query: string, budget?: {
|
|
67
|
+
maxBytes?: number;
|
|
68
|
+
maxEntries?: number;
|
|
69
|
+
}): {
|
|
70
|
+
content: string;
|
|
71
|
+
ids: string[];
|
|
72
|
+
bytes: number;
|
|
73
|
+
};
|
|
74
|
+
close(): void;
|
|
75
|
+
}
|
|
76
|
+
export declare const projectMemoryRecordKey: (binding: {
|
|
77
|
+
workspaceKey: string;
|
|
78
|
+
scopeKey: string;
|
|
79
|
+
}) => string;
|
|
80
|
+
export declare const projectMemoryBinding: (workspace: string, scope: AgentStoreScope) => {
|
|
81
|
+
workspaceKey: string;
|
|
82
|
+
scopeKey: string;
|
|
83
|
+
memoryKey: string;
|
|
84
|
+
};
|
|
85
|
+
export declare const decodeProjectMemory: (messages: unknown, binding: {
|
|
86
|
+
workspaceKey: string;
|
|
87
|
+
scopeKey: string;
|
|
88
|
+
}) => {
|
|
89
|
+
schemaVersion: 1;
|
|
90
|
+
workspaceKey: string;
|
|
91
|
+
scopeKey: string;
|
|
92
|
+
enabled: boolean;
|
|
93
|
+
entries: {
|
|
94
|
+
id: string;
|
|
95
|
+
content: string;
|
|
96
|
+
source: {
|
|
97
|
+
kind: "operator" | "suggestion";
|
|
98
|
+
reference: string;
|
|
99
|
+
};
|
|
100
|
+
status: "accepted" | "pending";
|
|
101
|
+
revision: number;
|
|
102
|
+
createdAt: number;
|
|
103
|
+
updatedAt: number;
|
|
104
|
+
reviewedAt?: number | undefined;
|
|
105
|
+
expiresAt?: number | undefined;
|
|
106
|
+
}[];
|
|
107
|
+
};
|
|
108
|
+
export declare function openHarnessProjectMemory(options: HarnessProjectMemoryOptions): Promise<HarnessProjectMemory>;
|
|
109
|
+
export {};
|
|
@@ -120,6 +120,10 @@ export interface CliSessionStore {
|
|
|
120
120
|
}): Promise<SessionRetentionResult>;
|
|
121
121
|
close(): void;
|
|
122
122
|
}
|
|
123
|
+
export declare const ensurePrivateDatabase: (workspace: string, stateDirectory: string) => Promise<{
|
|
124
|
+
databasePath: string;
|
|
125
|
+
databaseEntry: import("node:fs").Stats;
|
|
126
|
+
}>;
|
|
123
127
|
export declare const openCliSessionStore: (options: OpenSessionStoreOptions) => Promise<CliSessionStore>;
|
|
124
128
|
/** Compatibility-friendly name for consumers that do not care that the index is CLI-owned. */
|
|
125
129
|
export declare const openSessionStore: typeof openCliSessionStore;
|
|
@@ -21,6 +21,10 @@ export declare const HARNESS_INSTRUCTIONS = "You are Zhivex Harness, a general-p
|
|
|
21
21
|
/** Render only guidance whose named tools exist in this runtime's catalog. */
|
|
22
22
|
export declare const renderHarnessInstructions: (names: readonly string[]) => string;
|
|
23
23
|
export interface CreateHarnessOptions extends HarnessConfigInput {
|
|
24
|
+
/** Experimental: true enables curated local project memory; false disables
|
|
25
|
+
* curated and SDK memory, including caller-supplied memory. Omission preserves
|
|
26
|
+
* the historical SDK integration; CLI hosts explicitly enable curated mode. */
|
|
27
|
+
projectMemory?: boolean;
|
|
24
28
|
/** Experimental: absolute host-owned policy path outside repository authority. */
|
|
25
29
|
toolPolicyFile?: string;
|
|
26
30
|
toolPolicy?: HarnessToolPolicy;
|
package/dist/service-cli.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
recoverHarnessLocalService,
|
|
4
4
|
startHarnessLocalService
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-n86069yc.js";
|
|
6
6
|
import {
|
|
7
7
|
createHarness
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
8
|
+
} from "./index-4nf70nq1.js";
|
|
9
|
+
import"./index-aqe7236b.js";
|
|
10
|
+
import"./index-g0wfcb65.js";
|
|
11
|
+
import"./index-ds5e9x3a.js";
|
|
12
|
+
import"./index-fm6ahk8m.js";
|
|
13
13
|
import"./index-z0qxmkm2.js";
|
|
14
14
|
import"./index-yb239ghk.js";
|
|
15
15
|
import"./index-gq9xagx2.js";
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
printPolicyInspection,
|
|
15
15
|
sanitizeTerminalText,
|
|
16
16
|
serializeStreamResult
|
|
17
|
-
} from "./cli-entry-
|
|
17
|
+
} from "./cli-entry-0c8vd42w.js";
|
|
18
18
|
import {
|
|
19
19
|
HARNESS_VERSION
|
|
20
|
-
} from "./cli-entry-
|
|
20
|
+
} from "./cli-entry-645q3vwx.js";
|
|
21
21
|
import {
|
|
22
22
|
HARNESS_ERROR_CODES,
|
|
23
23
|
HARNESS_ERROR_SCHEMA_VERSION,
|