snipara-companion 1.4.13 → 1.4.15

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 (4) hide show
  1. package/README.md +46 -173
  2. package/dist/index.d.ts +263 -53
  3. package/dist/index.js +2078 -1203
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,25 @@ In this repository, the source currently lives in `packages/cli`, and the instal
12
12
 
13
13
  This package complements `snipara-mcp`. It does not replace it.
14
14
 
15
+ ## Quickstart
16
+
17
+ ```bash
18
+ # 1. Install
19
+ npm install -g snipara-companion
20
+
21
+ # 2. Point this workspace at a Snipara project (writes local .snipara/ config)
22
+ snipara-companion init # interactive; or: snipara-companion login
23
+
24
+ # 3. Use it in your agent workflow
25
+ snipara-companion brief # what changed, why, impact, next action, safe-to-proceed
26
+ snipara-companion status # current work across workflow, git, and Team Sync
27
+ snipara-companion handoff --summary "<what changed>" --next "<next step>"
28
+ ```
29
+
30
+ Local continuity commands work without a Snipara account; commands that read
31
+ hosted context or memory need `init`/`login` first. Run
32
+ `snipara-companion --help` for the full command list.
33
+
15
34
  ```mermaid
16
35
  flowchart LR
17
36
  Project["Local project"] --> Companion["snipara-companion"]
@@ -92,114 +111,9 @@ yarn global add snipara-companion
92
111
  snipara-companion
93
112
  ```
94
113
 
