@hagicode/cli 0.1.0-dev.48.1.ce630a8 → 0.1.0-dev.49.1.aa038f5
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/README.md +12 -4
- package/dist/chunks/{main-_kYHYZ-C.js → main-D5eiMFz8.js} +124 -117
- package/dist/cli.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/resources/saga/manifest.json +1 -1
- package/resources/saga/prompts/run.md +5 -3
- package/skills/hagi/SKILL.md +4 -4
- package/skills/hagi/references/cli-usage.md +9 -4
- package/skills/hagi/references/saga.md +40 -2
- package/skills/hagi/references/session-data.md +3 -1
- package/skills/hagi/references/validation.md +15 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
## Requirements
|
|
11
11
|
|
|
12
12
|
- Node.js 24+
|
|
13
|
-
- Access to a HagiCode backend API for backend-selected commands; Saga commands with `--path` work locally without one
|
|
13
|
+
- Access to a HagiCode backend API for backend-selected commands; Saga commands with `--path` work locally without one, except `saga session create`, which needs the backend to find the registered project
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -80,7 +80,8 @@ hagi --base-url https://api.example.com --token "$HAGI_TOKEN" project list --jso
|
|
|
80
80
|
|
|
81
81
|
Each Saga command requires exactly one project selector: `--path <directory>` or `--project-id <id>`. Missing, empty,
|
|
82
82
|
or conflicting selectors exit with code `2`. `--path` is resolved on the CLI host, relative to the current directory,
|
|
83
|
-
and does not read backend configuration or contact the backend; backend flags do not change local behavior.
|
|
83
|
+
and does not read backend configuration or contact the backend; backend flags do not change local behavior. The one
|
|
84
|
+
exception is `saga session create`, which looks up the registered project through the backend (see below). Quote paths
|
|
84
85
|
that contain spaces.
|
|
85
86
|
|
|
86
87
|
```bash
|
|
@@ -99,6 +100,13 @@ Write and check commands (`claim`, `assert-owner`, `release`, `freeze`, `check`,
|
|
|
99
100
|
from `--token` or `SAGA_EXECUTION_TOKEN`; with `--project-id`, `--token` is rejected because it is the backend token, so use
|
|
100
101
|
`SAGA_EXECUTION_TOKEN` there. Exit code `0` means success, `1` a refusal or failed check, and `2` a usage error.
|
|
101
102
|
|
|
103
|
+
`saga session create --saga <id> --path <root> --title <title> --role implementation|verification --master <session-id> [--item <id>]`
|
|
104
|
+
creates one Worker chat session and records it in `runtime/sessions.md`. Unlike the other Saga commands it calls the
|
|
105
|
+
backend even with `--path`: the registered project whose real path matches `<root>` supplies the project ID, and no match
|
|
106
|
+
or several matches is a refusal. The execution token comes only from `SAGA_EXECUTION_TOKEN`; `--token` is refused with
|
|
107
|
+
either selector. The session carries `saga.*` metadata. The command sends no message and does not archive the session.
|
|
108
|
+
See the [Saga command reference](skills/hagi/references/saga.md#worker-sessions) for the options, metadata keys and exit codes.
|
|
109
|
+
|
|
102
110
|
With `--project-id`, the CLI uses the normal base URL, token, and language settings to resolve the project through the
|
|
103
111
|
backend. The returned project path must exist on the machine running the CLI; it is not a remote filesystem path.
|
|
104
112
|
|
|
@@ -109,7 +117,7 @@ leaves identical resources untouched on repeat runs. See the [Saga command refer
|
|
|
109
117
|
for outcomes, safety behavior, and JSON details.
|
|
110
118
|
|
|
111
119
|
For offline use, install the package or use a cached `npx` package. An uncached `npx @hagicode/cli` invocation may need
|
|
112
|
-
network access to download the package even though `saga ... --path` itself does not use a backend.
|
|
120
|
+
network access to download the package even though `saga ... --path` itself does not use a backend, except `saga session create`, which does.
|
|
113
121
|
|
|
114
122
|
## Connection Setup
|
|
115
123
|
|
|
@@ -127,7 +135,7 @@ Every backend operation resolves the base URL on each invocation, in this order:
|
|
|
127
135
|
```
|
|
128
136
|
|
|
129
137
|
If none of the three is set, a backend operation exits with code `2` and sends no backend request. Saga commands using
|
|
130
|
-
`--path` bypass this resolution and do not read backend configuration. The `steer` key is the default for `hagi chat send`,
|
|
138
|
+
`--path` bypass this resolution and do not read backend configuration, except `saga session create`, which resolves its project through the backend. The `steer` key is the default for `hagi chat send`,
|
|
131
139
|
`hagi proposal send`, and `hagi hagitask send` (see [Steer](#steer-send-option)); it must be `true` or `false`.
|
|
132
140
|
|
|
133
141
|
Operation commands send requests without a credential by default. Pass `--token` (or set `HAGI_API_TOKEN`) only when your backend requires one.
|