@jangts/agent-core 0.1.1 → 0.2.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/CHANGELOG.md +18 -0
- package/development/docs/api/reference.md +1907 -1874
- package/development/docs/api/support.md +27 -0
- package/development/skills/agent-core-app/scripts/create-app.mjs +267 -70
- package/development/skills/agent-core-app/scripts/lib/knowledge.mjs +40 -15
- package/development/skills/agent-core-app/scripts/lib/source.mjs +30 -2
- package/development/skills/agent-core-app/scripts/plan.mjs +37 -12
- package/development/skills/agent-core-app/scripts/prepare-source.mjs +61 -10
- package/development/skills/agent-core-app/scripts/resources.mjs +45 -17
- package/development/skills/agent-core-app/scripts/validate-knowledge.mjs +18 -1
- package/development/skills/agent-core-app/templates/catalog.json +36 -22
- package/dist/cjs/capabilities/index.js +13 -0
- package/dist/cjs/capabilities/invocation.js +80 -10
- package/dist/cjs/capabilities/model.js +126 -13
- package/dist/cjs/capabilities/tool-runtime.js +64 -12
- package/dist/cjs/capabilities/tools.js +266 -31
- package/dist/cjs/context/assembly.js +46 -5
- package/dist/cjs/context/audit.js +31 -6
- package/dist/cjs/context/fragments.js +54 -11
- package/dist/cjs/context/index.js +12 -0
- package/dist/cjs/context/journal.js +84 -7
- package/dist/cjs/context/plan.js +30 -2
- package/dist/cjs/diagnostics/catalog.js +11 -3
- package/dist/cjs/diagnostics/index.js +149 -29
- package/dist/cjs/diagnostics/sub-flow.js +240 -40
- package/dist/cjs/errors.js +99 -17
- package/dist/cjs/execution/branch.js +20 -4
- package/dist/cjs/execution/engine.js +470 -56
- package/dist/cjs/execution/events.js +136 -18
- package/dist/cjs/execution/index.js +7 -0
- package/dist/cjs/execution/reporting.js +75 -6
- package/dist/cjs/execution/state.js +161 -22
- package/dist/cjs/execution/workflow.js +224 -32
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/kits/aggregation.js +45 -3
- package/dist/cjs/kits/answering/batch.js +23 -4
- package/dist/cjs/kits/answering/check-result.js +31 -8
- package/dist/cjs/kits/answering/checks.js +24 -3
- package/dist/cjs/kits/answering/flow.js +192 -36
- package/dist/cjs/kits/answering/index.js +19 -1
- package/dist/cjs/kits/answering/tasks.js +88 -13
- package/dist/cjs/kits/artifacts.js +36 -4
- package/dist/cjs/kits/candidates.js +47 -5
- package/dist/cjs/kits/delivery.js +40 -5
- package/dist/cjs/kits/durable.js +155 -31
- package/dist/cjs/kits/evidence.js +66 -15
- package/dist/cjs/kits/family.js +152 -22
- package/dist/cjs/kits/index.js +12 -1
- package/dist/cjs/kits/inference.js +104 -16
- package/dist/cjs/kits/intents/catalog.js +67 -16
- package/dist/cjs/kits/intents/index.js +11 -0
- package/dist/cjs/kits/intents/registry.js +188 -43
- package/dist/cjs/kits/intents/scopes.js +215 -46
- package/dist/cjs/kits/interaction/command.js +140 -36
- package/dist/cjs/kits/interaction/commands.js +86 -11
- package/dist/cjs/kits/interaction/handlers.js +27 -10
- package/dist/cjs/kits/interaction/index.js +10 -0
- package/dist/cjs/kits/interaction/transfer.js +80 -14
- package/dist/cjs/kits/knowledge/catalog.js +62 -11
- package/dist/cjs/kits/knowledge/index.js +16 -1
- package/dist/cjs/kits/knowledge/publication.js +99 -23
- package/dist/cjs/kits/knowledge/sections.js +33 -4
- package/dist/cjs/kits/normalization.js +51 -7
- package/dist/cjs/kits/policies.js +79 -15
- package/dist/cjs/kits/presentation/events.js +54 -10
- package/dist/cjs/kits/presentation/index.js +24 -1
- package/dist/cjs/kits/presentation/outputs.js +176 -38
- package/dist/cjs/kits/presentation/templates.js +33 -5
- package/dist/cjs/kits/presentation/variants.js +31 -2
- package/dist/cjs/kits/projection.js +63 -8
- package/dist/cjs/kits/rank-fusion.js +27 -4
- package/dist/cjs/kits/reflection-log-source.js +89 -16
- package/dist/cjs/kits/reflection.js +234 -60
- package/dist/cjs/kits/retrieval.js +98 -18
- package/dist/cjs/kits/search.js +180 -27
- package/dist/cjs/kits/text-skills.js +104 -19
- package/dist/cjs/kits/tools.js +415 -74
- package/dist/cjs/kits/vector-search.js +50 -16
- package/dist/cjs/mock/node.js +7 -1
- package/dist/cjs/mock/web.js +7 -1
- package/dist/cjs/mock.js +7 -1
- package/dist/cjs/model/binding.js +68 -17
- package/dist/cjs/model/call-budget.js +45 -4
- package/dist/cjs/model/decision-retry.js +19 -1
- package/dist/cjs/model/defaults.js +27 -4
- package/dist/cjs/model/index.js +7 -0
- package/dist/cjs/model/interactions/arguments.js +36 -1
- package/dist/cjs/model/interactions/json-object.js +48 -12
- package/dist/cjs/model/interactions/native-functions.js +52 -10
- package/dist/cjs/model/message-diagnostics.js +17 -4
- package/dist/cjs/model/options.js +9 -1
- package/dist/cjs/model/preparation.js +86 -12
- package/dist/cjs/model/runner.js +413 -79
- package/dist/cjs/model/selection-transport.js +48 -8
- package/dist/cjs/model/settings.js +67 -13
- package/dist/cjs/model/token-budget.js +69 -11
- package/dist/cjs/model/transports.js +59 -6
- package/dist/cjs/structs/common.js +11 -0
- package/dist/cjs/structs/debug.js +34 -5
- package/dist/cjs/structs/errors.js +26 -1
- package/dist/cjs/structs/index.js +11 -1
- package/dist/cjs/structs/kits/durable.js +7 -0
- package/dist/cjs/structs/kits/family.js +1 -0
- package/dist/cjs/structs/kits/interaction.js +8 -1
- package/dist/cjs/structs/kits/knowledge-publication.js +1 -0
- package/dist/cjs/structs/kits/reflection.js +18 -3
- package/dist/cjs/structs/model/chat-provider.js +6 -0
- package/dist/cjs/structs/support/model/completion.js +2 -0
- package/dist/cjs/structs/support/model/messages.js +2 -0
- package/dist/cjs/support/capabilities.js +43 -6
- package/dist/cjs/support/context/assembly.js +88 -16
- package/dist/cjs/support/context/compression.js +48 -6
- package/dist/cjs/support/context/fragments.js +6 -0
- package/dist/cjs/support/context/history.js +36 -1
- package/dist/cjs/support/context/index.js +11 -0
- package/dist/cjs/support/context/nodes.js +164 -35
- package/dist/cjs/support/context/processing.js +319 -61
- package/dist/cjs/support/context/selection-policy.js +98 -21
- package/dist/cjs/support/context/selection.js +61 -10
- package/dist/cjs/support/context/snapshot.js +29 -7
- package/dist/cjs/support/context/strategies.js +120 -28
- package/dist/cjs/support/index.js +9 -1
- package/dist/cjs/support/model/capabilities.js +20 -1
- package/dist/cjs/support/model/chat-completions.js +92 -20
- package/dist/cjs/support/model/children.js +34 -6
- package/dist/cjs/support/model/compatible-provider.js +189 -59
- package/dist/cjs/support/model/completion/calls.js +61 -0
- package/dist/cjs/support/model/completion/default.js +32 -0
- package/dist/cjs/support/model/completion/index.js +28 -0
- package/dist/cjs/support/model/completion/session.js +102 -0
- package/dist/cjs/support/model/index.js +12 -0
- package/dist/cjs/support/model/interactions/index.js +12 -1
- package/dist/cjs/support/model/interactions/json-object.js +6 -0
- package/dist/cjs/support/model/interactions/native-functions.js +6 -0
- package/dist/cjs/support/model/observer.js +32 -6
- package/dist/cjs/support/model/preview-rules.js +66 -16
- package/dist/cjs/support/model/reply-preview.js +77 -17
- package/dist/cjs/support/model/stage-transport.js +33 -7
- package/dist/cjs/support/model/strategies.js +75 -14
- package/dist/cjs/support/model/transports.js +53 -11
- package/dist/cjs/support/registration.js +49 -7
- package/dist/cjs/support/schema.js +46 -4
- package/dist/cjs/support/stream-events.js +60 -8
- package/dist/cjs/support/tool-runtime.js +6 -0
- package/dist/cjs/support/tools.js +79 -10
- package/dist/cjs/support/transport/index.js +7 -0
- package/dist/cjs/support/transport/json.js +28 -4
- package/dist/cjs/support/transport/sse.js +25 -2
- package/dist/cjs/utils/break-observer.js +20 -2
- package/dist/cjs/utils/cancellation.js +77 -9
- package/dist/cjs/utils/catalog.js +19 -4
- package/dist/cjs/utils/debug.js +14 -2
- package/dist/cjs/utils/index.js +8 -0
- package/dist/cjs/utils/interaction-definition.js +26 -6
- package/dist/cjs/utils/invocation.js +42 -4
- package/dist/cjs/utils/model-protocol.js +20 -1
- package/dist/cjs/utils/object.js +16 -0
- package/dist/cjs/utils/observer.js +22 -2
- package/dist/cjs/utils/protocol-registry.js +47 -4
- package/dist/cjs/utils/query-key.js +21 -2
- package/dist/cjs/utils/registration.js +18 -2
- package/dist/cjs/utils/rules.js +39 -11
- package/dist/cjs/utils/schema-adapter.js +25 -2
- package/dist/cjs/utils/synchronous.js +64 -7
- package/dist/cjs/utils/text.js +15 -1
- package/dist/esm/capabilities/index.d.ts +13 -0
- package/dist/esm/capabilities/index.js +13 -0
- package/dist/esm/capabilities/invocation.d.ts +16 -2
- package/dist/esm/capabilities/invocation.js +80 -10
- package/dist/esm/capabilities/model.d.ts +68 -1
- package/dist/esm/capabilities/model.js +126 -13
- package/dist/esm/capabilities/tool-runtime.d.ts +11 -0
- package/dist/esm/capabilities/tool-runtime.js +64 -12
- package/dist/esm/capabilities/tools.d.ts +96 -3
- package/dist/esm/capabilities/tools.js +267 -32
- package/dist/esm/context/assembly.d.ts +13 -2
- package/dist/esm/context/assembly.js +46 -5
- package/dist/esm/context/audit.d.ts +23 -1
- package/dist/esm/context/audit.js +31 -6
- package/dist/esm/context/fragments.d.ts +37 -3
- package/dist/esm/context/fragments.js +54 -11
- package/dist/esm/context/index.d.ts +12 -0
- package/dist/esm/context/index.js +12 -0
- package/dist/esm/context/journal.d.ts +32 -1
- package/dist/esm/context/journal.js +84 -7
- package/dist/esm/context/plan.d.ts +11 -1
- package/dist/esm/context/plan.js +30 -2
- package/dist/esm/diagnostics/catalog.js +11 -3
- package/dist/esm/diagnostics/index.d.ts +30 -2
- package/dist/esm/diagnostics/index.js +149 -29
- package/dist/esm/diagnostics/sub-flow.d.ts +41 -3
- package/dist/esm/diagnostics/sub-flow.js +240 -40
- package/dist/esm/errors.d.ts +22 -2
- package/dist/esm/errors.js +99 -17
- package/dist/esm/execution/branch.d.ts +19 -1
- package/dist/esm/execution/branch.js +20 -4
- package/dist/esm/execution/engine.d.ts +291 -5
- package/dist/esm/execution/engine.js +471 -57
- package/dist/esm/execution/events.d.ts +16 -2
- package/dist/esm/execution/events.js +136 -18
- package/dist/esm/execution/index.d.ts +7 -0
- package/dist/esm/execution/index.js +7 -0
- package/dist/esm/execution/reporting.d.ts +49 -1
- package/dist/esm/execution/reporting.js +75 -6
- package/dist/esm/execution/state.d.ts +126 -10
- package/dist/esm/execution/state.js +161 -22
- package/dist/esm/execution/workflow.d.ts +121 -3
- package/dist/esm/execution/workflow.js +224 -32
- package/dist/esm/index.d.ts +17 -1
- package/dist/esm/index.js +18 -0
- package/dist/esm/kits/aggregation.d.ts +34 -2
- package/dist/esm/kits/aggregation.js +45 -3
- package/dist/esm/kits/answering/batch.d.ts +17 -0
- package/dist/esm/kits/answering/batch.js +23 -4
- package/dist/esm/kits/answering/check-result.d.ts +18 -1
- package/dist/esm/kits/answering/check-result.js +31 -8
- package/dist/esm/kits/answering/checks.d.ts +11 -0
- package/dist/esm/kits/answering/checks.js +24 -3
- package/dist/esm/kits/answering/flow.d.ts +25 -2
- package/dist/esm/kits/answering/flow.js +192 -36
- package/dist/esm/kits/answering/index.d.ts +12 -0
- package/dist/esm/kits/answering/index.js +19 -1
- package/dist/esm/kits/answering/tasks.d.ts +32 -1
- package/dist/esm/kits/answering/tasks.js +88 -13
- package/dist/esm/kits/artifacts.d.ts +11 -0
- package/dist/esm/kits/artifacts.js +36 -4
- package/dist/esm/kits/candidates.d.ts +23 -1
- package/dist/esm/kits/candidates.js +47 -5
- package/dist/esm/kits/delivery.d.ts +34 -0
- package/dist/esm/kits/delivery.js +40 -5
- package/dist/esm/kits/durable.d.ts +19 -0
- package/dist/esm/kits/durable.js +155 -31
- package/dist/esm/kits/evidence.d.ts +28 -5
- package/dist/esm/kits/evidence.js +66 -15
- package/dist/esm/kits/family.d.ts +17 -1
- package/dist/esm/kits/family.js +152 -22
- package/dist/esm/kits/index.d.ts +12 -1
- package/dist/esm/kits/index.js +12 -1
- package/dist/esm/kits/inference.d.ts +64 -0
- package/dist/esm/kits/inference.js +104 -16
- package/dist/esm/kits/intents/catalog.d.ts +13 -1
- package/dist/esm/kits/intents/catalog.js +67 -16
- package/dist/esm/kits/intents/index.d.ts +11 -0
- package/dist/esm/kits/intents/index.js +11 -0
- package/dist/esm/kits/intents/registry.d.ts +61 -3
- package/dist/esm/kits/intents/registry.js +188 -43
- package/dist/esm/kits/intents/scopes.d.ts +73 -3
- package/dist/esm/kits/intents/scopes.js +215 -46
- package/dist/esm/kits/interaction/command.d.ts +38 -4
- package/dist/esm/kits/interaction/command.js +140 -36
- package/dist/esm/kits/interaction/commands.d.ts +66 -2
- package/dist/esm/kits/interaction/commands.js +86 -11
- package/dist/esm/kits/interaction/handlers.d.ts +19 -2
- package/dist/esm/kits/interaction/handlers.js +27 -10
- package/dist/esm/kits/interaction/index.d.ts +10 -0
- package/dist/esm/kits/interaction/index.js +10 -0
- package/dist/esm/kits/interaction/transfer.d.ts +39 -2
- package/dist/esm/kits/interaction/transfer.js +80 -14
- package/dist/esm/kits/knowledge/catalog.d.ts +13 -0
- package/dist/esm/kits/knowledge/catalog.js +62 -11
- package/dist/esm/kits/knowledge/index.d.ts +11 -0
- package/dist/esm/kits/knowledge/index.js +16 -1
- package/dist/esm/kits/knowledge/publication.d.ts +15 -1
- package/dist/esm/kits/knowledge/publication.js +99 -23
- package/dist/esm/kits/knowledge/sections.d.ts +31 -1
- package/dist/esm/kits/knowledge/sections.js +33 -4
- package/dist/esm/kits/normalization.d.ts +25 -2
- package/dist/esm/kits/normalization.js +51 -7
- package/dist/esm/kits/policies.d.ts +26 -3
- package/dist/esm/kits/policies.js +79 -15
- package/dist/esm/kits/presentation/events.d.ts +51 -4
- package/dist/esm/kits/presentation/events.js +54 -10
- package/dist/esm/kits/presentation/index.d.ts +12 -0
- package/dist/esm/kits/presentation/index.js +25 -2
- package/dist/esm/kits/presentation/outputs.d.ts +30 -1
- package/dist/esm/kits/presentation/outputs.js +176 -38
- package/dist/esm/kits/presentation/templates.d.ts +32 -3
- package/dist/esm/kits/presentation/templates.js +33 -5
- package/dist/esm/kits/presentation/variants.d.ts +29 -0
- package/dist/esm/kits/presentation/variants.js +31 -2
- package/dist/esm/kits/projection.d.ts +42 -5
- package/dist/esm/kits/projection.js +63 -8
- package/dist/esm/kits/rank-fusion.d.ts +21 -1
- package/dist/esm/kits/rank-fusion.js +28 -5
- package/dist/esm/kits/reflection-log-source.d.ts +28 -1
- package/dist/esm/kits/reflection-log-source.js +89 -16
- package/dist/esm/kits/reflection.d.ts +17 -1
- package/dist/esm/kits/reflection.js +235 -61
- package/dist/esm/kits/retrieval.d.ts +18 -2
- package/dist/esm/kits/retrieval.js +98 -18
- package/dist/esm/kits/search.d.ts +56 -3
- package/dist/esm/kits/search.js +180 -27
- package/dist/esm/kits/text-skills.d.ts +16 -2
- package/dist/esm/kits/text-skills.js +104 -19
- package/dist/esm/kits/tools.d.ts +122 -2
- package/dist/esm/kits/tools.js +416 -74
- package/dist/esm/kits/vector-search.d.ts +47 -1
- package/dist/esm/kits/vector-search.js +51 -17
- package/dist/esm/mock/node.d.ts +7 -0
- package/dist/esm/mock/node.js +7 -1
- package/dist/esm/mock/web.d.ts +7 -0
- package/dist/esm/mock/web.js +7 -1
- package/dist/esm/mock.d.ts +7 -0
- package/dist/esm/mock.js +7 -1
- package/dist/esm/model/binding.d.ts +32 -3
- package/dist/esm/model/binding.js +68 -17
- package/dist/esm/model/call-budget.d.ts +30 -2
- package/dist/esm/model/call-budget.js +45 -4
- package/dist/esm/model/decision-retry.d.ts +10 -1
- package/dist/esm/model/decision-retry.js +19 -1
- package/dist/esm/model/defaults.d.ts +13 -2
- package/dist/esm/model/defaults.js +27 -4
- package/dist/esm/model/index.d.ts +7 -0
- package/dist/esm/model/index.js +7 -0
- package/dist/esm/model/interactions/arguments.d.ts +27 -0
- package/dist/esm/model/interactions/arguments.js +36 -1
- package/dist/esm/model/interactions/json-object.d.ts +7 -1
- package/dist/esm/model/interactions/json-object.js +48 -12
- package/dist/esm/model/interactions/native-functions.d.ts +6 -0
- package/dist/esm/model/interactions/native-functions.js +52 -10
- package/dist/esm/model/message-diagnostics.d.ts +17 -1
- package/dist/esm/model/message-diagnostics.js +17 -4
- package/dist/esm/model/options.d.ts +18 -1
- package/dist/esm/model/options.js +9 -1
- package/dist/esm/model/preparation.d.ts +30 -2
- package/dist/esm/model/preparation.js +86 -12
- package/dist/esm/model/runner.d.ts +129 -5
- package/dist/esm/model/runner.js +414 -80
- package/dist/esm/model/selection-transport.d.ts +14 -1
- package/dist/esm/model/selection-transport.js +48 -8
- package/dist/esm/model/settings.d.ts +11 -0
- package/dist/esm/model/settings.js +67 -13
- package/dist/esm/model/token-budget.d.ts +59 -1
- package/dist/esm/model/token-budget.js +69 -11
- package/dist/esm/model/transports.d.ts +20 -2
- package/dist/esm/model/transports.js +59 -6
- package/dist/esm/structs/capabilities/invocation.d.ts +36 -0
- package/dist/esm/structs/capabilities/model.d.ts +27 -0
- package/dist/esm/structs/capabilities/tools.d.ts +38 -0
- package/dist/esm/structs/common.d.ts +62 -2
- package/dist/esm/structs/common.js +11 -0
- package/dist/esm/structs/context/fragments.d.ts +28 -0
- package/dist/esm/structs/context/journal.d.ts +28 -3
- package/dist/esm/structs/context/processing.d.ts +11 -0
- package/dist/esm/structs/debug.d.ts +58 -1
- package/dist/esm/structs/debug.js +34 -5
- package/dist/esm/structs/diagnostics.d.ts +119 -1
- package/dist/esm/structs/errors.d.ts +42 -1
- package/dist/esm/structs/errors.js +26 -1
- package/dist/esm/structs/execution/engine.d.ts +24 -1
- package/dist/esm/structs/execution/events.d.ts +12 -0
- package/dist/esm/structs/execution/workflow.d.ts +71 -0
- package/dist/esm/structs/index.d.ts +11 -1
- package/dist/esm/structs/index.js +11 -1
- package/dist/esm/structs/invocation.d.ts +30 -0
- package/dist/esm/structs/kits/aggregation.d.ts +12 -0
- package/dist/esm/structs/kits/answering/checks.d.ts +11 -0
- package/dist/esm/structs/kits/answering/flow.d.ts +35 -1
- package/dist/esm/structs/kits/answering/state.d.ts +21 -0
- package/dist/esm/structs/kits/answering/tasks.d.ts +21 -0
- package/dist/esm/structs/kits/artifacts.d.ts +14 -0
- package/dist/esm/structs/kits/candidates.d.ts +19 -0
- package/dist/esm/structs/kits/delivery.d.ts +22 -0
- package/dist/esm/structs/kits/durable.d.ts +56 -3
- package/dist/esm/structs/kits/durable.js +7 -0
- package/dist/esm/structs/kits/evidence.d.ts +23 -0
- package/dist/esm/structs/kits/family.d.ts +49 -1
- package/dist/esm/structs/kits/family.js +1 -0
- package/dist/esm/structs/kits/intents/catalog.d.ts +26 -0
- package/dist/esm/structs/kits/intents/registry.d.ts +34 -0
- package/dist/esm/structs/kits/intents/scopes.d.ts +36 -1
- package/dist/esm/structs/kits/interaction.d.ts +64 -0
- package/dist/esm/structs/kits/interaction.js +8 -1
- package/dist/esm/structs/kits/knowledge-publication.d.ts +43 -1
- package/dist/esm/structs/kits/knowledge-publication.js +1 -0
- package/dist/esm/structs/kits/knowledge.d.ts +39 -2
- package/dist/esm/structs/kits/normalization.d.ts +15 -0
- package/dist/esm/structs/kits/policies.d.ts +25 -1
- package/dist/esm/structs/kits/presentation/events.d.ts +28 -4
- package/dist/esm/structs/kits/presentation/outputs.d.ts +38 -1
- package/dist/esm/structs/kits/presentation/templates.d.ts +15 -0
- package/dist/esm/structs/kits/projection.d.ts +21 -0
- package/dist/esm/structs/kits/reflection.d.ts +61 -2
- package/dist/esm/structs/kits/reflection.js +18 -3
- package/dist/esm/structs/kits/retrieval.d.ts +38 -0
- package/dist/esm/structs/kits/search.d.ts +22 -0
- package/dist/esm/structs/kits/text-skills.d.ts +36 -0
- package/dist/esm/structs/kits/tools.d.ts +87 -0
- package/dist/esm/structs/model/chat-provider.d.ts +24 -1
- package/dist/esm/structs/model/chat-provider.js +6 -0
- package/dist/esm/structs/model/interactions.d.ts +38 -0
- package/dist/esm/structs/model/messages.d.ts +30 -0
- package/dist/esm/structs/model/runtime.d.ts +104 -6
- package/dist/esm/structs/support/capabilities.d.ts +19 -2
- package/dist/esm/structs/support/context-processing.d.ts +88 -9
- package/dist/esm/structs/support/context.d.ts +29 -1
- package/dist/esm/structs/support/model/completion.d.ts +50 -0
- package/dist/esm/structs/support/model/completion.js +1 -0
- package/dist/esm/structs/support/model/interactions.d.ts +13 -1
- package/dist/esm/structs/support/model/messages.d.ts +52 -0
- package/dist/esm/structs/support/model/messages.js +1 -0
- package/dist/esm/structs/support/model/provider-observer.d.ts +22 -1
- package/dist/esm/structs/support/model/provider.d.ts +71 -6
- package/dist/esm/structs/support/registration.d.ts +13 -0
- package/dist/esm/structs/support/schema.d.ts +14 -0
- package/dist/esm/structs/support/tools.d.ts +28 -0
- package/dist/esm/structs/support/transport/json.d.ts +16 -0
- package/dist/esm/structs/support/transport/sse.d.ts +15 -0
- package/dist/esm/structs/utils/rules.d.ts +19 -0
- package/dist/esm/support/capabilities.d.ts +25 -2
- package/dist/esm/support/capabilities.js +43 -6
- package/dist/esm/support/context/assembly.d.ts +35 -4
- package/dist/esm/support/context/assembly.js +88 -16
- package/dist/esm/support/context/compression.d.ts +17 -1
- package/dist/esm/support/context/compression.js +48 -6
- package/dist/esm/support/context/fragments.d.ts +6 -0
- package/dist/esm/support/context/fragments.js +6 -0
- package/dist/esm/support/context/history.d.ts +43 -0
- package/dist/esm/support/context/history.js +36 -1
- package/dist/esm/support/context/index.d.ts +13 -2
- package/dist/esm/support/context/index.js +12 -1
- package/dist/esm/support/context/nodes.d.ts +49 -3
- package/dist/esm/support/context/nodes.js +165 -36
- package/dist/esm/support/context/processing.d.ts +145 -1
- package/dist/esm/support/context/processing.js +320 -62
- package/dist/esm/support/context/selection-policy.d.ts +42 -2
- package/dist/esm/support/context/selection-policy.js +98 -21
- package/dist/esm/support/context/selection.d.ts +14 -1
- package/dist/esm/support/context/selection.js +61 -10
- package/dist/esm/support/context/snapshot.d.ts +23 -1
- package/dist/esm/support/context/snapshot.js +29 -7
- package/dist/esm/support/context/strategies.d.ts +35 -2
- package/dist/esm/support/context/strategies.js +120 -28
- package/dist/esm/support/index.d.ts +9 -1
- package/dist/esm/support/index.js +9 -1
- package/dist/esm/support/model/capabilities.d.ts +10 -0
- package/dist/esm/support/model/capabilities.js +20 -1
- package/dist/esm/support/model/chat-completions.d.ts +44 -15
- package/dist/esm/support/model/chat-completions.js +92 -20
- package/dist/esm/support/model/children.d.ts +32 -2
- package/dist/esm/support/model/children.js +34 -6
- package/dist/esm/support/model/compatible-provider.d.ts +29 -3
- package/dist/esm/support/model/compatible-provider.js +190 -60
- package/dist/esm/support/model/completion/calls.d.ts +40 -0
- package/dist/esm/support/model/completion/calls.js +58 -0
- package/dist/esm/support/model/completion/default.d.ts +10 -0
- package/dist/esm/support/model/completion/default.js +29 -0
- package/dist/esm/support/model/completion/index.d.ts +10 -0
- package/dist/esm/support/model/completion/index.js +22 -0
- package/dist/esm/support/model/completion/session.d.ts +11 -0
- package/dist/esm/support/model/completion/session.js +99 -0
- package/dist/esm/support/model/index.d.ts +14 -0
- package/dist/esm/support/model/index.js +12 -0
- package/dist/esm/support/model/interactions/index.d.ts +1 -1
- package/dist/esm/support/model/interactions/index.js +12 -1
- package/dist/esm/support/model/interactions/json-object.d.ts +6 -0
- package/dist/esm/support/model/interactions/json-object.js +6 -0
- package/dist/esm/support/model/interactions/native-functions.d.ts +6 -0
- package/dist/esm/support/model/interactions/native-functions.js +6 -0
- package/dist/esm/support/model/observer.d.ts +25 -2
- package/dist/esm/support/model/observer.js +32 -6
- package/dist/esm/support/model/preview-rules.d.ts +20 -2
- package/dist/esm/support/model/preview-rules.js +66 -16
- package/dist/esm/support/model/reply-preview.d.ts +15 -1
- package/dist/esm/support/model/reply-preview.js +77 -17
- package/dist/esm/support/model/stage-transport.d.ts +9 -1
- package/dist/esm/support/model/stage-transport.js +33 -7
- package/dist/esm/support/model/strategies.d.ts +24 -2
- package/dist/esm/support/model/strategies.js +75 -14
- package/dist/esm/support/model/transports.d.ts +17 -1
- package/dist/esm/support/model/transports.js +53 -11
- package/dist/esm/support/registration.d.ts +20 -1
- package/dist/esm/support/registration.js +49 -7
- package/dist/esm/support/schema.d.ts +31 -1
- package/dist/esm/support/schema.js +46 -4
- package/dist/esm/support/stream-events.d.ts +22 -1
- package/dist/esm/support/stream-events.js +60 -8
- package/dist/esm/support/tool-runtime.d.ts +6 -0
- package/dist/esm/support/tool-runtime.js +6 -0
- package/dist/esm/support/tools.d.ts +22 -0
- package/dist/esm/support/tools.js +79 -10
- package/dist/esm/support/transport/index.d.ts +7 -0
- package/dist/esm/support/transport/index.js +7 -0
- package/dist/esm/support/transport/json.d.ts +29 -2
- package/dist/esm/support/transport/json.js +28 -4
- package/dist/esm/support/transport/sse.d.ts +31 -1
- package/dist/esm/support/transport/sse.js +25 -2
- package/dist/esm/types.d.ts +9 -1
- package/dist/esm/utils/break-observer.d.ts +27 -2
- package/dist/esm/utils/break-observer.js +20 -2
- package/dist/esm/utils/cancellation.d.ts +56 -5
- package/dist/esm/utils/cancellation.js +77 -9
- package/dist/esm/utils/catalog.d.ts +20 -1
- package/dist/esm/utils/catalog.js +19 -4
- package/dist/esm/utils/debug.d.ts +20 -1
- package/dist/esm/utils/debug.js +14 -2
- package/dist/esm/utils/index.d.ts +8 -0
- package/dist/esm/utils/index.js +8 -0
- package/dist/esm/utils/interaction-definition.d.ts +18 -1
- package/dist/esm/utils/interaction-definition.js +26 -6
- package/dist/esm/utils/invocation.d.ts +36 -1
- package/dist/esm/utils/invocation.js +42 -4
- package/dist/esm/utils/model-protocol.d.ts +8 -0
- package/dist/esm/utils/model-protocol.js +20 -1
- package/dist/esm/utils/object.d.ts +16 -0
- package/dist/esm/utils/object.js +16 -0
- package/dist/esm/utils/observer.d.ts +19 -1
- package/dist/esm/utils/observer.js +22 -2
- package/dist/esm/utils/protocol-registry.d.ts +38 -1
- package/dist/esm/utils/protocol-registry.js +47 -4
- package/dist/esm/utils/query-key.d.ts +11 -1
- package/dist/esm/utils/query-key.js +21 -2
- package/dist/esm/utils/registration.d.ts +34 -2
- package/dist/esm/utils/registration.js +18 -2
- package/dist/esm/utils/rules.d.ts +81 -4
- package/dist/esm/utils/rules.js +39 -11
- package/dist/esm/utils/schema-adapter.d.ts +12 -1
- package/dist/esm/utils/schema-adapter.js +25 -2
- package/dist/esm/utils/synchronous.d.ts +60 -4
- package/dist/esm/utils/synchronous.js +64 -7
- package/dist/esm/utils/text.d.ts +15 -1
- package/dist/esm/utils/text.js +15 -1
- package/package.json +3 -2
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Paired, nestable anchors are one text adapter. Other sources supply the same document
|
|
3
|
+
* contract directly.
|
|
4
|
+
*
|
|
5
|
+
* @param input - Document identity, revision, optional locale and the anchored text.
|
|
6
|
+
* @returns A document whose parts alternate text strings and section objects.
|
|
7
|
+
* @throws TypeError For an unmatched closing anchor or an anchor left open at the end.
|
|
8
|
+
*/
|
|
2
9
|
export function parseKnowledgeDocument(input) {
|
|
3
10
|
const parts = [];
|
|
4
11
|
const stack = [];
|
|
@@ -24,6 +31,14 @@ export function parseKnowledgeDocument(input) {
|
|
|
24
31
|
parts.push(input.text.slice(offset));
|
|
25
32
|
return { id: input.id, revision: input.revision, locale: input.locale, parts };
|
|
26
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Deep-copy and freeze a document while indexing its sections by id.
|
|
36
|
+
*
|
|
37
|
+
* @param document - Declared document, possibly sharing arrays or containing cycles.
|
|
38
|
+
* @returns The frozen document plus a map from section id to its frozen section.
|
|
39
|
+
* @throws TypeError For a missing identity or parts array, a sparse or cyclic tree, a blank
|
|
40
|
+
* section id, or a duplicate section id.
|
|
41
|
+
*/
|
|
27
42
|
export function compileKnowledgeDocument(document) {
|
|
28
43
|
if (!document.id?.trim() || !document.revision?.trim() || !Array.isArray(document.parts))
|
|
29
44
|
throw new TypeError('Invalid knowledge document');
|
|
@@ -35,7 +50,7 @@ export function compileKnowledgeDocument(document) {
|
|
|
35
50
|
ancestors.add(parts);
|
|
36
51
|
// Visit empty array slots too: a sparse tree is not valid knowledge, and
|
|
37
52
|
// must not share a serialized cache identity with an explicit null part.
|
|
38
|
-
const result = Array.from(parts, part => {
|
|
53
|
+
const result = Array.from(parts, (part) => {
|
|
39
54
|
if (typeof part === 'string')
|
|
40
55
|
return part;
|
|
41
56
|
if (!part || typeof part.id !== 'string' || !part.id.trim() || sections.has(part.id))
|
|
@@ -49,9 +64,23 @@ export function compileKnowledgeDocument(document) {
|
|
|
49
64
|
ancestors.delete(parts);
|
|
50
65
|
return Object.freeze(result);
|
|
51
66
|
}
|
|
52
|
-
const value = Object.freeze({
|
|
67
|
+
const value = Object.freeze({
|
|
68
|
+
id: document.id,
|
|
69
|
+
revision: document.revision,
|
|
70
|
+
locale: document.locale,
|
|
71
|
+
parts: copy(document.parts),
|
|
72
|
+
});
|
|
53
73
|
return { document: value, sections };
|
|
54
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Flatten parts into text.
|
|
77
|
+
*
|
|
78
|
+
* @param parts - Document parts; nested sections are traversed in order.
|
|
79
|
+
* @param subtree - When false, nested section text is skipped and only top-level text remains.
|
|
80
|
+
* @returns Concatenated text with separators left to the caller.
|
|
81
|
+
*/
|
|
55
82
|
export function knowledgeText(parts, subtree = true) {
|
|
56
|
-
return parts
|
|
83
|
+
return parts
|
|
84
|
+
.map((part) => (typeof part === 'string' ? part : subtree ? knowledgeText(part.parts) : ''))
|
|
85
|
+
.join('');
|
|
57
86
|
}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { NormalizationStep, NormalizationOptions } from '../structs/kits/normalization.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Compile an ordered normalization pipeline.
|
|
4
|
+
*
|
|
5
|
+
* Steps run in declaration order. Each step may be skipped by its `when` predicate, receives
|
|
6
|
+
* the value produced by the previous step, and `isComplete` can stop the walk early, so the
|
|
7
|
+
* usual contract is "first completion wins" rather than "always run everything".
|
|
8
|
+
*
|
|
9
|
+
* @param definitions - Steps with unique non-blank ids and a synchronous `normalize` handler.
|
|
10
|
+
* @param options - Optional completion predicate; bound to the options object.
|
|
11
|
+
* @returns A frozen pipeline exposing `steps` (ids plus handlers) and `normalize`.
|
|
12
|
+
* @throws TypeError At construction for blank/duplicate ids or a missing handler; from
|
|
13
|
+
* `normalize` when a predicate or handler returns a thenable or a non-boolean.
|
|
14
|
+
*/
|
|
3
15
|
export declare function defineNormalization<Value, Context = void>(definitions: readonly NormalizationStep<Value, Context>[], options?: NormalizationOptions<Value, Context>): Readonly<{
|
|
4
16
|
steps: readonly Readonly<{
|
|
5
17
|
id: string;
|
|
@@ -8,9 +20,20 @@ export declare function defineNormalization<Value, Context = void>(definitions:
|
|
|
8
20
|
}>[];
|
|
9
21
|
normalize(value: Value, context: Context): Value;
|
|
10
22
|
}>;
|
|
11
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Stable deduplication preserves the original values; the host chooses equivalence.
|
|
25
|
+
*
|
|
26
|
+
* The first occurrence of each key wins and the input order is kept, so callers can rely on
|
|
27
|
+
* deduplication never reordering their list.
|
|
28
|
+
*
|
|
29
|
+
* @param values - Values in the order to retain.
|
|
30
|
+
* @param key - Equivalence selector.
|
|
31
|
+
* @param initial - Keys already treated as seen, for example those owned by another batch.
|
|
32
|
+
* @returns The retained values as a new array.
|
|
33
|
+
*/
|
|
12
34
|
export declare function uniqueBy<Value, Key>(values: readonly Value[], key: (value: Value) => Key, initial?: Iterable<Key>): Value[];
|
|
13
35
|
export type { NormalizationStep, NormalizationOptions } from '../structs/kits/normalization.js';
|
|
36
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
14
37
|
export declare const Normalization: Readonly<{
|
|
15
38
|
defineNormalization: typeof defineNormalization;
|
|
16
39
|
uniqueBy: typeof uniqueBy;
|
|
@@ -1,17 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalization Kit: ordered synchronous value transformations and stable deduplication.
|
|
3
|
+
*
|
|
4
|
+
* Place in the package: an optional App-side helper for cleaning model or transport input
|
|
5
|
+
* before it reaches business logic. Replacement, completion detection and input ownership stay
|
|
6
|
+
* explicit; this module never mutates the caller's arrays.
|
|
7
|
+
*
|
|
8
|
+
* Exports: `defineNormalization`, `uniqueBy`, `Normalization`, and the step/option types.
|
|
9
|
+
*/
|
|
1
10
|
import { synchronous, booleanResult } from '../utils/synchronous.js';
|
|
2
11
|
import { breakWhile } from '../utils/rules.js';
|
|
3
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Compile an ordered normalization pipeline.
|
|
14
|
+
*
|
|
15
|
+
* Steps run in declaration order. Each step may be skipped by its `when` predicate, receives
|
|
16
|
+
* the value produced by the previous step, and `isComplete` can stop the walk early, so the
|
|
17
|
+
* usual contract is "first completion wins" rather than "always run everything".
|
|
18
|
+
*
|
|
19
|
+
* @param definitions - Steps with unique non-blank ids and a synchronous `normalize` handler.
|
|
20
|
+
* @param options - Optional completion predicate; bound to the options object.
|
|
21
|
+
* @returns A frozen pipeline exposing `steps` (ids plus handlers) and `normalize`.
|
|
22
|
+
* @throws TypeError At construction for blank/duplicate ids or a missing handler; from
|
|
23
|
+
* `normalize` when a predicate or handler returns a thenable or a non-boolean.
|
|
24
|
+
*/
|
|
4
25
|
export function defineNormalization(definitions, options = {}) {
|
|
5
26
|
const isComplete = options.isComplete?.bind(options);
|
|
6
27
|
const predicate = (value) => booleanResult(value, 'Normalization predicates must be synchronous', 'Normalization predicates must return boolean');
|
|
7
28
|
const ids = new Set();
|
|
8
|
-
const steps = Object.freeze(definitions.map(step => {
|
|
29
|
+
const steps = Object.freeze(definitions.map((step) => {
|
|
9
30
|
breakWhile([
|
|
10
|
-
{
|
|
11
|
-
|
|
31
|
+
{
|
|
32
|
+
occur: () => !step.id.trim() || ids.has(step.id),
|
|
33
|
+
error: 'Invalid or duplicate normalization step',
|
|
34
|
+
tags: ['id'],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
occur: () => typeof step.normalize !== 'function',
|
|
38
|
+
error: 'Missing normalization handler',
|
|
39
|
+
tags: ['handler'],
|
|
40
|
+
},
|
|
12
41
|
]);
|
|
13
42
|
ids.add(step.id);
|
|
14
|
-
return Object.freeze({
|
|
43
|
+
return Object.freeze({
|
|
44
|
+
id: step.id,
|
|
45
|
+
when: step.when?.bind(step),
|
|
46
|
+
normalize: step.normalize.bind(step),
|
|
47
|
+
});
|
|
15
48
|
}));
|
|
16
49
|
return Object.freeze({
|
|
17
50
|
steps,
|
|
@@ -27,10 +60,20 @@ export function defineNormalization(definitions, options = {}) {
|
|
|
27
60
|
},
|
|
28
61
|
});
|
|
29
62
|
}
|
|
30
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Stable deduplication preserves the original values; the host chooses equivalence.
|
|
65
|
+
*
|
|
66
|
+
* The first occurrence of each key wins and the input order is kept, so callers can rely on
|
|
67
|
+
* deduplication never reordering their list.
|
|
68
|
+
*
|
|
69
|
+
* @param values - Values in the order to retain.
|
|
70
|
+
* @param key - Equivalence selector.
|
|
71
|
+
* @param initial - Keys already treated as seen, for example those owned by another batch.
|
|
72
|
+
* @returns The retained values as a new array.
|
|
73
|
+
*/
|
|
31
74
|
export function uniqueBy(values, key, initial = []) {
|
|
32
75
|
const seen = new Set(initial);
|
|
33
|
-
return values.filter(value => {
|
|
76
|
+
return values.filter((value) => {
|
|
34
77
|
const id = key(value);
|
|
35
78
|
if (seen.has(id))
|
|
36
79
|
return false;
|
|
@@ -38,4 +81,5 @@ export function uniqueBy(values, key, initial = []) {
|
|
|
38
81
|
return true;
|
|
39
82
|
});
|
|
40
83
|
}
|
|
84
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
41
85
|
export const Normalization = Object.freeze({ defineNormalization, uniqueBy });
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { PolicyDefinition, RecoveryDefinition, RecoveryResult } from '../structs/kits/policies.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Compile a policy set that reports every matching reason.
|
|
4
|
+
*
|
|
5
|
+
* Collect every matching reason; a configured mode cannot silently override a mandatory
|
|
6
|
+
* policy. `assess` returns the matched ids and deduplicated kinds rather than a single verdict,
|
|
7
|
+
* so callers keep the ordering information they need for messages and diagnostics.
|
|
8
|
+
*
|
|
9
|
+
* @param definitions - Policies with unique ids, descriptions and a synchronous `when`.
|
|
10
|
+
* @returns A frozen catalog extended with `assess(input)`.
|
|
11
|
+
* @throws TypeError For blank/duplicate ids, a blank description, a missing `when`, or a
|
|
12
|
+
* predicate that is not synchronous boolean.
|
|
13
|
+
*/
|
|
3
14
|
export declare function definePolicySet<Input, Kind extends string>(definitions: readonly PolicyDefinition<Input, Kind>[]): Readonly<{
|
|
4
15
|
assess(input: Input): {
|
|
5
16
|
required: boolean;
|
|
@@ -14,7 +25,18 @@ export declare function definePolicySet<Input, Kind extends string>(definitions:
|
|
|
14
25
|
get(id: string): Readonly<PolicyDefinition<Input, Kind>> | undefined;
|
|
15
26
|
require(id: string): Readonly<PolicyDefinition<Input, Kind>>;
|
|
16
27
|
}>;
|
|
17
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Compile an ordered recovery chain.
|
|
30
|
+
*
|
|
31
|
+
* A handler reports whether it handled the input; handled undefined values remain explicit.
|
|
32
|
+
* The first handler that reports `handled` ends the walk, so declaration order is the
|
|
33
|
+
* precedence, and `{ handled: false }` is the only way to fall through.
|
|
34
|
+
*
|
|
35
|
+
* @param definitions - Recovery handlers with unique ids, descriptions and `tryRecover`.
|
|
36
|
+
* @returns A frozen catalog extended with `tryRecover(input)`.
|
|
37
|
+
* @throws TypeError For blank/duplicate ids, a missing handler, or an outcome that lacks a
|
|
38
|
+
* boolean `handled` or omits `value` while claiming to have handled the input.
|
|
39
|
+
*/
|
|
18
40
|
export declare function defineRecoveryChain<Input, Result>(definitions: readonly RecoveryDefinition<Input, Result>[]): Readonly<{
|
|
19
41
|
tryRecover: (input: Input) => RecoveryResult<Result>;
|
|
20
42
|
definitions: readonly Readonly<{
|
|
@@ -45,7 +67,8 @@ export declare function defineRecoveryChain<Input, Result>(definitions: readonly
|
|
|
45
67
|
tryRecover(input: Input): RecoveryResult<Result>;
|
|
46
68
|
}>;
|
|
47
69
|
}>;
|
|
48
|
-
export type { PolicyDefinition, PolicyAssessment, RecoveryDefinition, RecoveryResult } from '../structs/kits/policies.js';
|
|
70
|
+
export type { PolicyDefinition, PolicyAssessment, RecoveryDefinition, RecoveryResult, } from '../structs/kits/policies.js';
|
|
71
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
49
72
|
export declare const Policies: Readonly<{
|
|
50
73
|
definePolicySet: typeof definePolicySet;
|
|
51
74
|
defineRecoveryChain: typeof defineRecoveryChain;
|
|
@@ -1,27 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Policies Kit: assess which declared policies apply, and run ordered recovery handlers.
|
|
3
|
+
*
|
|
4
|
+
* Place in the package: an optional App-side library for policy and recovery tables. Policy
|
|
5
|
+
* predicates, recovery handlers, kinds and descriptions are App configuration; this module
|
|
6
|
+
* owns registration checks, evaluation order and outcome validation.
|
|
7
|
+
*
|
|
8
|
+
* Exports: `definePolicySet`, `defineRecoveryChain`, `Policies`, and the policy types.
|
|
9
|
+
*/
|
|
1
10
|
import { readonlyCatalog } from '../utils/catalog.js';
|
|
2
11
|
import { synchronous, booleanResult } from '../utils/synchronous.js';
|
|
3
12
|
import { breakWhile } from '../utils/rules.js';
|
|
4
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Compile a policy set that reports every matching reason.
|
|
15
|
+
*
|
|
16
|
+
* Collect every matching reason; a configured mode cannot silently override a mandatory
|
|
17
|
+
* policy. `assess` returns the matched ids and deduplicated kinds rather than a single verdict,
|
|
18
|
+
* so callers keep the ordering information they need for messages and diagnostics.
|
|
19
|
+
*
|
|
20
|
+
* @param definitions - Policies with unique ids, descriptions and a synchronous `when`.
|
|
21
|
+
* @returns A frozen catalog extended with `assess(input)`.
|
|
22
|
+
* @throws TypeError For blank/duplicate ids, a blank description, a missing `when`, or a
|
|
23
|
+
* predicate that is not synchronous boolean.
|
|
24
|
+
*/
|
|
5
25
|
export function definePolicySet(definitions) {
|
|
6
26
|
const catalog = registerPolicies(definitions, 'when');
|
|
7
27
|
return Object.freeze({
|
|
8
|
-
...readonlyCatalog(catalog, id => new TypeError(`Unknown policy: ${id}`)),
|
|
28
|
+
...readonlyCatalog(catalog, (id) => new TypeError(`Unknown policy: ${id}`)),
|
|
9
29
|
assess(input) {
|
|
10
|
-
const matched = catalog.filter(policy => booleanMatch(policy.when(input)));
|
|
11
|
-
return {
|
|
30
|
+
const matched = catalog.filter((policy) => booleanMatch(policy.when(input)));
|
|
31
|
+
return {
|
|
32
|
+
required: matched.length > 0,
|
|
33
|
+
reasons: matched.map((policy) => policy.id),
|
|
34
|
+
kinds: [...new Set(matched.map((policy) => policy.kind))],
|
|
35
|
+
};
|
|
12
36
|
},
|
|
13
37
|
});
|
|
14
38
|
}
|
|
15
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Compile an ordered recovery chain.
|
|
41
|
+
*
|
|
42
|
+
* A handler reports whether it handled the input; handled undefined values remain explicit.
|
|
43
|
+
* The first handler that reports `handled` ends the walk, so declaration order is the
|
|
44
|
+
* precedence, and `{ handled: false }` is the only way to fall through.
|
|
45
|
+
*
|
|
46
|
+
* @param definitions - Recovery handlers with unique ids, descriptions and `tryRecover`.
|
|
47
|
+
* @returns A frozen catalog extended with `tryRecover(input)`.
|
|
48
|
+
* @throws TypeError For blank/duplicate ids, a missing handler, or an outcome that lacks a
|
|
49
|
+
* boolean `handled` or omits `value` while claiming to have handled the input.
|
|
50
|
+
*/
|
|
16
51
|
export function defineRecoveryChain(definitions) {
|
|
17
|
-
const catalog = registerPolicies(definitions, 'tryRecover').map(definition => {
|
|
18
|
-
return Object.freeze({
|
|
52
|
+
const catalog = registerPolicies(definitions, 'tryRecover').map((definition) => {
|
|
53
|
+
return Object.freeze({
|
|
54
|
+
id: definition.id,
|
|
55
|
+
description: definition.description,
|
|
56
|
+
tryRecover(input) {
|
|
19
57
|
const value = synchronous(definition.tryRecover(input), 'Recovery handlers must be synchronous');
|
|
20
58
|
const result = value;
|
|
21
|
-
if (!result ||
|
|
59
|
+
if (!result ||
|
|
60
|
+
typeof result !== 'object' ||
|
|
61
|
+
typeof result.handled !== 'boolean' ||
|
|
62
|
+
(result.handled && !('value' in result)))
|
|
22
63
|
throw new TypeError('Invalid recovery outcome');
|
|
23
64
|
return result;
|
|
24
|
-
}
|
|
65
|
+
},
|
|
66
|
+
});
|
|
25
67
|
});
|
|
26
68
|
const tryRecover = (input) => {
|
|
27
69
|
for (const policy of catalog) {
|
|
@@ -31,20 +73,42 @@ export function defineRecoveryChain(definitions) {
|
|
|
31
73
|
}
|
|
32
74
|
return { handled: false };
|
|
33
75
|
};
|
|
34
|
-
return Object.freeze({
|
|
76
|
+
return Object.freeze({
|
|
77
|
+
...readonlyCatalog(catalog, (id) => new TypeError(`Unknown recovery policy: ${id}`)),
|
|
78
|
+
tryRecover,
|
|
79
|
+
});
|
|
35
80
|
}
|
|
36
81
|
function registerPolicies(definitions, handler) {
|
|
37
82
|
const ids = new Set();
|
|
38
|
-
return Object.freeze(definitions.map(definition => {
|
|
83
|
+
return Object.freeze(definitions.map((definition) => {
|
|
39
84
|
breakWhile([
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
85
|
+
{
|
|
86
|
+
occur: () => !definition.id.trim() || !definition.description.trim(),
|
|
87
|
+
error: 'Invalid policy declaration',
|
|
88
|
+
tags: ['metadata'],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
occur: () => ids.has(definition.id),
|
|
92
|
+
error: () => `Duplicate policy: ${definition.id}`,
|
|
93
|
+
tags: ['id'],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
occur: () => typeof definition[handler] !== 'function',
|
|
97
|
+
error: () => `Missing policy handler: ${definition.id}`,
|
|
98
|
+
tags: ['handler'],
|
|
99
|
+
},
|
|
43
100
|
], ['agent-core', 'policy-registration']);
|
|
44
101
|
ids.add(definition.id);
|
|
45
|
-
return Object.freeze({
|
|
102
|
+
return Object.freeze({
|
|
103
|
+
...definition,
|
|
104
|
+
id: definition.id,
|
|
105
|
+
description: definition.description,
|
|
106
|
+
...('kind' in definition ? { kind: definition.kind } : {}),
|
|
107
|
+
[handler]: definition[handler].bind(definition),
|
|
108
|
+
});
|
|
46
109
|
}));
|
|
47
110
|
}
|
|
111
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
48
112
|
export const Policies = Object.freeze({ definePolicySet, defineRecoveryChain });
|
|
49
113
|
function booleanMatch(value) {
|
|
50
114
|
return booleanResult(value, 'Policy predicates must be synchronous', 'Policy predicates must return boolean');
|
|
@@ -1,14 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation Kit: the reply bubble/chunk event protocol.
|
|
3
|
+
*
|
|
4
|
+
* Place in the package: part of the `presentation` Kit. It turns a validated reply string into
|
|
5
|
+
* a paced stream of `text`/`bubble` events and can serialize that stream back into plain text.
|
|
6
|
+
* Transport, styling and the actual rendering stay with the App.
|
|
7
|
+
*
|
|
8
|
+
* Exports: `REPLY_BUBBLE_BOUNDARY`, `replyBubbleTexts`, `publishReplyEvents`,
|
|
9
|
+
* `serializeOutputEvents`, `textOutputEvents`, and the output event types.
|
|
10
|
+
*/
|
|
1
11
|
import type { AgentOutputEvent, ReplyBubbleInput, ReplyDeliveryOptions } from '../../structs/kits/presentation/events.js';
|
|
2
12
|
import type { ExecutionContext } from '../../structs/common.js';
|
|
3
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Internal boundary between validated assistant bubbles. Never sent as visible text.
|
|
15
|
+
*
|
|
16
|
+
* U+001E (record separator) is a non-printing control character that ordinary replies do not
|
|
17
|
+
* contain, so splitting on it cannot truncate visible prose.
|
|
18
|
+
*/
|
|
4
19
|
export declare const REPLY_BUBBLE_BOUNDARY = "\u001E";
|
|
20
|
+
/**
|
|
21
|
+
* Collect the non-empty-text parts of a reply.
|
|
22
|
+
*
|
|
23
|
+
* @param reply - Primary text plus optional extra bubbles.
|
|
24
|
+
* @returns The text and every string bubble; non-string entries are dropped.
|
|
25
|
+
*/
|
|
5
26
|
export declare function replyBubbleTexts(reply: ReplyBubbleInput): string[];
|
|
6
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Stream one reply as paced text chunks and bubble separators.
|
|
29
|
+
*
|
|
30
|
+
* Publish a validated reply without exposing its internal boundary to consumers. The pacing
|
|
31
|
+
* options are upper bounds, not exact timings: the pause and interval are clamped against
|
|
32
|
+
* `maxDurationMs`, so added delay never exceeds the budget while every chunk is still emitted.
|
|
33
|
+
*
|
|
34
|
+
* @param request - Reply text (bubbles separated by `REPLY_BUBBLE_BOUNDARY`) and pacing options.
|
|
35
|
+
* @param context - Execution context supplying the abort signal.
|
|
36
|
+
* @returns An async stream of `text` and `bubble` events, in order.
|
|
37
|
+
* @throws TypeError For a malformed request, missing signal, or invalid chunk/pacing values;
|
|
38
|
+
* aborts with the caller's signal.
|
|
39
|
+
*/
|
|
7
40
|
export declare function publishReplyEvents(request: {
|
|
8
41
|
text: string;
|
|
9
42
|
delivery?: ReplyDeliveryOptions;
|
|
10
43
|
}, context: ExecutionContext): AsyncIterable<AgentOutputEvent>;
|
|
11
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Serialize the event protocol for callers using a text stream.
|
|
46
|
+
*
|
|
47
|
+
* `preview` events are dropped because they are not final text; bubbles become the boundary
|
|
48
|
+
* character again, so a consumer can re-split the stream.
|
|
49
|
+
*
|
|
50
|
+
* @param events - Event stream carrying `text`, `bubble` or `preview` entries.
|
|
51
|
+
* @returns The equivalent string chunks.
|
|
52
|
+
*/
|
|
12
53
|
export declare function serializeOutputEvents(events: AsyncIterable<AgentOutputEvent>): AsyncIterable<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Wrap already-chunked text as `text` events.
|
|
56
|
+
*
|
|
57
|
+
* @param chunks - Text chunks in delivery order.
|
|
58
|
+
* @returns The same chunks as events.
|
|
59
|
+
*/
|
|
13
60
|
export declare function textOutputEvents(chunks: AsyncIterable<string>): AsyncIterable<AgentOutputEvent>;
|
|
14
|
-
export type { AgentOutputEvent, ReplyBubbleInput, ReplyDeliveryOptions } from '../../structs/kits/presentation/events.js';
|
|
61
|
+
export type { AgentOutputEvent, ReplyBubbleInput, ReplyDeliveryOptions, } from '../../structs/kits/presentation/events.js';
|
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
import { breakWhile } from '../../utils/rules.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Internal boundary between validated assistant bubbles. Never sent as visible text.
|
|
4
|
+
*
|
|
5
|
+
* U+001E (record separator) is a non-printing control character that ordinary replies do not
|
|
6
|
+
* contain, so splitting on it cannot truncate visible prose.
|
|
7
|
+
*/
|
|
3
8
|
export const REPLY_BUBBLE_BOUNDARY = '\u001e';
|
|
9
|
+
/**
|
|
10
|
+
* Collect the non-empty-text parts of a reply.
|
|
11
|
+
*
|
|
12
|
+
* @param reply - Primary text plus optional extra bubbles.
|
|
13
|
+
* @returns The text and every string bubble; non-string entries are dropped.
|
|
14
|
+
*/
|
|
4
15
|
export function replyBubbleTexts(reply) {
|
|
5
16
|
const { text, bubbles } = reply;
|
|
6
|
-
return [text, ...(Array.isArray(bubbles) ? bubbles : [])]
|
|
7
|
-
.filter((text) => typeof text === 'string');
|
|
17
|
+
return [text, ...(Array.isArray(bubbles) ? bubbles : [])].filter((text) => typeof text === 'string');
|
|
8
18
|
}
|
|
9
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Stream one reply as paced text chunks and bubble separators.
|
|
21
|
+
*
|
|
22
|
+
* Publish a validated reply without exposing its internal boundary to consumers. The pacing
|
|
23
|
+
* options are upper bounds, not exact timings: the pause and interval are clamped against
|
|
24
|
+
* `maxDurationMs`, so added delay never exceeds the budget while every chunk is still emitted.
|
|
25
|
+
*
|
|
26
|
+
* @param request - Reply text (bubbles separated by `REPLY_BUBBLE_BOUNDARY`) and pacing options.
|
|
27
|
+
* @param context - Execution context supplying the abort signal.
|
|
28
|
+
* @returns An async stream of `text` and `bubble` events, in order.
|
|
29
|
+
* @throws TypeError For a malformed request, missing signal, or invalid chunk/pacing values;
|
|
30
|
+
* aborts with the caller's signal.
|
|
31
|
+
*/
|
|
10
32
|
export async function* publishReplyEvents(request, context) {
|
|
11
33
|
breakWhile(!request || typeof request !== 'object', () => new TypeError('Use a named reply delivery request'));
|
|
12
34
|
const { text, delivery } = request, { signal } = context;
|
|
13
35
|
breakWhile(typeof text !== 'string' || !signal, () => new TypeError('Reply delivery requires text and ExecutionContext'));
|
|
14
36
|
breakWhile(delivery !== undefined && (!delivery || typeof delivery !== 'object'), () => new TypeError('Reply delivery requires named options'));
|
|
15
|
-
const { chunkSize = 240, intervalMs = 0, bubblePauseMs = 0, maxDurationMs = 3000 } = delivery ?? {};
|
|
37
|
+
const { chunkSize = 240, intervalMs = 0, bubblePauseMs = 0, maxDurationMs = 3000, } = delivery ?? {};
|
|
16
38
|
breakWhile(!Number.isSafeInteger(chunkSize) || chunkSize < 1, () => new TypeError('Invalid output chunk size'));
|
|
17
39
|
for (const [name, value] of Object.entries({ intervalMs, bubblePauseMs, maxDurationMs }))
|
|
18
40
|
breakWhile(!Number.isFinite(value) || value < 0, () => new TypeError(`Invalid ${name}`));
|
|
19
41
|
signal.throwIfAborted();
|
|
20
|
-
const bubbles = text.split(REPLY_BUBBLE_BOUNDARY).map(bubble => Array.from(bubble));
|
|
42
|
+
const bubbles = text.split(REPLY_BUBBLE_BOUNDARY).map((bubble) => Array.from(bubble));
|
|
21
43
|
const chunkCount = bubbles.reduce((sum, bubble) => sum + Math.ceil(bubble.length / chunkSize), 0);
|
|
22
44
|
const pause = Math.min(bubblePauseMs, maxDurationMs / Math.max(1, bubbles.length - 1));
|
|
23
|
-
const interval = Math.min(intervalMs, Math.max(0, maxDurationMs - pause * (bubbles.length - 1)) /
|
|
45
|
+
const interval = Math.min(intervalMs, Math.max(0, maxDurationMs - pause * (bubbles.length - 1)) /
|
|
46
|
+
Math.max(1, chunkCount - bubbles.filter((bubble) => bubble.length).length));
|
|
24
47
|
const deadline = performance.now() + maxDurationMs;
|
|
25
48
|
for (let bubble = 0; bubble < bubbles.length; bubble++) {
|
|
26
49
|
if (bubble) {
|
|
@@ -43,14 +66,29 @@ async function wait(milliseconds, signal) {
|
|
|
43
66
|
if (!milliseconds)
|
|
44
67
|
return;
|
|
45
68
|
await new Promise((resolve, reject) => {
|
|
46
|
-
const stop = () => {
|
|
47
|
-
|
|
69
|
+
const stop = () => {
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
signal.removeEventListener('abort', stop);
|
|
72
|
+
reject(signal.reason);
|
|
73
|
+
};
|
|
74
|
+
const timer = setTimeout(() => {
|
|
75
|
+
signal.removeEventListener('abort', stop);
|
|
76
|
+
resolve();
|
|
77
|
+
}, milliseconds);
|
|
48
78
|
signal.addEventListener('abort', stop, { once: true });
|
|
49
79
|
if (signal.aborted)
|
|
50
80
|
stop();
|
|
51
81
|
});
|
|
52
82
|
}
|
|
53
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Serialize the event protocol for callers using a text stream.
|
|
85
|
+
*
|
|
86
|
+
* `preview` events are dropped because they are not final text; bubbles become the boundary
|
|
87
|
+
* character again, so a consumer can re-split the stream.
|
|
88
|
+
*
|
|
89
|
+
* @param events - Event stream carrying `text`, `bubble` or `preview` entries.
|
|
90
|
+
* @returns The equivalent string chunks.
|
|
91
|
+
*/
|
|
54
92
|
export async function* serializeOutputEvents(events) {
|
|
55
93
|
for await (const event of events) {
|
|
56
94
|
if (event.type === 'preview')
|
|
@@ -58,6 +96,12 @@ export async function* serializeOutputEvents(events) {
|
|
|
58
96
|
yield event.type === 'bubble' ? REPLY_BUBBLE_BOUNDARY : event.text;
|
|
59
97
|
}
|
|
60
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Wrap already-chunked text as `text` events.
|
|
101
|
+
*
|
|
102
|
+
* @param chunks - Text chunks in delivery order.
|
|
103
|
+
* @returns The same chunks as events.
|
|
104
|
+
*/
|
|
61
105
|
export async function* textOutputEvents(chunks) {
|
|
62
106
|
for await (const text of chunks)
|
|
63
107
|
yield { type: 'text', text };
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation Kit entry: output contracts, text templates, semantic slots, variants and the
|
|
3
|
+
* reply/chunk event stream.
|
|
4
|
+
*
|
|
5
|
+
* Place in the package: an optional App-side library for shaping what the user finally sees.
|
|
6
|
+
* The App owns copy, styling and transport; this directory owns contract validation, template
|
|
7
|
+
* substitution, variant selection and the bubble/chunk protocol.
|
|
8
|
+
*
|
|
9
|
+
* Exports: everything from `./outputs.js`, `./variants.js`, `./templates.js` and `./events.js`,
|
|
10
|
+
* plus the `Presentation` namespace object.
|
|
11
|
+
*/
|
|
1
12
|
export * from './outputs.js';
|
|
2
13
|
export * from './variants.js';
|
|
3
14
|
export type * from '../../structs/kits/presentation/outputs.js';
|
|
@@ -7,6 +18,7 @@ import { defineOutputCatalog } from './outputs.js';
|
|
|
7
18
|
import { defineTextTemplate, defineSemanticSlots } from './templates.js';
|
|
8
19
|
import { selectVariant, resolvePreference } from './variants.js';
|
|
9
20
|
import { replyBubbleTexts, publishReplyEvents, serializeOutputEvents, textOutputEvents } from './events.js';
|
|
21
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
10
22
|
export declare const Presentation: Readonly<{
|
|
11
23
|
defineOutputCatalog: typeof defineOutputCatalog;
|
|
12
24
|
defineTextTemplate: typeof defineTextTemplate;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation Kit entry: output contracts, text templates, semantic slots, variants and the
|
|
3
|
+
* reply/chunk event stream.
|
|
4
|
+
*
|
|
5
|
+
* Place in the package: an optional App-side library for shaping what the user finally sees.
|
|
6
|
+
* The App owns copy, styling and transport; this directory owns contract validation, template
|
|
7
|
+
* substitution, variant selection and the bubble/chunk protocol.
|
|
8
|
+
*
|
|
9
|
+
* Exports: everything from `./outputs.js`, `./variants.js`, `./templates.js` and `./events.js`,
|
|
10
|
+
* plus the `Presentation` namespace object.
|
|
11
|
+
*/
|
|
1
12
|
export * from './outputs.js';
|
|
2
13
|
export * from './variants.js';
|
|
3
14
|
export * from './templates.js';
|
|
@@ -5,5 +16,17 @@ export * from './events.js';
|
|
|
5
16
|
import { defineOutputCatalog } from './outputs.js';
|
|
6
17
|
import { defineTextTemplate, defineSemanticSlots } from './templates.js';
|
|
7
18
|
import { selectVariant, resolvePreference } from './variants.js';
|
|
8
|
-
import { REPLY_BUBBLE_BOUNDARY, replyBubbleTexts, publishReplyEvents, serializeOutputEvents, textOutputEvents } from './events.js';
|
|
9
|
-
|
|
19
|
+
import { REPLY_BUBBLE_BOUNDARY, replyBubbleTexts, publishReplyEvents, serializeOutputEvents, textOutputEvents, } from './events.js';
|
|
20
|
+
/** Namespace object for callers that prefer one import over named helpers. */
|
|
21
|
+
export const Presentation = Object.freeze({
|
|
22
|
+
defineOutputCatalog,
|
|
23
|
+
defineTextTemplate,
|
|
24
|
+
defineSemanticSlots,
|
|
25
|
+
selectVariant,
|
|
26
|
+
resolvePreference,
|
|
27
|
+
REPLY_BUBBLE_BOUNDARY,
|
|
28
|
+
replyBubbleTexts,
|
|
29
|
+
publishReplyEvents,
|
|
30
|
+
serializeOutputEvents,
|
|
31
|
+
textOutputEvents,
|
|
32
|
+
});
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import type { OperationContext } from '../../structs/common.js';
|
|
2
2
|
import type { OutputDefinition, OutputField, OutputComposeInput, OutputIssue, OutputResult, OutputCatalogOptions } from '../../structs/kits/presentation/outputs.js';
|
|
3
|
+
/**
|
|
4
|
+
* Compile output definitions into one catalog.
|
|
5
|
+
*
|
|
6
|
+
* Compilation is where most mistakes surface: group membership is checked for cycles, master
|
|
7
|
+
* templates must have exactly one slot per field, and every `bound`/`semantic` field must name
|
|
8
|
+
* a registered provider. Composition then trusts the compiled catalog.
|
|
9
|
+
*
|
|
10
|
+
* @param definitions - Output definitions with unique ids and a supported `kind`.
|
|
11
|
+
* @param options - Provider list and an optional observer for composed results.
|
|
12
|
+
* @returns A frozen catalog extended with `toModelSchema`, `check` and `compose`.
|
|
13
|
+
* @throws TypeError For an invalid id or kind, a malformed group, mismatched master slots,
|
|
14
|
+
* an invalid field owner or semantic keys, or an unknown provider id.
|
|
15
|
+
*/
|
|
3
16
|
export declare function defineOutputCatalog<App = unknown>(definitions: readonly OutputDefinition[], options?: OutputCatalogOptions<App>): Readonly<{
|
|
17
|
+
/** JSON schema of the fields a model must generate for this output. */
|
|
4
18
|
toModelSchema: (id: string) => {
|
|
5
19
|
type: string;
|
|
6
20
|
properties: {
|
|
@@ -9,6 +23,12 @@ export declare function defineOutputCatalog<App = unknown>(definitions: readonly
|
|
|
9
23
|
required: string[];
|
|
10
24
|
additionalProperties: boolean;
|
|
11
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Validate a generated value without composing it.
|
|
28
|
+
*
|
|
29
|
+
* @param request - Output id and the candidate value.
|
|
30
|
+
* @returns `passed` or `failed` with the collected issues and accepted values.
|
|
31
|
+
*/
|
|
12
32
|
check(request: {
|
|
13
33
|
outputId: string;
|
|
14
34
|
value: unknown;
|
|
@@ -17,6 +37,15 @@ export declare function defineOutputCatalog<App = unknown>(definitions: readonly
|
|
|
17
37
|
value: Record<string, unknown>;
|
|
18
38
|
issues: OutputIssue[];
|
|
19
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Compose the final output value from generated fields, providers and constants.
|
|
42
|
+
*
|
|
43
|
+
* @param request - Output id and the generated/group input.
|
|
44
|
+
* @param context - Operation context; cancellation is checked between every step.
|
|
45
|
+
* @returns The frozen composed result, also forwarded to the observer.
|
|
46
|
+
* @throws TypeError For a malformed request, missing context, rejected generated fields
|
|
47
|
+
* (carrying `issues`), a non-synchronous provider, or a text output that is not a string.
|
|
48
|
+
*/
|
|
20
49
|
compose(request: {
|
|
21
50
|
outputId: string;
|
|
22
51
|
input: OutputComposeInput;
|
|
@@ -64,4 +93,4 @@ export declare function defineOutputCatalog<App = unknown>(definitions: readonly
|
|
|
64
93
|
maxItems?: number | undefined;
|
|
65
94
|
}>;
|
|
66
95
|
}>;
|
|
67
|
-
export type { OutputDefinition, OutputField, OutputProvider, OutputComposeInput, OutputIssue, OutputResult, OutputCatalogOptions } from '../../structs/kits/presentation/outputs.js';
|
|
96
|
+
export type { OutputDefinition, OutputField, OutputProvider, OutputComposeInput, OutputIssue, OutputResult, OutputCatalogOptions, } from '../../structs/kits/presentation/outputs.js';
|