djournal 0.5.0 → 0.5.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.
@@ -43,7 +43,9 @@ native payloads to these names.
43
43
  - Hooks are read-only.
44
44
  - `stop_hook_active: true` always permits stopping.
45
45
  - `closed` markers must resolve to an existing Markdown spine entry under the
46
- resolved journal root; `.journal/...` paths use `.djournal.json` when a
47
- global project store is configured.
46
+ resolved journal root. Agents emit canonical repository-relative
47
+ `.journal/work/<slug>/journal/<entry>.md` paths; `.journal/...` uses
48
+ `.djournal.json` when a global project store is configured. The shared
49
+ checker may accept journal-root-relative `work/...` as a compatibility form.
48
50
  - Adapters do not infer task meaning from file changes or unstable transcripts.
49
51
  - Adding a harness must not change `AUTOMATION.md` semantics.
@@ -130,6 +130,12 @@ function resolveClosedEntry(root, value) {
130
130
  journalRoot: context.journalRoot,
131
131
  });
132
132
  }
133
+ if (relative.startsWith("work/")) {
134
+ candidates.push({
135
+ resolved: path.resolve(context.journalRoot, relative),
136
+ journalRoot: context.journalRoot,
137
+ });
138
+ }
133
139
  candidates.push({
134
140
  resolved: path.resolve(root, relative),
135
141
  journalRoot: path.join(root, ".journal"),
@@ -205,7 +211,7 @@ function handle(payload, options = {}) {
205
211
  if (status === "closed" && !closedEntry) {
206
212
  return {
207
213
  decision: "block",
208
- reason: "The journal-status closed marker must reference an existing Markdown spine entry under the resolved journal root. In global-store projects, .journal/... paths resolve through .djournal.json.",
214
+ reason: "The journal-status closed marker must reference an existing Markdown spine entry. Use .journal/work/<slug>/journal/<entry>.md; global-store projects resolve .journal/... through .djournal.json.",
209
215
  };
210
216
  }
211
217
  if (status === "closed") {
@@ -62,7 +62,9 @@ target or create a follow-up entry that states the ambiguity.
62
62
  ## Finish
63
63
 
64
64
  - After a successful close, verify the new spine path and end the response with
65
- `<!-- journal-status: closed <relative-entry-path> -->`.
65
+ `<!-- journal-status: closed .journal/work/<slug>/journal/<entry>.md -->`.
66
+ - Always emit the logical repository-relative `.journal/...` path, including
67
+ when `STATE.md` resolves the actual journal root through `.djournal.json`.
66
68
  - If no close was warranted, end with `<!-- journal-status: not-needed -->`.
67
69
  - Never claim closure when the referenced file does not exist.
68
70
  - Do not expose the marker as explanatory prose; leave it as the final line.
package/AGENTS.md CHANGED
@@ -17,9 +17,12 @@ For every request:
17
17
 
18
18
  End every final response with exactly one hidden status marker:
19
19
 
20
- - `<!-- journal-status: closed <relative-entry-path> -->`
20
+ - `<!-- journal-status: closed .journal/work/<slug>/journal/<entry>.md -->`
21
21
  - `<!-- journal-status: not-needed -->`
22
22
  - `<!-- journal-status: off -->`
23
23
 
24
- Use `closed` only after verifying that the referenced spine entry exists. Keep
25
- the marker as the final line so optional harness hooks can validate closure.
24
+ Closed marker paths are always repository-relative logical `.journal/...`
25
+ paths. In global-store projects, hooks resolve that prefix through
26
+ `.djournal.json`. Use `closed` only after verifying that the referenced spine
27
+ entry exists. Keep the marker as the final line so optional harness hooks can
28
+ validate closure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djournal",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Durable project memory for coding agents, stored as linked Markdown",
5
5
  "type": "commonjs",
6
6
  "bin": {