@rudderhq/server 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-runtimes/codex-models.d.ts +11 -0
- package/dist/agent-runtimes/codex-models.d.ts.map +1 -1
- package/dist/agent-runtimes/codex-models.js +155 -2
- package/dist/agent-runtimes/codex-models.js.map +1 -1
- package/dist/agent-runtimes/cursor-models.d.ts.map +1 -1
- package/dist/agent-runtimes/cursor-models.js +31 -9
- package/dist/agent-runtimes/cursor-models.js.map +1 -1
- package/dist/agent-runtimes/index.d.ts +1 -1
- package/dist/agent-runtimes/index.d.ts.map +1 -1
- package/dist/agent-runtimes/index.js +1 -1
- package/dist/agent-runtimes/index.js.map +1 -1
- package/dist/agent-runtimes/registry.d.ts +11 -4
- package/dist/agent-runtimes/registry.d.ts.map +1 -1
- package/dist/agent-runtimes/registry.js +54 -3
- package/dist/agent-runtimes/registry.js.map +1 -1
- package/dist/bundled-plugins/plugin-linear/dist/worker.js +287 -18
- package/dist/bundled-plugins/plugin-linear/dist/worker.js.map +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -30
- package/dist/index.js.map +1 -1
- package/dist/redaction.d.ts +1 -0
- package/dist/redaction.d.ts.map +1 -1
- package/dist/redaction.js +13 -0
- package/dist/redaction.js.map +1 -1
- package/dist/routes/access.helpers.d.ts +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +20 -6
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/agents.management-routes.d.ts.map +1 -1
- package/dist/routes/agents.management-routes.js +13 -10
- package/dist/routes/agents.management-routes.js.map +1 -1
- package/dist/routes/approvals.d.ts.map +1 -1
- package/dist/routes/approvals.js +77 -1
- package/dist/routes/approvals.js.map +1 -1
- package/dist/routes/chats.d.ts.map +1 -1
- package/dist/routes/chats.js +1 -0
- package/dist/routes/chats.js.map +1 -1
- package/dist/routes/chats.stream-routes.d.ts.map +1 -1
- package/dist/routes/chats.stream-routes.js +4 -0
- package/dist/routes/chats.stream-routes.js.map +1 -1
- package/dist/routes/goals.d.ts.map +1 -1
- package/dist/routes/goals.js +349 -23
- package/dist/routes/goals.js.map +1 -1
- package/dist/routes/health.d.ts.map +1 -1
- package/dist/routes/health.js +1 -0
- package/dist/routes/health.js.map +1 -1
- package/dist/routes/managed-mcp-connections.d.ts.map +1 -1
- package/dist/routes/managed-mcp-connections.js +46 -7
- package/dist/routes/managed-mcp-connections.js.map +1 -1
- package/dist/routes/product-analytics-collector-report.d.ts +29 -0
- package/dist/routes/product-analytics-collector-report.d.ts.map +1 -1
- package/dist/routes/product-analytics-collector-report.js +57 -1
- package/dist/routes/product-analytics-collector-report.js.map +1 -1
- package/dist/routes/product-analytics-collector-report.test.d.ts +2 -0
- package/dist/routes/product-analytics-collector-report.test.d.ts.map +1 -0
- package/dist/routes/product-analytics-collector-report.test.js +50 -0
- package/dist/routes/product-analytics-collector-report.test.js.map +1 -0
- package/dist/services/automation-chat-output.d.ts +1 -1
- package/dist/services/automation-chat-output.d.ts.map +1 -1
- package/dist/services/automation-chat-output.js +24 -14
- package/dist/services/automation-chat-output.js.map +1 -1
- package/dist/services/chat-annotation-copy-lineage.d.ts +1 -1
- package/dist/services/chat-assistant.d.ts.map +1 -1
- package/dist/services/chat-assistant.helpers.d.ts +3 -3
- package/dist/services/chat-assistant.helpers.d.ts.map +1 -1
- package/dist/services/chat-assistant.helpers.js.map +1 -1
- package/dist/services/chat-assistant.js +34 -11
- package/dist/services/chat-assistant.js.map +1 -1
- package/dist/services/chat-assistant.runtime-overrides.d.ts +2 -1
- package/dist/services/chat-assistant.runtime-overrides.d.ts.map +1 -1
- package/dist/services/chat-assistant.runtime-overrides.js +47 -18
- package/dist/services/chat-assistant.runtime-overrides.js.map +1 -1
- package/dist/services/chat-assistant.runtime-overrides.test.d.ts +2 -0
- package/dist/services/chat-assistant.runtime-overrides.test.d.ts.map +1 -0
- package/dist/services/chat-assistant.runtime-overrides.test.js +37 -0
- package/dist/services/chat-assistant.runtime-overrides.test.js.map +1 -0
- package/dist/services/chat-generation-protocol.d.ts.map +1 -1
- package/dist/services/chat-generation-protocol.js +1 -12
- package/dist/services/chat-generation-protocol.js.map +1 -1
- package/dist/services/chat-generation-protocol.test.js +14 -23
- package/dist/services/chat-generation-protocol.test.js.map +1 -1
- package/dist/services/chat-generation-provenance.d.ts.map +1 -1
- package/dist/services/chat-generation-provenance.js +4 -2
- package/dist/services/chat-generation-provenance.js.map +1 -1
- package/dist/services/chat-queued-message-materialization.d.ts.map +1 -1
- package/dist/services/chat-queued-message-materialization.js +12 -2
- package/dist/services/chat-queued-message-materialization.js.map +1 -1
- package/dist/services/chat-transcript-persistence.d.ts +49 -0
- package/dist/services/chat-transcript-persistence.d.ts.map +1 -0
- package/dist/services/chat-transcript-persistence.js +238 -0
- package/dist/services/chat-transcript-persistence.js.map +1 -0
- package/dist/services/chat-transcript-persistence.test.d.ts +2 -0
- package/dist/services/chat-transcript-persistence.test.d.ts.map +1 -0
- package/dist/services/chat-transcript-persistence.test.js +23 -0
- package/dist/services/chat-transcript-persistence.test.js.map +1 -0
- package/dist/services/chat-work-manifest.d.ts.map +1 -1
- package/dist/services/chat-work-manifest.js +36 -10
- package/dist/services/chat-work-manifest.js.map +1 -1
- package/dist/services/chats.annotation-persistence.d.ts.map +1 -1
- package/dist/services/chats.annotation-persistence.js +25 -6
- package/dist/services/chats.annotation-persistence.js.map +1 -1
- package/dist/services/chats.create.d.ts.map +1 -1
- package/dist/services/chats.create.js +49 -4
- package/dist/services/chats.create.js.map +1 -1
- package/dist/services/chats.d.ts +8 -8
- package/dist/services/chats.d.ts.map +1 -1
- package/dist/services/chats.inline-visual-persistence.d.ts +2 -1
- package/dist/services/chats.inline-visual-persistence.d.ts.map +1 -1
- package/dist/services/chats.inline-visual-persistence.js +19 -2
- package/dist/services/chats.inline-visual-persistence.js.map +1 -1
- package/dist/services/chats.js +177 -95
- package/dist/services/chats.js.map +1 -1
- package/dist/services/finance.d.ts +1 -1
- package/dist/services/goals.d.ts +2041 -126
- package/dist/services/goals.d.ts.map +1 -1
- package/dist/services/goals.js +1533 -176
- package/dist/services/goals.js.map +1 -1
- package/dist/services/instance-settings.d.ts.map +1 -1
- package/dist/services/instance-settings.js +2 -0
- package/dist/services/instance-settings.js.map +1 -1
- package/dist/services/issues.d.ts.map +1 -1
- package/dist/services/issues.js +35 -16
- package/dist/services/issues.js.map +1 -1
- package/dist/services/mcp/managed-bindings.d.ts.map +1 -1
- package/dist/services/mcp/managed-bindings.js +11 -4
- package/dist/services/mcp/managed-bindings.js.map +1 -1
- package/dist/services/mcp/managed-connections.d.ts +19 -1
- package/dist/services/mcp/managed-connections.d.ts.map +1 -1
- package/dist/services/mcp/managed-connections.js +211 -37
- package/dist/services/mcp/managed-connections.js.map +1 -1
- package/dist/services/mcp/managed-runtime.js +1 -1
- package/dist/services/mcp/managed-runtime.js.map +1 -1
- package/dist/services/mcp/oauth.d.ts.map +1 -1
- package/dist/services/mcp/oauth.js +3 -0
- package/dist/services/mcp/oauth.js.map +1 -1
- package/dist/services/mcp/provider-registry.d.ts +24 -1
- package/dist/services/mcp/provider-registry.d.ts.map +1 -1
- package/dist/services/mcp/provider-registry.js +26 -0
- package/dist/services/mcp/provider-registry.js.map +1 -1
- package/dist/services/mcp/provider-registry.test.js +26 -0
- package/dist/services/mcp/provider-registry.test.js.map +1 -1
- package/dist/services/messenger-saved-views.d.ts.map +1 -1
- package/dist/services/messenger-saved-views.js +1 -0
- package/dist/services/messenger-saved-views.js.map +1 -1
- package/dist/services/messenger.d.ts.map +1 -1
- package/dist/services/messenger.js +16 -2
- package/dist/services/messenger.js.map +1 -1
- package/dist/services/plugin-host-services.d.ts.map +1 -1
- package/dist/services/plugin-host-services.js +5 -7
- package/dist/services/plugin-host-services.js.map +1 -1
- package/dist/services/product-analytics.d.ts +20 -4
- package/dist/services/product-analytics.d.ts.map +1 -1
- package/dist/services/product-analytics.js +47 -0
- package/dist/services/product-analytics.js.map +1 -1
- package/dist/services/product-analytics.test.js +63 -1
- package/dist/services/product-analytics.test.js.map +1 -1
- package/dist/services/run-events.d.ts +1 -1
- package/dist/services/runtime-kernel/heartbeat.d.ts +4 -0
- package/dist/services/runtime-kernel/heartbeat.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.execute.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.execute.js +51 -3
- package/dist/services/runtime-kernel/heartbeat.execute.js.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.js +187 -9
- package/dist/services/runtime-kernel/heartbeat.js.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.terminal.d.ts +3 -1
- package/dist/services/runtime-kernel/heartbeat.terminal.d.ts.map +1 -1
- package/dist/services/runtime-kernel/heartbeat.terminal.js +2 -1
- package/dist/services/runtime-kernel/heartbeat.terminal.js.map +1 -1
- package/dist/services/side-chats.d.ts.map +1 -1
- package/dist/services/side-chats.js +12 -0
- package/dist/services/side-chats.js.map +1 -1
- package/dist/services/workspace-runtime.services.d.ts +1 -1
- package/package.json +16 -14
- package/resources/bundled-skills/browser/SKILL.md +11 -4
- package/resources/bundled-skills/browser/agents/openai.yaml +2 -2
- package/resources/bundled-skills/browser/evals/trigger-evals.json +22 -0
- package/skills/browser/SKILL.md +11 -4
- package/skills/browser/agents/openai.yaml +2 -2
- package/skills/browser/evals/trigger-evals.json +22 -0
- package/ui-dist/assets/{LibraryLiveSurface-CZED7oKj.js → LibraryLiveSurface-cHCJmmsl.js} +1 -1
- package/ui-dist/assets/{abnfDiagram-VRR7QNED-BoPyIoAq.js → abnfDiagram-VRR7QNED-BORJvkew.js} +1 -1
- package/ui-dist/assets/{arc-DTYs4RCH.js → arc-DPUzhx87.js} +1 -1
- package/ui-dist/assets/{architectureDiagram-ZJ3FMSHR-BGfp2S_3.js → architectureDiagram-ZJ3FMSHR-Bz_hY8LM.js} +1 -1
- package/ui-dist/assets/{blockDiagram-677ZJIJ3-aW0EGIUf.js → blockDiagram-677ZJIJ3-Bq1X3YkP.js} +1 -1
- package/ui-dist/assets/{c4Diagram-LMCZKHZV--1itKgA2.js → c4Diagram-LMCZKHZV-BawEM9Pc.js} +1 -1
- package/ui-dist/assets/channel-C08AyYJr.js +1 -0
- package/ui-dist/assets/{chunk-2Q5K7J3B-ZIqIozPQ.js → chunk-2Q5K7J3B-D0D5ZOaA.js} +1 -1
- package/ui-dist/assets/{chunk-32BRIVSS-DiwBEZVQ.js → chunk-32BRIVSS-T90P7lug.js} +1 -1
- package/ui-dist/assets/{chunk-5VM5RSS4-CLOrTmL8.js → chunk-5VM5RSS4-jcAERTgh.js} +1 -1
- package/ui-dist/assets/{chunk-EX3LRPZG-D6xZzF47.js → chunk-EX3LRPZG-t9-JXwnR.js} +1 -1
- package/ui-dist/assets/{chunk-JWPE2WC7-B9tYvTZl.js → chunk-JWPE2WC7-hqgD1saC.js} +1 -1
- package/ui-dist/assets/{chunk-MOJQB5TN-D_qo-SzM.js → chunk-MOJQB5TN-BsSUoYzd.js} +1 -1
- package/ui-dist/assets/{chunk-RYQCIY6F-ChPHGc2P.js → chunk-RYQCIY6F-YcdDh2Zn.js} +1 -1
- package/ui-dist/assets/{chunk-V7JOEXUC-Dk6GbZYp.js → chunk-V7JOEXUC-ChFyH9Su.js} +1 -1
- package/ui-dist/assets/{chunk-VR4S4FIN-B6AREC1T.js → chunk-VR4S4FIN-BjVK8IyX.js} +1 -1
- package/ui-dist/assets/{chunk-XXDRQBXY-CUyO-JUr.js → chunk-XXDRQBXY-D-TvO9vT.js} +1 -1
- package/ui-dist/assets/classDiagram-OUVF2IWQ-BIXq6fec.js +1 -0
- package/ui-dist/assets/classDiagram-v2-EOCWNBFH-BIXq6fec.js +1 -0
- package/ui-dist/assets/{cose-bilkent-JH36ORCC-BCxIInLZ.js → cose-bilkent-JH36ORCC-DBwhASJG.js} +1 -1
- package/ui-dist/assets/{cynefin-VYW2F7L2-DqsnpnHA.js → cynefin-VYW2F7L2-SlCRmwl2.js} +1 -1
- package/ui-dist/assets/{cynefinDiagram-TSTJHNR4-BD7QQNLW.js → cynefinDiagram-TSTJHNR4-DImV6N_p.js} +1 -1
- package/ui-dist/assets/{dagre-VKFMJZFB-DaE160f7.js → dagre-VKFMJZFB-FH4Wv8Zn.js} +1 -1
- package/ui-dist/assets/{diagram-FQU43EPY-DZ0c59y8.js → diagram-FQU43EPY-CrZvQjId.js} +1 -1
- package/ui-dist/assets/{diagram-G47NLZAW-C_413g5E.js → diagram-G47NLZAW-B7IGl_T3.js} +1 -1
- package/ui-dist/assets/{diagram-NH7WQ7WH-D_o9pXB-.js → diagram-NH7WQ7WH-CB4i7H1a.js} +1 -1
- package/ui-dist/assets/{diagram-OA4YK3LP-BI2xMqiW.js → diagram-OA4YK3LP-DNyWPYY9.js} +1 -1
- package/ui-dist/assets/{diagram-WEI45ONY-hhM8R_14.js → diagram-WEI45ONY-BAhxbhpi.js} +1 -1
- package/ui-dist/assets/{ebnfDiagram-CCIWWBDH-DfFgEtmG.js → ebnfDiagram-CCIWWBDH-ClXtQ9qt.js} +1 -1
- package/ui-dist/assets/{erDiagram-Q63AITRT-CCw4ysHK.js → erDiagram-Q63AITRT-DGXiMYfn.js} +1 -1
- package/ui-dist/assets/{flowDiagram-23GEKE2U-CzC1SMmo.js → flowDiagram-23GEKE2U-CdZ-02zc.js} +1 -1
- package/ui-dist/assets/{ganttDiagram-NO4QXBWP-CbPJIrIw.js → ganttDiagram-NO4QXBWP-TxhzNpta.js} +1 -1
- package/ui-dist/assets/{gitGraphDiagram-IHSO6WYX-jCxJ66_C.js → gitGraphDiagram-IHSO6WYX-D6Q_w6wR.js} +1 -1
- package/ui-dist/assets/{graph-BfNZ9Jzj.js → graph-CxNmbpl9.js} +1 -1
- package/ui-dist/assets/{index-D00XdcOq.js → index-AkhgKOxC.js} +1 -1
- package/ui-dist/assets/{index-DiMDROQY.js → index-BA9tMBhO.js} +1 -1
- package/ui-dist/assets/{index-DmjAbzHq.js → index-BQ87dGIq.js} +1 -1
- package/ui-dist/assets/index-BmXb0yC1.css +1 -0
- package/ui-dist/assets/{index-B8q4cbOz.js → index-BoTz5S-X.js} +1 -1
- package/ui-dist/assets/{index-D_K-9VDs.js → index-BujwWE3j.js} +1 -1
- package/ui-dist/assets/{index-Chop-Dpa.js → index-Bxz75ICF.js} +1 -1
- package/ui-dist/assets/{index-BKn4zRjf.js → index-C12QC1Ex.js} +1 -1
- package/ui-dist/assets/{index-BjxRqzZK.js → index-CW21qWFm.js} +1 -1
- package/ui-dist/assets/{index-ByUFNj0O.js → index-CXnqg1Oq.js} +1 -1
- package/ui-dist/assets/{index-B3h9Vdxx.js → index-C_nwI4Yj.js} +1 -1
- package/ui-dist/assets/{index-Ck-ZNQeD.js → index-Cx6oIZPm.js} +572 -561
- package/ui-dist/assets/{index-BE1vSI6a.js → index-DU2LI7f9.js} +1 -1
- package/ui-dist/assets/{index-SkHIC7Ma.js → index-Do78GymY.js} +1 -1
- package/ui-dist/assets/{index-Bwo-C8W5.js → index-Rau2cGm0.js} +1 -1
- package/ui-dist/assets/{index-BULll2e0.js → index-kbWUQ1um.js} +1 -1
- package/ui-dist/assets/{infoDiagram-FWYZ7A6U-BkDimGw3.js → infoDiagram-FWYZ7A6U-CnJd4-Jq.js} +1 -1
- package/ui-dist/assets/{ishikawaDiagram-FXEZZL3T-BAyUfn6x.js → ishikawaDiagram-FXEZZL3T-Bq-qc3pD.js} +1 -1
- package/ui-dist/assets/{journeyDiagram-5HDEW3XC-DlbpTZHG.js → journeyDiagram-5HDEW3XC-NSmpUGUA.js} +1 -1
- package/ui-dist/assets/{kanban-definition-HUTT4EX6-Cd67S14K.js → kanban-definition-HUTT4EX6-D7pgWtfA.js} +1 -1
- package/ui-dist/assets/{layout-Dc4YEiCC.js → layout-BRuo6LWe.js} +1 -1
- package/ui-dist/assets/{linear-BhRsbD_5.js → linear-CkaWI9Nd.js} +1 -1
- package/ui-dist/assets/{map-CEWybj6z.js → map-CgA6tTpZ.js} +1 -1
- package/ui-dist/assets/{mermaid.core-CqqAFYNg.js → mermaid.core-DrXOt-P6.js} +4 -4
- package/ui-dist/assets/{mindmap-definition-LN4V7U3C-CCb-XmEi.js → mindmap-definition-LN4V7U3C-D9ImeWBe.js} +1 -1
- package/ui-dist/assets/{pegDiagram-2B236MQR-CqUV14VZ.js → pegDiagram-2B236MQR-Cq-zZ_zz.js} +1 -1
- package/ui-dist/assets/{pieDiagram-ENE6RG2P-Dn_M_GRM.js → pieDiagram-ENE6RG2P-FgNgy726.js} +1 -1
- package/ui-dist/assets/{quadrantDiagram-ABIIQ3AL-rAEhJDr2.js → quadrantDiagram-ABIIQ3AL-BxQbmGmi.js} +1 -1
- package/ui-dist/assets/{railroadDiagram-RFXS5EU6-iE2o_jkH.js → railroadDiagram-RFXS5EU6-CrpbkPH2.js} +1 -1
- package/ui-dist/assets/{requirementDiagram-TGXJPOKE-BFyKBR1h.js → requirementDiagram-TGXJPOKE-DQ-65ZW6.js} +1 -1
- package/ui-dist/assets/{sankeyDiagram-HTMAVEWB-DRa_2YB6.js → sankeyDiagram-HTMAVEWB-Bom0lMZm.js} +1 -1
- package/ui-dist/assets/{sequenceDiagram-DBY2YBRQ-BG8VIjD7.js → sequenceDiagram-DBY2YBRQ-C1MSDLDj.js} +1 -1
- package/ui-dist/assets/{sizeCapture-X5ZJPWSS-CS1xlbzG.js → sizeCapture-X5ZJPWSS-Bn1vxebD.js} +1 -1
- package/ui-dist/assets/{stateDiagram-2N3HPSRC-BSl2RUJ1.js → stateDiagram-2N3HPSRC-GRRQpmzI.js} +1 -1
- package/ui-dist/assets/stateDiagram-v2-6OUMAXLB-KvSJhiLM.js +1 -0
- package/ui-dist/assets/{swimlanes-5IMT3BWC-BT8Hrm9J.js → swimlanes-5IMT3BWC-BcOOCZ4q.js} +2 -2
- package/ui-dist/assets/swimlanesDiagram-G3AALYLV-Cr92NnJ4.js +8 -0
- package/ui-dist/assets/{timeline-definition-FHXFAJF6-CfYIqEuQ.js → timeline-definition-FHXFAJF6-gi6amswh.js} +1 -1
- package/ui-dist/assets/{vennDiagram-L72KCM5P-C8zBH7o9.js → vennDiagram-L72KCM5P-B9uqeyQt.js} +1 -1
- package/ui-dist/assets/{wardleyDiagram-EHGQE667-D5HyFfI9.js → wardleyDiagram-EHGQE667-BnqWAMiE.js} +1 -1
- package/ui-dist/assets/{xychartDiagram-FW5EYKEG-CGItJmLx.js → xychartDiagram-FW5EYKEG-BJXKltIN.js} +1 -1
- package/ui-dist/index.html +2 -2
- package/dist/services/issue-goal-fallback.d.ts +0 -15
- package/dist/services/issue-goal-fallback.d.ts.map +0 -1
- package/dist/services/issue-goal-fallback.js +0 -27
- package/dist/services/issue-goal-fallback.js.map +0 -1
- package/ui-dist/assets/channel-DLNwhPnC.js +0 -1
- package/ui-dist/assets/classDiagram-OUVF2IWQ-JsIc-rlc.js +0 -1
- package/ui-dist/assets/classDiagram-v2-EOCWNBFH-JsIc-rlc.js +0 -1
- package/ui-dist/assets/index-CxPYXL3t.css +0 -1
- package/ui-dist/assets/stateDiagram-v2-6OUMAXLB-DUVNSzI8.js +0 -1
- package/ui-dist/assets/swimlanesDiagram-G3AALYLV-DfLFj7sh.js +0 -8
package/dist/services/goals.d.ts
CHANGED
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* service.
|
|
2
|
+
* Goal contract service.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Reasoning:
|
|
5
|
+
* - Contract/lifecycle changes are commands so a caller cannot silently turn
|
|
6
|
+
* a Goal into an achieved result by patching a legacy status column.
|
|
7
|
+
* - Legacy hierarchy columns remain readable for existing issue/project links,
|
|
8
|
+
* but canonical Goals are top-level drafts with an explicit Owner and Plan.
|
|
9
|
+
*
|
|
10
|
+
* Traceability:
|
|
11
|
+
* - doc/plans/2026-08-04-goal-system-refactor.md
|
|
12
|
+
* - doc/product/domains/organizations-and-goals/goals-and-projects.md
|
|
8
13
|
*/
|
|
9
14
|
import type { Db } from "@rudderhq/db";
|
|
10
|
-
import { goals } from "@rudderhq/db";
|
|
11
|
-
import type { GoalDependencies } from "@rudderhq/shared";
|
|
12
|
-
type GoalReader = Pick<Db, "select">;
|
|
15
|
+
import { agents, goals } from "@rudderhq/db";
|
|
16
|
+
import type { AcceptGoalResultProposal, ActivateGoal, AssignGoalOwner, CreateGoalActivity, CreateGoalChangeProposal, CreateGoalFeedback, CreateGoalResultProposal, DecideGoalChangeProposal, EvaluateGoal, GoalContractPatch, GoalContractSnapshot, GoalDependencies, GoalEvaluationCandidate, GoalResultProposal, GoalResultReducerPreflight, GoalStartPreview, PreviewGoalStart, RejectGoalResultProposal, StartGoal, UpdateGoalPlan } from "@rudderhq/shared";
|
|
13
17
|
type GoalRow = typeof goals.$inferSelect;
|
|
14
|
-
type
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
type GoalAgent = Pick<typeof agents.$inferSelect, "id" | "orgId" | "name" | "status" | "role" | "title" | "capabilities">;
|
|
19
|
+
export declare function stableGoalHash(value: unknown): string;
|
|
20
|
+
type ExternalGoalCheckpoint = {
|
|
17
21
|
id: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
updatedAt: Date;
|
|
27
|
-
}>;
|
|
22
|
+
kind: "checkpoint";
|
|
23
|
+
summary: string;
|
|
24
|
+
occurredAt: Date;
|
|
25
|
+
sourceId: string;
|
|
26
|
+
sourceRunId: string | null;
|
|
27
|
+
evidenceRefs: string[];
|
|
28
|
+
};
|
|
29
|
+
export declare function compileGoalStartPreview(input: PreviewGoalStart, owner: GoalAgent | null): GoalStartPreview;
|
|
28
30
|
export declare function getGoalDependencies(db: Db, goal: GoalRow): Promise<GoalDependencies>;
|
|
31
|
+
export declare function reduceGoalEvaluation(goal: Pick<GoalRow, "objectiveMode" | "criteria">, input: EvaluateGoal): {
|
|
32
|
+
mode: GoalResultProposal["preflight"]["mode"];
|
|
33
|
+
outcome: string;
|
|
34
|
+
criteria: {
|
|
35
|
+
id: string;
|
|
36
|
+
evaluator: "artifact" | "metric" | "policy" | "human" | null;
|
|
37
|
+
status: "unknown" | "met" | "unmet" | "breached";
|
|
38
|
+
evidenceSatisfied: boolean;
|
|
39
|
+
missingEvidence: string[];
|
|
40
|
+
}[];
|
|
41
|
+
evidenceRefs: string[];
|
|
42
|
+
resultValue: string | number | boolean | undefined;
|
|
43
|
+
decision: string | null;
|
|
44
|
+
evaluatedAt: string;
|
|
45
|
+
};
|
|
29
46
|
export declare function goalService(db: Db): {
|
|
30
47
|
list: (orgId: string) => Omit<import("drizzle-orm/pg-core").PgSelectBase<"goals", {
|
|
31
48
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
@@ -96,15 +113,15 @@ export declare function goalService(db: Db): {
|
|
|
96
113
|
identity: undefined;
|
|
97
114
|
generated: undefined;
|
|
98
115
|
}, {}, {}>;
|
|
99
|
-
|
|
100
|
-
name: "
|
|
116
|
+
alignmentQuestion: import("drizzle-orm/pg-core").PgColumn<{
|
|
117
|
+
name: "alignment_question";
|
|
101
118
|
tableName: "goals";
|
|
102
119
|
dataType: "string";
|
|
103
120
|
columnType: "PgText";
|
|
104
121
|
data: string;
|
|
105
122
|
driverParam: string;
|
|
106
|
-
notNull:
|
|
107
|
-
hasDefault:
|
|
123
|
+
notNull: false;
|
|
124
|
+
hasDefault: false;
|
|
108
125
|
isPrimaryKey: false;
|
|
109
126
|
isAutoincrement: false;
|
|
110
127
|
hasRuntimeDefault: false;
|
|
@@ -113,15 +130,15 @@ export declare function goalService(db: Db): {
|
|
|
113
130
|
identity: undefined;
|
|
114
131
|
generated: undefined;
|
|
115
132
|
}, {}, {}>;
|
|
116
|
-
|
|
117
|
-
name: "
|
|
133
|
+
outcomeStatement: import("drizzle-orm/pg-core").PgColumn<{
|
|
134
|
+
name: "outcome_statement";
|
|
118
135
|
tableName: "goals";
|
|
119
136
|
dataType: "string";
|
|
120
137
|
columnType: "PgText";
|
|
121
138
|
data: string;
|
|
122
139
|
driverParam: string;
|
|
123
|
-
notNull:
|
|
124
|
-
hasDefault:
|
|
140
|
+
notNull: false;
|
|
141
|
+
hasDefault: false;
|
|
125
142
|
isPrimaryKey: false;
|
|
126
143
|
isAutoincrement: false;
|
|
127
144
|
hasRuntimeDefault: false;
|
|
@@ -130,32 +147,49 @@ export declare function goalService(db: Db): {
|
|
|
130
147
|
identity: undefined;
|
|
131
148
|
generated: undefined;
|
|
132
149
|
}, {}, {}>;
|
|
133
|
-
|
|
134
|
-
name: "
|
|
150
|
+
objectiveMode: import("drizzle-orm/pg-core").PgColumn<{
|
|
151
|
+
name: "objective_mode";
|
|
135
152
|
tableName: "goals";
|
|
136
153
|
dataType: "string";
|
|
137
|
-
columnType: "
|
|
154
|
+
columnType: "PgText";
|
|
138
155
|
data: string;
|
|
139
156
|
driverParam: string;
|
|
140
|
-
notNull:
|
|
141
|
-
hasDefault:
|
|
157
|
+
notNull: true;
|
|
158
|
+
hasDefault: true;
|
|
142
159
|
isPrimaryKey: false;
|
|
143
160
|
isAutoincrement: false;
|
|
144
161
|
hasRuntimeDefault: false;
|
|
145
|
-
enumValues:
|
|
162
|
+
enumValues: [string, ...string[]];
|
|
146
163
|
baseColumn: never;
|
|
147
164
|
identity: undefined;
|
|
148
165
|
generated: undefined;
|
|
149
166
|
}, {}, {}>;
|
|
150
|
-
|
|
151
|
-
name: "
|
|
167
|
+
lifecycle: import("drizzle-orm/pg-core").PgColumn<{
|
|
168
|
+
name: "lifecycle";
|
|
152
169
|
tableName: "goals";
|
|
153
170
|
dataType: "string";
|
|
154
|
-
columnType: "
|
|
171
|
+
columnType: "PgText";
|
|
155
172
|
data: string;
|
|
156
173
|
driverParam: string;
|
|
157
|
-
notNull:
|
|
158
|
-
hasDefault:
|
|
174
|
+
notNull: true;
|
|
175
|
+
hasDefault: true;
|
|
176
|
+
isPrimaryKey: false;
|
|
177
|
+
isAutoincrement: false;
|
|
178
|
+
hasRuntimeDefault: false;
|
|
179
|
+
enumValues: [string, ...string[]];
|
|
180
|
+
baseColumn: never;
|
|
181
|
+
identity: undefined;
|
|
182
|
+
generated: undefined;
|
|
183
|
+
}, {}, {}>;
|
|
184
|
+
contractRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
185
|
+
name: "contract_revision";
|
|
186
|
+
tableName: "goals";
|
|
187
|
+
dataType: "number";
|
|
188
|
+
columnType: "PgInteger";
|
|
189
|
+
data: number;
|
|
190
|
+
driverParam: string | number;
|
|
191
|
+
notNull: true;
|
|
192
|
+
hasDefault: true;
|
|
159
193
|
isPrimaryKey: false;
|
|
160
194
|
isAutoincrement: false;
|
|
161
195
|
hasRuntimeDefault: false;
|
|
@@ -164,15 +198,91 @@ export declare function goalService(db: Db): {
|
|
|
164
198
|
identity: undefined;
|
|
165
199
|
generated: undefined;
|
|
166
200
|
}, {}, {}>;
|
|
167
|
-
|
|
168
|
-
name: "
|
|
201
|
+
criteria: import("drizzle-orm/pg-core").PgColumn<{
|
|
202
|
+
name: "criteria";
|
|
203
|
+
tableName: "goals";
|
|
204
|
+
dataType: "json";
|
|
205
|
+
columnType: "PgJsonb";
|
|
206
|
+
data: unknown[];
|
|
207
|
+
driverParam: unknown;
|
|
208
|
+
notNull: true;
|
|
209
|
+
hasDefault: true;
|
|
210
|
+
isPrimaryKey: false;
|
|
211
|
+
isAutoincrement: false;
|
|
212
|
+
hasRuntimeDefault: false;
|
|
213
|
+
enumValues: undefined;
|
|
214
|
+
baseColumn: never;
|
|
215
|
+
identity: undefined;
|
|
216
|
+
generated: undefined;
|
|
217
|
+
}, {}, {
|
|
218
|
+
$type: unknown[];
|
|
219
|
+
}>;
|
|
220
|
+
autonomyEnvelope: import("drizzle-orm/pg-core").PgColumn<{
|
|
221
|
+
name: "autonomy_envelope";
|
|
222
|
+
tableName: "goals";
|
|
223
|
+
dataType: "json";
|
|
224
|
+
columnType: "PgJsonb";
|
|
225
|
+
data: Record<string, unknown>;
|
|
226
|
+
driverParam: unknown;
|
|
227
|
+
notNull: true;
|
|
228
|
+
hasDefault: true;
|
|
229
|
+
isPrimaryKey: false;
|
|
230
|
+
isAutoincrement: false;
|
|
231
|
+
hasRuntimeDefault: false;
|
|
232
|
+
enumValues: undefined;
|
|
233
|
+
baseColumn: never;
|
|
234
|
+
identity: undefined;
|
|
235
|
+
generated: undefined;
|
|
236
|
+
}, {}, {
|
|
237
|
+
$type: Record<string, unknown>;
|
|
238
|
+
}>;
|
|
239
|
+
humanAuthorities: import("drizzle-orm/pg-core").PgColumn<{
|
|
240
|
+
name: "human_authorities";
|
|
241
|
+
tableName: "goals";
|
|
242
|
+
dataType: "json";
|
|
243
|
+
columnType: "PgJsonb";
|
|
244
|
+
data: Record<string, unknown>;
|
|
245
|
+
driverParam: unknown;
|
|
246
|
+
notNull: true;
|
|
247
|
+
hasDefault: true;
|
|
248
|
+
isPrimaryKey: false;
|
|
249
|
+
isAutoincrement: false;
|
|
250
|
+
hasRuntimeDefault: false;
|
|
251
|
+
enumValues: undefined;
|
|
252
|
+
baseColumn: never;
|
|
253
|
+
identity: undefined;
|
|
254
|
+
generated: undefined;
|
|
255
|
+
}, {}, {
|
|
256
|
+
$type: Record<string, unknown>;
|
|
257
|
+
}>;
|
|
258
|
+
evaluationPolicy: import("drizzle-orm/pg-core").PgColumn<{
|
|
259
|
+
name: "evaluation_policy";
|
|
260
|
+
tableName: "goals";
|
|
261
|
+
dataType: "json";
|
|
262
|
+
columnType: "PgJsonb";
|
|
263
|
+
data: Record<string, unknown>;
|
|
264
|
+
driverParam: unknown;
|
|
265
|
+
notNull: true;
|
|
266
|
+
hasDefault: true;
|
|
267
|
+
isPrimaryKey: false;
|
|
268
|
+
isAutoincrement: false;
|
|
269
|
+
hasRuntimeDefault: false;
|
|
270
|
+
enumValues: undefined;
|
|
271
|
+
baseColumn: never;
|
|
272
|
+
identity: undefined;
|
|
273
|
+
generated: undefined;
|
|
274
|
+
}, {}, {
|
|
275
|
+
$type: Record<string, unknown>;
|
|
276
|
+
}>;
|
|
277
|
+
actionDeadline: import("drizzle-orm/pg-core").PgColumn<{
|
|
278
|
+
name: "action_deadline";
|
|
169
279
|
tableName: "goals";
|
|
170
280
|
dataType: "date";
|
|
171
281
|
columnType: "PgTimestamp";
|
|
172
282
|
data: Date;
|
|
173
283
|
driverParam: string;
|
|
174
|
-
notNull:
|
|
175
|
-
hasDefault:
|
|
284
|
+
notNull: false;
|
|
285
|
+
hasDefault: false;
|
|
176
286
|
isPrimaryKey: false;
|
|
177
287
|
isAutoincrement: false;
|
|
178
288
|
hasRuntimeDefault: false;
|
|
@@ -181,15 +291,15 @@ export declare function goalService(db: Db): {
|
|
|
181
291
|
identity: undefined;
|
|
182
292
|
generated: undefined;
|
|
183
293
|
}, {}, {}>;
|
|
184
|
-
|
|
185
|
-
name: "
|
|
294
|
+
evaluationDeadline: import("drizzle-orm/pg-core").PgColumn<{
|
|
295
|
+
name: "evaluation_deadline";
|
|
186
296
|
tableName: "goals";
|
|
187
297
|
dataType: "date";
|
|
188
298
|
columnType: "PgTimestamp";
|
|
189
299
|
data: Date;
|
|
190
300
|
driverParam: string;
|
|
191
|
-
notNull:
|
|
192
|
-
hasDefault:
|
|
301
|
+
notNull: false;
|
|
302
|
+
hasDefault: false;
|
|
193
303
|
isPrimaryKey: false;
|
|
194
304
|
isAutoincrement: false;
|
|
195
305
|
hasRuntimeDefault: false;
|
|
@@ -198,28 +308,71 @@ export declare function goalService(db: Db): {
|
|
|
198
308
|
identity: undefined;
|
|
199
309
|
generated: undefined;
|
|
200
310
|
}, {}, {}>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
311
|
+
evaluationResult: import("drizzle-orm/pg-core").PgColumn<{
|
|
312
|
+
name: "evaluation_result";
|
|
313
|
+
tableName: "goals";
|
|
314
|
+
dataType: "json";
|
|
315
|
+
columnType: "PgJsonb";
|
|
316
|
+
data: Record<string, unknown> | null;
|
|
317
|
+
driverParam: unknown;
|
|
318
|
+
notNull: false;
|
|
319
|
+
hasDefault: false;
|
|
320
|
+
isPrimaryKey: false;
|
|
321
|
+
isAutoincrement: false;
|
|
322
|
+
hasRuntimeDefault: false;
|
|
323
|
+
enumValues: undefined;
|
|
324
|
+
baseColumn: never;
|
|
325
|
+
identity: undefined;
|
|
326
|
+
generated: undefined;
|
|
327
|
+
}, {}, {
|
|
328
|
+
$type: Record<string, unknown> | null;
|
|
329
|
+
}>;
|
|
330
|
+
closeReason: import("drizzle-orm/pg-core").PgColumn<{
|
|
331
|
+
name: "close_reason";
|
|
215
332
|
tableName: "goals";
|
|
216
333
|
dataType: "string";
|
|
217
|
-
columnType: "
|
|
334
|
+
columnType: "PgText";
|
|
218
335
|
data: string;
|
|
219
336
|
driverParam: string;
|
|
337
|
+
notNull: false;
|
|
338
|
+
hasDefault: false;
|
|
339
|
+
isPrimaryKey: false;
|
|
340
|
+
isAutoincrement: false;
|
|
341
|
+
hasRuntimeDefault: false;
|
|
342
|
+
enumValues: [string, ...string[]];
|
|
343
|
+
baseColumn: never;
|
|
344
|
+
identity: undefined;
|
|
345
|
+
generated: undefined;
|
|
346
|
+
}, {}, {}>;
|
|
347
|
+
resultPayload: import("drizzle-orm/pg-core").PgColumn<{
|
|
348
|
+
name: "result_payload";
|
|
349
|
+
tableName: "goals";
|
|
350
|
+
dataType: "json";
|
|
351
|
+
columnType: "PgJsonb";
|
|
352
|
+
data: Record<string, unknown> | null;
|
|
353
|
+
driverParam: unknown;
|
|
354
|
+
notNull: false;
|
|
355
|
+
hasDefault: false;
|
|
356
|
+
isPrimaryKey: false;
|
|
357
|
+
isAutoincrement: false;
|
|
358
|
+
hasRuntimeDefault: false;
|
|
359
|
+
enumValues: undefined;
|
|
360
|
+
baseColumn: never;
|
|
361
|
+
identity: undefined;
|
|
362
|
+
generated: undefined;
|
|
363
|
+
}, {}, {
|
|
364
|
+
$type: Record<string, unknown> | null;
|
|
365
|
+
}>;
|
|
366
|
+
focus: import("drizzle-orm/pg-core").PgColumn<{
|
|
367
|
+
name: "focus";
|
|
368
|
+
tableName: "goals";
|
|
369
|
+
dataType: "boolean";
|
|
370
|
+
columnType: "PgBoolean";
|
|
371
|
+
data: boolean;
|
|
372
|
+
driverParam: boolean;
|
|
220
373
|
notNull: true;
|
|
221
374
|
hasDefault: true;
|
|
222
|
-
isPrimaryKey:
|
|
375
|
+
isPrimaryKey: false;
|
|
223
376
|
isAutoincrement: false;
|
|
224
377
|
hasRuntimeDefault: false;
|
|
225
378
|
enumValues: undefined;
|
|
@@ -227,31 +380,48 @@ export declare function goalService(db: Db): {
|
|
|
227
380
|
identity: undefined;
|
|
228
381
|
generated: undefined;
|
|
229
382
|
}, {}, {}>;
|
|
230
|
-
|
|
231
|
-
name: "
|
|
383
|
+
planRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
384
|
+
name: "plan_revision";
|
|
385
|
+
tableName: "goals";
|
|
386
|
+
dataType: "number";
|
|
387
|
+
columnType: "PgInteger";
|
|
388
|
+
data: number;
|
|
389
|
+
driverParam: string | number;
|
|
390
|
+
notNull: true;
|
|
391
|
+
hasDefault: true;
|
|
392
|
+
isPrimaryKey: false;
|
|
393
|
+
isAutoincrement: false;
|
|
394
|
+
hasRuntimeDefault: false;
|
|
395
|
+
enumValues: undefined;
|
|
396
|
+
baseColumn: never;
|
|
397
|
+
identity: undefined;
|
|
398
|
+
generated: undefined;
|
|
399
|
+
}, {}, {}>;
|
|
400
|
+
continuationKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
401
|
+
name: "continuation_kind";
|
|
232
402
|
tableName: "goals";
|
|
233
403
|
dataType: "string";
|
|
234
|
-
columnType: "
|
|
404
|
+
columnType: "PgText";
|
|
235
405
|
data: string;
|
|
236
406
|
driverParam: string;
|
|
237
|
-
notNull:
|
|
407
|
+
notNull: false;
|
|
238
408
|
hasDefault: false;
|
|
239
409
|
isPrimaryKey: false;
|
|
240
410
|
isAutoincrement: false;
|
|
241
411
|
hasRuntimeDefault: false;
|
|
242
|
-
enumValues:
|
|
412
|
+
enumValues: [string, ...string[]];
|
|
243
413
|
baseColumn: never;
|
|
244
414
|
identity: undefined;
|
|
245
415
|
generated: undefined;
|
|
246
416
|
}, {}, {}>;
|
|
247
|
-
|
|
248
|
-
name: "
|
|
417
|
+
continuationSummary: import("drizzle-orm/pg-core").PgColumn<{
|
|
418
|
+
name: "continuation_summary";
|
|
249
419
|
tableName: "goals";
|
|
250
420
|
dataType: "string";
|
|
251
421
|
columnType: "PgText";
|
|
252
422
|
data: string;
|
|
253
423
|
driverParam: string;
|
|
254
|
-
notNull:
|
|
424
|
+
notNull: false;
|
|
255
425
|
hasDefault: false;
|
|
256
426
|
isPrimaryKey: false;
|
|
257
427
|
isAutoincrement: false;
|
|
@@ -261,8 +431,8 @@ export declare function goalService(db: Db): {
|
|
|
261
431
|
identity: undefined;
|
|
262
432
|
generated: undefined;
|
|
263
433
|
}, {}, {}>;
|
|
264
|
-
|
|
265
|
-
name: "
|
|
434
|
+
wakeCondition: import("drizzle-orm/pg-core").PgColumn<{
|
|
435
|
+
name: "wake_condition";
|
|
266
436
|
tableName: "goals";
|
|
267
437
|
dataType: "string";
|
|
268
438
|
columnType: "PgText";
|
|
@@ -380,68 +550,1813 @@ export declare function goalService(db: Db): {
|
|
|
380
550
|
identity: undefined;
|
|
381
551
|
generated: undefined;
|
|
382
552
|
}, {}, {}>;
|
|
383
|
-
}>, "where"
|
|
384
|
-
getById: (id: string) => Promise<{
|
|
385
|
-
id: string;
|
|
386
|
-
orgId: string;
|
|
387
|
-
title: string;
|
|
388
|
-
description: string | null;
|
|
389
|
-
level: string;
|
|
390
|
-
status: string;
|
|
391
|
-
parentId: string | null;
|
|
392
|
-
ownerAgentId: string | null;
|
|
393
|
-
createdAt: Date;
|
|
394
|
-
updatedAt: Date;
|
|
395
|
-
}>;
|
|
396
|
-
getDefaultCompanyGoal: (orgId: string) => Promise<{
|
|
397
|
-
id: string;
|
|
398
|
-
orgId: string;
|
|
399
|
-
title: string;
|
|
400
|
-
description: string | null;
|
|
401
|
-
level: string;
|
|
402
|
-
status: string;
|
|
403
|
-
parentId: string | null;
|
|
404
|
-
ownerAgentId: string | null;
|
|
405
|
-
createdAt: Date;
|
|
406
|
-
updatedAt: Date;
|
|
407
|
-
}>;
|
|
408
|
-
dependencies: (goal: GoalRow) => Promise<GoalDependencies>;
|
|
409
|
-
create: (orgId: string, data: GoalInput) => Promise<{
|
|
410
|
-
status: string;
|
|
411
|
-
title: string;
|
|
412
|
-
id: string;
|
|
413
|
-
updatedAt: Date;
|
|
414
|
-
orgId: string;
|
|
415
|
-
ownerAgentId: string | null;
|
|
416
|
-
description: string | null;
|
|
417
|
-
createdAt: Date;
|
|
418
|
-
parentId: string | null;
|
|
419
|
-
level: string;
|
|
420
|
-
}>;
|
|
421
|
-
update: (id: string, data: GoalPatch) => Promise<{
|
|
553
|
+
}, "single", Record<"goals", "not-null">, false, "where" | "orderBy", {
|
|
422
554
|
id: string;
|
|
423
555
|
orgId: string;
|
|
424
556
|
title: string;
|
|
425
557
|
description: string | null;
|
|
558
|
+
alignmentQuestion: string | null;
|
|
559
|
+
outcomeStatement: string | null;
|
|
560
|
+
objectiveMode: string;
|
|
561
|
+
lifecycle: string;
|
|
562
|
+
contractRevision: number;
|
|
563
|
+
criteria: unknown[];
|
|
564
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
565
|
+
humanAuthorities: Record<string, unknown>;
|
|
566
|
+
evaluationPolicy: Record<string, unknown>;
|
|
567
|
+
actionDeadline: Date | null;
|
|
568
|
+
evaluationDeadline: Date | null;
|
|
569
|
+
evaluationResult: Record<string, unknown> | null;
|
|
570
|
+
closeReason: string | null;
|
|
571
|
+
resultPayload: Record<string, unknown> | null;
|
|
572
|
+
focus: boolean;
|
|
573
|
+
planRevision: number;
|
|
574
|
+
continuationKind: string | null;
|
|
575
|
+
continuationSummary: string | null;
|
|
576
|
+
wakeCondition: string | null;
|
|
426
577
|
level: string;
|
|
427
578
|
status: string;
|
|
428
579
|
parentId: string | null;
|
|
429
580
|
ownerAgentId: string | null;
|
|
430
581
|
createdAt: Date;
|
|
431
582
|
updatedAt: Date;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
583
|
+
}[], {
|
|
584
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
585
|
+
name: "id";
|
|
586
|
+
tableName: "goals";
|
|
587
|
+
dataType: "string";
|
|
588
|
+
columnType: "PgUUID";
|
|
589
|
+
data: string;
|
|
590
|
+
driverParam: string;
|
|
591
|
+
notNull: true;
|
|
592
|
+
hasDefault: true;
|
|
593
|
+
isPrimaryKey: true;
|
|
594
|
+
isAutoincrement: false;
|
|
595
|
+
hasRuntimeDefault: false;
|
|
596
|
+
enumValues: undefined;
|
|
597
|
+
baseColumn: never;
|
|
598
|
+
identity: undefined;
|
|
599
|
+
generated: undefined;
|
|
600
|
+
}, {}, {}>;
|
|
601
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
602
|
+
name: "org_id";
|
|
603
|
+
tableName: "goals";
|
|
604
|
+
dataType: "string";
|
|
605
|
+
columnType: "PgUUID";
|
|
606
|
+
data: string;
|
|
607
|
+
driverParam: string;
|
|
608
|
+
notNull: true;
|
|
609
|
+
hasDefault: false;
|
|
610
|
+
isPrimaryKey: false;
|
|
611
|
+
isAutoincrement: false;
|
|
612
|
+
hasRuntimeDefault: false;
|
|
613
|
+
enumValues: undefined;
|
|
614
|
+
baseColumn: never;
|
|
615
|
+
identity: undefined;
|
|
616
|
+
generated: undefined;
|
|
617
|
+
}, {}, {}>;
|
|
618
|
+
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
619
|
+
name: "title";
|
|
620
|
+
tableName: "goals";
|
|
621
|
+
dataType: "string";
|
|
622
|
+
columnType: "PgText";
|
|
623
|
+
data: string;
|
|
624
|
+
driverParam: string;
|
|
625
|
+
notNull: true;
|
|
626
|
+
hasDefault: false;
|
|
627
|
+
isPrimaryKey: false;
|
|
628
|
+
isAutoincrement: false;
|
|
629
|
+
hasRuntimeDefault: false;
|
|
630
|
+
enumValues: [string, ...string[]];
|
|
631
|
+
baseColumn: never;
|
|
632
|
+
identity: undefined;
|
|
633
|
+
generated: undefined;
|
|
634
|
+
}, {}, {}>;
|
|
635
|
+
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
636
|
+
name: "description";
|
|
637
|
+
tableName: "goals";
|
|
638
|
+
dataType: "string";
|
|
639
|
+
columnType: "PgText";
|
|
640
|
+
data: string;
|
|
641
|
+
driverParam: string;
|
|
642
|
+
notNull: false;
|
|
643
|
+
hasDefault: false;
|
|
644
|
+
isPrimaryKey: false;
|
|
645
|
+
isAutoincrement: false;
|
|
646
|
+
hasRuntimeDefault: false;
|
|
647
|
+
enumValues: [string, ...string[]];
|
|
648
|
+
baseColumn: never;
|
|
649
|
+
identity: undefined;
|
|
650
|
+
generated: undefined;
|
|
651
|
+
}, {}, {}>;
|
|
652
|
+
alignmentQuestion: import("drizzle-orm/pg-core").PgColumn<{
|
|
653
|
+
name: "alignment_question";
|
|
654
|
+
tableName: "goals";
|
|
655
|
+
dataType: "string";
|
|
656
|
+
columnType: "PgText";
|
|
657
|
+
data: string;
|
|
658
|
+
driverParam: string;
|
|
659
|
+
notNull: false;
|
|
660
|
+
hasDefault: false;
|
|
661
|
+
isPrimaryKey: false;
|
|
662
|
+
isAutoincrement: false;
|
|
663
|
+
hasRuntimeDefault: false;
|
|
664
|
+
enumValues: [string, ...string[]];
|
|
665
|
+
baseColumn: never;
|
|
666
|
+
identity: undefined;
|
|
667
|
+
generated: undefined;
|
|
668
|
+
}, {}, {}>;
|
|
669
|
+
outcomeStatement: import("drizzle-orm/pg-core").PgColumn<{
|
|
670
|
+
name: "outcome_statement";
|
|
671
|
+
tableName: "goals";
|
|
672
|
+
dataType: "string";
|
|
673
|
+
columnType: "PgText";
|
|
674
|
+
data: string;
|
|
675
|
+
driverParam: string;
|
|
676
|
+
notNull: false;
|
|
677
|
+
hasDefault: false;
|
|
678
|
+
isPrimaryKey: false;
|
|
679
|
+
isAutoincrement: false;
|
|
680
|
+
hasRuntimeDefault: false;
|
|
681
|
+
enumValues: [string, ...string[]];
|
|
682
|
+
baseColumn: never;
|
|
683
|
+
identity: undefined;
|
|
684
|
+
generated: undefined;
|
|
685
|
+
}, {}, {}>;
|
|
686
|
+
objectiveMode: import("drizzle-orm/pg-core").PgColumn<{
|
|
687
|
+
name: "objective_mode";
|
|
688
|
+
tableName: "goals";
|
|
689
|
+
dataType: "string";
|
|
690
|
+
columnType: "PgText";
|
|
691
|
+
data: string;
|
|
692
|
+
driverParam: string;
|
|
693
|
+
notNull: true;
|
|
694
|
+
hasDefault: true;
|
|
695
|
+
isPrimaryKey: false;
|
|
696
|
+
isAutoincrement: false;
|
|
697
|
+
hasRuntimeDefault: false;
|
|
698
|
+
enumValues: [string, ...string[]];
|
|
699
|
+
baseColumn: never;
|
|
700
|
+
identity: undefined;
|
|
701
|
+
generated: undefined;
|
|
702
|
+
}, {}, {}>;
|
|
703
|
+
lifecycle: import("drizzle-orm/pg-core").PgColumn<{
|
|
704
|
+
name: "lifecycle";
|
|
705
|
+
tableName: "goals";
|
|
706
|
+
dataType: "string";
|
|
707
|
+
columnType: "PgText";
|
|
708
|
+
data: string;
|
|
709
|
+
driverParam: string;
|
|
710
|
+
notNull: true;
|
|
711
|
+
hasDefault: true;
|
|
712
|
+
isPrimaryKey: false;
|
|
713
|
+
isAutoincrement: false;
|
|
714
|
+
hasRuntimeDefault: false;
|
|
715
|
+
enumValues: [string, ...string[]];
|
|
716
|
+
baseColumn: never;
|
|
717
|
+
identity: undefined;
|
|
718
|
+
generated: undefined;
|
|
719
|
+
}, {}, {}>;
|
|
720
|
+
contractRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
721
|
+
name: "contract_revision";
|
|
722
|
+
tableName: "goals";
|
|
723
|
+
dataType: "number";
|
|
724
|
+
columnType: "PgInteger";
|
|
725
|
+
data: number;
|
|
726
|
+
driverParam: string | number;
|
|
727
|
+
notNull: true;
|
|
728
|
+
hasDefault: true;
|
|
729
|
+
isPrimaryKey: false;
|
|
730
|
+
isAutoincrement: false;
|
|
731
|
+
hasRuntimeDefault: false;
|
|
732
|
+
enumValues: undefined;
|
|
733
|
+
baseColumn: never;
|
|
734
|
+
identity: undefined;
|
|
735
|
+
generated: undefined;
|
|
736
|
+
}, {}, {}>;
|
|
737
|
+
criteria: import("drizzle-orm/pg-core").PgColumn<{
|
|
738
|
+
name: "criteria";
|
|
739
|
+
tableName: "goals";
|
|
740
|
+
dataType: "json";
|
|
741
|
+
columnType: "PgJsonb";
|
|
742
|
+
data: unknown[];
|
|
743
|
+
driverParam: unknown;
|
|
744
|
+
notNull: true;
|
|
745
|
+
hasDefault: true;
|
|
746
|
+
isPrimaryKey: false;
|
|
747
|
+
isAutoincrement: false;
|
|
748
|
+
hasRuntimeDefault: false;
|
|
749
|
+
enumValues: undefined;
|
|
750
|
+
baseColumn: never;
|
|
751
|
+
identity: undefined;
|
|
752
|
+
generated: undefined;
|
|
753
|
+
}, {}, {
|
|
754
|
+
$type: unknown[];
|
|
755
|
+
}>;
|
|
756
|
+
autonomyEnvelope: import("drizzle-orm/pg-core").PgColumn<{
|
|
757
|
+
name: "autonomy_envelope";
|
|
758
|
+
tableName: "goals";
|
|
759
|
+
dataType: "json";
|
|
760
|
+
columnType: "PgJsonb";
|
|
761
|
+
data: Record<string, unknown>;
|
|
762
|
+
driverParam: unknown;
|
|
763
|
+
notNull: true;
|
|
764
|
+
hasDefault: true;
|
|
765
|
+
isPrimaryKey: false;
|
|
766
|
+
isAutoincrement: false;
|
|
767
|
+
hasRuntimeDefault: false;
|
|
768
|
+
enumValues: undefined;
|
|
769
|
+
baseColumn: never;
|
|
770
|
+
identity: undefined;
|
|
771
|
+
generated: undefined;
|
|
772
|
+
}, {}, {
|
|
773
|
+
$type: Record<string, unknown>;
|
|
774
|
+
}>;
|
|
775
|
+
humanAuthorities: import("drizzle-orm/pg-core").PgColumn<{
|
|
776
|
+
name: "human_authorities";
|
|
777
|
+
tableName: "goals";
|
|
778
|
+
dataType: "json";
|
|
779
|
+
columnType: "PgJsonb";
|
|
780
|
+
data: Record<string, unknown>;
|
|
781
|
+
driverParam: unknown;
|
|
782
|
+
notNull: true;
|
|
783
|
+
hasDefault: true;
|
|
784
|
+
isPrimaryKey: false;
|
|
785
|
+
isAutoincrement: false;
|
|
786
|
+
hasRuntimeDefault: false;
|
|
787
|
+
enumValues: undefined;
|
|
788
|
+
baseColumn: never;
|
|
789
|
+
identity: undefined;
|
|
790
|
+
generated: undefined;
|
|
791
|
+
}, {}, {
|
|
792
|
+
$type: Record<string, unknown>;
|
|
793
|
+
}>;
|
|
794
|
+
evaluationPolicy: import("drizzle-orm/pg-core").PgColumn<{
|
|
795
|
+
name: "evaluation_policy";
|
|
796
|
+
tableName: "goals";
|
|
797
|
+
dataType: "json";
|
|
798
|
+
columnType: "PgJsonb";
|
|
799
|
+
data: Record<string, unknown>;
|
|
800
|
+
driverParam: unknown;
|
|
801
|
+
notNull: true;
|
|
802
|
+
hasDefault: true;
|
|
803
|
+
isPrimaryKey: false;
|
|
804
|
+
isAutoincrement: false;
|
|
805
|
+
hasRuntimeDefault: false;
|
|
806
|
+
enumValues: undefined;
|
|
807
|
+
baseColumn: never;
|
|
808
|
+
identity: undefined;
|
|
809
|
+
generated: undefined;
|
|
810
|
+
}, {}, {
|
|
811
|
+
$type: Record<string, unknown>;
|
|
812
|
+
}>;
|
|
813
|
+
actionDeadline: import("drizzle-orm/pg-core").PgColumn<{
|
|
814
|
+
name: "action_deadline";
|
|
815
|
+
tableName: "goals";
|
|
816
|
+
dataType: "date";
|
|
817
|
+
columnType: "PgTimestamp";
|
|
818
|
+
data: Date;
|
|
819
|
+
driverParam: string;
|
|
820
|
+
notNull: false;
|
|
821
|
+
hasDefault: false;
|
|
822
|
+
isPrimaryKey: false;
|
|
823
|
+
isAutoincrement: false;
|
|
824
|
+
hasRuntimeDefault: false;
|
|
825
|
+
enumValues: undefined;
|
|
826
|
+
baseColumn: never;
|
|
827
|
+
identity: undefined;
|
|
828
|
+
generated: undefined;
|
|
829
|
+
}, {}, {}>;
|
|
830
|
+
evaluationDeadline: import("drizzle-orm/pg-core").PgColumn<{
|
|
831
|
+
name: "evaluation_deadline";
|
|
832
|
+
tableName: "goals";
|
|
833
|
+
dataType: "date";
|
|
834
|
+
columnType: "PgTimestamp";
|
|
835
|
+
data: Date;
|
|
836
|
+
driverParam: string;
|
|
837
|
+
notNull: false;
|
|
838
|
+
hasDefault: false;
|
|
839
|
+
isPrimaryKey: false;
|
|
840
|
+
isAutoincrement: false;
|
|
841
|
+
hasRuntimeDefault: false;
|
|
842
|
+
enumValues: undefined;
|
|
843
|
+
baseColumn: never;
|
|
844
|
+
identity: undefined;
|
|
845
|
+
generated: undefined;
|
|
846
|
+
}, {}, {}>;
|
|
847
|
+
evaluationResult: import("drizzle-orm/pg-core").PgColumn<{
|
|
848
|
+
name: "evaluation_result";
|
|
849
|
+
tableName: "goals";
|
|
850
|
+
dataType: "json";
|
|
851
|
+
columnType: "PgJsonb";
|
|
852
|
+
data: Record<string, unknown> | null;
|
|
853
|
+
driverParam: unknown;
|
|
854
|
+
notNull: false;
|
|
855
|
+
hasDefault: false;
|
|
856
|
+
isPrimaryKey: false;
|
|
857
|
+
isAutoincrement: false;
|
|
858
|
+
hasRuntimeDefault: false;
|
|
859
|
+
enumValues: undefined;
|
|
860
|
+
baseColumn: never;
|
|
861
|
+
identity: undefined;
|
|
862
|
+
generated: undefined;
|
|
863
|
+
}, {}, {
|
|
864
|
+
$type: Record<string, unknown> | null;
|
|
865
|
+
}>;
|
|
866
|
+
closeReason: import("drizzle-orm/pg-core").PgColumn<{
|
|
867
|
+
name: "close_reason";
|
|
868
|
+
tableName: "goals";
|
|
869
|
+
dataType: "string";
|
|
870
|
+
columnType: "PgText";
|
|
871
|
+
data: string;
|
|
872
|
+
driverParam: string;
|
|
873
|
+
notNull: false;
|
|
874
|
+
hasDefault: false;
|
|
875
|
+
isPrimaryKey: false;
|
|
876
|
+
isAutoincrement: false;
|
|
877
|
+
hasRuntimeDefault: false;
|
|
878
|
+
enumValues: [string, ...string[]];
|
|
879
|
+
baseColumn: never;
|
|
880
|
+
identity: undefined;
|
|
881
|
+
generated: undefined;
|
|
882
|
+
}, {}, {}>;
|
|
883
|
+
resultPayload: import("drizzle-orm/pg-core").PgColumn<{
|
|
884
|
+
name: "result_payload";
|
|
885
|
+
tableName: "goals";
|
|
886
|
+
dataType: "json";
|
|
887
|
+
columnType: "PgJsonb";
|
|
888
|
+
data: Record<string, unknown> | null;
|
|
889
|
+
driverParam: unknown;
|
|
890
|
+
notNull: false;
|
|
891
|
+
hasDefault: false;
|
|
892
|
+
isPrimaryKey: false;
|
|
893
|
+
isAutoincrement: false;
|
|
894
|
+
hasRuntimeDefault: false;
|
|
895
|
+
enumValues: undefined;
|
|
896
|
+
baseColumn: never;
|
|
897
|
+
identity: undefined;
|
|
898
|
+
generated: undefined;
|
|
899
|
+
}, {}, {
|
|
900
|
+
$type: Record<string, unknown> | null;
|
|
901
|
+
}>;
|
|
902
|
+
focus: import("drizzle-orm/pg-core").PgColumn<{
|
|
903
|
+
name: "focus";
|
|
904
|
+
tableName: "goals";
|
|
905
|
+
dataType: "boolean";
|
|
906
|
+
columnType: "PgBoolean";
|
|
907
|
+
data: boolean;
|
|
908
|
+
driverParam: boolean;
|
|
909
|
+
notNull: true;
|
|
910
|
+
hasDefault: true;
|
|
911
|
+
isPrimaryKey: false;
|
|
912
|
+
isAutoincrement: false;
|
|
913
|
+
hasRuntimeDefault: false;
|
|
914
|
+
enumValues: undefined;
|
|
915
|
+
baseColumn: never;
|
|
916
|
+
identity: undefined;
|
|
917
|
+
generated: undefined;
|
|
918
|
+
}, {}, {}>;
|
|
919
|
+
planRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
920
|
+
name: "plan_revision";
|
|
921
|
+
tableName: "goals";
|
|
922
|
+
dataType: "number";
|
|
923
|
+
columnType: "PgInteger";
|
|
924
|
+
data: number;
|
|
925
|
+
driverParam: string | number;
|
|
926
|
+
notNull: true;
|
|
927
|
+
hasDefault: true;
|
|
928
|
+
isPrimaryKey: false;
|
|
929
|
+
isAutoincrement: false;
|
|
930
|
+
hasRuntimeDefault: false;
|
|
931
|
+
enumValues: undefined;
|
|
932
|
+
baseColumn: never;
|
|
933
|
+
identity: undefined;
|
|
934
|
+
generated: undefined;
|
|
935
|
+
}, {}, {}>;
|
|
936
|
+
continuationKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
937
|
+
name: "continuation_kind";
|
|
938
|
+
tableName: "goals";
|
|
939
|
+
dataType: "string";
|
|
940
|
+
columnType: "PgText";
|
|
941
|
+
data: string;
|
|
942
|
+
driverParam: string;
|
|
943
|
+
notNull: false;
|
|
944
|
+
hasDefault: false;
|
|
945
|
+
isPrimaryKey: false;
|
|
946
|
+
isAutoincrement: false;
|
|
947
|
+
hasRuntimeDefault: false;
|
|
948
|
+
enumValues: [string, ...string[]];
|
|
949
|
+
baseColumn: never;
|
|
950
|
+
identity: undefined;
|
|
951
|
+
generated: undefined;
|
|
952
|
+
}, {}, {}>;
|
|
953
|
+
continuationSummary: import("drizzle-orm/pg-core").PgColumn<{
|
|
954
|
+
name: "continuation_summary";
|
|
955
|
+
tableName: "goals";
|
|
956
|
+
dataType: "string";
|
|
957
|
+
columnType: "PgText";
|
|
958
|
+
data: string;
|
|
959
|
+
driverParam: string;
|
|
960
|
+
notNull: false;
|
|
961
|
+
hasDefault: false;
|
|
962
|
+
isPrimaryKey: false;
|
|
963
|
+
isAutoincrement: false;
|
|
964
|
+
hasRuntimeDefault: false;
|
|
965
|
+
enumValues: [string, ...string[]];
|
|
966
|
+
baseColumn: never;
|
|
967
|
+
identity: undefined;
|
|
968
|
+
generated: undefined;
|
|
969
|
+
}, {}, {}>;
|
|
970
|
+
wakeCondition: import("drizzle-orm/pg-core").PgColumn<{
|
|
971
|
+
name: "wake_condition";
|
|
972
|
+
tableName: "goals";
|
|
973
|
+
dataType: "string";
|
|
974
|
+
columnType: "PgText";
|
|
975
|
+
data: string;
|
|
976
|
+
driverParam: string;
|
|
977
|
+
notNull: false;
|
|
978
|
+
hasDefault: false;
|
|
979
|
+
isPrimaryKey: false;
|
|
980
|
+
isAutoincrement: false;
|
|
981
|
+
hasRuntimeDefault: false;
|
|
982
|
+
enumValues: [string, ...string[]];
|
|
983
|
+
baseColumn: never;
|
|
984
|
+
identity: undefined;
|
|
985
|
+
generated: undefined;
|
|
986
|
+
}, {}, {}>;
|
|
987
|
+
level: import("drizzle-orm/pg-core").PgColumn<{
|
|
988
|
+
name: "level";
|
|
989
|
+
tableName: "goals";
|
|
990
|
+
dataType: "string";
|
|
991
|
+
columnType: "PgText";
|
|
992
|
+
data: string;
|
|
993
|
+
driverParam: string;
|
|
994
|
+
notNull: true;
|
|
995
|
+
hasDefault: true;
|
|
996
|
+
isPrimaryKey: false;
|
|
997
|
+
isAutoincrement: false;
|
|
998
|
+
hasRuntimeDefault: false;
|
|
999
|
+
enumValues: [string, ...string[]];
|
|
1000
|
+
baseColumn: never;
|
|
1001
|
+
identity: undefined;
|
|
1002
|
+
generated: undefined;
|
|
1003
|
+
}, {}, {}>;
|
|
1004
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
1005
|
+
name: "status";
|
|
1006
|
+
tableName: "goals";
|
|
1007
|
+
dataType: "string";
|
|
1008
|
+
columnType: "PgText";
|
|
1009
|
+
data: string;
|
|
1010
|
+
driverParam: string;
|
|
1011
|
+
notNull: true;
|
|
1012
|
+
hasDefault: true;
|
|
1013
|
+
isPrimaryKey: false;
|
|
1014
|
+
isAutoincrement: false;
|
|
1015
|
+
hasRuntimeDefault: false;
|
|
1016
|
+
enumValues: [string, ...string[]];
|
|
1017
|
+
baseColumn: never;
|
|
1018
|
+
identity: undefined;
|
|
1019
|
+
generated: undefined;
|
|
1020
|
+
}, {}, {}>;
|
|
1021
|
+
parentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1022
|
+
name: "parent_id";
|
|
1023
|
+
tableName: "goals";
|
|
1024
|
+
dataType: "string";
|
|
1025
|
+
columnType: "PgUUID";
|
|
1026
|
+
data: string;
|
|
1027
|
+
driverParam: string;
|
|
1028
|
+
notNull: false;
|
|
1029
|
+
hasDefault: false;
|
|
1030
|
+
isPrimaryKey: false;
|
|
1031
|
+
isAutoincrement: false;
|
|
1032
|
+
hasRuntimeDefault: false;
|
|
1033
|
+
enumValues: undefined;
|
|
1034
|
+
baseColumn: never;
|
|
1035
|
+
identity: undefined;
|
|
1036
|
+
generated: undefined;
|
|
1037
|
+
}, {}, {}>;
|
|
1038
|
+
ownerAgentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1039
|
+
name: "owner_agent_id";
|
|
1040
|
+
tableName: "goals";
|
|
1041
|
+
dataType: "string";
|
|
1042
|
+
columnType: "PgUUID";
|
|
1043
|
+
data: string;
|
|
1044
|
+
driverParam: string;
|
|
1045
|
+
notNull: false;
|
|
1046
|
+
hasDefault: false;
|
|
1047
|
+
isPrimaryKey: false;
|
|
1048
|
+
isAutoincrement: false;
|
|
1049
|
+
hasRuntimeDefault: false;
|
|
1050
|
+
enumValues: undefined;
|
|
1051
|
+
baseColumn: never;
|
|
1052
|
+
identity: undefined;
|
|
1053
|
+
generated: undefined;
|
|
1054
|
+
}, {}, {}>;
|
|
1055
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1056
|
+
name: "created_at";
|
|
1057
|
+
tableName: "goals";
|
|
1058
|
+
dataType: "date";
|
|
1059
|
+
columnType: "PgTimestamp";
|
|
1060
|
+
data: Date;
|
|
1061
|
+
driverParam: string;
|
|
1062
|
+
notNull: true;
|
|
1063
|
+
hasDefault: true;
|
|
1064
|
+
isPrimaryKey: false;
|
|
1065
|
+
isAutoincrement: false;
|
|
1066
|
+
hasRuntimeDefault: false;
|
|
1067
|
+
enumValues: undefined;
|
|
1068
|
+
baseColumn: never;
|
|
1069
|
+
identity: undefined;
|
|
1070
|
+
generated: undefined;
|
|
1071
|
+
}, {}, {}>;
|
|
1072
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1073
|
+
name: "updated_at";
|
|
1074
|
+
tableName: "goals";
|
|
1075
|
+
dataType: "date";
|
|
1076
|
+
columnType: "PgTimestamp";
|
|
1077
|
+
data: Date;
|
|
1078
|
+
driverParam: string;
|
|
1079
|
+
notNull: true;
|
|
1080
|
+
hasDefault: true;
|
|
1081
|
+
isPrimaryKey: false;
|
|
1082
|
+
isAutoincrement: false;
|
|
1083
|
+
hasRuntimeDefault: false;
|
|
1084
|
+
enumValues: undefined;
|
|
1085
|
+
baseColumn: never;
|
|
1086
|
+
identity: undefined;
|
|
1087
|
+
generated: undefined;
|
|
1088
|
+
}, {}, {}>;
|
|
1089
|
+
}>, "where" | "orderBy">;
|
|
1090
|
+
getById: (id: string) => Promise<{
|
|
1091
|
+
id: string;
|
|
1092
|
+
orgId: string;
|
|
1093
|
+
title: string;
|
|
1094
|
+
description: string | null;
|
|
1095
|
+
alignmentQuestion: string | null;
|
|
1096
|
+
outcomeStatement: string | null;
|
|
1097
|
+
objectiveMode: string;
|
|
1098
|
+
lifecycle: string;
|
|
1099
|
+
contractRevision: number;
|
|
1100
|
+
criteria: unknown[];
|
|
1101
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1102
|
+
humanAuthorities: Record<string, unknown>;
|
|
1103
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1104
|
+
actionDeadline: Date | null;
|
|
1105
|
+
evaluationDeadline: Date | null;
|
|
1106
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1107
|
+
closeReason: string | null;
|
|
1108
|
+
resultPayload: Record<string, unknown> | null;
|
|
1109
|
+
focus: boolean;
|
|
1110
|
+
planRevision: number;
|
|
1111
|
+
continuationKind: string | null;
|
|
1112
|
+
continuationSummary: string | null;
|
|
1113
|
+
wakeCondition: string | null;
|
|
1114
|
+
level: string;
|
|
1115
|
+
status: string;
|
|
1116
|
+
parentId: string | null;
|
|
1117
|
+
ownerAgentId: string | null;
|
|
1118
|
+
createdAt: Date;
|
|
1119
|
+
updatedAt: Date;
|
|
1120
|
+
}>;
|
|
1121
|
+
getChangeProposalById: (id: string) => Promise<{
|
|
1122
|
+
id: string;
|
|
1123
|
+
orgId: string;
|
|
1124
|
+
goalId: string;
|
|
1125
|
+
expectedContractRevision: number;
|
|
1126
|
+
beforeContract: GoalContractSnapshot;
|
|
1127
|
+
afterContract: GoalContractPatch;
|
|
1128
|
+
rationale: string;
|
|
1129
|
+
evidenceRefs: string[];
|
|
1130
|
+
approvalId: string;
|
|
1131
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
1132
|
+
idempotencyKey: string;
|
|
1133
|
+
proposedByAgentId: string;
|
|
1134
|
+
appliedRevision: number | null;
|
|
1135
|
+
appliedAt: Date | null;
|
|
1136
|
+
createdAt: Date;
|
|
1137
|
+
updatedAt: Date;
|
|
1138
|
+
}>;
|
|
1139
|
+
getResultProposalById: (id: string) => Promise<{
|
|
1140
|
+
id: string;
|
|
1141
|
+
orgId: string;
|
|
1142
|
+
goalId: string;
|
|
1143
|
+
contractRevision: number;
|
|
1144
|
+
candidate: GoalEvaluationCandidate;
|
|
1145
|
+
candidateHash: string;
|
|
1146
|
+
preflight: GoalResultReducerPreflight;
|
|
1147
|
+
riskSummary: string;
|
|
1148
|
+
status: "ready" | "superseded" | "rejected" | "inconclusive" | "accepted";
|
|
1149
|
+
idempotencyKey: string;
|
|
1150
|
+
proposedByAgentId: string;
|
|
1151
|
+
acceptedByActorType: "user" | null;
|
|
1152
|
+
acceptedByActorId: string | null;
|
|
1153
|
+
acceptanceIdempotencyKey: string | null;
|
|
1154
|
+
acceptedAt: Date | null;
|
|
1155
|
+
rejectedByActorType: "user" | null;
|
|
1156
|
+
rejectedByActorId: string | null;
|
|
1157
|
+
rejectedAt: Date | null;
|
|
1158
|
+
rejectionFeedback: string | null;
|
|
1159
|
+
consumedAt: Date | null;
|
|
1160
|
+
createdAt: Date;
|
|
1161
|
+
updatedAt: Date;
|
|
1162
|
+
}>;
|
|
1163
|
+
dependencies: (goal: GoalRow) => Promise<GoalDependencies>;
|
|
1164
|
+
previewStart: (orgId: string, input: PreviewGoalStart) => Promise<GoalStartPreview>;
|
|
1165
|
+
start: (orgId: string, input: StartGoal) => Promise<{
|
|
1166
|
+
goal: {
|
|
1167
|
+
id: string;
|
|
1168
|
+
orgId: string;
|
|
1169
|
+
title: string;
|
|
1170
|
+
description: string | null;
|
|
1171
|
+
alignmentQuestion: string | null;
|
|
1172
|
+
outcomeStatement: string | null;
|
|
1173
|
+
objectiveMode: string;
|
|
1174
|
+
lifecycle: string;
|
|
1175
|
+
contractRevision: number;
|
|
1176
|
+
criteria: unknown[];
|
|
1177
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1178
|
+
humanAuthorities: Record<string, unknown>;
|
|
1179
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1180
|
+
actionDeadline: Date | null;
|
|
1181
|
+
evaluationDeadline: Date | null;
|
|
1182
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1183
|
+
closeReason: string | null;
|
|
1184
|
+
resultPayload: Record<string, unknown> | null;
|
|
1185
|
+
focus: boolean;
|
|
1186
|
+
planRevision: number;
|
|
1187
|
+
continuationKind: string | null;
|
|
1188
|
+
continuationSummary: string | null;
|
|
1189
|
+
wakeCondition: string | null;
|
|
1190
|
+
level: string;
|
|
1191
|
+
status: string;
|
|
1192
|
+
parentId: string | null;
|
|
1193
|
+
ownerAgentId: string | null;
|
|
1194
|
+
createdAt: Date;
|
|
1195
|
+
updatedAt: Date;
|
|
1196
|
+
};
|
|
1197
|
+
replayed: boolean;
|
|
1198
|
+
}>;
|
|
1199
|
+
workspace: (id: string) => Promise<{
|
|
1200
|
+
goal: {
|
|
1201
|
+
ownerAssignment: {
|
|
1202
|
+
id: string;
|
|
1203
|
+
orgId: string;
|
|
1204
|
+
goalId: string;
|
|
1205
|
+
agentId: string;
|
|
1206
|
+
assignmentRevision: number;
|
|
1207
|
+
assignedByAuthorityRef: string | null;
|
|
1208
|
+
startsAt: Date;
|
|
1209
|
+
endsAt: Date | null;
|
|
1210
|
+
createdAt: Date;
|
|
1211
|
+
};
|
|
1212
|
+
plan: {
|
|
1213
|
+
id: string;
|
|
1214
|
+
orgId: string;
|
|
1215
|
+
goalId: string;
|
|
1216
|
+
revision: number;
|
|
1217
|
+
summary: string;
|
|
1218
|
+
hypotheses: unknown[];
|
|
1219
|
+
selectedPaths: unknown[];
|
|
1220
|
+
rejectedPaths: unknown[];
|
|
1221
|
+
sequencing: unknown[];
|
|
1222
|
+
budgetAllocations: Record<string, unknown>;
|
|
1223
|
+
invalidationConditions: unknown[];
|
|
1224
|
+
createdByAgentId: string | null;
|
|
1225
|
+
createdAt: Date;
|
|
1226
|
+
updatedAt: Date;
|
|
1227
|
+
} | null;
|
|
1228
|
+
activities: {
|
|
1229
|
+
id: string;
|
|
1230
|
+
orgId: string;
|
|
1231
|
+
goalId: string;
|
|
1232
|
+
contractRevision: number;
|
|
1233
|
+
submittedByAgentId: string | null;
|
|
1234
|
+
agentOwnerRefAtTime: string | null;
|
|
1235
|
+
commitmentRef: string | null;
|
|
1236
|
+
runRef: string | null;
|
|
1237
|
+
activityKind: string | null;
|
|
1238
|
+
summary: string;
|
|
1239
|
+
evidenceRefs: unknown[];
|
|
1240
|
+
idempotencyKey: string | null;
|
|
1241
|
+
occurredAt: Date;
|
|
1242
|
+
createdAt: Date;
|
|
1243
|
+
}[];
|
|
1244
|
+
id: string;
|
|
1245
|
+
orgId: string;
|
|
1246
|
+
title: string;
|
|
1247
|
+
description: string | null;
|
|
1248
|
+
alignmentQuestion: string | null;
|
|
1249
|
+
outcomeStatement: string | null;
|
|
1250
|
+
objectiveMode: string;
|
|
1251
|
+
lifecycle: string;
|
|
1252
|
+
contractRevision: number;
|
|
1253
|
+
criteria: unknown[];
|
|
1254
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1255
|
+
humanAuthorities: Record<string, unknown>;
|
|
1256
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1257
|
+
actionDeadline: Date | null;
|
|
1258
|
+
evaluationDeadline: Date | null;
|
|
1259
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1260
|
+
closeReason: string | null;
|
|
1261
|
+
resultPayload: Record<string, unknown> | null;
|
|
1262
|
+
focus: boolean;
|
|
1263
|
+
planRevision: number;
|
|
1264
|
+
continuationKind: string | null;
|
|
1265
|
+
continuationSummary: string | null;
|
|
1266
|
+
wakeCondition: string | null;
|
|
1267
|
+
level: string;
|
|
1268
|
+
status: string;
|
|
1269
|
+
parentId: string | null;
|
|
1270
|
+
ownerAgentId: string | null;
|
|
1271
|
+
createdAt: Date;
|
|
1272
|
+
updatedAt: Date;
|
|
1273
|
+
};
|
|
1274
|
+
facet: "needs_attention" | "closed" | "agent_advancing" | "waiting_external" | "ready_for_acceptance";
|
|
1275
|
+
currentGoal: {
|
|
1276
|
+
summary: string;
|
|
1277
|
+
revision: number;
|
|
1278
|
+
};
|
|
1279
|
+
currentProgress: {
|
|
1280
|
+
summary: string;
|
|
1281
|
+
sourceActivityId: string | null;
|
|
1282
|
+
evidenceRefs: string[];
|
|
1283
|
+
};
|
|
1284
|
+
agentAction: {
|
|
1285
|
+
summary: string;
|
|
1286
|
+
sourcePlanId: string;
|
|
1287
|
+
sourceIds: string[];
|
|
1288
|
+
} | null;
|
|
1289
|
+
nextStep: {
|
|
1290
|
+
kind: string;
|
|
1291
|
+
summary: string;
|
|
1292
|
+
wakeCondition: string | null;
|
|
1293
|
+
} | null;
|
|
1294
|
+
attention: {
|
|
1295
|
+
kind: "result_proposal";
|
|
1296
|
+
reason: string;
|
|
1297
|
+
sourceId: string;
|
|
1298
|
+
} | {
|
|
1299
|
+
kind: "change_proposal";
|
|
1300
|
+
reason: string;
|
|
1301
|
+
sourceId: string;
|
|
1302
|
+
} | {
|
|
1303
|
+
kind: "alignment_question";
|
|
1304
|
+
reason: string;
|
|
1305
|
+
sourceId: string;
|
|
1306
|
+
} | null;
|
|
1307
|
+
timeline: (ExternalGoalCheckpoint | {
|
|
1308
|
+
id: string;
|
|
1309
|
+
kind: "activity";
|
|
1310
|
+
summary: string;
|
|
1311
|
+
occurredAt: Date;
|
|
1312
|
+
sourceId: string;
|
|
1313
|
+
sourceRunId: string | null;
|
|
1314
|
+
evidenceRefs: string[];
|
|
1315
|
+
} | {
|
|
1316
|
+
id: string;
|
|
1317
|
+
kind: "feedback";
|
|
1318
|
+
summary: string;
|
|
1319
|
+
occurredAt: Date;
|
|
1320
|
+
sourceId: string;
|
|
1321
|
+
actorType: "user";
|
|
1322
|
+
actorId: string;
|
|
1323
|
+
attachments: import("@rudderhq/shared").GoalFeedbackAttachment[];
|
|
1324
|
+
feedbackKind: "ordinary" | "consequential";
|
|
1325
|
+
} | {
|
|
1326
|
+
id: string;
|
|
1327
|
+
kind: "change_proposal";
|
|
1328
|
+
summary: string;
|
|
1329
|
+
occurredAt: Date;
|
|
1330
|
+
sourceId: string;
|
|
1331
|
+
approvalId: string;
|
|
1332
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
1333
|
+
evidenceRefs: string[];
|
|
1334
|
+
} | {
|
|
1335
|
+
id: string;
|
|
1336
|
+
kind: "result_proposal";
|
|
1337
|
+
summary: string;
|
|
1338
|
+
occurredAt: Date;
|
|
1339
|
+
sourceId: string;
|
|
1340
|
+
status: "ready" | "superseded" | "rejected" | "inconclusive" | "accepted";
|
|
1341
|
+
evidenceRefs: string[];
|
|
1342
|
+
})[];
|
|
1343
|
+
changeProposals: {
|
|
1344
|
+
id: string;
|
|
1345
|
+
orgId: string;
|
|
1346
|
+
goalId: string;
|
|
1347
|
+
expectedContractRevision: number;
|
|
1348
|
+
beforeContract: GoalContractSnapshot;
|
|
1349
|
+
afterContract: GoalContractPatch;
|
|
1350
|
+
rationale: string;
|
|
1351
|
+
evidenceRefs: string[];
|
|
1352
|
+
approvalId: string;
|
|
1353
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
1354
|
+
idempotencyKey: string;
|
|
1355
|
+
proposedByAgentId: string;
|
|
1356
|
+
appliedRevision: number | null;
|
|
1357
|
+
appliedAt: Date | null;
|
|
1358
|
+
createdAt: Date;
|
|
1359
|
+
updatedAt: Date;
|
|
1360
|
+
}[];
|
|
1361
|
+
resultProposals: {
|
|
1362
|
+
id: string;
|
|
1363
|
+
orgId: string;
|
|
1364
|
+
goalId: string;
|
|
1365
|
+
contractRevision: number;
|
|
1366
|
+
candidate: GoalEvaluationCandidate;
|
|
1367
|
+
candidateHash: string;
|
|
1368
|
+
preflight: GoalResultReducerPreflight;
|
|
1369
|
+
riskSummary: string;
|
|
1370
|
+
status: "ready" | "superseded" | "rejected" | "inconclusive" | "accepted";
|
|
1371
|
+
idempotencyKey: string;
|
|
1372
|
+
proposedByAgentId: string;
|
|
1373
|
+
acceptedByActorType: "user" | null;
|
|
1374
|
+
acceptedByActorId: string | null;
|
|
1375
|
+
acceptanceIdempotencyKey: string | null;
|
|
1376
|
+
acceptedAt: Date | null;
|
|
1377
|
+
rejectedByActorType: "user" | null;
|
|
1378
|
+
rejectedByActorId: string | null;
|
|
1379
|
+
rejectedAt: Date | null;
|
|
1380
|
+
rejectionFeedback: string | null;
|
|
1381
|
+
consumedAt: Date | null;
|
|
1382
|
+
createdAt: Date;
|
|
1383
|
+
updatedAt: Date;
|
|
1384
|
+
}[];
|
|
1385
|
+
}>;
|
|
1386
|
+
workspaceCards: (orgId: string) => Promise<{
|
|
1387
|
+
id: string;
|
|
1388
|
+
orgId: string;
|
|
1389
|
+
title: string;
|
|
1390
|
+
lifecycle: string;
|
|
1391
|
+
status: string;
|
|
1392
|
+
facet: "needs_attention" | "closed" | "agent_advancing" | "waiting_external" | "ready_for_acceptance";
|
|
1393
|
+
ownerAgentId: string | null;
|
|
1394
|
+
ownerName: string | null;
|
|
1395
|
+
currentProgress: string;
|
|
1396
|
+
progressSummary: string;
|
|
1397
|
+
nextAction: string | null;
|
|
1398
|
+
nextStepSummary: string;
|
|
1399
|
+
targetTime: Date | null;
|
|
1400
|
+
attentionReason: string;
|
|
1401
|
+
focus: boolean;
|
|
1402
|
+
updatedAt: Date;
|
|
1403
|
+
}[]>;
|
|
1404
|
+
detail: (id: string) => Promise<{
|
|
1405
|
+
ownerAssignment: {
|
|
1406
|
+
id: string;
|
|
1407
|
+
orgId: string;
|
|
1408
|
+
goalId: string;
|
|
1409
|
+
agentId: string;
|
|
1410
|
+
assignmentRevision: number;
|
|
1411
|
+
assignedByAuthorityRef: string | null;
|
|
1412
|
+
startsAt: Date;
|
|
1413
|
+
endsAt: Date | null;
|
|
1414
|
+
createdAt: Date;
|
|
1415
|
+
};
|
|
1416
|
+
plan: {
|
|
1417
|
+
id: string;
|
|
1418
|
+
orgId: string;
|
|
1419
|
+
goalId: string;
|
|
1420
|
+
revision: number;
|
|
1421
|
+
summary: string;
|
|
1422
|
+
hypotheses: unknown[];
|
|
1423
|
+
selectedPaths: unknown[];
|
|
1424
|
+
rejectedPaths: unknown[];
|
|
1425
|
+
sequencing: unknown[];
|
|
1426
|
+
budgetAllocations: Record<string, unknown>;
|
|
1427
|
+
invalidationConditions: unknown[];
|
|
1428
|
+
createdByAgentId: string | null;
|
|
1429
|
+
createdAt: Date;
|
|
1430
|
+
updatedAt: Date;
|
|
1431
|
+
} | null;
|
|
1432
|
+
activities: {
|
|
1433
|
+
id: string;
|
|
1434
|
+
orgId: string;
|
|
1435
|
+
goalId: string;
|
|
1436
|
+
contractRevision: number;
|
|
1437
|
+
submittedByAgentId: string | null;
|
|
1438
|
+
agentOwnerRefAtTime: string | null;
|
|
1439
|
+
commitmentRef: string | null;
|
|
1440
|
+
runRef: string | null;
|
|
1441
|
+
activityKind: string | null;
|
|
1442
|
+
summary: string;
|
|
1443
|
+
evidenceRefs: unknown[];
|
|
1444
|
+
idempotencyKey: string | null;
|
|
1445
|
+
occurredAt: Date;
|
|
1446
|
+
createdAt: Date;
|
|
1447
|
+
}[];
|
|
1448
|
+
id: string;
|
|
1449
|
+
orgId: string;
|
|
1450
|
+
title: string;
|
|
1451
|
+
description: string | null;
|
|
1452
|
+
alignmentQuestion: string | null;
|
|
1453
|
+
outcomeStatement: string | null;
|
|
1454
|
+
objectiveMode: string;
|
|
1455
|
+
lifecycle: string;
|
|
1456
|
+
contractRevision: number;
|
|
1457
|
+
criteria: unknown[];
|
|
1458
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1459
|
+
humanAuthorities: Record<string, unknown>;
|
|
1460
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1461
|
+
actionDeadline: Date | null;
|
|
1462
|
+
evaluationDeadline: Date | null;
|
|
1463
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1464
|
+
closeReason: string | null;
|
|
1465
|
+
resultPayload: Record<string, unknown> | null;
|
|
1466
|
+
focus: boolean;
|
|
1467
|
+
planRevision: number;
|
|
1468
|
+
continuationKind: string | null;
|
|
1469
|
+
continuationSummary: string | null;
|
|
1470
|
+
wakeCondition: string | null;
|
|
1471
|
+
level: string;
|
|
1472
|
+
status: string;
|
|
1473
|
+
parentId: string | null;
|
|
1474
|
+
ownerAgentId: string | null;
|
|
1475
|
+
createdAt: Date;
|
|
1476
|
+
updatedAt: Date;
|
|
1477
|
+
}>;
|
|
1478
|
+
create: (orgId: string, data: {
|
|
1479
|
+
title: string;
|
|
1480
|
+
description?: string | null;
|
|
1481
|
+
alignmentQuestion?: string | null;
|
|
1482
|
+
}) => Promise<{
|
|
1483
|
+
status: string;
|
|
1484
|
+
title: string;
|
|
1485
|
+
id: string;
|
|
1486
|
+
updatedAt: Date;
|
|
1487
|
+
orgId: string;
|
|
1488
|
+
ownerAgentId: string | null;
|
|
1489
|
+
description: string | null;
|
|
1490
|
+
createdAt: Date;
|
|
1491
|
+
parentId: string | null;
|
|
1492
|
+
wakeCondition: string | null;
|
|
1493
|
+
alignmentQuestion: string | null;
|
|
1494
|
+
level: string;
|
|
1495
|
+
outcomeStatement: string | null;
|
|
1496
|
+
objectiveMode: string;
|
|
1497
|
+
criteria: unknown[];
|
|
1498
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1499
|
+
humanAuthorities: Record<string, unknown>;
|
|
1500
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1501
|
+
actionDeadline: Date | null;
|
|
1502
|
+
evaluationDeadline: Date | null;
|
|
1503
|
+
resultPayload: Record<string, unknown> | null;
|
|
1504
|
+
contractRevision: number;
|
|
1505
|
+
focus: boolean;
|
|
1506
|
+
lifecycle: string;
|
|
1507
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1508
|
+
closeReason: string | null;
|
|
1509
|
+
planRevision: number;
|
|
1510
|
+
continuationKind: string | null;
|
|
1511
|
+
continuationSummary: string | null;
|
|
1512
|
+
}>;
|
|
1513
|
+
update: (id: string, data: {
|
|
1514
|
+
title?: string;
|
|
1515
|
+
description?: string | null;
|
|
1516
|
+
alignmentQuestion?: string | null;
|
|
1517
|
+
}, actorAgentId?: string | null) => Promise<{
|
|
1518
|
+
id: string;
|
|
1519
|
+
orgId: string;
|
|
1520
|
+
title: string;
|
|
1521
|
+
description: string | null;
|
|
1522
|
+
alignmentQuestion: string | null;
|
|
1523
|
+
outcomeStatement: string | null;
|
|
1524
|
+
objectiveMode: string;
|
|
1525
|
+
lifecycle: string;
|
|
1526
|
+
contractRevision: number;
|
|
1527
|
+
criteria: unknown[];
|
|
1528
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1529
|
+
humanAuthorities: Record<string, unknown>;
|
|
1530
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1531
|
+
actionDeadline: Date | null;
|
|
1532
|
+
evaluationDeadline: Date | null;
|
|
1533
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1534
|
+
closeReason: string | null;
|
|
1535
|
+
resultPayload: Record<string, unknown> | null;
|
|
1536
|
+
focus: boolean;
|
|
1537
|
+
planRevision: number;
|
|
1538
|
+
continuationKind: string | null;
|
|
1539
|
+
continuationSummary: string | null;
|
|
1540
|
+
wakeCondition: string | null;
|
|
1541
|
+
level: string;
|
|
1542
|
+
status: string;
|
|
1543
|
+
parentId: string | null;
|
|
1544
|
+
ownerAgentId: string | null;
|
|
1545
|
+
createdAt: Date;
|
|
1546
|
+
updatedAt: Date;
|
|
1547
|
+
}>;
|
|
1548
|
+
activate: (id: string, input: ActivateGoal, actorAgentId?: string | null) => Promise<{
|
|
1549
|
+
id: string;
|
|
1550
|
+
orgId: string;
|
|
1551
|
+
title: string;
|
|
1552
|
+
description: string | null;
|
|
1553
|
+
alignmentQuestion: string | null;
|
|
1554
|
+
outcomeStatement: string | null;
|
|
1555
|
+
objectiveMode: string;
|
|
1556
|
+
lifecycle: string;
|
|
1557
|
+
contractRevision: number;
|
|
1558
|
+
criteria: unknown[];
|
|
1559
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
1560
|
+
humanAuthorities: Record<string, unknown>;
|
|
1561
|
+
evaluationPolicy: Record<string, unknown>;
|
|
1562
|
+
actionDeadline: Date | null;
|
|
1563
|
+
evaluationDeadline: Date | null;
|
|
1564
|
+
evaluationResult: Record<string, unknown> | null;
|
|
1565
|
+
closeReason: string | null;
|
|
1566
|
+
resultPayload: Record<string, unknown> | null;
|
|
1567
|
+
focus: boolean;
|
|
1568
|
+
planRevision: number;
|
|
1569
|
+
continuationKind: string | null;
|
|
1570
|
+
continuationSummary: string | null;
|
|
1571
|
+
wakeCondition: string | null;
|
|
1572
|
+
level: string;
|
|
1573
|
+
status: string;
|
|
1574
|
+
parentId: string | null;
|
|
1575
|
+
ownerAgentId: string | null;
|
|
1576
|
+
createdAt: Date;
|
|
1577
|
+
updatedAt: Date;
|
|
1578
|
+
}>;
|
|
1579
|
+
updatePlan: (id: string, input: UpdateGoalPlan, actorAgentId?: string | null) => Promise<{
|
|
1580
|
+
id: string;
|
|
1581
|
+
updatedAt: Date;
|
|
1582
|
+
summary: string;
|
|
1583
|
+
orgId: string;
|
|
1584
|
+
createdAt: Date;
|
|
1585
|
+
revision: number;
|
|
1586
|
+
goalId: string;
|
|
1587
|
+
hypotheses: unknown[];
|
|
1588
|
+
selectedPaths: unknown[];
|
|
1589
|
+
rejectedPaths: unknown[];
|
|
1590
|
+
sequencing: unknown[];
|
|
1591
|
+
budgetAllocations: Record<string, unknown>;
|
|
1592
|
+
invalidationConditions: unknown[];
|
|
1593
|
+
createdByAgentId: string | null;
|
|
1594
|
+
}>;
|
|
1595
|
+
listActivities: (id: string) => Omit<import("drizzle-orm/pg-core").PgSelectBase<"goal_activities", {
|
|
1596
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
1597
|
+
name: "id";
|
|
1598
|
+
tableName: "goal_activities";
|
|
1599
|
+
dataType: "string";
|
|
1600
|
+
columnType: "PgUUID";
|
|
1601
|
+
data: string;
|
|
1602
|
+
driverParam: string;
|
|
1603
|
+
notNull: true;
|
|
1604
|
+
hasDefault: true;
|
|
1605
|
+
isPrimaryKey: true;
|
|
1606
|
+
isAutoincrement: false;
|
|
1607
|
+
hasRuntimeDefault: false;
|
|
1608
|
+
enumValues: undefined;
|
|
1609
|
+
baseColumn: never;
|
|
1610
|
+
identity: undefined;
|
|
1611
|
+
generated: undefined;
|
|
1612
|
+
}, {}, {}>;
|
|
1613
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1614
|
+
name: "org_id";
|
|
1615
|
+
tableName: "goal_activities";
|
|
1616
|
+
dataType: "string";
|
|
1617
|
+
columnType: "PgUUID";
|
|
1618
|
+
data: string;
|
|
1619
|
+
driverParam: string;
|
|
1620
|
+
notNull: true;
|
|
1621
|
+
hasDefault: false;
|
|
1622
|
+
isPrimaryKey: false;
|
|
1623
|
+
isAutoincrement: false;
|
|
1624
|
+
hasRuntimeDefault: false;
|
|
1625
|
+
enumValues: undefined;
|
|
1626
|
+
baseColumn: never;
|
|
1627
|
+
identity: undefined;
|
|
1628
|
+
generated: undefined;
|
|
1629
|
+
}, {}, {}>;
|
|
1630
|
+
goalId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1631
|
+
name: "goal_id";
|
|
1632
|
+
tableName: "goal_activities";
|
|
1633
|
+
dataType: "string";
|
|
1634
|
+
columnType: "PgUUID";
|
|
1635
|
+
data: string;
|
|
1636
|
+
driverParam: string;
|
|
1637
|
+
notNull: true;
|
|
1638
|
+
hasDefault: false;
|
|
1639
|
+
isPrimaryKey: false;
|
|
1640
|
+
isAutoincrement: false;
|
|
1641
|
+
hasRuntimeDefault: false;
|
|
1642
|
+
enumValues: undefined;
|
|
1643
|
+
baseColumn: never;
|
|
1644
|
+
identity: undefined;
|
|
1645
|
+
generated: undefined;
|
|
1646
|
+
}, {}, {}>;
|
|
1647
|
+
contractRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
1648
|
+
name: "contract_revision";
|
|
1649
|
+
tableName: "goal_activities";
|
|
1650
|
+
dataType: "number";
|
|
1651
|
+
columnType: "PgInteger";
|
|
1652
|
+
data: number;
|
|
1653
|
+
driverParam: string | number;
|
|
1654
|
+
notNull: true;
|
|
1655
|
+
hasDefault: false;
|
|
1656
|
+
isPrimaryKey: false;
|
|
1657
|
+
isAutoincrement: false;
|
|
1658
|
+
hasRuntimeDefault: false;
|
|
1659
|
+
enumValues: undefined;
|
|
1660
|
+
baseColumn: never;
|
|
1661
|
+
identity: undefined;
|
|
1662
|
+
generated: undefined;
|
|
1663
|
+
}, {}, {}>;
|
|
1664
|
+
submittedByAgentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1665
|
+
name: "submitted_by_agent_id";
|
|
1666
|
+
tableName: "goal_activities";
|
|
1667
|
+
dataType: "string";
|
|
1668
|
+
columnType: "PgUUID";
|
|
1669
|
+
data: string;
|
|
1670
|
+
driverParam: string;
|
|
1671
|
+
notNull: false;
|
|
1672
|
+
hasDefault: false;
|
|
1673
|
+
isPrimaryKey: false;
|
|
1674
|
+
isAutoincrement: false;
|
|
1675
|
+
hasRuntimeDefault: false;
|
|
1676
|
+
enumValues: undefined;
|
|
1677
|
+
baseColumn: never;
|
|
1678
|
+
identity: undefined;
|
|
1679
|
+
generated: undefined;
|
|
1680
|
+
}, {}, {}>;
|
|
1681
|
+
agentOwnerRefAtTime: import("drizzle-orm/pg-core").PgColumn<{
|
|
1682
|
+
name: "agent_owner_ref_at_time";
|
|
1683
|
+
tableName: "goal_activities";
|
|
1684
|
+
dataType: "string";
|
|
1685
|
+
columnType: "PgUUID";
|
|
1686
|
+
data: string;
|
|
1687
|
+
driverParam: string;
|
|
1688
|
+
notNull: false;
|
|
1689
|
+
hasDefault: false;
|
|
1690
|
+
isPrimaryKey: false;
|
|
1691
|
+
isAutoincrement: false;
|
|
1692
|
+
hasRuntimeDefault: false;
|
|
1693
|
+
enumValues: undefined;
|
|
1694
|
+
baseColumn: never;
|
|
1695
|
+
identity: undefined;
|
|
1696
|
+
generated: undefined;
|
|
1697
|
+
}, {}, {}>;
|
|
1698
|
+
commitmentRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
1699
|
+
name: "commitment_ref";
|
|
1700
|
+
tableName: "goal_activities";
|
|
1701
|
+
dataType: "string";
|
|
1702
|
+
columnType: "PgText";
|
|
1703
|
+
data: string;
|
|
1704
|
+
driverParam: string;
|
|
1705
|
+
notNull: false;
|
|
1706
|
+
hasDefault: false;
|
|
1707
|
+
isPrimaryKey: false;
|
|
1708
|
+
isAutoincrement: false;
|
|
1709
|
+
hasRuntimeDefault: false;
|
|
1710
|
+
enumValues: [string, ...string[]];
|
|
1711
|
+
baseColumn: never;
|
|
1712
|
+
identity: undefined;
|
|
1713
|
+
generated: undefined;
|
|
1714
|
+
}, {}, {}>;
|
|
1715
|
+
runRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
1716
|
+
name: "run_ref";
|
|
1717
|
+
tableName: "goal_activities";
|
|
1718
|
+
dataType: "string";
|
|
1719
|
+
columnType: "PgUUID";
|
|
1720
|
+
data: string;
|
|
1721
|
+
driverParam: string;
|
|
1722
|
+
notNull: false;
|
|
1723
|
+
hasDefault: false;
|
|
1724
|
+
isPrimaryKey: false;
|
|
1725
|
+
isAutoincrement: false;
|
|
1726
|
+
hasRuntimeDefault: false;
|
|
1727
|
+
enumValues: undefined;
|
|
1728
|
+
baseColumn: never;
|
|
1729
|
+
identity: undefined;
|
|
1730
|
+
generated: undefined;
|
|
1731
|
+
}, {}, {}>;
|
|
1732
|
+
activityKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
1733
|
+
name: "activity_kind";
|
|
1734
|
+
tableName: "goal_activities";
|
|
1735
|
+
dataType: "string";
|
|
1736
|
+
columnType: "PgText";
|
|
1737
|
+
data: string;
|
|
1738
|
+
driverParam: string;
|
|
1739
|
+
notNull: false;
|
|
1740
|
+
hasDefault: false;
|
|
1741
|
+
isPrimaryKey: false;
|
|
1742
|
+
isAutoincrement: false;
|
|
1743
|
+
hasRuntimeDefault: false;
|
|
1744
|
+
enumValues: [string, ...string[]];
|
|
1745
|
+
baseColumn: never;
|
|
1746
|
+
identity: undefined;
|
|
1747
|
+
generated: undefined;
|
|
1748
|
+
}, {}, {}>;
|
|
1749
|
+
summary: import("drizzle-orm/pg-core").PgColumn<{
|
|
1750
|
+
name: "summary";
|
|
1751
|
+
tableName: "goal_activities";
|
|
1752
|
+
dataType: "string";
|
|
1753
|
+
columnType: "PgText";
|
|
1754
|
+
data: string;
|
|
1755
|
+
driverParam: string;
|
|
1756
|
+
notNull: true;
|
|
1757
|
+
hasDefault: false;
|
|
1758
|
+
isPrimaryKey: false;
|
|
1759
|
+
isAutoincrement: false;
|
|
1760
|
+
hasRuntimeDefault: false;
|
|
1761
|
+
enumValues: [string, ...string[]];
|
|
1762
|
+
baseColumn: never;
|
|
1763
|
+
identity: undefined;
|
|
1764
|
+
generated: undefined;
|
|
1765
|
+
}, {}, {}>;
|
|
1766
|
+
evidenceRefs: import("drizzle-orm/pg-core").PgColumn<{
|
|
1767
|
+
name: "evidence_refs";
|
|
1768
|
+
tableName: "goal_activities";
|
|
1769
|
+
dataType: "json";
|
|
1770
|
+
columnType: "PgJsonb";
|
|
1771
|
+
data: unknown[];
|
|
1772
|
+
driverParam: unknown;
|
|
1773
|
+
notNull: true;
|
|
1774
|
+
hasDefault: true;
|
|
1775
|
+
isPrimaryKey: false;
|
|
1776
|
+
isAutoincrement: false;
|
|
1777
|
+
hasRuntimeDefault: false;
|
|
1778
|
+
enumValues: undefined;
|
|
1779
|
+
baseColumn: never;
|
|
1780
|
+
identity: undefined;
|
|
1781
|
+
generated: undefined;
|
|
1782
|
+
}, {}, {
|
|
1783
|
+
$type: unknown[];
|
|
1784
|
+
}>;
|
|
1785
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
1786
|
+
name: "idempotency_key";
|
|
1787
|
+
tableName: "goal_activities";
|
|
1788
|
+
dataType: "string";
|
|
1789
|
+
columnType: "PgText";
|
|
1790
|
+
data: string;
|
|
1791
|
+
driverParam: string;
|
|
1792
|
+
notNull: false;
|
|
1793
|
+
hasDefault: false;
|
|
1794
|
+
isPrimaryKey: false;
|
|
1795
|
+
isAutoincrement: false;
|
|
1796
|
+
hasRuntimeDefault: false;
|
|
1797
|
+
enumValues: [string, ...string[]];
|
|
1798
|
+
baseColumn: never;
|
|
1799
|
+
identity: undefined;
|
|
1800
|
+
generated: undefined;
|
|
1801
|
+
}, {}, {}>;
|
|
1802
|
+
occurredAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1803
|
+
name: "occurred_at";
|
|
1804
|
+
tableName: "goal_activities";
|
|
1805
|
+
dataType: "date";
|
|
1806
|
+
columnType: "PgTimestamp";
|
|
1807
|
+
data: Date;
|
|
1808
|
+
driverParam: string;
|
|
1809
|
+
notNull: true;
|
|
1810
|
+
hasDefault: true;
|
|
1811
|
+
isPrimaryKey: false;
|
|
1812
|
+
isAutoincrement: false;
|
|
1813
|
+
hasRuntimeDefault: false;
|
|
1814
|
+
enumValues: undefined;
|
|
1815
|
+
baseColumn: never;
|
|
1816
|
+
identity: undefined;
|
|
1817
|
+
generated: undefined;
|
|
1818
|
+
}, {}, {}>;
|
|
1819
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1820
|
+
name: "created_at";
|
|
1821
|
+
tableName: "goal_activities";
|
|
1822
|
+
dataType: "date";
|
|
1823
|
+
columnType: "PgTimestamp";
|
|
1824
|
+
data: Date;
|
|
1825
|
+
driverParam: string;
|
|
1826
|
+
notNull: true;
|
|
1827
|
+
hasDefault: true;
|
|
1828
|
+
isPrimaryKey: false;
|
|
1829
|
+
isAutoincrement: false;
|
|
1830
|
+
hasRuntimeDefault: false;
|
|
1831
|
+
enumValues: undefined;
|
|
1832
|
+
baseColumn: never;
|
|
1833
|
+
identity: undefined;
|
|
1834
|
+
generated: undefined;
|
|
1835
|
+
}, {}, {}>;
|
|
1836
|
+
}, "single", Record<"goal_activities", "not-null">, false, "limit" | "where" | "orderBy", {
|
|
1837
|
+
id: string;
|
|
1838
|
+
orgId: string;
|
|
1839
|
+
goalId: string;
|
|
1840
|
+
contractRevision: number;
|
|
1841
|
+
submittedByAgentId: string | null;
|
|
1842
|
+
agentOwnerRefAtTime: string | null;
|
|
1843
|
+
commitmentRef: string | null;
|
|
1844
|
+
runRef: string | null;
|
|
1845
|
+
activityKind: string | null;
|
|
1846
|
+
summary: string;
|
|
1847
|
+
evidenceRefs: unknown[];
|
|
1848
|
+
idempotencyKey: string | null;
|
|
1849
|
+
occurredAt: Date;
|
|
1850
|
+
createdAt: Date;
|
|
1851
|
+
}[], {
|
|
1852
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
1853
|
+
name: "id";
|
|
1854
|
+
tableName: "goal_activities";
|
|
1855
|
+
dataType: "string";
|
|
1856
|
+
columnType: "PgUUID";
|
|
1857
|
+
data: string;
|
|
1858
|
+
driverParam: string;
|
|
1859
|
+
notNull: true;
|
|
1860
|
+
hasDefault: true;
|
|
1861
|
+
isPrimaryKey: true;
|
|
1862
|
+
isAutoincrement: false;
|
|
1863
|
+
hasRuntimeDefault: false;
|
|
1864
|
+
enumValues: undefined;
|
|
1865
|
+
baseColumn: never;
|
|
1866
|
+
identity: undefined;
|
|
1867
|
+
generated: undefined;
|
|
1868
|
+
}, {}, {}>;
|
|
1869
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1870
|
+
name: "org_id";
|
|
1871
|
+
tableName: "goal_activities";
|
|
1872
|
+
dataType: "string";
|
|
1873
|
+
columnType: "PgUUID";
|
|
1874
|
+
data: string;
|
|
1875
|
+
driverParam: string;
|
|
1876
|
+
notNull: true;
|
|
1877
|
+
hasDefault: false;
|
|
1878
|
+
isPrimaryKey: false;
|
|
1879
|
+
isAutoincrement: false;
|
|
1880
|
+
hasRuntimeDefault: false;
|
|
1881
|
+
enumValues: undefined;
|
|
1882
|
+
baseColumn: never;
|
|
1883
|
+
identity: undefined;
|
|
1884
|
+
generated: undefined;
|
|
1885
|
+
}, {}, {}>;
|
|
1886
|
+
goalId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1887
|
+
name: "goal_id";
|
|
1888
|
+
tableName: "goal_activities";
|
|
1889
|
+
dataType: "string";
|
|
1890
|
+
columnType: "PgUUID";
|
|
1891
|
+
data: string;
|
|
1892
|
+
driverParam: string;
|
|
1893
|
+
notNull: true;
|
|
1894
|
+
hasDefault: false;
|
|
1895
|
+
isPrimaryKey: false;
|
|
1896
|
+
isAutoincrement: false;
|
|
1897
|
+
hasRuntimeDefault: false;
|
|
1898
|
+
enumValues: undefined;
|
|
1899
|
+
baseColumn: never;
|
|
1900
|
+
identity: undefined;
|
|
1901
|
+
generated: undefined;
|
|
1902
|
+
}, {}, {}>;
|
|
1903
|
+
contractRevision: import("drizzle-orm/pg-core").PgColumn<{
|
|
1904
|
+
name: "contract_revision";
|
|
1905
|
+
tableName: "goal_activities";
|
|
1906
|
+
dataType: "number";
|
|
1907
|
+
columnType: "PgInteger";
|
|
1908
|
+
data: number;
|
|
1909
|
+
driverParam: string | number;
|
|
1910
|
+
notNull: true;
|
|
1911
|
+
hasDefault: false;
|
|
1912
|
+
isPrimaryKey: false;
|
|
1913
|
+
isAutoincrement: false;
|
|
1914
|
+
hasRuntimeDefault: false;
|
|
1915
|
+
enumValues: undefined;
|
|
1916
|
+
baseColumn: never;
|
|
1917
|
+
identity: undefined;
|
|
1918
|
+
generated: undefined;
|
|
1919
|
+
}, {}, {}>;
|
|
1920
|
+
submittedByAgentId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1921
|
+
name: "submitted_by_agent_id";
|
|
1922
|
+
tableName: "goal_activities";
|
|
1923
|
+
dataType: "string";
|
|
1924
|
+
columnType: "PgUUID";
|
|
1925
|
+
data: string;
|
|
1926
|
+
driverParam: string;
|
|
1927
|
+
notNull: false;
|
|
1928
|
+
hasDefault: false;
|
|
1929
|
+
isPrimaryKey: false;
|
|
1930
|
+
isAutoincrement: false;
|
|
1931
|
+
hasRuntimeDefault: false;
|
|
1932
|
+
enumValues: undefined;
|
|
1933
|
+
baseColumn: never;
|
|
1934
|
+
identity: undefined;
|
|
1935
|
+
generated: undefined;
|
|
1936
|
+
}, {}, {}>;
|
|
1937
|
+
agentOwnerRefAtTime: import("drizzle-orm/pg-core").PgColumn<{
|
|
1938
|
+
name: "agent_owner_ref_at_time";
|
|
1939
|
+
tableName: "goal_activities";
|
|
1940
|
+
dataType: "string";
|
|
1941
|
+
columnType: "PgUUID";
|
|
1942
|
+
data: string;
|
|
1943
|
+
driverParam: string;
|
|
1944
|
+
notNull: false;
|
|
1945
|
+
hasDefault: false;
|
|
1946
|
+
isPrimaryKey: false;
|
|
1947
|
+
isAutoincrement: false;
|
|
1948
|
+
hasRuntimeDefault: false;
|
|
1949
|
+
enumValues: undefined;
|
|
1950
|
+
baseColumn: never;
|
|
1951
|
+
identity: undefined;
|
|
1952
|
+
generated: undefined;
|
|
1953
|
+
}, {}, {}>;
|
|
1954
|
+
commitmentRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
1955
|
+
name: "commitment_ref";
|
|
1956
|
+
tableName: "goal_activities";
|
|
1957
|
+
dataType: "string";
|
|
1958
|
+
columnType: "PgText";
|
|
1959
|
+
data: string;
|
|
1960
|
+
driverParam: string;
|
|
1961
|
+
notNull: false;
|
|
1962
|
+
hasDefault: false;
|
|
1963
|
+
isPrimaryKey: false;
|
|
1964
|
+
isAutoincrement: false;
|
|
1965
|
+
hasRuntimeDefault: false;
|
|
1966
|
+
enumValues: [string, ...string[]];
|
|
1967
|
+
baseColumn: never;
|
|
1968
|
+
identity: undefined;
|
|
1969
|
+
generated: undefined;
|
|
1970
|
+
}, {}, {}>;
|
|
1971
|
+
runRef: import("drizzle-orm/pg-core").PgColumn<{
|
|
1972
|
+
name: "run_ref";
|
|
1973
|
+
tableName: "goal_activities";
|
|
1974
|
+
dataType: "string";
|
|
1975
|
+
columnType: "PgUUID";
|
|
1976
|
+
data: string;
|
|
1977
|
+
driverParam: string;
|
|
1978
|
+
notNull: false;
|
|
1979
|
+
hasDefault: false;
|
|
1980
|
+
isPrimaryKey: false;
|
|
1981
|
+
isAutoincrement: false;
|
|
1982
|
+
hasRuntimeDefault: false;
|
|
1983
|
+
enumValues: undefined;
|
|
1984
|
+
baseColumn: never;
|
|
1985
|
+
identity: undefined;
|
|
1986
|
+
generated: undefined;
|
|
1987
|
+
}, {}, {}>;
|
|
1988
|
+
activityKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
1989
|
+
name: "activity_kind";
|
|
1990
|
+
tableName: "goal_activities";
|
|
1991
|
+
dataType: "string";
|
|
1992
|
+
columnType: "PgText";
|
|
1993
|
+
data: string;
|
|
1994
|
+
driverParam: string;
|
|
1995
|
+
notNull: false;
|
|
1996
|
+
hasDefault: false;
|
|
1997
|
+
isPrimaryKey: false;
|
|
1998
|
+
isAutoincrement: false;
|
|
1999
|
+
hasRuntimeDefault: false;
|
|
2000
|
+
enumValues: [string, ...string[]];
|
|
2001
|
+
baseColumn: never;
|
|
2002
|
+
identity: undefined;
|
|
2003
|
+
generated: undefined;
|
|
2004
|
+
}, {}, {}>;
|
|
2005
|
+
summary: import("drizzle-orm/pg-core").PgColumn<{
|
|
2006
|
+
name: "summary";
|
|
2007
|
+
tableName: "goal_activities";
|
|
2008
|
+
dataType: "string";
|
|
2009
|
+
columnType: "PgText";
|
|
2010
|
+
data: string;
|
|
2011
|
+
driverParam: string;
|
|
2012
|
+
notNull: true;
|
|
2013
|
+
hasDefault: false;
|
|
2014
|
+
isPrimaryKey: false;
|
|
2015
|
+
isAutoincrement: false;
|
|
2016
|
+
hasRuntimeDefault: false;
|
|
2017
|
+
enumValues: [string, ...string[]];
|
|
2018
|
+
baseColumn: never;
|
|
2019
|
+
identity: undefined;
|
|
2020
|
+
generated: undefined;
|
|
2021
|
+
}, {}, {}>;
|
|
2022
|
+
evidenceRefs: import("drizzle-orm/pg-core").PgColumn<{
|
|
2023
|
+
name: "evidence_refs";
|
|
2024
|
+
tableName: "goal_activities";
|
|
2025
|
+
dataType: "json";
|
|
2026
|
+
columnType: "PgJsonb";
|
|
2027
|
+
data: unknown[];
|
|
2028
|
+
driverParam: unknown;
|
|
2029
|
+
notNull: true;
|
|
2030
|
+
hasDefault: true;
|
|
2031
|
+
isPrimaryKey: false;
|
|
2032
|
+
isAutoincrement: false;
|
|
2033
|
+
hasRuntimeDefault: false;
|
|
2034
|
+
enumValues: undefined;
|
|
2035
|
+
baseColumn: never;
|
|
2036
|
+
identity: undefined;
|
|
2037
|
+
generated: undefined;
|
|
2038
|
+
}, {}, {
|
|
2039
|
+
$type: unknown[];
|
|
2040
|
+
}>;
|
|
2041
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
2042
|
+
name: "idempotency_key";
|
|
2043
|
+
tableName: "goal_activities";
|
|
2044
|
+
dataType: "string";
|
|
2045
|
+
columnType: "PgText";
|
|
2046
|
+
data: string;
|
|
2047
|
+
driverParam: string;
|
|
2048
|
+
notNull: false;
|
|
2049
|
+
hasDefault: false;
|
|
2050
|
+
isPrimaryKey: false;
|
|
2051
|
+
isAutoincrement: false;
|
|
2052
|
+
hasRuntimeDefault: false;
|
|
2053
|
+
enumValues: [string, ...string[]];
|
|
2054
|
+
baseColumn: never;
|
|
2055
|
+
identity: undefined;
|
|
2056
|
+
generated: undefined;
|
|
2057
|
+
}, {}, {}>;
|
|
2058
|
+
occurredAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
2059
|
+
name: "occurred_at";
|
|
2060
|
+
tableName: "goal_activities";
|
|
2061
|
+
dataType: "date";
|
|
2062
|
+
columnType: "PgTimestamp";
|
|
2063
|
+
data: Date;
|
|
2064
|
+
driverParam: string;
|
|
2065
|
+
notNull: true;
|
|
2066
|
+
hasDefault: true;
|
|
2067
|
+
isPrimaryKey: false;
|
|
2068
|
+
isAutoincrement: false;
|
|
2069
|
+
hasRuntimeDefault: false;
|
|
2070
|
+
enumValues: undefined;
|
|
2071
|
+
baseColumn: never;
|
|
2072
|
+
identity: undefined;
|
|
2073
|
+
generated: undefined;
|
|
2074
|
+
}, {}, {}>;
|
|
2075
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
2076
|
+
name: "created_at";
|
|
2077
|
+
tableName: "goal_activities";
|
|
2078
|
+
dataType: "date";
|
|
2079
|
+
columnType: "PgTimestamp";
|
|
2080
|
+
data: Date;
|
|
2081
|
+
driverParam: string;
|
|
2082
|
+
notNull: true;
|
|
2083
|
+
hasDefault: true;
|
|
2084
|
+
isPrimaryKey: false;
|
|
2085
|
+
isAutoincrement: false;
|
|
2086
|
+
hasRuntimeDefault: false;
|
|
2087
|
+
enumValues: undefined;
|
|
2088
|
+
baseColumn: never;
|
|
2089
|
+
identity: undefined;
|
|
2090
|
+
generated: undefined;
|
|
2091
|
+
}, {}, {}>;
|
|
2092
|
+
}>, "limit" | "where" | "orderBy">;
|
|
2093
|
+
createActivity: (id: string, input: CreateGoalActivity, actorAgentId?: string | null) => Promise<{
|
|
2094
|
+
activityKind: string | null;
|
|
2095
|
+
id: string;
|
|
2096
|
+
summary: string;
|
|
2097
|
+
orgId: string;
|
|
2098
|
+
createdAt: Date;
|
|
2099
|
+
goalId: string;
|
|
2100
|
+
commitmentRef: string | null;
|
|
2101
|
+
runRef: string | null;
|
|
2102
|
+
evidenceRefs: unknown[];
|
|
2103
|
+
idempotencyKey: string | null;
|
|
2104
|
+
occurredAt: Date;
|
|
2105
|
+
contractRevision: number;
|
|
2106
|
+
submittedByAgentId: string | null;
|
|
2107
|
+
agentOwnerRefAtTime: string | null;
|
|
2108
|
+
}>;
|
|
2109
|
+
feedback: (id: string, input: CreateGoalFeedback, actorUserId: string) => Promise<{
|
|
2110
|
+
id: string;
|
|
2111
|
+
updatedAt: Date;
|
|
2112
|
+
orgId: string;
|
|
2113
|
+
createdAt: Date;
|
|
2114
|
+
body: string;
|
|
2115
|
+
goalId: string;
|
|
2116
|
+
idempotencyKey: string;
|
|
2117
|
+
attachments: import("@rudderhq/shared").GoalFeedbackAttachment[];
|
|
2118
|
+
feedbackKind: "ordinary" | "consequential";
|
|
2119
|
+
actorType: "user";
|
|
2120
|
+
actorId: string;
|
|
2121
|
+
contentHash: string;
|
|
2122
|
+
routedWakeupRequestId: string | null;
|
|
2123
|
+
}>;
|
|
2124
|
+
createChangeProposal: (id: string, input: CreateGoalChangeProposal, actorAgentId: string | null) => Promise<{
|
|
2125
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
2126
|
+
id: string;
|
|
2127
|
+
updatedAt: Date;
|
|
2128
|
+
orgId: string;
|
|
2129
|
+
createdAt: Date;
|
|
2130
|
+
goalId: string;
|
|
2131
|
+
evidenceRefs: string[];
|
|
2132
|
+
idempotencyKey: string;
|
|
2133
|
+
expectedContractRevision: number;
|
|
2134
|
+
afterContract: GoalContractPatch;
|
|
2135
|
+
rationale: string;
|
|
2136
|
+
approvalId: string;
|
|
2137
|
+
beforeContract: GoalContractSnapshot;
|
|
2138
|
+
proposedByAgentId: string;
|
|
2139
|
+
appliedRevision: number | null;
|
|
2140
|
+
appliedAt: Date | null;
|
|
2141
|
+
}>;
|
|
2142
|
+
decideChangeProposal: (proposalId: string, input: DecideGoalChangeProposal, actorUserId: string) => Promise<{
|
|
2143
|
+
id: string;
|
|
2144
|
+
orgId: string;
|
|
2145
|
+
goalId: string;
|
|
2146
|
+
expectedContractRevision: number;
|
|
2147
|
+
beforeContract: GoalContractSnapshot;
|
|
2148
|
+
afterContract: GoalContractPatch;
|
|
2149
|
+
rationale: string;
|
|
2150
|
+
evidenceRefs: string[];
|
|
2151
|
+
approvalId: string;
|
|
2152
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
2153
|
+
idempotencyKey: string;
|
|
2154
|
+
proposedByAgentId: string;
|
|
2155
|
+
appliedRevision: number | null;
|
|
2156
|
+
appliedAt: Date | null;
|
|
2157
|
+
createdAt: Date;
|
|
2158
|
+
updatedAt: Date;
|
|
2159
|
+
} | {
|
|
2160
|
+
id: string;
|
|
2161
|
+
orgId: string;
|
|
2162
|
+
goalId: string;
|
|
2163
|
+
expectedContractRevision: number;
|
|
2164
|
+
beforeContract: GoalContractSnapshot;
|
|
2165
|
+
afterContract: GoalContractPatch;
|
|
2166
|
+
rationale: string;
|
|
2167
|
+
evidenceRefs: string[];
|
|
2168
|
+
approvalId: string;
|
|
2169
|
+
status: "pending" | "superseded" | "approved" | "rejected" | "applied";
|
|
2170
|
+
idempotencyKey: string;
|
|
2171
|
+
proposedByAgentId: string;
|
|
2172
|
+
appliedRevision: number | null;
|
|
2173
|
+
appliedAt: Date | null;
|
|
2174
|
+
createdAt: Date;
|
|
2175
|
+
updatedAt: Date;
|
|
2176
|
+
}>;
|
|
2177
|
+
createResultProposal: (id: string, input: CreateGoalResultProposal, actorAgentId: string | null) => Promise<{
|
|
2178
|
+
status: "ready" | "superseded" | "rejected" | "inconclusive" | "accepted";
|
|
2179
|
+
id: string;
|
|
2180
|
+
updatedAt: Date;
|
|
2181
|
+
orgId: string;
|
|
2182
|
+
createdAt: Date;
|
|
2183
|
+
goalId: string;
|
|
2184
|
+
idempotencyKey: string;
|
|
2185
|
+
contractRevision: number;
|
|
2186
|
+
riskSummary: string;
|
|
2187
|
+
proposedByAgentId: string;
|
|
2188
|
+
candidate: GoalEvaluationCandidate;
|
|
2189
|
+
candidateHash: string;
|
|
2190
|
+
preflight: GoalResultReducerPreflight;
|
|
2191
|
+
acceptedByActorType: "user" | null;
|
|
2192
|
+
acceptedByActorId: string | null;
|
|
2193
|
+
acceptanceIdempotencyKey: string | null;
|
|
2194
|
+
acceptedAt: Date | null;
|
|
2195
|
+
rejectedByActorType: "user" | null;
|
|
2196
|
+
rejectedByActorId: string | null;
|
|
2197
|
+
rejectedAt: Date | null;
|
|
2198
|
+
rejectionFeedback: string | null;
|
|
2199
|
+
consumedAt: Date | null;
|
|
2200
|
+
}>;
|
|
2201
|
+
acceptResultProposal: (proposalId: string, input: AcceptGoalResultProposal, actorUserId: string) => Promise<{
|
|
2202
|
+
id: string;
|
|
2203
|
+
orgId: string;
|
|
2204
|
+
title: string;
|
|
2205
|
+
description: string | null;
|
|
2206
|
+
alignmentQuestion: string | null;
|
|
2207
|
+
outcomeStatement: string | null;
|
|
2208
|
+
objectiveMode: string;
|
|
2209
|
+
lifecycle: string;
|
|
2210
|
+
contractRevision: number;
|
|
2211
|
+
criteria: unknown[];
|
|
2212
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
2213
|
+
humanAuthorities: Record<string, unknown>;
|
|
2214
|
+
evaluationPolicy: Record<string, unknown>;
|
|
2215
|
+
actionDeadline: Date | null;
|
|
2216
|
+
evaluationDeadline: Date | null;
|
|
2217
|
+
evaluationResult: Record<string, unknown> | null;
|
|
2218
|
+
closeReason: string | null;
|
|
2219
|
+
resultPayload: Record<string, unknown> | null;
|
|
2220
|
+
focus: boolean;
|
|
2221
|
+
planRevision: number;
|
|
2222
|
+
continuationKind: string | null;
|
|
2223
|
+
continuationSummary: string | null;
|
|
2224
|
+
wakeCondition: string | null;
|
|
2225
|
+
level: string;
|
|
2226
|
+
status: string;
|
|
2227
|
+
parentId: string | null;
|
|
2228
|
+
ownerAgentId: string | null;
|
|
2229
|
+
createdAt: Date;
|
|
2230
|
+
updatedAt: Date;
|
|
2231
|
+
}>;
|
|
2232
|
+
rejectResultProposal: (proposalId: string, input: RejectGoalResultProposal, actorUserId: string) => Promise<{
|
|
2233
|
+
id: string;
|
|
2234
|
+
orgId: string;
|
|
2235
|
+
goalId: string;
|
|
2236
|
+
contractRevision: number;
|
|
2237
|
+
candidate: GoalEvaluationCandidate;
|
|
2238
|
+
candidateHash: string;
|
|
2239
|
+
preflight: GoalResultReducerPreflight;
|
|
2240
|
+
riskSummary: string;
|
|
2241
|
+
status: "ready" | "superseded" | "rejected" | "inconclusive" | "accepted";
|
|
2242
|
+
idempotencyKey: string;
|
|
2243
|
+
proposedByAgentId: string;
|
|
2244
|
+
acceptedByActorType: "user" | null;
|
|
2245
|
+
acceptedByActorId: string | null;
|
|
2246
|
+
acceptanceIdempotencyKey: string | null;
|
|
2247
|
+
acceptedAt: Date | null;
|
|
2248
|
+
rejectedByActorType: "user" | null;
|
|
2249
|
+
rejectedByActorId: string | null;
|
|
2250
|
+
rejectedAt: Date | null;
|
|
2251
|
+
rejectionFeedback: string | null;
|
|
2252
|
+
consumedAt: Date | null;
|
|
2253
|
+
createdAt: Date;
|
|
2254
|
+
updatedAt: Date;
|
|
2255
|
+
}>;
|
|
2256
|
+
assignOwner: (id: string, input: AssignGoalOwner, actorAgentId?: string | null) => Promise<{
|
|
2257
|
+
agentId: string;
|
|
2258
|
+
id: string;
|
|
2259
|
+
orgId: string;
|
|
2260
|
+
createdAt: Date;
|
|
2261
|
+
goalId: string;
|
|
2262
|
+
assignmentRevision: number;
|
|
2263
|
+
assignedByAuthorityRef: string | null;
|
|
2264
|
+
startsAt: Date;
|
|
2265
|
+
endsAt: Date | null;
|
|
2266
|
+
}>;
|
|
2267
|
+
setFocus: (id: string, focus: boolean, actorAgentId?: string | null) => Promise<{
|
|
2268
|
+
id: string;
|
|
2269
|
+
orgId: string;
|
|
2270
|
+
title: string;
|
|
2271
|
+
description: string | null;
|
|
2272
|
+
alignmentQuestion: string | null;
|
|
2273
|
+
outcomeStatement: string | null;
|
|
2274
|
+
objectiveMode: string;
|
|
2275
|
+
lifecycle: string;
|
|
2276
|
+
contractRevision: number;
|
|
2277
|
+
criteria: unknown[];
|
|
2278
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
2279
|
+
humanAuthorities: Record<string, unknown>;
|
|
2280
|
+
evaluationPolicy: Record<string, unknown>;
|
|
2281
|
+
actionDeadline: Date | null;
|
|
2282
|
+
evaluationDeadline: Date | null;
|
|
2283
|
+
evaluationResult: Record<string, unknown> | null;
|
|
2284
|
+
closeReason: string | null;
|
|
2285
|
+
resultPayload: Record<string, unknown> | null;
|
|
2286
|
+
focus: boolean;
|
|
2287
|
+
planRevision: number;
|
|
2288
|
+
continuationKind: string | null;
|
|
2289
|
+
continuationSummary: string | null;
|
|
2290
|
+
wakeCondition: string | null;
|
|
2291
|
+
level: string;
|
|
2292
|
+
status: string;
|
|
2293
|
+
parentId: string | null;
|
|
2294
|
+
ownerAgentId: string | null;
|
|
2295
|
+
createdAt: Date;
|
|
2296
|
+
updatedAt: Date;
|
|
2297
|
+
}>;
|
|
2298
|
+
evaluate: (id: string, input: EvaluateGoal, actorAgentId?: string | null) => Promise<{
|
|
2299
|
+
id: string;
|
|
2300
|
+
orgId: string;
|
|
2301
|
+
title: string;
|
|
2302
|
+
description: string | null;
|
|
2303
|
+
alignmentQuestion: string | null;
|
|
2304
|
+
outcomeStatement: string | null;
|
|
2305
|
+
objectiveMode: string;
|
|
2306
|
+
lifecycle: string;
|
|
2307
|
+
contractRevision: number;
|
|
2308
|
+
criteria: unknown[];
|
|
2309
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
2310
|
+
humanAuthorities: Record<string, unknown>;
|
|
2311
|
+
evaluationPolicy: Record<string, unknown>;
|
|
2312
|
+
actionDeadline: Date | null;
|
|
2313
|
+
evaluationDeadline: Date | null;
|
|
2314
|
+
evaluationResult: Record<string, unknown> | null;
|
|
2315
|
+
closeReason: string | null;
|
|
2316
|
+
resultPayload: Record<string, unknown> | null;
|
|
2317
|
+
focus: boolean;
|
|
2318
|
+
planRevision: number;
|
|
2319
|
+
continuationKind: string | null;
|
|
2320
|
+
continuationSummary: string | null;
|
|
2321
|
+
wakeCondition: string | null;
|
|
2322
|
+
level: string;
|
|
2323
|
+
status: string;
|
|
2324
|
+
parentId: string | null;
|
|
2325
|
+
ownerAgentId: string | null;
|
|
2326
|
+
createdAt: Date;
|
|
2327
|
+
updatedAt: Date;
|
|
2328
|
+
}>;
|
|
2329
|
+
remove: (id: string) => Promise<{
|
|
2330
|
+
status: string;
|
|
2331
|
+
title: string;
|
|
2332
|
+
id: string;
|
|
2333
|
+
updatedAt: Date;
|
|
2334
|
+
orgId: string;
|
|
2335
|
+
ownerAgentId: string | null;
|
|
2336
|
+
description: string | null;
|
|
2337
|
+
createdAt: Date;
|
|
2338
|
+
parentId: string | null;
|
|
2339
|
+
wakeCondition: string | null;
|
|
2340
|
+
alignmentQuestion: string | null;
|
|
2341
|
+
level: string;
|
|
2342
|
+
outcomeStatement: string | null;
|
|
2343
|
+
objectiveMode: string;
|
|
2344
|
+
criteria: unknown[];
|
|
2345
|
+
autonomyEnvelope: Record<string, unknown>;
|
|
2346
|
+
humanAuthorities: Record<string, unknown>;
|
|
2347
|
+
evaluationPolicy: Record<string, unknown>;
|
|
2348
|
+
actionDeadline: Date | null;
|
|
2349
|
+
evaluationDeadline: Date | null;
|
|
2350
|
+
resultPayload: Record<string, unknown> | null;
|
|
2351
|
+
contractRevision: number;
|
|
2352
|
+
focus: boolean;
|
|
2353
|
+
lifecycle: string;
|
|
2354
|
+
evaluationResult: Record<string, unknown> | null;
|
|
2355
|
+
closeReason: string | null;
|
|
2356
|
+
planRevision: number;
|
|
2357
|
+
continuationKind: string | null;
|
|
2358
|
+
continuationSummary: string | null;
|
|
2359
|
+
}>;
|
|
445
2360
|
};
|
|
446
2361
|
export {};
|
|
447
2362
|
//# sourceMappingURL=goals.d.ts.map
|