@yaag/cli 0.1.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/assets/types/runtime/agent-names.d.ts +8 -0
- package/assets/types/runtime/agent-usage.d.ts +16 -0
- package/assets/types/runtime/agent.d.ts +36 -0
- package/assets/types/runtime/args-validation.d.ts +3 -0
- package/assets/types/runtime/ask-activity.d.ts +9 -0
- package/assets/types/runtime/ask-contract-identity.d.ts +25 -0
- package/assets/types/runtime/ask-exchange-events.d.ts +13 -0
- package/assets/types/runtime/ask-exchange-options.d.ts +30 -0
- package/assets/types/runtime/ask-exchange.d.ts +4 -0
- package/assets/types/runtime/ask-hash.d.ts +32 -0
- package/assets/types/runtime/ask-limit.d.ts +46 -0
- package/assets/types/runtime/ask-output-steering.d.ts +28 -0
- package/assets/types/runtime/ask-output-tail.d.ts +28 -0
- package/assets/types/runtime/ask-output.d.ts +29 -0
- package/assets/types/runtime/ask-settlement.d.ts +11 -0
- package/assets/types/runtime/ask-turn.d.ts +25 -0
- package/assets/types/runtime/cassette-loader.d.ts +11 -0
- package/assets/types/runtime/cassette-publish.d.ts +11 -0
- package/assets/types/runtime/cassette-replay.d.ts +24 -0
- package/assets/types/runtime/cassette-schema.d.ts +111 -0
- package/assets/types/runtime/cassette.d.ts +118 -0
- package/assets/types/runtime/checkpoint-dir.d.ts +30 -0
- package/assets/types/runtime/connection.d.ts +29 -0
- package/assets/types/runtime/define-agent.d.ts +48 -0
- package/assets/types/runtime/define-run.d.ts +40 -0
- package/assets/types/runtime/errors.d.ts +50 -0
- package/assets/types/runtime/events.d.ts +138 -0
- package/assets/types/runtime/extension-package.d.ts +17 -0
- package/assets/types/runtime/extension-paths.d.ts +16 -0
- package/assets/types/runtime/extension-source.d.ts +28 -0
- package/assets/types/runtime/fake-transport.d.ts +78 -0
- package/assets/types/runtime/frame-gap.d.ts +23 -0
- package/assets/types/runtime/frame-queue.d.ts +15 -0
- package/assets/types/runtime/git-facts.d.ts +7 -0
- package/assets/types/runtime/idle-watch.d.ts +44 -0
- package/assets/types/runtime/index.d.ts +33 -0
- package/assets/types/runtime/jsonl.d.ts +13 -0
- package/assets/types/runtime/live-transport.d.ts +3 -0
- package/assets/types/runtime/node-decoder-subagent.d.ts +7 -0
- package/assets/types/runtime/node-decoder-workflow.d.ts +12 -0
- package/assets/types/runtime/node-decoder.d.ts +21 -0
- package/assets/types/runtime/node-decoders.d.ts +3 -0
- package/assets/types/runtime/node-details.d.ts +22 -0
- package/assets/types/runtime/node-path.d.ts +19 -0
- package/assets/types/runtime/node-tracker.d.ts +30 -0
- package/assets/types/runtime/pi-state.d.ts +16 -0
- package/assets/types/runtime/prompt-gist.d.ts +8 -0
- package/assets/types/runtime/prompt.d.ts +9 -0
- package/assets/types/runtime/reap.d.ts +22 -0
- package/assets/types/runtime/recording-transport.d.ts +9 -0
- package/assets/types/runtime/replay-divergence.d.ts +19 -0
- package/assets/types/runtime/replay-transport.d.ts +9 -0
- package/assets/types/runtime/resume-preconditions.d.ts +8 -0
- package/assets/types/runtime/resume-transport.d.ts +9 -0
- package/assets/types/runtime/run-checkpoint.d.ts +28 -0
- package/assets/types/runtime/run-context.d.ts +18 -0
- package/assets/types/runtime/run.d.ts +60 -0
- package/assets/types/runtime/skill-probe.d.ts +71 -0
- package/assets/types/runtime/skill-restriction-transport.d.ts +8 -0
- package/assets/types/runtime/spawn.d.ts +24 -0
- package/assets/types/runtime/summary-agent.d.ts +123 -0
- package/assets/types/runtime/summary-nodes.d.ts +28 -0
- package/assets/types/runtime/summary.d.ts +55 -0
- package/assets/types/runtime/tool-probe-extension.d.ts +12 -0
- package/assets/types/runtime/tool-probe.d.ts +30 -0
- package/assets/types/runtime/transport.d.ts +143 -0
- package/assets/types/runtime/types.d.ts +120 -0
- package/assets/types/runtime/validation-errors.d.ts +3 -0
- package/assets/types/runtime/wire-constants.d.ts +18 -0
- package/assets/types/runtime/worktree-transport.d.ts +9 -0
- package/assets/types/typebox/build/compile/code.d.mts +12 -0
- package/assets/types/typebox/build/compile/compile.d.mts +6 -0
- package/assets/types/typebox/build/compile/index.d.mts +8 -0
- package/assets/types/typebox/build/compile/validator.d.mts +35 -0
- package/assets/types/typebox/build/error/errors.d.mts +208 -0
- package/assets/types/typebox/build/error/index.d.mts +1 -0
- package/assets/types/typebox/build/format/_idna.d.mts +2 -0
- package/assets/types/typebox/build/format/_puny.d.mts +1 -0
- package/assets/types/typebox/build/format/_registry.d.mts +15 -0
- package/assets/types/typebox/build/format/date.d.mts +6 -0
- package/assets/types/typebox/build/format/date_time.d.mts +6 -0
- package/assets/types/typebox/build/format/duration.d.mts +5 -0
- package/assets/types/typebox/build/format/email.d.mts +5 -0
- package/assets/types/typebox/build/format/format.d.mts +22 -0
- package/assets/types/typebox/build/format/hostname.d.mts +7 -0
- package/assets/types/typebox/build/format/idn_email.d.mts +5 -0
- package/assets/types/typebox/build/format/idn_hostname.d.mts +7 -0
- package/assets/types/typebox/build/format/index.d.mts +4 -0
- package/assets/types/typebox/build/format/ipv4.d.mts +6 -0
- package/assets/types/typebox/build/format/ipv6.d.mts +5 -0
- package/assets/types/typebox/build/format/iri.d.mts +5 -0
- package/assets/types/typebox/build/format/iri_reference.d.mts +5 -0
- package/assets/types/typebox/build/format/json_pointer.d.mts +6 -0
- package/assets/types/typebox/build/format/json_pointer_uri_fragment.d.mts +6 -0
- package/assets/types/typebox/build/format/regex.d.mts +6 -0
- package/assets/types/typebox/build/format/relative_json_pointer.d.mts +6 -0
- package/assets/types/typebox/build/format/time.d.mts +5 -0
- package/assets/types/typebox/build/format/uri.d.mts +5 -0
- package/assets/types/typebox/build/format/uri_reference.d.mts +5 -0
- package/assets/types/typebox/build/format/uri_template.d.mts +6 -0
- package/assets/types/typebox/build/format/url.d.mts +6 -0
- package/assets/types/typebox/build/format/uuid.d.mts +6 -0
- package/assets/types/typebox/build/guard/emit.d.mts +54 -0
- package/assets/types/typebox/build/guard/globals.d.mts +35 -0
- package/assets/types/typebox/build/guard/guard.d.mts +65 -0
- package/assets/types/typebox/build/guard/index.d.mts +6 -0
- package/assets/types/typebox/build/guard/native.d.mts +20 -0
- package/assets/types/typebox/build/guard/string.d.mts +6 -0
- package/assets/types/typebox/build/index.d.mts +8 -0
- package/assets/types/typebox/build/schema/build.d.mts +39 -0
- package/assets/types/typebox/build/schema/check.d.mts +6 -0
- package/assets/types/typebox/build/schema/compile.d.mts +22 -0
- package/assets/types/typebox/build/schema/engine/_context.d.mts +35 -0
- package/assets/types/typebox/build/schema/engine/_exact_optional.d.mts +3 -0
- package/assets/types/typebox/build/schema/engine/_externals.d.mts +7 -0
- package/assets/types/typebox/build/schema/engine/_functions.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/_reducer.d.mts +4 -0
- package/assets/types/typebox/build/schema/engine/_refine.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/_stack.d.mts +18 -0
- package/assets/types/typebox/build/schema/engine/_unique.d.mts +2 -0
- package/assets/types/typebox/build/schema/engine/additionalItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/additionalProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/engine/allOf.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/anyOf.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/boolean.d.mts +5 -0
- package/assets/types/typebox/build/schema/engine/const.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/contains.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/dependencies.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/dependentRequired.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/dependentSchemas.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/dynamicRef.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/enum.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/exclusiveMaximum.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/exclusiveMinimum.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/format.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/if.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/index.d.mts +48 -0
- package/assets/types/typebox/build/schema/engine/items.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/maxContains.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/maxItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/maxLength.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/maxProperties.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/maximum.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/minContains.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/minItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/minLength.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/minProperties.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/minimum.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/multipleOf.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/not.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/oneOf.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/pattern.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/patternProperties.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/prefixItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/properties.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/propertyNames.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/recursiveRef.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/ref.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/required.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/schema.d.mts +9 -0
- package/assets/types/typebox/build/schema/engine/type.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/unevaluatedItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/unevaluatedProperties.d.mts +6 -0
- package/assets/types/typebox/build/schema/engine/uniqueItems.d.mts +6 -0
- package/assets/types/typebox/build/schema/errors.d.mts +6 -0
- package/assets/types/typebox/build/schema/index.d.mts +3 -0
- package/assets/types/typebox/build/schema/parse.d.mts +13 -0
- package/assets/types/typebox/build/schema/pointer/index.d.mts +2 -0
- package/assets/types/typebox/build/schema/pointer/pointer.d.mts +10 -0
- package/assets/types/typebox/build/schema/pointer/pointer_get.d.mts +9 -0
- package/assets/types/typebox/build/schema/resolve/index.d.mts +1 -0
- package/assets/types/typebox/build/schema/resolve/ref.d.mts +3 -0
- package/assets/types/typebox/build/schema/resolve/resolve.d.mts +1 -0
- package/assets/types/typebox/build/schema/schema.d.mts +10 -0
- package/assets/types/typebox/build/schema/static/_canonical.d.mts +7 -0
- package/assets/types/typebox/build/schema/static/_comparer.d.mts +6 -0
- package/assets/types/typebox/build/schema/static/_elements.d.mts +18 -0
- package/assets/types/typebox/build/schema/static/additionalProperties.d.mts +7 -0
- package/assets/types/typebox/build/schema/static/allOf.d.mts +3 -0
- package/assets/types/typebox/build/schema/static/anyOf.d.mts +3 -0
- package/assets/types/typebox/build/schema/static/const.d.mts +1 -0
- package/assets/types/typebox/build/schema/static/enum.d.mts +1 -0
- package/assets/types/typebox/build/schema/static/if.d.mts +15 -0
- package/assets/types/typebox/build/schema/static/index.d.mts +1 -0
- package/assets/types/typebox/build/schema/static/items.d.mts +7 -0
- package/assets/types/typebox/build/schema/static/oneOf.d.mts +3 -0
- package/assets/types/typebox/build/schema/static/patternProperties.d.mts +7 -0
- package/assets/types/typebox/build/schema/static/prefixItems.d.mts +3 -0
- package/assets/types/typebox/build/schema/static/properties.d.mts +32 -0
- package/assets/types/typebox/build/schema/static/ref.d.mts +8 -0
- package/assets/types/typebox/build/schema/static/required.d.mts +3 -0
- package/assets/types/typebox/build/schema/static/schema.d.mts +56 -0
- package/assets/types/typebox/build/schema/static/static.d.mts +4 -0
- package/assets/types/typebox/build/schema/static/type.d.mts +4 -0
- package/assets/types/typebox/build/schema/static/unevaluatedProperties.d.mts +7 -0
- package/assets/types/typebox/build/schema/types/_refine.d.mts +13 -0
- package/assets/types/typebox/build/schema/types/additionalItems.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/additionalProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/allOf.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/anchor.d.mts +8 -0
- package/assets/types/typebox/build/schema/types/anyOf.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/const.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/contains.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/contentEncoding.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/contentMediaType.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/default.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/defs.d.mts +6 -0
- package/assets/types/typebox/build/schema/types/dependencies.d.mts +11 -0
- package/assets/types/typebox/build/schema/types/dependentRequired.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/dependentSchemas.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/dynamicAnchor.d.mts +8 -0
- package/assets/types/typebox/build/schema/types/dynamicRef.d.mts +8 -0
- package/assets/types/typebox/build/schema/types/else.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/enum.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/exclusiveMaximum.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/exclusiveMinimum.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/format.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/id.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/if.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/index.d.mts +53 -0
- package/assets/types/typebox/build/schema/types/items.d.mts +19 -0
- package/assets/types/typebox/build/schema/types/maxContains.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/maxItems.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/maxLength.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/maxProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/maximum.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/minContains.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/minItems.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/minLength.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/minProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/minimum.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/multipleOf.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/not.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/oneOf.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/pattern.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/patternProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/prefixItems.d.mts +8 -0
- package/assets/types/typebox/build/schema/types/properties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/propertyNames.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/recursiveAnchor.d.mts +12 -0
- package/assets/types/typebox/build/schema/types/recursiveRef.d.mts +8 -0
- package/assets/types/typebox/build/schema/types/ref.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/required.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/schema.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/then.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/type.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/unevaluatedItems.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/unevaluatedProperties.d.mts +9 -0
- package/assets/types/typebox/build/schema/types/uniqueItems.d.mts +9 -0
- package/assets/types/typebox/build/system/arguments/arguments.d.mts +5 -0
- package/assets/types/typebox/build/system/arguments/index.d.mts +1 -0
- package/assets/types/typebox/build/system/environment/environment.d.mts +1 -0
- package/assets/types/typebox/build/system/environment/evaluate.d.mts +9 -0
- package/assets/types/typebox/build/system/environment/index.d.mts +1 -0
- package/assets/types/typebox/build/system/hashing/hash.d.mts +4 -0
- package/assets/types/typebox/build/system/hashing/index.d.mts +1 -0
- package/assets/types/typebox/build/system/index.d.mts +4 -0
- package/assets/types/typebox/build/system/locale/_config.d.mts +7 -0
- package/assets/types/typebox/build/system/locale/_locale.d.mts +40 -0
- package/assets/types/typebox/build/system/locale/ar_001.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/bn_BD.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/cs_CZ.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/de_DE.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/el_GR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/en_US.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/es_419.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/es_AR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/es_ES.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/es_MX.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/fa_IR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/fil_PH.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/fr_CA.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/fr_FR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ha_NG.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/hi_IN.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/hu_HU.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/id_ID.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/index.d.mts +1 -0
- package/assets/types/typebox/build/system/locale/it_IT.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ja_JP.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ko_KR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ms_MY.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/nl_NL.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/pl_PL.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/pt_BR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/pt_PT.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ro_RO.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ru_RU.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/sv_SE.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/sw_TZ.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/th_TH.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/tr_TR.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/uk_UA.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/ur_PK.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/vi_VN.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/yo_NG.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/zh_Hans.d.mts +3 -0
- package/assets/types/typebox/build/system/locale/zh_Hant.d.mts +3 -0
- package/assets/types/typebox/build/system/memory/assign.d.mts +14 -0
- package/assets/types/typebox/build/system/memory/clone.d.mts +5 -0
- package/assets/types/typebox/build/system/memory/create.d.mts +8 -0
- package/assets/types/typebox/build/system/memory/discard.d.mts +4 -0
- package/assets/types/typebox/build/system/memory/index.d.mts +1 -0
- package/assets/types/typebox/build/system/memory/memory.d.mts +6 -0
- package/assets/types/typebox/build/system/memory/metrics.d.mts +14 -0
- package/assets/types/typebox/build/system/memory/update.d.mts +7 -0
- package/assets/types/typebox/build/system/settings/index.d.mts +1 -0
- package/assets/types/typebox/build/system/settings/settings.d.mts +71 -0
- package/assets/types/typebox/build/system/system.d.mts +6 -0
- package/assets/types/typebox/build/system/unreachable/index.d.mts +1 -0
- package/assets/types/typebox/build/system/unreachable/unreachable.d.mts +3 -0
- package/assets/types/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/assets/types/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/assets/types/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/assets/types/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/assets/types/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/assets/types/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/assets/types/typebox/build/type/action/capitalize.d.mts +11 -0
- package/assets/types/typebox/build/type/action/conditional.d.mts +12 -0
- package/assets/types/typebox/build/type/action/constructor_parameters.d.mts +11 -0
- package/assets/types/typebox/build/type/action/evaluate.d.mts +11 -0
- package/assets/types/typebox/build/type/action/exclude.d.mts +11 -0
- package/assets/types/typebox/build/type/action/extract.d.mts +11 -0
- package/assets/types/typebox/build/type/action/index.d.mts +30 -0
- package/assets/types/typebox/build/type/action/indexed.d.mts +14 -0
- package/assets/types/typebox/build/type/action/instance_type.d.mts +11 -0
- package/assets/types/typebox/build/type/action/interface.d.mts +14 -0
- package/assets/types/typebox/build/type/action/keyof.d.mts +11 -0
- package/assets/types/typebox/build/type/action/lowercase.d.mts +11 -0
- package/assets/types/typebox/build/type/action/mapped.d.mts +13 -0
- package/assets/types/typebox/build/type/action/module.d.mts +13 -0
- package/assets/types/typebox/build/type/action/non_nullable.d.mts +11 -0
- package/assets/types/typebox/build/type/action/omit.d.mts +14 -0
- package/assets/types/typebox/build/type/action/parameters.d.mts +11 -0
- package/assets/types/typebox/build/type/action/partial.d.mts +11 -0
- package/assets/types/typebox/build/type/action/pick.d.mts +14 -0
- package/assets/types/typebox/build/type/action/readonly_object.d.mts +16 -0
- package/assets/types/typebox/build/type/action/required.d.mts +11 -0
- package/assets/types/typebox/build/type/action/return_type.d.mts +11 -0
- package/assets/types/typebox/build/type/action/uncapitalize.d.mts +11 -0
- package/assets/types/typebox/build/type/action/uppercase.d.mts +11 -0
- package/assets/types/typebox/build/type/action/with.d.mts +11 -0
- package/assets/types/typebox/build/type/engine/call/distribute_arguments.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/call/instantiate.d.mts +21 -0
- package/assets/types/typebox/build/type/engine/call/resolve_arguments.d.mts +13 -0
- package/assets/types/typebox/build/type/engine/call/resolve_target.d.mts +25 -0
- package/assets/types/typebox/build/type/engine/conditional/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/conditional/instantiate.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/constructor_parameters/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +14 -0
- package/assets/types/typebox/build/type/engine/cyclic/candidates.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/cyclic/check.d.mts +21 -0
- package/assets/types/typebox/build/type/engine/cyclic/dependencies.d.mts +22 -0
- package/assets/types/typebox/build/type/engine/cyclic/extends.d.mts +28 -0
- package/assets/types/typebox/build/type/engine/cyclic/index.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/cyclic/instantiate.d.mts +17 -0
- package/assets/types/typebox/build/type/engine/cyclic/target.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/enum/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/enum/typescript_enum_to_enum_values.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/evaluate/broaden.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/evaluate/compare.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/evaluate/composite.d.mts +34 -0
- package/assets/types/typebox/build/type/engine/evaluate/distribute.d.mts +28 -0
- package/assets/types/typebox/build/type/engine/evaluate/evaluate.d.mts +26 -0
- package/assets/types/typebox/build/type/engine/evaluate/flatten.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/evaluate/index.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/evaluate/instantiate.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/evaluate/narrow.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/exclude/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/exclude/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/exclude/operation.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/extract/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/extract/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/extract/operation.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/helpers/index.d.mts +3 -0
- package/assets/types/typebox/build/type/engine/helpers/keys.d.mts +3 -0
- package/assets/types/typebox/build/type/engine/helpers/keys_to_indexer.d.mts +7 -0
- package/assets/types/typebox/build/type/engine/helpers/union.d.mts +7 -0
- package/assets/types/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/index.d.mts +31 -0
- package/assets/types/typebox/build/type/engine/indexable/from_cyclic.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/indexable/from_enum.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/indexable/from_intersect.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/indexable/from_literal.d.mts +3 -0
- package/assets/types/typebox/build/type/engine/indexable/from_template_literal.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/indexable/from_type.d.mts +19 -0
- package/assets/types/typebox/build/type/engine/indexable/from_union.d.mts +4 -0
- package/assets/types/typebox/build/type/engine/indexable/to_indexable.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/indexable/to_indexable_keys.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/indexed/array_indexer.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/indexed/from_array.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/indexed/from_object.d.mts +16 -0
- package/assets/types/typebox/build/type/engine/indexed/from_tuple.d.mts +13 -0
- package/assets/types/typebox/build/type/engine/indexed/from_type.d.mts +11 -0
- package/assets/types/typebox/build/type/engine/indexed/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/indexed/instantiate.d.mts +16 -0
- package/assets/types/typebox/build/type/engine/instance_type/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/instance_type/instantiate.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/instantiate.d.mts +178 -0
- package/assets/types/typebox/build/type/engine/interface/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/interface/instantiate.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/intrinsics/from_literal.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/intrinsics/from_type.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/intrinsics/from_union.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/intrinsics/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/intrinsics/instantiate.d.mts +38 -0
- package/assets/types/typebox/build/type/engine/intrinsics/mapping.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/keyof/from_any.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/keyof/from_array.d.mts +4 -0
- package/assets/types/typebox/build/type/engine/keyof/from_object.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/keyof/from_record.d.mts +4 -0
- package/assets/types/typebox/build/type/engine/keyof/from_tuple.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/keyof/from_type.d.mts +15 -0
- package/assets/types/typebox/build/type/engine/keyof/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/keyof/instantiate.d.mts +16 -0
- package/assets/types/typebox/build/type/engine/mapped/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/mapped/instantiate.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/mapped/mapped_operation.d.mts +22 -0
- package/assets/types/typebox/build/type/engine/mapped/mapped_variants.d.mts +17 -0
- package/assets/types/typebox/build/type/engine/module/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/module/instantiate.d.mts +19 -0
- package/assets/types/typebox/build/type/engine/non_nullable/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/non_nullable/instantiate.d.mts +14 -0
- package/assets/types/typebox/build/type/engine/object/collapse.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/object/from_cyclic.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/object/from_intersect.d.mts +17 -0
- package/assets/types/typebox/build/type/engine/object/from_object.d.mts +3 -0
- package/assets/types/typebox/build/type/engine/object/from_tuple.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/object/from_type.d.mts +16 -0
- package/assets/types/typebox/build/type/engine/object/from_union.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/object/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/omit/from_type.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/omit/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/omit/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/parameters/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/parameters/instantiate.d.mts +14 -0
- package/assets/types/typebox/build/type/engine/partial/from_cyclic.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/partial/from_intersect.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/partial/from_object.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/partial/from_type.d.mts +14 -0
- package/assets/types/typebox/build/type/engine/partial/from_union.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/partial/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/partial/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/patterns/index.d.mts +2 -0
- package/assets/types/typebox/build/type/engine/patterns/pattern.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/patterns/template.d.mts +7 -0
- package/assets/types/typebox/build/type/engine/pick/from_type.d.mts +13 -0
- package/assets/types/typebox/build/type/engine/pick/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/pick/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/assets/types/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_array.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_cyclic.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_object.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_tuple.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_type.d.mts +18 -0
- package/assets/types/typebox/build/type/engine/readonly_object/from_union.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/readonly_object/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/readonly_object/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/record/from_key.d.mts +24 -0
- package/assets/types/typebox/build/type/engine/record/from_key_any.d.mts +4 -0
- package/assets/types/typebox/build/type/engine/record/from_key_boolean.d.mts +7 -0
- package/assets/types/typebox/build/type/engine/record/from_key_enum.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/record/from_key_integer.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/record/from_key_intersect.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/record/from_key_literal.d.mts +11 -0
- package/assets/types/typebox/build/type/engine/record/from_key_number.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/record/from_key_string.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/record/from_key_template_literal.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/record/from_key_union.d.mts +20 -0
- package/assets/types/typebox/build/type/engine/record/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/record/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/record/record_create.d.mts +3 -0
- package/assets/types/typebox/build/type/engine/ref/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/ref/instantiate.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/required/from_cyclic.d.mts +10 -0
- package/assets/types/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/required/from_intersect.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/required/from_object.d.mts +8 -0
- package/assets/types/typebox/build/type/engine/required/from_type.d.mts +14 -0
- package/assets/types/typebox/build/type/engine/required/from_union.d.mts +5 -0
- package/assets/types/typebox/build/type/engine/required/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/required/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/rest/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/rest/spread.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/return_type/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/return_type/instantiate.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/template_literal/create.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/template_literal/decode.d.mts +30 -0
- package/assets/types/typebox/build/type/engine/template_literal/encode.d.mts +33 -0
- package/assets/types/typebox/build/type/engine/template_literal/index.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/template_literal/instantiate.d.mts +9 -0
- package/assets/types/typebox/build/type/engine/template_literal/is_finite.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/template_literal/is_pattern.d.mts +6 -0
- package/assets/types/typebox/build/type/engine/template_literal/static.d.mts +18 -0
- package/assets/types/typebox/build/type/engine/this/expand_this.d.mts +16 -0
- package/assets/types/typebox/build/type/engine/tuple/to_object.d.mts +12 -0
- package/assets/types/typebox/build/type/engine/with/index.d.mts +1 -0
- package/assets/types/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/assets/types/typebox/build/type/extends/any.d.mts +9 -0
- package/assets/types/typebox/build/type/extends/array.d.mts +20 -0
- package/assets/types/typebox/build/type/extends/bigint.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/boolean.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/constructor.d.mts +10 -0
- package/assets/types/typebox/build/type/extends/dependent.d.mts +6 -0
- package/assets/types/typebox/build/type/extends/enum.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/extends.d.mts +13 -0
- package/assets/types/typebox/build/type/extends/extends_left.d.mts +53 -0
- package/assets/types/typebox/build/type/extends/extends_right.d.mts +27 -0
- package/assets/types/typebox/build/type/extends/function.d.mts +10 -0
- package/assets/types/typebox/build/type/extends/index.d.mts +2 -0
- package/assets/types/typebox/build/type/extends/inference.d.mts +34 -0
- package/assets/types/typebox/build/type/extends/integer.d.mts +8 -0
- package/assets/types/typebox/build/type/extends/intersect.d.mts +6 -0
- package/assets/types/typebox/build/type/extends/literal.d.mts +18 -0
- package/assets/types/typebox/build/type/extends/never.d.mts +8 -0
- package/assets/types/typebox/build/type/extends/null.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/number.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/object.d.mts +32 -0
- package/assets/types/typebox/build/type/extends/parameters.d.mts +15 -0
- package/assets/types/typebox/build/type/extends/record.d.mts +13 -0
- package/assets/types/typebox/build/type/extends/result.d.mts +24 -0
- package/assets/types/typebox/build/type/extends/return_type.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/string.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/symbol.d.mts +7 -0
- package/assets/types/typebox/build/type/extends/template_literal.d.mts +6 -0
- package/assets/types/typebox/build/type/extends/tuple.d.mts +22 -0
- package/assets/types/typebox/build/type/extends/undefined.d.mts +8 -0
- package/assets/types/typebox/build/type/extends/union.d.mts +11 -0
- package/assets/types/typebox/build/type/extends/unknown.d.mts +9 -0
- package/assets/types/typebox/build/type/extends/void.d.mts +7 -0
- package/assets/types/typebox/build/type/index.d.mts +5 -0
- package/assets/types/typebox/build/type/script/index.d.mts +1 -0
- package/assets/types/typebox/build/type/script/mapping.d.mts +353 -0
- package/assets/types/typebox/build/type/script/parser.d.mts +262 -0
- package/assets/types/typebox/build/type/script/script.d.mts +16 -0
- package/assets/types/typebox/build/type/script/token/bigint.d.mts +8 -0
- package/assets/types/typebox/build/type/script/token/const.d.mts +11 -0
- package/assets/types/typebox/build/type/script/token/ident.d.mts +16 -0
- package/assets/types/typebox/build/type/script/token/index.d.mts +12 -0
- package/assets/types/typebox/build/type/script/token/integer.d.mts +11 -0
- package/assets/types/typebox/build/type/script/token/internal/char.d.mts +75 -0
- package/assets/types/typebox/build/type/script/token/internal/guard.d.mts +1 -0
- package/assets/types/typebox/build/type/script/token/internal/many.d.mts +7 -0
- package/assets/types/typebox/build/type/script/token/internal/match.d.mts +6 -0
- package/assets/types/typebox/build/type/script/token/internal/optional.d.mts +5 -0
- package/assets/types/typebox/build/type/script/token/internal/take.d.mts +6 -0
- package/assets/types/typebox/build/type/script/token/internal/trim.d.mts +19 -0
- package/assets/types/typebox/build/type/script/token/number.d.mts +11 -0
- package/assets/types/typebox/build/type/script/token/rest.d.mts +4 -0
- package/assets/types/typebox/build/type/script/token/span.d.mts +11 -0
- package/assets/types/typebox/build/type/script/token/string.d.mts +11 -0
- package/assets/types/typebox/build/type/script/token/unsigned_integer.d.mts +16 -0
- package/assets/types/typebox/build/type/script/token/unsigned_number.d.mts +17 -0
- package/assets/types/typebox/build/type/script/token/until.d.mts +7 -0
- package/assets/types/typebox/build/type/script/token/until_1.d.mts +5 -0
- package/assets/types/typebox/build/type/types/_codec.d.mts +30 -0
- package/assets/types/typebox/build/type/types/_immutable.d.mts +9 -0
- package/assets/types/typebox/build/type/types/_optional.d.mts +9 -0
- package/assets/types/typebox/build/type/types/_readonly.d.mts +9 -0
- package/assets/types/typebox/build/type/types/_refine.d.mts +24 -0
- package/assets/types/typebox/build/type/types/any.d.mts +10 -0
- package/assets/types/typebox/build/type/types/array.d.mts +18 -0
- package/assets/types/typebox/build/type/types/bigint.d.mts +12 -0
- package/assets/types/typebox/build/type/types/boolean.d.mts +11 -0
- package/assets/types/typebox/build/type/types/call.d.mts +16 -0
- package/assets/types/typebox/build/type/types/constructor.d.mts +18 -0
- package/assets/types/typebox/build/type/types/cyclic.d.mts +16 -0
- package/assets/types/typebox/build/type/types/deferred.d.mts +13 -0
- package/assets/types/typebox/build/type/types/dependent.d.mts +17 -0
- package/assets/types/typebox/build/type/types/enum.d.mts +18 -0
- package/assets/types/typebox/build/type/types/function.d.mts +21 -0
- package/assets/types/typebox/build/type/types/generic.d.mts +13 -0
- package/assets/types/typebox/build/type/types/identifier.d.mts +11 -0
- package/assets/types/typebox/build/type/types/index.d.mts +45 -0
- package/assets/types/typebox/build/type/types/infer.d.mts +15 -0
- package/assets/types/typebox/build/type/types/integer.d.mts +12 -0
- package/assets/types/typebox/build/type/types/intersect.d.mts +15 -0
- package/assets/types/typebox/build/type/types/literal.d.mts +31 -0
- package/assets/types/typebox/build/type/types/never.d.mts +12 -0
- package/assets/types/typebox/build/type/types/null.d.mts +11 -0
- package/assets/types/typebox/build/type/types/number.d.mts +12 -0
- package/assets/types/typebox/build/type/types/object.d.mts +18 -0
- package/assets/types/typebox/build/type/types/parameter.d.mts +17 -0
- package/assets/types/typebox/build/type/types/properties.d.mts +43 -0
- package/assets/types/typebox/build/type/types/record.d.mts +52 -0
- package/assets/types/typebox/build/type/types/ref.d.mts +19 -0
- package/assets/types/typebox/build/type/types/rest.d.mts +11 -0
- package/assets/types/typebox/build/type/types/schema.d.mts +176 -0
- package/assets/types/typebox/build/type/types/static.d.mts +45 -0
- package/assets/types/typebox/build/type/types/string.d.mts +12 -0
- package/assets/types/typebox/build/type/types/symbol.d.mts +11 -0
- package/assets/types/typebox/build/type/types/template_literal.d.mts +28 -0
- package/assets/types/typebox/build/type/types/this.d.mts +14 -0
- package/assets/types/typebox/build/type/types/tuple.d.mts +38 -0
- package/assets/types/typebox/build/type/types/undefined.d.mts +11 -0
- package/assets/types/typebox/build/type/types/union.d.mts +15 -0
- package/assets/types/typebox/build/type/types/unknown.d.mts +10 -0
- package/assets/types/typebox/build/type/types/unsafe.d.mts +10 -0
- package/assets/types/typebox/build/type/types/void.d.mts +11 -0
- package/assets/types/typebox/build/typebox.d.mts +69 -0
- package/assets/types/typebox/build/value/assert/assert.d.mts +14 -0
- package/assets/types/typebox/build/value/assert/index.d.mts +1 -0
- package/assets/types/typebox/build/value/check/check.d.mts +5 -0
- package/assets/types/typebox/build/value/check/index.d.mts +1 -0
- package/assets/types/typebox/build/value/clean/additional.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/clean.d.mts +15 -0
- package/assets/types/typebox/build/value/clean/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_cyclic.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/clean/index.d.mts +1 -0
- package/assets/types/typebox/build/value/clone/clone.d.mts +5 -0
- package/assets/types/typebox/build/value/clone/index.d.mts +1 -0
- package/assets/types/typebox/build/value/codec/callback.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/decode.d.mts +12 -0
- package/assets/types/typebox/build/value/codec/encode.d.mts +12 -0
- package/assets/types/typebox/build/value/codec/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_cyclic.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/codec/has.d.mts +5 -0
- package/assets/types/typebox/build/value/codec/index.d.mts +3 -0
- package/assets/types/typebox/build/value/convert/convert.d.mts +13 -0
- package/assets/types/typebox/build/value/convert/from_additional.d.mts +6 -0
- package/assets/types/typebox/build/value/convert/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_bigint.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_boolean.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_cyclic.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_enum.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_integer.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_literal.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_null.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_number.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_string.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_template_literal.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_undefined.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/from_void.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/index.d.mts +1 -0
- package/assets/types/typebox/build/value/convert/try/index.d.mts +1 -0
- package/assets/types/typebox/build/value/convert/try/try.d.mts +8 -0
- package/assets/types/typebox/build/value/convert/try/try_array.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_bigint.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_boolean.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_null.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_number.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_result.d.mts +8 -0
- package/assets/types/typebox/build/value/convert/try/try_string.d.mts +2 -0
- package/assets/types/typebox/build/value/convert/try/try_undefined.d.mts +2 -0
- package/assets/types/typebox/build/value/create/create.d.mts +5 -0
- package/assets/types/typebox/build/value/create/error.d.mts +5 -0
- package/assets/types/typebox/build/value/create/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_bigint.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_boolean.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_constructor.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_cyclic.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_default.d.mts +3 -0
- package/assets/types/typebox/build/value/create/from_enum.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_function.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_integer.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_literal.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_never.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_null.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_number.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_string.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_symbol.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_template_literal.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_undefined.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/create/from_void.d.mts +2 -0
- package/assets/types/typebox/build/value/create/index.d.mts +2 -0
- package/assets/types/typebox/build/value/default/default.d.mts +13 -0
- package/assets/types/typebox/build/value/default/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_cyclic.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_default.d.mts +3 -0
- package/assets/types/typebox/build/value/default/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/default/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/default/index.d.mts +1 -0
- package/assets/types/typebox/build/value/delta/diff.d.mts +10 -0
- package/assets/types/typebox/build/value/delta/edit.d.mts +24 -0
- package/assets/types/typebox/build/value/delta/index.d.mts +3 -0
- package/assets/types/typebox/build/value/delta/patch.d.mts +8 -0
- package/assets/types/typebox/build/value/equal/equal.d.mts +2 -0
- package/assets/types/typebox/build/value/equal/index.d.mts +1 -0
- package/assets/types/typebox/build/value/errors/errors.d.mts +16 -0
- package/assets/types/typebox/build/value/errors/index.d.mts +1 -0
- package/assets/types/typebox/build/value/hash/hash.d.mts +6 -0
- package/assets/types/typebox/build/value/hash/index.d.mts +1 -0
- package/assets/types/typebox/build/value/index.d.mts +20 -0
- package/assets/types/typebox/build/value/parse/index.d.mts +1 -0
- package/assets/types/typebox/build/value/parse/parse.d.mts +11 -0
- package/assets/types/typebox/build/value/pipeline/index.d.mts +1 -0
- package/assets/types/typebox/build/value/pipeline/pipeline.d.mts +10 -0
- package/assets/types/typebox/build/value/pointer/index.d.mts +1 -0
- package/assets/types/typebox/build/value/repair/error.d.mts +7 -0
- package/assets/types/typebox/build/value/repair/from_array.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_enum.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_intersect.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_object.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_record.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_ref.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_template_literal.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_tuple.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_type.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_union.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/from_unknown.d.mts +2 -0
- package/assets/types/typebox/build/value/repair/index.d.mts +1 -0
- package/assets/types/typebox/build/value/repair/repair.d.mts +17 -0
- package/assets/types/typebox/build/value/shared/index.d.mts +3 -0
- package/assets/types/typebox/build/value/shared/optional_undefined.d.mts +2 -0
- package/assets/types/typebox/build/value/shared/union_priority_sort.d.mts +7 -0
- package/assets/types/typebox/build/value/shared/union_score_select.d.mts +3 -0
- package/assets/types/typebox/build/value/value.d.mts +15 -0
- package/assets/types/typebox/package.json +87 -0
- package/package.json +28 -0
- package/src/alt-screen.ts +46 -0
- package/src/argv.ts +147 -0
- package/src/cli-tree-host.ts +81 -0
- package/src/cli.ts +155 -0
- package/src/fatal-signal.ts +45 -0
- package/src/final-frame.ts +71 -0
- package/src/interactive-run.ts +231 -0
- package/src/presenter.ts +31 -0
- package/src/render.ts +96 -0
- package/src/run-invocation.ts +48 -0
- package/src/runtime-alias.ts +64 -0
- package/src/setup-workspace.ts +91 -0
- package/src/tree-app.ts +178 -0
- package/src/tui-test-support.ts +96 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** A temp file left by an interrupted publication is stale after one day (ADR-0021). */
|
|
2
|
+
export declare const CHECKPOINT_TEMP_MAX_AGE_MS: number;
|
|
3
|
+
/**
|
|
4
|
+
* Resolves where a stopped Run publishes its checkpoint when `--record` set no
|
|
5
|
+
* path: `YAAG_CHECKPOINT_DIR`, then an absolute `XDG_STATE_HOME`, then
|
|
6
|
+
* `$HOME/.local/state`. A relative `XDG_STATE_HOME` is ignored (XDG spec).
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveCheckpointDirectory(env?: NodeJS.ProcessEnv): string;
|
|
9
|
+
/**
|
|
10
|
+
* Names one checkpoint file. There is no Run id below the transport seam yet, so
|
|
11
|
+
* the name is a millisecond timestamp, the process id, and a full random UUID.
|
|
12
|
+
* The UUID is what makes the name collision-safe: two Runs in one process can
|
|
13
|
+
* settle inside the same millisecond, and a rename onto an existing name would
|
|
14
|
+
* destroy the earlier checkpoint (ADR-0021). The UUID keeps all 122 random bits;
|
|
15
|
+
* a truncated nonce would make that silent overwrite reachable.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkpointFileName(now?: Date, pid?: number, nonce?: string): string;
|
|
18
|
+
/** Bounds for {@link cleanStaleCheckpointTemp}; both default when omitted. */
|
|
19
|
+
export interface CleanStaleOptions {
|
|
20
|
+
/** Epoch milliseconds treated as "now"; defaults to `Date.now()`. */
|
|
21
|
+
readonly now?: number;
|
|
22
|
+
/** Age above which a temp file is removed; defaults to {@link CHECKPOINT_TEMP_MAX_AGE_MS}. */
|
|
23
|
+
readonly maxAgeMs?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Removes publication temp files older than `maxAgeMs`. A missing directory
|
|
27
|
+
* resolves silently; a `readdir` failure rejects, so the caller owns the
|
|
28
|
+
* diagnostic. This module never writes to stderr.
|
|
29
|
+
*/
|
|
30
|
+
export declare function cleanStaleCheckpointTemp(directory: string, options?: CleanStaleOptions): Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AgentTransport, Frame } from "./transport.ts";
|
|
2
|
+
/** The useful part of a `response` frame, once narrowed. */
|
|
3
|
+
export interface CommandResponse {
|
|
4
|
+
readonly success: boolean;
|
|
5
|
+
readonly error: string | null;
|
|
6
|
+
readonly data: Record<string, unknown> | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* One conversation with an Agent over the transport seam: correlates commands
|
|
10
|
+
* with their responses by id, cancels dialogs, and hands every other frame to
|
|
11
|
+
* the Ask in flight.
|
|
12
|
+
*
|
|
13
|
+
* Lives above the seam, so it knows nothing about processes.
|
|
14
|
+
*/
|
|
15
|
+
export declare class Connection {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(transport: AgentTransport, agent: string);
|
|
18
|
+
/** True once the Agent's frame stream has ended: the Handle is permanently dead. */
|
|
19
|
+
get dead(): boolean;
|
|
20
|
+
/** Resolves when the Agent's frame stream ends. Never rejects. */
|
|
21
|
+
get closed(): Promise<void>;
|
|
22
|
+
/** Routes non-response frames to a listener, replacing any previous one. */
|
|
23
|
+
observe(listener: ((frame: Frame) => void) | null): void;
|
|
24
|
+
/**
|
|
25
|
+
* Sends one command and resolves with its id-correlated response.
|
|
26
|
+
* Rejects with AGENT_DIED if the Agent dies first.
|
|
27
|
+
*/
|
|
28
|
+
command(frame: Frame): Promise<CommandResponse>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AskOptions, ThinkingLevel } from "./types.ts";
|
|
2
|
+
export type { ThinkingLevel } from "./types.ts";
|
|
3
|
+
/** What `defineAgent` is given: the policy of one Agent, never its topology. */
|
|
4
|
+
export interface AgentConfig {
|
|
5
|
+
/** Stable identity, used in every Lifecycle Event and log line. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
/** System prompt text appended to pi's own, unless `overrideSystemPrompt`. */
|
|
8
|
+
readonly prompt?: string;
|
|
9
|
+
/** Replace pi's system prompt with `prompt` instead of appending to it. */
|
|
10
|
+
readonly overrideSystemPrompt?: boolean;
|
|
11
|
+
/** Model id handed to `pi --model`. Unset = pi's default. */
|
|
12
|
+
readonly model?: string;
|
|
13
|
+
/** Thinking budget for the Agent's turns. */
|
|
14
|
+
readonly thinking?: ThinkingLevel;
|
|
15
|
+
/** Allow-list of tool names. Unset = pi's default tool set. */
|
|
16
|
+
readonly tools?: readonly string[];
|
|
17
|
+
/** Deny-list of tool names, applied after `tools`. */
|
|
18
|
+
readonly disallowedTools?: readonly string[];
|
|
19
|
+
/** Allow-list of skill names. Unset = pi's default skill set. */
|
|
20
|
+
readonly skills?: readonly string[];
|
|
21
|
+
/** Deny-list of skill names, applied after `skills`. */
|
|
22
|
+
readonly disallowedSkills?: readonly string[];
|
|
23
|
+
/** Ask options applied to every Ask on this Agent unless overridden per call. */
|
|
24
|
+
readonly askDefaults?: AskOptions;
|
|
25
|
+
}
|
|
26
|
+
/** Not exported, so the config is unreachable outside this module. */
|
|
27
|
+
declare const definition: unique symbol;
|
|
28
|
+
/** Opaque, deep-frozen result of `defineAgent`. */
|
|
29
|
+
export interface AgentDefinition {
|
|
30
|
+
readonly [definition]: AgentConfig;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Declares an Agent Definition: reusable policy, independent of where it runs.
|
|
34
|
+
*
|
|
35
|
+
* Throws a TypeError when `name` is missing or blank, or when `cwd`/`worktree`
|
|
36
|
+
* appear — those are topology, chosen at spawn time, not baked into a definition.
|
|
37
|
+
* The config is defensively copied and deep-frozen, so later mutation of the
|
|
38
|
+
* caller's arrays cannot change the definition.
|
|
39
|
+
*/
|
|
40
|
+
export declare function defineAgent(config: AgentConfig): AgentDefinition;
|
|
41
|
+
/** True only for values produced by `defineAgent`. */
|
|
42
|
+
export declare function isAgentDefinition(value: unknown): value is AgentDefinition;
|
|
43
|
+
/**
|
|
44
|
+
* Recovers the config behind an Agent Definition.
|
|
45
|
+
* Throws a TypeError when the value did not come from `defineAgent`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function agentDefinitionConfig(value: AgentDefinition): AgentConfig;
|
|
48
|
+
export declare function agentDefinitionConfig(value: unknown): AgentConfig;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Static, TSchema } from "typebox";
|
|
2
|
+
import type { RunContext } from "./run-context.ts";
|
|
3
|
+
/** What `defineRun` is given. */
|
|
4
|
+
export interface ProgramDefinition<Args = unknown, Result = unknown> {
|
|
5
|
+
readonly name?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
/** Optional Typebox contract for arguments delivered to `run`. */
|
|
8
|
+
readonly args?: TSchema;
|
|
9
|
+
readonly run: (ctx: RunContext<Args>) => Result | Promise<Result>;
|
|
10
|
+
}
|
|
11
|
+
type SchemaProgramDefinition<Schema extends TSchema, Result> = Omit<ProgramDefinition<Static<Schema>, Result>, "args"> & {
|
|
12
|
+
readonly args: Schema;
|
|
13
|
+
};
|
|
14
|
+
type SchemalessProgramDefinition<Args, Result> = ProgramDefinition<Args, Result> & {
|
|
15
|
+
readonly args?: never;
|
|
16
|
+
};
|
|
17
|
+
/** Not exported, so the definition is unreachable outside this module. */
|
|
18
|
+
declare const definition: unique symbol;
|
|
19
|
+
/** Opaque result of `defineRun`. Must be the module's default export. */
|
|
20
|
+
export interface OrchestrationProgram<Args = unknown, Result = unknown> {
|
|
21
|
+
readonly [definition]: ProgramDefinition<Args, Result>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Declares an Orchestration Program with arguments inferred from its Typebox schema.
|
|
25
|
+
*
|
|
26
|
+
* The returned value is opaque: exporting anything else as default is a compile
|
|
27
|
+
* error rather than a runtime "no program found".
|
|
28
|
+
*/
|
|
29
|
+
export declare function defineRun<Schema extends TSchema, Result>(program: SchemaProgramDefinition<Schema, Result>): OrchestrationProgram<Static<Schema>, Result>;
|
|
30
|
+
/** Declares an Orchestration Program without an argument schema. */
|
|
31
|
+
export declare function defineRun<Args = unknown, Result = unknown>(program: SchemalessProgramDefinition<Args, Result>): OrchestrationProgram<Args, Result>;
|
|
32
|
+
/** True only for values produced by `defineRun`. */
|
|
33
|
+
export declare function isOrchestrationProgram(value: unknown): value is OrchestrationProgram;
|
|
34
|
+
/**
|
|
35
|
+
* Recovers the definition behind a program.
|
|
36
|
+
* Throws a TypeError when the value did not come from `defineRun`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function programDefinition<Args, Result>(value: OrchestrationProgram<Args, Result>): ProgramDefinition<Args, Result>;
|
|
39
|
+
export declare function programDefinition(value: unknown): ProgramDefinition;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Which soft Ask budget was exhausted. */
|
|
2
|
+
export type AskLimitKind = "turns" | "toolCalls" | "durationMs";
|
|
3
|
+
/** The recorded result when yaag aborts an Ask after a soft budget is exhausted. */
|
|
4
|
+
export interface AskLimitOutcome {
|
|
5
|
+
readonly kind: AskLimitKind;
|
|
6
|
+
readonly count: number;
|
|
7
|
+
}
|
|
8
|
+
/** The recorded result when yaag rejects an Ask because no frame arrived within `idleMs`. */
|
|
9
|
+
export interface AskStalledOutcome {
|
|
10
|
+
/** The configured silence threshold that tripped. */
|
|
11
|
+
readonly idleMs: number;
|
|
12
|
+
/** True when abort failed to settle the Agent and yaag killed the process. */
|
|
13
|
+
readonly destructive: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Recoverable result when all structured-output correction efforts are exhausted. */
|
|
16
|
+
export interface AskInvalidOutputOutcome {
|
|
17
|
+
/** Corrective steers sent before aborting this Ask. */
|
|
18
|
+
readonly steeringEfforts: number;
|
|
19
|
+
/** Final extraction or TypeBox diagnostics, localized to JSON paths. */
|
|
20
|
+
readonly errors: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
/** Why an Ask, spawn, or Run failed. Programs may branch on this; most won't. */
|
|
23
|
+
export type YaagErrorCode = "AGENT_FAILED" | "AGENT_DIED" | "AGENT_BUSY" | "ASK_TIMEOUT" | "ASK_LIMIT" | "ASK_STALLED" | "ASK_INVALID_OUTPUT" | "ARGS_INVALID" | "OPTIONS_CONFLICT" | "REPLAY_DIVERGED" | "RESUME_REFUSED" | "RUN_CLOSED" | "RUN_STOPPED" | "WORKTREE_REFUSED" | "SPAWN_FAILED";
|
|
24
|
+
/** The single error class of the runtime (ADR-0003). */
|
|
25
|
+
export declare class YaagError extends Error {
|
|
26
|
+
readonly code: YaagErrorCode;
|
|
27
|
+
/** Agent name, when the error concerns one. */
|
|
28
|
+
readonly agent?: string;
|
|
29
|
+
/** Exhausted soft Ask budget, present only for `ASK_LIMIT`. */
|
|
30
|
+
readonly limit?: AskLimitKind;
|
|
31
|
+
/** Count observed when the soft Ask budget first tripped. */
|
|
32
|
+
readonly count?: number;
|
|
33
|
+
/** Silence threshold that tripped, present only for `ASK_STALLED`. */
|
|
34
|
+
readonly idleMs?: number;
|
|
35
|
+
/** True when an `ASK_STALLED` escalation had to kill the Agent. */
|
|
36
|
+
readonly destructive?: boolean;
|
|
37
|
+
/** Number of corrective output steers sent, present only for `ASK_INVALID_OUTPUT`. */
|
|
38
|
+
readonly steeringEfforts?: number;
|
|
39
|
+
/** Localized extraction or schema errors, present only for `ASK_INVALID_OUTPUT`. */
|
|
40
|
+
readonly errors?: readonly string[];
|
|
41
|
+
constructor(code: YaagErrorCode, message: string, agent?: string, options?: AskLimitOutcome | AskStalledOutcome | AskInvalidOutputOutcome);
|
|
42
|
+
}
|
|
43
|
+
/** Builds the runtime's uniform agent-scoped error message. */
|
|
44
|
+
export declare function agentError(agent: string, code: YaagErrorCode, message: string): YaagError;
|
|
45
|
+
/** The ASK_LIMIT rejection for one exhausted soft budget. */
|
|
46
|
+
export declare function askLimitError(agent: string, outcome: AskLimitOutcome): YaagError;
|
|
47
|
+
/** The ASK_STALLED rejection for one tripped idle watch. */
|
|
48
|
+
export declare function askStalledError(agent: string, outcome: AskStalledOutcome): YaagError;
|
|
49
|
+
/** Narrows an unknown rejection reason to a YaagError. */
|
|
50
|
+
export declare function isYaagError(value: unknown): value is YaagError;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle Events (ADR-0006): a closed set of flat records, emitted above the
|
|
3
|
+
* transport seam. Live-only frame observers may add richer events than a
|
|
4
|
+
* Cassette replay produces; replay intentionally omits that observation data.
|
|
5
|
+
* Playback Asks still emit normal start/end events, but intentionally omit live
|
|
6
|
+
* activity, output, and usage observations. v0 renders them as stderr lines; the
|
|
7
|
+
* dedicated fd arrives with the extension.
|
|
8
|
+
*/
|
|
9
|
+
import type { TokenBreakdown, WorktreeResolution } from "./transport.ts";
|
|
10
|
+
/** A settled Run's terminal outcome (ADR-0022). `paused` arrives with the pause slice. */
|
|
11
|
+
export type RunOutcome = "completed" | "failed" | "stopped" | "paused";
|
|
12
|
+
/** The current, Ask-scoped observer projection derived from Agent frames. */
|
|
13
|
+
export type AgentActivity = {
|
|
14
|
+
readonly type: "thinking";
|
|
15
|
+
} | {
|
|
16
|
+
readonly type: "writing";
|
|
17
|
+
} | {
|
|
18
|
+
readonly type: "tool";
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly argsGist: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly type: "compacting";
|
|
23
|
+
} | {
|
|
24
|
+
readonly type: "retrying";
|
|
25
|
+
readonly attempt: number;
|
|
26
|
+
readonly max: number;
|
|
27
|
+
};
|
|
28
|
+
/** The assistant stream channel carried by an additive `ask_output` event. */
|
|
29
|
+
export type AskOutputChannel = "text" | "thinking";
|
|
30
|
+
/** The lifecycle state of one Nested Node, as decoded from its parent's frames. */
|
|
31
|
+
export type NodeState = "running" | "exited" | "failed";
|
|
32
|
+
/** Accounting a nesting tool reports for one Nested Node; both fields are optional facts. */
|
|
33
|
+
export interface NodeUsage {
|
|
34
|
+
readonly tokens?: TokenBreakdown;
|
|
35
|
+
readonly cost?: number;
|
|
36
|
+
}
|
|
37
|
+
export type LifecycleEventBody = {
|
|
38
|
+
readonly type: "run_start";
|
|
39
|
+
readonly program: string;
|
|
40
|
+
} | {
|
|
41
|
+
readonly type: "agent_spawn";
|
|
42
|
+
readonly agent: string;
|
|
43
|
+
readonly model: string;
|
|
44
|
+
readonly cwd: string;
|
|
45
|
+
/** Present only when the Agent was spawned into a worktree. */
|
|
46
|
+
readonly branch?: string;
|
|
47
|
+
/**
|
|
48
|
+
* pi's persisted session file for this Agent, when the startup handshake
|
|
49
|
+
* reported one. A path is not a prompt payload, so it may ride the wire
|
|
50
|
+
* (ticket 09); a Peek reads this file to render the transcript. Absent for
|
|
51
|
+
* Cassette-playback Agents and events from older CLIs.
|
|
52
|
+
*/
|
|
53
|
+
readonly sessionFile?: string;
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: "ask_start";
|
|
56
|
+
readonly agent: string;
|
|
57
|
+
readonly index: number;
|
|
58
|
+
/** First non-blank prompt line, whitespace-collapsed, ≤ PROMPT_GIST_MAX_CHARS. */
|
|
59
|
+
readonly promptGist: string;
|
|
60
|
+
/** Full prompt length; the prompt itself never rides the wire (ticket 09). */
|
|
61
|
+
readonly promptChars: number;
|
|
62
|
+
/** Present only when this individual Ask was served from Cassette playback. */
|
|
63
|
+
readonly replayed?: true;
|
|
64
|
+
} | {
|
|
65
|
+
readonly type: "ask_activity";
|
|
66
|
+
readonly agent: string;
|
|
67
|
+
readonly index: number;
|
|
68
|
+
readonly activity: AgentActivity;
|
|
69
|
+
} | {
|
|
70
|
+
readonly type: "ask_output";
|
|
71
|
+
readonly agent: string;
|
|
72
|
+
readonly index: number;
|
|
73
|
+
readonly channel: AskOutputChannel;
|
|
74
|
+
readonly text: string;
|
|
75
|
+
} | {
|
|
76
|
+
/**
|
|
77
|
+
* A bounded snapshot of one Nested Node. It is the only nested-node event:
|
|
78
|
+
* there is no per-node spawn/ask/exit mirroring (spec §3). Unlike
|
|
79
|
+
* `ask_activity` and `ask_output`, it is re-derived on Cassette replay,
|
|
80
|
+
* because it decodes recorded Agent frames only (ADR-0006, ADR-0013).
|
|
81
|
+
*/
|
|
82
|
+
readonly type: "node_update";
|
|
83
|
+
readonly agent: string;
|
|
84
|
+
/** Node identity in the grammar `name(:askIndex(/childName…))`. */
|
|
85
|
+
readonly path: string;
|
|
86
|
+
readonly state: NodeState;
|
|
87
|
+
/** One line, ≤ NODE_GIST_MAX_CHARS; never a prompt (ticket 09). */
|
|
88
|
+
readonly activityGist?: string;
|
|
89
|
+
readonly usage?: NodeUsage;
|
|
90
|
+
} | {
|
|
91
|
+
readonly type: "ask_end";
|
|
92
|
+
readonly agent: string;
|
|
93
|
+
readonly index: number;
|
|
94
|
+
readonly durationMs: number;
|
|
95
|
+
readonly ok: boolean;
|
|
96
|
+
/** Largest inter-frame silence during this Ask; absent during Cassette playback. */
|
|
97
|
+
readonly maxFrameGapMs?: number;
|
|
98
|
+
} | {
|
|
99
|
+
readonly type: "agent_usage";
|
|
100
|
+
readonly agent: string;
|
|
101
|
+
/** Cumulative assistant-completion usage observed so far. */
|
|
102
|
+
readonly tokens: TokenBreakdown;
|
|
103
|
+
/** Cumulative assistant-completion cost observed so far. */
|
|
104
|
+
readonly cost: number;
|
|
105
|
+
} | {
|
|
106
|
+
readonly type: "agent_exit";
|
|
107
|
+
readonly agent: string;
|
|
108
|
+
readonly tokens: TokenBreakdown | null;
|
|
109
|
+
readonly cost: number | null;
|
|
110
|
+
/** Cost is a floor, not a total: the Agent was killed mid-Ask (ADR-0012). */
|
|
111
|
+
readonly incomplete: boolean;
|
|
112
|
+
/** Surviving worktree identity, present only for worktree Agents. */
|
|
113
|
+
readonly worktree?: WorktreeResolution;
|
|
114
|
+
} | {
|
|
115
|
+
readonly type: "run_end";
|
|
116
|
+
readonly ok: boolean;
|
|
117
|
+
/** Terminal outcome (ADR-0022); the invariant is `ok === (outcome === "completed")`. */
|
|
118
|
+
readonly outcome: RunOutcome;
|
|
119
|
+
readonly durationMs: number;
|
|
120
|
+
readonly cost: number;
|
|
121
|
+
/** Summed component-wise; null when any Agent's usage was unknown. */
|
|
122
|
+
readonly tokens: TokenBreakdown | null;
|
|
123
|
+
/** At least one Agent's cost was an undercount. */
|
|
124
|
+
readonly incomplete: boolean;
|
|
125
|
+
/** Largest inter-frame silence across every Ask; 0 when nothing was measured. */
|
|
126
|
+
readonly worstFrameGapMs: number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* A Lifecycle Event as observers see it: the body plus `at` — epoch-ms wall
|
|
130
|
+
* clock, stamped once in the Orchestrator's sink wrapper, never per emitter.
|
|
131
|
+
*/
|
|
132
|
+
export type LifecycleEvent = LifecycleEventBody & {
|
|
133
|
+
readonly at: number;
|
|
134
|
+
};
|
|
135
|
+
/** Where emitters inside a Run report Lifecycle Event bodies, pre-stamp. */
|
|
136
|
+
export type EventSink = (event: LifecycleEventBody) => void;
|
|
137
|
+
/** Where a Run reports its stamped Lifecycle Events. */
|
|
138
|
+
export type StampedEventSink = (event: LifecycleEvent) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ExtensionSource } from "./extension-source.ts";
|
|
2
|
+
/** Roots searched for an already-installed pi package, project before user. */
|
|
3
|
+
export interface ExtensionInstallRoots {
|
|
4
|
+
/** Agent working directory holding `.pi/npm` and `.pi/git`; defaults to `process.cwd()`. */
|
|
5
|
+
readonly projectRoot?: string;
|
|
6
|
+
/** pi user config directory; defaults to `~/.pi/agent`. */
|
|
7
|
+
readonly userConfigDir?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Expands an installed pi package into its declared extension entry files.
|
|
11
|
+
*
|
|
12
|
+
* Resolves the project install before the user install, then reads the package
|
|
13
|
+
* manifest's `pi.extensions` array in declaration order. Returns `undefined`
|
|
14
|
+
* when the package is not installed, so the caller can hand the raw specifier
|
|
15
|
+
* to pi and let it temp-install (docs/packages.md).
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveInstalledExtension(source: ExtensionSource, roots?: ExtensionInstallRoots): Promise<readonly string[] | undefined>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ExtensionInstallRoots } from "./extension-package.ts";
|
|
2
|
+
/** Inputs that decide how a declaration becomes a launch-ready `-e` argument. */
|
|
3
|
+
export interface ExtensionResolutionOptions extends ExtensionInstallRoots {
|
|
4
|
+
/** Orchestration Program source path, required by relative declarations. */
|
|
5
|
+
readonly programFile?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Resolves declared extensions into launch-ready `pi -e` arguments before transport opening.
|
|
9
|
+
*
|
|
10
|
+
* Filesystem declarations are resolved against the Orchestration Program directory and
|
|
11
|
+
* checked for existence. `npm:`/`git:` specifiers expand to the entry points of the
|
|
12
|
+
* already-installed package (project install shadows the user install); an uninstalled
|
|
13
|
+
* specifier passes through verbatim so pi temp-installs it. Results retain declaration
|
|
14
|
+
* order. Rejects missing paths and a relative declaration without `programFile`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveExtensionPaths(declarations: readonly string[], options?: ExtensionResolutionOptions): Promise<readonly string[]>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses pi package specifiers (`npm:`, `git:`) used as extension declarations.
|
|
3
|
+
*
|
|
4
|
+
* A declaration that carries neither prefix is a filesystem path and is reported
|
|
5
|
+
* as `{ kind: "path" }` so the caller keeps its existing resolution behaviour.
|
|
6
|
+
*/
|
|
7
|
+
export type ExtensionSource = {
|
|
8
|
+
readonly kind: "path";
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "npm";
|
|
11
|
+
readonly packageName: string;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "git";
|
|
14
|
+
readonly host: string;
|
|
15
|
+
readonly owner: string;
|
|
16
|
+
readonly repo: string;
|
|
17
|
+
};
|
|
18
|
+
/** An extension declared as a pi package specifier rather than a filesystem path. */
|
|
19
|
+
export type InstalledExtensionSource = Exclude<ExtensionSource, {
|
|
20
|
+
kind: "path";
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Classifies one extension declaration.
|
|
24
|
+
*
|
|
25
|
+
* Throws when an `npm:`/`git:` prefix is present but the remainder is not a
|
|
26
|
+
* package name or a `<host>/<owner>/<repo>` triple.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseExtensionSource(declaration: string): ExtensionSource;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { AgentStats, AgentTransport, AskMarker, Frame } from "./transport.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Scripted frame playback for one prompt sent through a FakeTransport.
|
|
4
|
+
*
|
|
5
|
+
* Abort frames play only after that prompt's abort command.
|
|
6
|
+
*/
|
|
7
|
+
export interface FakePromptScript {
|
|
8
|
+
/** Frames the Agent emits in response to this prompt, in recorded order. */
|
|
9
|
+
readonly frames?: readonly Frame[];
|
|
10
|
+
/** Scripts selected in order by correction follow-up `prompt` commands. */
|
|
11
|
+
readonly corrections?: readonly FakePromptScript[];
|
|
12
|
+
/** Script selected by the configured or default soft-limit wrap-up steer, when provided. */
|
|
13
|
+
readonly wrapUp?: FakePromptScript;
|
|
14
|
+
/** Prompt that selects `wrapUp`; falls back to the runtime default when omitted. */
|
|
15
|
+
readonly wrapUpPrompt?: string;
|
|
16
|
+
/** Frames emitted after yaag sends an abort command. */
|
|
17
|
+
readonly abortFrames?: readonly Frame[];
|
|
18
|
+
/** Delay before each scripted frame, for clock-driven tests. */
|
|
19
|
+
readonly frameDelayMs?: number;
|
|
20
|
+
/** Delay before each abort-specific frame, for abort-settlement tests. */
|
|
21
|
+
readonly abortFrameDelayMs?: number;
|
|
22
|
+
/** Payload of `get_last_assistant_text`; null means the `{}` pi returns on failure. */
|
|
23
|
+
readonly lastText?: string | null;
|
|
24
|
+
/** Makes this script's prompt RPC response fail, before any frame playback. */
|
|
25
|
+
readonly promptError?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Configures a FakeTransport with one shorthand script or ordered per-prompt scripts.
|
|
29
|
+
*
|
|
30
|
+
* Control-command failures apply across the configured playback.
|
|
31
|
+
*/
|
|
32
|
+
export interface FakeTransportOptions extends FakePromptScript {
|
|
33
|
+
/** One script per Ask's initial prompt, used in order; preserves the single-script shorthand above. */
|
|
34
|
+
readonly scripts?: readonly FakePromptScript[];
|
|
35
|
+
/** Makes a steer RPC response fail without embedding a limit decision in playback. */
|
|
36
|
+
readonly steerError?: string;
|
|
37
|
+
/** Makes an abort RPC response fail without embedding a limit decision in playback. */
|
|
38
|
+
readonly abortError?: string;
|
|
39
|
+
readonly stats?: AgentStats;
|
|
40
|
+
/** pi can answer a command after `agent_settled` — it is last among events only. */
|
|
41
|
+
readonly promptResponse?: "immediate" | "after-settle";
|
|
42
|
+
/** Ends the frame stream once playback finishes, as a dying process would. */
|
|
43
|
+
readonly dieAfterFrames?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Test implementation of the transport seam that plays scripted recorded or synthetic frames.
|
|
47
|
+
*
|
|
48
|
+
* It encodes real pi (0.84.1) post-settlement semantics: an Ask's initial prompt
|
|
49
|
+
* selects the next top-level script, each later prompt within the same Ask selects
|
|
50
|
+
* the next correction script, and a non-wrap-up steer is acknowledged but only
|
|
51
|
+
* queued (`queue_update`) — it never plays frames or settles.
|
|
52
|
+
* It never spawns or closes a real Agent process.
|
|
53
|
+
*/
|
|
54
|
+
export declare class FakeTransport implements AgentTransport {
|
|
55
|
+
#private;
|
|
56
|
+
readonly model = "test/model";
|
|
57
|
+
/** Everything the runtime wrote, in order. */
|
|
58
|
+
readonly sent: Frame[];
|
|
59
|
+
readonly asks: AskMarker[];
|
|
60
|
+
constructor(options?: FakeTransportOptions);
|
|
61
|
+
send(frame: Frame): void;
|
|
62
|
+
frames(): AsyncIterable<Frame>;
|
|
63
|
+
beginAsk(marker: AskMarker): undefined;
|
|
64
|
+
finishAsk(): void;
|
|
65
|
+
/** True once the runtime shut this Agent down. */
|
|
66
|
+
get closed(): boolean;
|
|
67
|
+
/** Number of times this fake actually began close work. */
|
|
68
|
+
get closeCalls(): number;
|
|
69
|
+
close(): Promise<AgentStats>;
|
|
70
|
+
/** Simulates the process dying: the frame stream just ends. */
|
|
71
|
+
die(): void;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Loads and parses a named JSONL frame fixture from the runtime fixtures directory.
|
|
75
|
+
*
|
|
76
|
+
* Rejects when the fixture cannot be read or contains an invalid frame.
|
|
77
|
+
*/
|
|
78
|
+
export declare function recordedFrames(name: string): Promise<Frame[]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-Ask frame-gap telemetry: the largest silence between two consecutive
|
|
3
|
+
* Agent frames (ADR-0020 — measure before enforcing idle thresholds).
|
|
4
|
+
*
|
|
5
|
+
* The first gap is measured from prompt send (`start()`) to the first frame;
|
|
6
|
+
* later gaps are inter-arrival. Live-only: Cassette playback creates no tracker,
|
|
7
|
+
* because replayed frames arrive instantly and their gaps mean nothing.
|
|
8
|
+
*/
|
|
9
|
+
export interface FrameGapOptions {
|
|
10
|
+
/** Injectable clock, so tests need no real timers. Defaults to `Date.now`. */
|
|
11
|
+
readonly now?: () => number;
|
|
12
|
+
}
|
|
13
|
+
/** Tracks the maximum inter-frame gap of one Ask. No per-frame allocation. */
|
|
14
|
+
export declare class FrameGapTracker {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(options?: FrameGapOptions);
|
|
17
|
+
/** Marks prompt send. Call once, before the prompt command. */
|
|
18
|
+
start(): void;
|
|
19
|
+
/** Records one frame arrival, widening the maximum gap if this one is larger. */
|
|
20
|
+
observe(): void;
|
|
21
|
+
/** The largest gap observed so far, in milliseconds; 0 when no frame arrived. */
|
|
22
|
+
get maxGapMs(): number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Frame } from "./transport.ts";
|
|
2
|
+
/**
|
|
3
|
+
* A single-consumer queue turning pushed frames into an async iterable.
|
|
4
|
+
*
|
|
5
|
+
* The live transport reads its child's stdout once — intercepting the responses
|
|
6
|
+
* to its own commands — and republishes the rest here, so the layer above sees
|
|
7
|
+
* one ordered stream regardless of when it starts iterating.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FrameQueue {
|
|
10
|
+
#private;
|
|
11
|
+
push(frame: Frame): void;
|
|
12
|
+
/** Ends the stream; the consumer's iteration finishes once drained. */
|
|
13
|
+
end(): void;
|
|
14
|
+
frames(): AsyncGenerator<Frame>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CassetteGit } from "./cassette.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Observes the branch and commit at a cwd without changing repository state.
|
|
4
|
+
*
|
|
5
|
+
* Returns undefined when Git cannot describe a checked-out work tree.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readGitFacts(cwd: string): Promise<CassetteGit | undefined>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AskStalledOutcome } from "./errors.ts";
|
|
2
|
+
import type { Frame } from "./transport.ts";
|
|
3
|
+
/** Fixed time allowed for `agent_settled` to arrive after the idle abort. */
|
|
4
|
+
export declare const IDLE_ABORT_SETTLE_MS = 5000;
|
|
5
|
+
export interface IdleWatchOptions {
|
|
6
|
+
/** Maximum silence, in milliseconds, before escalation starts. */
|
|
7
|
+
readonly idleMs: number;
|
|
8
|
+
readonly command: (frame: Frame) => Promise<boolean>;
|
|
9
|
+
/** Bounded wait for `agent_settled` after the abort; defaults to 5s. */
|
|
10
|
+
readonly abortSettleMs?: number;
|
|
11
|
+
}
|
|
12
|
+
/** Rejection carried by {@link IdleWatch.killed} when abort produced nothing. */
|
|
13
|
+
export declare class IdleKillSignal extends Error {
|
|
14
|
+
readonly outcome: AskStalledOutcome;
|
|
15
|
+
constructor(outcome: AskStalledOutcome);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Per-Ask silence watchdog, a sibling of `AskLimit` (ADR-0020).
|
|
19
|
+
*
|
|
20
|
+
* The timer starts at prompt send and resets on every frame. On expiry it
|
|
21
|
+
* sends `abort` and nothing else — a queued `steer` would be delivered as a new
|
|
22
|
+
* turn the instant abort ends the hung one, and `agent_settled` would never
|
|
23
|
+
* arrive.
|
|
24
|
+
*/
|
|
25
|
+
export declare class IdleWatch {
|
|
26
|
+
#private;
|
|
27
|
+
constructor(options: IdleWatchOptions);
|
|
28
|
+
/** Arms the idle timer immediately before the prompt command is sent. */
|
|
29
|
+
start(): void;
|
|
30
|
+
/** Resets the silence timer; after escalation, watches for `agent_settled`. */
|
|
31
|
+
observe(frame: Frame): void;
|
|
32
|
+
/** Cancels the watch once the Ask settles. Idempotent. */
|
|
33
|
+
settled(): void;
|
|
34
|
+
/** Cancels timers on every other Ask exit path. Idempotent. */
|
|
35
|
+
cleanup(): void;
|
|
36
|
+
/** True once the silence budget expired and escalation began. */
|
|
37
|
+
get tripped(): boolean;
|
|
38
|
+
/** The stalled outcome, once escalation resolved either way. */
|
|
39
|
+
get result(): AskStalledOutcome | null;
|
|
40
|
+
/** Rejects when the abort RPC is refused, mirroring `AskLimit.failed`. */
|
|
41
|
+
get failed(): Promise<never>;
|
|
42
|
+
/** Rejects with an {@link IdleKillSignal} only on the destructive path. */
|
|
43
|
+
get killed(): Promise<never>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type { Cassette, CassetteAgent, CassetteArtifact, CassetteAsk, CassetteGit, CassetteRun, CassetteSink, CassetteSpawn, } from "./cassette.ts";
|
|
2
|
+
export { CASSETTE_VERSION } from "./cassette.ts";
|
|
3
|
+
export { loadCassette } from "./cassette-loader.ts";
|
|
4
|
+
export type { AgentConfig, AgentDefinition } from "./define-agent.ts";
|
|
5
|
+
export { agentDefinitionConfig, defineAgent, isAgentDefinition } from "./define-agent.ts";
|
|
6
|
+
export type { OrchestrationProgram, ProgramDefinition } from "./define-run.ts";
|
|
7
|
+
export { defineRun, isOrchestrationProgram, programDefinition } from "./define-run.ts";
|
|
8
|
+
export type { AskInvalidOutputOutcome, AskLimitKind, AskLimitOutcome, AskStalledOutcome, YaagErrorCode, } from "./errors.ts";
|
|
9
|
+
export { isYaagError, YaagError } from "./errors.ts";
|
|
10
|
+
export type { AgentActivity, AskOutputChannel, EventSink, LifecycleEvent, LifecycleEventBody, NodeState, NodeUsage, StampedEventSink, } from "./events.ts";
|
|
11
|
+
export type { DecodedNode, NodeDecoder } from "./node-decoder.ts";
|
|
12
|
+
export { DEFAULT_NODE_DECODERS } from "./node-decoders.ts";
|
|
13
|
+
export type { NodePath } from "./node-path.ts";
|
|
14
|
+
export { agentAskPath, childPath, sanitizeNodeName } from "./node-path.ts";
|
|
15
|
+
export type { NodeSnapshot } from "./node-tracker.ts";
|
|
16
|
+
export { NodeTracker } from "./node-tracker.ts";
|
|
17
|
+
export { prompt } from "./prompt.ts";
|
|
18
|
+
export { promptGist } from "./prompt-gist.ts";
|
|
19
|
+
export type { ReapPath, ReapTarget } from "./reap.ts";
|
|
20
|
+
export { reap } from "./reap.ts";
|
|
21
|
+
export { recordingTransport } from "./recording-transport.ts";
|
|
22
|
+
export { replayTransport } from "./replay-transport.ts";
|
|
23
|
+
export { resumeTransport } from "./resume-transport.ts";
|
|
24
|
+
export type { RunOptions } from "./run.ts";
|
|
25
|
+
export { executeRun } from "./run.ts";
|
|
26
|
+
export type { RunContext } from "./run-context.ts";
|
|
27
|
+
export type { DiscoveredSkill, SkillProbeFactory } from "./skill-probe.ts";
|
|
28
|
+
export type { AgentInfo, AgentState, AskingAgentInfo, EndedRunSummary, ExitedAgentInfo, IdleAgentInfo, NodeInfo, RunningRunSummary, RunOutcome, RunState, RunSummary, } from "./summary.ts";
|
|
29
|
+
export { applyEvent, initialSummary } from "./summary.ts";
|
|
30
|
+
export type { AgentStats, AgentTransport, AskMarker, AskMarkerContext, AskPlayback, Frame, TokenBreakdown, TransportFactory, TransportStartup, TransportStartupObserver, WorktreeResolution, } from "./transport.ts";
|
|
31
|
+
export type { AskOptions, Handle, SpawnOptions, SpawnOverrides, StructuredAskOptions, ThinkingLevel, } from "./types.ts";
|
|
32
|
+
export { AGENT_NODE_TABLE_MAX, ASK_OUTPUT_FLUSH_INTERVAL_MS, ASK_OUTPUT_MAX_BYTES, ASK_OUTPUT_TRUNCATION_MARKER, NODE_GIST_MAX_CHARS, PROMPT_GIST_MAX_CHARS, TOOL_ARGS_GIST_MAX_CHARS, } from "./wire-constants.ts";
|
|
33
|
+
export { worktreeTransport } from "./worktree-transport.ts";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Frame } from "./transport.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Decodes a byte stream into frames using pi's strict JSONL framing: split on
|
|
4
|
+
* `\n` only, strip a trailing `\r`. A generic line reader is not
|
|
5
|
+
* protocol-compliant, because U+2028/U+2029 are valid inside JSON strings
|
|
6
|
+
* (pi `docs/rpc.md`, framing note).
|
|
7
|
+
*
|
|
8
|
+
* Non-JSON lines and JSON that is not a frame object are skipped rather than
|
|
9
|
+
* thrown on: pi emits undocumented frame types and occasional noise (ticket 01).
|
|
10
|
+
*/
|
|
11
|
+
export declare function decodeFrames(chunks: AsyncIterable<Uint8Array>): AsyncGenerator<Frame>;
|
|
12
|
+
/** Returns null for anything that is not a JSON object with a string `type`. */
|
|
13
|
+
export declare function parseFrame(line: string): Frame | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeDecoder } from "./node-decoder.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Decodes the reference `subagent` tool's `SubagentDetails`: one Nested Node per
|
|
4
|
+
* `results[]` entry, in the order the tool reports them. `exitCode === -1` means
|
|
5
|
+
* "still running" in that tool, so it stays a running node.
|
|
6
|
+
*/
|
|
7
|
+
export declare const subagentNodeDecoder: NodeDecoder;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { NodeDecoder } from "./node-decoder.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Decodes pi-extensible-workflows' progress shape: `details.run.agents[]`, each
|
|
4
|
+
* an `AgentRecord` with a state, an optional structural path, activity and
|
|
5
|
+
* accounting.
|
|
6
|
+
*
|
|
7
|
+
* Tool-name matching is best-effort (spec §3): a workflow tool may register
|
|
8
|
+
* under `workflow` or a `workflow_`-prefixed name, and a tool that matches but
|
|
9
|
+
* reports another shape still yields no nodes. A backgrounded run
|
|
10
|
+
* carries no `run`, so it yields no nodes — its facts leave the RPC stream.
|
|
11
|
+
*/
|
|
12
|
+
export declare const workflowNodeDecoder: NodeDecoder;
|