@tickernelz/paperclip-pro-shared 2026.925.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.paperclip-build-complete +1 -0
- package/dist/account-handle.d.ts +26 -0
- package/dist/account-handle.d.ts.map +1 -0
- package/dist/account-handle.js +48 -0
- package/dist/account-handle.js.map +1 -0
- package/dist/account-handle.test.d.ts +2 -0
- package/dist/account-handle.test.d.ts.map +1 -0
- package/dist/account-handle.test.js +62 -0
- package/dist/account-handle.test.js.map +1 -0
- package/dist/adapter-agnostic-keys.test.d.ts +2 -0
- package/dist/adapter-agnostic-keys.test.d.ts.map +1 -0
- package/dist/adapter-agnostic-keys.test.js +33 -0
- package/dist/adapter-agnostic-keys.test.js.map +1 -0
- package/dist/adapter-auth-check-code.d.ts +13 -0
- package/dist/adapter-auth-check-code.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.js +13 -0
- package/dist/adapter-auth-check-code.js.map +1 -0
- package/dist/adapter-auth-check-code.test.d.ts +2 -0
- package/dist/adapter-auth-check-code.test.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.test.js +8 -0
- package/dist/adapter-auth-check-code.test.js.map +1 -0
- package/dist/adapter-auth-session.d.ts +16 -0
- package/dist/adapter-auth-session.d.ts.map +1 -0
- package/dist/adapter-auth-session.js +37 -0
- package/dist/adapter-auth-session.js.map +1 -0
- package/dist/adapter-type.d.ts +4 -0
- package/dist/adapter-type.d.ts.map +1 -0
- package/dist/adapter-type.js +14 -0
- package/dist/adapter-type.js.map +1 -0
- package/dist/adapter-types.test.d.ts +2 -0
- package/dist/adapter-types.test.d.ts.map +1 -0
- package/dist/adapter-types.test.js +46 -0
- package/dist/adapter-types.test.js.map +1 -0
- package/dist/agent-appearance.d.ts +53 -0
- package/dist/agent-appearance.d.ts.map +1 -0
- package/dist/agent-appearance.js +51 -0
- package/dist/agent-appearance.js.map +1 -0
- package/dist/agent-appearance.test.d.ts +2 -0
- package/dist/agent-appearance.test.d.ts.map +1 -0
- package/dist/agent-appearance.test.js +32 -0
- package/dist/agent-appearance.test.js.map +1 -0
- package/dist/agent-eligibility.d.ts +67 -0
- package/dist/agent-eligibility.d.ts.map +1 -0
- package/dist/agent-eligibility.js +171 -0
- package/dist/agent-eligibility.js.map +1 -0
- package/dist/agent-eligibility.test.d.ts +2 -0
- package/dist/agent-eligibility.test.d.ts.map +1 -0
- package/dist/agent-eligibility.test.js +187 -0
- package/dist/agent-eligibility.test.js.map +1 -0
- package/dist/agent-url-key.d.ts +4 -0
- package/dist/agent-url-key.d.ts.map +1 -0
- package/dist/agent-url-key.js +22 -0
- package/dist/agent-url-key.js.map +1 -0
- package/dist/ai-connections.d.ts +220 -0
- package/dist/ai-connections.d.ts.map +1 -0
- package/dist/ai-connections.js +152 -0
- package/dist/ai-connections.js.map +1 -0
- package/dist/announcements.d.ts +146 -0
- package/dist/announcements.d.ts.map +1 -0
- package/dist/announcements.js +72 -0
- package/dist/announcements.js.map +1 -0
- package/dist/announcements.test.d.ts +2 -0
- package/dist/announcements.test.d.ts.map +1 -0
- package/dist/announcements.test.js +53 -0
- package/dist/announcements.test.js.map +1 -0
- package/dist/api.d.ts +69 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +69 -0
- package/dist/api.js.map +1 -0
- package/dist/app-definitions/agentmail.json +49 -0
- package/dist/app-definitions/airtable.json +41 -0
- package/dist/app-definitions/anthropic.json +75 -0
- package/dist/app-definitions/api-key-generic.json +43 -0
- package/dist/app-definitions/arcade.json +36 -0
- package/dist/app-definitions/asana.json +42 -0
- package/dist/app-definitions/beehiiv.json +41 -0
- package/dist/app-definitions/bitly.json +78 -0
- package/dist/app-definitions/box.json +42 -0
- package/dist/app-definitions/brex.json +43 -0
- package/dist/app-definitions/candid.json +41 -0
- package/dist/app-definitions/clickhouse.json +59 -0
- package/dist/app-definitions/cloudflare.json +78 -0
- package/dist/app-definitions/cloudinary.json +42 -0
- package/dist/app-definitions/coda.json +80 -0
- package/dist/app-definitions/composio.json +39 -0
- package/dist/app-definitions/context7.json +33 -0
- package/dist/app-definitions/discord.json +66 -0
- package/dist/app-definitions/egnyte.json +41 -0
- package/dist/app-definitions/embat.json +41 -0
- package/dist/app-definitions/executor.json +36 -0
- package/dist/app-definitions/fireflies.json +82 -0
- package/dist/app-definitions/github.json +124 -0
- package/dist/app-definitions/gmail.json +182 -0
- package/dist/app-definitions/google-calendar.json +188 -0
- package/dist/app-definitions/google-chat.json +189 -0
- package/dist/app-definitions/google-docs.json +187 -0
- package/dist/app-definitions/google-drive.json +183 -0
- package/dist/app-definitions/google-people.json +110 -0
- package/dist/app-definitions/google-sheets.json +211 -0
- package/dist/app-definitions/google-slides.json +187 -0
- package/dist/app-definitions/google-workspace-search.json +113 -0
- package/dist/app-definitions/hugging-face.json +44 -0
- package/dist/app-definitions/imessage-photon.json +50 -0
- package/dist/app-definitions/jira.json +65 -0
- package/dist/app-definitions/kernel.json +78 -0
- package/dist/app-definitions/linear.json +62 -0
- package/dist/app-definitions/local-falcon.json +41 -0
- package/dist/app-definitions/make.json +42 -0
- package/dist/app-definitions/manufact.json +42 -0
- package/dist/app-definitions/mem0.json +56 -0
- package/dist/app-definitions/microsoft-teams.json +67 -0
- package/dist/app-definitions/miro.json +41 -0
- package/dist/app-definitions/mixpanel.json +43 -0
- package/dist/app-definitions/netlify.json +42 -0
- package/dist/app-definitions/notion.json +57 -0
- package/dist/app-definitions/oauth-generic.json +47 -0
- package/dist/app-definitions/openai.json +74 -0
- package/dist/app-definitions/openrouter.json +53 -0
- package/dist/app-definitions/oreilly.json +78 -0
- package/dist/app-definitions/pagerduty.json +93 -0
- package/dist/app-definitions/planetscale.json +91 -0
- package/dist/app-definitions/posthog.json +278 -0
- package/dist/app-definitions/postman.json +224 -0
- package/dist/app-definitions/railway.json +61 -0
- package/dist/app-definitions/razorpay.json +81 -0
- package/dist/app-definitions/resend.json +42 -0
- package/dist/app-definitions/sanity.json +79 -0
- package/dist/app-definitions/sentry.json +42 -0
- package/dist/app-definitions/shopify.json +117 -0
- package/dist/app-definitions/similarweb.json +57 -0
- package/dist/app-definitions/slack.json +86 -0
- package/dist/app-definitions/stripe.json +80 -0
- package/dist/app-definitions/supabase.json +164 -0
- package/dist/app-definitions/telegram.json +53 -0
- package/dist/app-definitions/ticket-tailor.json +42 -0
- package/dist/app-definitions/ticktick.json +41 -0
- package/dist/app-definitions/todoist.json +41 -0
- package/dist/app-definitions/vercel.json +43 -0
- package/dist/app-definitions/webflow.json +41 -0
- package/dist/app-definitions/wix.json +42 -0
- package/dist/app-definitions/xai.json +74 -0
- package/dist/app-definitions/xero.json +53 -0
- package/dist/app-definitions/youcom.json +100 -0
- package/dist/app-definitions/zapier.json +32 -0
- package/dist/app-definitions-url.test.d.ts +2 -0
- package/dist/app-definitions-url.test.d.ts.map +1 -0
- package/dist/app-definitions-url.test.js +43 -0
- package/dist/app-definitions-url.test.js.map +1 -0
- package/dist/app-definitions.d.ts +41 -0
- package/dist/app-definitions.d.ts.map +1 -0
- package/dist/app-definitions.generated.d.ts +3 -0
- package/dist/app-definitions.generated.d.ts.map +1 -0
- package/dist/app-definitions.generated.js +77 -0
- package/dist/app-definitions.generated.js.map +1 -0
- package/dist/app-definitions.js +212 -0
- package/dist/app-definitions.js.map +1 -0
- package/dist/app-definitions.test.d.ts +2 -0
- package/dist/app-definitions.test.d.ts.map +1 -0
- package/dist/app-definitions.test.js +774 -0
- package/dist/app-definitions.test.js.map +1 -0
- package/dist/cliplab/LICENSE +22 -0
- package/dist/cliplab/PROVENANCE.md +18 -0
- package/dist/cliplab/character.d.ts +4 -0
- package/dist/cliplab/character.d.ts.map +1 -0
- package/dist/cliplab/character.js +2324 -0
- package/dist/cliplab/character.js.map +1 -0
- package/dist/cliplab/definition.d.ts +13 -0
- package/dist/cliplab/definition.d.ts.map +1 -0
- package/dist/cliplab/definition.js +28 -0
- package/dist/cliplab/definition.js.map +1 -0
- package/dist/cliplab/face-morph.d.ts +26 -0
- package/dist/cliplab/face-morph.d.ts.map +1 -0
- package/dist/cliplab/face-morph.js +301 -0
- package/dist/cliplab/face-morph.js.map +1 -0
- package/dist/cliplab/gaze.d.ts +42 -0
- package/dist/cliplab/gaze.d.ts.map +1 -0
- package/dist/cliplab/gaze.js +57 -0
- package/dist/cliplab/gaze.js.map +1 -0
- package/dist/cliplab/model.d.ts +176 -0
- package/dist/cliplab/model.d.ts.map +1 -0
- package/dist/cliplab/model.js +337 -0
- package/dist/cliplab/model.js.map +1 -0
- package/dist/cliplab/palette-tokens.d.ts +75 -0
- package/dist/cliplab/palette-tokens.d.ts.map +1 -0
- package/dist/cliplab/palette-tokens.js +76 -0
- package/dist/cliplab/palette-tokens.js.map +1 -0
- package/dist/cliplab/particles.d.ts +15 -0
- package/dist/cliplab/particles.d.ts.map +1 -0
- package/dist/cliplab/particles.js +23 -0
- package/dist/cliplab/particles.js.map +1 -0
- package/dist/cliplab/renderer.d.ts +129 -0
- package/dist/cliplab/renderer.d.ts.map +1 -0
- package/dist/cliplab/renderer.js +762 -0
- package/dist/cliplab/renderer.js.map +1 -0
- package/dist/cliplab/runtime.d.ts +21 -0
- package/dist/cliplab/runtime.d.ts.map +1 -0
- package/dist/cliplab/runtime.js +140 -0
- package/dist/cliplab/runtime.js.map +1 -0
- package/dist/cliplab/static.d.ts +4 -0
- package/dist/cliplab/static.d.ts.map +1 -0
- package/dist/cliplab/static.js +16 -0
- package/dist/cliplab/static.js.map +1 -0
- package/dist/cliplab/svg-canvas.d.ts +56 -0
- package/dist/cliplab/svg-canvas.d.ts.map +1 -0
- package/dist/cliplab/svg-canvas.js +134 -0
- package/dist/cliplab/svg-canvas.js.map +1 -0
- package/dist/cliplab/svg-path.d.ts +24 -0
- package/dist/cliplab/svg-path.d.ts.map +1 -0
- package/dist/cliplab/svg-path.js +151 -0
- package/dist/cliplab/svg-path.js.map +1 -0
- package/dist/cliplab/svg-snapshot.d.ts +28 -0
- package/dist/cliplab/svg-snapshot.d.ts.map +1 -0
- package/dist/cliplab/svg-snapshot.js +168 -0
- package/dist/cliplab/svg-snapshot.js.map +1 -0
- package/dist/company-import-transfer.d.ts +80 -0
- package/dist/company-import-transfer.d.ts.map +1 -0
- package/dist/company-import-transfer.js +63 -0
- package/dist/company-import-transfer.js.map +1 -0
- package/dist/company-import-transfer.test.d.ts +2 -0
- package/dist/company-import-transfer.test.d.ts.map +1 -0
- package/dist/company-import-transfer.test.js +15 -0
- package/dist/company-import-transfer.test.js.map +1 -0
- package/dist/config-schema.d.ts +252 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/config-schema.js +268 -0
- package/dist/config-schema.js.map +1 -0
- package/dist/config-schema.test.d.ts +2 -0
- package/dist/config-schema.test.d.ts.map +1 -0
- package/dist/config-schema.test.js +126 -0
- package/dist/config-schema.test.js.map +1 -0
- package/dist/connection-intent-guidance.d.ts +12 -0
- package/dist/connection-intent-guidance.d.ts.map +1 -0
- package/dist/connection-intent-guidance.js +35 -0
- package/dist/connection-intent-guidance.js.map +1 -0
- package/dist/connection-intent-guidance.test.d.ts +2 -0
- package/dist/connection-intent-guidance.test.d.ts.map +1 -0
- package/dist/connection-intent-guidance.test.js +60 -0
- package/dist/connection-intent-guidance.test.js.map +1 -0
- package/dist/constants.d.ts +556 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +1363 -0
- package/dist/constants.js.map +1 -0
- package/dist/decision.test.d.ts +2 -0
- package/dist/decision.test.d.ts.map +1 -0
- package/dist/decision.test.js +142 -0
- package/dist/decision.test.js.map +1 -0
- package/dist/document-anchors.d.ts +37 -0
- package/dist/document-anchors.d.ts.map +1 -0
- package/dist/document-anchors.js +351 -0
- package/dist/document-anchors.js.map +1 -0
- package/dist/document-anchors.test.d.ts +2 -0
- package/dist/document-anchors.test.d.ts.map +1 -0
- package/dist/document-anchors.test.js +151 -0
- package/dist/document-anchors.test.js.map +1 -0
- package/dist/document-export.d.ts +4 -0
- package/dist/document-export.d.ts.map +1 -0
- package/dist/document-export.js +27 -0
- package/dist/document-export.js.map +1 -0
- package/dist/env-file.d.ts +16 -0
- package/dist/env-file.d.ts.map +1 -0
- package/dist/env-file.js +149 -0
- package/dist/env-file.js.map +1 -0
- package/dist/env-file.test.d.ts +2 -0
- package/dist/env-file.test.d.ts.map +1 -0
- package/dist/env-file.test.js +72 -0
- package/dist/env-file.test.js.map +1 -0
- package/dist/environment-custom-images.d.ts +17 -0
- package/dist/environment-custom-images.d.ts.map +1 -0
- package/dist/environment-custom-images.js +88 -0
- package/dist/environment-custom-images.js.map +1 -0
- package/dist/environment-custom-images.test.d.ts +2 -0
- package/dist/environment-custom-images.test.d.ts.map +1 -0
- package/dist/environment-custom-images.test.js +136 -0
- package/dist/environment-custom-images.test.js.map +1 -0
- package/dist/environment-support.d.ts +58 -0
- package/dist/environment-support.d.ts.map +1 -0
- package/dist/environment-support.js +128 -0
- package/dist/environment-support.js.map +1 -0
- package/dist/environment-support.test.d.ts +2 -0
- package/dist/environment-support.test.d.ts.map +1 -0
- package/dist/environment-support.test.js +77 -0
- package/dist/environment-support.test.js.map +1 -0
- package/dist/execution-workspace-guards.d.ts +6 -0
- package/dist/execution-workspace-guards.d.ts.map +1 -0
- package/dist/execution-workspace-guards.js +12 -0
- package/dist/execution-workspace-guards.js.map +1 -0
- package/dist/external-objects-server.d.ts +12 -0
- package/dist/external-objects-server.d.ts.map +1 -0
- package/dist/external-objects-server.js +176 -0
- package/dist/external-objects-server.js.map +1 -0
- package/dist/external-objects.d.ts +32 -0
- package/dist/external-objects.d.ts.map +1 -0
- package/dist/external-objects.js +17 -0
- package/dist/external-objects.js.map +1 -0
- package/dist/external-objects.test.d.ts +2 -0
- package/dist/external-objects.test.d.ts.map +1 -0
- package/dist/external-objects.test.js +93 -0
- package/dist/external-objects.test.js.map +1 -0
- package/dist/feature-catalog.d.ts +59 -0
- package/dist/feature-catalog.d.ts.map +1 -0
- package/dist/feature-catalog.js +301 -0
- package/dist/feature-catalog.js.map +1 -0
- package/dist/feature-catalog.test.d.ts +2 -0
- package/dist/feature-catalog.test.d.ts.map +1 -0
- package/dist/feature-catalog.test.js +89 -0
- package/dist/feature-catalog.test.js.map +1 -0
- package/dist/frontmatter-runner-contract.test.d.ts +2 -0
- package/dist/frontmatter-runner-contract.test.d.ts.map +1 -0
- package/dist/frontmatter-runner-contract.test.js +10 -0
- package/dist/frontmatter-runner-contract.test.js.map +1 -0
- package/dist/frontmatter.d.ts +68 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +559 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/frontmatter.test.d.ts +2 -0
- package/dist/frontmatter.test.d.ts.map +1 -0
- package/dist/frontmatter.test.js +297 -0
- package/dist/frontmatter.test.js.map +1 -0
- package/dist/github-connectors.d.ts +10 -0
- package/dist/github-connectors.d.ts.map +1 -0
- package/dist/github-connectors.js +15 -0
- package/dist/github-connectors.js.map +1 -0
- package/dist/gitignore-runtime.test.d.ts +2 -0
- package/dist/gitignore-runtime.test.d.ts.map +1 -0
- package/dist/gitignore-runtime.test.js +14 -0
- package/dist/gitignore-runtime.test.js.map +1 -0
- package/dist/google-workspace-connectors.d.ts +10 -0
- package/dist/google-workspace-connectors.d.ts.map +1 -0
- package/dist/google-workspace-connectors.js +31 -0
- package/dist/google-workspace-connectors.js.map +1 -0
- package/dist/home-paths.d.ts +41 -0
- package/dist/home-paths.d.ts.map +1 -0
- package/dist/home-paths.js +57 -0
- package/dist/home-paths.js.map +1 -0
- package/dist/home-paths.test.d.ts +2 -0
- package/dist/home-paths.test.d.ts.map +1 -0
- package/dist/home-paths.test.js +25 -0
- package/dist/home-paths.test.js.map +1 -0
- package/dist/humanize-connection.d.ts +36 -0
- package/dist/humanize-connection.d.ts.map +1 -0
- package/dist/humanize-connection.js +95 -0
- package/dist/humanize-connection.js.map +1 -0
- package/dist/humanize-connection.test.d.ts +2 -0
- package/dist/humanize-connection.test.d.ts.map +1 -0
- package/dist/humanize-connection.test.js +48 -0
- package/dist/humanize-connection.test.js.map +1 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/index.js.map +1 -0
- package/dist/issue-attribution.d.ts +27 -0
- package/dist/issue-attribution.d.ts.map +1 -0
- package/dist/issue-attribution.js +25 -0
- package/dist/issue-attribution.js.map +1 -0
- package/dist/issue-attribution.test.d.ts +2 -0
- package/dist/issue-attribution.test.d.ts.map +1 -0
- package/dist/issue-attribution.test.js +72 -0
- package/dist/issue-attribution.test.js.map +1 -0
- package/dist/issue-references.d.ts +16 -0
- package/dist/issue-references.d.ts.map +1 -0
- package/dist/issue-references.js +160 -0
- package/dist/issue-references.js.map +1 -0
- package/dist/issue-references.test.d.ts +2 -0
- package/dist/issue-references.test.d.ts.map +1 -0
- package/dist/issue-references.test.js +56 -0
- package/dist/issue-references.test.js.map +1 -0
- package/dist/issue-thread-interactions.test.d.ts +2 -0
- package/dist/issue-thread-interactions.test.d.ts.map +1 -0
- package/dist/issue-thread-interactions.test.js +546 -0
- package/dist/issue-thread-interactions.test.js.map +1 -0
- package/dist/issue-write-denial.d.ts +92 -0
- package/dist/issue-write-denial.d.ts.map +1 -0
- package/dist/issue-write-denial.js +227 -0
- package/dist/issue-write-denial.js.map +1 -0
- package/dist/issue-write-denial.test.d.ts +2 -0
- package/dist/issue-write-denial.test.d.ts.map +1 -0
- package/dist/issue-write-denial.test.js +159 -0
- package/dist/issue-write-denial.test.js.map +1 -0
- package/dist/markdown-work-products.d.ts +26 -0
- package/dist/markdown-work-products.d.ts.map +1 -0
- package/dist/markdown-work-products.js +70 -0
- package/dist/markdown-work-products.js.map +1 -0
- package/dist/markdown-work-products.test.d.ts +2 -0
- package/dist/markdown-work-products.test.d.ts.map +1 -0
- package/dist/markdown-work-products.test.js +122 -0
- package/dist/markdown-work-products.test.js.map +1 -0
- package/dist/mcp-config-help-prompt.d.ts +21 -0
- package/dist/mcp-config-help-prompt.d.ts.map +1 -0
- package/dist/mcp-config-help-prompt.js +56 -0
- package/dist/mcp-config-help-prompt.js.map +1 -0
- package/dist/mcp-remote-headers.d.ts +49 -0
- package/dist/mcp-remote-headers.d.ts.map +1 -0
- package/dist/mcp-remote-headers.js +127 -0
- package/dist/mcp-remote-headers.js.map +1 -0
- package/dist/mcp-remote-headers.test.d.ts +2 -0
- package/dist/mcp-remote-headers.test.d.ts.map +1 -0
- package/dist/mcp-remote-headers.test.js +112 -0
- package/dist/mcp-remote-headers.test.js.map +1 -0
- package/dist/network-bind.d.ts +27 -0
- package/dist/network-bind.d.ts.map +1 -0
- package/dist/network-bind.js +75 -0
- package/dist/network-bind.js.map +1 -0
- package/dist/node-version.d.ts +6 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +48 -0
- package/dist/node-version.js.map +1 -0
- package/dist/oauth-endpoint-url.d.ts +74 -0
- package/dist/oauth-endpoint-url.d.ts.map +1 -0
- package/dist/oauth-endpoint-url.js +142 -0
- package/dist/oauth-endpoint-url.js.map +1 -0
- package/dist/oauth-endpoint-url.test.d.ts +2 -0
- package/dist/oauth-endpoint-url.test.d.ts.map +1 -0
- package/dist/oauth-endpoint-url.test.js +163 -0
- package/dist/oauth-endpoint-url.test.js.map +1 -0
- package/dist/pipeline-case-type.d.ts +23 -0
- package/dist/pipeline-case-type.d.ts.map +1 -0
- package/dist/pipeline-case-type.js +26 -0
- package/dist/pipeline-case-type.js.map +1 -0
- package/dist/pipeline-health.d.ts +80 -0
- package/dist/pipeline-health.d.ts.map +1 -0
- package/dist/pipeline-health.js +249 -0
- package/dist/pipeline-health.js.map +1 -0
- package/dist/pipeline-health.test.d.ts +2 -0
- package/dist/pipeline-health.test.d.ts.map +1 -0
- package/dist/pipeline-health.test.js +140 -0
- package/dist/pipeline-health.test.js.map +1 -0
- package/dist/portability-fidelity.d.ts +19 -0
- package/dist/portability-fidelity.d.ts.map +1 -0
- package/dist/portability-fidelity.js +46 -0
- package/dist/portability-fidelity.js.map +1 -0
- package/dist/portability-fidelity.test.d.ts +2 -0
- package/dist/portability-fidelity.test.d.ts.map +1 -0
- package/dist/portability-fidelity.test.js +66 -0
- package/dist/portability-fidelity.test.js.map +1 -0
- package/dist/portability-hash.d.ts +5 -0
- package/dist/portability-hash.d.ts.map +1 -0
- package/dist/portability-hash.js +20 -0
- package/dist/portability-hash.js.map +1 -0
- package/dist/portability-zip.d.ts +15 -0
- package/dist/portability-zip.d.ts.map +1 -0
- package/dist/portability-zip.js +262 -0
- package/dist/portability-zip.js.map +1 -0
- package/dist/portability-zip.test.d.ts +2 -0
- package/dist/portability-zip.test.d.ts.map +1 -0
- package/dist/portability-zip.test.js +227 -0
- package/dist/portability-zip.test.js.map +1 -0
- package/dist/project-mentions.d.ts +47 -0
- package/dist/project-mentions.d.ts.map +1 -0
- package/dist/project-mentions.js +291 -0
- package/dist/project-mentions.js.map +1 -0
- package/dist/project-mentions.test.d.ts +2 -0
- package/dist/project-mentions.test.d.ts.map +1 -0
- package/dist/project-mentions.test.js +43 -0
- package/dist/project-mentions.test.js.map +1 -0
- package/dist/project-url-key.d.ts +5 -0
- package/dist/project-url-key.d.ts.map +1 -0
- package/dist/project-url-key.js +39 -0
- package/dist/project-url-key.js.map +1 -0
- package/dist/railway-connection.d.ts +20 -0
- package/dist/railway-connection.d.ts.map +1 -0
- package/dist/railway-connection.js +7 -0
- package/dist/railway-connection.js.map +1 -0
- package/dist/remote-mcp-connectors.d.ts +11 -0
- package/dist/remote-mcp-connectors.d.ts.map +1 -0
- package/dist/remote-mcp-connectors.js +14 -0
- package/dist/remote-mcp-connectors.js.map +1 -0
- package/dist/remote-mcp-connectors.test.d.ts +2 -0
- package/dist/remote-mcp-connectors.test.d.ts.map +1 -0
- package/dist/remote-mcp-connectors.test.js +39 -0
- package/dist/remote-mcp-connectors.test.js.map +1 -0
- package/dist/resource-memberships.test.d.ts +2 -0
- package/dist/resource-memberships.test.d.ts.map +1 -0
- package/dist/resource-memberships.test.js +23 -0
- package/dist/resource-memberships.test.js.map +1 -0
- package/dist/responsible-user-denial.d.ts +46 -0
- package/dist/responsible-user-denial.d.ts.map +1 -0
- package/dist/responsible-user-denial.js +66 -0
- package/dist/responsible-user-denial.js.map +1 -0
- package/dist/responsible-user-denial.test.d.ts +2 -0
- package/dist/responsible-user-denial.test.d.ts.map +1 -0
- package/dist/responsible-user-denial.test.js +65 -0
- package/dist/responsible-user-denial.test.js.map +1 -0
- package/dist/retired-composio.d.ts +7 -0
- package/dist/retired-composio.d.ts.map +1 -0
- package/dist/retired-composio.js +7 -0
- package/dist/retired-composio.js.map +1 -0
- package/dist/routine-variables.d.ts +23 -0
- package/dist/routine-variables.d.ts.map +1 -0
- package/dist/routine-variables.js +127 -0
- package/dist/routine-variables.js.map +1 -0
- package/dist/routine-variables.test.d.ts +2 -0
- package/dist/routine-variables.test.d.ts.map +1 -0
- package/dist/routine-variables.test.js +98 -0
- package/dist/routine-variables.test.js.map +1 -0
- package/dist/runner-goal.d.ts +105 -0
- package/dist/runner-goal.d.ts.map +1 -0
- package/dist/runner-goal.js +74 -0
- package/dist/runner-goal.js.map +1 -0
- package/dist/runtime-exposure/loopback-bind.d.ts +52 -0
- package/dist/runtime-exposure/loopback-bind.d.ts.map +1 -0
- package/dist/runtime-exposure/loopback-bind.js +93 -0
- package/dist/runtime-exposure/loopback-bind.js.map +1 -0
- package/dist/runtime-exposure/loopback-bind.test.d.ts +2 -0
- package/dist/runtime-exposure/loopback-bind.test.d.ts.map +1 -0
- package/dist/runtime-exposure/loopback-bind.test.js +94 -0
- package/dist/runtime-exposure/loopback-bind.test.js.map +1 -0
- package/dist/runtime-exposure/ports.d.ts +61 -0
- package/dist/runtime-exposure/ports.d.ts.map +1 -0
- package/dist/runtime-exposure/ports.js +96 -0
- package/dist/runtime-exposure/ports.js.map +1 -0
- package/dist/runtime-exposure/ports.test.d.ts +2 -0
- package/dist/runtime-exposure/ports.test.d.ts.map +1 -0
- package/dist/runtime-exposure/ports.test.js +46 -0
- package/dist/runtime-exposure/ports.test.js.map +1 -0
- package/dist/self-serve-mcp-research.d.ts +5 -0
- package/dist/self-serve-mcp-research.d.ts.map +1 -0
- package/dist/self-serve-mcp-research.js +5 -0
- package/dist/self-serve-mcp-research.js.map +1 -0
- package/dist/self-serve-mcp-research.json +54 -0
- package/dist/setting-defaults.d.ts +72 -0
- package/dist/setting-defaults.d.ts.map +1 -0
- package/dist/setting-defaults.js +132 -0
- package/dist/setting-defaults.js.map +1 -0
- package/dist/setting-defaults.test.d.ts +2 -0
- package/dist/setting-defaults.test.d.ts.map +1 -0
- package/dist/setting-defaults.test.js +102 -0
- package/dist/setting-defaults.test.js.map +1 -0
- package/dist/settings-visibility.d.ts +86 -0
- package/dist/settings-visibility.d.ts.map +1 -0
- package/dist/settings-visibility.js +138 -0
- package/dist/settings-visibility.js.map +1 -0
- package/dist/settings-visibility.test.d.ts +2 -0
- package/dist/settings-visibility.test.d.ts.map +1 -0
- package/dist/settings-visibility.test.js +85 -0
- package/dist/settings-visibility.test.js.map +1 -0
- package/dist/slack-tools.d.ts +557 -0
- package/dist/slack-tools.d.ts.map +1 -0
- package/dist/slack-tools.js +146 -0
- package/dist/slack-tools.js.map +1 -0
- package/dist/summary-slot.test.d.ts +2 -0
- package/dist/summary-slot.test.d.ts.map +1 -0
- package/dist/summary-slot.test.js +76 -0
- package/dist/summary-slot.test.js.map +1 -0
- package/dist/telemetry/client-contract.test.d.ts +2 -0
- package/dist/telemetry/client-contract.test.d.ts.map +1 -0
- package/dist/telemetry/client-contract.test.js +166 -0
- package/dist/telemetry/client-contract.test.js.map +1 -0
- package/dist/telemetry/client-types.test.d.ts +2 -0
- package/dist/telemetry/client-types.test.d.ts.map +1 -0
- package/dist/telemetry/client-types.test.js +18 -0
- package/dist/telemetry/client-types.test.js.map +1 -0
- package/dist/telemetry/client.d.ts +101 -0
- package/dist/telemetry/client.d.ts.map +1 -0
- package/dist/telemetry/client.js +426 -0
- package/dist/telemetry/client.js.map +1 -0
- package/dist/telemetry/client.test.d.ts +2 -0
- package/dist/telemetry/client.test.d.ts.map +1 -0
- package/dist/telemetry/client.test.js +507 -0
- package/dist/telemetry/client.test.js.map +1 -0
- package/dist/telemetry/config.d.ts +35 -0
- package/dist/telemetry/config.d.ts.map +1 -0
- package/dist/telemetry/config.js +51 -0
- package/dist/telemetry/config.js.map +1 -0
- package/dist/telemetry/events.d.ts +103 -0
- package/dist/telemetry/events.d.ts.map +1 -0
- package/dist/telemetry/events.js +121 -0
- package/dist/telemetry/events.js.map +1 -0
- package/dist/telemetry/generated/paperclip-telemetry.d.ts +406 -0
- package/dist/telemetry/generated/paperclip-telemetry.d.ts.map +1 -0
- package/dist/telemetry/generated/paperclip-telemetry.js +297 -0
- package/dist/telemetry/generated/paperclip-telemetry.js.map +1 -0
- package/dist/telemetry/index.d.ts +10 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +6 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/proposed-connector-events.test.d.ts +2 -0
- package/dist/telemetry/proposed-connector-events.test.d.ts.map +1 -0
- package/dist/telemetry/proposed-connector-events.test.js +96 -0
- package/dist/telemetry/proposed-connector-events.test.js.map +1 -0
- package/dist/telemetry/readme-contract.test.d.ts +2 -0
- package/dist/telemetry/readme-contract.test.d.ts.map +1 -0
- package/dist/telemetry/readme-contract.test.js +17 -0
- package/dist/telemetry/readme-contract.test.js.map +1 -0
- package/dist/telemetry/retention.d.ts +44 -0
- package/dist/telemetry/retention.d.ts.map +1 -0
- package/dist/telemetry/retention.js +46 -0
- package/dist/telemetry/retention.js.map +1 -0
- package/dist/telemetry/retention.test.d.ts +2 -0
- package/dist/telemetry/retention.test.d.ts.map +1 -0
- package/dist/telemetry/retention.test.js +20 -0
- package/dist/telemetry/retention.test.js.map +1 -0
- package/dist/telemetry/state.d.ts +3 -0
- package/dist/telemetry/state.d.ts.map +1 -0
- package/dist/telemetry/state.js +28 -0
- package/dist/telemetry/state.js.map +1 -0
- package/dist/telemetry/types.d.ts +62 -0
- package/dist/telemetry/types.d.ts.map +1 -0
- package/dist/telemetry/types.js +2 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/trust-policy.d.ts +68 -0
- package/dist/trust-policy.d.ts.map +1 -0
- package/dist/trust-policy.js +11 -0
- package/dist/trust-policy.js.map +1 -0
- package/dist/types/access.d.ts +142 -0
- package/dist/types/access.d.ts.map +1 -0
- package/dist/types/access.js +2 -0
- package/dist/types/access.js.map +1 -0
- package/dist/types/activity.d.ts +15 -0
- package/dist/types/activity.d.ts.map +1 -0
- package/dist/types/activity.js +2 -0
- package/dist/types/activity.js.map +1 -0
- package/dist/types/adapter-registry.d.ts +31 -0
- package/dist/types/adapter-registry.d.ts.map +1 -0
- package/dist/types/adapter-registry.js +2 -0
- package/dist/types/adapter-registry.js.map +1 -0
- package/dist/types/adapter-skills.d.ts +38 -0
- package/dist/types/adapter-skills.d.ts.map +1 -0
- package/dist/types/adapter-skills.js +2 -0
- package/dist/types/adapter-skills.js.map +1 -0
- package/dist/types/agent.adapter-auth-session.test.d.ts +2 -0
- package/dist/types/agent.adapter-auth-session.test.d.ts.map +1 -0
- package/dist/types/agent.adapter-auth-session.test.js +103 -0
- package/dist/types/agent.adapter-auth-session.test.js.map +1 -0
- package/dist/types/agent.d.ts +194 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +51 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/app-definition.d.ts +153 -0
- package/dist/types/app-definition.d.ts.map +1 -0
- package/dist/types/app-definition.js +2 -0
- package/dist/types/app-definition.js.map +1 -0
- package/dist/types/approval.d.ts +26 -0
- package/dist/types/approval.d.ts.map +1 -0
- package/dist/types/approval.js +2 -0
- package/dist/types/approval.js.map +1 -0
- package/dist/types/artifact.d.ts +52 -0
- package/dist/types/artifact.d.ts.map +1 -0
- package/dist/types/artifact.js +2 -0
- package/dist/types/artifact.js.map +1 -0
- package/dist/types/asset.d.ts +16 -0
- package/dist/types/asset.d.ts.map +1 -0
- package/dist/types/asset.js +2 -0
- package/dist/types/asset.js.map +1 -0
- package/dist/types/attention.d.ts +222 -0
- package/dist/types/attention.d.ts.map +1 -0
- package/dist/types/attention.js +15 -0
- package/dist/types/attention.js.map +1 -0
- package/dist/types/budget.d.ts +86 -0
- package/dist/types/budget.d.ts.map +1 -0
- package/dist/types/budget.js +2 -0
- package/dist/types/budget.js.map +1 -0
- package/dist/types/chat-channels.d.ts +402 -0
- package/dist/types/chat-channels.d.ts.map +1 -0
- package/dist/types/chat-channels.js +105 -0
- package/dist/types/chat-channels.js.map +1 -0
- package/dist/types/chat-github.d.ts +123 -0
- package/dist/types/chat-github.d.ts.map +1 -0
- package/dist/types/chat-github.js +55 -0
- package/dist/types/chat-github.js.map +1 -0
- package/dist/types/company-portability.d.ts +408 -0
- package/dist/types/company-portability.d.ts.map +1 -0
- package/dist/types/company-portability.js +2 -0
- package/dist/types/company-portability.js.map +1 -0
- package/dist/types/company-skill.d.ts +623 -0
- package/dist/types/company-skill.d.ts.map +1 -0
- package/dist/types/company-skill.js +2 -0
- package/dist/types/company-skill.js.map +1 -0
- package/dist/types/company.d.ts +30 -0
- package/dist/types/company.d.ts.map +1 -0
- package/dist/types/company.js +2 -0
- package/dist/types/company.js.map +1 -0
- package/dist/types/connection-intent.d.ts +53 -0
- package/dist/types/connection-intent.d.ts.map +1 -0
- package/dist/types/connection-intent.js +2 -0
- package/dist/types/connection-intent.js.map +1 -0
- package/dist/types/cost.d.ts +126 -0
- package/dist/types/cost.d.ts.map +1 -0
- package/dist/types/cost.js +2 -0
- package/dist/types/cost.js.map +1 -0
- package/dist/types/dashboard.d.ts +54 -0
- package/dist/types/dashboard.d.ts.map +1 -0
- package/dist/types/dashboard.js +2 -0
- package/dist/types/dashboard.js.map +1 -0
- package/dist/types/decision-queue.d.ts +55 -0
- package/dist/types/decision-queue.d.ts.map +1 -0
- package/dist/types/decision-queue.js +2 -0
- package/dist/types/decision-queue.js.map +1 -0
- package/dist/types/decision-training.d.ts +65 -0
- package/dist/types/decision-training.d.ts.map +1 -0
- package/dist/types/decision-training.js +2 -0
- package/dist/types/decision-training.js.map +1 -0
- package/dist/types/decision.d.ts +100 -0
- package/dist/types/decision.d.ts.map +1 -0
- package/dist/types/decision.js +15 -0
- package/dist/types/decision.js.map +1 -0
- package/dist/types/document-annotation.d.ts +223 -0
- package/dist/types/document-annotation.d.ts.map +1 -0
- package/dist/types/document-annotation.js +2 -0
- package/dist/types/document-annotation.js.map +1 -0
- package/dist/types/email.d.ts +50 -0
- package/dist/types/email.d.ts.map +1 -0
- package/dist/types/email.js +2 -0
- package/dist/types/email.js.map +1 -0
- package/dist/types/environment.d.ts +150 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +2 -0
- package/dist/types/environment.js.map +1 -0
- package/dist/types/execution-continuation.d.ts +67 -0
- package/dist/types/execution-continuation.d.ts.map +1 -0
- package/dist/types/execution-continuation.js +2 -0
- package/dist/types/execution-continuation.js.map +1 -0
- package/dist/types/execution-projection.d.ts +33 -0
- package/dist/types/execution-projection.d.ts.map +1 -0
- package/dist/types/execution-projection.js +24 -0
- package/dist/types/execution-projection.js.map +1 -0
- package/dist/types/external-object.d.ts +84 -0
- package/dist/types/external-object.d.ts.map +1 -0
- package/dist/types/external-object.js +2 -0
- package/dist/types/external-object.js.map +1 -0
- package/dist/types/feedback.d.ts +95 -0
- package/dist/types/feedback.d.ts.map +1 -0
- package/dist/types/feedback.js +7 -0
- package/dist/types/feedback.js.map +1 -0
- package/dist/types/finance.d.ts +57 -0
- package/dist/types/finance.d.ts.map +1 -0
- package/dist/types/finance.js +2 -0
- package/dist/types/finance.js.map +1 -0
- package/dist/types/folder.d.ts +52 -0
- package/dist/types/folder.d.ts.map +1 -0
- package/dist/types/folder.js +2 -0
- package/dist/types/folder.js.map +1 -0
- package/dist/types/goal.d.ts +14 -0
- package/dist/types/goal.d.ts.map +1 -0
- package/dist/types/goal.js +2 -0
- package/dist/types/goal.js.map +1 -0
- package/dist/types/heartbeat.d.ts +325 -0
- package/dist/types/heartbeat.d.ts.map +1 -0
- package/dist/types/heartbeat.js +2 -0
- package/dist/types/heartbeat.js.map +1 -0
- package/dist/types/inbox-agent-policy.d.ts +12 -0
- package/dist/types/inbox-agent-policy.d.ts.map +1 -0
- package/dist/types/inbox-agent-policy.js +2 -0
- package/dist/types/inbox-agent-policy.js.map +1 -0
- package/dist/types/inbox-dismissal.d.ts +13 -0
- package/dist/types/inbox-dismissal.d.ts.map +1 -0
- package/dist/types/inbox-dismissal.js +2 -0
- package/dist/types/inbox-dismissal.js.map +1 -0
- package/dist/types/index.d.ts +69 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance.d.ts +170 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/instance.js +10 -0
- package/dist/types/instance.js.map +1 -0
- package/dist/types/issue-tree-control.d.ts +109 -0
- package/dist/types/issue-tree-control.d.ts.map +1 -0
- package/dist/types/issue-tree-control.js +2 -0
- package/dist/types/issue-tree-control.js.map +1 -0
- package/dist/types/issue.d.ts +1312 -0
- package/dist/types/issue.d.ts.map +1 -0
- package/dist/types/issue.js +2 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/live.d.ts +9 -0
- package/dist/types/live.d.ts.map +1 -0
- package/dist/types/live.js +2 -0
- package/dist/types/live.js.map +1 -0
- package/dist/types/native-finalization.d.ts +29 -0
- package/dist/types/native-finalization.d.ts.map +1 -0
- package/dist/types/native-finalization.js +2 -0
- package/dist/types/native-finalization.js.map +1 -0
- package/dist/types/pipeline.d.ts +268 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +2 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types/plugin.d.ts +894 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/project.d.ts +116 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/quota.d.ts +28 -0
- package/dist/types/quota.d.ts.map +1 -0
- package/dist/types/quota.js +2 -0
- package/dist/types/quota.js.map +1 -0
- package/dist/types/resource-memberships.d.ts +26 -0
- package/dist/types/resource-memberships.d.ts.map +1 -0
- package/dist/types/resource-memberships.js +2 -0
- package/dist/types/resource-memberships.js.map +1 -0
- package/dist/types/routine.d.ts +237 -0
- package/dist/types/routine.d.ts.map +1 -0
- package/dist/types/routine.js +2 -0
- package/dist/types/routine.js.map +1 -0
- package/dist/types/runtime-exposure.d.ts +74 -0
- package/dist/types/runtime-exposure.d.ts.map +1 -0
- package/dist/types/runtime-exposure.js +12 -0
- package/dist/types/runtime-exposure.js.map +1 -0
- package/dist/types/search.d.ts +135 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/search.js +6 -0
- package/dist/types/search.js.map +1 -0
- package/dist/types/secrets.d.ts +374 -0
- package/dist/types/secrets.d.ts.map +1 -0
- package/dist/types/secrets.js +2 -0
- package/dist/types/secrets.js.map +1 -0
- package/dist/types/server-info.d.ts +27 -0
- package/dist/types/server-info.d.ts.map +1 -0
- package/dist/types/server-info.js +2 -0
- package/dist/types/server-info.js.map +1 -0
- package/dist/types/sidebar-badges.d.ts +7 -0
- package/dist/types/sidebar-badges.d.ts.map +1 -0
- package/dist/types/sidebar-badges.js +2 -0
- package/dist/types/sidebar-badges.js.map +1 -0
- package/dist/types/sidebar-preferences.d.ts +5 -0
- package/dist/types/sidebar-preferences.d.ts.map +1 -0
- package/dist/types/sidebar-preferences.js +2 -0
- package/dist/types/sidebar-preferences.js.map +1 -0
- package/dist/types/smoke-lab.d.ts +41 -0
- package/dist/types/smoke-lab.d.ts.map +1 -0
- package/dist/types/smoke-lab.js +5 -0
- package/dist/types/smoke-lab.js.map +1 -0
- package/dist/types/summary-slot.d.ts +91 -0
- package/dist/types/summary-slot.d.ts.map +1 -0
- package/dist/types/summary-slot.js +2 -0
- package/dist/types/summary-slot.js.map +1 -0
- package/dist/types/teams-catalog.d.ts +163 -0
- package/dist/types/teams-catalog.d.ts.map +1 -0
- package/dist/types/teams-catalog.js +2 -0
- package/dist/types/teams-catalog.js.map +1 -0
- package/dist/types/tool-access.d.ts +1515 -0
- package/dist/types/tool-access.d.ts.map +1 -0
- package/dist/types/tool-access.js +13 -0
- package/dist/types/tool-access.js.map +1 -0
- package/dist/types/user-profile.d.ts +81 -0
- package/dist/types/user-profile.d.ts.map +1 -0
- package/dist/types/user-profile.js +2 -0
- package/dist/types/user-profile.js.map +1 -0
- package/dist/types/work-product.d.ts +57 -0
- package/dist/types/work-product.d.ts.map +1 -0
- package/dist/types/work-product.js +2 -0
- package/dist/types/work-product.js.map +1 -0
- package/dist/types/work-timeline.d.ts +77 -0
- package/dist/types/work-timeline.d.ts.map +1 -0
- package/dist/types/work-timeline.js +2 -0
- package/dist/types/work-timeline.js.map +1 -0
- package/dist/types/workspace-file-resource.d.ts +138 -0
- package/dist/types/workspace-file-resource.d.ts.map +1 -0
- package/dist/types/workspace-file-resource.js +2 -0
- package/dist/types/workspace-file-resource.js.map +1 -0
- package/dist/types/workspace-operation.d.ts +27 -0
- package/dist/types/workspace-operation.d.ts.map +1 -0
- package/dist/types/workspace-operation.js +2 -0
- package/dist/types/workspace-operation.js.map +1 -0
- package/dist/types/workspace-readiness.d.ts +74 -0
- package/dist/types/workspace-readiness.d.ts.map +1 -0
- package/dist/types/workspace-readiness.js +28 -0
- package/dist/types/workspace-readiness.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +365 -0
- package/dist/types/workspace-runtime.d.ts.map +1 -0
- package/dist/types/workspace-runtime.js +2 -0
- package/dist/types/workspace-runtime.js.map +1 -0
- package/dist/validators/access.d.ts +215 -0
- package/dist/validators/access.d.ts.map +1 -0
- package/dist/validators/access.js +146 -0
- package/dist/validators/access.js.map +1 -0
- package/dist/validators/access.test.d.ts +2 -0
- package/dist/validators/access.test.d.ts.map +1 -0
- package/dist/validators/access.test.js +166 -0
- package/dist/validators/access.test.js.map +1 -0
- package/dist/validators/adapter-auth-session.d.ts +118 -0
- package/dist/validators/adapter-auth-session.d.ts.map +1 -0
- package/dist/validators/adapter-auth-session.js +37 -0
- package/dist/validators/adapter-auth-session.js.map +1 -0
- package/dist/validators/adapter-registry.d.ts +21 -0
- package/dist/validators/adapter-registry.d.ts.map +1 -0
- package/dist/validators/adapter-registry.js +14 -0
- package/dist/validators/adapter-registry.js.map +1 -0
- package/dist/validators/adapter-registry.test.d.ts +2 -0
- package/dist/validators/adapter-registry.test.d.ts.map +1 -0
- package/dist/validators/adapter-registry.test.js +31 -0
- package/dist/validators/adapter-registry.test.js.map +1 -0
- package/dist/validators/adapter-skills.d.ts +114 -0
- package/dist/validators/adapter-skills.d.ts.map +1 -0
- package/dist/validators/adapter-skills.js +62 -0
- package/dist/validators/adapter-skills.js.map +1 -0
- package/dist/validators/agent.d.ts +884 -0
- package/dist/validators/agent.d.ts.map +1 -0
- package/dist/validators/agent.js +224 -0
- package/dist/validators/agent.js.map +1 -0
- package/dist/validators/app-definition.d.ts +965 -0
- package/dist/validators/app-definition.d.ts.map +1 -0
- package/dist/validators/app-definition.js +39 -0
- package/dist/validators/app-definition.js.map +1 -0
- package/dist/validators/approval.d.ts +30 -0
- package/dist/validators/approval.d.ts.map +1 -0
- package/dist/validators/approval.js +22 -0
- package/dist/validators/approval.js.map +1 -0
- package/dist/validators/approval.test.d.ts +2 -0
- package/dist/validators/approval.test.d.ts.map +1 -0
- package/dist/validators/approval.test.js +25 -0
- package/dist/validators/approval.test.js.map +1 -0
- package/dist/validators/artifact.d.ts +305 -0
- package/dist/validators/artifact.d.ts.map +1 -0
- package/dist/validators/artifact.js +71 -0
- package/dist/validators/artifact.js.map +1 -0
- package/dist/validators/artifact.test.d.ts +2 -0
- package/dist/validators/artifact.test.d.ts.map +1 -0
- package/dist/validators/artifact.test.js +76 -0
- package/dist/validators/artifact.test.js.map +1 -0
- package/dist/validators/asset.d.ts +21 -0
- package/dist/validators/asset.d.ts.map +1 -0
- package/dist/validators/asset.js +70 -0
- package/dist/validators/asset.js.map +1 -0
- package/dist/validators/asset.test.d.ts +2 -0
- package/dist/validators/asset.test.d.ts.map +1 -0
- package/dist/validators/asset.test.js +130 -0
- package/dist/validators/asset.test.js.map +1 -0
- package/dist/validators/budget.d.ts +32 -0
- package/dist/validators/budget.d.ts.map +1 -0
- package/dist/validators/budget.js +27 -0
- package/dist/validators/budget.js.map +1 -0
- package/dist/validators/chat-channels.d.ts +215 -0
- package/dist/validators/chat-channels.d.ts.map +1 -0
- package/dist/validators/chat-channels.js +181 -0
- package/dist/validators/chat-channels.js.map +1 -0
- package/dist/validators/chat-channels.test.d.ts +2 -0
- package/dist/validators/chat-channels.test.d.ts.map +1 -0
- package/dist/validators/chat-channels.test.js +84 -0
- package/dist/validators/chat-channels.test.js.map +1 -0
- package/dist/validators/chat-github.d.ts +315 -0
- package/dist/validators/chat-github.d.ts.map +1 -0
- package/dist/validators/chat-github.js +149 -0
- package/dist/validators/chat-github.js.map +1 -0
- package/dist/validators/claude-setup-token-session.d.ts +160 -0
- package/dist/validators/claude-setup-token-session.d.ts.map +1 -0
- package/dist/validators/claude-setup-token-session.js +131 -0
- package/dist/validators/claude-setup-token-session.js.map +1 -0
- package/dist/validators/claude-setup-token-session.test.d.ts +2 -0
- package/dist/validators/claude-setup-token-session.test.d.ts.map +1 -0
- package/dist/validators/claude-setup-token-session.test.js +107 -0
- package/dist/validators/claude-setup-token-session.test.js.map +1 -0
- package/dist/validators/company-portability.d.ts +913 -0
- package/dist/validators/company-portability.d.ts.map +1 -0
- package/dist/validators/company-portability.js +301 -0
- package/dist/validators/company-portability.js.map +1 -0
- package/dist/validators/company-skill.d.ts +1450 -0
- package/dist/validators/company-skill.d.ts.map +1 -0
- package/dist/validators/company-skill.js +520 -0
- package/dist/validators/company-skill.js.map +1 -0
- package/dist/validators/company-skill.test.d.ts +2 -0
- package/dist/validators/company-skill.test.d.ts.map +1 -0
- package/dist/validators/company-skill.test.js +165 -0
- package/dist/validators/company-skill.test.js.map +1 -0
- package/dist/validators/company.d.ts +198 -0
- package/dist/validators/company.d.ts.map +1 -0
- package/dist/validators/company.js +46 -0
- package/dist/validators/company.js.map +1 -0
- package/dist/validators/company.test.d.ts +2 -0
- package/dist/validators/company.test.d.ts.map +1 -0
- package/dist/validators/company.test.js +60 -0
- package/dist/validators/company.test.js.map +1 -0
- package/dist/validators/connection-intent.d.ts +18 -0
- package/dist/validators/connection-intent.d.ts.map +1 -0
- package/dist/validators/connection-intent.js +14 -0
- package/dist/validators/connection-intent.js.map +1 -0
- package/dist/validators/connection-intent.test.d.ts +2 -0
- package/dist/validators/connection-intent.test.d.ts.map +1 -0
- package/dist/validators/connection-intent.test.js +55 -0
- package/dist/validators/connection-intent.test.js.map +1 -0
- package/dist/validators/cost.d.ts +69 -0
- package/dist/validators/cost.d.ts.map +1 -0
- package/dist/validators/cost.js +27 -0
- package/dist/validators/cost.js.map +1 -0
- package/dist/validators/decision-queue.d.ts +90 -0
- package/dist/validators/decision-queue.d.ts.map +1 -0
- package/dist/validators/decision-queue.js +60 -0
- package/dist/validators/decision-queue.js.map +1 -0
- package/dist/validators/decision.d.ts +403 -0
- package/dist/validators/decision.d.ts.map +1 -0
- package/dist/validators/decision.js +130 -0
- package/dist/validators/decision.js.map +1 -0
- package/dist/validators/document-annotation.d.ts +74 -0
- package/dist/validators/document-annotation.d.ts.map +1 -0
- package/dist/validators/document-annotation.js +53 -0
- package/dist/validators/document-annotation.js.map +1 -0
- package/dist/validators/email.d.ts +43 -0
- package/dist/validators/email.d.ts.map +1 -0
- package/dist/validators/email.js +70 -0
- package/dist/validators/email.js.map +1 -0
- package/dist/validators/environment-custom-images.d.ts +140 -0
- package/dist/validators/environment-custom-images.d.ts.map +1 -0
- package/dist/validators/environment-custom-images.js +80 -0
- package/dist/validators/environment-custom-images.js.map +1 -0
- package/dist/validators/environment.d.ts +129 -0
- package/dist/validators/environment.d.ts.map +1 -0
- package/dist/validators/environment.js +35 -0
- package/dist/validators/environment.js.map +1 -0
- package/dist/validators/execution-workspace.d.ts +304 -0
- package/dist/validators/execution-workspace.d.ts.map +1 -0
- package/dist/validators/execution-workspace.js +161 -0
- package/dist/validators/execution-workspace.js.map +1 -0
- package/dist/validators/external-object.d.ts +70 -0
- package/dist/validators/external-object.d.ts.map +1 -0
- package/dist/validators/external-object.js +25 -0
- package/dist/validators/external-object.js.map +1 -0
- package/dist/validators/feedback.d.ts +35 -0
- package/dist/validators/feedback.d.ts.map +1 -0
- package/dist/validators/feedback.js +14 -0
- package/dist/validators/feedback.js.map +1 -0
- package/dist/validators/finance.d.ts +126 -0
- package/dist/validators/finance.d.ts.map +1 -0
- package/dist/validators/finance.js +32 -0
- package/dist/validators/finance.js.map +1 -0
- package/dist/validators/folder.d.ts +108 -0
- package/dist/validators/folder.d.ts.map +1 -0
- package/dist/validators/folder.js +56 -0
- package/dist/validators/folder.js.map +1 -0
- package/dist/validators/goal.d.ts +40 -0
- package/dist/validators/goal.d.ts.map +1 -0
- package/dist/validators/goal.js +13 -0
- package/dist/validators/goal.js.map +1 -0
- package/dist/validators/inbox-agent-policy.d.ts +16 -0
- package/dist/validators/inbox-agent-policy.d.ts.map +1 -0
- package/dist/validators/inbox-agent-policy.js +15 -0
- package/dist/validators/inbox-agent-policy.js.map +1 -0
- package/dist/validators/index.d.ts +50 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +50 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/instance.d.ts +200 -0
- package/dist/validators/instance.d.ts.map +1 -0
- package/dist/validators/instance.js +112 -0
- package/dist/validators/instance.js.map +1 -0
- package/dist/validators/instance.test.d.ts +2 -0
- package/dist/validators/instance.test.d.ts.map +1 -0
- package/dist/validators/instance.test.js +137 -0
- package/dist/validators/instance.test.js.map +1 -0
- package/dist/validators/issue-tree-control.d.ts +61 -0
- package/dist/validators/issue-tree-control.d.ts.map +1 -0
- package/dist/validators/issue-tree-control.js +31 -0
- package/dist/validators/issue-tree-control.js.map +1 -0
- package/dist/validators/issue.d.ts +3028 -0
- package/dist/validators/issue.d.ts.map +1 -0
- package/dist/validators/issue.js +1824 -0
- package/dist/validators/issue.js.map +1 -0
- package/dist/validators/issue.test.d.ts +2 -0
- package/dist/validators/issue.test.d.ts.map +1 -0
- package/dist/validators/issue.test.js +454 -0
- package/dist/validators/issue.test.js.map +1 -0
- package/dist/validators/native-finalization.d.ts +91 -0
- package/dist/validators/native-finalization.d.ts.map +1 -0
- package/dist/validators/native-finalization.js +33 -0
- package/dist/validators/native-finalization.js.map +1 -0
- package/dist/validators/native-finalization.test.d.ts +2 -0
- package/dist/validators/native-finalization.test.d.ts.map +1 -0
- package/dist/validators/native-finalization.test.js +52 -0
- package/dist/validators/native-finalization.test.js.map +1 -0
- package/dist/validators/onboarding-seed.d.ts +30 -0
- package/dist/validators/onboarding-seed.d.ts.map +1 -0
- package/dist/validators/onboarding-seed.js +33 -0
- package/dist/validators/onboarding-seed.js.map +1 -0
- package/dist/validators/partial.d.ts +4 -0
- package/dist/validators/partial.d.ts.map +1 -0
- package/dist/validators/partial.js +35 -0
- package/dist/validators/partial.js.map +1 -0
- package/dist/validators/pipeline.d.ts +358 -0
- package/dist/validators/pipeline.d.ts.map +1 -0
- package/dist/validators/pipeline.js +133 -0
- package/dist/validators/pipeline.js.map +1 -0
- package/dist/validators/plugin.d.ts +1257 -0
- package/dist/validators/plugin.d.ts.map +1 -0
- package/dist/validators/plugin.js +1067 -0
- package/dist/validators/plugin.js.map +1 -0
- package/dist/validators/plugin.test.d.ts +2 -0
- package/dist/validators/plugin.test.d.ts.map +1 -0
- package/dist/validators/plugin.test.js +352 -0
- package/dist/validators/plugin.test.js.map +1 -0
- package/dist/validators/project.d.ts +510 -0
- package/dist/validators/project.d.ts.map +1 -0
- package/dist/validators/project.js +111 -0
- package/dist/validators/project.js.map +1 -0
- package/dist/validators/provider-trace.d.ts +135 -0
- package/dist/validators/provider-trace.d.ts.map +1 -0
- package/dist/validators/provider-trace.js +108 -0
- package/dist/validators/provider-trace.js.map +1 -0
- package/dist/validators/resource-memberships.d.ts +18 -0
- package/dist/validators/resource-memberships.d.ts.map +1 -0
- package/dist/validators/resource-memberships.js +16 -0
- package/dist/validators/resource-memberships.js.map +1 -0
- package/dist/validators/routine.d.ts +566 -0
- package/dist/validators/routine.d.ts.map +1 -0
- package/dist/validators/routine.js +151 -0
- package/dist/validators/routine.js.map +1 -0
- package/dist/validators/routine.test.d.ts +2 -0
- package/dist/validators/routine.test.d.ts.map +1 -0
- package/dist/validators/routine.test.js +115 -0
- package/dist/validators/routine.test.js.map +1 -0
- package/dist/validators/runtime-exposure.d.ts +100 -0
- package/dist/validators/runtime-exposure.d.ts.map +1 -0
- package/dist/validators/runtime-exposure.js +138 -0
- package/dist/validators/runtime-exposure.js.map +1 -0
- package/dist/validators/runtime-exposure.test.d.ts +2 -0
- package/dist/validators/runtime-exposure.test.d.ts.map +1 -0
- package/dist/validators/runtime-exposure.test.js +112 -0
- package/dist/validators/runtime-exposure.test.js.map +1 -0
- package/dist/validators/search.d.ts +40 -0
- package/dist/validators/search.d.ts.map +1 -0
- package/dist/validators/search.js +233 -0
- package/dist/validators/search.js.map +1 -0
- package/dist/validators/secret.d.ts +359 -0
- package/dist/validators/secret.d.ts.map +1 -0
- package/dist/validators/secret.js +344 -0
- package/dist/validators/secret.js.map +1 -0
- package/dist/validators/secret.test.d.ts +2 -0
- package/dist/validators/secret.test.d.ts.map +1 -0
- package/dist/validators/secret.test.js +208 -0
- package/dist/validators/secret.test.js.map +1 -0
- package/dist/validators/sidebar-preferences.d.ts +10 -0
- package/dist/validators/sidebar-preferences.d.ts.map +1 -0
- package/dist/validators/sidebar-preferences.js +10 -0
- package/dist/validators/sidebar-preferences.js.map +1 -0
- package/dist/validators/skill-policy.d.ts +248 -0
- package/dist/validators/skill-policy.d.ts.map +1 -0
- package/dist/validators/skill-policy.js +123 -0
- package/dist/validators/skill-policy.js.map +1 -0
- package/dist/validators/skill-policy.test.d.ts +2 -0
- package/dist/validators/skill-policy.test.d.ts.map +1 -0
- package/dist/validators/skill-policy.test.js +92 -0
- package/dist/validators/skill-policy.test.js.map +1 -0
- package/dist/validators/smoke-lab.d.ts +67 -0
- package/dist/validators/smoke-lab.d.ts.map +1 -0
- package/dist/validators/smoke-lab.js +23 -0
- package/dist/validators/smoke-lab.js.map +1 -0
- package/dist/validators/status-card.d.ts +329 -0
- package/dist/validators/status-card.d.ts.map +1 -0
- package/dist/validators/status-card.js +166 -0
- package/dist/validators/status-card.js.map +1 -0
- package/dist/validators/status-card.test.d.ts +2 -0
- package/dist/validators/status-card.test.d.ts.map +1 -0
- package/dist/validators/status-card.test.js +23 -0
- package/dist/validators/status-card.test.js.map +1 -0
- package/dist/validators/summary-slot.d.ts +46 -0
- package/dist/validators/summary-slot.d.ts.map +1 -0
- package/dist/validators/summary-slot.js +51 -0
- package/dist/validators/summary-slot.js.map +1 -0
- package/dist/validators/teams-catalog.d.ts +322 -0
- package/dist/validators/teams-catalog.d.ts.map +1 -0
- package/dist/validators/teams-catalog.js +147 -0
- package/dist/validators/teams-catalog.js.map +1 -0
- package/dist/validators/text.d.ts +4 -0
- package/dist/validators/text.d.ts.map +1 -0
- package/dist/validators/text.js +9 -0
- package/dist/validators/text.js.map +1 -0
- package/dist/validators/tool-access.d.ts +1925 -0
- package/dist/validators/tool-access.d.ts.map +1 -0
- package/dist/validators/tool-access.js +819 -0
- package/dist/validators/tool-access.js.map +1 -0
- package/dist/validators/tool-access.test.d.ts +2 -0
- package/dist/validators/tool-access.test.d.ts.map +1 -0
- package/dist/validators/tool-access.test.js +172 -0
- package/dist/validators/tool-access.test.js.map +1 -0
- package/dist/validators/trust-policy.d.ts +120 -0
- package/dist/validators/trust-policy.d.ts.map +1 -0
- package/dist/validators/trust-policy.js +59 -0
- package/dist/validators/trust-policy.js.map +1 -0
- package/dist/validators/trust-policy.test.d.ts +2 -0
- package/dist/validators/trust-policy.test.d.ts.map +1 -0
- package/dist/validators/trust-policy.test.js +26 -0
- package/dist/validators/trust-policy.test.js.map +1 -0
- package/dist/validators/work-product.d.ts +178 -0
- package/dist/validators/work-product.d.ts.map +1 -0
- package/dist/validators/work-product.js +88 -0
- package/dist/validators/work-product.js.map +1 -0
- package/dist/validators/work-product.test.d.ts +2 -0
- package/dist/validators/work-product.test.d.ts.map +1 -0
- package/dist/validators/work-product.test.js +38 -0
- package/dist/validators/work-product.test.js.map +1 -0
- package/dist/validators/workspace-file-resource.d.ts +268 -0
- package/dist/validators/workspace-file-resource.d.ts.map +1 -0
- package/dist/validators/workspace-file-resource.js +116 -0
- package/dist/validators/workspace-file-resource.js.map +1 -0
- package/dist/work-product.test.d.ts +2 -0
- package/dist/work-product.test.d.ts.map +1 -0
- package/dist/work-product.test.js +120 -0
- package/dist/work-product.test.js.map +1 -0
- package/dist/workspace-commands.d.ts +9 -0
- package/dist/workspace-commands.d.ts.map +1 -0
- package/dist/workspace-commands.js +177 -0
- package/dist/workspace-commands.js.map +1 -0
- package/dist/workspace-commands.test.d.ts +2 -0
- package/dist/workspace-commands.test.d.ts.map +1 -0
- package/dist/workspace-commands.test.js +155 -0
- package/dist/workspace-commands.test.js.map +1 -0
- package/dist/workspace-file-resource.test.d.ts +2 -0
- package/dist/workspace-file-resource.test.d.ts.map +1 -0
- package/dist/workspace-file-resource.test.js +52 -0
- package/dist/workspace-file-resource.test.js.map +1 -0
- package/dist/worktree-port-registry.d.ts +5 -0
- package/dist/worktree-port-registry.d.ts.map +1 -0
- package/dist/worktree-port-registry.js +382 -0
- package/dist/worktree-port-registry.js.map +1 -0
- package/dist/worktree-port-registry.test.d.ts +2 -0
- package/dist/worktree-port-registry.test.d.ts.map +1 -0
- package/dist/worktree-port-registry.test.js +118 -0
- package/dist/worktree-port-registry.test.js.map +1 -0
- package/dist/worktree-seed-source.d.ts +43 -0
- package/dist/worktree-seed-source.d.ts.map +1 -0
- package/dist/worktree-seed-source.js +180 -0
- package/dist/worktree-seed-source.js.map +1 -0
- package/dist/worktree-seed-source.test.d.ts +2 -0
- package/dist/worktree-seed-source.test.d.ts.map +1 -0
- package/dist/worktree-seed-source.test.js +166 -0
- package/dist/worktree-seed-source.test.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,1824 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ISSUE_EXECUTION_DECISION_OUTCOMES, ISSUE_EXECUTION_MONITOR_CLEAR_REASONS, ISSUE_EXECUTION_MONITOR_KINDS, ISSUE_EXECUTION_MONITOR_RECOVERY_POLICIES, ISSUE_EXECUTION_MONITOR_STATE_STATUSES, ISSUE_EXECUTION_POLICY_MODES, ISSUE_EXECUTION_STAGE_TYPES, ISSUE_EXECUTION_STATE_STATUSES, ISSUE_COMMENT_AUTHOR_TYPES, ISSUE_COMMENT_METADATA_ROW_TYPES, ISSUE_COMMENT_PRESENTATION_KINDS, ISSUE_COMMENT_PRESENTATION_TONES, ISSUE_COMMENT_PRESENTATION_DENSITIES, ISSUE_HARNESS_KINDS, ISSUE_MONITOR_SCHEDULED_BY, ISSUE_PRIORITIES, ISSUE_RECOVERY_ACTION_KINDS, ISSUE_RECOVERY_ACTION_OUTCOMES, ISSUE_RECOVERY_ACTION_OWNER_TYPES, ISSUE_RECOVERY_ACTION_STATUSES, ISSUE_REVIEW_POLICIES, ISSUE_WORK_MODES, clampIssueRequestDepth, ISSUE_STATUSES, ISSUE_THREAD_INTERACTION_CONTINUATION_POLICIES, ISSUE_THREAD_INTERACTION_CANONICAL_RESOLVER_POLICIES, ISSUE_THREAD_INTERACTION_EFFECTIVE_RESOLVER_POLICY_SOURCES, ISSUE_THREAD_INTERACTION_KINDS, ISSUE_THREAD_INTERACTION_RESOLVER_POLICIES, ISSUE_THREAD_INTERACTION_RESOLVER_POLICY_PROVENANCES, ISSUE_THREAD_INTERACTION_STATUSES, ISSUE_WATCHDOG_DISCOVERY_KINDS, REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT, REQUEST_ITEM_VERDICTS_ITEM_LIMIT, } from "../constants.js";
|
|
3
|
+
import { multilineTextSchema } from "./text.js";
|
|
4
|
+
import { lowTrustReviewPresetPolicySchema, trustAuthorizationPolicySchema, } from "./trust-policy.js";
|
|
5
|
+
import { objectWithoutDefaults } from "./partial.js";
|
|
6
|
+
export const issueBlockedInboxStateSchema = z.enum([
|
|
7
|
+
"needs_attention",
|
|
8
|
+
"awaiting_decision",
|
|
9
|
+
"external_wait",
|
|
10
|
+
"recovery_open",
|
|
11
|
+
"missing_disposition",
|
|
12
|
+
]);
|
|
13
|
+
export const issueBlockedInboxSeveritySchema = z.enum([
|
|
14
|
+
"critical",
|
|
15
|
+
"high",
|
|
16
|
+
"medium",
|
|
17
|
+
"low",
|
|
18
|
+
]);
|
|
19
|
+
export const issueBlockedInboxReasonSchema = z.enum([
|
|
20
|
+
"blocked_by_unassigned_issue",
|
|
21
|
+
"blocked_by_assigned_backlog_issue",
|
|
22
|
+
"blocked_by_uninvokable_assignee",
|
|
23
|
+
"blocked_by_cancelled_issue",
|
|
24
|
+
"blocked_chain_stalled",
|
|
25
|
+
"invalid_review_participant",
|
|
26
|
+
"in_review_without_action_path",
|
|
27
|
+
"missing_successful_run_disposition",
|
|
28
|
+
"pending_board_decision",
|
|
29
|
+
"pending_user_decision",
|
|
30
|
+
"external_owner_action",
|
|
31
|
+
"open_recovery_issue",
|
|
32
|
+
]);
|
|
33
|
+
export const issueBlockedInboxIssueRefSchema = z
|
|
34
|
+
.object({
|
|
35
|
+
id: z.string().guid(),
|
|
36
|
+
identifier: z.string().nullable(),
|
|
37
|
+
title: z.string(),
|
|
38
|
+
status: z.enum(ISSUE_STATUSES),
|
|
39
|
+
priority: z.enum(ISSUE_PRIORITIES),
|
|
40
|
+
assigneeAgentId: z.string().guid().nullable(),
|
|
41
|
+
assigneeUserId: z.string().nullable(),
|
|
42
|
+
})
|
|
43
|
+
.strict();
|
|
44
|
+
export const issueBlockedInboxAttentionSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
kind: z.literal("blocked"),
|
|
47
|
+
state: issueBlockedInboxStateSchema,
|
|
48
|
+
reason: issueBlockedInboxReasonSchema,
|
|
49
|
+
severity: issueBlockedInboxSeveritySchema,
|
|
50
|
+
stoppedSinceAt: z.string().datetime().nullable(),
|
|
51
|
+
owner: z
|
|
52
|
+
.object({
|
|
53
|
+
type: z.enum(["agent", "user", "board", "external", "unknown"]),
|
|
54
|
+
agentId: z.string().guid().nullable(),
|
|
55
|
+
userId: z.string().nullable(),
|
|
56
|
+
label: z.string().nullable(),
|
|
57
|
+
})
|
|
58
|
+
.strict(),
|
|
59
|
+
action: z
|
|
60
|
+
.object({
|
|
61
|
+
label: z.string().trim().min(1),
|
|
62
|
+
detail: z.string().nullable(),
|
|
63
|
+
})
|
|
64
|
+
.strict(),
|
|
65
|
+
sourceIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
66
|
+
leafIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
67
|
+
recoveryIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
68
|
+
approvalId: z.string().guid().nullable(),
|
|
69
|
+
interactionId: z.string().guid().nullable(),
|
|
70
|
+
sampleIssueIdentifier: z.string().nullable(),
|
|
71
|
+
redaction: z
|
|
72
|
+
.object({
|
|
73
|
+
externalDetailsRedacted: z.boolean(),
|
|
74
|
+
secretFieldsOmitted: z.literal(true),
|
|
75
|
+
})
|
|
76
|
+
.strict(),
|
|
77
|
+
})
|
|
78
|
+
.strict();
|
|
79
|
+
export const ISSUE_EXECUTION_WORKSPACE_PREFERENCES = [
|
|
80
|
+
"inherit",
|
|
81
|
+
"shared_workspace",
|
|
82
|
+
"isolated_workspace",
|
|
83
|
+
"operator_branch",
|
|
84
|
+
"reuse_existing",
|
|
85
|
+
"agent_default",
|
|
86
|
+
];
|
|
87
|
+
// Mirrors git check-ref-format for a single branch name. The runtime verifies
|
|
88
|
+
// the branch actually exists before attaching, so this only rejects values
|
|
89
|
+
// that could never be a branch (path escapes, option injection, ref syntax).
|
|
90
|
+
export function isValidExistingBranchName(value) {
|
|
91
|
+
if (value.length === 0 || value.length > 255)
|
|
92
|
+
return false;
|
|
93
|
+
if (value.startsWith("-") || value.startsWith("/") || value.startsWith("."))
|
|
94
|
+
return false;
|
|
95
|
+
if (value.endsWith("/") || value.endsWith(".") || value.endsWith(".lock"))
|
|
96
|
+
return false;
|
|
97
|
+
if (value.includes("..") ||
|
|
98
|
+
value.includes("//") ||
|
|
99
|
+
value.includes("@{") ||
|
|
100
|
+
value.includes("/."))
|
|
101
|
+
return false;
|
|
102
|
+
// eslint-disable-next-line no-control-regex
|
|
103
|
+
if (/[\x00-\x20\x7f~^:?*[\\]/.test(value))
|
|
104
|
+
return false;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
const executionWorkspaceStrategySchema = z
|
|
108
|
+
.object({
|
|
109
|
+
type: z
|
|
110
|
+
.enum([
|
|
111
|
+
"project_primary",
|
|
112
|
+
"git_worktree",
|
|
113
|
+
"adapter_managed",
|
|
114
|
+
"cloud_sandbox",
|
|
115
|
+
])
|
|
116
|
+
.optional(),
|
|
117
|
+
baseRef: z.string().optional().nullable(),
|
|
118
|
+
branchTemplate: z.string().optional().nullable(),
|
|
119
|
+
existingBranch: z
|
|
120
|
+
.string()
|
|
121
|
+
.trim()
|
|
122
|
+
.refine(isValidExistingBranchName, {
|
|
123
|
+
message: "existingBranch must be a valid git branch name",
|
|
124
|
+
})
|
|
125
|
+
.optional()
|
|
126
|
+
.nullable(),
|
|
127
|
+
worktreeParentDir: z.string().optional().nullable(),
|
|
128
|
+
provisionCommand: z.string().optional().nullable(),
|
|
129
|
+
runtimeProvisionCommand: z.string().optional().nullable(),
|
|
130
|
+
teardownCommand: z.string().optional().nullable(),
|
|
131
|
+
})
|
|
132
|
+
.strict()
|
|
133
|
+
.superRefine((strategy, ctx) => {
|
|
134
|
+
if (!strategy.existingBranch)
|
|
135
|
+
return;
|
|
136
|
+
if (strategy.type !== "git_worktree") {
|
|
137
|
+
ctx.addIssue({
|
|
138
|
+
code: z.ZodIssueCode.custom,
|
|
139
|
+
path: ["existingBranch"],
|
|
140
|
+
message: 'existingBranch requires workspaceStrategy.type "git_worktree"',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (strategy.branchTemplate) {
|
|
144
|
+
ctx.addIssue({
|
|
145
|
+
code: z.ZodIssueCode.custom,
|
|
146
|
+
path: ["existingBranch"],
|
|
147
|
+
message: "existingBranch and branchTemplate are mutually exclusive",
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const ipv4CidrPattern = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\/(?:3[0-2]|[12]?\d)$/;
|
|
152
|
+
const protectedTaskEgressCidrs = [
|
|
153
|
+
"0.0.0.0/8",
|
|
154
|
+
"10.0.0.0/8",
|
|
155
|
+
"100.64.0.0/10",
|
|
156
|
+
"127.0.0.0/8",
|
|
157
|
+
"169.254.0.0/16",
|
|
158
|
+
"172.16.0.0/12",
|
|
159
|
+
"192.168.0.0/16",
|
|
160
|
+
"224.0.0.0/4",
|
|
161
|
+
];
|
|
162
|
+
function ipv4CidrRange(cidr) {
|
|
163
|
+
if (!ipv4CidrPattern.test(cidr))
|
|
164
|
+
return null;
|
|
165
|
+
const [address, prefixText] = cidr.split("/");
|
|
166
|
+
const addressValue = address
|
|
167
|
+
.split(".")
|
|
168
|
+
.reduce((value, octet) => value * 256 + Number(octet), 0);
|
|
169
|
+
const prefix = Number(prefixText);
|
|
170
|
+
const blockSize = 2 ** (32 - prefix);
|
|
171
|
+
const start = Math.floor(addressValue / blockSize) * blockSize;
|
|
172
|
+
return [start, start + blockSize - 1];
|
|
173
|
+
}
|
|
174
|
+
function isAllowedTaskEgressCidr(cidr) {
|
|
175
|
+
const range = ipv4CidrRange(cidr);
|
|
176
|
+
if (!range)
|
|
177
|
+
return false;
|
|
178
|
+
return protectedTaskEgressCidrs.every((protectedCidr) => {
|
|
179
|
+
const protectedRange = ipv4CidrRange(protectedCidr);
|
|
180
|
+
return (protectedRange !== null &&
|
|
181
|
+
(range[1] < protectedRange[0] || range[0] > protectedRange[1]));
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
export const issueExecutionWorkspaceSettingsSchema = z
|
|
185
|
+
.object({
|
|
186
|
+
mode: z.enum(ISSUE_EXECUTION_WORKSPACE_PREFERENCES).optional(),
|
|
187
|
+
sharedWorkspaceConcurrency: z
|
|
188
|
+
.enum(["auto", "serialize", "allow"])
|
|
189
|
+
.optional(),
|
|
190
|
+
environmentId: z.string().guid().optional().nullable(),
|
|
191
|
+
workspaceStrategy: executionWorkspaceStrategySchema.optional().nullable(),
|
|
192
|
+
workspaceRuntime: z.record(z.string(), z.unknown()).optional().nullable(),
|
|
193
|
+
networkEgress: z
|
|
194
|
+
.object({
|
|
195
|
+
allowFqdns: z
|
|
196
|
+
.array(z
|
|
197
|
+
.string()
|
|
198
|
+
.trim()
|
|
199
|
+
.toLowerCase()
|
|
200
|
+
.regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/, "Network egress FQDNs must be hostnames without a URL scheme or path")
|
|
201
|
+
.max(253))
|
|
202
|
+
.max(100)
|
|
203
|
+
.optional(),
|
|
204
|
+
allowCidrs: z
|
|
205
|
+
.array(z
|
|
206
|
+
.string()
|
|
207
|
+
.trim()
|
|
208
|
+
.regex(ipv4CidrPattern, "Invalid IPv4 CIDR (must use octets 0-255 and prefix 0-32)")
|
|
209
|
+
.max(64)
|
|
210
|
+
.refine(isAllowedTaskEgressCidr, "Task-scoped network egress CIDRs cannot overlap private, loopback, link-local, CGNAT, or multicast ranges"))
|
|
211
|
+
.max(100)
|
|
212
|
+
.optional(),
|
|
213
|
+
})
|
|
214
|
+
.strict()
|
|
215
|
+
.optional()
|
|
216
|
+
.nullable(),
|
|
217
|
+
})
|
|
218
|
+
.strict()
|
|
219
|
+
.superRefine((settings, ctx) => {
|
|
220
|
+
if (settings.workspaceStrategy?.existingBranch &&
|
|
221
|
+
settings.mode !== "isolated_workspace") {
|
|
222
|
+
ctx.addIssue({
|
|
223
|
+
code: z.ZodIssueCode.custom,
|
|
224
|
+
path: ["workspaceStrategy", "existingBranch"],
|
|
225
|
+
message: 'existingBranch requires mode "isolated_workspace"',
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
export const issueAssigneeAdapterOverridesSchema = z
|
|
230
|
+
.object({
|
|
231
|
+
adapterConfig: z.record(z.string(), z.unknown()).optional(),
|
|
232
|
+
useProjectWorkspace: z.boolean().optional(),
|
|
233
|
+
})
|
|
234
|
+
.strict();
|
|
235
|
+
const issueExecutionStagePrincipalBaseSchema = z.object({
|
|
236
|
+
type: z.enum(["agent", "user"]),
|
|
237
|
+
agentId: z.string().guid().optional().nullable(),
|
|
238
|
+
userId: z.string().optional().nullable(),
|
|
239
|
+
});
|
|
240
|
+
export const issueExecutionStagePrincipalSchema = issueExecutionStagePrincipalBaseSchema.superRefine((value, ctx) => {
|
|
241
|
+
if (value.type === "agent") {
|
|
242
|
+
if (!value.agentId) {
|
|
243
|
+
ctx.addIssue({
|
|
244
|
+
code: z.ZodIssueCode.custom,
|
|
245
|
+
message: "Agent participants require agentId",
|
|
246
|
+
path: ["agentId"],
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
if (value.userId) {
|
|
250
|
+
ctx.addIssue({
|
|
251
|
+
code: z.ZodIssueCode.custom,
|
|
252
|
+
message: "Agent participants cannot set userId",
|
|
253
|
+
path: ["userId"],
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (!value.userId) {
|
|
259
|
+
ctx.addIssue({
|
|
260
|
+
code: z.ZodIssueCode.custom,
|
|
261
|
+
message: "User participants require userId",
|
|
262
|
+
path: ["userId"],
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
if (value.agentId) {
|
|
266
|
+
ctx.addIssue({
|
|
267
|
+
code: z.ZodIssueCode.custom,
|
|
268
|
+
message: "User participants cannot set agentId",
|
|
269
|
+
path: ["agentId"],
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
export const issueExecutionStageParticipantSchema = issueExecutionStagePrincipalBaseSchema
|
|
274
|
+
.extend({
|
|
275
|
+
id: z.string().guid().optional(),
|
|
276
|
+
})
|
|
277
|
+
.superRefine((value, ctx) => {
|
|
278
|
+
if (value.type === "agent") {
|
|
279
|
+
if (!value.agentId) {
|
|
280
|
+
ctx.addIssue({
|
|
281
|
+
code: z.ZodIssueCode.custom,
|
|
282
|
+
message: "Agent participants require agentId",
|
|
283
|
+
path: ["agentId"],
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
if (value.userId) {
|
|
287
|
+
ctx.addIssue({
|
|
288
|
+
code: z.ZodIssueCode.custom,
|
|
289
|
+
message: "Agent participants cannot set userId",
|
|
290
|
+
path: ["userId"],
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (!value.userId) {
|
|
296
|
+
ctx.addIssue({
|
|
297
|
+
code: z.ZodIssueCode.custom,
|
|
298
|
+
message: "User participants require userId",
|
|
299
|
+
path: ["userId"],
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (value.agentId) {
|
|
303
|
+
ctx.addIssue({
|
|
304
|
+
code: z.ZodIssueCode.custom,
|
|
305
|
+
message: "User participants cannot set agentId",
|
|
306
|
+
path: ["agentId"],
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
export const issueExecutionStageSchema = z.object({
|
|
311
|
+
id: z.string().guid().optional(),
|
|
312
|
+
type: z.enum(ISSUE_EXECUTION_STAGE_TYPES),
|
|
313
|
+
approvalsNeeded: z.literal(1).optional().default(1),
|
|
314
|
+
participants: z.array(issueExecutionStageParticipantSchema).default([]),
|
|
315
|
+
});
|
|
316
|
+
export const issueExecutionMonitorPolicySchema = z.object({
|
|
317
|
+
nextCheckAt: z.string().datetime(),
|
|
318
|
+
notes: z.string().max(500).optional().nullable().default(null),
|
|
319
|
+
scheduledBy: z
|
|
320
|
+
.enum(ISSUE_MONITOR_SCHEDULED_BY)
|
|
321
|
+
.optional()
|
|
322
|
+
.default("assignee"),
|
|
323
|
+
kind: z
|
|
324
|
+
.enum(ISSUE_EXECUTION_MONITOR_KINDS)
|
|
325
|
+
.optional()
|
|
326
|
+
.nullable()
|
|
327
|
+
.default(null),
|
|
328
|
+
serviceName: z
|
|
329
|
+
.string()
|
|
330
|
+
.trim()
|
|
331
|
+
.min(1)
|
|
332
|
+
.max(120)
|
|
333
|
+
.optional()
|
|
334
|
+
.nullable()
|
|
335
|
+
.default(null),
|
|
336
|
+
externalRef: z
|
|
337
|
+
.string()
|
|
338
|
+
.trim()
|
|
339
|
+
.min(1)
|
|
340
|
+
.max(500)
|
|
341
|
+
.optional()
|
|
342
|
+
.nullable()
|
|
343
|
+
.default(null),
|
|
344
|
+
timeoutAt: z.string().datetime().optional().nullable().default(null),
|
|
345
|
+
maxAttempts: z
|
|
346
|
+
.number()
|
|
347
|
+
.int()
|
|
348
|
+
.positive()
|
|
349
|
+
.max(100)
|
|
350
|
+
.optional()
|
|
351
|
+
.nullable()
|
|
352
|
+
.default(null),
|
|
353
|
+
recoveryPolicy: z
|
|
354
|
+
.enum(ISSUE_EXECUTION_MONITOR_RECOVERY_POLICIES)
|
|
355
|
+
.optional()
|
|
356
|
+
.nullable()
|
|
357
|
+
.default(null),
|
|
358
|
+
});
|
|
359
|
+
export const issueExecutionPolicySchema = z.object({
|
|
360
|
+
mode: z.enum(ISSUE_EXECUTION_POLICY_MODES).optional().default("normal"),
|
|
361
|
+
commentRequired: z.boolean().optional().default(true),
|
|
362
|
+
stages: z.array(issueExecutionStageSchema).default([]),
|
|
363
|
+
monitor: issueExecutionMonitorPolicySchema.optional().nullable(),
|
|
364
|
+
reviewPreset: lowTrustReviewPresetPolicySchema.optional(),
|
|
365
|
+
authorizationPolicy: trustAuthorizationPolicySchema.optional(),
|
|
366
|
+
maxReviewRounds: z
|
|
367
|
+
.number()
|
|
368
|
+
.int()
|
|
369
|
+
.positive()
|
|
370
|
+
.max(50)
|
|
371
|
+
.optional()
|
|
372
|
+
.nullable()
|
|
373
|
+
.default(null),
|
|
374
|
+
});
|
|
375
|
+
export const issueExecutionMonitorStateSchema = z.object({
|
|
376
|
+
status: z.enum(ISSUE_EXECUTION_MONITOR_STATE_STATUSES),
|
|
377
|
+
nextCheckAt: z.string().datetime().nullable(),
|
|
378
|
+
lastTriggeredAt: z.string().datetime().nullable(),
|
|
379
|
+
attemptCount: z.number().int().nonnegative().default(0),
|
|
380
|
+
notes: z.string().max(500).nullable(),
|
|
381
|
+
scheduledBy: z.enum(ISSUE_MONITOR_SCHEDULED_BY).nullable(),
|
|
382
|
+
kind: z
|
|
383
|
+
.enum(ISSUE_EXECUTION_MONITOR_KINDS)
|
|
384
|
+
.nullable()
|
|
385
|
+
.optional()
|
|
386
|
+
.default(null),
|
|
387
|
+
serviceName: z
|
|
388
|
+
.string()
|
|
389
|
+
.trim()
|
|
390
|
+
.min(1)
|
|
391
|
+
.max(120)
|
|
392
|
+
.nullable()
|
|
393
|
+
.optional()
|
|
394
|
+
.default(null),
|
|
395
|
+
externalRef: z
|
|
396
|
+
.string()
|
|
397
|
+
.trim()
|
|
398
|
+
.min(1)
|
|
399
|
+
.max(500)
|
|
400
|
+
.nullable()
|
|
401
|
+
.optional()
|
|
402
|
+
.default(null),
|
|
403
|
+
timeoutAt: z.string().datetime().nullable().optional().default(null),
|
|
404
|
+
maxAttempts: z
|
|
405
|
+
.number()
|
|
406
|
+
.int()
|
|
407
|
+
.positive()
|
|
408
|
+
.max(100)
|
|
409
|
+
.nullable()
|
|
410
|
+
.optional()
|
|
411
|
+
.default(null),
|
|
412
|
+
recoveryPolicy: z
|
|
413
|
+
.enum(ISSUE_EXECUTION_MONITOR_RECOVERY_POLICIES)
|
|
414
|
+
.nullable()
|
|
415
|
+
.optional()
|
|
416
|
+
.default(null),
|
|
417
|
+
clearedAt: z.string().datetime().nullable(),
|
|
418
|
+
clearReason: z.enum(ISSUE_EXECUTION_MONITOR_CLEAR_REASONS).nullable(),
|
|
419
|
+
});
|
|
420
|
+
export const issueReviewRequestSchema = z
|
|
421
|
+
.object({
|
|
422
|
+
instructions: z.string().trim().min(1).max(20000),
|
|
423
|
+
})
|
|
424
|
+
.strict();
|
|
425
|
+
export const issueExecutionStateSchema = z.object({
|
|
426
|
+
status: z.enum(ISSUE_EXECUTION_STATE_STATUSES),
|
|
427
|
+
currentStageId: z.string().guid().nullable(),
|
|
428
|
+
currentStageIndex: z.number().int().nonnegative().nullable(),
|
|
429
|
+
currentStageType: z.enum(ISSUE_EXECUTION_STAGE_TYPES).nullable(),
|
|
430
|
+
currentParticipant: issueExecutionStagePrincipalSchema.nullable(),
|
|
431
|
+
returnAssignee: issueExecutionStagePrincipalSchema.nullable(),
|
|
432
|
+
reviewRequest: issueReviewRequestSchema.nullable().optional().default(null),
|
|
433
|
+
completedStageIds: z.array(z.string().guid()).default([]),
|
|
434
|
+
lastDecisionId: z.string().guid().nullable(),
|
|
435
|
+
lastDecisionOutcome: z.enum(ISSUE_EXECUTION_DECISION_OUTCOMES).nullable(),
|
|
436
|
+
monitor: issueExecutionMonitorStateSchema.optional().nullable(),
|
|
437
|
+
changesRequestedCount: z.number().int().nonnegative().optional().default(0),
|
|
438
|
+
});
|
|
439
|
+
export const issueRecoveryActionReadModelSchema = z.object({
|
|
440
|
+
id: z.string().guid(),
|
|
441
|
+
companyId: z.string().guid(),
|
|
442
|
+
sourceIssueId: z.string().guid(),
|
|
443
|
+
recoveryIssueId: z.string().guid().nullable(),
|
|
444
|
+
kind: z.enum(ISSUE_RECOVERY_ACTION_KINDS),
|
|
445
|
+
status: z.enum(ISSUE_RECOVERY_ACTION_STATUSES),
|
|
446
|
+
ownerType: z.enum(ISSUE_RECOVERY_ACTION_OWNER_TYPES),
|
|
447
|
+
ownerAgentId: z.string().guid().nullable(),
|
|
448
|
+
ownerUserId: z.string().nullable(),
|
|
449
|
+
previousOwnerAgentId: z.string().guid().nullable(),
|
|
450
|
+
returnOwnerAgentId: z.string().guid().nullable(),
|
|
451
|
+
cause: z.string().min(1),
|
|
452
|
+
fingerprint: z.string().min(1),
|
|
453
|
+
evidence: z.record(z.string(), z.unknown()),
|
|
454
|
+
nextAction: z.string().min(1),
|
|
455
|
+
wakePolicy: z.record(z.string(), z.unknown()).nullable(),
|
|
456
|
+
monitorPolicy: z.record(z.string(), z.unknown()).nullable(),
|
|
457
|
+
attemptCount: z.number().int().nonnegative(),
|
|
458
|
+
maxAttempts: z.number().int().positive().nullable(),
|
|
459
|
+
timeoutAt: z.union([z.date(), z.string().datetime()]).nullable(),
|
|
460
|
+
lastAttemptAt: z.union([z.date(), z.string().datetime()]).nullable(),
|
|
461
|
+
outcome: z.enum(ISSUE_RECOVERY_ACTION_OUTCOMES).nullable(),
|
|
462
|
+
resolutionNote: z.string().nullable(),
|
|
463
|
+
resolvedAt: z.union([z.date(), z.string().datetime()]).nullable(),
|
|
464
|
+
createdAt: z.union([z.date(), z.string().datetime()]),
|
|
465
|
+
updatedAt: z.union([z.date(), z.string().datetime()]),
|
|
466
|
+
});
|
|
467
|
+
const RESOLVE_ISSUE_RECOVERY_ACTION_OUTCOMES = [
|
|
468
|
+
"restored",
|
|
469
|
+
"false_positive",
|
|
470
|
+
"blocked",
|
|
471
|
+
"cancelled",
|
|
472
|
+
];
|
|
473
|
+
export const resolveIssueRecoveryActionSchema = z
|
|
474
|
+
.object({
|
|
475
|
+
executionReconciliation: z
|
|
476
|
+
.object({
|
|
477
|
+
runId: z.string().guid(),
|
|
478
|
+
providerStopped: z.literal(true),
|
|
479
|
+
actionOutcome: z.enum(["completed", "not_performed", "mixed"]),
|
|
480
|
+
outcomeEvidence: z.string().trim().min(20).max(12000),
|
|
481
|
+
})
|
|
482
|
+
.strict()
|
|
483
|
+
.optional(),
|
|
484
|
+
actionId: z.string().guid().optional(),
|
|
485
|
+
outcome: z.enum(RESOLVE_ISSUE_RECOVERY_ACTION_OUTCOMES),
|
|
486
|
+
sourceIssueStatus: z.enum(["todo", "done", "in_review", "blocked"]),
|
|
487
|
+
resolutionNote: multilineTextSchema.optional().nullable(),
|
|
488
|
+
})
|
|
489
|
+
.strict()
|
|
490
|
+
.superRefine((value, ctx) => {
|
|
491
|
+
if (value.outcome === "restored") {
|
|
492
|
+
if (value.sourceIssueStatus !== "todo" &&
|
|
493
|
+
value.sourceIssueStatus !== "done" &&
|
|
494
|
+
value.sourceIssueStatus !== "in_review") {
|
|
495
|
+
ctx.addIssue({
|
|
496
|
+
code: z.ZodIssueCode.custom,
|
|
497
|
+
message: "Restored recovery actions must move the source issue to todo, done, or in_review",
|
|
498
|
+
path: ["sourceIssueStatus"],
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (value.outcome === "blocked") {
|
|
504
|
+
if (value.sourceIssueStatus !== "blocked") {
|
|
505
|
+
ctx.addIssue({
|
|
506
|
+
code: z.ZodIssueCode.custom,
|
|
507
|
+
message: "Blocked recovery actions must move the source issue to blocked",
|
|
508
|
+
path: ["sourceIssueStatus"],
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
if (value.outcome === "false_positive" || value.outcome === "cancelled") {
|
|
514
|
+
if (value.sourceIssueStatus !== "done" &&
|
|
515
|
+
value.sourceIssueStatus !== "in_review") {
|
|
516
|
+
ctx.addIssue({
|
|
517
|
+
code: z.ZodIssueCode.custom,
|
|
518
|
+
message: "This recovery outcome requires sourceIssueStatus to be done or in_review",
|
|
519
|
+
path: ["sourceIssueStatus"],
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
const issueRequestDepthInputSchema = z
|
|
526
|
+
.number()
|
|
527
|
+
.int()
|
|
528
|
+
.nonnegative()
|
|
529
|
+
.transform((value) => clampIssueRequestDepth(value));
|
|
530
|
+
export function resolveCreateIssueStatusDefault(input) {
|
|
531
|
+
if (typeof input.status === "string") {
|
|
532
|
+
return {
|
|
533
|
+
status: input.status,
|
|
534
|
+
defaulted: false,
|
|
535
|
+
reason: "explicit",
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
const hasAssignee = (typeof input.assigneeAgentId === "string" &&
|
|
539
|
+
input.assigneeAgentId.length > 0) ||
|
|
540
|
+
(typeof input.assigneeUserId === "string" &&
|
|
541
|
+
input.assigneeUserId.length > 0);
|
|
542
|
+
return {
|
|
543
|
+
status: hasAssignee ? "todo" : "backlog",
|
|
544
|
+
defaulted: true,
|
|
545
|
+
reason: hasAssignee
|
|
546
|
+
? "assigned_omitted_status"
|
|
547
|
+
: "unassigned_omitted_status",
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
function withCreateIssueStatusDefault(schema) {
|
|
551
|
+
return z.preprocess((input) => {
|
|
552
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
553
|
+
return input;
|
|
554
|
+
const raw = input;
|
|
555
|
+
if (raw.status !== undefined)
|
|
556
|
+
return input;
|
|
557
|
+
return {
|
|
558
|
+
...raw,
|
|
559
|
+
status: resolveCreateIssueStatusDefault(raw).status,
|
|
560
|
+
};
|
|
561
|
+
}, schema);
|
|
562
|
+
}
|
|
563
|
+
const createIssueBaseSchema = z.object({
|
|
564
|
+
projectId: z.string().guid().optional().nullable(),
|
|
565
|
+
projectWorkspaceId: z.string().guid().optional().nullable(),
|
|
566
|
+
goalId: z.string().guid().optional().nullable(),
|
|
567
|
+
parentId: z.string().guid().optional().nullable(),
|
|
568
|
+
blockedByIssueIds: z.array(z.string().guid()).optional(),
|
|
569
|
+
unblockDescriptor: z
|
|
570
|
+
.object({
|
|
571
|
+
owner: z.union([
|
|
572
|
+
z.object({ agentId: z.string().guid() }).strict(),
|
|
573
|
+
z.object({ userId: z.string().trim().min(1) }).strict(),
|
|
574
|
+
z.literal("board"),
|
|
575
|
+
]),
|
|
576
|
+
action: multilineTextSchema.pipe(z.string().trim().min(1).max(2_000)),
|
|
577
|
+
})
|
|
578
|
+
.strict()
|
|
579
|
+
.optional()
|
|
580
|
+
.nullable(),
|
|
581
|
+
inheritExecutionWorkspaceFromIssueId: z.string().guid().optional().nullable(),
|
|
582
|
+
title: z.string().min(1),
|
|
583
|
+
description: multilineTextSchema.optional().nullable(),
|
|
584
|
+
status: z.enum(ISSUE_STATUSES),
|
|
585
|
+
workMode: z.enum(ISSUE_WORK_MODES).optional().default("standard"),
|
|
586
|
+
harnessKind: z.enum(ISSUE_HARNESS_KINDS).optional().nullable(),
|
|
587
|
+
priority: z.enum(ISSUE_PRIORITIES).optional().default("medium"),
|
|
588
|
+
reviewPolicy: z.enum(ISSUE_REVIEW_POLICIES).optional().nullable(),
|
|
589
|
+
assigneeAgentId: z.string().guid().optional().nullable(),
|
|
590
|
+
assigneeUserId: z.string().optional().nullable(),
|
|
591
|
+
requestDepth: issueRequestDepthInputSchema.optional().default(0),
|
|
592
|
+
createdByUserId: z.string().optional().nullable(),
|
|
593
|
+
responsibleUserId: z.string().optional().nullable(),
|
|
594
|
+
billingCode: z.string().optional().nullable(),
|
|
595
|
+
assigneeAdapterOverrides: issueAssigneeAdapterOverridesSchema
|
|
596
|
+
.optional()
|
|
597
|
+
.nullable(),
|
|
598
|
+
executionPolicy: issueExecutionPolicySchema.optional().nullable(),
|
|
599
|
+
executionWorkspaceId: z.string().guid().optional().nullable(),
|
|
600
|
+
executionWorkspacePreference: z
|
|
601
|
+
.enum(ISSUE_EXECUTION_WORKSPACE_PREFERENCES)
|
|
602
|
+
.optional()
|
|
603
|
+
.nullable(),
|
|
604
|
+
executionWorkspaceSettings: issueExecutionWorkspaceSettingsSchema
|
|
605
|
+
.optional()
|
|
606
|
+
.nullable(),
|
|
607
|
+
labelIds: z.array(z.string().guid()).optional(),
|
|
608
|
+
watchdogDiscovery: z
|
|
609
|
+
.object({
|
|
610
|
+
kind: z.enum(ISSUE_WATCHDOG_DISCOVERY_KINDS),
|
|
611
|
+
evidenceMarkdown: multilineTextSchema.optional().nullable(),
|
|
612
|
+
})
|
|
613
|
+
.strict()
|
|
614
|
+
.optional()
|
|
615
|
+
.nullable(),
|
|
616
|
+
watchdog: z
|
|
617
|
+
.object({
|
|
618
|
+
agentId: z.string().guid(),
|
|
619
|
+
instructions: multilineTextSchema.optional().nullable(),
|
|
620
|
+
})
|
|
621
|
+
.strict()
|
|
622
|
+
.optional()
|
|
623
|
+
.nullable(),
|
|
624
|
+
});
|
|
625
|
+
function requireBlockedStatusForUnblockDescriptor(value, ctx) {
|
|
626
|
+
if (value.unblockDescriptor != null &&
|
|
627
|
+
value.status !== undefined &&
|
|
628
|
+
value.status !== "blocked") {
|
|
629
|
+
ctx.addIssue({
|
|
630
|
+
code: z.ZodIssueCode.custom,
|
|
631
|
+
message: "unblockDescriptor requires blocked status",
|
|
632
|
+
path: ["unblockDescriptor"],
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
const createIssueDuplicateGuardSchema = {
|
|
637
|
+
initialPlan: z.string().min(1).max(200000).optional().nullable(),
|
|
638
|
+
idempotencyKey: z.string().trim().min(1).max(255).optional().nullable(),
|
|
639
|
+
allowDuplicate: z
|
|
640
|
+
.boolean()
|
|
641
|
+
.describe("Bypasses recent-title duplicate detection; idempotency keys always replay their original issue")
|
|
642
|
+
.optional()
|
|
643
|
+
.default(false),
|
|
644
|
+
};
|
|
645
|
+
// Narrow intent flag set by the onboarding wizard on the single first task. The
|
|
646
|
+
// server owns the resulting origin kind (clients cannot set arbitrary origin
|
|
647
|
+
// kinds) and uses it to seed the agent greeting instead of an LLM welcome step.
|
|
648
|
+
const onboardingFirstTaskMarkerSchema = {
|
|
649
|
+
onboardingFirstTask: z.boolean().optional(),
|
|
650
|
+
};
|
|
651
|
+
export const createIssueInputSchema = createIssueBaseSchema.extend({
|
|
652
|
+
status: createIssueBaseSchema.shape.status.optional(),
|
|
653
|
+
...createIssueDuplicateGuardSchema,
|
|
654
|
+
...onboardingFirstTaskMarkerSchema,
|
|
655
|
+
});
|
|
656
|
+
export const createIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema.extend({
|
|
657
|
+
...createIssueDuplicateGuardSchema,
|
|
658
|
+
...onboardingFirstTaskMarkerSchema,
|
|
659
|
+
})).superRefine(requireBlockedStatusForUnblockDescriptor);
|
|
660
|
+
export const upsertIssueWatchdogSchema = z
|
|
661
|
+
.object({
|
|
662
|
+
agentId: z.string().guid(),
|
|
663
|
+
instructions: multilineTextSchema.optional().nullable(),
|
|
664
|
+
})
|
|
665
|
+
.strict();
|
|
666
|
+
export const createChildIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema
|
|
667
|
+
.omit({
|
|
668
|
+
parentId: true,
|
|
669
|
+
inheritExecutionWorkspaceFromIssueId: true,
|
|
670
|
+
watchdogDiscovery: true,
|
|
671
|
+
})
|
|
672
|
+
.extend({
|
|
673
|
+
acceptanceCriteria: z
|
|
674
|
+
.array(z.string().trim().min(1).max(500))
|
|
675
|
+
.max(20)
|
|
676
|
+
.optional(),
|
|
677
|
+
blockParentUntilDone: z.boolean().optional().default(false),
|
|
678
|
+
})).superRefine(requireBlockedStatusForUnblockDescriptor);
|
|
679
|
+
export const createAcceptedPlanDecompositionSchema = z.object({
|
|
680
|
+
acceptedPlanRevisionId: z.string().guid(),
|
|
681
|
+
children: z.array(createChildIssueSchema).min(1).max(25),
|
|
682
|
+
});
|
|
683
|
+
export const createIssueLabelSchema = z.object({
|
|
684
|
+
name: z.string().trim().min(1).max(48),
|
|
685
|
+
color: z
|
|
686
|
+
.string()
|
|
687
|
+
.regex(/^#(?:[0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value"),
|
|
688
|
+
});
|
|
689
|
+
const issueCommentAttachmentIdsSchema = z
|
|
690
|
+
.array(z.string().uuid())
|
|
691
|
+
.max(20)
|
|
692
|
+
.refine((ids) => new Set(ids).size === ids.length, {
|
|
693
|
+
message: "Attachment ids must be unique",
|
|
694
|
+
});
|
|
695
|
+
export const updateIssueSchema = objectWithoutDefaults(createIssueBaseSchema.omit({
|
|
696
|
+
createdByUserId: true,
|
|
697
|
+
responsibleUserId: true,
|
|
698
|
+
watchdog: true,
|
|
699
|
+
}))
|
|
700
|
+
.partial()
|
|
701
|
+
.extend({
|
|
702
|
+
requestDepth: issueRequestDepthInputSchema.optional(),
|
|
703
|
+
assigneeAgentId: z.string().trim().min(1).optional().nullable(),
|
|
704
|
+
comment: multilineTextSchema.pipe(z.string().min(1)).optional(),
|
|
705
|
+
commentClientRequestId: z.string().uuid().optional(),
|
|
706
|
+
/** Only valid with a comment; the route binds these in the update transaction. */
|
|
707
|
+
attachmentIds: issueCommentAttachmentIdsSchema.optional(),
|
|
708
|
+
onBehalfOfUserId: z.string().trim().min(1).optional().nullable(),
|
|
709
|
+
reviewInteractionId: z.string().guid().optional(),
|
|
710
|
+
reviewRequest: issueReviewRequestSchema.optional().nullable(),
|
|
711
|
+
reopen: z.boolean().optional(),
|
|
712
|
+
resume: z.boolean().optional(),
|
|
713
|
+
interrupt: z.boolean().optional(),
|
|
714
|
+
/** Assignment-only handoff; the following structured goal action owns the wake. */
|
|
715
|
+
deferWakeForGoal: z.boolean().optional(),
|
|
716
|
+
hiddenAt: z.string().datetime().nullable().optional(),
|
|
717
|
+
});
|
|
718
|
+
export const stalledReviewDecisionSchema = z
|
|
719
|
+
.object({
|
|
720
|
+
action: z.enum(["approve", "request_changes", "send_back"]),
|
|
721
|
+
note: multilineTextSchema.pipe(z.string().min(1)).optional(),
|
|
722
|
+
})
|
|
723
|
+
.strict()
|
|
724
|
+
.superRefine((value, ctx) => {
|
|
725
|
+
if (value.action === "request_changes" && !value.note?.trim()) {
|
|
726
|
+
ctx.addIssue({
|
|
727
|
+
code: z.ZodIssueCode.custom,
|
|
728
|
+
path: ["note"],
|
|
729
|
+
message: "Request changes requires a note",
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
export const checkoutIssueSchema = z.object({
|
|
734
|
+
agentId: z.string().guid(),
|
|
735
|
+
expectedStatuses: z.array(z.enum(ISSUE_STATUSES)).nonempty(),
|
|
736
|
+
});
|
|
737
|
+
const commentMetadataLabelSchema = z.string().trim().min(1).max(120);
|
|
738
|
+
const commentMetadataTextSchema = z.string().trim().min(1).max(2000);
|
|
739
|
+
export const issueCommentAuthorTypeSchema = z.enum(ISSUE_COMMENT_AUTHOR_TYPES);
|
|
740
|
+
export const issueCommentPresentationSchema = z
|
|
741
|
+
.object({
|
|
742
|
+
kind: z.enum(ISSUE_COMMENT_PRESENTATION_KINDS).default("message"),
|
|
743
|
+
tone: z.enum(ISSUE_COMMENT_PRESENTATION_TONES).default("neutral"),
|
|
744
|
+
title: z.string().trim().min(1).max(160).nullable().optional(),
|
|
745
|
+
detailsDefaultOpen: z.boolean().optional().default(false),
|
|
746
|
+
density: z.enum(ISSUE_COMMENT_PRESENTATION_DENSITIES).optional(),
|
|
747
|
+
})
|
|
748
|
+
.strict();
|
|
749
|
+
const issueCommentMetadataBaseRowSchema = z.object({
|
|
750
|
+
type: z.enum(ISSUE_COMMENT_METADATA_ROW_TYPES),
|
|
751
|
+
label: commentMetadataLabelSchema.nullable().optional(),
|
|
752
|
+
});
|
|
753
|
+
const issueCommentMetadataTextRowSchema = issueCommentMetadataBaseRowSchema
|
|
754
|
+
.extend({
|
|
755
|
+
type: z.literal("text"),
|
|
756
|
+
text: commentMetadataTextSchema,
|
|
757
|
+
})
|
|
758
|
+
.strict();
|
|
759
|
+
const issueCommentMetadataCodeRowSchema = issueCommentMetadataBaseRowSchema
|
|
760
|
+
.extend({
|
|
761
|
+
type: z.literal("code"),
|
|
762
|
+
code: z.string().min(1).max(4000),
|
|
763
|
+
language: z.string().trim().min(1).max(40).nullable().optional(),
|
|
764
|
+
})
|
|
765
|
+
.strict();
|
|
766
|
+
const issueCommentMetadataKeyValueRowSchema = issueCommentMetadataBaseRowSchema
|
|
767
|
+
.extend({
|
|
768
|
+
type: z.literal("key_value"),
|
|
769
|
+
label: commentMetadataLabelSchema,
|
|
770
|
+
value: commentMetadataTextSchema,
|
|
771
|
+
})
|
|
772
|
+
.strict();
|
|
773
|
+
const issueCommentMetadataIssueLinkRowSchema = issueCommentMetadataBaseRowSchema
|
|
774
|
+
.extend({
|
|
775
|
+
type: z.literal("issue_link"),
|
|
776
|
+
issueId: z.string().guid().nullable().optional(),
|
|
777
|
+
identifier: z.string().trim().min(1).max(80).nullable().optional(),
|
|
778
|
+
title: z.string().trim().min(1).max(240).nullable().optional(),
|
|
779
|
+
})
|
|
780
|
+
.strict();
|
|
781
|
+
const issueCommentMetadataAgentLinkRowSchema = issueCommentMetadataBaseRowSchema
|
|
782
|
+
.extend({
|
|
783
|
+
type: z.literal("agent_link"),
|
|
784
|
+
agentId: z.string().guid(),
|
|
785
|
+
name: z.string().trim().min(1).max(160).nullable().optional(),
|
|
786
|
+
})
|
|
787
|
+
.strict();
|
|
788
|
+
const issueCommentMetadataRunLinkRowSchema = issueCommentMetadataBaseRowSchema
|
|
789
|
+
.extend({
|
|
790
|
+
type: z.literal("run_link"),
|
|
791
|
+
runId: z.string().guid(),
|
|
792
|
+
agentId: z.string().guid().nullable().optional(),
|
|
793
|
+
title: z.string().trim().min(1).max(160).nullable().optional(),
|
|
794
|
+
})
|
|
795
|
+
.strict();
|
|
796
|
+
export const issueCommentMetadataRowSchema = z
|
|
797
|
+
.discriminatedUnion("type", [
|
|
798
|
+
issueCommentMetadataTextRowSchema,
|
|
799
|
+
issueCommentMetadataCodeRowSchema,
|
|
800
|
+
issueCommentMetadataKeyValueRowSchema,
|
|
801
|
+
issueCommentMetadataIssueLinkRowSchema,
|
|
802
|
+
issueCommentMetadataAgentLinkRowSchema,
|
|
803
|
+
issueCommentMetadataRunLinkRowSchema,
|
|
804
|
+
])
|
|
805
|
+
.superRefine((value, ctx) => {
|
|
806
|
+
if (value.type === "issue_link" && !value.issueId && !value.identifier) {
|
|
807
|
+
ctx.addIssue({
|
|
808
|
+
code: z.ZodIssueCode.custom,
|
|
809
|
+
message: "Issue link rows require issueId or identifier",
|
|
810
|
+
path: ["issueId"],
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
export const issueCommentMetadataSectionSchema = z
|
|
815
|
+
.object({
|
|
816
|
+
title: z.string().trim().min(1).max(160).nullable().optional(),
|
|
817
|
+
rows: z.array(issueCommentMetadataRowSchema).min(1).max(50),
|
|
818
|
+
})
|
|
819
|
+
.strict();
|
|
820
|
+
export const issueCommentMetadataSchema = z
|
|
821
|
+
.object({
|
|
822
|
+
version: z.literal(1),
|
|
823
|
+
sourceChannel: z.literal("imessage-photon").optional(),
|
|
824
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
825
|
+
authorizationReason: z
|
|
826
|
+
.string()
|
|
827
|
+
.trim()
|
|
828
|
+
.min(1)
|
|
829
|
+
.max(160)
|
|
830
|
+
.nullable()
|
|
831
|
+
.optional(),
|
|
832
|
+
sections: z.array(issueCommentMetadataSectionSchema).min(1).max(20),
|
|
833
|
+
})
|
|
834
|
+
.strict();
|
|
835
|
+
export const addIssueCommentSchema = z.object({
|
|
836
|
+
clientRequestId: z.string().uuid().optional(),
|
|
837
|
+
body: multilineTextSchema.pipe(z.string().min(1)),
|
|
838
|
+
attachmentIds: issueCommentAttachmentIdsSchema.optional(),
|
|
839
|
+
onBehalfOfUserId: z.string().trim().min(1).optional().nullable(),
|
|
840
|
+
authorType: issueCommentAuthorTypeSchema.optional(),
|
|
841
|
+
presentation: issueCommentPresentationSchema.nullable().optional(),
|
|
842
|
+
metadata: issueCommentMetadataSchema.nullable().optional(),
|
|
843
|
+
reopen: z.boolean().optional(),
|
|
844
|
+
resume: z.boolean().optional(),
|
|
845
|
+
interrupt: z.boolean().optional(),
|
|
846
|
+
});
|
|
847
|
+
export const issueThreadInteractionStatusSchema = z.enum(ISSUE_THREAD_INTERACTION_STATUSES);
|
|
848
|
+
export const issueThreadInteractionKindSchema = z.enum(ISSUE_THREAD_INTERACTION_KINDS);
|
|
849
|
+
export const issueThreadInteractionCanonicalResolverPolicySchema = z
|
|
850
|
+
.enum(ISSUE_THREAD_INTERACTION_CANONICAL_RESOLVER_POLICIES)
|
|
851
|
+
.describe("Canonical resolver audience: anyone, not_creator, or human_only.");
|
|
852
|
+
export const issueThreadInteractionResolverPolicySchema = z
|
|
853
|
+
.enum(ISSUE_THREAD_INTERACTION_RESOLVER_POLICIES)
|
|
854
|
+
.describe("Resolver audience. Use anyone, not_creator, or human_only; board_or_agents and board_only are deprecated compatibility aliases.");
|
|
855
|
+
export const issueThreadInteractionResolverPolicyProvenanceSchema = z.enum(ISSUE_THREAD_INTERACTION_RESOLVER_POLICY_PROVENANCES);
|
|
856
|
+
export const issueThreadInteractionEffectiveResolverPolicySourceSchema = z.enum(ISSUE_THREAD_INTERACTION_EFFECTIVE_RESOLVER_POLICY_SOURCES);
|
|
857
|
+
export const issueThreadInteractionContinuationPolicySchema = z.enum(ISSUE_THREAD_INTERACTION_CONTINUATION_POLICIES);
|
|
858
|
+
export const connectionIntentPhaseSchema = z.enum([
|
|
859
|
+
"requested",
|
|
860
|
+
"authorizing",
|
|
861
|
+
"needs_retry",
|
|
862
|
+
]);
|
|
863
|
+
const connectionIntentBrandAssetSchema = z
|
|
864
|
+
.string()
|
|
865
|
+
.max(2048)
|
|
866
|
+
.refine((value) => {
|
|
867
|
+
if (/^\/brands\/apps\/[a-z0-9][a-z0-9._-]*\.(?:svg|png)$/i.test(value))
|
|
868
|
+
return true;
|
|
869
|
+
try {
|
|
870
|
+
return new URL(value).protocol === "https:";
|
|
871
|
+
}
|
|
872
|
+
catch {
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
875
|
+
}, "Connection intent brand assets must be HTTPS URLs or local app brand paths");
|
|
876
|
+
export const connectionIntentPayloadSchema = z
|
|
877
|
+
.object({
|
|
878
|
+
purpose: z.literal("ai").optional(),
|
|
879
|
+
version: z.literal(1),
|
|
880
|
+
serviceSlug: z.string().trim().min(1).max(120),
|
|
881
|
+
serviceName: z.string().trim().min(1).max(160),
|
|
882
|
+
serviceLogoUrl: connectionIntentBrandAssetSchema.nullable().optional(),
|
|
883
|
+
serviceDarkLogoUrl: connectionIntentBrandAssetSchema.nullable().optional(),
|
|
884
|
+
requestingAgentId: z.string().guid(),
|
|
885
|
+
requestingAgentName: z.string().trim().min(1).max(160),
|
|
886
|
+
phase: connectionIntentPhaseSchema,
|
|
887
|
+
})
|
|
888
|
+
.strict();
|
|
889
|
+
export const connectionIntentResultSchema = z
|
|
890
|
+
.object({
|
|
891
|
+
version: z.literal(1),
|
|
892
|
+
outcome: z.enum(["connected", "declined", "superseded", "expired"]),
|
|
893
|
+
connectionId: z.string().guid().nullable().optional(),
|
|
894
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
895
|
+
supersededByInteractionId: z.string().guid().nullable().optional(),
|
|
896
|
+
})
|
|
897
|
+
.strict()
|
|
898
|
+
.superRefine((value, ctx) => {
|
|
899
|
+
if (value.outcome === "connected" && !value.connectionId) {
|
|
900
|
+
ctx.addIssue({
|
|
901
|
+
code: z.ZodIssueCode.custom,
|
|
902
|
+
path: ["connectionId"],
|
|
903
|
+
message: "Connected intents require a connection id",
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
if (value.outcome === "superseded" && !value.supersededByInteractionId) {
|
|
907
|
+
ctx.addIssue({
|
|
908
|
+
code: z.ZodIssueCode.custom,
|
|
909
|
+
path: ["supersededByInteractionId"],
|
|
910
|
+
message: "Superseded intents require the replacement interaction id",
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
export const issueDocumentKeySchema = z
|
|
915
|
+
.string()
|
|
916
|
+
.trim()
|
|
917
|
+
.min(1)
|
|
918
|
+
.max(64)
|
|
919
|
+
.regex(/^[a-z0-9][a-z0-9_-]*$/, "Document key must be lowercase letters, numbers, _ or -");
|
|
920
|
+
export const suggestedTaskDraftSchema = z
|
|
921
|
+
.object({
|
|
922
|
+
clientKey: z.string().trim().min(1).max(120),
|
|
923
|
+
parentClientKey: z.string().trim().min(1).max(120).nullable().optional(),
|
|
924
|
+
parentId: z.string().guid().nullable().optional(),
|
|
925
|
+
title: z.string().trim().min(1).max(240),
|
|
926
|
+
description: multilineTextSchema
|
|
927
|
+
.pipe(z.string().trim().max(20000))
|
|
928
|
+
.nullable()
|
|
929
|
+
.optional(),
|
|
930
|
+
priority: z.enum(ISSUE_PRIORITIES).nullable().optional(),
|
|
931
|
+
workMode: z.enum(ISSUE_WORK_MODES).nullable().optional(),
|
|
932
|
+
assigneeAgentId: z.string().guid().nullable().optional(),
|
|
933
|
+
assigneeUserId: z.string().trim().min(1).nullable().optional(),
|
|
934
|
+
projectId: z.string().guid().nullable().optional(),
|
|
935
|
+
goalId: z.string().guid().nullable().optional(),
|
|
936
|
+
billingCode: z.string().trim().max(120).nullable().optional(),
|
|
937
|
+
labels: z.array(z.string().trim().min(1).max(48)).max(20).optional(),
|
|
938
|
+
hiddenInPreview: z.boolean().optional(),
|
|
939
|
+
})
|
|
940
|
+
.superRefine((value, ctx) => {
|
|
941
|
+
if (value.assigneeAgentId && value.assigneeUserId) {
|
|
942
|
+
ctx.addIssue({
|
|
943
|
+
code: z.ZodIssueCode.custom,
|
|
944
|
+
message: "Suggested tasks can only target one assignee",
|
|
945
|
+
path: ["assigneeAgentId"],
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
export const suggestTasksPayloadSchema = z
|
|
950
|
+
.object({
|
|
951
|
+
version: z.literal(1),
|
|
952
|
+
defaultParentId: z.string().guid().nullable().optional(),
|
|
953
|
+
tasks: z.array(suggestedTaskDraftSchema).min(1).max(50),
|
|
954
|
+
})
|
|
955
|
+
.superRefine((value, ctx) => {
|
|
956
|
+
const seenClientKeys = new Set();
|
|
957
|
+
for (const [index, task] of value.tasks.entries()) {
|
|
958
|
+
if (seenClientKeys.has(task.clientKey)) {
|
|
959
|
+
ctx.addIssue({
|
|
960
|
+
code: z.ZodIssueCode.custom,
|
|
961
|
+
message: "clientKey must be unique within one interaction",
|
|
962
|
+
path: ["tasks", index, "clientKey"],
|
|
963
|
+
});
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
seenClientKeys.add(task.clientKey);
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
export const suggestTasksResultCreatedTaskSchema = z.object({
|
|
970
|
+
clientKey: z.string().trim().min(1).max(120),
|
|
971
|
+
issueId: z.string().guid(),
|
|
972
|
+
identifier: z.string().trim().min(1).nullable().optional(),
|
|
973
|
+
title: z.string().trim().min(1).nullable().optional(),
|
|
974
|
+
parentIssueId: z.string().guid().nullable().optional(),
|
|
975
|
+
parentIdentifier: z.string().trim().min(1).nullable().optional(),
|
|
976
|
+
});
|
|
977
|
+
export const suggestTasksResultSchema = z.object({
|
|
978
|
+
version: z.literal(1),
|
|
979
|
+
outcome: z
|
|
980
|
+
.enum(["skipped", "withdrawn", "issue_closed", "addressee_deleted"])
|
|
981
|
+
.optional(),
|
|
982
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
983
|
+
createdTasks: z.array(suggestTasksResultCreatedTaskSchema).max(50).optional(),
|
|
984
|
+
skippedClientKeys: z
|
|
985
|
+
.array(z.string().trim().min(1).max(120))
|
|
986
|
+
.max(50)
|
|
987
|
+
.optional(),
|
|
988
|
+
rejectionReason: z.string().trim().max(4000).nullable().optional(),
|
|
989
|
+
});
|
|
990
|
+
export const askUserQuestionsQuestionOptionSchema = z.object({
|
|
991
|
+
id: z.string().trim().min(1).max(160),
|
|
992
|
+
label: z.string().trim().min(1).max(1000),
|
|
993
|
+
description: z.string().trim().max(4000).nullable().optional(),
|
|
994
|
+
freeText: z
|
|
995
|
+
.boolean()
|
|
996
|
+
.optional()
|
|
997
|
+
.describe("When true, selecting this option reveals an inline text field; the typed value is returned as the question's otherText. Use this for a real \"I'll describe it\" choice instead of authoring a dead option that does nothing. At most one free-text option per question."),
|
|
998
|
+
});
|
|
999
|
+
export const askUserQuestionsQuestionSchema = z.object({
|
|
1000
|
+
id: z.string().trim().min(1).max(160),
|
|
1001
|
+
prompt: z.string().trim().min(1).max(4000),
|
|
1002
|
+
helpText: z.string().trim().max(4000).nullable().optional(),
|
|
1003
|
+
selectionMode: z.enum(["single", "multi"]),
|
|
1004
|
+
required: z.boolean().optional(),
|
|
1005
|
+
allowOther: z.boolean().optional(),
|
|
1006
|
+
options: z.array(askUserQuestionsQuestionOptionSchema).min(1).max(129),
|
|
1007
|
+
});
|
|
1008
|
+
const paperclipQuestionOptionSchema = z.object({
|
|
1009
|
+
id: z.string().min(1).max(160),
|
|
1010
|
+
label: z.string().min(1).max(1000),
|
|
1011
|
+
description: z.string().max(4000).optional(),
|
|
1012
|
+
recommended: z.boolean().optional(),
|
|
1013
|
+
});
|
|
1014
|
+
const paperclipQuestionSchema = z
|
|
1015
|
+
.object({
|
|
1016
|
+
id: z.string().min(1).max(160),
|
|
1017
|
+
header: z.string().max(1000).optional(),
|
|
1018
|
+
prompt: z.string().min(1).max(4000),
|
|
1019
|
+
helpText: z.string().max(4000).optional(),
|
|
1020
|
+
required: z.boolean(),
|
|
1021
|
+
answerMode: z.enum(["single_select", "multi_select", "text"]),
|
|
1022
|
+
options: z.array(paperclipQuestionOptionSchema).max(128).optional(),
|
|
1023
|
+
customAnswer: z
|
|
1024
|
+
.object({
|
|
1025
|
+
enabled: z.literal(true),
|
|
1026
|
+
label: z.string().max(1000).optional(),
|
|
1027
|
+
placeholder: z.string().max(1000).optional(),
|
|
1028
|
+
})
|
|
1029
|
+
.optional(),
|
|
1030
|
+
textValidation: z
|
|
1031
|
+
.object({
|
|
1032
|
+
minLength: z.number().int().min(0).max(100000).optional(),
|
|
1033
|
+
maxLength: z.number().int().min(0).max(100000).optional(),
|
|
1034
|
+
pattern: z.string().max(1000).optional(),
|
|
1035
|
+
inputType: z.enum(["text", "number", "integer"]).optional(),
|
|
1036
|
+
minimum: z.number().finite().optional(),
|
|
1037
|
+
maximum: z.number().finite().optional(),
|
|
1038
|
+
})
|
|
1039
|
+
.optional(),
|
|
1040
|
+
})
|
|
1041
|
+
.superRefine((value, ctx) => {
|
|
1042
|
+
if (value.answerMode === "text" &&
|
|
1043
|
+
value.options &&
|
|
1044
|
+
value.options.length > 0) {
|
|
1045
|
+
ctx.addIssue({
|
|
1046
|
+
code: z.ZodIssueCode.custom,
|
|
1047
|
+
message: "text questions cannot define options",
|
|
1048
|
+
path: ["options"],
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
if (value.answerMode !== "text" &&
|
|
1052
|
+
(!value.options || value.options.length === 0)) {
|
|
1053
|
+
ctx.addIssue({
|
|
1054
|
+
code: z.ZodIssueCode.custom,
|
|
1055
|
+
message: "select questions require options",
|
|
1056
|
+
path: ["options"],
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
if (value.answerMode === "text" && value.customAnswer) {
|
|
1060
|
+
ctx.addIssue({
|
|
1061
|
+
code: z.ZodIssueCode.custom,
|
|
1062
|
+
message: "text questions cannot define customAnswer",
|
|
1063
|
+
path: ["customAnswer"],
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
if (value.textValidation?.minLength !== undefined &&
|
|
1067
|
+
value.textValidation.maxLength !== undefined &&
|
|
1068
|
+
value.textValidation.minLength > value.textValidation.maxLength) {
|
|
1069
|
+
ctx.addIssue({
|
|
1070
|
+
code: z.ZodIssueCode.custom,
|
|
1071
|
+
message: "minLength cannot exceed maxLength",
|
|
1072
|
+
path: ["textValidation"],
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
if (value.textValidation?.minimum !== undefined &&
|
|
1076
|
+
value.textValidation.maximum !== undefined &&
|
|
1077
|
+
value.textValidation.minimum > value.textValidation.maximum) {
|
|
1078
|
+
ctx.addIssue({
|
|
1079
|
+
code: z.ZodIssueCode.custom,
|
|
1080
|
+
message: "minimum cannot exceed maximum",
|
|
1081
|
+
path: ["textValidation"],
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
if (value.textValidation?.pattern !== undefined) {
|
|
1085
|
+
try {
|
|
1086
|
+
new RegExp(value.textValidation.pattern);
|
|
1087
|
+
}
|
|
1088
|
+
catch {
|
|
1089
|
+
ctx.addIssue({
|
|
1090
|
+
code: z.ZodIssueCode.custom,
|
|
1091
|
+
message: "pattern must be a valid regular expression",
|
|
1092
|
+
path: ["textValidation", "pattern"],
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
const optionIds = value.options?.map((option) => option.id) ?? [];
|
|
1097
|
+
if (new Set(optionIds).size !== optionIds.length) {
|
|
1098
|
+
ctx.addIssue({
|
|
1099
|
+
code: z.ZodIssueCode.custom,
|
|
1100
|
+
message: "option ids must be unique",
|
|
1101
|
+
path: ["options"],
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
export const paperclipQuestionSetPayloadSchema = z
|
|
1106
|
+
.object({
|
|
1107
|
+
schema: z.literal("paperclip.question_set.v1"),
|
|
1108
|
+
title: z.string().max(1000).optional(),
|
|
1109
|
+
description: z.string().max(4000).optional(),
|
|
1110
|
+
submitLabel: z.string().max(200).optional(),
|
|
1111
|
+
questions: z.array(paperclipQuestionSchema).min(1).max(64),
|
|
1112
|
+
})
|
|
1113
|
+
.superRefine((value, ctx) => {
|
|
1114
|
+
const questionIds = value.questions.map((question) => question.id);
|
|
1115
|
+
if (new Set(questionIds).size !== questionIds.length) {
|
|
1116
|
+
ctx.addIssue({
|
|
1117
|
+
code: z.ZodIssueCode.custom,
|
|
1118
|
+
message: "question ids must be unique",
|
|
1119
|
+
path: ["questions"],
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
export const askUserQuestionsPayloadSchema = z
|
|
1124
|
+
.object({
|
|
1125
|
+
version: z.literal(1),
|
|
1126
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1127
|
+
submitLabel: z.string().trim().max(120).nullable().optional(),
|
|
1128
|
+
supersedeOnUserComment: z.boolean().optional(),
|
|
1129
|
+
questions: z.array(askUserQuestionsQuestionSchema).min(1).max(64),
|
|
1130
|
+
/** Exact canonical presentation retained for a recovered harness request. */
|
|
1131
|
+
questionSet: paperclipQuestionSetPayloadSchema.optional(),
|
|
1132
|
+
/** Stable correlation for draft handoff from a live runtime request. */
|
|
1133
|
+
runtimeRequestId: z.string().trim().min(1).max(255).nullable().optional(),
|
|
1134
|
+
})
|
|
1135
|
+
.superRefine((value, ctx) => {
|
|
1136
|
+
const seenQuestionIds = new Set();
|
|
1137
|
+
for (const [questionIndex, question] of value.questions.entries()) {
|
|
1138
|
+
if (seenQuestionIds.has(question.id)) {
|
|
1139
|
+
ctx.addIssue({
|
|
1140
|
+
code: z.ZodIssueCode.custom,
|
|
1141
|
+
message: "Question ids must be unique within one interaction",
|
|
1142
|
+
path: ["questions", questionIndex, "id"],
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
seenQuestionIds.add(question.id);
|
|
1146
|
+
const seenOptionIds = new Set();
|
|
1147
|
+
let freeTextOptionCount = 0;
|
|
1148
|
+
for (const [optionIndex, option] of question.options.entries()) {
|
|
1149
|
+
if (seenOptionIds.has(option.id)) {
|
|
1150
|
+
ctx.addIssue({
|
|
1151
|
+
code: z.ZodIssueCode.custom,
|
|
1152
|
+
message: "Option ids must be unique within one question",
|
|
1153
|
+
path: ["questions", questionIndex, "options", optionIndex, "id"],
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
seenOptionIds.add(option.id);
|
|
1157
|
+
if (option.freeText) {
|
|
1158
|
+
freeTextOptionCount += 1;
|
|
1159
|
+
if (freeTextOptionCount > 1) {
|
|
1160
|
+
ctx.addIssue({
|
|
1161
|
+
code: z.ZodIssueCode.custom,
|
|
1162
|
+
message: "A question may declare at most one free-text option",
|
|
1163
|
+
path: [
|
|
1164
|
+
"questions",
|
|
1165
|
+
questionIndex,
|
|
1166
|
+
"options",
|
|
1167
|
+
optionIndex,
|
|
1168
|
+
"freeText",
|
|
1169
|
+
],
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
export const askUserQuestionsAnswerSchema = z.object({
|
|
1177
|
+
questionId: z.string().trim().min(1).max(160),
|
|
1178
|
+
optionIds: z.array(z.string().trim().min(1).max(160)).max(129),
|
|
1179
|
+
otherText: multilineTextSchema
|
|
1180
|
+
.pipe(z.string().trim().max(100000))
|
|
1181
|
+
.nullable()
|
|
1182
|
+
.optional(),
|
|
1183
|
+
});
|
|
1184
|
+
export const askUserQuestionsResultSchema = z.object({
|
|
1185
|
+
version: z.literal(1),
|
|
1186
|
+
outcome: z
|
|
1187
|
+
.enum(["skipped", "withdrawn", "issue_closed", "addressee_deleted"])
|
|
1188
|
+
.optional(),
|
|
1189
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1190
|
+
answers: z.array(askUserQuestionsAnswerSchema).max(64),
|
|
1191
|
+
cancelled: z.literal(true).optional(),
|
|
1192
|
+
cancellationReason: z.string().trim().max(4000).nullable().optional(),
|
|
1193
|
+
expirationReason: z
|
|
1194
|
+
.enum(["superseded_by_comment", "superseded_by_newer_interaction"])
|
|
1195
|
+
.optional(),
|
|
1196
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1197
|
+
// Set alongside expirationReason "superseded_by_newer_interaction": the id of
|
|
1198
|
+
// the newer sibling ask_user_questions that replaced this one (PAP-437).
|
|
1199
|
+
supersededByInteractionId: z.string().guid().nullable().optional(),
|
|
1200
|
+
summaryMarkdown: z.string().max(20000).nullable().optional(),
|
|
1201
|
+
});
|
|
1202
|
+
const requestConfirmationHrefSchema = z
|
|
1203
|
+
.string()
|
|
1204
|
+
.trim()
|
|
1205
|
+
.min(1)
|
|
1206
|
+
.max(2000)
|
|
1207
|
+
.refine((value) => {
|
|
1208
|
+
if (value.startsWith("#"))
|
|
1209
|
+
return true;
|
|
1210
|
+
if (value.startsWith("/"))
|
|
1211
|
+
return !value.startsWith("//");
|
|
1212
|
+
return /^https?:\/\//i.test(value);
|
|
1213
|
+
}, "href must be a root-relative path, same-page fragment, or http(s) URL");
|
|
1214
|
+
const requestConfirmationTargetBaseSchema = z.object({
|
|
1215
|
+
label: z.string().trim().min(1).max(120).nullable().optional(),
|
|
1216
|
+
href: requestConfirmationHrefSchema.nullable().optional(),
|
|
1217
|
+
});
|
|
1218
|
+
export const requestConfirmationIssueDocumentTargetSchema = requestConfirmationTargetBaseSchema.extend({
|
|
1219
|
+
type: z.literal("issue_document"),
|
|
1220
|
+
issueId: z.string().guid().nullable().optional(),
|
|
1221
|
+
documentId: z.string().guid().nullable().optional(),
|
|
1222
|
+
key: issueDocumentKeySchema,
|
|
1223
|
+
revisionId: z.string().guid(),
|
|
1224
|
+
revisionNumber: z.number().int().positive().nullable().optional(),
|
|
1225
|
+
});
|
|
1226
|
+
export const requestConfirmationCustomTargetSchema = requestConfirmationTargetBaseSchema.extend({
|
|
1227
|
+
type: z.literal("custom"),
|
|
1228
|
+
key: z.string().trim().min(1).max(120),
|
|
1229
|
+
revisionId: z.string().trim().min(1).max(255).nullable().optional(),
|
|
1230
|
+
revisionNumber: z.number().int().positive().nullable().optional(),
|
|
1231
|
+
});
|
|
1232
|
+
export const requestConfirmationTargetSchema = z.discriminatedUnion("type", [
|
|
1233
|
+
requestConfirmationIssueDocumentTargetSchema,
|
|
1234
|
+
requestConfirmationCustomTargetSchema,
|
|
1235
|
+
]);
|
|
1236
|
+
export const requestConfirmationToolActionPayloadSchema = z.object({
|
|
1237
|
+
version: z.literal(1),
|
|
1238
|
+
actionRequestId: z.string().guid(),
|
|
1239
|
+
invocationId: z.string().guid(),
|
|
1240
|
+
toolName: z.string().trim().min(1).max(500),
|
|
1241
|
+
toolDisplayName: z.string().trim().min(1).max(500),
|
|
1242
|
+
connectionId: z.string().guid().nullable(),
|
|
1243
|
+
applicationId: z.string().guid().nullable(),
|
|
1244
|
+
appDisplayName: z.string().trim().min(1).max(500).nullable(),
|
|
1245
|
+
risk: z.enum(["read", "write", "destructive"]),
|
|
1246
|
+
rememberActionScope: z.string().trim().min(1).max(1000).optional(),
|
|
1247
|
+
previewMarkdown: z.string().trim().min(1).max(20000),
|
|
1248
|
+
argumentsSummaryJson: z.string().max(20000),
|
|
1249
|
+
argumentsHash: z.string().trim().min(1).max(255),
|
|
1250
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
1251
|
+
});
|
|
1252
|
+
export const requestConfirmationSecretProposalPayloadSchema = z.object({
|
|
1253
|
+
version: z.literal(1),
|
|
1254
|
+
proposalId: z.string().guid(),
|
|
1255
|
+
sourceSecretLabel: z.string().trim().min(1).max(500),
|
|
1256
|
+
configPath: z.string().trim().min(1).max(500),
|
|
1257
|
+
targetAgentId: z.string().guid(),
|
|
1258
|
+
targetAgentName: z.string().trim().min(1).max(500),
|
|
1259
|
+
justification: z.string().trim().min(1).max(20000),
|
|
1260
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
1261
|
+
});
|
|
1262
|
+
export const requestConfirmationPayloadSchema = z.object({
|
|
1263
|
+
version: z.literal(1),
|
|
1264
|
+
prompt: z.string().trim().min(1).max(1000),
|
|
1265
|
+
acceptLabel: z.string().trim().min(1).max(80).nullable().optional(),
|
|
1266
|
+
rejectLabel: z.string().trim().min(1).max(80).nullable().optional(),
|
|
1267
|
+
rejectRequiresReason: z.boolean().optional(),
|
|
1268
|
+
rejectReasonLabel: z.string().trim().min(1).max(160).nullable().optional(),
|
|
1269
|
+
allowDeclineReason: z.boolean().optional().default(true),
|
|
1270
|
+
declineReasonPlaceholder: z
|
|
1271
|
+
.string()
|
|
1272
|
+
.trim()
|
|
1273
|
+
.min(1)
|
|
1274
|
+
.max(240)
|
|
1275
|
+
.nullable()
|
|
1276
|
+
.optional(),
|
|
1277
|
+
detailsMarkdown: z.string().max(20000).nullable().optional(),
|
|
1278
|
+
supersedeOnUserComment: z.boolean().optional(),
|
|
1279
|
+
target: requestConfirmationTargetSchema.nullable().optional(),
|
|
1280
|
+
toolAction: requestConfirmationToolActionPayloadSchema.optional(),
|
|
1281
|
+
secretProposal: requestConfirmationSecretProposalPayloadSchema.optional(),
|
|
1282
|
+
});
|
|
1283
|
+
export const requestCheckboxConfirmationOptionSchema = z.object({
|
|
1284
|
+
id: z.string().trim().min(1).max(120),
|
|
1285
|
+
label: z.string().trim().min(1).max(120),
|
|
1286
|
+
description: z.string().trim().max(500).nullable().optional(),
|
|
1287
|
+
});
|
|
1288
|
+
export const requestCheckboxConfirmationPayloadSchema = z
|
|
1289
|
+
.object({
|
|
1290
|
+
version: z.literal(1),
|
|
1291
|
+
prompt: z.string().trim().min(1).max(1000),
|
|
1292
|
+
detailsMarkdown: z.string().max(20000).nullable().optional(),
|
|
1293
|
+
options: z
|
|
1294
|
+
.array(requestCheckboxConfirmationOptionSchema)
|
|
1295
|
+
.min(1)
|
|
1296
|
+
.max(REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT),
|
|
1297
|
+
defaultSelectedOptionIds: z
|
|
1298
|
+
.array(z.string().trim().min(1).max(120))
|
|
1299
|
+
.max(REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT)
|
|
1300
|
+
.optional()
|
|
1301
|
+
.default([]),
|
|
1302
|
+
minSelected: z.number().int().min(0).optional().default(0),
|
|
1303
|
+
maxSelected: z.number().int().min(0).nullable().optional(),
|
|
1304
|
+
acceptLabel: z.string().trim().min(1).max(80).nullable().optional(),
|
|
1305
|
+
rejectLabel: z.string().trim().min(1).max(80).nullable().optional(),
|
|
1306
|
+
rejectRequiresReason: z.boolean().optional(),
|
|
1307
|
+
rejectReasonLabel: z.string().trim().min(1).max(160).nullable().optional(),
|
|
1308
|
+
allowDeclineReason: z.boolean().optional().default(true),
|
|
1309
|
+
declineReasonPlaceholder: z
|
|
1310
|
+
.string()
|
|
1311
|
+
.trim()
|
|
1312
|
+
.min(1)
|
|
1313
|
+
.max(240)
|
|
1314
|
+
.nullable()
|
|
1315
|
+
.optional(),
|
|
1316
|
+
supersedeOnUserComment: z.boolean().optional(),
|
|
1317
|
+
target: requestConfirmationTargetSchema.nullable().optional(),
|
|
1318
|
+
})
|
|
1319
|
+
.superRefine((value, ctx) => {
|
|
1320
|
+
const optionIds = new Set();
|
|
1321
|
+
for (const [index, option] of value.options.entries()) {
|
|
1322
|
+
if (optionIds.has(option.id)) {
|
|
1323
|
+
ctx.addIssue({
|
|
1324
|
+
code: z.ZodIssueCode.custom,
|
|
1325
|
+
message: "Option ids must be unique within one checkbox confirmation",
|
|
1326
|
+
path: ["options", index, "id"],
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
optionIds.add(option.id);
|
|
1330
|
+
}
|
|
1331
|
+
const defaultSelectedOptionIds = new Set();
|
|
1332
|
+
for (const [index, optionId] of value.defaultSelectedOptionIds.entries()) {
|
|
1333
|
+
if (defaultSelectedOptionIds.has(optionId)) {
|
|
1334
|
+
ctx.addIssue({
|
|
1335
|
+
code: z.ZodIssueCode.custom,
|
|
1336
|
+
message: "defaultSelectedOptionIds must be unique",
|
|
1337
|
+
path: ["defaultSelectedOptionIds", index],
|
|
1338
|
+
});
|
|
1339
|
+
continue;
|
|
1340
|
+
}
|
|
1341
|
+
defaultSelectedOptionIds.add(optionId);
|
|
1342
|
+
if (!optionIds.has(optionId)) {
|
|
1343
|
+
ctx.addIssue({
|
|
1344
|
+
code: z.ZodIssueCode.custom,
|
|
1345
|
+
message: "defaultSelectedOptionIds must reference existing option ids",
|
|
1346
|
+
path: ["defaultSelectedOptionIds", index],
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
const maxSelected = value.maxSelected ?? null;
|
|
1351
|
+
if (value.minSelected > value.options.length) {
|
|
1352
|
+
ctx.addIssue({
|
|
1353
|
+
code: z.ZodIssueCode.custom,
|
|
1354
|
+
message: "minSelected cannot exceed the option count",
|
|
1355
|
+
path: ["minSelected"],
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
if (value.defaultSelectedOptionIds.length < value.minSelected) {
|
|
1359
|
+
ctx.addIssue({
|
|
1360
|
+
code: z.ZodIssueCode.custom,
|
|
1361
|
+
message: "defaultSelectedOptionIds must satisfy minSelected",
|
|
1362
|
+
path: ["defaultSelectedOptionIds"],
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
if (maxSelected != null) {
|
|
1366
|
+
if (maxSelected < value.minSelected) {
|
|
1367
|
+
ctx.addIssue({
|
|
1368
|
+
code: z.ZodIssueCode.custom,
|
|
1369
|
+
message: "maxSelected must be greater than or equal to minSelected",
|
|
1370
|
+
path: ["maxSelected"],
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
if (maxSelected > value.options.length) {
|
|
1374
|
+
ctx.addIssue({
|
|
1375
|
+
code: z.ZodIssueCode.custom,
|
|
1376
|
+
message: "maxSelected cannot exceed the option count",
|
|
1377
|
+
path: ["maxSelected"],
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
if (value.defaultSelectedOptionIds.length > maxSelected) {
|
|
1381
|
+
ctx.addIssue({
|
|
1382
|
+
code: z.ZodIssueCode.custom,
|
|
1383
|
+
message: "defaultSelectedOptionIds cannot exceed maxSelected",
|
|
1384
|
+
path: ["defaultSelectedOptionIds"],
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1389
|
+
export const requestConfirmationResumeFailureSchema = z.object({
|
|
1390
|
+
status: z.enum(["retrying", "needs_attention"]),
|
|
1391
|
+
errorCode: z.string().trim().min(1).max(120).nullable(),
|
|
1392
|
+
attempt: z.number().int().min(0).max(100),
|
|
1393
|
+
maxAttempts: z.number().int().min(0).max(100),
|
|
1394
|
+
runId: z.string().guid().nullable().optional(),
|
|
1395
|
+
retryRunId: z.string().guid().nullable().optional(),
|
|
1396
|
+
recoveryActionId: z.string().guid().nullable().optional(),
|
|
1397
|
+
updatedAt: z.string().trim().min(1).nullable().optional(),
|
|
1398
|
+
});
|
|
1399
|
+
export const requestConfirmationToolActionResultSchema = z.object({
|
|
1400
|
+
version: z.literal(1),
|
|
1401
|
+
rememberedAction: z.boolean().optional(),
|
|
1402
|
+
status: z.enum(["approved", "executing", "executed", "failed", "expired"]),
|
|
1403
|
+
errorCode: z.string().trim().min(1).max(120).nullable().optional(),
|
|
1404
|
+
errorMessage: z.string().trim().min(1).max(4000).nullable().optional(),
|
|
1405
|
+
// Populated on `executed` so the card can report the outcome (e.g. "Row 42
|
|
1406
|
+
// added") instead of a bare checkmark, with an optional deep-link when the
|
|
1407
|
+
// connector returns a URL (PAP-13745 §5 Executed / Peak-End).
|
|
1408
|
+
resultSummary: z.string().trim().min(1).max(4000).nullable().optional(),
|
|
1409
|
+
resultHref: z.string().trim().url().max(2000).nullable().optional(),
|
|
1410
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
1411
|
+
});
|
|
1412
|
+
export const requestConfirmationSecretProposalResultSchema = z.object({
|
|
1413
|
+
version: z.literal(1),
|
|
1414
|
+
status: z.enum(["executed", "failed", "rejected", "withdrawn", "expired"]),
|
|
1415
|
+
errorCode: z.string().trim().min(1).max(120).nullable().optional(),
|
|
1416
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
1417
|
+
});
|
|
1418
|
+
export const requestConfirmationResultSchema = z.object({
|
|
1419
|
+
version: z.literal(1),
|
|
1420
|
+
outcome: z.enum([
|
|
1421
|
+
"accepted",
|
|
1422
|
+
"rejected",
|
|
1423
|
+
"superseded_by_comment",
|
|
1424
|
+
"superseded_by_newer_request",
|
|
1425
|
+
"stale_target",
|
|
1426
|
+
"skipped",
|
|
1427
|
+
"withdrawn",
|
|
1428
|
+
"issue_closed",
|
|
1429
|
+
"addressee_deleted",
|
|
1430
|
+
]),
|
|
1431
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1432
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1433
|
+
supersededByInteractionId: z.string().guid().nullable().optional(),
|
|
1434
|
+
staleTarget: requestConfirmationTargetSchema.nullable().optional(),
|
|
1435
|
+
resumeFailure: requestConfirmationResumeFailureSchema.nullable().optional(),
|
|
1436
|
+
toolAction: requestConfirmationToolActionResultSchema.optional(),
|
|
1437
|
+
secretProposal: requestConfirmationSecretProposalResultSchema.optional(),
|
|
1438
|
+
});
|
|
1439
|
+
export const requestCheckboxConfirmationResultSchema = requestConfirmationResultSchema
|
|
1440
|
+
.extend({
|
|
1441
|
+
selectedOptionIds: z
|
|
1442
|
+
.array(z.string().trim().min(1).max(120))
|
|
1443
|
+
.max(REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT)
|
|
1444
|
+
.optional(),
|
|
1445
|
+
})
|
|
1446
|
+
.superRefine((value, ctx) => {
|
|
1447
|
+
const selectedOptionIds = value.selectedOptionIds ?? [];
|
|
1448
|
+
const seenOptionIds = new Set();
|
|
1449
|
+
for (const [index, optionId] of selectedOptionIds.entries()) {
|
|
1450
|
+
if (seenOptionIds.has(optionId)) {
|
|
1451
|
+
ctx.addIssue({
|
|
1452
|
+
code: z.ZodIssueCode.custom,
|
|
1453
|
+
message: "selectedOptionIds must be unique",
|
|
1454
|
+
path: ["selectedOptionIds", index],
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
seenOptionIds.add(optionId);
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
export const requestItemVerdictValueSchema = z.enum([
|
|
1461
|
+
"approve",
|
|
1462
|
+
"reject",
|
|
1463
|
+
"defer",
|
|
1464
|
+
]);
|
|
1465
|
+
export const requestItemVerdictsItemSchema = z.object({
|
|
1466
|
+
id: z.string().trim().min(1).max(120),
|
|
1467
|
+
label: z.string().trim().min(1).max(120),
|
|
1468
|
+
description: z.string().trim().max(500).nullable().optional(),
|
|
1469
|
+
previewMarkdown: z.string().max(20000).nullable().optional(),
|
|
1470
|
+
href: requestConfirmationHrefSchema.nullable().optional(),
|
|
1471
|
+
attachmentId: z.string().guid().nullable().optional(),
|
|
1472
|
+
});
|
|
1473
|
+
export const requestItemVerdictsPayloadSchema = z
|
|
1474
|
+
.object({
|
|
1475
|
+
version: z.literal(1),
|
|
1476
|
+
prompt: z.string().trim().min(1).max(1000),
|
|
1477
|
+
detailsMarkdown: z.string().max(20000).nullable().optional(),
|
|
1478
|
+
items: z
|
|
1479
|
+
.array(requestItemVerdictsItemSchema)
|
|
1480
|
+
.min(1)
|
|
1481
|
+
.max(REQUEST_ITEM_VERDICTS_ITEM_LIMIT),
|
|
1482
|
+
verdicts: z
|
|
1483
|
+
.array(requestItemVerdictValueSchema)
|
|
1484
|
+
.min(2)
|
|
1485
|
+
.max(3)
|
|
1486
|
+
.optional()
|
|
1487
|
+
.default(["approve", "reject"]),
|
|
1488
|
+
requireReasonOn: z
|
|
1489
|
+
.array(requestItemVerdictValueSchema)
|
|
1490
|
+
.max(3)
|
|
1491
|
+
.optional()
|
|
1492
|
+
.default(["reject"]),
|
|
1493
|
+
reasonLabel: z.string().trim().min(1).max(160).nullable().optional(),
|
|
1494
|
+
allowBulkApprove: z.boolean().optional().default(true),
|
|
1495
|
+
supersedeOnUserComment: z.boolean().optional(),
|
|
1496
|
+
target: requestConfirmationTargetSchema.nullable().optional(),
|
|
1497
|
+
})
|
|
1498
|
+
.superRefine((value, ctx) => {
|
|
1499
|
+
const itemIds = new Set();
|
|
1500
|
+
for (const [index, item] of value.items.entries()) {
|
|
1501
|
+
if (itemIds.has(item.id)) {
|
|
1502
|
+
ctx.addIssue({
|
|
1503
|
+
code: z.ZodIssueCode.custom,
|
|
1504
|
+
message: "Item ids must be unique within one item verdict request",
|
|
1505
|
+
path: ["items", index, "id"],
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
itemIds.add(item.id);
|
|
1509
|
+
}
|
|
1510
|
+
const verdicts = new Set();
|
|
1511
|
+
for (const [index, verdict] of value.verdicts.entries()) {
|
|
1512
|
+
if (verdicts.has(verdict)) {
|
|
1513
|
+
ctx.addIssue({
|
|
1514
|
+
code: z.ZodIssueCode.custom,
|
|
1515
|
+
message: "verdicts must be unique",
|
|
1516
|
+
path: ["verdicts", index],
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
verdicts.add(verdict);
|
|
1520
|
+
}
|
|
1521
|
+
if (!verdicts.has("approve") || !verdicts.has("reject")) {
|
|
1522
|
+
ctx.addIssue({
|
|
1523
|
+
code: z.ZodIssueCode.custom,
|
|
1524
|
+
message: "verdicts must include approve and reject; defer is optional",
|
|
1525
|
+
path: ["verdicts"],
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
const reasonVerdicts = new Set();
|
|
1529
|
+
for (const [index, verdict] of value.requireReasonOn.entries()) {
|
|
1530
|
+
if (reasonVerdicts.has(verdict)) {
|
|
1531
|
+
ctx.addIssue({
|
|
1532
|
+
code: z.ZodIssueCode.custom,
|
|
1533
|
+
message: "requireReasonOn must be unique",
|
|
1534
|
+
path: ["requireReasonOn", index],
|
|
1535
|
+
});
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1538
|
+
reasonVerdicts.add(verdict);
|
|
1539
|
+
if (!verdicts.has(verdict)) {
|
|
1540
|
+
ctx.addIssue({
|
|
1541
|
+
code: z.ZodIssueCode.custom,
|
|
1542
|
+
message: "requireReasonOn must reference enabled verdicts",
|
|
1543
|
+
path: ["requireReasonOn", index],
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
export const requestItemVerdictsResultItemSchema = z
|
|
1549
|
+
.object({
|
|
1550
|
+
id: z.string().trim().min(1).max(120),
|
|
1551
|
+
verdict: requestItemVerdictValueSchema,
|
|
1552
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1553
|
+
resolvedByUserId: z.string().trim().min(1).max(255).nullable().optional(),
|
|
1554
|
+
resolvedByAgentId: z.string().guid().nullable().optional(),
|
|
1555
|
+
resolvedByRunId: z.string().guid().nullable().optional(),
|
|
1556
|
+
resolvedAt: z.union([z.string().datetime(), z.date()]),
|
|
1557
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1558
|
+
})
|
|
1559
|
+
.superRefine((value, ctx) => {
|
|
1560
|
+
if (!value.resolvedByUserId && !value.resolvedByAgentId) {
|
|
1561
|
+
ctx.addIssue({
|
|
1562
|
+
code: z.ZodIssueCode.custom,
|
|
1563
|
+
message: "a user or agent resolver is required",
|
|
1564
|
+
path: ["resolvedByUserId"],
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
if (value.resolvedByAgentId && !value.resolvedByRunId) {
|
|
1568
|
+
ctx.addIssue({
|
|
1569
|
+
code: z.ZodIssueCode.custom,
|
|
1570
|
+
message: "resolvedByRunId is required for an agent resolver",
|
|
1571
|
+
path: ["resolvedByRunId"],
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
export const requestItemVerdictsResultSchema = z
|
|
1576
|
+
.object({
|
|
1577
|
+
version: z.literal(1),
|
|
1578
|
+
outcome: z.enum([
|
|
1579
|
+
"resolved",
|
|
1580
|
+
"superseded_by_comment",
|
|
1581
|
+
"stale_target",
|
|
1582
|
+
"cancelled",
|
|
1583
|
+
"skipped",
|
|
1584
|
+
"withdrawn",
|
|
1585
|
+
"issue_closed",
|
|
1586
|
+
"addressee_deleted",
|
|
1587
|
+
]),
|
|
1588
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1589
|
+
complete: z.boolean(),
|
|
1590
|
+
items: z
|
|
1591
|
+
.array(requestItemVerdictsResultItemSchema)
|
|
1592
|
+
.max(REQUEST_ITEM_VERDICTS_ITEM_LIMIT),
|
|
1593
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1594
|
+
staleTarget: requestConfirmationTargetSchema.nullable().optional(),
|
|
1595
|
+
})
|
|
1596
|
+
.superRefine((value, ctx) => {
|
|
1597
|
+
const itemIds = new Set();
|
|
1598
|
+
for (const [index, item] of value.items.entries()) {
|
|
1599
|
+
if (itemIds.has(item.id)) {
|
|
1600
|
+
ctx.addIssue({
|
|
1601
|
+
code: z.ZodIssueCode.custom,
|
|
1602
|
+
message: "result item ids must be unique",
|
|
1603
|
+
path: ["items", index, "id"],
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
itemIds.add(item.id);
|
|
1607
|
+
}
|
|
1608
|
+
});
|
|
1609
|
+
const createIssueThreadInteractionCommon = {
|
|
1610
|
+
resolverPolicy: issueThreadInteractionResolverPolicySchema.optional(),
|
|
1611
|
+
addresseeAgentId: z.string().guid().nullable().optional(),
|
|
1612
|
+
addresseeUserId: z.string().trim().min(1).nullable().optional(),
|
|
1613
|
+
};
|
|
1614
|
+
// Validate dual representations on creation, not when reading historical rows.
|
|
1615
|
+
// Otherwise a partial canonical form can hide required storage questions.
|
|
1616
|
+
const createAskUserQuestionsPayloadSchema = askUserQuestionsPayloadSchema.superRefine((value, ctx) => {
|
|
1617
|
+
if (!value.questionSet)
|
|
1618
|
+
return;
|
|
1619
|
+
const shown = new Set(value.questionSet.questions.map((question) => question.id));
|
|
1620
|
+
const stored = new Set(value.questions.map((question) => question.id));
|
|
1621
|
+
if (shown.size !== stored.size || [...shown].some((id) => !stored.has(id))) {
|
|
1622
|
+
ctx.addIssue({
|
|
1623
|
+
code: z.ZodIssueCode.custom,
|
|
1624
|
+
path: ["questionSet", "questions"],
|
|
1625
|
+
message: "questionSet must present every questions entry with the same question IDs. Include choice questions as well as text questions; a partial form hides required answers.",
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
const storedById = new Map(value.questions.map((question) => [question.id, question]));
|
|
1629
|
+
for (const [index, question] of value.questionSet.questions.entries()) {
|
|
1630
|
+
const storage = storedById.get(question.id);
|
|
1631
|
+
if (!storage)
|
|
1632
|
+
continue;
|
|
1633
|
+
const mismatch = (field) => ctx.addIssue({
|
|
1634
|
+
code: z.ZodIssueCode.custom,
|
|
1635
|
+
path: ["questionSet", "questions", index, field],
|
|
1636
|
+
message: `questionSet ${field} must match the corresponding questions entry.`,
|
|
1637
|
+
});
|
|
1638
|
+
if (question.prompt !== storage.prompt)
|
|
1639
|
+
mismatch("prompt");
|
|
1640
|
+
// An omitted storage flag adds no constraint; an explicit flag must agree.
|
|
1641
|
+
if (storage.required !== undefined && question.required !== storage.required)
|
|
1642
|
+
mismatch("required");
|
|
1643
|
+
const mode = question.answerMode === "multi_select" ? "multi" : "single";
|
|
1644
|
+
if (storage.selectionMode !== mode)
|
|
1645
|
+
mismatch("answerMode");
|
|
1646
|
+
if (question.answerMode === "text") {
|
|
1647
|
+
if (storage.options.length !== 1 || !storage.options[0].freeText)
|
|
1648
|
+
mismatch("answerMode");
|
|
1649
|
+
}
|
|
1650
|
+
else {
|
|
1651
|
+
// Text/custom-answer sentinels are storage compatibility, not visible choices.
|
|
1652
|
+
const choices = storage.options.filter((option) => !option.freeText);
|
|
1653
|
+
const canonical = new Map((question.options ?? []).map((option) => [option.id, option.label]));
|
|
1654
|
+
if (choices.length !== canonical.size || choices.some((option) => canonical.get(option.id) !== option.label))
|
|
1655
|
+
mismatch("options");
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
1660
|
+
z.object({
|
|
1661
|
+
...createIssueThreadInteractionCommon,
|
|
1662
|
+
kind: z.literal("suggest_tasks"),
|
|
1663
|
+
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1664
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1665
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1666
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1667
|
+
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1668
|
+
continuationPolicy: issueThreadInteractionContinuationPolicySchema
|
|
1669
|
+
.optional()
|
|
1670
|
+
.default("wake_assignee"),
|
|
1671
|
+
payload: suggestTasksPayloadSchema,
|
|
1672
|
+
}),
|
|
1673
|
+
z.object({
|
|
1674
|
+
...createIssueThreadInteractionCommon,
|
|
1675
|
+
kind: z.literal("ask_user_questions"),
|
|
1676
|
+
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1677
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1678
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1679
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1680
|
+
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1681
|
+
continuationPolicy: issueThreadInteractionContinuationPolicySchema
|
|
1682
|
+
.optional()
|
|
1683
|
+
.default("wake_assignee"),
|
|
1684
|
+
payload: createAskUserQuestionsPayloadSchema,
|
|
1685
|
+
}),
|
|
1686
|
+
z.object({
|
|
1687
|
+
...createIssueThreadInteractionCommon,
|
|
1688
|
+
kind: z.literal("request_confirmation"),
|
|
1689
|
+
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1690
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1691
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1692
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1693
|
+
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1694
|
+
continuationPolicy: issueThreadInteractionContinuationPolicySchema
|
|
1695
|
+
.optional()
|
|
1696
|
+
.default("none"),
|
|
1697
|
+
payload: requestConfirmationPayloadSchema,
|
|
1698
|
+
}),
|
|
1699
|
+
z.object({
|
|
1700
|
+
...createIssueThreadInteractionCommon,
|
|
1701
|
+
kind: z.literal("request_checkbox_confirmation"),
|
|
1702
|
+
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1703
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1704
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1705
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1706
|
+
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1707
|
+
continuationPolicy: issueThreadInteractionContinuationPolicySchema
|
|
1708
|
+
.optional()
|
|
1709
|
+
.default("wake_assignee"),
|
|
1710
|
+
payload: requestCheckboxConfirmationPayloadSchema,
|
|
1711
|
+
}),
|
|
1712
|
+
z.object({
|
|
1713
|
+
...createIssueThreadInteractionCommon,
|
|
1714
|
+
kind: z.literal("request_item_verdicts"),
|
|
1715
|
+
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1716
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1717
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1718
|
+
title: z.string().trim().max(240).nullable().optional(),
|
|
1719
|
+
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1720
|
+
continuationPolicy: issueThreadInteractionContinuationPolicySchema
|
|
1721
|
+
.optional()
|
|
1722
|
+
.default("wake_assignee"),
|
|
1723
|
+
payload: requestItemVerdictsPayloadSchema,
|
|
1724
|
+
}),
|
|
1725
|
+
]);
|
|
1726
|
+
export const acceptIssueThreadInteractionSchema = z
|
|
1727
|
+
.object({
|
|
1728
|
+
rememberAction: z.boolean().optional(),
|
|
1729
|
+
selectedClientKeys: z
|
|
1730
|
+
.array(z.string().trim().min(1).max(120))
|
|
1731
|
+
.min(1)
|
|
1732
|
+
.max(50)
|
|
1733
|
+
.optional(),
|
|
1734
|
+
selectedOptionIds: z
|
|
1735
|
+
.array(z.string().trim().min(1).max(120))
|
|
1736
|
+
.max(REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT)
|
|
1737
|
+
.optional(),
|
|
1738
|
+
})
|
|
1739
|
+
.superRefine((value, ctx) => {
|
|
1740
|
+
const seenClientKeys = new Set();
|
|
1741
|
+
for (const [index, clientKey] of (value.selectedClientKeys ?? []).entries()) {
|
|
1742
|
+
if (seenClientKeys.has(clientKey)) {
|
|
1743
|
+
ctx.addIssue({
|
|
1744
|
+
code: z.ZodIssueCode.custom,
|
|
1745
|
+
message: "selectedClientKeys must be unique",
|
|
1746
|
+
path: ["selectedClientKeys", index],
|
|
1747
|
+
});
|
|
1748
|
+
continue;
|
|
1749
|
+
}
|
|
1750
|
+
seenClientKeys.add(clientKey);
|
|
1751
|
+
}
|
|
1752
|
+
const seenOptionIds = new Set();
|
|
1753
|
+
for (const [index, optionId] of (value.selectedOptionIds ?? []).entries()) {
|
|
1754
|
+
if (seenOptionIds.has(optionId)) {
|
|
1755
|
+
ctx.addIssue({
|
|
1756
|
+
code: z.ZodIssueCode.custom,
|
|
1757
|
+
message: "selectedOptionIds must be unique",
|
|
1758
|
+
path: ["selectedOptionIds", index],
|
|
1759
|
+
});
|
|
1760
|
+
continue;
|
|
1761
|
+
}
|
|
1762
|
+
seenOptionIds.add(optionId);
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
export const rejectIssueThreadInteractionSchema = z.object({
|
|
1766
|
+
reason: z.string().trim().max(4000).optional(),
|
|
1767
|
+
});
|
|
1768
|
+
export const cancelIssueThreadInteractionSchema = z.object({
|
|
1769
|
+
reason: z.string().trim().max(4000).optional(),
|
|
1770
|
+
});
|
|
1771
|
+
export const skipIssueThreadInteractionSchema = z.object({
|
|
1772
|
+
reason: z.string().trim().max(4000).optional(),
|
|
1773
|
+
});
|
|
1774
|
+
export const withdrawIssueThreadInteractionSchema = z.object({
|
|
1775
|
+
reason: z.string().trim().max(4000).optional(),
|
|
1776
|
+
});
|
|
1777
|
+
export const respondIssueThreadInteractionSchema = z.object({
|
|
1778
|
+
answers: z.array(askUserQuestionsAnswerSchema).max(20),
|
|
1779
|
+
summaryMarkdown: multilineTextSchema
|
|
1780
|
+
.pipe(z.string().max(20000))
|
|
1781
|
+
.nullable()
|
|
1782
|
+
.optional(),
|
|
1783
|
+
});
|
|
1784
|
+
export const submitIssueThreadInteractionVerdictsSchema = z
|
|
1785
|
+
.object({
|
|
1786
|
+
verdicts: z
|
|
1787
|
+
.array(z.object({
|
|
1788
|
+
id: z.string().trim().min(1).max(120),
|
|
1789
|
+
verdict: requestItemVerdictValueSchema,
|
|
1790
|
+
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1791
|
+
}))
|
|
1792
|
+
.min(1)
|
|
1793
|
+
.max(REQUEST_ITEM_VERDICTS_ITEM_LIMIT),
|
|
1794
|
+
})
|
|
1795
|
+
.superRefine((value, ctx) => {
|
|
1796
|
+
const itemIds = new Set();
|
|
1797
|
+
for (const [index, verdict] of value.verdicts.entries()) {
|
|
1798
|
+
if (itemIds.has(verdict.id)) {
|
|
1799
|
+
ctx.addIssue({
|
|
1800
|
+
code: z.ZodIssueCode.custom,
|
|
1801
|
+
message: "verdict item ids must be unique",
|
|
1802
|
+
path: ["verdicts", index, "id"],
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
itemIds.add(verdict.id);
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
export const linkIssueApprovalSchema = z.object({
|
|
1809
|
+
approvalId: z.string().guid(),
|
|
1810
|
+
});
|
|
1811
|
+
export const createIssueAttachmentMetadataSchema = z.object({
|
|
1812
|
+
issueCommentId: z.string().guid().optional().nullable(),
|
|
1813
|
+
});
|
|
1814
|
+
export const ISSUE_DOCUMENT_FORMATS = ["markdown"];
|
|
1815
|
+
export const issueDocumentFormatSchema = z.enum(ISSUE_DOCUMENT_FORMATS);
|
|
1816
|
+
export const upsertIssueDocumentSchema = z.object({
|
|
1817
|
+
title: z.string().trim().max(200).nullable().optional(),
|
|
1818
|
+
format: issueDocumentFormatSchema,
|
|
1819
|
+
body: multilineTextSchema.pipe(z.string().max(524288)),
|
|
1820
|
+
changeSummary: z.string().trim().max(500).nullable().optional(),
|
|
1821
|
+
baseRevisionId: z.string().guid().nullable().optional(),
|
|
1822
|
+
});
|
|
1823
|
+
export const restoreIssueDocumentRevisionSchema = z.object({});
|
|
1824
|
+
//# sourceMappingURL=issue.js.map
|