@zhivex-ai/harness 1.3.0-rc.7 → 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.
Files changed (56) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +14 -9
  3. package/SECURITY.md +1 -1
  4. package/SUPPORT.md +4 -4
  5. package/contracts/engine-api.json +50 -0
  6. package/contracts/public-api.json +162 -0
  7. package/contracts/stable-api-signatures.json +9 -9
  8. package/dist/acp-cli.js +36 -10
  9. package/dist/cli/arguments.d.ts +5 -1
  10. package/dist/cli/memory.d.ts +2 -0
  11. package/dist/{cli-entry-ae7x44d4.js → cli-entry-0c8vd42w.js} +725 -388
  12. package/dist/{cli-entry-ev76ezcd.js → cli-entry-645q3vwx.js} +29 -3
  13. package/dist/{cli-t7hrhayq.js → cli-mejgq79m.js} +94 -6
  14. package/dist/cli.js +2 -2
  15. package/dist/compat/cli-options.d.ts +12 -1
  16. package/dist/compat/code-support.js +2 -2
  17. package/dist/context/project-memory-context.d.ts +6 -0
  18. package/dist/engine/acp.js +6 -6
  19. package/dist/engine/client.js +5 -5
  20. package/dist/engine/desktop-state-v1.js +3 -3
  21. package/dist/engine/index.d.ts +4 -0
  22. package/dist/engine/index.js +85 -8
  23. package/dist/engine/mcp-stdio-v1.js +2 -2
  24. package/dist/engine/service.js +6 -6
  25. package/dist/hostile-repository-demo.js +1019 -696
  26. package/dist/{index-jgrx804e.js → index-4nf70nq1.js} +53 -6
  27. package/dist/{index-h0mqx2ed.js → index-aqe7236b.js} +279 -2
  28. package/dist/{index-42gp2hy8.js → index-ds5e9x3a.js} +1 -1
  29. package/dist/{index-t60rva31.js → index-fm6ahk8m.js} +3 -2
  30. package/dist/{index-8zzhggxv.js → index-g0wfcb65.js} +1 -1
  31. package/dist/{index-a97bezbz.js → index-hwff3qx5.js} +10 -4
  32. package/dist/{index-z4e8d0ph.js → index-ma9a5re7.js} +1 -1
  33. package/dist/{index-2gz7jv7g.js → index-n86069yc.js} +2 -2
  34. package/dist/{index-2jrdcj6b.js → index-wq2tax80.js} +15 -1
  35. package/dist/index.js +8 -8
  36. package/dist/persistence/project-memory-command.d.ts +11 -0
  37. package/dist/persistence/project-memory.d.ts +109 -0
  38. package/dist/persistence/sessions.d.ts +4 -0
  39. package/dist/runtime/harness.d.ts +4 -0
  40. package/dist/service-cli.js +6 -6
  41. package/dist/{service-client-cli-kns4mf57.js → service-client-cli-2ye331s3.js} +2 -2
  42. package/dist/verify-historical-migrations.js +716 -392
  43. package/dist/zhx.js +2 -2
  44. package/docs/CLI.md +4 -0
  45. package/docs/CODE_RELEASE.md +80 -23
  46. package/docs/CONTEXT_ENGINEERING.md +2 -0
  47. package/docs/DURABLE_OPERATIONS.md +2 -0
  48. package/docs/ENGINE_API.md +16 -11
  49. package/docs/FIRST_USE.md +6 -6
  50. package/docs/PROJECT_MEMORY.md +157 -0
  51. package/docs/README.md +2 -0
  52. package/docs/STABILITY.md +1 -1
  53. package/docs/WORKSPACE_CHECKPOINTS.md +11 -1
  54. package/evaluations/representative-assembly-matrix.json +19 -1
  55. package/examples/README.md +4 -4
  56. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to Zhivex Harness are documented in this file.
4
4
 
5
5
  The project follows Semantic Versioning. During `0.x`, minor releases may change user-facing contracts when the change is documented with a migration note. Patch releases remain backwards compatible bug fixes.
6
6
 
