@mastra/server 1.14.0 → 1.15.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{chunk-LUHJDABR.cjs → chunk-2SQXNXDG.cjs} +30 -30
- package/dist/{chunk-LUHJDABR.cjs.map → chunk-2SQXNXDG.cjs.map} +1 -1
- package/dist/{chunk-DEZVQIGB.cjs → chunk-3CUUB624.cjs} +10 -10
- package/dist/{chunk-DEZVQIGB.cjs.map → chunk-3CUUB624.cjs.map} +1 -1
- package/dist/{chunk-U7WRAFPO.js → chunk-45KP7ENX.js} +5 -5
- package/dist/{chunk-U7WRAFPO.js.map → chunk-45KP7ENX.js.map} +1 -1
- package/dist/{chunk-M5KELSDU.js → chunk-4AUZJETY.js} +4 -4
- package/dist/{chunk-M5KELSDU.js.map → chunk-4AUZJETY.js.map} +1 -1
- package/dist/{chunk-CTQ3HPQI.cjs → chunk-4H646L2Z.cjs} +11 -11
- package/dist/{chunk-CTQ3HPQI.cjs.map → chunk-4H646L2Z.cjs.map} +1 -1
- package/dist/{chunk-NFXFCOSV.js → chunk-5A232FX3.js} +3 -3
- package/dist/{chunk-NFXFCOSV.js.map → chunk-5A232FX3.js.map} +1 -1
- package/dist/{chunk-3MW2URMC.js → chunk-5BBO2RHV.js} +10 -4
- package/dist/chunk-5BBO2RHV.js.map +1 -0
- package/dist/{chunk-S5GP7MGR.cjs → chunk-5OJTF4BH.cjs} +6 -6
- package/dist/{chunk-S5GP7MGR.cjs.map → chunk-5OJTF4BH.cjs.map} +1 -1
- package/dist/{chunk-46ITQ5XN.cjs → chunk-6AXJQ6UB.cjs} +6 -6
- package/dist/{chunk-46ITQ5XN.cjs.map → chunk-6AXJQ6UB.cjs.map} +1 -1
- package/dist/{chunk-DRCX2OSH.js → chunk-6INBDRFJ.js} +3 -3
- package/dist/{chunk-DRCX2OSH.js.map → chunk-6INBDRFJ.js.map} +1 -1
- package/dist/{chunk-NLI7HQU4.js → chunk-6QUGCOP5.js} +4 -4
- package/dist/{chunk-NLI7HQU4.js.map → chunk-6QUGCOP5.js.map} +1 -1
- package/dist/{chunk-UHDWOTND.cjs → chunk-7KSSSSLW.cjs} +35 -35
- package/dist/{chunk-UHDWOTND.cjs.map → chunk-7KSSSSLW.cjs.map} +1 -1
- package/dist/{chunk-4HWJ24DT.js → chunk-7WP6LX5N.js} +3 -3
- package/dist/{chunk-4HWJ24DT.js.map → chunk-7WP6LX5N.js.map} +1 -1
- package/dist/{chunk-QSWHYCQJ.cjs → chunk-AJWYRQFD.cjs} +33 -33
- package/dist/{chunk-QSWHYCQJ.cjs.map → chunk-AJWYRQFD.cjs.map} +1 -1
- package/dist/{chunk-FEV3JR2X.js → chunk-B4YTCF2Y.js} +3 -3
- package/dist/{chunk-FEV3JR2X.js.map → chunk-B4YTCF2Y.js.map} +1 -1
- package/dist/{chunk-4XVFN4EB.js → chunk-BMNO4KOI.js} +16 -10
- package/dist/chunk-BMNO4KOI.js.map +1 -0
- package/dist/{chunk-TNLKHEQX.cjs → chunk-BWTGKLXJ.cjs} +11 -11
- package/dist/{chunk-TNLKHEQX.cjs.map → chunk-BWTGKLXJ.cjs.map} +1 -1
- package/dist/{chunk-OJXRWVPG.js → chunk-CCEVYU3X.js} +3 -3
- package/dist/{chunk-OJXRWVPG.js.map → chunk-CCEVYU3X.js.map} +1 -1
- package/dist/{chunk-WJCVD3EA.js → chunk-CLXK74N7.js} +3 -3
- package/dist/{chunk-WJCVD3EA.js.map → chunk-CLXK74N7.js.map} +1 -1
- package/dist/{chunk-OS326XHH.js → chunk-CSSSPADR.js} +4 -4
- package/dist/{chunk-OS326XHH.js.map → chunk-CSSSPADR.js.map} +1 -1
- package/dist/{chunk-QW2SC6DS.cjs → chunk-DUWAI5L3.cjs} +10 -10
- package/dist/{chunk-QW2SC6DS.cjs.map → chunk-DUWAI5L3.cjs.map} +1 -1
- package/dist/{chunk-VX62DW2T.cjs → chunk-DWJI2VL3.cjs} +6 -6
- package/dist/{chunk-VX62DW2T.cjs.map → chunk-DWJI2VL3.cjs.map} +1 -1
- package/dist/{chunk-SZABEGPT.cjs → chunk-E4RLL73F.cjs} +11 -11
- package/dist/{chunk-SZABEGPT.cjs.map → chunk-E4RLL73F.cjs.map} +1 -1
- package/dist/{chunk-55AD3MAT.js → chunk-EYPXYWPY.js} +4 -4
- package/dist/{chunk-55AD3MAT.js.map → chunk-EYPXYWPY.js.map} +1 -1
- package/dist/{chunk-AEBQC6G6.cjs → chunk-FLTCEG6J.cjs} +10 -10
- package/dist/{chunk-AEBQC6G6.cjs.map → chunk-FLTCEG6J.cjs.map} +1 -1
- package/dist/{chunk-GRI42AT7.js → chunk-FS7SSMBW.js} +11 -3
- package/dist/chunk-FS7SSMBW.js.map +1 -0
- package/dist/{chunk-6BXHZVO4.cjs → chunk-G4FSJJAS.cjs} +10 -10
- package/dist/{chunk-6BXHZVO4.cjs.map → chunk-G4FSJJAS.cjs.map} +1 -1
- package/dist/{chunk-CLCXQYFC.js → chunk-GHPFPYUG.js} +3 -3
- package/dist/{chunk-CLCXQYFC.js.map → chunk-GHPFPYUG.js.map} +1 -1
- package/dist/{chunk-4VGZOVOI.js → chunk-H37CMPNZ.js} +3 -3
- package/dist/{chunk-4VGZOVOI.js.map → chunk-H37CMPNZ.js.map} +1 -1
- package/dist/{chunk-MI6FWWJD.js → chunk-H7ZHZE4B.js} +4 -4
- package/dist/{chunk-MI6FWWJD.js.map → chunk-H7ZHZE4B.js.map} +1 -1
- package/dist/{chunk-HTVDOYYQ.cjs → chunk-HMJCSYZW.cjs} +5 -5
- package/dist/{chunk-HTVDOYYQ.cjs.map → chunk-HMJCSYZW.cjs.map} +1 -1
- package/dist/{chunk-6VXSEVDC.js → chunk-HMOE6YKM.js} +5 -5
- package/dist/{chunk-6VXSEVDC.js.map → chunk-HMOE6YKM.js.map} +1 -1
- package/dist/{chunk-KZAB4IB3.js → chunk-HPJ2CRVK.js} +208 -40
- package/dist/chunk-HPJ2CRVK.js.map +1 -0
- package/dist/{chunk-JNZTLQGH.js → chunk-HRVCVRIR.js} +4 -4
- package/dist/{chunk-JNZTLQGH.js.map → chunk-HRVCVRIR.js.map} +1 -1
- package/dist/{chunk-4NZHZQ6Q.cjs → chunk-I6ZA2R6M.cjs} +11 -2
- package/dist/chunk-I6ZA2R6M.cjs.map +1 -0
- package/dist/{chunk-HPS5GJT3.js → chunk-IB2ZR7T7.js} +3 -3
- package/dist/{chunk-HPS5GJT3.js.map → chunk-IB2ZR7T7.js.map} +1 -1
- package/dist/{chunk-IVANH2RD.cjs → chunk-IGZADYRV.cjs} +10 -10
- package/dist/{chunk-IVANH2RD.cjs.map → chunk-IGZADYRV.cjs.map} +1 -1
- package/dist/{chunk-L6ANZUEK.cjs → chunk-IPQTQESA.cjs} +97 -96
- package/dist/chunk-IPQTQESA.cjs.map +1 -0
- package/dist/{chunk-GFC5ZB75.cjs → chunk-JKUQ3PWM.cjs} +10 -10
- package/dist/{chunk-GFC5ZB75.cjs.map → chunk-JKUQ3PWM.cjs.map} +1 -1
- package/dist/{chunk-66TTR3PD.cjs → chunk-JLIHQAX7.cjs} +10 -10
- package/dist/{chunk-66TTR3PD.cjs.map → chunk-JLIHQAX7.cjs.map} +1 -1
- package/dist/{chunk-A6HL3JRC.cjs → chunk-KH7BZQVQ.cjs} +208 -40
- package/dist/chunk-KH7BZQVQ.cjs.map +1 -0
- package/dist/{chunk-MJUZD7NE.js → chunk-KKFLSWNW.js} +4 -4
- package/dist/{chunk-MJUZD7NE.js.map → chunk-KKFLSWNW.js.map} +1 -1
- package/dist/{chunk-DB2GWK7T.js → chunk-L4VJYJCY.js} +3 -3
- package/dist/{chunk-DB2GWK7T.js.map → chunk-L4VJYJCY.js.map} +1 -1
- package/dist/{chunk-LYKMLRXD.cjs → chunk-LPLSDJEE.cjs} +10 -10
- package/dist/{chunk-LYKMLRXD.cjs.map → chunk-LPLSDJEE.cjs.map} +1 -1
- package/dist/{chunk-MDYMZ4OK.cjs → chunk-M2PIFW7O.cjs} +23 -23
- package/dist/{chunk-MDYMZ4OK.cjs.map → chunk-M2PIFW7O.cjs.map} +1 -1
- package/dist/{chunk-GEHJZKDB.cjs → chunk-M3ZNPNN2.cjs} +11 -11
- package/dist/{chunk-GEHJZKDB.cjs.map → chunk-M3ZNPNN2.cjs.map} +1 -1
- package/dist/{chunk-SJMWOGHQ.js → chunk-MN45G3GB.js} +3 -3
- package/dist/{chunk-SJMWOGHQ.js.map → chunk-MN45G3GB.js.map} +1 -1
- package/dist/{chunk-VEKRLGNI.cjs → chunk-NBF6ZWSZ.cjs} +12 -12
- package/dist/{chunk-VEKRLGNI.cjs.map → chunk-NBF6ZWSZ.cjs.map} +1 -1
- package/dist/{chunk-24IPFJ5L.js → chunk-NDI2C7UD.js} +3 -3
- package/dist/{chunk-24IPFJ5L.js.map → chunk-NDI2C7UD.js.map} +1 -1
- package/dist/{chunk-LCDFOAST.cjs → chunk-NHTUBHMO.cjs} +24 -24
- package/dist/{chunk-LCDFOAST.cjs.map → chunk-NHTUBHMO.cjs.map} +1 -1
- package/dist/{chunk-OWWZB5LT.js → chunk-NPNFRMTB.js} +6 -6
- package/dist/{chunk-OWWZB5LT.js.map → chunk-NPNFRMTB.js.map} +1 -1
- package/dist/{chunk-C5T7WB4Y.js → chunk-OH2TKHUS.js} +5 -5
- package/dist/{chunk-C5T7WB4Y.js.map → chunk-OH2TKHUS.js.map} +1 -1
- package/dist/{chunk-LE6IX2DD.js → chunk-OV64H74M.js} +13 -12
- package/dist/chunk-OV64H74M.js.map +1 -0
- package/dist/{chunk-HTNNOZR2.js → chunk-P63CP2ZR.js} +3 -3
- package/dist/{chunk-HTNNOZR2.js.map → chunk-P63CP2ZR.js.map} +1 -1
- package/dist/{chunk-B4SQM6HA.cjs → chunk-Q2X6FP4W.cjs} +28 -28
- package/dist/{chunk-B4SQM6HA.cjs.map → chunk-Q2X6FP4W.cjs.map} +1 -1
- package/dist/{chunk-4NGWOFN7.cjs → chunk-RRQAOK3A.cjs} +11 -11
- package/dist/{chunk-4NGWOFN7.cjs.map → chunk-RRQAOK3A.cjs.map} +1 -1
- package/dist/{chunk-MSIV5GWW.cjs → chunk-S3DMOFGG.cjs} +29 -29
- package/dist/{chunk-MSIV5GWW.cjs.map → chunk-S3DMOFGG.cjs.map} +1 -1
- package/dist/{chunk-2FG2J4GI.js → chunk-TZTKWB74.js} +3 -3
- package/dist/{chunk-2FG2J4GI.js.map → chunk-TZTKWB74.js.map} +1 -1
- package/dist/{chunk-ZCFVL5AI.js → chunk-UQALKED3.js} +3 -3
- package/dist/{chunk-ZCFVL5AI.js.map → chunk-UQALKED3.js.map} +1 -1
- package/dist/{chunk-P6GG3AYA.js → chunk-W7I2JHCT.js} +3 -3
- package/dist/{chunk-P6GG3AYA.js.map → chunk-W7I2JHCT.js.map} +1 -1
- package/dist/{chunk-HJEIULHK.cjs → chunk-WCZPCP3F.cjs} +7 -7
- package/dist/{chunk-HJEIULHK.cjs.map → chunk-WCZPCP3F.cjs.map} +1 -1
- package/dist/{chunk-7BO2VOGB.cjs → chunk-WDECR2C2.cjs} +118 -112
- package/dist/chunk-WDECR2C2.cjs.map +1 -0
- package/dist/{chunk-YL4WPM3F.cjs → chunk-WQCIZSIK.cjs} +10 -10
- package/dist/{chunk-YL4WPM3F.cjs.map → chunk-WQCIZSIK.cjs.map} +1 -1
- package/dist/{chunk-SE7KHXNQ.js → chunk-X7USLRKI.js} +3 -3
- package/dist/{chunk-SE7KHXNQ.js.map → chunk-X7USLRKI.js.map} +1 -1
- package/dist/{chunk-OXZCCCIJ.cjs → chunk-XJ4C64FH.cjs} +33 -33
- package/dist/{chunk-OXZCCCIJ.cjs.map → chunk-XJ4C64FH.cjs.map} +1 -1
- package/dist/{chunk-XFEA4PH2.js → chunk-YIVUIIWJ.js} +4 -4
- package/dist/{chunk-XFEA4PH2.js.map → chunk-YIVUIIWJ.js.map} +1 -1
- package/dist/{chunk-EFSXF23C.cjs → chunk-YJLDMFSE.cjs} +11 -5
- package/dist/chunk-YJLDMFSE.cjs.map +1 -0
- package/dist/{chunk-2CWSPVQF.cjs → chunk-ZHKXVTMQ.cjs} +4 -4
- package/dist/{chunk-2CWSPVQF.cjs.map → chunk-ZHKXVTMQ.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-server-routes.md +28 -8
- package/dist/{observational-memory-UEDVTWS2-TU3KK4ZG.cjs → observational-memory-5NFPG6M3-L7EU4ABW.cjs} +18 -18
- package/dist/{observational-memory-UEDVTWS2-TU3KK4ZG.cjs.map → observational-memory-5NFPG6M3-L7EU4ABW.cjs.map} +1 -1
- package/dist/{observational-memory-UEDVTWS2-COV6JJZK.js → observational-memory-5NFPG6M3-MG2OMRFW.js} +3 -3
- package/dist/{observational-memory-UEDVTWS2-COV6JJZK.js.map → observational-memory-5NFPG6M3-MG2OMRFW.js.map} +1 -1
- package/dist/{probe-image-size-NW5AOXWX.cjs → probe-image-size-7HF7Q24F.cjs} +6 -22
- package/dist/probe-image-size-7HF7Q24F.cjs.map +1 -0
- package/dist/{probe-image-size-VSBN7AG5.js → probe-image-size-M5NYSF5D.js} +6 -22
- package/dist/probe-image-size-M5NYSF5D.js.map +1 -0
- package/dist/server/handlers/a2a.cjs +9 -9
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +8 -8
- package/dist/server/handlers/agent-versions.js +1 -1
- package/dist/server/handlers/agents.cjs +33 -33
- package/dist/server/handlers/agents.d.ts +22 -5
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/auth.cjs +10 -10
- package/dist/server/handlers/auth.js +1 -1
- package/dist/server/handlers/datasets.cjs +21 -21
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers/logs.cjs +4 -4
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +8 -8
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/mcp.cjs +9 -9
- package/dist/server/handlers/mcp.js +1 -1
- package/dist/server/handlers/memory.cjs +27 -27
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +19 -19
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability.cjs +24 -24
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/processor-providers.cjs +3 -3
- package/dist/server/handlers/processor-providers.js +1 -1
- package/dist/server/handlers/processors.cjs +4 -4
- package/dist/server/handlers/processors.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +8 -8
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +8 -8
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +7 -7
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agents.cjs +7 -7
- package/dist/server/handlers/stored-agents.js +1 -1
- package/dist/server/handlers/stored-mcp-clients.cjs +6 -6
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +6 -6
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +6 -6
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skills.cjs +7 -7
- package/dist/server/handlers/stored-skills.js +1 -1
- package/dist/server/handlers/stored-workspaces.cjs +6 -6
- package/dist/server/handlers/stored-workspaces.js +1 -1
- package/dist/server/handlers/system.cjs +2 -2
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tool-providers.cjs +5 -5
- package/dist/server/handlers/tool-providers.js +1 -1
- package/dist/server/handlers/tools.cjs +6 -6
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/vector.cjs +16 -16
- package/dist/server/handlers/vector.js +1 -1
- package/dist/server/handlers/voice.cjs +8 -8
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +24 -24
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers/workspace.cjs +26 -26
- package/dist/server/handlers/workspace.js +1 -1
- package/dist/server/handlers.cjs +26 -26
- package/dist/server/handlers.js +13 -13
- package/dist/server/schemas/agents.d.ts +13 -0
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +44 -40
- package/dist/server/schemas/index.js +1 -1
- package/dist/server/server-adapter/index.cjs +281 -280
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.js +35 -34
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +75 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-3MW2URMC.js.map +0 -1
- package/dist/chunk-4NZHZQ6Q.cjs.map +0 -1
- package/dist/chunk-4XVFN4EB.js.map +0 -1
- package/dist/chunk-7BO2VOGB.cjs.map +0 -1
- package/dist/chunk-A6HL3JRC.cjs.map +0 -1
- package/dist/chunk-EFSXF23C.cjs.map +0 -1
- package/dist/chunk-GRI42AT7.js.map +0 -1
- package/dist/chunk-KZAB4IB3.js.map +0 -1
- package/dist/chunk-L6ANZUEK.cjs.map +0 -1
- package/dist/chunk-LE6IX2DD.js.map +0 -1
- package/dist/probe-image-size-NW5AOXWX.cjs.map +0 -1
- package/dist/probe-image-size-VSBN7AG5.js.map +0 -1
|
@@ -8,7 +8,7 @@ import { MessageHistory } from '@mastra/core/processors';
|
|
|
8
8
|
import { createHash, randomUUID } from 'crypto';
|
|
9
9
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
10
10
|
|
|
11
|
-
// ../memory/dist/chunk-
|
|
11
|
+
// ../memory/dist/chunk-5SMKVGJP.js
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/xxhash-wasm@1.1.0/node_modules/xxhash-wasm/esm/xxhash-wasm.js
|
|
14
14
|
var t = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 48, 8, 96, 3, 127, 127, 127, 1, 127, 96, 3, 127, 127, 127, 0, 96, 2, 127, 127, 0, 96, 1, 127, 1, 127, 96, 3, 127, 127, 126, 1, 126, 96, 3, 126, 127, 127, 1, 126, 96, 2, 127, 126, 0, 96, 1, 127, 1, 126, 3, 11, 10, 0, 0, 2, 1, 3, 4, 5, 6, 1, 7, 5, 3, 1, 0, 1, 7, 85, 9, 3, 109, 101, 109, 2, 0, 5, 120, 120, 104, 51, 50, 0, 0, 6, 105, 110, 105, 116, 51, 50, 0, 2, 8, 117, 112, 100, 97, 116, 101, 51, 50, 0, 3, 8, 100, 105, 103, 101, 115, 116, 51, 50, 0, 4, 5, 120, 120, 104, 54, 52, 0, 5, 6, 105, 110, 105, 116, 54, 52, 0, 7, 8, 117, 112, 100, 97, 116, 101, 54, 52, 0, 8, 8, 100, 105, 103, 101, 115, 116, 54, 52, 0, 9, 10, 251, 22, 10, 242, 1, 1, 4, 127, 32, 0, 32, 1, 106, 33, 3, 32, 1, 65, 16, 79, 4, 127, 32, 3, 65, 16, 107, 33, 6, 32, 2, 65, 168, 136, 141, 161, 2, 106, 33, 3, 32, 2, 65, 137, 235, 208, 208, 7, 107, 33, 4, 32, 2, 65, 207, 140, 162, 142, 6, 106, 33, 5, 3, 64, 32, 3, 32, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 4, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 4, 32, 2, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 5, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 6, 32, 0, 65, 4, 106, 34, 0, 79, 13, 0, 11, 32, 2, 65, 12, 119, 32, 5, 65, 18, 119, 106, 32, 4, 65, 7, 119, 106, 32, 3, 65, 1, 119, 106, 5, 32, 2, 65, 177, 207, 217, 178, 1, 106, 11, 32, 1, 106, 32, 0, 32, 1, 65, 15, 113, 16, 1, 11, 146, 1, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 1, 65, 4, 106, 32, 2, 75, 69, 4, 64, 32, 0, 32, 1, 40, 2, 0, 65, 189, 220, 202, 149, 124, 108, 106, 65, 17, 119, 65, 175, 214, 211, 190, 2, 108, 33, 0, 32, 1, 65, 4, 106, 33, 1, 12, 1, 11, 11, 3, 64, 32, 1, 32, 2, 79, 69, 4, 64, 32, 0, 32, 1, 45, 0, 0, 65, 177, 207, 217, 178, 1, 108, 106, 65, 11, 119, 65, 177, 243, 221, 241, 121, 108, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 65, 15, 118, 115, 65, 247, 148, 175, 175, 120, 108, 34, 0, 65, 13, 118, 32, 0, 115, 65, 189, 220, 202, 149, 124, 108, 34, 0, 65, 16, 118, 32, 0, 115, 11, 63, 0, 32, 0, 65, 8, 106, 32, 1, 65, 168, 136, 141, 161, 2, 106, 54, 2, 0, 32, 0, 65, 12, 106, 32, 1, 65, 137, 235, 208, 208, 7, 107, 54, 2, 0, 32, 0, 65, 16, 106, 32, 1, 54, 2, 0, 32, 0, 65, 20, 106, 32, 1, 65, 207, 140, 162, 142, 6, 106, 54, 2, 0, 11, 195, 4, 1, 6, 127, 32, 1, 32, 2, 106, 33, 6, 32, 0, 65, 24, 106, 33, 4, 32, 0, 65, 40, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 40, 2, 0, 32, 2, 106, 54, 2, 0, 32, 0, 65, 4, 106, 34, 5, 32, 5, 40, 2, 0, 32, 2, 65, 16, 79, 32, 0, 40, 2, 0, 65, 16, 79, 114, 114, 54, 2, 0, 32, 2, 32, 3, 106, 65, 16, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 16, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 12, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 4, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 8, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 20, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 12, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 40, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 32, 6, 65, 16, 107, 77, 4, 64, 32, 6, 65, 16, 107, 33, 8, 32, 0, 65, 8, 106, 40, 2, 0, 33, 2, 32, 0, 65, 12, 106, 40, 2, 0, 33, 3, 32, 0, 65, 16, 106, 40, 2, 0, 33, 5, 32, 0, 65, 20, 106, 40, 2, 0, 33, 7, 3, 64, 32, 2, 32, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 3, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 5, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 7, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 7, 32, 8, 32, 1, 65, 4, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 2, 54, 2, 0, 32, 0, 65, 12, 106, 32, 3, 54, 2, 0, 32, 0, 65, 16, 106, 32, 5, 54, 2, 0, 32, 0, 65, 20, 106, 32, 7, 54, 2, 0, 11, 32, 1, 32, 6, 73, 4, 64, 32, 4, 32, 1, 32, 6, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 1, 54, 2, 0, 11, 11, 97, 1, 1, 127, 32, 0, 65, 16, 106, 40, 2, 0, 33, 1, 32, 0, 65, 4, 106, 40, 2, 0, 4, 127, 32, 1, 65, 12, 119, 32, 0, 65, 20, 106, 40, 2, 0, 65, 18, 119, 106, 32, 0, 65, 12, 106, 40, 2, 0, 65, 7, 119, 106, 32, 0, 65, 8, 106, 40, 2, 0, 65, 1, 119, 106, 5, 32, 1, 65, 177, 207, 217, 178, 1, 106, 11, 32, 0, 40, 2, 0, 106, 32, 0, 65, 24, 106, 32, 0, 65, 40, 106, 40, 2, 0, 16, 1, 11, 255, 3, 2, 3, 126, 1, 127, 32, 0, 32, 1, 106, 33, 6, 32, 1, 65, 32, 79, 4, 126, 32, 6, 65, 32, 107, 33, 6, 32, 2, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 33, 3, 32, 2, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 33, 4, 32, 2, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 33, 5, 3, 64, 32, 3, 32, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 3, 32, 4, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 4, 32, 2, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 2, 32, 5, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 5, 32, 6, 32, 0, 65, 8, 106, 34, 0, 79, 13, 0, 11, 32, 2, 66, 12, 137, 32, 5, 66, 18, 137, 124, 32, 4, 66, 7, 137, 124, 32, 3, 66, 1, 137, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 2, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 2, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 1, 173, 124, 32, 0, 32, 1, 65, 31, 113, 16, 6, 11, 134, 2, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 2, 32, 1, 65, 8, 106, 79, 4, 64, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 32, 0, 133, 66, 27, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 33, 0, 32, 1, 65, 8, 106, 33, 1, 12, 1, 11, 11, 32, 1, 65, 4, 106, 32, 2, 77, 4, 64, 32, 0, 32, 1, 53, 2, 0, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 23, 137, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 124, 33, 0, 32, 1, 65, 4, 106, 33, 1, 11, 3, 64, 32, 1, 32, 2, 73, 4, 64, 32, 0, 32, 1, 49, 0, 0, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 126, 133, 66, 11, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 66, 33, 136, 133, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 34, 0, 32, 0, 66, 29, 136, 133, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 126, 34, 0, 32, 0, 66, 32, 136, 133, 11, 77, 0, 32, 0, 65, 8, 106, 32, 1, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 55, 3, 0, 32, 0, 65, 16, 106, 32, 1, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 55, 3, 0, 32, 0, 65, 24, 106, 32, 1, 55, 3, 0, 32, 0, 65, 32, 106, 32, 1, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 55, 3, 0, 11, 244, 4, 2, 3, 127, 4, 126, 32, 1, 32, 2, 106, 33, 5, 32, 0, 65, 40, 106, 33, 4, 32, 0, 65, 200, 0, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 41, 3, 0, 32, 2, 173, 124, 55, 3, 0, 32, 2, 32, 3, 106, 65, 32, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 32, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 8, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 24, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 16, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 32, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 24, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 200, 0, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 65, 32, 106, 32, 5, 77, 4, 64, 32, 5, 65, 32, 107, 33, 2, 32, 0, 65, 8, 106, 41, 3, 0, 33, 6, 32, 0, 65, 16, 106, 41, 3, 0, 33, 7, 32, 0, 65, 24, 106, 41, 3, 0, 33, 8, 32, 0, 65, 32, 106, 41, 3, 0, 33, 9, 3, 64, 32, 6, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 6, 32, 7, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 7, 32, 8, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 8, 32, 9, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 9, 32, 2, 32, 1, 65, 8, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 6, 55, 3, 0, 32, 0, 65, 16, 106, 32, 7, 55, 3, 0, 32, 0, 65, 24, 106, 32, 8, 55, 3, 0, 32, 0, 65, 32, 106, 32, 9, 55, 3, 0, 11, 32, 1, 32, 5, 73, 4, 64, 32, 4, 32, 1, 32, 5, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 1, 54, 2, 0, 11, 11, 188, 2, 1, 5, 126, 32, 0, 65, 24, 106, 41, 3, 0, 33, 1, 32, 0, 41, 3, 0, 34, 2, 66, 32, 90, 4, 126, 32, 0, 65, 8, 106, 41, 3, 0, 34, 3, 66, 1, 137, 32, 0, 65, 16, 106, 41, 3, 0, 34, 4, 66, 7, 137, 124, 32, 1, 66, 12, 137, 32, 0, 65, 32, 106, 41, 3, 0, 34, 5, 66, 18, 137, 124, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 1, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 1, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 2, 124, 32, 0, 65, 40, 106, 32, 2, 66, 31, 131, 167, 16, 6, 11]);
|
|
@@ -1039,7 +1039,7 @@ function imageSize(input) {
|
|
|
1039
1039
|
throw new TypeError(`unsupported file type: ${type}`);
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
-
// ../memory/dist/chunk-
|
|
1042
|
+
// ../memory/dist/chunk-5SMKVGJP.js
|
|
1043
1043
|
function formatRelativeTime(date, currentDate) {
|
|
1044
1044
|
const diffMs = currentDate.getTime() - date.getTime();
|
|
1045
1045
|
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
@@ -1324,6 +1324,18 @@ function createActivationMarker(params) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
};
|
|
1326
1326
|
}
|
|
1327
|
+
function createThreadUpdateMarker(params) {
|
|
1328
|
+
return {
|
|
1329
|
+
type: "data-om-thread-update",
|
|
1330
|
+
data: {
|
|
1331
|
+
cycleId: params.cycleId,
|
|
1332
|
+
threadId: params.threadId,
|
|
1333
|
+
oldTitle: params.oldTitle,
|
|
1334
|
+
newTitle: params.newTitle,
|
|
1335
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1327
1339
|
var ENCRYPTED_CONTENT_KEY = "encryptedContent";
|
|
1328
1340
|
var ENCRYPTED_CONTENT_REDACTION_THRESHOLD = 256;
|
|
1329
1341
|
var DEFAULT_OBSERVER_TOOL_RESULT_MAX_TOKENS = 1e4;
|
|
@@ -1631,17 +1643,60 @@ Only add a new observation for a repeated action if the NEW result changes the p
|
|
|
1631
1643
|
ACTIONABLE INSIGHTS:
|
|
1632
1644
|
- What worked well in explanations
|
|
1633
1645
|
- What needs follow-up or clarification
|
|
1634
|
-
- User's stated goals or next steps (note if the user tells you not to do a next step, or asks for something specific, other next steps besides the users request should be marked as "waiting for user", unless the user explicitly says to continue all next steps)
|
|
1635
|
-
|
|
1636
|
-
|
|
1646
|
+
- User's stated goals or next steps (note if the user tells you not to do a next step, or asks for something specific, other next steps besides the users request should be marked as "waiting for user", unless the user explicitly says to continue all next steps)
|
|
1647
|
+
|
|
1648
|
+
COMPLETION TRACKING:
|
|
1649
|
+
Completion observations are not just summaries. They are explicit memory signals to the assistant that a task, question, or subtask has been resolved.
|
|
1650
|
+
Without clear completion markers, the assistant may forget that work is already finished and may repeat, reopen, or continue an already-completed task.
|
|
1651
|
+
|
|
1652
|
+
Use \u2705 to answer: "What exactly is now done?"
|
|
1653
|
+
Choose completion observations that help the assistant know what is finished and should not be reworked unless new information appears.
|
|
1654
|
+
|
|
1655
|
+
Use \u2705 when:
|
|
1656
|
+
- The user explicitly confirms something worked or was answered ("thanks, that fixed it", "got it", "perfect")
|
|
1657
|
+
- The assistant provided a definitive, complete answer to a factual question and the user moved on
|
|
1658
|
+
- A multi-step task reached its stated goal
|
|
1659
|
+
- The user acknowledged receipt of requested information
|
|
1660
|
+
- A concrete subtask, fix, deliverable, or implementation step became complete during ongoing work
|
|
1661
|
+
|
|
1662
|
+
Do NOT use \u2705 when:
|
|
1663
|
+
- The assistant merely responded \u2014 the user might follow up with corrections
|
|
1664
|
+
- The topic is paused but not resolved ("I'll try that later")
|
|
1665
|
+
- The user's reaction is ambiguous
|
|
1666
|
+
|
|
1667
|
+
FORMAT:
|
|
1668
|
+
As a sub-bullet under the related observation group:
|
|
1669
|
+
* \u{1F534} (14:30) User asked how to configure auth middleware
|
|
1670
|
+
* -> Agent explained JWT setup with code example
|
|
1671
|
+
* \u2705 User confirmed auth is working
|
|
1672
|
+
|
|
1673
|
+
Or as a standalone observation when closing out a broader task:
|
|
1674
|
+
* \u2705 (14:45) Auth configuration task completed \u2014 user confirmed middleware is working
|
|
1675
|
+
|
|
1676
|
+
Completion observations should be terse but specific about WHAT was completed.
|
|
1677
|
+
Prefer concrete resolved outcomes over abstract workflow status so the assistant remembers what is already done.`;
|
|
1678
|
+
var OBSERVER_OUTPUT_FORMAT_BASE = buildObserverOutputFormat();
|
|
1679
|
+
function buildObserverOutputFormat(includeThreadTitle = false) {
|
|
1680
|
+
const threadTitleSection = includeThreadTitle ? `
|
|
1681
|
+
<thread-title>
|
|
1682
|
+
A short, noun-phrase title for this conversation (2-5 words). Examples:
|
|
1683
|
+
- "Auth bug fix" \u2014 not "Fixing the auth bug"
|
|
1684
|
+
- "Dark mode toggle" \u2014 not "User wants dark mode toggle added"
|
|
1685
|
+
- "Deployment pipeline setup" \u2014 not "Setting up deployment pipeline for project"
|
|
1686
|
+
Only update when the topic meaningfully changes.
|
|
1687
|
+
</thread-title>` : "";
|
|
1688
|
+
return `Use priority levels:
|
|
1689
|
+
- \u{1F534} High: explicit user facts, preferences, unresolved goals, critical context
|
|
1637
1690
|
- \u{1F7E1} Medium: project details, learned information, tool results
|
|
1638
1691
|
- \u{1F7E2} Low: minor details, uncertain observations
|
|
1692
|
+
- \u2705 Completed: concrete task finished, question answered, issue resolved, goal achieved, or subtask completed in a way that helps the assistant know it is done
|
|
1639
1693
|
|
|
1640
1694
|
Group related observations (like tool sequences) by indenting:
|
|
1641
1695
|
* \u{1F534} (14:33) Agent debugging auth issue
|
|
1642
1696
|
* -> ran git status, found 3 modified files
|
|
1643
1697
|
* -> viewed auth.ts:45-60, found missing null check
|
|
1644
1698
|
* -> applied fix, tests now pass
|
|
1699
|
+
* \u2705 Tests passing, auth issue resolved
|
|
1645
1700
|
|
|
1646
1701
|
Group observations by date, then list each with 24-hour time.
|
|
1647
1702
|
|
|
@@ -1668,7 +1723,8 @@ Hint for the agent's immediate next message. Examples:
|
|
|
1668
1723
|
- "I've updated the navigation model. Let me walk you through the changes..."
|
|
1669
1724
|
- "The assistant should wait for the user to respond before continuing."
|
|
1670
1725
|
- Call the view tool on src/example.ts to continue debugging.
|
|
1671
|
-
</suggested-response
|
|
1726
|
+
</suggested-response>${threadTitleSection}`;
|
|
1727
|
+
}
|
|
1672
1728
|
var OBSERVER_GUIDELINES = `- Be specific enough for the assistant to act on
|
|
1673
1729
|
- Good: "User prefers short, direct answers without lengthy explanations"
|
|
1674
1730
|
- Bad: "User stated a preference" (too vague)
|
|
@@ -1678,12 +1734,21 @@ var OBSERVER_GUIDELINES = `- Be specific enough for the assistant to act on
|
|
|
1678
1734
|
- If the agent calls tools, observe what was called, why, and what was learned
|
|
1679
1735
|
- When observing files with line numbers, include the line number if useful
|
|
1680
1736
|
- If the agent provides a detailed response, observe the contents so it could be repeated
|
|
1681
|
-
- Make sure you start each observation with a priority emoji (\u{1F534}, \u{1F7E1}, \u{1F7E2})
|
|
1682
|
-
-
|
|
1737
|
+
- Make sure you start each observation with a priority emoji (\u{1F534}, \u{1F7E1}, \u{1F7E2}) or a completion marker (\u2705)
|
|
1738
|
+
- Capture the user's words closely \u2014 short/medium messages near-verbatim, long messages summarized with key quotes. User confirmations or explicit resolved outcomes should be \u2705 when they clearly signal something is done; unresolved or critical user facts remain \u{1F534}
|
|
1739
|
+
- Treat \u2705 as a memory signal that tells the assistant something is finished and should not be repeated unless new information changes it
|
|
1740
|
+
- Make completion observations answer "What exactly is now done?"
|
|
1741
|
+
- Prefer concrete resolved outcomes over meta-level workflow or bookkeeping updates
|
|
1742
|
+
- When multiple concrete things were completed, capture the concrete completed work rather than collapsing it into a vague progress summary
|
|
1683
1743
|
- Observe WHAT the agent did and WHAT it means
|
|
1684
1744
|
- If the user provides detailed messages or code snippets, observe all important details`;
|
|
1685
|
-
function buildObserverSystemPrompt(multiThread = false, instruction) {
|
|
1686
|
-
const outputFormat =
|
|
1745
|
+
function buildObserverSystemPrompt(multiThread = false, instruction, includeThreadTitle = false) {
|
|
1746
|
+
const outputFormat = buildObserverOutputFormat(includeThreadTitle);
|
|
1747
|
+
const multiThreadTitleInstruction = includeThreadTitle ? ` Each thread's observations, current-task, suggested-response, and thread-title should be nested inside a <thread id="..."> block within <observations>.` : ` Each thread's observations, current-task, and suggested-response should be nested inside a <thread id="..."> block within <observations>.`;
|
|
1748
|
+
const multiThreadTitleExample = includeThreadTitle ? `
|
|
1749
|
+
<thread-title>Feature X implementation</thread-title>` : "";
|
|
1750
|
+
const multiThreadSecondTitleExample = includeThreadTitle ? `
|
|
1751
|
+
<thread-title>Deployment setup</thread-title>` : "";
|
|
1687
1752
|
if (multiThread) {
|
|
1688
1753
|
return `You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user.
|
|
1689
1754
|
|
|
@@ -1698,7 +1763,13 @@ Process each thread separately and output observations for each thread.
|
|
|
1698
1763
|
|
|
1699
1764
|
=== OUTPUT FORMAT ===
|
|
1700
1765
|
|
|
1701
|
-
Your output MUST use XML tags to structure the response
|
|
1766
|
+
Your output MUST use XML tags to structure the response.${multiThreadTitleInstruction}
|
|
1767
|
+
|
|
1768
|
+
Use this observation format inside each thread block:
|
|
1769
|
+
|
|
1770
|
+
${outputFormat}
|
|
1771
|
+
|
|
1772
|
+
For multi-thread output, wrap each thread's observations like this:
|
|
1702
1773
|
|
|
1703
1774
|
<observations>
|
|
1704
1775
|
<thread id="thread_id_1">
|
|
@@ -1712,7 +1783,7 @@ What the agent is currently working on in this thread
|
|
|
1712
1783
|
|
|
1713
1784
|
<suggested-response>
|
|
1714
1785
|
Hint for the agent's next message in this thread
|
|
1715
|
-
</suggested-response
|
|
1786
|
+
</suggested-response>${multiThreadTitleExample}
|
|
1716
1787
|
</thread>
|
|
1717
1788
|
|
|
1718
1789
|
<thread id="thread_id_2">
|
|
@@ -1725,15 +1796,10 @@ Current task for this thread
|
|
|
1725
1796
|
|
|
1726
1797
|
<suggested-response>
|
|
1727
1798
|
Suggested response for this thread
|
|
1728
|
-
</suggested-response
|
|
1799
|
+
</suggested-response>${multiThreadSecondTitleExample}
|
|
1729
1800
|
</thread>
|
|
1730
1801
|
</observations>
|
|
1731
1802
|
|
|
1732
|
-
Use priority levels:
|
|
1733
|
-
- \u{1F534} High: explicit user facts, preferences, goals achieved, critical context, user messages
|
|
1734
|
-
- \u{1F7E1} Medium: project details, learned information, tool results
|
|
1735
|
-
- \u{1F7E2} Low: minor details, uncertain observations
|
|
1736
|
-
|
|
1737
1803
|
=== GUIDELINES ===
|
|
1738
1804
|
|
|
1739
1805
|
${OBSERVER_GUIDELINES}
|
|
@@ -2013,7 +2079,7 @@ The following messages are from ${threadOrder.length} different conversation thr
|
|
|
2013
2079
|
content
|
|
2014
2080
|
};
|
|
2015
2081
|
}
|
|
2016
|
-
function buildMultiThreadObserverTaskPrompt(existingObservations, threadOrder, priorMetadataByThread, wasTruncated) {
|
|
2082
|
+
function buildMultiThreadObserverTaskPrompt(existingObservations, threadOrder, priorMetadataByThread, wasTruncated, includeThreadTitle) {
|
|
2017
2083
|
let prompt = "";
|
|
2018
2084
|
if (existingObservations) {
|
|
2019
2085
|
prompt += `## Previous Observations
|
|
@@ -2028,7 +2094,8 @@ ${existingObservations}
|
|
|
2028
2094
|
const hasTruncatedObservations = wasTruncated ?? false;
|
|
2029
2095
|
const threadMetadataLines = threadOrder?.map((threadId) => {
|
|
2030
2096
|
const metadata = priorMetadataByThread?.get(threadId);
|
|
2031
|
-
|
|
2097
|
+
const hasRelevantMetadata = metadata?.currentTask || metadata?.suggestedResponse || includeThreadTitle && metadata?.threadTitle;
|
|
2098
|
+
if (!hasRelevantMetadata) {
|
|
2032
2099
|
return "";
|
|
2033
2100
|
}
|
|
2034
2101
|
const lines = [`- thread ${threadId}`];
|
|
@@ -2038,6 +2105,9 @@ ${existingObservations}
|
|
|
2038
2105
|
if (metadata.suggestedResponse) {
|
|
2039
2106
|
lines.push(` - prior suggested-response: ${metadata.suggestedResponse}`);
|
|
2040
2107
|
}
|
|
2108
|
+
if (includeThreadTitle && metadata.threadTitle) {
|
|
2109
|
+
lines.push(` - prior thread-title: ${metadata.threadTitle}`);
|
|
2110
|
+
}
|
|
2041
2111
|
return lines.join("\n");
|
|
2042
2112
|
}).filter(Boolean).join("\n");
|
|
2043
2113
|
if (threadMetadataLines) {
|
|
@@ -2052,7 +2122,8 @@ ${threadMetadataLines}
|
|
|
2052
2122
|
prompt += `The main agent still has full memory context outside this observer window.
|
|
2053
2123
|
`;
|
|
2054
2124
|
}
|
|
2055
|
-
|
|
2125
|
+
const titleHint = includeThreadTitle ? ", and thread-title" : "";
|
|
2126
|
+
prompt += `Use each thread's prior current-task, suggested-response${titleHint} as continuity hints, then update them based on that thread's new messages.
|
|
2056
2127
|
|
|
2057
2128
|
---
|
|
2058
2129
|
|
|
@@ -2061,7 +2132,8 @@ ${threadMetadataLines}
|
|
|
2061
2132
|
prompt += `## Your Task
|
|
2062
2133
|
|
|
2063
2134
|
`;
|
|
2064
|
-
|
|
2135
|
+
const titleInstruction = includeThreadTitle ? ", and thread-title" : "";
|
|
2136
|
+
prompt += `Extract new observations from each thread. Output your observations grouped by thread using <thread id="..."> tags inside your <observations> block. Each thread block should contain that thread's observations, current-task, suggested-response${titleInstruction}.
|
|
2065
2137
|
|
|
2066
2138
|
`;
|
|
2067
2139
|
prompt += `Example output format:
|
|
@@ -2077,6 +2149,8 @@ ${threadMetadataLines}
|
|
|
2077
2149
|
prompt += `<current-task>Working on feature X</current-task>
|
|
2078
2150
|
`;
|
|
2079
2151
|
prompt += `<suggested-response>Continue with the implementation</suggested-response>
|
|
2152
|
+
`;
|
|
2153
|
+
if (includeThreadTitle) prompt += `<thread-title>Feature X implementation</thread-title>
|
|
2080
2154
|
`;
|
|
2081
2155
|
prompt += `</thread>
|
|
2082
2156
|
`;
|
|
@@ -2089,6 +2163,8 @@ ${threadMetadataLines}
|
|
|
2089
2163
|
prompt += `<current-task>Discussing deployment options</current-task>
|
|
2090
2164
|
`;
|
|
2091
2165
|
prompt += `<suggested-response>Explain the deployment process</suggested-response>
|
|
2166
|
+
`;
|
|
2167
|
+
if (includeThreadTitle) prompt += `<thread-title>Deployment setup</thread-title>
|
|
2092
2168
|
`;
|
|
2093
2169
|
prompt += `</thread>
|
|
2094
2170
|
`;
|
|
@@ -2121,11 +2197,18 @@ function parseMultiThreadObserverOutput(output) {
|
|
|
2121
2197
|
suggestedContinuation = suggestedMatch[1].trim();
|
|
2122
2198
|
observations = observations.replace(/<suggested-response>[\s\S]*?<\/suggested-response>/i, "");
|
|
2123
2199
|
}
|
|
2200
|
+
let threadTitle;
|
|
2201
|
+
const threadTitleMatch = threadContent.match(/<thread-title>([\s\S]*?)<\/thread-title>/i);
|
|
2202
|
+
if (threadTitleMatch?.[1]) {
|
|
2203
|
+
threadTitle = threadTitleMatch[1].trim();
|
|
2204
|
+
observations = observations.replace(/<thread-title>[\s\S]*?<\/thread-title>/i, "");
|
|
2205
|
+
}
|
|
2124
2206
|
observations = sanitizeObservationLines(observations.trim());
|
|
2125
2207
|
threads.set(threadId, {
|
|
2126
2208
|
observations,
|
|
2127
2209
|
currentTask,
|
|
2128
2210
|
suggestedContinuation,
|
|
2211
|
+
threadTitle,
|
|
2129
2212
|
rawOutput: threadContent
|
|
2130
2213
|
});
|
|
2131
2214
|
}
|
|
@@ -2154,6 +2237,9 @@ ${existingObservations}
|
|
|
2154
2237
|
if (options?.priorSuggestedResponse) {
|
|
2155
2238
|
priorMetadataLines.push(`- prior suggested-response: ${options.priorSuggestedResponse}`);
|
|
2156
2239
|
}
|
|
2240
|
+
if (options?.includeThreadTitle && options?.priorThreadTitle) {
|
|
2241
|
+
priorMetadataLines.push(`- prior thread-title: ${options.priorThreadTitle}`);
|
|
2242
|
+
}
|
|
2157
2243
|
if (priorMetadataLines.length > 0) {
|
|
2158
2244
|
prompt += `## Prior Thread Metadata
|
|
2159
2245
|
|
|
@@ -2166,7 +2252,8 @@ ${priorMetadataLines.join("\n")}
|
|
|
2166
2252
|
prompt += `The main agent still has full memory context outside this observer window.
|
|
2167
2253
|
`;
|
|
2168
2254
|
}
|
|
2169
|
-
|
|
2255
|
+
const titleHint = options?.includeThreadTitle ? ", and thread-title" : "";
|
|
2256
|
+
prompt += `Use the prior current-task, suggested-response${titleHint} as continuity hints, then update them based on the new messages.
|
|
2170
2257
|
|
|
2171
2258
|
---
|
|
2172
2259
|
|
|
@@ -2176,10 +2263,15 @@ ${priorMetadataLines.join("\n")}
|
|
|
2176
2263
|
|
|
2177
2264
|
`;
|
|
2178
2265
|
prompt += `Extract new observations from the message history above. Do not repeat observations that are already in the previous observations. Add your new observations in the format specified in your instructions.`;
|
|
2266
|
+
if (options?.includeThreadTitle) {
|
|
2267
|
+
prompt += `
|
|
2268
|
+
|
|
2269
|
+
Also output a <thread-title> \u2014 a short noun-phrase label for this conversation (2-5 words). Write it like a file name or PR title: "Auth bug fix", "Memory config refactor", "RAG pipeline setup". Avoid verbs/sentences ("Fixing the auth bug"), filler ("Working on stuff"), and generic labels ("Code review"). Only change it from the prior title if the topic meaningfully shifted.`;
|
|
2270
|
+
}
|
|
2179
2271
|
if (options?.skipContinuationHints) {
|
|
2180
2272
|
prompt += `
|
|
2181
2273
|
|
|
2182
|
-
IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations
|
|
2274
|
+
IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations>${options?.includeThreadTitle ? " and <thread-title>" : ""}.`;
|
|
2183
2275
|
}
|
|
2184
2276
|
return prompt;
|
|
2185
2277
|
}
|
|
@@ -2207,6 +2299,7 @@ function parseObserverOutput(output) {
|
|
|
2207
2299
|
observations,
|
|
2208
2300
|
currentTask: parsed.currentTask || void 0,
|
|
2209
2301
|
suggestedContinuation: parsed.suggestedResponse || void 0,
|
|
2302
|
+
threadTitle: parsed.threadTitle || void 0,
|
|
2210
2303
|
rawOutput: output
|
|
2211
2304
|
};
|
|
2212
2305
|
}
|
|
@@ -2214,7 +2307,8 @@ function parseMemorySectionXml(content) {
|
|
|
2214
2307
|
const result = {
|
|
2215
2308
|
observations: "",
|
|
2216
2309
|
currentTask: "",
|
|
2217
|
-
suggestedResponse: ""
|
|
2310
|
+
suggestedResponse: "",
|
|
2311
|
+
threadTitle: ""
|
|
2218
2312
|
};
|
|
2219
2313
|
const observationsRegex = /^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/gim;
|
|
2220
2314
|
const observationsMatches = [...content.matchAll(observationsRegex)];
|
|
@@ -2231,6 +2325,10 @@ function parseMemorySectionXml(content) {
|
|
|
2231
2325
|
if (suggestedResponseMatch?.[1]) {
|
|
2232
2326
|
result.suggestedResponse = suggestedResponseMatch[1].trim();
|
|
2233
2327
|
}
|
|
2328
|
+
const threadTitleMatch = content.match(/^[ \t]*<thread-title>([\s\S]*?)<\/thread-title>/im);
|
|
2329
|
+
if (threadTitleMatch?.[1]) {
|
|
2330
|
+
result.threadTitle = threadTitleMatch[1].trim();
|
|
2331
|
+
}
|
|
2234
2332
|
return result;
|
|
2235
2333
|
}
|
|
2236
2334
|
function extractListItemsOnly(content) {
|
|
@@ -2364,6 +2462,8 @@ When consolidating observations:
|
|
|
2364
2462
|
- Preserve and include dates/times when present (temporal context is critical)
|
|
2365
2463
|
- Retain the most relevant timestamps (start times, completion times, significant events)
|
|
2366
2464
|
- Combine related items where it makes sense (e.g., "agent called view tool 5 times on file x")
|
|
2465
|
+
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
|
|
2466
|
+
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
|
|
2367
2467
|
- Condense older observations more aggressively, retain more detail for recent ones
|
|
2368
2468
|
|
|
2369
2469
|
CRITICAL: USER ASSERTIONS vs QUESTIONS
|
|
@@ -2444,6 +2544,8 @@ Please re-process with slightly more compression:
|
|
|
2444
2544
|
- Closer to the end, retain more fine details (recent context matters more)
|
|
2445
2545
|
- Memory is getting long - use a more condensed style throughout
|
|
2446
2546
|
- Combine related items more aggressively but do not lose important specific details of names, places, events, and people
|
|
2547
|
+
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
|
|
2548
|
+
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
|
|
2447
2549
|
- For example if there is a long nested observation list about repeated tool calls, you can combine those into a single line and observe that the tool was called multiple times for x reason, and finally y outcome happened.
|
|
2448
2550
|
|
|
2449
2551
|
Your current detail level was a 10/10, lets aim for a 8/10 detail level.
|
|
@@ -2458,6 +2560,8 @@ Please re-process with much more aggressive compression:
|
|
|
2458
2560
|
- Closer to the end, retain fine details (recent context matters more)
|
|
2459
2561
|
- Memory is getting very long - use a significantly more condensed style throughout
|
|
2460
2562
|
- Combine related items aggressively but do not lose important specific details of names, places, events, and people
|
|
2563
|
+
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
|
|
2564
|
+
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
|
|
2461
2565
|
- For example if there is a long nested observation list about repeated tool calls, you can combine those into a single line and observe that the tool was called multiple times for x reason, and finally y outcome happened.
|
|
2462
2566
|
- Remove redundant information and merge overlapping observations
|
|
2463
2567
|
|
|
@@ -2474,6 +2578,8 @@ Please re-process with maximum compression:
|
|
|
2474
2578
|
- Ruthlessly merge related observations \u2014 if 10 observations are about the same topic, combine into 1-2 lines
|
|
2475
2579
|
- Drop procedural details (tool calls, retries, intermediate steps) \u2014 keep only final outcomes
|
|
2476
2580
|
- Drop observations that are no longer relevant or have been superseded by newer information
|
|
2581
|
+
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
|
|
2582
|
+
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
|
|
2477
2583
|
- Preserve: names, dates, decisions, errors, user preferences, and architectural choices
|
|
2478
2584
|
|
|
2479
2585
|
Your current detail level was a 10/10, lets aim for a 4/10 detail level.
|
|
@@ -3070,7 +3176,7 @@ async function resolveImageDimensionsAsync(part) {
|
|
|
3070
3176
|
return existing;
|
|
3071
3177
|
}
|
|
3072
3178
|
try {
|
|
3073
|
-
const mod = await import('./probe-image-size-
|
|
3179
|
+
const mod = await import('./probe-image-size-M5NYSF5D.js');
|
|
3074
3180
|
const probeImageSize = mod.default;
|
|
3075
3181
|
const probed = await probeImageSize(url, {
|
|
3076
3182
|
open_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
|
|
@@ -4450,7 +4556,8 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
4450
4556
|
config.observation?.messageTokens ?? OBSERVATIONAL_MEMORY_DEFAULTS.observation.messageTokens
|
|
4451
4557
|
),
|
|
4452
4558
|
previousObserverTokens: config.observation?.previousObserverTokens ?? 2e3,
|
|
4453
|
-
instruction: config.observation?.instruction
|
|
4559
|
+
instruction: config.observation?.instruction,
|
|
4560
|
+
threadTitle: config.observation?.threadTitle ?? false
|
|
4454
4561
|
};
|
|
4455
4562
|
this.reflectionConfig = {
|
|
4456
4563
|
model: reflectionModel,
|
|
@@ -4676,7 +4783,11 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
4676
4783
|
*/
|
|
4677
4784
|
getObserverAgent() {
|
|
4678
4785
|
if (!this.observerAgent) {
|
|
4679
|
-
const systemPrompt = buildObserverSystemPrompt(
|
|
4786
|
+
const systemPrompt = buildObserverSystemPrompt(
|
|
4787
|
+
false,
|
|
4788
|
+
this.observationConfig.instruction,
|
|
4789
|
+
this.observationConfig.threadTitle
|
|
4790
|
+
);
|
|
4680
4791
|
this.observerAgent = new Agent({
|
|
4681
4792
|
id: "observational-memory-observer",
|
|
4682
4793
|
name: "Observer",
|
|
@@ -5098,7 +5209,7 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5098
5209
|
const isImportant = new Array(totalCount);
|
|
5099
5210
|
for (let i = 0; i < totalCount; i++) {
|
|
5100
5211
|
lineTokens[i] = this.tokenCounter.countString(lines[i]);
|
|
5101
|
-
isImportant[i] = lines[i].includes("\u{1F534}");
|
|
5212
|
+
isImportant[i] = lines[i].includes("\u{1F534}") || lines[i].includes("\u2705");
|
|
5102
5213
|
}
|
|
5103
5214
|
const suffixTokens = new Array(totalCount + 1);
|
|
5104
5215
|
suffixTokens[totalCount] = 0;
|
|
@@ -5184,7 +5295,9 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5184
5295
|
skipContinuationHints: options?.skipContinuationHints,
|
|
5185
5296
|
priorCurrentTask: options?.priorCurrentTask,
|
|
5186
5297
|
priorSuggestedResponse: options?.priorSuggestedResponse,
|
|
5187
|
-
|
|
5298
|
+
priorThreadTitle: options?.priorThreadTitle,
|
|
5299
|
+
wasTruncated: options?.wasTruncated,
|
|
5300
|
+
includeThreadTitle: this.observationConfig.threadTitle
|
|
5188
5301
|
})
|
|
5189
5302
|
},
|
|
5190
5303
|
buildObserverHistoryMessage(messagesToObserve)
|
|
@@ -5219,6 +5332,7 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5219
5332
|
observations: parsed.observations,
|
|
5220
5333
|
currentTask: parsed.currentTask,
|
|
5221
5334
|
suggestedContinuation: parsed.suggestedContinuation,
|
|
5335
|
+
threadTitle: parsed.threadTitle,
|
|
5222
5336
|
usage: usage ? {
|
|
5223
5337
|
inputTokens: usage.inputTokens,
|
|
5224
5338
|
outputTokens: usage.outputTokens,
|
|
@@ -5233,7 +5347,11 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5233
5347
|
* plus the total usage for the batch.
|
|
5234
5348
|
*/
|
|
5235
5349
|
async callMultiThreadObserver(existingObservations, messagesByThread, threadOrder, priorMetadataByThread, abortSignal, requestContext, wasTruncated) {
|
|
5236
|
-
const systemPrompt = buildObserverSystemPrompt(
|
|
5350
|
+
const systemPrompt = buildObserverSystemPrompt(
|
|
5351
|
+
true,
|
|
5352
|
+
this.observationConfig.instruction,
|
|
5353
|
+
this.observationConfig.threadTitle
|
|
5354
|
+
);
|
|
5237
5355
|
const agent = new Agent({
|
|
5238
5356
|
id: "multi-thread-observer",
|
|
5239
5357
|
name: "multi-thread-observer",
|
|
@@ -5247,7 +5365,8 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5247
5365
|
existingObservations,
|
|
5248
5366
|
threadOrder,
|
|
5249
5367
|
priorMetadataByThread,
|
|
5250
|
-
wasTruncated
|
|
5368
|
+
wasTruncated,
|
|
5369
|
+
this.observationConfig.threadTitle
|
|
5251
5370
|
)
|
|
5252
5371
|
},
|
|
5253
5372
|
buildMultiThreadObserverHistoryMessage(messagesByThread, threadOrder)
|
|
@@ -5289,7 +5408,8 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
5289
5408
|
results.set(threadId, {
|
|
5290
5409
|
observations: threadResult.observations,
|
|
5291
5410
|
currentTask: threadResult.currentTask,
|
|
5292
|
-
suggestedContinuation: threadResult.suggestedContinuation
|
|
5411
|
+
suggestedContinuation: threadResult.suggestedContinuation,
|
|
5412
|
+
threadTitle: threadResult.threadTitle
|
|
5293
5413
|
});
|
|
5294
5414
|
}
|
|
5295
5415
|
for (const threadId of threadOrder) {
|
|
@@ -6732,6 +6852,7 @@ ${threadClose}`;
|
|
|
6732
6852
|
requestContext,
|
|
6733
6853
|
priorCurrentTask: threadOMMetadata?.currentTask,
|
|
6734
6854
|
priorSuggestedResponse: threadOMMetadata?.suggestedResponse,
|
|
6855
|
+
priorThreadTitle: thread?.title,
|
|
6735
6856
|
wasTruncated
|
|
6736
6857
|
});
|
|
6737
6858
|
const lastObservedAt = this.getMaxMessageTimestamp(messagesToObserve);
|
|
@@ -6762,10 +6883,31 @@ ${threadClose}`;
|
|
|
6762
6883
|
});
|
|
6763
6884
|
await this.storage.updateThread({
|
|
6764
6885
|
id: threadId,
|
|
6765
|
-
title: threadForMetadata.title
|
|
6886
|
+
title: threadForMetadata.title || "",
|
|
6766
6887
|
metadata: newMetadata
|
|
6767
6888
|
});
|
|
6768
6889
|
}
|
|
6890
|
+
if (this.observationConfig.threadTitle && threadForMetadata && result.threadTitle) {
|
|
6891
|
+
const oldTitle = threadForMetadata.title;
|
|
6892
|
+
const newTitle = result.threadTitle;
|
|
6893
|
+
if (newTitle.trim().length >= 3 && newTitle !== oldTitle) {
|
|
6894
|
+
await this.storage.updateThread({
|
|
6895
|
+
id: threadId,
|
|
6896
|
+
title: newTitle,
|
|
6897
|
+
metadata: threadForMetadata.metadata ?? {}
|
|
6898
|
+
});
|
|
6899
|
+
if (writer) {
|
|
6900
|
+
const threadUpdateMarker = createThreadUpdateMarker({
|
|
6901
|
+
cycleId,
|
|
6902
|
+
threadId,
|
|
6903
|
+
oldTitle: oldTitle ?? void 0,
|
|
6904
|
+
newTitle
|
|
6905
|
+
});
|
|
6906
|
+
await writer.custom(threadUpdateMarker).catch(() => {
|
|
6907
|
+
});
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
}
|
|
6769
6911
|
await this.storage.updateActiveObservations({
|
|
6770
6912
|
id: record.id,
|
|
6771
6913
|
observations: newObservations,
|
|
@@ -7009,6 +7151,7 @@ ${threadClose}`;
|
|
|
7009
7151
|
requestContext,
|
|
7010
7152
|
priorCurrentTask: threadOMMetadata?.currentTask,
|
|
7011
7153
|
priorSuggestedResponse: threadOMMetadata?.suggestedResponse,
|
|
7154
|
+
priorThreadTitle: thread?.title,
|
|
7012
7155
|
wasTruncated
|
|
7013
7156
|
}
|
|
7014
7157
|
);
|
|
@@ -7016,6 +7159,22 @@ ${threadClose}`;
|
|
|
7016
7159
|
omDebug(`[OM:doAsyncBufferedObservation] empty observations returned, skipping buffer storage`);
|
|
7017
7160
|
return;
|
|
7018
7161
|
}
|
|
7162
|
+
if (this.observationConfig.threadTitle && result.threadTitle) {
|
|
7163
|
+
const newTitle = result.threadTitle;
|
|
7164
|
+
if (newTitle.length >= 3 && newTitle !== thread?.title) {
|
|
7165
|
+
await this.storage.updateThread({ id: threadId, title: newTitle, metadata: thread?.metadata ?? {} });
|
|
7166
|
+
if (writer) {
|
|
7167
|
+
const marker = createThreadUpdateMarker({
|
|
7168
|
+
cycleId,
|
|
7169
|
+
threadId,
|
|
7170
|
+
oldTitle: thread?.title,
|
|
7171
|
+
newTitle
|
|
7172
|
+
});
|
|
7173
|
+
void writer.custom(marker).catch(() => {
|
|
7174
|
+
});
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
7177
|
+
}
|
|
7019
7178
|
let newObservations;
|
|
7020
7179
|
if (this.scope === "resource") {
|
|
7021
7180
|
newObservations = await this.wrapWithThreadTag(threadId, result.observations);
|
|
@@ -7439,7 +7598,8 @@ ${unreflectedContent}` : freshRecord.bufferedReflection;
|
|
|
7439
7598
|
threadMetadataMap.set(thread.id, {
|
|
7440
7599
|
lastObservedAt: omMetadata?.lastObservedAt,
|
|
7441
7600
|
currentTask: omMetadata?.currentTask,
|
|
7442
|
-
suggestedResponse: omMetadata?.suggestedResponse
|
|
7601
|
+
suggestedResponse: omMetadata?.suggestedResponse,
|
|
7602
|
+
threadTitle: thread.title
|
|
7443
7603
|
});
|
|
7444
7604
|
}
|
|
7445
7605
|
const messagesByThread = /* @__PURE__ */ new Map();
|
|
@@ -7592,10 +7752,11 @@ ${unreflectedContent}` : freshRecord.bufferedReflection;
|
|
|
7592
7752
|
const batchPriorMetadata = /* @__PURE__ */ new Map();
|
|
7593
7753
|
for (const threadId of batch.threadIds) {
|
|
7594
7754
|
const metadata = threadMetadataMap.get(threadId);
|
|
7595
|
-
if (metadata?.currentTask || metadata?.suggestedResponse) {
|
|
7755
|
+
if (metadata?.currentTask || metadata?.suggestedResponse || metadata?.threadTitle) {
|
|
7596
7756
|
batchPriorMetadata.set(threadId, {
|
|
7597
7757
|
currentTask: metadata.currentTask,
|
|
7598
|
-
suggestedResponse: metadata.suggestedResponse
|
|
7758
|
+
suggestedResponse: metadata.suggestedResponse,
|
|
7759
|
+
threadTitle: metadata.threadTitle
|
|
7599
7760
|
});
|
|
7600
7761
|
}
|
|
7601
7762
|
}
|
|
@@ -7653,6 +7814,13 @@ ${unreflectedContent}` : freshRecord.bufferedReflection;
|
|
|
7653
7814
|
);
|
|
7654
7815
|
const thread = await this.storage.getThreadById({ threadId });
|
|
7655
7816
|
if (thread) {
|
|
7817
|
+
let titleForUpdate = thread.title ?? "";
|
|
7818
|
+
if (this.observationConfig.threadTitle && result.threadTitle) {
|
|
7819
|
+
const newTitle = result.threadTitle.trim();
|
|
7820
|
+
if (newTitle.length >= 3 && newTitle !== thread.title) {
|
|
7821
|
+
titleForUpdate = newTitle;
|
|
7822
|
+
}
|
|
7823
|
+
}
|
|
7656
7824
|
const newMetadata = setThreadOMMetadata(thread.metadata, {
|
|
7657
7825
|
lastObservedAt: threadLastObservedAt.toISOString(),
|
|
7658
7826
|
suggestedResponse: result.suggestedContinuation,
|
|
@@ -7661,7 +7829,7 @@ ${unreflectedContent}` : freshRecord.bufferedReflection;
|
|
|
7661
7829
|
});
|
|
7662
7830
|
await this.storage.updateThread({
|
|
7663
7831
|
id: threadId,
|
|
7664
|
-
title:
|
|
7832
|
+
title: titleForUpdate,
|
|
7665
7833
|
metadata: newMetadata
|
|
7666
7834
|
});
|
|
7667
7835
|
}
|
|
@@ -8118,5 +8286,5 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
8118
8286
|
}
|
|
8119
8287
|
|
|
8120
8288
|
export { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, e, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, optimizeObservationsForContext, parseObserverOutput };
|
|
8121
|
-
//# sourceMappingURL=chunk-
|
|
8122
|
-
//# sourceMappingURL=chunk-
|
|
8289
|
+
//# sourceMappingURL=chunk-HPJ2CRVK.js.map
|
|
8290
|
+
//# sourceMappingURL=chunk-HPJ2CRVK.js.map
|