@lucern/pack-host 1.0.0 → 1.0.2

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 (62) hide show
  1. package/dist/domain-pack/authoring.core.d.ts +161 -0
  2. package/dist/domain-pack/authoring.core.js +411 -0
  3. package/dist/domain-pack/authoring.core.js.map +1 -0
  4. package/dist/domain-pack/authoring.d.ts +12 -170
  5. package/dist/domain-pack/authoring.js +1155 -1098
  6. package/dist/domain-pack/authoring.js.map +1 -1
  7. package/dist/domain-pack/authoring.validation.d.ts +28 -0
  8. package/dist/domain-pack/authoring.validation.js +1944 -0
  9. package/dist/domain-pack/authoring.validation.js.map +1 -0
  10. package/dist/domain-pack/index.d.ts +2 -1
  11. package/dist/domain-pack/index.js +1979 -1917
  12. package/dist/domain-pack/index.js.map +1 -1
  13. package/dist/domain-pack/packs/engineering-accelerator-tail.d.ts +256 -0
  14. package/dist/domain-pack/packs/engineering-accelerator-tail.js +716 -0
  15. package/dist/domain-pack/packs/engineering-accelerator-tail.js.map +1 -0
  16. package/dist/domain-pack/packs/engineering-accelerator.js +790 -785
  17. package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -1
  18. package/dist/domain-pack/packs/index.js +790 -785
  19. package/dist/domain-pack/packs/index.js.map +1 -1
  20. package/dist/domain-pack.d.ts +2 -1
  21. package/dist/domain-pack.js +1979 -1917
  22. package/dist/domain-pack.js.map +1 -1
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +1843 -1661
  25. package/dist/index.js.map +1 -1
  26. package/dist/manifests/chat-v1.js +17 -6
  27. package/dist/manifests/chat-v1.js.map +1 -1
  28. package/dist/manifests/deals-v1.js +10 -7
  29. package/dist/manifests/deals-v1.js.map +1 -1
  30. package/dist/manifests/decisions-v1.js +11 -4
  31. package/dist/manifests/decisions-v1.js.map +1 -1
  32. package/dist/manifests/documents-v1.js +12 -12
  33. package/dist/manifests/documents-v1.js.map +1 -1
  34. package/dist/manifests/epistemic-algorithms-v1.js +11 -6
  35. package/dist/manifests/epistemic-algorithms-v1.js.map +1 -1
  36. package/dist/manifests/graph-visualization-v1.js +9 -5
  37. package/dist/manifests/graph-visualization-v1.js.map +1 -1
  38. package/dist/manifests/index.d.ts +1 -0
  39. package/dist/manifests/index.js +230 -110
  40. package/dist/manifests/index.js.map +1 -1
  41. package/dist/manifests/news-v1.js +12 -13
  42. package/dist/manifests/news-v1.js.map +1 -1
  43. package/dist/manifests/philosophy-mode-v1.js +10 -12
  44. package/dist/manifests/philosophy-mode-v1.js.map +1 -1
  45. package/dist/manifests/sprints-v1.d.ts +10 -0
  46. package/dist/manifests/sprints-v1.js +106 -0
  47. package/dist/manifests/sprints-v1.js.map +1 -0
  48. package/dist/manifests/task-management-v1.js +18 -6
  49. package/dist/manifests/task-management-v1.js.map +1 -1
  50. package/dist/manifests/team-analysis-v1.js +12 -9
  51. package/dist/manifests/team-analysis-v1.js.map +1 -1
  52. package/dist/manifests/themes-v1.js +12 -16
  53. package/dist/manifests/themes-v1.js.map +1 -1
  54. package/dist/manifests/user-profiles-v1.js +9 -13
  55. package/dist/manifests/user-profiles-v1.js.map +1 -1
  56. package/dist/manifests.d.ts +1 -0
  57. package/dist/manifests.js +230 -110
  58. package/dist/manifests.js.map +1 -1
  59. package/dist/proof-attestation.json +1 -1
  60. package/dist/registry.js +229 -109
  61. package/dist/registry.js.map +1 -1
  62. package/package.json +1 -1