7
+ ## 1.4.0-rc.1 - 2026-10-04
8
+
9
+ - Add experimental, project-scoped operator memory in the existing SQLite memory table, with explicit corrections/deletion, reviewed suggestions, provenance, freshness and bounded per-request retrieval.
10
+ - Add local `memory` commands and `--no-memory` to Harness/Code without terminal layout changes. Curated mode stops automatic last-assistant capture; the stable engine default and explicit SDK memory integrations remain supported.
11
+ - Preserve old state and import compatibility; document active deletion versus separately retained histories/backups and next-release engine pairing. See [Project memory](docs/PROJECT_MEMORY.md). The candidate is not yet published.
12
+
13
+ - Pair with Code 0.3.0-rc.1 for compact terminal flow, pageable approval review and the local browser workspace with packaged assets. Publish Harness first to `next`; preserve stable `latest`.
14
+
15
+ ## Code 0.2.0 - 2026-10-03
16
+
17
+ - Prepare the independent Code package at 0.2.0, pinned to published Harness 1.3.0. Harness stays at 1.3.0.
18
+ - Include guided approval diffs, reviewed checkpoints, per-run estimated budgets and a Node-only offline tutorial from PR158; estimates are not guaranteed financial caps.
19
+ - Fix exact Code payload inspection, add deterministic packaging regressions, require exact-main installed journeys, and validate the retained release tarball with offline PTY acceptance.
20
+ - See [Code changelog](https://github.com/Zhivex/zhivex-harness/blob/main/packages/code/CHANGELOG.md) for migration notes and publication status.
21
+
22
+ ## 1.3.0 - 2026-10-02
23
+
24
+ - Prepare Harness 1.3.0 and the independent Code CLI 0.1.0 for protected publication to npm `latest`; Code pins exactly Harness 1.3.0 and must publish after its verified engine dependency.
25
+ - Preserve the RC7 runtime and Code RC2 provider/terminal fixes; no new product features or changes to historical Harness binaries, state contracts or stable API signatures.
26
+ - Validate Code stable/latest and RC/next channels, canonical versions, exact engine pins, channel ordering and immutable artifact recovery. Preserve annotated-tag, exact main CI/CodeQL, installed acceptance, integrity and provenance gates.
27
+ - Keep beta and experimental API tiers, provisional Anthropic/Gemini/Vertex support and private Desktop alpha unchanged. RC7's six-provider live gates and Meta/Qwen/OpenAI 42-case representative evidence remain bound to RC7; stable artifacts require new protected evidence.
28
+ - Refresh the recorded verified latest publication to Harness 1.2.0 without fabricating an uncreated GitHub Release, and align active release/installation documentation without claiming that the prepared stable versions are already published.
29
+
7
30
  ## 1.3.0-rc.7 - 2026-10-01
8
31
 
9
32
  - Pin Qwen contract certification to zero sampling temperature in approval and conversation continuity smokes, preserving all approval, compaction, effect and context assertions. Application model defaults remain unchanged.
package/README.md CHANGED
@@ -11,19 +11,22 @@ implement a change. Conversation context retains decisions, hypotheses and bound
11
11
  diagnostic excerpts across compaction. Edits and command execution keep their
12
12
  own permission checks; a conversational summary never grants approval.
13
13
 
14
- Version `1.3.0-rc.7` prepares the terminal-independent engine API and the local
15
- Code package for candidate validation on npm `next`. Publication remains pending
16
- the protected release workflow. RC4 includes Anthropic, Gemini/Vertex, Desktop package migration, isolated MCP/ACP,
17
- checkpoints and experimental governance controls. Code publication is independent.
18
- Stable `1.2.0` remains available under npm `latest`.
19
- Desktop retains its separate private alpha status.
14
+ Version `1.3.0` is the current public npm release on `latest`, with terminal-independent engine
15
+ entrypoints and the separately published Code CLI `0.2.0` on `latest`. Harness publication passed registry integrity and provenance verification. Harness RC7 and
16
+ Code RC2 remain published on `next`. Stable package numbering does
17
+ not change API stability tiers: beta and experimental APIs retain their policies,
18
+ Gemini/Anthropic/Vertex remain provisional, and Desktop remains a private alpha.
19
+
20
+ This checkout prepares Harness `1.4.0-rc.1` and Code `0.3.0-rc.1` for `next`, with an exact engine pin. Project memory, compact terminal review and the local browser workspace ship together after protected validation. See the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md). The candidates are not yet published.
20
21
 
21
22
  ## Quick start
22
23
 
23
24
  Requires Node.js 22.13.0 or newer, Git and a provider API key.
24
25
 
26
+ After RC publication, install the candidate below. Until then, use npm `latest` for stable Harness 1.3.0:
27
+
25
28
  ```sh
26
- npm install -g @zhivex-ai/harness@1.3.0-rc.7
29
+ npm install -g @zhivex-ai/harness@1.4.0-rc.1
27
30
  cd /path/to/your/project
28
31
  zhx
29
32
  ```
@@ -78,8 +81,10 @@ Gemini, [Anthropic](docs/ANTHROPIC.md) and [Vertex](docs/VERTEX.md) remain provi
78
81
 
79
82
  [Browse documentation](docs/README.md).
