@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,21 @@
|
|
|
1
|
+
import type { NodeState, NodeUsage } from "./events.ts";
|
|
2
|
+
/** One decoded Nested Node, relative to the tool call that produced it. */
|
|
3
|
+
export interface DecodedNode {
|
|
4
|
+
/** Names from the tool call downwards, e.g. `["test-writer", "1", "fixture-gen"]`. */
|
|
5
|
+
readonly segments: readonly string[];
|
|
6
|
+
readonly state: NodeState;
|
|
7
|
+
readonly activityGist?: string;
|
|
8
|
+
readonly usage?: NodeUsage;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Knows one nesting tool's detail shape.
|
|
12
|
+
*
|
|
13
|
+
* `matches` is best-effort tool-name matching, not a protocol guarantee, so an
|
|
14
|
+
* unrecognised tool yields no decoder and therefore no nodes. `decode` returns
|
|
15
|
+
* null when the details do not carry this tool's shape, and never throws.
|
|
16
|
+
*/
|
|
17
|
+
export interface NodeDecoder {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
matches(toolName: string): boolean;
|
|
20
|
+
decode(details: unknown): readonly DecodedNode[] | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NodeUsage } from "./events.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Reading untrusted nesting-tool detail payloads. Every decoder narrows from
|
|
4
|
+
* `unknown` through here, so a malformed payload is skipped, never thrown on.
|
|
5
|
+
*/
|
|
6
|
+
/** Narrows a detail payload to a plain object, the shape every decoder needs. */
|
|
7
|
+
export declare function isRecord(value: unknown): value is Readonly<Record<string, unknown>>;
|
|
8
|
+
/**
|
|
9
|
+
* Flattens decoded text to one capped line for a Nested Node's `activityGist`.
|
|
10
|
+
* Prompts never reach this function (ticket 09).
|
|
11
|
+
*/
|
|
12
|
+
export declare function nodeGist(value: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Reads one nesting tool's accounting record into a Nested Node's `usage`.
|
|
15
|
+
*
|
|
16
|
+
* `NodeUsage` holds optional facts, so this function emits validated facts
|
|
17
|
+
* only. It emits a token breakdown when all four counts are finite and not
|
|
18
|
+
* negative, and it emits a cost when the cost is finite and not negative. It
|
|
19
|
+
* emits each fact independently, and it returns `undefined` when the record
|
|
20
|
+
* holds no valid fact. It never reports a missing or malformed field as zero.
|
|
21
|
+
*/
|
|
22
|
+
export declare function nodeUsage(value: unknown): NodeUsage | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Nested Node path grammar `name(:askIndex(/childName…))` (spec §1).
|
|
3
|
+
*
|
|
4
|
+
* The Ask index is the wire index carried by `ask_start.index` — 0-based, so a
|
|
5
|
+
* path always equals a fact already on the wire. Renderers keep displaying
|
|
6
|
+
* `#index + 1`; they never re-derive identity from the display form.
|
|
7
|
+
*/
|
|
8
|
+
/** One Nested Node's identity, e.g. `dev:3/test-writer:1/fixture-gen`. */
|
|
9
|
+
export type NodePath = string;
|
|
10
|
+
/** Builds the path of one Agent's Ask from its name and the wire Ask index. */
|
|
11
|
+
export declare function agentAskPath(agent: string, askIndex: number): NodePath;
|
|
12
|
+
/** Appends one child segment below a parent path, sanitizing the child name. */
|
|
13
|
+
export declare function childPath(parent: NodePath, childName: string): NodePath;
|
|
14
|
+
/**
|
|
15
|
+
* Removes the path separators `:` and `/`, control characters, and newlines
|
|
16
|
+
* from an untrusted node name, so a decoded name cannot forge another node's
|
|
17
|
+
* path. Returns `node` when nothing printable remains.
|
|
18
|
+
*/
|
|
19
|
+
export declare function sanitizeNodeName(name: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { NodeState, NodeUsage } from "./events.ts";
|
|
2
|
+
import type { NodeDecoder } from "./node-decoder.ts";
|
|
3
|
+
import type { Frame } from "./transport.ts";
|
|
4
|
+
/** One Nested Node observation, relative to the tool call that produced it. */
|
|
5
|
+
export interface NodeSnapshot {
|
|
6
|
+
readonly segments: readonly string[];
|
|
7
|
+
readonly state: NodeState;
|
|
8
|
+
readonly activityGist?: string;
|
|
9
|
+
readonly usage?: NodeUsage;
|
|
10
|
+
}
|
|
11
|
+
export interface NodeTrackerOptions {
|
|
12
|
+
readonly report: (node: NodeSnapshot) => void;
|
|
13
|
+
readonly decoders?: readonly NodeDecoder[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reports Nested Node snapshots decoded from an Agent's own `tool_execution_*`
|
|
17
|
+
* frames — a sibling of `AskActivityTracker`, above the transport seam, so it
|
|
18
|
+
* knows frames only (architecture §2).
|
|
19
|
+
*
|
|
20
|
+
* Coalescing is dedupe-only, with no timer: a snapshot is reported only when it
|
|
21
|
+
* differs from the last one reported for that node. That keeps the event stream
|
|
22
|
+
* a pure function of the frames, so a Cassette replay re-derives it exactly
|
|
23
|
+
* (ADR-0013).
|
|
24
|
+
*/
|
|
25
|
+
export declare class NodeTracker {
|
|
26
|
+
#private;
|
|
27
|
+
constructor(options: NodeTrackerOptions);
|
|
28
|
+
/** Inspects one Agent frame and ignores malformed or unsupported shapes. */
|
|
29
|
+
observe(frame: Frame): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentStats, Frame, OpenOptions } from "./transport.ts";
|
|
2
|
+
/** The command line for one Agent. */
|
|
3
|
+
export declare function piCommand(options: OpenOptions, toolProbeExtensionPath?: string): string[];
|
|
4
|
+
/**
|
|
5
|
+
* `provider/id` from a `get_state` response — what the Agent actually resolved
|
|
6
|
+
* to, not the pattern that was requested. Null when the payload has no model.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readModel(response: Frame): string | null;
|
|
9
|
+
/** Returns pi's persisted session path from a startup `get_state` response, when valid. */
|
|
10
|
+
export declare function readSessionFile(response: Frame): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The full token breakdown and cost from a `get_session_stats` response.
|
|
13
|
+
* Missing fields become null rather than 0, so "unknown" and "free" stay
|
|
14
|
+
* distinguishable (ADR-0012); a partial breakdown is treated as unknown.
|
|
15
|
+
*/
|
|
16
|
+
export declare function readStats(response: Frame): AgentStats;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Condenses an Ask prompt for the `ask_start` Lifecycle Event.
|
|
3
|
+
*
|
|
4
|
+
* Selects the first non-blank line, collapses its whitespace, and caps it at
|
|
5
|
+
* `PROMPT_GIST_MAX_CHARS`; it never includes content from later lines. Returns
|
|
6
|
+
* `""` for an all-whitespace prompt and never throws.
|
|
7
|
+
*/
|
|
8
|
+
export declare function promptGist(prompt: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders an indented template literal as a clean prompt string.
|
|
3
|
+
*
|
|
4
|
+
* Dedents static template text only and inserts interpolated values verbatim.
|
|
5
|
+
* Strings pass through, numbers and booleans stringify, and arrays render their
|
|
6
|
+
* items recursively separated by newlines. Throws `TypeError` for unsupported
|
|
7
|
+
* values or static indentation that mixes tabs and spaces.
|
|
8
|
+
*/
|
|
9
|
+
export declare function prompt(strings: TemplateStringsArray, ...values: unknown[]): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The process facts reaping needs. Kept behind an interface so it is testable. */
|
|
2
|
+
export interface ReapTarget {
|
|
3
|
+
/** Resolves when the Agent's process is gone. */
|
|
4
|
+
readonly exited: Promise<unknown>;
|
|
5
|
+
/** Close the Agent's stdin. */
|
|
6
|
+
endStdin(): void;
|
|
7
|
+
/** SIGTERM to the pid — pi handles it and still reaps its own children. */
|
|
8
|
+
terminate(): void;
|
|
9
|
+
/** SIGKILL to the process group. Last resort; may leak bash-tool children. */
|
|
10
|
+
destroyGroup(): void;
|
|
11
|
+
}
|
|
12
|
+
export type ReapPath = "stdin-close" | "sigterm" | "sigkill";
|
|
13
|
+
/**
|
|
14
|
+
* Shuts an Agent down (ticket 02's shutdown contract).
|
|
15
|
+
*
|
|
16
|
+
* Repeated requests for the same process share the initial attempt and its
|
|
17
|
+
* outcome. stdin EOF first, because pi's graceful shutdown is the only thing
|
|
18
|
+
* that reaps the bash-tool children it spawned into their own process groups —
|
|
19
|
+
* a group SIGKILL kills pi and leaves the user's `npm run dev` running. SIGINT
|
|
20
|
+
* is never sent: RPC mode registers SIGTERM and SIGHUP only.
|
|
21
|
+
*/
|
|
22
|
+
export declare function reap(target: ReapTarget, graceMs?: number): Promise<ReapPath>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CassetteSink } from "./cassette.ts";
|
|
2
|
+
import type { TransportFactory } from "./transport.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Wraps a transport factory and records frames at the public transport seam.
|
|
5
|
+
*
|
|
6
|
+
* Delegation is unchanged; failures from the wrapped factory and transport are
|
|
7
|
+
* preserved. The supplied sink holds the artifact until its owner serializes it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function recordingTransport(inner: TransportFactory, sink: CassetteSink): TransportFactory;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CassetteAgent } from "./cassette.ts";
|
|
2
|
+
import type { AskMarker, OpenOptions } from "./transport.ts";
|
|
3
|
+
/** A pure description of the first strict replay identity mismatch. */
|
|
4
|
+
export interface ReplayMismatch {
|
|
5
|
+
readonly kind: "unexpected-spawn" | "spawn-options" | "changed-ask" | "extra-ask";
|
|
6
|
+
readonly agent: string;
|
|
7
|
+
readonly index?: number;
|
|
8
|
+
readonly expectedHash: string;
|
|
9
|
+
readonly actualHash: string;
|
|
10
|
+
readonly definitionName?: string;
|
|
11
|
+
readonly changedFields?: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
/** Pure identity comparisons that ADR-0014 can reuse with a lenient reaction. */
|
|
14
|
+
export declare const replayMismatch: {
|
|
15
|
+
spawn(expected: CassetteAgent | null, actual: OpenOptions): ReplayMismatch | null;
|
|
16
|
+
ask(agent: CassetteAgent, cursor: number, actual: AskMarker): ReplayMismatch | null;
|
|
17
|
+
};
|
|
18
|
+
/** Converts a detected mismatch into strict replay's public failure. */
|
|
19
|
+
export declare function strictReplay(mismatch: ReplayMismatch): never;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Cassette } from "./cassette.ts";
|
|
2
|
+
import type { TransportFactory } from "./transport.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a strict Cassette-backed transport factory without starting pi.
|
|
5
|
+
*
|
|
6
|
+
* Each opened transport owns its Ask and frame cursors, so independent Agents
|
|
7
|
+
* may replay their recorded conversations in a different interleaving.
|
|
8
|
+
*/
|
|
9
|
+
export declare function replayTransport(cassette: Cassette): TransportFactory;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CassetteAgent } from "./cassette.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Validates that a recorded Agent can safely continue from its persisted session.
|
|
4
|
+
*
|
|
5
|
+
* Rejects with RESUME_REFUSED before replaying any frames when its session or
|
|
6
|
+
* working-tree facts cannot establish the recorded continuation point.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkResumePreconditions(agent: CassetteAgent): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Cassette } from "./cassette.ts";
|
|
2
|
+
import type { TransportFactory } from "./transport.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a Cassette-prefix transport that continues with live pi at divergence.
|
|
5
|
+
*
|
|
6
|
+
* Matched Agents validate their recorded continuation point before replaying.
|
|
7
|
+
* Spawn mismatches intentionally bypass those checks and start a fresh Agent.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resumeTransport(cassette: Cassette, live: TransportFactory): TransportFactory;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CassetteCollector } from "./cassette.ts";
|
|
2
|
+
import type { RunOutcome } from "./events.ts";
|
|
3
|
+
/**
|
|
4
|
+
* One Run's publication request: what settled, what it collected, and where the
|
|
5
|
+
* artifact may go. `record` wins over `checkpointDir`; a Run that neither
|
|
6
|
+
* recorded nor stopped publishes nothing.
|
|
7
|
+
*/
|
|
8
|
+
export interface RunCheckpointOptions {
|
|
9
|
+
/** Terminal outcome of the Run; only `stopped` publishes without `record`. */
|
|
10
|
+
readonly outcome: RunOutcome;
|
|
11
|
+
readonly collector: CassetteCollector;
|
|
12
|
+
/** Explicit `--record` destination; overrides the default checkpoint directory. */
|
|
13
|
+
readonly record: string | undefined;
|
|
14
|
+
/** Already-resolved default directory a stopped Run publishes into. */
|
|
15
|
+
readonly checkpointDir: string;
|
|
16
|
+
/** Program entry point recorded as invocation identity; omitted when unknown. */
|
|
17
|
+
readonly programFile: string | undefined;
|
|
18
|
+
readonly args: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Publishes the collected Cassette when the Run must be restorable: always under
|
|
22
|
+
* `--record`, and additionally into the checkpoint directory when the Run
|
|
23
|
+
* stopped (ADR-0021/0024). Returns the error that must become the Run's outcome,
|
|
24
|
+
* or null when there was nothing to publish or a primary program error owns it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function publishRunCheckpoint(options: RunCheckpointOptions): Promise<unknown | null>;
|
|
27
|
+
/** Reports a secondary Cassette publication failure without displacing the Run's primary error. */
|
|
28
|
+
export declare function writeRecordingDiagnostic(error: unknown): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentDefinition } from "./define-agent.ts";
|
|
2
|
+
import type { Handle, SpawnOptions, SpawnOverrides } from "./types.ts";
|
|
3
|
+
/** What an Orchestration Program is handed. */
|
|
4
|
+
export interface RunContext<Args = unknown> {
|
|
5
|
+
/** Program arguments, validated when the program declares a schema (ADR-0010). */
|
|
6
|
+
readonly args: Args;
|
|
7
|
+
/**
|
|
8
|
+
* Starts an Agent and resolves once it is confirmed up.
|
|
9
|
+
*
|
|
10
|
+
* Waits on a `get_state` round-trip, so a bad model fails here, before any
|
|
11
|
+
* tokens are spent. Killed automatically when the Run ends. Worktrees survive
|
|
12
|
+
* the Run and are never managed after creation. Definitions own policy;
|
|
13
|
+
* spawn overrides own topology. Runtime callers are validated even when they
|
|
14
|
+
* bypass TypeScript.
|
|
15
|
+
*/
|
|
16
|
+
spawn(options?: SpawnOptions): Promise<Handle>;
|
|
17
|
+
spawn(definition: AgentDefinition, overrides?: SpawnOverrides): Promise<Handle>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Cassette, CassetteCollector } from "./cassette.ts";
|
|
2
|
+
import { type OrchestrationProgram } from "./define-run.ts";
|
|
3
|
+
import type { StampedEventSink } from "./events.ts";
|
|
4
|
+
import { type SkillProbeFactory } from "./skill-probe.ts";
|
|
5
|
+
import type { TransportFactory } from "./transport.ts";
|
|
6
|
+
export interface RunOptions {
|
|
7
|
+
/** Where Agents come from. Defaults to real `pi --mode rpc` processes. */
|
|
8
|
+
readonly transport?: TransportFactory;
|
|
9
|
+
readonly events?: StampedEventSink;
|
|
10
|
+
/** Delivered as `ctx.args`; validated when the program declares an args schema (ADR-0010). */
|
|
11
|
+
readonly args?: unknown;
|
|
12
|
+
/** Session storage directory for every Agent of this Run (ticket 06). */
|
|
13
|
+
readonly sessionDir?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Absolute Orchestration Program source path used to resolve portable relative
|
|
16
|
+
* extension declarations. This is Run context, never an Agent working directory.
|
|
17
|
+
*/
|
|
18
|
+
readonly programFile?: string;
|
|
19
|
+
/** Resolves pi's enabled skills for live restriction requests. */
|
|
20
|
+
readonly skillProbe?: SkillProbeFactory;
|
|
21
|
+
/** Write every public transport-seam frame once the Run settles. */
|
|
22
|
+
readonly record?: string;
|
|
23
|
+
/** Re-run against this versioned Cassette instead of opening a live transport. */
|
|
24
|
+
readonly replay?: string;
|
|
25
|
+
/** Replay a matching Cassette prefix, then continue live from its session. */
|
|
26
|
+
readonly resume?: string;
|
|
27
|
+
/** Ends the Run early; every Agent is still reaped and costed. */
|
|
28
|
+
readonly signal?: AbortSignal;
|
|
29
|
+
/** Overrides the default checkpoint directory a stopped Run publishes into (ADR-0021). */
|
|
30
|
+
readonly checkpointDir?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Executes one Orchestration Program and resolves with its return value.
|
|
34
|
+
*
|
|
35
|
+
* Every Agent is dead by the time this settles — on success, on failure, and on
|
|
36
|
+
* abort (ADR-0002) — and every Agent's cost has been emitted. Rejects with
|
|
37
|
+
* ARGS_INVALID before emitting an event when declared argument schema validation fails.
|
|
38
|
+
*/
|
|
39
|
+
export declare function executeRun<Args, Result>(program: OrchestrationProgram<Args, Result>, options?: RunOptions): Promise<Result>;
|
|
40
|
+
/**
|
|
41
|
+
* Inputs that select the Run's transport composition. The collector receives
|
|
42
|
+
* every frame from every Run. Replay and resume hold the loaded Cassettes, or
|
|
43
|
+
* null when the Run does not use them.
|
|
44
|
+
*/
|
|
45
|
+
export interface FactorySelection {
|
|
46
|
+
readonly options: RunOptions;
|
|
47
|
+
readonly collector: CassetteCollector;
|
|
48
|
+
readonly replay: Cassette | null;
|
|
49
|
+
readonly resume: Cassette | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Composes the Run's transport. Strict replay deliberately bypasses the
|
|
53
|
+
* worktree wrapper; resume retains its worktree-wrapped live side for unmatched
|
|
54
|
+
* spawns (ADR-0013). The live order is worktree → skill restriction → live, so
|
|
55
|
+
* skill discovery occurs in the resolved worktree cwd.
|
|
56
|
+
*
|
|
57
|
+
* The recorder is the outermost wrapper of every composition, replay included:
|
|
58
|
+
* it observes only, and never changes delegation (ADR-0013/0021).
|
|
59
|
+
*/
|
|
60
|
+
export declare function selectFactory(selection: FactorySelection): TransportFactory;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** One enabled skill reported by pi's `get_commands` response. */
|
|
2
|
+
export interface DiscoveredSkill {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
/** True when an extension injects the skill after `--no-skills` is processed. */
|
|
6
|
+
readonly extensionInjected: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Cwd-scoped skill discovery seam, separate from long-lived Agent transports. */
|
|
9
|
+
export interface SkillProbeFactory {
|
|
10
|
+
probe(cwd: string): Promise<readonly DiscoveredSkill[]>;
|
|
11
|
+
}
|
|
12
|
+
/** The stdin operations owned by one short-lived skill discovery process. */
|
|
13
|
+
export interface SkillProbeStdin {
|
|
14
|
+
write(input: string): void;
|
|
15
|
+
flush(): void;
|
|
16
|
+
end(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The short-lived process boundary used only while discovering skills.
|
|
20
|
+
*
|
|
21
|
+
* `probe()` always ends stdin, escalates to SIGKILL when needed, and awaits
|
|
22
|
+
* `exited`; implementations must make `exited` settle once the child is reaped.
|
|
23
|
+
*/
|
|
24
|
+
export interface SkillProbeProcess {
|
|
25
|
+
readonly stdin: SkillProbeStdin;
|
|
26
|
+
readonly stdout: ReadableStream<Uint8Array>;
|
|
27
|
+
readonly exited: Promise<number>;
|
|
28
|
+
kill(signal: "SIGKILL"): void;
|
|
29
|
+
}
|
|
30
|
+
/** Creates a short-lived discovery process in the supplied child cwd. */
|
|
31
|
+
export interface SkillProbeProcessFactory {
|
|
32
|
+
create(cwd: string): SkillProbeProcess;
|
|
33
|
+
}
|
|
34
|
+
/** Injectable timings for a short-lived skill discovery process. */
|
|
35
|
+
export interface SkillProbeTimings {
|
|
36
|
+
readonly responseTimeoutMs?: number;
|
|
37
|
+
readonly cleanupGraceMs?: number;
|
|
38
|
+
}
|
|
39
|
+
/** The fixed process configuration used by pi's short-lived discovery adapter. */
|
|
40
|
+
export interface SkillProbeSpawnOptions {
|
|
41
|
+
readonly cmd: readonly string[];
|
|
42
|
+
readonly cwd: string;
|
|
43
|
+
readonly stdin: "pipe";
|
|
44
|
+
readonly stdout: "pipe";
|
|
45
|
+
readonly stderr: "ignore";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parses pi's successful `get_commands` response into pi-compatible skill names.
|
|
49
|
+
*
|
|
50
|
+
* Rejects malformed skill entries instead of claiming a restriction was enforced.
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseSkillCommands(response: unknown): readonly DiscoveredSkill[];
|
|
53
|
+
/** Wraps a process constructor as the narrow discovery-process factory seam. */
|
|
54
|
+
export declare function createSkillProbeProcessFactory(create: (cwd: string) => SkillProbeProcess): SkillProbeProcessFactory;
|
|
55
|
+
/**
|
|
56
|
+
* Adapts a pi process spawner to the discovery-process seam.
|
|
57
|
+
*
|
|
58
|
+
* It always starts `pi --mode rpc --no-session` with piped stdin/stdout so a
|
|
59
|
+
* probe is isolated from an Agent's long-lived transport.
|
|
60
|
+
*/
|
|
61
|
+
export declare function createBunSkillProbeProcessFactory(spawn: (options: SkillProbeSpawnOptions) => SkillProbeProcess): SkillProbeProcessFactory;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a short-lived pi skill discovery probe.
|
|
64
|
+
*
|
|
65
|
+
* Rejects when pi exits, emits malformed output, or misses the response timeout.
|
|
66
|
+
* Every outcome ends stdin, escalates to SIGKILL after the cleanup grace period,
|
|
67
|
+
* and waits for process reaping before this method settles.
|
|
68
|
+
*/
|
|
69
|
+
export declare function createSkillProbe(processFactory: SkillProbeProcessFactory, timings?: SkillProbeTimings): SkillProbeFactory;
|
|
70
|
+
/** The production skill probe, backed by Bun's short-lived pi process. */
|
|
71
|
+
export declare const liveSkillProbe: SkillProbeFactory;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillProbeFactory } from "./skill-probe.ts";
|
|
2
|
+
import type { TransportFactory } from "./transport.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Restricts live Agent skills by resolving pi's enabled names before startup.
|
|
5
|
+
*
|
|
6
|
+
* The cache belongs to one Run: concurrent requests for one cwd share its probe.
|
|
7
|
+
*/
|
|
8
|
+
export declare function skillRestrictionTransport(inner: TransportFactory, probe: SkillProbeFactory): TransportFactory;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Agent } from "./agent.ts";
|
|
2
|
+
import type { EventSink } from "./events.ts";
|
|
3
|
+
import type { RunContext } from "./run-context.ts";
|
|
4
|
+
import type { TransportFactory } from "./transport.ts";
|
|
5
|
+
/** Dependencies for one Run's Agent-spawn gate. */
|
|
6
|
+
export interface SpawnDependencies {
|
|
7
|
+
readonly factory: TransportFactory;
|
|
8
|
+
readonly agents: Agent[];
|
|
9
|
+
readonly emit: EventSink;
|
|
10
|
+
readonly sessionDir: string | undefined;
|
|
11
|
+
readonly programFile: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** A RunContext spawn function that can synchronously stop accepting new Agents. */
|
|
14
|
+
export interface SpawnGate {
|
|
15
|
+
readonly spawn: RunContext["spawn"];
|
|
16
|
+
close(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Builds the Run-scoped Agent spawn gate.
|
|
20
|
+
*
|
|
21
|
+
* Allocates unique names within one Run and rejects with RUN_CLOSED once closed.
|
|
22
|
+
* Successfully opened Agents are registered immediately so Run cleanup reaps them.
|
|
23
|
+
*/
|
|
24
|
+
export declare function makeSpawn(deps: SpawnDependencies): SpawnGate;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { AgentActivity } from "./events.ts";
|
|
2
|
+
import type { NodeInfo } from "./summary-nodes.ts";
|
|
3
|
+
import type { TokenBreakdown, WorktreeResolution } from "./transport.ts";
|
|
4
|
+
export type { AgentActivity } from "./events.ts";
|
|
5
|
+
export type { NodeInfo } from "./summary-nodes.ts";
|
|
6
|
+
/** The observer-facing lifecycle state of an Agent. */
|
|
7
|
+
export type AgentState = "idle" | "asking" | "exited";
|
|
8
|
+
/** Identity and accounting facts that apply in every observer Agent state. */
|
|
9
|
+
interface AgentInfoBase {
|
|
10
|
+
readonly model: string | null;
|
|
11
|
+
readonly cwd: string | null;
|
|
12
|
+
readonly branch: string | null;
|
|
13
|
+
/** pi's session file for this Agent, when the spawn reported one; a Peek reads it. */
|
|
14
|
+
readonly sessionFile: string | null;
|
|
15
|
+
readonly activity: AgentActivity | null;
|
|
16
|
+
readonly tokens: TokenBreakdown | null;
|
|
17
|
+
readonly cost: number | null;
|
|
18
|
+
readonly incomplete: boolean;
|
|
19
|
+
readonly stateChangedAt: number | null;
|
|
20
|
+
/** Timestamp ordering only cumulative live accounting, never lifecycle state. */
|
|
21
|
+
readonly usageUpdatedAt: number | null;
|
|
22
|
+
readonly askStartedAt: number | null;
|
|
23
|
+
/** This Agent's bounded Nested Node table, in first-seen order (spec §3). */
|
|
24
|
+
readonly nodes: readonly NodeInfo[];
|
|
25
|
+
/** Exited Nested Nodes dropped to keep the table bounded. */
|
|
26
|
+
readonly finishedNodesPruned: number;
|
|
27
|
+
}
|
|
28
|
+
/** An Agent between Asks; its latest settled Ask identity, if any, is retained. */
|
|
29
|
+
export interface IdleAgentInfo extends AgentInfoBase {
|
|
30
|
+
readonly state: "idle";
|
|
31
|
+
readonly askIndex: number | null;
|
|
32
|
+
readonly promptGist: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** An Agent with one active Ask, whose identity and start timestamp are known. */
|
|
35
|
+
export interface AskingAgentInfo extends AgentInfoBase {
|
|
36
|
+
readonly state: "asking";
|
|
37
|
+
readonly askIndex: number;
|
|
38
|
+
readonly promptGist: string;
|
|
39
|
+
/** Whether the active Ask is served from Cassette playback. */
|
|
40
|
+
readonly replayed: boolean;
|
|
41
|
+
/** Null only for a legacy unstamped Ask start; no timestamp is synthesized. */
|
|
42
|
+
readonly askStartedAt: number | null;
|
|
43
|
+
}
|
|
44
|
+
/** A terminal Agent observation retaining its final usage and latest Ask identity. */
|
|
45
|
+
export interface ExitedAgentInfo extends AgentInfoBase {
|
|
46
|
+
readonly state: "exited";
|
|
47
|
+
readonly askIndex: number | null;
|
|
48
|
+
readonly promptGist: string | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The discriminated observer projection for one Agent.
|
|
52
|
+
*
|
|
53
|
+
* Transition helpers below are pure and clock-free. Stamped state events older
|
|
54
|
+
* than the folded state are ignored; unstamped legacy events use stream order.
|
|
55
|
+
*/
|
|
56
|
+
export type AgentInfo = IdleAgentInfo | AskingAgentInfo | ExitedAgentInfo;
|
|
57
|
+
/** Internal fold record, deliberately identical to the public observer projection. */
|
|
58
|
+
export type AgentRecord = AgentInfo;
|
|
59
|
+
/** Cumulative assistant-completion usage observed while an Agent is still live. */
|
|
60
|
+
export interface AgentUsageObservation {
|
|
61
|
+
readonly tokens: TokenBreakdown;
|
|
62
|
+
readonly cost: number;
|
|
63
|
+
}
|
|
64
|
+
/** Final usage and optional worktree identity reported when an Agent exits. */
|
|
65
|
+
export interface AgentExitObservation {
|
|
66
|
+
readonly tokens: TokenBreakdown | null;
|
|
67
|
+
readonly cost: number | null;
|
|
68
|
+
readonly incomplete: boolean;
|
|
69
|
+
readonly worktree?: WorktreeResolution;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reconciles spawn identity without reopening a terminal Agent or losing facts
|
|
73
|
+
* learned from a prior exit. A late spawn fills only missing identity fields.
|
|
74
|
+
*/
|
|
75
|
+
export declare function spawnAgent(current: AgentRecord | undefined, identity: {
|
|
76
|
+
readonly model: string;
|
|
77
|
+
readonly cwd: string;
|
|
78
|
+
readonly branch?: string;
|
|
79
|
+
readonly sessionFile?: string;
|
|
80
|
+
}, at: number | null): AgentRecord;
|
|
81
|
+
/**
|
|
82
|
+
* Folds an Ask start into the asking arm when it is not older than the folded
|
|
83
|
+
* Agent state or Ask identity. Legacy unstamped events retain arrival order.
|
|
84
|
+
*/
|
|
85
|
+
export declare function startAsk(current: AgentRecord | undefined, ask: {
|
|
86
|
+
readonly index: number;
|
|
87
|
+
readonly promptGist: string;
|
|
88
|
+
readonly replayed: boolean;
|
|
89
|
+
}, at: number | null): AgentRecord;
|
|
90
|
+
/**
|
|
91
|
+
* Folds an Ask-scoped activity only into its current asking Agent. Older stamped
|
|
92
|
+
* observations, mismatched Ask identities, and terminal states are ignored.
|
|
93
|
+
*/
|
|
94
|
+
export declare function setActivity(current: AgentRecord | undefined, index: number, activity: AgentActivity, at: number | null): AgentRecord;
|
|
95
|
+
/**
|
|
96
|
+
* Folds an Ask settlement into the idle arm, retaining the settled Ask identity.
|
|
97
|
+
* Older stamped events are ignored and legacy unstamped events use stream order.
|
|
98
|
+
*/
|
|
99
|
+
export declare function endAsk(current: AgentRecord | undefined, index: number, at: number | null): AgentRecord;
|
|
100
|
+
/**
|
|
101
|
+
* Folds a cumulative usage snapshot without changing Agent lifecycle state.
|
|
102
|
+
*
|
|
103
|
+
* Terminal Agent accounting is never replaced; equal usage timestamps retain
|
|
104
|
+
* stream order while older stamped observations are ignored.
|
|
105
|
+
*/
|
|
106
|
+
export declare function setUsage(current: AgentRecord | undefined, observation: AgentUsageObservation, at: number | null): AgentRecord;
|
|
107
|
+
/**
|
|
108
|
+
* Folds authoritative shutdown accounting into the terminal Agent state.
|
|
109
|
+
*
|
|
110
|
+
* Worktree identity is enriched even when a stale exit cannot alter state or
|
|
111
|
+
* usage, so late observations remain useful.
|
|
112
|
+
*/
|
|
113
|
+
export declare function exitAgent(current: AgentRecord | undefined, observation: AgentExitObservation, at: number | null): AgentRecord;
|
|
114
|
+
/**
|
|
115
|
+
* Computes Run-wide accounting from every Agent's newest snapshot. A live Agent
|
|
116
|
+
* without an assistant completion contributes zero; an exited Agent without
|
|
117
|
+
* final stats preserves the established unknown-accounting semantics.
|
|
118
|
+
*/
|
|
119
|
+
export declare function totalsFromAgents(agents: Readonly<Record<string, AgentRecord>>): {
|
|
120
|
+
readonly cost: number;
|
|
121
|
+
readonly tokens: TokenBreakdown | null;
|
|
122
|
+
readonly incomplete: boolean;
|
|
123
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LifecycleEventBody, NodeState } from "./events.ts";
|
|
2
|
+
import type { AgentRecord } from "./summary-agent.ts";
|
|
3
|
+
import type { TokenBreakdown } from "./transport.ts";
|
|
4
|
+
/** One Nested Node's folded row in an Agent's bounded node table. */
|
|
5
|
+
export interface NodeInfo {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly state: NodeState;
|
|
8
|
+
readonly activityGist: string | null;
|
|
9
|
+
readonly tokens: TokenBreakdown | null;
|
|
10
|
+
readonly cost: number | null;
|
|
11
|
+
readonly updatedAt: number | null;
|
|
12
|
+
}
|
|
13
|
+
type NodeUpdateEvent = Extract<LifecycleEventBody, {
|
|
14
|
+
readonly type: "node_update";
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Folds one `node_update` into an Agent's bounded node table.
|
|
18
|
+
*
|
|
19
|
+
* Rows upsert by path and keep first-seen order. A stamped update older than
|
|
20
|
+
* the folded row is ignored, mirroring `setActivity`. Past
|
|
21
|
+
* `AGENT_NODE_TABLE_MAX` rows, exited nodes prune oldest-first into
|
|
22
|
+
* `finishedNodesPruned`. Running nodes are never pruned, so the table retains
|
|
23
|
+
* at most `max(AGENT_NODE_TABLE_MAX, simultaneously running node count)` rows:
|
|
24
|
+
* the row count is unbounded if upstream concurrency is unbounded. Only each
|
|
25
|
+
* row's snapshot size is bounded (spec §3).
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyNodeUpdate(agent: AgentRecord, event: NodeUpdateEvent, at: number | null): AgentRecord;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { LifecycleEvent, LifecycleEventBody, RunOutcome } from "./events.ts";
|
|
2
|
+
import type { AgentInfo } from "./summary-agent.ts";
|
|
3
|
+
import type { TokenBreakdown } from "./transport.ts";
|
|
4
|
+
export type { NodeState, NodeUsage, RunOutcome } from "./events.ts";
|
|
5
|
+
export type { AgentActivity, AgentInfo, AgentState, AskingAgentInfo, ExitedAgentInfo, IdleAgentInfo, NodeInfo, } from "./summary-agent.ts";
|
|
6
|
+
/** The observer-facing lifecycle state of a Run. */
|
|
7
|
+
export type RunState = "running" | "ended";
|
|
8
|
+
/** Accounting and identity facts shared by all Run observer states. */
|
|
9
|
+
interface RunSummaryBase {
|
|
10
|
+
readonly program: string;
|
|
11
|
+
readonly startedAt: number | null;
|
|
12
|
+
readonly agents: Readonly<Record<string, AgentInfo>>;
|
|
13
|
+
readonly asksStarted: number;
|
|
14
|
+
readonly asksSettled: number;
|
|
15
|
+
readonly cost: number;
|
|
16
|
+
readonly tokens: TokenBreakdown | null;
|
|
17
|
+
readonly incomplete: boolean;
|
|
18
|
+
readonly durationMs: number;
|
|
19
|
+
readonly worstFrameGapMs: number;
|
|
20
|
+
}
|
|
21
|
+
/** A Run that has not settled; it has neither outcome nor compatibility result. */
|
|
22
|
+
export interface RunningRunSummary extends RunSummaryBase {
|
|
23
|
+
readonly runState: "running";
|
|
24
|
+
readonly outcome: null;
|
|
25
|
+
readonly ok: null;
|
|
26
|
+
}
|
|
27
|
+
/** A settled Run with its outcome, compatibility result, and ending event time. */
|
|
28
|
+
export interface EndedRunSummary extends RunSummaryBase {
|
|
29
|
+
readonly runState: "ended";
|
|
30
|
+
readonly outcome: RunOutcome;
|
|
31
|
+
readonly ok: boolean;
|
|
32
|
+
/** The `run_end.at` event fact used to reject strictly older stamped endings. */
|
|
33
|
+
readonly endedAt: number | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The pure, discriminated observer fold of a Run's Lifecycle Events.
|
|
37
|
+
*
|
|
38
|
+
* It stores event facts only, reads no clock, and never synthesizes durations:
|
|
39
|
+
* `run_end.durationMs` is authoritative. Unknown events are no-ops. Stamped
|
|
40
|
+
* state events use timestamp order (ties retain stream order); legacy unstamped
|
|
41
|
+
* bodies use arrival order because no timestamp can be compared.
|
|
42
|
+
*/
|
|
43
|
+
export type RunSummary = RunningRunSummary | EndedRunSummary;
|
|
44
|
+
/** Returns the deterministic, running Summary for a Run that emitted nothing. */
|
|
45
|
+
export declare function initialSummary(): RunningRunSummary;
|
|
46
|
+
/**
|
|
47
|
+
* Folds one Lifecycle Event into a fresh Summary without mutating either input.
|
|
48
|
+
*
|
|
49
|
+
* A stamped `run_end` older than the folded terminal timestamp is a no-op;
|
|
50
|
+
* equal times retain stream order. Legacy unstamped endings retain arrival order
|
|
51
|
+
* and may replace a stamped ending because no ordering fact exists. A late
|
|
52
|
+
* `run_start` enriches program/start metadata but never reopens a settled Run.
|
|
53
|
+
*/
|
|
54
|
+
export declare function applyEvent(summary: RunSummary, event: LifecycleEvent): RunSummary;
|
|
55
|
+
export declare function applyEvent(summary: RunSummary, event: LifecycleEventBody): RunSummary;
|