create-snipara 1.3.19 → 1.3.21

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 (2) hide show
  1. package/dist/index.js +50 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import fs from "fs";
9
9
  import path from "path";
10
10
  import { execSync, spawn } from "child_process";
11
11
  import { homedir } from "os";
12
- var VERSION = "1.3.19";
12
+ var VERSION = "1.3.20";
13
13
  var BASE_URL = "https://www.snipara.com";
14
14
  var API_URL = "https://api.snipara.com";
15
15
  var COMPANION_PACKAGE_NAME = "snipara-companion";
@@ -1033,26 +1033,59 @@ This project uses Snipara Hosted MCP for project context and reviewed memory.
1033
1033
 
1034
1034
  - Endpoint: \`${buildHostedMcpEndpoint(answers)}\`
1035
1035
  - Auth: use \`SNIPARA_API_KEY\` from the environment. Never commit keys.
1036
+ - For Codex, expose the endpoint as a streamable HTTP MCP server and load the
1037
+ key from an environment variable such as \`SNIPARA_API_KEY\` or \`RLM_API_KEY\`.
1038
+ - At the start of every new thread, validate hosted MCP with a tool-oriented
1039
+ call such as \`snipara_settings\`, \`tools/list\`, or a lightweight
1040
+ \`snipara_context_query\`. Do not treat empty MCP resources/templates as an
1041
+ outage because Snipara may be tool-only.
1036
1042
 
1037
1043
  Agent task lifecycle:
1038
1044
 
1039
- 1. Start substantial work with \`snipara_recall\` and a targeted \`snipara_context_query\`.
1045
+ 1. Start every new thread by validating hosted MCP availability, then use
1046
+ project-scoped \`snipara_recall\` and a targeted \`snipara_context_query\` before
1047
+ falling back to local documentation search.
1040
1048
  2. Use \`snipara_context_query\` for docs, business context, client/project truth, architecture notes, runbooks, and narrative source material.
1041
1049
  3. When \`snipara_context_query\` returns \`answer_pack\`, treat it as the first-pass response plan: use its source facts, caveats, source map, and verification checklist before drafting claims.
1042
1050
  4. Use \`snipara_get_chunk\` to load cited source sections returned by reference-based queries before relying on precise wording.
1043
- 5. Use \`snipara_code_callers\`, \`snipara_code_imports\`, \`snipara_code_neighbors\`, or \`snipara_code_shortest_path\` for structural code questions.
1044
- 6. On paid Context plans, use \`snipara_code_symbol_card\` for agent-ready symbol context and \`snipara_code_impact\` before risky multi-file changes or PR reviews.
1045
- 7. Use \`snipara_plan\` or \`snipara_decompose\` only for complex work and only when the hosted server exposes them.
1046
- 8. When the LLM has produced a visible multi-phase plan and \`snipara-companion\` is installed, run \`snipara-companion workflow start --goal "<goal>" --plan-file <plan_file>\`, then use \`workflow phase-start\`, \`workflow phase-commit\`, \`workflow resume\`, and \`final-commit\` so compaction cannot lose the next phase. Legacy \`rlm-hook\` commands remain compatible.
1047
- 9. Use local file reads, \`rg\`, git commands, and test commands for exact edits, current working-tree state, and verification.
1048
- 10. Treat every \`snipara_code_*\` response as indexed context: check its indexed commit SHA, indexing time, included file sample, coverage, freshness warnings, and sync guidance before relying on it. Legacy \`rlm_code_*\` tool IDs return the same payloads.
1049
- 11. If \`git status --short\` is dirty, warn that Snipara's indexed code graph may not include local edits; use local reads/tests for exact edits and Snipara for architecture/code graph context.
1050
- 12. Use Snipara Sandbox only when sandboxed execution, repeatable validation, or isolated transformations materially help.
1051
- 13. If a broad query is slow, retry once with a narrow keyword query before falling back to local search.
1052
- 14. When generated hooks are enabled, \`snipara-companion pre-tool\`, \`post-tool\`, and \`stuck-guard status\` provide runtime Rescue Pack checks for repeated failures, empty searches, and risky workflows.
1053
- 15. End each substantial phase with \`snipara_end_of_task_commit\` or \`snipara-companion workflow phase-commit\` when companion manages the plan. End the whole managed workflow with \`snipara-companion final-commit\`.
1054
- 16. Use \`snipara_remember_if_novel\` for one reusable memory while avoiding duplicates, and use \`snipara_remember\` for explicit direct memory writes.
1055
- 17. Do not store secrets, tokens, passwords, private keys, raw logs, transient command output, or unreviewed guesses in memory.
1051
+ 5. For coding tasks, choose a workflow mode before editing: LITE for small
1052
+ single-phase changes, FULL managed workflow for multi-file, risky,
1053
+ release/deploy, architectural, compaction-prone, or future-maintainer-sensitive
1054
+ work.
1055
+ 6. Use whichever structural code graph tools are exposed in the current session
1056
+ for callers, imports, neighbors, and path questions. Tool exposure can vary.
1057
+ 7. On paid Context plans, use \`snipara_code_symbol_card\` for agent-ready symbol
1058
+ context and \`snipara_code_impact\` before risky multi-file changes, PR
1059
+ reviews, routes, services, jobs, auth, billing, deployment, schema, migrations,
1060
+ or explicit "what is missing" assessments.
1061
+ 8. Use \`snipara_plan\` or \`snipara_decompose\` only for FULL-mode work and only
1062
+ when the hosted server exposes them.
1063
+ 9. When the LLM has produced a visible multi-phase plan and \`snipara-companion\`
1064
+ is installed, run \`snipara-companion workflow start --goal "<goal>" --plan-file
1065
+ <plan_file>\`, then use \`workflow phase-start\`, \`workflow phase-commit\`,
1066
+ \`workflow resume\`, and \`final-commit\` so compaction cannot lose the next
1067
+ phase. Legacy \`rlm-hook\` commands remain compatible.
1068
+ 10. Use local file reads, \`rg\`, git commands, and test commands for exact edits,
1069
+ current working-tree state, and verification.
1070
+ 11. Treat every \`snipara_code_*\` response as indexed context: check indexed
1071
+ commit SHA, indexing time, included file sample, coverage, freshness warnings,
1072
+ and sync guidance before relying on it. Legacy \`rlm_code_*\` tool IDs return
1073
+ the same payloads. If \`git status --short\` is dirty, warn that the indexed
1074
+ graph may not include local edits.
1075
+ 12. Use Snipara Sandbox only when sandboxed execution, repeatable validation, or
1076
+ isolated transformations materially help.
1077
+ 13. If a broad query is slow, retry once with a narrow keyword query before
1078
+ falling back to local search.
1079
+ 14. When generated hooks are enabled, \`snipara-companion pre-tool\`, \`post-tool\`,
1080
+ and \`stuck-guard status\` provide runtime Rescue Pack checks for repeated
1081
+ failures, empty searches, and risky workflows.
1082
+ 15. End each substantial phase with \`snipara_end_of_task_commit\` or
1083
+ \`snipara-companion workflow phase-commit\` when companion manages the plan.
1084
+ End the whole managed workflow with \`snipara-companion final-commit\`.
1085
+ 16. Use \`snipara_remember_if_novel\` for one reusable memory while avoiding
1086
+ duplicates, and use \`snipara_remember\` for explicit direct memory writes.
1087
+ 17. Do not store secrets, tokens, passwords, private keys, raw logs, transient
1088
+ command output, or unreviewed guesses in memory.
1056
1089
  `;
1057
1090
  }
1058
1091
  function buildClaudeMdTemplate(answers) {
@@ -2252,15 +2285,10 @@ function printSuccess(answers, report) {
2252
2285
  }
2253
2286
  function commandExists(command) {
2254
2287
  try {
2255
- execSync(`${command} --version`, { stdio: "ignore", shell: "/bin/sh", timeout: 2500 });
2288
+ execSync(`command -v ${command}`, { stdio: "ignore", shell: "/bin/sh", timeout: 500 });
2256
2289
  return true;
2257
2290
  } catch {
2258
- try {
2259
- execSync(`command -v ${command}`, { stdio: "ignore", shell: "/bin/sh", timeout: 1e3 });
2260
- return true;
2261
- } catch {
2262
- return false;
2263
- }
2291
+ return false;
2264
2292
  }
2265
2293
  }
2266
2294
  function detectEnvironment() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "1.3.19",
3
+ "version": "1.3.21",
4
4
  "description": "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",