80
83
 
81
- Version `1.2.0` is the current stable public npm release. Source checkout changes can be
84
+ Version `1.3.0` is the current public npm release. Source checkout changes can be
82
85
  newer than the published package. Consult the [changelog](CHANGELOG.md) and
83
86
  [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
84
- for the recorded 1.0.0 release; [release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md)
87
+ for the verified 1.3.0 publication; [release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md)
85
88
  records validation scope and limitations.
89
+
90
+ Experimental next-version work includes [project memory](docs/PROJECT_MEMORY.md): explicit, reviewable notes scoped to one project, with bounded retrieval and deletion controls.
package/SECURITY.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Supported versions
4
4
 
5
- Security fixes are provided for the latest published `1.1.x` patch. Older minors and private checkpoints are not supported release channels. Registry integrity and provenance do not substitute for the separate provider and execution evidence recorded in [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
5
+ Security fixes are provided for the latest published `1.3.x` patch of Harness and the latest stable Code `0.1.x` patch. RCs on `next` are validation candidates; older minors and private checkpoints are not supported release channels. Desktop remains a separate private alpha. Beta and experimental features retain their documented limitations. Registry integrity and provenance do not substitute for the separate provider and execution evidence recorded in [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
6
6
 
7
7
  ## Reporting a vulnerability
8
8
 
package/SUPPORT.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Support
2
2
 
3
- Zhivex Harness `1.1.x` is the latest supported Node-first CLI and TypeScript library. Stable 1.x contracts follow [the stability policy](./docs/STABILITY.md); incompatible changes require a major release except documented urgent security corrections. Beta and experimental surfaces retain their declared policies. The mutable machine-readable `release-status.json` record preserves the verified 1.0.0 release; check npm for the current published version.
3
+ Zhivex Harness `1.3.x` is the latest supported Node-first CLI and TypeScript library. Stable 1.x contracts follow [the stability policy](./docs/STABILITY.md); incompatible changes require a major release except documented urgent security corrections. Beta and experimental surfaces retain their declared policies. The mutable machine-readable `release-status.json` record records the verified 1.3.0 publication. Harness 1.3.0 and Code 0.1.0 are published and verified on latest through their protected workflows.
4
4
 
5
5
  The 1.1 support scope is tracked in the [machine-readable support matrix](./docs/support-matrix-1.1.json) and its [human-readable view](./docs/SUPPORT_MATRIX_1_1.md). The [1.0 matrix](./docs/SUPPORT_MATRIX.md) remains historical. Compatibility and removals follow [DEPRECATIONS.md](./docs/DEPRECATIONS.md) for the published 1.x line.
6
6
 
@@ -13,11 +13,11 @@ The 1.1 support scope is tracked in the [machine-readable support matrix](./docs
13
13
  - the provider/model combinations marked certified in the package documentation; and
14
14
  - HTTPS or explicitly allowed loopback-HTTP MCP endpoints using the documented bounded JSON-RPC subset.
15
15
 
16
- Only the most recent published `1.1.x` patch receives routine fixes. The exact `v1.1.1` tag passed the protected artifact, live-provider and representative release jobs. Gemini remains provisional until its complete harness live matrix passes against an exact release candidate. Live provider evidence is account-, model-, endpoint-, artifact-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
16
+ Only the most recent published stable minor receives routine fixes. The exact `v1.3.0` tag passed the protected artifact, six-provider live and 42-case representative release jobs. Harness 1.3.x and Code 0.1.x are the supported stable lines. Gemini, Anthropic and Vertex remain provisional despite the release-bound live gates; the representative repository matrix covers only Meta, Qwen and OpenAI. Live provider evidence is account-, model-, endpoint-, artifact-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
17
17
 
18
18
  ## Installation diagnostics
19
19
 
20
- Follow the [stable installation commands](./README.md#installation) or [isolated Bun example](./examples/README.md). Run `zhx --version`, `zhx --help`, and `zhx doctor` before reporting an installation issue. Doctor is local: a missing provider credential produces a diagnostic failure until that credential is configured. Include the version, OS, Node/Bun versions and sanitized diagnostics in a report; never include keys or your `.env` file.
20
+ Follow the [stable installation commands](./README.md#quick-start) or [isolated Bun example](./examples/README.md). Run `zhx --version`, `zhx --help`, and `zhx doctor` before reporting an installation issue. Doctor is local: a missing provider credential produces a diagnostic failure until that credential is configured. Include the version, OS, Node/Bun versions and sanitized diagnostics in a report; never include keys or your `.env` file.
21
21
 
22
22
  ## Support channels
23
23
 
@@ -25,4 +25,4 @@ Use [GitHub Issues](https://github.com/Zhivex/zhivex-harness/issues) for reprodu
25
25
 
26
26
  ## Explicit limits
27
27
 
28
- The harness does not promise arbitrary shell access, `stdio` MCP, permanent deletion, Windows support, a managed sandbox, a desktop UI, or exact feature parity between upstream providers. Tools run with the permissions of the local harness process unless an application supplies a stronger execution environment.
28
+ The harness does not promise arbitrary shell access, general-purpose `stdio` MCP interoperability, permanent deletion, Windows support, a managed sandbox, a stable desktop UI, or exact feature parity between upstream providers. Tools run with the permissions of the local harness process unless an application supplies a stronger execution environment.
@@ -6,6 +6,56 @@
6
6
  "source": "src/engine/index.ts",
7
7
  "environment": "node",
8
8
  "exports": [
9
+ {
10
+ "name": "HARNESS_PROJECT_MEMORY_SCHEMA_VERSION",
11
+ "kind": "runtime",
12
+ "tier": "experimental"
13
+ },
14
+ {
15
+ "name": "HARNESS_PROJECT_MEMORY_LIMITS",
16
+ "kind": "runtime",
17
+ "tier": "experimental"
18
+ },
19
+ {
20
+ "name": "openHarnessProjectMemory",
21
+ "kind": "runtime",
22
+ "tier": "experimental"
23
+ },
24
+ {
25
+ "name": "HarnessProjectMemory",
26
+ "kind": "type",
27
+ "tier": "experimental"
28
+ },
29
+ {
30
+ "name": "HarnessProjectMemoryEntry",
31
+ "kind": "type",
32
+ "tier": "experimental"
33
+ },
34
+ {
35
+ "name": "HarnessProjectMemoryInput",
36
+ "kind": "type",
37
+ "tier": "experimental"
38
+ },
39
+ {
40
+ "name": "HarnessProjectMemoryOptions",
41
+ "kind": "type",
42
+ "tier": "experimental"
43
+ },
44
+ {
45
+ "name": "HarnessProjectMemoryView",
46
+ "kind": "type",
47
+ "tier": "experimental"
48
+ },
49
+ {
50
+ "name": "HARNESS_MEMORY_COMMANDS",
51
+ "kind": "runtime",
52
+ "tier": "experimental"
53
+ },
54
+ {
55
+ "name": "executeHarnessMemoryCommand",
56
+ "kind": "runtime",
57
+ "tier": "experimental"
58
+ },
9
59
  {
10
60
  "name": "DEFAULT_ALLOWED_CHECKS",
11
61
  "kind": "runtime",
@@ -906,6 +906,7 @@
906
906
  "checkpoints",
907
907
  "changes",
908
908
  "state",
909
+ "memory",
909
910
  "help",
910
911
  "version"
911
912
  ],
@@ -975,6 +976,7 @@
975
976
  "allowed": [
976
977
  "--service",
977
978
  "--session",
979
+ "--no-memory",
978
980
  "--compaction-model",
979
981
  "--compaction-provider",
980
982
  "--tool-policy",
@@ -1122,6 +1124,7 @@
1122
1124
  "chat": {
1123
1125
  "allowed": [
1124
1126
  "--service",
1127
+ "--no-memory",
1125
1128
  "--compaction-model",
1126
1129
  "--compaction-provider",
1127
1130
  "--tool-policy",
@@ -1237,6 +1240,7 @@
1237
1240
  "policy": {
1238
1241
  "allowed": [
1239
1242
  "--service",
1243
+ "--no-memory",
1240
1244
  "--compaction-model",
1241
1245
  "--compaction-provider",
1242
1246
  "--tool-policy",
@@ -1398,6 +1402,7 @@
1398
1402
  },
1399
1403
  "resume": {
1400
1404
  "allowed": [
1405
+ "--no-memory",
1401
1406
  "--tool-policy",
1402
1407
  "--service",
1403
1408
  "--session",
@@ -1771,6 +1776,163 @@
1771
1776
  "repeatable": [],
1772
1777
  "conflicts": {}
1773
1778
  },
1779
+ "memory:remember": {
1780
+ "allowed": [
1781
+ "--workspace",
1782
+ "--state-dir",
1783
+ "--store",
1784
+ "--tenant",
1785
+ "--user",
1786
+ "--namespace",
1787
+ "--json",
1788
+ "--source"
1789
+ ],
1790
+ "required": [],
1791
+ "repeatable": [],
1792
+ "conflicts": {}
1793
+ },
1794
+ "memory:suggest": {
1795
+ "allowed": [
1796
+ "--workspace",
1797
+ "--state-dir",
1798
+ "--store",
1799
+ "--tenant",
1800
+ "--user",
1801
+ "--namespace",
1802
+ "--json",
1803
+ "--source"
1804
+ ],
1805
+ "required": [],
1806
+ "repeatable": [],
1807
+ "conflicts": {}
1808
+ },
1809
+ "memory:list": {
1810
+ "allowed": [
1811
+ "--workspace",
1812
+ "--state-dir",
1813
+ "--store",
1814
+ "--tenant",
1815
+ "--user",
1816
+ "--namespace",
1817
+ "--json"
1818
+ ],
1819
+ "required": [],
1820
+ "repeatable": [],
1821
+ "conflicts": {}
1822
+ },
1823
+ "memory:read": {
1824
+ "allowed": [
1825
+ "--workspace",
1826
+ "--state-dir",
1827
+ "--store",
1828
+ "--tenant",
1829
+ "--user",
1830
+ "--namespace",
1831
+ "--json"
1832
+ ],
1833
+ "required": [],
1834
+ "repeatable": [],
1835
+ "conflicts": {}
1836
+ },
1837
+ "memory:update": {
1838
+ "allowed": [
1839
+ "--workspace",
1840
+ "--state-dir",
1841
+ "--store",
1842
+ "--tenant",
1843
+ "--user",
1844
+ "--namespace",
1845
+ "--json",
1846
+ "--source"
1847
+ ],
1848
+ "required": [],
1849
+ "repeatable": [],
1850
+ "conflicts": {}
1851
+ },
1852
+ "memory:forget": {
1853
+ "allowed": [
1854
+ "--workspace",
1855
+ "--state-dir",
1856
+ "--store",
1857
+ "--tenant",
1858
+ "--user",
1859
+ "--namespace",
1860
+ "--json"
1861
+ ],
1862
+ "required": [],
1863
+ "repeatable": [],
1864
+ "conflicts": {}
1865
+ },
1866
+ "memory:accept": {
1867
+ "allowed": [
1868
+ "--workspace",
1869
+ "--state-dir",
1870
+ "--store",
1871
+ "--tenant",
1872
+ "--user",
1873
+ "--namespace",
1874
+ "--json"
1875
+ ],
1876
+ "required": [],
1877
+ "repeatable": [],
1878
+ "conflicts": {}
1879
+ },
1880
+ "memory:clear": {
1881
+ "allowed": [
1882
+ "--workspace",
1883
+ "--state-dir",
1884
+ "--store",
1885
+ "--tenant",
1886
+ "--user",
1887
+ "--namespace",
1888
+ "--json"
1889
+ ],
1890
+ "required": [],
1891
+ "repeatable": [],
1892
+ "conflicts": {}
1893
+ },
1894
+ "memory:enable": {
1895
+ "allowed": [
1896
+ "--workspace",
1897
+ "--state-dir",
1898
+ "--store",
1899
+ "--tenant",
1900
+ "--user",
1901
+ "--namespace",
1902
+ "--json"
1903
+ ],
1904
+ "required": [],
1905
+ "repeatable": [],
1906
+ "conflicts": {}
1907
+ },
1908
+ "memory:disable": {
1909
+ "allowed": [
1910
+ "--workspace",
1911
+ "--state-dir",
1912
+ "--store",
1913
+ "--tenant",
1914
+ "--user",
1915
+ "--namespace",
1916
+ "--json"
1917
+ ],
1918
+ "required": [],
1919
+ "repeatable": [],
1920
+ "conflicts": {}
1921
+ },
1922
+ "memory:context": {
1923
+ "allowed": [
1924
+ "--workspace",
1925
+ "--state-dir",
1926
+ "--store",
1927
+ "--tenant",
1928
+ "--user",
1929
+ "--namespace",
1930
+ "--json"
1931
+ ],
1932
+ "required": [],
1933
+ "repeatable": [],
1934
+ "conflicts": {}
1935
+ },
1774
1936
  "state:status": {
1775
1937
  "allowed": [
1776
1938
  "--workspace",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  {
15
15
  "name": "CLI_COMMAND_OPTION_CONTRACTS",
16
- "sha256": "sha256:70276d37fde1bb3f48c953a82ce137b6b2887753118586717077f1c6eb5d08a6"
16
+ "sha256": "sha256:0ea9c36f10d66fa7f4b5dc3c1d500d12f1e2f80c14d65125d3349980a1f2e192"
17
17
  },
18
18
  {
19
19
  "name": "CLI_EVENT_SCHEMA_VERSION",
@@ -25,11 +25,11 @@
25
25
  },
26
26
  {
27
27
  "name": "CLI_OPTION_DEFINITIONS",
28
- "sha256": "sha256:3f9a3159e27e86ceadaa64aabc97ae3f6c8cbe98d03098dfbe3076e6f07460e8"
28
+ "sha256": "sha256:369aa10cdaaab6721aacb248c99fa0f33d6b47a2135b7f7b64312fa2da4e5e59"
29
29
  },
30
30
  {
31
31
  "name": "CLI_OPTION_NAMES",
32
- "sha256": "sha256:389d1612d9eca7df782fc865344b1651e21023a27d0e9180d493d6d915cf793d"
32
+ "sha256": "sha256:7dd7e64d26a693a5aff7366a9c3a0197eee33cda5da93ff2e5c1a577d00d4bb8"
33
33
  },
34
34
  {
35
35
  "name": "DEFAULT_ALLOWED_CHECKS",
@@ -165,7 +165,7 @@
165
165
  },
166
166
  {
167
167
  "name": "createHarness",
168
- "sha256": "sha256:4b2a4e758dd0aef816771f5324758abbea04a13c12530f1ee83daeab439e6e73"
168
+ "sha256": "sha256:b237f9c2a28c01dbc7e929afd2195af7082bb5533020bf151eba16a5626eba61"
169
169
  },
170
170
  {
171
171
  "name": "createHarnessMcpTools",
@@ -289,7 +289,7 @@
289
289
  },
290
290
  {
291
291
  "name": "validateCliCommandOptions",
292
- "sha256": "sha256:eed6e681ab10a33c4f762b08d944a46b321da474763708f6354f45e6e41de087"
292
+ "sha256": "sha256:db01336efeae394b41ff8585f9c8a496f4dc2a0b98a2b7c581435773939186ed"
293
293
  },
294
294
  {
295
295
  "name": "verifyChangeEnvelope",
@@ -311,7 +311,7 @@
311
311
  },
312
312
  {
313
313
  "name": "CliCommandOptionContractKey",
314
- "sha256": "sha256:aa76f78f6e8f82b5d01a3bb1a3cb24ed090cca69ca91a26774f0d88943a324e5"
314
+ "sha256": "sha256:f8d27a7efeac758dea77cde2c92806815db92d91ac18a1173f67f2e2062875d6"
315
315
  },
316
316
  {
317
317
  "name": "CliInitDocument",
@@ -331,7 +331,7 @@
331
331
  },
332
332
  {
333
333
  "name": "CliOptionName",
334
- "sha256": "sha256:4f9f167f8dc6106edb7c5df0904ebabc70407b1d9bf09b4a6ffbdfe6769d6aa5"
334
+ "sha256": "sha256:70faf9b4c1b10264dd8ac85a87aef4d66871eae592118a29469c79addd024d22"
335
335
  },
336
336
  {
337
337
  "name": "CliReviewGroupDocument",
@@ -375,7 +375,7 @@
375
375
  },
376
376
  {
377
377
  "name": "CreateHarnessOptions",
378
- "sha256": "sha256:1be891ae7f190c9b2d03c3e72723f3384c6115fb6f4b83da79c7c710193eab70"
378
+ "sha256": "sha256:596b95a410a0bd84feb53ae0188177c934b1f7432c155684f7d33e9d49fff898"
379
379
  },
380
380
  {
381
381
  "name": "HarnessBudget",
@@ -490,5 +490,5 @@
490
490
  "sha256": "sha256:76de0209fbf835d1427b6ab2764a919e8e814237a1be7b15c9bc0dc002f8fd6e"
491
491
  }
492
492
  ],
493
- "digest": "sha256:6ce71e29460e14ee146eff67d5877129d13cef3817ed9148c0ba46ce15ede59e"
493
+ "digest": "sha256:0c2cec6bd1dd8de467e8619c18b25e48d56416dec1866ff5a124798525b1a52b"
494
494
  }
package/dist/acp-cli.js CHANGED
@@ -5,20 +5,20 @@ import {
5
5
  parseHarnessModelRoute,
6
6
  resolveHarnessModelRoutes,
7
7
  validateCliCommandOptions
8
- } from "./index-2jrdcj6b.js";
8
+ } from "./index-wq2tax80.js";
9
9
  import {
10
10
  serveAcpStdio
11
11
  } from "./index-3ah1f369.js";
12
12
  import {
13
13
  createHarness,
14
14
  createHarnessClientAdapter
15
- } from "./index-jgrx804e.js";
16
- import"./index-h0mqx2ed.js";
17
- import"./index-8zzhggxv.js";
15
+ } from "./index-4nf70nq1.js";
16
+ import"./index-aqe7236b.js";
17
+ import"./index-g0wfcb65.js";
18
18
  import {
19
19
  usagePricingSchema
20
- } from "./index-42gp2hy8.js";
21
- import"./index-t60rva31.js";
20
+ } from "./index-ds5e9x3a.js";
21
+ import"./index-fm6ahk8m.js";
22
22
  import"./index-z0qxmkm2.js";
23
23
  import {
24
24
  FileChangedWhileReadingError,
@@ -51,6 +51,17 @@ import { fileURLToPath } from "node:url";
51
51
 
52
52
  // src/cli/cli-help.ts
53
53
  var usage = {
54
+ "memory:remember": 'zhx memory remember "content" [--source "provenance"]',
55
+ "memory:suggest": 'zhx memory suggest "content" [--source "provenance"]',
56
+ "memory:list": "zhx memory list",
57
+ "memory:read": "zhx memory read <id>",
58
+ "memory:update": 'zhx memory update <id> <revision> "content" [--source "provenance"]',
59
+ "memory:forget": "zhx memory forget <id> <revision>",
60
+ "memory:accept": "zhx memory accept <id> <reviewedRevision>",
61
+ "memory:clear": "zhx memory clear",
62
+ "memory:enable": "zhx memory enable",
63
+ "memory:disable": "zhx memory disable",
64
+ "memory:context": 'zhx memory context "query"',
54
65
  "checkpoints:storage": "zhx checkpoints storage",
55
66
  "checkpoints:prune-review": "zhx checkpoints prune-review <checkpoint:id|restore:id> [...]",
56
67
  "checkpoints:prune-apply": "zhx checkpoints prune-apply <reviewedPlanId> <checkpoint:id|restore:id> [...]",
@@ -217,7 +228,7 @@ var applyCliProfile = async (options, context = {}) => {
217
228
  };
218
229
 
219
230
  // src/cli/arguments.ts
220
- var CLI_COMMANDS = ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "help", "version"];
231
+ var CLI_COMMANDS = ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "memory", "help", "version"];
221
232
  var CLI_RUNS_COMMANDS = ["list", "inspect", "cancel", "cleanup", "export", "report"];
222
233
  var CLI_SESSIONS_COMMANDS = ["list", "inspect", "rename", "fork", "archive"];
223
234
  var CLI_CHANGES_COMMANDS = ["create", "verify"];
@@ -254,7 +265,7 @@ var optionValue = (argv, index, name) => {
254
265
  return value;
255
266
  };
256
267
  var parseCliArgs = (argv) => {
257
- const booleanOptions = new Set(["--token-budget", "--no-token-budget", "--yes", "--approve", "--deny", "--json", "--jsonl", "--continue", "--cascade", "--final", "--apply", "--help", "--version", "--no-project-context", "--update"]);
268
+ const booleanOptions = new Set(["--token-budget", "--no-token-budget", "--yes", "--approve", "--deny", "--json", "--jsonl", "--continue", "--cascade", "--final", "--apply", "--help", "--version", "--no-project-context", "--no-memory", "--update"]);
258
269
  const separator = argv.indexOf("--");
259
270
  argv = argv.flatMap((arg, index) => {
260
271
  const equals = arg.indexOf("=");
@@ -289,7 +300,7 @@ var parseCliArgs = (argv) => {
289
300
  words.push(arg);
290
301
  }
291
302
  const first = words[0];
292
- const parts = first === "help" ? words.slice(1) : first && COMMANDS.has(first) ? words.slice(0, ["runs", "sessions", "checkpoints", "changes", "state"].includes(first) ? 2 : 1) : [];
303
+ const parts = first === "help" ? words.slice(1) : first && COMMANDS.has(first) ? words.slice(0, ["runs", "sessions", "checkpoints", "changes", "state", "memory"].includes(first) ? 2 : 1) : [];
293
304
  try {
294
305
  const topic = resolveHelpTopic(parts, parts.length > 0);
295
306
  return { ...options, command: "help", ...topic ? { helpTopic: topic } : {} };
@@ -321,6 +332,13 @@ var parseCliArgs = (argv) => {
321
332
  continue;
322
333
  }
323
334
  switch (argument) {
335
+ case "--no-memory":
336
+ options.projectMemory = false;
337
+ break;
338
+ case "--source":
339
+ options.memorySource = optionValue(argv, index, argument);
340
+ index += 1;
341
+ break;
324
342
  case "--update":
325
343
  options.updateProfile = true;
326
344
  break;
@@ -846,6 +864,13 @@ var parseCliArgs = (argv) => {
846
864
  if (positional.length > 0) {
847
865
  throw new CliUsageError(`changes ${changesCommand} received unexpected positional arguments.`);
848
866
  }
867
+ } else if (options.command === "memory") {
868
+ const subcommand = positional.shift();
869
+ const counts = { remember: 1, list: 0, read: 1, update: 3, forget: 2, suggest: 1, accept: 2, clear: 0, enable: 0, disable: 0, context: 1 };
870
+ if (!subcommand || !Object.hasOwn(counts, subcommand) || positional.length !== counts[subcommand])
871
+ throw new CliUsageError("Invalid memory arguments. Use memory --help; quote content as one argument.");
872
+ options.memoryCommand = subcommand;
873
+ options.memoryArguments = positional.splice(0);
849
874
  } else if (options.command === "state") {
850
875
  const stateCommand = positional.shift();
851
876
  if (!stateCommand || !STATE_COMMANDS.has(stateCommand)) {
@@ -882,7 +907,7 @@ var parseCliArgs = (argv) => {
882
907
  } else if (["run", "resume"].includes(options.command) && optionCounts.has("--session")) {
883
908
  throw new CliUsageError("--session for run/resume requires --service.");
884
909
  }
885
- const commandKey = options.command === "checkpoints" ? `checkpoints:${options.checkpointsCommand}` : options.command === "runs" ? `runs:${options.runsCommand}` : options.command === "sessions" ? `sessions:${options.sessionsCommand}` : options.command === "changes" ? `changes:${options.changesCommand}` : options.command === "state" ? `state:${options.stateCommand}` : options.command;
910
+ const commandKey = options.command === "checkpoints" ? `checkpoints:${options.checkpointsCommand}` : options.command === "runs" ? `runs:${options.runsCommand}` : options.command === "sessions" ? `sessions:${options.sessionsCommand}` : options.command === "changes" ? `changes:${options.changesCommand}` : options.command === "memory" ? `memory:${options.memoryCommand}` : options.command === "state" ? `state:${options.stateCommand}` : options.command;
886
911
  try {
887
912
  validateCliCommandOptions(commandKey, optionCounts);
888
913
  } catch (error) {
@@ -1020,6 +1045,7 @@ var createConfiguredHarness = async (options, extraProfiles = [], persistedRoute
1020
1045
  const compactionModelInstance = resolvedConfig.compaction.model && compactionEnv ? await credentialModel(resolvedConfig.compaction.model, compactionEnv) : undefined;
1021
1046
  const harness = await createHarness({
1022
1047
  ...options,
1048
+ ...{ projectMemory: options.projectMemory ?? true },
1023
1049
  usageAccounting: {
1024
1050
  ...options.pricingFile ? { pricing: usagePricingSchema.parse(JSON.parse((await readRegularFileNoFollow(path2.resolve(options.pricingFile), { maxBytes: 128 * 1024, label: "Usage pricing" })).contents.toString("utf8"))) } : {},
1025
1051
  ...options.usageLimitUsd !== undefined ? { limitUsd: options.usageLimitUsd } : {}
@@ -2,7 +2,7 @@ import { type HarnessReasoningEffort } from "../providers/reasoning.js";
2
2
  import { type AgentStatus } from "@zhivex-ai/agents";
3
3
  import { type HarnessSubagentProfile } from "../runtime/config.js";
4
4
  import { HarnessError } from "../runtime/errors.js";
5
- export declare const CLI_COMMANDS: readonly ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "help", "version"];
5
+ export declare const CLI_COMMANDS: readonly ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "memory", "help", "version"];
6
6
  export declare const CLI_RUNS_COMMANDS: readonly ["list", "inspect", "cancel", "cleanup", "export", "report"];
7
7
  export declare const CLI_SESSIONS_COMMANDS: readonly ["list", "inspect", "rename", "fork", "archive"];
8
8
  export declare const CLI_CHANGES_COMMANDS: readonly ["create", "verify"];
@@ -80,6 +80,10 @@ export interface CliOptions {
80
80
  checkpointsCommand?: "list" | "capture" | "inspect" | "prepare" | "review" | "apply" | "recover" | "storage" | "prune-review" | "prune-apply";
81
81
  checkpointArguments?: string[];
82
82
  changesCommand?: ChangesCommand;
83
+ memoryCommand?: string;
84
+ memoryArguments?: string[];
85
+ memorySource?: string;
86
+ projectMemory?: boolean;
83
87
  stateCommand?: StateCommand;
84
88
  artifactPath?: string;
85
89
  patchPath?: string;
@@ -0,0 +1,2 @@
1
+ import type { CliOptions } from "./arguments.js";
2
+ export declare function manageMemory(options: CliOptions): Promise<void>;