@appchy/jarvis 0.1.66 → 0.1.67

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/dist/bin.js CHANGED
@@ -10115,7 +10115,7 @@ import { createRequire as createRequire2 } from "module";
10115
10115
  var _require = createRequire2(import.meta.url);
10116
10116
  var VERSION2 = _require("../package.json").version ?? "0.0.0";
10117
10117
  var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
10118
- var SHA = "e0c2058";
10118
+ var SHA = "0b846a6";
10119
10119
  var BUILT = "2026-09-10";
10120
10120
  var BUILD = SHA ?? "source";
10121
10121
  var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;
@@ -85,6 +85,17 @@ second copy of it here is a second copy to drift.
85
85
  """
86
86
 
87
87
 
88
+ #: Where a repo's `work.config.json` says its schema lives. The package is published,
89
+ #: so a CDN already serves it and there is nothing to host — and it is the same line in
90
+ #: every repo, which a path into anybody's node_modules could never be.
91
+ _WORK_CONFIG = (
92
+ "{\n"
93
+ ' "$schema": "https://cdn.jsdelivr.net/npm/@appchy/jarvis/harness/schema/'
94
+ 'work.config.schema.json"\n'
95
+ "}\n"
96
+ )
97
+
98
+
88
99
  def cmd_init(args) -> int:
89
100
  """Scaffold a work tree: the board, the roadmap, and the nine org-domains.
90
101
 
@@ -128,6 +139,19 @@ def cmd_init(args) -> int:
128
139
  write(root / name / "README.md",
129
140
  _charter(name, name.replace("-", " ").capitalize()))
130
141
 
142
+ # The repo's own config, which `init` did not use to write — so every repo that
143
+ # adopted the harness hand-copied one from a sibling, and copied whatever that
144
+ # sibling's `$schema` happened to point at. Three of them ended up naming a path
145
+ # inside a plugin that no longer exists, and a dangling `$schema` is not an error
146
+ # anywhere, so nothing said so.
147
+ #
148
+ # Only the pointer is written. Everything else in this file is a choice about the
149
+ # repo — its ledger letter, its verify commands, its instruction preset — and a
150
+ # scaffold that guesses those is a scaffold somebody has to undo. The schema tells
151
+ # the editor what the rest may say, which is exactly what a first-time adopter has
152
+ # no way to know.
153
+ write(project / ".claude" / "work.config.json", _WORK_CONFIG)
154
+
131
155
  print(f"initialised {rel(root, root) or 'work/'} at {root}")
132
156
  if made:
133
157
  print(f" created {len(made)}: {', '.join(made)}")
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/appchy-ai/plugins/work.config.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@appchy/jarvis/harness/schema/work.config.schema.json",
4
4
  "title": "work.config.json",
5
5
  "description": "Per-repo configuration for the `work` harness, committed at .claude/work.config.json. This is the ONLY configuration path: Claude Code has deliberately ignored `pluginConfigs` in project settings since v2.1.207, because a cloned repo could otherwise inject values into hook commands and MCP configs. Treat it as a security surface — a value that reaches a shell command is the same injection wearing different clothes.",
6
6
  "type": "object",
@@ -1893,6 +1893,30 @@ def test_init_scaffolds_the_whole_tree_and_is_idempotent_and_non_destructive():
1893
1893
  assert (root / "design" / "README.md").is_file(), "init did not backfill"
1894
1894
 
1895
1895
 
1896
+ def test_init_writes_a_config_whose_schema_pointer_exists_and_never_replaces_one():
1897
+ with tempfile.TemporaryDirectory() as tmp:
1898
+ _initialised(tmp)
1899
+ cfg = Path(tmp) / ".claude" / "work.config.json"
1900
+ assert cfg.is_file(), "a repo adopting the harness had to hand-copy this file"
1901
+
1902
+ # It parses, and the only thing scaffolded is the pointer — everything else in
1903
+ # this file is a choice about the repo, and a guess is something to undo.
1904
+ body = json.loads(cfg.read_text())
1905
+ assert list(body) == ["$schema"]
1906
+ assert body["$schema"].endswith("/harness/schema/work.config.schema.json")
1907
+
1908
+ # The pointer names the package, not a path inside anybody's plugin or
1909
+ # node_modules — the failure this replaces was three repos naming a path that
1910
+ # had been deleted, which no editor reports.
1911
+ assert "@appchy/jarvis" in body["$schema"]
1912
+ assert "plugins" not in body["$schema"]
1913
+
1914
+ # A repo that has already configured itself keeps what it wrote.
1915
+ cfg.write_text('{"ids": {"prefix": "Z"}}')
1916
+ assert architecture.cmd_init({"project_root": tmp}) == 0
1917
+ assert json.loads(cfg.read_text()) == {"ids": {"prefix": "Z"}}
1918
+
1919
+
1896
1920
  def test_domain_new_pulls_a_shipped_charter_and_still_works_for_an_unknown_name():
1897
1921
  import os
1898
1922
  with tempfile.TemporaryDirectory() as tmp:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appchy/jarvis",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "description": "Jarvis — local AI coding assistant CLI",
5
5
  "private": false,
6
6
  "type": "module",
@@ -56,17 +56,17 @@
56
56
  "tsup": "^8.5.1",
57
57
  "typescript": "^5.7.0",
58
58
  "vitest": "^2.1.0",
59
- "@jarvis/agents": "1.0.0",
60
- "@jarvis/anthropic": "1.0.0",
61
59
  "@jarvis/board": "0.1.0",
62
60
  "@jarvis/data": "0.1.0",
63
- "@jarvis/errors": "1.0.0",
64
61
  "@jarvis/logger": "1.0.0",
65
62
  "@jarvis/rpc": "1.0.0",
63
+ "@jarvis/errors": "1.0.0",
66
64
  "@jarvis/types": "1.0.0",
67
65
  "@jarvis/typescript-config": "1.0.0",
68
66
  "@jarvis/ui": "0.1.0",
69
- "@jarvis/vitest-config": "1.0.0"
67
+ "@jarvis/vitest-config": "1.0.0",
68
+ "@jarvis/agents": "1.0.0",
69
+ "@jarvis/anthropic": "1.0.0"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "tsx watch src/bin.ts start --foreground",