@runfusion/fusion 0.76.0-beta.1 → 0.76.0-beta.3
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.
- package/dist/bin.js +826 -272
- package/dist/child-process-worker.js +740 -249
- package/dist/client/.vite/manifest.json +261 -261
- package/dist/client/assets/{AgentDetailView-Cbl1sw6i.js → AgentDetailView-T767kKTg.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-DD1U5M9p.js → AgentPermissionPolicyEditor--u9jyUf2.js} +1 -1
- package/dist/client/assets/{AgentsView-BMcCbple.js → AgentsView-6Ifu7qDr.js} +5 -5
- package/dist/client/assets/ChatView-BV3lixQi.js +13 -0
- package/dist/client/assets/{CommandCenter-D7mcD61V.js → CommandCenter-CSRYoveB.js} +1 -1
- package/dist/client/assets/{DevServerView-DaqCn0p5.js → DevServerView-B9So_oYx.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-CLdqqqYN.js → DirectoryPicker-BhyDL_2m.js} +1 -1
- package/dist/client/assets/{DocumentsView-BOROVxPm.js → DocumentsView-pbERA7O-.js} +1 -1
- package/dist/client/assets/{EvalsView-BQMXRUlQ.js → EvalsView-DJQ4ltCg.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-1GNeCIQT.js → ExperimentalAgentOnboardingModal-BwJuzkzB.js} +1 -1
- package/dist/client/assets/{GoalsView-Cr3c_2GC.js → GoalsView-B6X5_0Ve.js} +1 -1
- package/dist/client/assets/InsightsView-CJgI0J7S.js +11 -0
- package/dist/client/assets/{InsightsView-Gn5lOBA0.css → InsightsView-DAAXuX4v.css} +1 -1
- package/dist/client/assets/{MemoryView-C0VzzMSw.js → MemoryView-BHq1AHPu.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-D1kkkVtP.js → PiExtensionsManager-B8At6fO8.js} +1 -1
- package/dist/client/assets/{PluginManager-BW-_Zyo5.js → PluginManager-k7hV7_9e.js} +1 -1
- package/dist/client/assets/{PullRequestView-Cmlo4nWA.js → PullRequestView-B1hZFrWo.js} +1 -1
- package/dist/client/assets/{ReportModal-BWuaroTF.js → ReportModal-C46V_zEa.js} +1 -1
- package/dist/client/assets/{ResearchView-BmkF_vZU.js → ResearchView-D8G85BYN.js} +2 -2
- package/dist/client/assets/{SecretsView-DVc8Hky0.js → SecretsView-CTri9LRK.js} +1 -1
- package/dist/client/assets/{SessionTerminal-DCXrxA57.js → SessionTerminal-BRf6r4Vp.js} +1 -1
- package/dist/client/assets/SettingsModal-D0RBeZik.js +21 -0
- package/dist/client/assets/{SettingsModal-DqwpLnDU.js → SettingsModal-rUQcSTJp.js} +1 -1
- package/dist/client/assets/{SettingsTextareaRow-B5spAoOY.js → SettingsTextareaRow-BirlBcem.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-VTBLyFzr.js → SetupWizardModal-xnCBM9EL.js} +2 -2
- package/dist/client/assets/{SkillsView-CR91ey9d.js → SkillsView-O5U0ep50.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-BzGh_Fd9.js → WorkflowNodeEditor-BX4d2qqF.js} +3 -3
- package/dist/client/assets/{agent-import-generation-D27NKQsr.js → agent-import-generation-DnqVkPkz.js} +1 -1
- package/dist/client/assets/{agentsOrgChartLayout-C2K_M3x3.js → agentsOrgChartLayout-CKuzbhFf.js} +1 -1
- package/dist/client/assets/app-B2FwULu2.js +5 -0
- package/dist/client/assets/{app-BA9gw9hx.js → app-B6nJaqAl.js} +2 -2
- package/dist/client/assets/{app-B_lScKc1.js → app-CGXZeIRc.js} +2 -2
- package/dist/client/assets/{app-DG_vjDw5.js → app-CGtkeBF5.js} +3 -3
- package/dist/client/assets/{app-GBgoY-oh.js → app-CNzN1Plu.js} +2 -2
- package/dist/client/assets/{app-B0KFGP8D.js → app-DLs-f5yM.js} +3 -3
- package/dist/client/assets/{app-DeHIOCEP.js → app-DsvtcRUG.js} +2 -2
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-BQy8UcRx.js → architectureDiagram-3BPJPVTR-gi467xY0.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-CZG1bqFQ.js → blockDiagram-GPEHLZMM-B_gpcYiR.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-CZmO_kg3.js → c4Diagram-AAUBKEIU-DeylEYsQ.js} +1 -1
- package/dist/client/assets/channel-BoE8DeM4.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-jsad6DTE.js → chunk-2J33WTMH-BL2WY0HN.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-DX7SuvwP.js → chunk-4BX2VUAB-BkLExGMe.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-De20xFgU.js → chunk-55IACEB6-CSTvCF5T.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CNiri9yW.js → chunk-727SXJPM-9J8pKk4x.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-DvDqG-ax.js → chunk-AQP2D5EJ-DXC1vPWr.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-DkMdKaUq.js → chunk-FMBD7UC4-CFRUb-zD.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-Do5BwIrI.js → chunk-ND2GUHAM-B87HFYS8.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-BnJgt9vl.js → chunk-QZHKN3VN-CTjHiGbd.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-qnbLX_9_.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-qnbLX_9_.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-D-ivAzzF.js → cose-bilkent-S5V4N54A-D3Edq3L9.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-Bpd9L0or.js → dagre-BM42HDAG-CwwbeQfN.js} +1 -1
- package/dist/client/assets/{dashboard-view-CgBo8Ctn.js → dashboard-view-BLAoW3D4.js} +1 -1
- package/dist/client/assets/{dashboard-view-DbaRE8Ma.js → dashboard-view-DAlJxqiJ.js} +1 -1
- package/dist/client/assets/{dashboard-view-DSvVO6Vr.js → dashboard-view-QxQwJFLz.js} +1 -1
- package/dist/client/assets/{dashboard-view-C-XU9CVv.js → dashboard-view-aPzfv99T.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-B6TT1NWU.js → diagram-2AECGRRQ-koJWWXE4.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-DpRS2yRw.js → diagram-5GNKFQAL-Yob5cOKT.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-BVbZr02C.js → diagram-KO2AKTUF-DelvFSkK.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-DzENbfal.js → diagram-LMA3HP47-CMput2h2.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-BIePG5SY.js → diagram-OG6HWLK6-04VXDl79.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-CQo3WBwo.js → erDiagram-TEJ5UH35-C9iP8Uyp.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-Ct2H4jYo.js → flowDiagram-I6XJVG4X-DENQvu_t.js} +1 -1
- package/dist/client/assets/{folder-open-DAh8mpTX.js → folder-open-D-554oji.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-DyOLCG4B.js → ganttDiagram-6RSMTGT7-BqOttZAT.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-sC28-su3.js → gitGraphDiagram-PVQCEYII-CDcydi-5.js} +1 -1
- package/dist/client/assets/{index-BzAldNrK.css → index-CXTd3LAB.css} +1 -1
- package/dist/client/assets/index-CtYRoouR.js +2818 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-Q81_5aBZ.js → infoDiagram-5YYISTIA-B5LQQnxt.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-Cwkjs0z5.js → ishikawaDiagram-YF4QCWOH-DpFEt7D2.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-BXcBV1Bc.js → journeyDiagram-JHISSGLW-MELtgu22.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-BI7hW892.js → kanban-definition-UN3LZRKU-h33PLATd.js} +1 -1
- package/dist/client/assets/{mermaid.core-B8oDA6jj.js → mermaid.core-Dk2mUPOq.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-COG6_9eD.js → mindmap-definition-RKZ34NQL-B_T4O2-B.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-D11brZ_N.js → pieDiagram-4H26LBE5-B1YIFkRl.js} +1 -1
- package/dist/client/assets/{puzzle-D3_Z_rlW.js → puzzle-hvecxlpJ.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-jmhDVZcv.js → quadrantDiagram-W4KKPZXB-BoGQR_hO.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BKCUWI1E.js → requirementDiagram-4Y6WPE33-BSDmUBIx.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-HsZdEl2t.js → sankeyDiagram-5OEKKPKP-Dz_GqOa5.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-CsDf7Fup.js → sequenceDiagram-3UESZ5HK-B6twjYUH.js} +1 -1
- package/dist/client/assets/{shield-alert-C16k8wNu.js → shield-alert-BX4WRJOv.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-BqAyftqe.js → standing-instructions-template-BJY317CC.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-fvzWhltB.js → stateDiagram-AJRCARHV-DuwqWLx-.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-cnt42Sr_.js → stateDiagram-v2-BHNVJYJU-Bu8Sk187.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-DsZFCSMb.js → timeline-definition-PNZ67QCA-BS6VnqSI.js} +1 -1
- package/dist/client/assets/{upload-_s5sL5Pq.js → upload-CaDoyaMW.js} +1 -1
- package/dist/client/assets/{users-DH1U5ISc.js → users-C5uCLwVM.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-B3KDWS-e.js → vennDiagram-CIIHVFJN-CUbzqT5Y.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-BKs5MtQS.js → wardley-L42UT6IY-Mv-NotFS.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-CNsEoXVB.js → wardleyDiagram-YWT4CUSO-DuYpvLZX.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-kq_gW4QC.js → xychartDiagram-2RQKCTM6-24_7QXdw.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/droid-cli/package.json +1 -1
- package/dist/extension.js +932 -254
- package/dist/migrations/0057_fn_9004_project_ownership_default_reconciliation.sql +13 -0
- package/dist/migrations/0058_fn_9014_message_archive.sql +13 -0
- package/dist/pi-claude-cli/package.json +5 -5
- package/dist/plugin-sdk/index.d.ts +23 -0
- package/dist/plugin-sdk/index.js +71 -23
- package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
- package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
- package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
- package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +73 -25
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-linear-import/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
- package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-quality/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-quality/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-reports/package.json +1 -1
- package/dist/plugins/fusion-plugin-roadmap/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
- package/dist/plugins/fusion-plugin-todos/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-todos/package.json +1 -1
- package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +71 -23
- package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
- package/package.json +3 -3
- package/skill/fusion/SKILL.md +1 -1
- package/skill/fusion/references/extension-tools.md +22 -0
- package/skill/fusion/references/fusion-capabilities.md +2 -0
- package/dist/client/assets/ChatView-DcM-ARpZ.js +0 -13
- package/dist/client/assets/InsightsView-DgVBVQM4.js +0 -11
- package/dist/client/assets/SettingsModal-DZ32F1c-.js +0 -21
- package/dist/client/assets/app-DBCGrz-f.js +0 -5
- package/dist/client/assets/channel-Cwl9FefC.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-BZtWCoHC.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-BZtWCoHC.js +0 -1
- package/dist/client/assets/index-BlGpMJSZ.js +0 -2818
|
@@ -6113,9 +6113,14 @@ var config = projectSchema.table("config", {
|
|
|
6113
6113
|
// now keyed per-project on `project_id` (the effective PK). `id` is retained
|
|
6114
6114
|
// for column-shape parity (always 1) but is no longer the PK and no longer
|
|
6115
6115
|
// CHECK-constrained. Single-project / SQLite-parity callers leave project_id
|
|
6116
|
-
//
|
|
6116
|
+
// through the database ownership trigger, preserving the pre-isolation behavior.
|
|
6117
|
+
/*
|
|
6118
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
6119
|
+
Migration 0006 owns config's project_id default and leaves its catalog PK as (project_id).
|
|
6120
|
+
Drizzle emits DEFAULT while the database GUC/trigger selects the effective ownership partition.
|
|
6121
|
+
*/
|
|
6117
6122
|
id: integer("id").default(1),
|
|
6118
|
-
projectId: text("project_id").notNull().default(
|
|
6123
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`).primaryKey(),
|
|
6119
6124
|
nextId: integer("next_id").default(1),
|
|
6120
6125
|
nextWorkflowStepId: integer("next_workflow_step_id").default(1),
|
|
6121
6126
|
// FNXC:SqliteFinalRemoval 2026-06-28:
|
|
@@ -6509,9 +6514,13 @@ var taskCommitAssociations = projectSchema.table("task_commit_associations", {
|
|
|
6509
6514
|
var automations = projectSchema.table("automations", {
|
|
6510
6515
|
/*
|
|
6511
6516
|
* FNXC:AutomationIsolation 2026-07-13-22:37:
|
|
6512
|
-
* Automations are partitioned by the AsyncDataLayer's project ID because embedded PostgreSQL consolidates the per-project SQLite files into one table. The composite key deliberately permits the same automation ID in two projects without allowing either project's CRUD or cron-claim path to address the other row.
|
|
6517
|
+
* Automations are partitioned by the AsyncDataLayer's project ID because embedded PostgreSQL consolidates the per-project SQLite files into one table. The composite key deliberately permits the same automation ID in two projects without allowing either project's CRUD or cron-claim path to address the other row.
|
|
6518
|
+
*
|
|
6519
|
+
* FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
6520
|
+
* Migration 0006 owns the default through the database GUC/trigger; Drizzle emits DEFAULT
|
|
6521
|
+
* without replacing the physical legacy fallback or the fail-closed bound writer contract.
|
|
6513
6522
|
*/
|
|
6514
|
-
projectId: text("project_id").notNull().default(
|
|
6523
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
6515
6524
|
id: text("id").notNull(),
|
|
6516
6525
|
name: text("name").notNull(),
|
|
6517
6526
|
description: text("description"),
|
|
@@ -6810,7 +6819,8 @@ var taskDocuments = projectSchema.table("task_documents", {
|
|
|
6810
6819
|
index("idxTaskDocumentsTaskId").on(t.taskId)
|
|
6811
6820
|
]);
|
|
6812
6821
|
var artifacts = projectSchema.table("artifacts", {
|
|
6813
|
-
|
|
6822
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
6823
|
+
id: text("id").notNull(),
|
|
6814
6824
|
type: text("type").notNull(),
|
|
6815
6825
|
title: text("title").notNull(),
|
|
6816
6826
|
description: text("description"),
|
|
@@ -6825,7 +6835,8 @@ var artifacts = projectSchema.table("artifacts", {
|
|
|
6825
6835
|
createdAt: text("created_at").notNull(),
|
|
6826
6836
|
updatedAt: text("updated_at").notNull()
|
|
6827
6837
|
}, (t) => [
|
|
6828
|
-
|
|
6838
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
6839
|
+
foreignKey({ name: "artifacts_task_id_fkey", columns: [t.projectId, t.taskId], foreignColumns: [tasks.projectId, tasks.id] }).onDelete("cascade"),
|
|
6829
6840
|
index("idxArtifactsTaskId").on(t.taskId),
|
|
6830
6841
|
index("idxArtifactsAuthorId").on(t.authorId),
|
|
6831
6842
|
index("idxArtifactsType").on(t.type),
|
|
@@ -7015,7 +7026,8 @@ var evalRunEvents = projectSchema.table("eval_run_events", {
|
|
|
7015
7026
|
index("idxEvalRunEventsRunIdSeq").on(t.runId, t.seq)
|
|
7016
7027
|
]);
|
|
7017
7028
|
var secrets = projectSchema.table("secrets", {
|
|
7018
|
-
|
|
7029
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7030
|
+
id: text("id").notNull(),
|
|
7019
7031
|
key: text("key").notNull(),
|
|
7020
7032
|
valueCiphertext: bytea("value_ciphertext").notNull(),
|
|
7021
7033
|
nonce: bytea("nonce").notNull(),
|
|
@@ -7028,7 +7040,8 @@ var secrets = projectSchema.table("secrets", {
|
|
|
7028
7040
|
lastReadAt: text("last_read_at"),
|
|
7029
7041
|
lastReadBy: text("last_read_by")
|
|
7030
7042
|
}, (t) => [
|
|
7031
|
-
|
|
7043
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7044
|
+
unique("secrets_key_unique").on(t.projectId, t.key),
|
|
7032
7045
|
check("secrets_access_policy_check", sql`${t.accessPolicy} IN ('auto', 'prompt', 'deny')`),
|
|
7033
7046
|
check("secrets_env_exportable_check", sql`${t.envExportable} IN (0, 1)`)
|
|
7034
7047
|
]);
|
|
@@ -7070,10 +7083,11 @@ var missions = projectSchema.table("missions", {
|
|
|
7070
7083
|
updatedAt: text("updated_at").notNull()
|
|
7071
7084
|
}, (t) => [primaryKey({ columns: [t.projectId, t.id] })]);
|
|
7072
7085
|
var branchGroups = projectSchema.table("branch_groups", {
|
|
7073
|
-
|
|
7086
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7087
|
+
id: text("id").notNull(),
|
|
7074
7088
|
sourceType: text("source_type").notNull(),
|
|
7075
7089
|
sourceId: text("source_id").notNull(),
|
|
7076
|
-
branchName: text("branch_name").notNull()
|
|
7090
|
+
branchName: text("branch_name").notNull(),
|
|
7077
7091
|
worktreePath: text("worktree_path"),
|
|
7078
7092
|
autoMerge: integer("auto_merge").notNull().default(0),
|
|
7079
7093
|
prState: text("pr_state").notNull().default("none"),
|
|
@@ -7089,6 +7103,8 @@ var branchGroups = projectSchema.table("branch_groups", {
|
|
|
7089
7103
|
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
7090
7104
|
closedAt: bigint("closed_at", { mode: "number" })
|
|
7091
7105
|
}, (t) => [
|
|
7106
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7107
|
+
unique("branch_groups_branch_name_key").on(t.projectId, t.branchName),
|
|
7092
7108
|
check("branch_groups_source_type_check", sql`${t.sourceType} IN ('mission','planning','new-task')`),
|
|
7093
7109
|
check("branch_groups_pr_state_check", sql`${t.prState} IN ('none','open','merged','closed')`),
|
|
7094
7110
|
check("branch_groups_status_check", sql`${t.status} IN ('open','finalized','abandoned')`),
|
|
@@ -7490,12 +7506,14 @@ var usageEvents = projectSchema.table("usage_events", {
|
|
|
7490
7506
|
index("idxUsageEventsKindTs").on(t.kind, t.ts)
|
|
7491
7507
|
]);
|
|
7492
7508
|
var pluginActivations = projectSchema.table("plugin_activations", {
|
|
7493
|
-
|
|
7509
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7510
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7494
7511
|
pluginId: text("plugin_id").notNull(),
|
|
7495
7512
|
source: text("source").notNull(),
|
|
7496
7513
|
pluginVersion: text("plugin_version"),
|
|
7497
7514
|
activatedAt: text("activated_at").notNull()
|
|
7498
7515
|
}, (t) => [
|
|
7516
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7499
7517
|
index("idxPluginActivationsActivatedAt").on(t.activatedAt),
|
|
7500
7518
|
index("idxPluginActivationsPluginId").on(t.pluginId)
|
|
7501
7519
|
]);
|
|
@@ -7520,8 +7538,13 @@ var knowledgePages = projectSchema.table("knowledge_pages", {
|
|
|
7520
7538
|
index("idxKnowledgePagesUpdatedAt").on(t.updatedAt)
|
|
7521
7539
|
]);
|
|
7522
7540
|
var deployments = projectSchema.table("deployments", {
|
|
7523
|
-
id: integer("id").generatedAlwaysAsIdentity().
|
|
7524
|
-
|
|
7541
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7542
|
+
/*
|
|
7543
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7544
|
+
Migration 0006 rebuilt deployments_pkey as (project_id, id). Drizzle emits DEFAULT while the
|
|
7545
|
+
database GUC/trigger keeps ownership stamping and the physical legacy fallback authoritative.
|
|
7546
|
+
*/
|
|
7547
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7525
7548
|
deploymentId: text("deployment_id").notNull(),
|
|
7526
7549
|
service: text("service"),
|
|
7527
7550
|
environment: text("environment"),
|
|
@@ -7532,6 +7555,7 @@ var deployments = projectSchema.table("deployments", {
|
|
|
7532
7555
|
meta: jsonb("meta"),
|
|
7533
7556
|
createdAt: text("created_at").notNull()
|
|
7534
7557
|
}, (t) => [
|
|
7558
|
+
primaryKey({ columns: [t.projectId, t.id], name: "deployments_pkey" }),
|
|
7535
7559
|
uniqueIndex("idxDeploymentsProjectDeploymentId").on(t.projectId, t.deploymentId),
|
|
7536
7560
|
index("idxDeploymentsProjectDeployedAt").on(t.projectId, t.deployedAt),
|
|
7537
7561
|
index("idxDeploymentsDeployedAt").on(t.deployedAt),
|
|
@@ -7539,7 +7563,12 @@ var deployments = projectSchema.table("deployments", {
|
|
|
7539
7563
|
]);
|
|
7540
7564
|
var githubCheckStates = projectSchema.table("github_check_states", {
|
|
7541
7565
|
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7542
|
-
|
|
7566
|
+
/*
|
|
7567
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7568
|
+
Migration 0048 post-dated 0006, so FN-9004 reconciles its physical default to the ownership
|
|
7569
|
+
expression. Drizzle emits DEFAULT while the database GUC/trigger remains the stamping authority.
|
|
7570
|
+
*/
|
|
7571
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7543
7572
|
repo: text("repo").notNull(),
|
|
7544
7573
|
headSha: text("head_sha").notNull(),
|
|
7545
7574
|
checkName: text("check_name").notNull(),
|
|
@@ -7559,9 +7588,14 @@ var githubCheckStates = projectSchema.table("github_check_states", {
|
|
|
7559
7588
|
index("idxGithubCheckStatesProjectReceived").on(t.projectId, t.receivedAt)
|
|
7560
7589
|
]);
|
|
7561
7590
|
var incidents = projectSchema.table("incidents", {
|
|
7562
|
-
id: integer("id").generatedAlwaysAsIdentity().
|
|
7563
|
-
|
|
7564
|
-
|
|
7591
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7592
|
+
/*
|
|
7593
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7594
|
+
Migration 0006 rebuilt incident keys with project_id first. Drizzle emits DEFAULT while the
|
|
7595
|
+
database GUC/trigger retains ownership stamping and its physical legacy fallback.
|
|
7596
|
+
*/
|
|
7597
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7598
|
+
incidentId: text("incident_id").notNull(),
|
|
7565
7599
|
groupingKey: text("grouping_key").notNull(),
|
|
7566
7600
|
title: text("title").notNull(),
|
|
7567
7601
|
severity: text("severity"),
|
|
@@ -7575,6 +7609,8 @@ var incidents = projectSchema.table("incidents", {
|
|
|
7575
7609
|
createdAt: text("created_at").notNull(),
|
|
7576
7610
|
updatedAt: text("updated_at").notNull()
|
|
7577
7611
|
}, (t) => [
|
|
7612
|
+
primaryKey({ columns: [t.projectId, t.id], name: "incidents_pkey" }),
|
|
7613
|
+
unique("incidents_incident_id_key").on(t.projectId, t.incidentId),
|
|
7578
7614
|
index("idxIncidentsProjectOpenedAt").on(t.projectId, t.openedAt),
|
|
7579
7615
|
index("idxIncidentsProjectStatus").on(t.projectId, t.status),
|
|
7580
7616
|
index("idxIncidentsGroupingKey").on(t.groupingKey),
|
|
@@ -7629,12 +7665,14 @@ var messages = projectSchema.table("messages", {
|
|
|
7629
7665
|
content: text("content").notNull(),
|
|
7630
7666
|
type: text("type").notNull(),
|
|
7631
7667
|
read: integer("read").default(0),
|
|
7668
|
+
archived: integer("archived").default(0),
|
|
7632
7669
|
metadata: jsonb("metadata"),
|
|
7633
7670
|
createdAt: text("created_at").notNull(),
|
|
7634
7671
|
updatedAt: text("updated_at").notNull()
|
|
7635
7672
|
}, (t) => [
|
|
7636
7673
|
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7637
7674
|
index("idxMessagesTo").on(t.toId, t.toType, t.read),
|
|
7675
|
+
index("idxMessagesToArchived").on(t.toId, t.toType, t.archived),
|
|
7638
7676
|
index("idxMessagesFrom").on(t.fromId, t.fromType),
|
|
7639
7677
|
index("idxMessagesCreatedAt").on(t.createdAt)
|
|
7640
7678
|
]);
|
|
@@ -7735,7 +7773,8 @@ var cliSessions = projectSchema.table("cli_sessions", {
|
|
|
7735
7773
|
index("idx_cli_sessions_project_state").on(t.projectId, t.agentState)
|
|
7736
7774
|
]);
|
|
7737
7775
|
var chatMessages = projectSchema.table("chat_messages", {
|
|
7738
|
-
|
|
7776
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7777
|
+
id: text("id").notNull(),
|
|
7739
7778
|
sessionId: text("session_id").notNull(),
|
|
7740
7779
|
role: text("role").notNull(),
|
|
7741
7780
|
content: text("content").notNull(),
|
|
@@ -7744,6 +7783,7 @@ var chatMessages = projectSchema.table("chat_messages", {
|
|
|
7744
7783
|
createdAt: text("created_at").notNull(),
|
|
7745
7784
|
attachments: jsonb("attachments")
|
|
7746
7785
|
}, (t) => [
|
|
7786
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7747
7787
|
index("idxChatMessagesSessionId").on(t.sessionId),
|
|
7748
7788
|
index("idxChatMessagesCreatedAt").on(t.createdAt)
|
|
7749
7789
|
]);
|
|
@@ -7769,7 +7809,8 @@ var chatTokenUsage = projectSchema.table("chat_token_usage", {
|
|
|
7769
7809
|
index("idxChatTokenUsageCreatedAt").on(t.createdAt)
|
|
7770
7810
|
]);
|
|
7771
7811
|
var runAuditEvents = projectSchema.table("run_audit_events", {
|
|
7772
|
-
|
|
7812
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7813
|
+
id: text("id").notNull(),
|
|
7773
7814
|
timestamp: text("timestamp").notNull(),
|
|
7774
7815
|
taskId: text("task_id"),
|
|
7775
7816
|
agentId: text("agent_id").notNull(),
|
|
@@ -7779,6 +7820,7 @@ var runAuditEvents = projectSchema.table("run_audit_events", {
|
|
|
7779
7820
|
target: text("target").notNull(),
|
|
7780
7821
|
metadata: jsonb("metadata")
|
|
7781
7822
|
}, (t) => [
|
|
7823
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7782
7824
|
index("idxRunAuditEventsRunIdTimestamp").on(t.runId, t.timestamp),
|
|
7783
7825
|
index("idxRunAuditEventsTaskIdTimestamp").on(t.taskId, t.timestamp),
|
|
7784
7826
|
index("idxRunAuditEventsTimestamp").on(t.timestamp)
|
|
@@ -7879,13 +7921,14 @@ var missionLineageStops = projectSchema.table("mission_lineage_stops", {
|
|
|
7879
7921
|
index("idxMissionLineageStopsMissionId").on(t.projectId, t.missionId)
|
|
7880
7922
|
]);
|
|
7881
7923
|
var verificationCache = projectSchema.table("verification_cache", {
|
|
7924
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7882
7925
|
treeSha: text("tree_sha").notNull(),
|
|
7883
7926
|
testCommand: text("test_command").notNull().default(""),
|
|
7884
7927
|
buildCommand: text("build_command").notNull().default(""),
|
|
7885
7928
|
recordedAt: text("recorded_at").notNull(),
|
|
7886
7929
|
taskId: text("task_id")
|
|
7887
7930
|
}, (t) => [
|
|
7888
|
-
primaryKey({ columns: [t.treeSha, t.testCommand, t.buildCommand] }),
|
|
7931
|
+
primaryKey({ columns: [t.projectId, t.treeSha, t.testCommand, t.buildCommand] }),
|
|
7889
7932
|
index("idxVerificationCacheRecordedAt").on(t.recordedAt)
|
|
7890
7933
|
]);
|
|
7891
7934
|
var importTranslationCache = projectSchema.table("import_translation_cache", {
|
|
@@ -7918,7 +7961,8 @@ var importTranslationCache = projectSchema.table("import_translation_cache", {
|
|
|
7918
7961
|
index("idxImportTranslationCacheRecordedAt").on(t.recordedAt)
|
|
7919
7962
|
]);
|
|
7920
7963
|
var approvalRequests = projectSchema.table("approval_requests", {
|
|
7921
|
-
|
|
7964
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7965
|
+
id: text("id").notNull(),
|
|
7922
7966
|
status: text("status").notNull(),
|
|
7923
7967
|
requesterActorId: text("requester_actor_id").notNull(),
|
|
7924
7968
|
requesterActorType: text("requester_actor_type").notNull(),
|
|
@@ -7937,13 +7981,14 @@ var approvalRequests = projectSchema.table("approval_requests", {
|
|
|
7937
7981
|
createdAt: text("created_at").notNull(),
|
|
7938
7982
|
updatedAt: text("updated_at").notNull()
|
|
7939
7983
|
}, (t) => [
|
|
7984
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7940
7985
|
index("idxApprovalRequestsStatusCreatedAt").on(t.status, t.createdAt),
|
|
7941
7986
|
index("idxApprovalRequestsRequesterCreatedAt").on(t.requesterActorId, t.createdAt),
|
|
7942
7987
|
index("idxApprovalRequestsTaskCreatedAt").on(t.taskId, t.createdAt)
|
|
7943
7988
|
]);
|
|
7944
7989
|
var approvalRequestAuditEvents = projectSchema.table("approval_request_audit_events", {
|
|
7945
|
-
projectId: text("project_id").notNull().default(
|
|
7946
|
-
id: text("id").
|
|
7990
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7991
|
+
id: text("id").notNull(),
|
|
7947
7992
|
requestId: text("request_id").notNull(),
|
|
7948
7993
|
eventType: text("event_type").notNull(),
|
|
7949
7994
|
actorId: text("actor_id").notNull(),
|
|
@@ -7952,6 +7997,7 @@ var approvalRequestAuditEvents = projectSchema.table("approval_request_audit_eve
|
|
|
7952
7997
|
note: text("note"),
|
|
7953
7998
|
createdAt: text("created_at").notNull()
|
|
7954
7999
|
}, (t) => [
|
|
8000
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7955
8001
|
index("idxApprovalRequestAuditRequestCreatedAt").on(t.requestId, t.createdAt, t.id),
|
|
7956
8002
|
index("idxApprovalRequestAuditProjectCreatedAt").on(t.projectId, t.createdAt)
|
|
7957
8003
|
]);
|
|
@@ -9078,6 +9124,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
|
|
|
9078
9124
|
var DEFAULT_PROJECT_SETTINGS = {
|
|
9079
9125
|
// FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
|
|
9080
9126
|
maxRecommendationsPerTask: 3,
|
|
9127
|
+
// FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
|
|
9128
|
+
recommendationMailboxNoticeEnabled: true,
|
|
9081
9129
|
globalPause: false,
|
|
9082
9130
|
globalPauseReason: void 0,
|
|
9083
9131
|
defaultWorkflowId: void 0,
|
|
@@ -6116,9 +6116,14 @@ var config = projectSchema.table("config", {
|
|
|
6116
6116
|
// now keyed per-project on `project_id` (the effective PK). `id` is retained
|
|
6117
6117
|
// for column-shape parity (always 1) but is no longer the PK and no longer
|
|
6118
6118
|
// CHECK-constrained. Single-project / SQLite-parity callers leave project_id
|
|
6119
|
-
//
|
|
6119
|
+
// through the database ownership trigger, preserving the pre-isolation behavior.
|
|
6120
|
+
/*
|
|
6121
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
6122
|
+
Migration 0006 owns config's project_id default and leaves its catalog PK as (project_id).
|
|
6123
|
+
Drizzle emits DEFAULT while the database GUC/trigger selects the effective ownership partition.
|
|
6124
|
+
*/
|
|
6120
6125
|
id: integer("id").default(1),
|
|
6121
|
-
projectId: text("project_id").notNull().default(
|
|
6126
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`).primaryKey(),
|
|
6122
6127
|
nextId: integer("next_id").default(1),
|
|
6123
6128
|
nextWorkflowStepId: integer("next_workflow_step_id").default(1),
|
|
6124
6129
|
// FNXC:SqliteFinalRemoval 2026-06-28:
|
|
@@ -6512,9 +6517,13 @@ var taskCommitAssociations = projectSchema.table("task_commit_associations", {
|
|
|
6512
6517
|
var automations = projectSchema.table("automations", {
|
|
6513
6518
|
/*
|
|
6514
6519
|
* FNXC:AutomationIsolation 2026-07-13-22:37:
|
|
6515
|
-
* Automations are partitioned by the AsyncDataLayer's project ID because embedded PostgreSQL consolidates the per-project SQLite files into one table. The composite key deliberately permits the same automation ID in two projects without allowing either project's CRUD or cron-claim path to address the other row.
|
|
6520
|
+
* Automations are partitioned by the AsyncDataLayer's project ID because embedded PostgreSQL consolidates the per-project SQLite files into one table. The composite key deliberately permits the same automation ID in two projects without allowing either project's CRUD or cron-claim path to address the other row.
|
|
6521
|
+
*
|
|
6522
|
+
* FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
6523
|
+
* Migration 0006 owns the default through the database GUC/trigger; Drizzle emits DEFAULT
|
|
6524
|
+
* without replacing the physical legacy fallback or the fail-closed bound writer contract.
|
|
6516
6525
|
*/
|
|
6517
|
-
projectId: text("project_id").notNull().default(
|
|
6526
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
6518
6527
|
id: text("id").notNull(),
|
|
6519
6528
|
name: text("name").notNull(),
|
|
6520
6529
|
description: text("description"),
|
|
@@ -6813,7 +6822,8 @@ var taskDocuments = projectSchema.table("task_documents", {
|
|
|
6813
6822
|
index("idxTaskDocumentsTaskId").on(t.taskId)
|
|
6814
6823
|
]);
|
|
6815
6824
|
var artifacts = projectSchema.table("artifacts", {
|
|
6816
|
-
|
|
6825
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
6826
|
+
id: text("id").notNull(),
|
|
6817
6827
|
type: text("type").notNull(),
|
|
6818
6828
|
title: text("title").notNull(),
|
|
6819
6829
|
description: text("description"),
|
|
@@ -6828,7 +6838,8 @@ var artifacts = projectSchema.table("artifacts", {
|
|
|
6828
6838
|
createdAt: text("created_at").notNull(),
|
|
6829
6839
|
updatedAt: text("updated_at").notNull()
|
|
6830
6840
|
}, (t) => [
|
|
6831
|
-
|
|
6841
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
6842
|
+
foreignKey({ name: "artifacts_task_id_fkey", columns: [t.projectId, t.taskId], foreignColumns: [tasks.projectId, tasks.id] }).onDelete("cascade"),
|
|
6832
6843
|
index("idxArtifactsTaskId").on(t.taskId),
|
|
6833
6844
|
index("idxArtifactsAuthorId").on(t.authorId),
|
|
6834
6845
|
index("idxArtifactsType").on(t.type),
|
|
@@ -7018,7 +7029,8 @@ var evalRunEvents = projectSchema.table("eval_run_events", {
|
|
|
7018
7029
|
index("idxEvalRunEventsRunIdSeq").on(t.runId, t.seq)
|
|
7019
7030
|
]);
|
|
7020
7031
|
var secrets = projectSchema.table("secrets", {
|
|
7021
|
-
|
|
7032
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7033
|
+
id: text("id").notNull(),
|
|
7022
7034
|
key: text("key").notNull(),
|
|
7023
7035
|
valueCiphertext: bytea("value_ciphertext").notNull(),
|
|
7024
7036
|
nonce: bytea("nonce").notNull(),
|
|
@@ -7031,7 +7043,8 @@ var secrets = projectSchema.table("secrets", {
|
|
|
7031
7043
|
lastReadAt: text("last_read_at"),
|
|
7032
7044
|
lastReadBy: text("last_read_by")
|
|
7033
7045
|
}, (t) => [
|
|
7034
|
-
|
|
7046
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7047
|
+
unique("secrets_key_unique").on(t.projectId, t.key),
|
|
7035
7048
|
check("secrets_access_policy_check", sql`${t.accessPolicy} IN ('auto', 'prompt', 'deny')`),
|
|
7036
7049
|
check("secrets_env_exportable_check", sql`${t.envExportable} IN (0, 1)`)
|
|
7037
7050
|
]);
|
|
@@ -7073,10 +7086,11 @@ var missions = projectSchema.table("missions", {
|
|
|
7073
7086
|
updatedAt: text("updated_at").notNull()
|
|
7074
7087
|
}, (t) => [primaryKey({ columns: [t.projectId, t.id] })]);
|
|
7075
7088
|
var branchGroups = projectSchema.table("branch_groups", {
|
|
7076
|
-
|
|
7089
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7090
|
+
id: text("id").notNull(),
|
|
7077
7091
|
sourceType: text("source_type").notNull(),
|
|
7078
7092
|
sourceId: text("source_id").notNull(),
|
|
7079
|
-
branchName: text("branch_name").notNull()
|
|
7093
|
+
branchName: text("branch_name").notNull(),
|
|
7080
7094
|
worktreePath: text("worktree_path"),
|
|
7081
7095
|
autoMerge: integer("auto_merge").notNull().default(0),
|
|
7082
7096
|
prState: text("pr_state").notNull().default("none"),
|
|
@@ -7092,6 +7106,8 @@ var branchGroups = projectSchema.table("branch_groups", {
|
|
|
7092
7106
|
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
7093
7107
|
closedAt: bigint("closed_at", { mode: "number" })
|
|
7094
7108
|
}, (t) => [
|
|
7109
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7110
|
+
unique("branch_groups_branch_name_key").on(t.projectId, t.branchName),
|
|
7095
7111
|
check("branch_groups_source_type_check", sql`${t.sourceType} IN ('mission','planning','new-task')`),
|
|
7096
7112
|
check("branch_groups_pr_state_check", sql`${t.prState} IN ('none','open','merged','closed')`),
|
|
7097
7113
|
check("branch_groups_status_check", sql`${t.status} IN ('open','finalized','abandoned')`),
|
|
@@ -7493,12 +7509,14 @@ var usageEvents = projectSchema.table("usage_events", {
|
|
|
7493
7509
|
index("idxUsageEventsKindTs").on(t.kind, t.ts)
|
|
7494
7510
|
]);
|
|
7495
7511
|
var pluginActivations = projectSchema.table("plugin_activations", {
|
|
7496
|
-
|
|
7512
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7513
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7497
7514
|
pluginId: text("plugin_id").notNull(),
|
|
7498
7515
|
source: text("source").notNull(),
|
|
7499
7516
|
pluginVersion: text("plugin_version"),
|
|
7500
7517
|
activatedAt: text("activated_at").notNull()
|
|
7501
7518
|
}, (t) => [
|
|
7519
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7502
7520
|
index("idxPluginActivationsActivatedAt").on(t.activatedAt),
|
|
7503
7521
|
index("idxPluginActivationsPluginId").on(t.pluginId)
|
|
7504
7522
|
]);
|
|
@@ -7523,8 +7541,13 @@ var knowledgePages = projectSchema.table("knowledge_pages", {
|
|
|
7523
7541
|
index("idxKnowledgePagesUpdatedAt").on(t.updatedAt)
|
|
7524
7542
|
]);
|
|
7525
7543
|
var deployments = projectSchema.table("deployments", {
|
|
7526
|
-
id: integer("id").generatedAlwaysAsIdentity().
|
|
7527
|
-
|
|
7544
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7545
|
+
/*
|
|
7546
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7547
|
+
Migration 0006 rebuilt deployments_pkey as (project_id, id). Drizzle emits DEFAULT while the
|
|
7548
|
+
database GUC/trigger keeps ownership stamping and the physical legacy fallback authoritative.
|
|
7549
|
+
*/
|
|
7550
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7528
7551
|
deploymentId: text("deployment_id").notNull(),
|
|
7529
7552
|
service: text("service"),
|
|
7530
7553
|
environment: text("environment"),
|
|
@@ -7535,6 +7558,7 @@ var deployments = projectSchema.table("deployments", {
|
|
|
7535
7558
|
meta: jsonb("meta"),
|
|
7536
7559
|
createdAt: text("created_at").notNull()
|
|
7537
7560
|
}, (t) => [
|
|
7561
|
+
primaryKey({ columns: [t.projectId, t.id], name: "deployments_pkey" }),
|
|
7538
7562
|
uniqueIndex("idxDeploymentsProjectDeploymentId").on(t.projectId, t.deploymentId),
|
|
7539
7563
|
index("idxDeploymentsProjectDeployedAt").on(t.projectId, t.deployedAt),
|
|
7540
7564
|
index("idxDeploymentsDeployedAt").on(t.deployedAt),
|
|
@@ -7542,7 +7566,12 @@ var deployments = projectSchema.table("deployments", {
|
|
|
7542
7566
|
]);
|
|
7543
7567
|
var githubCheckStates = projectSchema.table("github_check_states", {
|
|
7544
7568
|
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7545
|
-
|
|
7569
|
+
/*
|
|
7570
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7571
|
+
Migration 0048 post-dated 0006, so FN-9004 reconciles its physical default to the ownership
|
|
7572
|
+
expression. Drizzle emits DEFAULT while the database GUC/trigger remains the stamping authority.
|
|
7573
|
+
*/
|
|
7574
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7546
7575
|
repo: text("repo").notNull(),
|
|
7547
7576
|
headSha: text("head_sha").notNull(),
|
|
7548
7577
|
checkName: text("check_name").notNull(),
|
|
@@ -7562,9 +7591,14 @@ var githubCheckStates = projectSchema.table("github_check_states", {
|
|
|
7562
7591
|
index("idxGithubCheckStatesProjectReceived").on(t.projectId, t.receivedAt)
|
|
7563
7592
|
]);
|
|
7564
7593
|
var incidents = projectSchema.table("incidents", {
|
|
7565
|
-
id: integer("id").generatedAlwaysAsIdentity().
|
|
7566
|
-
|
|
7567
|
-
|
|
7594
|
+
id: integer("id").generatedAlwaysAsIdentity().notNull(),
|
|
7595
|
+
/*
|
|
7596
|
+
FNXC:MultiProjectIsolation 2026-08-12-15:43:
|
|
7597
|
+
Migration 0006 rebuilt incident keys with project_id first. Drizzle emits DEFAULT while the
|
|
7598
|
+
database GUC/trigger retains ownership stamping and its physical legacy fallback.
|
|
7599
|
+
*/
|
|
7600
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7601
|
+
incidentId: text("incident_id").notNull(),
|
|
7568
7602
|
groupingKey: text("grouping_key").notNull(),
|
|
7569
7603
|
title: text("title").notNull(),
|
|
7570
7604
|
severity: text("severity"),
|
|
@@ -7578,6 +7612,8 @@ var incidents = projectSchema.table("incidents", {
|
|
|
7578
7612
|
createdAt: text("created_at").notNull(),
|
|
7579
7613
|
updatedAt: text("updated_at").notNull()
|
|
7580
7614
|
}, (t) => [
|
|
7615
|
+
primaryKey({ columns: [t.projectId, t.id], name: "incidents_pkey" }),
|
|
7616
|
+
unique("incidents_incident_id_key").on(t.projectId, t.incidentId),
|
|
7581
7617
|
index("idxIncidentsProjectOpenedAt").on(t.projectId, t.openedAt),
|
|
7582
7618
|
index("idxIncidentsProjectStatus").on(t.projectId, t.status),
|
|
7583
7619
|
index("idxIncidentsGroupingKey").on(t.groupingKey),
|
|
@@ -7632,12 +7668,14 @@ var messages = projectSchema.table("messages", {
|
|
|
7632
7668
|
content: text("content").notNull(),
|
|
7633
7669
|
type: text("type").notNull(),
|
|
7634
7670
|
read: integer("read").default(0),
|
|
7671
|
+
archived: integer("archived").default(0),
|
|
7635
7672
|
metadata: jsonb("metadata"),
|
|
7636
7673
|
createdAt: text("created_at").notNull(),
|
|
7637
7674
|
updatedAt: text("updated_at").notNull()
|
|
7638
7675
|
}, (t) => [
|
|
7639
7676
|
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7640
7677
|
index("idxMessagesTo").on(t.toId, t.toType, t.read),
|
|
7678
|
+
index("idxMessagesToArchived").on(t.toId, t.toType, t.archived),
|
|
7641
7679
|
index("idxMessagesFrom").on(t.fromId, t.fromType),
|
|
7642
7680
|
index("idxMessagesCreatedAt").on(t.createdAt)
|
|
7643
7681
|
]);
|
|
@@ -7738,7 +7776,8 @@ var cliSessions = projectSchema.table("cli_sessions", {
|
|
|
7738
7776
|
index("idx_cli_sessions_project_state").on(t.projectId, t.agentState)
|
|
7739
7777
|
]);
|
|
7740
7778
|
var chatMessages = projectSchema.table("chat_messages", {
|
|
7741
|
-
|
|
7779
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7780
|
+
id: text("id").notNull(),
|
|
7742
7781
|
sessionId: text("session_id").notNull(),
|
|
7743
7782
|
role: text("role").notNull(),
|
|
7744
7783
|
content: text("content").notNull(),
|
|
@@ -7747,6 +7786,7 @@ var chatMessages = projectSchema.table("chat_messages", {
|
|
|
7747
7786
|
createdAt: text("created_at").notNull(),
|
|
7748
7787
|
attachments: jsonb("attachments")
|
|
7749
7788
|
}, (t) => [
|
|
7789
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7750
7790
|
index("idxChatMessagesSessionId").on(t.sessionId),
|
|
7751
7791
|
index("idxChatMessagesCreatedAt").on(t.createdAt)
|
|
7752
7792
|
]);
|
|
@@ -7772,7 +7812,8 @@ var chatTokenUsage = projectSchema.table("chat_token_usage", {
|
|
|
7772
7812
|
index("idxChatTokenUsageCreatedAt").on(t.createdAt)
|
|
7773
7813
|
]);
|
|
7774
7814
|
var runAuditEvents = projectSchema.table("run_audit_events", {
|
|
7775
|
-
|
|
7815
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7816
|
+
id: text("id").notNull(),
|
|
7776
7817
|
timestamp: text("timestamp").notNull(),
|
|
7777
7818
|
taskId: text("task_id"),
|
|
7778
7819
|
agentId: text("agent_id").notNull(),
|
|
@@ -7782,6 +7823,7 @@ var runAuditEvents = projectSchema.table("run_audit_events", {
|
|
|
7782
7823
|
target: text("target").notNull(),
|
|
7783
7824
|
metadata: jsonb("metadata")
|
|
7784
7825
|
}, (t) => [
|
|
7826
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7785
7827
|
index("idxRunAuditEventsRunIdTimestamp").on(t.runId, t.timestamp),
|
|
7786
7828
|
index("idxRunAuditEventsTaskIdTimestamp").on(t.taskId, t.timestamp),
|
|
7787
7829
|
index("idxRunAuditEventsTimestamp").on(t.timestamp)
|
|
@@ -7882,13 +7924,14 @@ var missionLineageStops = projectSchema.table("mission_lineage_stops", {
|
|
|
7882
7924
|
index("idxMissionLineageStopsMissionId").on(t.projectId, t.missionId)
|
|
7883
7925
|
]);
|
|
7884
7926
|
var verificationCache = projectSchema.table("verification_cache", {
|
|
7927
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7885
7928
|
treeSha: text("tree_sha").notNull(),
|
|
7886
7929
|
testCommand: text("test_command").notNull().default(""),
|
|
7887
7930
|
buildCommand: text("build_command").notNull().default(""),
|
|
7888
7931
|
recordedAt: text("recorded_at").notNull(),
|
|
7889
7932
|
taskId: text("task_id")
|
|
7890
7933
|
}, (t) => [
|
|
7891
|
-
primaryKey({ columns: [t.treeSha, t.testCommand, t.buildCommand] }),
|
|
7934
|
+
primaryKey({ columns: [t.projectId, t.treeSha, t.testCommand, t.buildCommand] }),
|
|
7892
7935
|
index("idxVerificationCacheRecordedAt").on(t.recordedAt)
|
|
7893
7936
|
]);
|
|
7894
7937
|
var importTranslationCache = projectSchema.table("import_translation_cache", {
|
|
@@ -7921,7 +7964,8 @@ var importTranslationCache = projectSchema.table("import_translation_cache", {
|
|
|
7921
7964
|
index("idxImportTranslationCacheRecordedAt").on(t.recordedAt)
|
|
7922
7965
|
]);
|
|
7923
7966
|
var approvalRequests = projectSchema.table("approval_requests", {
|
|
7924
|
-
|
|
7967
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7968
|
+
id: text("id").notNull(),
|
|
7925
7969
|
status: text("status").notNull(),
|
|
7926
7970
|
requesterActorId: text("requester_actor_id").notNull(),
|
|
7927
7971
|
requesterActorType: text("requester_actor_type").notNull(),
|
|
@@ -7940,13 +7984,14 @@ var approvalRequests = projectSchema.table("approval_requests", {
|
|
|
7940
7984
|
createdAt: text("created_at").notNull(),
|
|
7941
7985
|
updatedAt: text("updated_at").notNull()
|
|
7942
7986
|
}, (t) => [
|
|
7987
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7943
7988
|
index("idxApprovalRequestsStatusCreatedAt").on(t.status, t.createdAt),
|
|
7944
7989
|
index("idxApprovalRequestsRequesterCreatedAt").on(t.requesterActorId, t.createdAt),
|
|
7945
7990
|
index("idxApprovalRequestsTaskCreatedAt").on(t.taskId, t.createdAt)
|
|
7946
7991
|
]);
|
|
7947
7992
|
var approvalRequestAuditEvents = projectSchema.table("approval_request_audit_events", {
|
|
7948
|
-
projectId: text("project_id").notNull().default(
|
|
7949
|
-
id: text("id").
|
|
7993
|
+
projectId: text("project_id").notNull().default(sql`current_setting('fusion.project_id', true)`),
|
|
7994
|
+
id: text("id").notNull(),
|
|
7950
7995
|
requestId: text("request_id").notNull(),
|
|
7951
7996
|
eventType: text("event_type").notNull(),
|
|
7952
7997
|
actorId: text("actor_id").notNull(),
|
|
@@ -7955,6 +8000,7 @@ var approvalRequestAuditEvents = projectSchema.table("approval_request_audit_eve
|
|
|
7955
8000
|
note: text("note"),
|
|
7956
8001
|
createdAt: text("created_at").notNull()
|
|
7957
8002
|
}, (t) => [
|
|
8003
|
+
primaryKey({ columns: [t.projectId, t.id] }),
|
|
7958
8004
|
index("idxApprovalRequestAuditRequestCreatedAt").on(t.requestId, t.createdAt, t.id),
|
|
7959
8005
|
index("idxApprovalRequestAuditProjectCreatedAt").on(t.projectId, t.createdAt)
|
|
7960
8006
|
]);
|
|
@@ -9081,6 +9127,8 @@ var DEFAULT_GLOBAL_SETTINGS = {
|
|
|
9081
9127
|
var DEFAULT_PROJECT_SETTINGS = {
|
|
9082
9128
|
// FNXC:TaskRecommendations 2026-08-08-05:02: completion follows-ups stay bounded by default; 0 disables writing them.
|
|
9083
9129
|
maxRecommendationsPerTask: 3,
|
|
9130
|
+
// FNXC:TaskRecommendations 2026-08-13-03:56: surface completed-task proposals by default; operators can suppress the notice without suppressing capture.
|
|
9131
|
+
recommendationMailboxNoticeEnabled: true,
|
|
9084
9132
|
globalPause: false,
|
|
9085
9133
|
globalPauseReason: void 0,
|
|
9086
9134
|
defaultWorkflowId: void 0,
|