git-vibe-setup 5.0.0 → 5.1.1

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/install.js +12 -1
  2. package/package.json +1 -1
package/dist/install.js CHANGED
@@ -93,7 +93,8 @@ export function pinWorkflowReleaseRefs(content, releaseTag) {
93
93
  export function migrateGitVibeConfigContent(content) {
94
94
  const migratedComments = migrateLegacyEventDeliveryComments(content);
95
95
  const migratedAuth = migrateGithubAuthConfig(migratedComments);
96
- return ensureTrailingNewline(migrateLegacyAiProfiles(migratedAuth));
96
+ const migratedSafety = migratePromptInjectionSafetyConfig(migratedAuth);
97
+ return ensureTrailingNewline(migrateLegacyAiProfiles(migratedSafety));
97
98
  }
98
99
  function isManagedWorkflowTarget(file) {
99
100
  return isManagedWorkflowFile(file.targetPath, basename(file.targetPath));
@@ -262,6 +263,16 @@ function migrateGithubAuthConfig(content) {
262
263
  }
263
264
  return `${content.trimEnd()}\n\n${githubAppAuth}`;
264
265
  }
266
+ function migratePromptInjectionSafetyConfig(content) {
267
+ const document = parseDocument(content);
268
+ if (document.errors.length > 0) {
269
+ throw new Error(`git-vibe-setup could not migrate .github/git-vibe.yml because it is not valid YAML: ${document.errors[0]?.message}`);
270
+ }
271
+ const root = document.contents;
272
+ if (!isMap(root) || root.has("safety"))
273
+ return content;
274
+ return `${content.trimEnd()}\n\nsafety:\n prompt_injection_gate: true\n`;
275
+ }
265
276
  function migrateLegacyAiProfiles(content) {
266
277
  const document = parseDocument(content);
267
278
  if (document.errors.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-vibe-setup",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {