@owlmeans/viable-common 0.0.4
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/README.md +68 -0
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/viable-common/SKILL.md +179 -0
- package/build/agent/index.d.ts +4 -0
- package/build/agent/index.d.ts.map +1 -0
- package/build/agent/index.js +3 -0
- package/build/agent/index.js.map +1 -0
- package/build/agent/memory.d.ts +12 -0
- package/build/agent/memory.d.ts.map +1 -0
- package/build/agent/memory.js +11 -0
- package/build/agent/memory.js.map +1 -0
- package/build/agent/spectator/consts.d.ts +9 -0
- package/build/agent/spectator/consts.d.ts.map +1 -0
- package/build/agent/spectator/consts.js +10 -0
- package/build/agent/spectator/consts.js.map +1 -0
- package/build/agent/spectator/index.d.ts +3 -0
- package/build/agent/spectator/index.d.ts.map +1 -0
- package/build/agent/spectator/index.js +2 -0
- package/build/agent/spectator/index.js.map +1 -0
- package/build/agent/spectator/types.d.ts +13 -0
- package/build/agent/spectator/types.d.ts.map +1 -0
- package/build/agent/spectator/types.js +2 -0
- package/build/agent/spectator/types.js.map +1 -0
- package/build/agent/types.d.ts +10 -0
- package/build/agent/types.d.ts.map +1 -0
- package/build/agent/types.js +2 -0
- package/build/agent/types.js.map +1 -0
- package/build/areas/consts.d.ts +88 -0
- package/build/areas/consts.d.ts.map +1 -0
- package/build/areas/consts.js +106 -0
- package/build/areas/consts.js.map +1 -0
- package/build/areas/index.d.ts +3 -0
- package/build/areas/index.d.ts.map +1 -0
- package/build/areas/index.js +2 -0
- package/build/areas/index.js.map +1 -0
- package/build/areas/types.d.ts +28 -0
- package/build/areas/types.d.ts.map +1 -0
- package/build/areas/types.js +2 -0
- package/build/areas/types.js.map +1 -0
- package/build/ba/consts.d.ts +38 -0
- package/build/ba/consts.d.ts.map +1 -0
- package/build/ba/consts.js +41 -0
- package/build/ba/consts.js.map +1 -0
- package/build/ba/helpers.d.ts +41 -0
- package/build/ba/helpers.d.ts.map +1 -0
- package/build/ba/helpers.js +79 -0
- package/build/ba/helpers.js.map +1 -0
- package/build/ba/index.d.ts +5 -0
- package/build/ba/index.d.ts.map +1 -0
- package/build/ba/index.js +4 -0
- package/build/ba/index.js.map +1 -0
- package/build/ba/schemas.d.ts +13 -0
- package/build/ba/schemas.d.ts.map +1 -0
- package/build/ba/schemas.js +181 -0
- package/build/ba/schemas.js.map +1 -0
- package/build/ba/types.d.ts +113 -0
- package/build/ba/types.d.ts.map +1 -0
- package/build/ba/types.js +2 -0
- package/build/ba/types.js.map +1 -0
- package/build/blueprint/case.d.ts +73 -0
- package/build/blueprint/case.d.ts.map +1 -0
- package/build/blueprint/case.js +244 -0
- package/build/blueprint/case.js.map +1 -0
- package/build/blueprint/consts.d.ts +11 -0
- package/build/blueprint/consts.d.ts.map +1 -0
- package/build/blueprint/consts.js +11 -0
- package/build/blueprint/consts.js.map +1 -0
- package/build/blueprint/index.d.ts +6 -0
- package/build/blueprint/index.d.ts.map +1 -0
- package/build/blueprint/index.js +6 -0
- package/build/blueprint/index.js.map +1 -0
- package/build/blueprint/resolve.d.ts +51 -0
- package/build/blueprint/resolve.d.ts.map +1 -0
- package/build/blueprint/resolve.js +108 -0
- package/build/blueprint/resolve.js.map +1 -0
- package/build/blueprint/schemas.d.ts +41 -0
- package/build/blueprint/schemas.d.ts.map +1 -0
- package/build/blueprint/schemas.js +27 -0
- package/build/blueprint/schemas.js.map +1 -0
- package/build/blueprint/types.d.ts +186 -0
- package/build/blueprint/types.d.ts.map +1 -0
- package/build/blueprint/types.js +32 -0
- package/build/blueprint/types.js.map +1 -0
- package/build/branding.d.ts +19 -0
- package/build/branding.d.ts.map +1 -0
- package/build/branding.js +32 -0
- package/build/branding.js.map +1 -0
- package/build/connect/consts.d.ts +378 -0
- package/build/connect/consts.d.ts.map +1 -0
- package/build/connect/consts.js +425 -0
- package/build/connect/consts.js.map +1 -0
- package/build/connect/entrypoints.d.ts +41 -0
- package/build/connect/entrypoints.d.ts.map +1 -0
- package/build/connect/entrypoints.js +141 -0
- package/build/connect/entrypoints.js.map +1 -0
- package/build/connect/errors.d.ts +50 -0
- package/build/connect/errors.d.ts.map +1 -0
- package/build/connect/errors.js +77 -0
- package/build/connect/errors.js.map +1 -0
- package/build/connect/index.d.ts +8 -0
- package/build/connect/index.d.ts.map +1 -0
- package/build/connect/index.js +6 -0
- package/build/connect/index.js.map +1 -0
- package/build/connect/ops.d.ts +192 -0
- package/build/connect/ops.d.ts.map +1 -0
- package/build/connect/ops.js +2 -0
- package/build/connect/ops.js.map +1 -0
- package/build/connect/references.d.ts +194 -0
- package/build/connect/references.d.ts.map +1 -0
- package/build/connect/references.js +62 -0
- package/build/connect/references.js.map +1 -0
- package/build/connect/schemas.d.ts +59 -0
- package/build/connect/schemas.d.ts.map +1 -0
- package/build/connect/schemas.js +346 -0
- package/build/connect/schemas.js.map +1 -0
- package/build/connect/types.d.ts +428 -0
- package/build/connect/types.d.ts.map +1 -0
- package/build/connect/types.js +2 -0
- package/build/connect/types.js.map +1 -0
- package/build/consts.d.ts +9 -0
- package/build/consts.d.ts.map +1 -0
- package/build/consts.js +31 -0
- package/build/consts.js.map +1 -0
- package/build/convert/consts.d.ts +539 -0
- package/build/convert/consts.d.ts.map +1 -0
- package/build/convert/consts.js +630 -0
- package/build/convert/consts.js.map +1 -0
- package/build/convert/helpers.d.ts +91 -0
- package/build/convert/helpers.d.ts.map +1 -0
- package/build/convert/helpers.js +301 -0
- package/build/convert/helpers.js.map +1 -0
- package/build/convert/index.d.ts +11 -0
- package/build/convert/index.d.ts.map +1 -0
- package/build/convert/index.js +4 -0
- package/build/convert/index.js.map +1 -0
- package/build/convert/schemas.d.ts +62 -0
- package/build/convert/schemas.d.ts.map +1 -0
- package/build/convert/schemas.js +626 -0
- package/build/convert/schemas.js.map +1 -0
- package/build/convert/types.d.ts +683 -0
- package/build/convert/types.d.ts.map +1 -0
- package/build/convert/types.js +2 -0
- package/build/convert/types.js.map +1 -0
- package/build/design/consts.d.ts +25 -0
- package/build/design/consts.d.ts.map +1 -0
- package/build/design/consts.js +26 -0
- package/build/design/consts.js.map +1 -0
- package/build/design/helpers.d.ts +60 -0
- package/build/design/helpers.d.ts.map +1 -0
- package/build/design/helpers.js +221 -0
- package/build/design/helpers.js.map +1 -0
- package/build/design/index.d.ts +6 -0
- package/build/design/index.d.ts.map +1 -0
- package/build/design/index.js +5 -0
- package/build/design/index.js.map +1 -0
- package/build/design/runtime.d.ts +126 -0
- package/build/design/runtime.d.ts.map +1 -0
- package/build/design/runtime.js +65 -0
- package/build/design/runtime.js.map +1 -0
- package/build/design/schemas.d.ts +21 -0
- package/build/design/schemas.d.ts.map +1 -0
- package/build/design/schemas.js +369 -0
- package/build/design/schemas.js.map +1 -0
- package/build/design/types.d.ts +199 -0
- package/build/design/types.d.ts.map +1 -0
- package/build/design/types.js +2 -0
- package/build/design/types.js.map +1 -0
- package/build/dev/consts.d.ts +32 -0
- package/build/dev/consts.d.ts.map +1 -0
- package/build/dev/consts.js +33 -0
- package/build/dev/consts.js.map +1 -0
- package/build/dev/index.d.ts +4 -0
- package/build/dev/index.d.ts.map +1 -0
- package/build/dev/index.js +3 -0
- package/build/dev/index.js.map +1 -0
- package/build/dev/schemas.d.ts +15 -0
- package/build/dev/schemas.d.ts.map +1 -0
- package/build/dev/schemas.js +116 -0
- package/build/dev/schemas.js.map +1 -0
- package/build/dev/types.d.ts +42 -0
- package/build/dev/types.d.ts.map +1 -0
- package/build/dev/types.js +2 -0
- package/build/dev/types.js.map +1 -0
- package/build/execution/consts.d.ts +36 -0
- package/build/execution/consts.d.ts.map +1 -0
- package/build/execution/consts.js +37 -0
- package/build/execution/consts.js.map +1 -0
- package/build/execution/index.d.ts +3 -0
- package/build/execution/index.d.ts.map +1 -0
- package/build/execution/index.js +2 -0
- package/build/execution/index.js.map +1 -0
- package/build/execution/types.d.ts +50 -0
- package/build/execution/types.d.ts.map +1 -0
- package/build/execution/types.js +2 -0
- package/build/execution/types.js.map +1 -0
- package/build/index.d.ts +22 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +21 -0
- package/build/index.js.map +1 -0
- package/build/integrity/consts.d.ts +226 -0
- package/build/integrity/consts.d.ts.map +1 -0
- package/build/integrity/consts.js +401 -0
- package/build/integrity/consts.js.map +1 -0
- package/build/integrity/index.d.ts +4 -0
- package/build/integrity/index.d.ts.map +1 -0
- package/build/integrity/index.js +3 -0
- package/build/integrity/index.js.map +1 -0
- package/build/integrity/types.d.ts +35 -0
- package/build/integrity/types.d.ts.map +1 -0
- package/build/integrity/types.js +2 -0
- package/build/integrity/types.js.map +1 -0
- package/build/integrity/verify.d.ts +23 -0
- package/build/integrity/verify.d.ts.map +1 -0
- package/build/integrity/verify.js +198 -0
- package/build/integrity/verify.js.map +1 -0
- package/build/metadata/consts.d.ts +101 -0
- package/build/metadata/consts.d.ts.map +1 -0
- package/build/metadata/consts.js +104 -0
- package/build/metadata/consts.js.map +1 -0
- package/build/metadata/index.d.ts +3 -0
- package/build/metadata/index.d.ts.map +1 -0
- package/build/metadata/index.js +3 -0
- package/build/metadata/index.js.map +1 -0
- package/build/metadata/types.d.ts +286 -0
- package/build/metadata/types.d.ts.map +1 -0
- package/build/metadata/types.js +39 -0
- package/build/metadata/types.js.map +1 -0
- package/build/moderation/consts.d.ts +58 -0
- package/build/moderation/consts.d.ts.map +1 -0
- package/build/moderation/consts.js +60 -0
- package/build/moderation/consts.js.map +1 -0
- package/build/moderation/index.d.ts +5 -0
- package/build/moderation/index.d.ts.map +1 -0
- package/build/moderation/index.js +4 -0
- package/build/moderation/index.js.map +1 -0
- package/build/moderation/schemas.d.ts +19 -0
- package/build/moderation/schemas.d.ts.map +1 -0
- package/build/moderation/schemas.js +26 -0
- package/build/moderation/schemas.js.map +1 -0
- package/build/moderation/types.d.ts +64 -0
- package/build/moderation/types.d.ts.map +1 -0
- package/build/moderation/types.js +2 -0
- package/build/moderation/types.js.map +1 -0
- package/build/moderation/utils.d.ts +21 -0
- package/build/moderation/utils.d.ts.map +1 -0
- package/build/moderation/utils.js +31 -0
- package/build/moderation/utils.js.map +1 -0
- package/build/preview/consts.d.ts +10 -0
- package/build/preview/consts.d.ts.map +1 -0
- package/build/preview/consts.js +11 -0
- package/build/preview/consts.js.map +1 -0
- package/build/preview/index.d.ts +3 -0
- package/build/preview/index.d.ts.map +1 -0
- package/build/preview/index.js +2 -0
- package/build/preview/index.js.map +1 -0
- package/build/preview/types.d.ts +60 -0
- package/build/preview/types.d.ts.map +1 -0
- package/build/preview/types.js +2 -0
- package/build/preview/types.js.map +1 -0
- package/build/scaffold/consts.d.ts +25 -0
- package/build/scaffold/consts.d.ts.map +1 -0
- package/build/scaffold/consts.js +26 -0
- package/build/scaffold/consts.js.map +1 -0
- package/build/scaffold/helpers.d.ts +35 -0
- package/build/scaffold/helpers.d.ts.map +1 -0
- package/build/scaffold/helpers.js +54 -0
- package/build/scaffold/helpers.js.map +1 -0
- package/build/scaffold/index.d.ts +5 -0
- package/build/scaffold/index.d.ts.map +1 -0
- package/build/scaffold/index.js +4 -0
- package/build/scaffold/index.js.map +1 -0
- package/build/scaffold/schemas.d.ts +5 -0
- package/build/scaffold/schemas.d.ts.map +1 -0
- package/build/scaffold/schemas.js +273 -0
- package/build/scaffold/schemas.js.map +1 -0
- package/build/scaffold/types.d.ts +144 -0
- package/build/scaffold/types.d.ts.map +1 -0
- package/build/scaffold/types.js +2 -0
- package/build/scaffold/types.js.map +1 -0
- package/build/skills/catalogue.d.ts +47 -0
- package/build/skills/catalogue.d.ts.map +1 -0
- package/build/skills/catalogue.js +1566 -0
- package/build/skills/catalogue.js.map +1 -0
- package/build/skills/consts.d.ts +104 -0
- package/build/skills/consts.d.ts.map +1 -0
- package/build/skills/consts.js +170 -0
- package/build/skills/consts.js.map +1 -0
- package/build/skills/index.d.ts +4 -0
- package/build/skills/index.d.ts.map +1 -0
- package/build/skills/index.js +4 -0
- package/build/skills/index.js.map +1 -0
- package/build/skills/roles.d.ts +52 -0
- package/build/skills/roles.d.ts.map +1 -0
- package/build/skills/roles.js +256 -0
- package/build/skills/roles.js.map +1 -0
- package/build/slot/consts.d.ts +305 -0
- package/build/slot/consts.d.ts.map +1 -0
- package/build/slot/consts.js +376 -0
- package/build/slot/consts.js.map +1 -0
- package/build/slot/helpers.d.ts +25 -0
- package/build/slot/helpers.d.ts.map +1 -0
- package/build/slot/helpers.js +27 -0
- package/build/slot/helpers.js.map +1 -0
- package/build/slot/index.d.ts +6 -0
- package/build/slot/index.d.ts.map +1 -0
- package/build/slot/index.js +5 -0
- package/build/slot/index.js.map +1 -0
- package/build/slot/layout.d.ts +72 -0
- package/build/slot/layout.d.ts.map +1 -0
- package/build/slot/layout.js +82 -0
- package/build/slot/layout.js.map +1 -0
- package/build/slot/schemas.d.ts +12 -0
- package/build/slot/schemas.d.ts.map +1 -0
- package/build/slot/schemas.js +43 -0
- package/build/slot/schemas.js.map +1 -0
- package/build/slot/types.d.ts +147 -0
- package/build/slot/types.d.ts.map +1 -0
- package/build/slot/types.js +2 -0
- package/build/slot/types.js.map +1 -0
- package/build/topology/card.d.ts +23 -0
- package/build/topology/card.d.ts.map +1 -0
- package/build/topology/card.js +95 -0
- package/build/topology/card.js.map +1 -0
- package/build/topology/consts.d.ts +32 -0
- package/build/topology/consts.d.ts.map +1 -0
- package/build/topology/consts.js +55 -0
- package/build/topology/consts.js.map +1 -0
- package/build/topology/helpers.d.ts +44 -0
- package/build/topology/helpers.d.ts.map +1 -0
- package/build/topology/helpers.js +112 -0
- package/build/topology/helpers.js.map +1 -0
- package/build/topology/index.d.ts +5 -0
- package/build/topology/index.d.ts.map +1 -0
- package/build/topology/index.js +4 -0
- package/build/topology/index.js.map +1 -0
- package/build/topology/types.d.ts +83 -0
- package/build/topology/types.d.ts.map +1 -0
- package/build/topology/types.js +2 -0
- package/build/topology/types.js.map +1 -0
- package/build/types.d.ts +88 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/ux/consts.d.ts +5 -0
- package/build/ux/consts.d.ts.map +1 -0
- package/build/ux/consts.js +6 -0
- package/build/ux/consts.js.map +1 -0
- package/build/ux/index.d.ts +4 -0
- package/build/ux/index.d.ts.map +1 -0
- package/build/ux/index.js +3 -0
- package/build/ux/index.js.map +1 -0
- package/build/ux/schemas.d.ts +8 -0
- package/build/ux/schemas.d.ts.map +1 -0
- package/build/ux/schemas.js +91 -0
- package/build/ux/schemas.js.map +1 -0
- package/build/ux/types.d.ts +21 -0
- package/build/ux/types.d.ts.map +1 -0
- package/build/ux/types.js +2 -0
- package/build/ux/types.js.map +1 -0
- package/package.json +71 -0
- package/src/agent/index.ts +4 -0
- package/src/agent/memory.ts +16 -0
- package/src/agent/spectator/consts.ts +10 -0
- package/src/agent/spectator/index.ts +3 -0
- package/src/agent/spectator/types.ts +14 -0
- package/src/agent/types.ts +10 -0
- package/src/areas/consts.ts +112 -0
- package/src/areas/index.ts +3 -0
- package/src/areas/types.ts +29 -0
- package/src/ba/consts.ts +40 -0
- package/src/ba/helpers.ts +93 -0
- package/src/ba/index.ts +5 -0
- package/src/ba/schemas.ts +196 -0
- package/src/ba/types.ts +125 -0
- package/src/blueprint/case.ts +272 -0
- package/src/blueprint/consts.ts +11 -0
- package/src/blueprint/index.ts +6 -0
- package/src/blueprint/resolve.ts +133 -0
- package/src/blueprint/schemas.ts +44 -0
- package/src/blueprint/types.ts +204 -0
- package/src/branding.ts +34 -0
- package/src/connect/consts.ts +441 -0
- package/src/connect/entrypoints.ts +291 -0
- package/src/connect/errors.ts +91 -0
- package/src/connect/index.ts +7 -0
- package/src/connect/ops.ts +208 -0
- package/src/connect/references.ts +89 -0
- package/src/connect/schemas.ts +384 -0
- package/src/connect/types.ts +456 -0
- package/src/consts.ts +34 -0
- package/src/convert/consts.ts +672 -0
- package/src/convert/helpers.ts +340 -0
- package/src/convert/index.ts +10 -0
- package/src/convert/schemas.ts +663 -0
- package/src/convert/types.ts +741 -0
- package/src/design/consts.ts +26 -0
- package/src/design/helpers.ts +255 -0
- package/src/design/index.ts +5 -0
- package/src/design/runtime.ts +142 -0
- package/src/design/schemas.ts +384 -0
- package/src/design/types.ts +191 -0
- package/src/dev/consts.ts +35 -0
- package/src/dev/index.ts +4 -0
- package/src/dev/schemas.ts +124 -0
- package/src/dev/types.ts +47 -0
- package/src/execution/consts.ts +37 -0
- package/src/execution/index.ts +3 -0
- package/src/execution/types.ts +55 -0
- package/src/index.ts +22 -0
- package/src/integrity/consts.ts +477 -0
- package/src/integrity/index.ts +3 -0
- package/src/integrity/types.ts +37 -0
- package/src/integrity/verify.ts +221 -0
- package/src/metadata/consts.ts +118 -0
- package/src/metadata/index.ts +3 -0
- package/src/metadata/types.ts +310 -0
- package/src/moderation/consts.ts +59 -0
- package/src/moderation/index.ts +4 -0
- package/src/moderation/schemas.ts +28 -0
- package/src/moderation/types.ts +68 -0
- package/src/moderation/utils.ts +35 -0
- package/src/preview/consts.ts +9 -0
- package/src/preview/index.ts +3 -0
- package/src/preview/types.ts +79 -0
- package/src/scaffold/consts.ts +26 -0
- package/src/scaffold/helpers.ts +84 -0
- package/src/scaffold/index.ts +4 -0
- package/src/scaffold/schemas.ts +283 -0
- package/src/scaffold/types.ts +118 -0
- package/src/skills/catalogue.ts +1617 -0
- package/src/skills/consts.ts +183 -0
- package/src/skills/index.ts +4 -0
- package/src/skills/roles.ts +299 -0
- package/src/slot/consts.ts +393 -0
- package/src/slot/helpers.ts +34 -0
- package/src/slot/index.ts +5 -0
- package/src/slot/layout.ts +141 -0
- package/src/slot/schemas.ts +46 -0
- package/src/slot/types.ts +164 -0
- package/src/topology/card.ts +106 -0
- package/src/topology/consts.ts +59 -0
- package/src/topology/helpers.ts +138 -0
- package/src/topology/index.ts +5 -0
- package/src/topology/types.ts +86 -0
- package/src/types.ts +104 -0
- package/src/ux/consts.ts +5 -0
- package/src/ux/index.ts +4 -0
- package/src/ux/schemas.ts +97 -0
- package/src/ux/types.ts +25 -0
- package/tests/connect-convert.spec.ts +161 -0
- package/tests/convert.spec.ts +318 -0
- package/tests/design.spec.ts +136 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import type { JSONSchemaType } from 'ajv'
|
|
2
|
+
import { ConversionDecision, OriginKind } from '../convert/consts.js'
|
|
3
|
+
import {
|
|
4
|
+
CONNECT_INQUIRY_MAX_TEXT, ConnectHarness, ConnectLlm, ConnectOpErrorKind, ConnectSessionStatus,
|
|
5
|
+
ConnectTarget, ConnectTransport, ModelTaskResultKind, ModelTier
|
|
6
|
+
} from './consts.js'
|
|
7
|
+
import type { ConnectOpResult, InquiryAnswerPayload } from './ops.js'
|
|
8
|
+
import type {
|
|
9
|
+
ConnectAttachBody, ConnectConfirmBody, ConnectConvertCreateBody, ConnectConvertProceedBody,
|
|
10
|
+
ConnectCreateBody, ConnectJobParams, ConnectLlmBody, ConnectModifyBody, ConnectPipelineParams,
|
|
11
|
+
ConnectPipelineResumeBody, ConnectProjectLlmBody, ConnectSession, ConnectSessionOpen,
|
|
12
|
+
ConnectSessionParams, ConnectStoryBody, ConnectStoryQuery, ConnectWaitQuery
|
|
13
|
+
} from './types.js'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A nullable ENUM carries `null` as one of its values.
|
|
17
|
+
*
|
|
18
|
+
* `nullable` and `enum` are separate Ajv keywords, checked independently: `nullable: true` widens
|
|
19
|
+
* the TYPE check to admit `null` and the `enum` check then refuses the very same value, so the
|
|
20
|
+
* field can only ever be OMITTED — never sent empty. That is not the same thing here. A connector
|
|
21
|
+
* is somebody else's process putting JSON on the wire and it serialises an unset optional as
|
|
22
|
+
* `null` as readily as it drops the key, and in `ConnectProjectLlmBody.llmMode` the `null` MEANS
|
|
23
|
+
* something ("inherit the profile's setting") and has no other spelling. So every `enum` beside a
|
|
24
|
+
* `nullable: true` is written `[...Object.values(X), null]`. `tests/convert.spec.ts` walks every
|
|
25
|
+
* schema this package exports and fails on the pair written apart.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const idValue = { type: 'string', minLength: 1, maxLength: 128 } as const
|
|
29
|
+
const textValue = { type: 'string', minLength: 1, maxLength: 65536 } as const
|
|
30
|
+
|
|
31
|
+
export const ConnectCapabilitiesSchema = {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
harness: { type: 'string', enum: Object.values(ConnectHarness) },
|
|
35
|
+
tiers: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
nullable: false,
|
|
38
|
+
additionalProperties: { type: 'string', maxLength: 128 },
|
|
39
|
+
required: [],
|
|
40
|
+
},
|
|
41
|
+
subagents: { type: 'boolean' },
|
|
42
|
+
effortControl: { type: 'boolean' },
|
|
43
|
+
// Deliberately NOT `enum: Object.values(ConnectExecutor)`. The SDK and the platform ship
|
|
44
|
+
// separately, so a connector built against a newer package advertises an executor kind this
|
|
45
|
+
// platform has never heard of — and an enum turns that into a refused session rather than an
|
|
46
|
+
// unused capability. Forward tolerance: an unknown value is simply not matched by anything.
|
|
47
|
+
executors: { type: 'array', items: { type: 'string', maxLength: 32 } },
|
|
48
|
+
services: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
nullable: true,
|
|
51
|
+
properties: { db: { type: 'boolean' }, valkey: { type: 'boolean' } },
|
|
52
|
+
required: ['db', 'valkey'],
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
required: ['harness', 'tiers', 'subagents', 'effortControl', 'executors'],
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
} as any
|
|
59
|
+
|
|
60
|
+
export const ConnectSessionOpenSchema = {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
projectId: { ...idValue, nullable: true },
|
|
64
|
+
projectDir: { type: 'string', maxLength: 4096, nullable: true },
|
|
65
|
+
target: { type: 'string', enum: Object.values(ConnectTarget) },
|
|
66
|
+
harness: { type: 'string', enum: Object.values(ConnectHarness) },
|
|
67
|
+
clientVersion: { type: 'string', minLength: 1, maxLength: 64 },
|
|
68
|
+
capabilities: ConnectCapabilitiesSchema,
|
|
69
|
+
},
|
|
70
|
+
required: ['target', 'harness', 'clientVersion', 'capabilities'],
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
} as JSONSchemaType<ConnectSessionOpen>
|
|
73
|
+
|
|
74
|
+
export const ConnectSessionParamsSchema = {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: { sessionId: idValue },
|
|
77
|
+
required: ['sessionId'],
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
} as JSONSchemaType<ConnectSessionParams>
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The session record's own shape.
|
|
83
|
+
*
|
|
84
|
+
* Applied as the collection's `$jsonSchema`, so every field the platform ever writes must be
|
|
85
|
+
* declared here — a field added to the type and forgotten here fails every create with a
|
|
86
|
+
* validation error that names the document rather than the field.
|
|
87
|
+
*/
|
|
88
|
+
export const ConnectSessionSchema = {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: {
|
|
91
|
+
id: { ...idValue, nullable: true },
|
|
92
|
+
profileId: idValue,
|
|
93
|
+
entityId: idValue,
|
|
94
|
+
projectId: { ...idValue, nullable: true },
|
|
95
|
+
projectDir: { type: 'string', maxLength: 4096, nullable: true },
|
|
96
|
+
target: { type: 'string', enum: Object.values(ConnectTarget) },
|
|
97
|
+
llm: { type: 'string', enum: Object.values(ConnectLlm) },
|
|
98
|
+
harness: { type: 'string', enum: Object.values(ConnectHarness) },
|
|
99
|
+
clientVersion: { type: 'string', maxLength: 64 },
|
|
100
|
+
capabilities: ConnectCapabilitiesSchema,
|
|
101
|
+
status: { type: 'string', enum: Object.values(ConnectSessionStatus) },
|
|
102
|
+
transport: { type: 'string', enum: [...Object.values(ConnectTransport), null], nullable: true },
|
|
103
|
+
openedAt: { type: 'object', format: 'date-time', required: [] },
|
|
104
|
+
lastSeenAt: { type: 'object', format: 'date-time', required: [] },
|
|
105
|
+
closedAt: { type: 'object', format: 'date-time', required: [], nullable: true },
|
|
106
|
+
createdAt: { type: 'object', format: 'date-time', required: [] },
|
|
107
|
+
updatedAt: { type: 'object', format: 'date-time', required: [], nullable: true },
|
|
108
|
+
},
|
|
109
|
+
required: [
|
|
110
|
+
'profileId', 'entityId', 'target', 'llm', 'harness', 'clientVersion', 'capabilities',
|
|
111
|
+
'status', 'openedAt', 'lastSeenAt', 'createdAt'
|
|
112
|
+
],
|
|
113
|
+
additionalProperties: false,
|
|
114
|
+
} as unknown as JSONSchemaType<ConnectSession>
|
|
115
|
+
|
|
116
|
+
export const ConnectOpResultSchema = {
|
|
117
|
+
type: 'object',
|
|
118
|
+
properties: {
|
|
119
|
+
opId: idValue,
|
|
120
|
+
sessionId: idValue,
|
|
121
|
+
ok: { type: 'boolean' },
|
|
122
|
+
// Any JSON, and it may be absent — a shell result is an object, a file read a string, a
|
|
123
|
+
// listing an array. Declared as the empty schema rather than as `nullable`, because Ajv
|
|
124
|
+
// refuses `nullable` without a `type` and Fastify compiles this schema at route
|
|
125
|
+
// registration: the refusal takes the whole API down at boot, not the one call that would
|
|
126
|
+
// have carried the value.
|
|
127
|
+
value: {},
|
|
128
|
+
error: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
nullable: true,
|
|
131
|
+
properties: {
|
|
132
|
+
type: { type: 'string', maxLength: 256 },
|
|
133
|
+
message: { type: 'string', maxLength: 8192 },
|
|
134
|
+
kind: { type: 'string', enum: [...Object.values(ConnectOpErrorKind), null], nullable: true },
|
|
135
|
+
},
|
|
136
|
+
required: ['type', 'message'],
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ['opId', 'sessionId', 'ok'],
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
} as unknown as JSONSchemaType<ConnectOpResult>
|
|
143
|
+
|
|
144
|
+
export const ConnectWaitQuerySchema = {
|
|
145
|
+
type: 'object',
|
|
146
|
+
properties: { wait: { type: 'integer', minimum: 0, maximum: 45, nullable: true } },
|
|
147
|
+
required: [],
|
|
148
|
+
additionalProperties: false,
|
|
149
|
+
} as JSONSchemaType<ConnectWaitQuery>
|
|
150
|
+
|
|
151
|
+
/** Every project-scoped connector route addresses the project by `:id`. */
|
|
152
|
+
export const ConnectProjectIdSchema = {
|
|
153
|
+
type: 'object',
|
|
154
|
+
properties: { id: idValue },
|
|
155
|
+
required: ['id'],
|
|
156
|
+
additionalProperties: false,
|
|
157
|
+
} as JSONSchemaType<{ id: string }>
|
|
158
|
+
|
|
159
|
+
export const ConnectStoryParamsSchema = {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: { id: idValue, storyId: idValue },
|
|
162
|
+
required: ['id', 'storyId'],
|
|
163
|
+
additionalProperties: false,
|
|
164
|
+
} as JSONSchemaType<{ id: string, storyId: string }>
|
|
165
|
+
|
|
166
|
+
export const ConnectOpParamsSchema = {
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: { sessionId: idValue, opId: idValue },
|
|
169
|
+
required: ['sessionId', 'opId'],
|
|
170
|
+
additionalProperties: false,
|
|
171
|
+
} as JSONSchemaType<{ sessionId: string, opId: string }>
|
|
172
|
+
|
|
173
|
+
export const ConnectJobParamsSchema = {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: { id: idValue, jobId: { type: 'string', minLength: 1, maxLength: 256 } },
|
|
176
|
+
required: ['id', 'jobId'],
|
|
177
|
+
additionalProperties: false,
|
|
178
|
+
} as JSONSchemaType<ConnectJobParams>
|
|
179
|
+
|
|
180
|
+
export const ConnectStoryQuerySchema = {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
page: { type: 'integer', minimum: 0, nullable: true },
|
|
184
|
+
size: { type: 'integer', minimum: 1, maximum: 100, nullable: true },
|
|
185
|
+
status: { type: 'string', maxLength: 32, nullable: true },
|
|
186
|
+
area: { type: 'string', maxLength: 32, nullable: true },
|
|
187
|
+
q: { type: 'string', maxLength: 256, nullable: true },
|
|
188
|
+
},
|
|
189
|
+
required: [],
|
|
190
|
+
additionalProperties: false,
|
|
191
|
+
} as JSONSchemaType<ConnectStoryQuery>
|
|
192
|
+
|
|
193
|
+
export const ConnectCreateBodySchema = {
|
|
194
|
+
type: 'object',
|
|
195
|
+
properties: {
|
|
196
|
+
prompt: { type: 'string', minLength: 1, maxLength: 16384 },
|
|
197
|
+
target: { type: 'string', enum: [...Object.values(ConnectTarget), null], nullable: true },
|
|
198
|
+
},
|
|
199
|
+
required: ['prompt'],
|
|
200
|
+
additionalProperties: false,
|
|
201
|
+
} as JSONSchemaType<ConnectCreateBody>
|
|
202
|
+
|
|
203
|
+
export const ConnectConfirmBodySchema = {
|
|
204
|
+
type: 'object',
|
|
205
|
+
properties: {
|
|
206
|
+
name: { type: 'string', minLength: 1, maxLength: 128, nullable: true },
|
|
207
|
+
description: { type: 'string', maxLength: 16384, nullable: true },
|
|
208
|
+
specification: { type: 'string', maxLength: 262144, nullable: true },
|
|
209
|
+
vision: { type: 'string', maxLength: 16384, nullable: true },
|
|
210
|
+
target: { type: 'string', enum: [...Object.values(ConnectTarget), null], nullable: true },
|
|
211
|
+
},
|
|
212
|
+
required: [],
|
|
213
|
+
additionalProperties: false,
|
|
214
|
+
} as JSONSchemaType<ConnectConfirmBody>
|
|
215
|
+
|
|
216
|
+
export const ConnectModifyBodySchema = {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: { prompt: { type: 'string', minLength: 1, maxLength: 16384 } },
|
|
219
|
+
required: ['prompt'],
|
|
220
|
+
additionalProperties: false,
|
|
221
|
+
} as JSONSchemaType<ConnectModifyBody>
|
|
222
|
+
|
|
223
|
+
export const ConnectStoryBodySchema = {
|
|
224
|
+
type: 'object',
|
|
225
|
+
properties: { story: textValue },
|
|
226
|
+
required: ['story'],
|
|
227
|
+
additionalProperties: false,
|
|
228
|
+
} as JSONSchemaType<ConnectStoryBody>
|
|
229
|
+
|
|
230
|
+
export const ConnectAttachBodySchema = {
|
|
231
|
+
type: 'object',
|
|
232
|
+
properties: {
|
|
233
|
+
projectId: { ...idValue, nullable: true },
|
|
234
|
+
slug: { type: 'string', maxLength: 64, nullable: true },
|
|
235
|
+
projectDir: { type: 'string', maxLength: 4096, nullable: true },
|
|
236
|
+
},
|
|
237
|
+
required: [],
|
|
238
|
+
additionalProperties: false,
|
|
239
|
+
} as JSONSchemaType<ConnectAttachBody>
|
|
240
|
+
|
|
241
|
+
export const ConnectPipelineParamsSchema = {
|
|
242
|
+
type: 'object',
|
|
243
|
+
properties: { id: idValue, runId: { type: 'string', minLength: 1, maxLength: 256 } },
|
|
244
|
+
required: ['id', 'runId'],
|
|
245
|
+
additionalProperties: false,
|
|
246
|
+
} as JSONSchemaType<ConnectPipelineParams>
|
|
247
|
+
|
|
248
|
+
export const ConnectPipelineResumeBodySchema = {
|
|
249
|
+
type: 'object',
|
|
250
|
+
properties: {
|
|
251
|
+
from: { type: 'string', maxLength: 128, nullable: true },
|
|
252
|
+
force: { type: 'boolean', nullable: true },
|
|
253
|
+
// Keyed by inquiry id, so the key space is open by construction and cannot be enumerated.
|
|
254
|
+
// The values are validated where they are read, against InquiryAnswerSchema.
|
|
255
|
+
answers: { type: 'object', additionalProperties: true, required: [], nullable: true },
|
|
256
|
+
},
|
|
257
|
+
required: [],
|
|
258
|
+
additionalProperties: false,
|
|
259
|
+
} as unknown as JSONSchemaType<ConnectPipelineResumeBody>
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* One answer to one question.
|
|
263
|
+
*
|
|
264
|
+
* `value` is a union — one choice or several — expressed as `oneOf`, never as a `nullable` with no
|
|
265
|
+
* `type`: Ajv refuses that, and this schema is compiled at route registration, so the refusal
|
|
266
|
+
* takes the whole API down at boot rather than failing the one call that carried the value.
|
|
267
|
+
*/
|
|
268
|
+
export const InquiryAnswerSchema = {
|
|
269
|
+
type: 'object',
|
|
270
|
+
properties: {
|
|
271
|
+
inquiryId: idValue,
|
|
272
|
+
value: {
|
|
273
|
+
oneOf: [
|
|
274
|
+
{ type: 'string', maxLength: CONNECT_INQUIRY_MAX_TEXT },
|
|
275
|
+
{
|
|
276
|
+
type: 'array',
|
|
277
|
+
items: { type: 'string', maxLength: CONNECT_INQUIRY_MAX_TEXT },
|
|
278
|
+
maxItems: 32,
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
},
|
|
282
|
+
text: { type: 'string', maxLength: CONNECT_INQUIRY_MAX_TEXT, nullable: true },
|
|
283
|
+
declined: { type: 'boolean', nullable: true },
|
|
284
|
+
},
|
|
285
|
+
required: ['inquiryId'],
|
|
286
|
+
additionalProperties: false,
|
|
287
|
+
} as unknown as JSONSchemaType<InquiryAnswerPayload>
|
|
288
|
+
|
|
289
|
+
/** The two ids an answer is addressed by: the project it belongs to and the question it answers. */
|
|
290
|
+
export const ConnectInquiryParamsSchema = {
|
|
291
|
+
type: 'object',
|
|
292
|
+
properties: { id: idValue, inquiryId: idValue },
|
|
293
|
+
required: ['id', 'inquiryId'],
|
|
294
|
+
additionalProperties: false,
|
|
295
|
+
} as JSONSchemaType<{ id: string, inquiryId: string }>
|
|
296
|
+
|
|
297
|
+
export const ConnectConvertCreateBodySchema = {
|
|
298
|
+
type: 'object',
|
|
299
|
+
properties: {
|
|
300
|
+
name: { type: 'string', minLength: 1, maxLength: 128, nullable: true },
|
|
301
|
+
about: { type: 'string', maxLength: 16384, nullable: true },
|
|
302
|
+
target: { type: 'string', enum: [...Object.values(ConnectTarget), null], nullable: true },
|
|
303
|
+
origin: {
|
|
304
|
+
type: 'object',
|
|
305
|
+
nullable: true,
|
|
306
|
+
properties: {
|
|
307
|
+
kind: { type: 'string', enum: Object.values(OriginKind) },
|
|
308
|
+
repoUrl: { type: 'string', maxLength: 2048, nullable: true },
|
|
309
|
+
branch: { type: 'string', maxLength: 256, nullable: true },
|
|
310
|
+
},
|
|
311
|
+
required: ['kind'],
|
|
312
|
+
additionalProperties: false,
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
required: [],
|
|
316
|
+
additionalProperties: false,
|
|
317
|
+
} as unknown as JSONSchemaType<ConnectConvertCreateBody>
|
|
318
|
+
|
|
319
|
+
export const ConnectConvertProceedBodySchema = {
|
|
320
|
+
type: 'object',
|
|
321
|
+
properties: {
|
|
322
|
+
decision: { type: 'string', enum: Object.values(ConversionDecision) },
|
|
323
|
+
note: { type: 'string', maxLength: 4096, nullable: true },
|
|
324
|
+
},
|
|
325
|
+
required: ['decision'],
|
|
326
|
+
additionalProperties: false,
|
|
327
|
+
} as unknown as JSONSchemaType<ConnectConvertProceedBody>
|
|
328
|
+
|
|
329
|
+
export const ConnectLlmBodySchema = {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: { llmMode: { type: 'string', enum: Object.values(ConnectLlm) } },
|
|
332
|
+
required: ['llmMode'],
|
|
333
|
+
additionalProperties: false,
|
|
334
|
+
} as JSONSchemaType<ConnectLlmBody>
|
|
335
|
+
|
|
336
|
+
export const ConnectProjectLlmBodySchema = {
|
|
337
|
+
type: 'object',
|
|
338
|
+
properties: { llmMode: { type: 'string', enum: [...Object.values(ConnectLlm), null], nullable: true } },
|
|
339
|
+
required: ['llmMode'],
|
|
340
|
+
additionalProperties: false,
|
|
341
|
+
} as unknown as JSONSchemaType<ConnectProjectLlmBody>
|
|
342
|
+
|
|
343
|
+
export const ModelTaskResultSchema = {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
taskId: idValue,
|
|
347
|
+
kind: { type: 'string', enum: Object.values(ModelTaskResultKind) },
|
|
348
|
+
text: { type: 'string', maxLength: 1_048_576, nullable: true },
|
|
349
|
+
// The parent agent's answer in `json` mode: any JSON the task's own output schema described.
|
|
350
|
+
// The empty schema, never `nullable` — see ConnectOpResultSchema.value.
|
|
351
|
+
json: {},
|
|
352
|
+
toolCalls: {
|
|
353
|
+
type: 'array',
|
|
354
|
+
nullable: true,
|
|
355
|
+
items: {
|
|
356
|
+
type: 'object',
|
|
357
|
+
properties: {
|
|
358
|
+
id: { type: 'string', maxLength: 128, nullable: true },
|
|
359
|
+
name: { type: 'string', minLength: 1, maxLength: 128 },
|
|
360
|
+
args: { type: 'object', additionalProperties: true, required: [] },
|
|
361
|
+
},
|
|
362
|
+
required: ['name', 'args'],
|
|
363
|
+
additionalProperties: false,
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
error: { type: 'string', maxLength: 8192, nullable: true },
|
|
367
|
+
usage: {
|
|
368
|
+
type: 'object',
|
|
369
|
+
nullable: true,
|
|
370
|
+
properties: {
|
|
371
|
+
inputTokens: { type: 'integer', minimum: 0, nullable: true },
|
|
372
|
+
outputTokens: { type: 'integer', minimum: 0, nullable: true },
|
|
373
|
+
},
|
|
374
|
+
required: [],
|
|
375
|
+
additionalProperties: false,
|
|
376
|
+
},
|
|
377
|
+
model: { type: 'string', maxLength: 128, nullable: true },
|
|
378
|
+
},
|
|
379
|
+
required: ['taskId', 'kind'],
|
|
380
|
+
additionalProperties: false,
|
|
381
|
+
} as any
|
|
382
|
+
|
|
383
|
+
/** Tier → the model the parent will run it on. Free-form; display only. */
|
|
384
|
+
export const ModelTierValues = Object.values(ModelTier)
|