@lucern/pack-host 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -0,0 +1,106 @@
1
+ // src/contracts.ts
2
+ function normalizeStringArray(values) {
3
+ const normalized = values.map((value) => value.trim()).filter((value) => value.length > 0);
4
+ return Array.from(new Set(normalized));
5
+ }
6
+ function defineAppPackManifest(manifest) {
7
+ const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({
8
+ ...integration,
9
+ contracts: normalizeStringArray(integration.contracts)
10
+ }));
11
+ return {
12
+ ...manifest,
13
+ dependencies: normalizeStringArray(manifest.dependencies),
14
+ capabilityFlags: normalizeStringArray(manifest.capabilityFlags),
15
+ sharedServices
16
+ };
17
+ }
18
+
19
+ // src/manifests/sprints-v1.ts
20
+ var worktreesV1Manifest = defineAppPackManifest({
21
+ key: "sprints-v1",
22
+ name: "Worktrees",
23
+ version: "1.0.0",
24
+ lifecycle: "active",
25
+ category: "workflow",
26
+ description: "Structured research execution workflow with phases, scoring, and worktree-linked tasks.",
27
+ dependencies: ["chat-v1"],
28
+ capabilityFlags: [
29
+ "worktree.lifecycle",
30
+ "worktree.phase-navigation",
31
+ "worktree.scoring",
32
+ "worktree.workspace"
33
+ ],
34
+ routeNamespace: {
35
+ web: [
36
+ "/(projects)/topics/[topicId]/worktrees",
37
+ "/(projects)/topics/[topicId]/worktrees/[worktreeId]"
38
+ ],
39
+ api: [
40
+ "/api/sprint/assess-beliefs",
41
+ "/api/sprint/generate-thesis",
42
+ "/api/sprint/refine-thesis",
43
+ "/api/sprint/welcome"
44
+ ]
45
+ },
46
+ surfaces: {
47
+ components: [
48
+ "apps/web/app/lucern/tenant/_components/workspaces/*",
49
+ "apps/web/app/lucern/tenant/workspaces/page.tsx"
50
+ ],
51
+ convex: [
52
+ "packages/reasoning-kernel/src/adapters/worktrees.ts",
53
+ "modules/tasks/src/v1/engine/tasks.ts",
54
+ "packages/reasoning-kernel/src/adapters/questions.ts"
55
+ ],
56
+ tools: [
57
+ "packages/mcp/src/handlers/worktrees.ts",
58
+ "packages/server-core/src/worktrees.ts"
59
+ ]
60
+ },
61
+ policyProfile: {
62
+ audiences: ["internal", "lp"],
63
+ rules: [
64
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
65
+ { resource: "task", actions: ["read", "mutate"] },
66
+ { resource: "tool_action", actions: ["read", "mutate"] }
67
+ ]
68
+ },
69
+ dataContract: {
70
+ requiredNodeTypes: ["belief", "question", "evidence", "theme"],
71
+ requiredEdgeTypes: ["tests", "informs", "belongs_to", "depends_on"],
72
+ requiredTables: [
73
+ "worktrees",
74
+ "workflowDefinitions",
75
+ "workflowStages",
76
+ "tasks"
77
+ ],
78
+ projectionBehavior: "inherits_policy"
79
+ },
80
+ templates: {
81
+ workflows: [
82
+ "worktree/hypothesis-formation",
83
+ "worktree/cluster-mapping",
84
+ "worktree/question-validation"
85
+ ],
86
+ prompts: ["worktree/main-system-prompt", "worktree/research-task-planning"],
87
+ reports: ["sprint_thesis"],
88
+ uiLabels: ["worktree", "phase", "conviction", "thesis"]
89
+ },
90
+ testSuite: {
91
+ parity: ["worktree-lifecycle-parity"],
92
+ policy: ["worktree-tool-enforcement"],
93
+ contract: ["worktrees-pack-contract-v1"]
94
+ },
95
+ sharedServices: [
96
+ {
97
+ service: "knowledge-compiler",
98
+ mode: "required",
99
+ contracts: ["knowledge-compiler-v1"]
100
+ }
101
+ ]
102
+ });
103
+
104
+ export { worktreesV1Manifest };
105
+ //# sourceMappingURL=sprints-v1.js.map
106
+ //# sourceMappingURL=sprints-v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/sprints-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,C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AAQ,CAAA;AAAE;AACzD,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,iBAAA,EAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,YAAY,OAAO,CAAA;AAAA,IAC7D,iBAAA,EAAmB,CAAC,OAAA,EAAS,SAAA,EAAW,cAAc,YAAY,CAAA;AAAA,IAClE,cAAA,EAAgB;AAAA,MACd,WAAA;AAAA,MACA,qBAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW;AAAA,MACT,+BAAA;AAAA,MACA,0BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,6BAAA,EAA+B,iCAAiC,CAAA;AAAA,IAC1E,OAAA,EAAS,CAAC,eAAe,CAAA;AAAA,IACzB,QAAA,EAAU,CAAC,UAAA,EAAY,OAAA,EAAS,cAAc,QAAQ;AAAA,GACxD;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,2BAA2B,CAAA;AAAA,IACpC,MAAA,EAAQ,CAAC,2BAA2B,CAAA;AAAA,IACpC,QAAA,EAAU,CAAC,4BAA4B;AAAA,GACzC;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":"sprints-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: sprints-v1\n *\n * Declarative runtime contract for the worktree workflow application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const worktreesV1Manifest = defineAppPackManifest({\n key: \"sprints-v1\",\n name: \"Worktrees\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"workflow\",\n description:\n \"Structured research execution workflow with phases, scoring, and worktree-linked tasks.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"worktree.lifecycle\",\n \"worktree.phase-navigation\",\n \"worktree.scoring\",\n \"worktree.workspace\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/topics/[topicId]/worktrees\",\n \"/(projects)/topics/[topicId]/worktrees/[worktreeId]\",\n ],\n api: [\n \"/api/sprint/assess-beliefs\",\n \"/api/sprint/generate-thesis\",\n \"/api/sprint/refine-thesis\",\n \"/api/sprint/welcome\",\n ],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/workspaces/*\",\n \"apps/web/app/lucern/tenant/workspaces/page.tsx\",\n ],\n convex: [\n \"packages/reasoning-kernel/src/adapters/worktrees.ts\",\n \"modules/tasks/src/v1/engine/tasks.ts\",\n \"packages/reasoning-kernel/src/adapters/questions.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/worktrees.ts\",\n \"packages/server-core/src/worktrees.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"task\", actions: [\"read\", \"mutate\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"theme\"],\n requiredEdgeTypes: [\"tests\", \"informs\", \"belongs_to\", \"depends_on\"],\n requiredTables: [\n \"worktrees\",\n \"workflowDefinitions\",\n \"workflowStages\",\n \"tasks\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\n \"worktree/hypothesis-formation\",\n \"worktree/cluster-mapping\",\n \"worktree/question-validation\",\n ],\n prompts: [\"worktree/main-system-prompt\", \"worktree/research-task-planning\"],\n reports: [\"sprint_thesis\"],\n uiLabels: [\"worktree\", \"phase\", \"conviction\", \"thesis\"],\n },\n testSuite: {\n parity: [\"worktree-lifecycle-parity\"],\n policy: [\"worktree-tool-enforcement\"],\n contract: [\"worktrees-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -41,13 +41,19 @@ var taskManagementV1Manifest = defineAppPackManifest({
41
41
  ]