95
- ## New In 1.4.13
96
-
97
- - Adds `snipara-companion memory invalidate <memory-id>` and
98
- `snipara-companion memory supersede <old-memory-id> <new-memory-id>` so agents
99
- can apply Memory V2 lifecycle corrections through companion when a recalled
100
- memory is obsolete or replaced.
101
- - Keeps lifecycle mutation outside read-only hygiene commands: `memory compact`
102
- remains dry-run only, while invalidate/supersede require explicit memory IDs.
103
-
104
- ## New In 1.4.5
105
-
106
- - `workflow phase-commit` and `workflow final-commit` now complete matching
107
- local Team Sync work items when the workflow outcome is completed.
108
- - Matching stays conservative: workflow-goal text wins, and file/token fallback
109
- is only used when no workflow goal is available, so deploy or promotion
110
- threads are not closed from implementation evidence alone.
111
- - Text output now reports completed Team Sync work when workflow commits clean up
112
- local active items.
113
-
114
- ## New In 1.4.4
115
-
116
- - Adds `snipara-companion memory local -- <args...>` as a thin bridge to the
117
- open `snipara-memory` engine for no-account local memory workflows.
118
- - Adds `snipara-companion eval export` to write a `snipara-evals` case from
119
- local workflow, Team Sync, file, command, and expected-signal inputs.
120
- - Adds `snipara-companion eval run` to execute `snipara-evals` through `npx` or a
121
- configured local runner.
122
- - Clarifies the open Mini Snipara stack boundary: local continuity and evals are
123
- open, while team-wide presence, shared locks, GitHub checks, dashboards, and
124
- Cloud code graph remain hosted Snipara capabilities.
125
-
126
- ## New In 1.4.8
127
-
128
- - Adds `snipara-companion collaboration guard --ack-review-only` so enforced
129
- release guards can acknowledge review-only stale-state and
130
- decision-consistency warnings without requiring
131
- `SNIPARA_COLLABORATION_GUARD=0`. The hosted `REVIEW_REQUIRED` verdict stays
132
- visible in the guard payload; `BLOCKED`, `REQUIRES_ACK`, active-session
133
- conflicts and blocking leases still fail.
134
- - Updates the Infomaniak deploy guard to use the review-only ack path for
135
- release UX false positives while keeping the emergency env bypass reserved for
136
- true guard outages.
137
-
138
- ## New In 1.4.2
139
-
140
- - Adds `snipara-companion collaboration start|watch|claim|guard|release|status`
141
- for safe parallel coding presence, auto-claims, advisory/exclusive resource
142
- claims, hosted guard checks, and conflict alarms across humans and agents.
143
- - Adds `snipara-companion collaboration hooks install` plus guard profiles for
144
- blocking pre-commit, pre-push, pre-deploy, schema/migration, and package
145
- release checks.
146
- - Adds `snipara-companion collaboration ide-status` for editor extensions and
147
- local companion UIs that need compact live collaboration state.
148
- - Hardens local code impact so stale or incomplete local overlay caches report
149
- missing target files instead of silently returning an empty impact set.
150
- - Adds `snipara-companion workflow impact-gate` for committed local workflow
151
- phases that are ahead of upstream but not pushed yet. It compares
152
- `upstream..HEAD`, separates dirty working-tree files, runs local code-overlay
153
- impact on the committed code files, and maps the result back to completed
154
- workflow phases.
155
-
156
- ## New In 1.4.1
157
-
158
- - Makes local code overlay Git hooks background by default so `git commit` and
159
- `git push` return quickly while Snipara refreshes local overlay state and
160
- push-time promotion asynchronously.
161
- - Adds `snipara-companion code hooks install --synchronous` for teams that
162
- intentionally want foreground hook work, plus a configurable background
163
- reindex delay for pre-push promotion.
164
-
165
- ## New In 1.3.7
166
-
167
- - Hardens `memory-guard check` with `--confirmed-by-user "<confirmation>"`
168
- for explicit, auditable overrides after the user has reviewed destructive or
169
- contradictory signals.
170
- - Adds stable guard exit codes in strict mode: `20` for confirmation required,
171
- `21` for unavailable memory/context guidance, and `22` for invalid guard
172
- options.
173
- - Validates destructive checks before hosted calls so vague commands such as
174
- `--destructive` without `--intent` or `--command` fail fast.
175
- - Extends `snipara-companion init --with-hooks` so it also installs local code
176
- overlay Git hooks (`post-commit` sync and `pre-push` promotion/reindex).
177
-
178
- ## New In 1.3.6
179
-
180
- - Adds `snipara-companion memory audit` for a read-only memory hygiene pass that
181
- combines hosted memory health, cleanup candidates, and compaction dry-run.
182
- - Adds `memory health`, `memory clean-candidates`, and `memory compact` as
183
- direct companion maintenance commands. `memory compact` always sends
184
- `dry_run=true` and does not mutate memory.
185
- - Extends `memory-guard check` with `--intent`, `--destructive`, and
186
- `--require-confirmation` so agents can surface memory/context contradictions
187
- and ask the user before irreversible actions.
188
-
189
- ## New In 1.3.0
190
-
191
- - Adds top-level Git-style agent work commands: `status`, `brief`, `timeline`,
192
- `verify`, `handoff`, and `workflow resume`.
193
- - Adds `snipara-companion verify` for transparent verification plans based on
194
- companion code impact auto-source selection plus local package scripts.
195
- - Reframes companion as the day-two continuity surface after
196
- `npx create-snipara` installs the project.
197
-
198
- ## New In 1.2.0
199
-
200
- - Adds `snipara-companion intelligence brief` for a local Project Intelligence brief that composes hosted resume context, memory health, and code impact into one agent-ready output.
201
- - Adds `workflow scaffold --preset project-intelligence-continuity-layer` for the full memory + code graph + workflow continuity roadmap.
202
- - Updates generated agent workflow instructions so new work can call the Project Intelligence brief before risky changes and scaffold the roadmap preset for multi-phase delivery.
114
+ ## Changelog
115
+
116
+ Release notes have moved to [CHANGELOG.md](./CHANGELOG.md).
203
117
 
204
118
  ## Agentic Work Commands
205
119
 
@@ -214,6 +128,7 @@ snipara-companion timeline
214
128
  snipara-companion workflow phase-commit build --summary "tests green"
215
129
  snipara-companion workflow impact-gate
216
130
  snipara-companion verify --changed-files src/auth.ts --diff-summary "auth hardening"
131
+ snipara-companion run --task "ship auth hardening" --changed-files src/auth.ts --release
217
132
  snipara-companion handoff --summary "status command shipped" --next "publish package"
