@vm0/cli 9.276.3 → 9.277.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/{agent-DVXFZD4R.js → agent-X7ZNZPOX.js} +5 -5
- package/{banking-EJVF4KKJ.js → banking-KGL4A62H.js} +4 -4
- package/{browser-6NCHD7HI.js → browser-MWEZPQ7O.js} +4 -4
- package/{chat-YTXE3G2X.js → chat-OT3H62CI.js} +5 -5
- package/{chunk-5IGKA7BS.js → chunk-4GLJF77C.js} +20 -8
- package/chunk-4GLJF77C.js.map +1 -0
- package/{chunk-DC4HTHC2.js → chunk-7572GO27.js} +4 -4
- package/{chunk-3CNC4K2X.js → chunk-AIHN2SKV.js} +2 -2
- package/{chunk-B7TK7FO4.js → chunk-H6BEDAS4.js} +56 -5
- package/{chunk-B7TK7FO4.js.map → chunk-H6BEDAS4.js.map} +1 -1
- package/{chunk-5GQGFQJ3.js → chunk-IL2KMIJJ.js} +24 -10
- package/chunk-IL2KMIJJ.js.map +1 -0
- package/{chunk-2QVU2TRP.js → chunk-NEXYY3VO.js} +2 -2
- package/{chunk-2QVU2TRP.js.map → chunk-NEXYY3VO.js.map} +1 -1
- package/{chunk-ONHQ3KTK.js → chunk-SGSECC77.js} +2 -2
- package/{chunk-BDOANREY.js → chunk-WHCP2H2S.js} +6 -7
- package/chunk-WHCP2H2S.js.map +1 -0
- package/{chunk-VUCHS2QO.js → chunk-XO3YWKZB.js} +2 -2
- package/{computer-use-VDP6IPBW.js → computer-use-4QXDRG4V.js} +4 -4
- package/{connector-ODH6PC2R.js → connector-SXSAS4PE.js} +6 -6
- package/{credit-B7YTX5LO.js → credit-CKHMOX6F.js} +5 -5
- package/{developer-support-RNIEBQEO.js → developer-support-QBGR6BJO.js} +4 -4
- package/{doctor-GMFAPWIO.js → doctor-EA7ECFIO.js} +5 -5
- package/{feishu-FQDCRBBC.js → feishu-4N7IWJJV.js} +4 -4
- package/{finance-UW6ILMND.js → finance-KQS5IPPY.js} +4 -4
- package/{generate-KJTVWXNA.js → generate-ALYUA6F7.js} +6 -6
- package/{github-OMF7MJWS.js → github-MXA236XO.js} +4 -4
- package/{goal-MTAJWPOE.js → goal-RK2DOCPU.js} +4 -4
- package/{host-LR6CEAS5.js → host-4NZXR7RE.js} +4 -4
- package/{logs-EQTVJIBB.js → logs-E4T5GFFU.js} +6 -6
- package/{mail-3CCW73GS.js → mail-AS3PMC7N.js} +6 -6
- package/{maps-SXFI36KF.js → maps-GFGMODQZ.js} +4 -4
- package/{model-T2F74FZP.js → model-AJIZ5IVT.js} +5 -5
- package/{model-provider-EZQMWLK5.js → model-provider-RBY4EVBH.js} +5 -5
- package/{org-7S3MA3MB.js → org-OUHCBZOO.js} +11 -8
- package/org-OUHCBZOO.js.map +1 -0
- package/package.json +1 -1
- package/{people-search-W5F5F2SS.js → people-search-PZQZLLSA.js} +4 -4
- package/{phone-L3B7FH3Q.js → phone-X756PGVQ.js} +4 -4
- package/{recognize-UDSXFIX3.js → recognize-P7QG3HXA.js} +4 -4
- package/{resource-S7HFVWBC.js → resource-5LCV4HM6.js} +4 -4
- package/{scrape-AOXC7B6D.js → scrape-6ZQMKQNG.js} +4 -4
- package/{search-I6I3MO7W.js → search-ZJJINEQB.js} +6 -6
- package/{slack-ODGAN7LF.js → slack-Z6WENJ2P.js} +4 -4
- package/{teams-6YLFS2F4.js → teams-ZAMCSLKG.js} +4 -4
- package/{telegram-3XTVZBV5.js → telegram-XJMUTZLB.js} +4 -4
- package/{upgrade-TNYSAH6M.js → upgrade-3DANFB33.js} +3 -3
- package/{video-B4LQFRHZ.js → video-QC32QN57.js} +3 -3
- package/{weather-ODGUO3UI.js → weather-CWWT2KDJ.js} +4 -4
- package/{web-Z6AD6JJE.js → web-5K2IPPWW.js} +4 -4
- package/{web-search-ZVHXNBO5.js → web-search-DBJMZGK4.js} +4 -4
- package/{whoami-23NVQ5FU.js → whoami-HPT36I55.js} +5 -5
- package/{workflow-6SRSR3RV.js → workflow-27BFGSGL.js} +5 -5
- package/zero.js +58 -46
- package/zero.js.map +1 -1
- package/chunk-5GQGFQJ3.js.map +0 -1
- package/chunk-5IGKA7BS.js.map +0 -1
- package/chunk-BDOANREY.js.map +0 -1
- package/org-7S3MA3MB.js.map +0 -1
- /package/{agent-DVXFZD4R.js.map → agent-X7ZNZPOX.js.map} +0 -0
- /package/{banking-EJVF4KKJ.js.map → banking-KGL4A62H.js.map} +0 -0
- /package/{browser-6NCHD7HI.js.map → browser-MWEZPQ7O.js.map} +0 -0
- /package/{chat-YTXE3G2X.js.map → chat-OT3H62CI.js.map} +0 -0
- /package/{chunk-DC4HTHC2.js.map → chunk-7572GO27.js.map} +0 -0
- /package/{chunk-3CNC4K2X.js.map → chunk-AIHN2SKV.js.map} +0 -0
- /package/{chunk-ONHQ3KTK.js.map → chunk-SGSECC77.js.map} +0 -0
- /package/{chunk-VUCHS2QO.js.map → chunk-XO3YWKZB.js.map} +0 -0
- /package/{computer-use-VDP6IPBW.js.map → computer-use-4QXDRG4V.js.map} +0 -0
- /package/{connector-ODH6PC2R.js.map → connector-SXSAS4PE.js.map} +0 -0
- /package/{credit-B7YTX5LO.js.map → credit-CKHMOX6F.js.map} +0 -0
- /package/{developer-support-RNIEBQEO.js.map → developer-support-QBGR6BJO.js.map} +0 -0
- /package/{doctor-GMFAPWIO.js.map → doctor-EA7ECFIO.js.map} +0 -0
- /package/{feishu-FQDCRBBC.js.map → feishu-4N7IWJJV.js.map} +0 -0
- /package/{finance-UW6ILMND.js.map → finance-KQS5IPPY.js.map} +0 -0
- /package/{generate-KJTVWXNA.js.map → generate-ALYUA6F7.js.map} +0 -0
- /package/{github-OMF7MJWS.js.map → github-MXA236XO.js.map} +0 -0
- /package/{goal-MTAJWPOE.js.map → goal-RK2DOCPU.js.map} +0 -0
- /package/{host-LR6CEAS5.js.map → host-4NZXR7RE.js.map} +0 -0
- /package/{logs-EQTVJIBB.js.map → logs-E4T5GFFU.js.map} +0 -0
- /package/{mail-3CCW73GS.js.map → mail-AS3PMC7N.js.map} +0 -0
- /package/{maps-SXFI36KF.js.map → maps-GFGMODQZ.js.map} +0 -0
- /package/{model-T2F74FZP.js.map → model-AJIZ5IVT.js.map} +0 -0
- /package/{model-provider-EZQMWLK5.js.map → model-provider-RBY4EVBH.js.map} +0 -0
- /package/{people-search-W5F5F2SS.js.map → people-search-PZQZLLSA.js.map} +0 -0
- /package/{phone-L3B7FH3Q.js.map → phone-X756PGVQ.js.map} +0 -0
- /package/{recognize-UDSXFIX3.js.map → recognize-P7QG3HXA.js.map} +0 -0
- /package/{resource-S7HFVWBC.js.map → resource-5LCV4HM6.js.map} +0 -0
- /package/{scrape-AOXC7B6D.js.map → scrape-6ZQMKQNG.js.map} +0 -0
- /package/{search-I6I3MO7W.js.map → search-ZJJINEQB.js.map} +0 -0
- /package/{slack-ODGAN7LF.js.map → slack-Z6WENJ2P.js.map} +0 -0
- /package/{teams-6YLFS2F4.js.map → teams-ZAMCSLKG.js.map} +0 -0
- /package/{telegram-3XTVZBV5.js.map → telegram-XJMUTZLB.js.map} +0 -0
- /package/{upgrade-TNYSAH6M.js.map → upgrade-3DANFB33.js.map} +0 -0
- /package/{video-B4LQFRHZ.js.map → video-QC32QN57.js.map} +0 -0
- /package/{weather-ODGUO3UI.js.map → weather-CWWT2KDJ.js.map} +0 -0
- /package/{web-Z6AD6JJE.js.map → web-5K2IPPWW.js.map} +0 -0
- /package/{web-search-ZVHXNBO5.js.map → web-search-DBJMZGK4.js.map} +0 -0
- /package/{whoami-23NVQ5FU.js.map → whoami-HPT36I55.js.map} +0 -0
- /package/{workflow-6SRSR3RV.js.map → workflow-27BFGSGL.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js","../../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js","../src/lib/utils/time-parser.ts","../../../packages/core/src/frameworks.ts","../src/lib/events/event-stream-normalizer.ts","../src/lib/events/event-parser-factory.ts","../../../packages/core/src/index.ts","../../../packages/core/src/variable-expander.ts","../../../packages/core/src/usage-source-bucket.ts","../../../packages/core/src/presentation-template-items.ts","../../../packages/core/src/illustration-template-items.ts","../../../packages/core/src/video-template-items.ts","../../../packages/core/src/workflow-template-items.ts","../../../packages/core/src/r2-image-transform.ts","../../../packages/core/src/contracts/index.ts","../../../packages/api-contracts/src/contracts/index.ts","../../../packages/api-contracts/src/contracts/build-info.ts","../../../packages/api-contracts/src/contracts/health.ts","../../../packages/api-contracts/src/contracts/desktop-auth.ts","../../../packages/api-contracts/src/contracts/composes.ts","../../../packages/api-contracts/src/contracts/test-agent-composes.ts","../../../packages/api-contracts/src/contracts/test-agent-runs.ts","../../../packages/api-contracts/src/contracts/zero-model-provider-gateways.ts","../../../packages/api-contracts/src/contracts/zero-user-model-preference.ts","../../../packages/api-contracts/src/contracts/presentation-images.ts","../../../packages/api-contracts/src/contracts/test-teams-dispatch-probe.ts","../../../packages/api-contracts/src/contracts/zero-email.ts","../../../packages/api-contracts/src/contracts/cli-auth.ts","../../../packages/api-contracts/src/contracts/auth.ts","../../../packages/api-contracts/src/contracts/user-export.ts","../../../packages/api-contracts/src/contracts/email-unsubscribe.ts","../../../packages/api-contracts/src/contracts/zero-morning-brief.ts","../../../packages/api-contracts/src/contracts/email-morning-brief-unsubscribe.ts","../../../packages/api-contracts/src/contracts/test-oauth-provider-authorize.ts","../../../packages/api-contracts/src/contracts/test-oauth-provider-echo.ts","../../../packages/api-contracts/src/contracts/test-oauth-provider-token.ts","../../../packages/api-contracts/src/contracts/test-oauth-provider-device-auth.ts","../../../packages/api-contracts/src/contracts/test-oauth-provider-userinfo.ts","../../../packages/api-contracts/src/contracts/test-computer-use-state.ts","../../../packages/api-contracts/src/contracts/test-runtime-state.ts","../../../packages/api-contracts/src/contracts/test-zero-agent-state.ts","../../../packages/api-contracts/src/contracts/test-model-provider-state.ts","../../../packages/api-contracts/src/contracts/test-mail-draft-state.ts","../../../packages/api-contracts/src/contracts/test-usage-insight-state.ts","../../../packages/api-contracts/src/contracts/test-usage-settlement.ts","../../../packages/api-contracts/src/contracts/test-cron-cleanup-sandboxes-state.ts","../../../packages/api-contracts/src/contracts/test-slack-state.ts","../../../packages/api-contracts/src/contracts/test-slack-mock.ts","../../../packages/api-contracts/src/contracts/test-telegram-mock.ts","../../../packages/api-contracts/src/contracts/test-teams-mock.ts","../../../packages/api-contracts/src/contracts/test-teams-state.ts","../../../packages/api-contracts/src/contracts/test-telegram-state.ts","../../../packages/api-contracts/src/contracts/cron.ts","../../../packages/api-contracts/src/contracts/artifact-catalog.ts","../../../packages/connectors/src/firewall-expander.ts","../../../packages/connectors/src/firewall-rule-matcher.ts","../../../packages/api-contracts/src/contracts/zero-user-preferences.ts","../../../packages/api-contracts/src/contracts/zero-feature-switches.ts","../../../packages/api-contracts/src/contracts/onboarding.ts","../../../packages/api-contracts/src/contracts/skills.ts","../../../packages/api-contracts/src/contracts/zero-codex-device-auth.ts","../../../packages/api-contracts/src/contracts/zero-claude-code-device-auth.ts","../../../packages/api-contracts/src/contracts/zero-org-logo.ts","../../../packages/api-contracts/src/contracts/zero-composes.ts","../../../packages/api-contracts/src/contracts/zero-personal-model-providers.ts","../../../packages/api-contracts/src/contracts/integrations-github.ts","../../../packages/api-contracts/src/contracts/github-oauth.ts","../../../packages/api-contracts/src/contracts/zero-usage.ts","../../../packages/api-contracts/src/contracts/zero-usage-record.ts","../../../packages/api-contracts/src/contracts/zero-usage-daily.ts","../../../packages/api-contracts/src/contracts/zero-usage-insight.ts","../../../packages/api-contracts/src/contracts/usage.ts","../../../packages/api-contracts/src/contracts/zero-team.ts","../../../packages/api-contracts/src/contracts/zero-integrations-slack.ts","../../../packages/api-contracts/src/contracts/zero-slack-connect.ts","../../../packages/api-contracts/src/contracts/zero-slack-commands.ts","../../../packages/api-contracts/src/contracts/zero-slack-events.ts","../../../packages/api-contracts/src/contracts/zero-teams-bot.ts","../../../packages/api-contracts/src/contracts/zero-teams-connect.ts","../../../packages/api-contracts/src/contracts/zero-teams-browser-connect.ts","../../../packages/api-contracts/src/contracts/zero-teams-oauth.ts","../../../packages/api-contracts/src/contracts/zero-slack-interactive.ts","../../../packages/api-contracts/src/contracts/zero-slack-oauth.ts","../../../packages/api-contracts/src/contracts/zero-slack-channels.ts","../../../packages/api-contracts/src/contracts/zero-queue-position.ts","../../../packages/api-contracts/src/contracts/zero-report-error.ts","../../../packages/api-contracts/src/contracts/zero-insights.ts","../../../packages/api-contracts/src/contracts/push-subscriptions.ts","../../../packages/api-contracts/src/contracts/zero-image-io-generate.ts","../../../packages/api-contracts/src/contracts/zero-image-io-interpret-marks.ts","../../../packages/api-contracts/src/contracts/zero-image-share-x.ts","../../../packages/api-contracts/src/contracts/zero-banking.ts","../../../packages/api-contracts/src/contracts/zero-maps.ts","../../../packages/api-contracts/src/contracts/zero-weather.ts","../../../packages/api-contracts/src/contracts/zero-video-io-generate.ts","../../../packages/api-contracts/src/contracts/zero-voice-io-quota.ts","../../../packages/api-contracts/src/contracts/zero-voice-io-speech.ts","../../../packages/api-contracts/src/contracts/zero-voice-io-stt.ts","../../../packages/api-contracts/src/contracts/zero-uploads.ts","../../../packages/api-contracts/src/contracts/zero-integrations-telegram.ts","../../../packages/api-contracts/src/contracts/zero-integrations-agentphone.ts","../../../packages/core/src/org-reference.ts","../../../packages/core/src/version-id.ts","../../../packages/core/src/storage-names.ts","../../../packages/core/src/github-url.ts","../../../packages/core/src/staff-org.ts","../../../packages/core/src/skill-frontmatter.ts","../../../packages/core/src/instructions-frontmatter.ts","../../../packages/core/src/timezone.ts","../../../packages/core/src/log-utils.ts","../../../packages/core/src/zero-workflow-skill.ts","../src/lib/events/claude-event-parser.ts","../src/lib/events/codex-event-parser.ts","../src/lib/events/event-renderer.ts","../src/lib/events/tool-formatters.ts","../src/lib/utils/search-query.ts","../src/commands/zero/logs/search.ts"],"sourcesContent":["'use strict';\n\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexports.ALIAS = ALIAS;\nexports.DOC = DOC;\nexports.MAP = MAP;\nexports.NODE_TYPE = NODE_TYPE;\nexports.PAIR = PAIR;\nexports.SCALAR = SCALAR;\nexports.SEQ = SEQ;\nexports.hasAnchor = hasAnchor;\nexports.isAlias = isAlias;\nexports.isCollection = isCollection;\nexports.isDocument = isDocument;\nexports.isMap = isMap;\nexports.isNode = isNode;\nexports.isPair = isPair;\nexports.isScalar = isScalar;\nexports.isSeq = isSeq;\n","'use strict';\n\nvar identity = require('./nodes/identity.js');\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (identity.isMap(node))\n return visitor.Map?.(key, node, path);\n if (identity.isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (identity.isPair(node))\n return visitor.Pair?.(key, node, path);\n if (identity.isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (identity.isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (identity.isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (identity.isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (identity.isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = identity.isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexports.visit = visit;\nexports.visitAsync = visitAsync;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n const tags = {};\n visit.visit(doc.contents, (_key, node) => {\n if (identity.isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexports.Directives = Directives;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit.visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n prevAnchors ?? (prevAnchors = anchorNames(doc));\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexports.anchorIsValid = anchorIsValid;\nexports.anchorNames = anchorNames;\nexports.createNodeAnchors = createNodeAnchors;\nexports.findNewAnchor = findNewAnchor;\n","'use strict';\n\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexports.applyReviver = applyReviver;\n","'use strict';\n\nvar identity = require('./identity.js');\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !identity.hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexports.toJS = toJS;\n","'use strict';\n\nvar applyReviver = require('../doc/applyReviver.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!identity.isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexports.NodeBase = NodeBase;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar visit = require('../visit.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nclass Alias extends Node.NodeBase {\n constructor(source) {\n super(identity.ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc, ctx) {\n let nodes;\n if (ctx?.aliasResolveCache) {\n nodes = ctx.aliasResolveCache;\n }\n else {\n nodes = [];\n visit.visit(doc, {\n Node: (_key, node) => {\n if (identity.isAlias(node) || identity.hasAnchor(node))\n nodes.push(node);\n }\n });\n if (ctx)\n ctx.aliasResolveCache = nodes;\n }\n let found = undefined;\n for (const node of nodes) {\n if (node === this)\n break;\n if (node.anchor === this.source)\n found = node;\n }\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc, ctx);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS.toJS(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (data?.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchors.anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (identity.isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (identity.isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (identity.isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexports.Alias = Alias;\n","'use strict';\n\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends Node.NodeBase {\n constructor(value) {\n super(identity.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexports.Scalar = Scalar;\nexports.isScalarValue = isScalarValue;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (identity.isDocument(value))\n value = value.contents;\n if (identity.isNode(value))\n return value;\n if (identity.isPair(value)) {\n const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n ref.anchor ?? (ref.anchor = onAnchor(value));\n return new Alias.Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar.Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[identity.MAP]\n : Symbol.iterator in Object(value)\n ? schema[identity.SEQ]\n : schema[identity.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexports.createNode = createNode;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode.createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends Node.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (identity.isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && identity.isScalar(node) ? node.value : node;\n else\n return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!identity.isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n identity.isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return identity.isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexports.Collection = Collection;\nexports.collectionFromPath = collectionFromPath;\nexports.isEmptyPath = isEmptyPath;\n","'use strict';\n\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexports.indentComment = indentComment;\nexports.lineComment = lineComment;\nexports.stringifyComment = stringifyComment;\n","'use strict';\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexports.FOLD_BLOCK = FOLD_BLOCK;\nexports.FOLD_FLOW = FOLD_FLOW;\nexports.FOLD_QUOTED = FOLD_QUOTED;\nexports.foldFlowLines = foldFlowLines;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar foldFlowLines = require('./foldFlowLines.js');\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n // Leading | or > is added later\n let header = (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (!literal) {\n const foldedValue = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n let literalFallback = false;\n const foldOptions = getFoldOptions(ctx, true);\n if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) {\n foldOptions.onOverflow = () => {\n literalFallback = true;\n };\n }\n const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);\n if (!literalFallback)\n return `>${header}\\n${indent}${body}`;\n }\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `|${header}\\n${indent}${start}${value}${end}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.Scalar.BLOCK_FOLDED:\n case Scalar.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexports.stringifyString = stringifyString;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar identity = require('../nodes/identity.js');\nvar stringifyComment = require('./stringifyComment.js');\nvar stringifyString = require('./stringifyString.js');\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment.stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trailingComma: false,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (identity.isScalar(item)) {\n obj = item.value;\n let match = tags.filter(t => t.identify?.(obj));\n if (match.length > 1) {\n const testMatch = match.filter(t => t.test);\n if (testMatch.length > 0)\n match = testMatch;\n }\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (identity.isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (identity.isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = identity.isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : identity.isScalar(node)\n ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return identity.isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexports.createStringifyContext = createStringifyContext;\nexports.stringify = stringify;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (identity.isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n identity.isCollection(key) ||\n (identity.isScalar(key)\n ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (identity.isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && identity.isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n identity.isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n' && valueComment)\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && identity.isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexports.stringifyPair = stringifyPair;\n","'use strict';\n\nvar node_process = require('process');\n\nfunction debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n if (typeof node_process.emitWarning === 'function')\n node_process.emitWarning(warning);\n else\n console.warn(warning);\n }\n}\n\nexports.debug = debug;\nexports.warn = warn;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Scalar = require('../../nodes/Scalar.js');\n\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nconst MERGE_KEY = '<<';\nconst merge = {\n identify: value => value === MERGE_KEY ||\n (typeof value === 'symbol' && value.description === MERGE_KEY),\n default: 'key',\n tag: 'tag:yaml.org,2002:merge',\n test: /^<<$/,\n resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {\n addToJSMap: addMergeToJSMap\n }),\n stringify: () => MERGE_KEY\n};\nconst isMergeKey = (ctx, key) => (merge.identify(key) ||\n (identity.isScalar(key) &&\n (!key.type || key.type === Scalar.Scalar.PLAIN) &&\n merge.identify(key.value))) &&\n ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);\nfunction addMergeToJSMap(ctx, map, value) {\n value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (identity.isSeq(value))\n for (const it of value.items)\n mergeValue(ctx, map, it);\n else if (Array.isArray(value))\n for (const it of value)\n mergeValue(ctx, map, it);\n else\n mergeValue(ctx, map, value);\n}\nfunction mergeValue(ctx, map, value) {\n const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;\n if (!identity.isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\n\nexports.addMergeToJSMap = addMergeToJSMap;\nexports.isMergeKey = isMergeKey;\nexports.merge = merge;\n","'use strict';\n\nvar log = require('../log.js');\nvar merge = require('../schema/yaml-1.1/merge.js');\nvar stringify = require('../stringify/stringify.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (identity.isNode(key) && key.addToJSMap)\n key.addToJSMap(ctx, map, value);\n // TODO: Should drop this special case for bare << handling\n else if (merge.isMergeKey(ctx, key))\n merge.addMergeToJSMap(ctx, map, value);\n else {\n const jsKey = toJS.toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS.toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (identity.isNode(key) && ctx?.doc) {\n const strCtx = stringify.createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexports.addPairToJSMap = addPairToJSMap;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyPair = require('../stringify/stringifyPair.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar identity = require('./identity.js');\n\nfunction createPair(key, value, ctx) {\n const k = createNode.createNode(key, undefined, ctx);\n const v = createNode.createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (identity.isNode(key))\n key = key.clone(schema);\n if (identity.isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexports.Pair = Pair;\nexports.createPair = createPair;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + stringifyComment.indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = identity.isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify.stringify(item, itemCtx, () => (comment = null));\n reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\\n'));\n if (i < items.length - 1) {\n str += ',';\n }\n else if (ctx.options.trailingComma) {\n if (ctx.options.lineWidth > 0) {\n reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +\n (str.length + 2) >\n ctx.options.lineWidth);\n }\n if (reqNewline) {\n str += ',';\n }\n }\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = stringifyComment.indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexports.stringifyCollection = stringifyCollection;\n","'use strict';\n\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Pair = require('./Pair.js');\nvar Scalar = require('./Scalar.js');\n\nfunction findPair(items, key) {\n const k = identity.isScalar(key) ? key.value : key;\n for (const it of items) {\n if (identity.isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (identity.isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(identity.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(Pair.createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (identity.isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair.Pair(pair, pair?.value);\n }\n else\n _pair = new Pair.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap.addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!identity.isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexports.YAMLMap = YAMLMap;\nexports.findPair = findPair;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!identity.isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n};\n\nexports.map = map;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nclass YAMLSeq extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(identity.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && identity.isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS.toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode.createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = identity.isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexports.YAMLSeq = YAMLSeq;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!identity.isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n};\n\nexports.seq = seq;\n","'use strict';\n\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexports.string = string;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexports.nullTag = nullTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexports.boolTag = boolTag;\n","'use strict';\n\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^\\d/.test(n)) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexports.stringifyNumber = stringifyNumber;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber.stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.boolTag,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar map = require('../common/map.js');\nvar seq = require('../common/seq.js');\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true$|^false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n\nexports.schema = schema;\n","'use strict';\n\nvar node_buffer = require('buffer');\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof node_buffer.Buffer === 'function') {\n return node_buffer.Buffer.from(src, 'base64');\n }\n else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n if (!value)\n return '';\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof node_buffer.Buffer === 'function') {\n str =\n buf instanceof node_buffer.Buffer\n ? buf.toString('base64')\n : node_buffer.Buffer.from(buf.buffer).toString('base64');\n }\n else if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n type ?? (type = Scalar.Scalar.BLOCK_LITERAL);\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexports.binary = binary;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar Scalar = require('../../nodes/Scalar.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nfunction resolvePairs(seq, onError) {\n if (identity.isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (identity.isPair(item))\n continue;\n else if (identity.isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(Pair.createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexports.createPairs = createPairs;\nexports.pairs = pairs;\nexports.resolvePairs = resolvePairs;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar toJS = require('../../nodes/toJS.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\nvar pairs = require('./pairs.js');\n\nclass YAMLOMap extends YAMLSeq.YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (identity.isPair(pair)) {\n key = toJS.toJS(pair.key, '', ctx);\n value = toJS.toJS(pair.value, key, ctx);\n }\n else {\n key = toJS.toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs$1.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs$1 = pairs.resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs$1.items) {\n if (identity.isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs$1);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexports.YAMLOMap = YAMLOMap;\nexports.omap = omap;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar.Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar.Scalar(false),\n stringify: boolStringify\n};\n\nexports.falseTag = falseTag;\nexports.trueTag = trueTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber.stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intBin = intBin;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nclass YAMLSet extends YAMLMap.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (identity.isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair.Pair(key.key, null);\n else\n pair = new Pair.Pair(key, null);\n const prev = YAMLMap.findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = YAMLMap.findPair(this.items, key);\n return !keepPair && identity.isPair(pair)\n ? identity.isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = YAMLMap.findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(Pair.createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (identity.isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexports.YAMLSet = YAMLSet;\nexports.set = set;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber.stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, '') ?? ''\n};\n\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.timestamp = timestamp;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar binary = require('./binary.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\nvar merge = require('./merge.js');\nvar omap = require('./omap.js');\nvar pairs = require('./pairs.js');\nvar set = require('./set.js');\nvar timestamp = require('./timestamp.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.trueTag,\n bool.falseTag,\n int.intBin,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float,\n binary.binary,\n merge.merge,\n omap.omap,\n pairs.pairs,\n set.set,\n timestamp.intTime,\n timestamp.floatTime,\n timestamp.timestamp\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar map = require('./common/map.js');\nvar _null = require('./common/null.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar bool = require('./core/bool.js');\nvar float = require('./core/float.js');\nvar int = require('./core/int.js');\nvar schema = require('./core/schema.js');\nvar schema$1 = require('./json/schema.js');\nvar binary = require('./yaml-1.1/binary.js');\nvar merge = require('./yaml-1.1/merge.js');\nvar omap = require('./yaml-1.1/omap.js');\nvar pairs = require('./yaml-1.1/pairs.js');\nvar schema$2 = require('./yaml-1.1/schema.js');\nvar set = require('./yaml-1.1/set.js');\nvar timestamp = require('./yaml-1.1/timestamp.js');\n\nconst schemas = new Map([\n ['core', schema.schema],\n ['failsafe', [map.map, seq.seq, string.string]],\n ['json', schema$1.schema],\n ['yaml11', schema$2.schema],\n ['yaml-1.1', schema$2.schema]\n]);\nconst tagsByName = {\n binary: binary.binary,\n bool: bool.boolTag,\n float: float.float,\n floatExp: float.floatExp,\n floatNaN: float.floatNaN,\n floatTime: timestamp.floatTime,\n int: int.int,\n intHex: int.intHex,\n intOct: int.intOct,\n intTime: timestamp.intTime,\n map: map.map,\n merge: merge.merge,\n null: _null.nullTag,\n omap: omap.omap,\n pairs: pairs.pairs,\n seq: seq.seq,\n set: set.set,\n timestamp: timestamp.timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary.binary,\n 'tag:yaml.org,2002:merge': merge.merge,\n 'tag:yaml.org,2002:omap': omap.omap,\n 'tag:yaml.org,2002:pairs': pairs.pairs,\n 'tag:yaml.org,2002:set': set.set,\n 'tag:yaml.org,2002:timestamp': timestamp.timestamp\n};\nfunction getTags(customTags, schemaName, addMergeTag) {\n const schemaTags = schemas.get(schemaName);\n if (schemaTags && !customTags) {\n return addMergeTag && !schemaTags.includes(merge.merge)\n ? schemaTags.concat(merge.merge)\n : schemaTags.slice();\n }\n let tags = schemaTags;\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n if (addMergeTag)\n tags = tags.concat(merge.merge);\n return tags.reduce((tags, tag) => {\n const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;\n if (!tagObj) {\n const tagName = JSON.stringify(tag);\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n }\n if (!tags.includes(tagObj))\n tags.push(tagObj);\n return tags;\n }, []);\n}\n\nexports.coreKnownTags = coreKnownTags;\nexports.getTags = getTags;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar map = require('./common/map.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar tags = require('./tags.js');\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? tags.getTags(compat, 'compat')\n : compat\n ? tags.getTags(null, compat)\n : null;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n this.tags = tags.getTags(customTags, this.name, merge);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, identity.MAP, { value: map.map });\n Object.defineProperty(this, identity.SCALAR, { value: string.string });\n Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexports.Schema = Schema;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = stringify.createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(stringifyComment.indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (identity.isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += stringifyComment.lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify.stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(stringifyComment.indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexports.stringifyDocument = stringifyDocument;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar Collection = require('../nodes/Collection.js');\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar toJS = require('../nodes/toJS.js');\nvar Schema = require('../schema/Schema.js');\nvar stringifyDocument = require('../stringify/stringifyDocument.js');\nvar anchors = require('./anchors.js');\nvar applyReviver = require('./applyReviver.js');\nvar createNode = require('./createNode.js');\nvar directives = require('./directives.js');\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n stringKeys: false,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new directives.Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [identity.NODE_TYPE]: { value: identity.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = identity.isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchors.anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode.createNode(value, tag, ctx);\n if (flow && identity.isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (Collection.isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return identity.isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (Collection.isEmptyPath(path))\n return !keepScalar && identity.isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return identity.isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (Collection.isEmptyPath(path))\n return this.contents !== undefined;\n return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new directives.Directives({ version: '1.1' });\n opt = { resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new directives.Directives({ version });\n opt = { resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument.stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (identity.isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexports.Document = Document;\n","'use strict';\n\nclass YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end?.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexports.YAMLError = YAMLError;\nexports.YAMLParseError = YAMLParseError;\nexports.YAMLWarning = YAMLWarning;\nexports.prettifyError = prettifyError;\n","'use strict';\n\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else if (!found || indicator !== 'seq-item-ind')\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexports.resolveProps = resolveProps;\n","'use strict';\n\nfunction containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexports.containsNewline = containsNewline;\n","'use strict';\n\nvar utilContainsNewline = require('./util-contains-newline.js');\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n utilContainsNewline.containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexports.flowIndentCheck = flowIndentCheck;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value);\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexports.mapIncludes = mapIncludes;\n","'use strict';\n\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps.resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n ctx.atKey = true;\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n ctx.atKey = false;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexports.resolveBlockMap = resolveBlockMap;\n","'use strict';\n\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps.resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value?.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexports.resolveBlockSeq = resolveBlockSeq;\n","'use strict';\n\nfunction resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexports.resolveEnd = resolveEnd;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps.resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (identity.isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n ctx.atKey = true;\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n ctx.atKey = false;\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source?.[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce?.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexports.resolveFlowCollection = resolveFlowCollection;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveBlockMap = require('./resolve-block-map.js');\nvar resolveBlockSeq = require('./resolve-block-seq.js');\nvar resolveFlowCollection = require('./resolve-flow-collection.js');\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt?.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = identity.isNode(res)\n ? res\n : new Scalar.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexports.composeCollection = composeCollection;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexports.resolveBlockScalar = resolveBlockScalar;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(?<![ \\t])[ \\t]*\\r?\\n', 'sy');\n line = new RegExp('[ \\t]*(.*?)(?:(?<![ \\t])[ \\t]*)?\\r?\\n', 'sy');\n }\n catch {\n first = /(.*?)[ \\t]*\\r?\\n/sy;\n line = /[ \\t]*(.*?)[ \\t]*\\r?\\n/sy;\n }\n let match = first.exec(source);\n if (!match)\n return source;\n let res = match[1];\n let sep = ' ';\n let pos = first.lastIndex;\n line.lastIndex = pos;\n while ((match = line.exec(source))) {\n if (match[1] === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + match[1];\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = { x: 2, u: 4, U: 8 }[next];\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n if (isNaN(code)) {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n return String.fromCodePoint(code);\n}\n\nexports.resolveFlowScalar = resolveFlowScalar;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveBlockScalar = require('./resolve-block-scalar.js');\nvar resolveFlowScalar = require('./resolve-flow-scalar.js');\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n let tag;\n if (ctx.options.stringKeys && ctx.atKey) {\n tag = ctx.schema[identity.SCALAR];\n }\n else if (tagName)\n tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n else if (token.type === 'scalar')\n tag = findScalarTagByTest(ctx, value, token, onError);\n else\n tag = ctx.schema[identity.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[identity.SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[identity.SCALAR];\n}\nfunction findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) &&\n tag.test?.test(value)) || schema[identity.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[identity.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexports.composeScalar = composeScalar;\n","'use strict';\n\nfunction emptyScalarPosition(offset, before, pos) {\n if (before) {\n pos ?? (pos = before.length);\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexports.emptyScalarPosition = emptyScalarPosition;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar composeCollection = require('./compose-collection.js');\nvar composeScalar = require('./compose-scalar.js');\nvar resolveEnd = require('./resolve-end.js');\nvar utilEmptyScalarPosition = require('./util-empty-scalar-position.js');\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const atKey = ctx.atKey;\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n try {\n node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n }\n catch (error) {\n // Almost certainly here due to a stack overflow\n const message = error instanceof Error ? error.message : String(error);\n onError(token, 'RESOURCE_EXHAUSTION', message);\n }\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n isSrcToken = false;\n }\n }\n node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (atKey &&\n ctx.options.stringKeys &&\n (!identity.isScalar(node) ||\n typeof node.value !== 'string' ||\n (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) {\n const msg = 'With stringKeys, all keys must be strings';\n onError(tag ?? token, 'NON_STRING_KEY', msg);\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias.Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexports.composeEmptyNode = composeEmptyNode;\nexports.composeNode = composeNode;\n","'use strict';\n\nvar Document = require('../doc/Document.js');\nvar composeNode = require('./compose-node.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document.Document(undefined, opts);\n const ctx = {\n atKey: false,\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps.resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode.composeNode(ctx, value, props, onError)\n : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexports.composeDoc = composeDoc;\n","'use strict';\n\nvar node_process = require('process');\nvar directives = require('../doc/directives.js');\nvar Document = require('../doc/Document.js');\nvar errors = require('../errors.js');\nvar identity = require('../nodes/identity.js');\nvar composeDoc = require('./compose-doc.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new errors.YAMLWarning(pos, code, message));\n else\n this.errors.push(new errors.YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new directives.Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (identity.isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n Array.prototype.push.apply(doc.errors, this.errors);\n Array.prototype.push.apply(doc.warnings, this.warnings);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n if (node_process.env.LOG_STREAM)\n console.dir(token, { depth: null });\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document.Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexports.Composer = Composer;\n","'use strict';\n\nvar resolveBlockScalar = require('../compose/resolve-block-scalar.js');\nvar resolveFlowScalar = require('../compose/resolve-flow-scalar.js');\nvar errors = require('../errors.js');\nvar stringifyString = require('../stringify/stringifyString.js');\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new errors.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n case 'block-scalar':\n return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\nexports.createScalarToken = createScalarToken;\nexports.resolveAsScalar = resolveAsScalar;\nexports.setScalarValue = setScalarValue;\n","'use strict';\n\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\nexports.stringify = stringify;\n","'use strict';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexports.visit = visit;\n","'use strict';\n\nvar cstScalar = require('./cst-scalar.js');\nvar cstStringify = require('./cst-stringify.js');\nvar cstVisit = require('./cst-visit.js');\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexports.createScalarToken = cstScalar.createScalarToken;\nexports.resolveAsScalar = cstScalar.resolveAsScalar;\nexports.setScalarValue = cstScalar.setScalarValue;\nexports.stringify = cstStringify.stringify;\nexports.visit = cstVisit.visit;\nexports.BOM = BOM;\nexports.DOCUMENT = DOCUMENT;\nexports.FLOW_END = FLOW_END;\nexports.SCALAR = SCALAR;\nexports.isCollection = isCollection;\nexports.isScalar = isScalar;\nexports.prettyToken = prettyToken;\nexports.tokenType = tokenType;\n","'use strict';\n\nvar cst = require('./cst.js');\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === cst.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield cst.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return yield* this.parseBlockStart();\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield cst.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield cst.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield cst.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n switch (this.charAt(0)) {\n case '!':\n return ((yield* this.pushTag()) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '&':\n return ((yield* this.pushUntil(isNotAnchorChar)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n return ((yield* this.pushCount(1)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n }\n }\n }\n return 0;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexports.Lexer = Lexer;\n","'use strict';\n\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexports.LineCounter = LineCounter;\n","'use strict';\n\nvar node_process = require('process');\nvar cst = require('./cst.js');\nvar lexer = require('./lexer.js');\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n Array.prototype.push.apply(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n Array.prototype.push.apply(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new lexer.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (node_process.env.LOG_TOKENS)\n console.log('|', cst.prettyToken(source));\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = cst.tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && top?.type !== 'doc-end') {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (bv.type === 'block-seq') {\n if (!it.explicitKey &&\n it.sep &&\n !includesToken(it.sep, 'newline')) {\n yield* this.pop({\n type: 'error',\n offset: this.offset,\n message: 'Unexpected block-seq-ind on same line with key',\n source: this.source\n });\n return;\n }\n }\n else if (atMapIndent) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top?.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexports.Parser = Parser;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar errors = require('./errors.js');\nvar log = require('./log.js');\nvar identity = require('./nodes/identity.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null;\n return { lineCounter: lineCounter$1, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer$1.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n if (identity.isDocument(value) && !_replacer)\n return value.toString(options);\n return new Document.Document(value, _replacer, options).toString(options);\n}\n\nexports.parse = parse;\nexports.parseAllDocuments = parseAllDocuments;\nexports.parseDocument = parseDocument;\nexports.stringify = stringify;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar Schema = require('./schema/Schema.js');\nvar errors = require('./errors.js');\nvar Alias = require('./nodes/Alias.js');\nvar identity = require('./nodes/identity.js');\nvar Pair = require('./nodes/Pair.js');\nvar Scalar = require('./nodes/Scalar.js');\nvar YAMLMap = require('./nodes/YAMLMap.js');\nvar YAMLSeq = require('./nodes/YAMLSeq.js');\nvar cst = require('./parse/cst.js');\nvar lexer = require('./parse/lexer.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\nvar publicApi = require('./public-api.js');\nvar visit = require('./visit.js');\n\n\n\nexports.Composer = composer.Composer;\nexports.Document = Document.Document;\nexports.Schema = Schema.Schema;\nexports.YAMLError = errors.YAMLError;\nexports.YAMLParseError = errors.YAMLParseError;\nexports.YAMLWarning = errors.YAMLWarning;\nexports.Alias = Alias.Alias;\nexports.isAlias = identity.isAlias;\nexports.isCollection = identity.isCollection;\nexports.isDocument = identity.isDocument;\nexports.isMap = identity.isMap;\nexports.isNode = identity.isNode;\nexports.isPair = identity.isPair;\nexports.isScalar = identity.isScalar;\nexports.isSeq = identity.isSeq;\nexports.Pair = Pair.Pair;\nexports.Scalar = Scalar.Scalar;\nexports.YAMLMap = YAMLMap.YAMLMap;\nexports.YAMLSeq = YAMLSeq.YAMLSeq;\nexports.CST = cst;\nexports.Lexer = lexer.Lexer;\nexports.LineCounter = lineCounter.LineCounter;\nexports.Parser = parser.Parser;\nexports.parse = publicApi.parse;\nexports.parseAllDocuments = publicApi.parseAllDocuments;\nexports.parseDocument = publicApi.parseDocument;\nexports.stringify = publicApi.stringify;\nexports.visit = visit.visit;\nexports.visitAsync = visit.visitAsync;\n","/**\n * Time parser utility for --since option\n *\n * Supports:\n * - Relative time: 5s, 10m, 2h, 1d, 1w (seconds, minutes, hours, days, weeks)\n * - Absolute time: ISO 8601 format (2024-01-15T10:30:00Z)\n * - Unix timestamp: 1705312200 or 1705312200000 (seconds or milliseconds)\n */\n\n/**\n * Parse a time string and return a Unix timestamp in milliseconds\n * @param timeStr - Time string to parse\n * @returns Unix timestamp in milliseconds\n * @throws Error if the time string is invalid\n */\nconst ISO_8601_PATTERN =\n /^(\\d{4})-(\\d{2})-(\\d{2})(?:[Tt](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,9})?)?(?:[Zz]|[+-]\\d{2}:?\\d{2})?)?$/;\nconst DAYS_BY_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst MAX_DATE_TIMESTAMP_MS = 8_640_000_000_000_000;\n\nexport function parseTime(timeStr: string): number {\n // Try relative time first (e.g., \"5m\", \"2h\", \"1d\")\n const relativeMatch = timeStr.match(/^(\\d+)([smhdw])$/);\n if (relativeMatch) {\n const value = Number(relativeMatch[1]!);\n const unit = relativeMatch[2]!;\n const timestamp = parseRelativeTime(value, unit);\n if (timestamp !== undefined) {\n return timestamp;\n }\n }\n\n // Try Unix timestamp (seconds or milliseconds)\n if (/^\\d+$/.test(timeStr)) {\n const rawTimestamp = Number(timeStr);\n // If timestamp is less than year 2000 in seconds, assume it's already in ms\n // If it looks like seconds (< 10000000000), convert to ms\n const timestamp =\n rawTimestamp < 10000000000 ? rawTimestamp * 1000 : rawTimestamp;\n if (isValidTimestamp(timestamp)) {\n return timestamp;\n }\n }\n\n // Try ISO 8601 format\n const timestamp = parseIsoTime(timeStr);\n if (timestamp !== undefined) {\n return timestamp;\n }\n\n throw new Error(\n `Invalid time format: \"${timeStr}\". ` +\n `Supported formats: relative (5m, 2h, 1d), ISO 8601 (2024-01-15T10:30:00Z), Unix timestamp`,\n );\n}\n\nfunction parseIsoTime(timeStr: string): number | undefined {\n const match = ISO_8601_PATTERN.exec(timeStr);\n if (!match) {\n return undefined;\n }\n\n const year = Number(match[1]);\n const month = Number(match[2]);\n const day = Number(match[3]);\n const hour = match[4] ? Number(match[4]) : 0;\n const minute = match[5] ? Number(match[5]) : 0;\n const second = match[6] ? Number(match[6]) : 0;\n\n if (\n !Number.isInteger(year) ||\n !Number.isInteger(month) ||\n !Number.isInteger(day) ||\n !Number.isInteger(hour) ||\n !Number.isInteger(minute) ||\n !Number.isInteger(second) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > daysInMonth(year, month) ||\n hour > 23 ||\n minute > 59 ||\n second > 59\n ) {\n return undefined;\n }\n\n const timestamp = new Date(timeStr).getTime();\n return isValidTimestamp(timestamp) ? timestamp : undefined;\n}\n\nfunction daysInMonth(year: number, month: number): number {\n if (month === 2) {\n return isLeapYear(year) ? 29 : 28;\n }\n return DAYS_BY_MONTH[month - 1] ?? 0;\n}\n\nfunction isLeapYear(year: number): boolean {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\n/**\n * Parse relative time and return Unix timestamp in milliseconds\n */\nfunction parseRelativeTime(value: number, unit: string): number | undefined {\n if (!Number.isSafeInteger(value)) {\n return undefined;\n }\n\n const now = Date.now();\n const multipliers: Record<string, number> = {\n s: 1000, // seconds\n m: 60 * 1000, // minutes\n h: 60 * 60 * 1000, // hours\n d: 24 * 60 * 60 * 1000, // days\n w: 7 * 24 * 60 * 60 * 1000, // weeks\n };\n\n const multiplier = multipliers[unit];\n if (!multiplier) {\n throw new Error(`Unknown time unit: ${unit}`);\n }\n\n const timestamp = now - value * multiplier;\n return isValidTimestamp(timestamp) ? timestamp : undefined;\n}\n\nfunction isValidTimestamp(timestamp: number): boolean {\n return (\n Number.isSafeInteger(timestamp) &&\n Math.abs(timestamp) <= MAX_DATE_TIMESTAMP_MS\n );\n}\n","/**\n * Framework utilities\n *\n * Defines supported agent frameworks and validation functions.\n */\n\n/**\n * Supported framework identifiers\n */\nexport const SUPPORTED_FRAMEWORKS = [\"claude-code\", \"codex\"] as const;\n\nexport type SupportedFramework = (typeof SUPPORTED_FRAMEWORKS)[number];\n\n/**\n * Check if a framework is supported\n */\nexport function isSupportedFramework(\n framework: string | undefined,\n): framework is SupportedFramework {\n if (!framework) return false;\n return SUPPORTED_FRAMEWORKS.includes(framework as SupportedFramework);\n}\n\n/**\n * Assert that a framework is supported, throwing an error if not\n *\n * @param framework - The framework to validate\n * @param context - Optional context for the error message (e.g., function name)\n * @throws Error if framework is not supported\n */\nexport function assertSupportedFramework(\n framework: string | undefined,\n context?: string,\n): asserts framework is SupportedFramework {\n if (!isSupportedFramework(framework)) {\n const contextMsg = context ? ` in ${context}` : \"\";\n throw new Error(\n `Unsupported framework \"${framework}\"${contextMsg}. Supported frameworks: ${SUPPORTED_FRAMEWORKS.join(\", \")}`,\n );\n }\n}\n\n/**\n * Get a validated framework, defaulting to claude-code if undefined\n *\n * Use this for functions where undefined framework should default to claude-code.\n * Throws an error for unknown frameworks.\n *\n * @param framework - The framework to validate (undefined defaults to claude-code)\n * @returns The validated framework\n * @throws Error if framework is defined but not supported\n */\nexport function getValidatedFramework(\n framework: string | undefined,\n): SupportedFramework {\n if (framework === undefined) {\n return \"claude-code\";\n }\n assertSupportedFramework(framework);\n return framework;\n}\n\n/**\n * Framework display names for UI\n */\nconst FRAMEWORK_DISPLAY_NAMES: Record<SupportedFramework, string> = {\n \"claude-code\": \"Claude Code\",\n codex: \"Codex\",\n};\n\n/**\n * Get the display name for a framework\n *\n * @param framework - The framework identifier\n * @returns The human-readable display name\n * @throws Error if framework is not supported\n */\nexport function getFrameworkDisplayName(framework: string): string {\n assertSupportedFramework(framework);\n return FRAMEWORK_DISPLAY_NAMES[framework];\n}\n\n/**\n * Canonical instructions filename for each framework.\n */\nconst FRAMEWORK_INSTRUCTIONS_FILENAMES: Record<SupportedFramework, string> = {\n \"claude-code\": \"CLAUDE.md\",\n codex: \"AGENTS.md\",\n};\n\n/**\n * Get the canonical instructions filename for a framework\n *\n * Each framework expects instructions at a specific filename:\n * - claude-code: CLAUDE.md (read from ~/.claude/)\n * - codex: AGENTS.md (read from ~/.codex/)\n *\n * Used by CLI (upload) and web API (read) to ensure a symmetric contract.\n *\n * @param framework - The framework name (undefined defaults to claude-code)\n * @returns The canonical filename for instructions\n * @throws Error if framework is defined but not supported\n */\nexport function getInstructionsFilename(framework?: string): string {\n const validated = getValidatedFramework(framework);\n return FRAMEWORK_INSTRUCTIONS_FILENAMES[validated];\n}\n","import type { ParsedEvent } from \"./claude-event-parser\";\nimport { parseEvent } from \"./event-parser-factory\";\n\nfunction asRecord(rawEvent: unknown): Record<string, unknown> | null {\n if (!rawEvent || typeof rawEvent !== \"object\") {\n return null;\n }\n return rawEvent as Record<string, unknown>;\n}\n\nfunction getEventType(\n rawEvent: Record<string, unknown> | null,\n): string | undefined {\n const eventType = rawEvent?.type;\n return typeof eventType === \"string\" ? eventType : undefined;\n}\n\nfunction stringData(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0\n ? value.trim()\n : undefined;\n}\n\nfunction isFailureResult(event: ParsedEvent | null): event is ParsedEvent {\n return event?.type === \"result\" && event.data.success === false;\n}\n\nfunction isTopLevelCodexError(\n eventType: string | undefined,\n parsed: ParsedEvent | null,\n): boolean {\n return eventType === \"error\" && isFailureResult(parsed);\n}\n\nfunction isTerminalCodexFailure(\n eventType: string | undefined,\n parsed: ParsedEvent | null,\n): parsed is ParsedEvent {\n if (!isFailureResult(parsed)) {\n return false;\n }\n return eventType === \"turn.failed\" || eventType === \"turn.completed\";\n}\n\nfunction getParsedTurnId(event: ParsedEvent): string | undefined {\n return stringData(event.data.turnId);\n}\n\nfunction getResultText(event: ParsedEvent): string | undefined {\n return stringData(event.data.result);\n}\n\nfunction combineDistinctMessages(\n first: string | undefined,\n second: string | undefined,\n): string | undefined {\n const messages: string[] = [];\n for (const message of [first, second]) {\n if (!message) {\n continue;\n }\n const containingIndex = messages.findIndex((existing) => {\n return existing === message || existing.includes(message);\n });\n if (containingIndex !== -1) {\n continue;\n }\n\n const containedIndex = messages.findIndex((existing) => {\n return message.includes(existing);\n });\n if (containedIndex !== -1) {\n messages[containedIndex] = message;\n continue;\n }\n\n messages.push(message);\n }\n return messages.length > 0 ? messages.join(\"\\n\") : undefined;\n}\n\nfunction attachFramework(\n parsed: ParsedEvent | null,\n framework: string | undefined,\n): ParsedEvent | null {\n if (!parsed || !framework || parsed.data.framework !== undefined) {\n return parsed;\n }\n return {\n ...parsed,\n data: {\n ...parsed.data,\n framework,\n },\n };\n}\n\n/**\n * Preserves single-event parser behavior while applying stream-aware\n * presentation fixes that require one-event lookahead.\n */\nexport class EventStreamNormalizer {\n private pendingCodexError: ParsedEvent | null = null;\n\n process(\n rawEvent: unknown,\n framework?: string,\n timestamp?: Date,\n ): ParsedEvent[] {\n const isCodex = framework === \"codex\";\n const rawRecord = asRecord(rawEvent);\n const eventType = getEventType(rawRecord);\n const parsed = attachFramework(\n rawRecord ? parseEvent(rawRecord, framework) : null,\n framework,\n );\n if (parsed && timestamp) {\n parsed.timestamp = timestamp;\n }\n\n if (!isCodex) {\n const output = this.flush();\n if (parsed) {\n output.push(parsed);\n }\n return output;\n }\n\n if (isTopLevelCodexError(eventType, parsed)) {\n const output = this.flush();\n this.pendingCodexError = parsed;\n return output;\n }\n\n if (isTerminalCodexFailure(eventType, parsed)) {\n if (this.pendingCodexError) {\n const pendingTurnId = getParsedTurnId(this.pendingCodexError);\n const terminalTurnId = getParsedTurnId(parsed);\n const shouldCollapse =\n !pendingTurnId ||\n (terminalTurnId !== undefined && pendingTurnId === terminalTurnId);\n\n if (shouldCollapse) {\n const mergedResult = combineDistinctMessages(\n getResultText(this.pendingCodexError),\n getResultText(parsed),\n );\n this.pendingCodexError = null;\n return [\n {\n ...parsed,\n data: {\n ...parsed.data,\n ...(mergedResult ? { result: mergedResult } : {}),\n },\n },\n ];\n }\n\n const output = this.flush();\n output.push(parsed);\n return output;\n }\n\n this.pendingCodexError = null;\n return [parsed];\n }\n\n if (!parsed) {\n return [];\n }\n\n const output = this.flush();\n output.push(parsed);\n return output;\n }\n\n flush(): ParsedEvent[] {\n if (!this.pendingCodexError) {\n return [];\n }\n const output = [this.pendingCodexError];\n this.pendingCodexError = null;\n return output;\n }\n}\n","/**\n * Factory for creating the appropriate event parser based on framework.\n */\n\nimport { getValidatedFramework } from \"@vm0/core\";\nimport { ClaudeEventParser, type ParsedEvent } from \"./claude-event-parser\";\nimport { CodexEventParser } from \"./codex-event-parser\";\n\n/**\n * Parse a raw JSONL event using the parser for the given framework.\n * Defaults to claude-code when framework is undefined.\n *\n * @param rawEvent The raw event payload from the API\n * @param framework Framework identifier from the events response\n * @returns Parsed event or null if not parseable\n * @throws Error if framework is defined but not supported\n */\nexport function parseEvent(\n rawEvent: Record<string, unknown>,\n framework?: string,\n): ParsedEvent | null {\n const validated = getValidatedFramework(framework);\n if (validated === \"codex\") {\n return CodexEventParser.parse(rawEvent);\n }\n return ClaudeEventParser.parse(rawEvent);\n}\n","// Core package exports\nexport {\n extractVariableReferencesFromString,\n extractVariableReferences,\n expandVariablesInString,\n expandVariables,\n validateRequiredVariables,\n groupVariablesBySource,\n extractAndGroupVariables,\n formatMissingVariables,\n type VariableReference,\n type VariableSources,\n type ExpansionResult,\n} from \"./variable-expander\";\nexport {\n triggerSourceToBucket,\n SOURCE_BUCKET_COLORS,\n type SourceBucket,\n} from \"./usage-source-bucket\";\nexport {\n PRESENTATION_TEMPLATE_PICKER_ITEMS,\n type PresentationTemplateItem,\n} from \"./presentation-template-items\";\nexport {\n ILLUSTRATION_ASSET_BASE,\n illustrationAssetUrl,\n ILLUSTRATION_STYLES,\n ILLUSTRATION_TEMPLATE_ITEMS,\n type IllustrationStyle,\n type IllustrationTemplateItem,\n} from \"./illustration-template-items\";\nexport {\n VIDEO_TEMPLATE_ITEMS,\n findVideoTemplateItem,\n type VideoTemplateItem,\n} from \"./video-template-items\";\nexport {\n WEBSITE_TEMPLATE_ITEMS,\n findWebsiteTemplateItem,\n type WebsiteTemplateItem,\n} from \"./website-template-items\";\nexport {\n WORKFLOW_TEMPLATE_CATEGORIES,\n WORKFLOW_TEMPLATE_ITEMS,\n findWorkflowTemplateItem,\n type WorkflowTemplateItem,\n} from \"./workflow-template-items\";\nexport {\n r2ImageTransformUrl,\n type R2ImageTransformOptions,\n} from \"./r2-image-transform\";\nexport {\n initContract,\n apiErrorSchema,\n ApiError,\n createErrorResponse,\n RUN_ERROR_GUIDANCE,\n AGENT_NAME_REGEX,\n agentNameSchema,\n volumeConfigSchema,\n artifactConfigSchema,\n artifactsArraySchema,\n agentDefinitionSchema,\n agentComposeContentSchema,\n agentComposeApiContentSchema,\n composeResponseSchema,\n composeListItemSchema,\n ZERO_CAPABILITIES,\n ZERO_CAPABILITY_META,\n ALL_RUN_STATUSES,\n runStatusSchema,\n unifiedRunRequestSchema,\n createRunResponseSchema,\n getRunResponseSchema,\n runListItemSchema,\n runsListResponseSchema,\n cancelRunResponseSchema,\n runEventSchema,\n runResultSchema,\n runStateSchema,\n telemetryMetricSchema,\n systemLogResponseSchema,\n metricsResponseSchema,\n agentEventsResponseSchema,\n networkLogEntrySchema,\n networkLogsResponseSchema,\n searchResultSchema,\n logsSearchResponseSchema,\n queueEntrySchema,\n runningTaskSchema,\n concurrencyInfoSchema,\n queueResponseSchema,\n MAX_FILE_SIZE_BYTES,\n fileEntryWithHashSchema,\n storageChangesSchema,\n presignedUploadSchema,\n sandboxReuseResultSchema,\n webhookEventsContract,\n webhookCompleteContract,\n webhookCheckpointsContract,\n webhookCheckpointsPrepareHistoryContract,\n webhookHeartbeatContract,\n webhookTelemetryContract,\n webhookStoragesPrepareContract,\n webhookStoragesCommitContract,\n webhookUsageEventContract,\n cliAuthDeviceContract,\n cliAuthTokenContract,\n authContract,\n userExportContract,\n cronCleanupSandboxesContract,\n cleanupResultSchema,\n cleanupResponseSchema,\n orgResponseSchema,\n updateOrgRequestSchema,\n orgTierSchema,\n secretNameSchema,\n secretTypeSchema,\n secretResponseSchema,\n secretListResponseSchema,\n setSecretRequestSchema,\n variableNameSchema,\n variableResponseSchema,\n variableListResponseSchema,\n setVariableRequestSchema,\n modelProviderTypeSchema,\n modelProviderFrameworkSchema,\n modelProviderResponseSchema,\n modelProviderListResponseSchema,\n upsertModelProviderRequestSchema,\n upsertModelProviderResponseSchema,\n supportedRunModelSchema,\n modelProviderCredentialScopeSchema,\n MODEL_PROVIDER_TYPES,\n SUPPORTED_RUN_MODELS,\n getFrameworkForType,\n getSecretNameForType,\n getModelProviderEnvBindings,\n getModels,\n getDefaultModel,\n hasModelSelection,\n allowsCustomModel,\n getCustomModelPlaceholder,\n getDefaultOrgModelPolicySeed,\n getProviderBaseUrl,\n areProvidersCompatible,\n getCanonicalModelDisplayName,\n getProvidersForModel,\n getProviderRuntimeModel,\n isModelSupportedByProvider,\n isSupportedRunModel,\n normalizeRunModelId,\n getSelectableProviderTypes,\n hasAuthMethods,\n getAuthMethodsForType,\n getDefaultAuthMethod,\n getSecretsForAuthMethod,\n getSecretNamesForAuthMethod,\n MODEL_PROVIDER_FIREWALL_CONFIGS,\n getModelProviderFirewall,\n VM0_MODEL_TO_PROVIDER,\n getVm0ConcreteProviderType,\n getVm0Vendor,\n getVm0ApiModel,\n getVm0VisibleModels,\n chatThreadsContract,\n chatThreadByIdContract,\n chatThreadDraftContract,\n chatThreadMarkReadContract,\n chatThreadMarkAgentReadContract,\n chatThreadComputerUseHostContract,\n chatEventsContract,\n chatThreadEventsContract,\n chatSearchContract,\n chatThreadDetailSchema,\n chatThreadDraftSchema,\n generationTemplateRequestSchema,\n chatEventResponse,\n chatEventSchema,\n summaryEntrySchema,\n persistedAttachmentSchema,\n attachFileSchema,\n resolvedAttachFileSchema,\n runnersPollContract,\n runnersJobClaimContract,\n runnersHeartbeatContract,\n heartbeatBodySchema,\n runnerGroupSchema,\n jobSchema,\n executionContextSchema,\n storedExecutionContextSchema,\n secretConnectorMetadataSchema,\n secretConnectorMetadataMapSchema,\n DEFAULT_PROFILE,\n storageManifestSchema,\n resumeSessionSchema,\n runnerRealtimeTokenContract,\n platformRealtimeTokenContract,\n logsListContract,\n logsByIdContract,\n logStatusSchema,\n logEntrySchema,\n paginationSchema,\n logsListResponseSchema,\n artifactSchema,\n logDetailSchema,\n triggerSourceSchema,\n connectorResponseConnectionStatusSchema,\n connectorResponseSchema,\n connectorListResponseSchema,\n scopeDiffResponseSchema,\n parseBasicAuthTemplates,\n replaceBasicAuthTemplates,\n extractSecretNamesFromApis,\n firewallPermissionSchema,\n firewallApiSchema,\n firewallSchema,\n firewallsSchema,\n executionFirewallBuiltinEntrySchema,\n executionFirewallInlineEntrySchema,\n executionFirewallEntrySchema,\n executionFirewallsSchema,\n firewallConfigSchema,\n firewallPolicyValueSchema,\n firewallPoliciesSchema,\n firewallPolicySchema,\n networkPolicySchema,\n networkPoliciesSchema,\n hasBaseUrlParams,\n hasBaseUrlVars,\n resolveFirewallBaseUrlVars,\n validateBaseUrl,\n type FirewallTemplateReferenceNamespace,\n type FirewallTemplateReferences,\n type BasicAuthTemplateArg,\n type BasicAuthTemplateMatch,\n collectAndValidatePermissions,\n validateRule,\n matchFirewallPath,\n findMatchingPermissions,\n userPreferencesResponseSchema,\n updateUserPreferencesRequestSchema,\n sendModeSchema,\n userLocaleSchema,\n featureSwitchesResponseSchema,\n updateFeatureSwitchesRequestSchema,\n orgListItemSchema,\n orgListResponseSchema,\n orgRoleSchema,\n orgMemberSchema,\n orgPendingInvitationSchema,\n orgMembershipRequestSchema,\n orgMembersResponseSchema,\n inviteOrgMemberRequestSchema,\n removeOrgMemberRequestSchema,\n updateOrgMemberRoleRequestSchema,\n revokeInvitationRequestSchema,\n membershipRequestActionSchema,\n orgMessageResponseSchema,\n onboardingStatusContract,\n onboardingCompleteContract,\n onboardingStatusResponseSchema,\n skillFrontmatterSchema,\n zeroAgentsMainContract,\n zeroAgentsByIdContract,\n zeroAgentInstructionsContract,\n zeroAgentDraftContract,\n zeroAgentResponseSchema,\n zeroAgentRequestSchema,\n zeroAgentMetadataRequestSchema,\n zeroAgentInstructionsResponseSchema,\n zeroAgentInstructionsRequestSchema,\n zeroAgentDraftResponseSchema,\n zeroAgentDraftRequestSchema,\n zeroWorkflowVisibilitySchema,\n zeroWorkflowNameSchema,\n workflowFileEntrySchema,\n workflowFileMetadataSchema,\n zeroWorkflowAutomationKindSchema,\n zeroWorkflowScheduleTypeSchema,\n zeroWorkflowScheduleSchema,\n zeroWorkflowAutomationSummarySchema,\n zeroWorkflowSummarySchema,\n zeroWorkflowDetailResponseSchema,\n zeroWorkflowListResponseSchema,\n zeroWorkflowCreateRequestSchema,\n zeroWorkflowUpdateRequestSchema,\n zeroWorkflowCopyRequestSchema,\n zeroWorkflowRunResponseSchema,\n zeroWorkflowsCollectionContract,\n zeroWorkflowsDetailContract,\n zeroWorkflowVisibilityContract,\n zeroUserConnectorsContract,\n userConnectorEnabledSlugsSchema,\n zeroConnectorsMainContract,\n zeroConnectorsBySlugContract,\n zeroConnectorScopeDiffContract,\n zeroConnectorManualGrantContract,\n zeroConnectorNoAuthGrantContract,\n zeroConnectorsSearchContract,\n zeroOrgContract,\n zeroOrgLeaveContract,\n zeroOrgDeleteContract,\n zeroOrgListContract,\n zeroOrgMembersContract,\n zeroOrgInviteContract,\n zeroOrgMembershipRequestsContract,\n zeroComposesListContract,\n zeroRunsByIdContract,\n zeroRunsCancelContract,\n zeroRunsQueueContract,\n zeroRunAgentEventsContract,\n zeroRunSystemLogContract,\n zeroRunMetricsContract,\n zeroRunContextContract,\n zeroRunNetworkLogsContract,\n zeroRunRunnerContract,\n zeroLogsSearchContract,\n zeroModelProvidersMainContract,\n zeroModelProvidersByTypeContract,\n zeroUserPreferencesContract,\n zeroFeatureSwitchesContract,\n zeroSecretsContract,\n zeroSecretsByNameContract,\n zeroVariablesContract,\n zeroVariablesByNameContract,\n zeroCustomConnectorsContract,\n zeroCustomConnectorByIdContract,\n zeroCustomConnectorSecretContract,\n customConnectorResponseSchema,\n customConnectorListResponseSchema,\n createCustomConnectorBodySchema,\n setCustomConnectorSecretBodySchema,\n patchCustomConnectorBodySchema,\n zeroAgentCustomConnectorsContract,\n agentCustomConnectorEnabledIdsSchema,\n integrationsSlackMessageContract,\n integrationsSlackUploadInitContract,\n integrationsSlackUploadCompleteContract,\n zeroBillingStatusContract,\n zeroBillingCheckoutContract,\n zeroBillingPortalContract,\n zeroBillingAutoRechargeContract,\n zeroBillingInvoicesContract,\n zeroBillingDowngradeContract,\n zeroBillingRedeemContract,\n zeroUsageMembersContract,\n zeroUsageRunsContract,\n zeroUsageInsightContract,\n zeroTeamContract,\n teamComposeItemSchema,\n zeroIntegrationsSlackContract,\n slackOrgStatusSchema,\n zeroSlackConnectContract,\n zeroSlackOauthContract,\n zeroSlackOauthInstallQuerySchema,\n zeroSlackOauthConnectQuerySchema,\n zeroSlackOauthCallbackQuerySchema,\n zeroSlackChannelsContract,\n slackChannelSchema,\n zeroQueuePositionContract,\n zeroDeveloperSupportContract,\n developerSupportBodySchema,\n consentCodeResponseSchema,\n submitResponseSchema,\n zeroReportErrorContract,\n reportErrorBodySchema,\n reportErrorResponseSchema,\n zeroComputerUseAuditEventsContract,\n zeroComputerUseAuthorizationRequestsContract,\n zeroComputerUseCommandContract,\n zeroComputerUseHeartbeatContract,\n zeroComputerUseHostCommandsContract,\n zeroComputerUseHostsContract,\n zeroComputerUseWriteCommandContract,\n zeroInsightsContract,\n pushSubscriptionsContract,\n zeroVoiceIoQuotaContract,\n audioInputQuotaResponseSchema,\n zeroUploadsContract,\n zeroHostContract,\n zeroIntegrationsTelegramContract,\n type ApiErrorKey,\n type ApiErrorResponse,\n type ZeroCapability,\n type ZeroCapabilityMeta,\n type ZeroHostContract,\n type HostedSitePrepareRequest,\n type HostedSitePrepareResponse,\n type HostedSiteCompleteResponse,\n type ComposeResponse,\n type ComposeListItem,\n type ArtifactConfig,\n type RunStatus,\n type RunResult,\n type RunState,\n type RunEvent,\n type CreateRunResponse,\n type GetRunResponse,\n type RunListItem,\n type RunsListResponse,\n type CancelRunResponse,\n type TelemetryMetric,\n type SystemLogResponse,\n type MetricsResponse,\n type AgentEventsResponse,\n type NetworkLogEntry,\n type AxiomNetworkEvent,\n type NetworkLogsResponse,\n type SearchResult,\n type LogsSearchResponse,\n type QueueEntry,\n type RunningTask,\n type ConcurrencyInfo,\n type QueueResponse,\n type SandboxReuseResult,\n type WebhookEventsContract,\n type WebhookCompleteContract,\n type WebhookCheckpointsContract,\n type WebhookCheckpointsPrepareHistoryContract,\n type WebhookHeartbeatContract,\n type WebhookTelemetryContract,\n type WebhookStoragesPrepareContract,\n type WebhookStoragesCommitContract,\n type WebhookUsageEventContract,\n type CliAuthDeviceContract,\n type CliAuthTokenContract,\n type AuthContract,\n type CronCleanupSandboxesContract,\n type OrgResponse,\n type UpdateOrgRequest,\n type OrgTier,\n type SecretResponse,\n type SecretListResponse,\n type SetSecretRequest,\n type SecretType,\n type VariableResponse,\n type VariableListResponse,\n type SetVariableRequest,\n type ModelProviderType,\n type ModelProviderFramework,\n type ModelProviderEnvBindings,\n type ModelProviderResponse,\n type ModelProviderListResponse,\n type UpsertModelProviderRequest,\n type UpsertModelProviderResponse,\n type SupportedRunModel,\n type ModelProviderCredentialScope,\n type DefaultOrgModelPolicySeed,\n type SecretFieldConfig,\n type AuthMethodConfig,\n type GenerationTemplateRequest,\n type SummaryEntry,\n type ChatThreadsContract,\n type ChatThreadByIdContract,\n type ChatThreadDraftContract,\n type ChatThreadMarkReadContract,\n type ChatEventsContract,\n type ChatThreadEventsContract,\n type ChatSearchContract,\n type ChatSearchResponse,\n type ChatSearchResult,\n type ChatSearchMessage,\n type ChatThreadDetail,\n type ChatThreadDraft,\n type ChatEvent,\n type ChatAutomationEvent,\n type ChatInputEvent,\n type ChatUserMessageEvent,\n type PersistedAttachment,\n type AttachFile,\n type ResolvedAttachFile,\n type RunnersPollContract,\n type RunnersJobClaimContract,\n type RunnersHeartbeatContract,\n type Job,\n type ExecutionContext,\n type StoredExecutionContext,\n type SecretConnectorMetadata,\n type StorageMountEntry,\n type StorageManifest,\n type ResumeSession,\n type RunnerRealtimeTokenContract,\n type PlatformRealtimeTokenContract,\n type LogsListContract,\n type LogsByIdContract,\n type LogStatus,\n type LogEntry,\n type Pagination,\n type LogsListResponse,\n type Artifact,\n type LogDetail,\n type TriggerSource,\n type LogsFilters,\n type ScopeDiffResponse,\n type ConnectorResponseConnectionStatus,\n type ConnectorResponse,\n type ConnectorListResponse,\n type FirewallConfig,\n type ExpandedFirewallConfig,\n type FirewallApi,\n type Firewall,\n type Firewalls,\n type ExecutionFirewallBuiltinEntry,\n type ExecutionFirewallInlineEntry,\n type ExecutionFirewallEntry,\n type ExecutionFirewalls,\n type FirewallPolicyValue,\n type FirewallPolicy,\n type FirewallPolicies,\n type NetworkPolicy,\n type NetworkPolicies,\n type UserPreferencesResponse,\n type UpdateUserPreferencesRequest,\n type SendMode,\n type UserLocale,\n type FeatureSwitchesResponse,\n type UpdateFeatureSwitchesRequest,\n type OrgListItem,\n type OrgListResponse,\n type OrgRole,\n type OrgMember,\n type OrgPendingInvitation,\n type OrgMembershipRequest,\n type OrgMembersResponse,\n type InviteOrgMemberRequest,\n type RemoveOrgMemberRequest,\n type UpdateOrgMemberRoleRequest,\n type RevokeInvitationRequest,\n type MembershipRequestAction,\n type OrgMessageResponse,\n type OnboardingStatusContract,\n type OnboardingStatusResponse,\n type ZeroAgentsMainContract,\n type ZeroAgentsByIdContract,\n type ZeroAgentInstructionsContract,\n type ZeroAgentResponse,\n type ZeroAgentRequest,\n type ZeroAgentMetadataRequest,\n type ZeroAgentInstructionsResponse,\n type ZeroAgentInstructionsRequest,\n type ZeroWorkflowVisibility,\n type WorkflowFileEntry,\n type WorkflowFileMetadata,\n type ZeroWorkflowAutomationKind,\n type ZeroWorkflowScheduleType,\n type ZeroWorkflowSchedule,\n type ZeroWorkflowAutomationSummary,\n type ZeroWorkflowSummary,\n type ZeroWorkflowDetailResponse,\n type ZeroWorkflowCreateRequest,\n type ZeroWorkflowUpdateRequest,\n type ZeroWorkflowsCollectionContract,\n type ZeroWorkflowsDetailContract,\n type ZeroWorkflowVisibilityContract,\n type UserConnectorEnabledSlugs,\n type ZeroUserConnectorsContract,\n type ZeroConnectorsMainContract,\n type ZeroConnectorsBySlugContract,\n type ZeroConnectorScopeDiffContract,\n type ZeroConnectorsSearchContract,\n type ZeroOrgContract,\n type ZeroOrgLeaveContract,\n type ZeroOrgDeleteContract,\n type ZeroOrgListContract,\n type ZeroOrgMembersContract,\n type ZeroOrgInviteContract,\n type ZeroOrgMembershipRequestsContract,\n type ZeroComposesListContract,\n type ZeroRunsByIdContract,\n type ZeroRunsCancelContract,\n type ZeroRunsQueueContract,\n type ZeroRunAgentEventsContract,\n type ZeroRunSystemLogContract,\n type ZeroRunMetricsContract,\n type ZeroRunContextContract,\n type ZeroRunNetworkLogsContract,\n type ZeroRunRunnerContract,\n type ZeroLogsSearchContract,\n type RunContextResponse,\n type RunRunnerResponse,\n type ZeroModelProvidersMainContract,\n type ZeroModelProvidersByTypeContract,\n type ZeroUserPreferencesContract,\n type ZeroFeatureSwitchesContract,\n type ZeroSecretsContract,\n type ZeroSecretsByNameContract,\n type ZeroVariablesContract,\n type ZeroVariablesByNameContract,\n type ZeroCustomConnectorsContract,\n type ZeroCustomConnectorByIdContract,\n type ZeroCustomConnectorSecretContract,\n type CustomConnectorResponse,\n type CreateCustomConnectorBody,\n type PatchCustomConnectorBody,\n type AgentCustomConnectorEnabledIds,\n type ZeroAgentCustomConnectorsContract,\n type IntegrationsSlackMessageContract,\n type SendSlackMessageBody,\n type SendSlackMessageResponse,\n type SlackUploadInitBody,\n type SlackUploadInitResponse,\n type SlackUploadCompleteBody,\n type SlackUploadCompleteResponse,\n type ZeroBillingStatusContract,\n type ZeroBillingCheckoutContract,\n type ZeroBillingPortalContract,\n type ZeroBillingAutoRechargeContract,\n type ZeroBillingInvoicesContract,\n type ZeroBillingDowngradeContract,\n type ZeroBillingRedeemContract,\n type BillingStatusResponse,\n type AutoRechargeConfig,\n type CheckoutResponse,\n type PortalResponse,\n type BillingInvoice,\n type BillingInvoicesResponse,\n type DowngradeResponse,\n type RedeemRequest,\n type RedeemResponse,\n type ZeroUsageMembersContract,\n type MemberUsage,\n type UsageMembersResponse,\n type ZeroUsageRunsContract,\n type UsageRun,\n type UsageRunsResponse,\n type ZeroUsageInsightContract,\n type UsageInsightResponse,\n type UsageInsightBucket,\n type UsageInsightAutomationRow,\n type UsageInsightChatRow,\n type ZeroTeamContract,\n type TeamComposeItem,\n type ZeroIntegrationsSlackContract,\n type SlackOrgStatus,\n type ZeroSlackConnectContract,\n type ZeroSlackOauthContract,\n type ZeroSlackOauthInstallQuery,\n type ZeroSlackOauthConnectQuery,\n type ZeroSlackOauthCallbackQuery,\n type ZeroSlackChannelsContract,\n type SlackChannel,\n type ZeroQueuePositionContract,\n type ZeroDeveloperSupportContract,\n type ZeroReportErrorContract,\n type ComputerUseAuditEvent,\n type ComputerUseAuditEventListResponse,\n type ComputerUseAuthorizationRequestApplyResponse,\n type ComputerUseAuthorizationRequestCreateResponse,\n type ComputerUseAuthorizationRequestResponse,\n type ComputerUseAuthorizationSource,\n type ComputerUseCommandCreateResponse,\n type ComputerUseCommandError,\n type ComputerUseCommandKind,\n type ComputerUseCommandResponse,\n type ComputerUseCommandResult,\n type ComputerUseCommandStatus,\n type ComputerUseHost,\n type ComputerUseHostListResponse,\n type ComputerUseReadCommandKind,\n type ComputerUseWriteCommandKind,\n type ZeroComputerUseAuditEventsContract,\n type ZeroComputerUseAuthorizationRequestsContract,\n type ZeroComputerUseCommandContract,\n type ZeroComputerUseHeartbeatContract,\n type ZeroComputerUseHostCommandsContract,\n type ZeroComputerUseHostsContract,\n type ZeroComputerUseWriteCommandContract,\n type ZeroInsightsContract,\n type InsightsResponse,\n type DayInsight,\n type PushSubscriptionsContract,\n type ZeroVoiceIoQuotaContract,\n type AudioInputQuotaResponse,\n type ZeroUploadsContract,\n type UploadPrepareResponse,\n type ZeroIntegrationsTelegramContract,\n type TelegramBot,\n type TelegramBotStatus,\n type TelegramListResponse,\n type TelegramLinkStatusResponse,\n} from \"./contracts\";\nexport {\n isValidSystemTag,\n resolveSystemImageToE2b,\n isLegacySystemTemplate,\n getLegacySystemTemplateWarning,\n SYSTEM_IMAGE_CLAUDE_CODE,\n SYSTEM_IMAGES,\n SYSTEM_VALID_TAGS,\n type SystemValidTag,\n} from \"./org-reference\";\nexport {\n formatVersionIdForDisplay,\n isValidVersionPrefix,\n VERSION_ID_LENGTH,\n VERSION_ID_DISPLAY_LENGTH,\n MIN_VERSION_PREFIX_LENGTH,\n} from \"./version-id\";\nexport {\n getInstructionsStorageName,\n getSkillStorageName,\n getCustomSkillStorageName,\n getCustomConnectorSkillStorageName,\n getCustomConnectorSkillName,\n VOLUME_ORG_USER_ID,\n SYSTEM_ORG_ID,\n} from \"./storage-names\";\nexport {\n parseGitHubTreeUrl,\n getSkillNameFromPath,\n parseGitHubUrl,\n resolveSkillRef,\n DEFAULT_SKILLS_OWNER,\n DEFAULT_SKILLS_REPO,\n DEFAULT_SKILLS_BRANCH,\n type ParsedGitHubTreeUrl,\n type ParsedGitHubUrl,\n} from \"./github-url\";\nexport {\n isSupportedFramework,\n assertSupportedFramework,\n getValidatedFramework,\n getFrameworkDisplayName,\n getInstructionsFilename,\n SUPPORTED_FRAMEWORKS,\n type SupportedFramework,\n} from \"./frameworks\";\nexport { FeatureSwitchKey } from \"./feature-switch-key\";\nexport {\n filterFeatureSwitchOverrides,\n getAllFeatureStates,\n getFeatureSwitchDescriptions,\n getFeatureSwitchMetadata,\n isFeatureEnabled,\n type FeatureSwitch,\n type FeatureSwitchContext,\n type FeatureSwitchMetadata,\n} from \"./feature-switch\";\nexport { isStaffOrg } from \"./staff-org\";\nexport {\n parseSkillFrontmatter,\n type SkillFrontmatter,\n} from \"./skill-frontmatter\";\nexport { stripMetadataFrontmatter } from \"./instructions-frontmatter\";\nexport {\n getGmtOffset,\n hasExplicitDateTimeOffset,\n isValidTimeZone,\n parseScheduledAtTime,\n type ScheduledAtTimeParseErrorCode,\n type ScheduledAtTimeParseResult,\n} from \"./timezone\";\nexport { getModelDisplayName } from \"./model-display-name\";\nexport { formatMessage, serializeError, extractFields } from \"./log-utils\";\n\nexport * from \"./zero-workflow-skill\";\n","/**\n * Unified variable expansion for agent compose configurations\n * Supports ${{ vars.xxx }} and ${{ secrets.xxx }} syntax\n * Note: ${{ env.xxx }} is parsed but not currently used (reserved for future)\n */\n\n/**\n * Variable reference with source and name\n */\nexport interface VariableReference {\n source: \"env\" | \"vars\" | \"secrets\";\n name: string;\n}\n\n/**\n * Sources for variable expansion\n */\nexport interface VariableSources {\n env?: Record<string, string | undefined>;\n vars?: Record<string, string>;\n secrets?: Record<string, string>;\n}\n\n/**\n * Result of variable expansion\n */\nexport interface ExpansionResult<T> {\n result: T;\n missingVars: VariableReference[];\n}\n\n/**\n * Regex pattern for ${{ source.name }} syntax\n * Matches: ${{ env.VAR }}, ${{ vars.foo }}, ${{ secrets.key }}\n */\nconst VARIABLE_PATTERN =\n /\\$\\{\\{\\s*(env|vars|secrets)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\}\\}/g;\n\n/**\n * Extract all variable references from a string\n * @param value - String that may contain variable references\n * @returns Array of variable references found\n */\nexport function extractVariableReferencesFromString(\n value: string,\n): VariableReference[] {\n const refs: VariableReference[] = [];\n const matches = value.matchAll(VARIABLE_PATTERN);\n\n for (const match of matches) {\n const source = match[1] as \"env\" | \"vars\" | \"secrets\";\n const name = match[2]!;\n refs.push({ source, name });\n }\n\n return refs;\n}\n\n/**\n * Extract all variable references from an object recursively\n * @param obj - Object that may contain variable references in string values\n * @returns Array of unique variable references\n */\nexport function extractVariableReferences(obj: unknown): VariableReference[] {\n const refs: VariableReference[] = [];\n const seen = new Set<string>();\n\n function scan(value: unknown): void {\n if (typeof value === \"string\") {\n const stringRefs = extractVariableReferencesFromString(value);\n for (const ref of stringRefs) {\n const key = `${ref.source}.${ref.name}`;\n if (!seen.has(key)) {\n seen.add(key);\n refs.push(ref);\n }\n }\n } else if (Array.isArray(value)) {\n for (const item of value) {\n scan(item);\n }\n } else if (value !== null && typeof value === \"object\") {\n for (const val of Object.values(value)) {\n scan(val);\n }\n }\n }\n\n scan(obj);\n return refs;\n}\n\n/**\n * Expand variables in a string using provided sources\n * @param value - String that may contain variable references\n * @param sources - Sources for variable values\n * @returns Expansion result with resolved string and missing variables\n */\nexport function expandVariablesInString(\n value: string,\n sources: VariableSources,\n): ExpansionResult<string> {\n const missingVars: VariableReference[] = [];\n const seenMissing = new Set<string>();\n\n const result = value.replace(VARIABLE_PATTERN, (fullMatch, source, name) => {\n const typedSource = source as \"env\" | \"vars\" | \"secrets\";\n const resolved = sources[typedSource]?.[name];\n\n if (resolved === undefined) {\n const key = `${typedSource}.${name}`;\n if (!seenMissing.has(key)) {\n seenMissing.add(key);\n missingVars.push({ source: typedSource, name });\n }\n return fullMatch;\n }\n\n return resolved;\n });\n\n return { result, missingVars };\n}\n\n/**\n * Recursively expand variables in an object\n * @param obj - Object that may contain variable references in string values\n * @param sources - Sources for variable values\n * @returns Expansion result with resolved object and missing variables\n */\nexport function expandVariables<T>(\n obj: T,\n sources: VariableSources,\n): ExpansionResult<T> {\n const allMissingVars: VariableReference[] = [];\n const seenMissing = new Set<string>();\n\n function expand(value: unknown): unknown {\n if (typeof value === \"string\") {\n const { result, missingVars } = expandVariablesInString(value, sources);\n for (const missing of missingVars) {\n const key = `${missing.source}.${missing.name}`;\n if (!seenMissing.has(key)) {\n seenMissing.add(key);\n allMissingVars.push(missing);\n }\n }\n return result;\n }\n\n if (Array.isArray(value)) {\n return value.map((item) => {\n return expand(item);\n });\n }\n\n if (value !== null && typeof value === \"object\") {\n const result: Record<string, unknown> = {};\n for (const [key, val] of Object.entries(value)) {\n result[key] = expand(val);\n }\n return result;\n }\n\n return value;\n }\n\n const result = expand(obj) as T;\n return { result, missingVars: allMissingVars };\n}\n\n/**\n * Validate that all required variables have values in sources\n * @param refs - Array of variable references to validate\n * @param sources - Sources for variable values\n * @returns Array of missing variable references\n */\nexport function validateRequiredVariables(\n refs: VariableReference[],\n sources: VariableSources,\n): VariableReference[] {\n const missing: VariableReference[] = [];\n\n for (const ref of refs) {\n const resolved = sources[ref.source]?.[ref.name];\n if (resolved === undefined) {\n missing.push(ref);\n }\n }\n\n return missing;\n}\n\n/**\n * Group variable references by source\n * @param refs - Array of variable references\n * @returns Object with arrays grouped by source\n */\nexport function groupVariablesBySource(refs: VariableReference[]): {\n env: VariableReference[];\n vars: VariableReference[];\n secrets: VariableReference[];\n} {\n const groups = {\n env: [] as VariableReference[],\n vars: [] as VariableReference[],\n secrets: [] as VariableReference[],\n };\n\n for (const ref of refs) {\n groups[ref.source].push(ref);\n }\n\n return groups;\n}\n\n/**\n * Extract all variable references from an object and group them by source.\n * Convenience wrapper combining extractVariableReferences + groupVariablesBySource.\n *\n * @example\n * ```ts\n * const env = {\n * API_KEY: \"${{ secrets.OPENAI_KEY }}\",\n * REGION: \"${{ vars.AWS_REGION }}\",\n * STATIC: \"hello\",\n * };\n * const grouped = extractAndGroupVariables(env);\n * // grouped.secrets => [{ source: \"secrets\", name: \"OPENAI_KEY\" }]\n * // grouped.vars => [{ source: \"vars\", name: \"AWS_REGION\" }]\n * // grouped.env => []\n * ```\n */\nexport function extractAndGroupVariables(obj: unknown): {\n env: VariableReference[];\n vars: VariableReference[];\n secrets: VariableReference[];\n} {\n return groupVariablesBySource(extractVariableReferences(obj));\n}\n\n/**\n * Format missing variables for error messages\n * @param missing - Array of missing variable references\n * @returns Formatted error message\n */\nexport function formatMissingVariables(missing: VariableReference[]): string {\n const grouped = groupVariablesBySource(missing);\n const messages: string[] = [];\n\n if (grouped.env.length > 0) {\n const names = grouped.env\n .map((r) => {\n return r.name;\n })\n .join(\", \");\n messages.push(`Environment variables: ${names}`);\n }\n\n if (grouped.vars.length > 0) {\n const names = grouped.vars\n .map((r) => {\n return r.name;\n })\n .join(\", \");\n messages.push(`CLI variables (--vars): ${names}`);\n }\n\n if (grouped.secrets.length > 0) {\n const names = grouped.secrets\n .map((r) => {\n return r.name;\n })\n .join(\", \");\n messages.push(`Secrets: ${names}`);\n }\n\n return messages.join(\"\\n\");\n}\n","import type { TriggerSource } from \"@vm0/api-contracts/contracts/logs\";\n\n/**\n * Source bucket for per-user usage insight grouping.\n * Maps TriggerSource values to one of 5 display buckets.\n */\nexport type SourceBucket = \"chat\" | \"slack\" | \"email\" | \"automation\" | \"others\";\n\n/**\n * Map a TriggerSource (or null for deleted runs) to a display bucket.\n * This is the authoritative mapping used by both the SQL CASE expression\n * and the client-side chart legend — single source of truth.\n */\nexport function triggerSourceToBucket(\n source: TriggerSource | null,\n): SourceBucket {\n switch (source) {\n case \"web\":\n return \"chat\";\n case \"slack\":\n return \"slack\";\n case \"email\":\n return \"email\";\n case \"workflow-schedule\":\n case \"workflow-event\":\n return \"automation\";\n default:\n // telegram, github, cli, agent, phone, agentphone, null\n return \"others\";\n }\n}\n\n/**\n * Fixed hex colors for source buckets in the insight chart.\n */\nexport const SOURCE_BUCKET_COLORS: Record<SourceBucket, string> = {\n chat: \"hsl(var(--primary))\",\n slack: \"#4ade80\",\n email: \"#f59e0b\",\n automation: \"#8b5cf6\",\n others: \"hsl(var(--muted-foreground))\",\n};\n","export interface PresentationTemplateItem {\n readonly slug: string;\n readonly title: string;\n readonly prompt: string;\n readonly embedUrl: string;\n readonly previewImage: string;\n readonly previewImages: readonly string[];\n readonly slideCount?: number;\n readonly cardPreviewImage?: string;\n readonly cardPreviewImagesByTheme?: Readonly<Record<string, string>>;\n readonly previewHtmls?: readonly string[];\n readonly colorSystemId?: string;\n readonly templateId: string;\n}\n\nexport const PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_THEMES = [\n \"prism\",\n \"carnival\",\n \"pop-art\",\n \"warm-sand\",\n \"bauhaus-primary\",\n \"nordic-frost\",\n \"forest-editorial\",\n \"coral-studio\",\n \"slate-corporate\",\n \"terracotta-clay\",\n \"berry-pop\",\n \"citrus-fresh\",\n \"mauve-dusk\",\n \"mono-ink\",\n \"sunset-maroon\",\n \"mint-tech\",\n \"midnight-mono\",\n \"ocean-deep\",\n \"gold-luxe\",\n] as const;\n\nconst PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES = {\n \"playful-launch-presentation\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e516bfce-08dd-44c2-aeef-a7cab1ffb1f1/template-card-presentation-playful-launch-presentation-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e96ec7bc-bc0c-432f-a617-69aac96dbd76/template-card-presentation-playful-launch-presentation-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/df5b4d27-0018-422a-9d16-e36969f5bc6a/template-card-presentation-playful-launch-presentation-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/42b9f430-fe8f-4d16-a49e-45f99ae8a059/template-card-presentation-playful-launch-presentation-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/01f032ec-30dd-41de-9d1f-405eb27cc308/template-card-presentation-playful-launch-presentation-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/46686b18-0e43-4563-a73a-f05bb4966084/template-card-presentation-playful-launch-presentation-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ef757d22-ea0e-4581-9592-cf113c4216f0/template-card-presentation-playful-launch-presentation-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/711f48e7-d9fd-499d-9731-d40810c38492/template-card-presentation-playful-launch-presentation-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62d80ba3-b008-44f5-bf04-4eb5a7893191/template-card-presentation-playful-launch-presentation-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/af1a6390-86b2-4800-8bc5-f1764ffbeb94/template-card-presentation-playful-launch-presentation-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/380de217-d30a-45af-8a12-b81a0a002cfd/template-card-presentation-playful-launch-presentation-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c7c72f5e-8d28-4a49-a5c3-ea41e57c8c19/template-card-presentation-playful-launch-presentation-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/277b8cba-0a28-491b-b957-27362b8e902e/template-card-presentation-playful-launch-presentation-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/da108e93-faed-4d55-a992-a8b2e3347a66/template-card-presentation-playful-launch-presentation-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2fef9c56-6730-42ea-a037-f9dd52cd1f74/template-card-presentation-playful-launch-presentation-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f86ce9c2-8127-4903-847d-c9941986f3f1/template-card-presentation-playful-launch-presentation-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3e9e3fbc-8ab6-466e-bd23-6cfaf6c4f471/template-card-presentation-playful-launch-presentation-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/21ab7eb6-f409-4143-8402-71e70b8cdbf0/template-card-presentation-playful-launch-presentation-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6d5be839-0844-4632-95e7-c8307b994a81/template-card-presentation-playful-launch-presentation-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"botane-organic-deck\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9e19e33e-6c1a-4e3d-bb5d-9de1b154a61b/template-card-presentation-botane-organic-deck-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d923c670-256d-427f-b720-dfa03f523090/template-card-presentation-botane-organic-deck-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9470f2f5-191f-4245-9494-c64b0f5e2acc/template-card-presentation-botane-organic-deck-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/65e100da-419a-4cbf-99dd-90ccbb1e6bd0/template-card-presentation-botane-organic-deck-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/99920d9a-a837-4554-9ed6-0c45371b2fea/template-card-presentation-botane-organic-deck-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ee0b8ab9-1801-4a87-8973-f01da391273b/template-card-presentation-botane-organic-deck-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d8679bb0-8b89-496c-8e85-9b95308fe79e/template-card-presentation-botane-organic-deck-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b2bfb2e7-4418-4f6a-933e-8924885e3da2/template-card-presentation-botane-organic-deck-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e13c87d6-ecb6-4e0b-a32a-25d3d70aab45/template-card-presentation-botane-organic-deck-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1e936869-7aee-453e-b5c5-fd9792bdca5d/template-card-presentation-botane-organic-deck-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b5a371cd-1972-42df-b6b9-afb23c10d321/template-card-presentation-botane-organic-deck-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62e8e14d-5d40-43c8-ace5-e2cfa4447bc5/template-card-presentation-botane-organic-deck-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/59ac5cad-a182-4fe1-bf5f-84011d92caa7/template-card-presentation-botane-organic-deck-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/816202cb-5e4d-4e0a-a988-71e9861f0675/template-card-presentation-botane-organic-deck-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/50a496c0-cefc-4800-a926-54603b064d49/template-card-presentation-botane-organic-deck-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4e9cb042-170c-4bb0-ae27-1170e665d696/template-card-presentation-botane-organic-deck-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5e5588e4-28c0-49f3-8b41-a3051e7efcb2/template-card-presentation-botane-organic-deck-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/68275cfe-5d08-4347-8515-933c543daf98/template-card-presentation-botane-organic-deck-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e515fa02-9789-476e-a0fa-9888864563cb/template-card-presentation-botane-organic-deck-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"business-data-presentation\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7422d136-aeba-4fb9-b2d2-001f6022ad7d/template-card-presentation-business-data-presentation-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/802d61cd-44c3-462b-8065-eb34f1c81fff/template-card-presentation-business-data-presentation-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9af0a230-679d-4b98-89d1-1634f3505dd3/template-card-presentation-business-data-presentation-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/36d944ce-548c-48ac-8d20-ef9789854cc9/template-card-presentation-business-data-presentation-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1b0a0751-3157-423d-8359-11fa404c1388/template-card-presentation-business-data-presentation-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/69524f5b-e966-42fd-a2b2-f66cd73765d6/template-card-presentation-business-data-presentation-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0bde4d93-1886-4c93-bcf1-063a1e69a86c/template-card-presentation-business-data-presentation-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fd2284ea-0f30-4d15-8cde-63ae0edd3c0a/template-card-presentation-business-data-presentation-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/594f59da-1ae0-42e3-ac01-97af7f7ec88a/template-card-presentation-business-data-presentation-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/791304f7-952e-4862-8209-2dd8e6735253/template-card-presentation-business-data-presentation-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/93c20663-bbf8-4ae2-b587-0dc4a7c75292/template-card-presentation-business-data-presentation-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/914e3fb7-d6c3-4bec-90b2-52b510e63c5e/template-card-presentation-business-data-presentation-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/05dceaff-f3bd-4557-ac30-e7eda5443475/template-card-presentation-business-data-presentation-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f82b2e6f-56de-486e-a05e-b13f3fa7617e/template-card-presentation-business-data-presentation-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6d1c69b9-89ac-4d53-aedc-53d71987d190/template-card-presentation-business-data-presentation-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/06cccce3-0c62-4883-a6e1-6f53642b8267/template-card-presentation-business-data-presentation-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/be635b63-8ffc-43b6-b050-8327a57951bb/template-card-presentation-business-data-presentation-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/611b9af1-b28f-4bb1-9b59-0828081fee2d/template-card-presentation-business-data-presentation-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bc89eaa4-71f4-4ea1-ac89-2b2fb8ba0d75/template-card-presentation-business-data-presentation-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"crayon-learning-deck\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/573d3324-9c37-4766-85da-a1028b067558/template-card-presentation-crayon-learning-deck-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5db0e73c-4312-4bcf-8b60-9094d2aafeac/template-card-presentation-crayon-learning-deck-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7485a80b-eea3-46a4-a2be-507990a38b5f/template-card-presentation-crayon-learning-deck-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7d6e15cb-91d9-4d72-8754-baa6ddb8085a/template-card-presentation-crayon-learning-deck-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/94734712-0cc3-4b4c-9003-84af1a2514af/template-card-presentation-crayon-learning-deck-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/007f3750-d7d9-4ac2-aa1c-62e384f320c3/template-card-presentation-crayon-learning-deck-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/56596bbb-dd78-4005-9f59-d95d8ae8f740/template-card-presentation-crayon-learning-deck-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d033dbf6-7795-4657-ba57-036d54613ba6/template-card-presentation-crayon-learning-deck-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f0f6c062-7004-4827-8278-8bcf0ac60c7c/template-card-presentation-crayon-learning-deck-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1ac6347b-85f4-4309-b900-dc7b1938c899/template-card-presentation-crayon-learning-deck-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b86464ef-6475-4d6c-a35c-b6f6a192864a/template-card-presentation-crayon-learning-deck-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c9747d98-4680-471e-8bda-d17a7e781f32/template-card-presentation-crayon-learning-deck-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bac65be5-5285-4b74-bd74-ac7c3625e62b/template-card-presentation-crayon-learning-deck-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/db4d73de-6ac9-4976-93f0-83003d2ca127/template-card-presentation-crayon-learning-deck-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/329b2c3a-443e-4300-9325-7fd9bcfc78e1/template-card-presentation-crayon-learning-deck-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8f780748-e093-46d8-9ed5-014b5638d4ee/template-card-presentation-crayon-learning-deck-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4df5908d-e971-4a00-b109-e148d8f1b9c9/template-card-presentation-crayon-learning-deck-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/78ab4a40-cace-424a-bf00-9856cbefc208/template-card-presentation-crayon-learning-deck-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1e153a66-0c52-4986-a09f-33d0eafd4f3e/template-card-presentation-crayon-learning-deck-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"creative-agency-presentation\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f40c998e-8046-487c-9bbd-6de2cfcdc7c8/template-card-presentation-creative-agency-presentation-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9ffc824b-516f-4187-b353-d3422b2d7436/template-card-presentation-creative-agency-presentation-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d69583c5-773a-4b29-8319-040858da2451/template-card-presentation-creative-agency-presentation-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/87fb4345-ec2d-42ee-940f-b1b447fdf660/template-card-presentation-creative-agency-presentation-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/caf31c90-310b-4565-afbc-56417821d89b/template-card-presentation-creative-agency-presentation-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8969312f-2959-4d7f-9d20-8a8e7086246d/template-card-presentation-creative-agency-presentation-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f5cc7730-ea22-4c98-840c-97f24eb3c605/template-card-presentation-creative-agency-presentation-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9186e9b5-54e6-4074-a218-13dab23a9407/template-card-presentation-creative-agency-presentation-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/756ca741-5821-4d80-96eb-19d4c0e32676/template-card-presentation-creative-agency-presentation-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9a7a0379-0c46-4bc0-b0f4-68d58955b615/template-card-presentation-creative-agency-presentation-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9b5f41e4-ac6c-4196-8758-1bc3b8b3fc60/template-card-presentation-creative-agency-presentation-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d178524d-c2ab-4f0d-89dd-39164f3928a5/template-card-presentation-creative-agency-presentation-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bd33d969-516d-4de3-9341-959a917a7fa7/template-card-presentation-creative-agency-presentation-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bbd6d782-d1d5-4fe5-9953-c96f8185e9be/template-card-presentation-creative-agency-presentation-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/94c2b0dd-f91a-45d7-a6e7-11d802ab23f9/template-card-presentation-creative-agency-presentation-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ce8fbeb8-7147-45d0-87c3-8369a6431d21/template-card-presentation-creative-agency-presentation-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7996a715-00f6-4e49-b7dd-1c8544917fa6/template-card-presentation-creative-agency-presentation-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c9f67da1-e05f-4db2-aee2-d4346bdff8ca/template-card-presentation-creative-agency-presentation-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9cfb560f-a59a-4284-8f7d-97cf101a77fb/template-card-presentation-creative-agency-presentation-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"data-report-presentation\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f8aa6480-16c2-4c20-8921-d1f9374a5583/template-card-presentation-data-report-presentation-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/77be1b72-eb93-40a3-8092-5f00d4773cf3/template-card-presentation-data-report-presentation-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6bea2f09-6981-48b9-96d2-32dc7c041c33/template-card-presentation-data-report-presentation-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/edb92e56-ec4f-4c68-9504-eab5a1c0d229/template-card-presentation-data-report-presentation-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5c2dbc64-ac8d-4227-b77a-54e438c945b2/template-card-presentation-data-report-presentation-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2103179a-6531-4d74-a783-f2a53d96db1c/template-card-presentation-data-report-presentation-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a6b0b5a2-ffe4-4cd4-ac0a-5248771f58da/template-card-presentation-data-report-presentation-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e3fde814-becf-4201-80de-c15ad28b9877/template-card-presentation-data-report-presentation-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/afc0eb94-05bb-45fe-8941-13345a43b530/template-card-presentation-data-report-presentation-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/627a0a57-4331-45c1-b85b-753748d32a49/template-card-presentation-data-report-presentation-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e444ffa3-fbbe-46be-8bce-b82eb05185f0/template-card-presentation-data-report-presentation-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c0657808-bbe4-421c-a539-73f29a88a9c9/template-card-presentation-data-report-presentation-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/777500cb-5c20-4ad4-80f1-b03fbabfafd9/template-card-presentation-data-report-presentation-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/75e4fd23-7e64-4a46-bf48-b56fe40d1e04/template-card-presentation-data-report-presentation-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/85e0270e-b8e0-4549-9361-9e809621fbc7/template-card-presentation-data-report-presentation-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9dddacc9-045a-4f59-9953-373f08fdbc33/template-card-presentation-data-report-presentation-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9b92dcbc-44b4-4b5d-ab9d-eea720a40f64/template-card-presentation-data-report-presentation-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/99b8df33-52d3-4f4e-8449-bb3c3cbdc1cc/template-card-presentation-data-report-presentation-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/17a13840-f70b-48c4-8ac7-9b541a4a034f/template-card-presentation-data-report-presentation-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"editorial-magazine-deck\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1551e99d-7620-49ec-bf1e-b578632a0358/template-card-presentation-editorial-magazine-deck-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/903c73a7-8b68-4f2d-8fde-b913b016ecf4/template-card-presentation-editorial-magazine-deck-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e549b9eb-9b2e-476a-88d1-ca7bb0d8667f/template-card-presentation-editorial-magazine-deck-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a020ced3-6b94-408c-9936-3f9addd6a386/template-card-presentation-editorial-magazine-deck-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/547d59dd-2c5d-4d67-b0dd-bc23d288ceb6/template-card-presentation-editorial-magazine-deck-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/41c954ab-40d3-450b-8224-12d8072e0a5f/template-card-presentation-editorial-magazine-deck-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c7bf667b-c28e-41c9-8b3d-a05ecf28fd70/template-card-presentation-editorial-magazine-deck-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/32334be2-ab20-43f8-87b8-28a31777cacc/template-card-presentation-editorial-magazine-deck-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/12b85e98-ea95-4bb7-81d3-406560a37cd5/template-card-presentation-editorial-magazine-deck-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b81decad-3717-4619-8f34-4cb9eae5c56d/template-card-presentation-editorial-magazine-deck-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/53d77993-878f-4a9f-a1fc-6739794660b6/template-card-presentation-editorial-magazine-deck-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/23fe637e-8bff-40f0-a9ec-1aff2cb3063a/template-card-presentation-editorial-magazine-deck-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7e9a2615-eafb-4fbe-91be-1c50192cb42c/template-card-presentation-editorial-magazine-deck-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6f725279-a3b0-4d30-b20f-4782d6301ec3/template-card-presentation-editorial-magazine-deck-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d8ce4a9-5ecb-4220-af1b-ab4d020dbd6c/template-card-presentation-editorial-magazine-deck-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8d1782b7-7ffe-46f2-9959-1401f8925f0b/template-card-presentation-editorial-magazine-deck-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0f906828-9f9a-4511-b402-8eeaf76150eb/template-card-presentation-editorial-magazine-deck-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/edccdf1a-affc-426c-8477-b86947032d70/template-card-presentation-editorial-magazine-deck-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3ed37006-a3a0-4347-adae-74ab5551972c/template-card-presentation-editorial-magazine-deck-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"landing-consulting-deck\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f98d416d-0c26-4442-a72f-f960321c0bca/template-card-presentation-landing-consulting-deck-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4273d3e4-08de-4a0a-b1d4-03f620310ac5/template-card-presentation-landing-consulting-deck-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b2d0970e-cdbe-406f-ae44-a544dc2058c9/template-card-presentation-landing-consulting-deck-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/41e46ea8-24f6-496e-834a-ea1f192024d7/template-card-presentation-landing-consulting-deck-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c38f2446-4972-408b-8aa2-b870aac00c8c/template-card-presentation-landing-consulting-deck-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/54caa4f0-4db9-49ed-b94f-29610ee39844/template-card-presentation-landing-consulting-deck-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/915bfc6d-5fb8-48dd-8183-86794fc51680/template-card-presentation-landing-consulting-deck-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9805a606-0587-471d-9429-d9326dcfd31d/template-card-presentation-landing-consulting-deck-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/60db33cd-70cf-4d07-bd4a-5746b3fed10f/template-card-presentation-landing-consulting-deck-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/99eafab2-1abc-4841-a3fb-f3625ee29546/template-card-presentation-landing-consulting-deck-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e24adc64-24d6-4a8d-9b64-cfed4face42e/template-card-presentation-landing-consulting-deck-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7f9ded5-98b3-4636-8c14-3aafb0ceb5b3/template-card-presentation-landing-consulting-deck-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c2dc239f-52da-4468-9a55-82c7df87ebc5/template-card-presentation-landing-consulting-deck-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7f94ec43-c3c4-4044-a5f9-84006d39fdbd/template-card-presentation-landing-consulting-deck-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/25479deb-9d31-4170-8827-77136e3c1d99/template-card-presentation-landing-consulting-deck-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d94f2dae-e7d0-4d4f-a513-b2e89b9c61a6/template-card-presentation-landing-consulting-deck-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e5ffec05-27f0-49c6-942e-1000cc95f818/template-card-presentation-landing-consulting-deck-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dfbaabfd-287f-4dfe-a48e-003e9da5db0f/template-card-presentation-landing-consulting-deck-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/85a5bd66-c044-4898-8c33-e64b874acaf1/template-card-presentation-landing-consulting-deck-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"lumina-creative-studio\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a92421d1-e4b5-4485-94b8-ba503d4dc8f5/template-card-presentation-lumina-creative-studio-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0ed47289-d3ce-4e60-b6dd-642090cc5130/template-card-presentation-lumina-creative-studio-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/78ce10cb-cb36-4c11-b8c7-e5ad59ef0249/template-card-presentation-lumina-creative-studio-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9958589a-2a37-46ee-bda8-fcd671b5be84/template-card-presentation-lumina-creative-studio-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3ef8c102-83e2-4690-800a-ecdca149d84a/template-card-presentation-lumina-creative-studio-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f865d013-fa34-43ad-9552-0cbc3ffdfad2/template-card-presentation-lumina-creative-studio-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ca187a3a-e808-4eb3-9e34-e41856d52377/template-card-presentation-lumina-creative-studio-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/00c5d13f-9458-4d87-9ae6-637e896ebe62/template-card-presentation-lumina-creative-studio-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9de8dc58-dada-4807-bb42-9ddd2a67631d/template-card-presentation-lumina-creative-studio-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d6224e63-2243-4fae-946a-53ee478ee818/template-card-presentation-lumina-creative-studio-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/991d9715-1fda-40bc-81ca-e1a0b6d53b34/template-card-presentation-lumina-creative-studio-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d1b7289-aef4-404f-b00b-1471c29c6907/template-card-presentation-lumina-creative-studio-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a7bfe0e9-3871-41f3-9e13-eb0c5cd81893/template-card-presentation-lumina-creative-studio-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3dc4e053-5613-4212-af8b-5f3454188e9f/template-card-presentation-lumina-creative-studio-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/21a22d38-ae77-4ff0-b7cb-8eeddf03efc7/template-card-presentation-lumina-creative-studio-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c89fa05a-f56a-48bb-b022-947fc09604e0/template-card-presentation-lumina-creative-studio-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7546735-b333-4dc8-a5f0-469043794f1e/template-card-presentation-lumina-creative-studio-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2d4f6e59-80ed-492e-8763-6ce2bbf32796/template-card-presentation-lumina-creative-studio-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2e043033-bda0-44ed-acd6-2d5eacd54104/template-card-presentation-lumina-creative-studio-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"mosaic-geometric-pitch\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/75c14836-a2b8-4f8a-b191-485317971dd9/template-card-presentation-mosaic-geometric-pitch-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9f6d4b35-3bc5-45be-aca3-18f6ec21530f/template-card-presentation-mosaic-geometric-pitch-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/014a0d17-b78a-48e7-b5cf-62d221204996/template-card-presentation-mosaic-geometric-pitch-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/14a7405a-25fe-4fe6-a05e-37e00fe78b2c/template-card-presentation-mosaic-geometric-pitch-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/20a6c016-082d-40c1-af47-a1a61c2f9e24/template-card-presentation-mosaic-geometric-pitch-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/125f9f28-64ec-4ec7-861b-7f508de7e1cf/template-card-presentation-mosaic-geometric-pitch-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8c545c12-fa00-4928-9d10-03cb3aaa99c2/template-card-presentation-mosaic-geometric-pitch-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a7f73d59-ea59-4b2f-a5b9-0482ddeed21e/template-card-presentation-mosaic-geometric-pitch-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/564b4bf7-ea19-4dd0-b320-2696db573aa9/template-card-presentation-mosaic-geometric-pitch-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/47350842-757c-4c4c-bf0f-ca8b14a3248a/template-card-presentation-mosaic-geometric-pitch-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/736c1ca8-0cd7-4832-87af-26ab7368252c/template-card-presentation-mosaic-geometric-pitch-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b2a98f28-8e60-4125-be6d-55b57fb69761/template-card-presentation-mosaic-geometric-pitch-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0d8eb614-f292-4992-b54e-917b35107446/template-card-presentation-mosaic-geometric-pitch-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e17df1f3-5530-4049-88d0-7c1287c0919f/template-card-presentation-mosaic-geometric-pitch-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4303dc0c-a8d6-45dc-80c0-18cbd993646f/template-card-presentation-mosaic-geometric-pitch-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/41557a1c-924f-4004-82e2-96689a341470/template-card-presentation-mosaic-geometric-pitch-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/91c4c7ec-bc83-4279-8d17-7bc918c83cc3/template-card-presentation-mosaic-geometric-pitch-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f3a8270e-5b43-4dac-b1af-4594b8093a7c/template-card-presentation-mosaic-geometric-pitch-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d889c78b-afae-494c-b912-8fd4fc79407d/template-card-presentation-mosaic-geometric-pitch-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"playful-pop-deck\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/824ca947-243b-468d-b2f2-cca11ac2fc21/template-card-presentation-playful-pop-deck-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7fd0063f-1782-41e7-beb6-8348b49b2854/template-card-presentation-playful-pop-deck-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9de5f4ed-f828-43ba-9817-059006bfae14/template-card-presentation-playful-pop-deck-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/35cd8145-7eb0-48f7-a125-031a9fb306d1/template-card-presentation-playful-pop-deck-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8b43ed5f-49c6-4b02-a363-04df4f63fffb/template-card-presentation-playful-pop-deck-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3cee34f8-ea65-4d88-8640-63e642d07115/template-card-presentation-playful-pop-deck-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ff194e5b-df8c-49ae-9b85-f17b9015b73f/template-card-presentation-playful-pop-deck-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/982e5b49-3ed8-474e-8c36-448bcd4a6e80/template-card-presentation-playful-pop-deck-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b27357bd-7424-41c6-bdf9-6b45af2f8976/template-card-presentation-playful-pop-deck-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/60ae9b9e-a4b6-4c7f-8890-98f838386af2/template-card-presentation-playful-pop-deck-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/38a1e94b-de28-4ec7-ad53-22d0f8fccfb6/template-card-presentation-playful-pop-deck-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b0d43553-5c35-44fa-b34b-c3ea8617a09a/template-card-presentation-playful-pop-deck-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9e0f8f22-3078-4aec-bb6d-f759adc31524/template-card-presentation-playful-pop-deck-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/51d0681e-cbf3-4dcd-9072-359c8770c92b/template-card-presentation-playful-pop-deck-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/14ba252c-5e1a-4f2f-abcb-d62849b96ffd/template-card-presentation-playful-pop-deck-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7e8c4886-9433-4336-92e6-8a518f3135dd/template-card-presentation-playful-pop-deck-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9fcb63ea-85cd-4347-8ad9-488d9a9db0d7/template-card-presentation-playful-pop-deck-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/18fa6a6b-faee-4f8f-bdf0-733d0580bf6e/template-card-presentation-playful-pop-deck-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c7eb7646-65ae-463b-903e-4766f0721d70/template-card-presentation-playful-pop-deck-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"bloom-pitch\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/35347eab-989d-46da-8cd4-6846e9e18ae9/template-card-presentation-bloom-pitch-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/230f3210-598c-40da-8fad-7d9542b81a4c/template-card-presentation-bloom-pitch-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/14a9175b-eef4-4e7d-bb60-460320f9218a/template-card-presentation-bloom-pitch-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/25c375ca-29a9-46a2-83f4-9c6fe1bbbd4f/template-card-presentation-bloom-pitch-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/301f42f0-6951-4a4d-ae7d-492698cc9258/template-card-presentation-bloom-pitch-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/33f0825f-7ee7-440b-963b-fa0d530d33fc/template-card-presentation-bloom-pitch-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/af105437-5b40-4aa4-a89c-d82af48c0f7e/template-card-presentation-bloom-pitch-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/31ca5d00-5892-4066-b86b-4ab0cb9a152f/template-card-presentation-bloom-pitch-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/905769f2-adc4-49d0-b4a5-d53a13b4dd2a/template-card-presentation-bloom-pitch-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3a3324ce-31ee-4e27-9185-18af861e8a64/template-card-presentation-bloom-pitch-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/14ece89e-3cac-428a-afb8-a693a7eb6edf/template-card-presentation-bloom-pitch-berry-pop-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/54187934-28bb-45f9-99b2-85a87b393b68/template-card-presentation-bloom-pitch-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bcbfde4e-8e65-4ac1-acf3-ee3f3af1c0bf/template-card-presentation-bloom-pitch-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cc225486-a2bd-4914-8bff-490178ac69ad/template-card-presentation-bloom-pitch-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a37df412-a08f-4a4f-9aa6-95fad92954e3/template-card-presentation-bloom-pitch-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4276aab6-90fe-4ea8-8672-be653e59e062/template-card-presentation-bloom-pitch-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/207bbb3b-70a3-41ad-9680-4f80dd6c6d34/template-card-presentation-bloom-pitch-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c07c402d-9dfc-4ccc-8eea-383fab53775c/template-card-presentation-bloom-pitch-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/99ca85e7-744d-4082-9cab-c0d274b1337d/template-card-presentation-bloom-pitch-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"blueprint-academy\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7d2e08a0-439f-46fe-a441-e39747de1212/template-card-presentation-blueprint-academy-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ba862728-b489-4bb4-8f6b-2afb5be91001/template-card-presentation-blueprint-academy-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/efc7d153-29e9-4180-bff0-1c6fe42bf5e5/template-card-presentation-blueprint-academy-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fac3c5c7-e87f-4482-9214-afbc37ee6135/template-card-presentation-blueprint-academy-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/beeee408-82cf-4965-bafe-2db5fb8602bd/template-card-presentation-blueprint-academy-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3557bad1-2e19-4284-a263-eece873a07f8/template-card-presentation-blueprint-academy-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/96d87e06-aaaa-4b46-8547-1876f8f1c8a3/template-card-presentation-blueprint-academy-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b6f8be0a-2ebc-4060-a6cb-f68a7640a514/template-card-presentation-blueprint-academy-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/599907b0-e101-4f73-93e6-14ed149d561a/template-card-presentation-blueprint-academy-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/87e2f57f-584c-46e4-b51c-a5549fd597c7/template-card-presentation-blueprint-academy-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e2cd5cf4-ab78-4b96-8013-aea034087622/template-card-presentation-blueprint-academy-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9814e9c7-1b58-40a5-a341-e6dbc8a8be9f/template-card-presentation-blueprint-academy-berry-pop-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/93bb8ccf-477e-4859-9a80-4117664d2bf4/template-card-presentation-blueprint-academy-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/69e3e91b-eaa4-417c-9ad4-10c19e78a72c/template-card-presentation-blueprint-academy-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a2b24f7b-ef4d-489d-a35e-42440a60417b/template-card-presentation-blueprint-academy-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/27b26028-107d-4574-975f-876a97580e15/template-card-presentation-blueprint-academy-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a54294df-1162-47c8-9734-4e63fe3e2de8/template-card-presentation-blueprint-academy-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/11516e2b-644e-45be-b302-22482daa4578/template-card-presentation-blueprint-academy-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/277df515-a377-4689-8821-69cef46faa34/template-card-presentation-blueprint-academy-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n meridian: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/de20bbf9-8e3a-4559-b973-8e5e8257a3ee/template-card-presentation-meridian-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b567ed2a-93ce-491e-a57b-3695030d15de/template-card-presentation-meridian-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0cda265e-dc6f-4155-a574-03738317ae25/template-card-presentation-meridian-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/77928d19-c357-4879-a4c4-4dcf73fa80fd/template-card-presentation-meridian-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2294bc61-1f38-42f0-82d4-3161e63a6a81/template-card-presentation-meridian-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/139debec-2762-4f12-8b51-e6c81f6bed91/template-card-presentation-meridian-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fd11cdd5-c52f-4944-a735-ac54a60788e5/template-card-presentation-meridian-forest-editorial-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9f44f1a6-8e86-48fd-9322-5e7f60cc2f9a/template-card-presentation-meridian-slate-corporate-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/766756ad-9abb-42a9-acd2-8b8d983bc001/template-card-presentation-meridian-coral-studio-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/093a5d56-c399-43a8-97eb-caa988f76a11/template-card-presentation-meridian-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/49f1dccc-8b0e-488c-813e-69db266bb7cb/template-card-presentation-meridian-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0fcac9c7-b1e4-472f-9595-5b1969f69e8f/template-card-presentation-meridian-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9896d112-e859-494e-9750-d0126af2873d/template-card-presentation-meridian-berry-pop-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/acbbf029-1f2a-420f-b9fc-5c3e9eadc9a5/template-card-presentation-meridian-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3bd1b7ec-6a88-4b4b-9622-4c844255b971/template-card-presentation-meridian-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/23eb2ed6-fc1f-4070-8b0d-693376592de6/template-card-presentation-meridian-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8c38bdf2-674d-4d1c-8d58-4cb69607dfcb/template-card-presentation-meridian-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5749c58a-6c4b-4b32-903f-7be7ae4a89c2/template-card-presentation-meridian-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/023b2be2-a37e-4c1c-8d88-19cea31a0cbc/template-card-presentation-meridian-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"neo-brutalism\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e5a46773-05fd-4924-91f2-b8c902d84958/template-card-presentation-neo-brutalism-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d9c04806-8fbf-41c1-a669-e793522204d8/template-card-presentation-neo-brutalism-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/97ab3f21-3105-4fb9-b0e0-264d9865eef2/template-card-presentation-neo-brutalism-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/58accc81-eacc-4f8f-b02a-35b5d2acb742/template-card-presentation-neo-brutalism-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c73c3b1a-0e68-4740-af75-614118574683/template-card-presentation-neo-brutalism-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9e3ddc73-36ad-4640-97c6-6420e3df5860/template-card-presentation-neo-brutalism-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/611711cc-b79f-4d02-a8e6-1ef2803797ff/template-card-presentation-neo-brutalism-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1ce685e3-8f30-4f73-870a-5c33eb50c934/template-card-presentation-neo-brutalism-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6ed0fe45-5cb1-4b5a-81a2-2cef5df8c765/template-card-presentation-neo-brutalism-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/079cb4aa-bec0-43ff-875b-4ffffa467901/template-card-presentation-neo-brutalism-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/96eb10dc-0658-43e0-88a9-4892d07d9f26/template-card-presentation-neo-brutalism-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cd3e83ce-91f3-4149-b9ad-422d00579433/template-card-presentation-neo-brutalism-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e76f1c4f-5ef7-474a-951c-0b7a4ef2898d/template-card-presentation-neo-brutalism-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2e682f70-2dab-41cb-b8d5-cbcc663bcf5b/template-card-presentation-neo-brutalism-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b8928393-4a58-4f9e-bc6b-3096c6fe51b4/template-card-presentation-neo-brutalism-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/379b03c0-17da-4aee-b790-1b516c9436ed/template-card-presentation-neo-brutalism-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3e5b2200-2a4d-4dbf-9c7a-ed69ba9dbc3b/template-card-presentation-neo-brutalism-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3a2141a4-f0fb-4610-8035-f17cd7562f5e/template-card-presentation-neo-brutalism-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7f029831-8e6d-49ce-9bb4-3879d78a2bdc/template-card-presentation-neo-brutalism-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n nocturne: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/47060ac2-2255-491b-822e-17e4879e8bb3/template-card-presentation-nocturne-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/86e393ee-3e0c-4a96-b15c-af1a6bf6421a/template-card-presentation-nocturne-carnival-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6c55154a-a225-4239-8c4e-c3e2f8963597/template-card-presentation-nocturne-warm-sand-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2c1d697a-5a5b-4745-8786-d4a200907259/template-card-presentation-nocturne-pop-art-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0ad83df4-0749-4516-a917-fe8a0a246989/template-card-presentation-nocturne-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fb54e933-d3c0-48ec-83ce-4878acc674ea/template-card-presentation-nocturne-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c5188fd6-2cf8-4967-a527-a73455608ef6/template-card-presentation-nocturne-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/32dea48f-97b4-44fc-a32c-dbd30335e67d/template-card-presentation-nocturne-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d60f2752-79e9-46d0-9f98-39f109529a2b/template-card-presentation-nocturne-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/193a67b0-1084-4b4d-a68f-ebd83cff3595/template-card-presentation-nocturne-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bab7e049-8f49-4cbf-9084-77576c755218/template-card-presentation-nocturne-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b7c2717f-cdf3-46af-8ffc-86a54d3cafd7/template-card-presentation-nocturne-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/696367c1-aee5-4c34-bc24-bdba10917111/template-card-presentation-nocturne-mono-ink-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2e5415a3-27e7-4320-97db-bc5d9d684fc8/template-card-presentation-nocturne-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/28abedd2-b9e0-447f-a445-f0daa2235fae/template-card-presentation-nocturne-mint-tech-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b84c2859-8c0e-4e9b-b997-d9ff24162e01/template-card-presentation-nocturne-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b994d5c8-9601-4108-a80b-ed4cb88b3c18/template-card-presentation-nocturne-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9192f3e7-4ae4-4bf7-ac54-03d64834ce95/template-card-presentation-nocturne-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ec854c97-62c3-4bdd-b820-cdf62fafa5ef/template-card-presentation-nocturne-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"pixel-glitch\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/481b2398-8cbe-436b-a54d-6b277cb5c444/template-card-presentation-pixel-glitch-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2480dd7a-16ca-41e7-9308-731a0a8ed3bf/template-card-presentation-pixel-glitch-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/522d8149-0bba-4cb3-87df-234d8e7c8119/template-card-presentation-pixel-glitch-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fd49cd12-5fa9-41af-ac99-0a6a7553b89f/template-card-presentation-pixel-glitch-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ee6cc1a9-a8a7-4a66-9876-2d227c5a5a22/template-card-presentation-pixel-glitch-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/51b7c1f4-6d8c-46d7-ab49-93562b316198/template-card-presentation-pixel-glitch-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/80d95fa9-436b-42ea-b8e0-910d498d55e6/template-card-presentation-pixel-glitch-forest-editorial-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d18066ad-5876-46a4-9e2b-beabc6a38c87/template-card-presentation-pixel-glitch-slate-corporate-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/55e56b20-bef1-4d48-a84e-b1cafe758639/template-card-presentation-pixel-glitch-coral-studio-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/30a04cf3-a8c1-40ee-810c-20f743888c55/template-card-presentation-pixel-glitch-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7337562e-a8ba-4fbb-8eb7-84d23d57ca8e/template-card-presentation-pixel-glitch-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/12b12048-c8e3-4db3-bb41-3a1cd52f36b4/template-card-presentation-pixel-glitch-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/89a13e2b-b065-4b37-bd7a-275fe81b0063/template-card-presentation-pixel-glitch-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/70351076-1fbd-4767-b21d-ee2948ce1655/template-card-presentation-pixel-glitch-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ade9a11c-3b04-4a50-95e3-c30850eca22f/template-card-presentation-pixel-glitch-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c85b5845-b940-477c-b612-7f3a6c8ee25f/template-card-presentation-pixel-glitch-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2b38c57a-09d3-4edf-84f1-4280b35e2c2b/template-card-presentation-pixel-glitch-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/75243e50-5478-4b14-8d4b-9162ab26b63c/template-card-presentation-pixel-glitch-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2e62a49a-5dda-4e37-b785-97627cda9db4/template-card-presentation-pixel-glitch-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n prospectus: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ee78696e-9a29-4988-b414-119e5bef18cf/template-card-presentation-prospectus-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c7621b28-8739-48e5-9d09-ef31bbad67c4/template-card-presentation-prospectus-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/911ce6d0-c609-4104-80ad-ff804f6432c8/template-card-presentation-prospectus-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/681e8f71-ab41-433a-8fb5-2bc2c6524d68/template-card-presentation-prospectus-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3d281372-94d7-494b-96a0-69d4d693fae1/template-card-presentation-prospectus-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/609ca9f6-6807-42f8-af02-64ec9abc699e/template-card-presentation-prospectus-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6f753c56-9598-4605-afde-b526761176c9/template-card-presentation-prospectus-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d2239e3-ce16-4072-83cd-9f64ecf01e29/template-card-presentation-prospectus-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/35b01a49-0f92-482d-b930-edde0cfdeea1/template-card-presentation-prospectus-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7851aeb9-6adf-413e-97ce-d4159dcfaa75/template-card-presentation-prospectus-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a3b54886-3891-4b92-b54d-ceeec40b9816/template-card-presentation-prospectus-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d9b28cff-3f80-4ade-81b5-1fb198f9a268/template-card-presentation-prospectus-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c4d91151-4df8-418e-8ed4-0ca7e3f90028/template-card-presentation-prospectus-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e4d0c1fb-042f-4a67-93dd-318dd219e1d8/template-card-presentation-prospectus-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5915d9b5-c2d8-4fe2-996b-486fd21cad27/template-card-presentation-prospectus-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a8b70c7d-c3f1-435f-9df9-7cc48a65b015/template-card-presentation-prospectus-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7a37e9f5-42de-43aa-8273-df89a7821464/template-card-presentation-prospectus-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/93c4d241-247d-45cc-ad8a-6dd8d66ee18b/template-card-presentation-prospectus-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/aeda0b75-44aa-4baf-bf45-c279aba63e81/template-card-presentation-prospectus-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n schoolhouse: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fd1bebe9-bc2b-4773-a437-969e5d820b43/template-card-presentation-schoolhouse-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/081c0721-fccd-4281-aae8-a690db56ce39/template-card-presentation-schoolhouse-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1dabfea2-d93a-4cac-b18e-71c75385a768/template-card-presentation-schoolhouse-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/43b0eb05-5efa-4e98-a342-776aec5ccf1e/template-card-presentation-schoolhouse-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d65c960e-2dce-4f6a-b8c8-c5b270df41c3/template-card-presentation-schoolhouse-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/eecf7cf5-bd26-435b-bbc9-b9e9fddf8f86/template-card-presentation-schoolhouse-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/821c23f9-46c4-4e6f-888c-80ff15250b7c/template-card-presentation-schoolhouse-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4fc14c67-2280-4430-803b-a0046cfc09cf/template-card-presentation-schoolhouse-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0d3047af-44ce-4f4c-92c9-463e9ba21b2f/template-card-presentation-schoolhouse-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/711a7c8e-dac2-459d-b751-0a016ee3763d/template-card-presentation-schoolhouse-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bedee58f-4988-441a-b207-f894f03add4d/template-card-presentation-schoolhouse-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e9301948-d620-4dee-a76b-ab2ebf228148/template-card-presentation-schoolhouse-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f91d627a-644e-4872-90b3-6abd4b7fd209/template-card-presentation-schoolhouse-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c0e50c3b-9e48-47d5-978f-5115d0094303/template-card-presentation-schoolhouse-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/50648f87-8f18-4646-ae36-2fd212e19158/template-card-presentation-schoolhouse-mono-ink-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2780816a-434d-4203-b80a-67ebd79aa025/template-card-presentation-schoolhouse-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d20120c-2920-4148-ad42-bdcfb4b799f1/template-card-presentation-schoolhouse-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a43eebaa-911f-4c1a-823e-af4a6f797c91/template-card-presentation-schoolhouse-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/be9c0717-742d-4d41-a4e8-ead241124b6d/template-card-presentation-schoolhouse-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"sticker-scrapbook\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ca5c4a1c-eb36-4462-a6e8-e64453798c5b/template-card-presentation-sticker-scrapbook-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/336e9804-41cf-41d5-a2e3-ae127205f700/template-card-presentation-sticker-scrapbook-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b43c91a7-dbc3-442f-9319-6d3d8c9dbddf/template-card-presentation-sticker-scrapbook-pop-art-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9cf18292-0ae1-4c00-bf36-552e44468ee2/template-card-presentation-sticker-scrapbook-nordic-frost-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0eebc10c-16d4-4722-8483-157fbf4dc864/template-card-presentation-sticker-scrapbook-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a020f7d4-0cab-466e-a344-5fbe832cf476/template-card-presentation-sticker-scrapbook-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/210ea3dd-4298-468f-bef2-896f8dc20948/template-card-presentation-sticker-scrapbook-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ab4ac022-0454-4c23-bcaa-a4258a2646aa/template-card-presentation-sticker-scrapbook-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9fed234f-eb63-4296-915f-1de54528a1ff/template-card-presentation-sticker-scrapbook-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f3197cd0-0b7b-4fa6-aca1-7f4dc363084c/template-card-presentation-sticker-scrapbook-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/092bd74d-0b60-49b8-88d9-7a73241bf6cc/template-card-presentation-sticker-scrapbook-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/07656a02-12dc-49fc-a328-25a7d11ed13e/template-card-presentation-sticker-scrapbook-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2d8b7b45-129b-4ace-a528-b4381f42175b/template-card-presentation-sticker-scrapbook-mono-ink-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/44e915f1-5fbc-4129-bc03-444be1beca68/template-card-presentation-sticker-scrapbook-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/72e91eab-542d-45f6-9cef-5989ab861fcc/template-card-presentation-sticker-scrapbook-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/75efce92-326a-44cf-b027-d5d265b087b1/template-card-presentation-sticker-scrapbook-mint-tech-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4bd6781b-bd7f-459f-8e58-d76f33e96854/template-card-presentation-sticker-scrapbook-ocean-deep-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2cae903b-0044-4255-9441-9b4e7d28c2eb/template-card-presentation-sticker-scrapbook-midnight-mono-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a21b891a-76f7-4195-83dc-d4fbc363ae82/template-card-presentation-sticker-scrapbook-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n strata: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/72a43438-0e3d-40af-95b3-5134e5dc3b4d/template-card-presentation-strata-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/67855d35-f892-49ce-a53f-a73e65c2ada5/template-card-presentation-strata-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/58623674-39cf-4535-817b-6bf57e0c0a01/template-card-presentation-strata-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7d0ac85f-5d2d-4cb7-9390-38b8aea3da41/template-card-presentation-strata-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/18fad345-bc9e-4c43-974a-1103ee1f065e/template-card-presentation-strata-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8a74e1a5-869d-49de-8871-479322a0d539/template-card-presentation-strata-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ee51749d-c417-4ca1-b556-28176166d86d/template-card-presentation-strata-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c6577050-4bdb-447d-bb0b-ce19a56fdb25/template-card-presentation-strata-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/11168bfc-57b8-49ce-8d9a-a38ecbe899d9/template-card-presentation-strata-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/861353d6-7c4c-45df-aec0-9ef4103694cd/template-card-presentation-strata-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4f82d9b5-65e1-4af5-8abe-cb1bfc3394d3/template-card-presentation-strata-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/661a2367-2d7c-4f46-8235-2a940c22234d/template-card-presentation-strata-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f8e12ed4-25f0-4c99-85a4-931aa56096c3/template-card-presentation-strata-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1726673d-8581-42d0-a088-16c88ab396be/template-card-presentation-strata-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/80f52012-f15e-4c0e-85c7-a66255fad20f/template-card-presentation-strata-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ae36aa15-edbd-4c21-8c52-e67e0006ab37/template-card-presentation-strata-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7e96a8c7-e056-4eb6-a3d4-3b210fc0526c/template-card-presentation-strata-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/76dbc0dd-0eef-47f2-96ae-d1581cb056bf/template-card-presentation-strata-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3d200d78-790c-4f75-863a-b164433363dd/template-card-presentation-strata-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n \"taped-consulting\": {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cc1fa0b4-4a80-4080-aa29-2e5e88fcedc1/template-card-presentation-taped-consulting-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/29a9f491-e529-4e25-a0fe-8bbad6292b5f/template-card-presentation-taped-consulting-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0962b3db-ebff-409d-84d9-280f9d776c67/template-card-presentation-taped-consulting-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a6e000f4-9495-4004-a4be-431fe3c2b1b7/template-card-presentation-taped-consulting-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/08e71cc7-b76d-465c-af0d-663f05f4e5d1/template-card-presentation-taped-consulting-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/eb1e00ad-835c-4dff-88c5-fca88e4b88c3/template-card-presentation-taped-consulting-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ffee95a5-e561-419c-ac27-fdef4495d732/template-card-presentation-taped-consulting-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7ccb111a-d790-4545-bc77-e19a0b0042bb/template-card-presentation-taped-consulting-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0ca89f7a-bd0f-4085-b7dc-d70e0558fcb6/template-card-presentation-taped-consulting-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/37298c0c-3ecf-4d39-93b7-f01c0e156b4e/template-card-presentation-taped-consulting-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d3b185af-6b45-437a-af60-ab671ceab6eb/template-card-presentation-taped-consulting-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f586c683-ae54-4ff3-9ed8-24e989f7fe8b/template-card-presentation-taped-consulting-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7aa6b6b7-2039-40d6-8d59-edbf4442ecc6/template-card-presentation-taped-consulting-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2984e4fe-83c7-4a4a-9dd0-a49a9dcb2a5e/template-card-presentation-taped-consulting-mono-ink-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/72b5c577-251d-48c1-a429-096328ac8598/template-card-presentation-taped-consulting-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b77bd363-c309-47f8-b226-074cbbbc233d/template-card-presentation-taped-consulting-mint-tech-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fdb68a30-f335-49ad-bedb-fa7d8c61117b/template-card-presentation-taped-consulting-midnight-mono-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d4d3a17f-3a9d-4de0-b6ea-dcba7b86b5d7/template-card-presentation-taped-consulting-ocean-deep-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0a2d990b-8368-4b46-8c3b-47ddb5dc9f04/template-card-presentation-taped-consulting-gold-luxe-iframe-viewport-480x270.jpg\",\n },\n vantage: {\n prism:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/536ace67-54c4-4bf2-a53e-1ff0f0062ffd/template-card-presentation-vantage-prism-iframe-viewport-480x270.jpg\",\n carnival:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fb021ec7-f6a0-4124-b096-d9ae2173e01d/template-card-presentation-vantage-carnival-iframe-viewport-480x270.jpg\",\n \"pop-art\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9df78d40-4ad9-4f07-ab09-b90dea758b19/template-card-presentation-vantage-pop-art-iframe-viewport-480x270.jpg\",\n \"warm-sand\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9a3372b6-4b7a-4bc7-85f3-172e16b8d370/template-card-presentation-vantage-warm-sand-iframe-viewport-480x270.jpg\",\n \"bauhaus-primary\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a67fd082-0300-48a2-8e06-76914aa59a34/template-card-presentation-vantage-bauhaus-primary-iframe-viewport-480x270.jpg\",\n \"nordic-frost\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b1da8e2b-e23a-41dc-8aca-c36a66676b44/template-card-presentation-vantage-nordic-frost-iframe-viewport-480x270.jpg\",\n \"forest-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/66af2f92-353b-4d27-a12a-765e1186655e/template-card-presentation-vantage-forest-editorial-iframe-viewport-480x270.jpg\",\n \"coral-studio\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/39c3bbd2-49e9-4254-847a-353aabd6b1ed/template-card-presentation-vantage-coral-studio-iframe-viewport-480x270.jpg\",\n \"slate-corporate\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/71e1059c-b040-4a6d-a7eb-0ae10b57e41e/template-card-presentation-vantage-slate-corporate-iframe-viewport-480x270.jpg\",\n \"terracotta-clay\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/70232c94-4890-4dea-9e86-3d480b62f83a/template-card-presentation-vantage-terracotta-clay-iframe-viewport-480x270.jpg\",\n \"berry-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2471901a-80ed-4006-81cd-432b6a1fe4f6/template-card-presentation-vantage-berry-pop-iframe-viewport-480x270.jpg\",\n \"citrus-fresh\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2067e8c2-1d63-4764-8327-8b31a9313ba7/template-card-presentation-vantage-citrus-fresh-iframe-viewport-480x270.jpg\",\n \"mauve-dusk\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/87ebbe2c-2877-4133-8a5d-385b81a3068e/template-card-presentation-vantage-mauve-dusk-iframe-viewport-480x270.jpg\",\n \"mono-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1466a7a7-fb13-44db-8687-9c99d282dd8e/template-card-presentation-vantage-mono-ink-iframe-viewport-480x270.jpg\",\n \"mint-tech\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f46edc1b-d119-4098-9b72-739227219258/template-card-presentation-vantage-mint-tech-iframe-viewport-480x270.jpg\",\n \"sunset-maroon\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fc40f686-cf2a-41b4-b5d9-02568b6c25a4/template-card-presentation-vantage-sunset-maroon-iframe-viewport-480x270.jpg\",\n \"midnight-mono\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d1ee4993-9f2d-417e-a517-1db4fe580e21/template-card-presentation-vantage-midnight-mono-iframe-viewport-480x270.jpg\",\n \"gold-luxe\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/583606ad-eaed-472e-8495-03c57b778db4/template-card-presentation-vantage-gold-luxe-iframe-viewport-480x270.jpg\",\n \"ocean-deep\":\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fbcc6ed8-6881-44d9-aedc-9478b6cd3eb8/template-card-presentation-vantage-ocean-deep-iframe-viewport-480x270.jpg\",\n },\n} as const satisfies Readonly<\n Record<\n string,\n Readonly<\n Record<\n (typeof PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_THEMES)[number],\n string\n >\n >\n >\n>;\n\nconst BOTANE_ORGANIC_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/64d1a85a-9347-48fb-860b-073180385b66/botane-organic-deck.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a43f103f-e4b3-40b0-a326-c37a2240e6b5/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/576f05a7-2d2c-4963-876b-6eda1fe8f93e/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/12a44151-de3a-465d-9631-df029387a922/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cc6d6522-6f49-4dd0-a122-903a2251f014/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2195f286-6e9e-4171-9240-90c03924b898/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/889dd3cf-913c-4f79-99fc-c57f4346cef5/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b1116116-80a5-4d4c-bd74-43a66bed970b/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3d0f5b82-cb4d-4b5a-8c7b-de8941758cf8/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7a5835b1-9545-46e1-ac8b-4d33de6fca14/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/72162ad3-7cda-4eb8-9bc3-9a986c06e120/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/68e2256e-3872-45b5-bcc6-a7cedf6d3e8f/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2a7fd3d2-562f-4b49-8854-562b13fa7fbc/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ba0a9ade-6eba-4a63-8772-976b30ab17cf/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7da6a51c-4a78-4e50-9cbc-899879e72875/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst PLAYFUL_LAUNCH_CDN_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/774bdd46-ca62-40b5-b56b-95fd2ff2d302/playful-launch-presentation.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dbb11b25-20e0-433e-94d5-9a094667d5a7/aplocoto-slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d6a0800b-729e-4399-ba74-e3d56b4e9b00/aplocoto-slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/67781114-f6ff-45fd-bb74-bf65df1b75e9/aplocoto-slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9860a2f5-512a-4f0c-a215-33ad6153ee66/aplocoto-slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7c884040-00c0-4237-8560-44a78c9bc9df/aplocoto-slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/90905547-8551-46ee-91fe-cdf364a0a415/aplocoto-slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/13260433-b222-4561-a62f-273f2c275f4c/aplocoto-slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f88b5182-4312-49a7-bd1c-3814405d5205/aplocoto-slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/060dafd9-d147-4a42-89dc-4b22fa92e880/aplocoto-slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d104d1c5-c038-40b0-b7e2-078a9f93c062/aplocoto-slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d51c10d0-fdba-41b3-b88f-1d4e118c7368/aplocoto-slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7e3ca86-846e-44f9-8eb0-637699168192/aplocoto-slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ecc39ab1-0a68-4da5-9cf4-20b1e0b2eeb0/aplocoto-slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f403f161-f63c-427f-ae15-401ede2672d9/aplocoto-slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst BUSINESS_DATA_CDN_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9aa42296-a49e-4128-a80a-e920637b1506/business-data-presentation.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/04a3765b-ef6a-4bbb-8ae4-b116941760cf/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1919e6e0-2adf-4727-825d-3470568733e7/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62d71bc2-9359-4a41-bde6-da6e4d9d0fd0/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d587627-8f20-4aed-ad2b-0593f58c22d9/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b16f1790-05be-4a49-85cd-3417c51376c9/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/de3b1bca-c6bf-4f45-ba6e-898ebb51c8ca/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f1fdaf81-3914-4882-89c1-eb2da901dfd8/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/982833de-dd95-4560-81b5-8b006d7fe3c7/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/15fbcdfa-fc5c-48a8-aa4b-4ea88550b1e2/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4a29b39a-97d0-4c26-892a-85e808f0a21f/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/056c9f76-3ee0-4990-a445-72044cc84a66/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a1a1fc29-4682-484e-b5eb-2e09c5b0c8d3/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7817bac4-9ecd-4e00-a532-d6ba2816c322/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/37616a8a-7386-49f2-8e18-198a2a234d4a/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\n// Batch presentation resources migrated from Google Drive to private R2.\nconst CRAYON_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c4d3f251-c143-4cb7-86f5-97042123ef90/crayon-learning-deck.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8183eea0-8016-4680-82b8-8ad3a3b5ada2/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/356c7e99-4895-44e1-a56d-d53dfb0d722e/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f81f04ee-f164-4d0b-abd2-1bec62637036/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2aace698-e937-4c5c-83b7-43b4ea6aa193/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/db411e40-59c5-4428-b2fd-dc71846bbf32/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4cea2af8-cd7b-4446-a895-03e151591e9a/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1e500a83-2644-49b6-a7a7-dabb10025344/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a6c157ad-644f-4dd8-be84-c04ad53e8eba/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/abadaabc-a366-40b7-8cad-17e302e24cea/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/810651dd-7c4e-4115-a9b4-8eb4e804e669/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/52fac853-0a29-4215-951d-2d9780720119/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/32876cfe-2e5e-4807-b308-06a9b617ac36/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6db8270e-31fb-4df6-9d8f-495dced6c2ed/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d82049a8-dbb6-4425-9043-058720a335a6/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst CRAYON_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/351717b6-5c48-42c5-a349-d8a815bc229f/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c4116423-38ef-48d9-9728-695bf265e510/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2cb2711a-0638-4673-a47b-69a51116e21d/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/32f3a867-b29d-4b0e-ba32-073167892556/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7e49363-33ae-48c6-998a-f911e51bf340/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0c005465-e491-4d84-915c-efc892bf6030/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3baf78ed-8cec-4da1-9734-3a8ca51a1d6c/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/803373ba-fa20-4ebd-84ad-cb73f4e10dcd/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/27ef439c-3dc2-49d2-b5ca-de98d20f2ca6/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c498a285-2d3f-4c76-9ebb-d26ad42f677c/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b79a2ac4-ef78-4a3c-b47e-6f1310756b7c/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e8dac0bc-f2a2-440c-ade3-c979d34b7459/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3f6c4cae-cac2-4cf1-93d8-d2d4609cad8e/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0742c906-1dcb-4bec-80e3-f0e5387e727d/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d13fd530-4917-4378-8e2b-8c0befd96119/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst CREATIVE_AGENCY_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6494f661-c935-4ab2-9181-600097bde23b/creative-agency-presentation.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a1883f03-854f-4f31-9da5-5d1f80179ea9/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/261165ff-ded6-4662-9b1a-62df42b234b0/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a2e4e44e-1a6d-491f-903c-4e2188023d3c/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/39871f71-1392-4911-8771-f22b715d7a9e/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f8b8651e-de6b-4adb-a733-c92dc0f859e6/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1d3342e3-e91f-48df-8302-1931423f7de6/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/70e13d5b-d9df-4e39-a257-ded24b0fd2f8/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8280b48a-4c05-4022-ae9c-8b5073562b53/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/efe70b44-2eaf-4094-8404-a2238e101d42/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6bc29f83-9a2f-4f9a-bf63-b7d30acc6941/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c6ca5fe0-1def-4eb2-a5fe-2e31fc60dac7/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7557bbcc-8502-43eb-8d91-fa2b8035e15d/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/07fa40fd-5c73-4913-9ed2-a248e3e56865/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62403bf8-6aac-40af-b279-95239dc20139/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst CREATIVE_AGENCY_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/440dde23-496f-4e4c-9b78-226deda76c4c/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/80de0f45-96af-4131-8cc8-9f6a058efe96/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5acb529d-e17a-4b7b-b418-1dc49f50bc53/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ebc56020-ec50-4125-8467-f6361648687b/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/20d61d5a-a7d2-4cf5-a7ba-2d507e8df1d8/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8a89a5f5-af1c-4b64-941d-59fd55904c43/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/152b7fb4-5619-4344-a714-0a29434f082c/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/aa8de55e-a778-4a24-b530-9c76bcb85991/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/afe9346a-de0f-4141-9434-e5bda6f09efe/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/995f23c4-bda7-4f8c-80bb-cd5e4eda3f57/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/de3d07df-083a-4218-8c86-fcff79251a47/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a21f6ee8-f967-4415-9825-27c08a28cc09/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f25909ac-88d6-48eb-859c-488d5bbacd9f/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1bea8f97-d0e5-4240-bae5-c3bbe5cd5ba2/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/188bdf52-0a5b-466a-8417-b8920e35fb5a/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst DATA_REPORT_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/26958aa5-8823-484f-8bce-6f60a8663a72/data-report-presentation.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/efa3e160-e608-4658-9395-9a4139899038/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/edd27584-ef9f-4611-b8ab-59e3ac7247ad/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a505694f-8511-45bb-94bd-0095b75e6028/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/77cb14b3-aec9-4694-9a12-880eb0a11fc6/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/02dffc66-0883-45bc-9567-a063368619b5/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c11f15e4-e164-4803-9d39-9b787e1b35c5/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6c426018-8ec4-43c6-8998-4b1ae1aff6d1/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/19fceff3-2317-4e84-9918-600a66bf375a/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/401c3f73-810b-4ebc-a448-7d9bd5ecc882/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8b97bb9b-667a-4596-bbf6-fba2c55eca5f/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dc80199e-4b44-4602-8b4b-6af9d65f1845/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/95a0c217-421f-4a57-97db-700b076eed1a/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8e7c176a-7997-4b5d-9773-68cf0b307c8e/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a0269c99-9d1b-44e2-b49a-0980820b3b90/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst DATA_REPORT_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/16310322-2d80-4142-a5f5-7bcff8c3eed0/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/be665757-c3d0-4091-b957-9b2090d6523d/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/38b3ce82-7212-44d1-a5ae-a9477ce5e086/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/90d4ca26-8f11-413d-a9d5-611c3dfb7971/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b08266e5-92fe-45c8-82bd-a02a1921e780/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e958c1d0-9674-4149-94e5-23a6b78b7151/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/99d8ebd7-fdc7-427a-a000-a24675b1a730/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/04fc9197-1543-487c-82eb-0560cde0c17d/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f979bae9-63ad-49fb-81f1-f4149e244fe0/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/eb896ae1-adf1-4681-948d-564c73a6ac82/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/479c66d1-7999-43ef-a24c-e18399053105/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5e9763c0-7dfb-495c-af1d-9cf25bcfcb4c/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a9f6fc70-1099-461a-be6b-a4bbabce5f4a/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/be6017d7-be11-436c-b67a-050ebee5fdb7/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/41099f41-7548-4a11-beb5-cebde83df691/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst EDITORIAL_MAGAZINE_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/adf552b2-53ed-4282-b08c-2359f3b124ff/editorial-magazine-deck.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/63b4c9a6-7f1a-4f49-af9b-dd93d9d9138a/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b7dc0361-f59a-4fdb-b350-f18bc99a422e/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4718eb4d-7672-4194-9710-f980a5e9d4a1/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/26bc2e44-8975-48d2-a659-0364f148c835/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3b3e8dab-8f75-4773-a467-043e5525b491/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/646d057e-f8d8-48e1-862e-db4095c2af28/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/506d1159-c15f-4b63-ad09-3ab538036099/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9618e2b2-425e-43c3-9399-6c89ea8ab458/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5008900e-ebc8-4355-b07e-995624af5a52/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0a84ce72-1816-4f5e-8e17-9d9ed3f7d7a4/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9e80c360-a1ef-45d4-a0f2-fd18c1ce8f2a/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/172f784b-3502-485f-9ab4-e4714afa7b22/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2897a88f-0b4c-4892-bb32-eb4545cc3acc/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c453a78d-8109-423b-ae0e-278123d38239/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst EDITORIAL_MAGAZINE_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/539b64b7-ba42-4f62-a54f-1427b2afddb3/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b1a544b4-a4a1-4292-ba63-61843a14c5b3/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d4880c62-7c63-4696-b80a-2bed0108a988/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/84ddea62-a1eb-425f-8b09-450f104aa3a5/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/02425e87-5b9f-4680-bc3d-2c58c7d2adc1/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/85d7e4f9-31bc-4ba8-9b21-11be2342d135/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/58c58583-41fb-4d78-be75-1c905a8776f1/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/15c39a3c-05e0-41e5-b5b8-71ae03377232/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a9decabb-f920-46b6-a5f9-a5ec3d12b962/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62965071-8c8d-4b14-970c-3e7903c85195/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8d81c8d4-c1d4-49e1-b9cf-60ee42b1c225/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1539da62-2481-4dfc-8b5b-5ca6118bc1f3/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/326ebe33-8072-4a14-af18-70ec77f59360/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b45db466-6e73-418e-9e65-f86a3c17be8b/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/512d2421-0d60-44ed-81b1-29620a93ed5c/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst LANDING_CONSULTING_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fb94c9f1-8ab7-46cc-a08a-693e40337f06/landing-consulting-deck.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ca96e383-1431-466c-8c3e-9fc13a91d2c5/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5a8a9671-68bd-4d07-9fb5-078bdb0199a6/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/710c14c7-3dc6-4b10-b8d8-27fc4df2a0b0/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0eda445b-ed1d-4922-8a9e-ae8e39ff06e8/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e9e61546-3e5d-4307-ad97-7b5ddf92a960/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8646d1e2-4d3c-43c4-970a-df36476eec9c/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8dada9ca-9908-42c9-a010-ce42e431f108/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/73fc1ea3-e10b-4151-b0fe-e2cdf4ec7e4c/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/39f3b5b2-5cc9-409b-affd-f861460f1b8c/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3f241aa1-5cad-4030-a00b-cb6402390704/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a79c9f31-d9cd-40c3-8cca-907599ee2a9a/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/622ee524-2f19-44a0-9613-26036f4474e4/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e38718d5-1059-4df4-a322-e9d73369c57e/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a5f1fff4-18f9-4eaa-860c-c9ce8b57922d/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst LANDING_CONSULTING_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b02b4e7a-861d-4db3-af6f-a6e1f492a805/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/512dda48-57e2-4264-aba7-21500b56e38c/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a15f57d1-fbad-4a2a-ae3b-e02f97eef373/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/45047a7b-242c-4cda-a8d1-98471d8bd8e7/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a138a120-8d27-4bfe-8e9b-2dee7e8398ad/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8a2d4e51-7515-442b-9ff6-8ea1d74cbaed/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a0d46684-2831-4653-80af-34e0e6492da7/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c43fff61-c6a6-4524-a222-9ccbfb25e82e/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7016072-aada-44f8-93cf-15c2cf0bbcf9/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f4b22edf-cf10-4f7c-acbe-fbe5dab95f08/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/100de24b-6e80-40c7-864c-2dece1e3fcef/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/135a102e-1f28-4fc3-8d26-f57bc93ce1f9/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d5e42744-3bbc-4e85-9f6a-dae697986214/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4507a7cb-ac95-4363-96bb-03def14afbe3/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9b54f283-b5de-4d49-a525-d3ad1b2304e8/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst LUMINA_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a9c9d0c7-726c-4013-802d-cde1feefd058/lumina-creative-studio.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/592fe965-5a74-4366-b8b9-e58605dcc16e/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fb9df939-ec5a-4949-980d-7300eee0def4/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dc1afd19-e772-4e27-baa0-5b0790b7b056/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/abfe04fb-2f9e-42bd-b7da-9613676dee09/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/71b059b8-e4b3-4aea-9210-10c0f321f827/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c91c081d-70a1-4a73-b7f9-2f2cce4c309f/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/065462c6-ed5f-499a-adb8-fec17c468cb7/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9733dd6f-9aa3-440b-88c4-cfcb61676035/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7dbb64c1-0a07-4b36-b96f-b1a460503f68/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/06a117bf-ca82-4a80-a282-3836a8079994/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ddbcb419-6eba-41d6-aa30-0677352a042c/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/40783c03-36a1-40a7-91e4-f974d9aa8a58/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8a7c8c68-12e8-4500-ae37-5b7db7d782c7/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a913f8f3-3aa4-47d6-b29b-fe39de18ebaa/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst LUMINA_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/77b00b14-0909-4e10-afea-3c39ae74db73/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/01faf670-8355-43f4-bd87-a283eff2500b/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/1721d052-b4d9-4c8e-be68-b9d433dcc504/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/995dc4b4-929d-4788-9f42-6da9e37c7ffd/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c20a8bfb-4b85-4407-abc7-ac8b5e04f13d/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4c6d6b98-8f11-4afe-8d44-1d07f0fc52f6/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2f236399-80f4-48d9-aa92-9f5c4fb2d161/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e02a7dc9-1fe7-454b-82ea-5968d10d5d73/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5373c442-9cb4-4245-99c0-270fe449880c/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e3234608-ff95-4de6-84b4-50f077062609/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7779e5ca-9759-470c-abe2-3d9aa7e68e5c/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9e45d5c9-9b2d-4b28-95ad-965a8566d48b/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/009219ba-4047-4e84-87d7-9d1295728751/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/da94d8b8-375e-413f-91c0-8b84f631744e/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5c3ad467-780a-4a59-b95c-26379e13e598/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst MOSAIC_GEOMETRIC_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0491adb1-f2a3-47d3-8075-509e036e913d/mosaic-geometric-pitch.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/22fd98ad-7ca0-4b08-8e9e-383da4ccbb49/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a04cac03-384e-4e05-95a2-d345e95e1141/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5e3518b8-5077-467a-a2d5-612f754c8535/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cdbb1d16-dd0f-46a4-b43e-0963a4f2e7c3/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0c2632ed-2313-4286-9921-aa39e9472371/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cd4b3cbe-5287-4a8a-ae18-107f3bfd2419/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/279d368b-4772-460f-9fe6-aea782745e70/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/92acc27f-60fe-42e7-8960-8c95b3921986/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dd46a4b5-cff3-42a5-b39a-0add674c20c0/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0eca7af8-e188-4001-88d3-99b47fd49c2b/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c29e6151-c5c1-401a-9263-2949209e2a70/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f7132349-afea-44aa-8294-ca0e35a44210/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/847e4eb8-6f15-4b18-9133-eb48da0a0e30/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5355056e-e86d-4a65-afa3-9e3be0d05a32/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst MOSAIC_GEOMETRIC_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/58a4dec5-db7a-4e03-835e-e49637dba964/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/62d75fe7-4224-4943-a765-f558ab426bce/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b4482261-179a-4ca0-8a00-0186a51fcc1c/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/af249477-c261-41cd-86d4-8e1aba376a32/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e7f1da55-2c8c-4858-aa13-33ab42d216ba/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/2992c1ee-84db-4ab5-b251-a317a160de66/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/35e0c6f8-f96e-4c67-8375-62ce1c47178f/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/61a88e05-442b-4b25-9488-2f5e2df4dcf8/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/140aac80-54d7-46bb-af05-40121cc85f0a/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/60b1ad5d-631b-42fc-8b29-bedf3b4e2a6c/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3c3fd19a-8087-4177-bdd9-e7dde6109a2f/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0cc9cb46-0019-4d45-a33d-5fff36c2a754/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/29123d43-c90a-48e4-9d1d-f1657f396a34/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/23284bc3-078b-4cd2-a3e2-f207605e6ad1/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ac616f61-f1bc-44af-8862-c219f7f74bfe/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst PLAYFUL_POP_PREVIEW_IMAGES = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3b6e8fbf-15f4-46cc-a2a6-8d3ef33d9d32/playful-pop-deck.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/083b8e2c-ea0a-434b-93c9-69d129ed242c/slide-02.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/9d957db7-4449-4fe9-8adb-6eff201b0fcc/slide-03.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/25afe786-d2c6-4d49-acbc-d8c60fce5fb4/slide-04.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b2c5cf99-65ec-49f1-861e-0a80905ae5e5/slide-05.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/e6a1d840-de51-4aec-a773-e3e8abe1ec1e/slide-06.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dd4589bb-563e-44cf-bc26-f11b7db3a20c/slide-07.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/8a34076e-f629-4da3-a25b-68cf705cc788/slide-08.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/06757c76-66fb-4b6d-ac26-a6e0b50f9cd5/slide-09.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/60f90bbb-bdb0-4f17-9258-4e52e8e41d91/slide-10.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/17941998-dab8-48ee-bda2-f6d6a502ff98/slide-11.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/7cbb4445-e1ae-4876-8ac8-39d8bbb79df3/slide-12.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/82b45a46-b5f3-4a97-a480-e07cadac0a96/slide-13.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/85672b12-bd99-4748-9b56-ec39aae695f5/slide-14.png\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/805bd601-9e99-40b1-a66a-34251c70c787/slide-15.png\",\n] as const satisfies readonly [string, ...string[]];\n\nconst PLAYFUL_POP_PREVIEW_HTMLS = [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/098f0ce4-c773-4479-ad85-221c9114881a/slide-01.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/009db4d7-19f9-4266-a08d-2eb827678fde/slide-02.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a143dba3-9e72-44c5-a105-0e5228125a1c/slide-03.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b541db0e-322e-4604-9b13-ff117b5fcf7f/slide-04.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/3fa2f420-248a-4679-b76e-fb620fd67868/slide-05.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/859a88eb-5f9c-469b-b6c7-5987fe9e92f0/slide-06.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/23b1ec6d-ba39-41a6-923f-7c125c530f08/slide-07.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b469c7a6-5151-488d-a59f-e38e091e376d/slide-08.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/46c96f07-8232-44fd-932e-e0a6e6abc0a0/slide-09.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/465fb0cb-18ff-4284-a184-d6a7cc8aa49c/slide-10.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a72c8c6c-c5d5-4fac-95bd-f299102d344e/slide-11.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/27203fae-eb0e-49eb-8077-e69f7a888382/slide-12.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/bde44218-8dfd-418e-863a-f6e99808b2b3/slide-13.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f84b61fc-4775-4ee3-ab28-fa9762b602fe/slide-14.html\",\n \"https://static.vm0.io/vm0/artifact-templates/presentation/c3eaf388-6b9f-49b6-90af-ce27eedb87e2/slide-15.html\",\n] as const satisfies readonly [string, ...string[]];\n\nconst PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES = {\n \"bloom-pitch\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4124c01a-a6c7-484c-9e22-8dd4d62a6c6c/bloom-pitch.png\",\n ],\n \"blueprint-academy\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ffa9f511-0e01-4191-99a6-3d6621b99661/blueprint-academy.png\",\n ],\n meridian: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/189d2344-ca5f-4dbf-86ce-04b1567c062f/meridian.png\",\n ],\n \"neo-brutalism\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/a184e26a-c514-434e-9467-a19b2af1e979/neo-brutalism.png\",\n ],\n nocturne: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fb660157-e71e-4064-8a96-0c707c7e6a1f/nocturne.png\",\n ],\n \"pixel-glitch\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dfcbf20f-9341-4f3f-a93d-4df159f6c4fd/pixel-glitch.png\",\n ],\n prospectus: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/5aad7d6c-4ca1-4041-985c-27674403c382/prospectus.png\",\n ],\n schoolhouse: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/b8cdd8b6-122d-461a-8dc4-d17a73ad09e5/schoolhouse.png\",\n ],\n \"sticker-scrapbook\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4a6c9374-be17-40f9-83e9-acd7d6461efc/sticker-scrapbook.png\",\n ],\n strata: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f931d6b1-c44e-442a-bcd4-c23f60888a7d/strata.png\",\n ],\n \"taped-consulting\": [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/fbf6d3b5-9a96-46a4-9fe6-6874b1bb5b63/taped-consulting.png\",\n ],\n vantage: [\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6d1aea99-3215-41b6-9994-6a4613d64524/vantage.png\",\n ],\n} as const satisfies Readonly<Record<string, readonly [string, ...string[]]>>;\n\nexport const PRESENTATION_TEMPLATE_PICKER_ITEMS: readonly PresentationTemplateItem[] =\n [\n {\n slug: \"playful-launch-presentation\",\n title: \"Sunburst playroom\",\n prompt:\n \"/gen presentation, create a 15-slide launch deck for SproutPop, a playful habit-building app for remote teams introducing a shared 30-day wellness challenge. Present it to people and culture leaders with cover, agenda, launch story, audience pain points, product vision, feature tour, rollout timeline, activation moments, team, early metrics, testimonials, pricing, and next steps. Make it saturated, joyful, idea-led, and structured.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/daf7c2d1-5195-4c09-ad4b-8d85778fc104/playful-launch-presentation.html\",\n previewImage: PLAYFUL_LAUNCH_CDN_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"playful-launch-presentation\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"playful-launch-presentation\"\n ][\"carnival\"],\n previewImages: PLAYFUL_LAUNCH_CDN_PREVIEW_IMAGES,\n slideCount: 15,\n colorSystemId: \"color-system:carnival\",\n templateId: \"template:html-ppt-playful-launch\",\n },\n {\n slug: \"botane-organic-deck\",\n title: \"Mauve garden\",\n prompt:\n \"/gen presentation, create a 15-slide brand story deck for Moss & Moon, a coastal wellness retreat launching a seasonal herb garden, tea bar, and slow-living membership program. Present it to hospitality partners with cover, agenda, origin story, guest philosophy, retreat spaces, treatment menu, garden-to-table process, photography gallery, sustainability metrics, member testimonials, packages, and contact. Make it calm, editorial, rounded, and organic.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/0babab92-7ad9-414e-b44f-7a060ed48bcc/botane-organic-deck.html\",\n previewImage: BOTANE_ORGANIC_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"botane-organic-deck\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"botane-organic-deck\"][\n \"mauve-dusk\"\n ],\n previewImages: BOTANE_ORGANIC_PREVIEW_IMAGES,\n slideCount: 15,\n colorSystemId: \"color-system:mauve-dusk\",\n templateId: \"template:html-ppt-botane-organic\",\n },\n {\n slug: \"business-data-presentation\",\n title: \"Berry dashboard\",\n prompt:\n \"/gen presentation, create a 15-slide executive data readout for HarborCart, an omnichannel grocery retailer reviewing 2026 growth, loyalty behavior, basket mix, and store-to-delivery conversion. Present it to the leadership team with cover, agenda, business context, KPI scorecard, regional segments, channel comparison, customer cohorts, operational drivers, forecast, strategic bets, risks, recommendations, and appendix contact. Make it number-first, chart-led, confident, modern, and readable.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/95648bba-2a52-497e-b1b8-9cdd0cab9d93/business-data-presentation.html\",\n previewImage: BUSINESS_DATA_CDN_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"business-data-presentation\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"business-data-presentation\"\n ][\"berry-pop\"],\n previewImages: BUSINESS_DATA_CDN_PREVIEW_IMAGES,\n slideCount: 15,\n colorSystemId: \"color-system:berry-pop\",\n templateId: \"template:html-ppt-business-data\",\n },\n {\n slug: \"crayon-learning-deck\",\n title: \"Crayon doodle\",\n prompt:\n \"/gen presentation, create a 15-slide parent-night deck for Rainbow Lab, a summer art-and-science camp where kids build storybooks, cardboard cities, and tiny robots. Present it to families with cover, agenda, camp promise, learning goals, weekly themes, instructor team, sample day, workshop stations, student gallery, safety plan, progress metrics, parent quotes, pricing, and registration steps. Make it bright, rounded, joyful, and crayon-like.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/63af1d38-51e8-493e-b975-1728f4f796da/crayon-learning-deck.html\",\n previewImage: CRAYON_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"crayon-learning-deck\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"crayon-learning-deck\"\n ][\"prism\"],\n previewImages: CRAYON_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: CRAYON_PREVIEW_HTMLS,\n colorSystemId: \"color-system:prism\",\n templateId: \"template:html-ppt-crayon\",\n },\n {\n slug: \"creative-agency-presentation\",\n title: \"Foliage gallery\",\n prompt:\n \"/gen presentation, create a 15-slide rebrand pitch for Northstar Studio proposing a new identity, website, and launch campaign for a boutique hotel group expanding into three coastal cities. Present it to the client board with cover, agenda, brand challenge, strategic insight, creative direction, visual territories, service scope, project process, case-study gallery, launch roadmap, impact metrics, client quotes, investment, and contact. Make it minimal, editorial, sharp, and agency-grade.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/527ad859-e0dd-4cfd-90a4-09e5030b71e1/creative-agency-presentation.html\",\n previewImage: CREATIVE_AGENCY_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"creative-agency-presentation\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"creative-agency-presentation\"\n ][\"coral-studio\"],\n previewImages: CREATIVE_AGENCY_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: CREATIVE_AGENCY_PREVIEW_HTMLS,\n colorSystemId: \"color-system:coral-studio\",\n templateId: \"template:html-ppt-creative-agency\",\n },\n {\n slug: \"data-report-presentation\",\n title: \"Candy charts\",\n prompt:\n \"/gen presentation, create a 15-slide research findings deck for MetroPulse, a city mobility study comparing bike-share, buses, rideshare, and commuter rail across 12 neighborhoods. Present it to urban planning stakeholders with cover, contents, study context, methodology, demand trends, neighborhood segments, mode comparison, peak-hour bottlenecks, equity impact, emissions estimate, 12-month forecast, recommendations, summary, and contact. Make it chart-led, sharp, vivid, and number-first.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/920c6119-1833-4902-bda9-327af1bd8f7f/data-report-presentation.html\",\n previewImage: DATA_REPORT_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"data-report-presentation\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"data-report-presentation\"\n ][\"prism\"],\n previewImages: DATA_REPORT_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: DATA_REPORT_PREVIEW_HTMLS,\n colorSystemId: \"color-system:prism\",\n templateId: \"template:html-ppt-data-report\",\n },\n {\n slug: \"editorial-magazine-deck\",\n title: \"Paper magazine\",\n prompt:\n \"/gen presentation, create a 15-slide media kit for Field Notes Quarterly, an independent culture magazine pitching its autumn issue on craft, travel, food, and design to premium sponsors. Include cover, editor letter, issue theme, audience profile, editorial departments, contributor roster, feature previews, photography gallery, distribution plan, partnership formats, audience metrics, sponsor examples, rate card, production timeline, and contact. Make it restrained, paper-forward, serif, and magazine-like.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/85360bd6-8b80-43ba-9c9c-001b7d96f205/editorial-magazine-deck.html\",\n previewImage: EDITORIAL_MAGAZINE_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"editorial-magazine-deck\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"editorial-magazine-deck\"\n ][\"warm-sand\"],\n previewImages: EDITORIAL_MAGAZINE_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: EDITORIAL_MAGAZINE_PREVIEW_HTMLS,\n colorSystemId: \"color-system:warm-sand\",\n templateId: \"template:html-ppt-editorial-magazine\",\n },\n {\n slug: \"landing-consulting-deck\",\n title: \"Neon browser\",\n prompt:\n \"/gen presentation, create a 15-slide growth proposal for ScaleBridge advising a B2B fintech SaaS team on reducing onboarding drop-off and improving trial-to-paid conversion. Present it to the revenue leadership team with cover, agenda, opportunity size, diagnosis, desired outcomes, engagement model, workstreams, sprint process, benchmark gallery, proof metrics, client testimonials, pricing tiers, decision timeline, and contact. Make it landing-page-like, sharp, high-contrast, and conversion-oriented.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/998aed16-60a1-4d84-b60e-1ab093de8fa6/landing-consulting-deck.html\",\n previewImage: LANDING_CONSULTING_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"landing-consulting-deck\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"landing-consulting-deck\"\n ][\"pop-art\"],\n previewImages: LANDING_CONSULTING_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: LANDING_CONSULTING_PREVIEW_HTMLS,\n colorSystemId: \"color-system:pop-art\",\n templateId: \"template:html-ppt-landing-consulting\",\n },\n {\n slug: \"lumina-creative-studio\",\n title: \"Brush stickers\",\n prompt:\n \"/gen presentation, create a 15-slide portfolio deck for LensLab Studio, a photography and motion team pitching a beauty brand's global campaign shoot across studio sets, street casting, and social cutdowns. Include cover, agenda, studio point of view, campaign concept, team, production services, creative process, location plan, image gallery, motion deliverables, campaign metrics, client quotes, package options, and contact. Make it bold, sticker-tagged, sharp, and creative-studio oriented.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/08fe05a2-a7dd-4355-822d-14fb6a0987b3/lumina-creative-studio.html\",\n previewImage: LUMINA_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"lumina-creative-studio\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"lumina-creative-studio\"\n ][\"prism\"],\n previewImages: LUMINA_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: LUMINA_PREVIEW_HTMLS,\n colorSystemId: \"color-system:prism\",\n templateId: \"template:html-ppt-lumina\",\n },\n {\n slug: \"mosaic-geometric-pitch\",\n title: \"Bauhaus tiles\",\n prompt:\n \"/gen presentation, create a 15-slide modular identity pitch for CivicLink, a new transit app unifying buses, bikes, scooters, and commuter rail under one visual system. Present it to city innovation leaders with cover, agenda, brand problem, design principles, logo grid, color and icon system, app moments, rollout process, station signage gallery, accessibility impact, pilot metrics, stakeholder quotes, implementation budget, and contact. Make it bold, modular, Bauhaus-geometric, and colourful.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/65f0f224-4bf0-4b11-9f3e-ddb1a11b1ec3/mosaic-geometric-pitch.html\",\n previewImage: MOSAIC_GEOMETRIC_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"mosaic-geometric-pitch\"\n ],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\n \"mosaic-geometric-pitch\"\n ][\"carnival\"],\n previewImages: MOSAIC_GEOMETRIC_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: MOSAIC_GEOMETRIC_PREVIEW_HTMLS,\n colorSystemId: \"color-system:carnival\",\n templateId: \"template:html-ppt-mosaic-geometric\",\n },\n {\n slug: \"playful-pop-deck\",\n title: \"Neon candy\",\n prompt:\n \"/gen presentation, create a 15-slide campus launch deck for FizzPop, a sparkling tea brand planning a colorful back-to-school sampling tour, creator challenge, and limited-edition flavor drop. Present it to retail and student ambassador partners with cover, agenda, brand world, audience insight, campaign idea, flavor lineup, activation map, event flow, content plan, gallery, reach metrics, partner testimonials, budget, and contact. Make it neon, bouncy, rounded, and pop-art playful.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/6b2f388a-119f-4ecc-8638-5cc309779b67/playful-pop-deck.html\",\n previewImage: PLAYFUL_POP_PREVIEW_IMAGES[0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"playful-pop-deck\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"playful-pop-deck\"][\n \"pop-art\"\n ],\n previewImages: PLAYFUL_POP_PREVIEW_IMAGES,\n slideCount: 15,\n previewHtmls: PLAYFUL_POP_PREVIEW_HTMLS,\n colorSystemId: \"color-system:pop-art\",\n templateId: \"template:html-ppt-playful-pop\",\n },\n\n {\n slug: \"bloom-pitch\",\n title: \"Petal pitch\",\n prompt:\n \"/gen presentation, create a 15-slide investor pitch for PetalLoop, a climate-friendly flower delivery marketplace raising a seed round. Include cover, agenda, market shift, customer problem, solution, product flow, traction, business model, go-to-market, competitive position, roadmap, team, financial plan, ask, and next steps. Make it playful, optimistic, organic, and investor-ready.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/d29707fb-9b85-44bc-be55-cf3cf082f68d/bloom-pitch.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"bloom-pitch\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"bloom-pitch\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"bloom-pitch\"][\n \"carnival\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"bloom-pitch\"],\n slideCount: 15,\n colorSystemId: \"color-system:carnival\",\n templateId: \"template:html-ppt-bloom-pitch\",\n },\n {\n slug: \"blueprint-academy\",\n title: \"Drafting campus\",\n prompt:\n \"/gen presentation, create a 15-slide curriculum proposal for Northline Academy launching an applied AI certificate for working professionals. Present it to academic leadership with cover, agenda, program context, learner needs, curriculum map, module sequence, faculty team, classroom experience, assessment model, outcomes, partnerships, enrollment plan, budget, and next steps. Make it academic, structured, blueprint-like, and credible.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f64cd670-7565-483f-b872-117a18c0c414/blueprint-academy.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"blueprint-academy\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"blueprint-academy\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"blueprint-academy\"][\n \"forest-editorial\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"blueprint-academy\"],\n slideCount: 15,\n colorSystemId: \"color-system:forest-editorial\",\n templateId: \"template:html-ppt-blueprint-academy\",\n },\n {\n slug: \"meridian\",\n title: \"Cobalt blocks\",\n prompt:\n \"/gen presentation, create a 15-slide agency capabilities deck for Meridian Works, a data strategy studio helping enterprise teams modernize analytics operations. Present it to a prospective client executive team with cover, agenda, market context, client challenges, service model, team, process, case studies, measurement plan, operating rhythm, timeline, commercial model, and contact. Make it professional, sharp, data-led, and executive-ready.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/58cc240d-7d84-49a7-92ba-57eea4168730/meridian.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"meridian\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"meridian\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"meridian\"][\n \"slate-corporate\"\n ],\n previewImages: PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"meridian\"],\n slideCount: 15,\n colorSystemId: \"color-system:slate-corporate\",\n templateId: \"template:html-ppt-meridian\",\n },\n {\n slug: \"neo-brutalism\",\n title: \"Shadow shop\",\n prompt:\n \"/gen presentation, create a 15-slide founder pitch for BlockForge, a developer tooling startup launching a collaborative build system. Present it to early-stage investors with cover, agenda, problem, product, technical edge, market, traction, customer proof, business model, go-to-market, competition, roadmap, team, funding ask, and next steps. Make it bold, direct, high-contrast, and brutalist.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/4d8a4052-b43d-498a-81cc-b4c743103ff2/neo-brutalism.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"neo-brutalism\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"neo-brutalism\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"neo-brutalism\"][\n \"mono-ink\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"neo-brutalism\"],\n slideCount: 15,\n colorSystemId: \"color-system:mono-ink\",\n templateId: \"template:html-ppt-neo-brutalism\",\n },\n {\n slug: \"nocturne\",\n title: \"Midnight stage\",\n prompt:\n \"/gen presentation, create a 15-slide annual keynote for NightOps Cloud reviewing reliability, infrastructure scale, and the roadmap for autonomous operations. Present it to technical customers with cover, agenda, state of the platform, usage growth, reliability metrics, architecture, product updates, customer stories, roadmap, ecosystem, pricing changes, and closing call to action. Make it dark, data-rich, polished, and keynote-ready.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/dd4ecb89-b6b1-4ed0-bfca-4ebf3db3a664/nocturne.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"nocturne\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"nocturne\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"nocturne\"][\n \"midnight-mono\"\n ],\n previewImages: PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"nocturne\"],\n slideCount: 15,\n colorSystemId: \"color-system:midnight-mono\",\n templateId: \"template:html-ppt-nocturne\",\n },\n {\n slug: \"pixel-glitch\",\n title: \"Arcade pixels\",\n prompt:\n \"/gen presentation, create a 15-slide creative studio deck for Arcade Signal pitching a retro-futurist campaign for an indie game launch. Present it to the publisher team with cover, agenda, audience insight, campaign concept, visual world, channel plan, creator program, launch timeline, asset gallery, performance targets, budget, team, and next steps. Make it pixelated, energetic, digital, and sharp.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/274e4cc3-d811-40a1-a091-526db9a62734/pixel-glitch.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"pixel-glitch\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"pixel-glitch\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"pixel-glitch\"][\n \"bauhaus-primary\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"pixel-glitch\"],\n slideCount: 15,\n colorSystemId: \"color-system:bauhaus-primary\",\n templateId: \"template:html-ppt-pixel-glitch\",\n },\n {\n slug: \"prospectus\",\n title: \"Homepage pitch\",\n prompt:\n \"/gen presentation, create a 15-slide business plan for Atlas Harbor, a B2B logistics platform expanding into regional fulfillment. Present it to strategic partners with cover, agenda, market context, customer problem, solution, operating model, product experience, growth plan, financial model, implementation roadmap, risks, team, partnership terms, and next steps. Make it corporate, polished, structured, and proposal-ready.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/64a9b8c5-f89d-4379-998c-9da755f7ca62/prospectus.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"prospectus\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"prospectus\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"prospectus\"][\n \"slate-corporate\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"prospectus\"],\n slideCount: 15,\n colorSystemId: \"color-system:slate-corporate\",\n templateId: \"template:html-ppt-prospectus\",\n },\n {\n slug: \"schoolhouse\",\n title: \"Kraft poster\",\n prompt:\n \"/gen presentation, create a 15-slide community education deck for Maple Hall launching a weekend skills program for families and local makers. Present it to city partners with cover, agenda, mission, audience needs, program tracks, sample day, instructor team, venue plan, safety approach, outcomes, testimonials, membership tiers, budget, and registration steps. Make it warm, retro, classroom-inspired, and approachable.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/cb03f77b-982d-4708-8781-2a0ab450a4fb/schoolhouse.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"schoolhouse\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"schoolhouse\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"schoolhouse\"][\n \"bauhaus-primary\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"schoolhouse\"],\n slideCount: 15,\n colorSystemId: \"color-system:bauhaus-primary\",\n templateId: \"template:html-ppt-schoolhouse\",\n },\n {\n slug: \"sticker-scrapbook\",\n title: \"Sticker notebook\",\n prompt:\n \"/gen presentation, create a 15-slide brand collaboration deck for Patch Party, a youth culture festival launching sponsor activations, creator booths, and collectible merch. Present it to brand partners with cover, agenda, audience story, event concept, activation zones, creator plan, media moments, sponsor packages, timeline, reach metrics, testimonials, budget, and contact. Make it vibrant, scrapbook-like, sticker-heavy, and celebratory.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/f15ccce7-90f1-4773-b4c8-c7eaf903ce76/sticker-scrapbook.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"sticker-scrapbook\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"sticker-scrapbook\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"sticker-scrapbook\"][\n \"prism\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"sticker-scrapbook\"],\n slideCount: 15,\n colorSystemId: \"color-system:prism\",\n templateId: \"template:html-ppt-sticker-scrapbook\",\n },\n {\n slug: \"strata\",\n title: \"Red staircase\",\n prompt:\n \"/gen presentation, create a 15-slide agency proposal for Strata Studio helping a fintech brand redesign its onboarding and lifecycle communications. Present it to the client leadership team with cover, agenda, business challenge, strategic principles, design direction, service scope, sprint process, sample work, measurement plan, timeline, investment, team, and next steps. Make it Swiss-minimal, precise, editorial, and agency-grade.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/040ddb5c-6819-436a-bd3a-87cb5de2be0e/strata.html\",\n previewImage: PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"strata\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"strata\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"strata\"][\"mono-ink\"],\n previewImages: PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"strata\"],\n slideCount: 15,\n colorSystemId: \"color-system:mono-ink\",\n templateId: \"template:html-ppt-strata\",\n },\n {\n slug: \"taped-consulting\",\n title: \"Polaroid wall\",\n prompt:\n \"/gen presentation, create a 15-slide transformation proposal for Clearpath Advisory helping a healthcare network improve patient intake operations. Present it to operations executives with cover, agenda, current-state diagnosis, opportunity, engagement model, workstreams, field research, process redesign, timeline, proof metrics, testimonials, pricing, and next steps. Make it consulting-focused, tactile, polished, and persuasive.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/ffa53ff0-36b0-4bd1-b44a-4c2d8d66aaa6/taped-consulting.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"taped-consulting\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"taped-consulting\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"taped-consulting\"][\n \"slate-corporate\"\n ],\n previewImages:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"taped-consulting\"],\n slideCount: 15,\n colorSystemId: \"color-system:slate-corporate\",\n templateId: \"template:html-ppt-taped-consulting\",\n },\n {\n slug: \"vantage\",\n title: \"Numbered boardroom\",\n prompt:\n \"/gen presentation, create a 15-slide business proposal for Vantage Partners helping a robotics manufacturer launch a new service program. Present it to enterprise buyers with cover, agenda, market context, buyer pain points, proposed solution, service model, operating plan, proof metrics, roadmap, commercials, implementation timeline, team, and close. Make it business-focused, confident, structured, and modern.\",\n embedUrl:\n \"https://static.vm0.io/vm0/artifact-templates/presentation/acada4b0-952c-4354-a382-56dcf49bb7e9/vantage.html\",\n previewImage:\n PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"vantage\"][0],\n cardPreviewImagesByTheme:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"vantage\"],\n cardPreviewImage:\n PRESENTATION_TEMPLATE_PICKER_CARD_PREVIEW_IMAGES[\"vantage\"][\n \"slate-corporate\"\n ],\n previewImages: PRESENTATION_TEMPLATE_REFERENCE_PREVIEW_IMAGES[\"vantage\"],\n slideCount: 15,\n colorSystemId: \"color-system:slate-corporate\",\n templateId: \"template:html-ppt-vantage\",\n },\n ];\n","export const ILLUSTRATION_ASSET_BASE =\n \"https://static.vm0.io/vm0/artifact-templates/illustration/assets\";\n\n/**\n * Maps each illustration asset's logical path (e.g. `images/<file>` or\n * `refs/<slug>/<file>`) to its object path under {@link ILLUSTRATION_ASSET_BASE}\n * on the static asset mirror. Static objects keep their content-addressed\n * object path, so the logical path cannot be derived from the URL; resolve with\n * {@link illustrationAssetUrl}.\n */\nconst ILLUSTRATION_ASSET_PATHS: Record<string, string> = {\n \"images/cozy-parlor.jpg\":\n \"d6892556-c737-4b2d-96e2-8011cb89e73b/cozy-parlor.jpg\",\n \"images/crowd-ink.png\": \"61a6e547-8dcd-4a70-9c08-436721562ce9/crowd-ink.png\",\n \"images/editorial-flatfolk.png\":\n \"5ccf0d60-b59e-4fe8-8388-1cdb8c5e57d9/editorial-flatfolk.png\",\n \"images/endpaper.png\": \"0712c960-8336-4ef5-b6bf-9a6bea30ee6a/endpaper.png\",\n \"images/flat-poster.png\":\n \"6e67ff2b-bafb-4ae8-b9f5-ac810e156cad/flat-poster.png\",\n \"images/folk-muse.png\": \"ab19110c-bdca-4342-b4ea-81bc9da7f992/folk-muse.png\",\n \"images/folk-storybook.png\":\n \"8a061600-29d3-4c1b-a7f8-ed534bb068bb/folk-storybook.png\",\n \"images/grain-poster.png\":\n \"b782b0a8-8fc4-4f1a-a5d9-fc8be7cd5eae/grain-poster.png\",\n \"images/grainy-duotone.png\":\n \"94e6a6bf-545a-4579-b1ab-672d9ebaadf0/grainy-duotone.png\",\n \"images/iberian-vignette.png\":\n \"d7c62c13-7ed0-4e7b-9fbb-b35edfd7f610/iberian-vignette.png\",\n \"images/ink-mascot.png\":\n \"3a32149b-beed-468a-ab95-d7c66161b056/ink-mascot.png\",\n \"images/ink-storefront.png\":\n \"dedb5189-f068-4648-a2c4-b970a04becbb/ink-storefront.png\",\n \"images/inkdab.png\": \"52f4536c-8bcb-459a-bd9e-db122b587c5a/inkdab.png\",\n \"images/inkstomp.png\": \"b4374019-26c4-43dc-ac72-738119dd8aed/inkstomp.png\",\n \"images/iso-scene.png\": \"a5584c98-8d92-43f7-a3ce-36d3a50dee70/iso-scene.png\",\n \"images/jade-blockprint.png\":\n \"01de3009-d39e-4ae5-92e0-9ebab0b67f7b/jade-blockprint.png\",\n \"images/light-pop-portrait.png\":\n \"9380ec74-934d-4a30-a7c4-6b331141ba68/light-pop-portrait.png\",\n \"images/loose-contour.png\":\n \"39072bd9-f829-461c-ba9b-df09d0a6536a/loose-contour.png\",\n \"images/mellow-pop.png\":\n \"3b032b04-9fa0-4833-a77f-4d583f076cfc/mellow-pop.png\",\n \"images/mosaic-still-life.png\":\n \"1c9ac1aa-3b52-4278-a0b5-c9a0b0420fc9/mosaic-still-life.png\",\n \"images/notion-illustration.png\":\n \"d99d73e6-55f3-48d8-8382-f1f780839f2f/notion-illustration.png\",\n \"images/op-ed-cover.png\":\n \"627e3b90-fdb3-4b2a-a082-0106ebf2f4a0/op-ed-cover.png\",\n \"images/painterly-botanical.png\":\n \"d6c7d725-194d-4014-b016-adb6f222ce2a/painterly-botanical.png\",\n \"images/papernook.png\": \"7c5403b8-66b8-4767-bf9e-741994fd2d52/papernook.png\",\n \"images/postcard-illustration.png\":\n \"ee24ef09-ae82-4dac-b6a0-cf0506498936/postcard-illustration.png\",\n \"images/riso-relic.png\":\n \"e7fa57b9-c322-4caa-8dd7-cea841a63c1e/riso-relic.png\",\n \"images/shadow-pop.png\":\n \"66da8950-89fe-43d4-afdb-07d12e196718/shadow-pop.png\",\n \"images/soft-vector.png\":\n \"f4ef44c0-0bf6-441f-aacc-ad5d90240719/soft-vector.png\",\n \"images/sticker-sheet.png\":\n \"a4dcdc0b-a08a-4996-bc13-d7c1a6e4beb2/sticker-sheet.png\",\n \"images/sunlit-gouache.png\":\n \"e1479a4d-be2b-4aeb-bfac-5db0fc5d5b88/sunlit-gouache.png\",\n \"images/tiny-wanderer.jpg\":\n \"d500f1d8-f427-40af-a281-c470c4c3067c/tiny-wanderer.jpg\",\n \"refs/cozy-parlor/ref-frog-letters.jpg\":\n \"03982053-3118-403a-88db-7888b76dca20/ref-frog-letters.jpg\",\n \"refs/cozy-parlor/ref-hedgehog-records.jpg\":\n \"2467a4e3-7ae7-4fa7-8afd-94816ef138f7/ref-hedgehog-records.jpg\",\n \"refs/cozy-parlor/ref-mouse-baker.jpg\":\n \"ea8c05d3-5b8f-4f15-9df6-b9a922e39fcd/ref-mouse-baker.jpg\",\n \"refs/cozy-parlor/ref-otter-painter.jpg\":\n \"b6436d4e-6b77-4ca4-8b34-018ad82c543b/ref-otter-painter.jpg\",\n \"refs/crowd-ink/anchor.png\":\n \"d7c41a80-d95e-46f2-b4df-40a6fbd51881/anchor.png\",\n \"refs/crowd-ink/sample-cafe.png\":\n \"a6b49737-91a2-404c-bb3a-74acb588efd8/sample-cafe.png\",\n \"refs/crowd-ink/sample-office.png\":\n \"524fd8ba-66eb-4da8-8c82-a184affe3960/sample-office.png\",\n \"refs/crowd-ink/sample-picnic.png\":\n \"3ed9f72f-fb70-433f-9b58-675eb592767e/sample-picnic.png\",\n \"refs/crowd-ink/sample-subway.png\":\n \"5614f816-0524-437f-a5f8-4966cec2929b/sample-subway.png\",\n \"refs/editorial-flatfolk/ref-alpine.png\":\n \"34acbd1a-8633-478c-ac6c-a4cee0a26324/ref-alpine.png\",\n \"refs/editorial-flatfolk/ref-harbor.png\":\n \"0e91e2f6-2147-4b33-a034-2efb3d834cf4/ref-harbor.png\",\n \"refs/editorial-flatfolk/ref-park.png\":\n \"d1e7603c-66ad-4f42-94b4-d3eff6660061/ref-park.png\",\n \"refs/endpaper/ref-butter-birds-l3.png\":\n \"ce707dcb-7a69-46d2-be8f-2e78d6eaded7/ref-butter-birds-l3.png\",\n \"refs/endpaper/ref-cobalt-sea-l3.png\":\n \"4f98961a-643a-4bea-bafd-6f4ed24cb71f/ref-cobalt-sea-l3.png\",\n \"refs/endpaper/ref-mossy-teal-cats-l2.png\":\n \"e78941dc-c179-44e7-b118-2d7c1b5cf214/ref-mossy-teal-cats-l2.png\",\n \"refs/endpaper/ref-plum-foxes-l2.png\":\n \"f06ba5e9-5ef0-4274-be56-dcc8995ec103/ref-plum-foxes-l2.png\",\n \"refs/endpaper/ref-slate-houseplants-l2.png\":\n \"4ab546ed-7fbf-4888-add3-9d6aac92d7d0/ref-slate-houseplants-l2.png\",\n \"refs/flat-poster/ref-lightbulb-sky-thinkbigger.png\":\n \"cbd54115-c2c3-492d-aefc-dfcd2954e3b7/ref-lightbulb-sky-thinkbigger.png\",\n \"refs/flat-poster/ref-magnifier-mustard-lookcloser.png\":\n \"af37f430-5bde-40a8-8d81-8733eb3462c9/ref-magnifier-mustard-lookcloser.png\",\n \"refs/flat-poster/ref-mountain-rose-reachhigher.png\":\n \"e4842d84-8c94-4e67-a0b0-d1b49841f609/ref-mountain-rose-reachhigher.png\",\n \"refs/flat-poster/ref-robot-yellow-aiteammate.png\":\n \"dbcd0941-0066-4ce1-92b9-f59477d72a05/ref-robot-yellow-aiteammate.png\",\n \"refs/flat-poster/ref-rocket-coral-shipfaster.png\":\n \"58b8a1f3-0ab2-4937-a7b3-8b3c4f14ae22/ref-rocket-coral-shipfaster.png\",\n \"refs/flat-poster/ref-shield-sage-alwayson.png\":\n \"ac81f77b-9e0a-427b-830b-f6769899b9bc/ref-shield-sage-alwayson.png\",\n \"refs/flat-poster/ref-teacup-lavender-takeabeat.png\":\n \"4074e795-dde6-4a2d-a47c-454f2e497f31/ref-teacup-lavender-takeabeat.png\",\n \"refs/folk-muse/ref-canonical.png\":\n \"ae0b2abc-a73f-4ebb-a3f1-74aece4a3819/ref-canonical.png\",\n \"refs/folk-muse/ref-sunset-dove.png\":\n \"7ecd9aef-7ae1-46cc-a883-f1966ad11357/ref-sunset-dove.png\",\n \"refs/folk-muse/ref-tropical-butterfly.png\":\n \"4738899c-de7c-43b9-8e02-58ff668abfb2/ref-tropical-butterfly.png\",\n \"refs/folk-muse/ref-winter-cat.png\":\n \"d2d649cf-06f4-4572-8789-7fc543660507/ref-winter-cat.png\",\n \"refs/folk-storybook/ref-chill-tussle.jpg\":\n \"db4d4ae6-2e10-4b8e-86c6-8fdc2d9d45dc/ref-chill-tussle.jpg\",\n \"refs/folk-storybook/ref-puzzle.jpg\":\n \"6825058e-9a8b-465d-9b59-3d4bd36349b9/ref-puzzle.jpg\",\n \"refs/folk-storybook/ref-reading-nook.jpg\":\n \"045ba54a-8a7e-452f-9b5a-96fa727bd46a/ref-reading-nook.jpg\",\n \"refs/grain-poster/ref-bench-sunsetcoral-l2-pair.png\":\n \"303ce995-e8a0-4916-8aff-af2a269af9be/ref-bench-sunsetcoral-l2-pair.png\",\n \"refs/grain-poster/ref-cafe-cooldawn-l2-solo.png\":\n \"a356e5b4-5aa4-47e1-bb03-63c7c939db3d/ref-cafe-cooldawn-l2-solo.png\",\n \"refs/grain-poster/ref-dogwalker-forestgreen-l1-solo.png\":\n \"a24cfc2d-072e-4045-9d9b-7cd103e144c1/ref-dogwalker-forestgreen-l1-solo.png\",\n \"refs/grain-poster/ref-guitar-twilight-l1-solo.png\":\n \"fe1fcd12-afd8-4199-8b6b-39e307160f10/ref-guitar-twilight-l1-solo.png\",\n \"refs/grain-poster/ref-skateboard-cooldawn-l1-solo.png\":\n \"06e37fc6-9a6a-467d-b4b5-88abafd95fb6/ref-skateboard-cooldawn-l1-solo.png\",\n \"refs/grain-poster/ref-sunhat-sunsetcoral-l1-solo.png\":\n \"e97eda11-aeb5-4f97-8e21-b7368fe78b32/ref-sunhat-sunsetcoral-l1-solo.png\",\n \"refs/grain-poster/ref-twilightdesk-twilight-l3-solo.png\":\n \"fd69b40d-b616-48e9-88e1-20fa75d098f8/ref-twilightdesk-twilight-l3-solo.png\",\n \"refs/grainy-duotone/ref-balloons-navy-peach-l3.png\":\n \"d02b846f-2c93-44b6-a5bb-aa92a38d187d/ref-balloons-navy-peach-l3.png\",\n \"refs/grainy-duotone/ref-ladder-burgundy-pink-l2.png\":\n \"ff9caf48-1ce2-4d0e-b0b4-7a182c29e05f/ref-ladder-burgundy-pink-l2.png\",\n \"refs/grainy-duotone/ref-launch-pennant-1.png\":\n \"80cc238d-e265-4572-821e-55de056f86b8/ref-launch-pennant-1.png\",\n \"refs/grainy-duotone/ref-launch-pennant-2.png\":\n \"455c76d4-6bde-48ab-b09b-ee515820842c/ref-launch-pennant-2.png\",\n \"refs/grainy-duotone/ref-launch-pennant-3.png\":\n \"d1f61bf6-ca9d-47da-99f0-ecca26e98e60/ref-launch-pennant-3.png\",\n \"refs/grainy-duotone/ref-magnifier-lavender-mustard-l2.png\":\n \"4014cc28-4c70-40ce-b064-273110d755d0/ref-magnifier-lavender-mustard-l2.png\",\n \"refs/grainy-duotone/ref-sprout-sage-coral-l1.png\":\n \"45bc11dd-e170-4648-9da1-9b857b9ba580/ref-sprout-sage-coral-l1.png\",\n \"refs/iberian-vignette/ref-l1-manana.png\":\n \"f2468abc-cc1f-400e-904f-51c347d6d6a9/ref-l1-manana.png\",\n \"refs/iberian-vignette/ref-l2-cafe.png\":\n \"62dae763-a448-4633-a8db-5f0dcf7275d7/ref-l2-cafe.png\",\n \"refs/iberian-vignette/ref-l2-ritmo.png\":\n \"11a11d62-1c25-4878-960f-516c50000f3c/ref-l2-ritmo.png\",\n \"refs/iberian-vignette/ref-l3-familia.png\":\n \"2a924927-8fdc-4206-a248-c58f8f62005f/ref-l3-familia.png\",\n \"refs/ink-mascot/ref-branding-mint.png\":\n \"a16903ff-ba02-40d9-b31e-2d71982dbe5e/ref-branding-mint.png\",\n \"refs/ink-mascot/ref-content-terracotta.png\":\n \"45a3afef-123f-4814-96b5-bedb5d6c19e5/ref-content-terracotta.png\",\n \"refs/ink-mascot/ref-conversion-sage.png\":\n \"fe2841d0-3be1-4a1e-8a70-8352a070ef92/ref-conversion-sage.png\",\n \"refs/ink-mascot/ref-email-lavender.png\":\n \"6f4ad9da-9af3-4b70-a811-518817cbc03e/ref-email-lavender.png\",\n \"refs/ink-mascot/ref-growth-forest.png\":\n \"10f34cdf-de0d-4c1f-acaf-cd9c25c17a27/ref-growth-forest.png\",\n \"refs/ink-mascot/ref-launch-tangerine.png\":\n \"75f29fd8-4ac4-446f-8ba6-e48edb82473d/ref-launch-tangerine.png\",\n \"refs/ink-mascot/ref-loyalty-plum.png\":\n \"4c9f2530-1efe-4026-a9ce-8213f27c987b/ref-loyalty-plum.png\",\n \"refs/ink-mascot/ref-seo-coral.png\":\n \"5c75119b-da55-4528-8ff7-53bc7616bfc4/ref-seo-coral.png\",\n \"refs/ink-storefront/ref-l1-lupo.png\":\n \"6723fa07-1951-428e-a961-6ea5f8498776/ref-l1-lupo.png\",\n \"refs/ink-storefront/ref-l1-petit-pain.png\":\n \"0990f996-ca32-4c1e-b086-cf66d6d35ea6/ref-l1-petit-pain.png\",\n \"refs/ink-storefront/ref-l2-fleur-fern.png\":\n \"4638ab2a-7540-4938-9342-6a96785c39b6/ref-l2-fleur-fern.png\",\n \"refs/inkdab/ref-brainstorm-butter-cream-rich.png\":\n \"69b51b63-6f35-4065-94f5-b6399f42e779/ref-brainstorm-butter-cream-rich.png\",\n \"refs/inkdab/ref-calling-blue-light.png\":\n \"74316ebe-505d-4dc0-94a6-f0c0280fd934/ref-calling-blue-light.png\",\n \"refs/inkdab/ref-handoff-dusty-pink.png\":\n \"52911b07-baf9-4777-82c6-1b723ae8daae/ref-handoff-dusty-pink.png\",\n \"refs/inkdab/ref-pitch-blue.png\":\n \"308fbe8e-051b-414a-9be3-40dd5174fc3e/ref-pitch-blue.png\",\n \"refs/inkdab/ref-reading-lavender-rich.png\":\n \"7a9351df-62fe-410d-8938-572742ab1fbe/ref-reading-lavender-rich.png\",\n \"refs/inkstomp/ref-climb-climb.png\":\n \"bd18e3ee-5f17-47b1-885d-71c9a4eb8770/ref-climb-climb.png\",\n \"refs/inkstomp/ref-crunchy-cricket.png\":\n \"a04f61d7-56fb-4213-b587-501d23bf0cea/ref-crunchy-cricket.png\",\n \"refs/inkstomp/ref-greasy-griddle.png\":\n \"5d49301d-3dc6-4298-8dea-1c1129ebdeef/ref-greasy-griddle.png\",\n \"refs/inkstomp/ref-jolly-jalapeno.png\":\n \"dabaab5f-d480-4dd5-aa12-59c29185062f/ref-jolly-jalapeno.png\",\n \"refs/inkstomp/ref-pocket-plum.png\":\n \"280e2782-50b4-42d7-8d64-8e17c63d8ef9/ref-pocket-plum.png\",\n \"refs/inkstomp/ref-quiet-quitter.png\":\n \"928239cf-52a1-41f3-a01c-d19ba0f9d628/ref-quiet-quitter.png\",\n \"refs/inkstomp/ref-rocket-roach.png\":\n \"2b7b8ce1-5cc3-42c6-b699-b73a12172b24/ref-rocket-roach.png\",\n \"refs/inkstomp/ref-turbo-tofu.png\":\n \"5ee79599-3e9f-466c-904a-695b37abe14f/ref-turbo-tofu.png\",\n \"refs/iso-scene/blue-city-construction.png\":\n \"0ba14b24-74fa-4953-98ec-1bf0d6326705/blue-city-construction.png\",\n \"refs/iso-scene/coral-hanging-garden.png\":\n \"eff3b4d8-1279-4540-a23c-72ab74ff60a7/coral-hanging-garden.png\",\n \"refs/iso-scene/sky-castle.png\":\n \"1604e46a-2bf9-4664-85c1-9991f634901d/sky-castle.png\",\n \"refs/iso-scene/yellow-floating-island-park.png\":\n \"3ebb7c87-5411-41ea-89cd-8a49cc676dec/yellow-floating-island-park.png\",\n \"refs/jade-blockprint/ref-cobalt-ship-l2.png\":\n \"105b7927-8114-4537-b3eb-6b5afed28751/ref-cobalt-ship-l2.png\",\n \"refs/jade-blockprint/ref-coral-turntable-l1.png\":\n \"7f049e9f-351f-4e57-923a-80fadf320d47/ref-coral-turntable-l1.png\",\n \"refs/jade-blockprint/ref-mustard-monstera-l1.png\":\n \"b73af11f-17c5-4392-9c0d-3f065ab3a7cd/ref-mustard-monstera-l1.png\",\n \"refs/jade-blockprint/ref-rose-perfume-l2.png\":\n \"5af0b018-e607-4a78-9c20-bedadbe2a562/ref-rose-perfume-l2.png\",\n \"refs/jade-blockprint/ref-sage-sprout-l1.png\":\n \"a1ce6abf-3823-4b00-9fbd-f03b0a1f338f/ref-sage-sprout-l1.png\",\n \"refs/jade-blockprint/ref-sage-teapot-l1.png\":\n \"7622f65a-6ef2-4a80-af36-df929b0bcc07/ref-sage-teapot-l1.png\",\n \"refs/jade-blockprint/ref-slate-pen-notebook-l2.png\":\n \"0e62d94c-93ef-4d3a-93c0-8740107c844a/ref-slate-pen-notebook-l2.png\",\n \"refs/jade-blockprint/ref-terracotta-pitcher-l2.png\":\n \"686886ff-a72b-447a-8027-d9fb396438be/ref-terracotta-pitcher-l2.png\",\n \"refs/light-pop-portrait/ref-laughing-girl-braids-magenta.png\":\n \"d5e3be91-b682-417c-b2fa-a2d9d7930d29/ref-laughing-girl-braids-magenta.png\",\n \"refs/light-pop-portrait/ref-sleepy-girl-bunny-peach.png\":\n \"50061e64-b43f-4a80-84ff-08460b997db3/ref-sleepy-girl-bunny-peach.png\",\n \"refs/light-pop-portrait/ref-sly-boy-popsicle-lavender.png\":\n \"40347905-7f67-48a5-b52c-5b1f0c140c97/ref-sly-boy-popsicle-lavender.png\",\n \"refs/light-pop-portrait/ref-surprised-boy-frog-mint.png\":\n \"8838de52-83fa-417f-b0ed-958086792f8c/ref-surprised-boy-frog-mint.png\",\n \"refs/light-pop-portrait/ref-yellowhat-mushroom-cobalt.png\":\n \"d1046fdb-418f-4c98-9308-bb96f0063bb0/ref-yellowhat-mushroom-cobalt.png\",\n \"refs/light-pop-portrait/ref-zen-kid-bird-teal.png\":\n \"4de21e05-47b8-4b5e-8385-993d616fb1dc/ref-zen-kid-bird-teal.png\",\n \"refs/loose-contour/ref-l1-mustard-hand.png\":\n \"e0ef3f95-d7db-4034-97e3-63fbf4586e42/ref-l1-mustard-hand.png\",\n \"refs/loose-contour/ref-l2-blue-laptop.png\":\n \"ff8a4838-974e-497c-91a5-2ce6d9fe61f6/ref-l2-blue-laptop.png\",\n \"refs/loose-contour/ref-l2-coral-envelope.png\":\n \"11f1cd73-7771-4963-a33c-eaf37528f413/ref-l2-coral-envelope.png\",\n \"refs/loose-contour/ref-l2-coral-twohands.png\":\n \"803e3715-c86f-4390-a1e0-a600acaf9b2e/ref-l2-coral-twohands.png\",\n \"refs/loose-contour/ref-l3-balanced-vignette.png\":\n \"970da081-2817-491b-91e9-faa2ce18e73b/ref-l3-balanced-vignette.png\",\n \"refs/mellow-pop/ref-coral-leaf-hug.png\":\n \"2d04dac1-6c3d-4d28-a369-846373695eb7/ref-coral-leaf-hug.png\",\n \"refs/mellow-pop/ref-coral-lilypad-path-l3.png\":\n \"fc588265-b9ca-43fc-8672-65351701b410/ref-coral-lilypad-path-l3.png\",\n \"refs/mellow-pop/ref-indigo-sticky-moon-l3.png\":\n \"37c75806-951a-411c-8fe9-e20b2988b5ca/ref-indigo-sticky-moon-l3.png\",\n \"refs/mellow-pop/ref-lavender-shell-soundwaves-l3.png\":\n \"fc512536-b370-4af7-906a-4e590aacaa0a/ref-lavender-shell-soundwaves-l3.png\",\n \"refs/mellow-pop/ref-lavender-tulip-l2.png\":\n \"8e8ac32f-ca81-43ac-839c-4d6ae72036de/ref-lavender-tulip-l2.png\",\n \"refs/mellow-pop/ref-mint-open-book-l2.png\":\n \"487d5b3c-ef63-4e5f-8af1-3d4a849a9091/ref-mint-open-book-l2.png\",\n \"refs/mellow-pop/ref-periwinkle-phone-l1.png\":\n \"215178df-bca9-4c99-8451-5a5f53e279c4/ref-periwinkle-phone-l1.png\",\n \"refs/mellow-pop/ref-yellow-garden-butterflies-l3.png\":\n \"7e71b281-eb87-4bfe-bb96-cf0a3f66d33a/ref-yellow-garden-butterflies-l3.png\",\n \"refs/mellow-pop/ref-yellow-lightbulb-l1.png\":\n \"89e40858-4023-4210-b222-413a2717511d/ref-yellow-lightbulb-l1.png\",\n \"refs/mosaic-still-life/ref-art-studio.jpg\":\n \"86d48554-7ce6-420f-9cf1-27767d7d6767/ref-art-studio.jpg\",\n \"refs/mosaic-still-life/ref-autumn-cottage.jpg\":\n \"9d129b9b-dd84-40d1-b387-2effe4f6a8bc/ref-autumn-cottage.jpg\",\n \"refs/mosaic-still-life/ref-beach-picnic.jpg\":\n \"4afcc2db-c81b-42f0-94db-37b40b2aa786/ref-beach-picnic.jpg\",\n \"refs/mosaic-still-life/ref-kitchen.jpg\":\n \"f642e532-972e-4ed2-94bc-66754fa2da95/ref-kitchen.jpg\",\n \"refs/mosaic-still-life/ref-mediterranean.jpg\":\n \"87cee726-b222-42c8-b23d-b9e33742f2a9/ref-mediterranean.jpg\",\n \"refs/mosaic-still-life/ref-moonlit-garden.jpg\":\n \"76f45eab-66be-4f51-816c-34e1494dce46/ref-moonlit-garden.jpg\",\n \"refs/mosaic-still-life/ref-reading-nook.jpg\":\n \"2d9fb866-3b5e-47e4-8f45-28210ef3fd7d/ref-reading-nook.jpg\",\n \"refs/mosaic-still-life/ref-workshop.jpg\":\n \"ee358efe-c9f9-44eb-bfb3-d8d7f14ed1c4/ref-workshop.jpg\",\n \"refs/notion-illustration/ref-candle-lighting.png\":\n \"31fbcae8-98a6-4f9d-aec1-0fa4c0103e6e/ref-candle-lighting.png\",\n \"refs/notion-illustration/ref-evening-sketching.png\":\n \"6a34c410-d6c3-41ec-aea2-961fa51ddb10/ref-evening-sketching.png\",\n \"refs/notion-illustration/ref-evening-stretch.png\":\n \"c74fffa1-bc09-4ad8-91d2-180f2d1bc71a/ref-evening-stretch.png\",\n \"refs/notion-illustration/ref-pouring-tea.png\":\n \"17788881-068a-42a4-af93-62cbc5667275/ref-pouring-tea.png\",\n \"refs/notion-illustration/ref-reading-windowseat.png\":\n \"07127865-ed13-4a04-99e9-b2cbfc89e25f/ref-reading-windowseat.png\",\n \"refs/op-ed-cover/ref-mind-eye-contact.png\":\n \"f4728ea8-436c-44be-8aa9-296bc3b57334/ref-mind-eye-contact.png\",\n \"refs/op-ed-cover/ref-pastrami-full-volume.png\":\n \"216c9ad3-9d9e-4a16-82b7-0e879a5033f3/ref-pastrami-full-volume.png\",\n \"refs/op-ed-cover/ref-slowest-bowl.png\":\n \"4a65356c-2b0d-4256-a09c-9075aba644cf/ref-slowest-bowl.png\",\n \"refs/painterly-botanical/ref-child-wildflower-sage.png\":\n \"881e47a0-602f-48ca-9c2e-1423795745db/ref-child-wildflower-sage.png\",\n \"refs/painterly-botanical/ref-curled-up-peach-coral.png\":\n \"15aad0c4-3a85-4cbb-ba74-095d806760a5/ref-curled-up-peach-coral.png\",\n \"refs/painterly-botanical/ref-from-behind-sepia.png\":\n \"f9d7bbdc-5449-4d7d-a0c3-5dfd337bd6c5/ref-from-behind-sepia.png\",\n \"refs/painterly-botanical/ref-lotus-dusty-blue.png\":\n \"b4acaf29-4193-4e1f-acd4-397458b230df/ref-lotus-dusty-blue.png\",\n \"refs/painterly-botanical/ref-magnolia-emerald-ivory.png\":\n \"c5da2dff-3352-4da8-951d-eca639fb1569/ref-magnolia-emerald-ivory.png\",\n \"refs/painterly-botanical/ref-sunflower-sand.png\":\n \"4f0860dc-19fe-4497-97c4-72f1cdffa1b1/ref-sunflower-sand.png\",\n \"refs/painterly-botanical/ref-wisteria-lavender.png\":\n \"d080f0d3-f9da-431b-ba83-88eadba89d1b/ref-wisteria-lavender.png\",\n \"refs/painterly-botanical/ref-young-man-monstera.png\":\n \"ecf33b75-1068-4be9-9064-b14a48042320/ref-young-man-monstera.png\",\n \"refs/papernook/ref-anchor.png\":\n \"abb8aa87-304f-42bd-a9e5-8bf3817d6a69/ref-anchor.png\",\n \"refs/papernook/ref-barista.png\":\n \"17ce8e66-15b0-4ac0-bced-45b73a75dcc1/ref-barista.png\",\n \"refs/papernook/ref-engineer.png\":\n \"6ca628ba-4c7e-40fc-82d4-5c128f91f65d/ref-engineer.png\",\n \"refs/papernook/ref-meditation.png\":\n \"e3a39662-1710-4aa1-b805-598bc8d890d1/ref-meditation.png\",\n \"refs/papernook/ref-researcher.png\":\n \"a99ec11e-f707-497a-bebb-63cdb4c4a30f/ref-researcher.png\",\n \"refs/postcard-illustration/ref-sensoji.png\":\n \"c253d888-dc7a-4640-8383-79bef9343f23/ref-sensoji.png\",\n \"refs/postcard-illustration/ref-shibuya.png\":\n \"42971230-1487-4f61-af41-ba0c9a64c70e/ref-shibuya.png\",\n \"refs/riso-relic/ref-alarm-clock-tomato-wakeup.png\":\n \"c021c710-677b-4673-a1ee-ab168b8eb668/ref-alarm-clock-tomato-wakeup.png\",\n \"refs/riso-relic/ref-boombox-magenta-playloud.png\":\n \"8382e4e9-6e75-4fe4-8b6d-0fb7fad6e3a1/ref-boombox-magenta-playloud.png\",\n \"refs/riso-relic/ref-cassette-violet-mixtape.png\":\n \"78c5f7f2-f9bc-45c6-b917-67313c3b2f74/ref-cassette-violet-mixtape.png\",\n \"refs/riso-relic/ref-polaroid-sky-saycheese.png\":\n \"a24b583b-a545-4473-8a3e-23f301571e5c/ref-polaroid-sky-saycheese.png\",\n \"refs/riso-relic/ref-rotary-phone-mustard-ringring.png\":\n \"442b660f-ba80-47db-a98c-8322d7be2294/ref-rotary-phone-mustard-ringring.png\",\n \"refs/shadow-pop/ref-berry-record-l1.png\":\n \"634c126f-b21f-4d61-a97f-583bd5d0226c/ref-berry-record-l1.png\",\n \"refs/shadow-pop/ref-citrus-coffee-l3.png\":\n \"a4bc8084-ed7a-4acd-8ee7-949db18db919/ref-citrus-coffee-l3.png\",\n \"refs/shadow-pop/ref-citrus-suitcase-l3-transparent.png\":\n \"07a92c62-6133-4757-98ca-277c1f72184a/ref-citrus-suitcase-l3-transparent.png\",\n \"refs/shadow-pop/ref-default-mail-l2.png\":\n \"e02fe878-5702-4a68-8b4c-82acaba3a8b2/ref-default-mail-l2.png\",\n \"refs/shadow-pop/ref-tropical-plant-l2.png\":\n \"9ebb37dd-3500-4af0-9688-fe5a1901b4b5/ref-tropical-plant-l2.png\",\n \"refs/soft-vector/ref-bike-lime.png\":\n \"22708177-11bf-487c-b7d2-27f58f1523c9/ref-bike-lime.png\",\n \"refs/soft-vector/ref-desk-violet.png\":\n \"db4c7752-d7de-4b90-ad1e-caa00b3a348f/ref-desk-violet.png\",\n \"refs/soft-vector/ref-mug-mustard.png\":\n \"dc49674a-dfc3-42e5-a7a5-15a1d5c5758e/ref-mug-mustard.png\",\n \"refs/sticker-sheet/ref-desk.jpg\":\n \"3f7e4ef5-4b6b-44ed-8705-1aaf04f5a22a/ref-desk.jpg\",\n \"refs/sticker-sheet/ref-kitchen.jpg\":\n \"725ad48d-831a-4f6b-9fc0-a6a8b419610d/ref-kitchen.jpg\",\n \"refs/sticker-sheet/ref-plants.jpg\":\n \"37971d40-21b9-4427-b4cf-e139aa462783/ref-plants.jpg\",\n \"refs/sticker-sheet/ref-travel.jpg\":\n \"dc8fb342-a90a-4511-8954-1598b175e34a/ref-travel.jpg\",\n \"refs/sunlit-gouache/ref-bookshop-interior.jpg\":\n \"bb2f13d1-f849-4a5c-a493-524bc0eda5c2/ref-bookshop-interior.jpg\",\n \"refs/sunlit-gouache/ref-cafe-terrace.jpg\":\n \"5ccf8eca-3f37-4598-ae00-045e4ed7532c/ref-cafe-terrace.jpg\",\n \"refs/sunlit-gouache/ref-market-arcade.jpg\":\n \"0739d94c-0b6e-465c-9f53-9cc9a74296ec/ref-market-arcade.jpg\",\n \"refs/sunlit-gouache/ref-temple-courtyard.jpg\":\n \"d03acdc5-8bd5-41d0-8574-801fbbbb4af4/ref-temple-courtyard.jpg\",\n \"refs/sunlit-gouache/ref-tram-stop.jpg\":\n \"33e80135-0bca-4f22-9682-60a3803f5939/ref-tram-stop.jpg\",\n \"refs/tiny-wanderer/varA.jpg\":\n \"d27f7982-f692-4724-9a68-f0c796b9d271/varA.jpg\",\n \"refs/tiny-wanderer/varB.jpg\":\n \"7807e3f5-0239-4996-ba14-90e434c6e124/varB.jpg\",\n \"refs/tiny-wanderer/varC.jpg\":\n \"695a67ad-099c-4262-ab36-bacebc37e8c1/varC.jpg\",\n \"refs/tiny-wanderer/varD.jpg\":\n \"11f9046a-4245-4988-a6e7-93545f69c1db/varD.jpg\",\n};\n\n/** Resolve an illustration asset's logical path to its full CDN URL. */\nexport function illustrationAssetUrl(path: string): string {\n const objectPath = ILLUSTRATION_ASSET_PATHS[path];\n if (!objectPath) {\n throw new Error(`Unknown illustration asset path: ${path}`);\n }\n return `${ILLUSTRATION_ASSET_BASE}/${objectPath}`;\n}\n\nexport interface IllustrationStyle {\n slug: string;\n title: string;\n image: string;\n /** Optional path under ASSET_BASE used as the card cover, e.g. \"refs/<slug>/<file>\". */\n cover?: string;\n sample: string;\n width: number;\n height: number;\n refs: readonly string[];\n}\n\nexport const ILLUSTRATION_STYLES: readonly IllustrationStyle[] = [\n {\n slug: \"ink-storefront\",\n title: \"Ink Storefront\",\n image: \"ink-storefront.png\",\n cover: \"refs/ink-storefront/ref-l1-lupo.png\",\n sample: \"ref-l1-lupo.png\",\n width: 1024,\n height: 1536,\n refs: [\"ref-l1-lupo.png\", \"ref-l1-petit-pain.png\", \"ref-l2-fleur-fern.png\"],\n },\n {\n slug: \"tiny-wanderer\",\n title: \"Tiny Wanderer\",\n image: \"tiny-wanderer.jpg\",\n cover: \"refs/tiny-wanderer/varA.jpg\",\n sample: \"varA.jpg\",\n width: 512,\n height: 768,\n refs: [\"varA.jpg\", \"varB.jpg\", \"varC.jpg\", \"varD.jpg\"],\n },\n {\n slug: \"crowd-ink\",\n title: \"Crowd Ink\",\n image: \"crowd-ink.png\",\n cover: \"refs/crowd-ink/anchor.png\",\n sample: \"anchor.png\",\n width: 1536,\n height: 1024,\n refs: [\n \"anchor.png\",\n \"sample-cafe.png\",\n \"sample-office.png\",\n \"sample-picnic.png\",\n \"sample-subway.png\",\n ],\n },\n {\n slug: \"cozy-parlor\",\n title: \"Cozy Parlor\",\n image: \"cozy-parlor.jpg\",\n cover: \"refs/cozy-parlor/ref-otter-painter.jpg\",\n sample: \"ref-otter-painter.jpg\",\n width: 512,\n height: 768,\n refs: [\n \"ref-frog-letters.jpg\",\n \"ref-hedgehog-records.jpg\",\n \"ref-mouse-baker.jpg\",\n \"ref-otter-painter.jpg\",\n ],\n },\n {\n slug: \"iberian-vignette\",\n title: \"Iberian Vignette\",\n image: \"iberian-vignette.png\",\n cover: \"refs/iberian-vignette/ref-l1-manana.png\",\n sample: \"ref-l1-manana.png\",\n width: 848,\n height: 1264,\n refs: [\n \"ref-l1-manana.png\",\n \"ref-l2-cafe.png\",\n \"ref-l2-ritmo.png\",\n \"ref-l3-familia.png\",\n ],\n },\n {\n slug: \"shadow-pop\",\n title: \"Shadow Pop\",\n image: \"shadow-pop.png\",\n cover: \"refs/shadow-pop/ref-default-mail-l2.png\",\n sample: \"ref-default-mail-l2.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"ref-berry-record-l1.png\",\n \"ref-citrus-coffee-l3.png\",\n \"ref-citrus-suitcase-l3-transparent.png\",\n \"ref-default-mail-l2.png\",\n \"ref-tropical-plant-l2.png\",\n ],\n },\n {\n slug: \"jade-blockprint\",\n title: \"Jade Blockprint\",\n image: \"jade-blockprint.png\",\n cover: \"refs/jade-blockprint/ref-sage-sprout-l1.png\",\n sample: \"ref-sage-sprout-l1.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"ref-cobalt-ship-l2.png\",\n \"ref-coral-turntable-l1.png\",\n \"ref-mustard-monstera-l1.png\",\n \"ref-rose-perfume-l2.png\",\n \"ref-sage-sprout-l1.png\",\n \"ref-sage-teapot-l1.png\",\n \"ref-slate-pen-notebook-l2.png\",\n \"ref-terracotta-pitcher-l2.png\",\n ],\n },\n {\n slug: \"loose-contour\",\n title: \"Loose Contour\",\n image: \"loose-contour.png\",\n sample: \"ref-l3-balanced-vignette.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"ref-l1-mustard-hand.png\",\n \"ref-l2-blue-laptop.png\",\n \"ref-l2-coral-envelope.png\",\n \"ref-l2-coral-twohands.png\",\n \"ref-l3-balanced-vignette.png\",\n ],\n },\n {\n slug: \"soft-vector\",\n title: \"Soft Vector\",\n image: \"soft-vector.png\",\n cover: \"refs/soft-vector/ref-bike-lime.png\",\n sample: \"ref-desk-violet.png\",\n width: 1024,\n height: 1024,\n refs: [\"ref-bike-lime.png\", \"ref-desk-violet.png\", \"ref-mug-mustard.png\"],\n },\n {\n slug: \"grain-poster\",\n title: \"Grain Poster\",\n image: \"grain-poster.png\",\n sample: \"ref-twilightdesk-twilight-l3-solo.png\",\n width: 704,\n height: 1472,\n refs: [\n \"ref-bench-sunsetcoral-l2-pair.png\",\n \"ref-cafe-cooldawn-l2-solo.png\",\n \"ref-dogwalker-forestgreen-l1-solo.png\",\n \"ref-guitar-twilight-l1-solo.png\",\n \"ref-skateboard-cooldawn-l1-solo.png\",\n \"ref-sunhat-sunsetcoral-l1-solo.png\",\n \"ref-twilightdesk-twilight-l3-solo.png\",\n ],\n },\n {\n slug: \"sunlit-gouache\",\n title: \"Sunlit Gouache\",\n image: \"sunlit-gouache.png\",\n sample: \"ref-bookshop-interior.jpg\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-bookshop-interior.jpg\",\n \"ref-cafe-terrace.jpg\",\n \"ref-market-arcade.jpg\",\n \"ref-temple-courtyard.jpg\",\n \"ref-tram-stop.jpg\",\n ],\n },\n {\n slug: \"folk-muse\",\n title: \"Folk Muse\",\n image: \"folk-muse.png\",\n sample: \"ref-canonical.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-canonical.png\",\n \"ref-sunset-dove.png\",\n \"ref-tropical-butterfly.png\",\n \"ref-winter-cat.png\",\n ],\n },\n {\n slug: \"light-pop-portrait\",\n title: \"Light Pop Portrait\",\n image: \"light-pop-portrait.png\",\n sample: \"ref-sleepy-girl-bunny-peach.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"ref-laughing-girl-braids-magenta.png\",\n \"ref-sleepy-girl-bunny-peach.png\",\n \"ref-sly-boy-popsicle-lavender.png\",\n \"ref-surprised-boy-frog-mint.png\",\n \"ref-yellowhat-mushroom-cobalt.png\",\n \"ref-zen-kid-bird-teal.png\",\n ],\n },\n {\n slug: \"postcard-illustration\",\n title: \"Postcard Illustration\",\n image: \"postcard-illustration.png\",\n sample: \"ref-sensoji.png\",\n width: 1024,\n height: 1536,\n refs: [\"ref-sensoji.png\", \"ref-shibuya.png\"],\n },\n {\n slug: \"mosaic-still-life\",\n title: \"Mosaic Still Life\",\n image: \"mosaic-still-life.png\",\n sample: \"ref-reading-nook.jpg\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-art-studio.jpg\",\n \"ref-autumn-cottage.jpg\",\n \"ref-beach-picnic.jpg\",\n \"ref-kitchen.jpg\",\n \"ref-mediterranean.jpg\",\n \"ref-moonlit-garden.jpg\",\n \"ref-reading-nook.jpg\",\n \"ref-workshop.jpg\",\n ],\n },\n {\n slug: \"painterly-botanical\",\n title: \"Painterly Botanical\",\n image: \"painterly-botanical.png\",\n sample: \"ref-wisteria-lavender.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-child-wildflower-sage.png\",\n \"ref-curled-up-peach-coral.png\",\n \"ref-from-behind-sepia.png\",\n \"ref-lotus-dusty-blue.png\",\n \"ref-magnolia-emerald-ivory.png\",\n \"ref-sunflower-sand.png\",\n \"ref-wisteria-lavender.png\",\n \"ref-young-man-monstera.png\",\n ],\n },\n {\n slug: \"op-ed-cover\",\n title: \"Op-Ed Cover\",\n image: \"op-ed-cover.png\",\n sample: \"ref-slowest-bowl.png\",\n width: 896,\n height: 1152,\n refs: [\n \"ref-mind-eye-contact.png\",\n \"ref-pastrami-full-volume.png\",\n \"ref-slowest-bowl.png\",\n ],\n },\n {\n slug: \"endpaper\",\n title: \"Endpaper\",\n image: \"endpaper.png\",\n sample: \"ref-mossy-teal-cats-l2.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-butter-birds-l3.png\",\n \"ref-cobalt-sea-l3.png\",\n \"ref-mossy-teal-cats-l2.png\",\n \"ref-plum-foxes-l2.png\",\n \"ref-slate-houseplants-l2.png\",\n ],\n },\n {\n slug: \"inkstomp\",\n title: \"Inkstomp\",\n image: \"inkstomp.png\",\n sample: \"ref-quiet-quitter.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-climb-climb.png\",\n \"ref-crunchy-cricket.png\",\n \"ref-greasy-griddle.png\",\n \"ref-jolly-jalapeno.png\",\n \"ref-pocket-plum.png\",\n \"ref-quiet-quitter.png\",\n \"ref-rocket-roach.png\",\n \"ref-turbo-tofu.png\",\n ],\n },\n {\n slug: \"mellow-pop\",\n title: \"Mellow Pop\",\n image: \"mellow-pop.png\",\n sample: \"ref-mint-open-book-l2.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-coral-leaf-hug.png\",\n \"ref-coral-lilypad-path-l3.png\",\n \"ref-indigo-sticky-moon-l3.png\",\n \"ref-lavender-shell-soundwaves-l3.png\",\n \"ref-lavender-tulip-l2.png\",\n \"ref-mint-open-book-l2.png\",\n \"ref-periwinkle-phone-l1.png\",\n \"ref-yellow-garden-butterflies-l3.png\",\n \"ref-yellow-lightbulb-l1.png\",\n ],\n },\n {\n slug: \"papernook\",\n title: \"Papernook\",\n image: \"papernook.png\",\n sample: \"ref-researcher.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-anchor.png\",\n \"ref-barista.png\",\n \"ref-engineer.png\",\n \"ref-meditation.png\",\n \"ref-researcher.png\",\n ],\n },\n {\n slug: \"ink-mascot\",\n title: \"Ink Mascot\",\n image: \"ink-mascot.png\",\n sample: \"ref-content-terracotta.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-branding-mint.png\",\n \"ref-content-terracotta.png\",\n \"ref-conversion-sage.png\",\n \"ref-email-lavender.png\",\n \"ref-growth-forest.png\",\n \"ref-launch-tangerine.png\",\n \"ref-loyalty-plum.png\",\n \"ref-seo-coral.png\",\n ],\n },\n {\n slug: \"riso-relic\",\n title: \"Riso Relic\",\n image: \"riso-relic.png\",\n sample: \"ref-rotary-phone-mustard-ringring.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-alarm-clock-tomato-wakeup.png\",\n \"ref-boombox-magenta-playloud.png\",\n \"ref-cassette-violet-mixtape.png\",\n \"ref-polaroid-sky-saycheese.png\",\n \"ref-rotary-phone-mustard-ringring.png\",\n ],\n },\n {\n slug: \"editorial-flatfolk\",\n title: \"Editorial Flatfolk\",\n image: \"editorial-flatfolk.png\",\n sample: \"ref-harbor.png\",\n width: 1024,\n height: 1024,\n refs: [\"ref-alpine.png\", \"ref-harbor.png\", \"ref-park.png\"],\n },\n {\n slug: \"flat-poster\",\n title: \"Flat Poster\",\n image: \"flat-poster.png\",\n sample: \"ref-teacup-lavender-takeabeat.png\",\n width: 1024,\n height: 1536,\n refs: [\n \"ref-lightbulb-sky-thinkbigger.png\",\n \"ref-magnifier-mustard-lookcloser.png\",\n \"ref-mountain-rose-reachhigher.png\",\n \"ref-robot-yellow-aiteammate.png\",\n \"ref-rocket-coral-shipfaster.png\",\n \"ref-shield-sage-alwayson.png\",\n \"ref-teacup-lavender-takeabeat.png\",\n ],\n },\n {\n slug: \"grainy-duotone\",\n title: \"Grainy Duotone\",\n image: \"grainy-duotone.png\",\n sample: \"ref-magnifier-lavender-mustard-l2.png\",\n width: 1056,\n height: 992,\n refs: [\n \"ref-balloons-navy-peach-l3.png\",\n \"ref-ladder-burgundy-pink-l2.png\",\n \"ref-launch-pennant-1.png\",\n \"ref-launch-pennant-2.png\",\n \"ref-launch-pennant-3.png\",\n \"ref-magnifier-lavender-mustard-l2.png\",\n \"ref-sprout-sage-coral-l1.png\",\n ],\n },\n {\n slug: \"sticker-sheet\",\n title: \"Sticker Sheet\",\n image: \"sticker-sheet.png\",\n sample: \"ref-desk.jpg\",\n width: 848,\n height: 1264,\n refs: [\n \"ref-desk.jpg\",\n \"ref-kitchen.jpg\",\n \"ref-plants.jpg\",\n \"ref-travel.jpg\",\n ],\n },\n {\n slug: \"folk-storybook\",\n title: \"Folk Storybook\",\n image: \"folk-storybook.png\",\n sample: \"ref-reading-nook.jpg\",\n width: 1024,\n height: 1024,\n refs: [\"ref-chill-tussle.jpg\", \"ref-puzzle.jpg\", \"ref-reading-nook.jpg\"],\n },\n {\n slug: \"inkdab\",\n title: \"Inkdab\",\n image: \"inkdab.png\",\n sample: \"ref-reading-lavender-rich.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"ref-brainstorm-butter-cream-rich.png\",\n \"ref-calling-blue-light.png\",\n \"ref-handoff-dusty-pink.png\",\n \"ref-pitch-blue.png\",\n \"ref-reading-lavender-rich.png\",\n ],\n },\n {\n slug: \"iso-scene\",\n title: \"Iso Scene\",\n image: \"iso-scene.png\",\n sample: \"blue-city-construction.png\",\n width: 1024,\n height: 1024,\n refs: [\n \"blue-city-construction.png\",\n \"coral-hanging-garden.png\",\n \"sky-castle.png\",\n \"yellow-floating-island-park.png\",\n ],\n },\n {\n slug: \"notion-illustration\",\n title: \"Notion Illustration\",\n image: \"notion-illustration.png\",\n sample: \"ref-reading-windowseat.png\",\n width: 1088,\n height: 960,\n refs: [\n \"ref-candle-lighting.png\",\n \"ref-evening-sketching.png\",\n \"ref-evening-stretch.png\",\n \"ref-pouring-tea.png\",\n \"ref-reading-windowseat.png\",\n ],\n },\n];\n\nconst ILLUSTRATION_TEMPLATE_CARD_PREVIEW_IMAGES: Readonly<\n Record<string, string>\n> = {\n \"ink-storefront\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/d3633cfc-bb66-4cf1-9a9b-0c2ac53f12e4/template-card-illustration-ink-storefront-512.jpg\",\n \"tiny-wanderer\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/139cd332-fe89-4326-aa8f-f7052b745bdf/template-card-illustration-tiny-wanderer-512.jpg\",\n \"crowd-ink\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/c4a91b62-96b1-42d2-bf87-30065da6e5b9/template-card-illustration-crowd-ink-512.jpg\",\n \"cozy-parlor\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/aa7daace-8fa8-4319-a31a-bb55c8804382/template-card-illustration-cozy-parlor-512.jpg\",\n \"iberian-vignette\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/952a2f34-9148-49d4-8640-0fd9b6cbdf20/template-card-illustration-iberian-vignette-512.jpg\",\n \"shadow-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/1ee7e63c-d7fd-4755-a22a-d5be45237afc/template-card-illustration-shadow-pop-512.jpg\",\n \"jade-blockprint\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/e4d790c1-c249-4dc0-8820-1366caaa3546/template-card-illustration-jade-blockprint-512.jpg\",\n \"loose-contour\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/fcfc3279-938d-4a5a-842d-c82bd19e96fa/template-card-illustration-loose-contour-512.jpg\",\n \"soft-vector\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/a3b7eab7-7db1-4630-a441-98a1b3ab7b3e/template-card-illustration-soft-vector-512.jpg\",\n \"grain-poster\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/696913c7-8743-4033-95ea-203ba6faf294/template-card-illustration-grain-poster-512.jpg\",\n \"sunlit-gouache\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/ed2d0fe9-5f5c-4aae-bb46-faf132215426/template-card-illustration-sunlit-gouache-512.jpg\",\n \"folk-muse\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/17eddd70-ef01-4d39-8d70-a0a0393b6eb8/template-card-illustration-folk-muse-512.jpg\",\n \"light-pop-portrait\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/0ec684e9-2e98-4905-9a25-a32c1de06f22/template-card-illustration-light-pop-portrait-512.jpg\",\n \"postcard-illustration\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/221efbba-3ed6-4d86-be6e-e6cf6c3d5d57/template-card-illustration-postcard-illustration-512.jpg\",\n \"mosaic-still-life\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/20c33b1f-66aa-4ceb-89cd-10458e93a086/template-card-illustration-mosaic-still-life-512.jpg\",\n \"painterly-botanical\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/e054f277-e76c-429e-b88f-a205e8728375/template-card-illustration-painterly-botanical-512.jpg\",\n \"op-ed-cover\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/6f93b734-20f9-4704-9d32-a5a1229b94a1/template-card-illustration-op-ed-cover-512.jpg\",\n endpaper:\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/8e17040a-a5f7-4184-b473-04b55546cbd0/template-card-illustration-endpaper-512.jpg\",\n inkstomp:\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/3f873461-5166-43f8-86d9-25d1d6e7cc1f/template-card-illustration-inkstomp-512.jpg\",\n \"mellow-pop\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/16e05916-3e40-4890-a9a8-5ee968427305/template-card-illustration-mellow-pop-512.jpg\",\n papernook:\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/fb7b6c2f-0a5c-4e87-93f9-74a0bdc1533d/template-card-illustration-papernook-512.jpg\",\n \"ink-mascot\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/13ad3bce-e719-4fa9-93a4-0e44c744091c/template-card-illustration-ink-mascot-512.jpg\",\n \"riso-relic\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/a1b7f915-b993-4faa-a37e-d870bc8918ab/template-card-illustration-riso-relic-512.jpg\",\n \"editorial-flatfolk\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/f37b65f3-9db8-4b57-b500-b686596649cf/template-card-illustration-editorial-flatfolk-512.jpg\",\n \"flat-poster\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/88738b99-22b1-4e3b-8660-a0291c3e8e86/template-card-illustration-flat-poster-512.jpg\",\n \"grainy-duotone\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/ce3fc7c4-55fe-4edf-8d9a-6b65554ab2bd/template-card-illustration-grainy-duotone-512.jpg\",\n \"sticker-sheet\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/cc1b556a-afe3-4410-a46a-74431de1c976/template-card-illustration-sticker-sheet-512.jpg\",\n \"folk-storybook\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/003c7de6-4409-46ec-b6c7-53005e877c7b/template-card-illustration-folk-storybook-512.jpg\",\n inkdab:\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/b0f5c0e3-c827-4008-8eee-26b5117051be/template-card-illustration-inkdab-512.jpg\",\n \"iso-scene\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/2d9fe8aa-637a-4364-b035-cc42052da270/template-card-illustration-iso-scene-512.jpg\",\n \"notion-illustration\":\n \"https://static.vm0.io/vm0/artifact-templates/illustration/card-previews/c1faa987-4b22-4594-80ab-0a2335bc6698/template-card-illustration-notion-illustration-512.jpg\",\n};\n\nexport interface IllustrationTemplateItem {\n readonly slug: string;\n readonly title: string;\n readonly illustrationStyleId: string;\n readonly previewImage: string;\n readonly previewImages: readonly string[];\n readonly cardPreviewImage?: string;\n readonly variationCount: number;\n /** Intrinsic pixel dimensions of the style's reference frame, used to reserve\n * the card's aspect ratio so the full illustration renders without cropping,\n * letterboxing, or layout shift. */\n readonly width: number;\n readonly height: number;\n readonly tag: \"illustration\";\n}\n\nfunction illustrationPreviewImage(style: IllustrationStyle): string {\n const cover = style.cover ?? `images/${style.image}`;\n return illustrationAssetUrl(cover);\n}\n\nfunction illustrationTemplateCardPreviewImage(\n style: IllustrationStyle,\n): string {\n const cardPreviewImage =\n ILLUSTRATION_TEMPLATE_CARD_PREVIEW_IMAGES[style.slug];\n if (!cardPreviewImage) {\n throw new Error(\n `Missing illustration template card preview image: ${style.slug}`,\n );\n }\n return cardPreviewImage;\n}\n\nexport const ILLUSTRATION_TEMPLATE_ITEMS: readonly IllustrationTemplateItem[] =\n ILLUSTRATION_STYLES.map((style) => {\n return {\n slug: style.slug,\n title: style.title,\n illustrationStyleId: `image-style:${style.slug}`,\n previewImage: illustrationPreviewImage(style),\n cardPreviewImage: illustrationTemplateCardPreviewImage(style),\n previewImages: style.refs.map((ref) => {\n return illustrationAssetUrl(`refs/${style.slug}/${ref}`);\n }),\n variationCount: style.refs.length,\n width: style.width,\n height: style.height,\n tag: \"illustration\",\n };\n });\n","import {\n findVideoTemplate,\n listVideoTemplates,\n type VideoTemplateRegistryEntry,\n} from \"./resource-registry\";\n\nexport interface VideoTemplateItem {\n readonly id: string;\n readonly slug: string;\n readonly title: string;\n readonly description: string;\n readonly previewImage: string;\n readonly cardPreviewImage?: string;\n readonly previewVideo: string;\n readonly previewWebm: string;\n readonly sourcePath: string;\n}\n\nconst VIDEO_TEMPLATE_PREVIEW_IMAGES: Readonly<Record<string, string>> = {\n \"chinese-ink-art\":\n \"https://static.vm0.io/vm0/artifact-templates/video/35a45e0a-095f-476c-9586-840b3e591947/thumbnail-chinese-ink-art.jpg\",\n \"cyberpunk-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/b870f6c1-95a8-4ab6-aa0d-a125cb57dd3e/thumbnail-cyberpunk-anime.jpg\",\n \"epic-grandeur\":\n \"https://static.vm0.io/vm0/artifact-templates/video/2c0eb943-f65a-4225-beaa-78246f7c4a1b/thumbnail-imax-epic-cinematic.jpg\",\n \"fashion-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/video/31026908-c354-4cb5-a51b-8ac8e12ac910/thumbnail-fashion-editorial.jpg\",\n \"gourmet-documentary\":\n \"https://static.vm0.io/vm0/artifact-templates/video/30ab1733-bec0-4ddb-9e15-8f707377af7b/thumbnail-gourmet-documentary.jpg\",\n \"hand-drawn-fantasy-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/ad08022e-5b28-4e80-a67f-cbe5d27cbc03/thumbnail-hand-drawn-fantasy-anime.jpg\",\n \"japanese-wabi-sabi\":\n \"https://static.vm0.io/vm0/artifact-templates/video/a7a69fe3-9e6c-48fd-af55-62c8a57a0371/thumbnail-japanese-wabi-sabi.jpg\",\n \"luxury-product\":\n \"https://static.vm0.io/vm0/artifact-templates/video/016fd6d1-05d9-4709-a7d8-0799409fa1d9/thumbnail-luxury-watch-product.jpg\",\n \"shortform-viral\":\n \"https://static.vm0.io/vm0/artifact-templates/video/40ab801f-16bc-4e29-8370-6b10cd394e30/thumbnail-shortform-viral.jpg\",\n \"sports-performance-ad\":\n \"https://static.vm0.io/vm0/artifact-templates/video/5a95669a-b86c-4817-9d82-250da7509b54/thumbnail-athletic-motivation.jpg\",\n};\n\nconst VIDEO_TEMPLATE_CARD_PREVIEW_IMAGES: Readonly<Record<string, string>> = {\n \"epic-grandeur\":\n \"https://static.vm0.io/vm0/artifact-templates/video/9ad13726-9151-4c68-b89d-afbe90c949bb/template-card-video-epic-grandeur-480x270.jpg\",\n \"gourmet-documentary\":\n \"https://static.vm0.io/vm0/artifact-templates/video/37cffe87-de56-4a53-bddc-b8f43f97b260/template-card-video-gourmet-documentary-480x270.jpg\",\n \"luxury-product\":\n \"https://static.vm0.io/vm0/artifact-templates/video/9726e1d9-f08e-4a94-b823-2b1f89bc382d/template-card-video-luxury-product-480x270.jpg\",\n \"shortform-viral\":\n \"https://static.vm0.io/vm0/artifact-templates/video/2d798f24-325f-4185-9a01-28b3faa3950f/template-card-video-shortform-viral-480x270.jpg\",\n \"fashion-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/video/fa629d39-bf4f-433c-ad87-7385aa05700b/template-card-video-fashion-editorial-480x270.jpg\",\n \"sports-performance-ad\":\n \"https://static.vm0.io/vm0/artifact-templates/video/91cf5878-1b6f-468c-82e1-4d59a99fccae/template-card-video-sports-performance-ad-480x270.jpg\",\n \"japanese-wabi-sabi\":\n \"https://static.vm0.io/vm0/artifact-templates/video/07d4529e-d9ed-43dd-bf13-c2f6ac253476/template-card-video-japanese-wabi-sabi-480x270.jpg\",\n \"hand-drawn-fantasy-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/82204005-e01a-47de-9120-e533e992b290/template-card-video-hand-drawn-fantasy-anime-480x270.jpg\",\n \"cyberpunk-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/1d690a29-2be1-404b-9698-638f18685513/template-card-video-cyberpunk-anime-480x270.jpg\",\n \"chinese-ink-art\":\n \"https://static.vm0.io/vm0/artifact-templates/video/0bad21ee-4b92-4ea0-ad15-5453573aad7b/template-card-video-chinese-ink-art-480x270.jpg\",\n};\n\nconst VIDEO_TEMPLATE_PREVIEW_VIDEOS: Readonly<Record<string, string>> = {\n \"chinese-ink-art\":\n \"https://static.vm0.io/vm0/artifact-templates/video/8314b0ae-6051-4daa-b789-51bec466ba66/video-8314b0ae.mp4\",\n \"cyberpunk-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/e1cfe984-3bfc-4ba1-acb3-9b40b7b76771/video-e1cfe984.mp4\",\n \"epic-grandeur\":\n \"https://static.vm0.io/vm0/artifact-templates/video/df99de74-8eea-420c-86d1-c104ba5ba6b6/video-df99de74.mp4\",\n \"fashion-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/video/8bf8b826-2517-435b-8882-7f071c683e46/video-8bf8b826.mp4\",\n \"gourmet-documentary\":\n \"https://static.vm0.io/vm0/artifact-templates/video/3f0dd8d7-bfc3-4443-9b95-b58faf0d4f64/video-3f0dd8d7.mp4\",\n \"hand-drawn-fantasy-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/da7c7c2d-3383-4796-8e83-b0e112127387/video-da7c7c2d.mp4\",\n \"japanese-wabi-sabi\":\n \"https://static.vm0.io/vm0/artifact-templates/video/72b754cf-f76d-4fa9-9015-ab5082b49608/video-72b754cf.mp4\",\n \"luxury-product\":\n \"https://static.vm0.io/vm0/artifact-templates/video/9e20abbb-a630-4523-857f-8350eba2ea4f/video-9e20abbb.mp4\",\n \"shortform-viral\":\n \"https://static.vm0.io/vm0/artifact-templates/video/4bac1319-dba7-47a0-bc1b-4d1e932f71fd/video-4bac1319.mp4\",\n \"sports-performance-ad\":\n \"https://static.vm0.io/vm0/artifact-templates/video/104ad36a-4d0c-472b-8416-d04cc2f06e75/video-104ad36a.mp4\",\n};\n\nconst VIDEO_TEMPLATE_PREVIEW_WEBMS: Readonly<Record<string, string>> = {\n \"chinese-ink-art\":\n \"https://static.vm0.io/vm0/artifact-templates/video/b18f8d3e-22c9-468f-817e-2046d134fcf6/chinese-ink-art.webm\",\n \"cyberpunk-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/cf8ab683-7c7e-4cfd-b9f2-44eec893407e/cyberpunk-anime.webm\",\n \"epic-grandeur\":\n \"https://static.vm0.io/vm0/artifact-templates/video/e8b67299-f944-4942-a727-931026dea2a0/epic-grandeur.webm\",\n \"fashion-editorial\":\n \"https://static.vm0.io/vm0/artifact-templates/video/51e93c96-03be-4d5a-a66c-b90ec6c52111/fashion-editorial.webm\",\n \"gourmet-documentary\":\n \"https://static.vm0.io/vm0/artifact-templates/video/3b39aeed-30be-4e79-8a6a-23ffd76fca86/gourmet-documentary.webm\",\n \"hand-drawn-fantasy-anime\":\n \"https://static.vm0.io/vm0/artifact-templates/video/42f6fb38-6544-4e42-ba4d-5dd352da9051/hand-drawn-fantasy-anime.webm\",\n \"japanese-wabi-sabi\":\n \"https://static.vm0.io/vm0/artifact-templates/video/22d6c8cb-b7f0-40f7-9c5f-022e578a060b/japanese-wabi-sabi.webm\",\n \"luxury-product\":\n \"https://static.vm0.io/vm0/artifact-templates/video/1ad1c730-d146-4bf5-9936-dea198c593ec/luxury-product.webm\",\n \"shortform-viral\":\n \"https://static.vm0.io/vm0/artifact-templates/video/0b1dbbb8-782e-451d-87e9-6652f60116bf/shortform-viral.webm\",\n \"sports-performance-ad\":\n \"https://static.vm0.io/vm0/artifact-templates/video/a6dab950-dddc-4116-9bc3-624265b35c12/sports-performance-ad.webm\",\n};\n\nfunction videoTemplateSlug(entry: VideoTemplateRegistryEntry): string {\n return entry.id.replace(/^video-template:/u, \"\");\n}\n\nfunction toVideoTemplateItem(\n entry: VideoTemplateRegistryEntry,\n): VideoTemplateItem {\n const slug = videoTemplateSlug(entry);\n const previewImage = VIDEO_TEMPLATE_PREVIEW_IMAGES[slug];\n if (!previewImage) {\n throw new Error(`Missing video template preview image: ${entry.id}`);\n }\n const cardPreviewImage = VIDEO_TEMPLATE_CARD_PREVIEW_IMAGES[slug];\n if (!cardPreviewImage) {\n throw new Error(`Missing video template card preview image: ${entry.id}`);\n }\n const previewVideo = VIDEO_TEMPLATE_PREVIEW_VIDEOS[slug];\n if (!previewVideo) {\n throw new Error(`Missing video template preview video: ${entry.id}`);\n }\n const previewWebm = VIDEO_TEMPLATE_PREVIEW_WEBMS[slug];\n if (!previewWebm) {\n throw new Error(`Missing video template preview webm: ${entry.id}`);\n }\n return {\n id: entry.id,\n slug,\n title: entry.name,\n description: entry.description,\n previewImage,\n cardPreviewImage,\n previewVideo,\n previewWebm,\n sourcePath: entry.source.path,\n };\n}\n\nexport const VIDEO_TEMPLATE_ITEMS: readonly VideoTemplateItem[] =\n listVideoTemplates().map(toVideoTemplateItem);\n\nexport function findVideoTemplateItem(\n id: string,\n): VideoTemplateItem | undefined {\n const entry = findVideoTemplate(id);\n if (!entry) {\n return undefined;\n }\n return VIDEO_TEMPLATE_ITEMS.find((item) => {\n return item.id === entry.id;\n });\n}\n","import type { ConnectorSlug } from \"@vm0/api-contracts/contracts/connector-identity\";\n\nexport interface WorkflowTemplateItem {\n readonly id: `workflow-template:${string}`;\n readonly title: string;\n readonly description: string;\n // Persona group used to organize the template picker. One of\n // WORKFLOW_TEMPLATE_CATEGORIES.\n readonly category: string;\n // Connector slugs shown as icons on the card. The catalog is curated by hand;\n // the picker filters these to entries with an icon.\n readonly connectorSlugs: readonly ConnectorSlug[];\n readonly promptGuidance: string;\n}\n\n// Ordered persona groups for the template picker. \"Everyone\" leads and holds the\n// generic starter template; the rest mirror the onboarding personas.\nexport const WORKFLOW_TEMPLATE_CATEGORIES: readonly string[] = [\n \"Everyone\",\n \"Engineering\",\n \"Product\",\n \"Data\",\n \"Marketing\",\n \"Sales\",\n \"Support\",\n \"CEO\",\n \"Operations\",\n];\n\n// Built-in workflow templates. Each entry compiles into promptGuidance that\n// instructs the agent to build a workflow (via the workflow-setup skill) rather\n// than run a one-shot prompt. This set merges the curated gallery (#20409) with\n// the persona-bucketed catalog derived from the onboarding cards.\nfunction defineWorkflowTemplate(args: {\n readonly id: WorkflowTemplateItem[\"id\"];\n readonly category: string;\n readonly title: string;\n readonly description: string;\n readonly connectorSlugs: readonly ConnectorSlug[];\n readonly behavior: readonly string[];\n readonly missingInfo: string;\n}): WorkflowTemplateItem {\n return {\n id: args.id,\n title: args.title,\n description: args.description,\n category: args.category,\n connectorSlugs: args.connectorSlugs,\n promptGuidance: [\n \"# Workflow Template Context\",\n \"\",\n `The user selected the built-in workflow template: ${args.title} (${args.id}).`,\n \"Use the workflow-setup skill to help the user create or remix a workflow for this agent.\",\n \"Do not execute an existing workflow. This template is only context for creating or updating a workflow.\",\n \"Save the reusable workflow draft as soon as the template behavior is clear. Do not wait for connector setup or automation details.\",\n \"Keep the draft without an automation until the user confirms any missing trigger and safety choices.\",\n \"\",\n \"Template behavior:\",\n ...args.behavior.map((line) => {\n return `- ${line}`;\n }),\n \"\",\n args.missingInfo,\n ].join(\"\\n\"),\n };\n}\n\nexport const WORKFLOW_TEMPLATE_ITEMS: readonly WorkflowTemplateItem[] = [\n defineWorkflowTemplate({\n id: \"workflow-template:auto-inbox-label\",\n category: \"Everyone\",\n title: \"Auto-inbox label\",\n description:\n \"Create a workflow that runs when a Gmail label is applied and handles the labeled inbox item.\",\n connectorSlugs: [\"gmail\"],\n behavior: [\n \"Create a workflow that reacts when a named Gmail label is applied to a message.\",\n \"Treat the labeled message as the inbox item to process.\",\n \"Inspect the message context, decide the requested handling path, and prepare the appropriate follow-up.\",\n \"Add a Gmail label-applied automation for the workflow once the user confirms the label name.\",\n ],\n missingInfo:\n \"Connectors: gmail required.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Gmail label name, handling rules, and final action.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:daily-standup-report\",\n category: \"Engineering\",\n title: \"Daily standup report\",\n description:\n \"Pull product and engineering signals each morning, create a short report, and post it to Slack.\",\n connectorSlugs: [\"github\", \"sentry\", \"axiom\", \"plausible\", \"slack\"],\n behavior: [\n \"Create a scheduled workflow that runs every weekday or every morning.\",\n \"Pull recent GitHub activity, Sentry issues, Axiom metrics, and Plausible traffic signals.\",\n \"Summarize changes, incidents, usage movement, blockers, and notable risks.\",\n \"Post the final standup report to a Slack channel selected by the user.\",\n ],\n missingInfo:\n \"Connectors: github, slack required; sentry, axiom, plausible optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the schedule, timezone, Slack channel, metric scope, and any required report sections.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:github-pr-summarizer\",\n category: \"Engineering\",\n title: \"GitHub PR summarizer\",\n description:\n \"Collect merged pull requests, save a structured report in Notion, and optionally post to Slack.\",\n connectorSlugs: [\"github\", \"notion\", \"slack\"],\n behavior: [\n \"Create a daily or weekly scheduled workflow for one or more GitHub repositories.\",\n \"Find merged pull requests in the selected time window and group them by product or code area.\",\n \"Write a concise user-impact summary with links to the relevant pull requests.\",\n \"Save the report in Notion and optionally post a shorter version to Slack.\",\n ],\n missingInfo:\n \"Connectors: github, notion required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the repositories, cadence, timezone, Notion destination, Slack destination, and grouping rules.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:sentry-issue-digest\",\n category: \"Engineering\",\n title: \"Sentry issue digest\",\n description:\n \"Send a daily digest of critical and high-severity Sentry issues to Slack.\",\n connectorSlugs: [\"sentry\", \"slack\"],\n behavior: [\n \"Create a daily scheduled workflow that checks selected Sentry projects.\",\n \"Group active issues by severity, recency, affected users, and ownership when available.\",\n \"Highlight regressions, repeated failures, and issues needing escalation.\",\n \"Post the digest to a Slack channel with links back to Sentry.\",\n ],\n missingInfo:\n \"Connectors: sentry, slack required.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Sentry projects, severity threshold, schedule, timezone, and Slack channel.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:vercel-deploy-digest\",\n category: \"Engineering\",\n title: \"Vercel deploy digest\",\n description:\n \"Monitor Vercel deployments, link them to GitHub commits, and alert Slack on failures.\",\n connectorSlugs: [\"vercel\", \"github\", \"slack\"],\n behavior: [\n \"Create a workflow that monitors selected Vercel projects on a schedule or via webhook when available.\",\n \"Link deployments to GitHub commits, pull requests, and authors when possible.\",\n \"Summarize recent successful deployments and call out failed or stuck deployments.\",\n \"Send Slack alerts for failures and optionally send a periodic deployment digest.\",\n ],\n missingInfo:\n \"Connectors: vercel, slack required; github optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Vercel projects, GitHub repositories, alert rules, cadence, and Slack channel.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:auto-merge-github-prs\",\n category: \"Engineering\",\n title: \"Auto-merge GitHub PRs\",\n description:\n \"Review PRs labeled ready-to-merge, wait for CI, then merge and post to Slack.\",\n connectorSlugs: [\"github\", \"vercel\", \"slack\"],\n behavior: [\n \"A PR is labeled ready-to-merge\",\n \"Zero reviews and waits on CI\",\n \"Merged and posted to Slack\",\n ],\n missingInfo:\n \"Connectors: github required; vercel, slack optional.\\nSuggested trigger: Add a github-label-applied event trigger on the ready-to-merge label so it runs the moment a PR is labeled.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask for the repository, whether Zero may merge or should only recommend a merge, and the merge method. Ask only one short question at a time. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:file-sentry-crashes-github\",\n category: \"Engineering\",\n title: \"File Sentry crashes as GitHub issues\",\n description:\n \"Rank new Sentry errors by user impact and file the worst as GitHub issues.\",\n connectorSlugs: [\"sentry\", \"github\", \"linear\", \"slack\"],\n behavior: [\n \"Zero pulls new Sentry errors\",\n \"Ranked by user impact\",\n \"Issues filed and owner pinged\",\n ],\n missingInfo:\n \"Connectors: sentry, github required; linear, slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. hourly). Sentry has no native event trigger yet, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:draft-github-release-notes-notion\",\n category: \"Engineering\",\n title: \"Draft GitHub release notes in Notion\",\n description:\n \"Turn the PRs merged since the last release into clean notes in Notion.\",\n connectorSlugs: [\"github\", \"notion\", \"slack\"],\n behavior: [\n \"A PR is labeled shipped\",\n \"Zero gathers merged PRs\",\n \"Release notes saved to Notion\",\n ],\n missingInfo:\n \"Connectors: github, notion required; slack optional.\\nSuggested trigger: Add a github-label-applied event trigger on a release label, or a schedule trigger you run per release.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:feedback-router\",\n category: \"Product\",\n title: \"Feedback router\",\n description:\n \"Watch a Slack channel and route product feedback into Notion with labels and owners.\",\n connectorSlugs: [\"slack\", \"notion\"],\n behavior: [\n \"Create a workflow that reviews messages from a selected Slack feedback channel.\",\n \"Classify feedback into themes, priority, sentiment, and affected product area.\",\n \"Create structured Notion records with links back to the source Slack messages.\",\n \"Optionally tag an owner or add follow-up notes based on the user's routing rules.\",\n ],\n missingInfo:\n \"Connectors: slack, notion required.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Slack channel, Notion database, taxonomy, owner mapping, and run cadence.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:github-idea-to-notion-spec\",\n category: \"Product\",\n title: \"Turn a GitHub idea into a Notion spec\",\n description:\n \"Expand a labeled GitHub issue into a structured product spec in Notion.\",\n connectorSlugs: [\"github\", \"notion\", \"figma\"],\n behavior: [\n \"An issue is labeled needs-spec\",\n \"Zero expands it into a PRD\",\n \"Saved to Notion\",\n ],\n missingInfo:\n \"Connectors: github, notion required; figma optional.\\nSuggested trigger: Add a github-label-applied event trigger on the needs-spec label.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:post-release-notes-slack\",\n category: \"Product\",\n title: \"Post release notes to Slack\",\n description:\n \"Draft a changelog from recently shipped work and post it to Slack.\",\n connectorSlugs: [\"github\", \"slack\", \"notion\"],\n behavior: [\n \"A PR is labeled release\",\n \"Zero drafts the changelog\",\n \"Posted to Slack and Notion\",\n ],\n missingInfo:\n \"Connectors: github, slack required; notion optional.\\nSuggested trigger: Add a github-label-applied event trigger on the release label.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:sync-linear-roadmap-notion\",\n category: \"Product\",\n title: \"Sync the Linear roadmap to Notion\",\n description: \"Keep a Notion roadmap in sync with your Linear issue status.\",\n connectorSlugs: [\"linear\", \"notion\"],\n behavior: [\n \"Zero reads Linear status\",\n \"Mapped to Now / Next / Later\",\n \"Board updated in Notion\",\n ],\n missingInfo:\n \"Connectors: linear, notion required.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Linear has no native event trigger here, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:track-feature-usage-posthog\",\n category: \"Product\",\n title: \"Track feature usage with PostHog\",\n description:\n \"Surface the biggest weekly shifts in feature usage from PostHog.\",\n connectorSlugs: [\"posthog\", \"slack\"],\n behavior: [\n \"Zero reads PostHog\",\n \"Compared week over week\",\n \"Shifts posted to Slack\",\n ],\n missingInfo:\n \"Connectors: posthog required; slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly). PostHog has no native event trigger, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:flag-figma-designs-no-task\",\n category: \"Product\",\n title: \"Flag Figma designs without a task\",\n description: \"Flag Figma designs that have no linked Linear task yet.\",\n connectorSlugs: [\"figma\", \"linear\", \"slack\"],\n behavior: [\n \"Zero scans Figma frames\",\n \"Finds frames without a task\",\n \"Gaps posted to Slack\",\n ],\n missingInfo:\n \"Connectors: figma required; linear, slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Figma has no native event trigger, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:revenuecat-subscription-digest\",\n category: \"Data\",\n title: \"RevenueCat subscription digest\",\n description:\n \"Track subscriptions in Sheets and alert Slack when churn or cancellation patterns change.\",\n connectorSlugs: [\"revenuecat\", \"google-sheets\", \"slack\"],\n behavior: [\n \"Create a daily scheduled workflow that pulls RevenueCat subscription activity.\",\n \"Log new subscriptions, renewals, cancellations, and notable churn signals in Google Sheets.\",\n \"Compare recent movement against the user's alert thresholds.\",\n \"Post a Slack summary and send urgent alerts when churn spikes.\",\n ],\n missingInfo:\n \"Connectors: revenuecat, google-sheets required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the RevenueCat project, schedule, timezone, Sheets destination, Slack channel, and alert thresholds.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:post-daily-metrics-slack\",\n category: \"Data\",\n title: \"Post daily metrics to Slack\",\n description:\n \"Post daily visitors, signups, and activation numbers to Slack.\",\n connectorSlugs: [\"plausible\", \"slack\", \"posthog\", \"clerk\"],\n behavior: [\n \"Zero pulls the metrics\",\n \"Assembled into a KPI snapshot\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: plausible, slack required; posthog, clerk optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:run-daily-query-sheets\",\n category: \"Data\",\n title: \"Run a daily query into Google Sheets\",\n description:\n \"Run your saved SQL on a schedule and append the results to a Sheet.\",\n connectorSlugs: [\"snowflake\", \"google-sheets\", \"slack\"],\n behavior: [\n \"Zero runs the query\",\n \"Results formatted\",\n \"Written to Google Sheets\",\n ],\n missingInfo:\n \"Connectors: snowflake, google-sheets required; slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:check-posthog-signup-funnel\",\n category: \"Data\",\n title: \"Check the PostHog signup funnel\",\n description:\n \"Track the signup funnel and post the biggest drop-off to Slack.\",\n connectorSlugs: [\"posthog\", \"slack\"],\n behavior: [\n \"Zero runs the funnel\",\n \"Biggest drop-off identified\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: posthog required; slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:alert-metric-moves-slack\",\n category: \"Data\",\n title: \"Alert when a metric moves\",\n description:\n \"Watch your key metrics and alert Slack when one moves sharply.\",\n connectorSlugs: [\"plausible\", \"slack\", \"posthog\"],\n behavior: [\n \"Zero checks the metric\",\n \"Compared to normal range\",\n \"Alert posted to Slack\",\n ],\n missingInfo:\n \"Connectors: plausible, slack required; posthog optional.\\nSuggested trigger: Add a schedule trigger on a tight cadence (e.g. hourly) so anomalies surface quickly.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:track-signup-sources-sheets\",\n category: \"Data\",\n title: \"Track signup sources in Google Sheets\",\n description: \"Attribute each new signup to its source in a tracking Sheet.\",\n connectorSlugs: [\"clerk\", \"google-sheets\", \"plausible\"],\n behavior: [\n \"Zero reads new signups\",\n \"Attributed to a channel\",\n \"Logged to Google Sheets\",\n ],\n missingInfo:\n \"Connectors: clerk, google-sheets required; plausible optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Clerk has no native event trigger here, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:build-weekly-deck-gamma\",\n category: \"Data\",\n title: \"Build the weekly deck in Gamma\",\n description:\n \"Turn the week's metrics into a ready-to-present deck in Gamma.\",\n connectorSlugs: [\"google-sheets\", \"gamma\", \"plausible\", \"slack\"],\n behavior: [\n \"Zero gathers the numbers\",\n \"Deck built in Gamma\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: google-sheets, gamma required; plausible, slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:competitive-intel-monitor\",\n category: \"Marketing\",\n title: \"Competitive intel monitor\",\n description:\n \"Monitor competitor sites for pricing and feature changes, save findings to Notion, and alert Slack.\",\n connectorSlugs: [\"firecrawl\", \"notion\", \"slack\"],\n behavior: [\n \"Create a weekly or daily scheduled workflow for a list of competitor pages.\",\n \"Use Firecrawl to detect meaningful pricing, packaging, messaging, and feature changes.\",\n \"Save structured findings with source links and change summaries in Notion.\",\n \"Post Slack alerts for important changes that need review.\",\n ],\n missingInfo:\n \"Connectors: firecrawl, notion required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among competitor URLs, cadence, timezone, Notion destination, Slack channel, and alert criteria.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:x-brand-monitor\",\n category: \"Marketing\",\n title: \"X brand monitor\",\n description:\n \"Track brand mentions on X, save relevant posts in Notion, and alert Slack on high-signal mentions.\",\n connectorSlugs: [\"x\", \"notion\", \"slack\"],\n behavior: [\n \"Create a scheduled workflow that searches X for product, company, or keyword mentions.\",\n \"Filter posts for relevance, engagement, sentiment, and response urgency.\",\n \"Save notable mentions to a Notion database with source links and suggested follow-up.\",\n \"Send Slack alerts for high-engagement, urgent, or reputationally sensitive posts.\",\n ],\n missingInfo:\n \"Connectors: x, notion required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the keywords or accounts, cadence, Notion database, Slack channel, and alert thresholds.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:track-keyword-ranks-ahrefs\",\n category: \"Marketing\",\n title: \"Track keyword ranks with Ahrefs\",\n description:\n \"Track keyword rankings in Ahrefs and report the movers in Notion.\",\n connectorSlugs: [\"ahrefs\", \"similarweb\", \"notion\"],\n behavior: [\n \"Zero reads keyword positions\",\n \"Movers identified\",\n \"Reported in Notion\",\n ],\n missingInfo:\n \"Connectors: ahrefs required; similarweb, notion optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:publish-scheduled-posts-buffer\",\n category: \"Marketing\",\n title: \"Publish scheduled posts to Buffer\",\n description:\n \"Publish the day's scheduled content and queue the social posts.\",\n connectorSlugs: [\"notion\", \"strapi\", \"buffer\"],\n behavior: [\n \"Zero reads today's calendar\",\n \"Published to the CMS\",\n \"Social queued in Buffer\",\n ],\n missingInfo:\n \"Connectors: notion, strapi required; buffer optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning) to publish the day's scheduled content.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:blog-posts-to-x\",\n category: \"Marketing\",\n title: \"Turn blog posts into social posts\",\n description:\n \"Turn each new blog post into social variants queued via Buffer.\",\n connectorSlugs: [\"strapi\", \"buffer\", \"x\"],\n behavior: [\n \"Zero finds new posts\",\n \"Cut into social variants\",\n \"Queued in Buffer\",\n ],\n missingInfo:\n \"Connectors: strapi, buffer required; x optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Publishing has no native event trigger, so poll for newly published posts.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:draft-newsletter-mailchimp\",\n category: \"Marketing\",\n title: \"Draft the newsletter in Mailchimp\",\n description:\n \"Assemble recent updates into a newsletter draft in Mailchimp.\",\n connectorSlugs: [\"github\", \"mailchimp\"],\n behavior: [\n \"Zero gathers what shipped\",\n \"Newsletter drafted\",\n \"Staged in Mailchimp\",\n ],\n missingInfo:\n \"Connectors: github, mailchimp required.\\nSuggested trigger: Add a schedule trigger (e.g. monthly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:compare-google-ads-last-month\",\n category: \"Marketing\",\n title: \"Compare Google Ads vs last month\",\n description:\n \"Compare ad spend and ROAS to last month and flag anomalies in Slack.\",\n connectorSlugs: [\"google-ads\", \"slack\", \"meta-ads\"],\n behavior: [\n \"Zero reads ad performance\",\n \"Compared to prior period\",\n \"Anomalies flagged in Slack\",\n ],\n missingInfo:\n \"Connectors: google-ads, slack required; meta-ads optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:salesforce-pipeline-digest\",\n category: \"Sales\",\n title: \"Salesforce pipeline digest\",\n description:\n \"Summarize Salesforce opportunity changes and close-date risks in Slack each week.\",\n connectorSlugs: [\"salesforce\", \"slack\"],\n behavior: [\n \"Create a weekly scheduled workflow that reviews selected Salesforce opportunities.\",\n \"Summarize new opportunities, stage changes, close-date movement, and blocked deals.\",\n \"Highlight risks, stale opportunities, and follow-ups due soon.\",\n \"Post the pipeline digest to a Slack channel.\",\n ],\n missingInfo:\n \"Connectors: salesforce, slack required.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Salesforce object scope, cadence, timezone, Slack channel, and pipeline rules.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:catch-leads-gmail\",\n category: \"Sales\",\n title: \"Catch leads from Gmail\",\n description:\n \"Spot buying signals in new email and log the qualified leads.\",\n connectorSlugs: [\"gmail\", \"apollo\", \"google-sheets\", \"slack\"],\n behavior: [\n \"Zero scans new mail\",\n \"Lead enriched and logged\",\n \"Next step suggested\",\n ],\n missingInfo:\n \"Connectors: gmail required; apollo, google-sheets, slack optional.\\nSuggested trigger: Add a gmail-new-message event trigger so it runs on each new incoming email.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:new-gmail-contacts-hubspot\",\n category: \"Sales\",\n title: \"Add new Gmail contacts to HubSpot\",\n description: \"Add and enrich unknown email senders as HubSpot contacts.\",\n connectorSlugs: [\"gmail\", \"hubspot\", \"apollo\"],\n behavior: [\n \"Zero spots an unknown sender\",\n \"Contact created and enriched\",\n \"Logged for follow-up\",\n ],\n missingInfo:\n \"Connectors: gmail, hubspot required; apollo optional.\\nSuggested trigger: Add a gmail-new-message event trigger so it runs on each new incoming email.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:research-new-signups-apollo\",\n category: \"Sales\",\n title: \"Research new signups\",\n description: \"Research each new signup and post a quick snapshot.\",\n connectorSlugs: [\"clerk\", \"slack\", \"apollo\"],\n behavior: [\n \"Zero reads new signups\",\n \"Researched with Apollo\",\n \"Snapshot posted to Slack\",\n ],\n missingInfo:\n \"Connectors: clerk, slack required; apollo optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Clerk signups have no native event trigger, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:gmail-followups-auto\",\n category: \"Sales\",\n title: \"Send Gmail follow-ups automatically\",\n description: \"Find contacts who didn't reply and draft the next follow-up.\",\n connectorSlugs: [\"instantly\", \"gmail\", \"apollo\"],\n behavior: [\n \"Zero checks sequence status\",\n \"Next touch drafted\",\n \"Ready in Gmail\",\n ],\n missingInfo:\n \"Connectors: instantly, gmail required; apollo optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning). Instantly has no native event trigger, so poll for non-repliers.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:prep-google-calendar-meetings\",\n category: \"Sales\",\n title: \"Prep for Google Calendar meetings\",\n description:\n \"Research external attendees and send a prep brief before meetings.\",\n connectorSlugs: [\"google-calendar\", \"apollo\", \"gong\", \"slack\"],\n behavior: [\n \"A meeting is added\",\n \"Attendee researched\",\n \"Prep brief sent to Slack\",\n ],\n missingInfo:\n \"Connectors: google-calendar required; apollo, gong, slack optional.\\nSuggested trigger: Add a google-calendar-event-created event trigger, or a morning schedule that scans the day's meetings.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:log-gong-calls-hubspot\",\n category: \"Sales\",\n title: \"Log Gong calls to HubSpot\",\n description:\n \"Pull notes and next steps from a Gong call into the HubSpot deal.\",\n connectorSlugs: [\"gong\", \"hubspot\", \"slack\"],\n behavior: [\n \"Zero reads the transcript\",\n \"Summary and next steps drafted\",\n \"Logged to HubSpot\",\n ],\n missingInfo:\n \"Connectors: gong, hubspot required; slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Gong has no native event trigger, so poll for new call transcripts.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:support-ticket-router\",\n category: \"Support\",\n title: \"Support ticket router\",\n description:\n \"Classify support emails, create Notion records, and alert Slack for critical tickets.\",\n connectorSlugs: [\"gmail\", \"notion\", \"slack\"],\n behavior: [\n \"Create a workflow that runs from a Gmail trigger or scheduled inbox scan.\",\n \"Classify support messages by category, priority, customer, and requested action.\",\n \"Create or update structured Notion records for each qualifying ticket.\",\n \"Alert Slack when a ticket is urgent, blocked, or needs human follow-up.\",\n ],\n missingInfo:\n \"Connectors: gmail, notion required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the inbox or label, triage rules, Notion database, Slack channel, and escalation criteria.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:zendesk-knowledge-base\",\n category: \"Support\",\n title: \"Zendesk knowledge base\",\n description:\n \"Find recurring Zendesk questions, draft FAQ entries, and save them to Notion.\",\n connectorSlugs: [\"zendesk\", \"notion\", \"slack\"],\n behavior: [\n \"Create a scheduled workflow that reviews recent Zendesk conversations or tickets.\",\n \"Cluster recurring questions, gaps, and confusing product areas.\",\n \"Draft FAQ or knowledge-base entries in Notion with source ticket examples.\",\n \"Post a Slack summary when new FAQ drafts are ready for review.\",\n ],\n missingInfo:\n \"Connectors: zendesk, notion required; slack optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the Zendesk scope, cadence, Notion destination, Slack channel, and publishing/review rules.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:draft-replies-notion-faq\",\n category: \"Support\",\n title: \"Draft replies from your Notion FAQ\",\n description: \"Draft ticket replies grounded in your Notion FAQ.\",\n connectorSlugs: [\"intercom\", \"notion\", \"gmail\"],\n behavior: [\n \"A question arrives\",\n \"Zero checks the Notion FAQ\",\n \"Reply drafted for review\",\n ],\n missingInfo:\n \"Connectors: intercom, notion required; gmail optional.\\nSuggested trigger: Add a schedule trigger on a tight cadence (e.g. every 15 minutes), or a webhook-received trigger if Intercom can post to a webhook.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:send-bugs-github-slack\",\n category: \"Support\",\n title: \"Send bugs to GitHub and Slack\",\n description:\n \"File bug-tagged reports as GitHub issues and alert the team on Slack.\",\n connectorSlugs: [\"github\", \"slack\", \"linear\"],\n behavior: [\n \"An issue is labeled bug\",\n \"Repro and impact packaged\",\n \"Sent to engineering\",\n ],\n missingInfo:\n \"Connectors: github, slack required; linear optional.\\nSuggested trigger: Add a github-label-applied event trigger on the bug label.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:spot-churn-risk-stripe-zendesk\",\n category: \"Support\",\n title: \"Spot churn risk in Stripe and Zendesk\",\n description: \"Flag accounts at risk of churn and draft a recovery email.\",\n connectorSlugs: [\"clerk\", \"stripe\", \"zendesk\", \"resend\", \"slack\"],\n behavior: [\n \"Zero scans accounts\",\n \"At-risk accounts flagged\",\n \"Recovery email drafted\",\n ],\n missingInfo:\n \"Connectors: clerk, stripe required; zendesk, resend, slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Stripe and Zendesk have no native event trigger here, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:summarize-zendesk-tickets-daily\",\n category: \"Support\",\n title: \"Summarize Zendesk tickets daily\",\n description:\n \"Summarize the last day of Zendesk tickets and post it to Slack.\",\n connectorSlugs: [\"zendesk\", \"slack\"],\n behavior: [\n \"Zero reads the queue\",\n \"Grouped by severity and age\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: zendesk, slack required.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:daily-company-brief-slack\",\n category: \"CEO\",\n title: \"Post a daily company brief to Slack\",\n description:\n \"Pull product, growth, and revenue into a daily brief on Slack.\",\n connectorSlugs: [\n \"plausible\",\n \"slack\",\n \"clerk\",\n \"stripe\",\n \"github\",\n \"sentry\",\n ],\n behavior: [\n \"Zero gathers the signals\",\n \"Assembled into a pulse\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: plausible, slack required; clerk, stripe, github, sentry optional.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:daily-industry-news-slack\",\n category: \"CEO\",\n title: \"Post daily industry news to Slack\",\n description:\n \"Round up the day's relevant industry news into a Slack brief.\",\n connectorSlugs: [\"exa\", \"slack\"],\n behavior: [\n \"Zero scans the news\",\n \"Distilled into a brief\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: exa, slack required.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:business-review-gamma\",\n category: \"CEO\",\n title: \"Build the business review in Gamma\",\n description:\n \"Turn the month's metrics into a business review deck in Gamma.\",\n connectorSlugs: [\"stripe\", \"gamma\", \"clerk\"],\n behavior: [\n \"Zero pulls the numbers\",\n \"Deck built in Gamma\",\n \"Ready to present\",\n ],\n missingInfo:\n \"Connectors: stripe, gamma required; clerk optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:highlight-key-emails-gmail\",\n category: \"CEO\",\n title: \"Highlight key emails in Gmail\",\n description: \"Surface the few emails that actually need your attention.\",\n connectorSlugs: [\"gmail\", \"slack\"],\n behavior: [\n \"Zero reads the inbox\",\n \"Priorities identified\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: gmail, slack required.\\nSuggested trigger: Add a gmail-new-message event trigger, or a schedule trigger that runs a few times a day.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:investor-update-google-docs\",\n category: \"CEO\",\n title: \"Draft the investor update in Google Docs\",\n description:\n \"Assemble metrics and highlights into an investor update in Docs.\",\n connectorSlugs: [\"stripe\", \"google-docs\", \"google-sheets\"],\n behavior: [\n \"Zero gathers KPIs\",\n \"Update drafted\",\n \"Editable in Google Docs\",\n ],\n missingInfo:\n \"Connectors: stripe, google-docs required; google-sheets optional.\\nSuggested trigger: Add a schedule trigger (e.g. monthly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:gmail-reconnect-reminders\",\n category: \"CEO\",\n title: \"Get Gmail reconnect reminders\",\n description: \"Surface important contacts you haven't emailed in a while.\",\n connectorSlugs: [\"gmail\", \"google-calendar\", \"slack\"],\n behavior: [\n \"Zero reviews your contacts\",\n \"Quiet relationships surfaced\",\n \"Openers suggested\",\n ],\n missingInfo:\n \"Connectors: gmail required; google-calendar, slack optional.\\nSuggested trigger: Add a schedule trigger (e.g. weekly).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:clickup-slack-standup\",\n category: \"Operations\",\n title: \"ClickUp Slack standup\",\n description:\n \"Pull ClickUp tasks each morning and post a team standup summary to Slack.\",\n connectorSlugs: [\"clickup\", \"slack\"],\n behavior: [\n \"Create a daily scheduled workflow that reads selected ClickUp spaces, folders, lists, or assignees.\",\n \"Summarize active tasks, completed work, blockers, and overdue items by person or team.\",\n \"Keep the report compact enough for daily Slack consumption.\",\n \"Post the standup summary to the selected Slack channel.\",\n ],\n missingInfo:\n \"Connectors: clickup, slack required.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the ClickUp scope, schedule, timezone, grouping preference, and Slack channel.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:sync-asana-projects-notion\",\n category: \"Operations\",\n title: \"Sync Asana projects to Notion\",\n description: \"Roll up Asana project status into a single board in Notion.\",\n connectorSlugs: [\"asana\", \"notion\"],\n behavior: [\"Zero reads Asana\", \"Rolled into one board\", \"Digest posted\"],\n missingInfo:\n \"Connectors: asana, notion required.\\nSuggested trigger: Add a schedule trigger (e.g. every morning). Asana has no native event trigger, so poll on a cadence.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:meeting-notes-asana-tasks\",\n category: \"Operations\",\n title: \"Turn meeting notes into Asana tasks\",\n description: \"Turn meeting notes into assigned, due-dated tasks in Asana.\",\n connectorSlugs: [\"fireflies\", \"asana\"],\n behavior: [\n \"Zero reads the transcript\",\n \"Action items extracted\",\n \"Tasks created in Asana\",\n ],\n missingInfo:\n \"Connectors: fireflies, asana required.\\nSuggested trigger: Add a google-meet-transcript-generated event trigger if you meet on Google Meet; otherwise a schedule trigger, since Fireflies has no native event trigger.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:file-gmail-invoices-drive\",\n category: \"Operations\",\n title: \"File Gmail invoices to Google Drive\",\n description: \"File invoice emails to Drive and log each one in a Sheet.\",\n connectorSlugs: [\"gmail\", \"google-drive\", \"google-sheets\"],\n behavior: [\n \"An invoice is labeled\",\n \"Filed to Google Drive\",\n \"Logged in a sheet\",\n ],\n missingInfo:\n \"Connectors: gmail, google-drive required; google-sheets optional.\\nSuggested trigger: Add a gmail-label-applied event trigger on the label you use for invoices.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:onboard-new-hires-asana\",\n category: \"Operations\",\n title: \"Onboard new hires in Asana\",\n description:\n \"Create the onboarding task checklist for each new hire in Asana.\",\n connectorSlugs: [\"deel\", \"asana\", \"google-drive\"],\n behavior: [\n \"A new hire is added\",\n \"Checklist created in Asana\",\n \"Docs provisioned\",\n ],\n missingInfo:\n \"Connectors: deel, asana required; google-drive optional.\\nSuggested trigger: Add a schedule trigger (e.g. daily). Deel has no native event trigger, so poll for new hires.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:chase-overdue-asana-tasks\",\n category: \"Operations\",\n title: \"Chase overdue Asana tasks\",\n description: \"Find overdue Asana tasks and nudge their owners on Slack.\",\n connectorSlugs: [\"asana\", \"slack\"],\n behavior: [\"Zero scans Asana\", \"Owners identified\", \"Nudges sent in Slack\"],\n missingInfo:\n \"Connectors: asana, slack required.\\nSuggested trigger: Add a schedule trigger (e.g. every morning).\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:catch-calendar-conflicts\",\n category: \"Operations\",\n title: \"Catch Google Calendar conflicts\",\n description: \"Scan your calendar for double-bookings and alert you early.\",\n connectorSlugs: [\"google-calendar\", \"cal-com\", \"slack\"],\n behavior: [\n \"An event is created\",\n \"Checked for conflicts\",\n \"Conflict flagged in Slack\",\n ],\n missingInfo:\n \"Connectors: google-calendar required; cal-com, slack optional.\\nSuggested trigger: Add a google-calendar-event-created event trigger, or a morning schedule that scans the day for conflicts.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:personal-weekly-digest\",\n category: \"Everyone\",\n title: \"Personal weekly digest\",\n description:\n \"Summarize GitHub, Gmail, and Calendar activity into one weekly Slack update.\",\n connectorSlugs: [\"github\", \"gmail\", \"google-calendar\", \"slack\"],\n behavior: [\n \"Create a weekly scheduled workflow for the selected owner.\",\n \"Collect recent pull requests, important inbox threads, and upcoming or completed calendar events.\",\n \"Group the digest into accomplishments, pending decisions, follow-ups, and upcoming commitments.\",\n \"Send the digest to the user's chosen Slack destination.\",\n ],\n missingInfo:\n \"Connectors: slack required; github, gmail, google-calendar optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the day/time, timezone, GitHub scope, Gmail filters, calendar scope, and Slack destination.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:morning-brief\",\n category: \"Everyone\",\n title: \"Morning brief\",\n description:\n \"Turn Gmail, Calendar, and Notion updates into a short daily plan in Slack.\",\n connectorSlugs: [\"gmail\", \"google-calendar\", \"notion\", \"slack\"],\n behavior: [\n \"Create a daily scheduled workflow that prepares a morning planning brief.\",\n \"Review important email, calendar events, and relevant Notion updates.\",\n \"Prioritize the day into meetings, decisions, follow-ups, and focus blocks.\",\n \"Post the brief to Slack or another destination the user chooses.\",\n ],\n missingInfo:\n \"Connectors: gmail, google-calendar, slack required; notion optional.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask only for the next missing detail among the schedule, timezone, Slack destination, Gmail scope, calendar scope, and Notion sources.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:sort-gmail-draft-replies\",\n category: \"Everyone\",\n title: \"Sort Gmail and draft replies\",\n description:\n \"Sort your inbox and draft replies to the emails that need them.\",\n connectorSlugs: [\"gmail\"],\n behavior: [\"Zero reads new mail\", \"Sorted by urgency\", \"Replies drafted\"],\n missingInfo:\n \"Connectors: gmail required.\\nSuggested trigger: Add a gmail-new-message event trigger so it runs on each new incoming email.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:research-calendar-meetings\",\n category: \"Everyone\",\n title: \"Research your calendar meetings\",\n description:\n \"Research the people you're meeting before each calendar event.\",\n connectorSlugs: [\"google-calendar\", \"exa\", \"slack\"],\n behavior: [\n \"A meeting is added\",\n \"Attendees researched\",\n \"Dossier delivered\",\n ],\n missingInfo:\n \"Connectors: google-calendar required; exa, slack optional.\\nSuggested trigger: Add a google-calendar-event-created event trigger, or a morning schedule that scans the day's meetings.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:summarize-gmail-newsletters\",\n category: \"Everyone\",\n title: \"Summarize Gmail newsletters\",\n description: \"Digest the newsletters in your inbox into one short summary.\",\n connectorSlugs: [\"gmail\", \"slack\"],\n behavior: [\n \"Zero collects newsletters\",\n \"Digested into one summary\",\n \"Posted to Slack\",\n ],\n missingInfo:\n \"Connectors: gmail, slack required.\\nSuggested trigger: Add a schedule trigger (e.g. weekly) to digest the newsletters, or a gmail-label-applied trigger on your newsletter label.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:meeting-recaps-slack\",\n category: \"Everyone\",\n title: \"Get meeting recaps in Slack\",\n description:\n \"Share a recap with decisions and action items after each meeting.\",\n connectorSlugs: [\"fireflies\", \"gmail\", \"slack\"],\n behavior: [\"Zero reads the transcript\", \"Recap written\", \"Sent to you\"],\n missingInfo:\n \"Connectors: fireflies required; gmail, slack optional.\\nSuggested trigger: Add a google-meet-transcript-generated event trigger if you meet on Google Meet; otherwise a schedule trigger, since Fireflies has no native event trigger.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n defineWorkflowTemplate({\n id: \"workflow-template:flagged-gmail-todoist-tasks\",\n category: \"Everyone\",\n title: \"Turn flagged Gmail into Todoist tasks\",\n description: \"Turn the emails you flag into Todoist tasks automatically.\",\n connectorSlugs: [\"gmail\", \"todoist\"],\n behavior: [\n \"You flag an email\",\n \"Zero researches it\",\n \"Task filed in Todoist\",\n ],\n missingInfo:\n \"Connectors: gmail, todoist required.\\nSuggested trigger: Add a gmail-label-applied event trigger on the label you apply to flag an email.\\n\\nCreate the workflow draft first. Before adding or enabling its automation, ask one short question for the next missing trigger or safety detail. Do not inspect connector setup until the workflow or trigger command reports that it is required.\",\n }),\n];\n\nexport function findWorkflowTemplateItem(\n id: string,\n): WorkflowTemplateItem | undefined {\n return WORKFLOW_TEMPLATE_ITEMS.find((item) => {\n return item.id === id;\n });\n}\n","const R2_IMAGE_TRANSFORM_HOSTS = new Set([\n \"cdn.vm0.io\",\n \"cdn.vm7.io\",\n \"static.vm0.io\",\n]);\nconst R2_IMAGE_TRANSFORM_PREFIX = \"/cdn-cgi/image/\";\n\n// Output quality for Cloudflare Image Resizing. Tuned to stay crisp on\n// text-heavy presentation thumbnails while still shrinking payloads.\nconst R2_IMAGE_TRANSFORM_QUALITY = 85;\n\nexport interface R2ImageTransformOptions {\n readonly width?: number;\n readonly height?: number;\n readonly fit?: \"cover\" | \"scale-down\";\n readonly quality?: number;\n}\n\nfunction normalizedDimension(value: number | undefined): number | null {\n if (value === undefined || !Number.isFinite(value) || value <= 0) {\n return null;\n }\n return Math.round(value);\n}\n\nfunction normalizedQuality(value: number | undefined): number {\n if (value === undefined || !Number.isFinite(value)) {\n return R2_IMAGE_TRANSFORM_QUALITY;\n }\n return Math.max(1, Math.min(100, Math.round(value)));\n}\n\nfunction r2ImageTransformDirectives(options: R2ImageTransformOptions): string {\n const directives: string[] = [];\n const width = normalizedDimension(options.width);\n const height = normalizedDimension(options.height);\n const quality = normalizedQuality(options.quality);\n\n if (width !== null) {\n directives.push(`width=${String(width)}`);\n }\n if (height !== null) {\n directives.push(`height=${String(height)}`);\n }\n directives.push(`fit=${options.fit ?? \"scale-down\"}`);\n // Negotiate AVIF/WebP from the request Accept header, cap quality, and drop\n // metadata so previews download as little as possible.\n directives.push(\"format=auto\");\n directives.push(`quality=${String(quality)}`);\n directives.push(\"metadata=none\");\n\n return directives.join(\",\");\n}\n\nfunction parseAbsoluteUrl(url: string): URL | null {\n try {\n return new URL(url);\n } catch {\n return null;\n }\n}\n\nexport function r2ImageTransformUrl(\n url: string,\n options: R2ImageTransformOptions,\n): string {\n const parsed = parseAbsoluteUrl(url);\n if (parsed === null) {\n return url;\n }\n\n if (\n !R2_IMAGE_TRANSFORM_HOSTS.has(parsed.hostname) ||\n parsed.pathname.startsWith(R2_IMAGE_TRANSFORM_PREFIX)\n ) {\n return url;\n }\n\n const directives = r2ImageTransformDirectives(options);\n return `${parsed.origin}${R2_IMAGE_TRANSFORM_PREFIX}${directives}${parsed.pathname}${parsed.search}${parsed.hash}`;\n}\n","export * from \"@vm0/api-contracts/contracts\";\n","/**\n * API Contracts\n *\n * This module exports type-safe REST contracts backed by tRPC procedure\n * typing.\n */\nexport { initContract } from \"./base\";\nexport {\n buildCommitShaSchema,\n buildInfoContract,\n buildInfoResponseSchema,\n type BuildInfoContract,\n type BuildInfoResponse,\n type BuildInfoRouteResponse,\n} from \"./build-info\";\nexport {\n healthAuthContract,\n healthContract,\n healthResponseSchema,\n type HealthAuthContract,\n type HealthAuthRouteResponse,\n type HealthContract,\n type HealthResponse,\n type HealthRouteResponse,\n} from \"./health\";\nexport {\n CHAT_EVENT_TYPES,\n chatEventCompatibilityRole,\n chatEventTypeSchema,\n foldActiveChatGoalObjective,\n foldPendingChatQueueEvents,\n foldRunnableChatQueueEvents,\n foldChatRunStates,\n foldLatestChatUsageByRunId,\n isChatInputEventType,\n isChatOutputEventType,\n isPendingChatQueueEvent,\n isChatRunTerminalEventType,\n isValidChatEventRevocation,\n revokedChatEventIds,\n terminatedChatRunIds,\n type ChatEventCompatibilityRole,\n type ChatEventRunLifecycle,\n type ChatQueueFoldInput,\n type ChatEventType,\n type ChatRunFoldState,\n} from \"./chat-events\";\nexport {\n ACTIONABLE_RUN_ERROR_SNIPPETS,\n apiErrorSchema,\n ApiError,\n CHAT_RUN_TRANSIENT_ERROR_MESSAGE,\n createErrorResponse,\n formatRunErrorForExternalSurface,\n isActionableRunError,\n isGenericRunErrorForDisplay,\n RUN_ERROR_GUIDANCE,\n type ApiErrorKey,\n type ApiErrorResponse,\n} from \"./errors\";\nexport {\n desktopAuthConsumeContract,\n desktopAuthHandoffContract,\n type DesktopAuthConsumeContract,\n type DesktopAuthHandoffContract,\n} from \"./desktop-auth\";\nexport {\n AGENT_NAME_REGEX,\n agentNameSchema,\n volumeConfigSchema,\n artifactConfigSchema,\n artifactsArraySchema,\n MOUNT_PATH_TEMPLATE,\n expandMountPath,\n agentDefinitionSchema,\n agentComposeContentSchema,\n agentComposeApiContentSchema,\n composeResponseSchema,\n createComposeResponseSchema,\n composeListItemSchema,\n ZERO_CAPABILITIES,\n ZERO_CAPABILITY_META,\n type ZeroCapability,\n type ZeroCapabilityMeta,\n // Inferred types\n type ComposeResponse,\n type ComposeListItem,\n type ArtifactConfig,\n} from \"./composes\";\nexport {\n testAgentComposesContract,\n type TestAgentComposesContract,\n} from \"./test-agent-composes\";\nexport {\n ALL_RUN_STATUSES,\n runStatusSchema,\n unifiedRunRequestSchema,\n createRunResponseSchema,\n getRunResponseSchema,\n runListItemSchema,\n runsListResponseSchema,\n cancelRunResponseSchema,\n runEventSchema,\n runResultSchema,\n runStateSchema,\n telemetryMetricSchema,\n systemLogResponseSchema,\n metricsResponseSchema,\n agentEventsResponseSchema,\n networkLogEntrySchema,\n networkLogsResponseSchema,\n searchResultSchema,\n logsSearchResponseSchema,\n // Inferred types\n type RunStatus,\n type RunResult,\n type RunState,\n type RunEvent,\n type CreateRunResponse,\n type GetRunResponse,\n type RunListItem,\n type RunsListResponse,\n type CancelRunResponse,\n type TelemetryMetric,\n type SystemLogResponse,\n type MetricsResponse,\n type AgentEventsResponse,\n type NetworkLogEntry,\n type AxiomNetworkEvent,\n type NetworkLogsResponse,\n type SearchResult,\n type LogsSearchResponse,\n queueEntrySchema,\n runningTaskSchema,\n concurrencyInfoSchema,\n queueResponseSchema,\n type QueueEntry,\n type RunningTask,\n type ConcurrencyInfo,\n type QueueResponse,\n} from \"./runs\";\nexport {\n testAgentRunsContract,\n type TestAgentRunsContract,\n} from \"./test-agent-runs\";\nexport {\n ZERO_RECOGNITION_MAX_FILE_BYTES,\n ZERO_RECOGNITION_MAX_PROMPT_CHARS,\n ZERO_RECOGNITION_MAX_TEXT_CHARS,\n zeroRecognitionContract,\n zeroRecognitionImageMimeTypeSchema,\n zeroRecognitionRequestSchema,\n zeroRecognitionResponseSchema,\n type ZeroRecognitionContract,\n type ZeroRecognitionImageMimeType,\n type ZeroRecognitionRequest,\n type ZeroRecognitionResponse,\n} from \"./zero-recognition\";\nexport {\n zeroModelPoliciesMainContract,\n type ZeroModelPoliciesMainContract,\n} from \"./zero-model-policies\";\nexport {\n createModelProviderConnectionRequestSchema,\n getModelProviderTypeForSurfaceProtocol,\n modelProviderConnectionResponseSchema,\n modelProviderConnectionsResponseSchema,\n modelProviderSurfaceInputSchema,\n modelProviderSurfaceProtocolSchema,\n modelProviderSurfaceResponseSchema,\n updateModelProviderConnectionRequestSchema,\n zeroModelProviderConnectionsByIdContract,\n zeroModelProviderConnectionsMainContract,\n type CreateModelProviderConnectionRequest,\n type ModelProviderConnectionResponse,\n type ModelProviderSurfaceProtocol,\n type UpdateModelProviderConnectionRequest,\n} from \"./zero-model-provider-gateways\";\nexport {\n userModelPreferenceResponseSchema,\n updateUserModelPreferenceRequestSchema,\n zeroUserModelPreferenceContract,\n type UserModelPreferenceResponse,\n type UpdateUserModelPreferenceRequest,\n type ZeroUserModelPreferenceContract,\n} from \"./zero-user-model-preference\";\nexport {\n MAX_FILE_SIZE_BYTES,\n STORAGE_MANIFEST_MAX_FILES,\n STORAGE_MANIFEST_MAX_PATH_BYTES,\n fileEntryWithHashSchema,\n storageManifestFilesSchema,\n storageChangesSchema,\n presignedUploadSchema,\n} from \"./storages\";\nexport {\n registryResourceDownloadContract,\n type RegistryResourceDownloadContract,\n} from \"./registry-resources\";\nexport {\n presentationImageAssetSchema,\n presentationImageOrientationSchema,\n presentationImageResolveErrorSchema,\n presentationImageResolveItemSchema,\n presentationImageResolveRequestSchema,\n presentationImageResolveResponseSchema,\n presentationImagesContract,\n type PresentationImageAsset,\n type PresentationImageResolveItem,\n type PresentationImageResolveRequest,\n type PresentationImageResolveResponse,\n type PresentationImagesContract,\n} from \"./presentation-images\";\nexport {\n testTeamsDispatchProbeBodySchema,\n testTeamsDispatchProbeContract,\n testTeamsDispatchProbeErrorSchema,\n testTeamsDispatchProbeFailureResponseSchema,\n testTeamsDispatchProbeResponseSchema,\n testTeamsDispatchProbeSuccessResponseSchema,\n type TestTeamsDispatchProbeBody,\n type TestTeamsDispatchProbeContract,\n type TestTeamsDispatchProbeResponse,\n} from \"./test-teams-dispatch-probe\";\nexport { zeroEmailInboundContract } from \"./zero-email\";\nexport {\n sandboxReuseResultSchema,\n webhookClerkContract,\n webhookEventsContract,\n webhookFirewallAuthContract,\n webhookGithubContract,\n webhookGmailContract,\n webhookGoogleCalendarContract,\n webhookGoogleWorkspaceEventsContract,\n webhookWorkflowAutomationContract,\n webhookStripeContract,\n webhookBuiltInGenerationFalContract,\n webhookBuiltInGenerationBytePlusContract,\n webhookBuiltInGenerationJoggAiContract,\n webhookCompleteContract,\n webhookCheckpointsContract,\n webhookCheckpointsPrepareHistoryContract,\n webhookHeartbeatContract,\n webhookTelemetryContract,\n // Direct upload contracts (Webhook endpoints for sandbox)\n webhookStoragesPrepareContract,\n webhookStoragesCommitContract,\n type SandboxReuseResult,\n type WebhookWorkflowAutomationContract,\n type WebhookEventsContract,\n type WebhookFirewallAuthContract,\n type WebhookCompleteContract,\n type WebhookCheckpointsContract,\n type WebhookCheckpointsPrepareHistoryContract,\n type WebhookHeartbeatContract,\n type WebhookTelemetryContract,\n type WebhookStoragesPrepareContract,\n type WebhookStoragesCommitContract,\n webhookModelUsageObservationContract,\n webhookUsageEventContract,\n type WebhookClerkContract,\n type WebhookUsageEventContract,\n type WebhookGithubContract,\n type WebhookGmailContract,\n type WebhookGoogleCalendarContract,\n type WebhookGoogleWorkspaceEventsContract,\n type WebhookStripeContract,\n type WebhookBuiltInGenerationFalContract,\n type WebhookBuiltInGenerationJoggAiContract,\n} from \"./webhooks\";\nexport {\n cliAuthDeviceContract,\n cliAuthTokenContract,\n cliAuthApproveContract,\n type CliAuthDeviceContract,\n type CliAuthTokenContract,\n type CliAuthApproveContract,\n} from \"./cli-auth\";\nexport { authContract, type AuthContract } from \"./auth\";\nexport {\n userExportContract,\n type UserExportContract,\n type UserExportJob,\n type UserExportStatusResponse,\n} from \"./user-export\";\nexport {\n emailUnsubscribeContract,\n emailUnsubscribeErrorSchema,\n emailUnsubscribeQuerySchema,\n emailUnsubscribeResponseSchema,\n type EmailUnsubscribeContract,\n type EmailUnsubscribeError,\n type EmailUnsubscribeQuery,\n type EmailUnsubscribeResponse,\n} from \"./email-unsubscribe\";\nexport {\n zeroMorningBriefContract,\n type ZeroMorningBriefContract,\n} from \"./zero-morning-brief\";\nexport {\n emailMorningBriefUnsubscribeContract,\n type EmailMorningBriefUnsubscribeContract,\n} from \"./email-morning-brief-unsubscribe\";\nexport {\n connectorsSlugCallbackContract,\n type ConnectorsSlugCallbackContract,\n} from \"./connectors-slug-callback\";\nexport {\n testOAuthProviderAuthorizeContract,\n testOAuthProviderAuthorizeErrorSchema,\n testOAuthProviderAuthorizeQuerySchema,\n type TestOAuthProviderAuthorizeContract,\n type TestOAuthProviderAuthorizeQuery,\n} from \"./test-oauth-provider-authorize\";\nexport {\n testOAuthProviderEchoContract,\n testOAuthProviderEchoErrorSchema,\n testOAuthProviderEchoResponseSchema,\n type TestOAuthProviderEchoContract,\n type TestOAuthProviderEchoResponse,\n} from \"./test-oauth-provider-echo\";\nexport {\n testOAuthProviderTokenContract,\n testOAuthProviderTokenErrorSchema,\n testOAuthProviderTokenResponseSchema,\n type TestOAuthProviderTokenContract,\n type TestOAuthProviderTokenResponse,\n} from \"./test-oauth-provider-token\";\nexport {\n testOAuthProviderDeviceAuthContract,\n testOAuthProviderDeviceAuthErrorSchema,\n testOAuthProviderDeviceAuthResponseSchema,\n type TestOAuthProviderDeviceAuthContract,\n type TestOAuthProviderDeviceAuthResponse,\n} from \"./test-oauth-provider-device-auth\";\nexport {\n testOAuthProviderUserinfoContract,\n testOAuthProviderUserinfoErrorSchema,\n testOAuthProviderUserinfoResponseSchema,\n type TestOAuthProviderUserinfoContract,\n type TestOAuthProviderUserinfoResponse,\n} from \"./test-oauth-provider-userinfo\";\nexport {\n testComputerUseStateContract,\n testComputerUseStateDeleteResponseSchema,\n testComputerUseStateGetResponseSchema,\n testComputerUseStatePostBodySchema,\n testComputerUseStatePostResponseSchema,\n type TestComputerUseStateContract,\n type TestComputerUseStateDeleteResponse,\n type TestComputerUseStateGetResponse,\n type TestComputerUseStatePostResponse,\n} from \"./test-computer-use-state\";\nexport {\n testRuntimeStateActionBodySchema,\n testRuntimeStateActionResponseSchema,\n testRuntimeStateContract,\n type TestRuntimeStateActionBody,\n type TestRuntimeStateActionResponse,\n type TestRuntimeStateContract,\n} from \"./test-runtime-state\";\nexport {\n testZeroAgentStateActionBodySchema,\n testZeroAgentStateActionResponseSchema,\n testZeroAgentStateContract,\n testZeroAgentStateErrorSchema,\n type TestZeroAgentStateActionBody,\n type TestZeroAgentStateActionResponse,\n type TestZeroAgentStateContract,\n} from \"./test-zero-agent-state\";\nexport {\n testModelProviderStateActionBodySchema,\n testModelProviderStateActionResponseSchema,\n testModelProviderStateContract,\n testModelProviderStateErrorSchema,\n type TestModelProviderStateActionBody,\n type TestModelProviderStateActionResponse,\n type TestModelProviderStateContract,\n} from \"./test-model-provider-state\";\nexport {\n testMailDraftStateContract,\n type TestMailDraftStateContract,\n} from \"./test-mail-draft-state\";\nexport {\n testUsageInsightStateActionBodySchema,\n testUsageInsightStateActionResponseSchema,\n testUsageInsightStateContract,\n testUsageInsightStateFixtureSchema,\n type TestUsageInsightStateActionBody,\n type TestUsageInsightStateActionResponse,\n type TestUsageInsightStateContract,\n type TestUsageInsightStateFixture,\n} from \"./test-usage-insight-state\";\nexport {\n testUsageSettlementContract,\n testUsageSettlementRequestSchema,\n testUsageSettlementResponseSchema,\n type TestUsageSettlementContract,\n type TestUsageSettlementRequest,\n type TestUsageSettlementResponse,\n} from \"./test-usage-settlement\";\nexport {\n testCronCleanupSandboxesStateActionBodySchema,\n testCronCleanupSandboxesStateActionResponseSchema,\n testCronCleanupSandboxesStateContract,\n testCronCleanupSandboxesStateErrorSchema,\n type TestCronCleanupSandboxesStateActionBody,\n type TestCronCleanupSandboxesStateActionResponse,\n type TestCronCleanupSandboxesStateContract,\n} from \"./test-cron-cleanup-sandboxes-state\";\nexport {\n testSlackStateContract,\n testSlackStateErrorSchema,\n testSlackStateResponseSchema,\n type TestSlackStateContract,\n type TestSlackStateResponse,\n} from \"./test-slack-state\";\nexport {\n SLACK_E2E_FIXTURES,\n SLACK_E2E_SCOPES,\n testSlackMockAuthTestResponseSchema,\n testSlackMockChatPostEphemeralResponseSchema,\n testSlackMockChatPostMessageResponseSchema,\n testSlackMockContract,\n testSlackMockConversationMessagesResponseSchema,\n testSlackMockConversationsOpenResponseSchema,\n testSlackMockOauthAccessResponseSchema,\n testSlackMockOkResponseSchema,\n testSlackMockUsersInfoResponseSchema,\n type TestSlackMockContract,\n type TestSlackMockUsersInfoResponse,\n} from \"./test-slack-mock\";\nexport {\n testTelegramMockContract,\n testTelegramMockErrorResponseSchema,\n testTelegramMockPathParamsSchema,\n testTelegramMockSuccessResponseSchema,\n type TestTelegramMockContract,\n} from \"./test-telegram-mock\";\nexport {\n testTeamsMockContract,\n type TestTeamsMockContract,\n} from \"./test-teams-mock\";\nexport {\n testTeamsStateContract,\n testTeamsStateErrorSchema,\n testTeamsStateResponseSchema,\n type TestTeamsStateContract,\n type TestTeamsStateResponse,\n} from \"./test-teams-state\";\nexport {\n testTelegramStateContract,\n testTelegramStateErrorSchema,\n testTelegramStateResponseSchema,\n type TestTelegramStateContract,\n type TestTelegramStateResponse,\n} from \"./test-telegram-state\";\nexport {\n cronAggregateInsightsContract,\n cronAggregateInsightsResponseSchema,\n cronAggregateModelStatsContract,\n cronAggregateModelStatsResponseSchema,\n cronAggregateUsageContract,\n cronAggregateUsageResponseSchema,\n cronCompactChatThreadSnapshotsContract,\n cronCompactChatThreadSnapshotsResponseSchema,\n cronCleanupSandboxesContract,\n cronConnectorOauthStateCleanupContract,\n cronConnectorOauthStateCleanupResponseSchema,\n cronDrainEmailOutboxContract,\n cronDrainEmailOutboxResponseSchema,\n cronExecuteMorningBriefsContract,\n cronExecuteWorkflowAutomationsContract,\n cronRenewGmailWatchesContract,\n cronRenewGmailWatchesResponseSchema,\n cronRenewGoogleCalendarWatchesContract,\n cronRenewGoogleCalendarWatchesResponseSchema,\n cronRenewGoogleWorkspaceEventSubscriptionsContract,\n cronRenewGoogleWorkspaceEventSubscriptionsResponseSchema,\n cronProcessUsageEventsContract,\n cronProcessUsageEventsResponseSchema,\n cronReconcileBillingEntitlementsContract,\n cronReconcileBillingEntitlementsResponseSchema,\n cronSyncSkillsContract,\n cronSyncSkillsResponseSchema,\n cronTelegramCleanupContract,\n cronTelegramCleanupResponseSchema,\n cleanupResultSchema,\n cleanupResponseSchema,\n type CronAggregateInsightsContract,\n type CronAggregateModelStatsContract,\n type CronAggregateUsageContract,\n type CronCompactChatThreadSnapshotsContract,\n type CronCleanupSandboxesContract,\n type CronConnectorOauthStateCleanupContract,\n type CronDrainEmailOutboxContract,\n type CronProcessUsageEventsContract,\n type CronReconcileBillingEntitlementsContract,\n type CronRenewGmailWatchesContract,\n type CronRenewGoogleCalendarWatchesContract,\n type CronRenewGoogleWorkspaceEventSubscriptionsContract,\n type CronSyncSkillsContract,\n type CronTelegramCleanupContract,\n} from \"./cron\";\nexport {\n orgResponseSchema,\n updateOrgRequestSchema,\n orgTierSchema,\n isOrgTier,\n type OrgResponse,\n type UpdateOrgRequest,\n type OrgTier,\n} from \"./orgs\";\nexport {\n secretNameSchema,\n secretTypeSchema,\n secretResponseSchema,\n secretListResponseSchema,\n setSecretRequestSchema,\n type SecretResponse,\n type SecretListResponse,\n type SetSecretRequest,\n type SecretType,\n} from \"./secrets\";\nexport {\n variableNameSchema,\n variableResponseSchema,\n variableListResponseSchema,\n setVariableRequestSchema,\n type VariableResponse,\n type VariableListResponse,\n type SetVariableRequest,\n} from \"./variables\";\nexport {\n modelProviderTypeSchema,\n modelProviderFrameworkSchema,\n modelProviderResponseSchema,\n modelProviderListResponseSchema,\n upsertModelProviderRequestSchema,\n upsertModelProviderResponseSchema,\n orgModelPolicyRouteStatusSchema,\n orgModelPolicySchema,\n updateOrgModelPolicySchema,\n orgModelPoliciesResponseSchema,\n updateOrgModelPoliciesRequestSchema,\n supportedRunModelSchema,\n requestedRunModelSchema,\n modelProviderCredentialScopeSchema,\n MODEL_PROVIDER_TYPES,\n SUPPORTED_RUN_MODELS,\n VM0_MODEL_PRICE_TIER,\n DEFAULT_ORG_MODEL_POLICY_MODELS,\n DEFAULT_ORG_MODEL_POLICY_DEFAULT_MODEL,\n LIMITED_FREE1_DEFAULT_RUN_MODEL,\n getFrameworkForType,\n getSecretNameForType,\n getModelProviderEnvBindings,\n getModels,\n getDefaultModel,\n hasModelSelection,\n allowsCustomModel,\n getCustomModelPlaceholder,\n getDefaultOrgModelPolicySeed,\n // Provider compatibility\n getProviderBaseUrl,\n areProvidersCompatible,\n getCanonicalModelDisplayName,\n getProvidersForModel,\n getProviderRuntimeModel,\n isModelSupportedByProvider,\n isSupportedRunModel,\n normalizeRunModelId,\n getVm0ModelPriceTier,\n // Selectable provider filtering\n getSelectableProviderTypes,\n // Multi-auth provider support\n hasAuthMethods,\n getAuthMethodsForType,\n getDefaultAuthMethod,\n getSecretsForAuthMethod,\n getSecretNamesForAuthMethod,\n type ModelProviderType,\n type ModelProviderFramework,\n type ModelProviderEnvBindings,\n type ModelProviderResponse,\n type Vm0ModelPriceTier,\n type ModelProviderListResponse,\n type UpsertModelProviderRequest,\n type UpsertModelProviderResponse,\n type OrgModelPolicyRouteStatus,\n type OrgModelPolicy,\n type UpdateOrgModelPolicy,\n type OrgModelPoliciesResponse,\n type UpdateOrgModelPoliciesRequest,\n type SupportedRunModel,\n type ModelProviderCredentialScope,\n type DefaultOrgModelPolicySeed,\n // Multi-auth provider types\n type SecretFieldConfig,\n type AuthMethodConfig,\n // Firewall gateway for model providers\n MODEL_PROVIDER_FIREWALL_CONFIGS,\n getModelProviderFirewall,\n // VM0 managed provider\n VM0_MODEL_TO_PROVIDER,\n VM0_MODEL_ALIAS_TO_MODEL,\n getVm0ConcreteProviderType,\n getVm0Vendor,\n getVm0ApiModel,\n getVm0VisibleModels,\n normalizeVm0ModelId,\n isLimitedFree1RestrictedRunModel,\n} from \"./model-providers\";\nexport {\n artifactCatalogContract,\n type ArtifactCatalogContract,\n type ArtifactCatalogKind,\n type ArtifactDetail,\n type ArtifactSummary,\n} from \"./artifact-catalog\";\nexport {\n chatThreadsContract,\n chatThreadByIdContract,\n chatThreadDraftContract,\n chatThreadMarkReadContract,\n chatThreadMarkAgentReadContract,\n chatThreadMetadataContract,\n chatThreadModelSelectionContract,\n chatThreadComputerUseHostContract,\n chatEventsContract,\n chatThreadEventsContract,\n chatThreadArtifactsContract,\n artifactsContract,\n chatSearchContract,\n chatThreadSnapshotProjectionSchema,\n chatThreadEventSchema,\n chatThreadDetailSchema,\n chatThreadMetadataSchema,\n chatThreadDraftSchema,\n MODEL_FIRST_SELECTION_PROVIDER_ID,\n generationTemplateRequestSchema,\n presentationGenerationTemplateRequestSchema,\n websiteGenerationTemplateRequestSchema,\n chatEventResponse,\n chatEventSchema,\n summaryEntrySchema,\n persistedAttachmentSchema,\n attachFileSchema,\n resolvedAttachFileSchema,\n artifactItemSchema,\n artifactsListResponseSchema,\n imageArtifactEditSnapshotSchema,\n imageArtifactEditSnapshotStateSchema,\n chatThreadArtifactFileSchema,\n chatThreadArtifactGoogleDriveSyncSchema,\n chatThreadArtifactRunSchema,\n type GenerationTemplateRequest,\n type PresentationGenerationTemplateRequest,\n type WebsiteGenerationTemplateRequest,\n type SummaryEntry,\n type ChatThreadsContract,\n type ChatThreadByIdContract,\n type ChatThreadDraftContract,\n type ChatThreadMarkReadContract,\n type ChatThreadMarkAgentReadContract,\n type ChatThreadMetadataContract,\n type ChatThreadModelSelectionContract,\n type ChatThreadComputerUseHostContract,\n type ChatEventsContract,\n type ChatThreadEventsContract,\n type ChatThreadArtifactsContract,\n type ArtifactsContract,\n type ChatSearchContract,\n type ChatSearchResponse,\n type ChatSearchResult,\n type ChatSearchMessage,\n type ChatThreadSnapshotProjection,\n type ChatThreadEvent,\n type ChatThreadDetail,\n type ChatThreadMetadata,\n type ChatThreadDraft,\n type ChatEvent,\n type ChatEventSendBody,\n type ChatFollowupsEvent,\n type ChatAutomationEvent,\n type ChatInputEvent,\n type ChatPromptEvent,\n type ChatUserMessageEvent,\n type ChatUsageEvent,\n type PersistedAttachment,\n type AttachFile,\n type ResolvedAttachFile,\n type ArtifactItem,\n type ArtifactsListResponse,\n type ImageArtifactEditSnapshot,\n type ImageArtifactEditSnapshotState,\n type ChatThreadArtifactFile,\n type ChatThreadArtifactGoogleDriveSync,\n type ChatThreadArtifactRun,\n} from \"./chat-threads\";\nexport {\n runnersPollContract,\n runnersJobClaimContract,\n runnersNetworkPolicyRefreshContract,\n runnersBuiltinFirewallsResolveContract,\n runnersHeartbeatContract,\n heartbeatBodySchema,\n runnerGroupSchema,\n jobSchema,\n executionContextSchema,\n storedExecutionContextSchema,\n secretConnectorMetadataSchema,\n secretConnectorMetadataMapSchema,\n CANONICAL_CODEX_MEMORY_MOUNT_PATH,\n CANONICAL_CLAUDE_MEMORY_MOUNT_PATH,\n CANONICAL_GUEST_HOME_DIR,\n CANONICAL_WORKING_DIR,\n DEFAULT_PROFILE,\n RUNNER_BUILTIN_FIREWALL_RESOLVE_NAMES_MAX,\n SESSION_HISTORY_DOWNLOAD_SOURCE_CONFIGURED_PUBLIC_ENDPOINT,\n SESSION_HISTORY_DOWNLOAD_SOURCE_DEFAULT_R2_ENDPOINT,\n storageMountEntrySchema,\n storedStorageMountEntrySchema,\n sessionHistoryDownloadSourceSchema,\n storageManifestSchema,\n resumeSessionSchema,\n type RunnersPollContract,\n type RunnersJobClaimContract,\n type RunnersNetworkPolicyRefreshContract,\n type RunnersBuiltinFirewallsResolveContract,\n type RunnersHeartbeatContract,\n type Job,\n type ExecutionContext,\n type StoredExecutionContext,\n type NetworkPolicyRefresh,\n type SecretConnectorMetadata,\n type CanonicalStorageManifest,\n type StorageMountEntry,\n type StoredStorageMountEntry,\n type StorageManifest,\n type ResumeSession,\n type SessionHistoryDownloadSource,\n type RunnerBuiltinFirewallsResolveBody,\n type RunnerBuiltinFirewallsResolveResponse,\n} from \"./runners\";\n\nexport {\n ablyTokenRequestSchema,\n browserSessionChangedPayloadSchema,\n connectorChangedPayloadSchema,\n type BrowserSessionChangedPayload,\n type ConnectorChangedPayload,\n runnerRealtimeTokenContract,\n type RunnerRealtimeTokenContract,\n platformRealtimeTokenContract,\n type PlatformRealtimeTokenContract,\n} from \"./realtime\";\n\nexport {\n logsListContract,\n logsByIdContract,\n logStatusSchema,\n logEntrySchema,\n paginationSchema,\n logsListResponseSchema,\n artifactSchema,\n logDetailSchema,\n triggerSourceSchema,\n type LogsListContract,\n type LogsByIdContract,\n // Inferred types\n type LogStatus,\n type LogEntry,\n type Pagination,\n type LogsListResponse,\n type Artifact,\n type LogDetail,\n type TriggerSource,\n type LogsFilters,\n} from \"./logs\";\n\nexport {\n connectorResponseConnectionStatusSchema,\n connectorResponseSchema,\n connectorListResponseSchema,\n guaranteedConnectorProvidedBindingNames,\n connectorProvidedBindingNamespaceSchema,\n connectorProvidedBindingSchema,\n connectorProvidedBindingSourceSchema,\n scopeDiffResponseSchema,\n type ConnectorResponseConnectionStatus,\n type ScopeDiffResponse,\n type ConnectorResponse,\n type ConnectorListResponse,\n type ConnectorProvidedBinding,\n type ConnectorProvidedBindingNamespace,\n} from \"./connector-schemas\";\n\nexport {\n parseBasicAuthTemplates,\n replaceBasicAuthTemplates,\n extractSecretNamesFromApis,\n firewallPermissionSchema,\n firewallApiSchema,\n firewallSchema,\n firewallsSchema,\n executionFirewallBuiltinEntrySchema,\n executionFirewallInlineEntrySchema,\n executionFirewallEntrySchema,\n executionFirewallsSchema,\n firewallConfigSchema,\n firewallPolicyValueSchema,\n firewallPoliciesSchema,\n firewallPolicySchema,\n networkPolicySchema,\n type FirewallConfig,\n type ExpandedFirewallConfig,\n type FirewallApi,\n type Firewall,\n type Firewalls,\n type ExecutionFirewallBuiltinEntry,\n type ExecutionFirewallInlineEntry,\n type ExecutionFirewallEntry,\n type ExecutionFirewalls,\n type FirewallPolicyValue,\n type FirewallPolicy,\n type FirewallPolicies,\n type NetworkPolicy,\n type FirewallTemplateReferenceNamespace,\n type FirewallTemplateReferences,\n type BasicAuthTemplateArg,\n type BasicAuthTemplateMatch,\n networkPoliciesSchema,\n type NetworkPolicies,\n hasBaseUrlParams,\n hasBaseUrlVars,\n resolveFirewallBaseUrlVars,\n validateBaseUrl,\n} from \"@vm0/connectors/firewall-types\";\n\nexport {\n collectAndValidatePermissions,\n validateRule,\n} from \"@vm0/connectors/firewall-expander\";\n\nexport {\n matchFirewallPath,\n findMatchingPermissions,\n} from \"@vm0/connectors/firewall-rule-matcher\";\n\nexport {\n userPreferencesResponseSchema,\n updateUserPreferencesRequestSchema,\n type UserPreferencesResponse,\n type UpdateUserPreferencesRequest,\n sendModeSchema,\n type SendMode,\n userLocaleSchema,\n type UserLocale,\n} from \"./zero-user-preferences\";\nexport {\n featureSwitchesResponseSchema,\n updateFeatureSwitchesRequestSchema,\n type FeatureSwitchesResponse,\n type UpdateFeatureSwitchesRequest,\n} from \"./zero-feature-switches\";\nexport {\n orgListItemSchema,\n orgListResponseSchema,\n type OrgListItem,\n type OrgListResponse,\n} from \"./org-list\";\nexport {\n orgRoleSchema,\n orgMemberSchema,\n orgPendingInvitationSchema,\n orgMembershipRequestSchema,\n orgMembersResponseSchema,\n inviteOrgMemberRequestSchema,\n removeOrgMemberRequestSchema,\n updateOrgMemberRoleRequestSchema,\n revokeInvitationRequestSchema,\n membershipRequestActionSchema,\n orgMessageResponseSchema,\n type OrgRole,\n type OrgMember,\n type OrgPendingInvitation,\n type OrgMembershipRequest,\n type OrgMembersResponse,\n type InviteOrgMemberRequest,\n type RemoveOrgMemberRequest,\n type UpdateOrgMemberRoleRequest,\n type RevokeInvitationRequest,\n type MembershipRequestAction,\n type OrgMessageResponse,\n} from \"./org-members\";\nexport {\n onboardingStatusContract,\n onboardingCompleteContract,\n onboardingStatusResponseSchema,\n type OnboardingStatusContract,\n type OnboardingCompleteContract,\n type OnboardingStatusResponse,\n} from \"./onboarding\";\nexport { skillFrontmatterSchema } from \"./skills\";\nexport {\n zeroAgentsMainContract,\n zeroAgentsByIdContract,\n zeroAgentInstructionsContract,\n zeroAgentDraftContract,\n zeroAgentResponseSchema,\n zeroAgentRequestSchema,\n zeroAgentMetadataRequestSchema,\n zeroAgentInstructionsResponseSchema,\n zeroAgentInstructionsRequestSchema,\n zeroAgentDraftResponseSchema,\n zeroAgentDraftRequestSchema,\n type ZeroAgentsMainContract,\n type ZeroAgentsByIdContract,\n type ZeroAgentInstructionsContract,\n type ZeroAgentDraftContract,\n type ZeroAgentResponse,\n type ZeroAgentRequest,\n type ZeroAgentMetadataRequest,\n type ZeroAgentInstructionsResponse,\n type ZeroAgentInstructionsRequest,\n type ZeroAgentDraftResponse,\n type ZeroAgentDraftRequest,\n} from \"./zero-agents\";\nexport {\n zeroWorkflowVisibilitySchema,\n zeroWorkflowNameSchema,\n RESERVED_SKILL_FILE,\n workflowFileEntrySchema,\n workflowFileMetadataSchema,\n workflowInstructionSchema,\n zeroWorkflowAutomationKindSchema,\n zeroWorkflowEventTypeSchema,\n zeroWorkflowScheduleTypeSchema,\n gmailNewMessageEventConfigSchema,\n gmailLabelAppliedEventConfigSchema,\n gmailWorkflowEventConfigSchema,\n githubDeploymentStatusCreatedEventConfigSchema,\n githubDeploymentStateSchema,\n githubIssueCommentCreatedEventConfigSchema,\n githubIssueCommentSubjectFilterSchema,\n githubPullRequestReviewStateSchema,\n githubPullRequestReviewSubmittedEventConfigSchema,\n githubWorkflowJobCompletedEventConfigSchema,\n githubWorkflowRunCompletedEventConfigSchema,\n googleCalendarEventCreatedEventConfigSchema,\n zeroWorkflowScheduleSchema,\n zeroWorkflowAutomationSummarySchema,\n chatThreadWorkflowAutomationSchema,\n zeroWorkflowAutomationCreateRequestSchema,\n zeroWorkflowAutomationUpdateRequestSchema,\n zeroWorkflowAutomationsListEntrySchema,\n zeroWorkflowAutomationsListResponseSchema,\n zeroWorkflowSummarySchema,\n zeroWorkflowDetailResponseSchema,\n zeroWorkflowListResponseSchema,\n zeroWorkflowCreateRequestSchema,\n zeroWorkflowUpdateRequestSchema,\n zeroWorkflowCopyRequestSchema,\n zeroWorkflowRunResponseSchema,\n zeroWorkflowsCollectionContract,\n zeroWorkflowsDetailContract,\n zeroWorkflowVisibilityContract,\n zeroWorkflowAutomationsContract,\n type ZeroWorkflowVisibility,\n type WorkflowFileEntry,\n type WorkflowFileMetadata,\n type ZeroWorkflowAutomationKind,\n type ZeroWorkflowEventType,\n type ZeroWorkflowScheduleType,\n type GmailNewMessageEventConfig,\n type GmailLabelAppliedEventConfig,\n type GmailWorkflowEventConfig,\n type GithubDeploymentStatusCreatedEventConfig,\n type GithubDeploymentState,\n type GithubIssueCommentCreatedEventConfig,\n type GithubIssueCommentSubjectFilter,\n type GithubPullRequestReviewState,\n type GithubPullRequestReviewSubmittedEventConfig,\n type GithubWorkflowJobCompletedEventConfig,\n type GithubWorkflowRunCompletedEventConfig,\n type GoogleCalendarEventCreatedEventConfig,\n type GoogleCalendarWorkflowEventConfig,\n type ZeroWorkflowSchedule,\n type ZeroWorkflowAutomationSummary,\n type ChatThreadWorkflowAutomation,\n type ZeroWorkflowAutomationCreateRequest,\n type ZeroWorkflowAutomationUpdateRequest,\n type ZeroWorkflowAutomationsListEntry,\n type ZeroWorkflowSummary,\n type ZeroWorkflowDetailResponse,\n type ZeroWorkflowCreateRequest,\n type ZeroWorkflowUpdateRequest,\n type ZeroWorkflowCopyRequest,\n type ZeroWorkflowRunResponse,\n type ZeroWorkflowsCollectionContract,\n type ZeroWorkflowsDetailContract,\n type ZeroWorkflowVisibilityContract,\n type ZeroWorkflowAutomationsContract,\n} from \"./zero-workflows\";\nexport {\n zeroUserConnectorsContract,\n userConnectorEnabledSlugsSchema,\n type UserConnectorEnabledSlugs,\n type ZeroUserConnectorsContract,\n} from \"./user-connectors\";\nexport {\n zeroUserPermissionGrantsContract,\n userPermissionGrantScopeSchema,\n userPermissionGrantActionSchema,\n userPermissionGrantApplyModeSchema,\n userPermissionGrantExpiresInSchema,\n userPermissionGrantResponseSchema,\n applyUserPermissionGrantSchema,\n applyUserPermissionGrantsRequestSchema,\n type UserPermissionGrantAction,\n type UserPermissionGrantApplyMode,\n type UserPermissionGrantExpiresIn,\n type UserPermissionGrantResponse,\n type ListUserPermissionGrantsQuery,\n type ApplyUserPermissionGrant,\n type ApplyUserPermissionGrantsRequest,\n type ZeroUserPermissionGrantsContract,\n} from \"./zero-user-permission-grants\";\nexport {\n zeroConnectorsMainContract,\n zeroConnectorsBySlugContract,\n zeroConnectorScopeDiffContract,\n zeroConnectorManualGrantContract,\n zeroConnectorNoAuthGrantContract,\n zeroConnectorOauthDeviceAuthSessionContract,\n zeroConnectorsSearchContract,\n type ZeroConnectorsMainContract,\n type ZeroConnectorsBySlugContract,\n type ZeroConnectorScopeDiffContract,\n type ZeroConnectorManualGrantContract,\n type ZeroConnectorNoAuthGrantContract,\n type ZeroConnectorOauthDeviceAuthSessionContract,\n type ZeroConnectorsSearchContract,\n} from \"./zero-connectors\";\nexport {\n publicConnectorCatalogIconSchema,\n zeroConnectorCatalogContract,\n type PublicConnectorCatalogAuthMethodDetail,\n type PublicConnectorCatalogAuthMethodSummary,\n type PublicConnectorCatalogDetail,\n type PublicConnectorCatalogDetailResponse,\n type PublicConnectorCatalogConnection,\n type PublicConnectorCatalogConnectionStatus,\n type PublicConnectorCatalogItem,\n type PublicConnectorCatalogIcon,\n type PublicConnectorCatalogListResponse,\n type PublicConnectorCatalogManualField,\n type PublicConnectorCatalogPermissionDetail,\n type PublicConnectorCatalogPermissionDetailResponse,\n type PublicConnectorCatalogPermissionSummary,\n type PublicConnectorCatalogStartOption,\n type PublicConnectorCatalogStatusItem,\n type PublicConnectorCatalogStatusResponse,\n type ZeroConnectorCatalogContract,\n} from \"./zero-connector-catalog\";\nexport {\n connectorCheckDiagnosticResultSchema,\n connectorCheckPolicySchema,\n connectorCheckRequestSchema,\n zeroConnectorCheckContract,\n type ConnectorCheckDiagnosticResult,\n type ConnectorCheckPolicy,\n type ConnectorCheckRequest,\n type ZeroConnectorCheckContract,\n} from \"./zero-connector-check\";\nexport {\n connectorAuthMethodIdSchema,\n connectorSlugSchema,\n type ConnectorAuthMethodId,\n type ConnectorSlug,\n} from \"./connector-identity\";\nexport {\n codexDeviceAuthScopeSchema,\n zeroCodexDeviceAuthContract,\n type CodexDeviceAuthScope,\n type ZeroCodexDeviceAuthContract,\n} from \"./zero-codex-device-auth\";\nexport {\n claudeCodeDeviceAuthScopeSchema,\n zeroClaudeCodeDeviceAuthContract,\n type ClaudeCodeDeviceAuthScope,\n type ZeroClaudeCodeDeviceAuthContract,\n} from \"./zero-claude-code-device-auth\";\nexport {\n zeroOrgContract,\n zeroOrgLeaveContract,\n zeroOrgDeleteContract,\n type ZeroOrgContract,\n type ZeroOrgLeaveContract,\n type ZeroOrgDeleteContract,\n} from \"./zero-org\";\nexport {\n zeroOrgLogoContract,\n zeroOrgLogoResponseSchema,\n type ZeroOrgLogoContract,\n type ZeroOrgLogoResponse,\n} from \"./zero-org-logo\";\nexport { zeroOrgListContract, type ZeroOrgListContract } from \"./zero-org-list\";\nexport {\n zeroOrgMembersContract,\n zeroOrgInviteContract,\n zeroOrgMembershipRequestsContract,\n type ZeroOrgMembersContract,\n type ZeroOrgInviteContract,\n type ZeroOrgMembershipRequestsContract,\n} from \"./zero-org-members\";\nexport {\n zeroComposesListContract,\n type ZeroComposesListContract,\n} from \"./zero-composes\";\nexport {\n zeroRunsByIdContract,\n zeroRunsCancelContract,\n zeroRunsQueueContract,\n zeroRunAgentEventsContract,\n zeroRunSystemLogContract,\n zeroRunMetricsContract,\n zeroRunContextContract,\n zeroRunNetworkLogsContract,\n zeroRunRunnerContract,\n zeroLogsSearchContract,\n type ZeroRunsByIdContract,\n type ZeroRunsCancelContract,\n type ZeroRunsQueueContract,\n type ZeroRunAgentEventsContract,\n type ZeroRunSystemLogContract,\n type ZeroRunMetricsContract,\n type ZeroRunContextContract,\n type ZeroRunNetworkLogsContract,\n type ZeroRunRunnerContract,\n type ZeroLogsSearchContract,\n type RunContextResponse,\n type RunRunnerResponse,\n} from \"./zero-runs\";\nexport {\n zeroModelProvidersMainContract,\n zeroModelProvidersByTypeContract,\n type ZeroModelProvidersMainContract,\n type ZeroModelProvidersByTypeContract,\n} from \"./zero-model-providers\";\nexport {\n zeroPersonalModelProvidersMainContract,\n zeroPersonalModelProvidersByTypeContract,\n type ZeroPersonalModelProvidersMainContract,\n type ZeroPersonalModelProvidersByTypeContract,\n} from \"./zero-personal-model-providers\";\nexport {\n zeroUserPreferencesContract,\n type ZeroUserPreferencesContract,\n} from \"./zero-user-preferences\";\nexport {\n zeroFeatureSwitchesContract,\n type ZeroFeatureSwitchesContract,\n} from \"./zero-feature-switches\";\nexport {\n zeroSecretsContract,\n zeroSecretsByNameContract,\n zeroVariablesContract,\n zeroVariablesByNameContract,\n type ZeroSecretsContract,\n type ZeroSecretsByNameContract,\n type ZeroVariablesContract,\n type ZeroVariablesByNameContract,\n} from \"./zero-secrets\";\nexport {\n zeroCustomConnectorsContract,\n zeroCustomConnectorByIdContract,\n zeroCustomConnectorSecretContract,\n zeroCustomConnectorValuesContract,\n zeroCustomConnectorOAuth2Contract,\n customConnectorResponseSchema,\n customConnectorListResponseSchema,\n createCustomConnectorBodySchema,\n setCustomConnectorSecretBodySchema,\n setCustomConnectorValuesBodySchema,\n startCustomConnectorOAuth2BodySchema,\n startCustomConnectorOAuth2ResponseSchema,\n patchCustomConnectorBodySchema,\n customConnectorAuthModeSchema,\n customConnectorOAuthConfigSchema,\n customConnectorOAuthConfigInputSchema,\n type ZeroCustomConnectorsContract,\n type ZeroCustomConnectorByIdContract,\n type ZeroCustomConnectorSecretContract,\n type ZeroCustomConnectorValuesContract,\n type ZeroCustomConnectorOAuth2Contract,\n type CustomConnectorResponse,\n type CustomConnectorAuthMode,\n type CustomConnectorOAuthConfig,\n type CustomConnectorOAuthConfigInput,\n type CreateCustomConnectorBody,\n type CustomConnectorValueInput,\n type SetCustomConnectorValuesBody,\n type UpdateCustomConnectorBody,\n type PatchCustomConnectorBody,\n} from \"./zero-custom-connectors\";\nexport {\n zeroAgentCustomConnectorsContract,\n agentCustomConnectorEnabledIdsSchema,\n agentCustomConnectorUpdateSchema,\n type AgentCustomConnectorEnabledIds,\n type AgentCustomConnectorUpdate,\n type ZeroAgentCustomConnectorsContract,\n} from \"./zero-agent-custom-connectors\";\nexport {\n integrationsSlackMessageContract,\n type IntegrationsSlackMessageContract,\n type SendSlackMessageBody,\n type SendSlackMessageResponse,\n integrationsFeishuMessageContract,\n type IntegrationsFeishuMessageContract,\n type SendFeishuMessageBody,\n type SendFeishuMessageResponse,\n integrationsFeishuDownloadFileContract,\n type IntegrationsFeishuDownloadFileContract,\n type FeishuResourceType,\n integrationsFeishuUploadInitContract,\n type FeishuUploadInitBody,\n type FeishuUploadInitResponse,\n integrationsFeishuUploadCompleteContract,\n type FeishuUploadCompleteBody,\n type FeishuUploadCompleteResponse,\n FEISHU_FILE_UPLOAD_MAX_BYTES,\n integrationsTelegramMessageContract,\n type IntegrationsTelegramMessageContract,\n type SendTelegramMessageBody,\n type SendTelegramMessageResponse,\n integrationsTeamsMessageContract,\n type IntegrationsTeamsMessageContract,\n type SendTeamsMessageBody,\n type SendTeamsMessageResponse,\n integrationsPhoneMessageContract,\n type IntegrationsPhoneMessageContract,\n type SendPhoneMessageBody,\n type SendPhoneMessageResponse,\n integrationsPhoneDownloadFileContract,\n type IntegrationsPhoneDownloadFileContract,\n integrationsTelegramBotListContract,\n type IntegrationsTelegramBotListContract,\n type TelegramBotListItem,\n type ListTelegramBotsResponse,\n integrationsSlackUploadInitContract,\n type SlackUploadInitBody,\n type SlackUploadInitResponse,\n integrationsSlackUploadCompleteContract,\n type SlackUploadCompleteBody,\n type SlackUploadCompleteResponse,\n integrationsTelegramUploadInitContract,\n type TelegramUploadInitBody,\n type TelegramUploadInitResponse,\n integrationsTeamsUploadInitContract,\n type TeamsUploadInitBody,\n type TeamsUploadInitResponse,\n integrationsTelegramUploadCompleteContract,\n type TelegramUploadCompleteBody,\n type TelegramUploadCompleteResponse,\n integrationsTeamsUploadCompleteContract,\n type TeamsUploadCompleteBody,\n type TeamsUploadCompleteResponse,\n integrationsPhoneUploadInitContract,\n type PhoneUploadInitBody,\n type PhoneUploadInitResponse,\n integrationsPhoneUploadCompleteContract,\n type PhoneUploadCompleteBody,\n type PhoneUploadCompleteResponse,\n} from \"./integrations\";\nexport {\n githubConnectSignatureSchema,\n githubConnectUserBodySchema,\n githubInstallationNotFoundResponseSchema,\n githubInstallationResponseSchema,\n githubIntegrationActionResponseSchema,\n integrationsGithubContract,\n type GithubConnectSignature,\n type GithubConnectUserBody,\n type GithubInstallationNotFoundResponse,\n type GithubInstallationResponse,\n type GithubIntegrationActionResponse,\n type IntegrationsGithubContract,\n} from \"./integrations-github\";\nexport {\n githubAppSetupCallbackQuerySchema,\n githubOauthContract,\n githubOauthInstallQuerySchema,\n type GithubAppSetupCallbackQuery,\n type GithubOauthContract,\n type GithubOauthInstallQuery,\n} from \"./github-oauth\";\nexport {\n adAttributionMetadataSchema,\n zeroAttributionContract,\n type AdAttributionMetadata,\n type RecordSignupAttributionRequest,\n type RecordSignupAttributionResponse,\n type ZeroAttributionContract,\n} from \"./zero-attribution\";\nexport {\n zeroBillingStatusContract,\n zeroBillingCheckoutContract,\n zeroBillingConcurrencyCheckoutContract,\n zeroBillingPortalContract,\n zeroBillingAutoRechargeContract,\n zeroBillingInvoicesContract,\n zeroBillingDowngradeContract,\n zeroBillingRestoreContract,\n zeroBillingRedeemContract,\n type ZeroBillingStatusContract,\n type ZeroBillingCheckoutContract,\n type ZeroBillingConcurrencyCheckoutContract,\n type ZeroBillingPortalContract,\n type ZeroBillingAutoRechargeContract,\n type ZeroBillingInvoicesContract,\n type ZeroBillingDowngradeContract,\n type ZeroBillingRestoreContract,\n type ZeroBillingRedeemContract,\n // Inferred types\n type BillingStatusResponse,\n type AutoRechargeConfig,\n type CheckoutResponse,\n type ConcurrencyCheckoutRequest,\n type PortalResponse,\n type BillingInvoice,\n type BillingInvoicesResponse,\n type DowngradeResponse,\n type RedeemRequest,\n type RedeemResponse,\n} from \"./zero-billing\";\nexport {\n zeroScrapeContract,\n zeroScrapeBillingCategorySchema,\n zeroScrapeFormatSchema,\n zeroScrapeLinksResponseSchema,\n zeroScrapeMarkdownResponseSchema,\n zeroScrapeModeSchema,\n zeroScrapeRequestSchema,\n zeroScrapeResponseSchema,\n type ZeroScrapeBillingCategory,\n type ZeroScrapeContract,\n type ZeroScrapeFormat,\n type ZeroScrapeMode,\n type ZeroScrapeRequest,\n type ZeroScrapeResponse,\n} from \"./zero-scrape\";\nexport {\n ZERO_FINANCE_DEFAULT_INTERVAL,\n ZERO_FINANCE_DEFAULT_RANGE,\n ZERO_FINANCE_MAX_QUERY_CHARS,\n ZERO_FINANCE_MAX_SYMBOL_CHARS,\n zeroFinanceChartRequestSchema,\n zeroFinanceContract,\n zeroFinanceIntervalSchema,\n zeroFinanceOperationSchema,\n zeroFinanceProfileRequestSchema,\n zeroFinanceQuoteRequestSchema,\n zeroFinanceRangeSchema,\n zeroFinanceResponseSchema,\n zeroFinanceSearchRequestSchema,\n type ZeroFinanceChartRequest,\n type ZeroFinanceContract,\n type ZeroFinanceInterval,\n type ZeroFinanceOperation,\n type ZeroFinanceProfileRequest,\n type ZeroFinanceQuoteRequest,\n type ZeroFinanceRange,\n type ZeroFinanceResponse,\n type ZeroFinanceSearchRequest,\n} from \"./zero-finance\";\nexport {\n ZERO_PEOPLE_SEARCH_DEFAULT_LIMIT,\n ZERO_PEOPLE_SEARCH_MAX_COMPANY_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_LIMIT,\n ZERO_PEOPLE_SEARCH_MAX_LOCATION_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_NAME_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_QUERY_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_SOURCES,\n ZERO_PEOPLE_SEARCH_MAX_SOURCE_TITLE_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_SOURCE_URL_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_SUMMARY_CHARS,\n ZERO_PEOPLE_SEARCH_MAX_TITLE_CHARS,\n zeroPeopleSearchContract,\n zeroPeopleSearchProfileSchema,\n zeroPeopleSearchRequestSchema,\n zeroPeopleSearchResponseSchema,\n zeroPeopleSearchSourceSchema,\n type ZeroPeopleSearchContract,\n type ZeroPeopleSearchProfile,\n type ZeroPeopleSearchRequest,\n type ZeroPeopleSearchResponse,\n type ZeroPeopleSearchSource,\n} from \"./zero-people-search\";\nexport {\n ZERO_WEB_SEARCH_DEFAULT_LIMIT,\n ZERO_WEB_SEARCH_MAX_DATE_CHARS,\n ZERO_WEB_SEARCH_MAX_DOMAIN_CHARS,\n ZERO_WEB_SEARCH_MAX_DOMAINS,\n ZERO_WEB_SEARCH_MAX_LIMIT,\n ZERO_WEB_SEARCH_MAX_QUERY_CHARS,\n ZERO_WEB_SEARCH_MAX_SNIPPET_CHARS,\n ZERO_WEB_SEARCH_MAX_TITLE_CHARS,\n ZERO_WEB_SEARCH_MAX_URL_CHARS,\n zeroWebSearchContract,\n zeroWebSearchDomainSchema,\n zeroWebSearchRecencySchema,\n zeroWebSearchRequestSchema,\n zeroWebSearchResponseSchema,\n zeroWebSearchResultSchema,\n type ZeroWebSearchContract,\n type ZeroWebSearchRecency,\n type ZeroWebSearchRequest,\n type ZeroWebSearchResponse,\n type ZeroWebSearchResult,\n} from \"./zero-web-search\";\nexport {\n zeroUsageMembersContract,\n type ZeroUsageMembersContract,\n // Inferred types\n type MemberUsage,\n type UsageMembersResponse,\n} from \"./zero-usage\";\nexport {\n zeroUsageRunsContract,\n type ZeroUsageRunsContract,\n type UsageRun,\n type UsageRunsResponse,\n} from \"./zero-usage-daily\";\nexport {\n zeroUsageInsightContract,\n type ZeroUsageInsightContract,\n type UsageInsightResponse,\n type UsageInsightBucket,\n type UsageInsightAutomationRow,\n type UsageInsightChatRow,\n} from \"./zero-usage-insight\";\nexport {\n zeroUsageRecordContract,\n usageRecordKindSchema,\n usageRecordRangeSchema,\n usageRecordScopeSchema,\n usageRecordSourceSchema,\n type ZeroUsageRecordContract,\n type UsageRecordKind,\n type UsageRecordRange,\n type UsageRecordResponse,\n type UsageRecordRow,\n type UsageRecordScope,\n type UsageRecordSource,\n} from \"./zero-usage-record\";\nexport {\n usageContract,\n type UsageContract,\n type DailyUsage,\n type UsageResponse,\n} from \"./usage\";\nexport {\n zeroTeamContract,\n teamComposeItemSchema,\n type ZeroTeamContract,\n type TeamComposeItem,\n} from \"./zero-team\";\nexport {\n zeroIntegrationsSlackContract,\n slackOrgStatusSchema,\n type ZeroIntegrationsSlackContract,\n type SlackOrgStatus,\n} from \"./zero-integrations-slack\";\nexport {\n zeroSlackConnectContract,\n type ZeroSlackConnectContract,\n} from \"./zero-slack-connect\";\nexport {\n zeroSlackCommandsContract,\n type ZeroSlackCommandsContract,\n} from \"./zero-slack-commands\";\nexport {\n zeroSlackEventsContract,\n type ZeroSlackEventsContract,\n} from \"./zero-slack-events\";\nexport {\n zeroTeamsBotContract,\n teamsInboundActivitySchema,\n teamsBotIngressResponseSchema,\n type TeamsInboundActivity,\n type TeamsBotIngressResponse,\n type ZeroTeamsBotContract,\n} from \"./zero-teams-bot\";\nexport {\n zeroTeamsConnectContract,\n type TeamsConnectBody,\n type TeamsConnectResponse,\n type TeamsConnectStatus,\n type TeamsDisconnectResponse,\n type ZeroTeamsConnectContract,\n} from \"./zero-teams-connect\";\nexport {\n zeroTeamsBrowserConnectContract,\n zeroTeamsBrowserConnectQuerySchema,\n type ZeroTeamsBrowserConnectContract,\n type ZeroTeamsBrowserConnectQuery,\n} from \"./zero-teams-browser-connect\";\nexport {\n zeroTeamsOauthContract,\n zeroTeamsOauthCallbackQuerySchema,\n zeroTeamsOauthConnectQuerySchema,\n type ZeroTeamsOauthCallbackQuery,\n type ZeroTeamsOauthConnectQuery,\n type ZeroTeamsOauthContract,\n} from \"./zero-teams-oauth\";\nexport {\n zeroSlackInteractiveContract,\n type ZeroSlackInteractiveContract,\n} from \"./zero-slack-interactive\";\nexport {\n zeroSlackOauthContract,\n zeroSlackOauthInstallQuerySchema,\n zeroSlackOauthConnectQuerySchema,\n zeroSlackOauthCallbackQuerySchema,\n type ZeroSlackOauthContract,\n type ZeroSlackOauthInstallQuery,\n type ZeroSlackOauthConnectQuery,\n type ZeroSlackOauthCallbackQuery,\n} from \"./zero-slack-oauth\";\nexport {\n zeroSlackChannelsContract,\n slackChannelSchema,\n type ZeroSlackChannelsContract,\n type SlackChannel,\n} from \"./zero-slack-channels\";\nexport {\n zeroQueuePositionContract,\n type ZeroQueuePositionContract,\n} from \"./zero-queue-position\";\nexport {\n zeroDeveloperSupportContract,\n developerSupportBodySchema,\n consentCodeResponseSchema,\n submitResponseSchema,\n type ZeroDeveloperSupportContract,\n} from \"./zero-developer-support\";\nexport {\n zeroReportErrorContract,\n reportErrorBodySchema,\n reportErrorResponseSchema,\n type ZeroReportErrorContract,\n} from \"./zero-report-error\";\nexport {\n zeroComputerUseAuditEventsContract,\n zeroComputerUseAuthorizationRequestsContract,\n zeroComputerUseCommandContract,\n zeroComputerUseHeartbeatContract,\n zeroComputerUseHostCommandsContract,\n zeroComputerUseHostsContract,\n zeroComputerUsePluginCommandContract,\n zeroComputerUseWriteCommandContract,\n computerUseAuditEventSchema,\n computerUseCommandKindSchema,\n computerUseCommandResponseSchema,\n computerUseHostSchema,\n isExpiredPluginContentPointer,\n isStoredScreenshotPointer,\n isExpiredScreenshotPointer,\n isStoredPluginContentPointer,\n type StoredScreenshotPointer,\n type ClientScreenshotPointer,\n type StoredPluginContentPointer,\n type ClientPluginContentPointer,\n type ComputerUseAuditEvent,\n type ComputerUseAuditEventListResponse,\n type ComputerUseAuthorizationRequestApplyResponse,\n type ComputerUseAuthorizationRequestCreateResponse,\n type ComputerUseAuthorizationRequestResponse,\n type ComputerUseAuthorizationSource,\n type ComputerUseCommandCreateResponse,\n type ComputerUseCommandError,\n type ComputerUseCommandKind,\n type ComputerUseCommandResponse,\n type ComputerUseCommandResult,\n type ComputerUseCommandStatus,\n type ComputerUseHost,\n type ComputerUseHostListResponse,\n type ComputerUsePluginCommandKind,\n type ComputerUseReadCommandKind,\n type ComputerUseWriteCommandKind,\n type ZeroComputerUseAuditEventsContract,\n type ZeroComputerUseAuthorizationRequestsContract,\n type ZeroComputerUseCommandContract,\n type ZeroComputerUseHeartbeatContract,\n type ZeroComputerUseHostCommandsContract,\n type ZeroComputerUseHostsContract,\n type ZeroComputerUsePluginCommandContract,\n type ZeroComputerUseWriteCommandContract,\n} from \"./zero-computer-use\";\nexport {\n COMPUTER_USE_FILESYSTEM_MCP_PACKAGE,\n COMPUTER_USE_FILESYSTEM_MCP_VERSION,\n COMPUTER_USE_FILESYSTEM_PLUGIN,\n COMPUTER_USE_PLUGIN_CALL_KIND,\n COMPUTER_USE_PLUGIN_RESULT_BLOB_MAX_BYTES,\n COMPUTER_USE_PLUGIN_RESULT_INLINE_JSON_MAX_BYTES,\n COMPUTER_USE_PLUGIN_RESULT_INLINE_TEXT_MAX_BYTES,\n computerUseFilesystemToolArgumentsSchema,\n computerUseFilesystemToolIsDestructive,\n computerUseFilesystemToolNames,\n computerUseFilesystemToolSchema,\n computerUsePluginCallBodySchema,\n computerUsePluginCallRequiredCapabilities,\n computerUsePluginCapability,\n computerUsePluginNameSchema,\n computerUsePluginToolCapability,\n isComputerUseFilesystemTool,\n isComputerUsePluginCallPayload,\n parseComputerUseFilesystemToolArguments,\n type ComputerUseFilesystemTool,\n type ComputerUsePluginCallBody,\n type ComputerUsePluginCallPayload,\n type ComputerUsePluginName,\n} from \"./zero-computer-use-plugins\";\nexport {\n zeroInsightsContract,\n type ZeroInsightsContract,\n type InsightsResponse,\n type DayInsight,\n} from \"./zero-insights\";\nexport {\n pushSubscriptionsContract,\n type PushSubscriptionsContract,\n} from \"./push-subscriptions\";\nexport {\n avatarVideoAspectRatioSchema,\n avatarVideoScreenStyleSchema,\n avatarVideoVoiceIdSchema,\n zeroAvatarVideoAvatarSchema,\n zeroAvatarVideoAvatarsQuerySchema,\n zeroAvatarVideoAvatarsResponseSchema,\n zeroAvatarVideoContract,\n zeroAvatarVideoGenerateRequestSchema,\n zeroAvatarVideoGenerateResponseSchema,\n zeroAvatarVideoVoiceSchema,\n zeroAvatarVideoVoicesQuerySchema,\n zeroAvatarVideoVoicesResponseSchema,\n type ZeroAvatarVideoAvatar,\n type ZeroAvatarVideoAvatarsQuery,\n type ZeroAvatarVideoContract,\n type ZeroAvatarVideoGenerateRequest,\n type ZeroAvatarVideoGenerateResponse,\n type ZeroAvatarVideoVoice,\n type ZeroAvatarVideoVoicesQuery,\n} from \"./zero-avatar-video\";\nexport {\n zeroImageIoGenerateContract,\n zeroImageIoGenerateRequestSchema,\n zeroImageIoGenerateResponseSchema,\n type ZeroImageIoGenerateContract,\n type ZeroImageIoGenerateRequest,\n type ZeroImageIoGenerateResponse,\n} from \"./zero-image-io-generate\";\nexport {\n ZERO_IMAGE_INTERPRET_MARKS_MAX_REGIONS,\n ZERO_IMAGE_INTERPRET_MARKS_MAX_INSTRUCTION_LENGTH,\n zeroImageIoInterpretMarksContract,\n zeroImageIoInterpretMarksRegionSchema,\n zeroImageIoInterpretMarksRequestSchema,\n zeroImageIoInterpretMarksResultSchema,\n zeroImageIoInterpretMarksResponseSchema,\n type ZeroImageIoInterpretMarksContract,\n type ZeroImageIoInterpretMarksRegion,\n type ZeroImageIoInterpretMarksRequest,\n type ZeroImageIoInterpretMarksResult,\n type ZeroImageIoInterpretMarksResponse,\n} from \"./zero-image-io-interpret-marks\";\nexport {\n zeroImageShareXContract,\n zeroImageShareXRequestSchema,\n zeroImageShareXResponseSchema,\n type ZeroImageShareXContract,\n type ZeroImageShareXRequest,\n type ZeroImageShareXResponse,\n} from \"./zero-image-share-x\";\nexport {\n zeroMailContract,\n zeroMailDraftSchema,\n zeroMailDraftStatusSchema,\n zeroMailProviderSchema,\n type ZeroMailContract,\n type ZeroMailDraft,\n type ZeroMailDraftStatus,\n type ZeroMailProvider,\n} from \"./zero-mail\";\nexport {\n zeroBankingContract,\n zeroBankingProviderSchema,\n zeroBankingAccountSchema,\n zeroBankingBalanceSchema,\n zeroBankingTransactionSchema,\n zeroBankingAccountsResponseSchema,\n zeroBankingBalancesRequestSchema,\n zeroBankingBalancesResponseSchema,\n zeroBankingTransactionsRequestSchema,\n zeroBankingTransactionsResponseSchema,\n type ZeroBankingContract,\n type ZeroBankingAccount,\n type ZeroBankingBalance,\n type ZeroBankingTransaction,\n type ZeroBankingAccountsResponse,\n type ZeroBankingBalancesRequest,\n type ZeroBankingBalancesResponse,\n type ZeroBankingTransactionsRequest,\n type ZeroBankingTransactionsResponse,\n} from \"./zero-banking\";\nexport {\n zeroMapsContract,\n zeroMapsOperationSchema,\n zeroMapsResponseSchema,\n zeroMapsGeocodeRequestSchema,\n zeroMapsReverseGeocodeRequestSchema,\n zeroMapsDirectionsRequestSchema,\n zeroMapsPlacesSearchRequestSchema,\n zeroMapsPlacesDetailsRequestSchema,\n type ZeroMapsContract,\n type ZeroMapsResponse,\n type ZeroMapsGeocodeRequest,\n type ZeroMapsReverseGeocodeRequest,\n type ZeroMapsDirectionsRequest,\n type ZeroMapsPlacesSearchRequest,\n type ZeroMapsPlacesDetailsRequest,\n} from \"./zero-maps\";\nexport {\n ZERO_AIR_QUALITY_ATTRIBUTION,\n ZERO_WEATHER_ATTRIBUTION,\n zeroWeatherContract,\n zeroWeatherOperationSchema,\n zeroWeatherUnitsSchema,\n zeroWeatherResponseSchema,\n zeroWeatherConditionsResponseSchema,\n zeroAirQualityResponseSchema,\n zeroWeatherCurrentRequestSchema,\n zeroWeatherForecastHourlyRequestSchema,\n zeroWeatherForecastDailyRequestSchema,\n zeroWeatherHistoryHourlyRequestSchema,\n zeroAirQualityCurrentRequestSchema,\n type ZeroWeatherContract,\n type ZeroWeatherResponse,\n type ZeroWeatherConditionsResponse,\n type ZeroAirQualityResponse,\n type ZeroWeatherCurrentRequest,\n type ZeroWeatherForecastHourlyRequest,\n type ZeroWeatherForecastDailyRequest,\n type ZeroWeatherHistoryHourlyRequest,\n type ZeroAirQualityCurrentRequest,\n} from \"./zero-weather\";\nexport {\n zeroVideoIoGenerateContract,\n zeroVideoIoGenerateRequestSchema,\n zeroVideoIoGenerateResponseSchema,\n type ZeroVideoIoGenerateContract,\n type ZeroVideoIoGenerateRequest,\n type ZeroVideoIoGenerateResponse,\n} from \"./zero-video-io-generate\";\nexport {\n zeroBuiltInGenerationContract,\n zeroBuiltInGenerationTypeSchema,\n zeroBuiltInGenerationStatusSchema,\n zeroBuiltInGenerationRealtimeSubscriptionSchema,\n zeroBuiltInGenerationAcceptedResponseSchema,\n zeroBuiltInGenerationResponseSchema,\n type ZeroBuiltInGenerationContract,\n type ZeroBuiltInGenerationType,\n type ZeroBuiltInGenerationStatus,\n type ZeroBuiltInGenerationRealtimeSubscription,\n type ZeroBuiltInGenerationAcceptedResponse,\n type ZeroBuiltInGenerationResponse,\n} from \"./zero-built-in-generation\";\nexport {\n zeroVoiceIoQuotaContract,\n audioInputQuotaResponseSchema,\n type ZeroVoiceIoQuotaContract,\n type AudioInputQuotaResponse,\n} from \"./zero-voice-io-quota\";\nexport {\n zeroVoiceIoSpeechContract,\n zeroVoiceIoSpeechRequestSchema,\n zeroVoiceIoSpeechResponseSchema,\n type ZeroVoiceIoSpeechContract,\n type ZeroVoiceIoSpeechRequest,\n type ZeroVoiceIoSpeechResponse,\n} from \"./zero-voice-io-speech\";\nexport {\n zeroVoiceIoSttContract,\n zeroVoiceIoSttResponseSchema,\n zeroVoiceIoSttQuotaErrorSchema,\n type ZeroVoiceIoSttContract,\n type ZeroVoiceIoSttResponse,\n} from \"./zero-voice-io-stt\";\nexport {\n zeroUploadsContract,\n type ZeroUploadsContract,\n type UploadPrepareResponse,\n type UploadImportImageResponse,\n} from \"./zero-uploads\";\nexport {\n zeroGoalsContract,\n zeroGoalCreateRequestSchema,\n zeroGoalEditRequestSchema,\n zeroGoalEventSchema,\n zeroGoalResponseSchema,\n zeroGoalStatusSchema,\n type ZeroGoalCreateRequest,\n type ZeroGoalEditRequest,\n type ZeroGoalEvent,\n type ZeroGoalResponse,\n type ZeroGoalStatus,\n type ZeroGoalsContract,\n} from \"./zero-goals\";\nexport {\n zeroHostContract,\n hostedSiteFileSchema,\n hostedSitePrepareRequestSchema,\n hostedSitePrepareResponseSchema,\n hostedSiteCompleteResponseSchema,\n hostedSiteSlugSchema,\n type HostedSitePrepareRequest,\n type HostedSitePrepareResponse,\n type HostedSiteCompleteResponse,\n type ZeroHostContract,\n} from \"./zero-host\";\nexport {\n zeroIntegrationsTelegramContract,\n type ZeroIntegrationsTelegramContract,\n type TelegramBot,\n type TelegramBotStatus,\n type TelegramListResponse,\n type TelegramLinkStatusResponse,\n type TelegramSetupStatus,\n} from \"./zero-integrations-telegram\";\nexport {\n zeroIntegrationsAgentPhoneContract,\n type ZeroIntegrationsAgentPhoneContract,\n type AgentPhoneConnectResponse,\n type AgentPhoneLinkStatusResponse,\n type AgentPhoneStartLinkResponse,\n} from \"./zero-integrations-agentphone\";\n","import { z } from \"zod\";\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const buildCommitShaSchema = z\n .string()\n .regex(/^[0-9a-f]{40}$/u)\n .nullable();\n\nexport const buildVersionSchema = z.string().min(1).nullable().optional();\n\nexport const buildInfoResponseSchema = z.object({\n commitSha: buildCommitShaSchema,\n version: buildVersionSchema,\n});\n\nexport const buildInfoContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/build-info\",\n responses: {\n 200: buildInfoResponseSchema,\n },\n summary: \"Get API build information\",\n },\n});\n\nexport type BuildInfoContract = typeof buildInfoContract;\nexport type BuildInfoResponse = z.infer<typeof buildInfoResponseSchema>;\nexport type BuildInfoRouteResponse = {\n readonly status: 200;\n readonly body: BuildInfoResponse;\n};\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema, type ApiErrorResponse } from \"./errors\";\n\nconst c = initContract();\n\nexport const healthResponseSchema = z.object({\n status: z.literal(\"ok\"),\n});\n\nexport const healthContract = c.router({\n check: {\n method: \"GET\",\n path: \"/health\",\n responses: {\n 200: healthResponseSchema,\n },\n summary: \"Check API health\",\n },\n});\n\nexport const healthAuthContract = c.router({\n check: {\n method: \"GET\",\n path: \"/health/auth\",\n headers: authHeadersSchema,\n query: z.object({\n requiredCapability: z.string().optional(),\n acceptAnySandboxCapability: z.string().optional(),\n accept: z.string().optional(),\n }),\n responses: {\n 200: healthResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"Check authenticated API health\",\n },\n});\n\nexport type HealthContract = typeof healthContract;\nexport type HealthAuthContract = typeof healthAuthContract;\nexport type HealthResponse = z.infer<typeof healthResponseSchema>;\nexport type HealthRouteResponse = {\n readonly status: 200;\n readonly body: HealthResponse;\n};\nexport type HealthAuthRouteResponse =\n | HealthRouteResponse\n | {\n readonly status: 401;\n readonly body: ApiErrorResponse;\n }\n | {\n readonly status: 403;\n readonly body: ApiErrorResponse;\n };\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const desktopAuthCallbackSchemes = [\n \"ai.vm0.zero.desktop\",\n \"ai.vm0.zero.desktop.dev\",\n] as const;\nexport const defaultDesktopAuthCallbackScheme = desktopAuthCallbackSchemes[0];\nexport const desktopAuthCallbackSchemeSchema = z.enum(\n desktopAuthCallbackSchemes,\n);\nexport type DesktopAuthCallbackScheme = z.infer<\n typeof desktopAuthCallbackSchemeSchema\n>;\n\nexport const desktopAuthHandoffStatusSchema = z.enum([\n \"pending\",\n \"consumed\",\n \"completed\",\n]);\nexport type DesktopAuthHandoffStatus = z.infer<\n typeof desktopAuthHandoffStatusSchema\n>;\n\nconst desktopAuthHandoffPathParamsSchema = z.object({\n handoffId: z.string().uuid(),\n});\n\nexport const desktopAuthHandoffContract = c.router({\n create: {\n method: \"POST\",\n path: \"/api/desktop-auth/handoff\",\n headers: authHeadersSchema,\n body: z\n .object({\n callbackScheme: desktopAuthCallbackSchemeSchema.optional(),\n })\n .optional(),\n responses: {\n 200: z.object({\n callbackUrl: z.string(),\n handoffId: z.string().uuid(),\n }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Create a desktop auth handoff code\",\n },\n status: {\n method: \"GET\",\n path: \"/api/desktop-auth/handoff/:handoffId\",\n pathParams: desktopAuthHandoffPathParamsSchema,\n headers: authHeadersSchema,\n responses: {\n 200: z.object({\n status: desktopAuthHandoffStatusSchema,\n }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Read desktop auth handoff status\",\n },\n complete: {\n method: \"POST\",\n path: \"/api/desktop-auth/handoff/:handoffId/complete\",\n pathParams: desktopAuthHandoffPathParamsSchema,\n headers: authHeadersSchema,\n body: z.object({}).optional(),\n responses: {\n 200: z.object({\n status: z.literal(\"completed\"),\n }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Mark desktop auth handoff complete\",\n },\n});\n\nexport const desktopAuthConsumeContract = c.router({\n consume: {\n method: \"POST\",\n path: \"/api/desktop-auth/consume\",\n body: z.object({\n code: z.string().min(1, \"code is required\"),\n }),\n responses: {\n 200: z.object({\n token: z.string(),\n }),\n 400: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Consume a desktop auth handoff code\",\n },\n});\n\nexport type DesktopAuthHandoffContract = typeof desktopAuthHandoffContract;\nexport type DesktopAuthConsumeContract = typeof desktopAuthConsumeContract;\n","import { z } from \"zod\";\nimport { firewallsSchema } from \"@vm0/connectors/firewall-types\";\nimport { CANONICAL_WORKING_DIR } from \"./runners\";\n\nexport const MOUNT_PATH_TEMPLATE = \"${{ working_dir }}\";\n\nexport function expandMountPath(mountPath: string | undefined): string {\n if (mountPath === undefined || mountPath === MOUNT_PATH_TEMPLATE) {\n return CANONICAL_WORKING_DIR;\n }\n return mountPath;\n}\n\n/**\n * Agent name regex: 3-64 chars, letters/numbers/hyphens, start and end with alphanumeric.\n */\nexport const AGENT_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/;\n\n/**\n * Capabilities for the zero-layer capability system (ZERO_TOKEN).\n * These protect /api/zero/* routes only.\n */\nexport const ZERO_CAPABILITIES = [\n \"agent:read\",\n \"agent:write\",\n \"agent:delete\",\n \"agent-run:read\",\n \"goal:read\",\n \"goal:agent-result:write\",\n \"goal:user-control:write\",\n \"github:read\",\n \"github:write\",\n \"slack:write\",\n \"feishu:write\",\n \"teams:write\",\n \"phone:read\",\n \"phone:write\",\n \"telegram:read\",\n \"telegram:write\",\n \"chat-event:read\",\n \"chat-event:write\",\n \"chat-thread:read\",\n \"chat-thread:write\",\n \"connector:read\",\n \"connector:write\",\n \"billing:read\",\n \"billing:write\",\n \"banking:read\",\n \"maps:read\",\n \"weather:read\",\n \"scrape:read\",\n \"people-search:read\",\n \"web-search:read\",\n \"image-recognition:write\",\n \"finance:read\",\n \"computer-use:write\",\n \"browser:read\",\n \"browser:write\",\n \"file:read\",\n \"file:write\",\n \"host:read\",\n \"host:write\",\n] as const;\n\n/** Inferred union type of all zero capability strings. */\nexport type ZeroCapability = (typeof ZERO_CAPABILITIES)[number];\n\n/** Metadata for a single zero capability. */\nexport interface ZeroCapabilityMeta {\n group: string;\n label: string;\n}\n\n/**\n * Exhaustive mapping from every zero capability to its UI group and label.\n * Adding a new capability to ZERO_CAPABILITIES without updating this record\n * will produce a TypeScript compile error.\n */\nexport const ZERO_CAPABILITY_META: Record<ZeroCapability, ZeroCapabilityMeta> =\n {\n \"agent:read\": { group: \"Agent\", label: \"Read agents\" },\n \"agent:write\": { group: \"Agent\", label: \"Create & update agents\" },\n \"agent:delete\": { group: \"Agent\", label: \"Delete agents\" },\n \"agent-run:read\": { group: \"Agent Runs\", label: \"View runs & telemetry\" },\n \"goal:read\": { group: \"Goals\", label: \"Read thread goals\" },\n \"goal:agent-result:write\": {\n group: \"Goals\",\n label: \"Complete or block thread goals\",\n },\n \"goal:user-control:write\": {\n group: \"Goals\",\n label: \"Create and manage thread goals\",\n },\n \"github:read\": {\n group: \"Integrations\",\n label: \"Download GitHub files\",\n },\n \"github:write\": {\n group: \"Integrations\",\n label: \"Send GitHub comments and files\",\n },\n \"slack:write\": { group: \"Integrations\", label: \"Send Slack messages\" },\n \"feishu:write\": {\n group: \"Integrations\",\n label: \"Send Feishu messages and files\",\n },\n \"teams:write\": {\n group: \"Integrations\",\n label: \"Send Microsoft Teams messages and files\",\n },\n \"phone:read\": {\n group: \"Integrations\",\n label: \"Download AgentPhone files\",\n },\n \"phone:write\": {\n group: \"Integrations\",\n label: \"Send AgentPhone messages and files\",\n },\n \"telegram:read\": {\n group: \"Integrations\",\n label: \"Download Telegram files\",\n },\n \"telegram:write\": {\n group: \"Integrations\",\n label: \"Send Telegram messages and files\",\n },\n \"chat-event:read\": {\n group: \"Integrations\",\n label: \"Read chat messages\",\n },\n \"chat-event:write\": {\n group: \"Integrations\",\n label: \"Send & cancel chat messages\",\n },\n \"chat-thread:read\": {\n group: \"Chat Threads\",\n label: \"Read chat thread metadata\",\n },\n \"chat-thread:write\": {\n group: \"Chat Threads\",\n label: \"Update chat thread metadata\",\n },\n \"connector:read\": { group: \"Connectors\", label: \"View connected services\" },\n \"connector:write\": {\n group: \"Connectors\",\n label: \"Create and configure custom connectors\",\n },\n \"billing:read\": { group: \"Billing\", label: \"View billing and credits\" },\n \"billing:write\": {\n group: \"Billing\",\n label: \"Buy credits and manage billing\",\n },\n \"banking:read\": {\n group: \"Banking\",\n label: \"Read enabled banking accounts\",\n },\n \"maps:read\": { group: \"Maps\", label: \"Use managed maps services\" },\n \"weather:read\": {\n group: \"Weather\",\n label: \"Use managed weather and air quality services\",\n },\n \"scrape:read\": {\n group: \"Scrape\",\n label: \"Use managed web scraping\",\n },\n \"people-search:read\": {\n group: \"People Search\",\n label: \"Use managed people search\",\n },\n \"web-search:read\": {\n group: \"Web Search\",\n label: \"Use managed web search\",\n },\n \"image-recognition:write\": {\n group: \"Image Recognition\",\n label: \"Recognize uploaded images\",\n },\n \"finance:read\": {\n group: \"Finance\",\n label: \"Use managed finance services\",\n },\n \"computer-use:write\": {\n group: \"Computer Use\",\n label: \"Control desktop apps\",\n },\n \"browser:read\": {\n group: \"Browser\",\n label: \"View managed browser sessions\",\n },\n \"browser:write\": {\n group: \"Browser\",\n label: \"Create and control managed browser sessions\",\n },\n \"file:read\": { group: \"Files\", label: \"Download uploaded files\" },\n \"file:write\": { group: \"Files\", label: \"Upload files\" },\n \"host:read\": { group: \"Hosting\", label: \"View hosted sites\" },\n \"host:write\": { group: \"Hosting\", label: \"Publish hosted sites\" },\n };\n\n/**\n * Agent name validation schema\n * - Must be 3-64 characters\n * - Letters, numbers, and hyphens only\n * - Must start and end with letter or number\n */\nconst agentNameSchema = z\n .string()\n .min(3, \"Agent name must be at least 3 characters\")\n .max(64, \"Agent name must be 64 characters or less\")\n .regex(\n AGENT_NAME_REGEX,\n \"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens\",\n );\n\n/**\n * Volume configuration schema\n */\nconst volumeConfigSchema = z.object({\n name: z.string().min(1, \"Volume name is required\"),\n version: z.string().min(1, \"Volume version is required\"),\n /** When true, skip mounting without error if volume doesn't exist */\n optional: z.boolean().optional(),\n});\n\n/**\n * Mount path must be an absolute path (starts with \"/\") or the canonical\n * workspace template. When omitted, artifacts default to the canonical\n * workspace root at resolution time.\n */\nconst mountPathSchema = z\n .string()\n .min(1, \"mount_path cannot be empty\")\n .refine((val) => {\n return val === MOUNT_PATH_TEMPLATE || val.startsWith(\"/\");\n }, \"mount_path must be an absolute path or ${{ working_dir }}\");\n\n/**\n * Artifact entry in compose.\n * - name: required storage name\n * - version: optional, defaults to \"latest\" at resolution time\n * - mount_path: optional, defaults to the canonical workspace root at\n * resolution time. `${{ working_dir }}` is also accepted as a shorthand for\n * the same canonical workspace root.\n */\nconst artifactConfigSchema = z.object({\n name: z.string().min(1, \"Artifact name is required\"),\n version: z.string().min(1).optional(),\n mount_path: mountPathSchema.optional(),\n});\n\nconst artifactsArraySchema = z.array(artifactConfigSchema).refine((items) => {\n const names = items.map((i) => {\n return i.name;\n });\n return new Set(names).size === names.length;\n}, \"Artifact names must be unique\");\n\nconst agentFirewallsMapSchema = z.record(\n z.string(),\n z.object({\n permissions: z.union([z.literal(\"all\"), z.array(z.string()).min(1)]),\n }),\n);\nconst legacyAgentFirewallsSchema = z.union([\n agentFirewallsMapSchema,\n firewallsSchema,\n]);\n\n/**\n * Agent definition schema\n */\nconst agentDefinitionSchema = z.object({\n description: z.string().optional(),\n framework: z.enum([\"claude-code\", \"codex\"]),\n volumes: z.array(z.string()).optional(),\n environment: z.record(z.string(), z.string()).optional(),\n /**\n * Path to instructions file (e.g., AGENTS.md).\n * Auto-uploaded as volume and mounted at /home/user/.claude/CLAUDE.md\n */\n instructions: z\n .string()\n .min(1, \"Instructions path cannot be empty\")\n .refine((val) => {\n return (\n !val.includes(\"..\") && !val.startsWith(\"/\") && !val.startsWith(\"\\\\\")\n );\n }, \"Instructions path must be a relative path without '..' segments\")\n .optional(),\n /**\n * @deprecated Skills are no longer processed by the CLI path. Declare\n * mounts via `volumes:` / `--volume` instead. Field retained as optional\n * so older CLI clients posting `skills:` are not rejected; server strips\n * the field before persisting compose content.\n */\n skills: z.array(z.string()).optional(),\n /**\n * Route this agent to a self-hosted runner instead of E2B.\n * When specified, runs will be queued for the specified runner group.\n */\n experimental_runner: z\n .object({\n group: z\n .string()\n .regex(\n /^[a-z0-9-]+\\/[a-z0-9-]+$/,\n \"Runner group must be in vm0/<name> format (e.g., vm0/production)\",\n ),\n })\n .optional(),\n /**\n * VM profile for resource allocation (e.g., \"vm0/default\").\n * Determines rootfs image and VM resources (vCPU, memory).\n * Defaults to \"vm0/default\" when omitted.\n */\n experimental_profile: z\n .string()\n .regex(\n /^[a-z0-9-]+\\/[a-z0-9-]+$/,\n \"Profile must be in org/name format (e.g., vm0/default)\",\n )\n .optional(),\n /**\n * External firewall rules for proxy-side token replacement.\n * Map format: { slack: { permissions: [...] | \"all\" } }\n * Resolved to full ExpandedFirewallConfig[] at runtime.\n */\n firewalls: agentFirewallsMapSchema.optional(),\n});\n\n/**\n * Agent compose YAML content schema (CLI input — firewalls is map format)\n */\nconst agentComposeContentSchema = z.object({\n version: z.string().min(1, \"Version is required\"),\n agents: z.record(z.string(), agentDefinitionSchema),\n volumes: z.record(z.string(), volumeConfigSchema).optional(),\n artifacts: artifactsArraySchema.optional(),\n});\n\n/**\n * Agent compose content schema for API requests.\n * firewalls is no longer stored in compose content — all firewalls\n * are injected at runtime. The field accepts documented legacy map or expanded\n * array shapes for backward compatibility (ignored at runtime).\n */\nconst agentComposeApiContentSchema = z.object({\n version: z.string().min(1, \"Version is required\"),\n agents: z.record(\n z.string(),\n agentDefinitionSchema.extend({\n // Legacy: older compose versions may have this field (map or expanded array).\n // Accepted for backward compat but ignored at runtime.\n firewalls: legacyAgentFirewallsSchema.optional(),\n }),\n ),\n volumes: z.record(z.string(), volumeConfigSchema).optional(),\n artifacts: artifactsArraySchema.optional(),\n});\n\n/**\n * Compose response schema (used in GET responses)\n */\nconst composeResponseSchema = z.object({\n id: z.string(),\n name: z.string(),\n headVersionId: z.string().nullable(),\n content: agentComposeApiContentSchema.nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n});\n\n/**\n * Create/update compose response schema (used in POST responses)\n */\nconst createComposeResponseSchema = z.object({\n composeId: z.string(),\n name: z.string(),\n versionId: z.string(),\n action: z.enum([\"created\", \"existing\"]),\n updatedAt: z.string(),\n});\n\n/**\n * Compose list item schema (used in list response)\n */\nconst composeListItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n displayName: z.string().nullable().optional(),\n description: z.string().nullable().optional(),\n sound: z.string().nullable().optional(),\n headVersionId: z.string().nullable(),\n updatedAt: z.string(),\n});\n\n// Export schemas for reuse\nexport {\n agentNameSchema,\n volumeConfigSchema,\n artifactConfigSchema,\n artifactsArraySchema,\n agentDefinitionSchema,\n agentComposeContentSchema,\n agentComposeApiContentSchema,\n composeResponseSchema,\n createComposeResponseSchema,\n composeListItemSchema,\n};\n\n// Export inferred types for consumers\nexport type ComposeResponse = z.infer<typeof composeResponseSchema>;\nexport type ComposeListItem = z.infer<typeof composeListItemSchema>;\nexport type ArtifactConfig = z.infer<typeof artifactConfigSchema>;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport {\n agentComposeApiContentSchema,\n composeResponseSchema,\n createComposeResponseSchema,\n} from \"./composes\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst testEndpointNotFoundSchema = z.union([apiErrorSchema, z.string()]);\n\nexport const testAgentComposesContract = c.router({\n getByName: {\n method: \"GET\",\n path: \"/api/test/agent-composes\",\n headers: authHeadersSchema,\n query: z.object({\n name: z.string().min(1, \"Missing name query parameter\"),\n }),\n responses: {\n 200: composeResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: testEndpointNotFoundSchema,\n },\n summary: \"Get an agent compose by name for end-to-end tests\",\n },\n create: {\n method: \"POST\",\n path: \"/api/test/agent-composes\",\n headers: authHeadersSchema,\n body: z.object({\n content: agentComposeApiContentSchema,\n }),\n responses: {\n 200: createComposeResponseSchema,\n 201: createComposeResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: testEndpointNotFoundSchema,\n },\n summary: \"Create or update an agent compose for end-to-end tests\",\n },\n});\n\nexport type TestAgentComposesContract = typeof testAgentComposesContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { createRunResponseSchema, unifiedRunRequestSchema } from \"./runs\";\n\nconst c = initContract();\n\nexport const testAgentRunsContract = c.router({\n create: {\n method: \"POST\",\n path: \"/api/test/agent-runs\",\n headers: authHeadersSchema,\n body: unifiedRunRequestSchema,\n responses: {\n 201: createRunResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 404: z.union([apiErrorSchema, z.string()]),\n 429: apiErrorSchema,\n 422: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Create an agent run for end-to-end tests\",\n },\n});\n\nexport type TestAgentRunsContract = typeof testAgentRunsContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport type { ModelProviderType } from \"./model-provider-types\";\n\nconst c = initContract();\n\nexport const modelProviderSurfaceProtocolSchema = z.enum([\n \"anthropic-messages\",\n \"openai-responses\",\n]);\n\nexport type ModelProviderSurfaceProtocol = z.infer<\n typeof modelProviderSurfaceProtocolSchema\n>;\n\n/**\n * Custom gateways reuse the existing Claude Code and Codex runtime adapters.\n * The provider type is an internal adapter identity, not the gateway brand.\n */\nexport function getModelProviderTypeForSurfaceProtocol(\n protocol: ModelProviderSurfaceProtocol,\n): ModelProviderType {\n return protocol === \"anthropic-messages\"\n ? \"vercel-ai-gateway\"\n : \"vercel-ai-gateway-codex\";\n}\n\nexport const modelProviderSurfaceInputSchema = z.object({\n protocol: modelProviderSurfaceProtocolSchema,\n apiBaseUrl: z.string().min(1),\n authHeaderName: z.string().min(1),\n authHeaderTemplate: z.string().min(1),\n modelMappings: z.record(z.string(), z.string()),\n});\n\nexport const modelProviderSurfaceResponseSchema =\n modelProviderSurfaceInputSchema.extend({\n id: z.uuid(),\n createdAt: z.string(),\n updatedAt: z.string(),\n });\n\nexport const modelProviderConnectionResponseSchema = z.object({\n id: z.uuid(),\n displayName: z.string(),\n surfaces: z.array(modelProviderSurfaceResponseSchema),\n createdAt: z.string(),\n updatedAt: z.string(),\n});\n\nexport type ModelProviderConnectionResponse = z.infer<\n typeof modelProviderConnectionResponseSchema\n>;\n\nexport const modelProviderConnectionsResponseSchema = z.object({\n connections: z.array(modelProviderConnectionResponseSchema),\n});\n\nexport const createModelProviderConnectionRequestSchema = z.object({\n displayName: z.string().min(1),\n secret: z.string().min(1),\n surfaces: z.array(modelProviderSurfaceInputSchema).min(1).max(2),\n});\n\nexport const updateModelProviderConnectionRequestSchema = z.object({\n displayName: z.string().min(1),\n secret: z.string().min(1).optional(),\n surfaces: z.array(modelProviderSurfaceInputSchema).min(1).max(2),\n});\n\nexport type CreateModelProviderConnectionRequest = z.infer<\n typeof createModelProviderConnectionRequestSchema\n>;\nexport type UpdateModelProviderConnectionRequest = z.infer<\n typeof updateModelProviderConnectionRequestSchema\n>;\n\nexport const zeroModelProviderConnectionsMainContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/model-provider-connections\",\n headers: authHeadersSchema,\n responses: {\n 200: modelProviderConnectionsResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"List custom model provider connections\",\n },\n create: {\n method: \"POST\",\n path: \"/api/zero/model-provider-connections\",\n headers: authHeadersSchema,\n body: createModelProviderConnectionRequestSchema,\n responses: {\n 201: modelProviderConnectionResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Create a custom model provider connection\",\n },\n});\n\nexport const zeroModelProviderConnectionsByIdContract = c.router({\n update: {\n method: \"PUT\",\n path: \"/api/zero/model-provider-connections/:id\",\n headers: authHeadersSchema,\n pathParams: z.object({ id: z.uuid() }),\n body: updateModelProviderConnectionRequestSchema,\n responses: {\n 200: modelProviderConnectionResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Update a custom model provider connection\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/zero/model-provider-connections/:id\",\n headers: authHeadersSchema,\n pathParams: z.object({ id: z.uuid() }),\n responses: {\n 204: c.noBody(),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Delete a custom model provider connection\",\n },\n});\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport {\n requestedRunModelSchema,\n supportedRunModelSchema,\n} from \"./model-providers\";\n\nconst c = initContract();\n\nexport const userModelPreferenceResponseSchema = z.object({\n selectedModel: supportedRunModelSchema.nullable(),\n updatedAt: z.string().nullable(),\n});\n\nexport type UserModelPreferenceResponse = z.infer<\n typeof userModelPreferenceResponseSchema\n>;\n\nexport const updateUserModelPreferenceRequestSchema = z.object({\n selectedModel: requestedRunModelSchema.nullable(),\n});\n\nexport type UpdateUserModelPreferenceRequest = z.infer<\n typeof updateUserModelPreferenceRequestSchema\n>;\n\nexport const zeroUserModelPreferenceContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/user-model-preference\",\n headers: authHeadersSchema,\n responses: {\n 200: userModelPreferenceResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get current user's model-first preference\",\n },\n update: {\n method: \"PUT\",\n path: \"/api/zero/user-model-preference\",\n headers: authHeadersSchema,\n body: updateUserModelPreferenceRequestSchema,\n responses: {\n 200: userModelPreferenceResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Update current user's model-first preference\",\n },\n});\n\nexport type ZeroUserModelPreferenceContract =\n typeof zeroUserModelPreferenceContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const presentationImageOrientationSchema = z.enum([\n \"landscape\",\n \"portrait\",\n \"squarish\",\n]);\n\nexport const presentationImageResolveItemSchema = z\n .object({\n path: z.string().min(1).max(300),\n query: z.string().trim().min(1).max(160),\n intent: z.string().trim().min(1).max(200).optional(),\n orientation: presentationImageOrientationSchema.optional(),\n })\n .strict();\n\nexport const presentationImageResolveRequestSchema = z\n .object({\n items: z.array(presentationImageResolveItemSchema).min(1).max(40),\n })\n .strict();\n\nexport const presentationImageAssetSchema = z\n .object({\n src: z.url(),\n alt: z.string().min(1),\n source: z.enum([\"unsplash\", \"pexels\"]),\n sourceName: z.enum([\"Unsplash\", \"Pexels\"]),\n sourceUrl: z.url(),\n // Provider-neutral link rendered for the source in image attribution.\n sourceAttributionUrl: z.url(),\n // Deprecated compatibility field for published presentation and website\n // packages. It carries the same value as `sourceAttributionUrl`.\n unsplashUrl: z.url(),\n photographerName: z.string().min(1),\n photographerUrl: z.url(),\n license: z.enum([\"Unsplash\", \"Pexels\"]),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n color: z.string().min(1).optional(),\n blurHash: z.string().min(1).optional(),\n })\n .strict();\n\nexport const presentationImageResolveErrorSchema = z\n .object({\n code: z.enum([\"NO_RESULTS\", \"DOWNLOAD_TRACKING_FAILED\", \"PROVIDER_ERROR\"]),\n message: z.string().min(1),\n })\n .strict();\n\nexport const presentationImageResolvedItemSchema = z\n .object({\n path: z.string(),\n query: z.string(),\n status: z.literal(\"resolved\"),\n asset: presentationImageAssetSchema,\n })\n .strict();\n\nexport const presentationImageUnresolvedItemSchema = z\n .object({\n path: z.string(),\n query: z.string(),\n status: z.literal(\"unresolved\"),\n error: presentationImageResolveErrorSchema,\n })\n .strict();\n\nexport const presentationImageResolveResponseSchema = z\n .object({\n items: z.array(\n z.discriminatedUnion(\"status\", [\n presentationImageResolvedItemSchema,\n presentationImageUnresolvedItemSchema,\n ]),\n ),\n })\n .strict();\n\nexport type PresentationImageResolveRequest = z.infer<\n typeof presentationImageResolveRequestSchema\n>;\nexport type PresentationImageResolveItem = z.infer<\n typeof presentationImageResolveItemSchema\n>;\nexport type PresentationImageAsset = z.infer<\n typeof presentationImageAssetSchema\n>;\nexport type PresentationImageResolveResponse = z.infer<\n typeof presentationImageResolveResponseSchema\n>;\n\nexport const presentationImagesContract = c.router({\n resolve: {\n method: \"POST\",\n path: \"/api/presentation/images/resolve\",\n headers: authHeadersSchema,\n body: presentationImageResolveRequestSchema,\n responses: {\n 200: presentationImageResolveResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Resolve presentation image briefs through a server-side provider\",\n },\n});\n\nexport type PresentationImagesContract = typeof presentationImagesContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testTeamsDispatchProbeBodySchema = z.object({\n tenant_id: z.string(),\n conversation_id: z.string(),\n teams_user_id: z.string(),\n message_text: z.string(),\n service_url: z.string().optional(),\n tenant_name: z.string().nullable().optional(),\n team_id: z.string().nullable().optional(),\n team_name: z.string().nullable().optional(),\n channel_id: z.string().nullable().optional(),\n conversation_type: z.enum([\"personal\", \"channel\"]).optional(),\n activity_id: z.string().nullable().optional(),\n thread_id: z.string().optional(),\n teams_aad_object_id: z.string().nullable().optional(),\n teams_user_display_name: z.string().nullable().optional(),\n teams_user_principal_name: z.string().nullable().optional(),\n bot_id: z.string().nullable().optional(),\n bot_name: z.string().nullable().optional(),\n});\n\nexport const testTeamsDispatchProbeErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testTeamsDispatchProbeSuccessResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testTeamsDispatchProbeFailureResponseSchema = z.object({\n ok: z.literal(false),\n error: z.object({\n name: z.string(),\n message: z.string(),\n code: z.string().optional(),\n stack: z.string().optional(),\n }),\n});\n\nexport const testTeamsDispatchProbeResponseSchema = z.union([\n testTeamsDispatchProbeSuccessResponseSchema,\n testTeamsDispatchProbeFailureResponseSchema,\n]);\n\nexport const testTeamsDispatchProbeContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/test/teams-dispatch-probe\",\n body: testTeamsDispatchProbeBodySchema,\n responses: {\n 200: testTeamsDispatchProbeResponseSchema,\n 400: testTeamsDispatchProbeErrorSchema,\n 404: z.string(),\n },\n summary: \"Synchronously dispatch a Teams test message for diagnostics\",\n },\n});\n\nexport type TestTeamsDispatchProbeBody = z.infer<\n typeof testTeamsDispatchProbeBodySchema\n>;\nexport type TestTeamsDispatchProbeContract =\n typeof testTeamsDispatchProbeContract;\nexport type TestTeamsDispatchProbeResponse = z.infer<\n typeof testTeamsDispatchProbeResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const zeroEmailInboundContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/email/inbound\",\n headers: z.object({\n \"svix-id\": z.string().optional(),\n \"svix-timestamp\": z.string().optional(),\n \"svix-signature\": z.string().optional(),\n }),\n body: z.unknown(),\n responses: {\n 200: z.object({ received: z.literal(true) }),\n 401: z.object({ error: z.string() }),\n },\n summary: \"Handle signed Resend email delivery events\",\n },\n});\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\n\nconst c = initContract();\n\n/**\n * OAuth-style error response schema for device flow\n * Uses standard OAuth 2.0 error format\n */\nconst oauthErrorSchema = z.object({\n error: z.string(),\n error_description: z.string(),\n});\n\n/**\n * CLI auth device contract for /api/cli/auth/device\n */\nexport const cliAuthDeviceContract = c.router({\n /**\n * POST /api/cli/auth/device\n * Initiate device authorization flow\n */\n create: {\n method: \"POST\",\n path: \"/api/cli/auth/device\",\n body: z.object({}).optional(),\n responses: {\n 200: z.object({\n device_code: z.string(),\n user_code: z.string(),\n verification_path: z.string(),\n expires_in: z.number(),\n interval: z.number(),\n }),\n 500: oauthErrorSchema,\n },\n summary: \"Initiate device authorization flow\",\n },\n});\n\n/**\n * CLI auth token contract for /api/cli/auth/token\n */\nexport const cliAuthTokenContract = c.router({\n /**\n * POST /api/cli/auth/token\n * Exchange device code for access token\n */\n exchange: {\n method: \"POST\",\n path: \"/api/cli/auth/token\",\n body: z.object({\n device_code: z.string().min(1, \"device_code is required\"),\n }),\n responses: {\n // Success - token issued\n 200: z.object({\n access_token: z.string(),\n token_type: z.literal(\"Bearer\"),\n expires_in: z.number(),\n }),\n // Authorization pending\n 202: oauthErrorSchema,\n // Various error states\n 400: oauthErrorSchema,\n 500: oauthErrorSchema,\n },\n summary: \"Exchange device code for access token\",\n },\n});\n\n/**\n * Error response schema for structured API errors\n */\nconst apiErrorResponseSchema = z.object({\n error: z.object({ message: z.string(), code: z.string() }),\n});\n\nconst cliAuthApproveErrorSchema = z.object({\n success: z.literal(false),\n error: z.string(),\n});\n\n/**\n * CLI auth browser approval contract for /api/cli/auth/approve\n */\nexport const cliAuthApproveContract = c.router({\n /**\n * POST /api/cli/auth/approve\n * Approve a pending CLI device code from a browser session\n */\n approve: {\n method: \"POST\",\n path: \"/api/cli/auth/approve\",\n headers: authHeadersSchema,\n body: z.object({\n device_code: z.string().min(1, \"device_code is required\"),\n timezone: z.string().min(1).optional(),\n }),\n responses: {\n 200: z.object({ success: z.literal(true) }),\n 400: cliAuthApproveErrorSchema,\n 401: apiErrorResponseSchema,\n 403: apiErrorResponseSchema,\n },\n summary: \"Approve a CLI device authorization flow\",\n },\n});\n\nexport type CliAuthDeviceContract = typeof cliAuthDeviceContract;\nexport type CliAuthTokenContract = typeof cliAuthTokenContract;\nexport type CliAuthApproveContract = typeof cliAuthApproveContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n/**\n * Auth contract for /api/auth/me\n */\nexport const authContract = c.router({\n /**\n * GET /api/auth/me\n * Get current user information\n */\n me: {\n method: \"GET\",\n path: \"/api/auth/me\",\n headers: authHeadersSchema,\n responses: {\n 200: z.object({\n userId: z.string(),\n email: z.string(),\n }),\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get current user information\",\n },\n});\n\nexport type AuthContract = typeof authContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst exportJobStatusSchema = z.enum([\n \"pending\",\n \"running\",\n \"completed\",\n \"failed\",\n]);\n\nconst userExportJobSchema = z.object({\n id: z.string().uuid(),\n status: exportJobStatusSchema,\n createdAt: z.string(),\n completedAt: z.string().nullable(),\n expiresAt: z.string().nullable(),\n downloadUrl: z.string().url().nullable(),\n error: z.string().nullable(),\n});\n\nconst userExportStatusResponseSchema = z.object({\n job: userExportJobSchema.nullable(),\n canExport: z.boolean(),\n nextExportAt: z.string().nullable(),\n});\n\nconst userExportStartResponseSchema = z.object({\n jobId: z.string().uuid(),\n status: z.enum([\"pending\", \"running\"]),\n});\n\nexport const userExportContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/user/export\",\n headers: authHeadersSchema,\n responses: {\n 200: userExportStatusResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get current user export status\",\n },\n post: {\n method: \"POST\",\n path: \"/api/user/export\",\n headers: authHeadersSchema,\n body: z.undefined(),\n responses: {\n 202: userExportStartResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 429: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Start a user data export\",\n },\n});\n\nexport type UserExportContract = typeof userExportContract;\nexport type UserExportStatusResponse = z.infer<\n typeof userExportStatusResponseSchema\n>;\nexport type UserExportJob = z.infer<typeof userExportJobSchema>;\nexport type UserExportStartResponse = z.infer<\n typeof userExportStartResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const emailUnsubscribeQuerySchema = z.object({\n token: z.string().optional(),\n});\n\nexport const emailUnsubscribeResponseSchema = z.object({\n unsubscribed: z.literal(true),\n});\n\nexport const emailUnsubscribeErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const emailUnsubscribeContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/email/unsubscribe\",\n query: emailUnsubscribeQuerySchema,\n responses: {\n 302: c.noBody(),\n 400: emailUnsubscribeErrorSchema,\n },\n summary: \"Redirect to the app unsubscribe page\",\n },\n unsubscribe: {\n method: \"POST\",\n path: \"/api/email/unsubscribe\",\n query: emailUnsubscribeQuerySchema,\n body: z.undefined(),\n responses: {\n 200: emailUnsubscribeResponseSchema,\n 400: emailUnsubscribeErrorSchema,\n },\n summary: \"Unsubscribe a user from system-initiated emails\",\n },\n});\n\nexport type EmailUnsubscribeContract = typeof emailUnsubscribeContract;\nexport type EmailUnsubscribeQuery = z.infer<typeof emailUnsubscribeQuerySchema>;\nexport type EmailUnsubscribeResponse = z.infer<\n typeof emailUnsubscribeResponseSchema\n>;\nexport type EmailUnsubscribeError = z.infer<typeof emailUnsubscribeErrorSchema>;\n","import { z } from \"zod\";\n\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst triggerMorningBriefResponseSchema = z.object({\n runId: z.string().nullable(),\n briefDate: z.string(),\n queued: z.boolean(),\n});\n\n/**\n * Manual Morning Brief trigger for /api/zero/morning-brief/trigger\n *\n * Testing entry point gated by the manualMorningBrief feature switch:\n * immediately runs the collect → agent-run → email pipeline for the caller.\n */\nexport const zeroMorningBriefContract = c.router({\n trigger: {\n method: \"POST\",\n path: \"/api/zero/morning-brief/trigger\",\n headers: authHeadersSchema,\n body: z.object({}),\n responses: {\n 200: triggerMorningBriefResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Trigger a morning brief immediately for the current user\",\n },\n});\n\nexport type ZeroMorningBriefContract = typeof zeroMorningBriefContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const emailMorningBriefUnsubscribeQuerySchema = z.object({\n token: z.string().optional(),\n});\n\nexport const emailMorningBriefUnsubscribeResponseSchema = z.object({\n unsubscribed: z.literal(true),\n});\n\nexport const emailMorningBriefUnsubscribeErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const emailMorningBriefUnsubscribeContract = c.router({\n unsubscribe: {\n method: \"POST\",\n path: \"/api/email/morning-brief/unsubscribe\",\n query: emailMorningBriefUnsubscribeQuerySchema,\n body: z.undefined(),\n responses: {\n 200: emailMorningBriefUnsubscribeResponseSchema,\n 400: emailMorningBriefUnsubscribeErrorSchema,\n },\n summary: \"One-click List-Unsubscribe for the Morning Brief\",\n },\n});\n\nexport type EmailMorningBriefUnsubscribeContract =\n typeof emailMorningBriefUnsubscribeContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testOAuthProviderAuthorizeErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testOAuthProviderAuthorizeQuerySchema = z.object({\n client_id: z.string().optional(),\n redirect_uri: z.string().optional(),\n response_type: z.string().optional(),\n scenario: z.string().optional(),\n scope: z.string().optional(),\n state: z.string().optional(),\n});\n\nexport const testOAuthProviderAuthorizeContract = c.router({\n authorize: {\n method: \"GET\",\n path: \"/api/test/oauth-provider/authorize\",\n query: testOAuthProviderAuthorizeQuerySchema,\n responses: {\n 302: c.noBody(),\n 400: testOAuthProviderAuthorizeErrorSchema,\n 404: z.string(),\n },\n summary: \"Synthetic OAuth authorize endpoint for test connector flows\",\n },\n});\n\nexport type TestOAuthProviderAuthorizeContract =\n typeof testOAuthProviderAuthorizeContract;\nexport type TestOAuthProviderAuthorizeQuery = z.infer<\n typeof testOAuthProviderAuthorizeQuerySchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testOAuthProviderEchoErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testOAuthProviderEchoResponseSchema = z.object({\n authorization: z.string(),\n receivedAt: z.string(),\n});\n\nexport const testOAuthProviderEchoContract = c.router({\n echo: {\n method: \"GET\",\n path: \"/api/test/oauth-provider/echo\",\n responses: {\n 200: testOAuthProviderEchoResponseSchema,\n 401: testOAuthProviderEchoErrorSchema,\n 404: z.string(),\n },\n summary: \"Synthetic protected upstream endpoint for test connector flows\",\n },\n});\n\nexport type TestOAuthProviderEchoContract =\n typeof testOAuthProviderEchoContract;\nexport type TestOAuthProviderEchoResponse = z.infer<\n typeof testOAuthProviderEchoResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testOAuthProviderTokenErrorSchema = z.object({\n error: z.string(),\n error_description: z.string().optional(),\n});\n\nexport const testOAuthProviderTokenResponseSchema = z.object({\n access_token: z.string(),\n refresh_token: z.string().nullable().optional(),\n token_type: z.literal(\"Bearer\"),\n expires_in: z.number(),\n scope: z.string(),\n});\n\nexport const testOAuthProviderTokenContract = c.router({\n token: {\n method: \"POST\",\n path: \"/api/test/oauth-provider/token\",\n body: c.type<string>(),\n responses: {\n 200: testOAuthProviderTokenResponseSchema,\n 400: testOAuthProviderTokenErrorSchema,\n 401: testOAuthProviderTokenErrorSchema,\n 404: z.string(),\n },\n summary: \"Synthetic OAuth token endpoint for test connector flows\",\n },\n});\n\nexport type TestOAuthProviderTokenContract =\n typeof testOAuthProviderTokenContract;\nexport type TestOAuthProviderTokenResponse = z.infer<\n typeof testOAuthProviderTokenResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testOAuthProviderDeviceAuthErrorSchema = z.object({\n error: z.string(),\n error_description: z.string().optional(),\n});\n\nexport const testOAuthProviderDeviceAuthResponseSchema = z.object({\n device_code: z.string(),\n user_code: z.string(),\n verification_uri: z.string(),\n verification_uri_complete: z.string(),\n expires_in: z.number(),\n interval: z.number(),\n});\n\nexport const testOAuthProviderDeviceAuthContract = c.router({\n deviceAuth: {\n method: \"POST\",\n path: \"/api/test/oauth-provider/device/code\",\n body: c.type<string>(),\n responses: {\n 200: testOAuthProviderDeviceAuthResponseSchema,\n 400: testOAuthProviderDeviceAuthErrorSchema,\n 401: testOAuthProviderDeviceAuthErrorSchema,\n 404: z.string(),\n },\n summary:\n \"Synthetic OAuth device authorization endpoint for test connector flows\",\n },\n});\n\nexport type TestOAuthProviderDeviceAuthContract =\n typeof testOAuthProviderDeviceAuthContract;\nexport type TestOAuthProviderDeviceAuthResponse = z.infer<\n typeof testOAuthProviderDeviceAuthResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testOAuthProviderUserinfoErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testOAuthProviderUserinfoResponseSchema = z.object({\n email: z.string(),\n id: z.string(),\n username: z.string(),\n});\n\nexport const testOAuthProviderUserinfoContract = c.router({\n userinfo: {\n method: \"GET\",\n path: \"/api/test/oauth-provider/userinfo\",\n responses: {\n 200: testOAuthProviderUserinfoResponseSchema,\n 401: testOAuthProviderUserinfoErrorSchema,\n 404: z.string(),\n },\n summary: \"Synthetic OAuth userinfo endpoint for test connector flows\",\n },\n});\n\nexport type TestOAuthProviderUserinfoContract =\n typeof testOAuthProviderUserinfoContract;\nexport type TestOAuthProviderUserinfoResponse = z.infer<\n typeof testOAuthProviderUserinfoResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nconst testComputerUseStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testComputerUseStatePostBodySchema = z.object({\n user_id: z.string().optional(),\n org_id: z.string().optional(),\n trigger_source: z.enum([\"web\", \"slack\", \"teams\"]).optional(),\n canonical_thread: z.boolean().optional(),\n});\n\nexport const testComputerUseStatePostResponseSchema = z.object({\n ok: z.literal(true),\n compose_id: z.string(),\n run_id: z.string(),\n session_id: z.string(),\n thread_id: z.string().nullable(),\n});\n\nexport const testComputerUseStateGetResponseSchema = z.object({\n source: z.enum([\"web\", \"slack\", \"teams\"]).nullable(),\n computer_use_host_id: z.string().nullable(),\n});\n\nexport const testComputerUseStateDeleteResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testComputerUseStateContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/test/computer-use-state\",\n body: testComputerUseStatePostBodySchema,\n responses: {\n 200: testComputerUseStatePostResponseSchema,\n 400: testComputerUseStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Seed computer-use e2e run state\",\n },\n get: {\n method: \"GET\",\n path: \"/api/test/computer-use-state\",\n query: z.object({\n run_id: z.string().optional(),\n }),\n responses: {\n 200: testComputerUseStateGetResponseSchema,\n 400: testComputerUseStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Read computer-use e2e run state\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/test/computer-use-state\",\n query: z.object({\n run_id: z.string().optional(),\n }),\n responses: {\n 200: testComputerUseStateDeleteResponseSchema,\n 400: testComputerUseStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Clear computer-use e2e run state\",\n },\n});\n\nexport type TestComputerUseStateContract = typeof testComputerUseStateContract;\nexport type TestComputerUseStatePostResponse = z.infer<\n typeof testComputerUseStatePostResponseSchema\n>;\nexport type TestComputerUseStateGetResponse = z.infer<\n typeof testComputerUseStateGetResponseSchema\n>;\nexport type TestComputerUseStateDeleteResponse = z.infer<\n typeof testComputerUseStateDeleteResponseSchema\n>;\n","import { z } from \"zod\";\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\n// Test-only support actions for infrastructure fixtures used by API suites.\nexport const testRuntimeStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testRuntimeStateActionBodySchema = z.discriminatedUnion(\"action\", [\n z.object({\n action: z.literal(\"seed-vm0-managed-default-model-key\"),\n }),\n z.object({\n action: z.literal(\"seed-vm0-managed-model-key\"),\n selected_model: z.string(),\n }),\n z.object({\n action: z.literal(\"delete-vm0-managed-default-model-key\"),\n }),\n z.object({\n action: z.literal(\"enable-fake-kms\"),\n }),\n z.object({\n action: z.literal(\"reset-fake-kms\"),\n }),\n z.object({\n action: z.literal(\"read-fake-kms-state\"),\n }),\n z.object({\n action: z.literal(\"read-browser-screenshot-schema-state\"),\n }),\n z.object({\n action: z.literal(\"reset-database-pool\"),\n }),\n z.object({\n action: z.literal(\"mutate-runner-job-secret-value-environment-keys\"),\n run_id: z.uuid(),\n mode: z.enum([\"remove\", \"invalid\"]),\n }),\n z.object({\n action: z.literal(\"mutate-runner-job-connector-permission-baseline\"),\n run_id: z.uuid(),\n mode: z.enum([\n \"remove\",\n \"malformed\",\n \"capability-mismatch\",\n \"catalog-mismatch\",\n \"authority-mismatch\",\n \"inconsistent\",\n \"incomplete\",\n ]),\n }),\n z.object({\n action: z.literal(\"remove-run-canonical-storage-state\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"read-runner-job-storage-state\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"read-run-claim-owner\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"read-storage-persistence-state\"),\n run_id: z.uuid(),\n session_id: z.uuid(),\n checkpoint_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"replace-custom-connector-prefixes\"),\n connector_id: z.uuid(),\n prefixes: z.array(z.string()).min(1),\n }),\n z.object({\n action: z.literal(\"hold-org-admission-lock\"),\n org_id: z.string(),\n }),\n z.object({\n action: z.literal(\"read-org-admission-lock-state\"),\n }),\n z.object({\n action: z.literal(\"release-org-admission-lock\"),\n }),\n z.object({\n action: z.literal(\"read-run-uploaded-file-sources\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"clear-run-api-start\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"read-run-api-start\"),\n run_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"read-thread-session-binding\"),\n thread_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"clear-thread-session-binding\"),\n thread_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"insert-legacy-artifact-catalog-file\"),\n user_id: z.string(),\n org_id: z.string(),\n filename: z.string(),\n url: z.url(),\n }),\n z.object({\n action: z.literal(\"insert-hosted-site-as-previous-api\"),\n user_id: z.string(),\n org_id: z.string(),\n run_id: z.uuid(),\n site: z.string(),\n public_slug: z.string(),\n }),\n z.object({\n action: z.literal(\"insert-hosted-deployment-as-previous-api\"),\n user_id: z.string(),\n org_id: z.string(),\n run_id: z.uuid(),\n hosted_site_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"set-computer-use-host-as-previous-api\"),\n thread_id: z.uuid(),\n computer_use_host_id: z.uuid(),\n }),\n z.object({\n action: z.literal(\"set-browser-tab-snapshot-as-previous-api\"),\n thread_id: z.uuid(),\n tab_urls: z.array(z.string().max(8192)).max(50),\n }),\n z.object({\n action: z.literal(\"set-runner-job-context-profile-as-previous-api\"),\n run_id: z.uuid(),\n profile: z.string(),\n }),\n]);\n\nexport const testRuntimeStateActionResponseSchema = z.object({\n ok: z.literal(true),\n selected_model: z.string().optional(),\n decrypt_call_count: z.number().optional(),\n browser_screenshot_schema_available: z.boolean().optional(),\n admission_lock_held: z.boolean().optional(),\n admission_lock_waiting: z.boolean().optional(),\n uploaded_file_sources: z.array(z.string()).optional(),\n api_started_at: z.string().nullable().optional(),\n thread_session_binding: z\n .object({\n agent_session_id: z.uuid().nullable(),\n agent_session_run_id: z.uuid().nullable(),\n run_session_id: z.uuid().nullable(),\n })\n .optional(),\n file_id: z.uuid().optional(),\n hosted_site_id: z.uuid().optional(),\n hosted_deployment_scope_blocked: z.boolean().optional(),\n storage_persistence: z\n .object({\n run_canonical: z.boolean(),\n session_canonical: z.boolean(),\n checkpoint_canonical: z.boolean(),\n })\n .optional(),\n runner_job_storage_state: z\n .object({\n has_stored_storage_manifest: z.boolean(),\n canonical_mount_count: z.number().int().nonnegative(),\n has_run_context_storage: z.boolean(),\n })\n .optional(),\n runner_claim_owner: z\n .object({\n runner_id: z.uuid().nullable(),\n heartbeat_generation: z\n .number()\n .int()\n .positive()\n .max(Number.MAX_SAFE_INTEGER)\n .nullable(),\n })\n .optional(),\n});\n\nexport const testRuntimeStateContract = c.router({\n action: {\n method: \"POST\",\n path: \"/api/test/runtime-state/action\",\n body: testRuntimeStateActionBodySchema,\n responses: {\n 200: testRuntimeStateActionResponseSchema,\n 400: testRuntimeStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Mutate API test support state\",\n },\n});\n\nexport type TestRuntimeStateContract = typeof testRuntimeStateContract;\nexport type TestRuntimeStateActionBody = z.infer<\n typeof testRuntimeStateActionBodySchema\n>;\nexport type TestRuntimeStateActionResponse = z.infer<\n typeof testRuntimeStateActionResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testZeroAgentStateErrorSchema = z.object({\n error: z.string(),\n});\n\nconst zeroAgentVisibilitySchema = z.enum([\"public\", \"private\"]);\n\nexport const testZeroAgentStateActionBodySchema = z.discriminatedUnion(\n \"action\",\n [\n z.object({\n action: z.literal(\"seed-agent\"),\n agent_id: z.string(),\n display_name: z.string().nullable().optional(),\n description: z.string().nullable().optional(),\n sound: z.string().nullable().optional(),\n avatar_url: z.string().nullable().optional(),\n visibility: zeroAgentVisibilitySchema.optional(),\n }),\n ],\n);\n\nexport const testZeroAgentStateActionResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testZeroAgentStateContract = c.router({\n action: {\n method: \"POST\",\n path: \"/api/test/zero-agent-state/action\",\n body: testZeroAgentStateActionBodySchema,\n responses: {\n 200: testZeroAgentStateActionResponseSchema,\n 400: testZeroAgentStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Mutate Zero agent API test support state\",\n },\n});\n\nexport type TestZeroAgentStateContract = typeof testZeroAgentStateContract;\nexport type TestZeroAgentStateActionBody = z.infer<\n typeof testZeroAgentStateActionBodySchema\n>;\nexport type TestZeroAgentStateActionResponse = z.infer<\n typeof testZeroAgentStateActionResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testModelProviderStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testModelProviderStateActionBodySchema = z.discriminatedUnion(\n \"action\",\n [\n z.object({\n action: z.literal(\"overwrite-secret\"),\n provider_id: z.string(),\n secret_name: z.string(),\n secret: z.string(),\n }),\n ],\n);\n\nexport const testModelProviderStateActionResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testModelProviderStateContract = c.router({\n action: {\n method: \"POST\",\n path: \"/api/test/model-provider-state/action\",\n body: testModelProviderStateActionBodySchema,\n responses: {\n 200: testModelProviderStateActionResponseSchema,\n 400: testModelProviderStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Mutate model provider API test support state\",\n },\n});\n\nexport type TestModelProviderStateContract =\n typeof testModelProviderStateContract;\nexport type TestModelProviderStateActionBody = z.infer<\n typeof testModelProviderStateActionBodySchema\n>;\nexport type TestModelProviderStateActionResponse = z.infer<\n typeof testModelProviderStateActionResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testMailDraftStateContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/test/mail-draft-state/:mailDraftId\",\n pathParams: z.object({ mailDraftId: z.uuid() }),\n responses: {\n 200: z.object({ exists: z.boolean() }),\n 404: z.string(),\n },\n summary: \"Inspect mail draft API test support state\",\n },\n});\n\nexport type TestMailDraftStateContract = typeof testMailDraftStateContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nconst nullableDateStringSchema = z.string().nullable();\nconst optionalDateStringSchema = z.string().optional();\n\nconst testUsageInsightStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testUsageInsightStateFixtureSchema = z.object({\n org_id: z.string(),\n user_id: z.string(),\n});\n\nconst usageInsightFixtureInputSchema = testUsageInsightStateFixtureSchema;\n\nexport const testUsageInsightStateActionBodySchema = z.discriminatedUnion(\n \"action\",\n [\n z.object({\n action: z.literal(\"seed-fixture\"),\n }),\n z.object({\n action: z.literal(\"delete-fixture\"),\n fixture: usageInsightFixtureInputSchema,\n }),\n z.object({\n action: z.literal(\"seed-compose\"),\n org_id: z.string(),\n user_id: z.string(),\n name: z.string().optional(),\n display_name: z.string().nullable().optional(),\n visibility: z.enum([\"public\", \"private\"]).optional(),\n }),\n z.object({\n action: z.literal(\"seed-run\"),\n org_id: z.string(),\n user_id: z.string(),\n compose_id: z.string(),\n trigger_source: z.string().optional(),\n chat_thread_id: z.string().optional(),\n status: z.string().optional(),\n prompt: z.string().optional(),\n created_at: optionalDateStringSchema,\n started_at: nullableDateStringSchema.optional(),\n completed_at: nullableDateStringSchema.optional(),\n continued_from_session_id: z.string().nullable().optional(),\n sandbox_reuse_result: z.string().nullable().optional(),\n result: z.record(z.string(), z.unknown()).nullable().optional(),\n error: z.string().nullable().optional(),\n last_event_sequence: z.number().nullable().optional(),\n selected_model: z.string().nullable().optional(),\n }),\n z.object({\n action: z.literal(\"seed-chat-thread\"),\n user_id: z.string(),\n compose_id: z.string(),\n title: z.string().optional(),\n }),\n z.object({\n action: z.literal(\"insert-model-usage-event-for-run\"),\n org_id: z.string(),\n user_id: z.string(),\n run_id: z.string(),\n input_tokens: z.number().optional(),\n output_tokens: z.number().optional(),\n cache_read_input_tokens: z.number().optional(),\n cache_creation_input_tokens: z.number().optional(),\n credits_charged: z.number().optional(),\n status: z.string().optional(),\n processed_at: nullableDateStringSchema.optional(),\n }),\n z.object({\n action: z.literal(\"insert-usage-event\"),\n org_id: z.string(),\n user_id: z.string().optional(),\n run_id: z.string().nullable().optional(),\n kind: z.string().optional(),\n provider: z.string().optional(),\n category: z.string().optional(),\n quantity: z.number().optional(),\n status: z.string().optional(),\n credits_charged: z.number().optional(),\n idempotency_key: z.string().optional(),\n billing_error: z.string().nullable().optional(),\n created_at: optionalDateStringSchema,\n processed_at: nullableDateStringSchema.optional(),\n count: z.number().int().positive().optional(),\n }),\n z.object({\n action: z.literal(\"attach-usage-allowance\"),\n org_id: z.string(),\n run_id: z.string().nullable(),\n usage_event_id: z.string(),\n units_applied: z.number().int().positive(),\n consumed_units: z.number().int().nonnegative(),\n }),\n z.object({\n action: z.literal(\"read-allowance-window-state\"),\n short_window_id: z.string(),\n weekly_window_id: z.string(),\n }),\n z.object({\n action: z.literal(\"read-usage-event-state\"),\n idempotency_key: z.string(),\n }),\n z.object({\n action: z.literal(\"delete-run\"),\n run_id: z.string(),\n }),\n z.object({\n action: z.literal(\"seed-usage-overflow-grain\"),\n org_id: z.string(),\n user_id: z.string(),\n processed_at: z.string(),\n }),\n z.object({\n action: z.literal(\"set-usage-event-created-at\"),\n id: z.string(),\n created_at: z.string(),\n }),\n z.object({\n action: z.literal(\"materialize-hourly-usage\"),\n org_id: z.string(),\n user_id: z.string(),\n run_id: z.string().nullable(),\n }),\n z.object({\n action: z.literal(\"read-usage-storage-counts\"),\n scope: z.enum([\"organization\", \"user\"]),\n id: z.string(),\n }),\n z.object({\n action: z.literal(\"read-insights-daily-permissions\"),\n org_id: z.string(),\n user_id: z.string(),\n date: z.string(),\n }),\n z.object({\n action: z.literal(\"delete-usage-data\"),\n scope: z.enum([\"organization\", \"user\"]),\n id: z.string(),\n }),\n ],\n);\n\nexport const testUsageInsightStateActionResponseSchema = z.object({\n ok: z.literal(true),\n fixture: testUsageInsightStateFixtureSchema.optional(),\n compose_id: z.string().optional(),\n agent_id: z.string().optional(),\n run_id: z.string().optional(),\n chat_thread_id: z.string().optional(),\n usage_event_id: z.string().optional(),\n usage_event_status: z.string().optional(),\n usage_event_credits_charged: z.number().nullable().optional(),\n usage_event_billing_error: z.string().nullable().optional(),\n raw_count: z.number().optional(),\n processed_raw_count: z.number().optional(),\n hourly_count: z.number().optional(),\n short_window_id: z.string().optional(),\n weekly_window_id: z.string().optional(),\n short_window_consumed_units: z.string().optional(),\n weekly_window_consumed_units: z.string().optional(),\n raw_allowance_units: z.string().optional(),\n hourly_allowance_units: z.string().optional(),\n allocation_count: z.number().optional(),\n insights_daily_permissions: z\n .array(z.record(z.string(), z.unknown()))\n .optional(),\n});\n\nexport const testUsageInsightStateContract = c.router({\n action: {\n method: \"POST\",\n path: \"/api/test/usage-insight-state/action\",\n body: testUsageInsightStateActionBodySchema,\n responses: {\n 200: testUsageInsightStateActionResponseSchema,\n 400: testUsageInsightStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Manage usage API test support state\",\n },\n});\n\nexport type TestUsageInsightStateContract =\n typeof testUsageInsightStateContract;\nexport type TestUsageInsightStateFixture = z.infer<\n typeof testUsageInsightStateFixtureSchema\n>;\nexport type TestUsageInsightStateActionBody = z.infer<\n typeof testUsageInsightStateActionBodySchema\n>;\nexport type TestUsageInsightStateActionResponse = z.infer<\n typeof testUsageInsightStateActionResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const testUsageSettlementRequestSchema = z.object({\n org_id: z.string().min(1),\n});\n\nexport const testUsageSettlementResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testUsageSettlementContract = c.router({\n process: {\n method: \"POST\",\n path: \"/api/test/usage-settlement/process\",\n body: testUsageSettlementRequestSchema,\n responses: {\n 200: testUsageSettlementResponseSchema,\n 400: apiErrorSchema,\n 404: z.string(),\n },\n summary: \"Process one organization's usage in API tests\",\n },\n});\n\nexport type TestUsageSettlementRequest = z.infer<\n typeof testUsageSettlementRequestSchema\n>;\nexport type TestUsageSettlementResponse = z.infer<\n typeof testUsageSettlementResponseSchema\n>;\nexport type TestUsageSettlementContract = typeof testUsageSettlementContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testCronCleanupSandboxesStateActionBodySchema = z\n .object({\n action: z.enum([\n \"seed-run\",\n \"seed-run-ownership\",\n \"attach-run-thread\",\n \"delete-run\",\n \"delete-run-ownership\",\n \"delete-run-thread\",\n \"seed-runner-job\",\n \"seed-custom-connector-auth-ref\",\n \"seed-queue-entry\",\n \"seed-queue-marker\",\n \"seed-export-job\",\n \"delete-export-job\",\n \"get-run\",\n \"get-run-ownership\",\n \"get-runner-job\",\n \"get-custom-connector-auth-ref\",\n \"get-queue-entry\",\n \"get-queue-marker-revoker\",\n \"get-export-job\",\n ]),\n })\n .passthrough();\n\nexport const testCronCleanupSandboxesStateActionResponseSchema = z\n .object({\n ok: z.literal(true),\n })\n .passthrough();\n\nexport const testCronCleanupSandboxesStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testCronCleanupSandboxesStateContract = c.router({\n action: {\n method: \"POST\",\n path: \"/api/test/cron-cleanup-sandboxes-state/action\",\n body: testCronCleanupSandboxesStateActionBodySchema,\n responses: {\n 200: testCronCleanupSandboxesStateActionResponseSchema,\n 400: testCronCleanupSandboxesStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Mutate or inspect cron cleanup sandboxes test state\",\n },\n});\n\nexport type TestCronCleanupSandboxesStateActionBody = z.infer<\n typeof testCronCleanupSandboxesStateActionBodySchema\n>;\nexport type TestCronCleanupSandboxesStateActionResponse = z.infer<\n typeof testCronCleanupSandboxesStateActionResponseSchema\n>;\nexport type TestCronCleanupSandboxesStateContract =\n typeof testCronCleanupSandboxesStateContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testSlackStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testSlackStateDeleteResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testSlackStatePostBodySchema = z.object({\n team_id: z.string().optional(),\n slack_user_id: z.string().optional(),\n org_id: z.string().optional(),\n vm0_user_id: z.string().optional(),\n workspace_name: z.string().optional(),\n bot_user_id: z.string().optional(),\n bot_scopes: z.string().nullable().optional(),\n bot_token: z.string().optional(),\n installation_org_id: z.string().nullable().optional(),\n email: z.string().optional(),\n seed_connection: z.boolean().optional(),\n delete_connection: z.boolean().optional(),\n seed_default_agent: z.boolean().optional(),\n default_agent_name: z.string().optional(),\n default_agent_display_name: z.string().nullable().optional(),\n compose_content: z.record(z.string(), z.unknown()).optional(),\n org_slug: z.string().optional(),\n org_name: z.string().optional(),\n seed_secret_names: z.array(z.string()).optional(),\n seed_variables: z.record(z.string(), z.string()).optional(),\n});\n\nexport const testSlackStatePostResponseSchema = z.object({\n ok: z.literal(true),\n team_id: z.string(),\n org_id: z.string(),\n vm0_user_id: z.string(),\n connection_id: z.string().nullable(),\n default_agent_id: z.string().nullable(),\n});\n\nconst nullableDateStringSchema = z.string().nullable();\n\nexport const testSlackStateResponseSchema = z.object({\n installation: z\n .object({\n slackWorkspaceId: z.string(),\n slackWorkspaceName: z.string().nullable(),\n orgId: z.string().nullable(),\n botUserId: z.string(),\n botScopes: z.string().nullable(),\n installedByUserId: z.string().nullable(),\n createdAt: z.string(),\n })\n .nullable(),\n connections: z.array(\n z.object({\n id: z.string(),\n slackUserId: z.string(),\n vm0UserId: z.string(),\n dmWelcomeSent: z.boolean(),\n createdAt: z.string(),\n }),\n ),\n chat_thread_routes: z.array(\n z.object({\n id: z.string(),\n connectionId: z.string(),\n channelId: z.string(),\n threadTs: z.string(),\n userId: z.string(),\n chatThreadId: z.string(),\n createdAt: z.string(),\n }),\n ),\n chat_ingress: z.array(\n z.object({\n id: z.string(),\n routeId: z.string(),\n eventId: z.string(),\n payload: z.string(),\n status: z.enum([\"pending\", \"processing\", \"processed\", \"failed\"]),\n retryCount: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n }),\n ),\n pending_chat_events: z.array(\n z.object({\n id: z.string(),\n chatThreadId: z.string(),\n eventType: z.enum([\"input.prompt\", \"input.automation\"]),\n triggerSource: z.string().nullable(),\n createdAt: z.string(),\n }),\n ),\n recent_runs: z.array(\n z.object({\n id: z.string(),\n status: z.string(),\n createdAt: z.string(),\n triggerSource: z.string().nullable(),\n userId: z.string(),\n error: z.string().nullable(),\n promptPreview: z.string().nullable(),\n }),\n ),\n org_metadata: z\n .object({\n orgId: z.string(),\n defaultAgentId: z.string().nullable(),\n credits: z.number(),\n tier: z.string(),\n })\n .nullable(),\n default_agent: z\n .object({\n id: z.string(),\n name: z.string(),\n orgId: z.string(),\n })\n .nullable(),\n default_compose: z\n .object({\n id: z.string(),\n name: z.string(),\n headVersionId: z.string().nullable(),\n })\n .nullable(),\n default_compose_version: z\n .object({\n id: z.string(),\n content_keys: z.array(z.string()),\n })\n .nullable(),\n resolved_slack_api_url: z.string().nullable(),\n mock_calls: z.array(\n z.object({\n method: z.string(),\n teamId: z.string().nullable(),\n channelId: z.string().nullable(),\n bodyJson: z.unknown(),\n createdAt: nullableDateStringSchema,\n }),\n ),\n});\n\nexport const testSlackStateContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/test/slack-state\",\n query: z.object({\n team_id: z.string().optional(),\n empty_team_id: z.literal(\"1\").optional(),\n org_id: z.string().optional(),\n }),\n responses: {\n 200: testSlackStateResponseSchema,\n 400: testSlackStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Read Slack e2e diagnostic state for a test workspace\",\n },\n post: {\n method: \"POST\",\n path: \"/api/test/slack-state\",\n body: testSlackStatePostBodySchema,\n responses: {\n 200: testSlackStatePostResponseSchema,\n 400: testSlackStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Seed Slack e2e diagnostic state for a test workspace\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/test/slack-state\",\n query: z.object({\n team_id: z.string().optional(),\n org_id: z.string().optional(),\n }),\n responses: {\n 200: testSlackStateDeleteResponseSchema,\n 400: testSlackStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Clear Slack e2e diagnostic state for a test workspace\",\n },\n});\n\nexport type TestSlackStateContract = typeof testSlackStateContract;\nexport type TestSlackStateDeleteResponse = z.infer<\n typeof testSlackStateDeleteResponseSchema\n>;\nexport type TestSlackStatePostBody = z.infer<\n typeof testSlackStatePostBodySchema\n>;\nexport type TestSlackStatePostResponse = z.infer<\n typeof testSlackStatePostResponseSchema\n>;\nexport type TestSlackStateResponse = z.infer<\n typeof testSlackStateResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const SLACK_E2E_FIXTURES = {\n botUserId: \"U_E2E_BOT\",\n userUserId: \"U_E2E_USER\",\n botId: \"B_E2E_BOT\",\n teamId: \"T_E2E\",\n appId: \"A_E2E_APP\",\n channelId: \"C_E2E_MOCK\",\n botToken: \"xoxb-e2e-test-bot-token\",\n teamName: \"E2E Test Team\",\n} as const;\n\nexport const SLACK_E2E_SCOPES = [\n \"app_mentions:read\",\n \"channels:read\",\n \"chat:write\",\n \"chat:write.public\",\n \"commands\",\n \"groups:read\",\n \"im:history\",\n \"im:read\",\n \"im:write\",\n \"users:read\",\n \"users:read.email\",\n] as const;\n\nconst slackMockRequestBodySchema = z.record(z.string(), z.unknown()).optional();\nconst slackMockNotFoundSchema = z.string();\n\nexport const testSlackMockOkResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testSlackMockAuthTestResponseSchema =\n testSlackMockOkResponseSchema.extend({\n url: z.string(),\n team: z.string(),\n user: z.string(),\n team_id: z.string(),\n user_id: z.string(),\n bot_id: z.string(),\n });\n\nexport const testSlackMockOauthAccessResponseSchema =\n testSlackMockOkResponseSchema.extend({\n access_token: z.string(),\n token_type: z.literal(\"bot\"),\n scope: z.string(),\n bot_user_id: z.string(),\n app_id: z.string(),\n team: z.object({\n id: z.string(),\n name: z.string(),\n }),\n enterprise: z.null(),\n authed_user: z.object({\n id: z.string(),\n scope: z.string(),\n access_token: z.string(),\n token_type: z.literal(\"user\"),\n }),\n });\n\nexport const testSlackMockChatPostMessageResponseSchema =\n testSlackMockOkResponseSchema.extend({\n channel: z.string(),\n ts: z.string(),\n message: z.object({\n ts: z.string(),\n text: z.string(),\n }),\n });\n\nexport const testSlackMockChatPostEphemeralResponseSchema =\n testSlackMockOkResponseSchema.extend({\n message_ts: z.string(),\n });\n\nexport const testSlackMockChatGetPermalinkResponseSchema =\n testSlackMockOkResponseSchema.extend({\n channel: z.string(),\n permalink: z.string().url(),\n });\n\nexport const testSlackMockConversationsOpenResponseSchema =\n testSlackMockOkResponseSchema.extend({\n channel: z.object({\n id: z.string(),\n }),\n });\n\nexport const testSlackMockConversationMessagesResponseSchema =\n testSlackMockOkResponseSchema.extend({\n messages: z.array(z.unknown()),\n has_more: z.literal(false),\n });\n\nexport const testSlackMockUsersInfoResponseSchema =\n testSlackMockOkResponseSchema.extend({\n user: z.object({\n id: z.string(),\n name: z.string(),\n real_name: z.string(),\n tz: z.string(),\n tz_label: z.string(),\n profile: z.object({\n display_name: z.string(),\n real_name: z.string(),\n email: z.string(),\n }),\n }),\n });\n\nexport const testSlackMockContract = c.router({\n assistantThreadsSetStatus: {\n method: \"POST\",\n path: \"/api/test/slack-mock/assistant.threads.setStatus\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockOkResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack assistant.threads.setStatus for e2e tests\",\n },\n authTest: {\n method: \"POST\",\n path: \"/api/test/slack-mock/auth.test\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockAuthTestResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack auth.test for e2e tests\",\n },\n chatPostEphemeral: {\n method: \"POST\",\n path: \"/api/test/slack-mock/chat.postEphemeral\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockChatPostEphemeralResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack chat.postEphemeral for e2e tests\",\n },\n chatGetPermalink: {\n method: \"POST\",\n path: \"/api/test/slack-mock/chat.getPermalink\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockChatGetPermalinkResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack chat.getPermalink for e2e tests\",\n },\n chatPostMessage: {\n method: \"POST\",\n path: \"/api/test/slack-mock/chat.postMessage\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockChatPostMessageResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack chat.postMessage for e2e tests\",\n },\n conversationsHistory: {\n method: \"POST\",\n path: \"/api/test/slack-mock/conversations.history\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockConversationMessagesResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack conversations.history for e2e tests\",\n },\n conversationsOpen: {\n method: \"POST\",\n path: \"/api/test/slack-mock/conversations.open\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockConversationsOpenResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack conversations.open for e2e tests\",\n },\n conversationsReplies: {\n method: \"POST\",\n path: \"/api/test/slack-mock/conversations.replies\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockConversationMessagesResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack conversations.replies for e2e tests\",\n },\n oauthV2Access: {\n method: \"POST\",\n path: \"/api/test/slack-mock/oauth.v2.access\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockOauthAccessResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack oauth.v2.access for e2e tests\",\n },\n usersInfo: {\n method: \"POST\",\n path: \"/api/test/slack-mock/users.info\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockUsersInfoResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack users.info for e2e tests\",\n },\n viewsPublish: {\n method: \"POST\",\n path: \"/api/test/slack-mock/views.publish\",\n body: slackMockRequestBodySchema,\n responses: {\n 200: testSlackMockOkResponseSchema,\n 404: slackMockNotFoundSchema,\n },\n summary: \"Mock Slack views.publish for e2e tests\",\n },\n});\n\nexport type TestSlackMockContract = typeof testSlackMockContract;\nexport type TestSlackMockUsersInfoResponse = z.infer<\n typeof testSlackMockUsersInfoResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testTelegramMockPathParamsSchema = z.object({\n botToken: z.string(),\n method: z.string(),\n});\n\nexport const testTelegramMockSuccessResponseSchema = z.object({\n ok: z.literal(true),\n result: z.unknown(),\n});\n\nexport const testTelegramMockErrorResponseSchema = z.object({\n ok: z.literal(false),\n description: z.string(),\n});\n\nexport const testTelegramMockContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/test/telegram-mock/:botToken/:method\",\n pathParams: testTelegramMockPathParamsSchema,\n body: z.record(z.string(), z.unknown()).optional(),\n responses: {\n 200: testTelegramMockSuccessResponseSchema,\n 404: z.union([z.string(), testTelegramMockErrorResponseSchema]),\n },\n summary: \"Handle Telegram Bot API E2E mock calls\",\n },\n});\n\nexport type TestTelegramMockContract = typeof testTelegramMockContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nconst teamsMockBodySchema = z.record(z.string(), z.unknown()).optional();\nconst teamsMockOkSchema = z.object({ ok: z.literal(true) });\nconst teamsMockTokenResponseSchema = z.object({\n access_token: z.string(),\n token_type: z.string(),\n expires_in: z.number(),\n});\nconst teamsMockActivityResponseSchema = z.object({\n id: z.string(),\n});\nconst teamsMockConversationResponseSchema = z.object({\n id: z.string(),\n});\nconst teamsMockGraphMessagesResponseSchema = z.object({\n value: z.array(z.unknown()),\n});\n\nexport const testTeamsMockConversationPathParamsSchema = z.object({\n conversationId: z.string(),\n});\n\nexport const testTeamsMockActivityPathParamsSchema =\n testTeamsMockConversationPathParamsSchema.extend({\n activityId: z.string(),\n });\n\nexport const testTeamsMockReactionPathParamsSchema =\n testTeamsMockActivityPathParamsSchema.extend({\n reactionType: z.string(),\n });\n\nexport const testTeamsMockGraphMessagesPathParamsSchema = z.object({\n teamId: z.string(),\n channelId: z.string(),\n});\n\nexport const testTeamsMockGraphMessagePathParamsSchema =\n testTeamsMockGraphMessagesPathParamsSchema.extend({\n messageId: z.string(),\n });\n\nexport const testTeamsMockGraphUserPathParamsSchema = z.object({\n userId: z.string(),\n});\n\nexport const testTeamsMockContract = c.router({\n token: {\n method: \"POST\",\n path: \"/api/test/teams-mock/token\",\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockTokenResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Microsoft OAuth token endpoint for Teams e2e tests\",\n },\n createConversation: {\n method: \"POST\",\n path: \"/api/test/teams-mock/service/v3/conversations\",\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockConversationResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Bot Framework create conversation\",\n },\n sendActivity: {\n method: \"POST\",\n path: \"/api/test/teams-mock/service/v3/conversations/:conversationId/activities\",\n pathParams: testTeamsMockConversationPathParamsSchema,\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockActivityResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Bot Framework send activity\",\n },\n replyActivity: {\n method: \"POST\",\n path: \"/api/test/teams-mock/service/v3/conversations/:conversationId/activities/:activityId\",\n pathParams: testTeamsMockActivityPathParamsSchema,\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockActivityResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Bot Framework reply activity\",\n },\n putReaction: {\n method: \"PUT\",\n path: \"/api/test/teams-mock/service/v3/conversations/:conversationId/activities/:activityId/reactions/:reactionType\",\n pathParams: testTeamsMockReactionPathParamsSchema,\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockOkSchema,\n 404: z.string(),\n },\n summary: \"Mock Bot Framework add reaction\",\n },\n deleteReaction: {\n method: \"DELETE\",\n path: \"/api/test/teams-mock/service/v3/conversations/:conversationId/activities/:activityId/reactions/:reactionType\",\n pathParams: testTeamsMockReactionPathParamsSchema,\n body: teamsMockBodySchema,\n responses: {\n 200: teamsMockOkSchema,\n 404: z.string(),\n },\n summary: \"Mock Bot Framework delete reaction\",\n },\n graphMessages: {\n method: \"GET\",\n path: \"/api/test/teams-mock/graph/teams/:teamId/channels/:channelId/messages\",\n pathParams: testTeamsMockGraphMessagesPathParamsSchema,\n responses: {\n 200: teamsMockGraphMessagesResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Microsoft Graph channel message list\",\n },\n graphMessage: {\n method: \"GET\",\n path: \"/api/test/teams-mock/graph/teams/:teamId/channels/:channelId/messages/:messageId\",\n pathParams: testTeamsMockGraphMessagePathParamsSchema,\n responses: {\n 200: z.unknown(),\n 404: z.string(),\n },\n summary: \"Mock Microsoft Graph channel message\",\n },\n graphReplies: {\n method: \"GET\",\n path: \"/api/test/teams-mock/graph/teams/:teamId/channels/:channelId/messages/:messageId/replies\",\n pathParams: testTeamsMockGraphMessagePathParamsSchema,\n responses: {\n 200: teamsMockGraphMessagesResponseSchema,\n 404: z.string(),\n },\n summary: \"Mock Microsoft Graph channel message replies\",\n },\n graphUser: {\n method: \"GET\",\n path: \"/api/test/teams-mock/graph/users/:userId\",\n pathParams: testTeamsMockGraphUserPathParamsSchema,\n responses: {\n 200: z.unknown(),\n 404: z.string(),\n },\n summary: \"Mock Microsoft Graph user lookup\",\n },\n});\n\nexport type TestTeamsMockContract = typeof testTeamsMockContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testTeamsStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testTeamsStateDeleteResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testTeamsStatePostBodySchema = z.object({\n tenant_id: z.string().optional(),\n tenant_name: z.string().nullable().optional(),\n team_id: z.string().nullable().optional(),\n team_name: z.string().nullable().optional(),\n service_url: z.string().optional(),\n bot_id: z.string().nullable().optional(),\n bot_name: z.string().nullable().optional(),\n teams_user_id: z.string().nullable().optional(),\n teams_aad_object_id: z.string().nullable().optional(),\n teams_user_display_name: z.string().nullable().optional(),\n teams_user_principal_name: z.string().nullable().optional(),\n org_id: z.string().optional(),\n vm0_user_id: z.string().optional(),\n email: z.string().optional(),\n installation_org_id: z.string().nullable().optional(),\n seed_connection: z.boolean().optional(),\n delete_connection: z.boolean().optional(),\n seed_default_agent: z.boolean().optional(),\n default_agent_name: z.string().optional(),\n default_agent_display_name: z.string().nullable().optional(),\n});\n\nexport const testTeamsStatePostResponseSchema = z.object({\n ok: z.literal(true),\n tenant_id: z.string(),\n org_id: z.string(),\n vm0_user_id: z.string(),\n connection_id: z.string().nullable(),\n default_agent_id: z.string().nullable(),\n});\n\nconst nullableDateStringSchema = z.string().nullable();\n\nexport const testTeamsStateResponseSchema = z.object({\n installation: z\n .object({\n teamsTenantId: z.string(),\n teamsTenantName: z.string().nullable(),\n teamsTeamId: z.string().nullable(),\n teamsTeamName: z.string().nullable(),\n teamsAppId: z.string().nullable(),\n botId: z.string().nullable(),\n botName: z.string().nullable(),\n serviceUrl: z.string().nullable(),\n orgId: z.string().nullable(),\n installedByUserId: z.string().nullable(),\n createdAt: z.string(),\n })\n .nullable(),\n connections: z.array(\n z.object({\n id: z.string(),\n teamsUserId: z.string().nullable(),\n teamsAadObjectId: z.string().nullable(),\n vm0UserId: z.string(),\n teamsUserDisplayName: z.string().nullable(),\n teamsUserPrincipalName: z.string().nullable(),\n dmWelcomeSent: z.boolean(),\n createdAt: z.string(),\n }),\n ),\n routes: z.array(\n z.object({\n id: z.string(),\n connectionId: z.string(),\n conversationId: z.string(),\n threadId: z.string(),\n userId: z.string(),\n chatThreadId: z.string(),\n createdAt: z.string(),\n }),\n ),\n recent_runs: z.array(\n z.object({\n id: z.string(),\n status: z.string(),\n createdAt: z.string(),\n triggerSource: z.string().nullable(),\n chatThreadId: z.string().nullable(),\n userId: z.string(),\n error: z.string().nullable(),\n promptPreview: z.string().nullable(),\n }),\n ),\n recent_callbacks: z.array(\n z.object({\n id: z.string(),\n runId: z.string(),\n status: z.string(),\n internalKind: z.string().nullable(),\n attempts: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.string(),\n lastAttemptAt: nullableDateStringSchema,\n deliveredAt: nullableDateStringSchema,\n payload: z.unknown(),\n }),\n ),\n org_metadata: z\n .object({\n orgId: z.string(),\n defaultAgentId: z.string().nullable(),\n credits: z.number(),\n tier: z.string(),\n })\n .nullable(),\n default_agent: z\n .object({\n id: z.string(),\n name: z.string(),\n orgId: z.string(),\n })\n .nullable(),\n default_compose: z\n .object({\n id: z.string(),\n name: z.string(),\n headVersionId: z.string().nullable(),\n })\n .nullable(),\n default_compose_version: z\n .object({\n id: z.string(),\n content_keys: z.array(z.string()),\n })\n .nullable(),\n resolved_teams_mock_base_url: z.string().nullable(),\n mock_calls: z.array(\n z.object({\n method: z.string(),\n tenantId: z.string().nullable(),\n conversationId: z.string().nullable(),\n activityId: z.string().nullable(),\n bodyJson: z.unknown(),\n createdAt: nullableDateStringSchema,\n }),\n ),\n});\n\nexport const testTeamsStateContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/test/teams-state\",\n query: z.object({\n tenant_id: z.string().optional(),\n org_id: z.string().optional(),\n }),\n responses: {\n 200: testTeamsStateResponseSchema,\n 400: testTeamsStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Read Teams e2e diagnostic state for a test tenant\",\n },\n post: {\n method: \"POST\",\n path: \"/api/test/teams-state\",\n body: testTeamsStatePostBodySchema,\n responses: {\n 200: testTeamsStatePostResponseSchema,\n 400: testTeamsStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Seed Teams e2e diagnostic state for a test tenant\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/test/teams-state\",\n query: z.object({\n tenant_id: z.string().optional(),\n org_id: z.string().optional(),\n }),\n responses: {\n 200: testTeamsStateDeleteResponseSchema,\n 400: testTeamsStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Clear Teams e2e diagnostic state for a test tenant\",\n },\n});\n\nexport type TestTeamsStateContract = typeof testTeamsStateContract;\nexport type TestTeamsStatePostBody = z.infer<\n typeof testTeamsStatePostBodySchema\n>;\nexport type TestTeamsStatePostResponse = z.infer<\n typeof testTeamsStatePostResponseSchema\n>;\nexport type TestTeamsStateResponse = z.infer<\n typeof testTeamsStateResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const testTelegramStateQuerySchema = z.object({\n bot_id: z.string().optional(),\n});\n\nexport const testTelegramStateErrorSchema = z.object({\n error: z.string(),\n});\n\nexport const testTelegramStateSeedBodySchema = z\n .object({\n bot_id: z.string().optional(),\n telegram_user_id: z.string().optional(),\n bot_username: z.string().optional(),\n webhook_secret: z.string().optional(),\n email: z.string().optional(),\n seed_link: z.boolean().optional(),\n })\n .passthrough();\n\nexport const testTelegramStateActionBodySchema = z\n .object({\n action: z.enum([\n \"seed-installation\",\n \"seed-org-default-agent\",\n \"seed-official-user-link\",\n \"seed-user-link\",\n \"seed-user-agent-preference\",\n \"seed-agent-run-callback\",\n \"seed-post-fixture\",\n \"delete-post-fixture\",\n \"get-post-run-state\",\n \"get-telegram-link-id\",\n \"seed-running-run\",\n \"seed-completed-run\",\n \"seed-model-policies\",\n \"seed-org-credits\",\n \"get-selected-model\",\n \"seed-pending-user-link\",\n \"update-run-callback\",\n \"update-run\",\n \"get-run\",\n \"find-chat-thread-route\",\n \"delete-fixture\",\n ]),\n })\n .passthrough();\n\nexport const testTelegramStateComposeVersionSchema = z.object({\n id: z.string(),\n content_keys: z.array(z.string()),\n});\n\nexport const testTelegramStateResponseSchema = z.object({\n installation: z.unknown().nullable(),\n links: z.array(z.unknown()),\n message_count: z.number(),\n recent_runs: z.array(z.unknown()),\n org_metadata: z.unknown().nullable(),\n default_agent: z.unknown().nullable(),\n default_compose: z.unknown().nullable(),\n default_compose_version: testTelegramStateComposeVersionSchema.nullable(),\n resolved_telegram_api_url: z.string().nullable(),\n mock_calls: z.array(z.unknown()),\n messages: z.array(z.unknown()),\n official_messages: z.array(z.unknown()),\n routes: z.array(z.unknown()),\n});\n\nexport const testTelegramStateDeleteResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport const testTelegramStateActionResponseSchema = z\n .object({\n ok: z.literal(true),\n })\n .passthrough();\n\nexport const testTelegramStateSeedResponseSchema = z.object({\n ok: z.literal(true),\n bot_id: z.string(),\n org_id: z.string(),\n vm0_user_id: z.string(),\n user_link_id: z.string().nullable(),\n default_agent_id: z.string(),\n});\n\nexport const testTelegramStateContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/test/telegram-state\",\n query: testTelegramStateQuerySchema,\n responses: {\n 200: testTelegramStateResponseSchema,\n 400: testTelegramStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Inspect Telegram E2E test state\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/test/telegram-state\",\n query: testTelegramStateQuerySchema,\n responses: {\n 200: testTelegramStateDeleteResponseSchema,\n 400: testTelegramStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Delete Telegram E2E test state\",\n },\n post: {\n method: \"POST\",\n path: \"/api/test/telegram-state\",\n body: testTelegramStateSeedBodySchema,\n responses: {\n 200: testTelegramStateSeedResponseSchema,\n 400: testTelegramStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Seed Telegram E2E test state\",\n },\n action: {\n method: \"POST\",\n path: \"/api/test/telegram-state/action\",\n body: testTelegramStateActionBodySchema,\n responses: {\n 200: testTelegramStateActionResponseSchema,\n 400: testTelegramStateErrorSchema,\n 404: z.string(),\n },\n summary: \"Mutate Telegram API test state\",\n },\n});\n\nexport type TestTelegramStateContract = typeof testTelegramStateContract;\nexport type TestTelegramStateResponse = z.infer<\n typeof testTelegramStateResponseSchema\n>;\nexport type TestTelegramStateSeedBody = z.infer<\n typeof testTelegramStateSeedBodySchema\n>;\nexport type TestTelegramStateSeedResponse = z.infer<\n typeof testTelegramStateSeedResponseSchema\n>;\nexport type TestTelegramStateActionBody = z.infer<\n typeof testTelegramStateActionBodySchema\n>;\nexport type TestTelegramStateActionResponse = z.infer<\n typeof testTelegramStateActionResponseSchema\n>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { connectorCatalogDiagnosticsSchema } from \"./connector-catalog-diagnostics\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n/**\n * Cleanup result schema\n */\nconst cleanupResultSchema = z.object({\n runId: z.string(),\n sandboxId: z.string().nullable(),\n status: z.enum([\"cleaned\", \"error\"]),\n error: z.string().optional(),\n reason: z.string().optional(),\n});\n\n/**\n * Cleanup response schema\n */\nconst cleanupResponseSchema = z.object({\n cleaned: z.number(),\n errors: z.number(),\n results: z.array(cleanupResultSchema),\n exportJobsCleaned: z.number(),\n exportJobsStuck: z.number(),\n threadlessRuns: z.object({\n discovered: z.number().int().nonnegative(),\n cancelled: z.number().int().nonnegative(),\n waiting: z.number().int().nonnegative(),\n deleted: z.number().int().nonnegative(),\n failed: z.number().int().nonnegative(),\n errors: z.array(\n z.object({\n runId: z.string().uuid(),\n error: z.string(),\n }),\n ),\n }),\n});\n\n/**\n * Cron cleanup sandboxes contract for /api/cron/cleanup-sandboxes\n */\nexport const cronCleanupSandboxesContract = c.router({\n /**\n * GET /api/cron/cleanup-sandboxes\n * Cron job to cleanup sandboxes that have stopped sending heartbeats\n */\n cleanup: {\n method: \"GET\",\n path: \"/api/cron/cleanup-sandboxes\",\n headers: authHeadersSchema,\n responses: {\n 200: cleanupResponseSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Cleanup expired sandboxes\",\n },\n});\n\nexport type CronCleanupSandboxesContract = typeof cronCleanupSandboxesContract;\n\nconst cronAggregateUsageResponseSchema = z.object({\n date: z.string(),\n aggregated: z.number(),\n});\n\nconst cronProcessUsageEventsResponseSchema = z.object({\n success: z.literal(true),\n processed: z.number(),\n});\n\nconst cronCompactChatThreadSnapshotsResponseSchema = z.object({\n success: z.literal(true),\n scopes: z.number(),\n eventsApplied: z.number(),\n removedDeletedAgentThreads: z.number(),\n eventsPruned: z.number(),\n});\n\nconst cronCompactUsageEventsResponseSchema = z.object({\n success: z.literal(true),\n cutoff: z.string(),\n rawSeedLimit: z.number().int().positive(),\n seededRawRows: z.number().int().nonnegative(),\n selectedGrains: z.number().int().nonnegative(),\n probedRawRows: z.number().int().nonnegative(),\n billingErrorHeldRows: z.number().int().nonnegative(),\n rawRowsDeleted: z.number().int().nonnegative(),\n hourlyRowsDeleted: z.number().int().nonnegative(),\n hourlyRowsInserted: z.number().int().nonnegative(),\n quantity: z.string().regex(/^-?\\d+$/),\n creditsCharged: z.string().regex(/^-?\\d+$/),\n allowanceUnits: z.string().regex(/^-?\\d+$/),\n affectedShortWindows: z.number().int().nonnegative(),\n affectedWeeklyWindows: z.number().int().nonnegative(),\n reconciled: z.literal(true),\n hasMore: z.boolean(),\n lockWaitMs: z.number().int().nonnegative(),\n durationMs: z.number().int().nonnegative(),\n});\n\nconst cronMonitorChatEventQueueResponseSchema = z.object({\n success: z.literal(true),\n orphanedMessages: z.number().int().nonnegative(),\n});\n\nconst cronReconcileBillingEntitlementsResponseSchema = z.object({\n success: z.literal(true),\n downgraded: z.number(),\n});\n\nconst cronTelegramCleanupResponseSchema = z.object({\n deleted: z.number(),\n});\n\nconst cronConnectorOauthStateCleanupResponseSchema = z.object({\n deleted: z.number().int().nonnegative(),\n});\n\nconst cronComputerUseScreenshotCleanupResponseSchema = z.object({\n cleaned: z.number(),\n});\n\nconst cronBrowserReconcileResponseSchema = z.object({\n checked: z.number().int().nonnegative(),\n stopped: z.number().int().nonnegative(),\n errors: z.number().int().nonnegative(),\n healthy: z.number().int().nonnegative(),\n});\n\nconst cronDrainEmailOutboxResponseSchema = z.object({\n success: z.literal(true),\n drained: z.number(),\n cleaned: z.number(),\n});\n\nconst cronSyncSkillsResponseSchema = z.object({\n success: z.literal(true),\n commitSha: z.string(),\n synced: z.number(),\n skipped: z.number(),\n failed: z.number(),\n removed: z.number(),\n total: z.number(),\n});\n\nconst connectorCatalogSyncResponseSchema =\n connectorCatalogDiagnosticsSchema.extend({\n outcome: z.enum([\"accepted\", \"unchanged\", \"rejected\"]),\n });\n\nexport type ConnectorCatalogSyncResponse = z.infer<\n typeof connectorCatalogSyncResponseSchema\n>;\n\nconst cronExecuteWorkflowAutomationsResponseSchema = z.object({\n success: z.literal(true),\n executed: z.number(),\n skipped: z.number(),\n});\n\nconst cronExecuteMorningBriefsResponseSchema = z.object({\n success: z.literal(true),\n executed: z.number(),\n skipped: z.number(),\n});\n\nconst cronRenewGmailWatchesResponseSchema = z.object({\n success: z.literal(true),\n renewed: z.number(),\n failed: z.number(),\n});\n\nconst cronRenewGoogleCalendarWatchesResponseSchema = z.object({\n success: z.literal(true),\n renewed: z.number(),\n failed: z.number(),\n});\n\nconst cronRenewGoogleWorkspaceEventSubscriptionsResponseSchema = z.object({\n success: z.literal(true),\n renewed: z.number(),\n repaired: z.number(),\n failed: z.number(),\n});\n\nconst cronAggregateInsightsSkippedResponseSchema = z.object({\n users: z.number(),\n skipped: z.literal(true),\n});\n\nconst cronAggregateInsightsAggregatedResponseSchema = z.object({\n users: z.number(),\n windows: z.number(),\n networkRows: z.number(),\n});\n\nconst cronAggregateInsightsResponseSchema = z.union([\n cronAggregateInsightsSkippedResponseSchema,\n cronAggregateInsightsAggregatedResponseSchema,\n]);\n\nconst storagePresignedUrlRefreshResultSchema = z.object({\n due: z.number(),\n refreshed: z.number(),\n pruned: z.number(),\n});\n\nconst cronRefreshStoragePresignedUrlsResponseSchema = z.object({\n success: z.literal(true),\n system: storagePresignedUrlRefreshResultSchema,\n workflowSkill: storagePresignedUrlRefreshResultSchema,\n});\n\nconst cronAggregateModelStatsResponseSchema = z.object({\n success: z.literal(true),\n cutoff: z.iso.datetime(),\n processedHours: z.number().int().nonnegative(),\n processedObservations: z.number().int().nonnegative(),\n updatedStats: z.number().int().nonnegative(),\n deletedObservations: z.number().int().nonnegative(),\n});\n\nexport const cronAggregateUsageContract = c.router({\n aggregate: {\n method: \"GET\",\n path: \"/api/cron/aggregate-usage\",\n headers: authHeadersSchema,\n responses: {\n 200: cronAggregateUsageResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Aggregate daily usage cache\",\n },\n});\n\nexport const cronProcessUsageEventsContract = c.router({\n process: {\n method: \"GET\",\n path: \"/api/cron/process-usage-events\",\n headers: authHeadersSchema,\n responses: {\n 200: cronProcessUsageEventsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Process pending usage events\",\n },\n});\n\nexport const cronCompactChatThreadSnapshotsContract = c.router({\n compact: {\n method: \"GET\",\n path: \"/api/cron/compact-chat-thread-snapshots\",\n headers: authHeadersSchema,\n responses: {\n 200: cronCompactChatThreadSnapshotsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Compact chat thread snapshots from lifecycle events\",\n },\n});\n\nexport const cronCompactUsageEventsContract = c.router({\n compact: {\n method: \"GET\",\n path: \"/api/cron/compact-usage-events\",\n headers: authHeadersSchema,\n responses: {\n 200: cronCompactUsageEventsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Compact stable usage events into hourly rollups\",\n },\n});\n\nexport const cronMonitorChatEventQueueContract = c.router({\n monitor: {\n method: \"GET\",\n path: \"/api/cron/monitor-chat-event-queue\",\n headers: authHeadersSchema,\n responses: {\n 200: cronMonitorChatEventQueueResponseSchema,\n 401: apiErrorSchema,\n 500: z.object({ error: z.string() }),\n },\n summary: \"Monitor for orphaned queued chat messages\",\n },\n});\n\nexport const cronReconcileBillingEntitlementsContract = c.router({\n reconcile: {\n method: \"GET\",\n path: \"/api/cron/reconcile-billing-entitlements\",\n headers: authHeadersSchema,\n responses: {\n 200: cronReconcileBillingEntitlementsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Reconcile billing entitlements\",\n },\n});\n\nexport const cronTelegramCleanupContract = c.router({\n cleanup: {\n method: \"GET\",\n path: \"/api/cron/telegram-cleanup\",\n headers: authHeadersSchema,\n responses: {\n 200: cronTelegramCleanupResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Delete expired Telegram messages\",\n },\n});\n\nexport const cronConnectorOauthStateCleanupContract = c.router({\n cleanup: {\n method: \"GET\",\n path: \"/api/cron/connector-oauth-state-cleanup\",\n headers: authHeadersSchema,\n responses: {\n 200: cronConnectorOauthStateCleanupResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Delete expired connector OAuth states\",\n },\n});\n\nexport const cronComputerUseScreenshotCleanupContract = c.router({\n cleanup: {\n method: \"GET\",\n path: \"/api/cron/computer-use-screenshot-cleanup\",\n headers: authHeadersSchema,\n responses: {\n 200: cronComputerUseScreenshotCleanupResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Delete expired desktop computer-use screenshots\",\n },\n});\n\nexport const cronBrowserReconcileContract = c.router({\n reconcile: {\n method: \"GET\",\n path: \"/api/cron/reconcile-browsers\",\n headers: authHeadersSchema,\n responses: {\n 200: cronBrowserReconcileResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Reconcile managed browser idle leases and provider state\",\n },\n});\n\nexport const cronDrainEmailOutboxContract = c.router({\n drain: {\n method: \"GET\",\n path: \"/api/cron/drain-email-outbox\",\n headers: authHeadersSchema,\n responses: {\n 200: cronDrainEmailOutboxResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Drain pending email outbox messages\",\n },\n});\n\nexport const cronRenewGmailWatchesContract = c.router({\n renew: {\n method: \"GET\",\n path: \"/api/cron/renew-gmail-watches\",\n headers: authHeadersSchema,\n responses: {\n 200: cronRenewGmailWatchesResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Renew Gmail push notification watches\",\n },\n});\n\nexport const cronRenewGoogleCalendarWatchesContract = c.router({\n renew: {\n method: \"GET\",\n path: \"/api/cron/renew-google-calendar-watches\",\n headers: authHeadersSchema,\n responses: {\n 200: cronRenewGoogleCalendarWatchesResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Renew Google Calendar push notification watches\",\n },\n});\n\nexport const cronRenewGoogleWorkspaceEventSubscriptionsContract = c.router({\n renew: {\n method: \"GET\",\n path: \"/api/cron/renew-google-workspace-event-subscriptions\",\n headers: authHeadersSchema,\n responses: {\n 200: cronRenewGoogleWorkspaceEventSubscriptionsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Renew Google Workspace Events subscriptions\",\n },\n});\n\nexport const cronSyncSkillsContract = c.router({\n sync: {\n method: \"GET\",\n path: \"/api/cron/sync-skills\",\n headers: authHeadersSchema,\n responses: {\n 200: cronSyncSkillsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Sync official skills from the skills repository\",\n },\n});\n\nexport const cronConnectorCatalogContract = c.router({\n sync: {\n method: \"GET\",\n path: \"/api/cron/sync-connector-catalog\",\n headers: authHeadersSchema,\n responses: {\n 200: connectorCatalogSyncResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Sync the validated connector catalog snapshot\",\n },\n});\n\nexport const cronExecuteWorkflowAutomationsContract = c.router({\n execute: {\n method: \"GET\",\n path: \"/api/cron/execute-workflow-automations\",\n headers: authHeadersSchema,\n responses: {\n 200: cronExecuteWorkflowAutomationsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Execute due workflow automations\",\n },\n});\n\nexport const cronExecuteMorningBriefsContract = c.router({\n execute: {\n method: \"GET\",\n path: \"/api/cron/execute-morning-briefs\",\n headers: authHeadersSchema,\n responses: {\n 200: cronExecuteMorningBriefsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Execute due morning briefs\",\n },\n});\n\nexport const cronAggregateInsightsContract = c.router({\n aggregate: {\n method: \"GET\",\n path: \"/api/cron/aggregate-insights\",\n headers: authHeadersSchema,\n responses: {\n 200: cronAggregateInsightsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Aggregate daily usage insights\",\n },\n});\n\nexport const cronAggregateModelStatsContract = c.router({\n aggregate: {\n method: \"GET\",\n path: \"/api/cron/aggregate-model-stats\",\n headers: authHeadersSchema,\n query: z.object({}).strict(),\n responses: {\n 200: cronAggregateModelStatsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Aggregate hourly model usage statistics\",\n },\n});\n\nexport const cronRefreshStoragePresignedUrlsContract = c.router({\n refresh: {\n method: \"GET\",\n path: \"/api/cron/refresh-storage-presigned-urls\",\n headers: authHeadersSchema,\n responses: {\n 200: cronRefreshStoragePresignedUrlsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Refresh cached storage presigned URLs\",\n },\n});\n\nexport type CronAggregateUsageContract = typeof cronAggregateUsageContract;\nexport type CronProcessUsageEventsContract =\n typeof cronProcessUsageEventsContract;\nexport type CronCompactChatThreadSnapshotsContract =\n typeof cronCompactChatThreadSnapshotsContract;\nexport type CronMonitorChatEventQueueContract =\n typeof cronMonitorChatEventQueueContract;\nexport type CronReconcileBillingEntitlementsContract =\n typeof cronReconcileBillingEntitlementsContract;\nexport type CronAggregateInsightsContract =\n typeof cronAggregateInsightsContract;\nexport type CronAggregateModelStatsContract =\n typeof cronAggregateModelStatsContract;\nexport type CronRefreshStoragePresignedUrlsContract =\n typeof cronRefreshStoragePresignedUrlsContract;\nexport type CronTelegramCleanupContract = typeof cronTelegramCleanupContract;\nexport type CronConnectorOauthStateCleanupContract =\n typeof cronConnectorOauthStateCleanupContract;\nexport type CronComputerUseScreenshotCleanupContract =\n typeof cronComputerUseScreenshotCleanupContract;\nexport type CronBrowserReconcileContract = typeof cronBrowserReconcileContract;\nexport type CronDrainEmailOutboxContract = typeof cronDrainEmailOutboxContract;\nexport type CronSyncSkillsContract = typeof cronSyncSkillsContract;\nexport type CronConnectorCatalogContract = typeof cronConnectorCatalogContract;\nexport type CronRenewGmailWatchesContract =\n typeof cronRenewGmailWatchesContract;\nexport type CronRenewGoogleCalendarWatchesContract =\n typeof cronRenewGoogleCalendarWatchesContract;\nexport type CronRenewGoogleWorkspaceEventSubscriptionsContract =\n typeof cronRenewGoogleWorkspaceEventSubscriptionsContract;\n\n// Export schemas for reuse\nexport {\n cleanupResultSchema,\n cleanupResponseSchema,\n cronAggregateUsageResponseSchema,\n cronCompactChatThreadSnapshotsResponseSchema,\n cronProcessUsageEventsResponseSchema,\n cronReconcileBillingEntitlementsResponseSchema,\n cronTelegramCleanupResponseSchema,\n cronConnectorOauthStateCleanupResponseSchema,\n cronComputerUseScreenshotCleanupResponseSchema,\n cronBrowserReconcileResponseSchema,\n cronDrainEmailOutboxResponseSchema,\n cronSyncSkillsResponseSchema,\n cronExecuteWorkflowAutomationsResponseSchema,\n cronRenewGmailWatchesResponseSchema,\n cronRenewGoogleCalendarWatchesResponseSchema,\n cronRenewGoogleWorkspaceEventSubscriptionsResponseSchema,\n cronAggregateInsightsResponseSchema,\n cronAggregateModelStatsResponseSchema,\n cronRefreshStoragePresignedUrlsResponseSchema,\n};\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const ARTIFACT_CATALOG_KINDS = [\n \"file\",\n \"hosted-site\",\n \"image\",\n \"video\",\n \"avatar\",\n \"presentation\",\n] as const;\n\nconst artifactKindSchema = z.enum(ARTIFACT_CATALOG_KINDS);\n\n/**\n * Static preview descriptor rendered by the catalog grid. Absent when the\n * artifact has no pre-rendered image yet.\n */\nconst artifactThumbnailSchema = z.object({\n url: z.string(),\n});\n\n/**\n * The catalog list returns only the metadata every kind shares. Kind-specific\n * attributes are loaded from the detail endpoint after a card is opened, so the\n * list query never joins a kind table and never exposes `entityId`.\n */\nconst artifactSummarySchema = z.object({\n id: z.string().uuid(),\n kind: artifactKindSchema,\n title: z.string(),\n thumbnail: artifactThumbnailSchema.nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n});\n\n/**\n * Keyset pagination over `(created_at DESC, id DESC)`. Updates never reorder\n * the list, so a cursor stays stable for the whole scroll session.\n */\nconst artifactIdPathParamsSchema = z.object({\n artifactId: z.string().uuid(),\n});\n\nconst artifactCatalogListQuerySchema = z.object({\n limit: z.coerce.number().int().positive().max(200).optional(),\n cursor: z.string().optional(),\n kind: artifactKindSchema.optional(),\n chatThreadId: z.string().uuid().optional(),\n});\n\nconst artifactCatalogListResponseSchema = z.object({\n artifacts: z.array(artifactSummarySchema),\n nextCursor: z.string().nullable(),\n // Optional while the frontend and API can be on adjacent deploys. New\n // clients only expose filters that the serving API advertises.\n supportedKinds: z.array(artifactKindSchema).optional(),\n});\n\n/**\n * The stored file backing a `file`, `image`, `video`, or `avatar` artifact.\n */\nconst artifactFileSchema = z.object({\n id: z.string().uuid(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n url: z.string(),\n previewImageUrl: z.string().nullable(),\n});\n\n/**\n * The hosted deployment backing a `hosted-site` or `presentation` artifact.\n * Version state stays owned by the hosted deployment records.\n */\nconst artifactHostedSiteSchema = z.object({\n id: z.string().uuid(),\n slug: z.string(),\n publicSlug: z.string(),\n url: z.string(),\n deploymentVersion: z.number().nullable(),\n entrypoint: z.string(),\n spaFallback: z.boolean(),\n});\n\nconst artifactDetailBaseSchema = artifactSummarySchema;\n\nconst artifactDetailSchema = z.discriminatedUnion(\"kind\", [\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"file\"),\n file: artifactFileSchema,\n }),\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"image\"),\n file: artifactFileSchema,\n model: z.string().nullable(),\n provider: z.string().nullable(),\n }),\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"video\"),\n file: artifactFileSchema,\n model: z.string().nullable(),\n durationSeconds: z.number().nullable(),\n }),\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"avatar\"),\n file: artifactFileSchema,\n model: z.string().nullable(),\n durationSeconds: z.number().nullable(),\n }),\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"hosted-site\"),\n site: artifactHostedSiteSchema,\n }),\n artifactDetailBaseSchema.extend({\n kind: z.literal(\"presentation\"),\n site: artifactHostedSiteSchema,\n }),\n]);\n\nexport const artifactCatalogContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/artifacts/catalog\",\n headers: authHeadersSchema,\n query: artifactCatalogListQuerySchema,\n responses: {\n 200: artifactCatalogListResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"List the caller's artifacts from the artifact catalog\",\n },\n get: {\n method: \"GET\",\n path: \"/api/zero/artifacts/catalog/:artifactId\",\n headers: authHeadersSchema,\n pathParams: artifactIdPathParamsSchema,\n responses: {\n 200: artifactDetailSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Get one artifact with its kind-specific detail\",\n },\n});\n\nexport type ArtifactCatalogContract = typeof artifactCatalogContract;\nexport type ArtifactCatalogKind = z.infer<typeof artifactKindSchema>;\nexport type ArtifactSummary = z.infer<typeof artifactSummarySchema>;\nexport type ArtifactDetail = z.infer<typeof artifactDetailSchema>;\n","import {\n type FirewallConfig,\n UNKNOWN_PERMISSION_GRANT,\n validateAuthBaseUrl,\n validateBaseUrlHostPolicy,\n validateBaseUrl,\n} from \"./firewall-types\";\nimport { hasRawWhitespace, hasUnsafeUrlCodepoint } from \"./firewall-url-utils\";\nimport { parseSegment, splitPathSegments } from \"./segment-parser\";\n\nconst VALID_RULE_METHODS = new Set([\n \"GET\",\n \"POST\",\n \"PUT\",\n \"PATCH\",\n \"DELETE\",\n \"HEAD\",\n \"OPTIONS\",\n \"ANY\",\n]);\n\nfunction validatePathSegments(\n path: string,\n rule: string,\n permName: string,\n serviceName: string,\n): void {\n if (!path.startsWith(\"/\")) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": path must start with \"/\"`,\n );\n }\n if (hasRawWhitespace(path)) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": path must not contain whitespace`,\n );\n }\n if (hasUnsafeUrlCodepoint(path)) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": path must not contain control characters or invalid Unicode`,\n );\n }\n if (path.includes(\"\\\\\")) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": path must not contain backslash`,\n );\n }\n if (path.includes(\"?\") || path.includes(\"#\")) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": path must not contain query string or fragment`,\n );\n }\n const segments = splitPathSegments(path);\n const paramNames = new Set<string>();\n for (let i = 0; i < segments.length; i++) {\n const seg = segments[i]!;\n const parsed = parseSegment(seg);\n if (parsed.kind === \"error\") {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": ${parsed.reason}`,\n );\n }\n if (parsed.kind === \"literal\") continue;\n const { name, greedy, prefix, suffix } = parsed;\n if (paramNames.has(name)) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": duplicate parameter name \"{${name}}\"`,\n );\n }\n paramNames.add(name);\n if (greedy && i !== segments.length - 1) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": {${name}${greedy}} must be the last segment`,\n );\n }\n if (greedy && (prefix !== \"\" || suffix !== \"\")) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": greedy parameter {${name}${greedy}} cannot be combined with a literal prefix or suffix in segment \"${seg}\"`,\n );\n }\n }\n}\n\nexport function validateRule(\n rule: string,\n permName: string,\n serviceName: string,\n): void {\n const spaceIdx = rule.indexOf(\" \");\n if (spaceIdx === -1) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": must be \"METHOD /path\"`,\n );\n }\n const method = rule.slice(0, spaceIdx);\n const rest = rule.slice(spaceIdx + 1);\n if (!method || !rest) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": must be \"METHOD /path\"`,\n );\n }\n if (!VALID_RULE_METHODS.has(method)) {\n throw new Error(\n `Invalid rule \"${rule}\" in permission \"${permName}\" of firewall \"${serviceName}\": unknown method \"${method}\" (must be uppercase)`,\n );\n }\n\n validatePathSegments(rest, rule, permName, serviceName);\n}\n\n/**\n * Collect available permission names from a firewall config.\n * Validates uniqueness and that \"all\" is not used as a permission name.\n */\nexport function collectAndValidatePermissions(\n serviceConfig: FirewallConfig,\n): Set<string> {\n if (serviceConfig.apis.length === 0) {\n throw new Error(`Firewall \"${serviceConfig.name}\" has no api entries`);\n }\n const available = new Set<string>();\n for (const api of serviceConfig.apis) {\n validateBaseUrl(api.base, serviceConfig.name);\n validateBaseUrlHostPolicy({\n base: api.base,\n serviceName: serviceConfig.name,\n hostPolicy: api.hostPolicy,\n });\n if (api.auth.base !== undefined) {\n validateAuthBaseUrl(api.auth.base, serviceConfig.name);\n }\n if (!api.permissions || api.permissions.length === 0) {\n // Empty permissions is a valid shape: every request under this base\n // falls through to the firewall's unknownPolicy. Auth headers are\n // still injected on base URL match.\n continue;\n }\n // Uniqueness is enforced within a single api_entry. The same permission\n // name across different api_entries is allowed (e.g., \"full-access\" on\n // both slack.com/api and files.slack.com).\n const seen = new Set<string>();\n for (const perm of api.permissions) {\n if (!perm.name) {\n throw new Error(\n `Firewall \"${serviceConfig.name}\" has a permission with empty name`,\n );\n }\n if (perm.name === \"all\" || perm.name === UNKNOWN_PERMISSION_GRANT) {\n throw new Error(\n `Firewall \"${serviceConfig.name}\" has a permission named \"${perm.name}\", which is a reserved keyword`,\n );\n }\n if (seen.has(perm.name)) {\n throw new Error(\n `Duplicate permission name \"${perm.name}\" in API entry \"${api.base}\" of firewall \"${serviceConfig.name}\"`,\n );\n }\n if (perm.rules.length === 0) {\n throw new Error(\n `Permission \"${perm.name}\" in firewall \"${serviceConfig.name}\" has no rules`,\n );\n }\n for (const rule of perm.rules) {\n validateRule(rule, perm.name, serviceConfig.name);\n }\n seen.add(perm.name);\n available.add(perm.name);\n }\n }\n return available;\n}\n","import {\n type FirewallConfig,\n hasUnsafeFirewallPath,\n hasBaseUrlParams,\n validateAuthBaseUrl,\n validateBaseUrl,\n} from \"./firewall-types\";\nimport { hasRawWhitespace, hasUnsafeUrlCodepoint } from \"./firewall-url-utils\";\nimport { parseSegment, splitPathSegments } from \"./segment-parser\";\n\ntype SegmentParseResult = ReturnType<typeof parseSegment>;\ntype MatchableSegment = Exclude<SegmentParseResult, { kind: \"error\" }>;\ntype SegmentMatchParser = (\n segment: string,\n patternIndex: number,\n lastPatternIndex: number,\n) => MatchableSegment | null;\n\ntype PathSpecificity = readonly [\n literalSegments: number,\n mixedParamSegments: number,\n plainParamSegments: number,\n plusGreedySegments: number,\n negativeStarGreedySegments: number,\n literalChars: number,\n segmentCount: number,\n];\n\nexport interface FindMatchingPermissionsOptions {\n apiBase?: string;\n}\n\nexport interface FirewallBaseUrlMatch {\n displayBase: string;\n relativePath: string;\n score: number;\n}\n\nexport interface FirewallRoutingPermissionRoute {\n readonly permissionName: string;\n readonly rule: string;\n}\n\nexport interface FirewallRoutingPermissionApi {\n readonly base: string;\n readonly routes: readonly FirewallRoutingPermissionRoute[];\n}\n\nexport type FirewallRequestBlockReason =\n | \"permission_denied\"\n | \"unknown_endpoint\"\n | \"malformed_firewall_config\"\n | \"malformed_network_policy\"\n | \"unsafe_path\";\n\nexport type FirewallConnectorIntent =\n | {\n readonly status: \"absent\" | \"malformed\";\n }\n | {\n readonly status: \"present\";\n readonly value: string;\n };\n\nexport type ConnectorRouteAmbiguityReason =\n | \"connector_intent_required\"\n | \"malformed_connector_intent\"\n | \"connector_intent_not_candidate\";\n\nexport type FirewallRequestDecision =\n | {\n readonly kind: \"no_match\";\n }\n | {\n readonly kind: \"allow\";\n readonly firewallName: string;\n readonly base: string;\n readonly relativePath: string;\n readonly permission?: string;\n readonly rule?: string;\n }\n | {\n readonly kind: \"block\";\n readonly firewallName: string;\n readonly base: string;\n readonly relativePath: string;\n readonly reason: FirewallRequestBlockReason;\n readonly permissions: readonly string[];\n }\n | {\n readonly kind: \"ambiguous\";\n readonly method: string;\n readonly path: string;\n readonly candidates: readonly string[];\n readonly reason: ConnectorRouteAmbiguityReason;\n };\n\ninterface ApiMatchState {\n bestSpecificity: PathSpecificity | null;\n matched: string[];\n}\n\ninterface PermissionRuleSet {\n readonly name: string;\n readonly rules: readonly string[];\n}\n\ninterface PermissionMatchApi {\n readonly permissionRuleSets: readonly PermissionRuleSet[];\n}\n\ntype UnknownPolicy = \"allow\" | \"deny\" | \"ask\";\n\ninterface CompiledNetworkPolicy {\n readonly blockedPermissions: ReadonlySet<string>;\n readonly unknownPolicy: UnknownPolicy;\n readonly permissionMalformed: boolean;\n readonly unknownPolicyMalformed: boolean;\n}\n\ninterface CompiledNetworkPolicies {\n readonly policies: ReadonlyMap<string, CompiledNetworkPolicy>;\n readonly topLevelMalformed: boolean;\n}\n\ninterface DecisionRule {\n readonly permission: string;\n readonly raw: string;\n readonly method: string;\n readonly path: string;\n readonly specificity: PathSpecificity;\n}\n\ninterface DecisionApi {\n readonly rawBase: string;\n readonly baseMalformed: boolean;\n readonly authMalformed: boolean;\n readonly hasMalformedRules: boolean;\n readonly permissionless: boolean;\n readonly routingIdentity: string | null;\n readonly rules: readonly DecisionRule[];\n}\n\ninterface DecisionFirewall {\n readonly name: string;\n readonly nameMalformed: boolean;\n readonly apis: readonly DecisionApi[];\n}\n\ninterface DecisionBaseMatch {\n readonly firewallName: string;\n readonly base: string;\n readonly allowBase: string;\n readonly relativePath: string;\n}\n\ninterface DecisionAllowedRuleMatch {\n readonly firewallName: string;\n readonly base: string;\n readonly relativePath: string;\n readonly permission: string;\n readonly rule: string;\n}\n\ninterface DecisionBlockMatch {\n readonly firewallName: string;\n readonly base: string;\n readonly relativePath: string;\n}\n\ninterface FirewallDecisionState {\n bestBaseScore: number | null;\n bestRuleSpecificity: PathSpecificity | null;\n baseMatch: DecisionBaseMatch | null;\n allowedMatch: DecisionAllowedRuleMatch | null;\n deniedMatch: DecisionBlockMatch | null;\n deniedPermissionNames: string[];\n malformedConfigMatch: DecisionBlockMatch | null;\n malformedPolicyMatch: DecisionBlockMatch | null;\n}\n\ninterface CollectedApiMatch {\n readonly order: number;\n readonly firewall: DecisionFirewall;\n readonly api: DecisionApi;\n readonly baseMatch: DecisionBaseMatch;\n readonly blockMatch: DecisionBlockMatch;\n readonly score: number;\n}\n\ninterface CollectedRuleMatch {\n readonly apiMatch: CollectedApiMatch;\n readonly rule: DecisionRule;\n}\n\ninterface FirewallMatchCollection {\n bestBaseScore: number | null;\n bestRuleSpecificity: PathSpecificity | null;\n apiMatches: CollectedApiMatch[];\n ruleMatches: CollectedRuleMatch[];\n}\n\nconst VALID_RULE_METHODS = new Set([\n \"GET\",\n \"POST\",\n \"PUT\",\n \"PATCH\",\n \"DELETE\",\n \"HEAD\",\n \"OPTIONS\",\n \"ANY\",\n]);\nconst FORBIDDEN_RUNTIME_HOST_CHARS = new Set(\"#%*,/<>?@\\\\^|{}\".split(\"\"));\nconst FORBIDDEN_BASE_PATTERN_HOST_CHARS = new Set(\"#%,/<>?@\\\\^|\".split(\"\"));\nconst PERCENT_ESCAPE_LENGTH = 3;\nconst HEX_DIGITS = new Set(\"0123456789abcdefABCDEF\".split(\"\"));\nconst PATH_SCORE_MULTIPLIER = 1_000_000;\nconst AUTHORITY_SCORE_MULTIPLIER = 100;\nconst LITERAL_SEGMENT_SCORE = 1_000;\nconst MIXED_PARAM_SEGMENT_SCORE = 100;\nconst PLAIN_PARAM_SEGMENT_SCORE = 10;\nconst PLUS_GREEDY_SEGMENT_SCORE = 1;\nconst ROOT_PATH_SCORE = 1;\nconst STATIC_BASE_SCORE_BONUS = 1;\nconst PERCENT_DECODED_AUTHORITY_SYNTAX_CHARS = new Set([\n \"{\",\n \"}\",\n \"*\",\n \".\",\n \"\\u3002\",\n \"\\uff0e\",\n \"\\uff61\",\n \":\",\n]);\n\n/**\n * Match a runtime segment against a mixed pattern's literal prefix/suffix.\n *\n * Byte-exact comparison; callers must case-fold inputs themselves when\n * needed. Returns the captured middle on success, or null if prefix/suffix\n * don't match or the middle would be empty (non-empty guard).\n */\nfunction matchMixedSegment(\n runtime: string,\n prefix: string,\n suffix: string,\n): string | null {\n if (!runtime.startsWith(prefix)) return null;\n if (!runtime.endsWith(suffix)) return null;\n if (runtime.length <= prefix.length + suffix.length) return null;\n return runtime.slice(prefix.length, runtime.length - suffix.length);\n}\n\nfunction hasNonEmptySegment(segments: string[], start: number): boolean {\n for (let i = start; i < segments.length; i++) {\n if (segments[i] !== \"\") return true;\n }\n return false;\n}\n\nfunction codePointLength(value: string): number {\n return [...value].length;\n}\n\nfunction hasUnsafeRuntimeUrlSyntax(value: string): boolean {\n return (\n hasUnsafeUrlCodepoint(value) ||\n hasRawWhitespace(value) ||\n value.includes(\"\\\\\") ||\n !value.includes(\"://\")\n );\n}\n\nfunction stripTrailingSlash(value: string): string {\n return value.endsWith(\"/\") ? value.slice(0, -1) : value;\n}\n\nfunction isInvalidGreedyParam(\n patternIndex: number,\n lastPatternIndex: number,\n prefix: string,\n suffix: string,\n): boolean {\n return patternIndex !== lastPatternIndex || prefix !== \"\" || suffix !== \"\";\n}\n\nfunction parseStrictMatchSegment(\n segment: string,\n patternIndex: number,\n lastPatternIndex: number,\n): MatchableSegment | null {\n const parsed = parseSegment(segment);\n if (parsed.kind === \"error\") return null;\n if (\n parsed.kind === \"param\" &&\n parsed.greedy !== \"\" &&\n isInvalidGreedyParam(\n patternIndex,\n lastPatternIndex,\n parsed.prefix,\n parsed.suffix,\n )\n ) {\n return null;\n }\n return parsed;\n}\n\nfunction pathSpecificity(pattern: string): PathSpecificity | null {\n if (\n !pattern.startsWith(\"/\") ||\n pattern.includes(\"?\") ||\n pattern.includes(\"#\") ||\n pattern.includes(\"\\\\\") ||\n hasRawWhitespace(pattern) ||\n hasUnsafeUrlCodepoint(pattern)\n ) {\n return null;\n }\n\n let literalSegments = 0;\n let mixedParamSegments = 0;\n let plainParamSegments = 0;\n let plusGreedySegments = 0;\n let starGreedySegments = 0;\n let literalChars = 0;\n const segments = splitPathSegments(pattern);\n const paramNames = new Set<string>();\n const lastSegmentIndex = segments.length - 1;\n\n for (let index = 0; index < segments.length; index += 1) {\n const seg = segments[index]!;\n const parsed = parseSegment(seg);\n if (parsed.kind === \"error\") return null;\n if (parsed.kind === \"literal\") {\n literalSegments += 1;\n literalChars += codePointLength(parsed.value);\n continue;\n }\n if (paramNames.has(parsed.name)) return null;\n paramNames.add(parsed.name);\n if (\n parsed.greedy !== \"\" &&\n isInvalidGreedyParam(\n index,\n lastSegmentIndex,\n parsed.prefix,\n parsed.suffix,\n )\n ) {\n return null;\n }\n\n literalChars +=\n codePointLength(parsed.prefix) + codePointLength(parsed.suffix);\n if (parsed.prefix !== \"\" || parsed.suffix !== \"\") {\n mixedParamSegments += 1;\n } else if (parsed.greedy === \"+\") {\n plusGreedySegments += 1;\n } else if (parsed.greedy === \"*\") {\n starGreedySegments += 1;\n } else {\n plainParamSegments += 1;\n }\n }\n\n return [\n literalSegments,\n mixedParamSegments,\n plainParamSegments,\n plusGreedySegments,\n -starGreedySegments,\n literalChars,\n segments.length,\n ];\n}\n\nfunction comparePathSpecificity(\n left: PathSpecificity,\n right: PathSpecificity,\n): number {\n for (let i = 0; i < left.length; i++) {\n const difference = left[i]! - right[i]!;\n if (difference !== 0) return difference;\n }\n return 0;\n}\n\nfunction matchingRulePath(rule: string, upperMethod: string): string | null {\n const spaceIdx = rule.indexOf(\" \");\n if (spaceIdx === -1) return null;\n const ruleMethod = rule.slice(0, spaceIdx);\n if (!VALID_RULE_METHODS.has(ruleMethod)) return null;\n if (ruleMethod !== \"ANY\" && ruleMethod !== upperMethod) return null;\n return rule.slice(spaceIdx + 1);\n}\n\nfunction compileDecisionRule(\n permission: string,\n rule: string,\n): DecisionRule | null {\n const spaceIdx = rule.indexOf(\" \");\n if (spaceIdx === -1) return null;\n const method = rule.slice(0, spaceIdx);\n if (!VALID_RULE_METHODS.has(method)) return null;\n const path = rule.slice(spaceIdx + 1);\n const specificity = pathSpecificity(path);\n if (specificity === null) return null;\n return { permission, raw: rule, method, path, specificity };\n}\n\nfunction isValidPermissionName(permissionName: string): boolean {\n return permissionName !== \"\" && permissionName !== \"all\";\n}\n\nfunction isObjectRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction isStringRecord(value: unknown): value is Record<string, string> {\n if (!isObjectRecord(value)) return false;\n return Object.values(value).every((entry) => {\n return typeof entry === \"string\";\n });\n}\n\nfunction hasEntries(value: Record<string, string> | undefined): boolean {\n return value !== undefined && Object.keys(value).length > 0;\n}\n\nfunction isValidAwsSigv4AuthConfig(value: unknown): boolean {\n if (!isObjectRecord(value)) return false;\n const allowedKeys = new Set([\n \"accessKeyId\",\n \"secretAccessKey\",\n \"sessionToken\",\n ]);\n if (\n Object.keys(value).some((key) => {\n return !allowedKeys.has(key);\n })\n ) {\n return false;\n }\n if (typeof value.accessKeyId !== \"string\" || value.accessKeyId === \"\") {\n return false;\n }\n if (\n typeof value.secretAccessKey !== \"string\" ||\n value.secretAccessKey === \"\"\n ) {\n return false;\n }\n const optionalValue = value.sessionToken;\n if (\n optionalValue !== undefined &&\n (typeof optionalValue !== \"string\" || optionalValue === \"\")\n ) {\n return false;\n }\n return true;\n}\n\nfunction isValidAuthConfig(auth: unknown, serviceName: string): boolean {\n if (!isObjectRecord(auth)) return false;\n if (auth.headers !== undefined && !isStringRecord(auth.headers)) return false;\n if (auth.query !== undefined && !isStringRecord(auth.query)) return false;\n if (\n auth.awsSigv4 !== undefined &&\n !isValidAwsSigv4AuthConfig(auth.awsSigv4)\n ) {\n return false;\n }\n if (auth.awsSigv4 !== undefined) {\n if (hasEntries(auth.headers as Record<string, string> | undefined)) {\n return false;\n }\n if (hasEntries(auth.query as Record<string, string> | undefined)) {\n return false;\n }\n }\n if (auth.base !== undefined) {\n if (typeof auth.base !== \"string\") return false;\n validateAuthBaseUrl(auth.base, serviceName);\n if (auth.awsSigv4 !== undefined) return false;\n }\n return true;\n}\n\nfunction isValidApiEntry(\n api: FirewallConfig[\"apis\"][number],\n serviceName: string,\n): boolean {\n if (!isObjectRecord(api)) return false;\n if (typeof api.base !== \"string\") return false;\n try {\n validateBaseUrl(api.base, serviceName);\n if (!isValidAuthConfig(api.auth, serviceName)) return false;\n } catch {\n return false;\n }\n return true;\n}\n\nfunction getPermissionName(permission: unknown): string | null {\n if (!isObjectRecord(permission)) return null;\n if (typeof permission.name !== \"string\") return null;\n if (!isValidPermissionName(permission.name)) return null;\n return permission.name;\n}\n\nfunction getPermissionRules(permission: unknown): string[] {\n if (!isObjectRecord(permission)) return [];\n if (!Array.isArray(permission.rules)) return [];\n const rules = permission.rules.filter((rule) => {\n return typeof rule === \"string\";\n });\n return rules;\n}\n\nfunction rawObjectHasOwn(value: Record<string, unknown>, key: string): boolean {\n return Object.prototype.hasOwnProperty.call(value, key);\n}\n\nfunction isValidAuthConfigForDecision(\n auth: unknown,\n serviceName: string,\n): boolean {\n try {\n return isValidAuthConfig(auth, serviceName);\n } catch {\n return false;\n }\n}\n\nfunction canonicalJson(value: unknown): string | undefined {\n if (value === null) return \"null\";\n if (typeof value === \"string\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n }\n if (typeof value === \"number\") {\n return Number.isFinite(value) ? JSON.stringify(value) : undefined;\n }\n if (Array.isArray(value)) {\n const items: string[] = [];\n for (const item of value) {\n const encoded = canonicalJson(item);\n if (encoded === undefined) return undefined;\n items.push(encoded);\n }\n return `[${items.join(\",\")}]`;\n }\n if (!isObjectRecord(value)) return undefined;\n\n const entries: string[] = [];\n for (const key of Object.keys(value).sort()) {\n const item = value[key];\n if (item === undefined) continue;\n const encoded = canonicalJson(item);\n if (encoded === undefined) return undefined;\n entries.push(`${JSON.stringify(key)}:${encoded}`);\n }\n return `{${entries.join(\",\")}}`;\n}\n\nfunction decisionApiRoutingIdentity(\n api: Record<string, unknown>,\n): string | null {\n return (\n canonicalJson({\n base: api.base,\n hostPolicy: api.hostPolicy,\n auth: api.auth,\n }) ?? null\n );\n}\n\nfunction compileDecisionApi(\n api: Record<string, unknown>,\n serviceName: string,\n nameMalformed: boolean,\n): DecisionApi | null {\n if (typeof api.base !== \"string\") return null;\n\n let baseMalformed = false;\n try {\n validateBaseUrl(api.base, serviceName);\n } catch {\n baseMalformed = true;\n }\n const authMalformed = !isValidAuthConfigForDecision(api.auth, serviceName);\n const routingIdentity = decisionApiRoutingIdentity(api);\n const rules: DecisionRule[] = [];\n const seenPermissionNames = new Set<string>();\n let hasMalformedRules = nameMalformed;\n const rawPermissions = api.permissions;\n const permissionless =\n !rawObjectHasOwn(api, \"permissions\") ||\n (Array.isArray(rawPermissions) && rawPermissions.length === 0);\n\n if (Array.isArray(rawPermissions)) {\n for (const rawPermission of rawPermissions) {\n if (!isObjectRecord(rawPermission)) {\n hasMalformedRules = true;\n continue;\n }\n const permissionName = rawPermission.name;\n if (\n typeof permissionName !== \"string\" ||\n !isValidPermissionName(permissionName)\n ) {\n hasMalformedRules = true;\n continue;\n }\n if (seenPermissionNames.has(permissionName)) {\n hasMalformedRules = true;\n continue;\n }\n seenPermissionNames.add(permissionName);\n\n const rawRules = rawPermission.rules;\n if (!Array.isArray(rawRules)) {\n hasMalformedRules = true;\n continue;\n }\n if (rawRules.length === 0) {\n hasMalformedRules = true;\n }\n\n for (const rawRule of rawRules) {\n if (typeof rawRule !== \"string\") {\n hasMalformedRules = true;\n continue;\n }\n const compiledRule = compileDecisionRule(permissionName, rawRule);\n if (compiledRule === null) {\n hasMalformedRules = true;\n continue;\n }\n rules.push(compiledRule);\n }\n }\n } else if (rawObjectHasOwn(api, \"permissions\")) {\n hasMalformedRules = true;\n }\n\n return {\n rawBase: api.base,\n baseMalformed,\n authMalformed,\n hasMalformedRules,\n permissionless,\n routingIdentity,\n rules,\n };\n}\n\nfunction compileDecisionFirewall(\n rawFirewall: unknown,\n): DecisionFirewall | null {\n if (!isObjectRecord(rawFirewall)) return null;\n\n const rawName = rawFirewall.name;\n const nameMalformed = typeof rawName !== \"string\" || rawName === \"\";\n const name = typeof rawName === \"string\" ? rawName : \"\";\n const rawApis = rawFirewall.apis;\n if (!Array.isArray(rawApis)) return null;\n\n const apis: DecisionApi[] = [];\n for (const rawApi of rawApis) {\n if (!isObjectRecord(rawApi)) continue;\n const api = compileDecisionApi(rawApi, name, nameMalformed);\n if (api !== null) {\n apis.push(api);\n }\n }\n\n if (apis.length === 0) return null;\n return { name, nameMalformed, apis };\n}\n\nfunction compileDecisionFirewalls(rawFirewalls: unknown): DecisionFirewall[] {\n if (!Array.isArray(rawFirewalls) || rawFirewalls.length === 0) return [];\n\n const firewalls: DecisionFirewall[] = [];\n for (const rawFirewall of rawFirewalls) {\n const firewall = compileDecisionFirewall(rawFirewall);\n if (firewall !== null) {\n firewalls.push(firewall);\n }\n }\n return firewalls;\n}\n\nfunction compilePermissionSet(rawValue: unknown): {\n readonly values: ReadonlySet<string>;\n readonly malformed: boolean;\n} {\n if (rawValue === undefined || rawValue === null) {\n return { values: new Set<string>(), malformed: false };\n }\n if (\n !Array.isArray(rawValue) ||\n rawValue.some((item) => {\n return typeof item !== \"string\";\n })\n ) {\n return { values: new Set<string>(), malformed: true };\n }\n return { values: new Set(rawValue), malformed: false };\n}\n\nfunction compileNetworkPolicies(\n rawNetworkPolicies: unknown,\n): CompiledNetworkPolicies {\n if (rawNetworkPolicies === undefined || rawNetworkPolicies === null) {\n return { policies: new Map(), topLevelMalformed: false };\n }\n if (!isObjectRecord(rawNetworkPolicies)) {\n return { policies: new Map(), topLevelMalformed: true };\n }\n\n const policies = new Map<string, CompiledNetworkPolicy>();\n for (const [firewallName, grant] of Object.entries(rawNetworkPolicies)) {\n if (!isObjectRecord(grant)) {\n policies.set(firewallName, {\n blockedPermissions: new Set<string>(),\n unknownPolicy: \"allow\",\n permissionMalformed: true,\n unknownPolicyMalformed: false,\n });\n continue;\n }\n\n const allow = compilePermissionSet(grant.allow);\n const deny = compilePermissionSet(grant.deny);\n const ask = compilePermissionSet(grant.ask);\n const blockedPermissions = new Set<string>([...deny.values, ...ask.values]);\n\n let unknownPolicy: UnknownPolicy = \"allow\";\n let unknownPolicyMalformed = false;\n const rawUnknownPolicy = grant.unknownPolicy;\n if (\n rawUnknownPolicy === \"allow\" ||\n rawUnknownPolicy === \"deny\" ||\n rawUnknownPolicy === \"ask\"\n ) {\n unknownPolicy = rawUnknownPolicy;\n } else if (rawUnknownPolicy !== undefined && rawUnknownPolicy !== null) {\n unknownPolicyMalformed = true;\n }\n\n policies.set(firewallName, {\n blockedPermissions,\n unknownPolicy,\n permissionMalformed: allow.malformed || deny.malformed || ask.malformed,\n unknownPolicyMalformed,\n });\n }\n\n return { policies, topLevelMalformed: false };\n}\n\nfunction getApiPermissionRuleSetsForMatch(\n api: FirewallConfig[\"apis\"][number],\n serviceName: string,\n apiBase: string | null,\n): PermissionRuleSet[] | null {\n if (!isValidApiEntry(api, serviceName)) return null;\n if (apiBase !== null && stripTrailingSlash(api.base) !== apiBase) return null;\n if (api.permissions === undefined) return null;\n if (!Array.isArray(api.permissions)) return null;\n\n const permissionRuleSets: PermissionRuleSet[] = [];\n const seenPermissionNames = new Set<string>();\n for (const rawPermission of api.permissions) {\n const permissionName = getPermissionName(rawPermission);\n if (permissionName === null) continue;\n if (seenPermissionNames.has(permissionName)) continue;\n seenPermissionNames.add(permissionName);\n permissionRuleSets.push({\n name: permissionName,\n rules: getPermissionRules(rawPermission),\n });\n }\n return permissionRuleSets;\n}\n\nfunction recordPermissionMatch(\n state: ApiMatchState,\n permission: string,\n specificity: PathSpecificity,\n): void {\n if (\n state.bestSpecificity === null ||\n comparePathSpecificity(specificity, state.bestSpecificity) > 0\n ) {\n state.bestSpecificity = specificity;\n state.matched.length = 0;\n }\n if (\n comparePathSpecificity(specificity, state.bestSpecificity) === 0 &&\n !state.matched.includes(permission)\n ) {\n state.matched.push(permission);\n }\n}\n\nfunction relativePathFromSegments(\n segments: string[],\n consumed: number,\n): string {\n const rest = segments.slice(consumed).join(\"/\");\n return rest === \"\" ? \"/\" : `/${rest}`;\n}\n\nfunction stripUrlQueryAndFragment(url: string): string {\n const queryIndex = url.indexOf(\"?\");\n const fragmentIndex = url.indexOf(\"#\");\n let end = url.length;\n if (queryIndex !== -1) end = Math.min(end, queryIndex);\n if (fragmentIndex !== -1) end = Math.min(end, fragmentIndex);\n return url.slice(0, end);\n}\n\nfunction rawUrlAuthorityBounds(url: string): {\n readonly authorityStart: number;\n readonly authorityEnd: number;\n} | null {\n const schemeEnd = url.indexOf(\"://\");\n if (schemeEnd === -1) return null;\n\n const authorityStart = schemeEnd + 3;\n let authorityEnd = url.length;\n for (const delimiter of [\"/\", \"?\", \"#\"]) {\n const delimiterIndex = url.indexOf(delimiter, authorityStart);\n if (delimiterIndex !== -1)\n authorityEnd = Math.min(authorityEnd, delimiterIndex);\n }\n\n return { authorityStart, authorityEnd };\n}\n\nfunction replaceRawUrlAuthority(\n url: string,\n bounds: { readonly authorityStart: number; readonly authorityEnd: number },\n authority: string,\n): string {\n return `${url.slice(0, bounds.authorityStart)}${authority}${url.slice(bounds.authorityEnd)}`;\n}\n\nfunction stripRawUrlUserinfo(url: string): string {\n const bounds = rawUrlAuthorityBounds(url);\n if (bounds === null) return url;\n\n const authority = url.slice(bounds.authorityStart, bounds.authorityEnd);\n const userinfoEnd = authority.lastIndexOf(\"@\");\n if (userinfoEnd === -1) return url;\n\n return replaceRawUrlAuthority(url, bounds, authority.slice(userinfoEnd + 1));\n}\n\nfunction rawAuthorityPortIsMalformed(port: string): boolean {\n if (port === \"\") return true;\n if (\n ![...port].every((char) => {\n return char >= \"0\" && char <= \"9\";\n })\n ) {\n return true;\n }\n return Number(port) > 65535;\n}\n\nfunction stripRawUrlMalformedPort(url: string): string {\n const bounds = rawUrlAuthorityBounds(url);\n if (bounds === null) return url;\n\n const authority = url.slice(bounds.authorityStart, bounds.authorityEnd);\n if (authority.startsWith(\"[\")) {\n const closeBracketIndex = authority.indexOf(\"]\");\n if (closeBracketIndex === -1) return url;\n const portPrefix = authority.slice(closeBracketIndex + 1);\n if (!portPrefix.startsWith(\":\")) return url;\n if (!rawAuthorityPortIsMalformed(portPrefix.slice(1))) return url;\n return replaceRawUrlAuthority(\n url,\n bounds,\n authority.slice(0, closeBracketIndex + 1),\n );\n }\n\n const portSeparator = authority.lastIndexOf(\":\");\n if (portSeparator === -1) return url;\n if (authority.indexOf(\":\") !== portSeparator) return url;\n if (!rawAuthorityPortIsMalformed(authority.slice(portSeparator + 1))) {\n return url;\n }\n return replaceRawUrlAuthority(url, bounds, authority.slice(0, portSeparator));\n}\n\nfunction rawBaseForDecisionMatch(rawBase: string): string | null {\n if (stripUrlQueryAndFragment(rawBase).includes(\"\\\\\")) return null;\n return stripRawUrlMalformedPort(stripRawUrlUserinfo(rawBase));\n}\n\nfunction rawPathFromUrl(url: string): string {\n const urlWithoutQuery = stripUrlQueryAndFragment(url);\n const schemeEnd = urlWithoutQuery.indexOf(\"://\");\n const authorityStart = schemeEnd === -1 ? 0 : schemeEnd + 3;\n const pathStart = urlWithoutQuery.indexOf(\"/\", authorityStart);\n return pathStart === -1 ? \"/\" : urlWithoutQuery.slice(pathStart);\n}\n\nfunction rawBasePathFromUrl(url: string): string {\n const urlWithoutQuery = stripUrlQueryAndFragment(url);\n const schemeEnd = urlWithoutQuery.indexOf(\"://\");\n const authorityStart = schemeEnd === -1 ? 0 : schemeEnd + 3;\n const pathStart = urlWithoutQuery.indexOf(\"/\", authorityStart);\n return pathStart === -1 ? \"\" : urlWithoutQuery.slice(pathStart);\n}\n\nfunction rawAuthorityFromUrl(url: string): string | null {\n const urlWithoutQuery = stripUrlQueryAndFragment(url);\n const schemeEnd = urlWithoutQuery.indexOf(\"://\");\n if (schemeEnd === -1) return null;\n const authorityStart = schemeEnd + 3;\n const pathStart = urlWithoutQuery.indexOf(\"/\", authorityStart);\n const authority =\n pathStart === -1\n ? urlWithoutQuery.slice(authorityStart)\n : urlWithoutQuery.slice(authorityStart, pathStart);\n return authority === \"\" ? null : authority;\n}\n\nfunction hasNonAscii(value: string): boolean {\n for (let index = 0; index < value.length; index += 1) {\n if (value.charCodeAt(index) > 0x7f) return true;\n }\n return false;\n}\n\nfunction rawHostFromAuthority(authority: string): string {\n const withoutUserinfo = authority.slice(authority.lastIndexOf(\"@\") + 1);\n if (withoutUserinfo.startsWith(\"[\")) {\n const closeBracket = withoutUserinfo.indexOf(\"]\");\n return closeBracket === -1\n ? withoutUserinfo\n : withoutUserinfo.slice(0, closeBracket + 1);\n }\n const portSeparator = withoutUserinfo.lastIndexOf(\":\");\n return portSeparator === -1\n ? withoutUserinfo\n : withoutUserinfo.slice(0, portSeparator);\n}\n\nfunction authorityHasEmptyPort(authority: string): boolean {\n const withoutUserinfo = authority.slice(authority.lastIndexOf(\"@\") + 1);\n if (withoutUserinfo.startsWith(\"[\")) {\n const closeBracket = withoutUserinfo.indexOf(\"]\");\n if (closeBracket === -1) return false;\n return withoutUserinfo.slice(closeBracket + 1) === \":\";\n }\n\n const portSeparator = withoutUserinfo.lastIndexOf(\":\");\n if (portSeparator === -1) return false;\n return (\n withoutUserinfo.indexOf(\":\") === portSeparator &&\n portSeparator === withoutUserinfo.length - 1\n );\n}\n\nfunction rawAuthorityHostStartsWithDigit(authority: string): boolean {\n const firstChar = rawHostFromAuthority(authority)[0];\n return firstChar !== undefined && firstChar >= \"0\" && firstChar <= \"9\";\n}\n\nfunction runtimeAuthorityOriginForHostValidation(url: string): string | null {\n const authority = rawAuthorityFromUrl(url);\n if (authority === null) return null;\n if (\n !authority.includes(\"%\") &&\n !hasNonAscii(authority) &&\n !rawAuthorityHostStartsWithDigit(authority)\n ) {\n return null;\n }\n\n const schemeEnd = url.indexOf(\"://\");\n if (schemeEnd === -1) return null;\n return `${url.slice(0, schemeEnd)}://${authority}`;\n}\n\nfunction hasPercentEncodedAuthoritySyntax(value: string): boolean {\n let index = value.indexOf(\"%\");\n while (index !== -1) {\n let runEnd = index;\n while (runEnd < value.length && value[runEnd] === \"%\") {\n const firstHexDigit = value[runEnd + 1];\n const secondHexDigit = value[runEnd + 2];\n if (\n !firstHexDigit ||\n !secondHexDigit ||\n !HEX_DIGITS.has(firstHexDigit) ||\n !HEX_DIGITS.has(secondHexDigit)\n ) {\n return true;\n }\n runEnd += PERCENT_ESCAPE_LENGTH;\n }\n\n let decodedRun: string;\n try {\n decodedRun = decodeURIComponent(value.slice(index, runEnd));\n } catch {\n return true;\n }\n for (const char of decodedRun) {\n if (PERCENT_DECODED_AUTHORITY_SYNTAX_CHARS.has(char)) {\n return true;\n }\n }\n index = value.indexOf(\"%\", runEnd);\n }\n return false;\n}\n\nfunction hasMalformedRuntimeAuthoritySyntax(url: string): boolean {\n const authority = rawAuthorityFromUrl(url);\n if (authority === null) return false;\n return (\n authority.includes(\"\\\\\") ||\n authorityHasEmptyPort(authority) ||\n hasPercentEncodedAuthoritySyntax(authority)\n );\n}\n\nfunction scoreLiteralSegment(segment: string): number {\n return LITERAL_SEGMENT_SCORE + codePointLength(segment);\n}\n\nfunction scoreParsedPatternSegment(parsed: MatchableSegment): number {\n if (parsed.kind === \"literal\") {\n return scoreLiteralSegment(parsed.value);\n }\n\n const literalChars =\n codePointLength(parsed.prefix) + codePointLength(parsed.suffix);\n if (parsed.prefix !== \"\" || parsed.suffix !== \"\") {\n return MIXED_PARAM_SEGMENT_SCORE + literalChars;\n }\n if (parsed.greedy === \"+\") return PLUS_GREEDY_SEGMENT_SCORE;\n if (parsed.greedy === \"*\") return 0;\n return PLAIN_PARAM_SEGMENT_SCORE;\n}\n\nfunction scoreStaticSegments(segments: string[]): number {\n return segments.reduce((score, segment) => {\n return score + scoreLiteralSegment(segment);\n }, 0);\n}\n\nfunction scorePatternSegmentsWithParser(\n segments: string[],\n parsePatternSegment: SegmentMatchParser,\n): number {\n const lastPatternIndex = segments.length - 1;\n let score = 0;\n for (let index = 0; index < segments.length; index += 1) {\n const segment = segments[index]!;\n const parsed = parsePatternSegment(segment, index, lastPatternIndex);\n if (parsed !== null) {\n score += scoreParsedPatternSegment(parsed);\n }\n }\n return score;\n}\n\nfunction scorePathPattern(\n path: string,\n parsePatternSegment: SegmentMatchParser | null,\n): number {\n if (path === \"\") return 0;\n if (path === \"/\") return ROOT_PATH_SCORE;\n const segments = splitPathSegments(path);\n return parsePatternSegment === null\n ? scoreStaticSegments(segments)\n : scorePatternSegmentsWithParser(segments, parsePatternSegment);\n}\n\nfunction splitAuthoritySegments(authority: string): string[] {\n if (authority.startsWith(\"[\")) return [authority];\n const normalized = authority.endsWith(\".\")\n ? authority.slice(0, -1)\n : authority;\n return normalized === \"\" ? [] : normalized.split(\".\");\n}\n\nfunction baseUrlSpecificityScore({\n authority,\n path,\n hasParams,\n tolerateMalformedBaseParams = false,\n}: {\n readonly authority: string;\n readonly path: string;\n readonly hasParams: boolean;\n readonly tolerateMalformedBaseParams?: boolean;\n}): number {\n const patternParser = hasParams\n ? tolerateMalformedBaseParams\n ? parseMalformedTolerantBaseSegment\n : parseStrictMatchSegment\n : null;\n const authoritySegments = splitAuthoritySegments(authority);\n const authorityScore =\n patternParser === null\n ? scoreStaticSegments(authoritySegments)\n : scorePatternSegmentsWithParser(\n [...authoritySegments].reverse(),\n patternParser,\n );\n const pathScore = scorePathPattern(path, patternParser);\n return (\n pathScore * PATH_SCORE_MULTIPLIER +\n authorityScore * AUTHORITY_SCORE_MULTIPLIER +\n (hasParams ? 0 : STATIC_BASE_SCORE_BONUS)\n );\n}\n\nfunction matchStaticBasePathPrefix(\n path: string,\n pattern: string,\n): string | null {\n if (pattern === \"\") {\n return path === \"\" ? \"/\" : path;\n }\n if (pattern === \"/\") {\n if (!path.startsWith(pattern)) return null;\n const relativePath = path.slice(pattern.length);\n if (relativePath !== \"\" && !relativePath.startsWith(\"/\")) return null;\n return relativePath === \"\" ? \"/\" : relativePath;\n }\n if (!path.startsWith(pattern)) return null;\n const relativePath = path.slice(pattern.length);\n if (relativePath !== \"\" && !relativePath.startsWith(\"/\")) return null;\n return relativePath === \"\" ? \"/\" : relativePath;\n}\n\nfunction normalizeUrlHostname(\n hostname: string,\n options: { allowHostParams?: boolean } = {},\n): string | null {\n let normalized = hostname.toLowerCase();\n if (normalized.endsWith(\".\")) {\n normalized = normalized.slice(0, -1);\n if (normalized === \"\" || normalized.endsWith(\".\")) {\n return null;\n }\n }\n if (\n normalized.split(\".\").some((label) => {\n return label === \"\";\n })\n ) {\n return null;\n }\n const forbiddenChars =\n options.allowHostParams === true\n ? FORBIDDEN_BASE_PATTERN_HOST_CHARS\n : FORBIDDEN_RUNTIME_HOST_CHARS;\n if (\n !normalized.startsWith(\"[\") &&\n [...normalized].some((char) => {\n return forbiddenChars.has(char);\n })\n ) {\n return null;\n }\n return normalized;\n}\n\ninterface NormalizedUrlAuthority {\n readonly hostname: string;\n readonly port: string | null;\n readonly authority: string;\n}\n\nfunction normalizedUrlAuthority(\n parsed: URL,\n options: { allowHostParams?: boolean } = {},\n): NormalizedUrlAuthority | null {\n if (parsed.username !== \"\" || parsed.password !== \"\") {\n return null;\n }\n\n const hostname = normalizeUrlHostname(parsed.hostname, options);\n if (hostname === null || hostname === \"\") {\n return null;\n }\n\n const port = parsed.port === \"\" ? null : parsed.port;\n return {\n hostname,\n port,\n authority: port === null ? hostname : `${hostname}:${port}`,\n };\n}\n\nfunction matchStaticFirewallBaseUrl(\n url: string,\n rawBase: string,\n options: {\n readonly tolerateMalformedBaseParams?: boolean;\n } = {},\n): FirewallBaseUrlMatch | null {\n const parsedUrl = new URL(url);\n const parsedBase = new URL(rawBase);\n if (parsedUrl.protocol.toLowerCase() !== parsedBase.protocol.toLowerCase()) {\n return null;\n }\n const baseHasParams = hasBaseUrlParams(rawBase);\n const baseForMatch = stripTrailingSlash(rawBase);\n\n const urlAuthority = normalizedUrlAuthority(parsedUrl);\n const baseAuthority = normalizedUrlAuthority(parsedBase, {\n allowHostParams: baseHasParams,\n });\n if (urlAuthority === null || baseAuthority === null) return null;\n if (baseHasParams) {\n if (urlAuthority.port !== baseAuthority.port) return null;\n const hostParams =\n options.tolerateMalformedBaseParams === true\n ? matchFirewallHostForMalformedBaseDecision(\n urlAuthority.hostname,\n baseAuthority.hostname,\n )\n : matchFirewallHost(urlAuthority.hostname, baseAuthority.hostname);\n if (hostParams === null) return null;\n } else if (urlAuthority.authority !== baseAuthority.authority) {\n return null;\n }\n\n const basePath = rawBasePathFromUrl(baseForMatch);\n const relativePath = baseHasParams\n ? options.tolerateMalformedBaseParams === true\n ? matchFirewallPathPrefixForMalformedBaseDecision(\n rawPathFromUrl(url),\n basePath,\n )\n : matchFirewallPathPrefix(rawPathFromUrl(url), basePath)\n : matchStaticBasePathPrefix(rawPathFromUrl(url), basePath);\n if (relativePath === null) return null;\n\n const displayBase = stripTrailingSlash(rawBase);\n return {\n displayBase,\n relativePath,\n score: baseUrlSpecificityScore({\n authority: baseHasParams\n ? baseAuthority.hostname\n : baseAuthority.authority,\n path: basePath,\n hasParams: baseHasParams,\n tolerateMalformedBaseParams: options.tolerateMalformedBaseParams === true,\n }),\n };\n}\n\nfunction runtimeUrlCanMatchFirewallBase(url: string): boolean {\n if (\n hasUnsafeUrlCodepoint(url) ||\n hasRawWhitespace(url) ||\n !url.includes(\"://\") ||\n hasMalformedRuntimeAuthoritySyntax(url)\n ) {\n return false;\n }\n\n const runtimeAuthorityOrigin = runtimeAuthorityOriginForHostValidation(url);\n if (runtimeAuthorityOrigin === null) return true;\n\n try {\n validateBaseUrl(runtimeAuthorityOrigin, \"runtime\");\n return true;\n } catch {\n return false;\n }\n}\n\nfunction matchFirewallBaseUrlForDecision(\n url: string,\n rawBase: string,\n): FirewallBaseUrlMatch | null {\n if (!runtimeUrlCanMatchFirewallBase(url)) return null;\n const baseForMatch = rawBaseForDecisionMatch(rawBase);\n if (baseForMatch === null) return null;\n\n try {\n const match = matchStaticFirewallBaseUrl(url, baseForMatch, {\n tolerateMalformedBaseParams: true,\n });\n if (match === null) return null;\n return { ...match, displayBase: stripTrailingSlash(rawBase) };\n } catch {\n return null;\n }\n}\n\nfunction createDecisionState(): FirewallDecisionState {\n return {\n bestBaseScore: null,\n bestRuleSpecificity: null,\n baseMatch: null,\n allowedMatch: null,\n deniedMatch: null,\n deniedPermissionNames: [],\n malformedConfigMatch: null,\n malformedPolicyMatch: null,\n };\n}\n\nfunction acceptDecisionBaseMatch(\n state: FirewallDecisionState,\n match: DecisionBaseMatch,\n score: number,\n): boolean {\n if (state.bestBaseScore === null || score > state.bestBaseScore) {\n state.bestBaseScore = score;\n state.bestRuleSpecificity = null;\n state.baseMatch = null;\n state.allowedMatch = null;\n state.deniedMatch = null;\n state.deniedPermissionNames = [];\n state.malformedConfigMatch = null;\n state.malformedPolicyMatch = null;\n } else if (score < state.bestBaseScore) {\n return false;\n }\n\n state.baseMatch ??= match;\n return true;\n}\n\nfunction acceptRuleSpecificity(\n state: FirewallDecisionState,\n specificity: PathSpecificity,\n): boolean {\n if (state.bestRuleSpecificity === null) {\n state.bestRuleSpecificity = specificity;\n return true;\n }\n\n const comparison = comparePathSpecificity(\n specificity,\n state.bestRuleSpecificity,\n );\n if (comparison > 0) {\n state.bestRuleSpecificity = specificity;\n state.allowedMatch = null;\n state.deniedMatch = null;\n state.deniedPermissionNames = [];\n return true;\n }\n return comparison === 0;\n}\n\nfunction recordDeniedRule(\n state: FirewallDecisionState,\n match: DecisionBlockMatch,\n permission: string,\n): void {\n if (!state.deniedPermissionNames.includes(permission)) {\n state.deniedPermissionNames.push(permission);\n }\n state.deniedMatch ??= match;\n}\n\nfunction resolveFirewallDecision(\n state: FirewallDecisionState,\n networkPolicies: CompiledNetworkPolicies,\n): FirewallRequestDecision {\n const baseMatch = state.baseMatch;\n if (baseMatch === null) {\n return { kind: \"no_match\" };\n }\n\n if (state.allowedMatch !== null) {\n return {\n kind: \"allow\",\n firewallName: state.allowedMatch.firewallName,\n base: state.allowedMatch.base,\n relativePath: state.allowedMatch.relativePath,\n permission: state.allowedMatch.permission,\n rule: state.allowedMatch.rule,\n };\n }\n\n if (state.deniedMatch !== null) {\n return {\n kind: \"block\",\n firewallName: state.deniedMatch.firewallName,\n base: state.deniedMatch.base,\n relativePath: state.deniedMatch.relativePath,\n reason: \"permission_denied\",\n permissions: state.deniedPermissionNames,\n };\n }\n\n if (state.malformedPolicyMatch !== null) {\n return {\n kind: \"block\",\n firewallName: state.malformedPolicyMatch.firewallName,\n base: state.malformedPolicyMatch.base,\n relativePath: state.malformedPolicyMatch.relativePath,\n reason: \"malformed_network_policy\",\n permissions: [],\n };\n }\n\n if (state.malformedConfigMatch !== null) {\n return {\n kind: \"block\",\n firewallName: state.malformedConfigMatch.firewallName,\n base: state.malformedConfigMatch.base,\n relativePath: state.malformedConfigMatch.relativePath,\n reason: \"malformed_firewall_config\",\n permissions: [],\n };\n }\n\n const policy = networkPolicies.policies.get(baseMatch.firewallName);\n if (policy === undefined) {\n return {\n kind: \"allow\",\n firewallName: baseMatch.firewallName,\n base: baseMatch.allowBase,\n relativePath: baseMatch.relativePath,\n };\n }\n if (policy.unknownPolicyMalformed) {\n return {\n kind: \"block\",\n firewallName: baseMatch.firewallName,\n base: baseMatch.base,\n relativePath: baseMatch.relativePath,\n reason: \"malformed_network_policy\",\n permissions: [],\n };\n }\n if (policy.unknownPolicy === \"allow\") {\n return {\n kind: \"allow\",\n firewallName: baseMatch.firewallName,\n base: baseMatch.allowBase,\n relativePath: baseMatch.relativePath,\n };\n }\n\n return {\n kind: \"block\",\n firewallName: baseMatch.firewallName,\n base: baseMatch.base,\n relativePath: baseMatch.relativePath,\n reason: \"unknown_endpoint\",\n permissions: [],\n };\n}\n\nfunction unsafePathBlockDecision(\n firewall: DecisionFirewall,\n baseMatch: FirewallBaseUrlMatch,\n): FirewallRequestDecision {\n return {\n kind: \"block\",\n firewallName: firewall.name,\n base: baseMatch.displayBase,\n relativePath: baseMatch.relativePath,\n reason: \"unsafe_path\",\n permissions: [],\n };\n}\n\nfunction recordMalformedDecisionState(\n state: FirewallDecisionState,\n api: DecisionApi,\n blockMatch: DecisionBlockMatch,\n): void {\n if (\n api.baseMalformed ||\n api.authMalformed ||\n api.hasMalformedRules ||\n api.routingIdentity === null\n ) {\n state.malformedConfigMatch ??= blockMatch;\n }\n}\n\nfunction apiCannotEvaluateRules(\n firewall: DecisionFirewall,\n api: DecisionApi,\n): boolean {\n return (\n firewall.nameMalformed ||\n api.baseMalformed ||\n api.authMalformed ||\n api.routingIdentity === null\n );\n}\n\nfunction policyCannotEvaluateRules(\n networkPolicies: CompiledNetworkPolicies,\n policy: CompiledNetworkPolicy | undefined,\n): boolean {\n return (\n networkPolicies.topLevelMalformed ||\n (policy !== undefined && policy.permissionMalformed)\n );\n}\n\nfunction createMatchCollection(): FirewallMatchCollection {\n return {\n bestBaseScore: null,\n bestRuleSpecificity: null,\n apiMatches: [],\n ruleMatches: [],\n };\n}\n\nfunction acceptCollectedApi(\n collection: FirewallMatchCollection,\n match: CollectedApiMatch,\n): boolean {\n if (\n collection.bestBaseScore === null ||\n match.score > collection.bestBaseScore\n ) {\n collection.bestBaseScore = match.score;\n collection.bestRuleSpecificity = null;\n collection.apiMatches = [];\n collection.ruleMatches = [];\n } else if (match.score < collection.bestBaseScore) {\n return false;\n }\n collection.apiMatches.push(match);\n return true;\n}\n\nfunction canRuleAffectCollection(\n collection: FirewallMatchCollection,\n specificity: PathSpecificity,\n): boolean {\n if (collection.bestRuleSpecificity === null) return true;\n return (\n comparePathSpecificity(specificity, collection.bestRuleSpecificity) >= 0\n );\n}\n\nfunction recordCollectedRule(\n collection: FirewallMatchCollection,\n match: CollectedRuleMatch,\n): void {\n const bestSpecificity = collection.bestRuleSpecificity;\n if (\n bestSpecificity === null ||\n comparePathSpecificity(match.rule.specificity, bestSpecificity) > 0\n ) {\n collection.bestRuleSpecificity = match.rule.specificity;\n collection.ruleMatches = [];\n } else if (\n comparePathSpecificity(match.rule.specificity, bestSpecificity) < 0\n ) {\n return;\n }\n collection.ruleMatches.push(match);\n}\n\nfunction collectDecisionRules(\n collection: FirewallMatchCollection,\n apiMatch: CollectedApiMatch,\n upperMethod: string,\n): void {\n for (const rule of apiMatch.api.rules) {\n if (rule.method !== \"ANY\" && rule.method !== upperMethod) continue;\n if (!canRuleAffectCollection(collection, rule.specificity)) continue;\n if (\n matchFirewallPath(apiMatch.baseMatch.relativePath, rule.path) === null\n ) {\n continue;\n }\n recordCollectedRule(collection, { apiMatch, rule });\n }\n}\n\nfunction winningApiMatches(\n collection: FirewallMatchCollection,\n): CollectedApiMatch[] {\n if (collection.ruleMatches.length === 0) {\n return collection.apiMatches;\n }\n\n const matches: CollectedApiMatch[] = [];\n const seenOrders = new Set<number>();\n for (const ruleMatch of collection.ruleMatches) {\n if (seenOrders.has(ruleMatch.apiMatch.order)) continue;\n seenOrders.add(ruleMatch.apiMatch.order);\n matches.push(ruleMatch.apiMatch);\n }\n return matches;\n}\n\nfunction winningOwnerNames(\n collection: FirewallMatchCollection,\n): readonly string[] {\n const names = new Set<string>();\n for (const apiMatch of winningApiMatches(collection)) {\n if (!apiMatch.firewall.nameMalformed) {\n names.add(apiMatch.firewall.name);\n }\n }\n return [...names].sort();\n}\n\nfunction selectedOwnerApiMatches(\n collection: FirewallMatchCollection,\n selectedName: string,\n): CollectedApiMatch[] {\n const matches = winningApiMatches(collection).filter((match) => {\n return match.firewall.name === selectedName;\n });\n if (collection.ruleMatches.length > 0) return matches;\n\n // APIs without permissions are catch-alls only within the selected owner.\n // Owner selection must still resolve shared bases before this fallback.\n const permissionlessMatches = matches.filter((match) => {\n return match.api.permissionless;\n });\n return permissionlessMatches.length > 0 ? permissionlessMatches : matches;\n}\n\nfunction relevantOwnerApiMatches(\n collection: FirewallMatchCollection,\n selectedName: string | null,\n): readonly CollectedApiMatch[] {\n if (selectedName === null) return collection.apiMatches;\n return collection.apiMatches.filter((match) => {\n return match.firewall.name === selectedName || match.firewall.nameMalformed;\n });\n}\n\nfunction selectedBaseApiMatches(\n collection: FirewallMatchCollection,\n selectedName: string | null,\n): readonly CollectedApiMatch[] {\n const relevantMatches = relevantOwnerApiMatches(collection, selectedName);\n if (selectedName === null || collection.ruleMatches.length > 0) {\n return relevantMatches;\n }\n\n const selectedOrders = new Set(\n selectedOwnerApiMatches(collection, selectedName).map((match) => {\n return match.order;\n }),\n );\n return relevantMatches.filter((match) => {\n return selectedOrders.has(match.order);\n });\n}\n\nfunction connectorAmbiguityReason(\n intent: FirewallConnectorIntent,\n): ConnectorRouteAmbiguityReason {\n if (intent.status === \"absent\") return \"connector_intent_required\";\n if (intent.status === \"malformed\") return \"malformed_connector_intent\";\n return \"connector_intent_not_candidate\";\n}\n\ntype OwnerSelection =\n | {\n readonly kind: \"selected\";\n readonly name: string | null;\n }\n | {\n readonly kind: \"ambiguous\";\n readonly decision: Extract<\n FirewallRequestDecision,\n { readonly kind: \"ambiguous\" }\n >;\n };\n\nfunction selectOwner(\n collection: FirewallMatchCollection,\n intent: FirewallConnectorIntent,\n upperMethod: string,\n path: string,\n): OwnerSelection {\n const [owner, ...otherOwners] = winningOwnerNames(collection);\n if (owner === undefined) return { kind: \"selected\", name: null };\n if (otherOwners.length === 0) {\n return { kind: \"selected\", name: owner };\n }\n const owners = [owner, ...otherOwners];\n if (intent.status === \"present\" && owners.includes(intent.value)) {\n return { kind: \"selected\", name: intent.value };\n }\n return {\n kind: \"ambiguous\",\n decision: {\n kind: \"ambiguous\",\n method: upperMethod,\n path,\n candidates: owners,\n reason: connectorAmbiguityReason(intent),\n },\n };\n}\n\nfunction conflictingSelectedApiDecision(\n collection: FirewallMatchCollection,\n selectedName: string,\n): FirewallRequestDecision | null {\n const [first, ...otherMatches] = selectedOwnerApiMatches(\n collection,\n selectedName,\n ).filter((match) => {\n return (\n !match.firewall.nameMalformed &&\n !match.api.baseMalformed &&\n !match.api.authMalformed &&\n match.api.routingIdentity !== null\n );\n });\n if (first === undefined || otherMatches.length === 0) return null;\n if (\n otherMatches.every((match) => {\n return match.api.routingIdentity === first.api.routingIdentity;\n })\n ) {\n return null;\n }\n return {\n kind: \"block\",\n firewallName: selectedName,\n base: first.blockMatch.base,\n relativePath: first.blockMatch.relativePath,\n reason: \"malformed_firewall_config\",\n permissions: [],\n };\n}\n\nfunction reduceSelectedOwner(\n collection: FirewallMatchCollection,\n selectedName: string | null,\n networkPolicies: CompiledNetworkPolicies,\n): FirewallRequestDecision {\n if (selectedName !== null) {\n const conflict = conflictingSelectedApiDecision(collection, selectedName);\n if (conflict !== null) return conflict;\n }\n\n const state = createDecisionState();\n const evaluableApiOrders = new Set<number>();\n const relevantApiMatches = relevantOwnerApiMatches(collection, selectedName);\n\n for (const apiMatch of selectedBaseApiMatches(collection, selectedName)) {\n acceptDecisionBaseMatch(state, apiMatch.baseMatch, apiMatch.score);\n }\n\n for (const apiMatch of relevantApiMatches) {\n const { firewall, api, blockMatch } = apiMatch;\n const policy = networkPolicies.policies.get(firewall.name);\n recordMalformedDecisionState(state, api, blockMatch);\n if (apiCannotEvaluateRules(firewall, api)) continue;\n if (policyCannotEvaluateRules(networkPolicies, policy)) {\n state.malformedPolicyMatch ??= blockMatch;\n continue;\n }\n evaluableApiOrders.add(apiMatch.order);\n }\n\n for (const ruleMatch of collection.ruleMatches) {\n const { apiMatch, rule } = ruleMatch;\n if (!evaluableApiOrders.has(apiMatch.order)) continue;\n const policy = networkPolicies.policies.get(apiMatch.firewall.name);\n if (!acceptRuleSpecificity(state, rule.specificity)) continue;\n if (\n policy !== undefined &&\n policy.blockedPermissions.has(rule.permission)\n ) {\n recordDeniedRule(state, apiMatch.blockMatch, rule.permission);\n continue;\n }\n state.allowedMatch ??= {\n firewallName: apiMatch.baseMatch.firewallName,\n base: apiMatch.baseMatch.allowBase,\n relativePath: apiMatch.baseMatch.relativePath,\n permission: rule.permission,\n rule: rule.raw,\n };\n }\n\n return resolveFirewallDecision(state, networkPolicies);\n}\n\nexport function matchFirewallBaseUrl(\n url: string,\n rawBase: string,\n): FirewallBaseUrlMatch | null {\n if (\n hasUnsafeRuntimeUrlSyntax(url) ||\n hasMalformedRuntimeAuthoritySyntax(url)\n ) {\n return null;\n }\n\n const runtimeAuthorityOrigin = runtimeAuthorityOriginForHostValidation(url);\n\n try {\n if (runtimeAuthorityOrigin !== null) {\n validateBaseUrl(runtimeAuthorityOrigin, \"runtime\");\n }\n validateBaseUrl(rawBase, \"firewall\");\n return matchStaticFirewallBaseUrl(url, rawBase);\n } catch {\n return null;\n }\n}\n\nexport function matchFirewallRequestDecision(\n firewalls: unknown,\n method: string,\n url: string,\n networkPolicies: unknown = undefined,\n connectorIntent: FirewallConnectorIntent = { status: \"absent\" },\n): FirewallRequestDecision {\n const decisionFirewalls = compileDecisionFirewalls(firewalls);\n if (decisionFirewalls.length === 0) return { kind: \"no_match\" };\n\n const compiledNetworkPolicies = compileNetworkPolicies(networkPolicies);\n const upperMethod = method.toUpperCase();\n const collection = createMatchCollection();\n const unsafePath =\n url.includes(\"\\\\\") || hasUnsafeFirewallPath(rawPathFromUrl(url));\n let apiOrder = 0;\n\n for (const firewall of decisionFirewalls) {\n for (const api of firewall.apis) {\n const order = apiOrder;\n apiOrder += 1;\n const baseMatch = matchFirewallBaseUrlForDecision(url, api.rawBase);\n if (baseMatch === null) continue;\n if (unsafePath) return unsafePathBlockDecision(firewall, baseMatch);\n\n const decisionBaseMatch: DecisionBaseMatch = {\n firewallName: firewall.name,\n base: baseMatch.displayBase,\n allowBase: api.rawBase,\n relativePath: baseMatch.relativePath,\n };\n const apiMatch: CollectedApiMatch = {\n order,\n firewall,\n api,\n baseMatch: decisionBaseMatch,\n blockMatch: {\n firewallName: decisionBaseMatch.firewallName,\n base: decisionBaseMatch.base,\n relativePath: decisionBaseMatch.relativePath,\n },\n score: baseMatch.score,\n };\n if (!acceptCollectedApi(collection, apiMatch)) continue;\n collectDecisionRules(collection, apiMatch, upperMethod);\n }\n }\n\n const selection = selectOwner(\n collection,\n connectorIntent,\n upperMethod,\n rawPathFromUrl(url),\n );\n if (selection.kind === \"ambiguous\") return selection.decision;\n return reduceSelectedOwner(\n collection,\n selection.name,\n compiledNetworkPolicies,\n );\n}\n\nfunction matchFirewallHostWithParser(\n host: string,\n pattern: string,\n parsePatternSegment: SegmentMatchParser,\n): Record<string, string> | null {\n const hostSegsOrig = host.split(\".\");\n const hostSegsLower = hostSegsOrig.map((segment) => {\n return segment.toLowerCase();\n });\n const patternSegs = pattern.split(\".\").reverse();\n\n hostSegsOrig.reverse();\n hostSegsLower.reverse();\n\n const params: Record<string, string> = {};\n let hi = 0;\n const lastPatternIndex = patternSegs.length - 1;\n\n for (\n let patternIndex = 0;\n patternIndex < patternSegs.length;\n patternIndex++\n ) {\n const seg = patternSegs[patternIndex]!;\n const parsed = parsePatternSegment(seg, patternIndex, lastPatternIndex);\n if (parsed === null) return null;\n if (parsed.kind === \"literal\") {\n if (\n hi >= hostSegsLower.length ||\n hostSegsLower[hi] !== parsed.value.toLowerCase()\n ) {\n return null;\n }\n hi += 1;\n continue;\n }\n\n const { name, prefix, suffix, greedy } = parsed;\n if (greedy === \"+\") {\n if (hi >= hostSegsOrig.length) return null;\n params[name] = hostSegsOrig.slice(hi).reverse().join(\".\");\n return params;\n }\n if (greedy === \"*\") {\n params[name] = hostSegsOrig.slice(hi).reverse().join(\".\");\n return params;\n }\n if (hi >= hostSegsOrig.length) return null;\n if (prefix === \"\" && suffix === \"\") {\n params[name] = hostSegsLower[hi]!;\n } else {\n const captured = matchMixedSegment(\n hostSegsLower[hi]!,\n prefix.toLowerCase(),\n suffix.toLowerCase(),\n );\n if (captured === null) return null;\n params[name] = captured;\n }\n hi += 1;\n }\n\n return hi === hostSegsOrig.length ? params : null;\n}\n\n/**\n * Match a runtime host/authority against a firewall base host pattern.\n *\n * Host comparison is case-insensitive and mirrors the runner's right-to-left\n * host matcher. Non-default ports are part of the normalized authority and\n * therefore participate in the final host segment comparison.\n */\nexport function matchFirewallHost(\n host: string,\n pattern: string,\n): Record<string, string> | null {\n return matchFirewallHostWithParser(host, pattern, parseStrictMatchSegment);\n}\n\nfunction parseMalformedTolerantBaseSegment(\n segment: string,\n patternIndex: number,\n lastPatternIndex: number,\n): MatchableSegment {\n const parsed = parseSegment(segment);\n if (parsed.kind === \"error\") {\n return {\n kind: \"param\",\n prefix: \"\",\n name: `__malformed_base_segment_${patternIndex}`,\n suffix: \"\",\n greedy: \"\",\n };\n }\n if (\n parsed.kind === \"param\" &&\n parsed.greedy !== \"\" &&\n isInvalidGreedyParam(\n patternIndex,\n lastPatternIndex,\n parsed.prefix,\n parsed.suffix,\n )\n ) {\n return { ...parsed, greedy: \"\" };\n }\n return parsed;\n}\n\nfunction matchFirewallHostForMalformedBaseDecision(\n host: string,\n pattern: string,\n): Record<string, string> | null {\n return matchFirewallHostWithParser(\n host,\n pattern,\n parseMalformedTolerantBaseSegment,\n );\n}\n\nfunction matchFirewallPathPrefixWithParser(\n path: string,\n pattern: string,\n parsePatternSegment: SegmentMatchParser,\n): string | null {\n const pathSegs = splitPathSegments(path);\n const patternSegs = splitPathSegments(pattern);\n\n let pi = 0;\n const lastPatternIndex = patternSegs.length - 1;\n for (\n let patternIndex = 0;\n patternIndex < patternSegs.length;\n patternIndex++\n ) {\n const seg = patternSegs[patternIndex]!;\n const parsed = parsePatternSegment(seg, patternIndex, lastPatternIndex);\n if (parsed === null) return null;\n if (parsed.kind === \"literal\") {\n if (pi >= pathSegs.length || pathSegs[pi] !== parsed.value) return null;\n pi += 1;\n continue;\n }\n\n const { prefix, suffix, greedy } = parsed;\n if (greedy === \"+\") {\n if (pi >= pathSegs.length || !hasNonEmptySegment(pathSegs, pi)) {\n return null;\n }\n return \"/\";\n }\n if (greedy === \"*\") {\n return \"/\";\n }\n if (pi >= pathSegs.length) return null;\n\n const runtime = pathSegs[pi]!;\n if (prefix === \"\" && suffix === \"\") {\n if (runtime === \"\") return null;\n } else if (matchMixedSegment(runtime, prefix, suffix) === null) {\n return null;\n }\n pi += 1;\n }\n\n return relativePathFromSegments(pathSegs, pi);\n}\n\n/**\n * Match a runtime path against the beginning of a firewall base path pattern.\n *\n * Unlike matchFirewallPath(), this intentionally allows extra runtime path\n * segments and returns the remaining relative path after the base prefix.\n */\nexport function matchFirewallPathPrefix(\n path: string,\n pattern: string,\n): string | null {\n return matchFirewallPathPrefixWithParser(\n path,\n pattern,\n parseStrictMatchSegment,\n );\n}\n\nfunction matchFirewallPathPrefixForMalformedBaseDecision(\n path: string,\n pattern: string,\n): string | null {\n return matchFirewallPathPrefixWithParser(\n path,\n pattern,\n parseMalformedTolerantBaseSegment,\n );\n}\n\n/**\n * Match a URL path against a rule path pattern.\n *\n * Ported from the Python MITM addon's `match_path()` function\n * (crates/runner/mitm-addon/src/matching.py).\n *\n * - Literal segments must match exactly (case-sensitive).\n * - `{name}` matches a single non-empty path segment.\n * - `prefix{name}suffix` (mixed) matches a segment that starts with\n * `prefix` and ends with `suffix`, with a non-empty middle captured\n * into `name`.\n * - `{name+}` matches the rest of the path (one or more segments). Must be last.\n * - `{name*}` matches the rest of the path (zero or more segments). Must be last.\n *\n * Returns extracted parameters on match, or null on mismatch.\n */\nexport function matchFirewallPath(\n path: string,\n pattern: string,\n): Record<string, string> | null {\n const pathSegs = splitPathSegments(path);\n const patternSegs = splitPathSegments(pattern);\n\n const params: Record<string, string> = {};\n let pi = 0;\n const lastPatternIndex = patternSegs.length - 1;\n\n for (\n let patternIndex = 0;\n patternIndex < patternSegs.length;\n patternIndex++\n ) {\n const seg = patternSegs[patternIndex]!;\n const parsed = parseSegment(seg);\n // Invalid patterns are rejected by validateRule at ingest time, so\n // kind \"error\" should never appear here on validated inputs.\n if (parsed.kind === \"error\") return null;\n if (parsed.kind === \"literal\") {\n if (pi >= pathSegs.length || pathSegs[pi] !== parsed.value) return null;\n pi++;\n continue;\n }\n const { name, prefix, suffix, greedy } = parsed;\n if (greedy === \"+\") {\n if (isInvalidGreedyParam(patternIndex, lastPatternIndex, prefix, suffix))\n return null;\n if (pi >= pathSegs.length || !hasNonEmptySegment(pathSegs, pi)) {\n return null;\n }\n params[name] = pathSegs.slice(pi).join(\"/\");\n return params;\n }\n if (greedy === \"*\") {\n if (isInvalidGreedyParam(patternIndex, lastPatternIndex, prefix, suffix))\n return null;\n params[name] = pathSegs.slice(pi).join(\"/\");\n return params;\n }\n if (pi >= pathSegs.length) return null;\n const runtime = pathSegs[pi]!;\n if (prefix === \"\" && suffix === \"\") {\n if (runtime === \"\") return null;\n params[name] = runtime;\n } else {\n const captured = matchMixedSegment(runtime, prefix, suffix);\n if (captured === null) return null;\n params[name] = captured;\n }\n pi++;\n }\n\n // All pattern segments consumed; path must also be fully consumed\n if (pi !== pathSegs.length) return null;\n return params;\n}\n\n/**\n * Find permission names from a firewall config whose most-specific rules match\n * the given HTTP method and relative path.\n *\n * Method matching is case-insensitive. The special method `ANY` matches\n * any HTTP method. Path specificity mirrors the runner firewall matcher within\n * each API entry.\n */\nexport function findMatchingPermissions(\n method: string,\n path: string,\n config: unknown,\n options: FindMatchingPermissionsOptions = {},\n): string[] {\n if (!isObjectRecord(config)) return [];\n if (typeof config.name !== \"string\" || config.name === \"\") return [];\n if (!Array.isArray(config.apis)) return [];\n\n const apiBase =\n options.apiBase === undefined ? null : stripTrailingSlash(options.apiBase);\n const matchApis: PermissionMatchApi[] = [];\n\n for (const api of config.apis) {\n const permissionRuleSets = getApiPermissionRuleSetsForMatch(\n api,\n config.name,\n apiBase,\n );\n if (permissionRuleSets !== null) {\n matchApis.push({ permissionRuleSets });\n }\n }\n\n return findMatchingPermissionRuleSets(method, path, matchApis);\n}\n\nfunction findMatchingPermissionRuleSets(\n method: string,\n path: string,\n apis: readonly PermissionMatchApi[],\n): string[] {\n const upperMethod = method.toUpperCase();\n const matched: string[] = [];\n\n for (const api of apis) {\n const state: ApiMatchState = { bestSpecificity: null, matched: [] };\n\n for (const permission of api.permissionRuleSets) {\n for (const rule of permission.rules) {\n const rest = matchingRulePath(rule, upperMethod);\n if (rest === null) continue;\n\n if (matchFirewallPath(path, rest) !== null) {\n const specificity = pathSpecificity(rest);\n if (specificity === null) continue;\n recordPermissionMatch(state, permission.name, specificity);\n }\n }\n }\n\n for (const permission of state.matched) {\n if (!matched.includes(permission)) {\n matched.push(permission);\n }\n }\n }\n\n return matched;\n}\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n/**\n * User preferences schemas (shared across contracts)\n */\nexport const sendModeSchema = z.enum([\"enter\", \"cmd-enter\"]);\nexport type SendMode = z.infer<typeof sendModeSchema>;\n\nexport const SUPPORTED_USER_LOCALES = [\n \"en-US\",\n \"pt-BR\",\n \"ja-JP\",\n \"ko-KR\",\n \"id-ID\",\n \"de-DE\",\n \"es-ES\",\n \"it-IT\",\n \"fr-FR\",\n \"hi-IN\",\n] as const;\nexport const userLocaleSchema = z.enum(SUPPORTED_USER_LOCALES);\nexport type UserLocale = z.infer<typeof userLocaleSchema>;\n\n// TODO(#23508): remove the legacy value after the app/API rollback window\n// closes and existing workspace preferences have converged to a supported locale.\nconst compatibleUserLocaleSchema = z\n .union([userLocaleSchema, z.literal(\"zh-CN\")])\n .transform((locale): UserLocale => {\n return locale === \"zh-CN\" ? \"en-US\" : locale;\n });\n\nexport const userPreferencesResponseSchema = z.object({\n timezone: z.string().nullable(),\n /**\n * Optional during rollout so the new frontend can distinguish an older API\n * (field absent) from a user who has not selected a language yet (null).\n */\n locale: compatibleUserLocaleSchema.nullable().optional(),\n /**\n * Optional capability handshake. Older APIs omit this field, so clients must\n * not submit a locale that is absent from this list.\n */\n supportedLocales: z.array(userLocaleSchema).optional(),\n // Pinned agents are exposed as membership only. The API returns a stable\n // canonical order and ignores client-provided order on writes.\n pinnedAgentIds: z.array(z.string()),\n sendMode: sendModeSchema,\n morningBriefEnabled: z.boolean(),\n /**\n * Next scheduled Morning Brief send (ISO instant), or null when no run is\n * scheduled (preference off, timezone missing, or schedule not synced).\n */\n morningBriefNextRunAt: z.string().nullable(),\n captureNetworkBodiesRemaining: z.number().int().min(0),\n});\n\nexport type UserPreferencesResponse = z.infer<\n typeof userPreferencesResponseSchema\n>;\n\nexport const updateUserPreferencesRequestSchema = z\n .object({\n timezone: z.string().min(1).optional(),\n locale: compatibleUserLocaleSchema.optional(),\n // Membership update only; request order is not used for display ordering.\n pinnedAgentIds: z.array(z.string()).optional(),\n sendMode: sendModeSchema.optional(),\n morningBriefEnabled: z.boolean().optional(),\n captureNetworkBodiesRemaining: z.number().int().min(0).optional(),\n })\n .refine(\n (data) => {\n return (\n data.timezone !== undefined ||\n data.locale !== undefined ||\n data.pinnedAgentIds !== undefined ||\n data.sendMode !== undefined ||\n data.morningBriefEnabled !== undefined ||\n data.captureNetworkBodiesRemaining !== undefined\n );\n },\n {\n message: \"At least one preference must be provided\",\n },\n );\n\nexport type UpdateUserPreferencesRequest = z.infer<\n typeof updateUserPreferencesRequestSchema\n>;\n\n/**\n * Zero user preferences contract for /api/zero/user-preferences\n *\n * GET: Get current user's preferences\n * POST: Update user preferences\n */\nexport const zeroUserPreferencesContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/user-preferences\",\n headers: authHeadersSchema,\n responses: {\n 200: userPreferencesResponseSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get user preferences\",\n },\n update: {\n method: \"POST\",\n path: \"/api/zero/user-preferences\",\n headers: authHeadersSchema,\n body: updateUserPreferencesRequestSchema,\n responses: {\n 200: userPreferencesResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Update user preferences\",\n },\n});\n\nexport type ZeroUserPreferencesContract = typeof zeroUserPreferencesContract;\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const featureSwitchesResponseSchema = z.object({\n switches: z.record(z.string(), z.boolean()),\n effectiveSwitches: z.record(z.string(), z.boolean()),\n /**\n * Optional capability handshake for multiple inline template parts.\n * Older API deployments omit this field.\n */\n supportsStructuredInlineTemplates: z.boolean().optional(),\n /**\n * Optional capability handshake for custom connector OAuth 2.0.\n * Older API deployments omit this field.\n */\n supportsCustomConnectorOAuth2: z.boolean().optional(),\n /**\n * Optional capability handshake for admin-defined model gateways.\n * Older API deployments omit this field.\n */\n supportsCustomModelGateways: z.boolean().optional(),\n /**\n * Optional capability handshake for managed image recognition.\n * Older API deployments omit this field.\n */\n supportsImageRecognition: z.boolean().optional(),\n /**\n * Optional handshake indicating managed image recognition is globally\n * available without a feature switch. Older API deployments omit this field.\n * Remove after APIs with the pre-rollout semantics are no longer reachable.\n */\n imageRecognitionRolloutComplete: z.literal(true).optional(),\n /**\n * Optional capability handshake for API-backed avatar templates.\n * Older API deployments omit this field.\n */\n supportsAvatarTemplates: z.boolean().optional(),\n});\n\nexport type FeatureSwitchesResponse = z.infer<\n typeof featureSwitchesResponseSchema\n>;\n\nexport const updateFeatureSwitchesRequestSchema = z.object({\n switches: z.record(z.string(), z.boolean()),\n});\n\nexport type UpdateFeatureSwitchesRequest = z.infer<\n typeof updateFeatureSwitchesRequestSchema\n>;\n\n/**\n * Zero feature switches contract for /api/zero/feature-switches\n *\n * GET: Get current user's feature switch overrides plus org-scoped overrides.\n * POST: Update feature switch overrides (merge strategy). Some switches may be\n * stored at org scope.\n * DELETE: Remove current user's overrides plus org-scoped overrides controlled\n * by this endpoint.\n */\nexport const zeroFeatureSwitchesContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/feature-switches\",\n headers: authHeadersSchema,\n responses: {\n 200: featureSwitchesResponseSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get feature switch overrides\",\n },\n update: {\n method: \"POST\",\n path: \"/api/zero/feature-switches\",\n headers: authHeadersSchema,\n body: updateFeatureSwitchesRequestSchema,\n responses: {\n 200: featureSwitchesResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Update feature switch overrides\",\n },\n delete: {\n method: \"DELETE\",\n path: \"/api/zero/feature-switches\",\n headers: authHeadersSchema,\n body: c.noBody(),\n responses: {\n 200: z.object({ deleted: z.literal(true) }),\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Delete feature switch overrides\",\n },\n});\n\nexport type ZeroFeatureSwitchesContract = typeof zeroFeatureSwitchesContract;\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n/**\n * Onboarding status response schema\n */\nexport const onboardingStatusResponseSchema = z.object({\n needsOnboarding: z.boolean(),\n onboardingComplete: z.boolean(),\n isAdmin: z.boolean(),\n hasOrg: z.boolean(),\n hasDefaultAgent: z.boolean(),\n defaultAgentId: z.string().nullable(),\n defaultAgentMetadata: z\n .object({\n displayName: z.string().optional(),\n description: z.string().optional(),\n sound: z.string().optional(),\n avatarUrl: z.string().optional(),\n })\n .nullable(),\n});\n\nexport type OnboardingStatusResponse = z.infer<\n typeof onboardingStatusResponseSchema\n>;\n\n/**\n * Onboarding status contract for GET /api/zero/onboarding/status\n */\nexport const onboardingStatusContract = c.router({\n getStatus: {\n method: \"GET\",\n path: \"/api/zero/onboarding/status\",\n headers: authHeadersSchema,\n responses: {\n 200: onboardingStatusResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Get onboarding status for current user\",\n },\n});\n\nexport const onboardingCompleteContract = c.router({\n complete: {\n method: \"POST\",\n path: \"/api/zero/onboarding/complete\",\n headers: authHeadersSchema,\n body: z.object({}).strict(),\n responses: {\n 200: z.object({\n onboardingComplete: z.literal(true),\n needsOnboarding: z.literal(false),\n }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"Mark onboarding complete for the current org\",\n },\n});\n\nexport type OnboardingStatusContract = typeof onboardingStatusContract;\nexport type OnboardingCompleteContract = typeof onboardingCompleteContract;\n","import { z } from \"zod\";\n\nexport const skillFrontmatterSchema = z.object({\n name: z.string().optional(),\n description: z.string().optional(),\n});\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { modelProviderResponseSchema } from \"./model-providers\";\n\nconst c = initContract();\n\nexport const codexDeviceAuthScopeSchema = z.enum([\"org\", \"personal\"]);\n\nconst codexDeviceAuthStartResponseSchema = z.object({\n sessionToken: z.string(),\n type: z.literal(\"codex\"),\n status: z.literal(\"pending\"),\n scope: codexDeviceAuthScopeSchema,\n browserUrl: z.url(),\n verificationCode: z.string().min(1),\n expiresIn: z.number().int().positive(),\n interval: z.number().int().positive(),\n});\n\nconst codexDeviceAuthCompleteResponseSchema = z.discriminatedUnion(\"status\", [\n z.object({\n status: z.literal(\"pending\"),\n errorMessage: z.string().nullable(),\n }),\n z.object({\n status: z.literal(\"complete\"),\n provider: modelProviderResponseSchema,\n created: z.boolean(),\n }),\n]);\n\nconst codexDeviceAuthCancelResponseSchema = z.object({\n status: z.literal(\"cancelled\"),\n});\n\n/**\n * Zero contract for Codex device auth.\n * Runs the official Codex device authorization flow through OpenAI auth and\n * imports the resulting ChatGPT tokens.\n */\nexport const zeroCodexDeviceAuthContract = c.router({\n start: {\n method: \"POST\",\n path: \"/api/zero/model-providers/codex/device-auth/sessions\",\n headers: authHeadersSchema,\n body: z.object({ scope: codexDeviceAuthScopeSchema }),\n responses: {\n 200: codexDeviceAuthStartResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Start Codex device auth\",\n },\n complete: {\n method: \"POST\",\n path: \"/api/zero/model-providers/codex/device-auth/sessions/complete\",\n headers: authHeadersSchema,\n body: z.object({ sessionToken: z.string().min(1) }),\n responses: {\n 200: codexDeviceAuthCompleteResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Complete Codex device auth and import ChatGPT credentials\",\n },\n cancel: {\n method: \"POST\",\n path: \"/api/zero/model-providers/codex/device-auth/sessions/cancel\",\n headers: authHeadersSchema,\n body: z.object({ sessionToken: z.string().min(1) }),\n responses: {\n 200: codexDeviceAuthCancelResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Cancel Codex device auth\",\n },\n});\n\nexport type CodexDeviceAuthScope = z.infer<typeof codexDeviceAuthScopeSchema>;\nexport type ZeroCodexDeviceAuthContract = typeof zeroCodexDeviceAuthContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { modelProviderResponseSchema } from \"./model-providers\";\n\nconst c = initContract();\n\nexport const claudeCodeDeviceAuthScopeSchema = z.enum([\"org\", \"personal\"]);\n\nconst claudeCodeDeviceAuthStartResponseSchema = z.object({\n sessionToken: z.string(),\n type: z.literal(\"claude-code\"),\n status: z.literal(\"pending\"),\n scope: claudeCodeDeviceAuthScopeSchema,\n browserUrl: z.url(),\n expiresIn: z.number().int().positive(),\n});\n\nconst claudeCodeDeviceAuthCompleteResponseSchema = z.object({\n status: z.literal(\"complete\"),\n provider: modelProviderResponseSchema,\n created: z.boolean(),\n});\n\nconst claudeCodeDeviceAuthCancelResponseSchema = z.object({\n status: z.literal(\"cancelled\"),\n});\n\n/**\n * Zero contract for Claude Code device-style OAuth.\n * Runs the same PKCE OAuth path as `claude setup-token` and imports the\n * resulting long-lived Claude Code token.\n */\nexport const zeroClaudeCodeDeviceAuthContract = c.router({\n start: {\n method: \"POST\",\n path: \"/api/zero/model-providers/claude-code/device-auth/sessions\",\n headers: authHeadersSchema,\n body: z.object({ scope: claudeCodeDeviceAuthScopeSchema }),\n responses: {\n 200: claudeCodeDeviceAuthStartResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Start Claude Code device auth\",\n },\n complete: {\n method: \"POST\",\n path: \"/api/zero/model-providers/claude-code/device-auth/sessions/complete\",\n headers: authHeadersSchema,\n body: z.object({\n sessionToken: z.string().min(1),\n authorizationCode: z.string().min(1),\n }),\n responses: {\n 200: claudeCodeDeviceAuthCompleteResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Complete Claude Code device auth and import OAuth token\",\n },\n cancel: {\n method: \"POST\",\n path: \"/api/zero/model-providers/claude-code/device-auth/sessions/cancel\",\n headers: authHeadersSchema,\n body: z.object({ sessionToken: z.string().min(1) }),\n responses: {\n 200: claudeCodeDeviceAuthCancelResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Cancel Claude Code device auth\",\n },\n});\n\nexport type ClaudeCodeDeviceAuthScope = z.infer<\n typeof claudeCodeDeviceAuthScopeSchema\n>;\nexport type ZeroClaudeCodeDeviceAuthContract =\n typeof zeroClaudeCodeDeviceAuthContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const zeroOrgLogoResponseSchema = z.object({\n logoUrl: z.string().nullable(),\n hasImage: z.boolean(),\n});\n\nexport type ZeroOrgLogoResponse = z.infer<typeof zeroOrgLogoResponseSchema>;\n\n/**\n * Zero contract for /api/zero/org/logo\n */\nexport const zeroOrgLogoContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/org/logo\",\n headers: authHeadersSchema,\n responses: {\n 200: zeroOrgLogoResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Get current organization logo\",\n },\n post: {\n method: \"POST\",\n path: \"/api/zero/org/logo\",\n headers: authHeadersSchema,\n contentType: \"multipart/form-data\",\n body: c.type<FormData>(),\n responses: {\n 200: zeroOrgLogoResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Upload current organization logo\",\n },\n});\n\nexport type ZeroOrgLogoContract = typeof zeroOrgLogoContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { composeListItemSchema } from \"./composes\";\n\nconst c = initContract();\n\n/**\n * Zero composes list contract (GET /api/zero/composes/list)\n */\nexport const zeroComposesListContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/composes/list\",\n headers: authHeadersSchema,\n query: z.object({}),\n responses: {\n 200: z.object({\n composes: z.array(composeListItemSchema),\n }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"List all agent composes (zero proxy)\",\n },\n});\n\nexport type ZeroComposesListContract = typeof zeroComposesListContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport {\n modelProviderListResponseSchema,\n upsertModelProviderRequestSchema,\n upsertModelProviderResponseSchema,\n modelProviderTypeSchema,\n} from \"./model-providers\";\n\nconst c = initContract();\n\nexport const resetPersonalModelProviderSubscriptionUsageRequestSchema =\n z.object({\n idempotencyKey: z.uuid(),\n });\n\nexport const resetPersonalModelProviderSubscriptionUsageResponseSchema =\n z.object({\n outcome: z.enum([\"reset\", \"nothingToReset\", \"noCredit\", \"alreadyRedeemed\"]),\n });\n\nexport type ResetPersonalModelProviderSubscriptionUsageResponse = z.infer<\n typeof resetPersonalModelProviderSubscriptionUsageResponseSchema\n>;\n\n/**\n * Zero personal (user-level) model providers main contract for /api/zero/me/model-providers\n *\n * Personal-tier per Epic #11868: providers scoped to the authenticated user\n * within an org, no admin gate. List/upsert are gated on model-first provider\n * controls and return 404 when unavailable.\n *\n * GET: List the requesting user's personal model providers\n * POST: Create or update a personal model provider for the requesting user\n */\nexport const zeroPersonalModelProvidersMainContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/me/model-providers\",\n headers: authHeadersSchema,\n responses: {\n 200: modelProviderListResponseSchema,\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"List the requesting user's personal model providers\",\n },\n upsert: {\n method: \"POST\",\n path: \"/api/zero/me/model-providers\",\n headers: authHeadersSchema,\n body: upsertModelProviderRequestSchema,\n responses: {\n 200: upsertModelProviderResponseSchema,\n 201: upsertModelProviderResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary:\n \"Create or update a personal model provider for the requesting user\",\n },\n});\n\nexport type ZeroPersonalModelProvidersMainContract =\n typeof zeroPersonalModelProvidersMainContract;\n\n/**\n * Zero personal model providers by type contract for /api/zero/me/model-providers/:type\n *\n * DELETE: Delete one of the requesting user's personal model providers\n */\nexport const zeroPersonalModelProvidersByTypeContract = c.router({\n delete: {\n method: \"DELETE\",\n path: \"/api/zero/me/model-providers/:type\",\n headers: authHeadersSchema,\n pathParams: z.object({\n type: modelProviderTypeSchema,\n }),\n responses: {\n 204: c.noBody(),\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Delete a personal model provider for the requesting user\",\n },\n resetSubscriptionUsage: {\n method: \"POST\",\n path: \"/api/zero/me/model-providers/:type/subscription-reset\",\n headers: authHeadersSchema,\n pathParams: z.object({\n type: modelProviderTypeSchema,\n }),\n body: resetPersonalModelProviderSubscriptionUsageRequestSchema,\n responses: {\n 200: resetPersonalModelProviderSubscriptionUsageResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Reset a personal model provider subscription usage window\",\n },\n});\n\nexport type ZeroPersonalModelProvidersByTypeContract =\n typeof zeroPersonalModelProvidersByTypeContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const githubInstallationResponseSchema = z.object({\n installation: z.object({\n id: z.string(),\n installationId: z.string().nullable(),\n status: z.string(),\n targetName: z.string().nullable(),\n targetType: z.string().nullable(),\n isAdmin: z.boolean(),\n }),\n isConnected: z.boolean(),\n connectedGithubUserId: z.string().nullable(),\n connectedGithubUsername: z.string().nullable(),\n connectUrl: z.string(),\n});\n\nexport type GithubInstallationResponse = z.infer<\n typeof githubInstallationResponseSchema\n>;\n\n// `installUrl` is optional so a new frontend paired with the previous API\n// deployment can still parse this body during a rollout. Make it required once\n// no API version without the field is serving traffic.\nexport const githubInstallationNotFoundResponseSchema = apiErrorSchema.extend({\n installUrl: z.string().nullish(),\n});\n\nexport type GithubInstallationNotFoundResponse = z.infer<\n typeof githubInstallationNotFoundResponseSchema\n>;\n\nexport const githubIntegrationActionResponseSchema = z.object({\n ok: z.literal(true),\n});\n\nexport type GithubIntegrationActionResponse = z.infer<\n typeof githubIntegrationActionResponseSchema\n>;\n\nexport const githubConnectSignatureSchema = z.object({\n installationId: z.string().min(1),\n githubUserId: z.string().min(1),\n githubUsername: z.string().max(255).optional(),\n timestamp: z.number(),\n signature: z.string().min(1),\n});\n\nexport type GithubConnectSignature = z.infer<\n typeof githubConnectSignatureSchema\n>;\n\nexport const githubConnectUserBodySchema = z\n .object({\n connectSignature: githubConnectSignatureSchema.optional(),\n })\n .optional();\n\nexport type GithubConnectUserBody = z.infer<typeof githubConnectUserBodySchema>;\n\nexport const integrationsGithubContract = c.router({\n getInstallation: {\n method: \"GET\",\n path: \"/api/integrations/github\",\n headers: authHeadersSchema,\n responses: {\n 200: githubInstallationResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: githubInstallationNotFoundResponseSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get the authenticated user's GitHub App installation\",\n },\n\n connectUser: {\n method: \"POST\",\n path: \"/api/integrations/github/link\",\n headers: authHeadersSchema,\n body: githubConnectUserBodySchema,\n responses: {\n 200: githubIntegrationActionResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 409: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Link the authenticated VM0 user to the GitHub App installation\",\n },\n});\n\nexport type IntegrationsGithubContract = typeof integrationsGithubContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst jsonErrorSchema = z.object({ error: z.string() });\n\nexport const githubOauthInstallQuerySchema = z.object({\n vm0UserId: z.string().optional(),\n orgId: z.string().optional(),\n composeId: z.string().optional(),\n});\n\nexport const githubOauthConnectQuerySchema = z.object({\n installation: z.string().optional(),\n ghUser: z.string().optional(),\n ghLogin: z.string().optional(),\n ts: z.coerce.number().optional(),\n sig: z.string().optional(),\n});\n\nexport const githubOauthConnectCallbackQuerySchema = z.object({\n code: z.string().optional(),\n state: z.string().optional(),\n error: z.string().optional(),\n error_description: z.string().optional(),\n});\n\nexport const githubAppSetupCallbackQuerySchema = z.object({\n code: z.string().optional(),\n error: z.string().optional(),\n error_description: z.string().optional(),\n installation_id: z.string().optional(),\n setup_action: z.string().optional(),\n state: z.string().optional(),\n target_id: z.string().optional(),\n target_type: z.string().optional(),\n});\n\nexport const githubOauthContract = c.router({\n install: {\n method: \"GET\",\n path: \"/api/github/oauth/install\",\n query: githubOauthInstallQuerySchema,\n responses: {\n 307: c.noBody(),\n 503: jsonErrorSchema,\n },\n summary: \"Start GitHub App OAuth install\",\n },\n connect: {\n method: \"GET\",\n path: \"/api/zero/github/oauth/connect\",\n query: githubOauthConnectQuerySchema,\n responses: {\n 307: c.noBody(),\n 401: apiErrorSchema,\n 503: jsonErrorSchema,\n },\n summary: \"Start GitHub user OAuth for the GitHub App\",\n },\n connectCallback: {\n method: \"GET\",\n path: \"/api/zero/github/oauth/connect/callback\",\n query: githubOauthConnectCallbackQuerySchema,\n responses: {\n 307: c.noBody(),\n },\n summary: \"Handle GitHub user OAuth for the GitHub App\",\n },\n setupCallback: {\n method: \"GET\",\n path: \"/api/github/app/setup/callback\",\n query: githubAppSetupCallbackQuerySchema,\n responses: {\n 307: c.noBody(),\n },\n summary: \"Handle GitHub App setup callback\",\n },\n});\n\nexport type GithubOauthContract = typeof githubOauthContract;\nexport type GithubOauthInstallQuery = z.infer<\n typeof githubOauthInstallQuerySchema\n>;\nexport type GithubOauthConnectQuery = z.infer<\n typeof githubOauthConnectQuerySchema\n>;\nexport type GithubOauthConnectCallbackQuery = z.infer<\n typeof githubOauthConnectCallbackQuerySchema\n>;\nexport type GithubAppSetupCallbackQuery = z.infer<\n typeof githubAppSetupCallbackQuerySchema\n>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { usageRecordRangeSchema } from \"./zero-usage-record\";\n\nconst c = initContract();\n\nconst memberUsageSchema = z.object({\n userId: z.string(),\n email: z.string(),\n inputTokens: z.number(),\n outputTokens: z.number(),\n cacheReadInputTokens: z.number(),\n cacheCreationInputTokens: z.number(),\n creditsCharged: z.number(),\n});\n\nconst usageMembersResponseSchema = z.object({\n period: z\n .object({\n start: z.string(),\n end: z.string(),\n })\n .nullable(),\n members: z.array(memberUsageSchema),\n});\n\n/**\n * Zero contract for GET /api/zero/usage/members\n */\nexport const zeroUsageMembersContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/usage/members\",\n headers: authHeadersSchema,\n query: z.object({\n range: usageRecordRangeSchema.default(\"billingPeriod\"),\n tz: z.string().default(\"UTC\"),\n }),\n responses: {\n 200: usageMembersResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get per-member usage for a selected period\",\n },\n});\n\nexport type ZeroUsageMembersContract = typeof zeroUsageMembersContract;\n\n// Inferred types from Zod schemas\nexport type MemberUsage = z.infer<typeof memberUsageSchema>;\nexport type UsageMembersResponse = z.infer<typeof usageMembersResponseSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n// Where a run originated. `chat` is web chat (trigger_source 'web'); known\n// trigger sources keep their surface, and unsupported values are grouped as\n// `other`.\nexport const usageRecordSourceSchema = z.enum([\n \"chat\",\n \"automation\",\n \"slack\",\n \"teams\",\n \"telegram\",\n \"email\",\n \"agentphone\",\n \"github\",\n \"agent\",\n \"other\",\n]);\n\nexport type UsageRecordSource = z.infer<typeof usageRecordSourceSchema>;\n\nexport const usageRecordScopeSchema = z.enum([\"mine\", \"team\"]);\nexport type UsageRecordScope = z.infer<typeof usageRecordScopeSchema>;\n\nexport const usageRecordRangeSchema = z.enum([\n \"today\",\n \"yesterday\",\n \"24h\",\n \"7d\",\n \"billingPeriod\",\n]);\nexport type UsageRecordRange = z.infer<typeof usageRecordRangeSchema>;\n\nexport const usageRecordKindSchema = z.enum([\n \"model\",\n \"image\",\n \"video\",\n \"connector\",\n \"other\",\n]);\nexport type UsageRecordKind = z.infer<typeof usageRecordKindSchema>;\n\nconst usageRecordProviderBreakdownSchema = z.object({\n provider: z.string(),\n credits: z.number(),\n // Optional while app and API promotions can serve different versions.\n usageKinds: z\n .array(\n z.object({\n kind: z.string(),\n credits: z.number(),\n }),\n )\n .optional(),\n});\n\nconst usageRecordKindBreakdownSchema = z.object({\n kind: usageRecordKindSchema,\n credits: z.number(),\n providers: z.array(usageRecordProviderBreakdownSchema),\n});\n\nconst usageRecordMemberSchema = z.object({\n userId: z.string(),\n email: z.string(),\n});\n\n// One usage row. Threaded sources (chat, automation) aggregate every run in the\n// thread into a single row that links to the thread. Deleted threaded sources\n// aggregate into a synthetic non-clickable row. Unthreaded sources are one row\n// per run that links to the run's activity detail. Ordered by most recent\n// activity so the list reads as a chronological record.\nconst usageRecordRowSchema = z.object({\n source: usageRecordSourceSchema,\n // Set for threaded sources (web chat, automation) — links to the chat thread.\n threadId: z.string().nullable(),\n // Set for unthreaded sources (slack, telegram, …) — links to the run.\n runId: z.string().nullable(),\n title: z.string().nullable(),\n credits: z.number(),\n tokens: z.number(),\n breakdown: z.array(usageRecordKindBreakdownSchema),\n member: usageRecordMemberSchema.nullable(),\n // ISO string of the most recent run in this row.\n lastActivityAt: z.string(),\n});\n\nconst usageRecordResponseSchema = z.object({\n period: z\n .object({\n start: z.string(),\n end: z.string(),\n })\n .nullable(),\n rows: z.array(usageRecordRowSchema),\n // Total credits across the whole range (not just the current page), so the\n // summary headline stays correct as more pages load in.\n totalCredits: z.number(),\n pagination: z.object({\n page: z.number(),\n pageSize: z.number(),\n total: z.number(),\n }),\n});\n\nexport const zeroUsageRecordContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/usage/record\",\n headers: authHeadersSchema,\n query: z.object({\n page: z.coerce.number().int().positive().default(1),\n pageSize: z.coerce.number().int().positive().max(100).default(20),\n scope: usageRecordScopeSchema.default(\"mine\"),\n range: usageRecordRangeSchema.default(\"today\"),\n tz: z.string().default(\"UTC\"),\n source: usageRecordSourceSchema.optional(),\n }),\n responses: {\n 200: usageRecordResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary:\n \"Get personal usage records across sources, ordered by recent activity\",\n },\n});\n\nexport type ZeroUsageRecordContract = typeof zeroUsageRecordContract;\nexport type UsageRecordResponse = z.infer<typeof usageRecordResponseSchema>;\nexport type UsageRecordRow = z.infer<typeof usageRecordRowSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n// --- Per-Run Records Contract ---\n\nconst usageRunSchema = z.object({\n runId: z.string(),\n agentName: z.string().nullable(),\n memberEmail: z.string(),\n userId: z.string(),\n triggerSource: z.string().nullable(),\n model: z.string(),\n status: z.string(),\n prompt: z.string(),\n startedAt: z.string().nullable(),\n completedAt: z.string().nullable(),\n durationMs: z.number().nullable(),\n inputTokens: z.number(),\n outputTokens: z.number(),\n cacheTokens: z.number(),\n creditsCharged: z.number(),\n createdAt: z.string(),\n});\n\nconst usageRunsResponseSchema = z.object({\n runs: z.array(usageRunSchema),\n pagination: z.object({\n page: z.number(),\n pageSize: z.number(),\n total: z.number(),\n }),\n});\n\nexport const zeroUsageRunsContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/usage/runs\",\n headers: authHeadersSchema,\n query: z.object({\n page: z.coerce.number().int().positive().default(1),\n pageSize: z.coerce.number().int().positive().max(100).default(20),\n runId: z.string().uuid().optional(),\n agentId: z.string().optional(),\n // Comma-separated list of user IDs to filter by. Empty string = no filter.\n userIds: z.string().optional(),\n dateFrom: z.string().optional(),\n dateTo: z.string().optional(),\n }),\n responses: {\n 200: usageRunsResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get per-run usage records for the org\",\n },\n});\n\nexport type ZeroUsageRunsContract = typeof zeroUsageRunsContract;\n\nexport type UsageRun = z.infer<typeof usageRunSchema>;\nexport type UsageRunsResponse = z.infer<typeof usageRunsResponseSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst usageInsightBucketSchema = z.object({\n ts: z.string(), // ISO string for the bucket start\n series: z.record(z.string(), z.number()), // { chat: 123, slack: 45, ... }\n tokens: z.record(z.string(), z.number()), // same keys, total token counts\n});\n\nconst usageInsightAutomationRowSchema = z.object({\n automationId: z.string(),\n automationName: z.string(),\n automationDescription: z.string().nullable(),\n credits: z.number(),\n tokens: z.number(),\n});\n\nconst usageInsightChatRowSchema = z.object({\n threadId: z.string(),\n threadTitle: z.string().nullable(),\n credits: z.number(),\n tokens: z.number(),\n});\n\nconst usageInsightResponseSchema = z.object({\n buckets: z.array(usageInsightBucketSchema),\n automations: z.array(usageInsightAutomationRowSchema),\n automationOtherCount: z.number(),\n automationOtherCredits: z.number(),\n chats: z.array(usageInsightChatRowSchema),\n chatOtherCount: z.number(),\n chatOtherCredits: z.number(),\n emailCredits: z.number(),\n emailTokens: z.number(),\n slackCredits: z.number(),\n slackTokens: z.number(),\n grandTotalCredits: z.number(),\n grandTotalTokens: z.number(),\n});\n\nexport const zeroUsageInsightContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/usage/insight\",\n headers: authHeadersSchema,\n query: z.object({\n range: z.enum([\"today\", \"yesterday\", \"day\", \"7d\", \"28d\", \"30d\"]),\n date: z.string().optional(),\n groupBy: z.enum([\"source\", \"agent\"]),\n tz: z.string(),\n }),\n responses: {\n 200: usageInsightResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get personal usage insight for the signed-in user\",\n },\n});\n\nexport type ZeroUsageInsightContract = typeof zeroUsageInsightContract;\nexport type UsageInsightResponse = z.infer<typeof usageInsightResponseSchema>;\nexport type UsageInsightBucket = z.infer<typeof usageInsightBucketSchema>;\nexport type UsageInsightAutomationRow = z.infer<\n typeof usageInsightAutomationRowSchema\n>;\nexport type UsageInsightChatRow = z.infer<typeof usageInsightChatRowSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst dailyUsageSchema = z.object({\n date: z.string(),\n run_count: z.number(),\n run_time_ms: z.number(),\n});\n\nconst usageResponseSchema = z.object({\n period: z.object({\n start: z.string(),\n end: z.string(),\n }),\n summary: z.object({\n total_runs: z.number(),\n total_run_time_ms: z.number(),\n }),\n daily: z.array(dailyUsageSchema),\n});\n\nexport const usageContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/usage\",\n headers: authHeadersSchema,\n query: z.object({\n start_date: z.string().optional(),\n end_date: z.string().optional(),\n }),\n responses: {\n 200: usageResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get personal daily run usage for the signed-in user\",\n },\n});\n\nexport type UsageContract = typeof usageContract;\nexport type DailyUsage = z.infer<typeof dailyUsageSchema>;\nexport type UsageResponse = z.infer<typeof usageResponseSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { zeroAgentVisibilitySchema } from \"./zero-agents\";\n\nconst c = initContract();\n\nconst teamComposeItemSchema = z.object({\n id: z.string(),\n ownerId: z.string().optional(),\n displayName: z.string().nullable(),\n description: z.string().nullable(),\n sound: z.string().nullable(),\n avatarUrl: z.string().nullable(),\n visibility: zeroAgentVisibilitySchema.optional(),\n headVersionId: z.string().nullable(),\n updatedAt: z.string(),\n});\n\n/**\n * Zero team contract (GET /api/zero/team)\n * Lists all agents in the user's active Clerk org.\n */\nexport const zeroTeamContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/team\",\n headers: authHeadersSchema,\n responses: {\n 200: z.array(teamComposeItemSchema),\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"List all agents in the user's active org\",\n },\n});\n\nexport type ZeroTeamContract = typeof zeroTeamContract;\nexport type TeamComposeItem = z.infer<typeof teamComposeItemSchema>;\nexport { teamComposeItemSchema };\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst slackEnvironmentSchema = z.object({\n requiredSecrets: z.array(z.string()),\n requiredVars: z.array(z.string()),\n missingSecrets: z.array(z.string()),\n missingVars: z.array(z.string()),\n});\n\nconst slackOrgStatusSchema = z.object({\n isConnected: z.boolean(),\n isInstalled: z.boolean().optional(),\n workspaceName: z.string().nullable().optional(),\n isAdmin: z.boolean(),\n installUrl: z.string().nullable().optional(),\n connectUrl: z.string().nullable().optional(),\n defaultAgentName: z.string().nullable().optional(),\n environment: slackEnvironmentSchema.optional(),\n /** True when the installation's granted scopes are outdated (admin-only). */\n scopeMismatch: z.boolean().optional(),\n /** OAuth install URL for re-authorization (admin-only, when scopeMismatch). */\n reinstallUrl: z.string().nullable().optional(),\n});\n\n/**\n * Zero integrations Slack contract (GET/DELETE /api/zero/integrations/slack)\n * Manages org-scoped Slack workspace info.\n */\nexport const zeroIntegrationsSlackContract = c.router({\n getStatus: {\n method: \"GET\",\n path: \"/api/zero/integrations/slack\",\n headers: authHeadersSchema,\n responses: {\n 200: slackOrgStatusSchema,\n 401: apiErrorSchema,\n },\n summary: \"Get org-scoped Slack workspace info\",\n },\n disconnect: {\n method: \"DELETE\",\n path: \"/api/zero/integrations/slack\",\n headers: authHeadersSchema,\n body: c.noBody(),\n query: z.object({\n action: z.string().optional(),\n }),\n responses: {\n 200: z.object({ ok: z.boolean() }),\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Disconnect or uninstall Slack workspace\",\n },\n});\n\nexport type ZeroIntegrationsSlackContract =\n typeof zeroIntegrationsSlackContract;\nexport type SlackOrgStatus = z.infer<typeof slackOrgStatusSchema>;\nexport { slackOrgStatusSchema };\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst slackConnectStatusSchema = z.object({\n isConnected: z.boolean(),\n isAdmin: z.boolean(),\n workspaceName: z.string().nullable().optional(),\n defaultAgentName: z.string().nullable().optional(),\n});\n\nconst slackConnectResponseSchema = z.object({\n success: z.boolean(),\n connectionId: z.string(),\n role: z.string(),\n});\n\n/**\n * Zero Slack connect contract (GET/POST /api/zero/integrations/slack/connect)\n * Manages per-user Slack connection.\n */\nexport const zeroSlackConnectContract = c.router({\n getStatus: {\n method: \"GET\",\n path: \"/api/zero/integrations/slack/connect\",\n headers: authHeadersSchema,\n responses: {\n 200: slackConnectStatusSchema,\n 401: apiErrorSchema,\n },\n summary: \"Check user Slack connection status\",\n },\n connect: {\n method: \"POST\",\n path: \"/api/zero/integrations/slack/connect\",\n headers: authHeadersSchema,\n body: z.object({\n workspaceId: z.string().min(1),\n slackUserId: z.string().min(1),\n channelId: z.string().optional(),\n threadTs: z.string().optional(),\n }),\n responses: {\n 200: slackConnectResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Connect user to Slack workspace\",\n },\n});\n\nexport type ZeroSlackConnectContract = typeof zeroSlackConnectContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const zeroSlackCommandsContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/slack/commands\",\n body: c.type<string>(),\n responses: {\n 200: z.unknown(),\n 400: z.object({ error: z.string() }),\n 401: z.object({ error: z.string() }),\n 503: z.object({ error: z.string() }),\n },\n summary: \"Handle Zero Slack slash commands\",\n },\n});\n\nexport type ZeroSlackCommandsContract = typeof zeroSlackCommandsContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const zeroSlackEventsContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/slack/events\",\n body: c.type<string>(),\n responses: {\n 200: z.unknown(),\n 400: z.object({ error: z.string() }),\n 401: z.object({ error: z.string() }),\n 503: z.object({ error: z.string() }),\n },\n summary: \"Handle Zero Slack Events API callbacks\",\n },\n});\n\nexport type ZeroSlackEventsContract = typeof zeroSlackEventsContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst teamsActorSchema = z.object({\n id: z.string(),\n name: z.string().nullable(),\n aadObjectId: z.string().nullable(),\n userPrincipalName: z.string().nullable(),\n});\n\nconst teamsInboundAttachmentSchema = z.object({\n id: z.string().nullable(),\n contentType: z.string().nullable(),\n contentUrl: z.string().nullable(),\n name: z.string().nullable(),\n content: z.record(z.string(), z.unknown()).nullable(),\n});\n\nconst teamsActivityBaseSchema = z.object({\n activityId: z.string().nullable(),\n tenantId: z.string(),\n tenantName: z.string().nullable(),\n teamsAppId: z.string().nullable(),\n serviceUrl: z.string(),\n conversationId: z.string(),\n conversationType: z.string().nullable(),\n teamId: z.string().nullable(),\n teamAadGroupId: z.string().nullable(),\n teamName: z.string().nullable(),\n channelId: z.string().nullable(),\n timestamp: z.string().nullable(),\n idempotencyKey: z.string(),\n});\n\nexport const teamsInboundMessageActivitySchema = teamsActivityBaseSchema.extend(\n {\n kind: z.literal(\"message\"),\n threadId: z.string(),\n sender: teamsActorSchema,\n recipient: teamsActorSchema.nullable(),\n rawText: z.string(),\n text: z.string(),\n value: z.record(z.string(), z.unknown()).nullable(),\n mentionsRecipient: z.boolean(),\n attachments: z.array(teamsInboundAttachmentSchema),\n },\n);\n\nexport const teamsConversationUpdateActivitySchema =\n teamsActivityBaseSchema.extend({\n kind: z.literal(\"conversation_update\"),\n action: z.enum([\"members_added\", \"members_removed\", \"unknown\"]),\n sender: teamsActorSchema,\n recipient: teamsActorSchema,\n membersAdded: z.array(teamsActorSchema),\n membersRemoved: z.array(teamsActorSchema),\n });\n\nexport const teamsBotRemovedActivitySchema = teamsActivityBaseSchema.extend({\n kind: z.literal(\"bot_removed\"),\n reason: z.enum([\"members_removed\", \"installation_remove\"]),\n recipient: teamsActorSchema.nullable(),\n membersRemoved: z.array(teamsActorSchema),\n});\n\nexport const teamsInstallationUpdateActivitySchema =\n teamsActivityBaseSchema.extend({\n kind: z.literal(\"installation_update\"),\n action: z.enum([\"add\", \"unknown\"]),\n sender: teamsActorSchema,\n recipient: teamsActorSchema.nullable(),\n });\n\nexport const teamsUnsupportedActivitySchema = z.object({\n kind: z.literal(\"unsupported\"),\n activityType: z.string(),\n idempotencyKey: z.string().nullable(),\n});\n\nexport const teamsInboundActivitySchema = z.discriminatedUnion(\"kind\", [\n teamsInboundMessageActivitySchema,\n teamsConversationUpdateActivitySchema,\n teamsBotRemovedActivitySchema,\n teamsInstallationUpdateActivitySchema,\n teamsUnsupportedActivitySchema,\n]);\n\nconst teamsBotDispatchResponseSchema = z.discriminatedUnion(\"kind\", [\n z.object({ kind: z.literal(\"ignored\") }),\n z.object({\n kind: z.literal(\"notice\"),\n replyText: z.string(),\n connectUrl: z.string().optional(),\n card: z.record(z.string(), z.unknown()).optional(),\n }),\n z.object({\n kind: z.literal(\"accepted\"),\n runId: z.string(),\n }),\n z.object({\n kind: z.literal(\"queued\"),\n runId: z.string(),\n }),\n z.object({\n kind: z.literal(\"failed\"),\n replyText: z.string(),\n runId: z.string().optional(),\n }),\n]);\n\nexport const teamsBotIngressResponseSchema = z.object({\n ok: z.literal(true),\n activity: teamsInboundActivitySchema,\n connectUrl: z.string().nullable().optional(),\n dispatch: teamsBotDispatchResponseSchema.optional(),\n});\n\nexport const zeroTeamsBotContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/teams/bot\",\n body: z.unknown(),\n responses: {\n 200: teamsBotIngressResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Handle Microsoft Teams Bot Framework activities\",\n },\n});\n\nexport type TeamsActor = z.infer<typeof teamsActorSchema>;\nexport type TeamsInboundAttachment = z.infer<\n typeof teamsInboundAttachmentSchema\n>;\nexport type TeamsInboundActivity = z.infer<typeof teamsInboundActivitySchema>;\nexport type TeamsBotIngressResponse = z.infer<\n typeof teamsBotIngressResponseSchema\n>;\nexport type TeamsBotDispatchResponse = z.infer<\n typeof teamsBotDispatchResponseSchema\n>;\nexport type ZeroTeamsBotContract = typeof zeroTeamsBotContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst nullableStringSchema = z.string().nullable();\n\nconst teamsEnvironmentSchema = z.object({\n requiredSecrets: z.array(z.string()),\n requiredVars: z.array(z.string()),\n missingSecrets: z.array(z.string()),\n missingVars: z.array(z.string()),\n});\n\nconst teamsConnectStatusSchema = z.object({\n isInstalled: z.boolean(),\n isConnected: z.boolean(),\n isAdmin: z.boolean(),\n installUrl: nullableStringSchema.optional(),\n connectUrl: nullableStringSchema.optional(),\n tenantId: nullableStringSchema.optional(),\n tenantName: nullableStringSchema.optional(),\n teamId: nullableStringSchema.optional(),\n teamName: nullableStringSchema.optional(),\n defaultAgentName: nullableStringSchema.optional(),\n permissionMismatch: z.boolean().optional(),\n reinstallUrl: nullableStringSchema.optional(),\n environment: teamsEnvironmentSchema.optional(),\n});\n\nconst teamsConnectBodySchema = z\n .object({\n tenantId: z.string().min(1),\n tenantName: z.string().min(1).optional(),\n teamsUserId: z.string().min(1).optional(),\n teamsAadObjectId: z.string().min(1).optional(),\n teamsUserDisplayName: z.string().min(1).optional(),\n teamsUserPrincipalName: z.string().min(1).optional(),\n teamId: z.string().min(1).optional(),\n teamName: z.string().min(1).optional(),\n serviceUrl: z.string().min(1).optional(),\n conversationId: z.string().min(1).optional(),\n conversationType: z.string().min(1).optional(),\n activityId: z.string().min(1).optional(),\n channelId: z.string().min(1).optional(),\n threadId: z.string().min(1).optional(),\n })\n .refine(\n (body) => {\n return Boolean(body.teamsUserId || body.teamsAadObjectId);\n },\n {\n message: \"teamsUserId or teamsAadObjectId is required\",\n path: [\"teamsUserId\"],\n },\n );\n\nconst teamsConnectResponseSchema = z.object({\n success: z.literal(true),\n connectionId: z.string(),\n role: z.enum([\"admin\", \"member\"]),\n});\n\nconst teamsDisconnectResponseSchema = z.object({\n success: z.literal(true),\n});\n\nexport const zeroTeamsConnectContract = c.router({\n getStatus: {\n method: \"GET\",\n path: \"/api/zero/integrations/teams/connect\",\n headers: authHeadersSchema,\n responses: {\n 200: teamsConnectStatusSchema,\n 401: apiErrorSchema,\n },\n summary: \"Check user Microsoft Teams connection status\",\n },\n connect: {\n method: \"POST\",\n path: \"/api/zero/integrations/teams/connect\",\n headers: authHeadersSchema,\n body: teamsConnectBodySchema,\n responses: {\n 200: teamsConnectResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Connect user to Microsoft Teams installation\",\n },\n disconnect: {\n method: \"DELETE\",\n path: \"/api/zero/integrations/teams/connect\",\n headers: authHeadersSchema,\n query: z.object({\n action: z.string().optional(),\n }),\n responses: {\n 200: teamsDisconnectResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Disconnect user from Microsoft Teams installation\",\n },\n});\n\nexport type TeamsConnectStatus = z.infer<typeof teamsConnectStatusSchema>;\nexport type TeamsConnectBody = z.infer<typeof teamsConnectBodySchema>;\nexport type TeamsConnectResponse = z.infer<typeof teamsConnectResponseSchema>;\nexport type TeamsDisconnectResponse = z.infer<\n typeof teamsDisconnectResponseSchema\n>;\nexport type ZeroTeamsConnectContract = typeof zeroTeamsConnectContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const zeroTeamsBrowserConnectQuerySchema = z.object({\n tenantId: z.string().optional(),\n tenantName: z.string().optional(),\n teamsUserId: z.string().optional(),\n teamsAadObjectId: z.string().optional(),\n teamsUserDisplayName: z.string().optional(),\n teamsUserPrincipalName: z.string().optional(),\n displayName: z.string().optional(),\n upn: z.string().optional(),\n teamId: z.string().optional(),\n teamName: z.string().optional(),\n serviceUrl: z.string().optional(),\n conversationId: z.string().optional(),\n conversationType: z.string().optional(),\n activityId: z.string().optional(),\n channelId: z.string().optional(),\n threadId: z.string().optional(),\n orgId: z.string().optional(),\n});\n\nexport const zeroTeamsBrowserConnectContract = c.router({\n connect: {\n method: \"GET\",\n path: \"/api/zero/teams/connect\",\n query: zeroTeamsBrowserConnectQuerySchema,\n responses: {\n 307: c.noBody(),\n 500: z.object({ error: z.string() }),\n },\n summary: \"Browser Microsoft Teams connect flow\",\n },\n});\n\nexport type ZeroTeamsBrowserConnectContract =\n typeof zeroTeamsBrowserConnectContract;\nexport type ZeroTeamsBrowserConnectQuery = z.infer<\n typeof zeroTeamsBrowserConnectQuerySchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nconst jsonErrorSchema = z.object({ error: z.string() });\n\nexport const zeroTeamsOauthConnectQuerySchema = z.object({\n orgId: z.string().optional(),\n vm0UserId: z.string().optional(),\n prompt: z.string().optional(),\n});\n\nexport const zeroTeamsOauthCallbackQuerySchema = z.object({\n code: z.string().optional(),\n error: z.string().optional(),\n error_description: z.string().optional(),\n state: z.string().optional(),\n});\n\nexport const zeroTeamsOauthContract = c.router({\n connect: {\n method: \"GET\",\n path: \"/api/zero/teams/oauth/connect\",\n query: zeroTeamsOauthConnectQuerySchema,\n responses: {\n 307: c.noBody(),\n 400: jsonErrorSchema,\n 503: jsonErrorSchema,\n },\n summary: \"Start Microsoft Teams user OAuth connect\",\n },\n callback: {\n method: \"GET\",\n path: \"/api/zero/teams/oauth/callback\",\n query: zeroTeamsOauthCallbackQuerySchema,\n responses: {\n 307: c.noBody(),\n 400: jsonErrorSchema,\n 503: jsonErrorSchema,\n },\n summary: \"Handle Microsoft Teams OAuth callback\",\n },\n});\n\nexport type ZeroTeamsOauthContract = typeof zeroTeamsOauthContract;\nexport type ZeroTeamsOauthConnectQuery = z.infer<\n typeof zeroTeamsOauthConnectQuerySchema\n>;\nexport type ZeroTeamsOauthCallbackQuery = z.infer<\n typeof zeroTeamsOauthCallbackQuerySchema\n>;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nexport const zeroSlackInteractiveContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/slack/interactive\",\n body: c.type<string>(),\n responses: {\n 200: z.unknown(),\n 400: z.object({ error: z.string() }),\n 401: z.object({ error: z.string() }),\n 503: z.object({ error: z.string() }),\n },\n summary: \"Handle Zero Slack interactive component callbacks\",\n },\n});\n\nexport type ZeroSlackInteractiveContract = typeof zeroSlackInteractiveContract;\n","import { z } from \"zod\";\n\nimport { initContract } from \"./base\";\n\nconst c = initContract();\n\nconst jsonErrorSchema = z.object({ error: z.string() });\n\nexport const zeroSlackOauthInstallQuerySchema = z.object({\n orgId: z.string().optional(),\n vm0UserId: z.string().optional(),\n reinstall: z.string().optional(),\n prompt: z.string().optional(),\n});\n\nexport const zeroSlackOauthConnectQuerySchema = z.object({\n orgId: z.string().optional(),\n vm0UserId: z.string().optional(),\n prompt: z.string().optional(),\n});\n\nexport const zeroSlackOauthCallbackQuerySchema = z.object({\n code: z.string().optional(),\n error: z.string().optional(),\n state: z.string().optional(),\n});\n\nexport const zeroSlackOauthContract = c.router({\n install: {\n method: \"GET\",\n path: \"/api/zero/slack/oauth/install\",\n query: zeroSlackOauthInstallQuerySchema,\n responses: {\n 307: c.noBody(),\n 503: jsonErrorSchema,\n },\n summary: \"Start Slack bot OAuth install\",\n },\n connect: {\n method: \"GET\",\n path: \"/api/zero/slack/oauth/connect\",\n query: zeroSlackOauthConnectQuerySchema,\n responses: {\n 307: c.noBody(),\n 400: jsonErrorSchema,\n 404: jsonErrorSchema,\n 503: jsonErrorSchema,\n },\n summary: \"Start Slack user OAuth connect\",\n },\n callback: {\n method: \"GET\",\n path: \"/api/zero/slack/oauth/callback\",\n query: zeroSlackOauthCallbackQuerySchema,\n responses: {\n 307: c.noBody(),\n 400: jsonErrorSchema,\n 503: jsonErrorSchema,\n },\n summary: \"Handle Slack OAuth callback\",\n },\n});\n\nexport type ZeroSlackOauthContract = typeof zeroSlackOauthContract;\nexport type ZeroSlackOauthInstallQuery = z.infer<\n typeof zeroSlackOauthInstallQuerySchema\n>;\nexport type ZeroSlackOauthConnectQuery = z.infer<\n typeof zeroSlackOauthConnectQuerySchema\n>;\nexport type ZeroSlackOauthCallbackQuery = z.infer<\n typeof zeroSlackOauthCallbackQuerySchema\n>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst slackChannelSchema = z.object({\n id: z.string(),\n name: z.string(),\n});\n\n/**\n * Zero Slack channels contract (GET /api/zero/slack/channels)\n * Lists Slack channels where the bot is a member.\n */\nexport const zeroSlackChannelsContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/zero/slack/channels\",\n headers: authHeadersSchema,\n responses: {\n 200: z.object({ channels: z.array(slackChannelSchema) }),\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"List Slack channels where bot is a member\",\n },\n});\n\nexport type ZeroSlackChannelsContract = typeof zeroSlackChannelsContract;\nexport type SlackChannel = z.infer<typeof slackChannelSchema>;\nexport { slackChannelSchema };\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst queuePositionResponseSchema = z.object({\n position: z.number(),\n total: z.number(),\n});\n\n/**\n * Zero queue position contract (GET /api/zero/queue-position)\n * Returns the position of a queued run within its org queue.\n */\nexport const zeroQueuePositionContract = c.router({\n getPosition: {\n method: \"GET\",\n path: \"/api/zero/queue-position\",\n headers: authHeadersSchema,\n query: z.object({\n runId: z.string().min(1, \"runId is required\"),\n }),\n responses: {\n 200: queuePositionResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Get queue position for a run\",\n },\n});\n\nexport type ZeroQueuePositionContract = typeof zeroQueuePositionContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst reportErrorBodySchema = z.object({\n runId: z.uuid(\"Run ID must be a valid UUID\"),\n title: z.string().min(1, \"Title is required\"),\n description: z.string().optional(),\n});\n\nconst reportErrorResponseSchema = z.object({\n reference: z.string(),\n});\n\nexport const zeroReportErrorContract = c.router({\n submit: {\n method: \"POST\",\n path: \"/api/zero/report-error\",\n headers: authHeadersSchema,\n body: reportErrorBodySchema,\n responses: {\n 200: reportErrorResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Submit error report for a failed run\",\n },\n});\n\nexport type ZeroReportErrorContract = typeof zeroReportErrorContract;\nexport { reportErrorBodySchema, reportErrorResponseSchema };\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst insightAgentSchema = z.object({\n agentName: z.string(),\n agentId: z.string().nullable(),\n runs: z.number(),\n credits: z.number(),\n});\n\nconst insightServiceSchema = z.object({\n domain: z.string(),\n calls: z.number(),\n agentNames: z.array(z.string()),\n});\n\nexport const insightPermissionSchema = z.object({\n label: z.string(),\n connectorSlug: z.string().optional(),\n allowed: z.number(),\n denied: z.number(),\n agentNames: z.array(z.string()),\n});\n\nconst insightTopTaskSchema = z.object({\n name: z.string(),\n count: z.number(),\n});\n\nconst insightMemberCreditsSchema = z.object({\n name: z.string(),\n credits: z.number(),\n agentNames: z.array(z.string()).optional(),\n agentCredits: z.record(z.string(), z.number()).optional(),\n});\n\nconst insightDayAutomationSchema = z.object({\n automationId: z.string(),\n automationName: z.string(),\n automationDescription: z.string().nullable(),\n credits: z.number(),\n tokens: z.number(),\n});\n\nconst insightDayChatSchema = z.object({\n threadId: z.string(),\n threadTitle: z.string().nullable(),\n credits: z.number(),\n tokens: z.number(),\n});\n\nconst dayInsightSchema = z.object({\n date: z.string(),\n agents: z.array(insightAgentSchema).default([]),\n creditsUsed: z.number().default(0),\n creditBalance: z.number().default(0),\n teamUsage: z.array(insightMemberCreditsSchema).default([]),\n topTask: insightTopTaskSchema.nullable().default(null),\n services: z.array(insightServiceSchema).default([]),\n permissions: z.array(insightPermissionSchema).default([]),\n automations: z.array(insightDayAutomationSchema).default([]),\n chats: z.array(insightDayChatSchema).default([]),\n});\n\nconst insightsResponseSchema = z.object({\n days: z.array(dayInsightSchema),\n totalCredits: z.number(),\n totalRuns: z.number(),\n lastUpdated: z.string().nullable(),\n});\n\nexport const zeroInsightsContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/insights\",\n headers: authHeadersSchema,\n query: z.object({\n days: z.coerce.number().optional(),\n }),\n responses: {\n 200: insightsResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Get daily insights for the authenticated org\",\n },\n});\n\nexport type ZeroInsightsContract = typeof zeroInsightsContract;\nexport type InsightsResponse = z.infer<typeof insightsResponseSchema>;\nexport type DayInsight = z.infer<typeof dayInsightSchema>;\n","import { z } from \"zod\";\nimport { initContract, authHeadersSchema } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const pushSubscriptionsContract = c.router({\n register: {\n method: \"POST\",\n path: \"/api/zero/push-subscriptions\",\n headers: authHeadersSchema,\n body: z.object({\n endpoint: z.string().url(),\n keys: z.object({\n p256dh: z.string().min(1),\n auth: z.string().min(1),\n }),\n }),\n responses: {\n 201: z.object({ success: z.literal(true) }),\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"Register a Web Push subscription for the current user\",\n },\n});\n\nexport type PushSubscriptionsContract = typeof pushSubscriptionsContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { zeroBuiltInGenerationAcceptedResponseSchema } from \"./zero-built-in-generation\";\n\nconst c = initContract();\nconst stringOrStringArraySchema = z.union([\n z.string(),\n z.array(z.string()).readonly(),\n]);\nconst numberOrStringSchema = z.union([z.number(), z.string()]);\n\nexport const zeroImageIoGenerateRequestSchema = z\n .object({\n prompt: z.string().optional(),\n model: z.string().optional(),\n size: z.string().optional(),\n quality: z.string().optional(),\n background: z.string().optional(),\n outputFormat: z.string().optional(),\n outputCompression: numberOrStringSchema.optional(),\n moderation: z.string().optional(),\n seed: numberOrStringSchema.optional(),\n safetyTolerance: z.string().optional(),\n enhancePrompt: z.boolean().optional(),\n imageUrl: stringOrStringArraySchema.optional(),\n image_url: stringOrStringArraySchema.optional(),\n imageUrls: stringOrStringArraySchema.optional(),\n image_urls: stringOrStringArraySchema.optional(),\n maskImageUrl: z.string().optional(),\n mask_image_url: z.string().optional(),\n inputFidelity: z.string().optional(),\n input_fidelity: z.string().optional(),\n imagePromptStrength: numberOrStringSchema.optional(),\n image_prompt_strength: numberOrStringSchema.optional(),\n })\n .passthrough();\n\nexport const zeroImageIoGenerateResponseSchema = z.object({\n id: z.string(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n url: z.string(),\n creditsCharged: z.number(),\n model: z.string(),\n provider: z.string(),\n imageSize: z.string(),\n quality: z.string(),\n background: z.string(),\n outputFormat: z.string(),\n outputCompression: z.number().optional(),\n moderation: z.string().optional(),\n safetyTolerance: z.string().optional(),\n revisedPrompt: z.string().optional(),\n billingCategory: z.string().optional(),\n billingQuantity: z.number().optional(),\n sourceUrl: z.string().optional(),\n seed: z.number().optional(),\n sourceImageUrls: z.array(z.string()).optional(),\n maskImageUrl: z.string().optional(),\n inputFidelity: z.string().optional(),\n imagePromptStrength: z.number().optional(),\n});\n\nexport type ZeroImageIoGenerateRequest = z.infer<\n typeof zeroImageIoGenerateRequestSchema\n>;\nexport type ZeroImageIoGenerateResponse = z.infer<\n typeof zeroImageIoGenerateResponseSchema\n>;\n\nexport const zeroImageIoGenerateContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/image-io/generate\",\n headers: authHeadersSchema,\n body: zeroImageIoGenerateRequestSchema,\n responses: {\n 200: zeroImageIoGenerateResponseSchema,\n 202: zeroBuiltInGenerationAcceptedResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Generate and persist an image file\",\n },\n});\n\nexport type ZeroImageIoGenerateContract = typeof zeroImageIoGenerateContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n// Shared so the UI can enforce the same bounds it validates against and the two\n// can't drift.\nexport const ZERO_IMAGE_INTERPRET_MARKS_MAX_REGIONS = 16;\nexport const ZERO_IMAGE_INTERPRET_MARKS_MAX_INSTRUCTION_LENGTH = 2000;\n\nexport const zeroImageIoInterpretMarksRegionSchema = z.object({\n id: z.string().min(1),\n // The number drawn on the image for this region (1-based).\n mark: z.number().int().min(1),\n instruction: z\n .string()\n .min(1)\n .max(ZERO_IMAGE_INTERPRET_MARKS_MAX_INSTRUCTION_LENGTH),\n location: z.string().max(500).optional(),\n});\nexport type ZeroImageIoInterpretMarksRegion = z.infer<\n typeof zeroImageIoInterpretMarksRegionSchema\n>;\n\nexport const zeroImageIoInterpretMarksRequestSchema = z.object({\n // Data URI or URL of the source image with numbered marks drawn on it.\n imageUrl: z.string().min(1),\n regions: z\n .array(zeroImageIoInterpretMarksRegionSchema)\n .min(1)\n .max(ZERO_IMAGE_INTERPRET_MARKS_MAX_REGIONS)\n .readonly(),\n});\nexport type ZeroImageIoInterpretMarksRequest = z.infer<\n typeof zeroImageIoInterpretMarksRequestSchema\n>;\n\nexport const zeroImageIoInterpretMarksResultSchema = z.object({\n id: z.string(),\n // The disambiguated object/area the mark refers to, e.g. \"the dog's black\n // nose in the centre (not the tongue below it)\".\n target: z.string(),\n // The self-contained edit instruction to apply to that target.\n edit: z.string(),\n confidence: z.number().min(0).max(100),\n});\nexport type ZeroImageIoInterpretMarksResult = z.infer<\n typeof zeroImageIoInterpretMarksResultSchema\n>;\n\nexport const zeroImageIoInterpretMarksResponseSchema = z.object({\n regions: z.array(zeroImageIoInterpretMarksResultSchema),\n});\nexport type ZeroImageIoInterpretMarksResponse = z.infer<\n typeof zeroImageIoInterpretMarksResponseSchema\n>;\n\nexport const zeroImageIoInterpretMarksContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/image-io/interpret-marks\",\n headers: authHeadersSchema,\n body: zeroImageIoInterpretMarksRequestSchema,\n responses: {\n 200: zeroImageIoInterpretMarksResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Interpret numbered region marks into targeted edit instructions\",\n },\n});\n\nexport type ZeroImageIoInterpretMarksContract =\n typeof zeroImageIoInterpretMarksContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const zeroImageShareXRequestSchema = z.object({\n imageUrl: z.string().min(1),\n caption: z.string().max(280).optional(),\n});\n\nexport const zeroImageShareXResponseSchema = z.object({\n tweetId: z.string(),\n tweetUrl: z.string(),\n});\n\nexport type ZeroImageShareXRequest = z.infer<\n typeof zeroImageShareXRequestSchema\n>;\nexport type ZeroImageShareXResponse = z.infer<\n typeof zeroImageShareXResponseSchema\n>;\n\nexport const zeroImageShareXContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/image-share/x\",\n headers: authHeadersSchema,\n body: zeroImageShareXRequestSchema,\n responses: {\n 200: zeroImageShareXResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 409: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Share an image to X\",\n },\n});\n\nexport type ZeroImageShareXContract = typeof zeroImageShareXContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst dateOnlySchema = z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"Date must be formatted as YYYY-MM-DD\");\n\nexport const zeroBankingProviderSchema = z.literal(\"finicity\");\n\nexport const zeroBankingAccountSchema = z.object({\n id: z.string(),\n name: z.string().nullable(),\n institutionName: z.string().nullable(),\n type: z.string().nullable(),\n last4: z.string().nullable(),\n status: z.string().nullable(),\n currency: z.string().nullable(),\n});\n\nexport const zeroBankingBalanceSchema = z.object({\n accountId: z.string(),\n name: z.string().nullable(),\n type: z.string().nullable(),\n balance: z.number().nullable(),\n availableBalance: z.number().nullable(),\n currency: z.string().nullable(),\n balanceDate: z.number().nullable(),\n});\n\nexport const zeroBankingTransactionSchema = z.object({\n id: z.string(),\n accountId: z.string(),\n amount: z.number().nullable(),\n description: z.string().nullable(),\n memo: z.string().nullable(),\n postedDate: z.number().nullable(),\n transactionDate: z.number().nullable(),\n status: z.string().nullable(),\n categorization: z.string().nullable(),\n merchant: z.string().nullable(),\n});\n\nexport const zeroBankingAccountsResponseSchema = z.object({\n operation: z.literal(\"accounts\"),\n provider: zeroBankingProviderSchema,\n accounts: z.array(zeroBankingAccountSchema),\n});\n\nexport const zeroBankingBalancesRequestSchema = z.object({\n accountId: z.string().trim().min(1),\n});\n\nexport const zeroBankingBalancesResponseSchema = z.object({\n operation: z.literal(\"balances\"),\n provider: zeroBankingProviderSchema,\n balance: zeroBankingBalanceSchema,\n});\n\nexport const zeroBankingTransactionsRequestSchema = z.object({\n accountId: z.string().trim().min(1),\n from: dateOnlySchema,\n to: dateOnlySchema,\n limit: z.number().int().min(1).max(1000).default(100),\n});\n\nexport const zeroBankingTransactionsResponseSchema = z.object({\n operation: z.literal(\"transactions\"),\n provider: zeroBankingProviderSchema,\n accountId: z.string(),\n transactions: z.array(zeroBankingTransactionSchema),\n});\n\nconst zeroBankingAccountsResponses = {\n 200: zeroBankingAccountsResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nconst zeroBankingBalancesResponses = {\n 200: zeroBankingBalancesResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nconst zeroBankingTransactionsResponses = {\n 200: zeroBankingTransactionsResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nexport const zeroBankingContract = c.router({\n accounts: {\n method: \"POST\",\n path: \"/api/zero/banking/accounts\",\n headers: authHeadersSchema,\n body: z.object({}),\n responses: zeroBankingAccountsResponses,\n summary: \"List accounts through the managed Zero Banking gateway\",\n },\n balances: {\n method: \"POST\",\n path: \"/api/zero/banking/balances\",\n headers: authHeadersSchema,\n body: zeroBankingBalancesRequestSchema,\n responses: zeroBankingBalancesResponses,\n summary: \"Read an account balance through the managed Zero Banking gateway\",\n },\n transactions: {\n method: \"POST\",\n path: \"/api/zero/banking/transactions\",\n headers: authHeadersSchema,\n body: zeroBankingTransactionsRequestSchema,\n responses: zeroBankingTransactionsResponses,\n summary:\n \"Read account transactions through the managed Zero Banking gateway\",\n },\n});\n\nexport type ZeroBankingContract = typeof zeroBankingContract;\nexport type ZeroBankingAccount = z.infer<typeof zeroBankingAccountSchema>;\nexport type ZeroBankingBalance = z.infer<typeof zeroBankingBalanceSchema>;\nexport type ZeroBankingTransaction = z.infer<\n typeof zeroBankingTransactionSchema\n>;\nexport type ZeroBankingAccountsResponse = z.infer<\n typeof zeroBankingAccountsResponseSchema\n>;\nexport type ZeroBankingBalancesRequest = z.infer<\n typeof zeroBankingBalancesRequestSchema\n>;\nexport type ZeroBankingBalancesResponse = z.infer<\n typeof zeroBankingBalancesResponseSchema\n>;\nexport type ZeroBankingTransactionsRequest = z.infer<\n typeof zeroBankingTransactionsRequestSchema\n>;\nexport type ZeroBankingTransactionsResponse = z.infer<\n typeof zeroBankingTransactionsResponseSchema\n>;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst travelModeSchema = z.enum([\"driving\", \"walking\", \"bicycling\", \"transit\"]);\nconst placeSearchFieldsetSchema = z.enum([\"pro\", \"enterprise\"]);\nconst placeDetailFieldsetSchema = z.enum([\"essentials\", \"pro\", \"enterprise\"]);\nconst osmLayerSchema = z.enum([\"roads\", \"buildings\", \"water\", \"parks\"]);\nconst osmStyleSchema = z.enum([\"standard\", \"guide\"]);\nconst osmBBoxSchema = z.object({\n west: z.number().min(-180).max(180),\n south: z.number().min(-90).max(90),\n east: z.number().min(-180).max(180),\n north: z.number().min(-90).max(90),\n});\nconst osmCenterSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n});\nconst osmMarkerSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n label: z.string().trim().min(1).max(80).optional(),\n});\nconst osmAreaRequestBaseSchema = z.object({\n bbox: osmBBoxSchema.optional(),\n center: osmCenterSchema.optional(),\n radiusMeters: z.number().int().min(50).max(5_000).optional(),\n});\nconst defaultOsmLayers = [\"roads\", \"buildings\", \"water\", \"parks\"] as const;\n\nfunction validateOsmArea<T extends z.infer<typeof osmAreaRequestBaseSchema>>(\n schema: z.ZodType<T>,\n) {\n return schema\n .refine((value) => {\n return value.bbox !== undefined\n ? value.center === undefined && value.radiusMeters === undefined\n : value.center !== undefined && value.radiusMeters !== undefined;\n }, \"Provide either bbox or center with radiusMeters\")\n .refine((value) => {\n if (!value.bbox) {\n return true;\n }\n return (\n value.bbox.east > value.bbox.west && value.bbox.north > value.bbox.south\n );\n }, \"bbox east/north must be greater than west/south\");\n}\n\nexport const zeroMapsOperationSchema = z.enum([\n \"geocode\",\n \"reverse-geocode\",\n \"directions\",\n \"places.search\",\n \"places.details\",\n \"osm.download\",\n \"osm.render\",\n]);\n\nexport const zeroMapsResponseSchema = z.object({\n operation: zeroMapsOperationSchema,\n provider: z.enum([\"google-maps\", \"openstreetmap\"]),\n creditsCharged: z.number(),\n billingCategory: z.string(),\n billingQuantity: z.number(),\n result: z.unknown(),\n});\n\nexport const zeroMapsGeocodeRequestSchema = z.object({\n address: z.string().trim().min(1),\n region: z.string().trim().min(1).optional(),\n});\n\nexport const zeroMapsReverseGeocodeRequestSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n});\n\nexport const zeroMapsDirectionsRequestSchema = z.object({\n origin: z.string().trim().min(1),\n destination: z.string().trim().min(1),\n mode: travelModeSchema.default(\"driving\"),\n departureTime: z.string().trim().min(1).optional(),\n});\n\nexport const zeroMapsPlacesSearchRequestSchema = z.object({\n query: z.string().trim().min(1),\n location: z.string().trim().min(1).optional(),\n radius: z.number().int().positive().optional(),\n limit: z.number().int().min(1).max(20).default(5),\n region: z.string().trim().min(1).optional(),\n fields: placeSearchFieldsetSchema.default(\"pro\"),\n});\n\nexport const zeroMapsPlacesDetailsRequestSchema = z.object({\n placeId: z.string().trim().min(1),\n fields: placeDetailFieldsetSchema.default(\"essentials\"),\n});\n\nexport const zeroMapsOsmDownloadRequestSchema = validateOsmArea(\n osmAreaRequestBaseSchema.extend({\n layers: z\n .array(osmLayerSchema)\n .min(1)\n .max(4)\n .default(() => {\n return [...defaultOsmLayers];\n }),\n }),\n);\n\nexport const zeroMapsOsmRenderRequestSchema = validateOsmArea(\n osmAreaRequestBaseSchema.extend({\n layers: z\n .array(osmLayerSchema)\n .min(1)\n .max(4)\n .default(() => {\n return [...defaultOsmLayers];\n }),\n width: z.number().int().min(320).max(2_048).default(1_536),\n height: z.number().int().min(240).max(2_048).default(1_024),\n style: osmStyleSchema.default(\"standard\"),\n title: z.string().trim().min(1).max(120).optional(),\n markers: z.array(osmMarkerSchema).max(100).default([]),\n }),\n);\n\nexport type ZeroMapsResponse = z.infer<typeof zeroMapsResponseSchema>;\nexport type ZeroMapsGeocodeRequest = z.infer<\n typeof zeroMapsGeocodeRequestSchema\n>;\nexport type ZeroMapsReverseGeocodeRequest = z.infer<\n typeof zeroMapsReverseGeocodeRequestSchema\n>;\nexport type ZeroMapsDirectionsRequest = z.infer<\n typeof zeroMapsDirectionsRequestSchema\n>;\nexport type ZeroMapsPlacesSearchRequest = z.infer<\n typeof zeroMapsPlacesSearchRequestSchema\n>;\nexport type ZeroMapsPlacesDetailsRequest = z.infer<\n typeof zeroMapsPlacesDetailsRequestSchema\n>;\nexport type ZeroMapsOsmDownloadRequest = z.infer<\n typeof zeroMapsOsmDownloadRequestSchema\n>;\nexport type ZeroMapsOsmRenderRequest = z.infer<\n typeof zeroMapsOsmRenderRequestSchema\n>;\n\nconst mapsResponses = {\n 200: zeroMapsResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nexport const zeroMapsContract = c.router({\n geocode: {\n method: \"POST\",\n path: \"/api/zero/maps/geocode\",\n headers: authHeadersSchema,\n body: zeroMapsGeocodeRequestSchema,\n responses: mapsResponses,\n summary: \"Geocode an address through managed Zero Maps\",\n },\n reverseGeocode: {\n method: \"POST\",\n path: \"/api/zero/maps/reverse-geocode\",\n headers: authHeadersSchema,\n body: zeroMapsReverseGeocodeRequestSchema,\n responses: mapsResponses,\n summary: \"Reverse geocode coordinates through managed Zero Maps\",\n },\n directions: {\n method: \"POST\",\n path: \"/api/zero/maps/directions\",\n headers: authHeadersSchema,\n body: zeroMapsDirectionsRequestSchema,\n responses: mapsResponses,\n summary: \"Compute directions through managed Zero Maps\",\n },\n placesSearch: {\n method: \"POST\",\n path: \"/api/zero/maps/places/search\",\n headers: authHeadersSchema,\n body: zeroMapsPlacesSearchRequestSchema,\n responses: mapsResponses,\n summary: \"Search places through managed Zero Maps\",\n },\n placesDetails: {\n method: \"POST\",\n path: \"/api/zero/maps/places/details\",\n headers: authHeadersSchema,\n body: zeroMapsPlacesDetailsRequestSchema,\n responses: mapsResponses,\n summary: \"Fetch place details through managed Zero Maps\",\n },\n osmDownload: {\n method: \"POST\",\n path: \"/api/zero/maps/osm/download\",\n headers: authHeadersSchema,\n body: zeroMapsOsmDownloadRequestSchema,\n responses: mapsResponses,\n summary: \"Download OpenStreetMap features through managed Zero Maps\",\n },\n osmRender: {\n method: \"POST\",\n path: \"/api/zero/maps/osm/render\",\n headers: authHeadersSchema,\n body: zeroMapsOsmRenderRequestSchema,\n responses: mapsResponses,\n summary: \"Render OpenStreetMap features to PNG through managed Zero Maps\",\n },\n});\n\nexport type ZeroMapsContract = typeof zeroMapsContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const ZERO_WEATHER_ATTRIBUTION =\n \"Source: Includes weather data from Google\";\nexport const ZERO_AIR_QUALITY_ATTRIBUTION =\n \"Source: Includes air quality data from Google\";\n\nconst zeroWeatherConditionsOperationSchema = z.enum([\n \"current\",\n \"forecast.hourly\",\n \"forecast.daily\",\n \"history.hourly\",\n]);\nexport const zeroWeatherOperationSchema = z.enum([\n ...zeroWeatherConditionsOperationSchema.options,\n \"air-quality.current\",\n]);\n\nexport const zeroWeatherUnitsSchema = z.enum([\"metric\", \"imperial\"]);\n\nconst zeroWeatherLocationRequestSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n units: zeroWeatherUnitsSchema.default(\"metric\"),\n languageCode: z.string().trim().min(1).optional(),\n});\n\nconst zeroWeatherHourlyPageRequestSchema =\n zeroWeatherLocationRequestSchema.extend({\n pageSize: z.number().int().min(1).max(24).optional(),\n pageToken: z.string().trim().min(1).optional(),\n });\n\nexport const zeroWeatherCurrentRequestSchema = zeroWeatherLocationRequestSchema;\n\nexport const zeroWeatherForecastHourlyRequestSchema =\n zeroWeatherHourlyPageRequestSchema.extend({\n hours: z.number().int().min(1).max(240).optional(),\n });\n\nexport const zeroWeatherForecastDailyRequestSchema =\n zeroWeatherLocationRequestSchema.extend({\n days: z.number().int().min(1).max(10).optional(),\n pageSize: z.number().int().min(1).max(10).optional(),\n pageToken: z.string().trim().min(1).optional(),\n });\n\nexport const zeroWeatherHistoryHourlyRequestSchema =\n zeroWeatherHourlyPageRequestSchema.extend({\n hours: z.number().int().min(1).max(24).optional(),\n });\n\nexport const zeroAirQualityCurrentRequestSchema = z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n languageCode: z.string().trim().min(1).optional(),\n});\n\nconst zeroWeatherResponseBaseSchema = z.object({\n creditsCharged: z.number(),\n billingCategory: z.string(),\n billingQuantity: z.number(),\n result: z.unknown(),\n});\n\nexport const zeroWeatherConditionsResponseSchema =\n zeroWeatherResponseBaseSchema.extend({\n operation: zeroWeatherConditionsOperationSchema,\n provider: z.literal(\"google-weather\"),\n attribution: z.literal(ZERO_WEATHER_ATTRIBUTION),\n });\n\nexport const zeroAirQualityResponseSchema =\n zeroWeatherResponseBaseSchema.extend({\n operation: z.literal(\"air-quality.current\"),\n provider: z.literal(\"google-air-quality\"),\n attribution: z.literal(ZERO_AIR_QUALITY_ATTRIBUTION),\n });\n\nexport const zeroWeatherResponseSchema = z.discriminatedUnion(\"provider\", [\n zeroWeatherConditionsResponseSchema,\n zeroAirQualityResponseSchema,\n]);\n\nexport type ZeroWeatherResponse = z.infer<typeof zeroWeatherResponseSchema>;\nexport type ZeroWeatherConditionsResponse = z.infer<\n typeof zeroWeatherConditionsResponseSchema\n>;\nexport type ZeroAirQualityResponse = z.infer<\n typeof zeroAirQualityResponseSchema\n>;\nexport type ZeroWeatherCurrentRequest = z.infer<\n typeof zeroWeatherCurrentRequestSchema\n>;\nexport type ZeroWeatherForecastHourlyRequest = z.infer<\n typeof zeroWeatherForecastHourlyRequestSchema\n>;\nexport type ZeroWeatherForecastDailyRequest = z.infer<\n typeof zeroWeatherForecastDailyRequestSchema\n>;\nexport type ZeroWeatherHistoryHourlyRequest = z.infer<\n typeof zeroWeatherHistoryHourlyRequestSchema\n>;\nexport type ZeroAirQualityCurrentRequest = z.infer<\n typeof zeroAirQualityCurrentRequestSchema\n>;\n\nconst weatherResponses = {\n 200: zeroWeatherConditionsResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nconst airQualityResponses = {\n 200: zeroAirQualityResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n} as const;\n\nexport const zeroWeatherContract = c.router({\n current: {\n method: \"POST\",\n path: \"/api/zero/weather/current\",\n headers: authHeadersSchema,\n body: zeroWeatherCurrentRequestSchema,\n responses: weatherResponses,\n summary: \"Get current conditions through managed Zero Weather\",\n },\n forecastHourly: {\n method: \"POST\",\n path: \"/api/zero/weather/forecast/hourly\",\n headers: authHeadersSchema,\n body: zeroWeatherForecastHourlyRequestSchema,\n responses: weatherResponses,\n summary: \"Get an hourly forecast through managed Zero Weather\",\n },\n forecastDaily: {\n method: \"POST\",\n path: \"/api/zero/weather/forecast/daily\",\n headers: authHeadersSchema,\n body: zeroWeatherForecastDailyRequestSchema,\n responses: weatherResponses,\n summary: \"Get a daily forecast through managed Zero Weather\",\n },\n historyHourly: {\n method: \"POST\",\n path: \"/api/zero/weather/history/hourly\",\n headers: authHeadersSchema,\n body: zeroWeatherHistoryHourlyRequestSchema,\n responses: weatherResponses,\n summary: \"Get recent hourly history through managed Zero Weather\",\n },\n airQualityCurrent: {\n method: \"POST\",\n path: \"/api/zero/weather/air-quality/current\",\n headers: authHeadersSchema,\n body: zeroAirQualityCurrentRequestSchema,\n responses: airQualityResponses,\n summary: \"Get current air quality through managed Zero Weather\",\n },\n});\n\nexport type ZeroWeatherContract = typeof zeroWeatherContract;\n","import { z } from \"zod\";\n\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\nimport { zeroBuiltInGenerationAcceptedResponseSchema } from \"./zero-built-in-generation\";\n\nconst c = initContract();\nconst stringOrStringArraySchema = z.union([\n z.string(),\n z.array(z.string()).readonly(),\n]);\n\nexport const zeroVideoIoGenerateRequestSchema = z\n .object({\n prompt: z.string().optional(),\n model: z.string().optional(),\n aspectRatio: z.string().optional(),\n duration: z.string().optional(),\n resolution: z.string().optional(),\n generateAudio: z.boolean().optional(),\n negativePrompt: z.string().optional(),\n seed: z.number().optional(),\n autoFix: z.boolean().optional(),\n safetyTolerance: z.string().optional(),\n imageUrls: stringOrStringArraySchema.optional(),\n videoUrls: stringOrStringArraySchema.optional(),\n audioUrls: stringOrStringArraySchema.optional(),\n referenceImageUrls: stringOrStringArraySchema.optional(),\n referenceVideoUrls: stringOrStringArraySchema.optional(),\n referenceAudioUrls: stringOrStringArraySchema.optional(),\n firstFrameImageUrl: z.string().optional(),\n lastFrameImageUrl: z.string().optional(),\n })\n .passthrough();\n\nexport const zeroVideoIoGenerateResponseSchema = z.object({\n id: z.string(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n url: z.string(),\n durationSeconds: z.number(),\n creditsCharged: z.number(),\n model: z.string(),\n aspectRatio: z.string(),\n duration: z.string(),\n resolution: z.string(),\n generateAudio: z.boolean(),\n sourceUrl: z.string(),\n requestId: z.string().optional(),\n});\n\nexport type ZeroVideoIoGenerateRequest = z.infer<\n typeof zeroVideoIoGenerateRequestSchema\n>;\nexport type ZeroVideoIoGenerateResponse = z.infer<\n typeof zeroVideoIoGenerateResponseSchema\n>;\n\nexport const zeroVideoIoGenerateContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/video-io/generate\",\n headers: authHeadersSchema,\n body: zeroVideoIoGenerateRequestSchema,\n responses: {\n 200: zeroVideoIoGenerateResponseSchema,\n 202: zeroBuiltInGenerationAcceptedResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n 504: apiErrorSchema,\n },\n summary: \"Generate and persist a video file\",\n },\n});\n\nexport type ZeroVideoIoGenerateContract = typeof zeroVideoIoGenerateContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const audioInputQuotaResponseSchema = z.object({\n allowed: z.boolean(),\n count: z.number().int().nonnegative(),\n limit: z.number().int().nonnegative().nullable(),\n});\nexport type AudioInputQuotaResponse = z.infer<\n typeof audioInputQuotaResponseSchema\n>;\n\n/**\n * Zero contract for GET /api/zero/voice-io/quota\n *\n * Returns the current audio input quota state for the authenticated org/user.\n * Used by the platform to drive mic-button gating without firing a doomed STT\n * request when a free-tier user has exhausted their quota.\n */\nexport const zeroVoiceIoQuotaContract = c.router({\n get: {\n method: \"GET\",\n path: \"/api/zero/voice-io/quota\",\n headers: authHeadersSchema,\n responses: {\n 200: audioInputQuotaResponseSchema,\n 401: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Get audio input quota for current org/user\",\n },\n});\n\nexport type ZeroVoiceIoQuotaContract = typeof zeroVoiceIoQuotaContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const zeroVoiceIoSpeechRequestSchema = z\n .object({\n text: z.string().optional(),\n voice: z.string().optional(),\n instructions: z.string().optional(),\n })\n .passthrough();\n\nexport const zeroVoiceIoSpeechResponseSchema = z.object({\n id: z.string(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n url: z.string(),\n durationSeconds: z.number(),\n creditsCharged: z.number(),\n model: z.string(),\n voice: z.string(),\n});\n\nexport type ZeroVoiceIoSpeechRequest = z.infer<\n typeof zeroVoiceIoSpeechRequestSchema\n>;\nexport type ZeroVoiceIoSpeechResponse = z.infer<\n typeof zeroVoiceIoSpeechResponseSchema\n>;\n\nexport const zeroVoiceIoSpeechContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/voice-io/speech\",\n headers: authHeadersSchema,\n body: zeroVoiceIoSpeechRequestSchema,\n responses: {\n 200: zeroVoiceIoSpeechResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n 502: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Generate and persist WAV speech audio\",\n },\n});\n\nexport type ZeroVoiceIoSpeechContract = typeof zeroVoiceIoSpeechContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const zeroVoiceIoSttSegmentSchema = z.object({\n start: z.number(),\n end: z.number(),\n text: z.string(),\n});\n\nexport const zeroVoiceIoSttResponseSchema = z.object({\n text: z.string(),\n segments: z.array(zeroVoiceIoSttSegmentSchema).optional(),\n});\n\nexport const zeroVoiceIoSttQuotaErrorSchema = apiErrorSchema.extend({\n quota: z\n .object({\n count: z.number(),\n limit: z.number().nullable(),\n })\n .optional(),\n});\n\nexport type ZeroVoiceIoSttSegment = z.infer<typeof zeroVoiceIoSttSegmentSchema>;\nexport type ZeroVoiceIoSttResponse = z.infer<\n typeof zeroVoiceIoSttResponseSchema\n>;\n\nexport const zeroVoiceIoSttContract = c.router({\n post: {\n method: \"POST\",\n path: \"/api/zero/voice-io/stt\",\n headers: authHeadersSchema,\n contentType: \"multipart/form-data\",\n body: c.type<FormData>(),\n query: z.object({\n verbose: z.coerce.boolean().optional().default(false),\n }),\n responses: {\n 200: zeroVoiceIoSttResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: zeroVoiceIoSttQuotaErrorSchema,\n 403: apiErrorSchema,\n 429: zeroVoiceIoSttQuotaErrorSchema,\n 500: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Transcribe audio input\",\n },\n});\n\nexport type ZeroVoiceIoSttContract = typeof zeroVoiceIoSttContract;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\n// ---------------------------------------------------------------------------\n// Schemas\n// ---------------------------------------------------------------------------\n\nconst prepareRequestSchema = z.object({\n filename: z.string().min(1).max(255),\n contentType: z.string().min(1).max(200),\n size: z.number().int().nonnegative(),\n /**\n * New clients opt in to applying headers returned with a presigned upload.\n * Older API deployments ignore this field, while newer APIs keep returning\n * legacy object keys to clients that omit it.\n */\n supportsUploadHeaders: z.literal(true).optional(),\n /**\n * New clients request multipart uploads for large files. Older API\n * deployments ignore this unknown field and return the legacy single PUT\n * response, which keeps frontend/backend rolling deploys compatible.\n */\n multipart: z.literal(true).optional(),\n});\n\nconst importImageRequestSchema = z.object({\n url: z.string().url(),\n});\n\nconst uploadMetadataSchema = z.object({\n id: z.string(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n /** Public CDN URL returned to the app after upload succeeds. */\n url: z.string().url(),\n});\n\nconst prepareResponseSchema = uploadMetadataSchema.extend({\n /** Presigned PUT URL — browser uploads the file body here directly. */\n uploadUrl: z.string().url(),\n /** Headers the client must include with the presigned PUT request. */\n uploadHeaders: z.record(z.string(), z.string()).optional(),\n});\n\nconst multipartUploadPartSchema = z.object({\n partNumber: z.number().int().positive(),\n uploadUrl: z.string().url(),\n});\n\nconst multipartPrepareResponseSchema = uploadMetadataSchema.extend({\n multipart: z.object({\n uploadId: z.string().min(1),\n partSize: z.number().int().positive(),\n parts: z.array(multipartUploadPartSchema).min(1),\n }),\n});\n\nconst prepareResultSchema = z.union([\n prepareResponseSchema,\n multipartPrepareResponseSchema,\n]);\n\nconst multipartUploadIdentitySchema = z.object({\n id: z.string().uuid(),\n filename: z.string().min(1).max(255),\n uploadId: z.string().min(1),\n});\n\nconst multipartCompleteRequestSchema = multipartUploadIdentitySchema.extend({\n partCount: z.number().int().min(1).max(1000),\n});\n\nconst multipartResponseSchema = z.object({\n id: z.string().uuid(),\n url: z.string().url(),\n});\n\nconst multipartAbortResponseSchema = z.object({\n id: z.string().uuid(),\n});\n\nconst completeRequestSchema = z.object({\n id: z.string().uuid(),\n contentType: z.string().min(1).max(200).optional(),\n});\n\nconst completeResponseSchema = z.object({\n id: z.string(),\n filename: z.string(),\n contentType: z.string(),\n size: z.number(),\n url: z.string().url(),\n});\n\n// ---------------------------------------------------------------------------\n// Contract\n// ---------------------------------------------------------------------------\n\n/**\n * Zero contract for uploads.\n *\n * `prepare` issues a presigned PUT URL so the browser can send the file body\n * straight to R2, bypassing the Next.js runtime's body-size limits. `complete`\n * confirms the object exists after the PUT and persists run associations when\n * the request is authenticated with a run-scoped zero token.\n */\nexport const zeroUploadsContract = c.router({\n prepare: {\n method: \"POST\",\n path: \"/api/zero/uploads/prepare\",\n headers: authHeadersSchema,\n body: prepareRequestSchema,\n responses: {\n 200: prepareResultSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Prepare a direct-to-R2 upload\",\n },\n completeMultipart: {\n method: \"POST\",\n path: \"/api/zero/uploads/multipart/complete\",\n headers: authHeadersSchema,\n body: multipartCompleteRequestSchema,\n responses: {\n 200: multipartResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Complete a multipart R2 upload\",\n },\n abortMultipart: {\n method: \"POST\",\n path: \"/api/zero/uploads/multipart/abort\",\n headers: authHeadersSchema,\n body: multipartUploadIdentitySchema,\n responses: {\n 200: multipartAbortResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Abort a multipart R2 upload\",\n },\n complete: {\n method: \"POST\",\n path: \"/api/zero/uploads/complete\",\n headers: authHeadersSchema,\n body: completeRequestSchema,\n responses: {\n 200: completeResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 500: apiErrorSchema,\n },\n summary: \"Complete a direct-to-R2 upload\",\n },\n importImage: {\n method: \"POST\",\n path: \"/api/zero/uploads/import-image\",\n headers: authHeadersSchema,\n body: importImageRequestSchema,\n responses: {\n 200: completeResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 402: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 502: apiErrorSchema,\n },\n summary: \"Import a remote image into user artifact storage\",\n },\n});\n\nexport type ZeroUploadsContract = typeof zeroUploadsContract;\n\n// Inferred types\nexport type UploadPrepareResponse = z.infer<typeof prepareResultSchema>;\nexport type UploadCompleteResponse = z.infer<typeof completeResponseSchema>;\nexport type UploadImportImageResponse = z.infer<typeof completeResponseSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nexport const OFFICIAL_TELEGRAM_BOT_ID = \"official\" as const;\n\nconst telegramEnvironmentSchema = z.object({\n requiredSecrets: z.array(z.string()),\n requiredVars: z.array(z.string()),\n missingSecrets: z.array(z.string()),\n missingVars: z.array(z.string()),\n});\n\nconst telegramTokenStatusSchema = z.enum([\"valid\", \"invalid\", \"unknown\"]);\n\nconst telegramConnectedUserSchema = z.object({\n telegramUserId: z.string(),\n telegramUsername: z.string().nullable(),\n telegramDisplayName: z.string().nullable(),\n});\n\nconst telegramBotSchema = z.object({\n id: z.string(),\n kind: z.enum([\"custom\", \"official\"]).optional(),\n username: z.string().nullable(),\n avatarUrl: z.string().nullable(),\n agent: z.object({ id: z.string(), name: z.string() }).nullable(),\n isOwner: z.boolean(),\n isConnected: z.boolean(),\n connectedUser: telegramConnectedUserSchema.nullable().optional(),\n tokenStatus: telegramTokenStatusSchema,\n official: z\n .object({\n configured: z.boolean(),\n usesDefaultAgent: z.boolean(),\n linkedTelegramUserId: z.string().nullable(),\n })\n .optional(),\n});\n\nconst telegramBotStatusSchema = telegramBotSchema.extend({\n domainConfigured: z.boolean(),\n environment: telegramEnvironmentSchema,\n});\n\nconst telegramListResponseSchema = z.object({\n bots: z.array(telegramBotSchema),\n});\n\nconst telegramUpdateBodySchema = z.object({\n defaultAgentId: z.string().trim().min(1).optional(),\n selectedAgentId: z.string().trim().min(1).nullable().optional(),\n});\n\nconst telegramLinkStatusResponseSchema = z.discriminatedUnion(\"linked\", [\n z.object({\n linked: z.literal(true),\n telegramUserId: z.string(),\n botUsername: z.string().optional(),\n }),\n z.object({\n linked: z.literal(false),\n installation: z\n .object({\n id: z.string(),\n botUsername: z.string(),\n loginBotId: z.string().optional(),\n domainConfigured: z.boolean().optional(),\n })\n .optional(),\n }),\n]);\n\nconst telegramConnectSignatureSchema = z.object({\n telegramUserId: z.string().min(1),\n telegramUsername: z.string().max(255).optional(),\n telegramDisplayName: z.string().max(255).optional(),\n timestamp: z.number(),\n signature: z.string().min(1),\n});\n\nconst telegramAuthSchema = z.object({\n id: z.number(),\n first_name: z.string().optional(),\n last_name: z.string().optional(),\n username: z.string().optional(),\n photo_url: z.string().optional(),\n auth_date: z.number(),\n hash: z.string(),\n});\n\nconst telegramLinkBodySchema = z.object({\n telegramBotId: z.string().min(1),\n telegramAuth: telegramAuthSchema.optional(),\n connectSignature: telegramConnectSignatureSchema.optional(),\n});\n\nconst telegramLinkResponseSchema = z.object({\n botUsername: z.string(),\n telegramUserId: z.string(),\n});\n\nconst telegramRegisterBodySchema = z.object({\n botToken: z.string().min(1),\n defaultAgentId: z.string().trim().min(1).optional(),\n reinstallBotId: z.string().min(1).optional(),\n});\n\nconst telegramSetupStatusBodySchema = z.object({\n botToken: z.string().min(1),\n origin: z.string().optional(),\n});\n\nconst telegramSetupStatusSchema = z.object({\n id: z.string(),\n username: z.string().nullable(),\n domainConfigured: z.boolean(),\n privacyDisabled: z.boolean(),\n});\n\nconst telegramWebhookPathParamsSchema = z.object({\n telegramBotId: z.string().min(1),\n});\n\n/**\n * Zero integrations Telegram contract\n * Covers all Telegram integration endpoints.\n *\n * Path note: these endpoints use /api/integrations/ and /api/telegram/ (not /api/zero/)\n * because they are served by the platform app directly, not the Zero sub-application.\n * This is intentional and matches the real server routing.\n */\nexport const zeroIntegrationsTelegramContract = c.router({\n list: {\n method: \"GET\",\n path: \"/api/integrations/telegram\",\n headers: authHeadersSchema,\n responses: {\n 200: telegramListResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"List Telegram bot integrations in the authenticated user's org\",\n },\n updateBot: {\n method: \"PATCH\",\n path: \"/api/integrations/telegram/:botId\",\n headers: authHeadersSchema,\n pathParams: z.object({ botId: z.string().min(1) }),\n body: telegramUpdateBodySchema,\n responses: {\n 200: telegramBotStatusSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Update the default agent for the Telegram bot\",\n },\n disconnect: {\n method: \"DELETE\",\n path: \"/api/integrations/telegram/:botId\",\n headers: authHeadersSchema,\n pathParams: z.object({ botId: z.string().min(1) }),\n body: c.noBody(),\n responses: {\n 204: c.noBody(),\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Uninstall the Telegram bot\",\n },\n unlink: {\n method: \"DELETE\",\n path: \"/api/integrations/telegram/link\",\n headers: authHeadersSchema,\n body: c.noBody(),\n query: z.object({ botId: z.string().optional() }),\n responses: {\n 204: c.noBody(),\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Disconnect the authenticated user's Telegram account link\",\n },\n getLinkStatus: {\n method: \"GET\",\n path: \"/api/integrations/telegram/link\",\n headers: authHeadersSchema,\n query: z.object({\n botId: z.string().optional(),\n origin: z.string().optional(),\n }),\n responses: {\n 200: telegramLinkStatusResponseSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n },\n summary: \"Check if the authenticated user is linked to a Telegram bot\",\n },\n avatar: {\n method: \"GET\",\n path: \"/api/integrations/telegram/:botId/avatar\",\n headers: authHeadersSchema,\n pathParams: z.object({ botId: z.string().min(1) }),\n query: z.object({\n exp: z.string().optional(),\n sig: z.string().optional(),\n }),\n responses: {\n 200: c.otherResponse({\n contentType: \"application/octet-stream\",\n body: z.unknown(),\n }),\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n 413: apiErrorSchema,\n 502: apiErrorSchema,\n },\n summary: \"Proxy a Telegram bot avatar\",\n },\n authCallback: {\n method: \"GET\",\n path: \"/api/integrations/telegram/auth-callback\",\n responses: {\n 200: c.otherResponse({\n contentType: \"text/html\",\n body: z.unknown(),\n }),\n },\n summary: \"Return the Telegram auth callback bridge page\",\n },\n link: {\n method: \"POST\",\n path: \"/api/integrations/telegram/link\",\n headers: authHeadersSchema,\n body: telegramLinkBodySchema,\n responses: {\n 200: telegramLinkResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 409: apiErrorSchema,\n },\n summary: \"Link the authenticated VM0 user to a Telegram user\",\n },\n register: {\n method: \"POST\",\n path: \"/api/telegram/register\",\n headers: authHeadersSchema,\n body: telegramRegisterBodySchema,\n responses: {\n 200: telegramBotStatusSchema,\n 201: telegramBotStatusSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 403: apiErrorSchema,\n 404: apiErrorSchema,\n 409: apiErrorSchema,\n 500: apiErrorSchema,\n 502: apiErrorSchema,\n },\n summary: \"Register a Telegram bot with VM0\",\n },\n setupStatus: {\n method: \"POST\",\n path: \"/api/telegram/setup-status\",\n headers: authHeadersSchema,\n body: telegramSetupStatusBodySchema,\n responses: {\n 200: telegramSetupStatusSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 409: apiErrorSchema,\n },\n summary: \"Check Telegram bot setup state before registration\",\n },\n webhook: {\n method: \"POST\",\n path: \"/api/telegram/webhook/:telegramBotId\",\n pathParams: telegramWebhookPathParamsSchema,\n body: z.unknown(),\n responses: {\n 200: c.otherResponse({\n contentType: \"text/plain\",\n body: z.string(),\n }),\n 400: c.otherResponse({\n contentType: \"text/plain\",\n body: z.string(),\n }),\n 401: c.otherResponse({\n contentType: \"text/plain\",\n body: z.string(),\n }),\n 404: c.otherResponse({\n contentType: \"text/plain\",\n body: z.string(),\n }),\n },\n summary: \"Handle Telegram bot webhook updates\",\n },\n});\n\nexport type ZeroIntegrationsTelegramContract =\n typeof zeroIntegrationsTelegramContract;\nexport type TelegramBot = z.infer<typeof telegramBotSchema>;\nexport type TelegramBotStatus = z.infer<typeof telegramBotStatusSchema>;\nexport type TelegramListResponse = z.infer<typeof telegramListResponseSchema>;\nexport type TelegramLinkStatusResponse = z.infer<\n typeof telegramLinkStatusResponseSchema\n>;\nexport type TelegramSetupStatus = z.infer<typeof telegramSetupStatusSchema>;\n","import { z } from \"zod\";\nimport { authHeadersSchema, initContract } from \"./base\";\nimport { apiErrorSchema } from \"./errors\";\n\nconst c = initContract();\n\nconst agentPhoneConnectBodySchema = z.object({\n phoneHandle: z.string().min(1),\n agentphoneAgentId: z.string().min(1),\n timestamp: z.number(),\n signature: z.string().min(1),\n channel: z.string().min(1).optional(),\n});\n\nconst agentPhoneConnectResponseSchema = z.object({\n phoneHandle: z.string(),\n});\n\nconst agentPhoneWebhookHeadersSchema = z.object({\n \"x-webhook-signature\": z.string().optional(),\n \"x-webhook-timestamp\": z.string().optional(),\n \"x-webhook-event\": z.string().optional(),\n \"x-webhook-id\": z.string().optional(),\n});\n\nconst agentPhoneLinkStatusResponseSchema = z.discriminatedUnion(\"linked\", [\n z.object({\n linked: z.literal(true),\n phoneHandle: z.string(),\n agentPhoneNumber: z.string().nullable(),\n configured: z.boolean(),\n }),\n z.object({\n linked: z.literal(false),\n agentPhoneNumber: z.string().nullable(),\n configured: z.boolean(),\n }),\n]);\n\nconst agentPhoneStartLinkBodySchema = z.object({\n phoneHandle: z.string().min(1),\n});\n\nconst agentPhoneStartLinkResponseSchema = z.object({\n phoneHandle: z.string(),\n verificationSent: z.literal(true),\n});\n\nexport const zeroIntegrationsAgentPhoneContract = c.router({\n connectAgentPhone: {\n method: \"POST\",\n path: \"/api/agentphone/connect\",\n headers: authHeadersSchema,\n body: agentPhoneConnectBodySchema,\n responses: {\n 200: agentPhoneConnectResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 409: apiErrorSchema,\n },\n summary: \"Link the authenticated VM0 user to an AgentPhone phone handle\",\n },\n webhook: {\n method: \"POST\",\n path: \"/api/agentphone/webhook\",\n headers: agentPhoneWebhookHeadersSchema,\n body: c.type<string>(),\n responses: {\n 200: z.string(),\n 400: z.string(),\n 401: z.string(),\n 404: z.string(),\n },\n summary: \"Handle AgentPhone inbound message webhooks\",\n },\n getLinkStatus: {\n method: \"GET\",\n path: \"/api/integrations/agentphone/link\",\n headers: authHeadersSchema,\n responses: {\n 200: agentPhoneLinkStatusResponseSchema,\n 401: apiErrorSchema,\n },\n summary: \"Check the authenticated user's AgentPhone link status\",\n },\n startLink: {\n method: \"POST\",\n path: \"/api/integrations/agentphone/link\",\n headers: authHeadersSchema,\n body: agentPhoneStartLinkBodySchema,\n responses: {\n 200: agentPhoneStartLinkResponseSchema,\n 400: apiErrorSchema,\n 401: apiErrorSchema,\n 429: apiErrorSchema,\n 409: apiErrorSchema,\n 503: apiErrorSchema,\n },\n summary: \"Send a verified AgentPhone connection link by SMS\",\n },\n unlink: {\n method: \"DELETE\",\n path: \"/api/integrations/agentphone/link\",\n headers: authHeadersSchema,\n body: c.noBody(),\n responses: {\n 204: c.noBody(),\n 401: apiErrorSchema,\n 404: apiErrorSchema,\n },\n summary: \"Disconnect the authenticated user's AgentPhone link\",\n },\n});\n\nexport type ZeroIntegrationsAgentPhoneContract =\n typeof zeroIntegrationsAgentPhoneContract;\nexport type AgentPhoneConnectResponse = z.infer<\n typeof agentPhoneConnectResponseSchema\n>;\nexport type AgentPhoneLinkStatusResponse = z.infer<\n typeof agentPhoneLinkStatusResponseSchema\n>;\nexport type AgentPhoneStartLinkResponse = z.infer<\n typeof agentPhoneStartLinkResponseSchema\n>;\n","/**\n * System Image Resolution\n *\n * Handles resolution of system image references to E2B template names:\n * - vm0/claude-code → vm0-claude-code\n * - vm0-* → legacy passthrough (deprecated)\n */\n\n/**\n * System image constants\n */\nexport const SYSTEM_IMAGE_CLAUDE_CODE = \"claude-code\";\nexport const SYSTEM_IMAGES = [SYSTEM_IMAGE_CLAUDE_CODE] as const;\nexport const SYSTEM_VALID_TAGS = [\"latest\"] as const;\n\nexport type SystemValidTag = (typeof SYSTEM_VALID_TAGS)[number];\n\n/**\n * Legacy image aliases that map to base templates.\n * These existed when the `apps` field selected separate image variants.\n * Now that gh CLI is included in the base images, these aliases ensure\n * backward compatibility for already-stored compose versions.\n */\ntype SystemImage = (typeof SYSTEM_IMAGES)[number];\n\nconst IMAGE_ALIASES: Record<string, SystemImage> = {\n \"claude-code-github\": \"claude-code\",\n};\n\n/**\n * Check if a tag is valid for system images\n */\nexport function isValidSystemTag(\n tag: string | undefined,\n): tag is SystemValidTag | undefined {\n return tag === undefined || SYSTEM_VALID_TAGS.includes(tag as SystemValidTag);\n}\n\n/**\n * Resolve a system image reference to E2B template name\n *\n * Conversion rules:\n * - vm0/claude-code → vm0-claude-code\n * - vm0/claude-code:latest → vm0-claude-code\n * - vm0/claude-code-github → vm0-claude-code (legacy alias)\n *\n * Note: :dev tag is no longer supported. Development and production use the\n * same template names but different E2B accounts (controlled by E2B_API_KEY).\n *\n * @throws Error if image name is unknown or tag is not supported\n */\nexport function resolveSystemImageToE2b(\n name: string,\n tag?: string,\n): { e2bTemplate: string; deprecationWarning?: string } {\n // TODO: \"vm0\" is hardcoded as the system org slug. This should be configurable.\n const systemOrgSlug = \"vm0\";\n\n // Resolve legacy aliases (e.g., claude-code-github → claude-code)\n const resolvedName = IMAGE_ALIASES[name] ?? name;\n\n // Validate system image name\n if (!SYSTEM_IMAGES.includes(resolvedName as (typeof SYSTEM_IMAGES)[number])) {\n throw new Error(\n `Unknown system image: ${systemOrgSlug}/${name}. Available: ${SYSTEM_IMAGES.map(\n (img) => {\n return `${systemOrgSlug}/${img}`;\n },\n ).join(\", \")}`,\n );\n }\n\n // Validate tag (only 'latest' or undefined allowed)\n if (!isValidSystemTag(tag)) {\n throw new Error(\n `Invalid tag \":${tag}\" for system image. System images only support: :latest`,\n );\n }\n\n // Convert to E2B template name: vm0-{resolvedName}\n return { e2bTemplate: `${systemOrgSlug}-${resolvedName}` };\n}\n\n/**\n * Check if an image reference is a legacy vm0-* system template\n */\nexport function isLegacySystemTemplate(reference: string): boolean {\n return reference.startsWith(\"vm0-\");\n}\n\n/**\n * Get deprecation warning for legacy system template format\n */\nexport function getLegacySystemTemplateWarning(\n legacyFormat: string,\n): string | undefined {\n if (!isLegacySystemTemplate(legacyFormat)) {\n return undefined;\n }\n\n // Map legacy format to new format\n if (legacyFormat === \"vm0-claude-code\") {\n return `Warning: \"${legacyFormat}\" format is deprecated. Use \"vm0/claude-code\" instead.`;\n }\n if (legacyFormat.startsWith(\"vm0-github-cli\")) {\n return `Warning: \"${legacyFormat}\" is deprecated. GitHub CLI is now included in the base image.`;\n }\n\n // Generic warning for other vm0-* formats\n return `Warning: \"${legacyFormat}\" format is deprecated.`;\n}\n","/**\n * Version ID utilities for image versioning\n *\n * Version IDs are SHA-256 hashes (64 hex characters) stored in the database,\n * but displayed in a shortened form (8 characters) for user-friendliness.\n * Matches artifact/storage version display for consistency.\n * Similar to Docker image digests and Git commit hashes.\n */\n\n/**\n * Full length of version ID (SHA-256 hex)\n */\nexport const VERSION_ID_LENGTH = 64;\n\n/**\n * Display length of version ID (first N characters)\n * Matches artifact/storage display length for consistency\n */\nexport const VERSION_ID_DISPLAY_LENGTH = 8;\n\n/**\n * Minimum prefix length for version ID matching\n * Matches artifact/storage prefix length for consistency\n */\nexport const MIN_VERSION_PREFIX_LENGTH = 8;\n\n/**\n * Format a version ID for display (first 8 characters)\n *\n * @param versionId - Full 64-character version ID\n * @returns Truncated version ID for display\n */\nexport function formatVersionIdForDisplay(versionId: string): string {\n return versionId.slice(0, VERSION_ID_DISPLAY_LENGTH);\n}\n\n/**\n * Check if a string is a valid version ID prefix\n *\n * @param prefix - String to check\n * @returns True if valid hex prefix of sufficient length\n */\nexport function isValidVersionPrefix(prefix: string): boolean {\n return (\n /^[a-f0-9]+$/i.test(prefix) && prefix.length >= MIN_VERSION_PREFIX_LENGTH\n );\n}\n","/**\n * Storage name generation functions for agent instructions and skills.\n * These functions create standardized storage names used across CLI and Web packages.\n */\n\n/**\n * Sentinel userId for organization-owned storages.\n * Organization-owned storages are shared resources within an organization.\n * They use this constant instead of a real userId so the\n * (orgId, userId, name) constraint keeps them unique per organization.\n */\nexport const VOLUME_ORG_USER_ID = \"__org__\";\n\n/**\n * Sentinel orgId for system-level storages (shared across all orgs).\n * Used for official skills that are cached globally, not per-org.\n */\nexport const SYSTEM_ORG_ID = \"__system__\";\n\n/**\n * Generate the storage name for agent instructions.\n * Format: agent-instructions@{agentName}\n *\n * @param agentName - Name of the agent (compose name)\n * @returns Storage name for the instructions\n */\nexport function getInstructionsStorageName(agentName: string): string {\n return `agent-instructions@${agentName}`;\n}\n\n/**\n * Generate the storage name for an agent skill.\n * Format: agent-skills@{fullPath}\n *\n * @param fullPath - Full path from GitHub URL (e.g., \"owner/repo/tree/branch/path\")\n * @returns Storage name for the skill\n */\nexport function getSkillStorageName(fullPath: string): string {\n return `agent-skills@${fullPath}`;\n}\n\n/**\n * Generate the storage name for a custom skill.\n * Format: custom-skill@{skillName}\n *\n * @param skillName - Name of the custom skill (e.g., \"my-skill\")\n * @returns Storage name for the custom skill\n */\nexport function getCustomSkillStorageName(skillName: string): string {\n return `custom-skill@${skillName}`;\n}\n\n/**\n * Generate the storage name for a custom connector skill.\n * The connector id is used so renaming the connector does not orphan storage.\n */\nexport function getCustomConnectorSkillStorageName(\n connectorId: string,\n): string {\n return `custom-connector-skill@${connectorId}`;\n}\n\n/**\n * Generate the framework-visible name for a custom connector skill.\n * Includes connector identity so it cannot collide with builtin/workflow skills.\n */\nexport function getCustomConnectorSkillName(\n connectorSlug: string,\n connectorId: string,\n): string {\n const base = connectorSlug.startsWith(\"_\")\n ? connectorSlug.slice(1)\n : connectorSlug;\n return `custom-${base.slice(0, 48)}-${connectorId.replaceAll(\"-\", \"\").slice(0, 8)}`;\n}\n\n/**\n * Reserved name of the per-user memory storage that Zero auto-injects into\n * every agent run. It is owned by the user and mounted into the sandbox at a\n * framework-specific path.\n */\nexport const MEMORY_ARTIFACT_NAME = \"memory\";\n","/**\n * GitHub URL parsing utilities\n *\n * Provides parsing for GitHub tree URLs used in skills and other resources.\n */\n\nexport interface ParsedGitHubTreeUrl {\n owner: string;\n repo: string;\n branch: string;\n path: string;\n /** Last segment of path (used for mount directory name) */\n skillName: string;\n /** Full path after github.com/ (unique identifier) */\n fullPath: string;\n}\n\n/**\n * Parse a GitHub tree URL into its components\n * Expected format: https://github.com/{owner}/{repo}/tree/{branch}/{path}\n *\n * Note: Branch names containing slashes (e.g., feature/foo) may not parse correctly.\n * The fullPath field is always correct and used for unique storage naming.\n *\n * @param url - GitHub tree URL\n * @returns Parsed URL components, or null if URL format is invalid\n */\nexport function parseGitHubTreeUrl(url: string): ParsedGitHubTreeUrl | null {\n // Normalize: strip trailing slashes for consistent matching\n let normalizedUrl = url;\n while (normalizedUrl.endsWith(\"/\")) {\n normalizedUrl = normalizedUrl.slice(0, -1);\n }\n\n // First, extract the full path after github.com/ (always correct)\n const fullPathMatch = normalizedUrl.match(/^https:\\/\\/github\\.com\\/(.+)$/);\n if (!fullPathMatch) {\n return null;\n }\n const fullPath = fullPathMatch[1]!;\n\n // Parse components (may be incorrect for branches with slashes)\n const regex =\n /^https:\\/\\/github\\.com\\/([^/]+)\\/([^/]+)\\/tree\\/([^/]+)(?:\\/(.+))?$/;\n const match = normalizedUrl.match(regex);\n\n if (!match) {\n return null;\n }\n\n const [, owner, repo, branch, pathPart] = match;\n const resolvedPath = pathPart ?? \"\";\n const pathSegments = resolvedPath.split(\"/\").filter(Boolean);\n const skillName = pathSegments[pathSegments.length - 1] || repo!;\n\n return {\n owner: owner!,\n repo: repo!,\n branch: branch!,\n path: resolvedPath,\n skillName,\n fullPath,\n };\n}\n\n/**\n * Get skill name from path (last segment)\n */\nexport function getSkillNameFromPath(path: string): string {\n const segments = path.split(\"/\").filter(Boolean);\n return segments[segments.length - 1] || path;\n}\n\n/**\n * Parsed GitHub URL supporting multiple formats\n */\nexport interface ParsedGitHubUrl {\n owner: string;\n repo: string;\n /** Branch name, or null if not specified (use default branch) */\n branch: string | null;\n /** Path within repo, or null if root directory */\n path: string | null;\n /** Full path after github.com/ (unique identifier) */\n fullPath: string;\n}\n\n/**\n * Parse any GitHub repository URL into components.\n * Supports multiple URL formats:\n * - https://github.com/owner/repo (plain repo, uses default branch)\n * - https://github.com/owner/repo/tree/branch (root directory with branch)\n * - https://github.com/owner/repo/tree/branch/path (subdirectory)\n *\n * Note: Branch names containing slashes (e.g., feature/foo) may not parse correctly.\n *\n * @param url - GitHub URL\n * @returns Parsed URL components, or null if URL format is invalid\n */\nexport function parseGitHubUrl(url: string): ParsedGitHubUrl | null {\n // Normalize: strip trailing slashes for consistent matching\n let normalizedUrl = url;\n while (normalizedUrl.endsWith(\"/\")) {\n normalizedUrl = normalizedUrl.slice(0, -1);\n }\n\n // Extract full path after github.com/\n const fullPathMatch = normalizedUrl.match(/^https:\\/\\/github\\.com\\/(.+)$/);\n if (!fullPathMatch) {\n return null;\n }\n const fullPath = fullPathMatch[1]!;\n\n // Pattern 1: Plain repo URL (https://github.com/owner/repo)\n const plainMatch = normalizedUrl.match(\n /^https:\\/\\/github\\.com\\/([^/]+)\\/([^/]+)$/,\n );\n if (plainMatch) {\n return {\n owner: plainMatch[1]!,\n repo: plainMatch[2]!,\n branch: null,\n path: null,\n fullPath,\n };\n }\n\n // Pattern 2: Tree URL with optional path\n // https://github.com/owner/repo/tree/branch or https://github.com/owner/repo/tree/branch/path\n const treeMatch = normalizedUrl.match(\n /^https:\\/\\/github\\.com\\/([^/]+)\\/([^/]+)\\/tree\\/([^/]+)(?:\\/(.+))?$/,\n );\n if (treeMatch) {\n return {\n owner: treeMatch[1]!,\n repo: treeMatch[2]!,\n branch: treeMatch[3]!,\n path: treeMatch[4] ?? null,\n fullPath,\n };\n }\n\n return null;\n}\n\n/** Default owner for bare skill name resolution */\nexport const DEFAULT_SKILLS_OWNER = \"vm0-ai\";\n/** Default repository for bare skill name resolution */\nexport const DEFAULT_SKILLS_REPO = \"vm0-skills\";\n/** Default branch for bare skill name resolution */\nexport const DEFAULT_SKILLS_BRANCH = \"main\";\n\n/**\n * Resolve a skill reference to a full GitHub tree URL.\n *\n * Supports two formats:\n * - **Bare name** (no `/` and no `https://`): e.g. `\"slack\"` →\n * `https://github.com/vm0-ai/vm0-skills/tree/main/slack`\n * - **Full GitHub URL**: validated by `parseGitHubUrl()` and returned as-is.\n *\n * @param input - Bare skill name or full GitHub URL\n * @returns Canonical full GitHub URL\n * @throws Error if input is empty or not a valid GitHub URL\n */\nexport function resolveSkillRef(input: string): string {\n const trimmed = input.trim();\n\n if (!trimmed) {\n throw new Error(\"Skill reference cannot be empty\");\n }\n\n // Bare name: no \"/\" and no \"https://\"\n if (!trimmed.includes(\"/\") && !trimmed.startsWith(\"https://\")) {\n return `https://github.com/${DEFAULT_SKILLS_OWNER}/${DEFAULT_SKILLS_REPO}/tree/${DEFAULT_SKILLS_BRANCH}/${trimmed}`;\n }\n\n // Full GitHub URL: validate with flexible parser\n const parsed = parseGitHubUrl(trimmed);\n if (!parsed) {\n throw new Error(\n `Invalid skill URL: ${trimmed}. Expected a bare skill name (e.g. \"slack\") or a GitHub URL (https://github.com/{owner}/{repo}[/tree/{branch}[/path]])`,\n );\n }\n\n // Plain repo URL (no branch): normalize to tree URL with default branch\n if (!parsed.branch) {\n return `https://github.com/${parsed.owner}/${parsed.repo}/tree/${DEFAULT_SKILLS_BRANCH}`;\n }\n\n return trimmed;\n}\n","import { STAFF_ORG_ID_HASHES, fnv1a } from \"./identity-hash\";\n\n/**\n * Hard identity check: is this org one of the vm0 internal staff orgs?\n *\n * Intended as an authorization boundary — unlike feature switches, this\n * helper is NOT influenced by `user_feature_switches` overrides or any\n * runtime toggle. Callers can rely on it as a true yes/no gate for\n * internal-only endpoints.\n *\n * Modifying `STAFF_ORG_ID_HASHES` affects every consumer of this helper;\n * treat the list as a privileged allow-list.\n */\nexport function isStaffOrg(orgId: string | undefined | null): boolean {\n if (!orgId) return false;\n return STAFF_ORG_ID_HASHES.includes(fnv1a(orgId));\n}\n","import { parse as parseYaml } from \"yaml\";\n\n/**\n * Parsed skill frontmatter from SKILL.md\n */\nexport interface SkillFrontmatter {\n name?: string;\n description?: string;\n}\n\n/**\n * Parse frontmatter from SKILL.md content.\n * Extracts YAML between --- markers at the start of the file.\n *\n * @param content - Raw content of SKILL.md file\n * @returns Parsed frontmatter fields\n */\nexport function parseSkillFrontmatter(content: string): SkillFrontmatter {\n const frontmatterMatch = content.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---/);\n if (!frontmatterMatch) {\n return {};\n }\n\n const yamlContent = frontmatterMatch[1];\n if (!yamlContent) {\n return {};\n }\n\n const parsed: unknown = parseYaml(yamlContent);\n\n if (!parsed || typeof parsed !== \"object\") {\n return {};\n }\n\n const data = parsed as Record<string, unknown>;\n\n return {\n name: typeof data.name === \"string\" ? data.name : undefined,\n description:\n typeof data.description === \"string\" ? data.description : undefined,\n };\n}\n","// Legacy HTML comment markers (for backward-compatible stripping)\nconst LEGACY_PROFILE_START = \"<!-- ZERO_PROFILE\";\nconst LEGACY_PROFILE_END = \"ZERO_PROFILE -->\";\n\n// New plain-text markers visible to the agent at runtime\nconst PROFILE_START = \"[AGENT_PROFILE]\";\nconst PROFILE_END = \"[/AGENT_PROFILE]\";\n\n/**\n * Remove all profile blocks (both legacy HTML comment and new plain-text\n * markers) from content in O(n) time.\n */\nfunction stripMarkerBlocks(\n content: string,\n startMarker: string,\n endMarker: string,\n): string {\n let result = \"\";\n let searchFrom = 0;\n\n while (searchFrom < content.length) {\n const startIdx = content.indexOf(startMarker + \"\\n\", searchFrom);\n if (startIdx === -1) {\n result += content.slice(searchFrom);\n break;\n }\n\n result += content.slice(searchFrom, startIdx);\n\n const endIdx = content.indexOf(\n endMarker,\n startIdx + startMarker.length + 1,\n );\n if (endIdx === -1) {\n // No closing marker — keep the rest as-is\n result += content.slice(startIdx);\n break;\n }\n\n // Skip past the end marker and optional trailing newline\n let afterEnd = endIdx + endMarker.length;\n if (content[afterEnd] === \"\\n\") {\n afterEnd++;\n }\n searchFrom = afterEnd;\n }\n\n return result;\n}\n\nfunction stripProfileBlocks(content: string): string {\n // Strip both legacy and new format\n const withoutLegacy = stripMarkerBlocks(\n content,\n LEGACY_PROFILE_START,\n LEGACY_PROFILE_END,\n );\n return stripMarkerBlocks(withoutLegacy, PROFILE_START, PROFILE_END);\n}\n\n/** Keys used by the legacy YAML frontmatter format. */\nconst LEGACY_METADATA_KEYS = new Set([\"name\", \"tone\"]);\n\n/**\n * Strip legacy `---` YAML frontmatter that only contains our metadata keys\n * (name, tone). If user-defined keys exist, only our keys are removed.\n */\nfunction stripLegacyFrontmatter(content: string): string {\n const match = content.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---(\\r?\\n|$)/);\n if (!match) {\n return content;\n }\n const rawYaml = match[1] ?? \"\";\n const body = content.slice(match[0].length);\n\n const remaining = rawYaml\n .split(\"\\n\")\n .filter((line) => {\n const key = line.split(\":\")[0]?.trim();\n return !key || !LEGACY_METADATA_KEYS.has(key);\n })\n .join(\"\\n\")\n .trim();\n\n if (!remaining) {\n return body.replace(/^\\n/, \"\");\n }\n return `---\\n${remaining}\\n---${body}`;\n}\n\n/**\n * Strip the profile block (and legacy YAML frontmatter) from\n * instructions content for display in the editor.\n *\n * Kept for transition: existing S3 archives may still have baked-in\n * `[AGENT_PROFILE]` blocks from before metadata was moved to the\n * `zero_agents` table. Once all instructions have been re-uploaded\n * without the block, this function can be removed entirely.\n */\nexport function stripMetadataFrontmatter(content: string): string {\n return stripProfileBlocks(stripLegacyFrontmatter(content)).trim();\n}\n","/**\n * Returns the GMT offset string for an IANA timezone at the current instant\n * (e.g. \"GMT+05:30\"). Called at render time so DST transitions are reflected\n * correctly without stale cached values.\n */\nexport function getGmtOffset(iana: string): string {\n const parts = new Intl.DateTimeFormat(\"en\", {\n timeZone: iana,\n timeZoneName: \"longOffset\",\n }).formatToParts(new Date());\n return (\n parts.find((p) => {\n return p.type === \"timeZoneName\";\n })?.value ?? \"GMT+00:00\"\n );\n}\n\nconst EXPLICIT_OFFSET_RE = /(?:[zZ]|[+-]\\d{2}:?\\d{2})$/u;\nconst LOCAL_DATE_TIME_RE =\n /^(\\d{4})-(\\d{2})-(\\d{2})[T ](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{1,3}))?)?$/u;\nconst MINUTE_MS = 60_000;\nconst HOUR_MS = 60 * MINUTE_MS;\n\nexport type ScheduledAtTimeParseErrorCode =\n | \"invalid-at-time\"\n | \"invalid-timezone\"\n | \"nonexistent-local-time\"\n | \"ambiguous-local-time\";\n\nexport type ScheduledAtTimeParseResult =\n | {\n readonly ok: true;\n readonly date: Date;\n readonly hasExplicitOffset: boolean;\n }\n | {\n readonly ok: false;\n readonly code: ScheduledAtTimeParseErrorCode;\n readonly message: string;\n };\n\ninterface WallTimeParts {\n readonly year: number;\n readonly month: number;\n readonly day: number;\n readonly hour: number;\n readonly minute: number;\n readonly second: number;\n readonly millisecond: number;\n}\n\nexport function hasExplicitDateTimeOffset(input: string): boolean {\n return EXPLICIT_OFFSET_RE.test(input.trim());\n}\n\nexport function isValidTimeZone(input: string): boolean {\n try {\n new Intl.DateTimeFormat(undefined, { timeZone: input });\n return true;\n } catch {\n return false;\n }\n}\n\nfunction datePart(parts: Intl.DateTimeFormatPart[], type: string): string {\n return (\n parts.find((part) => {\n return part.type === type;\n })?.value ?? \"0\"\n );\n}\n\nfunction wallTimePartsInTimezone(\n timezone: string,\n instantMs: number,\n): WallTimeParts {\n const parts = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hourCycle: \"h23\",\n timeZone: timezone,\n }).formatToParts(new Date(instantMs));\n return {\n year: Number(datePart(parts, \"year\")),\n month: Number(datePart(parts, \"month\")),\n day: Number(datePart(parts, \"day\")),\n hour: Number(datePart(parts, \"hour\")),\n minute: Number(datePart(parts, \"minute\")),\n second: Number(datePart(parts, \"second\")),\n millisecond: new Date(instantMs).getUTCMilliseconds(),\n };\n}\n\nfunction timezoneOffsetMinutes(timezone: string, instantMs: number): number {\n const parts = wallTimePartsInTimezone(timezone, instantMs);\n const wallTimeAsUtc = Date.UTC(\n parts.year,\n parts.month - 1,\n parts.day,\n parts.hour,\n parts.minute,\n parts.second,\n parts.millisecond,\n );\n return (wallTimeAsUtc - instantMs) / MINUTE_MS;\n}\n\nfunction parseLocalDateTime(input: string): WallTimeParts | null {\n const match = LOCAL_DATE_TIME_RE.exec(input.trim());\n if (!match) {\n return null;\n }\n const [, year, month, day, hour, minute, second, millisecond] = match;\n if (\n year === undefined ||\n month === undefined ||\n day === undefined ||\n hour === undefined ||\n minute === undefined\n ) {\n return null;\n }\n const parts = {\n year: Number(year),\n month: Number(month),\n day: Number(day),\n hour: Number(hour),\n minute: Number(minute),\n second: second === undefined ? 0 : Number(second),\n millisecond:\n millisecond === undefined ? 0 : Number(millisecond.padEnd(3, \"0\")),\n };\n const normalized = new Date(\n Date.UTC(\n parts.year,\n parts.month - 1,\n parts.day,\n parts.hour,\n parts.minute,\n parts.second,\n parts.millisecond,\n ),\n );\n if (\n normalized.getUTCFullYear() !== parts.year ||\n normalized.getUTCMonth() + 1 !== parts.month ||\n normalized.getUTCDate() !== parts.day ||\n normalized.getUTCHours() !== parts.hour ||\n normalized.getUTCMinutes() !== parts.minute ||\n normalized.getUTCSeconds() !== parts.second ||\n normalized.getUTCMilliseconds() !== parts.millisecond\n ) {\n return null;\n }\n return parts;\n}\n\nfunction wallTimeMatches(\n timezone: string,\n instantMs: number,\n expected: WallTimeParts,\n): boolean {\n const actual = wallTimePartsInTimezone(timezone, instantMs);\n return (\n actual.year === expected.year &&\n actual.month === expected.month &&\n actual.day === expected.day &&\n actual.hour === expected.hour &&\n actual.minute === expected.minute &&\n actual.second === expected.second &&\n actual.millisecond === expected.millisecond\n );\n}\n\nfunction zonedWallTimeCandidates(\n timezone: string,\n wallTime: WallTimeParts,\n): readonly Date[] {\n const wallTimeAsUtc = Date.UTC(\n wallTime.year,\n wallTime.month - 1,\n wallTime.day,\n wallTime.hour,\n wallTime.minute,\n wallTime.second,\n wallTime.millisecond,\n );\n const offsets = new Set<number>();\n for (const hourDelta of [-48, -36, -24, -12, -6, 0, 6, 12, 24, 36, 48]) {\n offsets.add(\n timezoneOffsetMinutes(timezone, wallTimeAsUtc + hourDelta * HOUR_MS),\n );\n }\n const candidateTimes = new Set<number>();\n for (const offset of offsets) {\n const candidateMs = wallTimeAsUtc - offset * MINUTE_MS;\n if (wallTimeMatches(timezone, candidateMs, wallTime)) {\n candidateTimes.add(candidateMs);\n }\n }\n return [...candidateTimes]\n .sort((a, b) => {\n return a - b;\n })\n .map((ms) => {\n return new Date(ms);\n });\n}\n\nexport function parseScheduledAtTime(\n input: string,\n timezone: string,\n): ScheduledAtTimeParseResult {\n const value = input.trim();\n if (!isValidTimeZone(timezone)) {\n return {\n ok: false,\n code: \"invalid-timezone\",\n message: `Invalid timezone: ${timezone}`,\n };\n }\n if (hasExplicitDateTimeOffset(value)) {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return {\n ok: false,\n code: \"invalid-at-time\",\n message: `Invalid atTime: ${input}`,\n };\n }\n return { ok: true, date, hasExplicitOffset: true };\n }\n\n const wallTime = parseLocalDateTime(value);\n if (wallTime === null) {\n return {\n ok: false,\n code: \"invalid-at-time\",\n message:\n \"Invalid atTime: use an ISO datetime with Z/offset, or pass a local ISO datetime with timezone\",\n };\n }\n\n const candidates = zonedWallTimeCandidates(timezone, wallTime);\n if (candidates.length === 0) {\n return {\n ok: false,\n code: \"nonexistent-local-time\",\n message: `Invalid atTime: ${input} does not exist in ${timezone}`,\n };\n }\n if (candidates.length > 1) {\n return {\n ok: false,\n code: \"ambiguous-local-time\",\n message: `Invalid atTime: ${input} is ambiguous in ${timezone}; include Z or an explicit offset`,\n };\n }\n return { ok: true, date: candidates[0]!, hasExplicitOffset: false };\n}\n","const SERIALIZED_VALUE_MAX_DEPTH = 32;\nconst SERIALIZED_OBJECT_MAX_ENTRIES = 64;\nconst SERIALIZED_VALUE_MAX_NODES = 1024;\nconst SERIALIZED_STRING_MAX_LENGTH = 4096;\nconst CIRCULAR_MARKER = \"[Circular]\";\nconst TRUNCATED_MARKER = \"[Truncated]\";\nconst UNREADABLE_MARKER = \"[Unreadable]\";\n\ninterface SerializationState {\n readonly seen: WeakSet<object>;\n nodes: number;\n}\n\ninterface BoundedEntries {\n readonly entries: readonly [string, unknown][];\n readonly truncated: boolean;\n}\n\nfunction hasOwnSerializedField(\n value: Record<string, unknown>,\n key: string,\n): boolean {\n return Object.prototype.hasOwnProperty.call(value, key);\n}\n\nfunction setSerializedField(\n value: Record<string, unknown>,\n key: string,\n child: unknown,\n): void {\n Object.defineProperty(value, key, {\n value: child,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n}\n\n/**\n * Extract message string from log arguments.\n */\nexport function formatMessage(args: unknown[]): string {\n if (args.length === 0) return \"\";\n if (typeof args[0] === \"string\") return args[0];\n if (args[0] instanceof Error) {\n const message = safeReadValue(() => {\n return args[0] instanceof Error ? args[0].message : undefined;\n });\n return typeof message === \"string\" ? message : UNREADABLE_MARKER;\n }\n return safeString(args[0]);\n}\n\n/**\n * Serialize an Error instance into a plain object. Error's built-in\n * properties (name, message, stack, cause) are non-enumerable, so spreading\n * an Error loses them. This explicitly copies them plus any additional\n * enumerable own properties (e.g. code, statusCode on custom errors).\n */\nfunction serializeErrorWithSeen(\n err: Error,\n state: SerializationState,\n depth: number,\n): Record<string, unknown> {\n const name = safeReadValue(() => {\n return err.name;\n });\n const message = safeReadValue(() => {\n return err.message;\n });\n const serialized: Record<string, unknown> = {\n name: typeof name === \"string\" ? name : \"Error\",\n message:\n typeof message === \"string\"\n ? serializeStringValue(message)\n : UNREADABLE_MARKER,\n };\n state.seen.add(err);\n const stack = safeReadValue(() => {\n return err.stack;\n });\n if (stack !== undefined) {\n setSerializedField(\n serialized,\n \"stack\",\n typeof stack === \"string\"\n ? serializeStringValue(stack)\n : serializeErrorValue(stack, state, depth + 1),\n );\n }\n const cause = safeReadValue(() => {\n return err.cause;\n });\n if (cause !== undefined) {\n setSerializedField(\n serialized,\n \"cause\",\n serializeErrorValue(cause, state, depth + 1),\n );\n }\n const result = safeOwnEnumerableEntries(err);\n if (!result) {\n serialized.__unreadable = true;\n return serialized;\n }\n for (const [key, value] of result.entries) {\n if (!hasOwnSerializedField(serialized, key)) {\n setSerializedField(\n serialized,\n key,\n serializeErrorValue(value, state, depth + 1),\n );\n }\n }\n if (result.truncated) {\n setSerializedField(serialized, \"__truncated\", true);\n }\n return serialized;\n}\n\nexport function serializeError(err: unknown): Record<string, unknown> {\n const state: SerializationState = { seen: new WeakSet<object>(), nodes: 0 };\n if (err instanceof Error) {\n reserveSerializedNode(state);\n return serializeErrorWithSeen(err, state, 0);\n }\n return { value: serializeErrorValue(err, state, 0) };\n}\n\nfunction safeReadValue(read: () => unknown): unknown {\n try {\n return read();\n } catch {\n return UNREADABLE_MARKER;\n }\n}\n\nfunction safeOwnEnumerableEntries(value: object): BoundedEntries | null {\n const entries: [string, unknown][] = [];\n try {\n for (const key in value) {\n if (!Object.prototype.hasOwnProperty.call(value, key)) {\n continue;\n }\n if (!Object.prototype.propertyIsEnumerable.call(value, key)) {\n continue;\n }\n if (entries.length >= SERIALIZED_OBJECT_MAX_ENTRIES) {\n return { entries, truncated: true };\n }\n const child = safeReadValue(() => {\n return (value as Record<string, unknown>)[key];\n });\n entries.push([key, child]);\n }\n } catch {\n return null;\n }\n return { entries, truncated: false };\n}\n\nfunction safeString(value: unknown): string {\n const result = safeReadValue(() => {\n return String(value);\n });\n return typeof result === \"string\" ? result : UNREADABLE_MARKER;\n}\n\nfunction serializeStringValue(value: string): string {\n if (value.length <= SERIALIZED_STRING_MAX_LENGTH) {\n return value;\n }\n return `${value.slice(0, SERIALIZED_STRING_MAX_LENGTH - 3)}...`;\n}\n\nfunction serializeFunctionValue(value: { readonly name: string }): string {\n const name = safeReadValue(() => {\n return value.name;\n });\n return typeof name === \"string\" && name\n ? serializeStringValue(`[Function ${name}]`)\n : \"[Function]\";\n}\n\nfunction serializeNonObjectValue(value: unknown): unknown {\n if (typeof value === \"string\") {\n return serializeStringValue(value);\n }\n if (typeof value === \"bigint\" || typeof value === \"symbol\") {\n return serializeStringValue(safeString(value));\n }\n if (typeof value === \"function\") {\n return serializeFunctionValue(value);\n }\n return value;\n}\n\nfunction isObjectValue(value: unknown): value is object {\n return value !== null && typeof value === \"object\";\n}\n\nfunction serializeDateValue(value: Date): unknown {\n const time = safeReadValue(() => {\n return value.getTime();\n });\n if (typeof time !== \"number\" || Number.isNaN(time)) {\n return serializeStringValue(safeString(value));\n }\n const iso = safeReadValue(() => {\n return value.toISOString();\n });\n return typeof iso === \"string\" ? iso : UNREADABLE_MARKER;\n}\n\nfunction serializeArrayValue(\n value: readonly unknown[],\n state: SerializationState,\n depth: number,\n): unknown {\n const result = safeOwnEnumerableEntries(value);\n if (!result) {\n return UNREADABLE_MARKER;\n }\n const items = result.entries.map((item) => {\n const [, child] = item;\n return serializeErrorValue(child, state, depth + 1);\n });\n if (result.truncated) {\n items.push(TRUNCATED_MARKER);\n }\n return items;\n}\n\nfunction serializePlainObjectValue(\n value: object,\n state: SerializationState,\n depth: number,\n): unknown {\n const result = safeOwnEnumerableEntries(value);\n if (!result) {\n return UNREADABLE_MARKER;\n }\n const serialized: Record<string, unknown> = {};\n for (const [key, child] of result.entries) {\n setSerializedField(\n serialized,\n key,\n serializeErrorValue(child, state, depth + 1),\n );\n }\n if (result.truncated) {\n setSerializedField(serialized, \"__truncated\", true);\n }\n return serialized;\n}\n\nfunction reserveSerializedNode(state: SerializationState): boolean {\n if (state.nodes >= SERIALIZED_VALUE_MAX_NODES) {\n return false;\n }\n state.nodes += 1;\n return true;\n}\n\nfunction serializeErrorValue(\n value: unknown,\n state: SerializationState,\n depth: number,\n): unknown {\n if (!reserveSerializedNode(state)) {\n return TRUNCATED_MARKER;\n }\n if (!isObjectValue(value)) {\n return serializeNonObjectValue(value);\n }\n if (state.seen.has(value)) {\n return CIRCULAR_MARKER;\n }\n if (depth > SERIALIZED_VALUE_MAX_DEPTH) {\n return TRUNCATED_MARKER;\n }\n if (value instanceof Error) {\n return serializeErrorWithSeen(value, state, depth);\n }\n if (value instanceof Date) {\n return serializeDateValue(value);\n }\n if (value instanceof RegExp) {\n return serializeStringValue(safeString(value));\n }\n\n state.seen.add(value);\n if (Array.isArray(value)) {\n return serializeArrayValue(value, state, depth);\n }\n return serializePlainObjectValue(value, state, depth);\n}\n\n/**\n * Extract structured fields from log arguments.\n * If second argument is an object, use it as fields.\n * If second argument is an Error, wrap it under `error` with non-enumerable\n * properties (name/message/stack/cause) explicitly serialized.\n * Otherwise, wrap remaining arguments in an 'args' field.\n */\nexport function extractFields(args: unknown[]): Record<string, unknown> {\n if (args.length <= 1) {\n if (args.length === 1 && args[0] instanceof Error) {\n return { error: serializeError(args[0]) };\n }\n return {};\n }\n const fields = args.slice(1);\n if (\n fields.length === 1 &&\n typeof fields[0] === \"object\" &&\n fields[0] !== null\n ) {\n const value = fields[0];\n if (value instanceof Error) {\n return { error: serializeError(value) };\n }\n return value as Record<string, unknown>;\n }\n return { args: fields };\n}\n","import { stringify as stringifyYaml } from \"yaml\";\n\n/**\n * Synthesize the SKILL.md written to a server-managed skill volume.\n *\n * The DB is the single source of truth: name, description, and instruction are\n * composed into generated frontmatter plus the user-authored instruction body.\n */\nexport function synthesizeSkillMd(args: {\n readonly name: string;\n readonly description: string | null;\n readonly instruction: string | null;\n}): string {\n const frontmatter = stringifyYaml({\n name: args.name,\n // Claude Code requires a description; fall back to the slug.\n description: args.description ?? args.name,\n }).trimEnd();\n const body = (args.instruction ?? \"\").trim();\n return body.length > 0\n ? `---\\n${frontmatter}\\n---\\n\\n${body}\\n`\n : `---\\n${frontmatter}\\n---\\n`;\n}\n\nexport function synthesizeWorkflowSkillMd(args: {\n readonly name: string;\n readonly description: string | null;\n readonly instruction: string | null;\n}): string {\n return synthesizeSkillMd(args);\n}\n\n/**\n * Extract the instruction body from an existing SKILL.md by stripping a leading\n * YAML frontmatter block. Used to backfill the `instruction` column from\n * volumes authored before the DB became the source of truth.\n */\nexport function extractInstructionFromSkillMd(content: string): string {\n const match = content.match(/^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/);\n const body = match ? content.slice(match[0].length) : content;\n return body.trim();\n}\n","/**\n * Event parser for Claude Code JSONL events\n * Converts raw JSONL events into simplified, user-friendly format\n *\n * Note: VM0 lifecycle events (vm0_start, vm0_result, vm0_error) are no longer\n * sent as events. Instead, run state is returned in the events API response.\n */\n\nexport interface ParsedEvent {\n type: \"init\" | \"text\" | \"tool_use\" | \"tool_result\" | \"result\";\n timestamp: Date;\n data: Record<string, unknown>;\n}\n\ninterface SystemEvent {\n type: \"system\";\n subtype: string;\n cwd?: string;\n session_id: string;\n tools: string[];\n model: string;\n}\n\ninterface AssistantEvent {\n type: \"assistant\";\n message: {\n role: \"assistant\";\n content: Array<{\n type: string;\n text?: string;\n id?: string;\n name?: string;\n input?: Record<string, unknown>;\n }>;\n usage?: Record<string, unknown>;\n };\n session_id: string;\n}\n\ninterface UserEvent {\n type: \"user\";\n message: {\n role: \"user\";\n content: Array<{\n type: string;\n tool_use_id?: string;\n content?: string;\n is_error?: boolean;\n }>;\n };\n session_id: string;\n}\n\ninterface ResultEvent {\n type: \"result\";\n subtype: string;\n is_error: boolean;\n duration_ms: number;\n num_turns: number;\n result: string;\n session_id: string;\n total_cost_usd: number;\n usage: Record<string, unknown>;\n}\n\ntype RawEvent =\n | SystemEvent\n | AssistantEvent\n | UserEvent\n | ResultEvent\n | Record<string, unknown>;\n\nexport class ClaudeEventParser {\n /**\n * Parse a raw Claude Code JSONL event into a simplified format\n * Returns null if the event type is unknown or malformed\n */\n static parse(rawEvent: RawEvent): ParsedEvent | null {\n if (!rawEvent || typeof rawEvent !== \"object\" || !(\"type\" in rawEvent)) {\n return null;\n }\n\n switch (rawEvent.type) {\n case \"system\":\n return this.parseSystemEvent(rawEvent as SystemEvent);\n\n case \"assistant\":\n return this.parseAssistantMessage(rawEvent as AssistantEvent);\n\n case \"user\":\n return this.parseUserMessage(rawEvent as UserEvent);\n\n case \"result\":\n return this.parseResultEvent(rawEvent as ResultEvent);\n\n default:\n return null;\n }\n }\n\n private static parseSystemEvent(event: SystemEvent): ParsedEvent | null {\n if (event.subtype !== \"init\") {\n return null;\n }\n\n return {\n type: \"init\",\n timestamp: new Date(),\n data: {\n framework: \"claude-code\",\n sessionId: event.session_id,\n model: event.model,\n tools: event.tools,\n ...(event.cwd && { cwd: event.cwd }),\n },\n };\n }\n\n private static parseAssistantMessage(\n event: AssistantEvent,\n ): ParsedEvent | null {\n if (!event.message?.content || event.message.content.length === 0) {\n return null;\n }\n\n const content = event.message.content[0];\n\n if (!content) {\n return null;\n }\n\n if (content.type === \"text\") {\n return {\n type: \"text\",\n timestamp: new Date(),\n data: { text: content.text },\n };\n }\n\n if (content.type === \"tool_use\") {\n return {\n type: \"tool_use\",\n timestamp: new Date(),\n data: {\n tool: content.name,\n toolUseId: content.id,\n input: content.input || {},\n },\n };\n }\n\n return null;\n }\n\n private static parseUserMessage(event: UserEvent): ParsedEvent | null {\n if (!event.message?.content || event.message.content.length === 0) {\n return null;\n }\n\n const content = event.message.content[0];\n\n if (!content) {\n return null;\n }\n\n if (content.type === \"tool_result\") {\n return {\n type: \"tool_result\",\n timestamp: new Date(),\n data: {\n toolUseId: content.tool_use_id,\n result: content.content,\n isError: content.is_error || false,\n },\n };\n }\n\n return null;\n }\n\n private static parseResultEvent(event: ResultEvent): ParsedEvent | null {\n return {\n type: \"result\",\n timestamp: new Date(),\n data: {\n success: !event.is_error,\n result: event.result,\n durationMs: event.duration_ms,\n numTurns: event.num_turns,\n cost: event.total_cost_usd,\n usage: event.usage,\n },\n };\n }\n}\n","/**\n * Event parser for OpenAI Codex CLI JSONL events.\n *\n * The parser accepts both legacy `codex exec --json` events and the\n * Codex-style compatibility events produced by the vm0 guest-agent app-server\n * adapter. It deliberately does not consume raw app-server JSON-RPC\n * notifications.\n */\n\nimport type { ParsedEvent } from \"./claude-event-parser\";\n\ntype JsonRecord = Record<string, unknown>;\n\nconst MAX_FORMATTED_ARRAY_ITEMS = 6;\nconst MAX_FORMATTED_ARRAY_DEPTH = 4;\nconst MAX_FORMATTED_OBJECT_FIELDS = 8;\nconst MAX_FORMATTED_OBJECT_INSPECTED_FIELDS = 16;\nconst MAX_FORMATTED_TEXT_LENGTH = 240;\nconst MAX_ERROR_SIGNAL_DEPTH = 8;\nconst MAX_FORMATTED_PLAN_STEPS = 20;\nconst MAX_FORMATTED_FILE_CHANGES = 20;\n\nfunction asRecord(value: unknown): JsonRecord | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n return value as JsonRecord;\n}\n\nfunction hasOwnKey(record: JsonRecord, key: string): boolean {\n return Object.prototype.hasOwnProperty.call(record, key);\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === \"string\" ? value : undefined;\n}\n\nfunction nonEmptyStringValue(value: unknown): string | undefined {\n const valueString = stringValue(value);\n return valueString && valueString.length > 0 ? valueString : undefined;\n}\n\nfunction trimmedStringValue(value: unknown): string | undefined {\n const valueString = stringValue(value)?.trim();\n return valueString && valueString.length > 0 ? valueString : undefined;\n}\n\nfunction numberValue(value: unknown): number | undefined {\n return typeof value === \"number\" && Number.isFinite(value)\n ? value\n : undefined;\n}\n\nfunction getFirstString(\n record: JsonRecord,\n keys: readonly string[],\n): string | undefined {\n for (const key of keys) {\n const value = trimmedStringValue(record[key]);\n if (value) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction getFirstNumber(\n record: JsonRecord,\n keys: readonly string[],\n): number | undefined {\n for (const key of keys) {\n const value = numberValue(record[key]);\n if (value !== undefined) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction truncate(text: string): string {\n if (text.length <= MAX_FORMATTED_TEXT_LENGTH) {\n return text;\n }\n return `${text.slice(0, MAX_FORMATTED_TEXT_LENGTH - 3)}...`;\n}\n\nfunction formatScalar(value: unknown): string | undefined {\n if (value === null) {\n return \"null\";\n }\n if (typeof value === \"string\") {\n return value.trim().length > 0 ? truncate(value) : undefined;\n }\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return truncate(String(value));\n }\n return undefined;\n}\n\nfunction hasSignalValue(value: unknown, depth = 0): boolean {\n if (value === null || value === undefined || value === false) {\n return false;\n }\n\n if (typeof value === \"string\") {\n return value.trim().length > 0;\n }\n\n if (typeof value === \"number\") {\n return Number.isFinite(value);\n }\n\n if (typeof value === \"boolean\") {\n return true;\n }\n\n if (depth >= MAX_ERROR_SIGNAL_DEPTH) {\n return false;\n }\n\n if (Array.isArray(value)) {\n if (depth >= MAX_FORMATTED_ARRAY_DEPTH) {\n return false;\n }\n\n return value.slice(0, MAX_FORMATTED_ARRAY_ITEMS).some((item) => {\n return hasSignalValue(item, depth + 1);\n });\n }\n\n const record = asRecord(value);\n if (!record) {\n return false;\n }\n\n let inspectedFields = 0;\n for (const key in record) {\n if (!hasOwnKey(record, key)) {\n continue;\n }\n if (inspectedFields >= MAX_FORMATTED_OBJECT_INSPECTED_FIELDS) {\n return false;\n }\n inspectedFields += 1;\n if (hasSignalValue(record[key], depth + 1)) {\n return true;\n }\n }\n return false;\n}\n\nfunction formatUnknownValue(value: unknown, depth = 0): string | undefined {\n const scalar = formatScalar(value);\n if (scalar !== undefined) {\n return scalar;\n }\n\n if (Array.isArray(value)) {\n if (depth >= MAX_FORMATTED_ARRAY_DEPTH) {\n return \"...\";\n }\n\n const items = value\n .slice(0, MAX_FORMATTED_ARRAY_ITEMS)\n .map((item) => {\n return formatUnknownValue(item, depth + 1);\n })\n .filter((item): item is string => {\n return item !== undefined && item.length > 0;\n });\n if (items.length === 0) {\n return undefined;\n }\n const suffix = value.length > MAX_FORMATTED_ARRAY_ITEMS ? \", ...\" : \"\";\n return `[${items.join(\", \")}${suffix}]`;\n }\n\n const record = asRecord(value);\n if (!record || depth > 0) {\n return undefined;\n }\n\n const fields: string[] = [];\n let inspectedFields = 0;\n for (const key in record) {\n if (!hasOwnKey(record, key)) {\n continue;\n }\n if (\n fields.length >= MAX_FORMATTED_OBJECT_FIELDS ||\n inspectedFields >= MAX_FORMATTED_OBJECT_INSPECTED_FIELDS\n ) {\n fields.push(\"...\");\n break;\n }\n inspectedFields += 1;\n const fieldValue = record[key];\n const formatted = formatUnknownValue(fieldValue, depth + 1);\n if (formatted !== undefined) {\n fields.push(`${key}=${formatted}`);\n }\n }\n return fields.length > 0 ? `{${fields.join(\", \")}}` : undefined;\n}\n\nfunction formatSignalValue(\n value: unknown,\n includeBoundedPlaceholder = false,\n): string | undefined {\n if (value === null || value === undefined || value === false) {\n return undefined;\n }\n const formatted = formatUnknownValue(value);\n if (!formatted) {\n return undefined;\n }\n if (hasSignalValue(value)) {\n return formatted;\n }\n return includeBoundedPlaceholder && formatted.includes(\"...\")\n ? formatted\n : undefined;\n}\n\nfunction combineDistinctMessages(\n first: string | undefined,\n second: string | undefined,\n): string | undefined {\n const messages: string[] = [];\n for (const message of [first, second]) {\n const trimmed = message?.trim();\n if (!trimmed) {\n continue;\n }\n const containingIndex = messages.findIndex((existing) => {\n return existing === trimmed || existing.includes(trimmed);\n });\n if (containingIndex !== -1) {\n continue;\n }\n\n const containedIndex = messages.findIndex((existing) => {\n return trimmed.includes(existing);\n });\n if (containedIndex !== -1) {\n messages[containedIndex] = trimmed;\n continue;\n }\n\n messages.push(trimmed);\n }\n return messages.length > 0 ? messages.join(\"\\n\") : undefined;\n}\n\nfunction isGenericFailureMessage(message: string): boolean {\n const normalized = message\n .trim()\n .toLowerCase()\n .replace(/[\\s.:!?]+$/u, \"\");\n return (\n normalized === \"error\" ||\n normalized === \"turn failed\" ||\n normalized === \"turn interrupted\" ||\n normalized === \"unknown error\" ||\n normalized === \"codex error\"\n );\n}\n\nfunction combineResultWithError(\n result: string | undefined,\n errorMessage: string | undefined,\n): string | undefined {\n if (result === undefined || result.length === 0) {\n return errorMessage;\n }\n if (!errorMessage) {\n return result;\n }\n\n const trimmedResult = result.trim();\n if (!trimmedResult) {\n return errorMessage;\n }\n if (trimmedResult === errorMessage || trimmedResult.includes(errorMessage)) {\n return result;\n }\n if (errorMessage.includes(trimmedResult)) {\n return errorMessage;\n }\n\n return `${result}\\n${errorMessage}`;\n}\n\nfunction formatDetailSuffix(details: readonly string[]): string {\n return details.length > 0 ? ` (${details.join(\"; \")})` : \"\";\n}\n\nfunction extractErrorMessage(value: unknown, depth = 0): string | undefined {\n if (value === null || value === undefined || value === false) {\n return undefined;\n }\n\n const direct = trimmedStringValue(value);\n if (direct) {\n return direct;\n }\n\n const record = asRecord(value);\n if (!record) {\n return hasSignalValue(value, depth) ? formatUnknownValue(value) : undefined;\n }\n\n const message =\n getFirstString(record, [\"message\"]) ??\n getFirstString(record, [\"error\", \"code\", \"failureReason\"]);\n const details = [\n getFirstString(record, [\"additional_details\", \"additionalDetails\"]),\n getFirstString(record, [\"codex_error_info\", \"codexErrorInfo\"]),\n formatSignalValue(record.connectors, message !== undefined),\n ].filter((detail): detail is string => {\n return detail !== undefined && detail.length > 0;\n });\n\n if (message) {\n const uniqueDetails = details.filter((detail) => {\n return !message.includes(detail);\n });\n return `${message}${formatDetailSuffix(uniqueDetails)}`;\n }\n\n if (details.length > 0) {\n return details.join(\"; \");\n }\n\n if (depth >= MAX_ERROR_SIGNAL_DEPTH) {\n return undefined;\n }\n\n const nested = extractErrorMessage(record.error, depth + 1);\n if (nested) {\n return nested;\n }\n\n return hasSignalValue(record, depth) ? formatUnknownValue(record) : undefined;\n}\n\nfunction extractEventErrorMessage(event: JsonRecord): string | undefined {\n return combineDistinctMessages(\n trimmedStringValue(event.message),\n extractErrorMessage(event.error),\n );\n}\n\nfunction getTurnRecord(event: JsonRecord): JsonRecord | null {\n return asRecord(event.turn);\n}\n\nfunction getTurnId(event: JsonRecord): string | undefined {\n const topLevelId = getFirstString(event, [\"turn_id\", \"turnId\"]);\n if (topLevelId) {\n return topLevelId;\n }\n const turn = getTurnRecord(event);\n return turn ? getFirstString(turn, [\"id\"]) : undefined;\n}\n\nfunction getTurnStatus(event: JsonRecord): string | undefined {\n const turn = getTurnRecord(event);\n return (\n (turn ? getFirstString(turn, [\"status\"]) : undefined) ??\n getFirstString(event, [\"status\"])\n );\n}\n\nconst FAILED_STATUSES = new Set([\n \"aborted\",\n \"cancelled\",\n \"canceled\",\n \"declined\",\n \"error\",\n \"failed\",\n \"interrupted\",\n \"timed_out\",\n \"timeout\",\n]);\n\nconst SUCCESSFUL_TURN_COMPLETION_STATUSES = new Set([\n \"completed\",\n \"success\",\n \"succeeded\",\n]);\n\nfunction isFailedStatus(status: string | undefined): boolean {\n return status !== undefined && FAILED_STATUSES.has(status.toLowerCase());\n}\n\nfunction isUnsuccessfulTurnCompletionStatus(\n status: string | undefined,\n): boolean {\n return (\n status !== undefined &&\n !SUCCESSFUL_TURN_COMPLETION_STATUSES.has(status.toLowerCase())\n );\n}\n\nfunction hasExtractableError(value: unknown): boolean {\n return extractErrorMessage(value) !== undefined;\n}\n\nfunction hasTurnCompletionError(\n event: JsonRecord,\n turn: JsonRecord | null,\n): boolean {\n return (\n (turn !== null && hasExtractableError(turn.error)) ||\n hasExtractableError(event.error)\n );\n}\n\nfunction getTurnErrorMessage(\n event: JsonRecord,\n turn: JsonRecord | null,\n): string | undefined {\n const turnMessage =\n turn !== null ? extractErrorMessage(turn.error) : undefined;\n const eventMessage = extractEventErrorMessage(event);\n if (turnMessage && eventMessage && isGenericFailureMessage(eventMessage)) {\n return turnMessage;\n }\n return combineDistinctMessages(turnMessage, eventMessage);\n}\n\nfunction getUsage(event: JsonRecord): JsonRecord {\n const eventUsage = asRecord(event.usage);\n if (eventUsage !== null) {\n return eventUsage;\n }\n\n const turn = getTurnRecord(event);\n if (turn === null) {\n return {};\n }\n\n const turnUsage = asRecord(turn.usage);\n return turnUsage === null ? {} : turnUsage;\n}\n\nfunction getTurnDurationMs(event: JsonRecord, turn: JsonRecord | null): number {\n return (\n (turn ? getFirstNumber(turn, [\"duration_ms\", \"durationMs\"]) : undefined) ??\n getFirstNumber(event, [\"duration_ms\", \"durationMs\"]) ??\n 0\n );\n}\n\nfunction getItem(event: JsonRecord): JsonRecord | null {\n return asRecord(event.item);\n}\n\nfunction getItemId(item: JsonRecord): string | undefined {\n return getFirstString(item, [\"id\"]);\n}\n\nfunction getItemType(item: JsonRecord): string | undefined {\n return getFirstString(item, [\"type\"]);\n}\n\nfunction getItemStatus(item: JsonRecord): string | undefined {\n return getFirstString(item, [\"status\"]);\n}\n\nfunction getItemErrorMessage(item: JsonRecord): string | undefined {\n return extractErrorMessage(item.error);\n}\n\nfunction shouldRenderGenericItemFailure(\n eventType: string,\n item: JsonRecord,\n): boolean {\n return (\n eventType === \"item.completed\" &&\n (isFailedStatus(getItemStatus(item)) ||\n getItemErrorMessage(item) !== undefined)\n );\n}\n\nfunction formatPlanStatus(status: string | undefined): string {\n if (status === \"completed\") return \"completed\";\n if (status === \"in_progress\") return \"in progress\";\n if (status === \"pending\") return \"pending\";\n return status ?? \"step\";\n}\n\nfunction formatPlanLines(plan: unknown): string[] {\n if (!Array.isArray(plan)) {\n return [];\n }\n const lines = plan\n .slice(0, MAX_FORMATTED_PLAN_STEPS)\n .map((step) => {\n const stepRecord = asRecord(step);\n if (!stepRecord) {\n return undefined;\n }\n const text = trimmedStringValue(stepRecord.step);\n if (!text) {\n return undefined;\n }\n const status = formatPlanStatus(trimmedStringValue(stepRecord.status));\n return `- ${status}: ${text}`;\n })\n .filter((line): line is string => {\n return line !== undefined;\n });\n const remaining = plan.length - MAX_FORMATTED_PLAN_STEPS;\n if (remaining > 0) {\n lines.push(`- ... +${remaining} more steps`);\n }\n return lines;\n}\n\nfunction formatGenericItem(item: JsonRecord): string | undefined {\n const itemType = getItemType(item);\n if (!itemType) {\n return undefined;\n }\n\n const fields: string[] = [itemType];\n const id = getItemId(item);\n if (id) {\n fields.push(`id=${id}`);\n }\n const status = getItemStatus(item);\n if (status) {\n fields.push(`status=${status}`);\n }\n\n let inspectedFields = 0;\n for (const key in item) {\n if (!hasOwnKey(item, key)) {\n continue;\n }\n if (key === \"id\" || key === \"type\" || key === \"status\") {\n continue;\n }\n if (\n fields.length >= MAX_FORMATTED_OBJECT_FIELDS + 3 ||\n inspectedFields >= MAX_FORMATTED_OBJECT_INSPECTED_FIELDS\n ) {\n fields.push(\"...\");\n break;\n }\n inspectedFields += 1;\n const value = item[key];\n const formatted = formatUnknownValue(value);\n if (formatted !== undefined) {\n fields.push(`${key}=${formatted}`);\n }\n }\n\n return `[item] ${fields.join(\" \")}`;\n}\n\nfunction formatFileChangeAction(kind: string | undefined): string {\n if (kind === \"add\") return \"Created\";\n if (kind === \"modify\") return \"Modified\";\n if (kind === \"delete\") return \"Deleted\";\n return \"Changed\";\n}\n\nexport class CodexEventParser {\n /**\n * Parse a raw Codex JSONL event into the shared CLI parsed-event format.\n * Returns null if the event type is unknown or too malformed to display.\n */\n static parse(rawEvent: unknown): ParsedEvent | null {\n const event = asRecord(rawEvent);\n if (!event) {\n return null;\n }\n\n const eventType = stringValue(event.type);\n if (!eventType) {\n return null;\n }\n\n if (eventType === \"thread.started\") {\n return this.parseThreadStarted(event);\n }\n\n if (eventType === \"turn.completed\") {\n return this.parseTurnCompleted(event);\n }\n\n if (eventType === \"turn.failed\") {\n return this.parseTurnFailed(event);\n }\n\n if (eventType === \"turn.plan.updated\") {\n return this.parseTurnPlanUpdated(event);\n }\n\n if (eventType === \"warning\") {\n return this.parseWarning(event);\n }\n\n if (eventType.startsWith(\"item.\")) {\n return this.parseItemEvent(event, eventType);\n }\n\n if (eventType === \"error\") {\n return this.parseErrorEvent(event);\n }\n\n return null;\n }\n\n private static parseThreadStarted(event: JsonRecord): ParsedEvent | null {\n const threadId = getFirstString(event, [\"thread_id\", \"threadId\"]);\n if (!threadId) {\n return null;\n }\n\n return {\n type: \"init\",\n timestamp: new Date(),\n data: {\n framework: \"codex\",\n sessionId: threadId,\n tools: [],\n },\n };\n }\n\n private static parseTurnCompleted(event: JsonRecord): ParsedEvent | null {\n const status = getTurnStatus(event);\n const turn = getTurnRecord(event);\n const turnId = getTurnId(event);\n const durationMs = getTurnDurationMs(event, turn);\n\n if (\n isUnsuccessfulTurnCompletionStatus(status) ||\n hasTurnCompletionError(event, turn)\n ) {\n const result =\n getTurnErrorMessage(event, turn) ??\n (status ? `Turn ${status}` : \"Turn failed\");\n return {\n type: \"result\",\n timestamp: new Date(),\n data: {\n success: false,\n result,\n durationMs,\n numTurns: 1,\n cost: 0,\n usage: getUsage(event),\n ...(turnId ? { turnId } : {}),\n },\n };\n }\n\n return {\n type: \"result\",\n timestamp: new Date(),\n data: {\n success: true,\n result: \"\",\n durationMs,\n numTurns: 1,\n cost: 0,\n usage: getUsage(event),\n ...(turnId ? { turnId } : {}),\n },\n };\n }\n\n private static parseTurnFailed(event: JsonRecord): ParsedEvent | null {\n const turn = getTurnRecord(event);\n const turnId = getTurnId(event);\n return {\n type: \"result\",\n timestamp: new Date(),\n data: {\n success: false,\n result: getTurnErrorMessage(event, turn) ?? \"Turn failed\",\n durationMs: getTurnDurationMs(event, turn),\n numTurns: 1,\n cost: 0,\n usage: getUsage(event),\n ...(turnId ? { turnId } : {}),\n },\n };\n }\n\n private static parseTurnPlanUpdated(event: JsonRecord): ParsedEvent | null {\n const lines = formatPlanLines(event.plan);\n const explanation = trimmedStringValue(event.explanation);\n if (lines.length === 0 && !explanation) {\n return null;\n }\n\n return {\n type: \"text\",\n timestamp: new Date(),\n data: {\n text: [\"[plan]\", explanation, ...lines]\n .filter((line): line is string => {\n return line !== undefined && line.length > 0;\n })\n .join(\"\\n\"),\n },\n };\n }\n\n private static parseWarning(event: JsonRecord): ParsedEvent | null {\n const message = extractEventErrorMessage(event);\n if (!message) {\n return null;\n }\n\n return {\n type: \"text\",\n timestamp: new Date(),\n data: { text: `[warning] ${message}` },\n };\n }\n\n private static parseItemEvent(\n event: JsonRecord,\n eventType: string,\n ): ParsedEvent | null {\n const item = getItem(event);\n if (!item) {\n return null;\n }\n\n const itemType = getItemType(item);\n if (!itemType) {\n return null;\n }\n\n if (itemType === \"agent_message\") {\n return this.parseTextItem(eventType, item, (text) => {\n return text;\n });\n }\n if (itemType === \"command_execution\") {\n return this.parseCommandExecution(eventType, item);\n }\n if (itemType === \"file_edit\" || itemType === \"file_write\") {\n return this.parseFileEditOrWrite(eventType, item);\n }\n if (itemType === \"file_read\") {\n return this.parseFileRead(eventType, item);\n }\n if (itemType === \"file_change\") {\n return this.parseFileChange(item);\n }\n if (itemType === \"reasoning\") {\n return this.parseTextItem(eventType, item, (text) => {\n return `[thinking] ${text}`;\n });\n }\n if (itemType === \"plan\") {\n return this.parseTextItem(eventType, item, (text) => {\n return `[plan]\\n${text}`;\n });\n }\n\n if (eventType === \"item.completed\") {\n return this.parseGenericCompletedItem(item);\n }\n\n return null;\n }\n\n private static parseTextItem(\n eventType: string,\n item: JsonRecord,\n formatText: (text: string) => string,\n ): ParsedEvent | null {\n const text = trimmedStringValue(item.text);\n if (text) {\n return {\n type: \"text\",\n timestamp: new Date(),\n data: { text: formatText(text) },\n };\n }\n\n return shouldRenderGenericItemFailure(eventType, item)\n ? this.parseGenericCompletedItem(item)\n : null;\n }\n\n private static parseGenericCompletedItem(\n item: JsonRecord,\n ): ParsedEvent | null {\n const text = formatGenericItem(item);\n return text\n ? { type: \"text\", timestamp: new Date(), data: { text } }\n : null;\n }\n\n private static parseCommandExecution(\n eventType: string,\n item: JsonRecord,\n ): ParsedEvent | null {\n const itemId = getItemId(item);\n const command = trimmedStringValue(item.command);\n if (!itemId) {\n return null;\n }\n\n if (eventType === \"item.started\" && command) {\n return {\n type: \"tool_use\",\n timestamp: new Date(),\n data: {\n tool: \"Bash\",\n toolUseId: itemId,\n input: { command },\n },\n };\n }\n\n if (eventType === \"item.completed\") {\n const output =\n nonEmptyStringValue(item.aggregated_output) ??\n nonEmptyStringValue(item.output) ??\n \"\";\n const status = getItemStatus(item);\n const exitCode = numberValue(item.exit_code);\n const errorMessage = getItemErrorMessage(item);\n const isError =\n (exitCode !== undefined ? exitCode !== 0 : false) ||\n isFailedStatus(status) ||\n errorMessage !== undefined;\n return {\n type: \"tool_result\",\n timestamp: new Date(),\n data: {\n tool: \"Bash\",\n toolUseId: itemId,\n input: command ? { command } : {},\n result:\n combineResultWithError(output, errorMessage) ??\n (isFailedStatus(status) ? `Command ${status}` : \"\"),\n isError,\n },\n };\n }\n\n return null;\n }\n\n private static parseFileEditOrWrite(\n eventType: string,\n item: JsonRecord,\n ): ParsedEvent | null {\n const itemId = getItemId(item);\n const path = trimmedStringValue(item.path);\n if (!itemId) {\n return null;\n }\n\n if (eventType === \"item.started\" && path) {\n return {\n type: \"tool_use\",\n timestamp: new Date(),\n data: {\n tool: getItemType(item) === \"file_edit\" ? \"Edit\" : \"Write\",\n toolUseId: itemId,\n input: { file_path: path },\n },\n };\n }\n\n if (eventType === \"item.completed\") {\n const status = getItemStatus(item);\n const tool = getItemType(item) === \"file_edit\" ? \"Edit\" : \"Write\";\n const errorMessage = getItemErrorMessage(item);\n return {\n type: \"tool_result\",\n timestamp: new Date(),\n data: {\n tool,\n toolUseId: itemId,\n input: path ? { file_path: path } : {},\n result:\n combineResultWithError(\n nonEmptyStringValue(item.diff),\n errorMessage,\n ) ??\n (isFailedStatus(status)\n ? `File operation ${status}`\n : \"File operation completed\"),\n isError: isFailedStatus(status) || errorMessage !== undefined,\n },\n };\n }\n\n return null;\n }\n\n private static parseFileRead(\n eventType: string,\n item: JsonRecord,\n ): ParsedEvent | null {\n const itemId = getItemId(item);\n const path = trimmedStringValue(item.path);\n if (!itemId) {\n return null;\n }\n\n if (eventType === \"item.started\" && path) {\n return {\n type: \"tool_use\",\n timestamp: new Date(),\n data: {\n tool: \"Read\",\n toolUseId: itemId,\n input: { file_path: path },\n },\n };\n }\n\n if (eventType === \"item.completed\") {\n const status = getItemStatus(item);\n const output = nonEmptyStringValue(item.output);\n const errorMessage = getItemErrorMessage(item);\n return {\n type: \"tool_result\",\n timestamp: new Date(),\n data: {\n tool: \"Read\",\n toolUseId: itemId,\n input: path ? { file_path: path } : {},\n result:\n combineResultWithError(output, errorMessage) ??\n (isFailedStatus(status)\n ? `File read ${status}`\n : \"File read completed\"),\n isError: isFailedStatus(status) || errorMessage !== undefined,\n },\n };\n }\n\n return null;\n }\n\n private static parseFileChange(item: JsonRecord): ParsedEvent | null {\n const status = getItemStatus(item);\n const errorMessage = getItemErrorMessage(item);\n const lines = Array.isArray(item.changes)\n ? item.changes\n .slice(0, MAX_FORMATTED_FILE_CHANGES)\n .map((change) => {\n const changeRecord = asRecord(change);\n if (!changeRecord) {\n return undefined;\n }\n const path = trimmedStringValue(changeRecord.path);\n if (!path) {\n return undefined;\n }\n const action = formatFileChangeAction(\n trimmedStringValue(changeRecord.kind),\n );\n return `${action}: ${path}`;\n })\n .filter((line): line is string => {\n return line !== undefined;\n })\n : [];\n if (\n Array.isArray(item.changes) &&\n item.changes.length > MAX_FORMATTED_FILE_CHANGES\n ) {\n lines.push(\n `... +${item.changes.length - MAX_FORMATTED_FILE_CHANGES} more changes`,\n );\n }\n\n if (lines.length === 0 && !isFailedStatus(status) && !errorMessage) {\n return null;\n }\n\n const statusLine = isFailedStatus(status) ? `Status: ${status}` : undefined;\n const errorLine = errorMessage ? `Error: ${errorMessage}` : undefined;\n return {\n type: \"text\",\n timestamp: new Date(),\n data: {\n text: [\"[files]\", statusLine, errorLine, ...lines]\n .filter((line): line is string => {\n return line !== undefined && line.length > 0;\n })\n .join(\"\\n\"),\n },\n };\n }\n\n private static parseErrorEvent(event: JsonRecord): ParsedEvent | null {\n const turn = getTurnRecord(event);\n const turnId = getTurnId(event);\n const hasTurnContext = turn !== null || turnId !== undefined;\n return {\n type: \"result\",\n timestamp: new Date(),\n data: {\n success: false,\n result: getTurnErrorMessage(event, turn) ?? \"Unknown error\",\n durationMs: getTurnDurationMs(event, turn),\n numTurns: hasTurnContext ? 1 : 0,\n cost: 0,\n usage: getUsage(event),\n ...(turnId ? { turnId } : {}),\n },\n };\n }\n}\n","/**\n * Event renderer for CLI output\n * Renders parsed events with colors and formatting\n *\n * Run lifecycle is rendered via:\n * - renderRunStarted: Called immediately after run is created\n * - renderRunCompleted: Called when run completes successfully\n * - renderRunFailed: Called when run fails\n */\n\nimport chalk from \"chalk\";\nimport type { ParsedEvent } from \"./claude-event-parser\";\nimport type { RunResult } from \"../api\";\nimport {\n getFrameworkDisplayName,\n isSupportedFramework,\n} from \"@vm0/core/frameworks\";\nimport { formatIsoTimestamp } from \"../utils/time-format\";\nimport {\n formatToolHeader,\n formatToolResult,\n type ToolUseData,\n type ToolResultData,\n} from \"./tool-formatters\";\n\n/**\n * Info about a started run\n */\ninterface RunStartedInfo {\n runId: string;\n sandboxId?: string;\n}\n\n/**\n * Options for creating an EventRenderer instance\n */\ninterface EventRendererOptions {\n /** Whether to show timestamp prefix (useful for historical log viewing) */\n showTimestamp?: boolean;\n /** Whether to show verbose output (full tool inputs/outputs) */\n verbose?: boolean;\n /** Whether to buffer tool_use events and wait for tool_result (default: true for streaming) */\n buffered?: boolean;\n}\n\nfunction recordData(value: unknown): Record<string, unknown> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n return value as Record<string, unknown>;\n}\n\nfunction displayString(value: unknown): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\nfunction displayNonNegativeNumber(value: unknown): number {\n const number =\n typeof value === \"number\"\n ? value\n : typeof value === \"string\" && value.trim().length > 0\n ? Number(value)\n : undefined;\n return number !== undefined && Number.isFinite(number) && number >= 0\n ? number\n : 0;\n}\n\n/**\n * Stateful event renderer that buffers tool_use events\n * and displays them grouped with their tool_result\n */\nexport class EventRenderer {\n private pendingToolUse = new Map<\n string,\n { toolUse: ToolUseData; prefix: string; rendered: boolean }\n >();\n private ambiguousToolUseIds = new Set<string>();\n private ambiguousRenderedToolUses = new Map<string, ToolUseData[]>();\n private options: EventRendererOptions;\n private lastEventType: string | null = null;\n private frameworkDisplayName: string = \"Agent\";\n\n constructor(options?: EventRendererOptions) {\n this.options = options ?? {};\n }\n\n /**\n * Render run started info\n * Called immediately after run is created, before polling events\n */\n static renderRunStarted(info: RunStartedInfo): void {\n console.log(chalk.bold(\"▶ Run started\"));\n console.log(` Run ID: ${chalk.dim(info.runId)}`);\n if (info.sandboxId) {\n console.log(` Sandbox: ${chalk.dim(info.sandboxId)}`);\n }\n console.log(chalk.dim(` (use \"zero logs ${info.runId}\" to view logs)`));\n console.log();\n }\n\n /**\n * Format timestamp for display (without milliseconds, matching metrics format)\n */\n static formatTimestamp(timestamp: Date): string {\n return formatIsoTimestamp(timestamp);\n }\n\n /**\n * Render a parsed event to console\n */\n render(event: ParsedEvent): void {\n const timestampPrefix = this.options.showTimestamp\n ? `[${EventRenderer.formatTimestamp(event.timestamp)}] `\n : \"\";\n\n switch (event.type) {\n case \"init\":\n this.renderPendingToolUses();\n this.renderInit(event, timestampPrefix);\n break;\n case \"text\":\n this.renderPendingToolUses();\n this.renderText(event, timestampPrefix);\n break;\n case \"tool_use\":\n this.handleToolUse(event, timestampPrefix);\n break;\n case \"tool_result\":\n this.handleToolResult(event, timestampPrefix);\n break;\n case \"result\":\n this.renderPendingToolUses();\n this.renderResult(event, timestampPrefix);\n break;\n }\n }\n\n /**\n * Render any buffered display state that cannot wait for a future event.\n */\n flush(): void {\n this.renderPendingToolUses();\n this.pendingToolUse.clear();\n this.ambiguousToolUseIds.clear();\n this.ambiguousRenderedToolUses.clear();\n }\n\n private renderPendingToolUses(): void {\n for (const pending of this.pendingToolUse.values()) {\n if (pending.rendered) {\n continue;\n }\n const { toolUse, prefix } = pending;\n this.renderToolUseOnly(toolUse, prefix);\n pending.rendered = true;\n }\n }\n\n /**\n * Render run completed state\n * Note: This is run lifecycle status, not an event\n */\n static renderRunCompleted(result: RunResult | undefined): void {\n // Visual separator to distinguish from event stream\n console.log(\"\");\n console.log(chalk.green(\"✓ Run completed successfully\"));\n\n if (result) {\n console.log(` Checkpoint: ${chalk.dim(result.checkpointId)}`);\n console.log(` Session: ${chalk.dim(result.agentSessionId)}`);\n console.log(` Conversation: ${chalk.dim(result.conversationId)}`);\n\n // Render artifact and volumes\n if (result.artifact && Object.keys(result.artifact).length > 0) {\n console.log(` Artifact:`);\n for (const [name, version] of Object.entries(result.artifact)) {\n console.log(\n ` ${name}: ${chalk.dim(EventRenderer.formatVersion(version))}`,\n );\n }\n }\n\n if (result.volumes && Object.keys(result.volumes).length > 0) {\n console.log(` Volumes:`);\n for (const [name, version] of Object.entries(result.volumes)) {\n console.log(\n ` ${name}: ${chalk.dim(EventRenderer.formatVersion(version))}`,\n );\n }\n }\n }\n }\n\n /**\n * Render run failed state\n * Note: This is run lifecycle status, not an event\n */\n static renderRunFailed(error: string | undefined, runId: string): void {\n // Visual separator to distinguish from event stream\n console.error(\"\");\n console.error(chalk.red(\"✗ Run failed\"));\n\n // Parse markdown links from the error message and render them as\n // plain URLs that terminals can auto-detect as clickable.\n const errorText = error || \"Unknown error\";\n const linkMatch = errorText.match(/\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n if (linkMatch) {\n const messageWithoutLink = errorText\n .replace(linkMatch[0], \"\")\n .replace(/\\s+$/, \"\");\n console.error(` Error: ${chalk.red(messageWithoutLink)}`);\n console.error(` ${linkMatch[1]}: ${chalk.cyan(linkMatch[2])}`);\n } else {\n console.error(` Error: ${chalk.red(errorText)}`);\n }\n\n console.error(chalk.dim(` (use \"zero logs ${runId}\" to view agent logs)`));\n }\n\n /**\n * Handle tool_use event - buffer it for later grouping with result (when buffered)\n * or render immediately (when not buffered, e.g., historical log viewing)\n */\n private handleToolUse(event: ParsedEvent, prefix: string): void {\n const toolUseId = displayString(event.data.toolUseId);\n const tool = displayString(event.data.tool);\n const input = recordData(event.data.input);\n const toolUseData: ToolUseData = { tool, input };\n\n // When buffered (default), store for later grouping\n // When not buffered, render immediately\n if (this.options.buffered !== false && toolUseId.length > 0) {\n const existing = this.pendingToolUse.get(toolUseId);\n if (existing || this.ambiguousToolUseIds.has(toolUseId)) {\n if (existing) {\n if (!existing.rendered) {\n this.renderToolUseOnly(existing.toolUse, existing.prefix);\n }\n this.rememberAmbiguousRenderedToolUse(toolUseId, existing.toolUse);\n }\n this.pendingToolUse.delete(toolUseId);\n this.ambiguousToolUseIds.add(toolUseId);\n this.renderToolUseOnly(toolUseData, prefix);\n this.rememberAmbiguousRenderedToolUse(toolUseId, toolUseData);\n return;\n }\n this.pendingToolUse.set(toolUseId, {\n toolUse: toolUseData,\n prefix,\n rendered: false,\n });\n } else {\n // Non-buffered, or malformed tool_use without a stable id: render immediately.\n this.renderToolUseOnly(toolUseData, prefix);\n }\n }\n\n /**\n * Render a tool_use event without waiting for result (for historical log viewing)\n */\n private renderToolUseOnly(toolUse: ToolUseData, prefix: string): void {\n // Add spacing before tool if previous was text\n if (this.lastEventType === \"text\") {\n console.log();\n }\n\n const cont = this.getContinuationPrefix();\n const headerLines = formatToolHeader(toolUse);\n\n // First line gets the bullet, rest get simple indent\n for (let i = 0; i < headerLines.length; i++) {\n if (i === 0) {\n console.log(prefix + \"● \" + headerLines[i]);\n } else {\n console.log(cont + headerLines[i]);\n }\n }\n console.log(); // Empty line after each tool_use\n this.lastEventType = \"tool\";\n }\n\n /**\n * Handle tool_result event - lookup buffered tool_use and render grouped\n */\n private handleToolResult(event: ParsedEvent, prefix: string): void {\n const toolUseId = displayString(event.data.toolUseId);\n const result = displayString(event.data.result);\n const isError = Boolean(event.data.isError);\n\n if (toolUseId.length > 0 && this.ambiguousToolUseIds.has(toolUseId)) {\n const orphanToolUse = this.getToolUseFromResultEvent(event);\n const renderedToolUse = orphanToolUse\n ? this.getMatchingAmbiguousRenderedToolUse(toolUseId, orphanToolUse)\n : undefined;\n if (renderedToolUse) {\n this.renderToolResultOnly(renderedToolUse, { result, isError }, prefix);\n return;\n }\n if (orphanToolUse) {\n this.renderGroupedTool(orphanToolUse, { result, isError }, prefix);\n }\n return;\n }\n\n const pending = this.pendingToolUse.get(toolUseId);\n\n if (pending) {\n if (pending.rendered) {\n this.renderToolResultOnly(pending.toolUse, { result, isError }, prefix);\n } else {\n // Render grouped output\n this.renderGroupedTool(pending.toolUse, { result, isError }, prefix);\n }\n this.pendingToolUse.delete(toolUseId);\n return;\n }\n\n const orphanToolUse = this.getToolUseFromResultEvent(event);\n if (orphanToolUse) {\n this.renderGroupedTool(orphanToolUse, { result, isError }, prefix);\n }\n // Skip orphan tool_results without enough tool metadata to render.\n }\n\n private getToolUseFromResultEvent(event: ParsedEvent): ToolUseData | null {\n const tool = event.data.tool;\n if (typeof tool !== \"string\" || tool.length === 0) {\n return null;\n }\n\n return {\n tool,\n input: recordData(event.data.input),\n };\n }\n\n private rememberAmbiguousRenderedToolUse(\n toolUseId: string,\n toolUse: ToolUseData,\n ): void {\n const renderedToolUses = this.ambiguousRenderedToolUses.get(toolUseId);\n if (renderedToolUses) {\n renderedToolUses.push(toolUse);\n return;\n }\n this.ambiguousRenderedToolUses.set(toolUseId, [toolUse]);\n }\n\n private getMatchingAmbiguousRenderedToolUse(\n toolUseId: string,\n toolUse: ToolUseData,\n ): ToolUseData | undefined {\n const renderedToolUses = this.ambiguousRenderedToolUses.get(toolUseId);\n if (!renderedToolUses) {\n return undefined;\n }\n\n for (let index = renderedToolUses.length - 1; index >= 0; index -= 1) {\n const renderedToolUse = renderedToolUses[index];\n if (\n renderedToolUse !== undefined &&\n this.hasSameToolHeader(renderedToolUse, toolUse)\n ) {\n return renderedToolUse;\n }\n }\n return undefined;\n }\n\n private hasSameToolHeader(first: ToolUseData, second: ToolUseData): boolean {\n return (\n formatToolHeader(first).join(\"\\n\") === formatToolHeader(second).join(\"\\n\")\n );\n }\n\n /**\n * Get continuation prefix (simple indent, no timestamp alignment)\n */\n private getContinuationPrefix(): string {\n return \" \";\n }\n\n /**\n * Render grouped tool output (tool_use + tool_result together)\n */\n private renderGroupedTool(\n toolUse: ToolUseData,\n result: ToolResultData,\n prefix: string,\n ): void {\n // Add spacing before tool if previous was text\n if (this.lastEventType === \"text\") {\n console.log();\n }\n\n const verbose = this.options.verbose ?? false;\n const cont = this.getContinuationPrefix();\n\n const headerLines = formatToolHeader(toolUse);\n const resultLines = formatToolResult(toolUse, result, verbose);\n\n // First line gets timestamp + bullet, rest get simple indent\n for (let i = 0; i < headerLines.length; i++) {\n if (i === 0) {\n console.log(prefix + \"● \" + headerLines[i]);\n } else {\n console.log(cont + headerLines[i]);\n }\n }\n for (const line of resultLines) {\n console.log(cont + line);\n }\n console.log(); // Empty line after each group\n this.lastEventType = \"tool\";\n }\n\n private renderToolResultOnly(\n toolUse: ToolUseData,\n result: ToolResultData,\n prefix: string,\n ): void {\n if (this.lastEventType === \"text\") {\n console.log();\n }\n\n const verbose = this.options.verbose ?? false;\n const cont = this.getContinuationPrefix();\n const resultLines = formatToolResult(toolUse, result, verbose);\n\n for (let i = 0; i < resultLines.length; i++) {\n const line = resultLines[i];\n if (i === 0) {\n console.log(prefix + cont + line);\n } else {\n console.log(cont + line);\n }\n }\n console.log();\n this.lastEventType = \"tool\";\n }\n\n private renderInit(event: ParsedEvent, prefix: string): void {\n const frameworkStr = displayString(event.data.framework) || \"claude-code\";\n const displayName = isSupportedFramework(frameworkStr)\n ? getFrameworkDisplayName(frameworkStr)\n : frameworkStr;\n this.frameworkDisplayName = displayName;\n console.log(prefix + chalk.bold(`▷ ${displayName} Started`));\n console.log(` Session: ${chalk.dim(displayString(event.data.sessionId))}`);\n if (event.data.model) {\n console.log(` Model: ${chalk.dim(String(event.data.model))}`);\n }\n console.log(\n ` Tools: ${chalk.dim(\n Array.isArray(event.data.tools)\n ? event.data.tools.join(\", \")\n : String(event.data.tools || \"\"),\n )}`,\n );\n console.log();\n this.lastEventType = \"init\";\n }\n\n private renderText(event: ParsedEvent, prefix: string): void {\n const text = displayString(event.data.text);\n // Text events get a bullet prefix\n console.log(prefix + \"● \" + text);\n this.lastEventType = \"text\";\n }\n\n private renderResult(event: ParsedEvent, prefix: string): void {\n console.log(); // Spacing before result\n const success = Boolean(event.data.success);\n const eventFramework = displayString(event.data.framework);\n const displayName =\n eventFramework && isSupportedFramework(eventFramework)\n ? getFrameworkDisplayName(eventFramework)\n : eventFramework || this.frameworkDisplayName;\n this.frameworkDisplayName = displayName;\n\n if (success) {\n console.log(prefix + chalk.bold(`◆ ${displayName} Completed`));\n } else {\n console.log(prefix + chalk.bold(`◆ ${displayName} Failed`));\n const result = displayString(event.data.result).trim();\n if (result.length > 0) {\n const [firstLine, ...restLines] = result.split(\"\\n\");\n console.log(` Error: ${chalk.red(firstLine)}`);\n for (const line of restLines) {\n console.log(` ${chalk.red(line)}`);\n }\n }\n }\n\n const durationMs = displayNonNegativeNumber(event.data.durationMs);\n const durationSec = (durationMs / 1000).toFixed(1);\n console.log(` Duration: ${chalk.dim(durationSec + \"s\")}`);\n\n const numTurns = displayNonNegativeNumber(event.data.numTurns);\n console.log(` Turns: ${chalk.dim(String(numTurns))}`);\n\n const usage = event.data.usage as Record<string, unknown>;\n if (usage && typeof usage === \"object\") {\n const inputTokens = displayNonNegativeNumber(usage.input_tokens);\n const outputTokens = displayNonNegativeNumber(usage.output_tokens);\n\n const formatTokens = (count: number): string => {\n if (count >= 1000) {\n return Math.floor(count / 1000) + \"k\";\n }\n return String(count);\n };\n\n console.log(\n ` Tokens: ${chalk.dim(\n `input=${formatTokens(inputTokens)} output=${formatTokens(outputTokens)}`,\n )}`,\n );\n }\n this.lastEventType = \"result\";\n }\n\n /**\n * Format version ID for display (show short 8-character prefix)\n */\n private static formatVersion(version: string): string {\n // SHA-256 hashes are 64 characters, show first 8\n if (version.length === 64 && /^[a-f0-9]+$/i.test(version)) {\n return version.slice(0, 8);\n }\n // For \"latest\" or other formats, show as-is\n return version;\n }\n}\n","/**\n * Tool-specific formatters for CLI output\n * Formats tool_use and tool_result events in grouped output\n */\n\nimport chalk from \"chalk\";\n\nconst MAX_FORMATTED_TODOS = 20;\n\nexport interface ToolUseData {\n tool: string;\n input: Record<string, unknown>;\n}\n\nexport interface ToolResultData {\n result: string;\n isError: boolean;\n}\n\n/**\n * Pluralize a word based on count\n */\nfunction pluralize(count: number, singular: string, plural: string): string {\n return count === 1 ? singular : plural;\n}\n\n/**\n * Truncate text with ellipsis\n */\nfunction truncate(text: string, maxLength: number): string {\n if (text.length <= maxLength) return text;\n return text.slice(0, maxLength - 3) + \"...\";\n}\n\nfunction displayValue(value: unknown): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\nfunction nonEmptyDisplayValue(value: unknown): string | undefined {\n const display = displayValue(value);\n return display.length > 0 ? display : undefined;\n}\n\nfunction recordValue(value: unknown): Record<string, unknown> | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n return value as Record<string, unknown>;\n}\n\n/**\n * Format the header line for a tool (e.g., \"Read src/lib/api.ts\")\n */\nexport function formatToolHeader(data: ToolUseData): string[] {\n const { tool, input } = data;\n\n // Get the headline based on tool type\n const headline = getToolHeadline(tool, input);\n return [headline];\n}\n\n/**\n * Tool headline formatters - maps tool name to headline generator\n */\nconst toolHeadlineFormatters: Record<\n string,\n (input: Record<string, unknown>) => string\n> = {\n Read: (input) => {\n return `Read${chalk.dim(`(${displayValue(input.file_path)})`)}`;\n },\n Edit: (input) => {\n return `Edit${chalk.dim(`(${displayValue(input.file_path)})`)}`;\n },\n Write: (input) => {\n return `Write${chalk.dim(`(${displayValue(input.file_path)})`)}`;\n },\n Bash: (input) => {\n return `Bash${chalk.dim(`(${truncate(displayValue(input.command), 60)})`)}`;\n },\n Glob: (input) => {\n return `Glob${chalk.dim(`(${displayValue(input.pattern)})`)}`;\n },\n Grep: (input) => {\n return `Grep${chalk.dim(`(${displayValue(input.pattern)})`)}`;\n },\n Task: (input) => {\n return `Task${chalk.dim(`(${truncate(displayValue(input.description), 60)})`)}`;\n },\n WebFetch: (input) => {\n return `WebFetch${chalk.dim(`(${truncate(displayValue(input.url), 60)})`)}`;\n },\n WebSearch: (input) => {\n return `WebSearch${chalk.dim(`(${truncate(displayValue(input.query), 60)})`)}`;\n },\n TodoWrite: () => {\n return \"TodoWrite\";\n },\n};\n\n/**\n * Get the headline for a tool based on its type and input\n */\nfunction getToolHeadline(tool: string, input: Record<string, unknown>): string {\n const formatter = toolHeadlineFormatters[tool];\n return formatter ? formatter(input) : tool;\n}\n\n/**\n * Format the result line with content preview\n */\nexport function formatToolResult(\n toolUse: ToolUseData,\n result: ToolResultData,\n verbose: boolean,\n): string[] {\n const { tool, input } = toolUse;\n const { result: resultText, isError } = result;\n const lines: string[] = [];\n\n const specialLines = formatSpecialToolResult(\n tool,\n input,\n resultText,\n isError,\n verbose,\n );\n if (specialLines) {\n return specialLines;\n }\n\n // Error case: show error message\n if (isError) {\n const errorMsg = resultText ? truncate(resultText, 80) : \"Error\";\n lines.push(`└ ✗ ${chalk.dim(errorMsg)}`);\n return lines;\n }\n\n // Success case: show content preview\n if (resultText) {\n const resultLines = resultText.split(\"\\n\");\n if (verbose) {\n // In verbose mode, show full result with └ on first line\n for (let i = 0; i < resultLines.length; i++) {\n const prefix = i === 0 ? \"└ \" : \" \";\n lines.push(`${prefix}${chalk.dim(resultLines[i])}`);\n }\n } else if (resultLines.length > 0) {\n // In normal mode, show first 3 lines with expand hint\n const previewCount = Math.min(3, resultLines.length);\n for (let i = 0; i < previewCount; i++) {\n const prefix = i === 0 ? \"└ \" : \" \";\n lines.push(`${prefix}${chalk.dim(resultLines[i])}`);\n }\n const remaining = resultLines.length - previewCount;\n if (remaining > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remaining} ${pluralize(remaining, \"line\", \"lines\")} (zero logs <runId> to see all)`)}`,\n );\n }\n }\n } else {\n // No result content, show done\n lines.push(`└ ✓ ${chalk.dim(\"Done\")}`);\n }\n\n return lines;\n}\n\nfunction formatSpecialToolResult(\n tool: string,\n input: Record<string, unknown>,\n resultText: string,\n isError: boolean,\n verbose: boolean,\n): string[] | null {\n if (isError) {\n return null;\n }\n\n if (tool === \"Read\" && resultText) {\n return formatReadContent(resultText, verbose);\n }\n if (tool === \"TodoWrite\") {\n return formatTodoList(input);\n }\n if (tool === \"Edit\" && hasClaudeEditInput(input)) {\n return formatEditDiff(input, verbose);\n }\n if (tool === \"Write\" && hasClaudeWriteInput(input)) {\n return formatWritePreview(input, verbose);\n }\n return null;\n}\n\nfunction hasClaudeEditInput(input: Record<string, unknown>): boolean {\n return (\n typeof input.old_string === \"string\" || typeof input.new_string === \"string\"\n );\n}\n\nfunction hasClaudeWriteInput(input: Record<string, unknown>): boolean {\n return typeof input.content === \"string\";\n}\n\n/**\n * Format Read tool output - strip line numbers and filter system content\n * Input format: \" 1→content\" (line numbers with → separator)\n * Falls back to raw content if no line numbers are present\n */\nfunction formatReadContent(resultText: string, verbose: boolean): string[] {\n const lines: string[] = [];\n const rawLines = resultText.split(\"\\n\");\n\n // Parse lines: try to extract content from line number format, strip the number prefix\n const contentLines: string[] = [];\n const lineNumberPattern = /^\\s*\\d+→(.*)$/;\n\n for (const line of rawLines) {\n const match = line.match(lineNumberPattern);\n if (match) {\n contentLines.push(match[1] ?? \"\");\n }\n }\n\n // If no line numbers found, use raw content so whitespace-only files are not\n // misreported as empty.\n const displayLines = contentLines.length > 0 ? contentLines : rawLines;\n const totalLines = displayLines.length;\n\n if (totalLines === 0) {\n lines.push(`└ ✓ ${chalk.dim(\"(empty)\")}`);\n return lines;\n }\n\n // Show content preview\n if (verbose) {\n for (let i = 0; i < displayLines.length; i++) {\n const prefix = i === 0 ? \"└ \" : \" \";\n lines.push(`${prefix}${chalk.dim(displayLines[i] ?? \"\")}`);\n }\n } else {\n const previewCount = Math.min(3, totalLines);\n for (let i = 0; i < previewCount; i++) {\n const prefix = i === 0 ? \"└ \" : \" \";\n lines.push(`${prefix}${chalk.dim(displayLines[i] ?? \"\")}`);\n }\n const remaining = totalLines - previewCount;\n if (remaining > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remaining} ${pluralize(remaining, \"line\", \"lines\")} (zero logs <runId> to see all)`)}`,\n );\n }\n }\n\n return lines;\n}\n\n/**\n * Format Write tool output with content preview\n */\nfunction formatWritePreview(\n input: Record<string, unknown>,\n verbose: boolean,\n): string[] {\n const lines: string[] = [];\n const content = displayValue(input.content);\n const contentLines = content.split(\"\\n\");\n const totalLines = contentLines.length;\n\n // Show content preview\n if (verbose) {\n for (let i = 0; i < contentLines.length; i++) {\n const prefix = i === 0 ? \"⎿ \" : \" \";\n lines.push(`${prefix}${chalk.dim(contentLines[i] ?? \"\")}`);\n }\n } else {\n const previewCount = Math.min(3, totalLines);\n for (let i = 0; i < previewCount; i++) {\n const prefix = i === 0 ? \"⎿ \" : \" \";\n lines.push(`${prefix}${chalk.dim(contentLines[i] ?? \"\")}`);\n }\n const remaining = totalLines - previewCount;\n if (remaining > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remaining} ${pluralize(remaining, \"line\", \"lines\")} (zero logs <runId> to see all)`)}`,\n );\n }\n }\n\n return lines;\n}\n\n/**\n * Format Edit tool output as diff\n * Shows added/removed line counts and preview of changes\n */\nfunction formatEditDiff(\n input: Record<string, unknown>,\n verbose: boolean,\n): string[] {\n const lines: string[] = [];\n const oldString = displayValue(input.old_string);\n const newString = displayValue(input.new_string);\n\n const oldLines = oldString.split(\"\\n\");\n const newLines = newString.split(\"\\n\");\n\n const removed = oldLines.length;\n const added = newLines.length;\n\n // Summary line\n const summary = `Added ${added} ${pluralize(added, \"line\", \"lines\")}, removed ${removed} ${pluralize(removed, \"line\", \"lines\")}`;\n lines.push(`⎿ ${chalk.dim(summary)}`);\n\n if (verbose) {\n // Verbose mode: show all lines\n for (const line of oldLines) {\n lines.push(` - ${chalk.dim(line)}`);\n }\n for (const line of newLines) {\n lines.push(` + ${chalk.dim(line)}`);\n }\n } else {\n // Compact mode: show first few lines of each\n const previewLimit = 3;\n const showOld = Math.min(previewLimit, oldLines.length);\n const showNew = Math.min(previewLimit, newLines.length);\n\n // Show removed lines\n for (let i = 0; i < showOld; i++) {\n lines.push(` - ${chalk.dim(truncate(oldLines[i] ?? \"\", 60))}`);\n }\n const remainingOld = oldLines.length - previewLimit;\n if (remainingOld > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remainingOld} ${pluralize(remainingOld, \"line\", \"lines\")} (zero logs <runId> to see all)`)}`,\n );\n }\n\n // Show added lines\n for (let i = 0; i < showNew; i++) {\n lines.push(` + ${chalk.dim(truncate(newLines[i] ?? \"\", 60))}`);\n }\n const remainingNew = newLines.length - previewLimit;\n if (remainingNew > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remainingNew} ${pluralize(remainingNew, \"line\", \"lines\")} (zero logs <runId> to see all)`)}`,\n );\n }\n }\n\n return lines;\n}\n\n/**\n * Format TodoWrite task list with status icons\n * ✓ completed, ▸ in_progress, ◻ pending\n */\nfunction formatTodoList(input: Record<string, unknown>): string[] {\n const lines: string[] = [];\n const todos = input.todos;\n\n if (!Array.isArray(todos)) {\n lines.push(\"└ ✓ Done\");\n return lines;\n }\n\n if (todos.length === 0) {\n lines.push(\"└ ✓ Done\");\n return lines;\n }\n\n const displayedTodos = todos.slice(0, MAX_FORMATTED_TODOS);\n for (let i = 0; i < displayedTodos.length; i++) {\n const todo = recordValue(displayedTodos[i]);\n const content = nonEmptyDisplayValue(todo?.content) ?? \"Unknown task\";\n const status = nonEmptyDisplayValue(todo?.status) ?? \"pending\";\n const icon = getTodoStatusIcon(status);\n const styledContent = formatTodoContent(content, status);\n const prefix = i === 0 ? \"└ \" : \" \";\n lines.push(`${prefix}${icon} ${styledContent}`);\n }\n\n const remaining = todos.length - MAX_FORMATTED_TODOS;\n if (remaining > 0) {\n lines.push(\n ` ${chalk.dim(`… +${remaining} ${pluralize(remaining, \"task\", \"tasks\")} (zero logs <runId> to see all)`)}`,\n );\n }\n\n return lines;\n}\n\n/**\n * Get icon for todo status\n */\nfunction getTodoStatusIcon(status: string): string {\n switch (status) {\n case \"completed\":\n return \"✓\";\n case \"in_progress\":\n return \"▸\";\n case \"pending\":\n default:\n return \"◻\";\n }\n}\n\n/**\n * Format todo content with styling based on status\n * - completed: strikethrough + dim\n * - pending: dim\n */\nfunction formatTodoContent(content: string, status: string): string {\n switch (status) {\n case \"completed\":\n return chalk.dim.strikethrough(content);\n case \"in_progress\":\n return content;\n case \"pending\":\n default:\n return chalk.dim(content);\n }\n}\n","export function parseSearchQuery(value: string, label: string): string {\n const trimmed = value.trim();\n if (!trimmed) {\n throw new Error(`${label} cannot be empty.`);\n }\n return trimmed;\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport {\n searchZeroLogs,\n type RunEvent,\n type LogsSearchResponse,\n} from \"../../../lib/api\";\nimport { parseTime } from \"../../../lib/utils/time-parser\";\nimport { formatIsoTimestamp } from \"../../../lib/utils/time-format\";\nimport { EventRenderer } from \"../../../lib/events/event-renderer\";\nimport { EventStreamNormalizer } from \"../../../lib/events/event-stream-normalizer\";\nimport { withErrorHandler } from \"../../../lib/command\";\nimport { isUuid } from \"../../../lib/utils/uuid\";\nimport { parseBoundedLogCount } from \"../../../lib/utils/log-pagination\";\nimport { parseSearchQuery } from \"../../../lib/utils/search-query\";\nimport { isSupportedFramework } from \"@vm0/core/frameworks\";\n\nconst SEVEN_DAYS_MS = 7 * 24 * 60 * 60 * 1000;\n\nexport interface LogsSearchCliOptions {\n afterContext?: string;\n beforeContext?: string;\n context?: string;\n agentId?: string;\n run?: string;\n since?: string;\n limit?: string;\n}\n\ninterface LogsSearchCommandOptions extends Omit<\n LogsSearchCliOptions,\n \"agentId\"\n> {\n agent?: string;\n}\n\nfunction supportedSearchFramework(\n framework: string | null | undefined,\n): string | undefined {\n const normalized = framework ?? undefined;\n return isSupportedFramework(normalized) ? normalized : undefined;\n}\n\nfunction renderSearchEvent(\n event: RunEvent,\n framework: string | null | undefined,\n renderer: EventRenderer,\n normalizer: EventStreamNormalizer,\n): void {\n const parsedEvents = normalizer.process(\n event.eventData,\n supportedSearchFramework(framework),\n new Date(event.createdAt),\n );\n for (const parsed of parsedEvents) {\n renderer.render(parsed);\n }\n}\n\nfunction flushSearchRenderer(\n renderer: EventRenderer,\n normalizer: EventStreamNormalizer,\n): void {\n for (const parsed of normalizer.flush()) {\n renderer.render(parsed);\n }\n renderer.flush();\n}\n\nfunction formatRunHeader(\n runId: string,\n agentName: string,\n timestamp: string,\n): string {\n const time = formatIsoTimestamp(timestamp);\n return `── Run ${runId} (${agentName}, ${time}) ──────────`;\n}\n\nfunction parseContextOptions(options: LogsSearchCliOptions): {\n before: number;\n after: number;\n} {\n const contextN =\n options.context !== undefined\n ? parseBoundedLogCount(options.context, \"--context\", 0, 10)\n : 0;\n const before =\n options.beforeContext !== undefined\n ? parseBoundedLogCount(options.beforeContext, \"--before-context\", 0, 10)\n : contextN;\n const after =\n options.afterContext !== undefined\n ? parseBoundedLogCount(options.afterContext, \"--after-context\", 0, 10)\n : contextN;\n\n return { before, after };\n}\n\nfunction parseLimit(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n return parseBoundedLogCount(value, \"--limit\", 1, 50);\n}\n\nfunction renderResults(response: LogsSearchResponse): void {\n const grouped = new Map<\n string,\n { agentName: string; results: LogsSearchResponse[\"results\"] }\n >();\n for (const result of response.results) {\n const existing = grouped.get(result.runId);\n if (existing) {\n existing.results.push(result);\n } else {\n grouped.set(result.runId, {\n agentName: result.agentName,\n results: [result],\n });\n }\n }\n\n let isFirstGroup = true;\n for (const [runId, group] of grouped) {\n if (!isFirstGroup) {\n console.log();\n }\n isFirstGroup = false;\n\n const firstTimestamp = group.results[0]!.matchedEvent.createdAt;\n console.log(\n chalk.bold(formatRunHeader(runId, group.agentName, firstTimestamp)),\n );\n\n for (const result of group.results) {\n const renderer = new EventRenderer({\n showTimestamp: true,\n verbose: false,\n });\n const normalizer = new EventStreamNormalizer();\n\n for (const event of result.contextBefore) {\n renderSearchEvent(event, result.framework, renderer, normalizer);\n }\n renderSearchEvent(\n result.matchedEvent,\n result.framework,\n renderer,\n normalizer,\n );\n for (const event of result.contextAfter) {\n renderSearchEvent(event, result.framework, renderer, normalizer);\n }\n flushSearchRenderer(renderer, normalizer);\n }\n }\n\n if (response.hasMore) {\n console.log();\n console.log(\n chalk.dim(\n ` Showing first ${response.results.length} matches. Use --limit to see more.`,\n ),\n );\n }\n}\n\nexport async function runLogsSearch(\n keyword: string,\n options: LogsSearchCliOptions,\n): Promise<void> {\n const searchKeyword = parseSearchQuery(keyword, \"Keyword\");\n const { before, after } = parseContextOptions(options);\n\n if (options.agentId !== undefined && !isUuid(options.agentId)) {\n console.error(\n chalk.red(`✗ Invalid agent ID \"${options.agentId}\" — expected a UUID`),\n );\n console.error(chalk.dim(\" Run: zero logs list to find agent IDs\"));\n process.exit(1);\n }\n\n if (options.run !== undefined && !isUuid(options.run)) {\n console.error(\n chalk.red(`✗ Invalid run ID \"${options.run}\" — expected a UUID`),\n );\n console.error(chalk.dim(\" Run: zero logs list to find run IDs\"));\n process.exit(1);\n }\n\n const since =\n options.since !== undefined\n ? parseTime(options.since)\n : Date.now() - SEVEN_DAYS_MS;\n const limit = parseLimit(options.limit);\n\n const response = await searchZeroLogs({\n keyword: searchKeyword,\n agentId: options.agentId,\n runId: options.run,\n since,\n limit,\n before,\n after,\n });\n\n if (response.results.length === 0) {\n console.log(chalk.dim(\"No matches found\"));\n console.log(\n chalk.dim(\n \" Try a broader search with --since 30d or a different keyword\",\n ),\n );\n return;\n }\n\n renderResults(response);\n}\n\nexport const searchCommand = new Command()\n .name(\"search\")\n .description(\"Search agent events across runs\")\n .argument(\"<keyword>\", \"Search keyword\")\n .option(\"-A, --after-context <n>\", \"Show n events after each match\")\n .option(\"-B, --before-context <n>\", \"Show n events before each match\")\n .option(\"-C, --context <n>\", \"Show n events before and after each match\")\n .option(\"--agent <id>\", \"Filter by Zero agent ID\")\n .option(\"--run <id>\", \"Filter by specific run ID\")\n .option(\"--since <time>\", \"Search logs since (default: 7d)\")\n .option(\"--limit <n>\", \"Maximum number of matches (default: 20)\")\n .addHelpText(\n \"after\",\n `\nExamples:\n zero logs search \"error\"\n zero logs search \"timeout\" --agent 123e4567-e89b-12d3-a456-426614174000 -C 2\n zero logs search \"failed\" --since 30d --limit 50`,\n )\n .action(\n withErrorHandler(\n async (keyword: string, options: LogsSearchCommandOptions) => {\n const { agent, ...searchOptions } = options;\n await runLogsSearch(keyword, { ...searchOptions, agentId: agent });\n },\n ),\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;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F,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,8BAA8B;AAAA,IAC5B,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,wBAAwB;AAAA,IACtB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,gCAAgC;AAAA,IAC9B,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,4BAA4B;AAAA,IAC1B,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,2BAA2B;AAAA,IACzB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,2BAA2B;AAAA,IACzB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,0BAA0B;AAAA,IACxB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,0BAA0B;AAAA,IACxB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,oBAAoB;AAAA,IAClB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,eAAe;AAAA,IACb,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,cACE;AAAA,IACF,gBACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,qBAAqB;AAAA,IACnB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,aACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACf,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,OACE;AAAA,IACF,UACE;AAAA,IACF,aACE;AAAA,IACF,WACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,YACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,gBAAgB;AAAA,IACd,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACV,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,aAAa;AAAA,IACX,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,iBACE;AAAA,IACF,YACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,qBAAqB;AAAA,IACnB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,gBACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,YACE;AAAA,IACF,cACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,cACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,QAAQ;AAAA,IACN,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,oBAAoB;AAAA,IAClB,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,cACE;AAAA,IACF,aACE;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACP,OACE;AAAA,IACF,UACE;AAAA,IACF,WACE;AAAA,IACF,aACE;AAAA,IACF,mBACE;AAAA,IACF,gBACE;AAAA,IACF,oBACE;AAAA,IACF,gBACE;AAAA,IACF,mBACE;AAAA,IACF,mBACE;AAAA,IACF,aACE;AAAA,IACF,gBACE;AAAA,IACF,cACE;AAAA,IACF,YACE;AAAA,IACF,aACE;AAAA,IACF,iBACE;AAAA,IACF,iBACE;AAAA,IACF,aACE;AAAA,IACF,cACE;AAAA,EACJ;AACF;AAYA,IAAM,gCAAgC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,oCAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,mCAAmC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGA,IAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,iCAAiC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,gCAAgC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,6BAA6B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,4BAA4B;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,oCAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,mCAAmC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,oCAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,mCAAmC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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;AAAA,EACF,yBACE;AAAA,EACF,0BACE;AAAA,EACF,4BACE;AAAA,EACF,6BACE;AAAA,EACF,4BACE;AAAA,EACF,yCACE;AAAA,EACF,6CACE;AAAA,EACF,wCACE;AAAA,EACF,0CACE;AAAA,EACF,6BACE;AAAA,EACF,kCACE;AAAA,EACF,oCACE;AAAA,EACF,oCACE;AAAA,EACF,oCACE;AAAA,EACF,0CACE;AAAA,EACF,0CACE;AAAA,EACF,wCACE;AAAA,EACF,yCACE;AAAA,EACF,uCACE;AAAA,EACF,4CACE;AAAA,EACF,uCACE;AAAA,EACF,8CACE;AAAA,EACF,sDACE;AAAA,EACF,yDACE;AAAA,EACF,sDACE;AAAA,EACF,oDACE;AAAA,EACF,oDACE;AAAA,EACF,iDACE;AAAA,EACF,sDACE;AAAA,EACF,oCACE;AAAA,EACF,sCACE;AAAA,EACF,6CACE;AAAA,EACF,qCACE;AAAA,EACF,4CACE;AAAA,EACF,sCACE;AAAA,EACF,4CACE;AAAA,EACF,uDACE;AAAA,EACF,mDACE;AAAA,EACF,2DACE;AAAA,EACF,qDACE;AAAA,EACF,yDACE;AAAA,EACF,wDACE;AAAA,EACF,2DACE;AAAA,EACF,sDACE;AAAA,EACF,uDACE;AAAA,EACF,gDACE;AAAA,EACF,gDACE;AAAA,EACF,gDACE;AAAA,EACF,6DACE;AAAA,EACF,oDACE;AAAA,EACF,2CACE;AAAA,EACF,yCACE;AAAA,EACF,0CACE;AAAA,EACF,4CACE;AAAA,EACF,yCACE;AAAA,EACF,8CACE;AAAA,EACF,2CACE;AAAA,EACF,0CACE;AAAA,EACF,yCACE;AAAA,EACF,4CACE;AAAA,EACF,wCACE;AAAA,EACF,qCACE;AAAA,EACF,uCACE;AAAA,EACF,6CACE;AAAA,EACF,6CACE;AAAA,EACF,oDACE;AAAA,EACF,0CACE;AAAA,EACF,0CACE;AAAA,EACF,kCACE;AAAA,EACF,6CACE;AAAA,EACF,qCACE;AAAA,EACF,yCACE;AAAA,EACF,wCACE;AAAA,EACF,wCACE;AAAA,EACF,qCACE;AAAA,EACF,uCACE;AAAA,EACF,sCACE;AAAA,EACF,oCACE;AAAA,EACF,6CACE;AAAA,EACF,2CACE;AAAA,EACF,iCACE;AAAA,EACF,kDACE;AAAA,EACF,+CACE;AAAA,EACF,mDACE;AAAA,EACF,oDACE;AAAA,EACF,gDACE;AAAA,EACF,+CACE;AAAA,EACF,+CACE;AAAA,EACF,sDACE;AAAA,EACF,sDACE;AAAA,EACF,gEACE;AAAA,EACF,2DACE;AAAA,EACF,6DACE;AAAA,EACF,2DACE;AAAA,EACF,6DACE;AAAA,EACF,qDACE;AAAA,EACF,8CACE;AAAA,EACF,6CACE;AAAA,EACF,gDACE;AAAA,EACF,gDACE;AAAA,EACF,mDACE;AAAA,EACF,0CACE;AAAA,EACF,iDACE;AAAA,EACF,iDACE;AAAA,EACF,wDACE;AAAA,EACF,6CACE;AAAA,EACF,6CACE;AAAA,EACF,+CACE;AAAA,EACF,wDACE;AAAA,EACF,+CACE;AAAA,EACF,6CACE;AAAA,EACF,iDACE;AAAA,EACF,+CACE;AAAA,EACF,0CACE;AAAA,EACF,gDACE;AAAA,EACF,iDACE;AAAA,EACF,+CACE;AAAA,EACF,2CACE;AAAA,EACF,oDACE;AAAA,EACF,sDACE;AAAA,EACF,oDACE;AAAA,EACF,gDACE;AAAA,EACF,uDACE;AAAA,EACF,6CACE;AAAA,EACF,iDACE;AAAA,EACF,yCACE;AAAA,EACF,0DACE;AAAA,EACF,0DACE;AAAA,EACF,sDACE;AAAA,EACF,qDACE;AAAA,EACF,2DACE;AAAA,EACF,mDACE;AAAA,EACF,sDACE;AAAA,EACF,uDACE;AAAA,EACF,iCACE;AAAA,EACF,kCACE;AAAA,EACF,mCACE;AAAA,EACF,qCACE;AAAA,EACF,qCACE;AAAA,EACF,8CACE;AAAA,EACF,8CACE;AAAA,EACF,qDACE;AAAA,EACF,oDACE;AAAA,EACF,mDACE;AAAA,EACF,kDACE;AAAA,EACF,yDACE;AAA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,OAAO,qBAAqB,2CAA2C,EACvE,OAAO,gBAAgB,yBAAyB,EAChD,OAAO,cAAc,2BAA2B,EAChD,OAAO,kBAAkB,iCAAiC,EAC1D,OAAO,eAAe,yCAAyC,EAC/D;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAKF,EACC;AAAA,EACC;AAAA,IACE,OAAO,SAAiB,YAAsC;AAC5D,YAAM,EAAE,OAAO,GAAG,cAAc,IAAI;AACpC,YAAM,cAAc,SAAS,EAAE,GAAG,eAAe,SAAS,MAAM,CAAC;AAAA,IACnE;AAAA,EACF;AACF;","names":["res","res","anchors","c","node","i","end","value","stringify","comment","str","map","seq","require_schema","pairs","omap","require_bool","require_float","require_int","n","set","res","require_schema","tags","res","value","end","tag","i","ch","start","lineCounter","timestamp","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","zeroAgentVisibilitySchema","c","c","c","c","c","c","nullableDateStringSchema","c","c","c","c","c","nullableDateStringSchema","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","c","jsonErrorSchema","c","c","jsonErrorSchema","c","c","c","c","c","c","c","c","c","c","c","c","stringOrStringArraySchema","c","c","c","c","c","c","c","import_yaml","asRecord","combineDistinctMessages","output","truncate","orphanToolUse"]}
|