42
42
  },
43
43
  surfaces: {
44
- components: ["components/task/*"],
44
+ components: [
45
+ "apps/web/app/lucern/tenant/tools/page.tsx",
46
+ "apps/web/app/lucern/tenant/_components/tools/*"
47
+ ],
45
48
  convex: [
46
- "convex/tasks.ts",
47
- "convex/_taskHelpers.ts",
48
- "convex/_taskQueryLogic.ts"
49
+ "modules/tasks/src/v1/engine/tasks.ts",
50
+ "modules/tasks/src/v1/engine/tasks.queries.ts",
51
+ "modules/tasks/src/v1/engine/tasks.mutations.ts"
49
52
  ],
50
- tools: ["lib/ai/tools/task-tools.ts"]
53
+ tools: [
54
+ "packages/mcp/src/handlers/tasks.ts",
55
+ "packages/server-core/src/tasks.ts"
56
+ ]
51
57
  },
52
58
  policyProfile: {
53
59
  audiences: ["internal", "lp"],
@@ -61,7 +67,13 @@ var taskManagementV1Manifest = defineAppPackManifest({
61
67
  dataContract: {
62
68
  requiredNodeTypes: ["belief", "question", "evidence", "synthesis"],
63
69
  requiredEdgeTypes: ["informs", "tests", "belongs_to"],
64
- requiredTables: ["tasks", "projects", "epistemicNodes", "epistemicEdges"],
70
+ requiredTables: [
71
+ "tasks",
72
+ "topics",
73
+ "worktrees",
74
+ "epistemicNodes",
75
+ "epistemicEdges"
76
+ ],
65
77
  projectionBehavior: "inherits_policy"
66
78
  },
67
79
  templates: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/task-management-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,2BAA2B,qBAAA,CAAsB;AAAA,EAC5D,GAAA,EAAK,oBAAA;AAAA,EACL,IAAA,EAAM,iBAAA;AAAA,E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EAAmB,CAAC,SAAA,EAAW,OAAA,EAAS,YAAY,CAAA;AAAA,IACpD,cAAA,EAAgB,CAAC,OAAA,EAAS,UAAA,EAAY,kBAAkB,gBAAgB,CAAA;AAAA,IACxE,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW;AAAA,MACT,qBAAA;AAAA,MACA,sBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,mBAAA,EAAqB,+BAA+B,CAAA;AAAA,IAC9D,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,OAAA,EAAS,UAAA,EAAY,aAAa,iBAAiB;AAAA,GAChE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,wBAAwB,CAAA;AAAA,IACjC,MAAA,EAAQ,CAAC,iCAAiC,CAAA;AAAA,IAC1C,QAAA,EAAU,CAAC,kCAAkC;AAAA;AAEjD,CAAC","file":"task-management-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: task-management-v1\n *\n * Declarative runtime contract for the task-management-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const taskManagementV1Manifest = defineAppPackManifest({\n key: \"task-management-v1\",\n name: \"Task Management\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"operations\",\n description:\n \"Operational task system linked to beliefs, questions, worktrees, and AI-assisted execution.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"task.lifecycle\",\n \"task.assignment\",\n \"task.attachments\",\n \"task.ai-execution\",\n \"task.evidence-capture\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/tasks\"],\n api: [\n \"/api/tasks/execute\",\n \"/api/tasks/execute-workflow\",\n \"/api/tasks/refresh-call-script\",\n ],\n },\n surfaces: {\n components: [\"components/task/*\"],\n convex: [\n \"convex/tasks.ts\",\n \"convex/_taskHelpers.ts\",\n \"convex/_taskQueryLogic.ts\",\n ],\n tools: [\"lib/ai/tools/task-tools.ts\"],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"task\", actions: [\"read\", \"mutate\", \"admin\"] },\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"informs\", \"tests\", \"belongs_to\"],\n requiredTables: [\"tasks\", \"projects\", \"epistemicNodes\", \"epistemicEdges\"],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\n \"tasks/research-plan\",\n \"tasks/execution-loop\",\n \"tasks/evidence-capture\",\n ],\n prompts: [\"tasks/call-script\", \"tasks/research-plan-generator\"],\n reports: [],\n uiLabels: [\"tasks\", \"assignee\", \"checklist\", \"workflow_status\"],\n },\n testSuite: {\n parity: [\"task-management-parity\"],\n policy: [\"task-project-access-enforcement\"],\n contract: [\"task-management-pack-contract-v1\"],\n },\n});\n"]}
1
+ {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/task-management-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,2BAA2B,qBAAA,CAAsB;AAAA,EAC5D,GAAA,EAAK,oBAAA;AAAA,EACL,IAAA,EAAM,iBAAA;AAAA,EACN,OAAA,EAAS,OAAA;AAAA,EACT,SAAA,EAAW,QAAA;AAAA,EACX,QAAA,EAAU,YAAA;AAAA,EACV,WAAA,EACE,6FAAA;AAAA,EACF,YAAA,EAAc,CAAC,SAAS,CAAA;AAAA,EACxB,eAAA,EAAiB;AAAA,IACf,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,kBAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA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EAAW;AAAA,MACT,qBAAA;AAAA,MACA,sBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,mBAAA,EAAqB,+BAA+B,CAAA;AAAA,IAC9D,SAAS,EAAC;AAAA,IACV,QAAA,EAAU,CAAC,OAAA,EAAS,UAAA,EAAY,aAAa,iBAAiB;AAAA,GAChE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,wBAAwB,CAAA;AAAA,IACjC,MAAA,EAAQ,CAAC,iCAAiC,CAAA;AAAA,IAC1C,QAAA,EAAU,CAAC,kCAAkC;AAAA;AAEjD,CAAC","file":"task-management-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: task-management-v1\n *\n * Declarative runtime contract for the task-management-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const taskManagementV1Manifest = defineAppPackManifest({\n key: \"task-management-v1\",\n name: \"Task Management\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"operations\",\n description:\n \"Operational task system linked to beliefs, questions, worktrees, and AI-assisted execution.\",\n dependencies: [\"chat-v1\"],\n capabilityFlags: [\n \"task.lifecycle\",\n \"task.assignment\",\n \"task.attachments\",\n \"task.ai-execution\",\n \"task.evidence-capture\",\n ],\n routeNamespace: {\n web: [\"/(projects)/projects/[projectId]/tasks\"],\n api: [\n \"/api/tasks/execute\",\n \"/api/tasks/execute-workflow\",\n \"/api/tasks/refresh-call-script\",\n ],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/tools/page.tsx\",\n \"apps/web/app/lucern/tenant/_components/tools/*\",\n ],\n convex: [\n \"modules/tasks/src/v1/engine/tasks.ts\",\n \"modules/tasks/src/v1/engine/tasks.queries.ts\",\n \"modules/tasks/src/v1/engine/tasks.mutations.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/tasks.ts\",\n \"packages/server-core/src/tasks.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\"],\n rules: [\n { resource: \"task\", actions: [\"read\", \"mutate\", \"admin\"] },\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"tool_action\", actions: [\"read\", \"mutate\"] },\n { resource: \"artifact\", actions: [\"read\", \"summarize\", \"mutate\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"informs\", \"tests\", \"belongs_to\"],\n requiredTables: [\n \"tasks\",\n \"topics\",\n \"worktrees\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n ],\n projectionBehavior: \"inherits_policy\",\n },\n templates: {\n workflows: [\n \"tasks/research-plan\",\n \"tasks/execution-loop\",\n \"tasks/evidence-capture\",\n ],\n prompts: [\"tasks/call-script\", \"tasks/research-plan-generator\"],\n reports: [],\n uiLabels: [\"tasks\", \"assignee\", \"checklist\", \"workflow_status\"],\n },\n testSuite: {\n parity: [\"task-management-parity\"],\n policy: [\"task-project-access-enforcement\"],\n contract: [\"task-management-pack-contract-v1\"],\n },\n});\n"]}
@@ -36,13 +36,19 @@ var teamAnalysisV1Manifest = defineAppPackManifest({
36
36
  api: ["/api/coaching/*"]
37
37
  },
38
38
  surfaces: {
39
- components: ["components/charts/*", "components/coaching/*"],
39
+ components: [
40
+ "apps/web/app/lucern/mc/analytics/page.tsx",
41
+ "apps/web/app/lucern/tenant/_components/people/*"
42
+ ],
40
43
  convex: [
41
- "convex/users.ts",
42
- "convex/userAnalytics.ts",
43
- "convex/projectCards.ts"
44
+ "services/master-control/convex/identity.ts",
45
+ "services/master-control/convex/groups.ts",
46
+ "packages/reasoning-kernel/src/adapters/telemetry.ts"
44
47
  ],
45
- tools: []
48
+ tools: [
49
+ "packages/server-core/src/identity.ts",
50
+ "packages/mcp/src/handlers/observations.ts"
51
+ ]
46
52
  },
47
53
  policyProfile: {
48
54
  audiences: ["internal", "tenant_admin"],
@@ -57,13 +63,10 @@ var teamAnalysisV1Manifest = defineAppPackManifest({
57
63
  requiredEdgeTypes: ["informs", "tests"],
58
64
  requiredTables: [
59
65
  "users",
60
- "userEpistemicJourney",
61
66
  "epistemicAudit",
62
- "proposalEvents",
63
- "biSuggestions",
64
67
  "beliefConfidence",
65
68
  "contradictions",
66
- "worktrees",
69
+ "calibrationScores",
67
70
  "tasks"
68
71
  ],
69
72
  projectionBehavior: "none"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/team-analysis-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,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AAE;AAAA,MACzD,EAAE,QAAA,EAAU,cAAA,EAAgB,OAAA,EAAS,CAAC,MAAM,CAAA,EAAE;AAAA,MAC9C,EAAE,QAAA,EAAU,SAAA,EAAW,OAAA,EAAS,CAAC,MAAM,CAAA;AAAE;AAC3C,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,iBAAA,EAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,UAAU,CAAA;AAAA,IACpD,iBAAA,EAAmB,CAAC,SAAA,EAAW,OAAO,CAAA;AAAA,IACtC,cAAA,EAAgB;AAAA,MACd,OAAA;AAAA,MACA,sBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,gBAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,yBAAA,EAA2B,4BAA4B,CAAA;AAAA,IACnE,OAAA,EAAS,CAAC,uBAAA,EAAyB,+BAA+B,CAAA;AAAA,IAClE,OAAA,EAAS,CAAC,uBAAuB,CAAA;AAAA,IACjC,QAAA,EAAU,CAAC,MAAA,EAAQ,UAAA,EAAY,gBAAgB,UAAU;AAAA,GAC3D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kBAAkB,CAAA;AAAA,IAC3B,MAAA,EAAQ,CAAC,4BAA4B,CAAA;AAAA,IACrC,QAAA,EAAU,CAAC,gCAAgC;AAAA,GAC7C;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":"team-analysis-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: team-analysis-v1\n *\n * Declarative runtime contract for the team-analysis-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const teamAnalysisV1Manifest = defineAppPackManifest({\n key: \"team-analysis-v1\",\n name: \"Team Analysis\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"analytics\",\n description:\n \"Team-level behavioral analytics, archetype distribution, and comparative operating patterns.\",\n dependencies: [\"user-profiles-v1\"],\n capabilityFlags: [\n \"team.analytics\",\n \"team.behavioral-summary\",\n \"team.archetype-distribution\",\n \"team.activity-heatmap\",\n ],\n routeNamespace: {\n web: [\"/(team)/team\"],\n api: [\"/api/coaching/*\"],\n },\n surfaces: {\n components: [\"components/charts/*\", \"components/coaching/*\"],\n convex: [\n \"convex/users.ts\",\n \"convex/userAnalytics.ts\",\n \"convex/projectCards.ts\",\n ],\n tools: [],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n { resource: \"team_analytics\", actions: [\"read\", \"admin\"] },\n { resource: \"user_profile\", actions: [\"read\"] },\n { resource: \"project\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\"],\n requiredEdgeTypes: [\"informs\", \"tests\"],\n requiredTables: [\n \"users\",\n \"userEpistemicJourney\",\n \"epistemicAudit\",\n \"proposalEvents\",\n \"biSuggestions\",\n \"beliefConfidence\",\n \"contradictions\",\n \"worktrees\",\n \"tasks\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"team/behavioral-summary\", \"team/coverage-gap-analysis\"],\n prompts: [\"coaching/team-summary\", \"coaching/team-recommendations\"],\n reports: [\"team-operating-review\"],\n uiLabels: [\"team\", \"behavior\", \"distribution\", \"coverage\"],\n },\n testSuite: {\n parity: [\"team-page-parity\"],\n policy: [\"team-analytics-admin-scope\"],\n contract: [\"team-analysis-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/team-analysis-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,oB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BAAA,EAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,UAAU,CAAA;AAAA,IACpD,iBAAA,EAAmB,CAAC,SAAA,EAAW,OAAO,CAAA;AAAA,IACtC,cAAA,EAAgB;AAAA,MACd,OAAA;AAAA,MACA,gBAAA;AAAA,MACA,kBAAA;AAAA,MACA,gBAAA;AAAA,MACA,mBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,yBAAA,EAA2B,4BAA4B,CAAA;AAAA,IACnE,OAAA,EAAS,CAAC,uBAAA,EAAyB,+BAA+B,CAAA;AAAA,IAClE,OAAA,EAAS,CAAC,uBAAuB,CAAA;AAAA,IACjC,QAAA,EAAU,CAAC,MAAA,EAAQ,UAAA,EAAY,gBAAgB,UAAU;AAAA,GAC3D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kBAAkB,CAAA;AAAA,IAC3B,MAAA,EAAQ,CAAC,4BAA4B,CAAA;AAAA,IACrC,QAAA,EAAU,CAAC,gCAAgC;AAAA,GAC7C;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":"team-analysis-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: team-analysis-v1\n *\n * Declarative runtime contract for the team-analysis-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const teamAnalysisV1Manifest = defineAppPackManifest({\n key: \"team-analysis-v1\",\n name: \"Team Analysis\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"analytics\",\n description:\n \"Team-level behavioral analytics, archetype distribution, and comparative operating patterns.\",\n dependencies: [\"user-profiles-v1\"],\n capabilityFlags: [\n \"team.analytics\",\n \"team.behavioral-summary\",\n \"team.archetype-distribution\",\n \"team.activity-heatmap\",\n ],\n routeNamespace: {\n web: [\"/(team)/team\"],\n api: [\"/api/coaching/*\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/mc/analytics/page.tsx\",\n \"apps/web/app/lucern/tenant/_components/people/*\",\n ],\n convex: [\n \"services/master-control/convex/identity.ts\",\n \"services/master-control/convex/groups.ts\",\n \"packages/reasoning-kernel/src/adapters/telemetry.ts\",\n ],\n tools: [\n \"packages/server-core/src/identity.ts\",\n \"packages/mcp/src/handlers/observations.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n { resource: \"team_analytics\", actions: [\"read\", \"admin\"] },\n { resource: \"user_profile\", actions: [\"read\"] },\n { resource: \"project\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\"],\n requiredEdgeTypes: [\"informs\", \"tests\"],\n requiredTables: [\n \"users\",\n \"epistemicAudit\",\n \"beliefConfidence\",\n \"contradictions\",\n \"calibrationScores\",\n \"tasks\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"team/behavioral-summary\", \"team/coverage-gap-analysis\"],\n prompts: [\"coaching/team-summary\", \"coaching/team-recommendations\"],\n reports: [\"team-operating-review\"],\n uiLabels: [\"team\", \"behavior\", \"distribution\", \"coverage\"],\n },\n testSuite: {\n parity: [\"team-page-parity\"],\n policy: [\"team-analytics-admin-scope\"],\n contract: [\"team-analysis-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -49,22 +49,19 @@ var themesV1Manifest = defineAppPackManifest({
49
49
  },
50
50
  surfaces: {
51
51
  components: [
52
- "components/project/*",
53
- "components/belief/*",
54
- "components/question/*",
55
- "components/research/*",
56
- "components/reports/*"
52
+ "apps/web/app/lucern/tenant/_components/graph/*",
53
+ "apps/web/app/lucern/tenant/_components/workspaces/*"
57
54
  ],
58
55
  convex: [
59
- "convex/themes.ts",
60
- "convex/projects.ts",
61
- "convex/thematicWorkflow.ts",
62
- "convex/reports.ts"
56
+ "packages/reasoning-kernel/src/adapters/topics.ts",
57
+ "packages/reasoning-kernel/src/adapters/beliefs.ts",
58
+ "packages/reasoning-kernel/src/adapters/questions.ts",
59
+ "packages/reasoning-kernel/src/adapters/evidence.ts"
63
60
  ],
64
61
  tools: [
65
- "lib/ai/tools/belief-tools.ts",
66
- "lib/ai/tools/question-tools.ts",
67
- "lib/ai/tools/navigation-tools.ts"
62
+ "packages/mcp/src/handlers/beliefs.ts",
63
+ "packages/mcp/src/handlers/questions.ts",
64
+ "packages/mcp/src/handlers/evidence.ts"
68
65
  ]
69
66
  },
70
67
  policyProfile: {
@@ -80,12 +77,11 @@ var themesV1Manifest = defineAppPackManifest({
80
77
  requiredNodeTypes: ["theme", "belief", "question", "evidence", "synthesis"],
81
78
  requiredEdgeTypes: ["belongs_to", "relates_to_thesis", "informs", "tests"],
82
79
  requiredTables: [
83
- "projects",
80
+ "topics",
84
81
  "epistemicNodes",
85
82
  "epistemicEdges",
86
- "reports",
87
- "reportSections",
88
- "reportTemplates"
83
+ "workflowDefinitions",
84
+ "workflowStages"
89
85
  ],
90
86
  projectionBehavior: "projection_required"
91
87
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/themes-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,mBAAmB,qBAAA,CAAsB;AAAA,EACpD,GAAA,EAAK,WAAA;AAAA,EACL,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,OAAA;AAAA,EACT,SAAA,EAAW,QAAA;AAAA,EACX,QAAA,EAAU,QAAA;AAAA,EACV,WAAA,EACE,sGAAA;AAAA,EACF,YAAA,EAAc;AAAA,IACZ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,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,mBAAmB,CAAC,OAAA,EAAS,QAAA,EAAU,UAAA,EAAY,YAAY,WAAW,CAAA;AAAA,IAC1E,iBAAA,EAAmB,CAAC,YAAA,EAAc,mBAAA,EAAqB,WAAW,OAAO,CAAA;AAAA,IACzE,cAAA,EAAgB;AAAA,MACd,UAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,SAAA;AAAA,MACA,gBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,0BAAA,EAA4B,6BAA6B,CAAA;AAAA,IACrE,OAAA,EAAS;AAAA,MACP,oBAAA;AAAA,MACA,6CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,oBAAA,EAAsB,eAAe,CAAA;AAAA,IAC/C,UAAU,CAAC,OAAA,EAAS,QAAA,EAAU,UAAA,EAAY,YAAY,YAAY;AAAA,GACpE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kCAAkC,CAAA;AAAA,IAC3C,MAAA,EAAQ,CAAC,yCAAyC,CAAA;AAAA,IAClD,QAAA,EAAU,CAAC,yBAAyB;AAAA,GACtC;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":"themes-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: themes-v1\n *\n * Declarative runtime contract for the themes-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const themesV1Manifest = defineAppPackManifest({\n key: \"themes-v1\",\n name: \"Themes\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"domain\",\n description:\n \"Thematic research lifecycle built on graph primitives, worktree workflows, and conviction analytics.\",\n dependencies: [\n \"chat-v1\",\n \"epistemic-algorithms-v1\",\n \"news-v1\",\n \"documents-v1\",\n ],\n capabilityFlags: [\n \"theme.lifecycle\",\n \"belief.question.evidence\",\n \"thesis.development\",\n \"reporting\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects\",\n \"/(projects)/projects/[projectId]\",\n \"/(projects)/projects/[projectId]/beliefs-v2\",\n \"/(projects)/projects/[projectId]/questions\",\n \"/(projects)/projects/[projectId]/research\",\n \"/(projects)/projects/[projectId]/reports\",\n ],\n api: [\"/api/research/*\", \"/api/reports/*\", \"/api/questions/*\"],\n },\n surfaces: {\n components: [\n \"components/project/*\",\n \"components/belief/*\",\n \"components/question/*\",\n \"components/research/*\",\n \"components/reports/*\",\n ],\n convex: [\n \"convex/themes.ts\",\n \"convex/projects.ts\",\n \"convex/thematicWorkflow.ts\",\n \"convex/reports.ts\",\n ],\n tools: [\n \"lib/ai/tools/belief-tools.ts\",\n \"lib/ai/tools/question-tools.ts\",\n \"lib/ai/tools/navigation-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\", \"public\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"edge\", actions: [\"read\", \"mutate\"] },\n { resource: \"report_section\", actions: [\"read\", \"summarize\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"theme\", \"belief\", \"question\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"belongs_to\", \"relates_to_thesis\", \"informs\", \"tests\"],\n requiredTables: [\n \"projects\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"reports\",\n \"reportSections\",\n \"reportTemplates\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"themes/default-lifecycle\", \"themes/worktree-thesis-loop\"],\n prompts: [\n \"thematic/extractor\",\n \"reports/thematic-long-form/thesis-statement\",\n \"reports/thematic-long-form/belief-map\",\n ],\n reports: [\"thematic-long-form\", \"knowledge-map\"],\n uiLabels: [\"theme\", \"belief\", \"question\", \"evidence\", \"conviction\"],\n },\n testSuite: {\n parity: [\"themes-v1-parity-against-current\"],\n policy: [\"theme-compilation-entitlement-filtering\"],\n contract: [\"themes-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/themes-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,GA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AAC,OAAA,EAAS,QAAA,EAAU,UAAA,EAAY,YAAY,YAAY;AAAA,GACpE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kCAAkC,CAAA;AAAA,IAC3C,MAAA,EAAQ,CAAC,yCAAyC,CAAA;AAAA,IAClD,QAAA,EAAU,CAAC,yBAAyB;AAAA,GACtC;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":"themes-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: themes-v1\n *\n * Declarative runtime contract for the themes-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const themesV1Manifest = defineAppPackManifest({\n key: \"themes-v1\",\n name: \"Themes\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"domain\",\n description:\n \"Thematic research lifecycle built on graph primitives, worktree workflows, and conviction analytics.\",\n dependencies: [\n \"chat-v1\",\n \"epistemic-algorithms-v1\",\n \"news-v1\",\n \"documents-v1\",\n ],\n capabilityFlags: [\n \"theme.lifecycle\",\n \"belief.question.evidence\",\n \"thesis.development\",\n \"reporting\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects\",\n \"/(projects)/projects/[projectId]\",\n \"/(projects)/projects/[projectId]/beliefs-v2\",\n \"/(projects)/projects/[projectId]/questions\",\n \"/(projects)/projects/[projectId]/research\",\n \"/(projects)/projects/[projectId]/reports\",\n ],\n api: [\"/api/research/*\", \"/api/reports/*\", \"/api/questions/*\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/graph/*\",\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/beliefs.ts\",\n \"packages/reasoning-kernel/src/adapters/questions.ts\",\n \"packages/reasoning-kernel/src/adapters/evidence.ts\",\n ],\n tools: [\n \"packages/mcp/src/handlers/beliefs.ts\",\n \"packages/mcp/src/handlers/questions.ts\",\n \"packages/mcp/src/handlers/evidence.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\", \"public\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"edge\", actions: [\"read\", \"mutate\"] },\n { resource: \"report_section\", actions: [\"read\", \"summarize\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"theme\", \"belief\", \"question\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"belongs_to\", \"relates_to_thesis\", \"informs\", \"tests\"],\n requiredTables: [\n \"topics\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"workflowDefinitions\",\n \"workflowStages\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"themes/default-lifecycle\", \"themes/worktree-thesis-loop\"],\n prompts: [\n \"thematic/extractor\",\n \"reports/thematic-long-form/thesis-statement\",\n \"reports/thematic-long-form/belief-map\",\n ],\n reports: [\"thematic-long-form\", \"knowledge-map\"],\n uiLabels: [\"theme\", \"belief\", \"question\", \"evidence\", \"conviction\"],\n },\n testSuite: {\n parity: [\"themes-v1-parity-against-current\"],\n policy: [\"theme-compilation-entitlement-filtering\"],\n contract: [\"themes-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -37,16 +37,15 @@ var userProfilesV1Manifest = defineAppPackManifest({
37
37
  },
38
38
  surfaces: {
39
39
  components: [
40
- "components/user/*",
41
- "components/philosophy/ArchetypeDisplay.tsx"
40
+ "apps/web/app/lucern/tenant/_components/people/*",
41
+ "apps/web/app/lucern/tenant/people/page.tsx"
42
42
  ],
43
43
  convex: [
44
- "convex/users.ts",
45
- "convex/userJourney.ts",
46
- "convex/userSessions.ts",
47
- "convex/userAnalytics.ts"
44
+ "services/master-control/convex/identity.ts",
45
+ "services/master-control/convex/userSessions.ts",
46
+ "services/master-control/convex/groups.ts"
48
47
  ],
49
- tools: []
48
+ tools: ["packages/server-core/src/identity.ts"]
50
49
  },
51
50
  policyProfile: {
52
51
  audiences: ["internal", "tenant_admin"],
@@ -65,13 +64,10 @@ var userProfilesV1Manifest = defineAppPackManifest({
65
64
  requiredEdgeTypes: [],
66
65
  requiredTables: [
67
66
  "users",
68
- "userEpistemicJourney",
69
67
  "userSessions",
70
- "investorProfiles",
71
- "investorProfileAtoms",
72
- "voiceProfiles",
73
- "userVoiceSettings",
74
- "archetypeHistory"
68
+ "principals",
69
+ "principalIdentityAliases",
70
+ "calibrationScores"
75
71
  ],
76
72
  projectionBehavior: "none"
77
73
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/contracts.ts","../../src/manifests/user-profiles-v1.ts"],"names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AAA,IAC5C,QAAA,EAAU,CAAC,gCAAgC;AAAA,GAC7C;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":"user-profiles-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: user-profiles-v1\n *\n * Declarative runtime contract for the user-profiles-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const userProfilesV1Manifest = defineAppPackManifest({\n key: \"user-profiles-v1\",\n name: \"User Profiles\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"identity\",\n description:\n \"Individual cognition and operating profile layer including journey progression, archetypes, and behavioral telemetry.\",\n dependencies: [],\n capabilityFlags: [\n \"user.profile\",\n \"user.journey\",\n \"user.analytics\",\n \"voice.preferences\",\n ],\n routeNamespace: {\n web: [\"/(team)/team/[userId]\"],\n api: [\"/api/philosophy/get-profile\", \"/api/mobile/v1/session\"],\n },\n surfaces: {\n components: [\n \"components/user/*\",\n \"components/philosophy/ArchetypeDisplay.tsx\",\n ],\n convex: [\n \"convex/users.ts\",\n \"convex/userJourney.ts\",\n \"convex/userSessions.ts\",\n \"convex/userAnalytics.ts\",\n ],\n tools: [],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n {\n resource: \"user_profile\",\n actions: [\"read\", \"mutate\"],\n notes: \"Users can edit self; tenant admins can read broader profiles.\",\n },\n { resource: \"project\", actions: [\"read\"] },\n { resource: \"team_analytics\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [],\n requiredEdgeTypes: [],\n requiredTables: [\n \"users\",\n \"userEpistemicJourney\",\n \"userSessions\",\n \"investorProfiles\",\n \"investorProfileAtoms\",\n \"voiceProfiles\",\n \"userVoiceSettings\",\n \"archetypeHistory\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"user/profile-synthesis\", \"user/journey-update\"],\n prompts: [\"coaching/user-eval\", \"philosophy/profile-synthesis\"],\n reports: [\"user-profile-summary\"],\n uiLabels: [\"profile\", \"journey\", \"archetype\", \"calibration\"],\n },\n testSuite: {\n parity: [\"user-profile-page-parity\"],\n policy: [\"user-profile-self-vs-admin-access\"],\n contract: [\"user-profiles-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/user-profiles-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,CA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,cAAc,CAAA;AAAA,IACtC,KAAA,EAAO;AAAA,MACL;AAAA,QACE,QAAA,EAAU,cAAA;AAAA,QACV,OAAA,EAAS,CAAC,MAAA,EAAQ,QAAQ,CAAA;AAAA,QAC1B,KAAA,EAAO;AAAA,OACT;AAAA,MACA,EAAE,QAAA,EAAU,SAAA,EAAW,OAAA,EAAS,CAAC,MAAM,CAAA,EAAE;AAAA,MACzC,EAAE,QAAA,EAAU,gBAAA,EAAkB,OAAA,EAAS,CAAC,MAAM,CAAA;AAAE;AAClD,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,mBAAmB,EAAC;AAAA,IACpB,mBAAmB,EAAC;AAAA,IACpB,cAAA,EAAgB;AAAA,MACd,OAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,0BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,wBAAA,EAA0B,qBAAqB,CAAA;AAAA,IAC3D,OAAA,EAAS,CAAC,oBAAA,EAAsB,8BAA8B,CAAA;AAAA,IAC9D,OAAA,EAAS,CAAC,sBAAsB,CAAA;AAAA,IAChC,QAAA,EAAU,CAAC,SAAA,EAAW,SAAA,EAAW,aAAa,aAAa;AAAA,GAC7D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,0BAA0B,CAAA;AAAA,IACnC,MAAA,EAAQ,CAAC,mCAAmC,CAAA;AAAA,IAC5C,QAAA,EAAU,CAAC,gCAAgC;AAAA,GAC7C;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":"user-profiles-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: user-profiles-v1\n *\n * Declarative runtime contract for the user-profiles-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const userProfilesV1Manifest = defineAppPackManifest({\n key: \"user-profiles-v1\",\n name: \"User Profiles\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"identity\",\n description:\n \"Individual cognition and operating profile layer including journey progression, archetypes, and behavioral telemetry.\",\n dependencies: [],\n capabilityFlags: [\n \"user.profile\",\n \"user.journey\",\n \"user.analytics\",\n \"voice.preferences\",\n ],\n routeNamespace: {\n web: [\"/(team)/team/[userId]\"],\n api: [\"/api/philosophy/get-profile\", \"/api/mobile/v1/session\"],\n },\n surfaces: {\n components: [\n \"apps/web/app/lucern/tenant/_components/people/*\",\n \"apps/web/app/lucern/tenant/people/page.tsx\",\n ],\n convex: [\n \"services/master-control/convex/identity.ts\",\n \"services/master-control/convex/userSessions.ts\",\n \"services/master-control/convex/groups.ts\",\n ],\n tools: [\"packages/server-core/src/identity.ts\"],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n {\n resource: \"user_profile\",\n actions: [\"read\", \"mutate\"],\n notes: \"Users can edit self; tenant admins can read broader profiles.\",\n },\n { resource: \"project\", actions: [\"read\"] },\n { resource: \"team_analytics\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [],\n requiredEdgeTypes: [],\n requiredTables: [\n \"users\",\n \"userSessions\",\n \"principals\",\n \"principalIdentityAliases\",\n \"calibrationScores\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"user/profile-synthesis\", \"user/journey-update\"],\n prompts: [\"coaching/user-eval\", \"philosophy/profile-synthesis\"],\n reports: [\"user-profile-summary\"],\n uiLabels: [\"profile\", \"journey\", \"archetype\", \"calibration\"],\n },\n testSuite: {\n parity: [\"user-profile-page-parity\"],\n policy: [\"user-profile-self-vs-admin-access\"],\n contract: [\"user-profiles-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
@@ -11,4 +11,5 @@ export { taskManagementV1Manifest } from './manifests/task-management-v1.js';
11
11
  export { teamAnalysisV1Manifest } from './manifests/team-analysis-v1.js';
12
12
  export { themesV1Manifest } from './manifests/themes-v1.js';
13
13
  export { userProfilesV1Manifest } from './manifests/user-profiles-v1.js';
14
+ export { worktreesV1Manifest } from './manifests/sprints-v1.js';
14
15
  import './contracts.js';