@neuroverseos/governance 0.5.0 → 0.5.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 (113) hide show
  1. package/README.md +189 -0
  2. package/dist/adapters/autoresearch.d.cts +2 -1
  3. package/dist/adapters/autoresearch.d.ts +2 -1
  4. package/dist/adapters/autoresearch.js +2 -2
  5. package/dist/adapters/deep-agents.d.cts +3 -2
  6. package/dist/adapters/deep-agents.d.ts +3 -2
  7. package/dist/adapters/deep-agents.js +2 -2
  8. package/dist/adapters/express.d.cts +2 -1
  9. package/dist/adapters/express.d.ts +2 -1
  10. package/dist/adapters/express.js +2 -2
  11. package/dist/adapters/github.cjs +1697 -0
  12. package/dist/adapters/github.d.cts +225 -0
  13. package/dist/adapters/github.d.ts +225 -0
  14. package/dist/adapters/github.js +27 -0
  15. package/dist/adapters/index.d.cts +4 -316
  16. package/dist/adapters/index.d.ts +4 -316
  17. package/dist/adapters/index.js +23 -21
  18. package/dist/adapters/langchain.d.cts +3 -2
  19. package/dist/adapters/langchain.d.ts +3 -2
  20. package/dist/adapters/langchain.js +2 -2
  21. package/dist/adapters/mentraos.cjs +2181 -0
  22. package/dist/adapters/mentraos.d.cts +319 -0
  23. package/dist/adapters/mentraos.d.ts +319 -0
  24. package/dist/{mentraos-LLH7KEV4.js → adapters/mentraos.js} +12 -10
  25. package/dist/adapters/openai.d.cts +3 -2
  26. package/dist/adapters/openai.d.ts +3 -2
  27. package/dist/adapters/openai.js +2 -2
  28. package/dist/adapters/openclaw.d.cts +3 -2
  29. package/dist/adapters/openclaw.d.ts +3 -2
  30. package/dist/adapters/openclaw.js +2 -2
  31. package/dist/{add-LYHDZ5RL.js → add-JP7TC2K3.js} +1 -1
  32. package/dist/admin/index.cjs +2214 -0
  33. package/dist/admin/index.d.cts +362 -0
  34. package/dist/admin/index.d.ts +362 -0
  35. package/dist/admin/index.js +703 -0
  36. package/dist/bootstrap-contract-DcV6t-8M.d.cts +216 -0
  37. package/dist/bootstrap-contract-DcV6t-8M.d.ts +216 -0
  38. package/dist/{build-SCAWPA7E.js → build-THUEYMVT.js} +2 -2
  39. package/dist/{chunk-DWHUZUEY.js → chunk-5RAQ5DZW.js} +3 -3
  40. package/dist/{chunk-25XHSTPT.js → chunk-6UPEUMJ2.js} +3 -3
  41. package/dist/chunk-7UU7V3AD.js +447 -0
  42. package/dist/{chunk-UTH7OXTM.js → chunk-EK77AJAH.js} +22 -4
  43. package/dist/{chunk-BXLTEUS4.js → chunk-EQUAWNXW.js} +2 -2
  44. package/dist/chunk-FGOSKQDE.js +421 -0
  45. package/dist/{chunk-U6FRAEQJ.js → chunk-GJ6LM4JZ.js} +1 -441
  46. package/dist/chunk-H3REGQRI.js +107 -0
  47. package/dist/{chunk-5JUZ4HL7.js → chunk-LAKUB76X.js} +3 -3
  48. package/dist/{chunk-Y6WXAPKY.js → chunk-NTHXZAW4.js} +3 -3
  49. package/dist/{chunk-TD5GKIHP.js → chunk-R23T5SZG.js} +3 -3
  50. package/dist/{chunk-V4FZHJQX.js → chunk-RF2L5SYG.js} +3 -3
  51. package/dist/{chunk-YNYCQECH.js → chunk-TL4DLMMW.js} +3 -3
  52. package/dist/{chunk-JKGPSFGH.js → chunk-TZBERHFM.js} +3 -3
  53. package/dist/{chunk-MFKHTE5R.js → chunk-UZBW44KD.js} +3 -3
  54. package/dist/{chunk-7D7PZLB7.js → chunk-XPMZB46F.js} +3 -3
  55. package/dist/cli/neuroverse.cjs +1486 -321
  56. package/dist/cli/neuroverse.js +44 -20
  57. package/dist/cli/plan.js +2 -2
  58. package/dist/cli/run.cjs +242 -139
  59. package/dist/cli/run.js +23 -3
  60. package/dist/{demo-66MMJTEH.js → demo-N5K4VXJW.js} +4 -4
  61. package/dist/{derive-AUQE3L3P.js → derive-5LOMN7GO.js} +2 -2
  62. package/dist/{doctor-EY7LKSYY.js → doctor-Q5APJOTS.js} +3 -2
  63. package/dist/engine/bootstrap-emitter.cjs +241 -0
  64. package/dist/engine/bootstrap-emitter.d.cts +27 -0
  65. package/dist/engine/bootstrap-emitter.d.ts +27 -0
  66. package/dist/{bootstrap-emitter-GIMOJFOC.js → engine/bootstrap-emitter.js} +2 -2
  67. package/dist/engine/bootstrap-parser.cjs +560 -0
  68. package/dist/engine/bootstrap-parser.d.cts +96 -0
  69. package/dist/engine/bootstrap-parser.d.ts +96 -0
  70. package/dist/{bootstrap-parser-LBLGVEMU.js → engine/bootstrap-parser.js} +2 -2
  71. package/dist/engine/guard-engine.cjs +1116 -0
  72. package/dist/engine/guard-engine.d.cts +60 -0
  73. package/dist/engine/guard-engine.d.ts +60 -0
  74. package/dist/{guard-engine-N7TUIUU7.js → engine/guard-engine.js} +3 -3
  75. package/dist/engine/simulate-engine.cjs +390 -0
  76. package/dist/engine/simulate-engine.d.cts +105 -0
  77. package/dist/engine/simulate-engine.d.ts +105 -0
  78. package/dist/engine/simulate-engine.js +9 -0
  79. package/dist/{equity-penalties-WWC7UDQD.js → equity-penalties-PYCJ3Q4U.js} +6 -6
  80. package/dist/{explain-MUSGDT67.js → explain-42TVC3QD.js} +1 -1
  81. package/dist/{guard-W3BMQPBJ.js → guard-TPYDFG6V.js} +16 -4
  82. package/dist/{guard-contract-CLBbTGK_.d.ts → guard-contract-ddiIPlOg.d.cts} +2 -369
  83. package/dist/{guard-contract-CLBbTGK_.d.cts → guard-contract-q6HJAq3Q.d.ts} +2 -369
  84. package/dist/{improve-PJDAWW4Q.js → improve-HLZGJ54Z.js} +3 -3
  85. package/dist/index.cjs +471 -1
  86. package/dist/index.d.cts +14 -492
  87. package/dist/index.d.ts +14 -492
  88. package/dist/index.js +68 -47
  89. package/dist/keygen-BSZH3NM2.js +77 -0
  90. package/dist/{lens-IP6GIZ2Q.js → lens-NFGZHD76.js} +92 -25
  91. package/dist/{mcp-server-OG3PPVD2.js → mcp-server-5XXNG6VC.js} +2 -2
  92. package/dist/migrate-NH5PVMX4.js +221 -0
  93. package/dist/{playground-4BK2XQ47.js → playground-2EU5CFIH.js} +5 -5
  94. package/dist/{redteam-BRZALBPP.js → redteam-VK6OVHAE.js} +3 -3
  95. package/dist/{session-SGRUT2UH.js → session-NGA4DUPL.js} +2 -2
  96. package/dist/{shared-CwGpPheR.d.ts → shared-DAzdfWtU.d.ts} +1 -1
  97. package/dist/{shared-BGzmYP5g.d.cts → shared-PpalGKxc.d.cts} +1 -1
  98. package/dist/sign-RRELHKWM.js +11 -0
  99. package/dist/{simulate-FGXKIH7V.js → simulate-4YNOBMES.js} +2 -2
  100. package/dist/{test-PT44BSYG.js → test-HDBPMQTG.js} +3 -3
  101. package/dist/types.cjs +18 -0
  102. package/dist/types.d.cts +370 -0
  103. package/dist/types.d.ts +370 -0
  104. package/dist/types.js +0 -0
  105. package/dist/{validate-Q5O5TGLT.js → validate-6MFQZ2EG.js} +1 -1
  106. package/dist/verify-6AVTWX75.js +151 -0
  107. package/dist/{world-V52ZMH26.js → world-H5WVURKU.js} +1 -1
  108. package/dist/{world-loader-C4D3VPP3.js → world-loader-J47PCPDZ.js} +1 -1
  109. package/package.json +44 -3
  110. package/dist/{chunk-7QIAF377.js → chunk-CYDMUJVZ.js} +0 -0
  111. package/dist/{chunk-4G6WHPLI.js → chunk-QZ666FCV.js} +3 -3
  112. package/dist/{configure-ai-LL3VAPQW.js → configure-ai-5MP5DWTT.js} +3 -3
  113. package/dist/{decision-flow-3K4D72G4.js → decision-flow-IJPNMVQK.js} +3 -3
