create-principles-disciple 1.147.18 → 1.148.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 (187) hide show
  1. package/_release/product-identity.json +1 -1
  2. package/codex-adapter/package.json +1 -1
  3. package/console/dist/server/config/pd-config-store.js +6 -6
  4. package/console/dist/server/index.d.ts +20 -0
  5. package/console/dist/server/index.js +104 -84
  6. package/console/dist/server/models/ApprovalsConsoleModel.d.ts +1 -1
  7. package/console/dist/server/models/ApprovalsConsoleModel.js +5 -2
  8. package/console/dist/server/models/GovernanceExperienceCollector.js +2 -1
  9. package/console/dist/server/models/GovernanceProjectionCollector.js +11 -10
  10. package/console/dist/server/models/IntentPageModel.js +1 -1
  11. package/console/dist/server/models/OwnerDecisionViewModel.d.ts +3 -2
  12. package/console/dist/server/models/OwnerDecisionViewModel.js +8 -7
  13. package/console/dist/server/routes/activations.js +5 -5
  14. package/console/dist/server/routes/approvals-grouped.js +2 -2
  15. package/console/dist/server/routes/approvals.js +7 -7
  16. package/console/dist/server/routes/config.d.ts +4 -4
  17. package/console/dist/server/routes/config.js +5 -5
  18. package/console/dist/server/routes/evidence-chain.d.ts +1 -1
  19. package/console/dist/server/routes/evidence-outcomes.d.ts +2 -2
  20. package/console/dist/server/routes/examiner.d.ts +12 -12
  21. package/console/dist/server/routes/examiner.js +2 -2
  22. package/console/dist/server/routes/failed-tasks.d.ts +4 -4
  23. package/console/dist/server/routes/failed-tasks.js +10 -10
  24. package/console/dist/server/routes/governance.d.ts +1 -1
  25. package/console/dist/server/routes/governance.js +3 -3
  26. package/console/dist/server/routes/intent-decisions.d.ts +6 -6
  27. package/console/dist/server/routes/intent-decisions.js +13 -13
  28. package/console/dist/server/routes/intent.js +6 -6
  29. package/console/dist/server/routes/lifecycle.js +3 -3
  30. package/console/dist/server/routes/onboarding.d.ts +1 -1
  31. package/console/dist/server/routes/onboarding.js +4 -4
  32. package/console/dist/server/routes/owner-decision.d.ts +5 -5
  33. package/console/dist/server/routes/owner-decision.js +3 -3
  34. package/console/dist/server/routes/owner-decisions.d.ts +3 -3
  35. package/console/dist/server/routes/owner-decisions.js +3 -3
  36. package/console/dist/server/routes/owner-identity.d.ts +1 -1
  37. package/console/dist/server/routes/owner-identity.js +1 -1
  38. package/console/dist/server/routes/principles.d.ts +4 -3
  39. package/console/dist/server/routes/principles.js +5 -4
  40. package/console/dist/server/routes/receipts.d.ts +2 -2
  41. package/console/dist/server/routes/receipts.js +4 -4
  42. package/console/dist/server.d.ts +2 -1
  43. package/console/dist/server.js +9 -1
  44. package/console/dist/shared/prompt-injection-contract.d.ts +1 -1
  45. package/console/dist/web/assets/app.js +23 -23
  46. package/core/dist/index.d.ts +1 -1
  47. package/core/dist/index.d.ts.map +1 -1
  48. package/core/dist/index.js +3 -2
  49. package/core/dist/index.js.map +1 -1
  50. package/core/dist/runtime/activation/approval-review-guard.d.ts +2 -2
  51. package/core/dist/runtime/activation/approval-review-guard.d.ts.map +1 -1
  52. package/core/dist/runtime/activation/approval-review-guard.js +6 -1
  53. package/core/dist/runtime/activation/approval-review-guard.js.map +1 -1
  54. package/core/dist/runtime/activation/prompt-budget-policy.d.ts +9 -1
  55. package/core/dist/runtime/activation/prompt-budget-policy.d.ts.map +1 -1
  56. package/core/dist/runtime/activation/prompt-budget-policy.js +9 -1
  57. package/core/dist/runtime/activation/prompt-budget-policy.js.map +1 -1
  58. package/core/dist/runtime/activation/recovery-control-surfaces.d.ts +1 -1
  59. package/core/dist/runtime/activation/recovery-control-surfaces.js +2 -2
  60. package/core/dist/runtime/activation/recovery-control-surfaces.js.map +1 -1
  61. package/core/dist/runtime/adapter/output-schema-registry.d.ts +1 -1
  62. package/core/dist/runtime/adapter/output-schema-registry.d.ts.map +1 -1
  63. package/core/dist/runtime/adapter/output-schema-registry.js +23 -18
  64. package/core/dist/runtime/adapter/output-schema-registry.js.map +1 -1
  65. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +1 -1
  66. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
  67. package/core/dist/runtime/adapter/schema-json-converter.d.ts +1 -1
  68. package/core/dist/runtime/adapter/schema-json-converter.js +1 -1
  69. package/core/dist/runtime/adapter/tools/diagnostician-tool.js +1 -1
  70. package/core/dist/runtime/adapter/tools/diagnostician-tool.js.map +1 -1
  71. package/core/dist/runtime/diagnostician-output.d.ts +2 -2
  72. package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
  73. package/core/dist/runtime/diagnostician-output.js +1 -1
  74. package/core/dist/runtime/diagnostician-output.js.map +1 -1
  75. package/core/dist/runtime/feature-flags/plugin-surface-registry.d.ts.map +1 -1
  76. package/core/dist/runtime/feature-flags/plugin-surface-registry.js +10 -0
  77. package/core/dist/runtime/feature-flags/plugin-surface-registry.js.map +1 -1
  78. package/core/dist/runtime/governance-experience-contract.d.ts +4 -4
  79. package/core/dist/runtime/governance-experience-contract.d.ts.map +1 -1
  80. package/core/dist/runtime/governance-experience-contract.js +3 -2
  81. package/core/dist/runtime/governance-experience-contract.js.map +1 -1
  82. package/core/dist/runtime/governance-experience.d.ts.map +1 -1
  83. package/core/dist/runtime/governance-experience.js +2 -1
  84. package/core/dist/runtime/governance-experience.js.map +1 -1
  85. package/core/dist/runtime/governance-projection-contract.d.ts +14 -14
  86. package/core/dist/runtime/governance-projection-contract.d.ts.map +1 -1
  87. package/core/dist/runtime/governance-projection-contract.js +4 -3
  88. package/core/dist/runtime/governance-projection-contract.js.map +1 -1
  89. package/core/dist/runtime/governance-projection.d.ts.map +1 -1
  90. package/core/dist/runtime/governance-projection.js +2 -1
  91. package/core/dist/runtime/governance-projection.js.map +1 -1
  92. package/core/dist/runtime/index.d.ts +2 -2
  93. package/core/dist/runtime/index.d.ts.map +1 -1
  94. package/core/dist/runtime/index.js +2 -3
  95. package/core/dist/runtime/index.js.map +1 -1
  96. package/core/dist/runtime/internalization/artificer-runner.d.ts +1 -1
  97. package/core/dist/runtime/internalization/artificer-runner.d.ts.map +1 -1
  98. package/core/dist/runtime/internalization/artificer-runner.js +3 -2
  99. package/core/dist/runtime/internalization/artificer-runner.js.map +1 -1
  100. package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
  101. package/core/dist/runtime/internalization/diag-distiller-runner.js +3 -2
  102. package/core/dist/runtime/internalization/diag-distiller-runner.js.map +1 -1
  103. package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
  104. package/core/dist/runtime/internalization/diag-rootcause-runner.js +3 -2
  105. package/core/dist/runtime/internalization/diag-rootcause-runner.js.map +1 -1
  106. package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
  107. package/core/dist/runtime/internalization/diag-router-runner.js +4 -3
  108. package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
  109. package/core/dist/runtime/internalization/dreamer-runner.d.ts.map +1 -1
  110. package/core/dist/runtime/internalization/dreamer-runner.js +3 -2
  111. package/core/dist/runtime/internalization/dreamer-runner.js.map +1 -1
  112. package/core/dist/runtime/internalization/evaluator-runner.d.ts.map +1 -1
  113. package/core/dist/runtime/internalization/evaluator-runner.js +3 -2
  114. package/core/dist/runtime/internalization/evaluator-runner.js.map +1 -1
  115. package/core/dist/runtime/internalization/philosopher-runner.d.ts +1 -1
  116. package/core/dist/runtime/internalization/philosopher-runner.d.ts.map +1 -1
  117. package/core/dist/runtime/internalization/philosopher-runner.js +3 -2
  118. package/core/dist/runtime/internalization/philosopher-runner.js.map +1 -1
  119. package/core/dist/runtime/internalization/rollout-reviewer-output.d.ts +1 -1
  120. package/core/dist/runtime/internalization/rollout-reviewer-output.js +1 -1
  121. package/core/dist/runtime/internalization/rollout-reviewer-output.js.map +1 -1
  122. package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
  123. package/core/dist/runtime/internalization/rollout-reviewer-runner.js +3 -2
  124. package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
  125. package/core/dist/runtime/internalization/router-context-evidence.d.ts +1 -1
  126. package/core/dist/runtime/internalization/router-context-evidence.d.ts.map +1 -1
  127. package/core/dist/runtime/internalization/router-context-evidence.js +4 -1
  128. package/core/dist/runtime/internalization/router-context-evidence.js.map +1 -1
  129. package/core/dist/runtime/internalization/scribe-runner.d.ts +1 -1
  130. package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
  131. package/core/dist/runtime/internalization/scribe-runner.js +3 -2
  132. package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
  133. package/core/dist/runtime/learning-lab/actor-action-output.d.ts +1 -1
  134. package/core/dist/runtime/learning-lab/actor-action-output.d.ts.map +1 -1
  135. package/core/dist/runtime/learning-lab/actor-action-output.js +1 -1
  136. package/core/dist/runtime/learning-lab/actor-action-output.js.map +1 -1
  137. package/core/dist/runtime/observer/correction-observer.d.ts.map +1 -1
  138. package/core/dist/runtime/observer/correction-observer.js +3 -2
  139. package/core/dist/runtime/observer/correction-observer.js.map +1 -1
  140. package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts +1 -1
  141. package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts.map +1 -1
  142. package/core/dist/runtime/owner-decision/owner-decision-view-contract.js +2 -1
  143. package/core/dist/runtime/owner-decision/owner-decision-view-contract.js.map +1 -1
  144. package/core/dist/runtime/owner-decision/owner-decision-view.d.ts +8 -8
  145. package/core/dist/runtime/owner-decision/owner-decision-view.d.ts.map +1 -1
  146. package/core/dist/runtime/owner-decision/owner-decision-view.js +10 -9
  147. package/core/dist/runtime/owner-decision/owner-decision-view.js.map +1 -1
  148. package/core/dist/runtime/principle-reuse/reuse-evaluation-output.d.ts +1 -1
  149. package/core/dist/runtime/principle-reuse/reuse-evaluation-output.d.ts.map +1 -1
  150. package/core/dist/runtime/principle-reuse/reuse-evaluation-output.js +1 -1
  151. package/core/dist/runtime/principle-reuse/reuse-evaluation-output.js.map +1 -1
  152. package/core/dist/runtime/principle-reuse/reuse-evaluation-runner.d.ts.map +1 -1
  153. package/core/dist/runtime/principle-reuse/reuse-evaluation-runner.js +5 -4
  154. package/core/dist/runtime/principle-reuse/reuse-evaluation-runner.js.map +1 -1
  155. package/core/dist/runtime/schema-version.d.ts +30 -14
  156. package/core/dist/runtime/schema-version.d.ts.map +1 -1
  157. package/core/dist/runtime/schema-version.js +33 -13
  158. package/core/dist/runtime/schema-version.js.map +1 -1
  159. package/core/package.json +1 -1
  160. package/dist/installers/workbuddy-host-installer.d.ts +32 -1
  161. package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
  162. package/dist/installers/workbuddy-host-installer.js +819 -47
  163. package/dist/installers/workbuddy-host-installer.js.map +1 -1
  164. package/dist/utils/config-file-io.d.ts +27 -1
  165. package/dist/utils/config-file-io.d.ts.map +1 -1
  166. package/dist/utils/config-file-io.js +78 -3
  167. package/dist/utils/config-file-io.js.map +1 -1
  168. package/host-runtime/dist/prompt-injection-budget-observation.js +10 -8
  169. package/host-runtime/dist/signal-classifier.d.ts +3 -1
  170. package/host-runtime/dist/signal-classifier.js +5 -3
  171. package/host-runtime/package.json +1 -1
  172. package/package.json +3 -3
  173. package/pd-cli/package.json +1 -1
  174. package/pd-mcp-server/dist/version.d.ts +1 -1
  175. package/pd-mcp-server/dist/version.js +1 -1
  176. package/pd-mcp-server/package.json +1 -1
  177. package/plugin/dist/bundle.js +441 -441
  178. package/plugin/dist/core/event-log.d.ts +5 -0
  179. package/plugin/dist/governance-audit.js +2 -2
  180. package/plugin/dist/openclaw.plugin.json +1 -1
  181. package/plugin/dist/rulehost-evidence.js +9 -9
  182. package/plugin/openclaw.plugin.json +1 -1
  183. package/plugin/package.json +1 -1
  184. package/release-manager/dist/installers/workbuddy-host-installer.js +819 -47
  185. package/release-manager/dist/utils/config-file-io.js +78 -3
  186. package/release-manager/package.json +1 -1
  187. package/workbuddy-adapter/package.json +1 -1
