@bolt-foundry/gambit-core 0.8.1 → 0.8.5-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -34
- package/cards/context.card.md +5 -5
- package/cards/generate-test-input.card.md +12 -0
- package/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/esm/cards/context.card.md +9 -0
- package/esm/cards/end.card.md +10 -0
- package/esm/cards/generate-test-input.card.md +12 -0
- package/esm/cards/respond.card.md +10 -0
- package/esm/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/esm/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/esm/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/esm/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/{script/deps/jsr.io/@std/collections/1.1.4 → esm/deps/jsr.io/@std/collections/1.1.6}/deep_merge.d.ts +2 -2
- package/esm/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.js +29 -19
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +1 -1
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_loader_state.d.ts +0 -5
- package/esm/deps/jsr.io/@std/yaml/1.0.12/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_loader_state.js +216 -175
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_type/map.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_type/seq.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.js +0 -2
- package/esm/mod.d.ts +20 -10
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +11 -5
- package/esm/schemas/graders/contexts/conversation.d.ts +22 -0
- package/esm/schemas/graders/contexts/conversation.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation.js +17 -0
- package/esm/schemas/graders/contexts/conversation.ts +40 -0
- package/esm/schemas/graders/contexts/conversation.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/conversation.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation.zod.js +2 -0
- package/esm/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.d.ts +31 -0
- package/esm/schemas/graders/contexts/conversation_tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.js +25 -0
- package/esm/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/esm/schemas/graders/contexts/tools.d.ts +4 -0
- package/esm/schemas/graders/contexts/tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/tools.js +3 -0
- package/esm/schemas/graders/contexts/tools.ts +5 -0
- package/esm/schemas/graders/contexts/tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/tools.zod.ts +1 -0
- package/esm/schemas/graders/contexts/turn.d.ts +10 -0
- package/esm/schemas/graders/contexts/turn.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn.js +8 -0
- package/esm/schemas/graders/contexts/turn.ts +17 -0
- package/esm/schemas/graders/contexts/turn.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/turn.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn.zod.js +2 -0
- package/esm/schemas/graders/contexts/turn.zod.ts +1 -0
- package/esm/schemas/graders/contexts/turn_tools.d.ts +32 -0
- package/esm/schemas/graders/contexts/turn_tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn_tools.js +28 -0
- package/esm/schemas/graders/contexts/turn_tools.ts +63 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/esm/schemas/graders/grader_output.d.ts +10 -0
- package/esm/schemas/graders/grader_output.d.ts.map +1 -0
- package/esm/schemas/graders/grader_output.js +8 -0
- package/esm/schemas/graders/grader_output.ts +15 -0
- package/esm/schemas/graders/grader_output.zod.d.ts +3 -0
- package/esm/schemas/graders/grader_output.zod.d.ts.map +1 -0
- package/esm/schemas/graders/grader_output.zod.js +2 -0
- package/esm/schemas/graders/grader_output.zod.ts +1 -0
- package/esm/schemas/graders/respond.d.ts +12 -0
- package/esm/schemas/graders/respond.d.ts.map +1 -0
- package/esm/schemas/graders/respond.js +10 -0
- package/esm/schemas/graders/respond.ts +19 -0
- package/esm/schemas/graders/respond.zod.d.ts +3 -0
- package/esm/schemas/graders/respond.zod.d.ts.map +1 -0
- package/esm/schemas/graders/respond.zod.js +2 -0
- package/esm/schemas/graders/respond.zod.ts +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.d.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.js +5 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.d.ts +3 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.js +2 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/esm/schemas/scenarios/plain_chat_output.d.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_output.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_output.js +4 -0
- package/esm/schemas/scenarios/plain_chat_output.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.d.ts +3 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.js +2 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/esm/snippets/context.md +8 -0
- package/esm/snippets/end.md +10 -0
- package/esm/snippets/generate-test-input.md +12 -0
- package/esm/snippets/init.md +12 -0
- package/esm/snippets/respond.md +10 -0
- package/esm/snippets/scenario-participant.md +10 -0
- package/esm/src/builtins.d.ts +2 -0
- package/esm/src/builtins.d.ts.map +1 -1
- package/esm/src/builtins.js +45 -1
- package/esm/src/constants.d.ts +4 -1
- package/esm/src/constants.d.ts.map +1 -1
- package/esm/src/constants.js +5 -4
- package/esm/src/definitions.d.ts +5 -1
- package/esm/src/definitions.d.ts.map +1 -1
- package/esm/src/loader.d.ts.map +1 -1
- package/esm/src/loader.js +220 -13
- package/esm/src/markdown.d.ts.map +1 -1
- package/esm/src/markdown.js +322 -53
- package/esm/src/permissions.d.ts +143 -0
- package/esm/src/permissions.d.ts.map +1 -0
- package/esm/src/permissions.js +406 -0
- package/esm/src/render.d.ts.map +1 -1
- package/esm/src/render.js +22 -8
- package/esm/src/runtime.d.ts +44 -3
- package/esm/src/runtime.d.ts.map +1 -1
- package/esm/src/runtime.js +4629 -407
- package/esm/src/runtime_exec_host.d.ts +6 -0
- package/esm/src/runtime_exec_host.d.ts.map +1 -0
- package/esm/src/runtime_exec_host.js +17 -0
- package/esm/src/runtime_exec_host_contract.d.ts +23 -0
- package/esm/src/runtime_exec_host_contract.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_contract.js +14 -0
- package/esm/src/runtime_exec_host_deno.d.ts +3 -0
- package/esm/src/runtime_exec_host_deno.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_deno.js +35 -0
- package/esm/src/runtime_exec_host_unsupported.d.ts +3 -0
- package/esm/src/runtime_exec_host_unsupported.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_unsupported.js +8 -0
- package/esm/src/runtime_worker_host.d.ts +6 -0
- package/esm/src/runtime_worker_host.d.ts.map +1 -0
- package/esm/src/runtime_worker_host.js +17 -0
- package/esm/src/runtime_worker_host_contract.d.ts +33 -0
- package/esm/src/runtime_worker_host_contract.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_contract.js +14 -0
- package/esm/src/runtime_worker_host_deno.d.ts +3 -0
- package/esm/src/runtime_worker_host_deno.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_deno.js +26 -0
- package/esm/src/runtime_worker_host_unsupported.d.ts +3 -0
- package/esm/src/runtime_worker_host_unsupported.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_unsupported.js +8 -0
- package/esm/src/state.d.ts +4 -1
- package/esm/src/state.d.ts.map +1 -1
- package/esm/src/state.js +48 -2
- package/esm/src/types.d.ts +405 -1
- package/esm/src/types.d.ts.map +1 -1
- package/esm/src/types.js +102 -1
- package/package.json +73 -2
- package/schemas/graders/contexts/conversation.ts +32 -9
- package/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/schemas/graders/contexts/tools.ts +5 -0
- package/schemas/graders/contexts/tools.zod.ts +1 -0
- package/schemas/graders/contexts/turn.ts +8 -1
- package/schemas/graders/contexts/turn.zod.ts +1 -0
- package/schemas/graders/contexts/turn_tools.ts +63 -0
- package/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/schemas/graders/grader_output.ts +15 -0
- package/schemas/graders/grader_output.zod.ts +1 -0
- package/schemas/graders/respond.ts +13 -3
- package/schemas/graders/respond.zod.ts +1 -0
- package/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/schemas/scenarios/plain_chat_output.ts +5 -0
- package/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/script/cards/context.card.md +9 -0
- package/script/cards/end.card.md +10 -0
- package/script/cards/generate-test-input.card.md +12 -0
- package/script/cards/respond.card.md +10 -0
- package/script/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/script/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/script/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/script/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/{esm/deps/jsr.io/@std/collections/1.1.4 → script/deps/jsr.io/@std/collections/1.1.6}/deep_merge.d.ts +2 -2
- package/script/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.js +29 -19
- package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +1 -1
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_loader_state.d.ts +0 -5
- package/script/deps/jsr.io/@std/yaml/1.0.12/_loader_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_loader_state.js +216 -175
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_type/map.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_type/seq.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.js +0 -2
- package/script/mod.d.ts +20 -10
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +25 -9
- package/script/schemas/graders/contexts/conversation.d.ts +22 -0
- package/script/schemas/graders/contexts/conversation.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation.js +20 -0
- package/script/schemas/graders/contexts/conversation.ts +40 -0
- package/script/schemas/graders/contexts/conversation.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/conversation.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation.zod.js +9 -0
- package/script/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/script/schemas/graders/contexts/conversation_tools.d.ts +31 -0
- package/script/schemas/graders/contexts/conversation_tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation_tools.js +28 -0
- package/script/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.js +9 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/script/schemas/graders/contexts/tools.d.ts +4 -0
- package/script/schemas/graders/contexts/tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/tools.js +12 -0
- package/script/schemas/graders/contexts/tools.ts +5 -0
- package/script/schemas/graders/contexts/tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/tools.zod.js +9 -0
- package/script/schemas/graders/contexts/tools.zod.ts +1 -0
- package/script/schemas/graders/contexts/turn.d.ts +10 -0
- package/script/schemas/graders/contexts/turn.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn.js +10 -0
- package/script/schemas/graders/contexts/turn.ts +17 -0
- package/script/schemas/graders/contexts/turn.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/turn.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn.zod.js +9 -0
- package/script/schemas/graders/contexts/turn.zod.ts +1 -0
- package/script/schemas/graders/contexts/turn_tools.d.ts +32 -0
- package/script/schemas/graders/contexts/turn_tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn_tools.js +31 -0
- package/script/schemas/graders/contexts/turn_tools.ts +63 -0
- package/script/schemas/graders/contexts/turn_tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/turn_tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn_tools.zod.js +9 -0
- package/script/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/script/schemas/graders/grader_output.d.ts +10 -0
- package/script/schemas/graders/grader_output.d.ts.map +1 -0
- package/script/schemas/graders/grader_output.js +10 -0
- package/script/schemas/graders/grader_output.ts +15 -0
- package/script/schemas/graders/grader_output.zod.d.ts +3 -0
- package/script/schemas/graders/grader_output.zod.d.ts.map +1 -0
- package/script/schemas/graders/grader_output.zod.js +9 -0
- package/script/schemas/graders/grader_output.zod.ts +1 -0
- package/script/schemas/graders/respond.d.ts +12 -0
- package/script/schemas/graders/respond.d.ts.map +1 -0
- package/script/schemas/graders/respond.js +12 -0
- package/script/schemas/graders/respond.ts +19 -0
- package/script/schemas/graders/respond.zod.d.ts +3 -0
- package/script/schemas/graders/respond.zod.d.ts.map +1 -0
- package/script/schemas/graders/respond.zod.js +9 -0
- package/script/schemas/graders/respond.zod.ts +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.d.ts +5 -0
- package/script/schemas/scenarios/plain_chat_input_optional.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.js +7 -0
- package/script/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.d.ts +3 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.js +9 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/script/schemas/scenarios/plain_chat_output.d.ts +5 -0
- package/script/schemas/scenarios/plain_chat_output.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_output.js +6 -0
- package/script/schemas/scenarios/plain_chat_output.ts +5 -0
- package/script/schemas/scenarios/plain_chat_output.zod.d.ts +3 -0
- package/script/schemas/scenarios/plain_chat_output.zod.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_output.zod.js +9 -0
- package/script/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/script/snippets/context.md +8 -0
- package/script/snippets/end.md +10 -0
- package/script/snippets/generate-test-input.md +12 -0
- package/script/snippets/init.md +12 -0
- package/script/snippets/respond.md +10 -0
- package/script/snippets/scenario-participant.md +10 -0
- package/script/src/builtins.d.ts +2 -0
- package/script/src/builtins.d.ts.map +1 -1
- package/script/src/builtins.js +47 -1
- package/script/src/constants.d.ts +4 -1
- package/script/src/constants.d.ts.map +1 -1
- package/script/src/constants.js +6 -5
- package/script/src/definitions.d.ts +5 -1
- package/script/src/definitions.d.ts.map +1 -1
- package/script/src/loader.d.ts.map +1 -1
- package/script/src/loader.js +219 -12
- package/script/src/markdown.d.ts.map +1 -1
- package/script/src/markdown.js +321 -52
- package/script/src/permissions.d.ts +143 -0
- package/script/src/permissions.d.ts.map +1 -0
- package/script/src/permissions.js +453 -0
- package/script/src/render.d.ts.map +1 -1
- package/script/src/render.js +22 -8
- package/script/src/runtime.d.ts +44 -3
- package/script/src/runtime.d.ts.map +1 -1
- package/script/src/runtime.js +4631 -406
- package/script/src/runtime_exec_host.d.ts +6 -0
- package/script/src/runtime_exec_host.d.ts.map +1 -0
- package/script/src/runtime_exec_host.js +56 -0
- package/script/src/runtime_exec_host_contract.d.ts +23 -0
- package/script/src/runtime_exec_host_contract.d.ts.map +1 -0
- package/script/src/runtime_exec_host_contract.js +18 -0
- package/script/src/runtime_exec_host_deno.d.ts +3 -0
- package/script/src/runtime_exec_host_deno.d.ts.map +1 -0
- package/script/src/runtime_exec_host_deno.js +71 -0
- package/script/src/runtime_exec_host_unsupported.d.ts +3 -0
- package/script/src/runtime_exec_host_unsupported.d.ts.map +1 -0
- package/script/src/runtime_exec_host_unsupported.js +11 -0
- package/script/src/runtime_worker_host.d.ts +6 -0
- package/script/src/runtime_worker_host.d.ts.map +1 -0
- package/script/src/runtime_worker_host.js +56 -0
- package/script/src/runtime_worker_host_contract.d.ts +33 -0
- package/script/src/runtime_worker_host_contract.d.ts.map +1 -0
- package/script/src/runtime_worker_host_contract.js +18 -0
- package/script/src/runtime_worker_host_deno.d.ts +3 -0
- package/script/src/runtime_worker_host_deno.d.ts.map +1 -0
- package/script/src/runtime_worker_host_deno.js +62 -0
- package/script/src/runtime_worker_host_unsupported.d.ts +3 -0
- package/script/src/runtime_worker_host_unsupported.d.ts.map +1 -0
- package/script/src/runtime_worker_host_unsupported.js +11 -0
- package/script/src/state.d.ts +4 -1
- package/script/src/state.d.ts.map +1 -1
- package/script/src/state.js +48 -2
- package/script/src/types.d.ts +405 -1
- package/script/src/types.d.ts.map +1 -1
- package/script/src/types.js +103 -0
- package/snippets/context.md +8 -0
- package/snippets/end.md +10 -0
- package/snippets/generate-test-input.md +12 -0
- package/snippets/init.md +12 -0
- package/snippets/respond.md +10 -0
- package/snippets/scenario-participant.md +10 -0
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts +0 -6
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.js +0 -18
- package/esm/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts.map +0 -1
- package/esm/src/openai_compat.d.ts +0 -63
- package/esm/src/openai_compat.d.ts.map +0 -1
- package/esm/src/openai_compat.js +0 -272
- package/esm/src/providers/openrouter.d.ts +0 -8
- package/esm/src/providers/openrouter.d.ts.map +0 -1
- package/esm/src/providers/openrouter.js +0 -168
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts +0 -6
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.js +0 -21
- package/script/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts.map +0 -1
- package/script/src/openai_compat.d.ts +0 -63
- package/script/src/openai_compat.d.ts.map +0 -1
- package/script/src/openai_compat.js +0 -276
- package/script/src/providers/openrouter.d.ts +0 -8
- package/script/src/providers/openrouter.d.ts.map +0 -1
- package/script/src/providers/openrouter.js +0 -207
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Core runtime, definitions, and utilities for building Gambit decks outside of
|
|
4
4
|
the CLI. It includes the loader for Markdown/TypeScript decks, guardrail-aware
|
|
5
|
-
execution,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
execution, and helpers for persisting local run state. The
|
|
6
|
+
[`@bolt-foundry/gambit`](../gambit/README.md) package re-exports these APIs plus
|
|
7
|
+
the CLI, but `gambit-core` stays focused on the authoring/runtime pieces that
|
|
8
|
+
can live in any host.
|
|
9
9
|
|
|
10
10
|
> **Gambit vs. Gambit Core**
|
|
11
11
|
>
|
|
@@ -22,13 +22,13 @@ authoring/runtime pieces that can live in any host.
|
|
|
22
22
|
|
|
23
23
|
- Typed deck/card definitions with [`defineDeck`](src/definitions.ts) and
|
|
24
24
|
[`defineCard`](src/definitions.ts) that enforce Zod
|
|
25
|
-
`
|
|
25
|
+
`contextSchema`/`responseSchema`.
|
|
26
26
|
- Loader that understands Markdown decks/cards, inline embeds, and companion
|
|
27
27
|
decks (`actionDecks`, `testDecks`, `graderDecks`).
|
|
28
28
|
- Guardrail-aware runtime (`runDeck`) that can mix LLM actions and pure compute
|
|
29
29
|
decks with structured tracing and execution context helpers.
|
|
30
|
-
-
|
|
31
|
-
|
|
30
|
+
- Response-first runtime helpers that plug into any model provider implementing
|
|
31
|
+
the core `ModelProvider` interface.
|
|
32
32
|
- State utilities (`loadState`/`saveState`) used by the Gambit simulator for
|
|
33
33
|
local-first transcripts, feedback, and notes.
|
|
34
34
|
|
|
@@ -58,13 +58,13 @@ etc.).
|
|
|
58
58
|
|
|
59
59
|
## Core concepts
|
|
60
60
|
|
|
61
|
-
- **Decks**: The primary executable unit. Decks declare a label,
|
|
62
|
-
`
|
|
63
|
-
(actions/tests/graders). Decks with `modelParams` render
|
|
64
|
-
with `run`/`execute` are compute-only.
|
|
61
|
+
- **Decks**: The primary executable unit. Decks declare a label,
|
|
62
|
+
`contextSchema`, `responseSchema`, optional `body`/`prompt`, handler hooks,
|
|
63
|
+
and companion decks (actions/tests/graders). Decks with `modelParams` render
|
|
64
|
+
prompts, while decks with `run`/`execute` are compute-only.
|
|
65
65
|
- **Cards**: Reusable prompt fragments or schema fragments that can be embedded
|
|
66
66
|
within decks or other cards. Cards can contribute
|
|
67
|
-
`
|
|
67
|
+
`contextFragment`/`responseFragment` that merge into a parent deck’s schema.
|
|
68
68
|
- **Guardrails**: Limit recursion with `maxDepth`, `maxPasses`, and `timeoutMs`.
|
|
69
69
|
Decks can override guardrails per definition; `runDeck` enforces them while
|
|
70
70
|
spawning child decks.
|
|
@@ -86,8 +86,8 @@ import { z } from "zod";
|
|
|
86
86
|
|
|
87
87
|
export default defineDeck({
|
|
88
88
|
label: "Hello World",
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
contextSchema: z.object({ user: z.string() }),
|
|
90
|
+
responseSchema: z.object({ reply: z.string() }),
|
|
91
91
|
body: `
|
|
92
92
|
You are a helpful assistant that greets the user by name.
|
|
93
93
|
`,
|
|
@@ -107,11 +107,19 @@ import { z } from "zod";
|
|
|
107
107
|
|
|
108
108
|
export default defineCard({
|
|
109
109
|
label: "Shared context",
|
|
110
|
-
|
|
110
|
+
contextFragment: z.object({ customerId: z.string().uuid() }),
|
|
111
111
|
body: "Always double check the account number before responding.",
|
|
112
112
|
});
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
For built-in Gambit schemas in TypeScript/compute decks, use canonical module
|
|
116
|
+
subpaths:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
import contextSchema from "@bolt-foundry/gambit-core/schemas/scenarios/plain_chat_input_optional.zod.ts";
|
|
120
|
+
import responseSchema from "@bolt-foundry/gambit-core/schemas/scenarios/plain_chat_output.zod.ts";
|
|
121
|
+
```
|
|
122
|
+
|
|
115
123
|
## Running decks programmatically
|
|
116
124
|
|
|
117
125
|
The runtime loads the deck (Markdown or TS) and steps through each pass. Provide
|
|
@@ -145,7 +153,13 @@ When the deck defines `run`/`execute`, the runtime hands you an
|
|
|
145
153
|
[`ExecutionContext`](src/types.ts) with:
|
|
146
154
|
|
|
147
155
|
- `ctx.input`: validated input (narrowable when you type the schema).
|
|
148
|
-
- `ctx.
|
|
156
|
+
- `ctx.initialUserMessage`: current turn user message when provided by caller.
|
|
157
|
+
- `ctx.getSessionMeta(key)`: read persisted run/session metadata.
|
|
158
|
+
- `ctx.setSessionMeta(key, value)`: persist metadata for later turns.
|
|
159
|
+
- `ctx.appendMessage({ role, content })`: append chat transcript messages from
|
|
160
|
+
execute decks.
|
|
161
|
+
- `ctx.spawnAndWait({ path, input, initialUserMessage? })`: call another deck
|
|
162
|
+
and await the result; user message is inherited by default unless overridden.
|
|
149
163
|
- `ctx.return(payload)`: respond early without running guards again.
|
|
150
164
|
- `ctx.fail({ message, code?, details? })`: aborts the run (throws).
|
|
151
165
|
- `ctx.log(...)`: emit structured trace entries for observability.
|
|
@@ -153,6 +167,22 @@ When the deck defines `run`/`execute`, the runtime hands you an
|
|
|
153
167
|
Pass `guardrails`, `initialUserMessage`, `modelOverride`, and
|
|
154
168
|
`allowRootStringInput` to `runDeck` when scripting custom runtimes.
|
|
155
169
|
|
|
170
|
+
### Worker sandbox behavior in `runDeck`
|
|
171
|
+
|
|
172
|
+
`gambit-core` keeps worker sandboxing opt-in and host-scoped:
|
|
173
|
+
|
|
174
|
+
- `runDeck` enables worker sandboxing only when `workerSandbox: true` is passed
|
|
175
|
+
(or when `GAMBIT_DECK_WORKER_SANDBOX=1|true|yes` is set in Deno).
|
|
176
|
+
- In Deno hosts, worker sandboxing keeps the current worker permission
|
|
177
|
+
enforcement model.
|
|
178
|
+
- In npm/Node/Bun hosts, requesting `workerSandbox: true` throws
|
|
179
|
+
`WorkerSandboxUnsupportedHostError`
|
|
180
|
+
(`code: "worker_sandbox_unsupported_host"`).
|
|
181
|
+
- `workerSandbox: true` with `signal` also throws
|
|
182
|
+
(`code: "worker_sandbox_signal_unsupported"`), because abort signaling is not
|
|
183
|
+
bridged into worker runtimes yet.
|
|
184
|
+
- If sandboxing is not requested, `runDeck` executes in-process.
|
|
185
|
+
|
|
156
186
|
## Loading Markdown decks and cards
|
|
157
187
|
|
|
158
188
|
Markdown files use front matter for metadata, with the body becoming the prompt.
|
|
@@ -161,8 +191,8 @@ Embedded cards or system hints can be referenced with markdown image syntax.
|
|
|
161
191
|
```
|
|
162
192
|
---
|
|
163
193
|
label: Support Triage
|
|
164
|
-
|
|
165
|
-
|
|
194
|
+
contextSchema: ./schemas/triage_input.ts
|
|
195
|
+
responseSchema: ./schemas/triage_output.ts
|
|
166
196
|
actionDecks:
|
|
167
197
|
- name: escalate
|
|
168
198
|
description: Escalate to a manager
|
|
@@ -181,25 +211,23 @@ clarifying questions before choosing an action.
|
|
|
181
211
|
`loadDeck` normalizes relative paths, merges card fragments, enforces unique
|
|
182
212
|
action names, and warns about deprecated fields (`actions`,
|
|
183
213
|
`handlers.onInterval`, `intervalMs`). The Markdown loader also injects helper
|
|
184
|
-
text for built-in tools like `
|
|
185
|
-
|
|
214
|
+
text for built-in tools like `gambit_context` when you add `gambit://` markers.
|
|
215
|
+
Legacy `gambit_respond` and `gambit_end` markers are migration-only and now
|
|
216
|
+
hard-fail in default runtime paths.
|
|
186
217
|
|
|
187
218
|
## Compatibility and utilities
|
|
188
219
|
|
|
189
|
-
- **Chat Completions bridge**: [`chatCompletionsWithDeck`](src/openai_compat.ts)
|
|
190
|
-
lets you present a single deck as an OpenAI-compatible endpoint. It normalizes
|
|
191
|
-
tool calls, enforces deck schemas, and returns Chat Completions–shaped
|
|
192
|
-
responses with a `gambit` metadata extension.
|
|
193
220
|
- **Request rendering**: [`renderDeck`](src/render.ts) merges an existing Chat
|
|
194
221
|
Completions request with the deck’s system prompt and tool schema, so you can
|
|
195
222
|
debug what will actually reach the model or feed it into another orchestrator.
|
|
196
|
-
- **Model providers**:
|
|
197
|
-
|
|
198
|
-
|
|
223
|
+
- **Model providers**: adapters live in `@bolt-foundry/gambit` (see
|
|
224
|
+
`packages/gambit/src/providers/openrouter.ts`). Implement your own provider by
|
|
225
|
+
conforming to the `responses()` signature in `ModelProvider`.
|
|
199
226
|
- **Constants**:
|
|
200
|
-
[`
|
|
201
|
-
|
|
202
|
-
|
|
227
|
+
[`GAMBIT_TOOL_CONTEXT`, `GAMBIT_TOOL_RESPOND`, `GAMBIT_TOOL_END`](src/constants.ts)
|
|
228
|
+
(`GAMBIT_TOOL_INIT` remains as a deprecated alias). `GAMBIT_TOOL_RESPOND` and
|
|
229
|
+
`GAMBIT_TOOL_END` remain for migration detection and legacy trace handling;
|
|
230
|
+
default runtime paths no longer expose them as callable synthetic tools.
|
|
203
231
|
|
|
204
232
|
## Persisted state and traces
|
|
205
233
|
|
|
@@ -214,7 +242,7 @@ stream them to your own observability stack.
|
|
|
214
242
|
|
|
215
243
|
## Local development
|
|
216
244
|
|
|
217
|
-
From
|
|
245
|
+
From this package directory:
|
|
218
246
|
|
|
219
247
|
```
|
|
220
248
|
deno task fmt # format sources
|
|
@@ -223,6 +251,5 @@ deno task test # run unit tests (allowing net/fs as required)
|
|
|
223
251
|
deno task build_npm # emit the npm bundle via dnt
|
|
224
252
|
```
|
|
225
253
|
|
|
226
|
-
Tests exercise the Markdown loader, renderer,
|
|
227
|
-
|
|
228
|
-
necessary.
|
|
254
|
+
Tests exercise the Markdown loader, renderer, and runtime guardrails. Update
|
|
255
|
+
snapshots/fixtures via `deno test -- --update` when necessary.
|
package/cards/context.card.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
label = "Gambit context primer"
|
|
3
3
|
+++
|
|
4
4
|
|
|
5
|
-
You will automatically receive a `
|
|
6
|
-
run whenever the caller supplies `--context
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
You will automatically receive a `gambit_context` tool result at the start of
|
|
6
|
+
the run whenever the caller supplies `--context`. This payload contains run
|
|
7
|
+
metadata or seeded inputs. Read it before you respond, treat it as trusted
|
|
8
|
+
context, and keep it on hand throughout the workflow so downstream actions have
|
|
9
|
+
the right data. Do not call `gambit_context` yourself; runtime injects it once.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Generate test input"
|
|
3
|
+
+++
|
|
4
|
+
|
|
5
|
+
When you receive a user message with:
|
|
6
|
+
|
|
7
|
+
{ "type": "gambit_test_bot_init_fill", "missing": ["path.to.field", "..."],
|
|
8
|
+
"current": { ... }, "schemaHints": [ ... ] }
|
|
9
|
+
|
|
10
|
+
Return ONLY valid JSON that supplies values for the missing fields. Do not
|
|
11
|
+
include any fields that are not listed in "missing". If the only missing path is
|
|
12
|
+
"(root)", return the full init JSON value.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Anthropic agent SDK bridge"
|
|
3
|
+
contextSchema = "gambit://schemas/scenarios/plain_chat_input_optional.zod.ts"
|
|
4
|
+
responseSchema = "gambit://schemas/scenarios/plain_chat_output.zod.ts"
|
|
5
|
+
+++
|
|
6
|
+
|
|
7
|
+
This stdlib deck provides the default bridge between the Anthropic agent SDK
|
|
8
|
+
runtime and Gambit decks. It is intentionally minimal; downstream runners supply
|
|
9
|
+
the actual runtime behavior.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Codex SDK bridge"
|
|
3
|
+
contextSchema = "gambit://schemas/scenarios/plain_chat_input_optional.zod.ts"
|
|
4
|
+
responseSchema = "gambit://schemas/scenarios/plain_chat_output.zod.ts"
|
|
5
|
+
+++
|
|
6
|
+
|
|
7
|
+
This stdlib deck provides the default bridge between the Codex SDK runtime and
|
|
8
|
+
Gambit decks. It is intentionally minimal; downstream runners supply the actual
|
|
9
|
+
runtime behavior.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type CodexTurnInput = {
|
|
2
|
+
userText: string;
|
|
3
|
+
threadId?: string;
|
|
4
|
+
systemPrompt?: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type CodexTurnOutput = {
|
|
8
|
+
threadId: string;
|
|
9
|
+
assistantText: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type CodexEvent =
|
|
13
|
+
| { type: "thread.started"; thread_id?: unknown }
|
|
14
|
+
| {
|
|
15
|
+
type: "item.completed";
|
|
16
|
+
item?: { type?: unknown; text?: unknown };
|
|
17
|
+
}
|
|
18
|
+
| { type: string; [key: string]: unknown };
|
|
19
|
+
|
|
20
|
+
function runCwd(): string {
|
|
21
|
+
const botRoot = Deno.env.get("GAMBIT_BOT_ROOT");
|
|
22
|
+
if (typeof botRoot === "string" && botRoot.trim().length > 0) {
|
|
23
|
+
return botRoot.trim();
|
|
24
|
+
}
|
|
25
|
+
return Deno.cwd();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function parseCodexEvents(stdout: string): {
|
|
29
|
+
threadId?: string;
|
|
30
|
+
assistantText?: string;
|
|
31
|
+
} {
|
|
32
|
+
let threadId: string | undefined;
|
|
33
|
+
let assistantText: string | undefined;
|
|
34
|
+
|
|
35
|
+
for (const line of stdout.split(/\r?\n/)) {
|
|
36
|
+
const trimmed = line.trim();
|
|
37
|
+
if (!trimmed.startsWith("{")) continue;
|
|
38
|
+
let parsed: CodexEvent | null = null;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(trimmed) as CodexEvent;
|
|
41
|
+
} catch {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!parsed || typeof parsed !== "object") continue;
|
|
45
|
+
if (parsed.type === "thread.started") {
|
|
46
|
+
if (typeof parsed.thread_id === "string" && parsed.thread_id.trim()) {
|
|
47
|
+
threadId = parsed.thread_id.trim();
|
|
48
|
+
}
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (parsed.type === "item.completed") {
|
|
52
|
+
const item = parsed.item;
|
|
53
|
+
if (!item || typeof item !== "object") continue;
|
|
54
|
+
const rec = item as Record<string, unknown>;
|
|
55
|
+
if (rec.type !== "agent_message") continue;
|
|
56
|
+
if (typeof rec.text !== "string") continue;
|
|
57
|
+
const next = rec.text.trim();
|
|
58
|
+
if (next) assistantText = next;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return { threadId, assistantText };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function sendCodexTurn(
|
|
66
|
+
input: CodexTurnInput,
|
|
67
|
+
): Promise<CodexTurnOutput> {
|
|
68
|
+
const prompt = input.systemPrompt && input.systemPrompt.trim()
|
|
69
|
+
? `${input.systemPrompt.trim()}\n\n${input.userText}`
|
|
70
|
+
: input.userText;
|
|
71
|
+
|
|
72
|
+
const args = input.threadId
|
|
73
|
+
? [
|
|
74
|
+
"exec",
|
|
75
|
+
"resume",
|
|
76
|
+
"--skip-git-repo-check",
|
|
77
|
+
"--json",
|
|
78
|
+
input.threadId,
|
|
79
|
+
prompt,
|
|
80
|
+
]
|
|
81
|
+
: ["exec", "--skip-git-repo-check", "--json", prompt];
|
|
82
|
+
|
|
83
|
+
const out = await new Deno.Command("codex", {
|
|
84
|
+
args,
|
|
85
|
+
cwd: runCwd(),
|
|
86
|
+
stdout: "piped",
|
|
87
|
+
stderr: "piped",
|
|
88
|
+
}).output();
|
|
89
|
+
|
|
90
|
+
const stdout = new TextDecoder().decode(out.stdout);
|
|
91
|
+
const stderr = new TextDecoder().decode(out.stderr);
|
|
92
|
+
if (!out.success) {
|
|
93
|
+
throw new Error(
|
|
94
|
+
`codex exec failed (exit ${out.code}): ${stderr.trim() || stdout.trim()}`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const parsed = parseCodexEvents(stdout);
|
|
99
|
+
const threadId = parsed.threadId ?? input.threadId;
|
|
100
|
+
if (!threadId) {
|
|
101
|
+
throw new Error(
|
|
102
|
+
`codex exec succeeded but no thread id found in output: ${stdout.trim()}`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
threadId,
|
|
107
|
+
assistantText: parsed.assistantText ?? "",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineDeck } from "../../../src/definitions.ts";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { sendCodexTurn } from "./codex_client.ts";
|
|
4
|
+
|
|
5
|
+
const CODEX_THREAD_META_KEY = "codex.threadId";
|
|
6
|
+
|
|
7
|
+
export default defineDeck({
|
|
8
|
+
label: "codex_sdk_bridge",
|
|
9
|
+
contextSchema: z.string().optional(),
|
|
10
|
+
responseSchema: z.string(),
|
|
11
|
+
async run(ctx) {
|
|
12
|
+
const userText = typeof ctx.initialUserMessage === "string" &&
|
|
13
|
+
ctx.initialUserMessage.trim()
|
|
14
|
+
? ctx.initialUserMessage.trim()
|
|
15
|
+
: typeof ctx.input === "string" && ctx.input.trim()
|
|
16
|
+
? ctx.input.trim()
|
|
17
|
+
: "";
|
|
18
|
+
|
|
19
|
+
if (!userText) return "";
|
|
20
|
+
|
|
21
|
+
const priorThreadId = ctx.getSessionMeta<string>(CODEX_THREAD_META_KEY);
|
|
22
|
+
const systemPrompt = ctx.getSessionMeta<string>("codex.systemPrompt");
|
|
23
|
+
|
|
24
|
+
ctx.appendMessage({ role: "user", content: userText });
|
|
25
|
+
|
|
26
|
+
const result = await sendCodexTurn({
|
|
27
|
+
userText,
|
|
28
|
+
threadId: priorThreadId,
|
|
29
|
+
systemPrompt,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
ctx.setSessionMeta(CODEX_THREAD_META_KEY, result.threadId);
|
|
33
|
+
ctx.appendMessage({ role: "assistant", content: result.assistantText });
|
|
34
|
+
return result.assistantText;
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Gambit context primer"
|
|
3
|
+
+++
|
|
4
|
+
|
|
5
|
+
You will automatically receive a `gambit_context` tool result at the start of
|
|
6
|
+
the run whenever the caller supplies `--context`. This payload contains run
|
|
7
|
+
metadata or seeded inputs. Read it before you respond, treat it as trusted
|
|
8
|
+
context, and keep it on hand throughout the workflow so downstream actions have
|
|
9
|
+
the right data. Do not call `gambit_context` yourself; runtime injects it once.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Explicitly end the run"
|
|
3
|
+
allowEnd = true
|
|
4
|
+
+++
|
|
5
|
+
|
|
6
|
+
If the entire conversation/workflow is complete and you must stop all further
|
|
7
|
+
turns, call the `gambit_end` tool with an optional `message`, `payload`,
|
|
8
|
+
`status`, `code`, or `meta`. Only use this when you want Gambit to halt entirely
|
|
9
|
+
(no more user messages). Otherwise continue with normal responses or
|
|
10
|
+
`gambit_respond`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Generate test input"
|
|
3
|
+
+++
|
|
4
|
+
|
|
5
|
+
When you receive a user message with:
|
|
6
|
+
|
|
7
|
+
{ "type": "gambit_test_bot_init_fill", "missing": ["path.to.field", "..."],
|
|
8
|
+
"current": { ... }, "schemaHints": [ ... ] }
|
|
9
|
+
|
|
10
|
+
Return ONLY valid JSON that supplies values for the missing fields. Do not
|
|
11
|
+
include any fields that are not listed in "missing". If the only missing path is
|
|
12
|
+
"(root)", return the full init JSON value.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Call gambit_respond"
|
|
3
|
+
respond = true
|
|
4
|
+
+++
|
|
5
|
+
|
|
6
|
+
When you finish this workflow, do **not** emit a normal assistant reply.
|
|
7
|
+
Instead, call the `gambit_respond` tool exactly once with a JSON envelope that
|
|
8
|
+
includes your validated `payload` plus optional `status`, `message`, `code`, or
|
|
9
|
+
`meta` fields. This keeps outputs structured and lets Gambit capture the result
|
|
10
|
+
even when guardrails stop the run early.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Anthropic agent SDK bridge"
|
|
3
|
+
contextSchema = "gambit://schemas/scenarios/plain_chat_input_optional.zod.ts"
|
|
4
|
+
responseSchema = "gambit://schemas/scenarios/plain_chat_output.zod.ts"
|
|
5
|
+
+++
|
|
6
|
+
|
|
7
|
+
This stdlib deck provides the default bridge between the Anthropic agent SDK
|
|
8
|
+
runtime and Gambit decks. It is intentionally minimal; downstream runners supply
|
|
9
|
+
the actual runtime behavior.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
+++
|
|
2
|
+
label = "Codex SDK bridge"
|
|
3
|
+
contextSchema = "gambit://schemas/scenarios/plain_chat_input_optional.zod.ts"
|
|
4
|
+
responseSchema = "gambit://schemas/scenarios/plain_chat_output.zod.ts"
|
|
5
|
+
+++
|
|
6
|
+
|
|
7
|
+
This stdlib deck provides the default bridge between the Codex SDK runtime and
|
|
8
|
+
Gambit decks. It is intentionally minimal; downstream runners supply the actual
|
|
9
|
+
runtime behavior.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type CodexTurnInput = {
|
|
2
|
+
userText: string;
|
|
3
|
+
threadId?: string;
|
|
4
|
+
systemPrompt?: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type CodexTurnOutput = {
|
|
8
|
+
threadId: string;
|
|
9
|
+
assistantText: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type CodexEvent =
|
|
13
|
+
| { type: "thread.started"; thread_id?: unknown }
|
|
14
|
+
| {
|
|
15
|
+
type: "item.completed";
|
|
16
|
+
item?: { type?: unknown; text?: unknown };
|
|
17
|
+
}
|
|
18
|
+
| { type: string; [key: string]: unknown };
|
|
19
|
+
|
|
20
|
+
function runCwd(): string {
|
|
21
|
+
const botRoot = Deno.env.get("GAMBIT_BOT_ROOT");
|
|
22
|
+
if (typeof botRoot === "string" && botRoot.trim().length > 0) {
|
|
23
|
+
return botRoot.trim();
|
|
24
|
+
}
|
|
25
|
+
return Deno.cwd();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function parseCodexEvents(stdout: string): {
|
|
29
|
+
threadId?: string;
|
|
30
|
+
assistantText?: string;
|
|
31
|
+
} {
|
|
32
|
+
let threadId: string | undefined;
|
|
33
|
+
let assistantText: string | undefined;
|
|
34
|
+
|
|
35
|
+
for (const line of stdout.split(/\r?\n/)) {
|
|
36
|
+
const trimmed = line.trim();
|
|
37
|
+
if (!trimmed.startsWith("{")) continue;
|
|
38
|
+
let parsed: CodexEvent | null = null;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(trimmed) as CodexEvent;
|
|
41
|
+
} catch {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!parsed || typeof parsed !== "object") continue;
|
|
45
|
+
if (parsed.type === "thread.started") {
|
|
46
|
+
if (typeof parsed.thread_id === "string" && parsed.thread_id.trim()) {
|
|
47
|
+
threadId = parsed.thread_id.trim();
|
|
48
|
+
}
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (parsed.type === "item.completed") {
|
|
52
|
+
const item = parsed.item;
|
|
53
|
+
if (!item || typeof item !== "object") continue;
|
|
54
|
+
const rec = item as Record<string, unknown>;
|
|
55
|
+
if (rec.type !== "agent_message") continue;
|
|
56
|
+
if (typeof rec.text !== "string") continue;
|
|
57
|
+
const next = rec.text.trim();
|
|
58
|
+
if (next) assistantText = next;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return { threadId, assistantText };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function sendCodexTurn(
|
|
66
|
+
input: CodexTurnInput,
|
|
67
|
+
): Promise<CodexTurnOutput> {
|
|
68
|
+
const prompt = input.systemPrompt && input.systemPrompt.trim()
|
|
69
|
+
? `${input.systemPrompt.trim()}\n\n${input.userText}`
|
|
70
|
+
: input.userText;
|
|
71
|
+
|
|
72
|
+
const args = input.threadId
|
|
73
|
+
? [
|
|
74
|
+
"exec",
|
|
75
|
+
"resume",
|
|
76
|
+
"--skip-git-repo-check",
|
|
77
|
+
"--json",
|
|
78
|
+
input.threadId,
|
|
79
|
+
prompt,
|
|
80
|
+
]
|
|
81
|
+
: ["exec", "--skip-git-repo-check", "--json", prompt];
|
|
82
|
+
|
|
83
|
+
const out = await new Deno.Command("codex", {
|
|
84
|
+
args,
|
|
85
|
+
cwd: runCwd(),
|
|
86
|
+
stdout: "piped",
|
|
87
|
+
stderr: "piped",
|
|
88
|
+
}).output();
|
|
89
|
+
|
|
90
|
+
const stdout = new TextDecoder().decode(out.stdout);
|
|
91
|
+
const stderr = new TextDecoder().decode(out.stderr);
|
|
92
|
+
if (!out.success) {
|
|
93
|
+
throw new Error(
|
|
94
|
+
`codex exec failed (exit ${out.code}): ${stderr.trim() || stdout.trim()}`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const parsed = parseCodexEvents(stdout);
|
|
99
|
+
const threadId = parsed.threadId ?? input.threadId;
|
|
100
|
+
if (!threadId) {
|
|
101
|
+
throw new Error(
|
|
102
|
+
`codex exec succeeded but no thread id found in output: ${stdout.trim()}`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
threadId,
|
|
107
|
+
assistantText: parsed.assistantText ?? "",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineDeck } from "../../../src/definitions.ts";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { sendCodexTurn } from "./codex_client.ts";
|
|
4
|
+
|
|
5
|
+
const CODEX_THREAD_META_KEY = "codex.threadId";
|
|
6
|
+
|
|
7
|
+
export default defineDeck({
|
|
8
|
+
label: "codex_sdk_bridge",
|
|
9
|
+
contextSchema: z.string().optional(),
|
|
10
|
+
responseSchema: z.string(),
|
|
11
|
+
async run(ctx) {
|
|
12
|
+
const userText = typeof ctx.initialUserMessage === "string" &&
|
|
13
|
+
ctx.initialUserMessage.trim()
|
|
14
|
+
? ctx.initialUserMessage.trim()
|
|
15
|
+
: typeof ctx.input === "string" && ctx.input.trim()
|
|
16
|
+
? ctx.input.trim()
|
|
17
|
+
: "";
|
|
18
|
+
|
|
19
|
+
if (!userText) return "";
|
|
20
|
+
|
|
21
|
+
const priorThreadId = ctx.getSessionMeta<string>(CODEX_THREAD_META_KEY);
|
|
22
|
+
const systemPrompt = ctx.getSessionMeta<string>("codex.systemPrompt");
|
|
23
|
+
|
|
24
|
+
ctx.appendMessage({ role: "user", content: userText });
|
|
25
|
+
|
|
26
|
+
const result = await sendCodexTurn({
|
|
27
|
+
userText,
|
|
28
|
+
threadId: priorThreadId,
|
|
29
|
+
systemPrompt,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
ctx.setSessionMeta(CODEX_THREAD_META_KEY, result.threadId);
|
|
33
|
+
ctx.appendMessage({ role: "assistant", content: result.assistantText });
|
|
34
|
+
return result.assistantText;
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -280,7 +280,7 @@ export type MergeAllSets<T, U, X = PartialByType<T, Set<unknown>>, Y = PartialBy
|
|
|
280
280
|
}> = Z;
|
|
281
281
|
/** Get array values type */
|
|
282
282
|
export type ArrayValueType<T> = T extends Array<infer V> ? V : never;
|
|
283
|
-
/** Merge all
|
|
283
|
+
/** Merge all arrays types definitions from keys present in both objects */
|
|
284
284
|
export type MergeAllArrays<T, U, X = PartialByType<T, Array<unknown>>, Y = PartialByType<U, Array<unknown>>, Z = {
|
|
285
285
|
[K in keyof X & keyof Y]: Array<ArrayValueType<X[K]> | ArrayValueType<Y[K]>>;
|
|
286
286
|
}> = Z;
|
|
@@ -288,7 +288,7 @@ export type MergeAllArrays<T, U, X = PartialByType<T, Array<unknown>>, Y = Parti
|
|
|
288
288
|
export type MapKeyType<T> = T extends Map<infer K, unknown> ? K : never;
|
|
289
289
|
/** Get map values types */
|
|
290
290
|
export type MapValueType<T> = T extends Map<unknown, infer V> ? V : never;
|
|
291
|
-
/** Merge all
|
|
291
|
+
/** Merge all maps types definitions from keys present in both objects */
|
|
292
292
|
export type MergeAllMaps<T, U, X = PartialByType<T, Map<unknown, unknown>>, Y = PartialByType<U, Map<unknown, unknown>>, Z = {
|
|
293
293
|
[K in keyof X & keyof Y]: Map<MapKeyType<X[K]> | MapKeyType<Y[K]>, MapValueType<X[K]> | MapValueType<Y[K]>>;
|
|
294
294
|
}> = Z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep_merge.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.1.
|
|
1
|
+
{"version":3,"file":"deep_merge.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.1.6/deep_merge.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAEtC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC3B,OAAO,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GACnC,CAAC,CAAC;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,SAAS,CACvB,CA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