@@ -44,12 +44,18 @@ var chatV1Manifest = defineAppPackManifest({
44
44
  },
45
45
  surfaces: {
46
46
  components: [
47
- "components/chat/*",
48
- "components/chat/sidebars/*",
49
- "components/chat/viewers/*"
47
+ "apps/web/components/lucern/dev/chat-debug-panel.tsx",
48
+ "apps/web/app/lucern/packs/_components/pack-try-it-panel.tsx"
50
49
  ],
51
- convex: ["convex/chats.ts", "convex/messages.ts", "convex/chatState.ts"],
52
- tools: ["lib/ai/tools/project-tools.ts"]
50
+ convex: [
51
+ "packages/reasoning-kernel/src/adapters/events.ts",
52
+ "services/master-control/convex/tools.ts",
53
+ "services/master-control/convex/toolAccess.ts"
54
+ ],
55
+ tools: [
56
+ "packages/mcp/src/handlers/functionSurface.ts",
57
+ "packages/server-core/src/mcp-context-tools.ts"
58
+ ]
53
59
  },
54
60
  policyProfile: {
55
61
  audiences: ["internal", "lp", "public"],
@@ -66,7 +72,12 @@ var chatV1Manifest = defineAppPackManifest({
66
72
  dataContract: {
67
73
  requiredNodeTypes: ["belief", "question", "evidence", "theme", "deal"],
68
74
  requiredEdgeTypes: ["informs", "answers", "belongs_to"],
69
- requiredTables: ["chats", "messages", "chatState", "projects"],
75
+ requiredTables: [
76
+ "agentMessages",
77
+ "platformAgentRuns",
78
+ "platformAgentRunToolCalls",
79
+ "epistemicNodes"
80
+ ],
70
81
  projectionBehavior: "inherits_policy"
71
82
  },
72
83
  templates: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/chat-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,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Y,SAAS,CAAC,MAAA,EAAQ,WAAW,CAAA;AAAE;AACzD,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,mBAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,UAAA,EAAY,SAAS,MAAM,CAAA;AAAA,IACrE,iBAAA,EAAmB,CAAC,SAAA,EAAW,SAAA,EAAW,YAAY,CAAA;AAAA,IACtD,cAAA,EAAgB,CAAC,OAAA,EAAS,UAAA,EAAY,aAAa,UAAU,CAAA;AAAA,IAC7D,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,cAAA,EAAgB,iBAAiB,CAAA;AAAA,IAC7C,OAAA,EAAS,CAAC,yBAAA,EAA2B,uBAAuB,CAAA;AAAA,IAC5D,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,MAAA,EAAQ,WAAA,EAAa,cAAc;AAAA,GAChD;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,uBAAA,EAAyB,sBAAsB,CAAA;AAAA,IACxD,MAAA,EAAQ,CAAC,wBAAA,EAA0B,uBAAuB,CAAA;AAAA,IAC1D,QAAA,EAAU,CAAC,uBAAuB;AAAA;AAEtC,CAAC","file":"chat-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: chat-v1\n *\n * Declarative runtime contract for the chat-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const chatV1Manifest = defineAppPackManifest({\n key: \"chat-v1\",\n name: \"Chat\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"conversation\",\n description:\n \"Core conversational runtime, streaming orchestration, and tool invocation shell.\",\n dependencies: [],\n capabilityFlags: [\n \"chat.streaming\",\n \"chat.history\",\n \"tool.invocation\",\n \"slash.commands\",\n \"voice.mode\",\n ],\n routeNamespace: {\n web: [\"/(chat)/chat\", \"/(chat)/chat/[id]\"],\n api: [\n \"/(chat)/api/chat\",\n \"/(chat)/api/coach\",\n \"/(chat)/api/history\",\n \"/(chat)/api/suggestions\",\n \"/(chat)/api/vote\",\n ],\n },\n surfaces: {\n components: [\n \"components/chat/*\",\n \"components/chat/sidebars/*\",\n \"components/chat/viewers/*\",\n ],\n convex: [\"convex/chats.ts\", \"convex/messages.ts\", \"convex/chatState.ts\"],\n tools: [\"lib/ai/tools/project-tools.ts\"],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\", \"public\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\"] },\n {\n resource: \"tool_action\",\n actions: [\"read\", \"mutate\"],\n notes: \"Mutation tools must pass server-side policy checks.\",\n },\n { resource: \"artifact\", actions: [\"read\", \"summarize\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"theme\", \"deal\"],\n requiredEdgeTypes: [\"informs\", \"answers\", \"belongs_to\"],\n requiredTables: [\"chats\", \"messages\", \"chatState\", \"projects\"],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"chat/default\", \"chat/voice-mode\"],\n prompts: [\"chat/main-system-prompt\", \"chat/voice-mode-style\"],\n reports: [],\n uiLabels: [\"chat\", \"assistant\", \"conversation\"],\n },\n testSuite: {\n parity: [\"chat-streaming-parity\", \"slash-command-parity\"],\n policy: [\"chat-context-filtering\", \"tool-deny-enforcement\"],\n contract: [\"chat-pack-contract-v1\"],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/chat-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,eAAA,EAAiB,oBAAA,CAAqB,QAAA,CAAS,eAAe,CAAA;AAAA,IAC9D;AAAA,GACF;AACF;;;AC5IO,IAAM,iBAAiB,qBAAA,CAAsB;AAAA,EAClD,GAAA,EAAK,SAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,OAAA;AAAA,EACT,SAAA,EAAW,QAAA;AAAA,EACX,QAAA,EAAU,cAAA;AAAA,EACV,WAAA,EACE,kFAAA;AAAA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AA,MACA,2BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,cAAA,EAAgB,iBAAiB,CAAA;AAAA,IAC7C,OAAA,EAAS,CAAC,yBAAA,EAA2B,uBAAuB,CAAA;AAAA,IAC5D,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,MAAA,EAAQ,WAAA,EAAa,cAAc;AAAA,GAChD;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,uBAAA,EAAyB,sBAAsB,CAAA;AAAA,IACxD,MAAA,EAAQ,CAAC,wBAAA,EAA0B,uBAAuB,CAAA;AAAA,IAC1D,QAAA,EAAU,CAAC,uBAAuB;AAAA;AAEtC,CAAC","file":"chat-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: chat-v1\n *\n * Declarative runtime contract for the chat-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const chatV1Manifest = defineAppPackManifest({\n key: \"chat-v1\",\n name: \"Chat\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"conversation\",\n description:\n \"Core conversational runtime, streaming orchestration, and tool invocation shell.\",\n dependencies: [],\n capabilityFlags: [\n \"chat.streaming\",\n \"chat.history\",\n \"tool.invocation\",\n \"slash.commands\",\n \"voice.mode\",\n ],\n routeNamespace: {\n web: [\"/(chat)/chat\", \"/(chat)/chat/[id]\"],\n api: [\n \"/(chat)/api/chat\",\n \"/(chat)/api/coach\",\n \"/(chat)/api/history\",\n \"/(chat)/api/suggestions\",\n \"/(chat)/api/vote\",\n ],\n },\n surfaces: {\n components: [\n \"apps/web/components/lucern/dev/chat-debug-panel.tsx\",\n \"apps/web/app/lucern/packs/_components/pack-try-it-panel.tsx\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/events.ts\",\n \"services/master-control/convex/tools.ts\",\n \"services/master-control/convex/toolAccess.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/functionSurface.ts\",\n \"packages/server-core/src/mcp-context-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\", \"public\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\"] },\n {\n resource: \"tool_action\",\n actions: [\"read\", \"mutate\"],\n notes: \"Mutation tools must pass server-side policy checks.\",\n },\n { resource: \"artifact\", actions: [\"read\", \"summarize\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"theme\", \"deal\"],\n requiredEdgeTypes: [\"informs\", \"answers\", \"belongs_to\"],\n requiredTables: [\n \"agentMessages\",\n \"platformAgentRuns\",\n \"platformAgentRunToolCalls\",\n \"epistemicNodes\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"chat/default\", \"chat/voice-mode\"],\n prompts: [\"chat/main-system-prompt\", \"chat/voice-mode-style\"],\n reports: [],\n uiLabels: [\"chat\", \"assistant\", \"conversation\"],\n },\n testSuite: {\n parity: [\"chat-streaming-parity\", \"slash-command-parity\"],\n policy: [\"chat-context-filtering\", \"tool-deny-enforcement\"],\n contract: [\"chat-pack-contract-v1\"],\n },\n});\n"]}
@@ -42,14 +42,17 @@ var dealsV1Manifest = defineAppPackManifest({
42
42
  },
43
43
  surfaces: {
44
44
  components: [
45
- "app/(projects)/projects/page.tsx",
46
- "components/project/*",
47
- "components/workspace/views/*"
45
+ "apps/web/app/lucern/tenant/workspaces/page.tsx",
46
+ "apps/web/app/lucern/tenant/_components/workspaces/*"
47
+ ],
48
+ convex: [
49
+ "packages/reasoning-kernel/src/adapters/topics.ts",
50
+ "packages/reasoning-kernel/src/adapters/decisions.ts",
51
+ "services/master-control/convex/workspaces.ts"
48
52
  ],
49
- convex: ["convex/projects.ts", "convex/epistemicDecisions.ts"],
50
53
  tools: [
51
- "lib/ai/tools/navigation-tools.ts",
52
- "lib/ai/tools/decision-tools.ts"
54
+ "packages/server-core/src/domain/topics.ts",
55
+ "packages/server-core/src/domain/worktrees.ts"
53
56
  ]
54
57
  },
55
58
  policyProfile: {
@@ -70,7 +73,7 @@ var dealsV1Manifest = defineAppPackManifest({
70
73
  "based_on_belief"
71
74
  ],
72
75
  requiredTables: [
73
- "projects",
76
+ "topics",
74
77
  "epistemicNodes",
75
78
  "epistemicEdges",
76
79
  "decisionEvents"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/deals-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AAC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GACrC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,iBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,oBAAoB;AAAA,KAClC;AAAA,IACA;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"deals-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: deals-v1\n *\n * Declarative runtime contract for the deals-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const dealsV1Manifest = defineAppPackManifest({\n key: \"deals-v1\",\n name: \"Deals\",\n version: \"1.0.0\",\n lifecycle: \"beta\",\n category: \"domain\",\n description:\n \"Deal diligence application using shared reasoning graph primitives with deal-calibrated workflows.\",\n dependencies: [\n \"chat-v1\",\n \"documents-v1\",\n \"news-v1\",\n \"decisions-v1\",\n ],\n capabilityFlags: [\n \"deal.lifecycle\",\n \"diligence.workflow\",\n \"deal.risk-assessment\",\n \"decision.integration\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects\", \"/(projects)/projects/[projectId]\"],\n api: [\"/api/research/*\", \"/api/tasks/*\", \"/api/reports/*\"],\n },\n surfaces: {\n components: [\n \"app/(projects)/projects/page.tsx\",\n \"components/project/*\",\n \"components/workspace/views/*\",\n ],\n convex: [\"convex/projects.ts\", \"convex/epistemicDecisions.ts\"],\n tools: [\n \"lib/ai/tools/navigation-tools.ts\",\n \"lib/ai/tools/decision-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"export\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"deal\", \"belief\", \"question\", \"evidence\", \"decision\"],\n requiredEdgeTypes: [\n \"evaluates\",\n \"informs\",\n \"depends_on\",\n \"based_on_belief\",\n ],\n requiredTables: [\n \"projects\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"decisionEvents\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"deals/diligence-default\", \"deals/ic-prep\"],\n prompts: [\"deals/main-system-prompt\", \"deals/risk-ledger-draft\"],\n reports: [\"deal-memo\", \"knowledge-map\"],\n uiLabels: [\"deal\", \"diligence\", \"investment_case\", \"ic_readiness\"],\n },\n testSuite: {\n parity: [\"deal-workflow-parity\"],\n policy: [\"deal-data-audience-filtering\"],\n contract: [\"deals-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"decision-kernel\",\n mode: \"required\",\n contracts: [\"decision-kernel-v1\"],\n },\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
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C,yBAAA,EAA2B,eAAe,CAAA;AAAA,IACtD,OAAA,EAAS,CAAC,0BAAA,EAA4B,yBAAyB,CAAA;AAAA,IAC/D,OAAA,EAAS,CAAC,WAAA,EAAa,eAAe,CAAA;AAAA,IACtC,QAAA,EAAU,CAAC,MAAA,EAAQ,WAAA,EAAa,mBAAmB,cAAc;AAAA,GACnE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,sBAAsB,CAAA;AAAA,IAC/B,MAAA,EAAQ,CAAC,8BAA8B,CAAA;AAAA,IACvC,QAAA,EAAU,CAAC,wBAAwB;AAAA,GACrC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,iBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,oBAAoB;AAAA,KAClC;AAAA,IACA;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"deals-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: deals-v1\n *\n * Declarative runtime contract for the deals-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const dealsV1Manifest = defineAppPackManifest({\n key: \"deals-v1\",\n name: \"Deals\",\n version: \"1.0.0\",\n lifecycle: \"beta\",\n category: \"domain\",\n description:\n \"Deal diligence application using shared reasoning graph primitives with deal-calibrated workflows.\",\n dependencies: [\n \"chat-v1\",\n \"documents-v1\",\n \"news-v1\",\n \"decisions-v1\",\n ],\n capabilityFlags: [\n \"deal.lifecycle\",\n \"diligence.workflow\",\n \"deal.risk-assessment\",\n \"decision.integration\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects\", \"/(projects)/projects/[projectId]\"],\n api: [\"/api/research/*\", \"/api/tasks/*\", \"/api/reports/*\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/workspaces/page.tsx\",\n \"apps/web/app/lucern/tenant/_components/workspaces/*\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/topics.ts\",\n \"packages/reasoning-kernel/src/adapters/decisions.ts\",\n \"services/master-control/convex/workspaces.ts\",\n ],\n tools: [\n \"packages/server-core/src/domain/topics.ts\",\n \"packages/server-core/src/domain/worktrees.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"export\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"deal\", \"belief\", \"question\", \"evidence\", \"decision\"],\n requiredEdgeTypes: [\n \"evaluates\",\n \"informs\",\n \"depends_on\",\n \"based_on_belief\",\n ],\n requiredTables: [\n \"topics\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"decisionEvents\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"deals/diligence-default\", \"deals/ic-prep\"],\n prompts: [\"deals/main-system-prompt\", \"deals/risk-ledger-draft\"],\n reports: [\"deal-memo\", \"knowledge-map\"],\n uiLabels: [\"deal\", \"diligence\", \"investment_case\", \"ic_readiness\"],\n },\n testSuite: {\n parity: [\"deal-workflow-parity\"],\n policy: [\"deal-data-audience-filtering\"],\n contract: [\"deals-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"decision-kernel\",\n mode: \"required\",\n contracts: [\"decision-kernel-v1\"],\n },\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -36,11 +36,18 @@ var decisionsV1Manifest = defineAppPackManifest({
36
36
  api: ["/api/thesis-audit/*", "/api/reports/*"]
37
37
  },
38
38
  surfaces: {
39
- components: ["app/(projects)/projects/[projectId]/decisions/page.tsx"],
40
- convex: ["convex/epistemicDecisions.ts", "convex/convictionEngine.ts"],
39
+ components: [
40
+ "apps/web/app/lucern/tenant/policy/page.tsx",
41
+ "apps/web/app/lucern/mc/policy/page.tsx"
42
+ ],
43
+ convex: [
44
+ "packages/reasoning-kernel/src/adapters/decisions.ts",
45
+ "packages/reasoning-kernel/src/adapters/questionsConvictionMutations.ts",
46
+ "packages/reasoning-kernel/src/adapters/beliefs.confidence.ts"
47
+ ],
41
48
  tools: [
42
- "lib/ai/tools/decision-tools.ts",
43
- "lib/ai/tools/conviction-tools.ts"
49
+ "packages/mcp/src/handlers/judgments.ts",
50
+ "packages/server-core/src/policy/index.ts"
44
51
  ]
45
52
  },
46
53
  policyProfile: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/decisions-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CA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EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,sBAAsB,CAAA;AAAA,IAC/B,MAAA,EAAQ,CAAC,6BAA6B,CAAA;AAAA,IACtC,QAAA,EAAU,CAAC,4BAA4B;AAAA,GACzC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,iBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,oBAAoB;AAAA,KAClC;AAAA,IACA;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"decisions-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: decisions-v1\n *\n * Declarative runtime contract for the decisions-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const decisionsV1Manifest = defineAppPackManifest({\n key: \"decisions-v1\",\n name: \"Decisions\",\n version: \"1.0.0\",\n lifecycle: \"beta\",\n category: \"decision\",\n description:\n \"Graph-native decision workflow with belief-level voting, risk ledgers, and snapshot locking.\",\n dependencies: [\"epistemic-algorithms-v1\"],\n capabilityFlags: [\n \"decision.workflow\",\n \"belief.level-voting\",\n \"risk.ledger\",\n \"decision.snapshot\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/decisions\"],\n api: [\"/api/thesis-audit/*\", \"/api/reports/*\"],\n },\n surfaces: {\n components: [\"app/(projects)/projects/[projectId]/decisions/page.tsx\"],\n convex: [\"convex/epistemicDecisions.ts\", \"convex/convictionEngine.ts\"],\n tools: [\n \"lib/ai/tools/decision-tools.ts\",\n \"lib/ai/tools/conviction-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"edge\", actions: [\"read\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"decision\", \"belief\", \"question\", \"evidence\", \"theme\"],\n requiredEdgeTypes: [\n \"based_on_belief\",\n \"based_on_question\",\n \"informed_by_theme\",\n \"blocked_by_contradiction\",\n ],\n requiredTables: [\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"decisionEvents\",\n \"beliefVotes\",\n \"decisionRiskLedger\",\n \"decisionSnapshots\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"decisions/pre-ic\", \"decisions/in-ic\", \"decisions/post-ic\"],\n prompts: [\n \"decisions/main-system-prompt\",\n \"decisions/risk-ledger-assistant\",\n ],\n reports: [\"decision-brief\", \"ic-memo\"],\n uiLabels: [\"decision\", \"risk_ledger\", \"vote_map\", \"snapshot\"],\n },\n testSuite: {\n parity: [\"decision-flow-parity\"],\n policy: [\"decision-lineage-visibility\"],\n contract: [\"decisions-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"decision-kernel\",\n mode: \"required\",\n contracts: [\"decision-kernel-v1\"],\n },\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/decisions-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,eAAA,EAAiB,oBAAA,CAAqB,QAAA,CAAS,eAAe,CAAA;AAAA,IAC9D;AAAA,GACF;AACF;;;AC5IO,IAAM,sBAAsB,qBAAA,CAAsB;AAAA,EACvD,GAAA,EAAK,cAAA;AAAA,EACL,IAAA,EAAM,WAAA;AAAA,EACN,OAAA,EAAS,OAAA;AAAA,EACT,SAAA,EAAW,MAAA;AAAA,EACX,QAAA,EAAU,UAAA;AAAA,EACV,WAAA,EACE,8FAAA;AAAA,EACF,YAAA,EAAc,CAAC,yBAAyB,CAAA;AAAA,EACxC,eAAA,EAAiB;AAAA,IACf,mBAAA;AAAA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ACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,kBAAA,EAAoB,iBAAA,EAAmB,mBAAmB,CAAA;AAAA,IACtE,OAAA,EAAS;AAAA,MACP,8BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,gBAAA,EAAkB,SAAS,CAAA;AAAA,IACrC,QAAA,EAAU,CAAC,UAAA,EAAY,aAAA,EAAe,YAAY,UAAU;AAAA,GAC9D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,sBAAsB,CAAA;AAAA,IAC/B,MAAA,EAAQ,CAAC,6BAA6B,CAAA;AAAA,IACtC,QAAA,EAAU,CAAC,4BAA4B;AAAA,GACzC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,iBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,oBAAoB;AAAA,KAClC;AAAA,IACA;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"decisions-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: decisions-v1\n *\n * Declarative runtime contract for the decisions-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const decisionsV1Manifest = defineAppPackManifest({\n key: \"decisions-v1\",\n name: \"Decisions\",\n version: \"1.0.0\",\n lifecycle: \"beta\",\n category: \"decision\",\n description:\n \"Graph-native decision workflow with belief-level voting, risk ledgers, and snapshot locking.\",\n dependencies: [\"epistemic-algorithms-v1\"],\n capabilityFlags: [\n \"decision.workflow\",\n \"belief.level-voting\",\n \"risk.ledger\",\n \"decision.snapshot\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/decisions\"],\n api: [\"/api/thesis-audit/*\", \"/api/reports/*\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/policy/page.tsx\",\n \"apps/web/app/lucern/mc/policy/page.tsx\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/decisions.ts\",\n \"packages/reasoning-kernel/src/adapters/questionsConvictionMutations.ts\",\n \"packages/reasoning-kernel/src/adapters/beliefs.confidence.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/judgments.ts\",\n \"packages/server-core/src/policy/index.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"edge\", actions: [\"read\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"decision\", \"belief\", \"question\", \"evidence\", \"theme\"],\n requiredEdgeTypes: [\n \"based_on_belief\",\n \"based_on_question\",\n \"informed_by_theme\",\n \"blocked_by_contradiction\",\n ],\n requiredTables: [\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"decisionEvents\",\n \"beliefVotes\",\n \"decisionRiskLedger\",\n \"decisionSnapshots\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"decisions/pre-ic\", \"decisions/in-ic\", \"decisions/post-ic\"],\n prompts: [\n \"decisions/main-system-prompt\",\n \"decisions/risk-ledger-assistant\",\n ],\n reports: [\"decision-brief\", \"ic-memo\"],\n uiLabels: [\"decision\", \"risk_ledger\", \"vote_map\", \"snapshot\"],\n },\n testSuite: {\n parity: [\"decision-flow-parity\"],\n policy: [\"decision-lineage-visibility\"],\n contract: [\"decisions-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"decision-kernel\",\n mode: \"required\",\n contracts: [\"decision-kernel-v1\"],\n },\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -39,14 +39,19 @@ var documentsV1Manifest = defineAppPackManifest({
39
39
  api: ["/api/documents/*", "/api/rag/document", "/api/rag/extract-pdf"]
40
40
  },
41
41
  surfaces: {
42
- components: ["components/documents/*", "components/document/*"],
42
+ components: [
43
+ "apps/web/app/lucern/tenant/_components/workspaces/workspace-pack-panel.tsx",
44
+ "apps/web/app/lucern/packs/_components/pack-detail-page.tsx"
45
+ ],
43
46
  convex: [
44
- "convex/projectDocuments.ts",
45
- "convex/documents.ts",
46
- "convex/documentAnnotations.ts",
47
- "convex/projectDocumentsActions.ts"
47
+ "packages/reasoning-kernel/src/adapters/evidence.ts",
48
+ "packages/reasoning-kernel/src/adapters/evidenceCreate.ts",
49
+ "packages/reasoning-kernel/src/adapters/epistemicSources.ts"
48
50
  ],
49
- tools: ["lib/ai/tools/create-document.ts"]
51
+ tools: [
52
+ "packages/server-core/src/domain/sources.ts",
53
+ "packages/mcp/src/handlers/evidence.ts"
54
+ ]
50
55
  },
51
56
  policyProfile: {
52
57
  audiences: ["internal", "lp"],
@@ -59,12 +64,7 @@ var documentsV1Manifest = defineAppPackManifest({
59
64
  dataContract: {
60
65
  requiredNodeTypes: ["source", "excerpt", "evidence", "synthesis"],
61
66
  requiredEdgeTypes: ["derived_from", "based_on", "informs"],
62
- requiredTables: [
63
- "projectDocuments",
64
- "projectDocumentsSyncLog",
65
- "documentAnnotations",
66
- "epistemicNodes"
67
- ],
67
+ requiredTables: ["researchJobs", "epistemicNodes", "epistemicEdges"],
68
68
  projectionBehavior: "inherits_policy"
69
69
  },
70
70
  templates: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/documents-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,eAAA,EAAiB,oBAAA,CAAqB,QAAA,CAAS,eAAe,CAAA;AAAA,IAC9D;AAAA,GACF;AACF;;;AC5IO,IAAM,sBAAsB,qBAAA,CAAsB;AAAA,EACvD,GAAA,EAAK,cAAA;AAAA,EAC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CAAA;AAAA,IACzD,cAAA,EAAgB;AAAA,MACd,kBAAA;AAAA,MACA,yBAAA;AAAA,MACA,qBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW;AAAA,MACT,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,sBAAA,EAAwB,yBAAyB,CAAA;AAAA,IAC3D,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,WAAA,EAAa,aAAA,EAAe,YAAY,SAAS;AAAA,GAC9D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,uBAAuB,CAAA;AAAA,IAChC,MAAA,EAAQ,CAAC,6BAA6B,CAAA;AAAA,IACtC,QAAA,EAAU,CAAC,4BAA4B;AAAA;AAE3C,CAAC","file":"documents-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: documents-v1\n *\n * Declarative runtime contract for the documents-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const documentsV1Manifest = defineAppPackManifest({\n key: \"documents-v1\",\n name: \"Documents\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"documents\",\n description:\n \"Document upload, extraction, annotation, and conversion into graph-grounded evidence.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"document.ingestion\",\n \"document.extraction\",\n \"document.annotation\",\n \"document.rag\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects/[projectId]/documents\",\n \"/(projects)/projects/[projectId]/documents/[documentId]\",\n ],\n api: [\"/api/documents/*\", \"/api/rag/document\", \"/api/rag/extract-pdf\"],\n },\n surfaces: {\n components: [\"components/documents/*\", \"components/document/*\"],\n convex: [\n \"convex/projectDocuments.ts\",\n \"convex/documents.ts\",\n \"convex/documentAnnotations.ts\",\n \"convex/projectDocumentsActions.ts\",\n ],\n tools: [\"lib/ai/tools/create-document.ts\"],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"source\", \"excerpt\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"derived_from\", \"based_on\", \"informs\"],\n requiredTables: [\n \"projectDocuments\",\n \"projectDocumentsSyncLog\",\n \"documentAnnotations\",\n \"epistemicNodes\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\n \"documents/upload-extract-link\",\n \"documents/annotate-to-evidence\",\n ],\n prompts: [\"documents/extraction\", \"documents/summarization\"],\n reports: [],\n uiLabels: [\"documents\", \"annotations\", \"excerpts\", \"sources\"],\n },\n testSuite: {\n parity: [\"documents-page-parity\"],\n policy: [\"document-access-enforcement\"],\n contract: [\"documents-pack-contract-v1\"],\n },\n});\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,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,uBAAuB,CAAA;AAAA,IAChC,MAAA,EAAQ,CAAC,6BAA6B,CAAA;AAAA,IACtC,QAAA,EAAU,CAAC,4BAA4B;AAAA;AAE3C,CAAC","file":"documents-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: documents-v1\n *\n * Declarative runtime contract for the documents-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const documentsV1Manifest = defineAppPackManifest({\n key: \"documents-v1\",\n name: \"Documents\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"documents\",\n description:\n \"Document upload, extraction, annotation, and conversion into graph-grounded evidence.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"document.ingestion\",\n \"document.extraction\",\n \"document.annotation\",\n \"document.rag\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects/[projectId]/documents\",\n \"/(projects)/projects/[projectId]/documents/[documentId]\",\n ],\n api: [\"/api/documents/*\", \"/api/rag/document\", \"/api/rag/extract-pdf\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/workspaces/workspace-pack-panel.tsx\",\n \"apps/web/app/lucern/packs/_components/pack-detail-page.tsx\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/evidence.ts\",\n \"packages/reasoning-kernel/src/adapters/evidenceCreate.ts\",\n \"packages/reasoning-kernel/src/adapters/epistemicSources.ts\",\n ],\n tools: [\n \"packages/server-core/src/domain/sources.ts\",\n \"packages/mcp/src/handlers/evidence.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"source\", \"excerpt\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"derived_from\", \"based_on\", \"informs\"],\n requiredTables: [\"researchJobs\", \"epistemicNodes\", \"epistemicEdges\"],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\n \"documents/upload-extract-link\",\n \"documents/annotate-to-evidence\",\n ],\n prompts: [\"documents/extraction\", \"documents/summarization\"],\n reports: [],\n uiLabels: [\"documents\", \"annotations\", \"excerpts\", \"sources\"],\n },\n testSuite: {\n parity: [\"documents-page-parity\"],\n policy: [\"document-access-enforcement\"],\n contract: [\"documents-pack-contract-v1\"],\n },\n});\n"]}
@@ -39,14 +39,19 @@ var epistemicAlgorithmsV1Manifest = defineAppPackManifest({
39
39
  api: ["/api/thesis-audit", "/api/graph-explain", "/api/lucern/*"]
40
40
  },
41
41
  surfaces: {
42
- components: ["components/epistemic/*", "components/contradiction/*"],
42
+ components: [
43
+ "apps/web/app/lucern/tenant/_components/graph/*",
44
+ "apps/web/lib/platform/react/components/ContradictionList.ts"
45
+ ],
43
46
  convex: [
44
- "convex/contradictions.ts",
45
- "convex/convictionEngine.ts",
46
- "convex/graphIntelligence.ts",
47
- "convex/thesisAuditAgents.ts"
47
+ "packages/reasoning-kernel/src/adapters/contradictions.ts",
48
+ "packages/reasoning-kernel/src/adapters/graphIntelligence.ts",
49
+ "packages/reasoning-kernel/src/adapters/graphAnalysisResults.ts"
48
50
  ],
49
- tools: ["lib/ai/tools/graph-intelligence-tools.ts"]
51
+ tools: [
52
+ "packages/mcp/src/handlers/contradictions.ts",
53
+ "packages/server-core/src/graph-analysis.ts"
54
+ ]
50
55
  },
51
56
  policyProfile: {
52
57
  audiences: ["internal", "lp"],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/epistemic-algorithms-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,eAAA,EAAiB,oBAAA,CAAqB,QAAA,CAAS,eAAe,CAAA;AAAA,IAC9D;AAAA,GACF;AACF;;;AC5IO,IAAM,gCAAgC,qBAAA,CAAsB;AAAA,EACjE,GAAA,EAAK,yBAA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A,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,iBAAA;AAAA,MACA,aAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,gBAAA;AAAA,MACA,kBAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,oCAAA,EAAsC,wBAAwB,CAAA;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,eAAe,CAAA;AAAA,IACzB,QAAA,EAAU;AAAA,MACR,eAAA;AAAA,MACA,YAAA;AAAA,MACA,cAAA;AAAA,MACA;AAAA;AACF,GACF;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,mCAAmC,CAAA;AAAA,IAC5C,MAAA,EAAQ,CAAC,kCAAkC,CAAA;AAAA,IAC3C,QAAA,EAAU,CAAC,uCAAuC;AAAA,GACpD;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"epistemic-algorithms-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: epistemic-algorithms-v1\n *\n * Declarative runtime contract for the epistemic-algorithms-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const epistemicAlgorithmsV1Manifest = defineAppPackManifest({\n key: \"epistemic-algorithms-v1\",\n name: \"Epistemic Algorithms\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"analytics\",\n description:\n \"Reasoning quality engines: contradiction detection, conviction dynamics, and graph intelligence analytics.\",\n dependencies: [\"graph-visualization-v1\", \"chat-v1\"],\n capabilityFlags: [\n \"contradiction.detection\",\n \"conviction.analytics\",\n \"reasoning.depth\",\n \"bias.detection\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects/[projectId]/contradictions\",\n \"/(projects)/projects/[projectId]/thesis-audit\",\n ],\n api: [\"/api/thesis-audit\", \"/api/graph-explain\", \"/api/lucern/*\"],\n },\n surfaces: {\n components: [\"components/epistemic/*\", \"components/contradiction/*\"],\n convex: [\n \"convex/contradictions.ts\",\n \"convex/convictionEngine.ts\",\n \"convex/graphIntelligence.ts\",\n \"convex/thesisAuditAgents.ts\",\n ],\n tools: [\"lib/ai/tools/graph-intelligence-tools.ts\"],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"node\", actions: [\"read\", \"summarize\"] },\n { resource: \"edge\", actions: [\"read\", \"summarize\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"theme\", \"decision\"],\n requiredEdgeTypes: [\n \"informs\",\n \"contradicts\",\n \"depends_on\",\n \"strengthened_by\",\n \"weakened_by\",\n \"collapses_if\",\n ],\n requiredTables: [\n \"contradictions\",\n \"beliefConfidence\",\n \"epistemicAudit\",\n \"graphAnalysisResults\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"epistemic/contradiction-resolution\", \"epistemic/thesis-audit\"],\n prompts: [\n \"graph-intelligence/full-guide\",\n \"graph-intelligence/bias-detection\",\n ],\n reports: [\"knowledge_map\"],\n uiLabels: [\n \"contradiction\",\n \"conviction\",\n \"thesis_audit\",\n \"epistemic_health\",\n ],\n },\n testSuite: {\n parity: [\"epistemic-algorithm-output-parity\"],\n policy: [\"epistemic-output-scope-filtering\"],\n contract: [\"epistemic-algorithms-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/epistemic-algorithms-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,C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WAAA,EAAa,QAAQ,CAAA;AAAE;AACnE,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,mBAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,UAAA,EAAY,SAAS,UAAU,CAAA;AAAA,IACzE,iBAAA,EAAmB;AAAA,MACjB,SAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,iBAAA;AAAA,MACA,aAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,gBAAA;AAAA,MACA,kBAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,oCAAA,EAAsC,wBAAwB,CAAA;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,eAAe,CAAA;AAAA,IACzB,QAAA,EAAU;AAAA,MACR,eAAA;AAAA,MACA,YAAA;AAAA,MACA,cAAA;AAAA,MACA;AAAA;AACF,GACF;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,mCAAmC,CAAA;AAAA,IAC5C,MAAA,EAAQ,CAAC,kCAAkC,CAAA;AAAA,IAC3C,QAAA,EAAU,CAAC,uCAAuC;AAAA,GACpD;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"epistemic-algorithms-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: epistemic-algorithms-v1\n *\n * Declarative runtime contract for the epistemic-algorithms-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const epistemicAlgorithmsV1Manifest = defineAppPackManifest({\n key: \"epistemic-algorithms-v1\",\n name: \"Epistemic Algorithms\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"analytics\",\n description:\n \"Reasoning quality engines: contradiction detection, conviction dynamics, and graph intelligence analytics.\",\n dependencies: [\"graph-visualization-v1\", \"chat-v1\"],\n capabilityFlags: [\n \"contradiction.detection\",\n \"conviction.analytics\",\n \"reasoning.depth\",\n \"bias.detection\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects/[projectId]/contradictions\",\n \"/(projects)/projects/[projectId]/thesis-audit\",\n ],\n api: [\"/api/thesis-audit\", \"/api/graph-explain\", \"/api/lucern/*\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/graph/*\",\n \"apps/web/lib/platform/react/components/ContradictionList.ts\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/contradictions.ts\",\n \"packages/reasoning-kernel/src/adapters/graphIntelligence.ts\",\n \"packages/reasoning-kernel/src/adapters/graphAnalysisResults.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/contradictions.ts\",\n \"packages/server-core/src/graph-analysis.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"node\", actions: [\"read\", \"summarize\"] },\n { resource: \"edge\", actions: [\"read\", \"summarize\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"theme\", \"decision\"],\n requiredEdgeTypes: [\n \"informs\",\n \"contradicts\",\n \"depends_on\",\n \"strengthened_by\",\n \"weakened_by\",\n \"collapses_if\",\n ],\n requiredTables: [\n \"contradictions\",\n \"beliefConfidence\",\n \"epistemicAudit\",\n \"graphAnalysisResults\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"epistemic/contradiction-resolution\", \"epistemic/thesis-audit\"],\n prompts: [\n \"graph-intelligence/full-guide\",\n \"graph-intelligence/bias-detection\",\n ],\n reports: [\"knowledge_map\"],\n uiLabels: [\n \"contradiction\",\n \"conviction\",\n \"thesis_audit\",\n \"epistemic_health\",\n ],\n },\n testSuite: {\n parity: [\"epistemic-algorithm-output-parity\"],\n policy: [\"epistemic-output-scope-filtering\"],\n contract: [\"epistemic-algorithms-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -37,13 +37,17 @@ var graphVisualizationV1Manifest = defineAppPackManifest({
37
37
  },
38
38
  surfaces: {
39
39
  components: [
40
- "app/(projects)/projects/[projectId]/graph/components/*",
41
- "components/workspace/views/ProjectHomeView.tsx"
40
+ "apps/web/app/lucern/tenant/_components/graph/*",
41
+ "apps/web/app/lucern/tenant/graph/page.tsx"
42
+ ],
43
+ convex: [
44
+ "packages/reasoning-kernel/src/adapters/edgesQueries.ts",
45
+ "packages/reasoning-kernel/src/adapters/nodesQueries.ts",
46
+ "packages/reasoning-kernel/src/adapters/neo4jQueries.ts"
42
47
  ],
43
- convex: ["convex/epistemicQueries.ts", "convex/neo4jQueries.ts"],
44
48
  tools: [
45
- "lib/ai/tools/knowledge-graph-tools.ts",
46
- "lib/ai/tools/cypher-tools.ts"
49
+ "packages/mcp/src/handlers/graph.ts",
50
+ "packages/server-core/src/mcp-graph-tools.ts"
47
51
  ]
48
52
  },
49
53
  policyProfile: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/graph-visualization-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY,SAAS;AAAA,GACvD,CAAE,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,GAAG,QAAA;AAAA,IACH,YAAA,EAAc,oBAAA,CAAqB,QAAA,CAAS,YAAY,CAAA;AAAA,IACxD,eAAA,EAAiB,oBAAA,CAAqB,QAAA,CAAS,eAAe,CAAA;AAAA,IAC9D;AAAA,GACF;AACF;;;AC5IO,IAAM,+BAA+B,qBAAA,CAAsB;AAAA,EAChE,GAAA,EAAK,wBAAA;AAAA,EACL,IAAA,EAAM,qBAAA;AAAA,EACN,OAAA,EAAS,OAAA;AAAA,EACT,SAAA,EAAW,QAAA;AAAA,EACX,QAAA,EAAU,OAAA;AAAA,EACV,WAAA,E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IACT,SAAA,EAAW,CAAC,0BAA0B,CAAA;AAAA,IACtC,OAAA,EAAS;AAAA,MACP,0BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,OAAA,EAAS,OAAA,EAAS,SAAS,SAAS;AAAA,GACjD;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,oBAAA,EAAsB,qBAAqB,CAAA;AAAA,IACpD,MAAA,EAAQ,CAAC,iCAAiC,CAAA;AAAA,IAC1C,QAAA,EAAU,CAAC,sCAAsC;AAAA;AAErD,CAAC","file":"graph-visualization-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: graph-visualization-v1\n *\n * Declarative runtime contract for the graph-visualization-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const graphVisualizationV1Manifest = defineAppPackManifest({\n key: \"graph-visualization-v1\",\n name: \"Graph Visualization\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"graph\",\n description:\n \"Interactive graph explorer for node/edge traversal, neighborhood inspection, and query rendering.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"graph.rendering\",\n \"graph.query\",\n \"graph.highlighting\",\n \"graph.neighborhood\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/graph\"],\n api: [\"/api/graph\", \"/api/graph-query\", \"/api/graph-suggestions\"],\n },\n surfaces: {\n components: [\n \"app/(projects)/projects/[projectId]/graph/components/*\",\n \"components/workspace/views/ProjectHomeView.tsx\",\n ],\n convex: [\"convex/epistemicQueries.ts\", \"convex/neo4jQueries.ts\"],\n tools: [\n \"lib/ai/tools/knowledge-graph-tools.ts\",\n \"lib/ai/tools/cypher-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"node\", actions: [\"read\", \"summarize\"] },\n { resource: \"edge\", actions: [\"read\", \"summarize\"] },\n { resource: \"tool_action\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\n \"belief\",\n \"question\",\n \"evidence\",\n \"theme\",\n \"deal\",\n \"decision\",\n ],\n requiredEdgeTypes: [\"informs\", \"answers\", \"belongs_to\", \"depends_on\"],\n requiredTables: [\"epistemicNodes\", \"epistemicEdges\"],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"graph/query-and-traverse\"],\n prompts: [\n \"graph-intelligence/query\",\n \"graph-intelligence/suggestions-extraction\",\n ],\n reports: [],\n uiLabels: [\"graph\", \"nodes\", \"edges\", \"lineage\"],\n },\n testSuite: {\n parity: [\"graph-query-parity\", \"graph-render-parity\"],\n policy: [\"graph-node-visibility-filtering\"],\n contract: [\"graph-visualization-pack-contract-v1\"],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/graph-visualization-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GA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,CAAC","file":"graph-visualization-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: graph-visualization-v1\n *\n * Declarative runtime contract for the graph-visualization-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const graphVisualizationV1Manifest = defineAppPackManifest({\n key: \"graph-visualization-v1\",\n name: \"Graph Visualization\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"graph\",\n description:\n \"Interactive graph explorer for node/edge traversal, neighborhood inspection, and query rendering.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"graph.rendering\",\n \"graph.query\",\n \"graph.highlighting\",\n \"graph.neighborhood\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/graph\"],\n api: [\"/api/graph\", \"/api/graph-query\", \"/api/graph-suggestions\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/graph/*\",\n \"apps/web/app/lucern/tenant/graph/page.tsx\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/edgesQueries.ts\",\n \"packages/reasoning-kernel/src/adapters/nodesQueries.ts\",\n \"packages/reasoning-kernel/src/adapters/neo4jQueries.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/graph.ts\",\n \"packages/server-core/src/mcp-graph-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"node\", actions: [\"read\", \"summarize\"] },\n { resource: \"edge\", actions: [\"read\", \"summarize\"] },\n { resource: \"tool_action\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\n \"belief\",\n \"question\",\n \"evidence\",\n \"theme\",\n \"deal\",\n \"decision\",\n ],\n requiredEdgeTypes: [\"informs\", \"answers\", \"belongs_to\", \"depends_on\"],\n requiredTables: [\"epistemicNodes\", \"epistemicEdges\"],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\"graph/query-and-traverse\"],\n prompts: [\n \"graph-intelligence/query\",\n \"graph-intelligence/suggestions-extraction\",\n ],\n reports: [],\n uiLabels: [\"graph\", \"nodes\", \"edges\", \"lineage\"],\n },\n testSuite: {\n parity: [\"graph-query-parity\", \"graph-render-parity\"],\n policy: [\"graph-node-visibility-filtering\"],\n contract: [\"graph-visualization-pack-contract-v1\"],\n },\n});\n"]}
@@ -7,6 +7,7 @@ export { epistemicAlgorithmsV1Manifest } from './epistemic-algorithms-v1.js';
7
7
  export { graphVisualizationV1Manifest } from './graph-visualization-v1.js';
8
8
  export { newsV1Manifest } from './news-v1.js';
9
9
  export { philosophyModeV1Manifest } from './philosophy-mode-v1.js';
10
+ export { worktreesV1Manifest } from './sprints-v1.js';
10
11
  export { taskManagementV1Manifest } from './task-management-v1.js';
11
12
  export { teamAnalysisV1Manifest } from './team-analysis-v1.js';
12
13
  export { themesV1Manifest } from './themes-v1.js';