@hagicode/cli 0.1.0-dev.54.1.372ef38 → 0.1.0-dev.55.1.790ae59

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/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./chunks/main-BrAlo52u.js");s.runCli().then(e=>{e!==0&&(process.exitCode=e)}).catch(e=>{const n=e instanceof Error?e.stack??e.message:String(e);process.stderr.write(`${n}
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./chunks/main-B-hAwHb9.js");s.runCli().then(e=>{e!==0&&(process.exitCode=e)}).catch(e=>{const n=e instanceof Error?e.stack??e.message:String(e);process.stderr.write(`${n}
3
3
  `),process.exitCode=s.EXIT_CODES.UNKNOWN});
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/main-BrAlo52u.js");exports.createCliApp=e.createCliApp;exports.runCli=e.runCli;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/main-B-hAwHb9.js");exports.createCliApp=e.createCliApp;exports.runCli=e.runCli;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hagicode/cli",
3
- "version": "0.1.0-dev.54.1.372ef38",
3
+ "version": "0.1.0-dev.55.1.790ae59",
4
4
  "description": "HagiCode CLI for project, proposal, vault, chat, and AutoTask management.",
5
5
  "homepage": "https://github.com/HagiCode-org/cli#readme",
6
6
  "bugs": {
@@ -108,9 +108,19 @@ and `updatedAt`. `items <saga-id> --json` returns `{ "sagaId": "...", "items": [
108
108
  canonical `id`, `title`, `state`, `cmd`, and `note`.
109
109
 
110
110
  `status <saga-id> --json` returns the `saga-status/2` projection directly, with `schema`, `sagaId`, `revision`, `state`,
111
- `updatedAt`, `note`, `artifacts`, `nextArtifact`, `counts`, `openAmendments`, and `items`. It derives this view from the
112
- Saga files; `updatedAt` is the time of this observation, not the execution heartbeat in `runtime/status.json`. The query
113
- does not refresh or rewrite that stored status, and its default `note` is empty rather than a cached execution note.
111
+ `updatedAt`, `note`, `artifacts`, `nextArtifact`, `counts`, `openAmendments`, and `items`. Counts, artifacts, `nextArtifact`,
112
+ `openAmendments`, and `items` are derived from the Saga files at read time.
113
+
114
+ `state` and `note` come from the stored snapshot in `runtime/status.json` when it is valid: a `state` of `draft`,
115
+ `planned`, `running`, `paused`, or `done`. The reported `state` and `note` are the stored values as written, so a stored
116
+ `paused` or `done` is reported even when the files derive another state. A stored `running` is the one exception: it is
117
+ honored, with its note, only when the derived state (from the contract revision, artifacts, and item counts) is also
118
+ `running`. Otherwise the derived state applies with an empty `note`, because `running` is the state that goes stale when
119
+ an orchestrator exits. A missing file, unparsable JSON, a non-object document, or any other `state` value falls back to
120
+ the derived state with an empty `note`.
121
+
122
+ `updatedAt` is the time of this observation, not the execution heartbeat in `runtime/status.json`. The query
123
+ does not refresh or rewrite that stored status, never repairs it, and creates no `runtime/` file or directory.
114
124
 
115
125
  All three queries are strictly read-only: they do not initialize or repair resources, create runtime files, run the Saga
116
126
  tool, or execute acceptance commands. Missing optional draft files use canonical empty-data behavior; malformed or
@@ -107,8 +107,9 @@ hagi saga items <saga-id> --project-id <project-id> --json
107
107
  ```
108
108
 
109
109
  These queries read the selected project's Saga files without initializing or repairing them, refreshing runtime status,
110
- or executing acceptance commands. Status is a fresh `saga-status/2` observation; its `updatedAt` is not the stored
111
- execution heartbeat in `runtime/status.json`. `init` installs resources and `new` creates a Saga, so run either only
110
+ or executing acceptance commands. Status is a fresh `saga-status/2` observation: its counts and items come from the Saga
111
+ files, and its `state` and `note` may come from a valid stored state in `runtime/status.json` (a stored `running` only
112
+ when the files also derive `running`). Its `updatedAt` is not the stored execution heartbeat in `runtime/status.json`. `init` installs resources and `new` creates a Saga, so run either only
112
113
  when the user explicitly asks for that change. Contract and lifecycle operations run through `hagi saga` with the execution token rules in `references/saga.md`.
113
114
 
114
115
  ### Skills