@takeshape/schema 12.1.1 → 12.1.5
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/agents.d.ts +62 -0
- package/dist/agents.js +346 -0
- package/dist/api-version.d.ts +5 -0
- package/dist/api-version.js +17 -0
- package/dist/auth-schemas.d.ts +144 -0
- package/dist/auth-schemas.js +7 -0
- package/dist/auth-utils.d.ts +19 -0
- package/dist/auth-utils.js +26 -0
- package/dist/builtin-schema.d.ts +18 -0
- package/dist/builtin-schema.js +710 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/content-schema-transform.d.ts +35 -0
- package/dist/content-schema-transform.js +162 -0
- package/dist/create-input-schema.d.ts +9 -0
- package/dist/create-input-schema.js +68 -0
- package/dist/enum.d.ts +2 -0
- package/dist/enum.js +9 -0
- package/dist/flatten-templates.d.ts +2 -0
- package/dist/flatten-templates.js +20 -0
- package/dist/get-is-leaf.d.ts +3 -0
- package/dist/get-is-leaf.js +56 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +61 -0
- package/dist/interfaces.d.ts +14 -0
- package/dist/interfaces.js +86 -0
- package/dist/layers/layers.d.ts +26 -0
- package/dist/layers/layers.js +301 -0
- package/dist/layers/refs.d.ts +102 -0
- package/dist/layers/refs.js +220 -0
- package/dist/layers/type-utils.d.ts +59 -0
- package/dist/layers/type-utils.js +118 -0
- package/dist/layers/visitor.d.ts +5 -0
- package/dist/layers/visitor.js +38 -0
- package/dist/migration/index.d.ts +79 -0
- package/dist/migration/index.js +110 -0
- package/dist/migration/to/v3.0.0.d.ts +4 -0
- package/dist/migration/to/v3.0.0.js +212 -0
- package/dist/migration/to/v3.1.0.d.ts +4 -0
- package/dist/migration/to/v3.1.0.js +194 -0
- package/dist/migration/to/v3.10.0.d.ts +4 -0
- package/dist/migration/to/v3.10.0.js +67 -0
- package/dist/migration/to/v3.11.0.d.ts +4 -0
- package/dist/migration/to/v3.11.0.js +85 -0
- package/dist/migration/to/v3.12.3.d.ts +4 -0
- package/dist/migration/to/v3.12.3.js +87 -0
- package/dist/migration/to/v3.13.0.d.ts +4 -0
- package/dist/migration/to/v3.13.0.js +17 -0
- package/dist/migration/to/v3.17.0.d.ts +4 -0
- package/dist/migration/to/v3.17.0.js +22 -0
- package/dist/migration/to/v3.18.0.d.ts +4 -0
- package/dist/migration/to/v3.18.0.js +64 -0
- package/dist/migration/to/v3.18.1.d.ts +4 -0
- package/dist/migration/to/v3.18.1.js +12 -0
- package/dist/migration/to/v3.18.2.d.ts +4 -0
- package/dist/migration/to/v3.18.2.js +19 -0
- package/dist/migration/to/v3.20.0.d.ts +4 -0
- package/dist/migration/to/v3.20.0.js +24 -0
- package/dist/migration/to/v3.22.0.d.ts +4 -0
- package/dist/migration/to/v3.22.0.js +25 -0
- package/dist/migration/to/v3.24.0.d.ts +4 -0
- package/dist/migration/to/v3.24.0.js +11 -0
- package/dist/migration/to/v3.25.0.d.ts +4 -0
- package/dist/migration/to/v3.25.0.js +11 -0
- package/dist/migration/to/v3.3.0.d.ts +4 -0
- package/dist/migration/to/v3.3.0.js +13 -0
- package/dist/migration/to/v3.31.0.d.ts +4 -0
- package/dist/migration/to/v3.31.0.js +38 -0
- package/dist/migration/to/v3.32.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.js +59 -0
- package/dist/migration/to/v3.34.0.d.ts +6 -0
- package/dist/migration/to/v3.34.0.js +111 -0
- package/dist/migration/to/v3.36.0.d.ts +4 -0
- package/dist/migration/to/v3.36.0.js +22 -0
- package/dist/migration/to/v3.39.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.js +45 -0
- package/dist/migration/to/v3.40.0.d.ts +4 -0
- package/dist/migration/to/v3.40.0.js +26 -0
- package/dist/migration/to/v3.46.0.d.ts +4 -0
- package/dist/migration/to/v3.46.0.js +35 -0
- package/dist/migration/to/v3.57.0.d.ts +4 -0
- package/dist/migration/to/v3.57.0.js +18 -0
- package/dist/migration/to/v3.60.0.d.ts +4 -0
- package/dist/migration/to/v3.60.0.js +129 -0
- package/dist/migration/to/v3.9.0.d.ts +4 -0
- package/dist/migration/to/v3.9.0.js +79 -0
- package/dist/migration/types.d.ts +26 -0
- package/dist/migration/types.js +3 -0
- package/dist/migration/utils.d.ts +2 -0
- package/dist/migration/utils.js +6 -0
- package/dist/mocks.d.ts +14 -0
- package/dist/mocks.js +58 -0
- package/dist/models/agent.d.ts +3 -0
- package/dist/models/agent.js +73 -0
- package/dist/models/project-schema.d.ts +28 -0
- package/dist/models/project-schema.js +186 -0
- package/dist/models/query.d.ts +3 -0
- package/dist/models/query.js +46 -0
- package/dist/models/runtime-schema.d.ts +9 -0
- package/dist/models/runtime-schema.js +20 -0
- package/dist/models/shape.d.ts +4 -0
- package/dist/models/shape.js +36 -0
- package/dist/models/tool.d.ts +4 -0
- package/dist/models/tool.js +147 -0
- package/dist/models/types.d.ts +97 -0
- package/dist/models/types.js +1 -0
- package/dist/models/user-schema.d.ts +7 -0
- package/dist/models/user-schema.js +9 -0
- package/dist/patterns.d.ts +12 -0
- package/dist/patterns.js +1 -0
- package/dist/project-schema/index.d.ts +229 -0
- package/dist/project-schema/index.js +89 -0
- package/dist/project-schema/latest.d.ts +2762 -0
- package/dist/project-schema/latest.js +7 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +236 -0
- package/dist/project-schema/v1.0.0.d.ts +299 -0
- package/dist/project-schema/v1.0.0.js +7 -0
- package/dist/project-schema/v3.0.0.d.ts +478 -0
- package/dist/project-schema/v3.0.0.js +7 -0
- package/dist/project-schema/v3.1.0.d.ts +621 -0
- package/dist/project-schema/v3.1.0.js +7 -0
- package/dist/project-schema/v3.10.0.d.ts +1201 -0
- package/dist/project-schema/v3.10.0.js +7 -0
- package/dist/project-schema/v3.11.0.d.ts +1210 -0
- package/dist/project-schema/v3.11.0.js +7 -0
- package/dist/project-schema/v3.12.0.d.ts +1214 -0
- package/dist/project-schema/v3.12.0.js +7 -0
- package/dist/project-schema/v3.12.1.d.ts +1273 -0
- package/dist/project-schema/v3.12.1.js +7 -0
- package/dist/project-schema/v3.12.2.d.ts +1283 -0
- package/dist/project-schema/v3.12.2.js +7 -0
- package/dist/project-schema/v3.12.3.d.ts +1306 -0
- package/dist/project-schema/v3.12.3.js +7 -0
- package/dist/project-schema/v3.13.0.d.ts +1317 -0
- package/dist/project-schema/v3.13.0.js +7 -0
- package/dist/project-schema/v3.13.1.d.ts +1412 -0
- package/dist/project-schema/v3.13.1.js +7 -0
- package/dist/project-schema/v3.14.0.d.ts +1436 -0
- package/dist/project-schema/v3.14.0.js +7 -0
- package/dist/project-schema/v3.15.0.d.ts +1458 -0
- package/dist/project-schema/v3.15.0.js +7 -0
- package/dist/project-schema/v3.16.0.d.ts +1470 -0
- package/dist/project-schema/v3.16.0.js +7 -0
- package/dist/project-schema/v3.17.0.d.ts +1467 -0
- package/dist/project-schema/v3.17.0.js +7 -0
- package/dist/project-schema/v3.17.1.d.ts +1468 -0
- package/dist/project-schema/v3.17.1.js +7 -0
- package/dist/project-schema/v3.18.0.d.ts +1333 -0
- package/dist/project-schema/v3.18.0.js +7 -0
- package/dist/project-schema/v3.18.1.d.ts +1332 -0
- package/dist/project-schema/v3.18.1.js +7 -0
- package/dist/project-schema/v3.18.2.d.ts +1332 -0
- package/dist/project-schema/v3.18.2.js +7 -0
- package/dist/project-schema/v3.19.0.d.ts +1336 -0
- package/dist/project-schema/v3.19.0.js +7 -0
- package/dist/project-schema/v3.2.0.d.ts +632 -0
- package/dist/project-schema/v3.2.0.js +7 -0
- package/dist/project-schema/v3.20.0.d.ts +1336 -0
- package/dist/project-schema/v3.20.0.js +7 -0
- package/dist/project-schema/v3.21.0.d.ts +1338 -0
- package/dist/project-schema/v3.21.0.js +7 -0
- package/dist/project-schema/v3.22.0.d.ts +1344 -0
- package/dist/project-schema/v3.22.0.js +7 -0
- package/dist/project-schema/v3.23.0.d.ts +1376 -0
- package/dist/project-schema/v3.23.0.js +7 -0
- package/dist/project-schema/v3.24.0.d.ts +1364 -0
- package/dist/project-schema/v3.24.0.js +7 -0
- package/dist/project-schema/v3.25.0.d.ts +1363 -0
- package/dist/project-schema/v3.25.0.js +7 -0
- package/dist/project-schema/v3.26.0.d.ts +1388 -0
- package/dist/project-schema/v3.26.0.js +7 -0
- package/dist/project-schema/v3.27.0.d.ts +1397 -0
- package/dist/project-schema/v3.27.0.js +7 -0
- package/dist/project-schema/v3.28.0.d.ts +1416 -0
- package/dist/project-schema/v3.28.0.js +7 -0
- package/dist/project-schema/v3.29.0.d.ts +1423 -0
- package/dist/project-schema/v3.29.0.js +7 -0
- package/dist/project-schema/v3.3.0.d.ts +632 -0
- package/dist/project-schema/v3.3.0.js +7 -0
- package/dist/project-schema/v3.30.0.d.ts +1416 -0
- package/dist/project-schema/v3.30.0.js +7 -0
- package/dist/project-schema/v3.31.0.d.ts +1448 -0
- package/dist/project-schema/v3.31.0.js +7 -0
- package/dist/project-schema/v3.32.0.d.ts +1439 -0
- package/dist/project-schema/v3.32.0.js +7 -0
- package/dist/project-schema/v3.33.0.d.ts +1445 -0
- package/dist/project-schema/v3.33.0.js +7 -0
- package/dist/project-schema/v3.34.0.d.ts +1445 -0
- package/dist/project-schema/v3.34.0.js +7 -0
- package/dist/project-schema/v3.35.0.d.ts +1464 -0
- package/dist/project-schema/v3.35.0.js +7 -0
- package/dist/project-schema/v3.36.0.d.ts +1470 -0
- package/dist/project-schema/v3.36.0.js +7 -0
- package/dist/project-schema/v3.37.0.d.ts +1522 -0
- package/dist/project-schema/v3.37.0.js +7 -0
- package/dist/project-schema/v3.38.0.d.ts +1522 -0
- package/dist/project-schema/v3.38.0.js +7 -0
- package/dist/project-schema/v3.39.0.d.ts +1529 -0
- package/dist/project-schema/v3.39.0.js +7 -0
- package/dist/project-schema/v3.4.0.d.ts +624 -0
- package/dist/project-schema/v3.4.0.js +7 -0
- package/dist/project-schema/v3.40.0.d.ts +1530 -0
- package/dist/project-schema/v3.40.0.js +7 -0
- package/dist/project-schema/v3.41.0.d.ts +1530 -0
- package/dist/project-schema/v3.41.0.js +7 -0
- package/dist/project-schema/v3.42.0.d.ts +1534 -0
- package/dist/project-schema/v3.42.0.js +7 -0
- package/dist/project-schema/v3.43.0.d.ts +1536 -0
- package/dist/project-schema/v3.43.0.js +7 -0
- package/dist/project-schema/v3.44.0.d.ts +1621 -0
- package/dist/project-schema/v3.44.0.js +7 -0
- package/dist/project-schema/v3.45.0.d.ts +1650 -0
- package/dist/project-schema/v3.45.0.js +7 -0
- package/dist/project-schema/v3.46.0.d.ts +1703 -0
- package/dist/project-schema/v3.46.0.js +7 -0
- package/dist/project-schema/v3.47.0.d.ts +1736 -0
- package/dist/project-schema/v3.47.0.js +7 -0
- package/dist/project-schema/v3.48.0.d.ts +2208 -0
- package/dist/project-schema/v3.48.0.js +7 -0
- package/dist/project-schema/v3.49.0.d.ts +2217 -0
- package/dist/project-schema/v3.49.0.js +7 -0
- package/dist/project-schema/v3.5.0.d.ts +649 -0
- package/dist/project-schema/v3.5.0.js +7 -0
- package/dist/project-schema/v3.5.1.d.ts +649 -0
- package/dist/project-schema/v3.5.1.js +7 -0
- package/dist/project-schema/v3.50.0.d.ts +2269 -0
- package/dist/project-schema/v3.50.0.js +7 -0
- package/dist/project-schema/v3.51.0.d.ts +2269 -0
- package/dist/project-schema/v3.51.0.js +7 -0
- package/dist/project-schema/v3.52.0.d.ts +2269 -0
- package/dist/project-schema/v3.52.0.js +7 -0
- package/dist/project-schema/v3.53.0.d.ts +2350 -0
- package/dist/project-schema/v3.53.0.js +7 -0
- package/dist/project-schema/v3.54.0.d.ts +2369 -0
- package/dist/project-schema/v3.54.0.js +7 -0
- package/dist/project-schema/v3.55.0.d.ts +2369 -0
- package/dist/project-schema/v3.55.0.js +7 -0
- package/dist/project-schema/v3.56.0.d.ts +2405 -0
- package/dist/project-schema/v3.56.0.js +7 -0
- package/dist/project-schema/v3.57.0.d.ts +2601 -0
- package/dist/project-schema/v3.57.0.js +7 -0
- package/dist/project-schema/v3.58.0.d.ts +2601 -0
- package/dist/project-schema/v3.58.0.js +7 -0
- package/dist/project-schema/v3.59.0.d.ts +2650 -0
- package/dist/project-schema/v3.59.0.js +7 -0
- package/dist/project-schema/v3.6.0.d.ts +658 -0
- package/dist/project-schema/v3.6.0.js +7 -0
- package/dist/project-schema/v3.60.0.d.ts +2678 -0
- package/dist/project-schema/v3.60.0.js +7 -0
- package/dist/project-schema/v3.61.0.d.ts +2678 -0
- package/dist/project-schema/v3.61.0.js +7 -0
- package/dist/project-schema/v3.62.0.d.ts +2693 -0
- package/dist/project-schema/v3.62.0.js +7 -0
- package/dist/project-schema/v3.63.0.d.ts +2701 -0
- package/dist/project-schema/v3.63.0.js +7 -0
- package/dist/project-schema/v3.64.0.d.ts +2710 -0
- package/dist/project-schema/v3.64.0.js +7 -0
- package/dist/project-schema/v3.65.0.d.ts +2762 -0
- package/dist/project-schema/v3.65.0.js +7 -0
- package/dist/project-schema/v3.7.0.d.ts +961 -0
- package/dist/project-schema/v3.7.0.js +7 -0
- package/dist/project-schema/v3.8.0.d.ts +979 -0
- package/dist/project-schema/v3.8.0.js +7 -0
- package/dist/project-schema/v3.9.0.d.ts +1178 -0
- package/dist/project-schema/v3.9.0.js +7 -0
- package/dist/project-schema/v4.0.0.d.ts +1328 -0
- package/dist/project-schema/v4.0.0.js +7 -0
- package/dist/refs.d.ts +220 -0
- package/dist/refs.js +648 -0
- package/dist/relationships.d.ts +40 -0
- package/dist/relationships.js +302 -0
- package/dist/resolvers/ai/abort-agent-message-args.d.ts +16 -0
- package/dist/resolvers/ai/abort-agent-message-args.js +13 -0
- package/dist/resolvers/ai/abort-agent-message-response.d.ts +39 -0
- package/dist/resolvers/ai/abort-agent-message-response.js +19 -0
- package/dist/resolvers/ai/agent-attachment.d.ts +27 -0
- package/dist/resolvers/ai/agent-attachment.js +22 -0
- package/dist/resolvers/ai/agent-chat-args.d.ts +62 -0
- package/dist/resolvers/ai/agent-chat-args.js +30 -0
- package/dist/resolvers/ai/agent-chat-payload.d.ts +35 -0
- package/dist/resolvers/ai/agent-chat-payload.js +26 -0
- package/dist/resolvers/ai/agent-chat-response.d.ts +366 -0
- package/dist/resolvers/ai/agent-chat-response.js +21 -0
- package/dist/resolvers/ai/agent-generate-args.d.ts +62 -0
- package/dist/resolvers/ai/agent-generate-args.js +30 -0
- package/dist/resolvers/ai/agent-message-input.d.ts +73 -0
- package/dist/resolvers/ai/agent-message-input.js +39 -0
- package/dist/resolvers/ai/agent-message-output.d.ts +169 -0
- package/dist/resolvers/ai/agent-message-output.js +77 -0
- package/dist/resolvers/ai/agent-message-payload.d.ts +849 -0
- package/dist/resolvers/ai/agent-message-payload.js +167 -0
- package/dist/resolvers/ai/agent-run-mode.d.ts +8 -0
- package/dist/resolvers/ai/agent-run-mode.js +9 -0
- package/dist/resolvers/ai/agent-session-payload.d.ts +840 -0
- package/dist/resolvers/ai/agent-session-payload.js +218 -0
- package/dist/resolvers/ai/ai-usage-item.d.ts +70 -0
- package/dist/resolvers/ai/ai-usage-item.js +70 -0
- package/dist/resolvers/ai/create-agent-session-response.d.ts +276 -0
- package/dist/resolvers/ai/create-agent-session-response.js +9 -0
- package/dist/resolvers/ai/embedding-search.d.ts +54 -0
- package/dist/resolvers/ai/embedding-search.js +46 -0
- package/dist/resolvers/ai/get-agent-message-args.d.ts +16 -0
- package/dist/resolvers/ai/get-agent-message-args.js +13 -0
- package/dist/resolvers/ai/get-agent-message-response.d.ts +1253 -0
- package/dist/resolvers/ai/get-agent-message-response.js +79 -0
- package/dist/resolvers/ai/inspect-agent-args.d.ts +16 -0
- package/dist/resolvers/ai/inspect-agent-args.js +13 -0
- package/dist/resolvers/ai/inspect-agent-response.d.ts +631 -0
- package/dist/resolvers/ai/inspect-agent-response.js +48 -0
- package/dist/resolvers/ai/send-agent-feedback-args.d.ts +52 -0
- package/dist/resolvers/ai/send-agent-feedback-args.js +16 -0
- package/dist/resolvers/ai/send-agent-message-args.d.ts +48 -0
- package/dist/resolvers/ai/send-agent-message-args.js +36 -0
- package/dist/resolvers/ai/send-agent-message-response.d.ts +432 -0
- package/dist/resolvers/ai/send-agent-message-response.js +51 -0
- package/dist/resolvers/ai/types.d.ts +8 -0
- package/dist/resolvers/ai/types.js +1 -0
- package/dist/resolvers/takeshape/assets/asset-image-meta.d.ts +79 -0
- package/dist/resolvers/takeshape/assets/asset-image-meta.js +98 -0
- package/dist/resolvers/takeshape/assets/asset-image-params.d.ts +901 -0
- package/dist/resolvers/takeshape/assets/asset-image-params.js +726 -0
- package/dist/resolvers/takeshape/assets/asset-image.d.ts +17 -0
- package/dist/resolvers/takeshape/assets/asset-image.js +15 -0
- package/dist/resolvers/takeshape/assets/asset.d.ts +125 -0
- package/dist/resolvers/takeshape/assets/asset.js +107 -0
- package/dist/resolvers/takeshape/assets/constants.d.ts +11 -0
- package/dist/resolvers/takeshape/assets/constants.js +11 -0
- package/dist/resolvers/takeshape/builtins/constants.d.ts +1 -0
- package/dist/resolvers/takeshape/builtins/constants.js +1 -0
- package/dist/runtime-schema.d.ts +6 -0
- package/dist/runtime-schema.js +85 -0
- package/dist/scalars.d.ts +2 -0
- package/dist/scalars.js +4 -0
- package/dist/schema-transform.d.ts +19 -0
- package/dist/schema-transform.js +74 -0
- package/dist/schema-util.d.ts +266 -0
- package/dist/schema-util.js +1127 -0
- package/dist/schemas/auth-schemas.json +400 -0
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.js +182 -0
- package/dist/schemas/project-schema/experimental-2025-07.json +1297 -0
- package/dist/schemas/project-schema/latest.d.ts +245 -0
- package/dist/schemas/project-schema/latest.js +25 -0
- package/dist/schemas/project-schema/latest.json +5109 -0
- package/dist/schemas/project-schema/meta-schema-v1.0.0.json +193 -0
- package/dist/schemas/project-schema/meta-schema-v3.0.0.json +608 -0
- package/dist/schemas/project-schema/meta-schema-v3.1.0.json +608 -0
- package/dist/schemas/project-schema/meta-schema-v3.2.0.json +612 -0
- package/dist/schemas/project-schema/meta-schema-v3.3.0.json +612 -0
- package/dist/schemas/project-schema/meta-schema-v3.4.0.json +637 -0
- package/dist/schemas/project-schema/meta-schema-v3.5.0.json +626 -0
- package/dist/schemas/project-schema/meta-schema-v3.5.1.json +626 -0
- package/dist/schemas/project-schema/meta-schema-v3.6.0.json +629 -0
- package/dist/schemas/project-schema/meta-schema-v3.7.0.json +1137 -0
- package/dist/schemas/project-schema/meta-schema-v3.8.0.json +1137 -0
- package/dist/schemas/project-schema/meta-schema-v3.9.0.json +1477 -0
- package/dist/schemas/project-schema/v1.0.0.json +321 -0
- package/dist/schemas/project-schema/v3.0.0.json +414 -0
- package/dist/schemas/project-schema/v3.1.0.json +572 -0
- package/dist/schemas/project-schema/v3.10.0.json +2097 -0
- package/dist/schemas/project-schema/v3.11.0.json +2141 -0
- package/dist/schemas/project-schema/v3.12.0.json +2144 -0
- package/dist/schemas/project-schema/v3.12.1.json +2282 -0
- package/dist/schemas/project-schema/v3.12.2.json +2304 -0
- package/dist/schemas/project-schema/v3.12.3.json +2357 -0
- package/dist/schemas/project-schema/v3.13.0.json +2377 -0
- package/dist/schemas/project-schema/v3.14.0.json +2385 -0
- package/dist/schemas/project-schema/v3.15.0.json +2365 -0
- package/dist/schemas/project-schema/v3.16.0.json +2373 -0
- package/dist/schemas/project-schema/v3.17.0.json +2378 -0
- package/dist/schemas/project-schema/v3.17.1.json +2380 -0
- package/dist/schemas/project-schema/v3.18.0.json +2356 -0
- package/dist/schemas/project-schema/v3.18.1.json +2357 -0
- package/dist/schemas/project-schema/v3.18.2.json +2357 -0
- package/dist/schemas/project-schema/v3.19.0.json +2369 -0
- package/dist/schemas/project-schema/v3.2.0.json +580 -0
- package/dist/schemas/project-schema/v3.20.0.json +2369 -0
- package/dist/schemas/project-schema/v3.21.0.json +2376 -0
- package/dist/schemas/project-schema/v3.22.0.json +2381 -0
- package/dist/schemas/project-schema/v3.23.0.json +2456 -0
- package/dist/schemas/project-schema/v3.24.0.json +2556 -0
- package/dist/schemas/project-schema/v3.25.0.json +2552 -0
- package/dist/schemas/project-schema/v3.26.0.json +2599 -0
- package/dist/schemas/project-schema/v3.27.0.json +2611 -0
- package/dist/schemas/project-schema/v3.28.0.json +2656 -0
- package/dist/schemas/project-schema/v3.29.0.json +2670 -0
- package/dist/schemas/project-schema/v3.3.0.json +581 -0
- package/dist/schemas/project-schema/v3.30.0.json +2656 -0
- package/dist/schemas/project-schema/v3.31.0.json +2714 -0
- package/dist/schemas/project-schema/v3.32.0.json +2708 -0
- package/dist/schemas/project-schema/v3.33.0.json +2715 -0
- package/dist/schemas/project-schema/v3.34.0.json +2715 -0
- package/dist/schemas/project-schema/v3.35.0.json +2748 -0
- package/dist/schemas/project-schema/v3.36.0.json +2756 -0
- package/dist/schemas/project-schema/v3.37.0.json +2821 -0
- package/dist/schemas/project-schema/v3.38.0.json +2819 -0
- package/dist/schemas/project-schema/v3.39.0.json +2827 -0
- package/dist/schemas/project-schema/v3.4.0.json +571 -0
- package/dist/schemas/project-schema/v3.40.0.json +2830 -0
- package/dist/schemas/project-schema/v3.41.0.json +2830 -0
- package/dist/schemas/project-schema/v3.42.0.json +2835 -0
- package/dist/schemas/project-schema/v3.43.0.json +2841 -0
- package/dist/schemas/project-schema/v3.44.0.json +3013 -0
- package/dist/schemas/project-schema/v3.45.0.json +3064 -0
- package/dist/schemas/project-schema/v3.46.0.json +3136 -0
- package/dist/schemas/project-schema/v3.47.0.json +3189 -0
- package/dist/schemas/project-schema/v3.48.0.json +3196 -0
- package/dist/schemas/project-schema/v3.49.0.json +3239 -0
- package/dist/schemas/project-schema/v3.5.0.json +571 -0
- package/dist/schemas/project-schema/v3.5.1.json +571 -0
- package/dist/schemas/project-schema/v3.50.0.json +3320 -0
- package/dist/schemas/project-schema/v3.51.0.json +3326 -0
- package/dist/schemas/project-schema/v3.52.0.json +3326 -0
- package/dist/schemas/project-schema/v3.53.0.json +3476 -0
- package/dist/schemas/project-schema/v3.54.0.json +3512 -0
- package/dist/schemas/project-schema/v3.55.0.json +3515 -0
- package/dist/schemas/project-schema/v3.56.0.json +3530 -0
- package/dist/schemas/project-schema/v3.57.0.json +4815 -0
- package/dist/schemas/project-schema/v3.58.0.json +4815 -0
- package/dist/schemas/project-schema/v3.59.0.json +4912 -0
- package/dist/schemas/project-schema/v3.6.0.json +587 -0
- package/dist/schemas/project-schema/v3.60.0.json +4974 -0
- package/dist/schemas/project-schema/v3.61.0.json +4974 -0
- package/dist/schemas/project-schema/v3.62.0.json +5007 -0
- package/dist/schemas/project-schema/v3.63.0.json +5020 -0
- package/dist/schemas/project-schema/v3.64.0.json +5032 -0
- package/dist/schemas/project-schema/v3.65.0.json +5109 -0
- package/dist/schemas/project-schema/v3.7.0.json +587 -0
- package/dist/schemas/project-schema/v3.8.0.json +604 -0
- package/dist/schemas/project-schema/v3.9.0.json +604 -0
- package/dist/schemas/project-schema/v4.0.0.json +2316 -0
- package/dist/schemas/project-schema.json +232 -0
- package/dist/service-dependencies.d.ts +13 -0
- package/dist/service-dependencies.js +165 -0
- package/dist/services/services.d.ts +31 -0
- package/dist/services/services.js +145 -0
- package/dist/services/types.d.ts +11 -0
- package/dist/services/types.js +1 -0
- package/dist/services/util.d.ts +16 -0
- package/dist/services/util.js +36 -0
- package/dist/shape-paths.d.ts +7 -0
- package/dist/shape-paths.js +40 -0
- package/dist/taxonomies.d.ts +15 -0
- package/dist/taxonomies.js +24 -0
- package/dist/template-shapes/index.d.ts +7 -0
- package/dist/template-shapes/index.js +33 -0
- package/dist/template-shapes/names.d.ts +10 -0
- package/dist/template-shapes/names.js +21 -0
- package/dist/template-shapes/templates.d.ts +32 -0
- package/dist/template-shapes/templates.js +316 -0
- package/dist/template-shapes/types.d.ts +15 -0
- package/dist/template-shapes/types.js +7 -0
- package/dist/template-shapes/where.d.ts +37 -0
- package/dist/template-shapes/where.js +415 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/transforms.d.ts +15 -0
- package/dist/types/transforms.js +1 -0
- package/dist/types/types.d.ts +206 -0
- package/dist/types/types.js +10 -0
- package/dist/types/utils.d.ts +112 -0
- package/dist/types/utils.js +269 -0
- package/dist/unions.d.ts +14 -0
- package/dist/unions.js +77 -0
- package/dist/util/agent-utils.d.ts +2 -0
- package/dist/util/agent-utils.js +7 -0
- package/dist/util/api-indexing.d.ts +9 -0
- package/dist/util/api-indexing.js +57 -0
- package/dist/util/coerce-value.d.ts +9 -0
- package/dist/util/coerce-value.js +32 -0
- package/dist/util/detect-cycles.d.ts +7 -0
- package/dist/util/detect-cycles.js +45 -0
- package/dist/util/expressions.d.ts +34 -0
- package/dist/util/expressions.js +350 -0
- package/dist/util/find-shape-at-path.d.ts +21 -0
- package/dist/util/find-shape-at-path.js +53 -0
- package/dist/util/form-config.d.ts +11 -0
- package/dist/util/form-config.js +62 -0
- package/dist/util/get-conflicting-properties.d.ts +6 -0
- package/dist/util/get-conflicting-properties.js +55 -0
- package/dist/util/get-return-shape.d.ts +4 -0
- package/dist/util/get-return-shape.js +30 -0
- package/dist/util/graphql-string.d.ts +6 -0
- package/dist/util/graphql-string.js +75 -0
- package/dist/util/has-arg.d.ts +6 -0
- package/dist/util/has-arg.js +25 -0
- package/dist/util/is-asset-property.d.ts +3 -0
- package/dist/util/is-asset-property.js +11 -0
- package/dist/util/merge.d.ts +17 -0
- package/dist/util/merge.js +278 -0
- package/dist/util/patch-schema.d.ts +13 -0
- package/dist/util/patch-schema.js +89 -0
- package/dist/util/query-field-path.d.ts +9 -0
- package/dist/util/query-field-path.js +23 -0
- package/dist/util/shapes.d.ts +5 -0
- package/dist/util/shapes.js +22 -0
- package/dist/util/tools.d.ts +10 -0
- package/dist/util/tools.js +39 -0
- package/dist/validate/ai.d.ts +6 -0
- package/dist/validate/ai.js +221 -0
- package/dist/validate/errors.d.ts +3 -0
- package/dist/validate/errors.js +20 -0
- package/dist/validate/types.d.ts +43 -0
- package/dist/validate/types.js +1 -0
- package/dist/validate/util.d.ts +9 -0
- package/dist/validate/util.js +62 -0
- package/dist/validate/validate.d.ts +41 -0
- package/dist/validate/validate.js +1042 -0
- package/dist/versions.d.ts +4 -0
- package/dist/versions.js +4 -0
- package/dist/workflows.d.ts +14 -0
- package/dist/workflows.js +66 -0
- package/package.json +6 -6
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { createTypedValidator } from '@takeshape/json-schema';
|
|
2
|
+
import * as agentMessageInput from "./agent-message-input.js";
|
|
3
|
+
import * as agentMessageOutput from "./agent-message-output.js";
|
|
4
|
+
import * as aiUsageItem from "./ai-usage-item.js";
|
|
5
|
+
export const shapeName = 'TSAgentSession';
|
|
6
|
+
export const recordSchema = {
|
|
7
|
+
title: shapeName,
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
id: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The unique identifier for the agent session.'
|
|
13
|
+
},
|
|
14
|
+
createdAt: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'ISO8601 timestamp when the agent session was created',
|
|
17
|
+
format: 'date-time'
|
|
18
|
+
},
|
|
19
|
+
updatedAt: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'ISO8601 timestamp when the agent session was updated',
|
|
22
|
+
format: 'date-time'
|
|
23
|
+
},
|
|
24
|
+
agentName: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'The name of the agent associated with this session.'
|
|
27
|
+
},
|
|
28
|
+
projectId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'The ID of the project to which this agent session belongs.'
|
|
31
|
+
},
|
|
32
|
+
schemaId: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'The schema ID associated with the agent session, typically in the format "production~projectId".'
|
|
35
|
+
},
|
|
36
|
+
schemaHash: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The hash of the schema version associated with the agent session.'
|
|
39
|
+
},
|
|
40
|
+
done: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'Indicates whether the agent session is completed.'
|
|
43
|
+
},
|
|
44
|
+
suspended: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'Indicates whether the agent session is suspended.'
|
|
47
|
+
},
|
|
48
|
+
previousStateId: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'The ID of the previous state in the agent session, if any.'
|
|
51
|
+
},
|
|
52
|
+
currentStateId: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'The ID of the current state in the agent session.'
|
|
55
|
+
},
|
|
56
|
+
chatSessionIds: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
description: 'A mapping of chat session IDs to their corresponding state IDs.'
|
|
59
|
+
},
|
|
60
|
+
sessionMemory: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
description: 'Memory associated with the agent session, which can be used to store stateful information.'
|
|
63
|
+
},
|
|
64
|
+
hasAgentHistory: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Indicates whether the agent session has an associated history of agent responses.'
|
|
67
|
+
},
|
|
68
|
+
hasFeedback: {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
description: 'Indicates whether the agent session has any messages with feedback.'
|
|
71
|
+
},
|
|
72
|
+
suspend: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
description: 'Indicates whether the agent session is suspended.'
|
|
75
|
+
},
|
|
76
|
+
suspendedTransitionIndices: {
|
|
77
|
+
type: 'array',
|
|
78
|
+
description: 'An array of indices of suspended transitions in the agent session.',
|
|
79
|
+
items: {
|
|
80
|
+
type: 'integer'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
firstMessageInput: {
|
|
84
|
+
...agentMessageInput.schema
|
|
85
|
+
},
|
|
86
|
+
lastMessageOutput: {
|
|
87
|
+
...agentMessageOutput.schema
|
|
88
|
+
},
|
|
89
|
+
totalTokens: {
|
|
90
|
+
type: 'number',
|
|
91
|
+
description: 'The total number of tokens used in the agent session.'
|
|
92
|
+
},
|
|
93
|
+
domain: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'The domain from which the agent session was created (e.g., "shop.example.com", "app.takeshape.io").'
|
|
96
|
+
},
|
|
97
|
+
takeshapeUserId: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'The TakeShape user ID if the session was created by a TakeShape user (via JWT or PAT).'
|
|
100
|
+
},
|
|
101
|
+
usage: {
|
|
102
|
+
type: 'array',
|
|
103
|
+
description: 'Itemized token usage breakdown by service and model across all messages',
|
|
104
|
+
items: aiUsageItem.schema
|
|
105
|
+
},
|
|
106
|
+
// Below are for records
|
|
107
|
+
__createdRegion: {
|
|
108
|
+
type: 'string'
|
|
109
|
+
},
|
|
110
|
+
__updatedRegion: {
|
|
111
|
+
type: 'string'
|
|
112
|
+
},
|
|
113
|
+
ttl: {
|
|
114
|
+
type: 'integer'
|
|
115
|
+
},
|
|
116
|
+
schemaIdAgentName: {
|
|
117
|
+
type: 'string'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
required: [
|
|
121
|
+
'__createdRegion',
|
|
122
|
+
'__updatedRegion',
|
|
123
|
+
'ttl',
|
|
124
|
+
'schemaIdAgentName',
|
|
125
|
+
'id',
|
|
126
|
+
'agentName',
|
|
127
|
+
'createdAt',
|
|
128
|
+
'updatedAt',
|
|
129
|
+
'done',
|
|
130
|
+
'currentStateId',
|
|
131
|
+
'chatSessionIds',
|
|
132
|
+
'sessionMemory',
|
|
133
|
+
'hasAgentHistory',
|
|
134
|
+
'hasFeedback',
|
|
135
|
+
'suspend',
|
|
136
|
+
'projectId',
|
|
137
|
+
'schemaId',
|
|
138
|
+
'schemaHash',
|
|
139
|
+
'totalTokens'
|
|
140
|
+
],
|
|
141
|
+
additionalProperties: false
|
|
142
|
+
};
|
|
143
|
+
const { __createdRegion, __updatedRegion, ttl, schemaIdAgentName, ...schemaProperties } = recordSchema.properties;
|
|
144
|
+
export const schema = {
|
|
145
|
+
...recordSchema,
|
|
146
|
+
properties: {
|
|
147
|
+
...schemaProperties
|
|
148
|
+
},
|
|
149
|
+
required: [
|
|
150
|
+
'id',
|
|
151
|
+
'agentName',
|
|
152
|
+
'createdAt',
|
|
153
|
+
'updatedAt',
|
|
154
|
+
'done',
|
|
155
|
+
'currentStateId',
|
|
156
|
+
'chatSessionIds',
|
|
157
|
+
'sessionMemory',
|
|
158
|
+
'hasAgentHistory',
|
|
159
|
+
'hasFeedback',
|
|
160
|
+
'suspend',
|
|
161
|
+
'projectId',
|
|
162
|
+
'schemaId',
|
|
163
|
+
'schemaHash',
|
|
164
|
+
'totalTokens'
|
|
165
|
+
],
|
|
166
|
+
additionalProperties: false
|
|
167
|
+
};
|
|
168
|
+
export const validate = createTypedValidator(schema);
|
|
169
|
+
const { projectId, schemaId, schemaHash, firstMessageInput, lastMessageOutput, suspendedTransitionIndices, chatSessionIds, previousStateId, ...shapeSchemaProperties } = schema.properties;
|
|
170
|
+
// Schema for user-facing responses - used for TypeScript type derivation (no @ref)
|
|
171
|
+
export const userSchema = {
|
|
172
|
+
...schema,
|
|
173
|
+
properties: {
|
|
174
|
+
...shapeSchemaProperties
|
|
175
|
+
},
|
|
176
|
+
required: [
|
|
177
|
+
'id',
|
|
178
|
+
'agentName',
|
|
179
|
+
'createdAt',
|
|
180
|
+
'updatedAt',
|
|
181
|
+
'done',
|
|
182
|
+
'sessionMemory',
|
|
183
|
+
'hasAgentHistory',
|
|
184
|
+
'hasFeedback',
|
|
185
|
+
'suspend',
|
|
186
|
+
'currentStateId',
|
|
187
|
+
'totalTokens'
|
|
188
|
+
],
|
|
189
|
+
additionalProperties: false
|
|
190
|
+
};
|
|
191
|
+
// Schema for GraphQL shape generation (uses @ref)
|
|
192
|
+
export const shapeSchema = {
|
|
193
|
+
...schema,
|
|
194
|
+
properties: {
|
|
195
|
+
...shapeSchemaProperties,
|
|
196
|
+
usage: {
|
|
197
|
+
type: 'array',
|
|
198
|
+
description: 'Itemized token usage breakdown by service and model across all messages',
|
|
199
|
+
items: {
|
|
200
|
+
'@ref': aiUsageItem.shapeName
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
required: [
|
|
205
|
+
'id',
|
|
206
|
+
'agentName',
|
|
207
|
+
'createdAt',
|
|
208
|
+
'updatedAt',
|
|
209
|
+
'done',
|
|
210
|
+
'sessionMemory',
|
|
211
|
+
'hasAgentHistory',
|
|
212
|
+
'hasFeedback',
|
|
213
|
+
'suspend',
|
|
214
|
+
'currentStateId',
|
|
215
|
+
'totalTokens'
|
|
216
|
+
],
|
|
217
|
+
additionalProperties: false
|
|
218
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const shapeName = "TSAiUsageItem";
|
|
2
|
+
/**
|
|
3
|
+
* Schema for AI usage item tracking token consumption by service and model.
|
|
4
|
+
* Matches the AiUsageItem type from @takeshape/util.
|
|
5
|
+
*/
|
|
6
|
+
export declare const schema: {
|
|
7
|
+
readonly title: "TSAiUsageItem";
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly description: "Token usage breakdown for a single service and model";
|
|
10
|
+
readonly properties: {
|
|
11
|
+
readonly service: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
readonly description: "The AI service provider (e.g., \"openai\", \"anthropic\")";
|
|
14
|
+
};
|
|
15
|
+
readonly model: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "The model identifier (e.g., \"gpt-4\", \"claude-3-opus\")";
|
|
18
|
+
};
|
|
19
|
+
readonly inputTokens: {
|
|
20
|
+
readonly type: "number";
|
|
21
|
+
readonly description: "Number of input/prompt tokens consumed";
|
|
22
|
+
};
|
|
23
|
+
readonly outputTokens: {
|
|
24
|
+
readonly type: "number";
|
|
25
|
+
readonly description: "Number of output/completion tokens generated";
|
|
26
|
+
};
|
|
27
|
+
readonly totalTokens: {
|
|
28
|
+
readonly type: "number";
|
|
29
|
+
readonly description: "Total tokens (input + output)";
|
|
30
|
+
};
|
|
31
|
+
readonly inputTokenDetails: {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly description: "Detailed breakdown of input token usage";
|
|
34
|
+
readonly properties: {
|
|
35
|
+
readonly noCacheTokens: {
|
|
36
|
+
readonly type: "number";
|
|
37
|
+
readonly description: "Tokens not using cache";
|
|
38
|
+
};
|
|
39
|
+
readonly cacheReadTokens: {
|
|
40
|
+
readonly type: "number";
|
|
41
|
+
readonly description: "Tokens served from cache";
|
|
42
|
+
};
|
|
43
|
+
readonly cacheWriteTokens: {
|
|
44
|
+
readonly type: "number";
|
|
45
|
+
readonly description: "Tokens written to cache";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly outputTokenDetails: {
|
|
50
|
+
readonly type: "object";
|
|
51
|
+
readonly description: "Detailed breakdown of output token usage";
|
|
52
|
+
readonly properties: {
|
|
53
|
+
readonly textTokens: {
|
|
54
|
+
readonly type: "number";
|
|
55
|
+
readonly description: "Regular text output tokens";
|
|
56
|
+
};
|
|
57
|
+
readonly reasoningTokens: {
|
|
58
|
+
readonly type: "number";
|
|
59
|
+
readonly description: "Extended thinking tokens";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly guardrailUnits: {
|
|
64
|
+
readonly type: "number";
|
|
65
|
+
readonly description: "Number of guardrail units consumed";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
readonly required: ["service", "model"];
|
|
69
|
+
readonly additionalProperties: false;
|
|
70
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export const shapeName = 'TSAiUsageItem';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for AI usage item tracking token consumption by service and model.
|
|
4
|
+
* Matches the AiUsageItem type from @takeshape/util.
|
|
5
|
+
*/
|
|
6
|
+
export const schema = {
|
|
7
|
+
title: shapeName,
|
|
8
|
+
type: 'object',
|
|
9
|
+
description: 'Token usage breakdown for a single service and model',
|
|
10
|
+
properties: {
|
|
11
|
+
service: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'The AI service provider (e.g., "openai", "anthropic")'
|
|
14
|
+
},
|
|
15
|
+
model: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'The model identifier (e.g., "gpt-4", "claude-3-opus")'
|
|
18
|
+
},
|
|
19
|
+
inputTokens: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
description: 'Number of input/prompt tokens consumed'
|
|
22
|
+
},
|
|
23
|
+
outputTokens: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
description: 'Number of output/completion tokens generated'
|
|
26
|
+
},
|
|
27
|
+
totalTokens: {
|
|
28
|
+
type: 'number',
|
|
29
|
+
description: 'Total tokens (input + output)'
|
|
30
|
+
},
|
|
31
|
+
inputTokenDetails: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
description: 'Detailed breakdown of input token usage',
|
|
34
|
+
properties: {
|
|
35
|
+
noCacheTokens: {
|
|
36
|
+
type: 'number',
|
|
37
|
+
description: 'Tokens not using cache'
|
|
38
|
+
},
|
|
39
|
+
cacheReadTokens: {
|
|
40
|
+
type: 'number',
|
|
41
|
+
description: 'Tokens served from cache'
|
|
42
|
+
},
|
|
43
|
+
cacheWriteTokens: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'Tokens written to cache'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
outputTokenDetails: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
description: 'Detailed breakdown of output token usage',
|
|
52
|
+
properties: {
|
|
53
|
+
textTokens: {
|
|
54
|
+
type: 'number',
|
|
55
|
+
description: 'Regular text output tokens'
|
|
56
|
+
},
|
|
57
|
+
reasoningTokens: {
|
|
58
|
+
type: 'number',
|
|
59
|
+
description: 'Extended thinking tokens'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
guardrailUnits: {
|
|
64
|
+
type: 'number',
|
|
65
|
+
description: 'Number of guardrail units consumed'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
required: ['service', 'model'],
|
|
69
|
+
additionalProperties: false
|
|
70
|
+
};
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import type { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly id: {
|
|
5
|
+
readonly type: "string";
|
|
6
|
+
readonly description: "The unique identifier for the agent session.";
|
|
7
|
+
};
|
|
8
|
+
readonly createdAt: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly description: "ISO8601 timestamp when the agent session was created";
|
|
11
|
+
readonly format: "date-time";
|
|
12
|
+
};
|
|
13
|
+
readonly updatedAt: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "ISO8601 timestamp when the agent session was updated";
|
|
16
|
+
readonly format: "date-time";
|
|
17
|
+
};
|
|
18
|
+
readonly agentName: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The name of the agent associated with this session.";
|
|
21
|
+
};
|
|
22
|
+
readonly projectId: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly description: "The ID of the project to which this agent session belongs.";
|
|
25
|
+
};
|
|
26
|
+
readonly schemaId: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly description: "The schema ID associated with the agent session, typically in the format \"production~projectId\".";
|
|
29
|
+
};
|
|
30
|
+
readonly schemaHash: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly description: "The hash of the schema version associated with the agent session.";
|
|
33
|
+
};
|
|
34
|
+
readonly done: {
|
|
35
|
+
readonly type: "boolean";
|
|
36
|
+
readonly description: "Indicates whether the agent session is completed.";
|
|
37
|
+
};
|
|
38
|
+
readonly suspended: {
|
|
39
|
+
readonly type: "boolean";
|
|
40
|
+
readonly description: "Indicates whether the agent session is suspended.";
|
|
41
|
+
};
|
|
42
|
+
readonly previousStateId: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly description: "The ID of the previous state in the agent session, if any.";
|
|
45
|
+
};
|
|
46
|
+
readonly currentStateId: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly description: "The ID of the current state in the agent session.";
|
|
49
|
+
};
|
|
50
|
+
readonly chatSessionIds: {
|
|
51
|
+
readonly type: "object";
|
|
52
|
+
readonly description: "A mapping of chat session IDs to their corresponding state IDs.";
|
|
53
|
+
};
|
|
54
|
+
readonly sessionMemory: {
|
|
55
|
+
readonly type: "object";
|
|
56
|
+
readonly description: "Memory associated with the agent session, which can be used to store stateful information.";
|
|
57
|
+
};
|
|
58
|
+
readonly hasAgentHistory: {
|
|
59
|
+
readonly type: "boolean";
|
|
60
|
+
readonly description: "Indicates whether the agent session has an associated history of agent responses.";
|
|
61
|
+
};
|
|
62
|
+
readonly hasFeedback: {
|
|
63
|
+
readonly type: "boolean";
|
|
64
|
+
readonly description: "Indicates whether the agent session has any messages with feedback.";
|
|
65
|
+
};
|
|
66
|
+
readonly suspend: {
|
|
67
|
+
readonly type: "boolean";
|
|
68
|
+
readonly description: "Indicates whether the agent session is suspended.";
|
|
69
|
+
};
|
|
70
|
+
readonly suspendedTransitionIndices: {
|
|
71
|
+
readonly type: "array";
|
|
72
|
+
readonly description: "An array of indices of suspended transitions in the agent session.";
|
|
73
|
+
readonly items: {
|
|
74
|
+
readonly type: "integer";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly firstMessageInput: {
|
|
78
|
+
readonly title: "TSAgentMessageInput";
|
|
79
|
+
readonly description: "The input schema for agent messages.";
|
|
80
|
+
readonly discriminator: {
|
|
81
|
+
readonly propertyName: "type";
|
|
82
|
+
};
|
|
83
|
+
readonly oneOf: [{
|
|
84
|
+
readonly title: "TSAgentMessageUnknownInput";
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly type: {
|
|
88
|
+
readonly const: "unknown";
|
|
89
|
+
};
|
|
90
|
+
readonly data: {};
|
|
91
|
+
};
|
|
92
|
+
readonly required: ["type", "data"];
|
|
93
|
+
readonly additionalProperties: false;
|
|
94
|
+
}, {
|
|
95
|
+
readonly title: "TSAgentMessageStringInput";
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly type: {
|
|
99
|
+
readonly const: "string";
|
|
100
|
+
};
|
|
101
|
+
readonly content: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly required: ["type", "content"];
|
|
106
|
+
readonly additionalProperties: false;
|
|
107
|
+
}];
|
|
108
|
+
};
|
|
109
|
+
readonly lastMessageOutput: {
|
|
110
|
+
readonly title: "TSAgentMessageOutput";
|
|
111
|
+
readonly description: "The output schema for agent messages.";
|
|
112
|
+
readonly discriminator: {
|
|
113
|
+
readonly propertyName: "type";
|
|
114
|
+
};
|
|
115
|
+
readonly oneOf: [{
|
|
116
|
+
readonly title: "TSAgentGenerateStateOutput";
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly properties: {
|
|
119
|
+
readonly type: {
|
|
120
|
+
readonly const: "generate";
|
|
121
|
+
};
|
|
122
|
+
readonly data: {};
|
|
123
|
+
};
|
|
124
|
+
readonly required: ["type", "data"];
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
}, {
|
|
127
|
+
readonly title: "TSAgentGraphQLStateOutput";
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly type: {
|
|
131
|
+
readonly const: "graphql";
|
|
132
|
+
};
|
|
133
|
+
readonly data: {};
|
|
134
|
+
};
|
|
135
|
+
readonly required: ["type", "data"];
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
}, {
|
|
138
|
+
readonly title: "TSAgentChatStateOutput";
|
|
139
|
+
readonly type: "object";
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly type: {
|
|
142
|
+
readonly const: "chat";
|
|
143
|
+
};
|
|
144
|
+
readonly data: {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly content: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly artifact: {
|
|
151
|
+
readonly type: "object";
|
|
152
|
+
};
|
|
153
|
+
readonly references: {
|
|
154
|
+
readonly type: "array";
|
|
155
|
+
readonly items: {
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly properties: {
|
|
158
|
+
readonly _tid: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly required: ["_tid"];
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly required: ["content", "references"];
|
|
168
|
+
readonly additionalProperties: false;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
readonly required: ["type", "data"];
|
|
172
|
+
readonly additionalProperties: false;
|
|
173
|
+
}, {
|
|
174
|
+
readonly title: "TSAgentUnknownStateOutput";
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly type: {
|
|
178
|
+
readonly const: "unknown";
|
|
179
|
+
};
|
|
180
|
+
readonly data: {};
|
|
181
|
+
};
|
|
182
|
+
readonly required: ["type", "data"];
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
}];
|
|
185
|
+
};
|
|
186
|
+
readonly totalTokens: {
|
|
187
|
+
readonly type: "number";
|
|
188
|
+
readonly description: "The total number of tokens used in the agent session.";
|
|
189
|
+
};
|
|
190
|
+
readonly domain: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly description: "The domain from which the agent session was created (e.g., \"shop.example.com\", \"app.takeshape.io\").";
|
|
193
|
+
};
|
|
194
|
+
readonly takeshapeUserId: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly description: "The TakeShape user ID if the session was created by a TakeShape user (via JWT or PAT).";
|
|
197
|
+
};
|
|
198
|
+
readonly usage: {
|
|
199
|
+
readonly type: "array";
|
|
200
|
+
readonly description: "Itemized token usage breakdown by service and model across all messages";
|
|
201
|
+
readonly items: {
|
|
202
|
+
readonly title: "TSAiUsageItem";
|
|
203
|
+
readonly type: "object";
|
|
204
|
+
readonly description: "Token usage breakdown for a single service and model";
|
|
205
|
+
readonly properties: {
|
|
206
|
+
readonly service: {
|
|
207
|
+
readonly type: "string";
|
|
208
|
+
readonly description: "The AI service provider (e.g., \"openai\", \"anthropic\")";
|
|
209
|
+
};
|
|
210
|
+
readonly model: {
|
|
211
|
+
readonly type: "string";
|
|
212
|
+
readonly description: "The model identifier (e.g., \"gpt-4\", \"claude-3-opus\")";
|
|
213
|
+
};
|
|
214
|
+
readonly inputTokens: {
|
|
215
|
+
readonly type: "number";
|
|
216
|
+
readonly description: "Number of input/prompt tokens consumed";
|
|
217
|
+
};
|
|
218
|
+
readonly outputTokens: {
|
|
219
|
+
readonly type: "number";
|
|
220
|
+
readonly description: "Number of output/completion tokens generated";
|
|
221
|
+
};
|
|
222
|
+
readonly totalTokens: {
|
|
223
|
+
readonly type: "number";
|
|
224
|
+
readonly description: "Total tokens (input + output)";
|
|
225
|
+
};
|
|
226
|
+
readonly inputTokenDetails: {
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly description: "Detailed breakdown of input token usage";
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly noCacheTokens: {
|
|
231
|
+
readonly type: "number";
|
|
232
|
+
readonly description: "Tokens not using cache";
|
|
233
|
+
};
|
|
234
|
+
readonly cacheReadTokens: {
|
|
235
|
+
readonly type: "number";
|
|
236
|
+
readonly description: "Tokens served from cache";
|
|
237
|
+
};
|
|
238
|
+
readonly cacheWriteTokens: {
|
|
239
|
+
readonly type: "number";
|
|
240
|
+
readonly description: "Tokens written to cache";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
readonly outputTokenDetails: {
|
|
245
|
+
readonly type: "object";
|
|
246
|
+
readonly description: "Detailed breakdown of output token usage";
|
|
247
|
+
readonly properties: {
|
|
248
|
+
readonly textTokens: {
|
|
249
|
+
readonly type: "number";
|
|
250
|
+
readonly description: "Regular text output tokens";
|
|
251
|
+
};
|
|
252
|
+
readonly reasoningTokens: {
|
|
253
|
+
readonly type: "number";
|
|
254
|
+
readonly description: "Extended thinking tokens";
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
readonly guardrailUnits: {
|
|
259
|
+
readonly type: "number";
|
|
260
|
+
readonly description: "Number of guardrail units consumed";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
readonly required: ["service", "model"];
|
|
264
|
+
readonly additionalProperties: false;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
readonly required: ["id", "agentName", "createdAt", "updatedAt", "done", "currentStateId", "chatSessionIds", "sessionMemory", "hasAgentHistory", "hasFeedback", "suspend", "projectId", "schemaId", "schemaHash", "totalTokens"];
|
|
269
|
+
readonly additionalProperties: false;
|
|
270
|
+
readonly title: "TSAgentSession";
|
|
271
|
+
readonly type: "object";
|
|
272
|
+
};
|
|
273
|
+
export type CreateAgentSessionResponse = FromSchema<typeof schema>;
|
|
274
|
+
export declare function createUserShapeSchema(): {
|
|
275
|
+
'@ref': string;
|
|
276
|
+
};
|