create-snipara 1.3.20 → 1.3.22

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 +122 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,7 +9,81 @@ 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.20";
12
+
13
+ // package.json
14
+ var package_default = {
15
+ name: "create-snipara",
16
+ version: "1.3.22",
17
+ description: "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
18
+ main: "dist/index.js",
19
+ type: "module",
20
+ bin: {
21
+ "create-snipara": "dist/index.js"
22
+ },
23
+ scripts: {
24
+ build: "tsup src/index.ts --format esm --dts --clean",
25
+ dev: "tsup src/index.ts --format esm --watch",
26
+ prepublishOnly: "npm run build",
27
+ pretest: "pnpm build",
28
+ test: "node --test test/*.test.cjs",
29
+ "pack:smoke": "bash ../../scripts/smoke-node-package.sh packages/create-snipara create-snipara create-snipara --help",
30
+ "type-check": "tsc --noEmit",
31
+ lint: "eslint src --ext .ts"
32
+ },
33
+ keywords: [
34
+ "snipara",
35
+ "create-snipara",
36
+ "mcp",
37
+ "snipara-sandbox",
38
+ "context-optimization",
39
+ "llm",
40
+ "ai-agents",
41
+ "multi-agent",
42
+ "memory",
43
+ "claude-code",
44
+ "codex",
45
+ "chatgpt",
46
+ "openai",
47
+ "cursor",
48
+ "windsurf",
49
+ "gemini",
50
+ "vscode",
51
+ "continue",
52
+ "claude-desktop"
53
+ ],
54
+ author: "Snipara",
55
+ license: "MIT",
56
+ repository: {
57
+ type: "git",
58
+ url: "git+https://github.com/Snipara/create-snipara.git"
59
+ },
60
+ homepage: "https://snipara.com/docs/integration/create-snipara",
61
+ dependencies: {
62
+ chalk: "^5.3.0",
63
+ commander: "^12.1.0",
64
+ ora: "^8.0.1",
65
+ prompts: "^2.4.2"
66
+ },
67
+ devDependencies: {
68
+ "@eslint/js": "^9.39.3",
69
+ "@types/node": "^20.17.12",
70
+ "@types/prompts": "^2.4.9",
71
+ "@typescript-eslint/eslint-plugin": "^8.56.0",
72
+ "@typescript-eslint/parser": "^8.56.0",
73
+ eslint: "^9.39.3",
74
+ tsup: "^8.3.5",
75
+ typescript: "^5.7.2"
76
+ },
77
+ engines: {
78
+ node: ">=18"
79
+ },
80
+ files: [
81
+ "dist"
82
+ ]
83
+ };
84
+
85
+ // src/index.ts
86
+ var VERSION = package_default.version;
13
87
  var BASE_URL = "https://www.snipara.com";
14
88
  var API_URL = "https://api.snipara.com";
15
89
  var COMPANION_PACKAGE_NAME = "snipara-companion";
@@ -1033,26 +1107,59 @@ This project uses Snipara Hosted MCP for project context and reviewed memory.
1033
1107
 
1034
1108
  - Endpoint: \`${buildHostedMcpEndpoint(answers)}\`
1035
1109
  - Auth: use \`SNIPARA_API_KEY\` from the environment. Never commit keys.
1110
+ - For Codex, expose the endpoint as a streamable HTTP MCP server and load the
1111
+ key from an environment variable such as \`SNIPARA_API_KEY\` or \`RLM_API_KEY\`.
1112
+ - At the start of every new thread, validate hosted MCP with a tool-oriented
1113
+ call such as \`snipara_settings\`, \`tools/list\`, or a lightweight
1114
+ \`snipara_context_query\`. Do not treat empty MCP resources/templates as an
1115
+ outage because Snipara may be tool-only.
1036
1116
 
1037
1117
  Agent task lifecycle:
1038
1118
 
1039
- 1. Start substantial work with \`snipara_recall\` and a targeted \`snipara_context_query\`.
1119
+ 1. Start every new thread by validating hosted MCP availability, then use
1120
+ project-scoped \`snipara_recall\` and a targeted \`snipara_context_query\` before
1121
+ falling back to local documentation search.
1040
1122
  2. Use \`snipara_context_query\` for docs, business context, client/project truth, architecture notes, runbooks, and narrative source material.
1041
1123
  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
1124
  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.
1125
+ 5. For coding tasks, choose a workflow mode before editing: LITE for small
1126
+ single-phase changes, FULL managed workflow for multi-file, risky,
1127
+ release/deploy, architectural, compaction-prone, or future-maintainer-sensitive
1128
+ work.
1129
+ 6. Use whichever structural code graph tools are exposed in the current session
1130
+ for callers, imports, neighbors, and path questions. Tool exposure can vary.
1131
+ 7. On paid Context plans, use \`snipara_code_symbol_card\` for agent-ready symbol
1132
+ context and \`snipara_code_impact\` before risky multi-file changes, PR
1133
+ reviews, routes, services, jobs, auth, billing, deployment, schema, migrations,
1134
+ or explicit "what is missing" assessments.
1135
+ 8. Use \`snipara_plan\` or \`snipara_decompose\` only for FULL-mode work and only
1136
+ when the hosted server exposes them.
1137
+ 9. When the LLM has produced a visible multi-phase plan and \`snipara-companion\`
1138
+ is installed, run \`snipara-companion workflow start --goal "<goal>" --plan-file
1139
+ <plan_file>\`, then use \`workflow phase-start\`, \`workflow phase-commit\`,
1140
+ \`workflow resume\`, and \`final-commit\` so compaction cannot lose the next
1141
+ phase. Legacy \`rlm-hook\` commands remain compatible.
1142
+ 10. Use local file reads, \`rg\`, git commands, and test commands for exact edits,
1143
+ current working-tree state, and verification.
1144
+ 11. Treat every \`snipara_code_*\` response as indexed context: check indexed
1145
+ commit SHA, indexing time, included file sample, coverage, freshness warnings,
1146
+ and sync guidance before relying on it. Legacy \`rlm_code_*\` tool IDs return
1147
+ the same payloads. If \`git status --short\` is dirty, warn that the indexed
1148
+ graph may not include local edits.
1149
+ 12. Use Snipara Sandbox only when sandboxed execution, repeatable validation, or
1150
+ isolated transformations materially help.
1151
+ 13. If a broad query is slow, retry once with a narrow keyword query before
1152
+ falling back to local search.
1153
+ 14. When generated hooks are enabled, \`snipara-companion pre-tool\`, \`post-tool\`,
1154
+ and \`stuck-guard status\` provide runtime Rescue Pack checks for repeated
1155
+ failures, empty searches, and risky workflows.
1156
+ 15. End each substantial phase with \`snipara_end_of_task_commit\` or
1157
+ \`snipara-companion workflow phase-commit\` when companion manages the plan.
1158
+ End the whole managed workflow with \`snipara-companion final-commit\`.
1159
+ 16. Use \`snipara_remember_if_novel\` for one reusable memory while avoiding
1160
+ duplicates, and use \`snipara_remember\` for explicit direct memory writes.
1161
+ 17. Do not store secrets, tokens, passwords, private keys, raw logs, transient
1162
+ command output, or unreviewed guesses in memory.
1056
1163
  `;
1057
1164
  }
1058
1165
  function buildClaudeMdTemplate(answers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "1.3.20",
3
+ "version": "1.3.22",
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",