218
133
  snipara-companion workflow resume --include-session-context
219
134
  ```
@@ -270,66 +185,6 @@ Output includes:
270
185
  - missing checks and caveats
271
186
  - suggested next commands
272
187
 
273
- ## New In 1.1.15
274
-
275
- - Expands `init --client` to Claude Code, Cursor, Windsurf, Codex, Gemini, Mistral, ChatGPT, VS Code, Continue, and custom MCP clients.
276
- - Keeps Claude Code, Cursor, and Windsurf as hook-capable presets while treating Mistral, ChatGPT, VS Code, Continue, and custom clients as MCP-first setup presets.
277
- - Prints Codex TOML or HTTP MCP references for MCP-first clients instead of generating unsupported legacy hooks.
278
-
279
- ## New In 1.1.14
280
-
281
- - Adds `npx -y snipara-companion@latest automations install/status/diff/update` for installing dashboard-generated automation hook bundles locally.
282
- - `init --with-hooks` now delegates hook installation to the hosted automation config bundle so Claude Code, Cursor, and Windsurf use the same templates as Project Automation.
283
- - Managed automation files are tracked in `.snipara/automations/manifest.json` and are not overwritten after local edits unless `--force` is used.
284
- - Automation REST calls now use `www.snipara.com` while MCP calls stay on `api.snipara.com`, avoiding FastAPI IP rate limits on Stuck Guard and generated hook installs.
285
-
286
- ## New In 1.1.13
287
-
288
- - Adds `snipara-companion stuck-guard status/check/simulate` for hosted Memory Guard / Stuck Guard decisions.
289
- - `pre-tool` now emits canonical `tool_call` events and prints Rescue Packs when hosted Stuck Guard returns `inject` or `enforce`.
290
- - `post-tool` now emits canonical `tool_result` events with status, exit code, command, classification, and a redacted/truncated preview.
291
-
292
- ## New In 1.1.12
293
-
294
- - Documents the GitHub PR Answer Packs boundary: use `create-snipara --github`
295
- for the hosted GitHub App setup, and use `snipara-companion` only for local
296
- planning, code impact checks, workflow state, and memory commits.
297
-
298
- ## New In 1.1.10
299
-
300
- - Snipara Sandbox guidance now points existing projects to `npx create-snipara repair --with-runtime`
301
- - Managed workflow phases marked `needs_runtime` suggest Snipara Sandbox installation only when needed
302
-
303
- ## New In 1.1.4
304
-
305
- - `snipara-companion onboard-folder` previews and applies dashboardless business-folder imports from local or LLM-materialized sources
306
- - `snipara-companion workflow start/status/resume/phase-start/phase-commit` keeps a visible LLM plan in `.snipara/workflow/current.json` and persists each phase through hosted memory so compacted agents can resume safely
307
- - `snipara-companion final-commit` persists the final workflow outcome with `snipara_end_of_task_commit`
308
- - `snipara-companion code symbol-card` and `snipara-companion code impact` expose paid Context safeguards directly from the companion CLI
309
-
310
- ## New In 1.1.2
311
-
312
- - `snipara-companion doctor` and Snipara Sandbox hints detect provider keys from local `.env` files without printing secret values
313
-
314
- ## New In 1.1.1
315
-
316
- - `snipara-companion doctor` diagnoses Snipara auth, Snipara Sandbox, Snipara Sandbox MCP, provider keys, and Docker
317
- - `workflow run` prints contextual Snipara Sandbox hints for full/orchestrated/execution-heavy work
318
- - `workflow run --no-runtime-hint` hides Snipara Sandbox guidance for scripted terminal output
319
-
320
- ## New In 1.1.0
321
-
322
- - `business-collections` commands for Team Business Context presets and reusable business docs
323
- - `client-projects` commands for creating and listing project-scoped client context workspaces
324
- - `upload --metadata/--metadata-file` plus convenience metadata flags for single-file business/client uploads
325
-
326
- ## New In 1.0.0
327
-
328
- - direct `snipara-companion code` access for `callers`, `imports`, `neighbors`, and `shortest-path`
329
- - `workflow run --mode lite|standard|full|orchestrate` for hosted-first workflow routing; `auto` remains a STANDARD compatibility alias
330
- - `snipara-companion shared-context` for project-linked standards and team guidance
331
- - automatic fallback to project token auth when a stale `SNIPARA_API_KEY` overrides a valid local login
332
-
333
188
  ## Supported Client Presets Today
334
189
 
335
190
  The built-in `init` and `automations` flows share these client names:
@@ -713,8 +568,9 @@ metadata, and referenced-from provenance.
713
568
 
714
569
  ### Project Intelligence Briefs
715
570
 
716
- Use `intelligence brief` when a task needs one local entrypoint for continuity,
717
- memory authority, and code impact:
571
+ Use `intelligence brief` when a task needs a local continuity readout for
572
+ memory authority, code impact, verification hints, and the Project Intelligence
573
+ Judgment Card:
718
574
 
719
575
  ```bash
