diff --git a/apps/ai/src/platform/genai-spans.ts b/apps/ai/src/platform/genai-spans.ts index d4e8bd923c..39c3a01865 100644 --- a/apps/ai/src/platform/genai-spans.ts +++ b/apps/ai/src/platform/genai-spans.ts @@ -2,7 +2,7 @@ * Gen-AI semconv content for Maple's own agents: the model call, the tool call and the agent pass. * * Effect AI's providers annotate the model-call span with the requested and served model, the - * response id, the finish reasons and two token totals. Everything else the convention defines — + * response id, the finish reasons, the output type and two token totals. Everything else the convention defines — * the provider name, the messages, the system instructions, the tool definitions, the cache and * reasoning buckets, the cost the provider billed, time to first chunk — is added here. Agent * Sessions reads all of it off the spans, and without it an investigation renders as a list of @@ -272,7 +272,7 @@ interface CallTiming { const modelCallTransformer = (telemetry: ModelCallTelemetry, timing: CallTiming): Telemetry.SpanTransformer => - ({ span, prompt, responseFormat, response }) => { + ({ span, prompt, response }) => { // Read before the serialization below, which is this side's work and not the model's. const endedMs = timing.now() const input = messagesJson(inputMessages(prompt), INPUT_MESSAGES_BUDGET) @@ -290,7 +290,6 @@ const modelCallTransformer = ...(telemetry.reasoningLevel === undefined ? undefined : { "gen_ai.request.reasoning.level": telemetry.reasoningLevel }), - "gen_ai.output.type": responseFormat.type, "gen_ai.input.messages": input.json, ...(input.dropped > 0 ? { [MAPLE_GENAI_INPUT_MESSAGES_DROPPED_ATTR]: input.dropped } : undefined), ...(system === undefined ? undefined : { "gen_ai.system_instructions": system }), diff --git a/apps/ios/Packages/MapleAPI/Sources/MapleAPI/openapi.json b/apps/ios/Packages/MapleAPI/Sources/MapleAPI/openapi.json index d51844013e..153e120a84 100644 --- a/apps/ios/Packages/MapleAPI/Sources/MapleAPI/openapi.json +++ b/apps/ios/Packages/MapleAPI/Sources/MapleAPI/openapi.json @@ -176,6 +176,7 @@ "properties": { "attempt_number": { "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "attempted_at": { @@ -549,6 +550,7 @@ 2 ], "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "consecutive_healthy_required": { @@ -557,6 +559,7 @@ 3 ], "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "created_at": { @@ -628,6 +631,7 @@ "examples": [ 50 ], + "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, @@ -676,6 +680,7 @@ 60 ], "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "service_names": { @@ -2490,6 +2495,7 @@ "properties": { "bucket_seconds": { "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "end_time": { @@ -2825,6 +2831,7 @@ }, "bucket_seconds": { "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "end_time": { @@ -2902,6 +2909,7 @@ }, "bucket_seconds": { "exclusiveMinimum": 0, + "maximum": 9007199254740991, "type": "integer" }, "end_time": { diff --git a/bun.lock b/bun.lock index 7b8335e4fe..46f80b401c 100644 --- a/bun.lock +++ b/bun.lock @@ -718,8 +718,8 @@ "packages/db": { "name": "@maple/db", "dependencies": { - "@effect/sql-pg": "4.0.1", - "@effect/sql-pglite": "4.0.1", + "@effect/sql-pg": "4.0.4", + "@effect/sql-pglite": "4.0.4", "@electric-sql/pglite": "^0.5.8", "@maple-dev/effect-orm": "0.5.0", "@maple/domain": "workspace:*", @@ -949,14 +949,14 @@ }, }, "patchedDependencies": { - "@effect/vitest@4.0.1": "patches/@effect%2Fvitest@4.0.1.patch", - "@effect/ai-openrouter@4.0.1": "patches/@effect%2Fai-openrouter@4.0.1.patch", + "effect@4.0.4": "patches/effect@4.0.4.patch", "@cloudflare/workers-types@5.20261005.1": "patches/@cloudflare%2Fworkers-types@5.20261005.1.patch", - "effect@4.0.1": "patches/effect@4.0.1.patch", + "@effect/vitest@4.0.4": "patches/@effect%2Fvitest@4.0.4.patch", + "@effect/ai-openrouter@4.0.4": "patches/@effect%2Fai-openrouter@4.0.4.patch", }, "overrides": { - "@effect/sql-d1": "4.0.1", - "@effect/sql-sqlite-do": "4.0.1", + "@effect/sql-d1": "4.0.4", + "@effect/sql-sqlite-do": "4.0.4", "workerd": "1.20261002.1", }, "catalog": { @@ -975,14 +975,14 @@ "@tanstack/charts-scales": "1.0.0", }, "effect": { - "@effect/ai-openai-compat": "4.0.1", - "@effect/ai-openrouter": "4.0.1", - "@effect/atom-react": "4.0.1", - "@effect/language-service": "^0.87.3", - "@effect/platform-bun": "4.0.1", - "@effect/platform-node": "4.0.1", - "@effect/vitest": "4.0.1", - "effect": "4.0.1", + "@effect/ai-openai-compat": "4.0.4", + "@effect/ai-openrouter": "4.0.4", + "@effect/atom-react": "4.0.4", + "@effect/language-service": "^0.87.4", + "@effect/platform-bun": "4.0.4", + "@effect/platform-node": "4.0.4", + "@effect/vitest": "4.0.4", + "effect": "4.0.4", }, "react": { "@types/react": "^19.3.0", @@ -1266,27 +1266,27 @@ "@effect-router/core": ["@effect-router/core@workspace:lib/effect-router"], - "@effect/ai-openai-compat": ["@effect/ai-openai-compat@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1" } }, "sha512-PuFYB/Gd+2YB3zJAlivFUrvEHOg9p6DP93/c1kPH+IGqtBp8oVBS6qNWPWfEkD7+JX8qOWOlwwk5Mqe7X1jvQg=="], + "@effect/ai-openai-compat": ["@effect/ai-openai-compat@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4" } }, "sha512-7ujq5yF/9xSvPvUdxqcdMfrAb1c9IeN6JZtfU/MXrLVSpEKl0pSmFizd+v7fWeUQMWAp4q5Gah0TU5ErGsJkJQ=="], - "@effect/ai-openrouter": ["@effect/ai-openrouter@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1" } }, "sha512-l9vVp3ag8/N+OmPD/SP86MKuJrLxpZ5U2ItM6jPO/Al8njQZ4uEWRQZ72byVH7qumaWsN7cSd7wTCR8C9epBAw=="], + "@effect/ai-openrouter": ["@effect/ai-openrouter@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4" } }, "sha512-8xt2Y0VMZ8KMuflHR+S9jTVEq1TijIIF1wmexoh+6bNc6ggbAv3KnGbft0R/s0M72nMrD5xc183+7qS5nl7teA=="], - "@effect/atom-react": ["@effect/atom-react@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1", "react": ">=19.0.0 <20.0.0", "scheduler": ">=0.25.0 <0.28.0" } }, "sha512-V/vcbFCVY2AV7PvjhmOP37Cr4NofrtxBBGW6M1ckBIBxmpi3sMwdPTxj2obPNE4Ho3gkeEQzRC9zEIQ4BDNdQg=="], + "@effect/atom-react": ["@effect/atom-react@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4", "react": ">=19.0.0 <20.0.0", "scheduler": ">=0.25.0 <0.29.0" } }, "sha512-/cd4zHAS/j4QEAJahvIuvCjASI9iKPsKoYDJF1WdqBH6ol+7PIzV5jfIxyd5K0hTlLlavZnzEfi849pcS84apg=="], - "@effect/language-service": ["@effect/language-service@0.87.3", "", { "bin": { "effect-language-service": "cli.js" } }, "sha512-g1OmRBZF5chbW9QMNoirPo5Bb4zzU2HfP88tR7/VSZEUxHJ1/qVb8AQ0kUh2ggctLH1I715yCwP4gkw56PTjpQ=="], + "@effect/language-service": ["@effect/language-service@0.87.4", "", { "bin": { "effect-language-service": "cli.js" } }, "sha512-AfFn4K45l84LtbQSwoPWc06nrg7OzfV3uJOnIUqimSOWTCIsY1IKBXZfjSsVTq7jDuL9Jtoz8//bZp9+rkEihg=="], - "@effect/platform-bun": ["@effect/platform-bun@4.0.1", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.1" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-m+QR4bp39ZWujCuEsUhZADIYIOFZcUHHlmrixENZqZRbEYgaPLMUWiPrRJ69CM4BuuHW8oCOxfMGUU7oSw/o5g=="], + "@effect/platform-bun": ["@effect/platform-bun@4.0.4", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.4" }, "peerDependencies": { "effect": "^4.0.4" } }, "sha512-L5xA9sF2RET7rqi18Q8yUcWq301o+jBMm9GWJixmJWGwzeipzMqjjPk+10vE8vUiHPbtdtJaBSIgs0AJ2jEF1g=="], - "@effect/platform-node": ["@effect/platform-node@4.0.1", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.1", "undici": "^8.11.2" }, "peerDependencies": { "effect": "^4.0.1", "redis": ">=5.0.0 <7.0.0" } }, "sha512-FT0Fu5LO0/XP9zBpj0HqrtJNLluK4StNKqf6TSulUsjp8FPBsDVXGJiDuyoN5J2yVMT7tgvhxSwaDcObWVRIaQ=="], + "@effect/platform-node": ["@effect/platform-node@4.0.4", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.4", "undici": "^8.11.2" }, "peerDependencies": { "effect": "^4.0.4", "redis": ">=5.0.0 <7.0.0" } }, "sha512-SdoyQMrO5zmqBebb2fxDk0sHYyJjBiw4QmLdV2ZcWf3ATpQPge3B5sTLijZg49PadekOwNeO83o5TfdtiiFEig=="], - "@effect/platform-node-shared": ["@effect/platform-node-shared@4.0.1", "", { "dependencies": { "@types/ws": "^8.18.1", "ws": "^8.22.0" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-VanaejudEhKJ4mpmqnEzdncVUhN6sGSO9ZDND54mRxAlZxj+4dYAWjDTYAy9o4tJo9aALeP2U8cVcOFzEdSeLg=="], + "@effect/platform-node-shared": ["@effect/platform-node-shared@4.0.4", "", { "dependencies": { "@types/ws": "^8.18.2", "ws": "^8.22.0" }, "peerDependencies": { "effect": "^4.0.4" } }, "sha512-gh2KRmqGWrJ0FVL8GqnI1GpB+fCfCUI7sGiUZkxxBHyHj1t94rm6VDJffCfuVZWe6GpvYXtizifVczUrgOce8A=="], - "@effect/sql-d1": ["@effect/sql-d1@4.0.1", "", { "dependencies": { "@cloudflare/workers-types": "^5.20260926.1" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-//VXATQFso9/y9JFDIfxxctMEwDlZq6RdlKA+q8nXE1N3q24FdBM9NF8BaBHT1G2NY+CB0U0PjqUASgsmcOvXw=="], + "@effect/sql-d1": ["@effect/sql-d1@4.0.4", "", { "dependencies": { "@cloudflare/workers-types": "^5.20261010.1" }, "peerDependencies": { "effect": "^4.0.4" } }, "sha512-zE5zzv8RCg9DqsrR64N3PPG8+5gtV/IO/xQtJDjssrKbcfkQZqGXrOJ7veqmmoJ2G3dGJqpIa1u1njpzUDnjTA=="], - "@effect/sql-pg": ["@effect/sql-pg@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1" } }, "sha512-X5aqOxHNWqVXL+vyTQZLYDip65lm5rrZHuNkWyyr672iup1tjYAs5Dn9tHR5h1t0blpJ57j8Ng5G5AUQ8teIqA=="], + "@effect/sql-pg": ["@effect/sql-pg@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4" } }, "sha512-41x5O2C+gRF3A/Sf+IkV+OOzo5BexsIubH1cib3m4NwhZcjQUQUrq5YbOw7fIuWmBODtAyHNXFjaeEtiXoPL9Q=="], - "@effect/sql-pglite": ["@effect/sql-pglite@4.0.1", "", { "dependencies": { "@electric-sql/pglite": "^0.5.8" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-May68TQgqr5VrnBW0yCYqC46x1vw/jJPFfZVIyW+jnWcbVd2xpd3jBkiIhf5noWMRMXK6AK/dlAqFuZ2oG4Axw=="], + "@effect/sql-pglite": ["@effect/sql-pglite@4.0.4", "", { "dependencies": { "@electric-sql/pglite": "^0.5.8" }, "peerDependencies": { "effect": "^4.0.4" } }, "sha512-CgM2hfBQSDCFvka4lDvQleHDcg1QH3Xxic/2AC1rKU5ZSIFbIlQt386YdhaufwJpgSa9HYNRiY59ykENIIS3BA=="], - "@effect/sql-sqlite-do": ["@effect/sql-sqlite-do@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1" } }, "sha512-tS+qQok3xKsycnnhvIDX+6nvlM4Y2ouvru3voOzxtDQqX96NSOMX2xReLf4Feb6GN3jnzgEEtVGDDWk3YLrpsg=="], + "@effect/sql-sqlite-do": ["@effect/sql-sqlite-do@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4" } }, "sha512-6Uqa6zbm5GPTWjoIVVty8msQ5C+8coPQDzj8qZM9Mk4NXUWa/RVlaziW335mXZ/8tCnQsFj2iJ/CJdv54JXuew=="], "@effect/tsgo": ["@effect/tsgo@0.48.1", "", { "optionalDependencies": { "@effect/tsgo-darwin-arm64": "0.48.1", "@effect/tsgo-darwin-x64": "0.48.1", "@effect/tsgo-linux-arm": "0.48.1", "@effect/tsgo-linux-arm64": "0.48.1", "@effect/tsgo-linux-x64": "0.48.1", "@effect/tsgo-win32-arm64": "0.48.1", "@effect/tsgo-win32-x64": "0.48.1" }, "bin": { "effect-tsgo": "dist/effect-tsgo.cjs" } }, "sha512-yLgXNwPaUWfGxcQw7FwLYwOF7me69r+tY4oHYV5hwMFE16qClXbIRnotNPp8pZ5pnbeLgPeRvCE7AWGQyYqQ2A=="], @@ -1304,7 +1304,7 @@ "@effect/tsgo-win32-x64": ["@effect/tsgo-win32-x64@0.48.1", "", { "os": "win32", "cpu": "x64" }, "sha512-CDCaScEJ1gRwA8DRgRFn3Kh0mHPUCm1ln/gUwsRxC9qXJQdzqWEYzECa907b4Ts/dKW3uD4oFc47oKr+JQxYCg=="], - "@effect/vitest": ["@effect/vitest@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1", "vitest": ">=5.0.0 <6.0.0" } }, "sha512-DbY9kf/018zBxRIX7rJwBnPVPzSarnUpcshm0vfYPFiDkSa7AFrXTh2BlDNUbrdrmqcIOBhVZ7GkEtxf8WiQrg=="], + "@effect/vitest": ["@effect/vitest@4.0.4", "", { "peerDependencies": { "effect": "^4.0.4", "vitest": ">=5.0.0 <6.0.0" } }, "sha512-l5KN46RbDVpqZxWzwXZtX6FVQiyzd+/hTYqL543uSDRo7hC0m19IeICh6O9U/nqCtfersqsNZnBjgHFfkuHsBw=="], "@electric-sql/client": ["@electric-sql/client@1.5.28", "", { "dependencies": { "@microsoft/fetch-event-source": "^2.0.1" }, "optionalDependencies": { "@rollup/rollup-darwin-arm64": "^4.18.1" }, "bin": { "intent": "bin/intent.mjs" } }, "sha512-b0cym3YWXL6PbQmEF0xDRsLt2xgXX46stvOSRAIXRPAP6dLZIHZL0o0HxeTdsZ27L3PbIg6Pw6KnyanRVGtWPA=="], @@ -2306,7 +2306,7 @@ "@types/webxr": ["@types/webxr@0.5.24", "", {}, "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg=="], - "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@types/ws": ["@types/ws@8.18.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w=="], "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], @@ -2826,7 +2826,7 @@ "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "effect": ["effect@4.0.1", "", {}, "sha512-b1VlQG9g8fwxE5QnIZuPoOP/0MsqHJSRKxUijjoM80E5q95FXrX5yWtY5XI8G+GJsBQAVSDbLS458z9a++uVvw=="], + "effect": ["effect@4.0.4", "", {}, "sha512-Sr50OeVSC3M5UkoUYUhFf3EULryhGaZZUf6OzDHTvaznOw7HRlxOKdF3/4nvQXHL22StOyMG3Cvo8Bt7xUp+Ng=="], "electron-to-chromium": ["electron-to-chromium@1.5.439", "", {}, "sha512-qu6QIPXhsb+CRcAiTMNjR4A1y/7tCYKkKjr5CZXRVih6qkDf79peZ2BpEU3qoDBNCRrcy3Mra3X9nG5oruuA7Q=="], @@ -3756,7 +3756,7 @@ "sax": ["sax@1.6.1", "", {}, "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q=="], - "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], "scule": ["scule@1.3.0", "", {}, "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g=="], @@ -4140,6 +4140,8 @@ "@cspotcode/source-map-support/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], + "@effect/sql-d1/@cloudflare/workers-types": ["@cloudflare/workers-types@5.20261013.1", "", {}, "sha512-0SfkM/MA+oSIAzFFmjr0wZLH54oeCtugaOn8GpJDBnerQiML+rOPq2W6j6bBGE51o+N4DOd0tvMruLmkAQzlpw=="], + "@electric-sql/pglite-socket/@electric-sql/pglite": ["@electric-sql/pglite@0.3.15", "", {}, "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ=="], "@electric-sql/pglite-tools/@electric-sql/pglite": ["@electric-sql/pglite@0.3.15", "", {}, "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ=="], @@ -4152,6 +4154,8 @@ "@inquirer/core/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], + "@libsql/isomorphic-ws/@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@maizzle/framework/@clack/core": ["@clack/core@1.5.1", "", { "dependencies": { "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ=="], "@maizzle/framework/@clack/prompts": ["@clack/prompts@1.8.1", "", { "dependencies": { "@clack/core": "1.5.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ=="], @@ -4204,8 +4208,6 @@ "@prisma/dev/valibot": ["valibot@1.2.0", "", { "peerDependencies": { "typescript": ">=5" }, "optionalPeers": ["typescript"] }, "sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg=="], - "@react-three/fiber/scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], - "@react-three/fiber/zustand": ["zustand@5.0.15", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A=="], "@shikijs/engine-javascript/@shikijs/types": ["@shikijs/types@4.4.3", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.5" } }, "sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g=="], @@ -4328,6 +4330,8 @@ "import-in-the-middle/es-module-lexer": ["es-module-lexer@3.0.2", "", {}, "sha512-BuIB67FngDSyQ/dpQNOZybwdEBDUGJQvOqwWr4ha/ufYiqzuEwPkKO2zLhRAgay28tStRIHUeWmszZAJo3GCOg=="], + "ink/scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "ink-confirm-input/ink-text-input": ["ink-text-input@3.3.0", "", { "dependencies": { "chalk": "^3.0.0", "prop-types": "^15.5.10" }, "peerDependencies": { "ink": "^2.0.0", "react": "^16.5.2" } }, "sha512-gO4wrOf2ie3YuEARTIwGlw37lMjFn3Gk6CKIDrMlHb46WFMagZU7DplohjM24zynlqfnXA5UDEIfC2NBcvD8kg=="], "ink-text-input/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="], @@ -4378,10 +4382,6 @@ "prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], - "react-dom/scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], - - "react-reconciler/scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], - "rolldown-plugin-dts/get-tsconfig": ["get-tsconfig@5.0.0-beta.6", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-X6fBC0pmImC70gvX2zm56go9hx0MyoGVdG0tUCkg/D+Xnh5TJsOZ7iDbOdI3PvmtrDxnu1YdDufpK2QJX1Meqw=="], "rolldown-plugin-dts/obug": ["obug@3.0.0", "", {}, "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw=="], @@ -4464,6 +4464,8 @@ "@inquirer/core/wrap-ansi/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + "@libsql/isomorphic-ws/@types/ws/@types/node": ["@types/node@26.6.3", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg=="], + "@maizzle/framework/oxfmt/@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.67.0", "", { "os": "android", "cpu": "arm" }, "sha512-2olh3ioEmc4gRzQm7jxyB1b/PFBoFvTq8KdgYySeNpysDtA6DEg2Mvya4/I6flhL7G0eOrE8RD7JCNCIMhE16Q=="], "@maizzle/framework/oxfmt/@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.67.0", "", { "os": "android", "cpu": "arm64" }, "sha512-ulfw8EHN1MBq/MFFDXw2/M1VAFu5mRUcnuZ8Hqbv9viAnFzO9t1jKSAsDqKYYDGMlytF/uj6Z5z5n/tHupnKhw=="], @@ -4812,6 +4814,8 @@ "@inquirer/core/wrap-ansi/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + "@libsql/isomorphic-ws/@types/ws/@types/node/undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], + "cheerio-select/domutils/dom-serializer/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], "ink-confirm-input/ink-text-input/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], diff --git a/package.json b/package.json index 97d069998e..1b59452bec 100644 --- a/package.json +++ b/package.json @@ -75,8 +75,8 @@ "typescript": "catalog:tooling" }, "overrides": { - "@effect/sql-d1": "4.0.1", - "@effect/sql-sqlite-do": "4.0.1", + "@effect/sql-d1": "4.0.4", + "@effect/sql-sqlite-do": "4.0.4", "workerd": "1.20261002.1" }, "packageManager": "bun@1.4.0", @@ -96,14 +96,14 @@ "@tanstack/charts-scales": "1.0.0" }, "effect": { - "@effect/ai-openai-compat": "4.0.1", - "@effect/ai-openrouter": "4.0.1", - "@effect/atom-react": "4.0.1", - "@effect/language-service": "^0.87.3", - "@effect/platform-bun": "4.0.1", - "@effect/platform-node": "4.0.1", - "@effect/vitest": "4.0.1", - "effect": "4.0.1" + "@effect/ai-openai-compat": "4.0.4", + "@effect/ai-openrouter": "4.0.4", + "@effect/atom-react": "4.0.4", + "@effect/language-service": "^0.87.4", + "@effect/platform-bun": "4.0.4", + "@effect/platform-node": "4.0.4", + "@effect/vitest": "4.0.4", + "effect": "4.0.4" }, "react": { "@types/react": "^19.3.0", @@ -129,9 +129,9 @@ } }, "patchedDependencies": { - "@effect/ai-openrouter@4.0.1": "patches/@effect%2Fai-openrouter@4.0.1.patch", - "@effect/vitest@4.0.1": "patches/@effect%2Fvitest@4.0.1.patch", - "effect@4.0.1": "patches/effect@4.0.1.patch", + "@effect/ai-openrouter@4.0.4": "patches/@effect%2Fai-openrouter@4.0.4.patch", + "@effect/vitest@4.0.4": "patches/@effect%2Fvitest@4.0.4.patch", + "effect@4.0.4": "patches/effect@4.0.4.patch", "@cloudflare/workers-types@5.20261005.1": "patches/@cloudflare%2Fworkers-types@5.20261005.1.patch" } } diff --git a/packages/db/package.json b/packages/db/package.json index 4036608245..417cac55da 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -23,8 +23,8 @@ "db:backfill:dashboards-v3": "bun scripts/backfill-dashboard-datasource-v3.ts" }, "dependencies": { - "@effect/sql-pg": "4.0.1", - "@effect/sql-pglite": "4.0.1", + "@effect/sql-pg": "4.0.4", + "@effect/sql-pglite": "4.0.4", "@electric-sql/pglite": "^0.5.8", "@maple/domain": "workspace:*", "@maple-dev/effect-orm": "0.5.0", diff --git a/packages/eventing-core/schemas/cloud-event.v1.schema.json b/packages/eventing-core/schemas/cloud-event.v1.schema.json index adabe47a53..cc926364ee 100644 --- a/packages/eventing-core/schemas/cloud-event.v1.schema.json +++ b/packages/eventing-core/schemas/cloud-event.v1.schema.json @@ -63,6 +63,7 @@ }, "projectionrevision": { "type": "integer", + "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "projectorid": { @@ -73,6 +74,7 @@ }, "projectorversion": { "type": "integer", + "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "sourceoccurrenceid": { diff --git a/packages/eventing-core/schemas/signal-projection.v1.schema.json b/packages/eventing-core/schemas/signal-projection.v1.schema.json index 82ed7246d2..881c3b8567 100644 --- a/packages/eventing-core/schemas/signal-projection.v1.schema.json +++ b/packages/eventing-core/schemas/signal-projection.v1.schema.json @@ -323,6 +323,7 @@ }, "revision": { "type": "integer", + "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "enabled": { @@ -354,6 +355,7 @@ }, "version": { "type": "integer", + "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "config": {} diff --git a/patches/@effect%2Fai-openrouter@4.0.1.patch b/patches/@effect%2Fai-openrouter@4.0.4.patch similarity index 98% rename from patches/@effect%2Fai-openrouter@4.0.1.patch rename to patches/@effect%2Fai-openrouter@4.0.4.patch index d6a01c9709..c81512e94c 100644 --- a/patches/@effect%2Fai-openrouter@4.0.1.patch +++ b/patches/@effect%2Fai-openrouter@4.0.4.patch @@ -1,5 +1,5 @@ diff --git a/dist/OpenRouterLanguageModel.js b/dist/OpenRouterLanguageModel.js -index 464d9e4..e76b1e8 100644 +index 8cf04d2..02e891c 100644 --- a/dist/OpenRouterLanguageModel.js +++ b/dist/OpenRouterLanguageModel.js @@ -726,7 +726,22 @@ const makeStreamResponse = /*#__PURE__*/Effect.fnUntraced(function* ({ diff --git a/patches/@effect%2Fvitest@4.0.1.patch b/patches/@effect%2Fvitest@4.0.4.patch similarity index 100% rename from patches/@effect%2Fvitest@4.0.1.patch rename to patches/@effect%2Fvitest@4.0.4.patch diff --git a/patches/effect@4.0.1.patch b/patches/effect@4.0.4.patch similarity index 87% rename from patches/effect@4.0.1.patch rename to patches/effect@4.0.4.patch index 712b5decd1..aea60ce50f 100644 --- a/patches/effect@4.0.1.patch +++ b/patches/effect@4.0.4.patch @@ -1,8 +1,8 @@ diff --git a/dist/ai/LanguageModel.js b/dist/ai/LanguageModel.js -index 7a53537..7c25061 100644 +index 187aa7e..dd11574 100644 --- a/dist/ai/LanguageModel.js +++ b/dist/ai/LanguageModel.js -@@ -344,16 +344,19 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { +@@ -337,16 +337,19 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { previousResponseId: undefined, incrementalPrompt: undefined }; @@ -35,7 +35,7 @@ index 7a53537..7c25061 100644 const tracker = Option.getOrUndefined(yield* Effect.serviceOption(ResponseIdTracker.ResponseIdTracker)); const toolChoice = options.toolChoice ?? "auto"; const concurrency = options.concurrency ?? "unbounded"; -@@ -556,6 +559,43 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { +@@ -560,6 +563,43 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { if (part.type !== "response-metadata") emitted = true; })), Stream.catchReason("AiError", "InvalidRequestError", (_, error) => emitted ? Stream.fail(error) : params.streamText(fallbackOptions))) : params.streamText(requestOptions); }; @@ -79,9 +79,9 @@ index 7a53537..7c25061 100644 // Check for pending approvals that need resolution const { approved: pendingApproved, -@@ -585,14 +625,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { +@@ -589,14 +629,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { } - const schema = Schema.NonEmptyArray(Response.StreamPart(Toolkit.empty)); + const schema = Schema.NonEmptyArray(withUndeclaredToolCalls(Response.StreamPart(Toolkit.empty), deferToolCallValidation)); const decodeParts = Schema.decodeEffect(schema); - return pipe(streamWithNonIncrementalFallback(), Stream.mapArrayEffect(parts => decodeParts(parts).pipe(tracker ? Effect.tap(decodedParts => { - for (const part of decodedParts) { @@ -95,9 +95,9 @@ index 7a53537..7c25061 100644 } // If there is a toolkit resolve and apply it to the provider options const toolkit = yield* resolveToolkit(options.toolkit); -@@ -617,14 +650,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { +@@ -621,14 +654,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { } - const schema = Schema.NonEmptyArray(Response.StreamPart(Toolkit.empty)); + const schema = Schema.NonEmptyArray(withUndeclaredToolCalls(Response.StreamPart(Toolkit.empty), deferToolCallValidation)); const decodeParts = Schema.decodeEffect(schema); - return pipe(streamWithNonIncrementalFallback(), Stream.mapArrayEffect(parts => decodeParts(parts).pipe(tracker ? Effect.tap(decodedParts => { - for (const part of decodedParts) { @@ -111,11 +111,11 @@ index 7a53537..7c25061 100644 } // Pre-resolve pending tool approvals before calling the LLM let preResolvedStreamParts = []; -@@ -687,14 +713,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { - // If tool call resolution is disabled, return the response without +@@ -692,14 +718,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (params) { // resolving the tool calls that were generated if (options.disableToolCallResolution === true) { -- return streamWithNonIncrementalFallback().pipe(Stream.mapArrayEffect(parts => decodeParts(parts).pipe(tracker ? Effect.tap(decodedParts => { + const encodedToolkit = deferToolCallValidation ? makeToolkitWithEncodedParameters(toolkit) : undefined; +- return streamWithNonIncrementalFallback().pipe(Stream.mapArrayEffect(parts => decodeParts(parts).pipe(encodedToolkit ? Effect.tap(() => validateProviderExecutedToolCalls(encodedToolkit, parts)) : identity, tracker ? Effect.tap(decodedParts => { - for (const part of decodedParts) { - if (part.type === "response-metadata" && Predicate.isNotUndefined(part.id)) { - tracker.markParts(providerOptions.prompt.content, part.id); @@ -123,15 +123,15 @@ index 7a53537..7c25061 100644 - } - return Effect.void; - }) : identity))); -+ return deferDecodeFailure(streamWithNonIncrementalFallback(), decodeParts); ++ return deferDecodeFailure(streamWithNonIncrementalFallback(), encodedToolkit ? parts => decodeParts(parts).pipe(Effect.tap(() => validateProviderExecutedToolCalls(encodedToolkit, parts))) : decodeParts); } // Queue for decoded parts and tool results const queue = yield* Queue.make(); diff --git a/dist/http-api/HttpApiBuilder.js b/dist/http-api/HttpApiBuilder.js -index e1686d6..21ab531 100644 +index f9fa473..b9bb293 100644 --- a/dist/http-api/HttpApiBuilder.js +++ b/dist/http-api/HttpApiBuilder.js -@@ -372,7 +372,10 @@ function handlerToHttpEffect(api, group, endpoint, context, handler, isRaw) { +@@ -373,7 +373,10 @@ function handlerToHttpEffect(api, group, endpoint, context, handler, isRaw) { */ export function handlerToRoute(api, group, handler, context) { const endpoint = handler.endpoint;