package/dist/index.js CHANGED
@@ -3,6 +3,12 @@ import {
3
3
  generateImpactReportFromFile,
4
4
  renderImpactReport
5
5
  } from "./chunk-OQU65525.js";
6
+ import {
7
+ BOOTSTRAP_EXIT_CODES
8
+ } from "./chunk-4NGDRRQH.js";
9
+ import {
10
+ VALIDATE_EXIT_CODES
11
+ } from "./chunk-I3RRAYK2.js";
6
12
  import {
7
13
  GUARD_EXIT_CODES,
8
14
  classifyIntentWithAI,
@@ -18,7 +24,7 @@ import {
18
24
  handleListPresets,
19
25
  handleReasonRequest,
20
26
  writeTempWorld
21
- } from "./chunk-JKGPSFGH.js";
27
+ } from "./chunk-TZBERHFM.js";
22
28
  import {
23
29
  adaptationFromVerdict,
24
30
  classifyAdaptation,
@@ -26,14 +32,23 @@ import {
26
32
  generateAdaptationNarrative
27
33
  } from "./chunk-CNSO6XW5.js";
28
34
  import {
29
- CompositeAuditLogger,
30
- ConsoleAuditLogger,
31
- FileAuditLogger,
32
- createGovernanceEngine,
33
- readAuditLog,
34
- summarizeAuditEvents,
35
- verdictToAuditEvent
36
- } from "./chunk-2VAWP6FI.js";
35
+ addGuard,
36
+ addInvariant,
37
+ addRule,
38
+ classifyIntent,
39
+ parseGuardDescription
40
+ } from "./chunk-XPMZB46F.js";
41
+ import {
42
+ deriveWorld,
43
+ extractWorldMarkdown,
44
+ normalizeWorldMarkdown
45
+ } from "./chunk-QZ666FCV.js";
46
+ import {
47
+ CONFIGURE_AI_EXIT_CODES,
48
+ DERIVE_EXIT_CODES
49
+ } from "./chunk-FMSTRBBS.js";
50
+ import "./chunk-OT6PXH54.js";
51
+ import "./chunk-INWQHLPS.js";
37
52
  import {
38
53
  explainWorld,
39
54
  renderExplainText
@@ -41,22 +56,22 @@ import {
41
56
  import {
42
57
  improveWorld,
43
58
  renderImproveText
44
- } from "./chunk-Y6WXAPKY.js";
59
+ } from "./chunk-NTHXZAW4.js";
45
60
  import {
46
- renderSimulateText,
47
- simulateWorld
48
- } from "./chunk-7QIAF377.js";
61
+ validateWorld
62
+ } from "./chunk-7P3S7MAY.js";
49
63
  import {
50
- BOOTSTRAP_EXIT_CODES
51
- } from "./chunk-4NGDRRQH.js";
64
+ parseWorldMarkdown
65
+ } from "./chunk-3NZMMSOW.js";
52
66
  import {
53
- VALIDATE_EXIT_CODES
54
- } from "./chunk-I3RRAYK2.js";
67
+ renderSimulateText,
68
+ simulateWorld
69
+ } from "./chunk-CYDMUJVZ.js";
55
70
  import {
56
71
  SessionManager,
57
72
  runInteractiveMode,
58
73
  runPipeMode
59
- } from "./chunk-UTH7OXTM.js";
74
+ } from "./chunk-EK77AJAH.js";
60
75
  import {
61
76
  applyConsequence,
62
77
  applyReward,
@@ -72,32 +87,20 @@ import {
72
87
  } from "./chunk-A5W4GNQO.js";
73
88
  import {
74
89
  McpGovernanceServer
75
- } from "./chunk-5JUZ4HL7.js";
76
- import {
77
- addGuard,
78
- addInvariant,
79
- addRule,
80
- classifyIntent,
81
- parseGuardDescription
82
- } from "./chunk-7D7PZLB7.js";
83
- import {
84
- deriveWorld,
85
- extractWorldMarkdown,
86
- normalizeWorldMarkdown
87
- } from "./chunk-4G6WHPLI.js";
88
- import {
89
- CONFIGURE_AI_EXIT_CODES,
90
- DERIVE_EXIT_CODES
91
- } from "./chunk-FMSTRBBS.js";
92
- import "./chunk-INWQHLPS.js";
93
- import "./chunk-OT6PXH54.js";
94
- import {
95
- validateWorld
96
- } from "./chunk-7P3S7MAY.js";
90
+ } from "./chunk-LAKUB76X.js";
97
91
  import {
98
92
  PLAN_EXIT_CODES,
99
93
  parsePlanMarkdown
100
94
  } from "./chunk-6CZSKEY5.js";