@@ -187,7 +187,7 @@ export class IntentPageModel {
187
187
  return {
188
188
  ok: false,
189
189
  reason: 'not_found',
190
- nextAction: `${getIntentFilename(lang)} does not exist. Create it first using POST /api/v1/intent/init.`,
190
+ nextAction: `${getIntentFilename(lang)} does not exist. Create it first using POST /api/intent/init.`,
191
191
  };
192
192
  }
193
193
  if ('oversized' in read) {
@@ -1,3 +1,4 @@
1
+ import { RUNTIME_CONTRACT_SCHEMA_VERSION } from '@principles/core/runtime';
1
2
  import type { OwnerDecisionViewCore } from '@principles/core/runtime';
2
3
  export interface OwnerDecisionInboxItem {
3
4
  principleId: string;
@@ -15,7 +16,7 @@ export interface OwnerDecisionInboxItem {
15
16
  nextAction: OwnerDecisionViewCore['nextAction'];
16
17
  }
17
18
  export interface OwnerDecisionInboxResponse {
18
- schemaVersion: '1';
19
+ schemaVersion: typeof RUNTIME_CONTRACT_SCHEMA_VERSION;
19
20
  generatedAt: string;
20
21
  totalPrinciples: number;
21
22
  groups: {
@@ -42,7 +43,7 @@ export declare class OwnerDecisionViewModel {
42
43
  getInbox(now?: string): Promise<OwnerDecisionInboxResponse>;
43
44
  /** Compact per-principle projection for the Library list (§11.2). */
44
45
  getLibraryCompact(now?: string): Promise<{
45
- schemaVersion: '1';
46
+ schemaVersion: typeof RUNTIME_CONTRACT_SCHEMA_VERSION;
46
47
  generatedAt: string;
47
48
  entries: Record<string, {
48
49
  decisionState: OwnerDecisionViewCore['decisionState'];
@@ -19,6 +19,7 @@
19
19
  /* eslint-disable @typescript-eslint/class-methods-use-this -- lifecycle-style methods; kept on the model for cohesion */
20
20
  import * as fs from 'node:fs';
21
21
  import * as path from 'node:path';
22
+ import { RUNTIME_CONTRACT_SCHEMA_VERSION } from '@principles/core/runtime';
22
23
  import { GovernanceProjectionCollector, isRecord, readOwnString, } from './GovernanceProjectionCollector.js';
23
24
  import { deriveOwnerDecisionView, } from '@principles/core/runtime';
24
25
  import { SqliteConnection } from '@principles/core/runtime';
@@ -44,7 +45,7 @@ export class OwnerDecisionViewModel {
44
45
  // No readable ledger: degrade observably instead of an empty success
45
46
  // (SPEC §15 — an unavailable ledger is not "zero principles, all fine").
46
47
  return {
47
- schemaVersion: '1', generatedAt: now, totalPrinciples: 0,
48
+ schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION, generatedAt: now, totalPrinciples: 0,
48
49
  groups: { decision: [], blocked: [], recovery: [] },
49
50
  historicalUnknown: { count: 0, reasonText: '' },
50
51
  degraded: { reason: 'principle ledger unavailable', nextAction: '检查原则账本文件。' },
@@ -53,7 +54,7 @@ export class OwnerDecisionViewModel {
53
54
  const principlesTree = GovernanceProjectionCollector.principleTreeFromLedger(ledgerParsed);
54
55
  if (principlesTree === null) {
55
56
  return {
56
- schemaVersion: '1', generatedAt: now, totalPrinciples: 0,
57
+ schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION, generatedAt: now, totalPrinciples: 0,
57
58
  groups: { decision: [], blocked: [], recovery: [] },
58
59
  historicalUnknown: { count: 0, reasonText: '' },
59
60
  degraded: { reason: 'principle ledger unavailable', nextAction: '检查原则账本文件。' },
@@ -105,7 +106,7 @@ export class OwnerDecisionViewModel {
105
106
  }
106
107
  }
107
108
  return {
108
- schemaVersion: '1',
109
+ schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION,
109
110
  generatedAt: now,
110
111
  totalPrinciples: total,
111
112
  groups: { decision, blocked, recovery },
@@ -125,11 +126,11 @@ export class OwnerDecisionViewModel {
125
126
  ledgerParsed = this.parseLedger();
126
127
  }
127
128
  catch {
128
- return { schemaVersion: '1', generatedAt: now, entries: {}, degraded: { reason: 'principle ledger unavailable' } };
129
+ return { schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION, generatedAt: now, entries: {}, degraded: { reason: 'principle ledger unavailable' } };
129
130
  }
130
131
  const principlesTree = GovernanceProjectionCollector.principleTreeFromLedger(ledgerParsed);
131
132
  if (principlesTree === null) {
132
- return { schemaVersion: '1', generatedAt: now, entries: {}, degraded: { reason: 'principle ledger unavailable' } };
133
+ return { schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION, generatedAt: now, entries: {}, degraded: { reason: 'principle ledger unavailable' } };
133
134
  }
134
135
  const entries = {};
135
136
  for (const principleId of Object.keys(principlesTree).sort()) {
@@ -146,7 +147,7 @@ export class OwnerDecisionViewModel {
146
147
  // Skip unreadable entries — the Library falls back to neutral copy.
147
148
  }
148
149
  }
149
- return { schemaVersion: '1', generatedAt: now, entries };
150
+ return { schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION, generatedAt: now, entries };
150
151
  }
151
152
  // ── input assembly ────────────────────────────────────────────────────────
152
153
  async collectInputs(principleId, now) {
@@ -274,7 +275,7 @@ export class OwnerDecisionViewModel {
274
275
  scope: 'principle entry',
275
276
  });
276
277
  return {
277
- schemaVersion: '1',
278
+ schemaVersion: RUNTIME_CONTRACT_SCHEMA_VERSION,
278
279
  principleId,
279
280
  asOf: now,
280
281
  ledger: {
@@ -92,11 +92,11 @@ async function readJson(req) {
92
92
  // ── Route handler ────────────────────────────────────────────────────────────
93
93
  /* eslint-disable @typescript-eslint/max-params */
94
94
  export async function handleActivationsRoute(req, res, workspaceDir, subPath, authority) {
95
- // GET /api/v1/activations
95
+ // GET /api/activations
96
96
  if (req.method === 'GET' && (subPath === '' || subPath === '/')) {
97
97
  // PD_PROMPT_CAPACITY_V1 R-A1: request-level target host for the
98
98
  // per-activation injection statuses (route-unconfirmed rows otherwise).
99
- const url = new URL(req.url ?? '/api/v1/activations', 'http://localhost');
99
+ const url = new URL(req.url ?? '/api/activations', 'http://localhost');
100
100
  let targetHost;
101
101
  const rawHost = url.searchParams.get('host');
102
102
  if (rawHost !== null) {
@@ -260,7 +260,7 @@ export async function handleActivationsRoute(req, res, workspaceDir, subPath, au
260
260
  }
261
261
  return;
262
262
  }
263
- // POST /api/v1/activations/:id/propose-revision
263
+ // POST /api/activations/:id/propose-revision
264
264
  // PD_PROMPT_CAPACITY_V1 R-B3: Owner-initiated "modify to injectable version"
265
265
  // on a live prompt activation — new validated artifact version + a NORMAL
266
266
  // pending approval (the atomic replacement happens on approve).
@@ -329,7 +329,7 @@ export async function handleActivationsRoute(req, res, workspaceDir, subPath, au
329
329
  }
330
330
  return;
331
331
  }
332
- // POST /api/v1/activations/:id/disable
332
+ // POST /api/activations/:id/disable
333
333
  const disableExec = /^\/([^/]+)\/disable$/.exec(subPath);
334
334
  if (req.method === 'POST' && disableExec) {
335
335
  const [, rawId] = disableExec;
@@ -389,7 +389,7 @@ export async function handleActivationsRoute(req, res, workspaceDir, subPath, au
389
389
  }
390
390
  return;
391
391
  }
392
- sendNotFound(res, `Route /api/v1/activations${subPath} not found`);
392
+ sendNotFound(res, `Route /api/activations${subPath} not found`);
393
393
  }
394
394
  export function disposeActivationsModels() {
395
395
  for (const model of models.values()) {
@@ -12,7 +12,7 @@ function getModel(workspaceDir) {
12
12
  }
13
13
  export async function handleApprovalsGroupedRoute(req, res, workspaceDir) {
14
14
  if (req.method !== 'GET') {
15
- sendNotFound(res, 'Route /api/v1/approvals/grouped not found');
15
+ sendNotFound(res, 'Route /api/approvals/grouped not found');
16
16
  return;
17
17
  }
18
18
  // PD_PROMPT_CAPACITY_V1 R-A1: request-level target host for the capacity
@@ -20,7 +20,7 @@ export async function handleApprovalsGroupedRoute(req, res, workspaceDir) {
20
20
  // applicable hosts would take different routes. No new persisted config.
21
21
  // The roster is the host-runtime one (openclaw|codex|workbuddy) — the
22
22
  // focus page offers all three, so the API must accept all three.
23
- const url = new URL(req.url ?? '/api/v1/approvals/grouped', 'http://localhost');
23
+ const url = new URL(req.url ?? '/api/approvals/grouped', 'http://localhost');
24
24
  let targetHost;
25
25
  const rawHost = url.searchParams.get('host');
26
26
  if (rawHost !== null) {
@@ -39,7 +39,7 @@ function parseJsonBody(body, res) {
39
39
  /* eslint-disable @typescript-eslint/max-params */
40
40
  export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
41
41
  const model = getModel(workspaceDir);
42
- // GET /api/v1/approvals - list all approvals (MVP proven channels only)
42
+ // GET /api/approvals - list all approvals (MVP proven channels only)
43
43
  if (req.method === 'GET' && (subPath === '' || subPath === '/')) {
44
44
  try {
45
45
  const query = parseQuery(req.url ?? '');
@@ -71,7 +71,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
71
71
  }
72
72
  return;
73
73
  }
74
- // GET /api/v1/approvals/:id - detail
74
+ // GET /api/approvals/:id - detail
75
75
  const detailMatch = /^[/]([^/]+)$/.exec(subPath);
76
76
  if (req.method === 'GET' && detailMatch) {
77
77
  const [, rawId] = detailMatch;
@@ -100,7 +100,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
100
100
  }
101
101
  return;
102
102
  }
103
- // POST /api/v1/approvals/:id/approve
103
+ // POST /api/approvals/:id/approve
104
104
  const approveMatch = /^[/]([^/]+)[/]approve$/.exec(subPath);
105
105
  if (req.method === 'POST' && approveMatch) {
106
106
  const [, rawId] = approveMatch;
@@ -209,7 +209,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
209
209
  }
210
210
  return;
211
211
  }
212
- // POST /api/v1/approvals/:id/reject
212
+ // POST /api/approvals/:id/reject
213
213
  const rejectMatch = /^[/]([^/]+)[/]reject$/.exec(subPath);
214
214
  if (req.method === 'POST' && rejectMatch) {
215
215
  const [, rawId] = rejectMatch;
@@ -272,7 +272,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
272
272
  }
273
273
  return;
274
274
  }
275
- // POST /api/v1/approvals/:id/reopen — reset a terminal approval back to
275
+ // POST /api/approvals/:id/reopen — reset a terminal approval back to
276
276
  // pending so the Owner can decide again (EP002-R4 follow-up: the clean
277
277
  // re-activation path for a deliberately deactivated intervention — reopen,
278
278
  // then a fresh Console approve re-dispatches through the verified chain).
@@ -312,7 +312,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
312
312
  }
313
313
  return;
314
314
  }
315
- // POST /api/v1/approvals/:id/edit — edit a pending approval's artifact (P1 #2 fix)
315
+ // POST /api/approvals/:id/edit — edit a pending approval's artifact (P1 #2 fix)
316
316
  const editMatch = /^[/]([^/]+)[/]edit$/.exec(subPath);
317
317
  if (req.method === 'POST' && editMatch) {
318
318
  const [, rawId] = editMatch;
@@ -388,7 +388,7 @@ export async function handleApprovalsRoute(req, res, workspaceDir, subPath) {
388
388
  }
389
389
  return;
390
390
  }
391
- sendNotFound(res, 'Route /api/v1/approvals' + subPath + ' not found');
391
+ sendNotFound(res, 'Route /api/approvals' + subPath + ' not found');
392
392
  }
393
393
  export function disposeApprovalsModels() {
394
394
  for (const model of models.values()) {
@@ -2,10 +2,10 @@
2
2
  * Config API Routes — PRI-309
3
3
  *
4
4
  * Console backend APIs for the Control Center:
5
- * - GET /api/v1/config/summary — redacted config summary
6
- * - GET /api/v1/config/catalog — available runtime/model catalog
7
- * - PATCH /api/v1/config/agents/:name/binding — update agent runtime binding
8
- * - GET /api/v1/config/readiness/:name — readiness test for agent
5
+ * - GET /api/config/summary — redacted config summary
6
+ * - GET /api/config/catalog — available runtime/model catalog
7
+ * - PATCH /api/config/agents/:name/binding — update agent runtime binding
8
+ * - GET /api/config/readiness/:name — readiness test for agent
9
9
  *
10
10
  * Security:
11
11
  * - Never returns raw provider objects, tokens, API keys, or env values
@@ -2,10 +2,10 @@
2
2
  * Config API Routes — PRI-309
3
3
  *
4
4
  * Console backend APIs for the Control Center:
5
- * - GET /api/v1/config/summary — redacted config summary
6
- * - GET /api/v1/config/catalog — available runtime/model catalog
7
- * - PATCH /api/v1/config/agents/:name/binding — update agent runtime binding
8
- * - GET /api/v1/config/readiness/:name — readiness test for agent
5
+ * - GET /api/config/summary — redacted config summary
6
+ * - GET /api/config/catalog — available runtime/model catalog
7
+ * - PATCH /api/config/agents/:name/binding — update agent runtime binding
8
+ * - GET /api/config/readiness/:name — readiness test for agent
9
9
  *
10
10
  * Security:
11
11
  * - Never returns raw provider objects, tokens, API keys, or env values
@@ -358,5 +358,5 @@ export async function handleConfigRoute(req, res, ctx) {
358
358
  return;
359
359
  }
360
360
  // 404 fallback
361
- sendNotFound(res, `Route /api/v1/config${subPath} not found`);
361
+ sendNotFound(res, `Route /api/config${subPath} not found`);
362
362
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Evidence Chain API — exposes behavior evidence chain records for the Pain page.
3
3
  *
4
- * GET /api/v1/evidence-chain
4
+ * GET /api/evidence-chain
5
5
  * Returns evidence chain records from pain_events, tasks, candidates, and ledger.
6
6
  */
7
7
  import type { IncomingMessage, ServerResponse } from 'node:http';
@@ -1,7 +1,7 @@
1
1
  /**
2
- * PD v2 Phase 1 — /api/v1/evidence/outcomes 路由(ADR-0027 §2.3, SPEC §13.4)。
2
+ * PD v2 Phase 1 — /api/evidence/outcomes 路由(ADR-0027 §2.3, SPEC §13.4)。
3
3
  *
4
- * POST /api/v1/evidence/outcomes — Owner 结果反馈入账
4
+ * POST /api/evidence/outcomes — Owner 结果反馈入账
5
5
  *
6
6
  * 最小获授权事实入口:Owner 可以对一个已存在的 Behavior Episode 提交
7
7
  * 明确的结果观察/反馈。安全模型(复用 owner-decisions 的模式):
@@ -9,19 +9,19 @@
9
9
  *
10
10
  * Surface:
11
11
  * v0.9 (offline-first, semantics unchanged):
12
- * GET /api/v1/examiner/overview
13
- * GET /api/v1/examiner/principles
14
- * POST /api/v1/examiner/studies (v0.10.1: + suiteKey)
15
- * GET /api/v1/examiner/studies/:studyId
16
- * POST /api/v1/examiner/studies/:studyId/preflight
17
- * POST /api/v1/examiner/studies/:studyId/run (offline-stub, synchronous)
18
- * GET /api/v1/examiner/studies/:studyId/report
19
- * POST /api/v1/examiner/studies/:studyId/report
12
+ * GET /api/examiner/overview
13
+ * GET /api/examiner/principles
14
+ * POST /api/examiner/studies (v0.10.1: + suiteKey)
15
+ * GET /api/examiner/studies/:studyId
16
+ * POST /api/examiner/studies/:studyId/preflight
17
+ * POST /api/examiner/studies/:studyId/run (offline-stub, synchronous)
18
+ * GET /api/examiner/studies/:studyId/report
19
+ * POST /api/examiner/studies/:studyId/report
20
20
  * v0.10.1:
21
- * GET /api/v1/examiner/principles/:id/evidence — production evidence aggregate
22
- * GET /api/v1/examiner/suites — challenge-suite catalog
23
- * GET /api/v1/examiner/hosts/openclaw/readiness — host readiness projection
24
- * POST /api/v1/examiner/studies/:studyId/run — modes 'host-dry-run' /
21
+ * GET /api/examiner/principles/:id/evidence — production evidence aggregate
22
+ * GET /api/examiner/suites — challenge-suite catalog
23
+ * GET /api/examiner/hosts/openclaw/readiness — host readiness projection
24
+ * POST /api/examiner/studies/:studyId/run — modes 'host-dry-run' /
25
25
  * 'f2-real-host' follow the §12.3 async contract: 202 + runId, state
26
26
  * derived from the study ledger, one live run per study, restart
27
27
  * recovery, RESULT_UNKNOWN never auto-retried, f2 gated on an APPROVED
@@ -541,8 +541,8 @@ export async function handleExaminerRoute(req, res, workspaceDir, subPath) {
541
541
  }
542
542
  return;
543
543
  }
544
- sendNotFound(res, `Route /api/v1/examiner/studies/:studyId${rest} not found`);
544
+ sendNotFound(res, `Route /api/examiner/studies/:studyId${rest} not found`);
545
545
  return;
546
546
  }
547
- sendNotFound(res, `Route /api/v1/examiner${subPath} not found`);
547
+ sendNotFound(res, `Route /api/examiner${subPath} not found`);
548
548
  }
@@ -20,12 +20,12 @@ export type FailedTasksContext = {
20
20
  sqliteTaskStore?: SqliteTaskStore;
21
21
  };
22
22
  /**
23
- * Handle requests to `/api/v1/failed-tasks*`.
23
+ * Handle requests to `/api/failed-tasks*`.
24
24
  *
25
25
  * Routes:
26
- * GET /api/v1/failed-tasks — list failed/needs_human_review tasks
27
- * GET /api/v1/failed-tasks/:id — fetch single task detail (task + runs + lastError)
28
- * POST /api/v1/failed-tasks/:id/recover — Owner recovery (failed | needs_human_review → pending)
26
+ * GET /api/failed-tasks — list failed/needs_human_review tasks
27
+ * GET /api/failed-tasks/:id — fetch single task detail (task + runs + lastError)
28
+ * POST /api/failed-tasks/:id/recover — Owner recovery (failed | needs_human_review → pending)
29
29
  * other methods — 405 Method Not Allowed
30
30
  *
31
31
  * Feature flag gates (checked before any DB access so a disabled flag
@@ -1,11 +1,11 @@
1
1
  // failed-tasks.ts
2
- // Server route for /api/v1/failed-tasks/*
2
+ // Server route for /api/failed-tasks/*
3
3
  //
4
4
  // Lists tasks in 'failed' or 'needs_human_review' status and fetches single-task
5
5
  // detail (task record + run history + last error category). Gated by the
6
6
  // failed_tasks_observability feature flag.
7
7
  //
8
- // Governance Recovery Actions v1: POST /api/v1/failed-tasks/:id/recover lets the
8
+ // Governance Recovery Actions v1: POST /api/failed-tasks/:id/recover lets the
9
9
  // Owner recover a task from the Console. failed → pending reuses
10
10
  // RecoverySweepService.recoverFailedTask; needs_human_review → pending reuses
11
11
  // the extracted owner-retry sequence (ownerRetryNeedsHumanReviewTask — the same
@@ -366,12 +366,12 @@ async function dispatchRecovery(workspaceDir, taskId, force) {
366
366
  }
367
367
  }
368
368
  /**
369
- * Handle requests to `/api/v1/failed-tasks*`.
369
+ * Handle requests to `/api/failed-tasks*`.
370
370
  *
371
371
  * Routes:
372
- * GET /api/v1/failed-tasks — list failed/needs_human_review tasks
373
- * GET /api/v1/failed-tasks/:id — fetch single task detail (task + runs + lastError)
374
- * POST /api/v1/failed-tasks/:id/recover — Owner recovery (failed | needs_human_review → pending)
372
+ * GET /api/failed-tasks — list failed/needs_human_review tasks
373
+ * GET /api/failed-tasks/:id — fetch single task detail (task + runs + lastError)
374
+ * POST /api/failed-tasks/:id/recover — Owner recovery (failed | needs_human_review → pending)
375
375
  * other methods — 405 Method Not Allowed
376
376
  *
377
377
  * Feature flag gates (checked before any DB access so a disabled flag
@@ -392,7 +392,7 @@ export async function handleFailedTasksRoute(req, res, ctx) {
392
392
  return;
393
393
  }
394
394
  }
395
- // Collection: GET /api/v1/failed-tasks
395
+ // Collection: GET /api/failed-tasks
396
396
  if (subPath === '' || subPath === '/') {
397
397
  if (method !== 'GET') {
398
398
  sendMethodNotAllowed(res);
@@ -489,7 +489,7 @@ export async function handleFailedTasksRoute(req, res, ctx) {
489
489
  }
490
490
  return;
491
491
  }
492
- // Recovery: POST /api/v1/failed-tasks/:id/recover (Governance Recovery
492
+ // Recovery: POST /api/failed-tasks/:id/recover (Governance Recovery
493
493
  // Actions v1). Checked before the generic /:id detail branch.
494
494
  // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec -- String#match is semantically identical for a non-global regex; the repo's security write-gate false-positives on `<expr>.exec(userInput)` as command injection, so RegExp#exec is not writable here.
495
495
  const recoverMatch = subPath.match(/^\/([^/]+)\/recover$/);
@@ -569,7 +569,7 @@ export async function handleFailedTasksRoute(req, res, ctx) {
569
569
  }
570
570
  return;
571
571
  }
572
- // Detail: GET /api/v1/failed-tasks/:id
572
+ // Detail: GET /api/failed-tasks/:id
573
573
  const decodedId = decodeTaskIdSegment(subPath.replace(/^\//, ''));
574
574
  if (!decodedId.ok) {
575
575
  sendError(res, 400, 'invalid_encoding', 'task id path segment is not valid percent-encoding');
@@ -577,7 +577,7 @@ export async function handleFailedTasksRoute(req, res, ctx) {
577
577
  }
578
578
  const id = decodedId.value;
579
579
  if (id.length === 0) {
580
- sendNotFound(res, `Route /api/v1/failed-tasks${subPath} not found`);
580
+ sendNotFound(res, `Route /api/failed-tasks${subPath} not found`);
581
581
  return;
582
582
  }
583
583
  if (method !== 'GET') {
@@ -17,7 +17,7 @@ export declare function resolveOwnerConfigSnapshot(authConfig: {
17
17
  isEnabled(): boolean;
18
18
  }, identity: OwnerIdentityResolved): OwnerConfigSnapshot;
19
19
  /**
20
- * GET /api/v1/governance/experience — read-only Governance Experience Snapshot
20
+ * GET /api/governance/experience — read-only Governance Experience Snapshot
21
21
  * v1.5.1 (PRI-585).
22
22
  *
23
23
  * Flag contract (SPEC §14.1): with `governance_experience_v1` disabled the
@@ -38,7 +38,7 @@ export function resolveOwnerConfigSnapshot(authConfig, identity) {
38
38
  };
39
39
  }
40
40
  /**
41
- * GET /api/v1/governance/experience — read-only Governance Experience Snapshot
41
+ * GET /api/governance/experience — read-only Governance Experience Snapshot
42
42
  * v1.5.1 (PRI-585).
43
43
  *
44
44
  * Flag contract (SPEC §14.1): with `governance_experience_v1` disabled the
@@ -47,7 +47,7 @@ export function resolveOwnerConfigSnapshot(authConfig, identity) {
47
47
  */
48
48
  export async function handleGovernanceExperienceRoute(req, res, ctx) {
49
49
  if (req.method !== 'GET') {
50
- sendError(res, 405, 'method_not_allowed', 'Use GET for /api/v1/governance/experience.', { nextAction: 'Retry with GET.' });
50
+ sendError(res, 405, 'method_not_allowed', 'Use GET for /api/governance/experience.', { nextAction: 'Retry with GET.' });
51
51
  return;
52
52
  }
53
53
  // Gate first — flag-off must not touch the database, ledger, or config files.
@@ -66,7 +66,7 @@ export async function handleGovernanceExperienceRoute(req, res, ctx) {
66
66
  }
67
67
  export async function handleGovernanceRoute(req, res, workspaceDir) {
68
68
  if (req.method !== 'GET') {
69
- sendNotFound(res, 'Route /api/v1/governance/queue not found');
69
+ sendNotFound(res, 'Route /api/governance/queue not found');
70
70
  return;
71
71
  }
72
72
  const model = getModel(workspaceDir);
@@ -2,12 +2,12 @@
2
2
  * IntentDecisions route — HTTP surface for IntentDecisionRecord (PRI-470, SPEC §21.7).
3
3
  *
4
4
  * Endpoints (all gated by the `intent_engineering` feature flag):
5
- * - POST /api/v1/intent-decisions → create (201) or idempotent replay (200)
6
- * - GET /api/v1/intent-decisions?painId=… → list by painId
7
- * - GET /api/v1/intent-decisions?taskId=… → list by taskId
8
- * - GET /api/v1/intent-decisions/summary → tallied summary (MUST precede /:id)
9
- * - GET /api/v1/intent-decisions/:id → single record
10
- * - POST /api/v1/intent-decisions/:id/follow-up → dispatch governed follow-up (PRI-471)
5
+ * - POST /api/intent-decisions → create (201) or idempotent replay (200)
6
+ * - GET /api/intent-decisions?painId=… → list by painId
7
+ * - GET /api/intent-decisions?taskId=… → list by taskId
8
+ * - GET /api/intent-decisions/summary → tallied summary (MUST precede /:id)
9
+ * - GET /api/intent-decisions/:id → single record
10
+ * - POST /api/intent-decisions/:id/follow-up → dispatch governed follow-up (PRI-471)
11
11
  *
12
12
  * PRI-471 follow-up types (SPEC §22.1.4):
13
13
  * - link_candidate — record which existing principle candidate the Owner
@@ -2,12 +2,12 @@
2
2
  * IntentDecisions route — HTTP surface for IntentDecisionRecord (PRI-470, SPEC §21.7).
3
3
  *
4
4
  * Endpoints (all gated by the `intent_engineering` feature flag):
5
- * - POST /api/v1/intent-decisions → create (201) or idempotent replay (200)
6
- * - GET /api/v1/intent-decisions?painId=… → list by painId
7
- * - GET /api/v1/intent-decisions?taskId=… → list by taskId
8
- * - GET /api/v1/intent-decisions/summary → tallied summary (MUST precede /:id)
9
- * - GET /api/v1/intent-decisions/:id → single record
10
- * - POST /api/v1/intent-decisions/:id/follow-up → dispatch governed follow-up (PRI-471)
5
+ * - POST /api/intent-decisions → create (201) or idempotent replay (200)
6
+ * - GET /api/intent-decisions?painId=… → list by painId
7
+ * - GET /api/intent-decisions?taskId=… → list by taskId
8
+ * - GET /api/intent-decisions/summary → tallied summary (MUST precede /:id)
9
+ * - GET /api/intent-decisions/:id → single record
10
+ * - POST /api/intent-decisions/:id/follow-up → dispatch governed follow-up (PRI-471)
11
11
  *
12
12
  * PRI-471 follow-up types (SPEC §22.1.4):
13
13
  * - link_candidate — record which existing principle candidate the Owner
@@ -190,7 +190,7 @@ const FOLLOW_UP_TYPES = new Set([
190
190
  'generate_patch_proposal',
191
191
  ]);
192
192
  /**
193
- * Validate the body of POST /api/v1/intent-decisions/:id/follow-up.
193
+ * Validate the body of POST /api/intent-decisions/:id/follow-up.
194
194
  *
195
195
  * Body shape: `{ type: 'link_candidate' | 'guide_rulehost' | 'generate_patch_proposal', candidateId?: string }`
196
196
  *
@@ -260,7 +260,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
260
260
  if (!checkFlag(workspaceDir, res))
261
261
  return;
262
262
  const model = getModel(workspaceDir);
263
- // POST /api/v1/intent-decisions — create / idempotent replay
263
+ // POST /api/intent-decisions — create / idempotent replay
264
264
  if (req.method === 'POST' && (subPath === '' || subPath === '/')) {
265
265
  try {
266
266
  const body = await readBody(req);
@@ -299,7 +299,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
299
299
  }
300
300
  return;
301
301
  }
302
- // GET /api/v1/intent-decisions — list by painId OR taskId (exactly one required)
302
+ // GET /api/intent-decisions — list by painId OR taskId (exactly one required)
303
303
  if (req.method === 'GET' && (subPath === '' || subPath === '/')) {
304
304
  try {
305
305
  const query = parseQuery(req.url ?? '');
@@ -337,7 +337,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
337
337
  }
338
338
  return;
339
339
  }
340
- // GET /api/v1/intent-decisions/summary — MUST be matched before /:id
340
+ // GET /api/intent-decisions/summary — MUST be matched before /:id
341
341
  if (req.method === 'GET' && subPath === '/summary') {
342
342
  try {
343
343
  const summary = await model.getSummary();
@@ -348,7 +348,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
348
348
  }
349
349
  return;
350
350
  }
351
- // GET /api/v1/intent-decisions/:id — single record
351
+ // GET /api/intent-decisions/:id — single record
352
352
  const detailMatch = /^[/]([^/]+)$/.exec(subPath);
353
353
  if (req.method === 'GET' && detailMatch) {
354
354
  const [, rawId] = detailMatch;
@@ -377,7 +377,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
377
377
  }
378
378
  return;
379
379
  }
380
- // POST /api/v1/intent-decisions/:id/follow-up — PRI-471 governed follow-up
380
+ // POST /api/intent-decisions/:id/follow-up — PRI-471 governed follow-up
381
381
  // (SPEC §22.1.4). MUST be matched before the catch-all 404 below.
382
382
  const followUpMatch = /^[/]([^/]+)[/]follow-up$/.exec(subPath);
383
383
  if (req.method === 'POST' && followUpMatch) {
@@ -486,7 +486,7 @@ export async function handleIntentDecisionsRoute(req, res, workspaceDir, subPath
486
486
  }
487
487
  return;
488
488
  }
489
- sendNotFound(res, 'Route /api/v1/intent-decisions' + subPath + ' not found');
489
+ sendNotFound(res, 'Route /api/intent-decisions' + subPath + ' not found');
490
490
  }
491
491
  /**
492
492
  * Dispose hook for graceful shutdown — clears the per-workspace model cache.
@@ -36,7 +36,7 @@ export async function handleIntentRoute(req, res, ctx) {
36
36
  const { workspaceDir, subPath } = ctx;
37
37
  const lang = parseLang(req);
38
38
  try {
39
- // ── GET /api/v1/intent — read Intent summary ──────────────────────────
39
+ // ── GET /api/intent — read Intent summary ──────────────────────────
40
40
  if (req.method === 'GET' && subPath === '') {
41
41
  const flagEnabled = loadFlagEnabled(workspaceDir);
42
42
  const model = getModel(workspaceDir);
@@ -44,7 +44,7 @@ export async function handleIntentRoute(req, res, ctx) {
44
44
  sendSuccess(res, summary);
45
45
  return;
46
46
  }
47
- // ── GET /api/v1/intent/content — read raw INTENT.md for editing ─────────
47
+ // ── GET /api/intent/content — read raw INTENT.md for editing ─────────
48
48
  if (req.method === 'GET' && subPath === '/content') {
49
49
  const flagEnabled = loadFlagEnabled(workspaceDir);
50
50
  if (!flagEnabled) {
@@ -77,7 +77,7 @@ export async function handleIntentRoute(req, res, ctx) {
77
77
  sendSuccess(res, { content: result.content, path: result.path });
78
78
  return;
79
79
  }
80
- // ── GET /api/v1/intent/versions — list version history ────────────────
80
+ // ── GET /api/intent/versions — list version history ────────────────
81
81
  if (req.method === 'GET' && subPath === '/versions') {
82
82
  const model = getModel(workspaceDir);
83
83
  const result = await model.getVersions(lang);
@@ -88,7 +88,7 @@ export async function handleIntentRoute(req, res, ctx) {
88
88
  sendSuccess(res, { versions: result.versions });
89
89
  return;
90
90
  }
91
- // ── POST /api/v1/intent/init — create INTENT.md template ──────────────
91
+ // ── POST /api/intent/init — create INTENT.md template ──────────────
92
92
  if (req.method === 'POST' && subPath === '/init') {
93
93
  const flagEnabled = loadFlagEnabled(workspaceDir);
94
94
  if (!flagEnabled) {
@@ -145,7 +145,7 @@ export async function handleIntentRoute(req, res, ctx) {
145
145
  }
146
146
  return;
147
147
  }
148
- // ── PUT /api/v1/intent/content — save INTENT.md content ───────────────
148
+ // ── PUT /api/intent/content — save INTENT.md content ───────────────
149
149
  if (req.method === 'PUT' && subPath === '/content') {
150
150
  const flagEnabled = loadFlagEnabled(workspaceDir);
151
151
  if (!flagEnabled) {
@@ -211,7 +211,7 @@ export async function handleIntentRoute(req, res, ctx) {
211
211
  return;
212
212
  }
213
213
  // ── Unknown sub-path ──────────────────────────────────────────────────
214
- sendError(res, 404, 'not_found', `Route /api/v1/intent${subPath} not found`);
214
+ sendError(res, 404, 'not_found', `Route /api/intent${subPath} not found`);
215
215
  }
216
216
  catch (err) {
217
217
  sendError(res, 500, 'intent_route_error', err instanceof Error ? err.message : 'Unknown error');
@@ -12,10 +12,10 @@ function getModel(workspaceDir) {
12
12
  /* eslint-disable @typescript-eslint/max-params */
13
13
  export async function handleLifecycleRoute(req, res, workspaceDir, subPath) {
14
14
  if (req.method !== 'GET') {
15
- sendNotFound(res, `Route /api/v1/lifecycle${subPath} not found`);
15
+ sendNotFound(res, `Route /api/lifecycle${subPath} not found`);
16
16
  return;
17
17
  }
18
- // GET /api/v1/lifecycle/principles/:principleId
18
+ // GET /api/lifecycle/principles/:principleId
19
19
  const principleMatch = /^[/]principles[/]([^/]+)$/.exec(subPath);
20
20
  if (principleMatch) {
21
21
  const [, rawId] = principleMatch;
@@ -64,7 +64,7 @@ export async function handleLifecycleRoute(req, res, workspaceDir, subPath) {
64
64
  }
65
65
  return;
66
66
  }
67
- sendNotFound(res, `Route /api/v1/lifecycle${subPath} not found`);
67
+ sendNotFound(res, `Route /api/lifecycle${subPath} not found`);
68
68
  }
69
69
  export function disposeLifecycleModels() {
70
70
  models.clear();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Onboarding route - POST /api/v1/onboarding/run-demo
2
+ * Onboarding route - POST /api/onboarding/run-demo
3
3
  *
4
4
  * Spec: docs/superpowers/specs/2026-06-30-new-user-onboarding-design.md 6.3 change 5
5
5
  *