create-snipara 3.1.11 → 3.1.13

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/index.js CHANGED
@@ -14,7 +14,7 @@ import { homedir as homedir2 } from "os";
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "create-snipara",
17
- version: "3.1.11",
17
+ version: "3.1.13",
18
18
  description: "Onboard Snipara Cloud or self-hosted MCP with an automatic project-grounded proof of value",
19
19
  main: "dist/index.js",
20
20
  type: "module",
@@ -225,7 +225,7 @@ function parseManagedToolchainManifest(value) {
225
225
 
226
226
  // src/managed-versions.json
227
227
  var managed_versions_default = {
228
- companion: "9.4.1",
228
+ companion: "9.4.4",
229
229
  sandbox: "3.8.0"
230
230
  };
231
231
 
@@ -978,6 +978,20 @@ var FIRST_ON_MCP_2 = {
978
978
  [MCP_PACKAGE_NAME]: "5.0.0",
979
979
  [SANDBOX_PACKAGE_NAME]: "3.6.0"
980
980
  };
981
+ var MIN_MCP_VERSION = "5.0.2";
982
+ var COMPANION_STATE_GITIGNORE_ENTRIES = [
983
+ "/.snipara/companion/",
984
+ "**/.snipara/workflow/",
985
+ "**/.snipara/collaboration/",
986
+ "**/.snipara/context-pack/",
987
+ "**/.snipara/team-sync/",
988
+ "**/.snipara/activity/",
989
+ "**/.snipara/stuck-guard/",
990
+ "**/.snipara/validation/",
991
+ "**/.snipara/producer-loop/",
992
+ "**/.snipara/code-overlay/",
993
+ "**/.snipara/code-impact/"
994
+ ];
981
995
  var SANDBOX_SERVER_NAME = "snipara-sandbox";
982
996
  var LEGACY_RUNTIME_SERVER_NAME = "rlm-runtime";
983
997
  var SANDBOX_COMMAND_NAME = "snipara-sandbox";
@@ -3728,6 +3742,11 @@ function findMcpSide(pipCmd, packages) {
3728
3742
  return { bound: "", users: [] };
3729
3743
  }
3730
3744
  }
3745
+ function pythonVersionBound(name, bound) {
3746
+ if (bound === "<") return `<${FIRST_ON_MCP_2[name]}`;
3747
+ if (name === MCP_PACKAGE_NAME) return `>=${MIN_MCP_VERSION}`;
3748
+ return bound && bound + FIRST_ON_MCP_2[name];
3749
+ }
3731
3750
  async function installPythonPackages(answers, upgrade) {
3732
3751
  console.log(chalk.bold(`
3733
3752
  \u{1F4E6} ${upgrade ? "Upgrading" : "Installing"} Python Packages
@@ -3753,7 +3772,7 @@ async function installPythonPackages(answers, upgrade) {
3753
3772
  }
3754
3773
  if (packages.length === 0) return;
3755
3774
  const { bound, users } = findMcpSide(pipCmd, packages);
3756
- const specs = packages.map((name) => `"${name}${bound && bound + FIRST_ON_MCP_2[name]}"`);
3775
+ const specs = packages.map((name) => `"${name}${pythonVersionBound(name, bound)}"`);
3757
3776
  if (users.length > 0) {
3758
3777
  console.log(
3759
3778
  chalk.yellow(
@@ -4963,6 +4982,24 @@ function buildGenericMcpReferenceTemplate(answers, client) {
4963
4982
  )}
4964
4983
  `;
4965
4984
  }
4985
+ function ensureCompanionStateIsGitIgnored() {
4986
+ const gitignorePath = path4.join(process.cwd(), ".gitignore");
4987
+ const comment = "# Snipara Companion local state";
4988
+ const current = fs4.existsSync(gitignorePath) ? fs4.readFileSync(gitignorePath, "utf-8") : "";
4989
+ const present = new Set(current.split(/\r?\n/).map((line) => line.trim()));
4990
+ if ([".snipara/", ".snipara", "**/.snipara/", "**/.snipara"].some((entry) => present.has(entry))) {
4991
+ return;
4992
+ }
4993
+ const missing = COMPANION_STATE_GITIGNORE_ENTRIES.filter((entry) => !present.has(entry));
4994
+ if (missing.length === 0) return;
4995
+ const lines = present.has(comment) ? missing : [comment, ...missing];
4996
+ const separator = current.length === 0 || current.endsWith("\n") ? "" : "\n";
4997
+ fs4.writeFileSync(gitignorePath, `${current}${separator}${lines.join("\n")}
4998
+ `);
4999
+ console.log(
5000
+ chalk.green(` \u2713 Added Companion's local state folders to .gitignore (${missing.length})`)
5001
+ );
5002
+ }
4966
5003
  function ensureGitignoreEntry(entry, comment) {
4967
5004
  const gitignorePath = path4.join(process.cwd(), ".gitignore");
4968
5005
  if (fs4.existsSync(gitignorePath)) {
@@ -5349,7 +5386,11 @@ ${missingLines.join("\n")}
5349
5386
  }
5350
5387
  }
5351
5388
  async function createCompanionConfig(answers) {
5352
- if (!answers.installCompanion || answers.apiKeyType === "none" || !answers.apiKey || answers.apiKey.includes("YOUR_")) {
5389
+ if (!answers.installCompanion) {
5390
+ return;
5391
+ }
5392
+ ensureCompanionStateIsGitIgnored();
5393
+ if (answers.apiKeyType === "none" || !answers.apiKey || answers.apiKey.includes("YOUR_")) {
5353
5394
  return;
5354
5395
  }
5355
5396
  const configDir = path4.join(process.cwd(), ".snipara", "companion");
@@ -133,7 +133,7 @@ function parseManagedToolchainManifest(value) {
133
133
 
134
134
  // src/managed-versions.json
135
135
  var managed_versions_default = {
136
- companion: "9.4.1",
136
+ companion: "9.4.4",
137
137
  sandbox: "3.8.0"
138
138
  };
139
139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "3.1.11",
3
+ "version": "3.1.13",
4
4
  "description": "Onboard Snipara Cloud or self-hosted MCP with an automatic project-grounded proof of value",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",