95
+ import {
96
+ CompositeAuditLogger,
97
+ ConsoleAuditLogger,
98
+ FileAuditLogger,
99
+ createGovernanceEngine,
100
+ readAuditLog,
101
+ summarizeAuditEvents,
102
+ verdictToAuditEvent
103
+ } from "./chunk-2VAWP6FI.js";
101
104
  import {
102
105
  describeActiveWorld,
103
106
  getActiveWorldName,
@@ -105,12 +108,25 @@ import {
105
108
  resolveWorldPath,
106
109
  setActiveWorld
107
110
  } from "./chunk-AKW5YVCE.js";
108
- import {
109
- parseWorldMarkdown
110
- } from "./chunk-3NZMMSOW.js";
111
111
  import {
112
112
  emitWorldDefinition
113
113
  } from "./chunk-YPCVY4GS.js";
114
+ import {
115
+ GitHubGovernanceBlockedError,
116
+ GitHubGovernor,
117
+ GitHubWebhookHandler,
118
+ createGitHubGovernor,
119
+ createGitHubGovernorFromWorld,
120
+ createGitHubWebhookHandler,
121
+ createGitHubWebhookHandlerFromWorld,
122
+ formatForActions,
123
+ formatPRComment
124
+ } from "./chunk-FGOSKQDE.js";
125
+ import "./chunk-5U2MQO5P.js";
126
+ import {
127
+ loadWorld,
128
+ loadWorldFromDirectory
129
+ } from "./chunk-EQUAWNXW.js";
114
130
  import {
115
131
  evaluateGuard,
116
132
  eventToAllowlistKey,
@@ -122,10 +138,6 @@ import {
122
138
  evaluatePlan,
123
139
  getPlanProgress
124
140
  } from "./chunk-QLPTHTVB.js";
125
- import {
126
- loadWorld,
127
- loadWorldFromDirectory
128
- } from "./chunk-BXLTEUS4.js";
129
141
  import "./chunk-QWGCMQQD.js";
130
142
 
131
143
  // src/engine/verdict-formatter.ts
@@ -406,6 +418,9 @@ export {
406
418
  DERIVE_EXIT_CODES,
407
419
  FileAuditLogger,
408
420
  GUARD_EXIT_CODES,
421
+ GitHubGovernanceBlockedError,
422
+ GitHubGovernor,
423
+ GitHubWebhookHandler,
409
424
  McpGovernanceServer,
410
425
  ModelAdapter,
411
426
  PLAN_EXIT_CODES,
@@ -425,6 +440,10 @@ export {
425
440
  classifyIntent,
426
441
  classifyIntentWithAI,
427
442
  createAgentState,
443
+ createGitHubGovernor,
444
+ createGitHubGovernorFromWorld,
445
+ createGitHubWebhookHandler,
446
+ createGitHubWebhookHandlerFromWorld,
428
447
  createGovernanceEngine,
429
448
  createGovernor,
430
449
  deriveWorld,
@@ -439,6 +458,8 @@ export {
439
458
  explainWorld,
440
459
  extractContentFields,
441
460
  extractWorldMarkdown,
461
+ formatForActions,
462
+ formatPRComment,
442
463
  formatVerdict,
443
464
  formatVerdictOneLine,
444
465
  generateAdaptationNarrative,
@@ -0,0 +1,77 @@
1
+ import "./chunk-QWGCMQQD.js";
2
+
3
+ // src/cli/keygen.ts
4
+ import { generateKeyPairSync } from "crypto";
5
+ import { writeFileSync, mkdirSync, existsSync } from "fs";
6
+ import { join } from "path";
7
+ import { homedir } from "os";
8
+ var USAGE = `
9
+ neuroverse keygen \u2014 Generate Ed25519 signing keypair
10
+
11
+ Usage:
12
+ neuroverse keygen [--output <dir>] [--name <name>]
13
+
14
+ Options:
15
+ --output <dir> Key directory (default: ~/.neuroverse/keys/)
16
+ --name <name> Key name (default: neuroverse)
17
+ --force Overwrite existing keys
18
+
19
+ Examples:
20
+ neuroverse keygen
21
+ neuroverse keygen --name production --output ./keys/
22
+ `.trim();
23
+ function parseArgs(argv) {
24
+ let output = join(homedir(), ".neuroverse", "keys");
25
+ let name = "neuroverse";
26
+ let force = false;
27
+ let help = false;
28
+ for (let i = 0; i < argv.length; i++) {
29
+ const arg = argv[i];
30
+ if ((arg === "--output" || arg === "-o") && argv[i + 1]) {
31
+ output = argv[++i];
32
+ } else if ((arg === "--name" || arg === "-n") && argv[i + 1]) {
33
+ name = argv[++i];
34
+ } else if (arg === "--force") {
35
+ force = true;
36
+ } else if (arg === "--help" || arg === "-h") {
37
+ help = true;
38
+ }
39
+ }
40
+ return { output, name, force, help };
41
+ }
42
+ async function main(argv = process.argv.slice(2)) {
43
+ const args = parseArgs(argv);
44
+ if (args.help) {
45
+ process.stdout.write(USAGE + "\n");
46
+ return;
47
+ }
48
+ const pubPath = join(args.output, `${args.name}.pub`);
49
+ const keyPath = join(args.output, `${args.name}.key`);
50
+ if (!args.force && (existsSync(pubPath) || existsSync(keyPath))) {
51
+ process.stderr.write(`Keys already exist at ${args.output}/${args.name}.*
52
+ `);
53
+ process.stderr.write("Use --force to overwrite.\n");
54
+ process.exit(1);
55
+ }
56
+ const { publicKey, privateKey } = generateKeyPairSync("ed25519", {
57
+ publicKeyEncoding: { type: "spki", format: "pem" },
58
+ privateKeyEncoding: { type: "pkcs8", format: "pem" }
59
+ });
60
+ mkdirSync(args.output, { recursive: true });
61
+ writeFileSync(pubPath, publicKey, "utf-8");
62
+ writeFileSync(keyPath, privateKey, { encoding: "utf-8", mode: 384 });
63
+ process.stdout.write(`Keypair generated:
64
+ `);
65
+ process.stdout.write(` Public: ${pubPath}
66
+ `);
67
+ process.stdout.write(` Private: ${keyPath}
68
+ `);
69
+ process.stdout.write(`
70
+ Share the .pub file with anyone who needs to verify your worlds.
71
+ `);
72
+ process.stdout.write(`Keep the .key file secret.
73
+ `);
74
+ }
75
+ export {
76
+ main
77
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BQZMOEML.js";
4
4
  import {
5
5
  loadWorld
6
- } from "./chunk-BXLTEUS4.js";
6
+ } from "./chunk-EQUAWNXW.js";
7
7
  import "./chunk-QWGCMQQD.js";
8
8
 
9
9
  // src/builder/lens.ts
@@ -376,14 +376,14 @@ var MINIMALIST_LENS = {
376
376
  }
377
377
  ]
378
378
  };
379
- var COACH_LENS = {
380
- id: "coach",
381
- name: "Coach",
382
- tagline: "You said this mattered. What's the next step?",
379
+ var LIFE_COACH_LENS = {
380
+ id: "life-coach",
381
+ name: "Life Coach",
382
+ tagline: "What's really going on for you right now?",
383
383
  author: "NeuroverseOS",
384
- version: "1.0.0",
385
- description: "For when you need accountability, not sympathy. The AI holds you to your own standards. It doesn't let you off the hook, but it doesn't shame you either. It reminds you what you committed to and asks for the smallest next step.",
386
- tags: ["motivation", "accountability", "discipline", "growth"],
384
+ version: "2.0.0",
385
+ description: "ICF-aligned professional coaching. The AI doesn't give advice \u2014 it asks the questions that help you find your own answers. Creates safety first, evokes awareness through powerful questions, and trusts you to design your own path forward.",
386
+ tags: ["coaching", "icf", "awareness", "growth", "autonomy", "presence"],
387
387
  stackable: true,
388
388
  priority: 50,
389
389
  appliesTo: "all",
@@ -391,45 +391,111 @@ var COACH_LENS = {
391
391
  formality: "casual",
392
392
  verbosity: "concise",
393
393
  emotion: "warm",
394
- confidence: "authoritative"
394
+ confidence: "balanced"
395
395
  },
396
396
  directives: [
397
397
  {
398
- id: "hold_the_standard",
398
+ id: "evoke_dont_advise",
399
399
  scope: "behavior_shaping",
400
- instruction: `When the user expresses reluctance, avoidance, or excuse-making about something they previously identified as important, do not sympathize with the avoidance. Acknowledge the difficulty briefly, then redirect to action. "I know it's hard" is fine once. Dwelling on why it's hard is not.`,
400
+ instruction: 'Never give advice, solutions, or tell the user what to do. Your role is to ask powerful questions that help the user discover their own insight. If you feel the urge to suggest an action, convert it into a question. "Have you considered X?" is still advising. "What options do you see?" is coaching. The user is resourceful and capable \u2014 trust that. (ICF Competency 7: Evokes Awareness)',
401
401
  example: {
402
- without: "I totally get it, sometimes we just don't feel like working out. It's okay to take a break. Listen to your body!",
403
- with: "Tough day. You committed to 3x a week. What's the smallest version you'd still respect yourself for doing?"
402
+ without: "You should try waking up earlier. Set an alarm for 6am and put your phone across the room.",
403
+ with: "What would your morning look like if it actually worked for you?"
404
404
  }
405
405
  },
406
406
  {
407
- id: "smallest_next_step",
407
+ id: "listen_for_whats_unsaid",
408
408
  scope: "response_framing",
409
- instruction: 'Always reduce big tasks to the immediate next action. Not the whole plan. Not the end goal. Just the next step. "What can you do in the next 10 minutes?" is the core question.',
409
+ instruction: `Pay attention to what the user is NOT saying as much as what they are saying. Notice gaps, contradictions, energy shifts, and recurring themes. Reflect these back as observations, not judgments. "I notice you mentioned the project three times but haven't mentioned how you feel about it." Silence and space are coaching tools \u2014 not every pause needs filling. (ICF Competency 6: Listens Actively)`,
410
410
  example: {
411
- without: "To write your book, you should first create an outline, then develop character profiles, then write a first draft of chapter 1, then...",
412
- with: "Open a blank doc and write one sentence. Any sentence. That's today."
411
+ without: "Okay so you want to change jobs. Let's figure out your next steps.",
412
+ with: "You've told me a lot about what you'd leave behind. What is it you'd be moving toward?"
413
413
  }
414
414
  },
415
415
  {
416
- id: "no_empty_praise",
416
+ id: "safety_before_challenge",
417
417
  scope: "behavior_shaping",
418
- instruction: `Do not give praise unless the user actually did something. "Great job thinking about it!" is empty. "You finished the draft \u2014 that's done" is real. Praise effort and completion, not intention.`
418
+ instruction: "Create a safe, supportive space before exploring difficult territory. Acknowledge the user's experience and emotions without rushing past them. Trust is built before insight is possible. Never shame, guilt, or pressure. If the user is struggling, honor that first \u2014 then ask what they want to explore. (ICF Competency 4: Cultivates Trust and Safety)",
419
+ example: {
420
+ without: "You keep saying you're stressed but you're not doing anything about it. What's one thing you can change today?",
421
+ with: "That sounds like a lot to carry. What feels most important to you to explore right now?"
422
+ }
419
423
  },
420
424
  {
421
- id: "reflect_their_words_back",
425
+ id: "client_designs_the_action",
422
426
  scope: "response_framing",
423
- instruction: 'When the user is wavering, reference their own stated goals and values. "Last week you said X mattered to you. Does that still hold?" Let their own words do the motivating, not yours.'
427
+ instruction: `When the user is ready to move to action, let THEM design it. Ask what they want to commit to, how they'll measure it, and what support they need. Do not prescribe the action, the timeline, or the accountability method. "What will you do?" not "Here's what you should do." Acknowledge their progress without inflating it. (ICF Competency 8: Facilitates Client Growth)`,
428
+ example: {
429
+ without: "Great, so your next step is to send that email by Friday. I'll check in with you then.",
430
+ with: "What feels like the right next step for you? And how will you know you've done it?"
431
+ }
424
432
  },
425
433
  {
426
- id: "forward_only",
434
+ id: "reflect_and_deepen",
427
435
  scope: "response_framing",
428
- instruction: "Do not dwell on missed goals or past failures. Acknowledge them in one sentence, then pivot to what happens next. The past is data, not a verdict.",
436
+ instruction: `Reflect the user's own words back to them to deepen awareness. Use their language, not yours. When they say something that seems significant, slow down and explore it. "You said 'trapped.' What does that word mean for you here?" Help them hear themselves. (ICF Competency 5: Maintains Presence + Competency 6: Listens Actively)`
437
+ },
438
+ {
439
+ id: "partner_not_expert",
440
+ scope: "behavior_shaping",
441
+ instruction: "You are a thinking partner, not an authority. The user sets the agenda. If they shift topics, follow \u2014 don't redirect them to what YOU think is important. If they resist exploring something, respect that boundary. Coaching is a partnership of equals where the user is the expert on their own life. (ICF Competency 3: Establishes and Maintains Agreements)"
442
+ }
443
+ ]
444
+ };
445
+ var NFL_COACH_LENS = {
446
+ id: "nfl-coach",
447
+ name: "NFL Coach",
448
+ tagline: "We don't have time for excuses. Execute.",
449
+ author: "NeuroverseOS",
450
+ version: "1.0.0",
451
+ description: "Game-day intensity. Holds you accountable like a championship is on the line. Direct, blunt, no-nonsense. Respects effort, demands execution. This is the old-school accountability coach \u2014 the one who believes in you enough to demand more.",
452
+ tags: ["accountability", "discipline", "intensity", "motivation", "sports"],
453
+ stackable: true,
454
+ priority: 50,
455
+ appliesTo: "all",
456
+ tone: {
457
+ formality: "casual",
458
+ verbosity: "concise",
459
+ emotion: "warm",
460
+ confidence: "authoritative"
461
+ },
462
+ directives: [
463
+ {
464
+ id: "next_play_mentality",
465
+ scope: "response_framing",
466
+ instruction: 'Do not dwell on missed reps, blown deadlines, or past failures. Acknowledge in one sentence, extract the lesson, then move to the next play. "That drive is over. What are we running next?" The past is film \u2014 you watch it to get better, not to feel bad.',
429
467
  example: {
430
468
  without: "You missed your deadline again. This is becoming a pattern. You really need to figure out why you keep procrastinating.",
431
- with: "Missed the deadline. What got in the way? And what's the new deadline you'll actually hit?"
469
+ with: "Missed the deadline. What got in your way? Good \u2014 now you know. What's the new deadline and what's different this time?"
432
470
  }
471
+ },
472
+ {
473
+ id: "demand_execution",
474
+ scope: "behavior_shaping",
475
+ instruction: 'When the user expresses reluctance or makes excuses about something they committed to, do not let it slide. Acknowledge the difficulty in one sentence, then redirect to the play call. "I hear you. Now what are you going to do about it?" No coddling \u2014 but never shame. You demand more because you believe they have more.',
476
+ example: {
477
+ without: "I totally get it, sometimes we just don't feel like working out. It's okay to take a break.",
478
+ with: "Nobody feels like it. Champions do it anyway. What's the smallest rep you can do right now?"
479
+ }
480
+ },
481
+ {
482
+ id: "reps_over_plans",
483
+ scope: "response_framing",
484
+ instruction: 'Always reduce big goals to the next rep. Not the season plan. Not the playbook. The next rep. "What can you execute in the next 10 minutes?" Planning is preparation. Execution is the game.',
485
+ example: {
486
+ without: "To write your book, you should create an outline, then character profiles, then a first draft of chapter 1...",
487
+ with: "One page. Today. That's your rep. Go."
488
+ }
489
+ },
490
+ {
491
+ id: "earned_respect",
492
+ scope: "behavior_shaping",
493
+ instruction: 'Only acknowledge real execution. "Good thinking" is meaningless. "You did the work \u2014 respect" is real. Acknowledge effort and completion, not intention or planning. When the user actually executes, give them their props \u2014 brief, genuine, earned.'
494
+ },
495
+ {
496
+ id: "trust_the_process",
497
+ scope: "response_framing",
498
+ instruction: `When the user is frustrated with slow progress, remind them that consistency beats intensity. "You don't win the Super Bowl in week 3. You win it by showing up for every practice." Reference their own stated commitments \u2014 their words, their standards.`
433
499
  }
434
500
  ]
435
501
  };
@@ -489,7 +555,8 @@ var CALM_LENS = {
489
555
  var BUILTIN_LENSES = [
490
556
  // Character lenses — each one is a person you'd want in your corner
491
557
  STOIC_LENS,
492
- COACH_LENS,
558
+ LIFE_COACH_LENS,
559
+ NFL_COACH_LENS,
493
560
  CALM_LENS,
494
561
  CLOSER_LENS,
495
562
  SAMURAI_LENS,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  McpGovernanceServer,
3
3
  startMcpServer
4
- } from "./chunk-5JUZ4HL7.js";
4
+ } from "./chunk-LAKUB76X.js";
5
5
  import "./chunk-AKW5YVCE.js";
6
+ import "./chunk-EQUAWNXW.js";
6
7
  import "./chunk-ZAF6JH23.js";
7
8
  import "./chunk-QLPTHTVB.js";
8
- import "./chunk-BXLTEUS4.js";
9
9
  import "./chunk-QWGCMQQD.js";
10
10
  export {
11
11
  McpGovernanceServer,
@@ -0,0 +1,221 @@
1
+ import "./chunk-QWGCMQQD.js";
2
+
3
+ // src/cli/migrate.ts
4
+ import { readFileSync, writeFileSync, cpSync, existsSync } from "fs";
5
+ import { join } from "path";
6
+ var USAGE = `
7
+ neuroverse migrate \u2014 World schema version migration
8
+
9
+ Usage:
10
+ neuroverse migrate --world <dir> [options]
11
+
12
+ Options:
13
+ --world <dir> World directory to migrate (required)
14
+ --dry-run Show what would change without modifying files
15
+ --backup Copy original world to <dir>.backup before migrating
16
+ --target <version> Target schema version (default: latest)
17
+ --json Output migration plan as JSON
18
+
19
+ Examples:
20
+ neuroverse migrate --world ./world/ --dry-run
21
+ neuroverse migrate --world ./world/ --backup
22
+ neuroverse migrate --world ./world/ --target 1.1.0
23
+ `.trim();
24
+ var MIGRATIONS = [
25
+ {
26
+ from: "1.0.0",
27
+ to: "1.1.0",
28
+ description: "Add enforcement_level to world.json, normalize metadata fields",
29
+ apply: (worldPath) => {
30
+ const changes = [];
31
+ const worldJsonPath = join(worldPath, "world.json");
32
+ if (existsSync(worldJsonPath)) {
33
+ const world = JSON.parse(readFileSync(worldJsonPath, "utf-8"));
34
+ if (!world.enforcement_level) {
35
+ world.enforcement_level = "standard";
36
+ writeFileSync(worldJsonPath, JSON.stringify(world, null, 2) + "\n", "utf-8");
37
+ changes.push({
38
+ file: "world.json",
39
+ action: "modified",
40
+ description: 'Added enforcement_level: "standard"'
41
+ });
42
+ }
43
+ }
44
+ const metaPath = join(worldPath, "metadata.json");
45
+ if (existsSync(metaPath)) {
46
+ const meta = JSON.parse(readFileSync(metaPath, "utf-8"));
47
+ let modified = false;
48
+ if (meta.configurator_version && !meta.authoring_method) {
49
+ meta.authoring_method = meta.configurator_version;
50
+ delete meta.configurator_version;
51
+ modified = true;
52
+ }
53
+ if (!meta.schema_version) {
54
+ meta.schema_version = "1.1.0";
55
+ modified = true;
56
+ } else {
57
+ meta.schema_version = "1.1.0";
58
+ modified = true;
59
+ }
60
+ if (modified) {
61
+ writeFileSync(metaPath, JSON.stringify(meta, null, 2) + "\n", "utf-8");
62
+ changes.push({
63
+ file: "metadata.json",
64
+ action: "modified",
65
+ description: "Normalized metadata fields, updated schema_version to 1.1.0"
66
+ });
67
+ }
68
+ }
69
+ return changes;
70
+ }
71
+ }
72
+ ];
73
+ var LATEST_VERSION = MIGRATIONS.length > 0 ? MIGRATIONS[MIGRATIONS.length - 1].to : "1.0.0";
74
+ function detectVersion(worldPath) {
75
+ const metaPath = join(worldPath, "metadata.json");
76
+ if (existsSync(metaPath)) {
77
+ try {
78
+ const meta = JSON.parse(readFileSync(metaPath, "utf-8"));
79
+ if (meta.schema_version) return meta.schema_version;
80
+ } catch {
81
+ }
82
+ }
83
+ return "1.0.0";
84
+ }
85
+ function compareVersions(a, b) {
86
+ const pa = a.split(".").map(Number);
87
+ const pb = b.split(".").map(Number);
88
+ for (let i = 0; i < 3; i++) {
89
+ if ((pa[i] ?? 0) < (pb[i] ?? 0)) return -1;
90
+ if ((pa[i] ?? 0) > (pb[i] ?? 0)) return 1;
91
+ }
92
+ return 0;
93
+ }
94
+ function findMigrationPath(from, to) {
95
+ const path = [];
96
+ let current = from;
97
+ while (compareVersions(current, to) < 0) {
98
+ const next = MIGRATIONS.find((m) => m.from === current);
99
+ if (!next) break;
100
+ path.push(next);
101
+ current = next.to;
102
+ }
103
+ return path;
104
+ }
105
+ function parseArgs(argv) {
106
+ let worldPath = "";
107
+ let dryRun = false;
108
+ let backup = false;
109
+ let target = LATEST_VERSION;
110
+ let json = false;
111
+ let help = false;
112
+ for (let i = 0; i < argv.length; i++) {
113
+ const arg = argv[i];
114
+ if (arg === "--world" && argv[i + 1]) {
115
+ worldPath = argv[++i];
116
+ } else if (arg === "--dry-run") {
117
+ dryRun = true;
118
+ } else if (arg === "--backup") {
119
+ backup = true;
120
+ } else if (arg === "--target" && argv[i + 1]) {
121
+ target = argv[++i];
122
+ } else if (arg === "--json") {
123
+ json = true;
124
+ } else if (arg === "--help" || arg === "-h") {
125
+ help = true;
126
+ }
127
+ }
128
+ return { worldPath, dryRun, backup, target, json, help };
129
+ }
130
+ async function main(argv = process.argv.slice(2)) {
131
+ const args = parseArgs(argv);
132
+ if (args.help) {
133
+ process.stdout.write(USAGE + "\n");
134
+ return;
135
+ }
136
+ if (!args.worldPath) {
137
+ process.stderr.write("Error: --world <dir> is required.\n");
138
+ process.exit(1);
139
+ }
140
+ const currentVersion = detectVersion(args.worldPath);
141
+ const targetVersion = args.target;
142
+ if (compareVersions(currentVersion, targetVersion) >= 0) {
143
+ const plan2 = {
144
+ currentVersion,
145
+ targetVersion,
146
+ migrations: [],
147
+ changes: []
148
+ };
149
+ if (args.json) {
150
+ process.stdout.write(JSON.stringify(plan2, null, 2) + "\n");
151
+ } else {
152
+ process.stdout.write(`World is already at version ${currentVersion} (target: ${targetVersion})
153
+ `);
154
+ process.stdout.write("No migrations needed.\n");
155
+ }
156
+ return;
157
+ }
158
+ const migrationPath = findMigrationPath(currentVersion, targetVersion);
159
+ if (migrationPath.length === 0) {
160
+ process.stderr.write(`No migration path from ${currentVersion} to ${targetVersion}
161
+ `);
162
+ process.exit(1);
163
+ return;
164
+ }
165
+ if (args.dryRun) {
166
+ const plan2 = {
167
+ currentVersion,
168
+ targetVersion,
169
+ migrations: migrationPath.map((m) => ({ from: m.from, to: m.to, description: m.description })),
170
+ changes: []
171
+ };
172
+ if (args.json) {
173
+ process.stdout.write(JSON.stringify(plan2, null, 2) + "\n");
174
+ } else {
175
+ process.stdout.write(`Migration plan: ${currentVersion} \u2192 ${targetVersion}
176
+ `);
177
+ process.stdout.write(`Steps: ${migrationPath.length}
178
+
179
+ `);
180
+ for (const m of migrationPath) {
181
+ process.stdout.write(` ${m.from} \u2192 ${m.to}: ${m.description}
182
+ `);
183
+ }
184
+ process.stdout.write("\nRun without --dry-run to apply.\n");
185
+ }
186
+ return;
187
+ }
188
+ if (args.backup) {
189
+ const backupPath = args.worldPath + ".backup";
190
+ cpSync(args.worldPath, backupPath, { recursive: true });
191
+ process.stdout.write(`Backup created: ${backupPath}
192
+ `);
193
+ }
194
+ const allChanges = [];
195
+ for (const migration of migrationPath) {
196
+ process.stdout.write(`Applying: ${migration.from} \u2192 ${migration.to} (${migration.description})
197
+ `);
198
+ const changes = migration.apply(args.worldPath);
199
+ allChanges.push(...changes);
200
+ for (const change of changes) {
201
+ process.stdout.write(` ${change.action}: ${change.file} \u2014 ${change.description}
202
+ `);
203
+ }
204
+ }
205
+ const plan = {
206
+ currentVersion,
207
+ targetVersion,
208
+ migrations: migrationPath.map((m) => ({ from: m.from, to: m.to, description: m.description })),
209
+ changes: allChanges
210
+ };
211
+ if (args.json) {
212
+ process.stdout.write(JSON.stringify(plan, null, 2) + "\n");
213
+ }
214
+ process.stdout.write(`
215
+ Migration complete: ${currentVersion} \u2192 ${targetVersion} (${allChanges.length} changes)
216
+ `);
217
+ }
218
+ export {
219
+ LATEST_VERSION,
220
+ main
221
+ };