720
576
  snipara-companion intelligence brief \
@@ -727,8 +583,24 @@ The command calls hosted `snipara_resume_context` and `snipara_memory_health`.
727
583
  When changed files are provided, code impact uses companion auto-source
728
584
  selection, so dirty/ahead worktrees use the local overlay and clean configured
729
585
  checkouts use hosted graph impact. It prints continuity signals, memory health,
730
- risk and verification hints, degraded surfaces, and the next companion commands
731
- to keep the workflow resumable.
586
+ risk and verification hints, degraded surfaces, and the Judgment Card's
587
+ weighted readiness, evidence, and required actions.
588
+
589
+ Use top-level `run` when the agent should make a production-oriented go/no-go
590
+ judgment in one pass:
591
+
592
+ ```bash
593
+ snipara-companion run \
594
+ --task "ship auth hardening" \
595
+ --changed-files src/auth.ts tests/auth.test.ts \
596
+ --diff-summary "auth hardening" \
597
+ --release
598
+ ```
599
+
600
+ `run --release` composes the Project Intelligence brief, collaboration guard,
601
+ package-surface review, verification plan, and final Judgment Card. Review-only
602
+ guard findings can be acknowledged with the printed guard action card command;
603
+ blocking conflicts still make the release judgment non-proceedable.
732
604
 
733
605
  For the full Project Intelligence and Continuity Layer roadmap, scaffold the
734
606
  built-in managed workflow plan:
@@ -760,6 +632,7 @@ Semantics:
760
632
  - `snipara-companion timeline` = local timeline of workflow starts, phase starts, phase commits, final commits, and Team Sync handoffs
761
633
  - `snipara-companion handoff` = top-level agent-ready Markdown/JSON handoff artifact plus the same local/hosted Team Sync handoff persistence
762
634
  - `snipara-companion intelligence brief` = one local Project Intelligence brief that combines resume context, memory health, and code impact for a task
635
+ - `snipara-companion run` = production Project Intelligence flow that combines the brief, guard action cards, package review, verification hints, and a final weighted Judgment Card
763
636
  - `snipara-companion workflow start --plan-file` = records the visible LLM plan locally so phase state survives agent compaction; prefer JSON plans with explicit ids for stable machine phase state
764
637
  - `snipara-companion workflow scaffold --preset project-intelligence-continuity-layer` = creates a four-phase managed plan for memory authority, code impact, continuity summaries, and release/docs surfaces
765
638
  - `snipara-companion workflow phase-start` = marks the current phase and prints the required Snipara context gate plus code-impact / symbol-card gates; runtime-marked phases also get a stable Snipara Sandbox session binding
@@ -976,7 +849,7 @@ To test a packed tarball manually, use `npm exec --package`:
976
849
 
977
850
  ```bash
978
851
  npm pack
979
- npm exec --package ./snipara-companion-1.4.13.tgz snipara-companion -- --help
852
+ npm exec --package ./snipara-companion-1.4.14.tgz snipara-companion -- --help
980
853
  ```
981
854
 
982
855
  Do not use `npx /path/to/snipara-companion-*.tgz`. npm will try to execute the tarball itself instead of