@humain/humain-code 0.7.0 → 0.8.1
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 +160 -0
- package/README.md +2 -2
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-XFCDMGD6.js +77 -0
- package/dist/bundle/chunks/anthropic.js +25 -24
- package/dist/bundle/chunks/azure-openai-responses-F4KQM3NK.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +460 -431
- package/dist/bundle/chunks/bowser-DXKSTXFQ.js +89 -0
- package/dist/bundle/chunks/{chunk-2G7YVAVF.js → chunk-2JNJJ6SZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-HTA325LJ.js → chunk-2NVGOSBN.js} +1 -1
- package/dist/bundle/chunks/{chunk-5B25YXF7.js → chunk-3CGMVKHA.js} +13 -3
- package/dist/bundle/chunks/{chunk-SCINMV4X.js → chunk-46C6D7UC.js} +22 -21
- package/dist/bundle/chunks/chunk-4MKATHT2.js +24 -0
- package/dist/bundle/chunks/{chunk-TGDPZCSW.js → chunk-4TDNOR36.js} +1 -1
- package/dist/bundle/chunks/{chunk-C6VERWRZ.js → chunk-4XF5JX7X.js} +1 -1
- package/dist/bundle/chunks/{chunk-4HTVBBJD.js → chunk-65FLSKDA.js} +2 -2
- package/dist/bundle/chunks/chunk-6HTHDVJC.js +4 -0
- package/dist/bundle/chunks/{chunk-4PRNKB6V.js → chunk-6P6MMQUH.js} +7 -7
- package/dist/bundle/chunks/{chunk-66FZJO75.js → chunk-6TTMNQXI.js} +472 -3924
- package/dist/bundle/chunks/{chunk-32QLLD2P.js → chunk-6YVORXTX.js} +410 -352
- package/dist/bundle/chunks/chunk-7H2WNBX7.js +11 -0
- package/dist/bundle/chunks/{chunk-2FYYW6FY.js → chunk-7OZNMWAJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-R6YQR7TZ.js → chunk-7WE77IE3.js} +1 -1
- package/dist/bundle/chunks/{chunk-Z5YLKK3S.js → chunk-7WETECIB.js} +1 -1
- package/dist/bundle/chunks/chunk-7X6DNT45.js +78 -0
- package/dist/bundle/chunks/{chunk-KRCX3ZBA.js → chunk-APNPBT7Y.js} +1 -1
- package/dist/bundle/chunks/{chunk-R5OOX7RW.js → chunk-B47PNNLL.js} +9 -2
- package/dist/bundle/chunks/{chunk-PPBDDQHP.js → chunk-CQ2CE3RB.js} +7 -6
- package/dist/bundle/chunks/{chunk-MD7K7RPN.js → chunk-D3KYOSQY.js} +1 -1
- package/dist/bundle/chunks/{chunk-I3NDOUHE.js → chunk-DCXHRP6C.js} +1 -1
- package/dist/bundle/chunks/{chunk-OB332KMV.js → chunk-DD5UT56Y.js} +46 -32
- package/dist/bundle/chunks/{chunk-I5E7RQ5V.js → chunk-DJG2WUNM.js} +5 -5
- package/dist/bundle/chunks/{chunk-4QAXV5T6.js → chunk-E7OBH44W.js} +9 -9
- package/dist/bundle/chunks/{chunk-Q7VXYXY3.js → chunk-ENBDASDN.js} +2 -2
- package/dist/bundle/chunks/{chunk-RS6PZK35.js → chunk-F2H47FRF.js} +249 -216
- package/dist/bundle/chunks/{chunk-2H3LUS62.js → chunk-FJIISX5W.js} +241 -229
- package/dist/bundle/chunks/chunk-FQ4KS5S4.js +23 -0
- package/dist/bundle/chunks/{chunk-SSRCVJZK.js → chunk-GPLWWO5Q.js} +5 -5
- package/dist/bundle/chunks/{chunk-WQOOJP7U.js → chunk-GV5OVRKK.js} +1 -1
- package/dist/bundle/chunks/{chunk-KTSJYIYC.js → chunk-HHWVVNGG.js} +1 -1
- package/dist/bundle/chunks/{chunk-4JRER4XK.js → chunk-HQMUDHC3.js} +19 -19
- package/dist/bundle/chunks/{chunk-G4QPSFBF.js → chunk-IMUFBWEK.js} +216 -223
- package/dist/bundle/chunks/{chunk-RU7ADKA7.js → chunk-J4GII2EE.js} +112 -96
- package/dist/bundle/chunks/{chunk-QT6ZHDMP.js → chunk-JBSWWCT5.js} +1 -1
- package/dist/bundle/chunks/{chunk-PWUDFU5V.js → chunk-JWOPWHVH.js} +4 -4
- package/dist/bundle/chunks/{chunk-AEWYICBL.js → chunk-KI7CHPWC.js} +2 -2
- package/dist/bundle/chunks/{chunk-4V5VL2BO.js → chunk-KLSRGGOH.js} +131 -154
- package/dist/bundle/chunks/{chunk-JF7FYXAI.js → chunk-KONLZKPL.js} +7 -6
- package/dist/bundle/chunks/{chunk-N2SNMUD3.js → chunk-KRBELWQH.js} +1 -1
- package/dist/bundle/chunks/{chunk-UZNIPOGS.js → chunk-L4J7SMJB.js} +1 -1
- package/dist/bundle/chunks/{chunk-EIC7CQX3.js → chunk-LSRXA7OS.js} +1 -1
- package/dist/bundle/chunks/{chunk-GRJUKEE3.js → chunk-MIAXMK5F.js} +4 -4
- package/dist/bundle/chunks/chunk-MPRAQ6ZI.js +41 -0
- package/dist/bundle/chunks/{chunk-GUHNFZ2Q.js → chunk-NICPFMOP.js} +20 -19
- package/dist/bundle/chunks/{chunk-WAPZN4KP.js → chunk-P2Y2H7SD.js} +2 -2
- package/dist/bundle/chunks/{chunk-T7BXP46S.js → chunk-P42E6YY6.js} +1892 -1680
- package/dist/bundle/chunks/{chunk-3EDMWQ35.js → chunk-PFBAIRCY.js} +17 -15
- package/dist/bundle/chunks/{chunk-XHDVDJM7.js → chunk-PVNXN2TC.js} +7 -7
- package/dist/bundle/chunks/{chunk-TWAHPPXN.js → chunk-PWFM6AQQ.js} +1307 -1194
- package/dist/bundle/chunks/{chunk-RNBZBCH2.js → chunk-QJB5YI3I.js} +1 -1
- package/dist/bundle/chunks/{chunk-P6AXBESH.js → chunk-QRRVZYTG.js} +1119 -1098
- package/dist/bundle/chunks/{chunk-WQ7EJQIT.js → chunk-ROFZVEFN.js} +247 -250
- package/dist/bundle/chunks/chunk-SKCJ25SX.js +24 -0
- package/dist/bundle/chunks/{chunk-AZXVJN6E.js → chunk-SXOIQWNX.js} +1 -1
- package/dist/bundle/chunks/{chunk-6E6RHNOU.js → chunk-UXM4WFLH.js} +12 -11
- package/dist/bundle/chunks/{chunk-LB4CIS4F.js → chunk-VCMXBP5S.js} +17 -17
- package/dist/bundle/chunks/{chunk-JYWUOKOI.js → chunk-WBSGWISD.js} +367 -353
- package/dist/bundle/chunks/chunk-XZ7FTBXS.js +2102 -0
- package/dist/bundle/chunks/chunk-YSWDFV2L.js +11 -0
- package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/bundle/chunks/chunk-ZTG5OKI7.js +3 -0
- package/dist/bundle/chunks/{cli-H4LJNE2V.js → cli-6DJO467D.js} +2 -2
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-T5R2RVFQ.js → cloudflare-workers-ai-system-one-JEZVYITT.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +68 -68
- package/dist/bundle/chunks/compat-SRCNS6OQ.js +15 -0
- package/dist/bundle/chunks/curator-server-QB4GITGS.js +3600 -0
- package/dist/bundle/chunks/dist-35STTNYA.js +37 -0
- package/dist/bundle/chunks/{dist-FMWWM4H7.js → dist-4OMLHRJE.js} +2 -2
- package/dist/bundle/chunks/dist-CBODG4CA.js +11 -0
- package/dist/bundle/chunks/{dist-NHQTBDHT.js → dist-TRAK7EXI.js} +91 -257
- package/dist/bundle/chunks/dist-cjs-EROMDUKS.js +193 -0
- package/dist/bundle/chunks/{easter-egg-3d-BUEOC3NO.js → easter-egg-3d-VVUF3C3X.js} +1 -1
- package/dist/bundle/chunks/entry-2GZ3PTWQ.js +2 -0
- package/dist/bundle/chunks/{entry-A2CSLKHC.js → entry-SRYLSS5P.js} +3 -3
- package/dist/bundle/chunks/{event-streams-7YGFEPBZ.js → event-streams-F67JLS6B.js} +1 -1
- package/dist/bundle/chunks/{execute-MY5JSEPV.js → execute-I3WGGPWL.js} +2 -2
- package/dist/bundle/chunks/{extract-PTGACPGP.js → extract-L373D6O7.js} +68 -65
- package/dist/bundle/chunks/{flow-implementer-APJFY4YI.js → flow-implementer-4KO3Q4B5.js} +8 -9
- package/dist/bundle/chunks/github-copilot.js +53 -46
- package/dist/bundle/chunks/google-generative-ai-WIASMWS3.js +22 -0
- package/dist/bundle/chunks/google-vertex-WSPHRZIZ.js +25 -0
- package/dist/bundle/chunks/host-WOLZCWQQ.js +3 -0
- package/dist/bundle/chunks/image-resize-worker.js +3 -3
- package/dist/bundle/chunks/{index.bundle-THL4EUSU.js → index.bundle-HONF3PUD.js} +177 -176
- package/dist/bundle/chunks/{inprocess-5NP5VJHZ.js → inprocess-TOBRVK4C.js} +6 -6
- package/dist/bundle/chunks/interactive-mode-BJJKPBXD.js +5 -0
- package/dist/bundle/chunks/{llama-cpp-classify-GJAXULWL.js → llama-cpp-classify-KYZT532X.js} +1 -1
- package/dist/bundle/chunks/mistral-conversations-7JYDDRUT.js +43 -0
- package/dist/bundle/chunks/{node-UNHECG4X.js → node-MHHE76P4.js} +475 -440
- package/dist/bundle/chunks/{node-ZFIIS5IM.js → node-N7TPBUJB.js} +53 -30
- package/dist/bundle/chunks/{openai-codex-responses-S7CMCAOY.js → openai-codex-responses-7PAML4NF.js} +30 -29
- package/dist/bundle/chunks/openai-codex.js +9 -8
- package/dist/bundle/chunks/{openai-completions-2Z57N7PC.js → openai-completions-UJDAIGTK.js} +22 -22
- package/dist/bundle/chunks/{openai-decisions-JIOJDB4C.js → openai-decisions-JMSDGR7K.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-5VBZSTHL.js → openai-responses-2WNCE6AY.js} +4 -5
- package/dist/bundle/chunks/{openrouter-images-S6O7DBEJ.js → openrouter-images-V3UCCO6X.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +9 -8
- package/dist/bundle/chunks/pdfjs-FE3L72A6.js +3662 -0
- package/dist/bundle/chunks/{pdfjs-decoders-OFXX4HDZ.js → pdfjs-decoders-VCMCTQJ2.js} +1 -1
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-I4K6AIV4.js +295 -0
- package/dist/bundle/chunks/pdfjs-openjpeg-PYQCV6CM.js +590 -0
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-G363SGDI.js +775 -0
- package/dist/bundle/chunks/{pi-messages-SMLN5J2W.js → pi-messages-TQ7LJUNQ.js} +11 -11
- package/dist/bundle/chunks/radius.js +8 -7
- package/dist/bundle/chunks/{runtime-OYTWXIUM.js → runtime-H7LYNKCZ.js} +1 -1
- package/dist/bundle/chunks/session-picker-4JQEGLDD.js +4 -0
- package/dist/bundle/chunks/startup-ui-AKTA4NDP.js +3 -0
- package/dist/bundle/chunks/{trace-command-YLDYCL55.js → trace-command-7ORDQ3JS.js} +4 -4
- package/dist/bundle/chunks/{typesafe-system-one-7BEL3H5N.js → typesafe-system-one-YP7GGN4C.js} +1 -1
- package/dist/bundle/chunks/{undici-C6S56CGI.js → undici-WVNE45GY.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-3CT5BMBA.js +28 -0
- package/dist/bundle/cli-runtime.js +5 -5
- package/dist/bundle/flow/package.json +5 -5
- package/dist/bundle/index.js +13 -13
- package/dist/bundle/orchestrate/package.json +22 -6
- package/dist/bundle/rpc-entry.js +4 -5
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +9 -6
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +16 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +9 -6
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +3 -2
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +8 -4
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +14 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +30 -2
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +0 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +0 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +31 -39
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +231 -535
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-subscription-usage.d.ts +4 -2
- package/dist/core/anthropic-subscription-usage.d.ts.map +1 -1
- package/dist/core/anthropic-subscription-usage.js +32 -16
- package/dist/core/anthropic-subscription-usage.js.map +1 -1
- package/dist/core/auto-session-namer.js +1 -1
- package/dist/core/auto-session-namer.js.map +1 -1
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +2 -0
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/exec.d.ts +1 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +4 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts +6 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +57 -20
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/template.js +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +18 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +5 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/flow-implementer.d.ts.map +1 -1
- package/dist/core/flow-implementer.js +3 -9
- package/dist/core/flow-implementer.js.map +1 -1
- package/dist/core/keybindings.d.ts +64 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +8 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +13 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-registry.d.ts +3 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +44 -9
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +0 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +14 -17
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +28 -8
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -14
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-account-pool.d.ts +9 -0
- package/dist/core/oauth-account-pool.d.ts.map +1 -1
- package/dist/core/oauth-account-pool.js +138 -23
- package/dist/core/oauth-account-pool.js.map +1 -1
- package/dist/core/package-manager.d.ts +16 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +46 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +1 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +7 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/run-outcome.d.ts +6 -3
- package/dist/core/run-outcome.d.ts.map +1 -1
- package/dist/core/run-outcome.js +36 -9
- package/dist/core/run-outcome.js.map +1 -1
- package/dist/core/run-preflight.d.ts +1 -1
- package/dist/core/run-preflight.d.ts.map +1 -1
- package/dist/core/run-preflight.js +19 -11
- package/dist/core/run-preflight.js.map +1 -1
- package/dist/core/sdk.d.ts +0 -6
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +9 -18
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +0 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +0 -9
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +0 -4
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +0 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/bash-jobs.d.ts.map +1 -1
- package/dist/core/tools/bash-jobs.js +2 -9
- package/dist/core/tools/bash-jobs.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +28 -16
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +4 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/read.d.ts +8 -4
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +10 -15
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +6 -2
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/subagent-worktree.d.ts.map +1 -1
- package/dist/core/tools/subagent-worktree.js +2 -10
- package/dist/core/tools/subagent-worktree.js.map +1 -1
- package/dist/core/trace-client/credential-store.d.ts.map +1 -1
- package/dist/core/trace-client/credential-store.js +9 -5
- package/dist/core/trace-client/credential-store.js.map +1 -1
- package/dist/extensions/codemode/execute.js +2 -2
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -4
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/usage/account-reconnect.d.ts +5 -0
- package/dist/extensions/usage/account-reconnect.d.ts.map +1 -0
- package/dist/extensions/usage/account-reconnect.js +12 -0
- package/dist/extensions/usage/account-reconnect.js.map +1 -0
- package/dist/extensions/usage/confirmation.d.ts.map +1 -1
- package/dist/extensions/usage/confirmation.js +1 -1
- package/dist/extensions/usage/confirmation.js.map +1 -1
- package/dist/extensions/usage/hcode-overview.d.ts +6 -19
- package/dist/extensions/usage/hcode-overview.d.ts.map +1 -1
- package/dist/extensions/usage/hcode-overview.js +86 -100
- package/dist/extensions/usage/hcode-overview.js.map +1 -1
- package/dist/extensions/usage/index.d.ts.map +1 -1
- package/dist/extensions/usage/index.js +75 -99
- package/dist/extensions/usage/index.js.map +1 -1
- package/dist/extensions/usage/overview.d.ts +22 -17
- package/dist/extensions/usage/overview.d.ts.map +1 -1
- package/dist/extensions/usage/overview.js +98 -13
- package/dist/extensions/usage/overview.js.map +1 -1
- package/dist/extensions/usage/panes.d.ts +5 -0
- package/dist/extensions/usage/panes.d.ts.map +1 -0
- package/dist/extensions/usage/panes.js +10 -0
- package/dist/extensions/usage/panes.js.map +1 -0
- package/dist/extensions/usage/popup.d.ts +9 -14
- package/dist/extensions/usage/popup.d.ts.map +1 -1
- package/dist/extensions/usage/popup.js +87 -183
- package/dist/extensions/usage/popup.js.map +1 -1
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +4 -1
- package/dist/humain/flow-command.js +1 -1
- package/dist/humain/flow-command.js.map +1 -1
- package/dist/humain/flow-loader.d.ts +9 -4
- package/dist/humain/flow-loader.d.ts.map +1 -1
- package/dist/humain/flow-loader.js +30 -21
- package/dist/humain/flow-loader.js.map +1 -1
- package/dist/humain/gateway/client.d.ts +3 -1
- package/dist/humain/gateway/client.d.ts.map +1 -1
- package/dist/humain/gateway/client.js +10 -5
- package/dist/humain/gateway/client.js.map +1 -1
- package/dist/humain/gateway/login.d.ts.map +1 -1
- package/dist/humain/gateway/login.js +160 -53
- package/dist/humain/gateway/login.js.map +1 -1
- package/dist/humain/hcode/account-store.d.ts +29 -5
- package/dist/humain/hcode/account-store.d.ts.map +1 -1
- package/dist/humain/hcode/account-store.js +224 -124
- package/dist/humain/hcode/account-store.js.map +1 -1
- package/dist/humain/hcode/account.d.ts +6 -0
- package/dist/humain/hcode/account.d.ts.map +1 -1
- package/dist/humain/hcode/account.js +348 -129
- package/dist/humain/hcode/account.js.map +1 -1
- package/dist/humain/hcode/catalog-watch.d.ts +21 -0
- package/dist/humain/hcode/catalog-watch.d.ts.map +1 -0
- package/dist/humain/hcode/catalog-watch.js +46 -0
- package/dist/humain/hcode/catalog-watch.js.map +1 -0
- package/dist/humain/hcode/contracts.d.ts +31 -1
- package/dist/humain/hcode/contracts.d.ts.map +1 -1
- package/dist/humain/hcode/contracts.js +205 -136
- package/dist/humain/hcode/contracts.js.map +1 -1
- package/dist/humain/hcode/environment.d.ts +3 -1
- package/dist/humain/hcode/environment.d.ts.map +1 -1
- package/dist/humain/hcode/environment.js +14 -2
- package/dist/humain/hcode/environment.js.map +1 -1
- package/dist/humain/hcode/facade.d.ts +26 -6
- package/dist/humain/hcode/facade.d.ts.map +1 -1
- package/dist/humain/hcode/facade.js +148 -38
- package/dist/humain/hcode/facade.js.map +1 -1
- package/dist/humain/hcode/http.d.ts +3 -1
- package/dist/humain/hcode/http.d.ts.map +1 -1
- package/dist/humain/hcode/http.js +44 -23
- package/dist/humain/hcode/http.js.map +1 -1
- package/dist/humain/hcode/images.d.ts +67 -0
- package/dist/humain/hcode/images.d.ts.map +1 -0
- package/dist/humain/hcode/images.js +465 -0
- package/dist/humain/hcode/images.js.map +1 -0
- package/dist/humain/hcode/login-copy.d.ts +28 -0
- package/dist/humain/hcode/login-copy.d.ts.map +1 -0
- package/dist/humain/hcode/login-copy.js +74 -0
- package/dist/humain/hcode/login-copy.js.map +1 -0
- package/dist/humain/hcode/login-failure.d.ts +26 -0
- package/dist/humain/hcode/login-failure.d.ts.map +1 -0
- package/dist/humain/hcode/login-failure.js +50 -0
- package/dist/humain/hcode/login-failure.js.map +1 -0
- package/dist/humain/hcode/notices.d.ts +45 -1
- package/dist/humain/hcode/notices.d.ts.map +1 -1
- package/dist/humain/hcode/notices.js +124 -7
- package/dist/humain/hcode/notices.js.map +1 -1
- package/dist/humain/hcode/provider.d.ts +9 -3
- package/dist/humain/hcode/provider.d.ts.map +1 -1
- package/dist/humain/hcode/provider.js +204 -20
- package/dist/humain/hcode/provider.js.map +1 -1
- package/dist/humain/hcode/run-credential.d.ts +21 -0
- package/dist/humain/hcode/run-credential.d.ts.map +1 -0
- package/dist/humain/hcode/run-credential.js +140 -0
- package/dist/humain/hcode/run-credential.js.map +1 -0
- package/dist/humain/hcode/sandbox.d.ts +6 -0
- package/dist/humain/hcode/sandbox.d.ts.map +1 -0
- package/dist/humain/hcode/sandbox.js +139 -0
- package/dist/humain/hcode/sandbox.js.map +1 -0
- package/dist/humain/hcode/selection.d.ts +9 -2
- package/dist/humain/hcode/selection.d.ts.map +1 -1
- package/dist/humain/hcode/selection.js +37 -6
- package/dist/humain/hcode/selection.js.map +1 -1
- package/dist/humain/hcode/transport.d.ts +14 -10
- package/dist/humain/hcode/transport.d.ts.map +1 -1
- package/dist/humain/hcode/transport.js +119 -149
- package/dist/humain/hcode/transport.js.map +1 -1
- package/dist/humain/hcode/wire.d.ts +3 -0
- package/dist/humain/hcode/wire.d.ts.map +1 -1
- package/dist/humain/hcode/wire.js +11 -0
- package/dist/humain/hcode/wire.js.map +1 -1
- package/dist/humain/metadata/contracts.d.ts +1 -0
- package/dist/humain/metadata/contracts.d.ts.map +1 -1
- package/dist/humain/metadata/contracts.js +2 -1
- package/dist/humain/metadata/contracts.js.map +1 -1
- package/dist/humain/remote/broker.d.ts +84 -0
- package/dist/humain/remote/broker.d.ts.map +1 -0
- package/dist/humain/remote/broker.js +427 -0
- package/dist/humain/remote/broker.js.map +1 -0
- package/dist/humain/remote/deny-store.d.ts +12 -0
- package/dist/humain/remote/deny-store.d.ts.map +1 -0
- package/dist/humain/remote/deny-store.js +164 -0
- package/dist/humain/remote/deny-store.js.map +1 -0
- package/dist/humain/remote/enablement.d.ts +5 -0
- package/dist/humain/remote/enablement.d.ts.map +1 -0
- package/dist/humain/remote/enablement.js +8 -0
- package/dist/humain/remote/enablement.js.map +1 -0
- package/dist/humain/remote/environment.d.ts +11 -0
- package/dist/humain/remote/environment.d.ts.map +1 -0
- package/dist/humain/remote/environment.js +19 -0
- package/dist/humain/remote/environment.js.map +1 -0
- package/dist/humain/remote/host-watch.d.ts +21 -0
- package/dist/humain/remote/host-watch.d.ts.map +1 -0
- package/dist/humain/remote/host-watch.js +186 -0
- package/dist/humain/remote/host-watch.js.map +1 -0
- package/dist/humain/remote/ipc-posix.d.ts +5 -0
- package/dist/humain/remote/ipc-posix.d.ts.map +1 -0
- package/dist/humain/remote/ipc-posix.js +29 -0
- package/dist/humain/remote/ipc-posix.js.map +1 -0
- package/dist/humain/remote/ipc-windows.d.ts +3 -0
- package/dist/humain/remote/ipc-windows.d.ts.map +1 -0
- package/dist/humain/remote/ipc-windows.js +5 -0
- package/dist/humain/remote/ipc-windows.js.map +1 -0
- package/dist/humain/remote/ipc.d.ts +10 -0
- package/dist/humain/remote/ipc.d.ts.map +1 -0
- package/dist/humain/remote/ipc.js +19 -0
- package/dist/humain/remote/ipc.js.map +1 -0
- package/dist/humain/remote/protocol.d.ts +43 -0
- package/dist/humain/remote/protocol.d.ts.map +1 -0
- package/dist/humain/remote/protocol.js +76 -0
- package/dist/humain/remote/protocol.js.map +1 -0
- package/dist/humain/remote/relay-socket.d.ts +30 -0
- package/dist/humain/remote/relay-socket.d.ts.map +1 -0
- package/dist/humain/remote/relay-socket.js +137 -0
- package/dist/humain/remote/relay-socket.js.map +1 -0
- package/dist/humain/remote/secure-channel.d.ts +10 -0
- package/dist/humain/remote/secure-channel.d.ts.map +1 -0
- package/dist/humain/remote/secure-channel.js +5 -0
- package/dist/humain/remote/secure-channel.js.map +1 -0
- package/dist/humain/remote/terminal.d.ts +48 -0
- package/dist/humain/remote/terminal.d.ts.map +1 -0
- package/dist/humain/remote/terminal.js +119 -0
- package/dist/humain/remote/terminal.js.map +1 -0
- package/dist/humain/remote/tickets.d.ts +35 -0
- package/dist/humain/remote/tickets.d.ts.map +1 -0
- package/dist/humain/remote/tickets.js +132 -0
- package/dist/humain/remote/tickets.js.map +1 -0
- package/dist/humain/web-access/vendor/anysearch.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/anysearch.js +7 -3
- package/dist/humain/web-access/vendor/anysearch.js.map +1 -1
- package/dist/humain/web-access/vendor/autom.d.ts +4 -0
- package/dist/humain/web-access/vendor/autom.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/autom.js +191 -0
- package/dist/humain/web-access/vendor/autom.js.map +1 -0
- package/dist/humain/web-access/vendor/cloro.d.ts +4 -0
- package/dist/humain/web-access/vendor/cloro.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/cloro.js +236 -0
- package/dist/humain/web-access/vendor/cloro.js.map +1 -0
- package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.js +7 -1
- package/dist/humain/web-access/vendor/curator-page.js.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.js +6 -0
- package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
- package/dist/humain/web-access/vendor/domain-filter-normalization.d.ts +8 -0
- package/dist/humain/web-access/vendor/domain-filter-normalization.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/domain-filter-normalization.js +37 -0
- package/dist/humain/web-access/vendor/domain-filter-normalization.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts +28 -8
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js +135 -34
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.d.ts +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.js +10 -3
- package/dist/humain/web-access/vendor/duckduckgo.js.map +1 -1
- package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/extract.js +61 -5
- package/dist/humain/web-access/vendor/extract.js.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.d.ts +3 -3
- package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.js +35 -5
- package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +8 -1
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/humain/web-access/vendor/page-query.d.ts +5 -0
- package/dist/humain/web-access/vendor/page-query.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/page-query.js +12 -2
- package/dist/humain/web-access/vendor/page-query.js.map +1 -1
- package/dist/humain/web-access/vendor/specstream.d.ts +6 -0
- package/dist/humain/web-access/vendor/specstream.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/specstream.js +253 -0
- package/dist/humain/web-access/vendor/specstream.js.map +1 -0
- package/dist/humain/web-access/vendor/tool-activation.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/tool-activation.js +21 -5
- package/dist/humain/web-access/vendor/tool-activation.js.map +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.d.ts +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.js +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.js.map +1 -1
- package/dist/humain/web-access/vendor/utils.d.ts +1 -0
- package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/utils.js +3 -0
- package/dist/humain/web-access/vendor/utils.js.map +1 -1
- package/dist/humain/web-access/vendor/video-extract.js +2 -2
- package/dist/humain/web-access/vendor/video-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts +13 -0
- package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.js +16 -5
- package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
- package/dist/humain/web-access/vendor/youtube-extract.js +2 -2
- package/dist/humain/web-access/vendor/youtube-extract.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +109 -29
- package/dist/main.js.map +1 -1
- package/dist/modes/diagnostics-stderr.d.ts +4 -0
- package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
- package/dist/modes/diagnostics-stderr.js +11 -0
- package/dist/modes/diagnostics-stderr.js.map +1 -0
- package/dist/modes/interactive/components/account-picker.d.ts +31 -0
- package/dist/modes/interactive/components/account-picker.d.ts.map +1 -0
- package/dist/modes/interactive/components/account-picker.js +150 -0
- package/dist/modes/interactive/components/account-picker.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +14 -5
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +2 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +6 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +10 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +101 -23
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +5 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +17 -6
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.js +2 -1
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +13 -6
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +8 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +41 -9
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +5 -1
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -17
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +1 -78
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +5 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +3 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +14 -5
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +35 -4
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +821 -250
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +4 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.js +40 -1
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -1
- package/dist/modes/interactive/oauth-account-format.d.ts +15 -2
- package/dist/modes/interactive/oauth-account-format.d.ts.map +1 -1
- package/dist/modes/interactive/oauth-account-format.js +39 -21
- package/dist/modes/interactive/oauth-account-format.js.map +1 -1
- package/dist/modes/interactive/session-share.js +2 -0
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +1 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +30 -32
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +26 -39
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +14 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js +9 -0
- package/dist/utils/abort.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +3 -2
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/flush-stdout.d.ts +8 -0
- package/dist/utils/flush-stdout.d.ts.map +1 -0
- package/dist/utils/flush-stdout.js +23 -0
- package/dist/utils/flush-stdout.js.map +1 -0
- package/dist/utils/image-process.d.ts +2 -0
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js +3 -3
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.js +2 -2
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +19 -0
- package/dist/utils/shell.js.map +1 -1
- package/docs/cli.md +1 -1
- package/docs/development.md +0 -13
- package/docs/extensions.md +6 -4
- package/docs/flow.md +4 -62
- package/docs/forge-run-bootstrap.md +46 -0
- package/docs/humain-code-forge-architecture.md +1 -47
- package/docs/humain-code-forge-flow-walkthrough.md +1 -1
- package/docs/humain-code.md +2 -2
- package/docs/index.md +2 -1
- package/docs/keybindings.md +12 -0
- package/docs/llama-cpp.md +5 -5
- package/docs/models-configuration.md +4 -2
- package/docs/nvidia-rtx-llama-cpp.md +5 -5
- package/docs/providers.md +14 -9
- package/docs/quickstart.md +16 -2
- package/docs/rpc-commands.md +1 -1
- package/docs/run-preflight.md +1 -1
- package/docs/slash-commands.md +5 -3
- package/docs/tui.md +2 -0
- package/examples/README.md +0 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/gondolin/index.ts +4 -7
- package/examples/tsconfig.json +96 -76
- package/npm-shrinkwrap.json +285 -764
- package/package.json +24 -37
- package/schemas/keybindings.schema.json +32 -0
- package/schemas/models.schema.json +5 -1
- package/schemas/settings.schema.json +0 -13
- package/src/humain/web-access/UPSTREAM.md +52 -1
- package/src/humain/web-access/upstream.json +5 -5
- package/src/humain/web-access/vendor/CHANGELOG.md +29 -0
- package/dist/bundle/chunks/adaptive-peer-worker-X2ZNZE3S.js +0 -8
- package/dist/bundle/chunks/adaptive-session-host-7KDSQV5I.js +0 -162
- package/dist/bundle/chunks/anthropic-messages-TQK3FUV3.js +0 -68
- package/dist/bundle/chunks/azure-openai-responses-JY7OSLH2.js +0 -15
- package/dist/bundle/chunks/chunk-5L4PBYC7.js +0 -11
- package/dist/bundle/chunks/chunk-6PNQYO6A.js +0 -10
- package/dist/bundle/chunks/chunk-CRN54O4D.js +0 -24
- package/dist/bundle/chunks/chunk-CTU2ECLD.js +0 -7
- package/dist/bundle/chunks/chunk-DBL35X7L.js +0 -3
- package/dist/bundle/chunks/chunk-GME4AWDG.js +0 -23
- package/dist/bundle/chunks/chunk-GTILMMUF.js +0 -12
- package/dist/bundle/chunks/chunk-J57HOSWD.js +0 -21
- package/dist/bundle/chunks/chunk-KQM7ZGL6.js +0 -11
- package/dist/bundle/chunks/chunk-MX4Q4W6H.js +0 -214
- package/dist/bundle/chunks/chunk-NXA6NEHE.js +0 -54
- package/dist/bundle/chunks/chunk-PJACZCIR.js +0 -2
- package/dist/bundle/chunks/chunk-T5A6T24H.js +0 -93
- package/dist/bundle/chunks/chunk-WCFHG6NO.js +0 -16
- package/dist/bundle/chunks/chunk-ZJUU6WOV.js +0 -2052
- package/dist/bundle/chunks/compat-ZK2DIW3P.js +0 -15
- package/dist/bundle/chunks/dist-EY7YKQHB.js +0 -11
- package/dist/bundle/chunks/dist-J5IUPLMH.js +0 -37
- package/dist/bundle/chunks/dist-cjs-2SKN226B.js +0 -184
- package/dist/bundle/chunks/entry-AL54ZGYO.js +0 -2
- package/dist/bundle/chunks/es5-GYTRHFKS.js +0 -77
- package/dist/bundle/chunks/google-generative-ai-UL7YEQ6J.js +0 -21
- package/dist/bundle/chunks/google-vertex-OTMSPUYH.js +0 -26
- package/dist/bundle/chunks/host-75YAHLDR.js +0 -3
- package/dist/bundle/chunks/interactive-mode-IW4PIVAQ.js +0 -5
- package/dist/bundle/chunks/mistral-conversations-E72Y6OC3.js +0 -43
- package/dist/bundle/chunks/pdfjs-AKD6EBKN.js +0 -3614
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-FH3KJM4H.js +0 -326
- package/dist/bundle/chunks/pdfjs-openjpeg-SKR7C34X.js +0 -671
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-VUBL7UEE.js +0 -974
- package/dist/bundle/chunks/session-picker-DM6S37IF.js +0 -4
- package/dist/bundle/chunks/startup-ui-4GGLWNSU.js +0 -3
- package/dist/bundle/chunks/virtual-modules-TI3W24YL.js +0 -28
- package/dist/core/internal-process.d.ts +0 -23
- package/dist/core/internal-process.d.ts.map +0 -1
- package/dist/core/internal-process.js +0 -88
- package/dist/core/internal-process.js.map +0 -1
- package/dist/humain/adaptive-execution.d.ts +0 -51
- package/dist/humain/adaptive-execution.d.ts.map +0 -1
- package/dist/humain/adaptive-execution.js +0 -100
- package/dist/humain/adaptive-execution.js.map +0 -1
- package/dist/humain/adaptive-peer-process.d.ts +0 -44
- package/dist/humain/adaptive-peer-process.d.ts.map +0 -1
- package/dist/humain/adaptive-peer-process.js +0 -159
- package/dist/humain/adaptive-peer-process.js.map +0 -1
- package/dist/humain/adaptive-peer-worker.d.ts +0 -3
- package/dist/humain/adaptive-peer-worker.d.ts.map +0 -1
- package/dist/humain/adaptive-peer-worker.js +0 -122
- package/dist/humain/adaptive-peer-worker.js.map +0 -1
- package/dist/humain/adaptive-runtime-types.d.ts +0 -621
- package/dist/humain/adaptive-runtime-types.d.ts.map +0 -1
- package/dist/humain/adaptive-runtime-types.js +0 -3
- package/dist/humain/adaptive-runtime-types.js.map +0 -1
- package/dist/humain/adaptive-session-host.d.ts +0 -113
- package/dist/humain/adaptive-session-host.d.ts.map +0 -1
- package/dist/humain/adaptive-session-host.js +0 -1838
- package/dist/humain/adaptive-session-host.js.map +0 -1
- package/dist/utils/deprecation.d.ts +0 -4
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js +0 -13
- package/dist/utils/deprecation.js.map +0 -1
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -24
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{buildQueryString,client_exports as client_exports2,dist_es_exports,httpAuthSchemes_exports,init_client as init_client2,init_dist_es,init_httpAuthSchemes,init_protocols,init_protocols2,init_retry,protocols_exports,protocols_exports2,require_dist_cjs,require_dist_cjs2,require_dist_cjs3,retry_exports}from"./chunk-
|
|
3
|
-
init_client,init_config,init_endpoints,init_schema,init_serde,schema_exports,serde_exports}from"./chunk-
|
|
2
|
+
import{event_streams_exports,init_event_streams}from"./chunk-4XF5JX7X.js";import{buildQueryString,client_exports as client_exports2,dist_es_exports,httpAuthSchemes_exports,init_client as init_client2,init_dist_es,init_httpAuthSchemes,init_protocols,init_protocols2,init_retry,protocols_exports,protocols_exports2,require_dist_cjs,require_dist_cjs2,require_dist_cjs3,retry_exports}from"./chunk-J4GII2EE.js";import{checksum_exports,client_exports,config_exports,endpoints_exports,init_checksum,
|
|
3
|
+
init_client,init_config,init_endpoints,init_schema,init_serde,schema_exports,serde_exports}from"./chunk-UXM4WFLH.js";import{Agent,HttpsProxyAgent,createNegotiateAuth,init_dist,init_dist2,init_dist3,require_src}from"./chunk-O4DO5RWS.js";import{require_dist}from"./chunk-AQ4EXORZ.js";import{__commonJS,__esm,__export,__require,__toCommonJS,__toESM}from"./chunk-JXWJOIH4.js";var require_dist_cjs4=__commonJS({"node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js"(exports){var{HttpRequest}=(init_protocols(),__toCommonJS(protocols_exports));function resolveEventStreamConfig(input){let eventSigner=input.signer,messageSigner=input.signer,newInput=Object.assign(input,{eventSigner,messageSigner}),eventStreamPayloadHandler=newInput.eventStreamPayloadHandlerProvider(newInput);return Object.assign(newInput,{eventStreamPayloadHandler})}var eventStreamHandlingMiddleware=options=>(next,context)=>async args=>{
|
|
4
4
|
let{request}=args;return HttpRequest.isInstance(request)?options.eventStreamPayloadHandler.handle(next,args,context):next(args)},eventStreamHandlingMiddlewareOptions={tags:["EVENT_STREAM","SIGNATURE","HANDLE"],name:"eventStreamHandlingMiddleware",relation:"after",toMiddleware:"awsAuthMiddleware",override:!0},eventStreamHeaderMiddleware=next=>async args=>{let{request}=args;return HttpRequest.isInstance(request)?(request.headers={...request.headers,"content-type":"application/vnd.amazon.eventstrea\
|
|
5
5
|
m","x-amz-content-sha256":"STREAMING-AWS4-HMAC-SHA256-EVENTS"},next({...args,request})):next(args)},eventStreamHeaderMiddlewareOptions={step:"build",tags:["EVENT_STREAM","HEADER","CONTENT_TYPE","CONTENT_SHA256"],name:"eventStreamHeaderMiddleware",override:!0},getEventStreamPlugin=options=>({applyToStack:clientStack=>{clientStack.addRelativeTo(eventStreamHandlingMiddleware(options),eventStreamHandlingMiddlewareOptions),clientStack.add(eventStreamHeaderMiddleware,eventStreamHeaderMiddlewareOptions)}});
|
|
6
6
|
exports.eventStreamHandlingMiddleware=eventStreamHandlingMiddleware;exports.eventStreamHandlingMiddlewareOptions=eventStreamHandlingMiddlewareOptions;exports.eventStreamHeaderMiddleware=eventStreamHeaderMiddleware;exports.eventStreamHeaderMiddlewareOptions=eventStreamHeaderMiddlewareOptions;exports.getEventStreamPlugin=getEventStreamPlugin;exports.resolveEventStreamConfig=resolveEventStreamConfig}});var validate,parse,build,init_arn=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js"(){validate=str=>typeof str=="string"&&str.indexOf("arn:")===0&&str.split(":").length>=6,parse=arn=>{let segments=arn.split(":");if(segments.length<6||segments[0]!=="arn")throw new Error("Malformed ARN");let[,partition,service,region,accountId,...resource]=segments;return{partition,service,region,accountId,resource:resource.join(":")}},build=arnObject=>{let{partition="aws",service,
|
|
7
7
|
region,accountId,resource}=arnObject;if([service,region,accountId,resource].some(segment=>typeof segment!="string"))throw new Error("Input ARN object is invalid");return`arn:${partition}:${service}:${region}:${accountId}:${resource}`}}});function formatUrl(request){let{port,query}=request,{protocol,path,hostname}=request;protocol&&protocol.slice(-1)!==":"&&(protocol+=":"),port&&(hostname+=`:${port}`),path&&path.charAt(0)!=="/"&&(path=`/${path}`);let queryString=query?buildQueryString(query):"";queryString&&queryString[0]!=="?"&&(queryString=`?${queryString}`);let auth="";if(request.username!=null||request.password!=null){let username=request.username??"",password=request.password??"";auth=`${username}:${password}@`}let fragment="";
|
|
8
|
-
return request.fragment&&(fragment=`#${request.fragment}`),`${protocol}//${auth}${hostname}${path}${queryString}${fragment}`}var init_format_url=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/util-format-url/format-url.js"(){init_protocols()}});function hasOwn(container,key){return Object.prototype.hasOwnProperty.call(container,key)}var init_hasOwn=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js"(){}});var util_exports={};__export(util_exports,{build:()=>build,formatUrl:()=>formatUrl,hasOwn:()=>hasOwn,parse:()=>parse,validate:()=>validate});var init_util=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/index.js"(){init_arn();init_format_url();init_hasOwn()}});var require_dist_cjs5=__commonJS({"node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports){var{buildQueryString:buildQueryString2,HttpResponse}=(init_protocols(),__toCommonJS(protocols_exports)),{streamCollector}=(init_serde(),__toCommonJS(serde_exports));exports.streamCollector=streamCollector;function createRequest(url,requestOptions){return new Request(url,requestOptions)}function requestTimeout(timeoutInMs=0){return
|
|
9
|
-
`Request did not complete within ${timeoutInMs} ms`);timeoutError.name="TimeoutError",reject(timeoutError)},timeoutInMs)})}var keepAliveSupport={supported:void 0},FetchHttpHandler=class _FetchHttpHandler{config;configProvider;static create(instanceOrOptions){return typeof instanceOrOptions?.handle=="function"?instanceOrOptions:new _FetchHttpHandler(instanceOrOptions)}constructor(options){typeof options=="
|
|
10
|
-
Promise.resolve(this.config)),keepAliveSupport.supported===void 0&&(keepAliveSupport.supported=typeof Request<"u"&&"keepalive"in createRequest("https://[::1]"))}destroy(){}async handle(request,{abortSignal,requestTimeout:requestTimeout$1}={}){this.config||(this.config=await this.configProvider);let requestTimeoutInMs=requestTimeout$1??this.config.requestTimeout,keepAlive=this.config.keepAlive
|
|
11
|
-
let abortError=buildAbortError(abortSignal);return Promise.reject(abortError)}let path=request.path,queryString=buildQueryString2(request.query||{});queryString&&(path+=`?${queryString}`),request.fragment&&(path+=`#${request.fragment}`);let auth="";if(request.username!=null||request.password!=null){let username=request.username??"",password=request.password??"";auth=`${username}:${password}@`}let{
|
|
12
|
-
body=method==="GET"||method==="HEAD"?void 0:request.body,requestOptions={body,headers:new Headers(request.headers),method,credentials};this.config?.cache&&(requestOptions.cache=this.config.cache),body&&(requestOptions.duplex="half"),typeof AbortController<"u"&&(requestOptions.signal=abortSignal),keepAliveSupport.supported&&(requestOptions.keepalive=keepAlive),typeof this.config.requestInit=="
|
|
13
|
-
fetchRequest=createRequest(url,requestOptions),raceOfPromises=[fetchFn(fetchRequest).then(response=>{let fetchHeaders=response.headers,transformedHeaders={};for(let pair of fetchHeaders.entries())transformedHeaders[pair[0]]=pair[1];return response.body!=null?{response:new HttpResponse({headers:transformedHeaders,reason:response.statusText,statusCode:response.
|
|
14
|
-
statusCode:response.status,body:body2})}))}),
|
|
15
|
-
removeSignalEventListener)}updateHttpClientConfig(key,value){this.config=void 0,this.configProvider=this.configProvider.then(config=>(config[key]=value,config))}httpHandlerConfigs(){return this.config??{}}};function buildAbortError(abortSignal){let reason=abortSignal&&typeof abortSignal=="object"&&"reason"in abortSignal?abortSignal.reason:void 0;if(reason){
|
|
16
|
-
let abortError2=new Error(String(reason));return abortError2.name="AbortError",abortError2}let abortError=new Error("Request aborted");return abortError.name="AbortError",abortError}exports.FetchHttpHandler=FetchHttpHandler;exports.keepAliveSupport=keepAliveSupport}});var require_dist_cjs6=__commonJS({"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports){var{formatUrl:formatUrl2}=(init_util(),__toCommonJS(util_exports)),{iterableToReadableStream,readableStreamToIterable,EventStreamCodec}=(init_event_streams(),__toCommonJS(event_streams_exports)),{HttpResponse,HttpRequest}=(init_protocols(),__toCommonJS(protocols_exports)),{fromBase64,fromHex}=(init_serde(),__toCommonJS(serde_exports)),{FetchHttpHandler}=require_dist_cjs5(),isWebSocketRequest=request=>request.
|
|
8
|
+
return request.fragment&&(fragment=`#${request.fragment}`),`${protocol}//${auth}${hostname}${path}${queryString}${fragment}`}var init_format_url=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/util-format-url/format-url.js"(){init_protocols()}});function hasOwn(container,key){return Object.prototype.hasOwnProperty.call(container,key)}var init_hasOwn=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js"(){}});var util_exports={};__export(util_exports,{build:()=>build,formatUrl:()=>formatUrl,hasOwn:()=>hasOwn,parse:()=>parse,validate:()=>validate});var init_util=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/util/index.js"(){init_arn();init_format_url();init_hasOwn()}});var require_dist_cjs5=__commonJS({"node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports){var{buildQueryString:buildQueryString2,HttpResponse}=(init_protocols(),__toCommonJS(protocols_exports)),{streamCollector}=(init_serde(),__toCommonJS(serde_exports));exports.streamCollector=streamCollector;function createRequest(url,requestOptions){return new Request(url,requestOptions)}function requestTimeout(timeoutInMs=0){let timeoutId;return{promise:new Promise((resolve,reject)=>{timeoutInMs&&
|
|
9
|
+
(timeoutId=setTimeout(()=>{let timeoutError=new Error(`Request did not complete within ${timeoutInMs} ms`);timeoutError.name="TimeoutError",reject(timeoutError)},timeoutInMs))}),cancel:()=>clearTimeout(timeoutId)}}var keepAliveSupport={supported:void 0},FetchHttpHandler=class _FetchHttpHandler{config;configProvider;static create(instanceOrOptions){return typeof instanceOrOptions?.handle=="function"?instanceOrOptions:new _FetchHttpHandler(instanceOrOptions)}constructor(options){typeof options=="f\
|
|
10
|
+
unction"?this.configProvider=options().then(opts=>opts||{}):(this.config=options??{},this.configProvider=Promise.resolve(this.config)),keepAliveSupport.supported===void 0&&(keepAliveSupport.supported=typeof Request<"u"&&"keepalive"in createRequest("https://[::1]"))}destroy(){}async handle(request,{abortSignal,requestTimeout:requestTimeout$1}={}){this.config||(this.config=await this.configProvider);let requestTimeoutInMs=requestTimeout$1??this.config.requestTimeout,keepAlive=this.config.keepAlive===
|
|
11
|
+
!0,credentials=this.config.credentials,fetchFn=this.config.customFetch??fetch;if(abortSignal?.aborted){let abortError=buildAbortError(abortSignal);return Promise.reject(abortError)}let path=request.path,queryString=buildQueryString2(request.query||{});queryString&&(path+=`?${queryString}`),request.fragment&&(path+=`#${request.fragment}`);let auth="";if(request.username!=null||request.password!=null){let username=request.username??"",password=request.password??"";auth=`${username}:${password}@`}let{
|
|
12
|
+
port,method}=request,url=`${request.protocol}//${auth}${request.hostname}${port?`:${port}`:""}${path}`,body=method==="GET"||method==="HEAD"?void 0:request.body,requestOptions={body,headers:new Headers(request.headers),method,credentials};this.config?.cache&&(requestOptions.cache=this.config.cache),body&&(requestOptions.duplex="half"),typeof AbortController<"u"&&(requestOptions.signal=abortSignal),keepAliveSupport.supported&&(requestOptions.keepalive=keepAlive),typeof this.config.requestInit=="fu\
|
|
13
|
+
nction"&&Object.assign(requestOptions,this.config.requestInit(request));let removeSignalEventListener=()=>{},timeout=requestTimeout(requestTimeoutInMs),fetchRequest=createRequest(url,requestOptions),raceOfPromises=[fetchFn(fetchRequest).then(response=>{let fetchHeaders=response.headers,transformedHeaders={};for(let pair of fetchHeaders.entries())transformedHeaders[pair[0]]=pair[1];return response.body!=null?{response:new HttpResponse({headers:transformedHeaders,reason:response.statusText,statusCode:response.
|
|
14
|
+
status,body:response.body})}:response.blob().then(body2=>({response:new HttpResponse({headers:transformedHeaders,reason:response.statusText,statusCode:response.status,body:body2})}))}),timeout.promise];return abortSignal&&raceOfPromises.push(new Promise((resolve,reject)=>{let onAbort=()=>{let abortError=buildAbortError(abortSignal);reject(abortError)};if(typeof abortSignal.addEventListener=="function"){let signal=abortSignal;signal.addEventListener("abort",onAbort,{once:!0}),removeSignalEventListener=
|
|
15
|
+
()=>signal.removeEventListener("abort",onAbort)}else abortSignal.onabort=onAbort})),Promise.race(raceOfPromises).finally(()=>{timeout.cancel(),removeSignalEventListener()})}updateHttpClientConfig(key,value){this.config=void 0,this.configProvider=this.configProvider.then(config=>(config[key]=value,config))}httpHandlerConfigs(){return this.config??{}}};function buildAbortError(abortSignal){let reason=abortSignal&&typeof abortSignal=="object"&&"reason"in abortSignal?abortSignal.reason:void 0;if(reason){
|
|
16
|
+
if(reason instanceof Error){let abortError3=new Error("Request aborted");return abortError3.name="AbortError",abortError3.cause=reason,abortError3}let abortError2=new Error(String(reason));return abortError2.name="AbortError",abortError2}let abortError=new Error("Request aborted");return abortError.name="AbortError",abortError}exports.FetchHttpHandler=FetchHttpHandler;exports.keepAliveSupport=keepAliveSupport}});var require_dist_cjs6=__commonJS({"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports){var{formatUrl:formatUrl2}=(init_util(),__toCommonJS(util_exports)),{iterableToReadableStream,readableStreamToIterable,EventStreamCodec}=(init_event_streams(),__toCommonJS(event_streams_exports)),{HttpResponse,HttpRequest}=(init_protocols(),__toCommonJS(protocols_exports)),{fromBase64,fromHex}=(init_serde(),__toCommonJS(serde_exports)),{FetchHttpHandler}=require_dist_cjs5(),isWebSocketRequest=request=>request.
|
|
17
17
|
protocol==="ws:"||request.protocol==="wss:",DEFAULT_WS_CONNECTION_TIMEOUT_MS=3e3,WebSocketFetchHandler=class _WebSocketFetchHandler{metadata={handlerProtocol:"websocket/h1.1"};config={};configPromise;httpHandler;sockets={};static create(instanceOrOptions,httpHandler=new FetchHttpHandler){return typeof instanceOrOptions?.handle=="function"?instanceOrOptions:new _WebSocketFetchHandler(instanceOrOptions,httpHandler)}constructor(options,httpHandler=new FetchHttpHandler){this.httpHandler=httpHandler;
|
|
18
18
|
let setConfig=opts=>(this.config={...opts??{}},this.config);typeof options=="function"?(this.config={},this.configPromise=options().then(opts=>setConfig(opts))):this.configPromise=Promise.resolve(setConfig(options))}destroy(){for(let[key,sockets]of Object.entries(this.sockets)){for(let socket of sockets)socket.close(1e3,"Socket closed through destroy() call");delete this.sockets[key]}}async handle(request){this.config=await this.configPromise;let{logger}=this.config;if(!isWebSocketRequest(request))
|
|
19
19
|
return logger?.debug?.(`@aws-sdk - ws fetching ${request.protocol}${request.hostname}${request.path}`),this.httpHandler.handle(request);let url=formatUrl2(request);logger?.debug?.(`@aws-sdk - ws connecting ${url.split("?")[0]}`);let socket=new WebSocket(url);this.sockets[url]||(this.sockets[url]=[]),this.sockets[url].push(socket),socket.binaryType="arraybuffer";let{connectionTimeout=DEFAULT_WS_CONNECTION_TIMEOUT_MS}=this.config;await this.waitForReady(socket,connectionTimeout);let{body}=request,
|
|
@@ -44,7 +44,7 @@ getRetryPlugin}=(init_retry(),__toCommonJS(retry_exports)),{TypeRegistry,getSche
|
|
|
44
44
|
{streamCollector,NodeHttp2Handler}=require_dist_cjs(),{AwsRestJsonProtocol}=(init_protocols2(),__toCommonJS(protocols_exports2)),{Sha256}=(init_checksum(),__toCommonJS(checksum_exports)),defaultBedrockRuntimeHttpAuthSchemeParametersProvider=async(config,context,input)=>({operation:getSmithyContext(context).operation,region:await normalizeProvider(config.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption(authParameters){
|
|
45
45
|
return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:authParameters.region},propertiesExtractor:(config,context)=>({signingProperties:{config,context}})}}function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters){return{schemeId:"smithy.api#httpBearerAuth",propertiesExtractor:({profile,filepath,configFilepath,ignoreCache},context)=>({identityProperties:{profile,filepath,configFilepath,ignoreCache}})}}var defaultBedrockRuntimeHttpAuthSchemeProvider=authParameters=>{
|
|
46
46
|
let options=[];switch(authParameters.operation){default:options.push(createAwsAuthSigv4HttpAuthOption(authParameters)),options.push(createSmithyApiHttpBearerAuthHttpAuthOption())}return options},resolveHttpAuthSchemeConfig=config=>{let token=memoizeIdentityProvider(config.token,isIdentityExpired,doesIdentityRequireRefresh),config_0=resolveAwsSdkSigV4Config(config);return Object.assign(config_0,{authSchemePreference:normalizeProvider(config.authSchemePreference??[]),token})},resolveClientEndpointParameters=options=>Object.
|
|
47
|
-
assign(options,{useDualstackEndpoint:options.useDualstackEndpoint??!1,useFipsEndpoint:options.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),commonParams={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},version="3.
|
|
47
|
+
assign(options,{useDualstackEndpoint:options.useDualstackEndpoint??!1,useFipsEndpoint:options.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),commonParams={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},version="3.1174.0",packageInfo={version},k="ref",a=-1,b=!0,c="isSet",d="PartitionResult",e="booleanEquals",f="getAttr",g={[k]:"End\
|
|
48
48
|
point"},h={[k]:d},i={},j=[{[k]:"Region"}],_data={conditions:[[c,[g]],[c,j],["aws.partition",j,d],[e,[{[k]:"UseFIPS"},b]],[e,[{[k]:"UseDualStack"},b]],[e,[{fn:f,argv:[h,"supportsDualStack"]},b]],[e,[{fn:f,argv:[h,"supportsFIPS"]},b]]],results:[[a],[a,"Invalid Configuration: FIPS and custom endpoint are not supported"],[a,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[g,i],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",i],[a,"FIPS and Dual\
|
|
49
49
|
Stack are enabled, but this partition does not support one or both"],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",i],[a,"FIPS is enabled but this partition does not support FIPS"],["https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",i],[a,"DualStack is enabled but this partition does not support DualStack"],["https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",i],[a,"Invalid Configuration: Missing Region"]]},root=2,r=1e8,nodes=new Int32Array(
|
|
50
50
|
[-1,1,-1,0,12,3,1,4,r+11,2,5,r+11,3,8,6,4,7,r+10,5,r+8,r+9,4,10,9,6,r+6,r+7,5,11,r+5,6,r+4,r+5,3,r+1,13,4,r+2,r+3]),bdd=BinaryDecisionDiagram.from(nodes,root,_data.conditions,_data.results),cache=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver=(endpointParams,context={})=>cache.get(endpointParams,()=>decideEndpoint(bdd,{endpointParams,logger:context.logger}));customEndpointFunctions.aws=awsEndpointFunctions;var BedrockRuntimeServiceException2=class _BedrockRuntimeServiceException extends ServiceException{static shapeId="\
|
|
@@ -74,129 +74,129 @@ keModelWithBidirectionalStreamResponse",_IMWRS="InvokeModelWithResponseStream",_
|
|
|
74
74
|
MessageStopEvent",_MTE="ModelTimeoutException",_Me="Messages",_OC="OutputConfig",_OF="OutputFormat",_OFS="OutputFormatStructure",_PB="PartBody",_PC="PerformanceConfiguration",_PP="PayloadPart",_PRT="PromptRouterTrace",_PVM="PromptVariableMap",_PVV="PromptVariableValues",_RCB="ReasoningContentBlock",_RCBD="ReasoningContentBlockDelta",_RM="RequestMetadata",_RMJ="RequestMetadataJson",_RNFE="ResourceNotFoundException",_RS="ResponseStream",_RTB="ReasoningTextBlock",_SAI="StartAsyncInvoke",_SAIR="Star\
|
|
75
75
|
tAsyncInvokeRequest",_SAIRt="StartAsyncInvokeResponse",_SCB="SystemContentBlocks",_SCBy="SystemContentBlock",_SL="S3Location",_SQEE="ServiceQuotaExceededException",_SRB="SearchResultBlock",_SRCB="SearchResultContentBlock",_SRCBe="SearchResultContentBlocks",_SRL="SearchResultLocation",_ST="ServiceTier",_STC="SpecificToolChoice",_STy="SystemTool",_SUE="ServiceUnavailableException",_T="Tag",_TAB="ToolAdditionBlock",_TC="ToolConfiguration",_TCo="ToolChoice",_TE="ThrottlingException",_TIS="ToolInputS\
|
|
76
76
|
chema",_TL="TagList",_TR="ToolReference",_TRB="ToolRemovalBlock",_TRBD="ToolResultBlocksDelta",_TRBDo="ToolResultBlockDelta",_TRBS="ToolResultBlockStart",_TRBo="ToolResultBlock",_TRCB="ToolResultContentBlocks",_TRCBo="ToolResultContentBlock",_TS="ToolSpecification",_TU="TokenUsage",_TUB="ToolUseBlock",_TUBD="ToolUseBlockDelta",_TUBS="ToolUseBlockStart",_To="Tools",_Too="Tool",_VB="VideoBlock",_VE="ValidationException",_VS="VideoSource",_WL="WebLocation",_XABA="X-Amzn-Bedrock-Accept",_XABCT="X-Am\
|
|
77
|
-
zn-Bedrock-Content-Type",_XABG="X-Amzn-Bedrock-GuardrailIdentifier",_XABG_="X-Amzn-Bedrock-GuardrailVersion",_XABPL="X-Amzn-Bedrock-PerformanceConfig-Latency",_XABRM="X-Amzn-Bedrock-Request-Metadata",_XABST="X-Amzn-Bedrock-Service-Tier",_XABT="X-Amzn-Bedrock-Trace",_a="action",_aGD="appliedGuardrailDetails",_aIS="asyncInvokeSummaries",_aMRF="additionalModelRequestFields",_aMRFP="additionalModelResponseFieldPaths",_aMRFd="additionalModelResponseFields",_aR="
|
|
78
|
-
|
|
79
|
-
contentPolicy",_cPIU="contentPolicyImageUnits",_cPU="contentPolicyUnits",_cPa="cachePoint",_cR="contradictingRules",_cRIT="cacheReadInputTokens",_cRT="clientRequestToken",_cS="confidenceScore",_cT="contentType",_cTS="claimsTrueScenario",_cW="customWords",_cWIT="cacheWriteInputTokens",_ca="category",_cat="categories",_ch="checks",_chu="chunk",_ci="citations",_cit="citation",_cl="claims",_co="content",_con="context",_conf="confidence",_conv="converse",_d="
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_lMT="lastModifiedTime",_lW="logicWarning",_la="latency",_lo="logic",_m="message",_mA="modelArn",_mI="modelId",_mIe="messageIndex",_mIo="modelInput",_mO="modelOutput",_mR="maxResults",_mS="messageStart",_mSEE="modelStreamErrorException",_mSe="messageStop",_mT="maxTokens",_mTE="modelTimeoutException",_mWL="managedWordLists",_ma="match",_me="messages",_met="metrics",_meta="metadata",_n="name",_nL="naturalLanguage",_nT="nextToken",_nTo="noTranslations",_o="
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
throttlingException",_tF="textFormat",_tP="topicPolicy",_tPU="topicPolicyUnits",_tPo="topP",_tR="toolResult",_tRo="toolRemoval",_tS="toolSpec",_tT="totalTokens",_tU="textUnits",_tUI="toolUseId",_tUo="toolUse",_ta="tags",_te="text",_tem="temperature",_th="threshold",_ti="title",_to="total",_too="tool",_tool="tools",_top="topics",_tr="trace",_tra="translation",_tran="translations",_tru="truncated",_ty="type",_u="usage",_uC="
|
|
87
|
-
|
|
88
|
-
var ConflictException$=[-3,n0,_CE,{[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ConflictException$,ConflictException);var InternalServerException$=[-3,n0,_ISE,{[_e]:_se,[_hE]:500},[_m],[0]];n0_registry.registerError(InternalServerException$,InternalServerException);var ModelErrorException$=[-3,n0,_MEE,{[_e]:_c,[_hE]:424},[_m,_oSC,_rN],[0,1,0]];n0_registry.registerError(ModelErrorException$,ModelErrorException);var ModelNotReadyException$=[
|
|
89
|
-
registerError(ModelNotReadyException$,ModelNotReadyException);var ModelStreamErrorException$=[-3,n0,_MSEE,{[_e]:_c,[_hE]:424},[_m,_oSC,_oM],[0,1,0]];n0_registry.registerError(ModelStreamErrorException$,ModelStreamErrorException);var ModelTimeoutException$=[-3,n0,_MTE,{[_e]:_c,[_hE]:408},[_m],[0]];n0_registry.registerError(ModelTimeoutException$,ModelTimeoutException);var ResourceNotFoundException$=[-3,n0,_RNFE,{[_e]:_c,[_hE]:404},[_m],[0]];n0_registry.
|
|
90
|
-
var ServiceQuotaExceededException$=[-3,n0,_SQEE,{[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ServiceQuotaExceededException$,ServiceQuotaExceededException);var ServiceUnavailableException$=[-3,n0,_SUE,{[_e]:_se,[_hE]:503},[_m],[0]];n0_registry.registerError(ServiceUnavailableException$,ServiceUnavailableException);var ThrottlingException$=[-3,n0,_TE,{[_e]:_c,[_hE]:429},[_m],[0]];n0_registry.registerError(ThrottlingException$,
|
|
91
|
-
[_hE]:400},[_m],[0]];n0_registry.registerError(ValidationException$,ValidationException);var errorTypeRegistries=[_s_registry,n0_registry],AsyncInvokeMessage=[0,n0,_AIM,8,0],Body=[0,n0,_B,8,21],GuardrailAutomatedReasoningStatementLogicContent=[0,n0,_GARSLC,8,0],GuardrailAutomatedReasoningStatementNaturalLanguageContent=[0,n0,_GARSNLC,8,0],GuardrailChecksTextContent=[0,n0,_GCTC,8,0],ModelInputPayload=[0,n0,_MIP,8,15],PartBody=[0,n0,
|
|
92
|
-
_ATC,0,[],[]],AppliedGuardrailDetails$=[3,n0,_AGD,0,[_gI,_gV,_gA,_gO,_gOu],[0,0,0,64,0]],ApplyGuardrailRequest$=[3,n0,_AGR,0,[_gIu,_gV,_so,_co,_oS],[[0,1],[0,1],0,[()=>GuardrailContentBlockList,0],0],4],ApplyGuardrailResponse$=[3,n0,_AGRp,0,[_u,_a,_o,_as,_aR,_gC],[()=>GuardrailUsage$,0,()=>GuardrailOutputContentList,[()=>GuardrailAssessmentList,0],0,()=>GuardrailCoverage$],4],AsyncInvokeS3OutputDataConfig$=[3,n0,_AISODC,0,[_sU,_kKI,
|
|
93
|
-
_cRT,_st,_fM,_lMT,_eT],[0,0,5,()=>AsyncInvokeOutputDataConfig$,0,0,[()=>AsyncInvokeMessage,0],5,5],4],AudioBlock$=[3,n0,_AB,0,[_f,_so,_e],[0,[()=>AudioSource$,0],[()=>ErrorBlock$,0]],2],AutoToolChoice$=[3,n0,_ATCu,0,[],[]],BidirectionalInputPayloadPart$=[3,n0,_BIPP,8,[_b],[[()=>PartBody,0]]],BidirectionalOutputPayloadPart$=[3,n0,_BOPP,8,[_b],[[()=>PartBody,0]]],CacheDetail$=[3,n0,_CD,0,[_t,_iT],[0,1],2],CachePointBlock$=[3,n0,_CPB,
|
|
94
|
-
()=>CitationLocation$]],CitationsConfig$=[3,n0,_CC,0,[_en],[2],1],CitationsContentBlock$=[3,n0,_CCB,0,[_co,_ci],[()=>CitationGeneratedContentList,()=>Citations]],CitationsDelta$=[3,n0,_CDi,0,[_ti,_so,_sC,_l],[0,0,()=>CitationSourceContentListDelta,()=>CitationLocation$]],CitationSourceContentDelta$=[3,n0,_CSCD,0,[_te],[0]],ContentBlockDeltaEvent$=[3,n0,_CBDE,0,[_d,_cBI],[[()=>ContentBlockDelta$,0],1],2],
|
|
95
|
-
3,n0,_CBSEo,0,[_cBI],[1],1],ConverseMetrics$=[3,n0,_CM,0,[_lM],[1],1],ConverseRequest$=[3,n0,_CR,0,[_mI,_me,_sy,_iC,_tC,_gCu,_aMRF,_pV,_aMRFP,_rM,_pC,_sTe,_oC],[[0,1],[()=>Messages,0],[()=>SystemContentBlocks,0],()=>InferenceConfiguration$,()=>ToolConfiguration$,()=>GuardrailConfiguration$,15,[()=>PromptVariableMap,0],64,[()=>RequestMetadata,0],()=>PerformanceConfiguration$,()=>ServiceTier$,
|
|
96
|
-
0],0,()=>TokenUsage$,()=>ConverseMetrics$,15,[()=>ConverseTrace$,0],()=>PerformanceConfiguration$,()=>ServiceTier$],4],ConverseStreamMetadataEvent$=[3,n0,_CSME,0,[_u,_met,_tr,_pC,_sTe],[()=>TokenUsage$,()=>ConverseStreamMetrics$,[()=>ConverseStreamTrace$,0],()=>PerformanceConfiguration$,()=>ServiceTier$],2],ConverseStreamMetrics$=[3,n0,_CSM,0,[_lM],[1],1],ConverseStreamRequest$=[3,
|
|
97
|
-
0],()=>InferenceConfiguration$,()=>ToolConfiguration$,()=>GuardrailStreamConfiguration$,15,[()=>PromptVariableMap,0],64,[()=>RequestMetadata,0],()=>PerformanceConfiguration$,()=>ServiceTier$,[()=>OutputConfig$,0]],1],ConverseStreamResponse$=[3,n0,_CSRo,0,[_str],[[()=>ConverseStreamOutput$,16]]],ConverseStreamTrace$=[3,n0,_CST,0,[_g,_pR],[[()=>GuardrailTraceAssessment$,0],
|
|
98
|
-
()=>ToolConfiguration$,15]],ConverseTrace$=[3,n0,_CT,0,[_g,_pR],[[()=>GuardrailTraceAssessment$,0],()=>PromptRouterTrace$]],CountTokensRequest$=[3,n0,_CTRo,0,[_mI,_i],[[0,1],[()=>CountTokensInput$,0]],2],CountTokensResponse$=[3,n0,_CTRou,0,[_iT],[1],1],DocumentBlock$=[3,n0,_DB,0,[_n,_so,_f,_con,_ci],[0,()=>DocumentSource$,0,0,()=>CitationsConfig$],2],DocumentCharLocation$=[
|
|
99
|
-
n0,_DPL,0,[_dI,_sta,_end],[1,1,1]],ErrorBlock$=[3,n0,_EB,8,[_m],[0]],GetAsyncInvokeRequest$=[3,n0,_GAIR,0,[_iA],[[0,1]],1],GetAsyncInvokeResponse$=[3,n0,_GAIRe,0,[_iA,_mA,_st,_sT,_oDC,_cRT,_fM,_lMT,_eT],[0,0,0,5,()=>AsyncInvokeOutputDataConfig$,0,[()=>AsyncInvokeMessage,0],5,5],5],GuardrailAssessment$=[3,n0,_GA,0,[_tP,_cP,_wP,_sIP,_cGP,_aRP,_iM,_aGD],[()=>GuardrailTopicPolicyAssessment$,
|
|
100
|
-
()=>GuardrailContextualGroundingPolicyAssessment$,[()=>GuardrailAutomatedReasoningPolicyAssessment$,0],()=>GuardrailInvocationMetrics$,()=>AppliedGuardrailDetails$]],GuardrailAutomatedReasoningImpossibleFinding$=[3,n0,_GARIF,0,[_tra,_cR,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,
|
|
101
|
-
0]]],GuardrailAutomatedReasoningInvalidFinding$=[3,n0,_GARIFu,0,[_tra,_cR,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,0]]],GuardrailAutomatedReasoningLogicWarning$=[3,n0,_GARLW,0,[_ty,_p,_cl],[0,[()=>GuardrailAutomatedReasoningStatementList,0],[()=>GuardrailAutomatedReasoningStatementList,
|
|
102
|
-
3,n0,_GARPA,0,[_fi],[[()=>GuardrailAutomatedReasoningFindingList,0]]],GuardrailAutomatedReasoningRule$=[3,n0,_GARR,0,[_id,_pVA],[0,0]],GuardrailAutomatedReasoningSatisfiableFinding$=[3,n0,_GARSF,0,[_tra,_cTS,_cFS,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],[()=>GuardrailAutomatedReasoningScenario$,0],[()=>GuardrailAutomatedReasoningScenario$,0],[()=>GuardrailAutomatedReasoningLogicWarning$,
|
|
103
|
-
0]]],GuardrailAutomatedReasoningStatement$=[3,n0,_GARSu,0,[_lo,_nL],[[()=>GuardrailAutomatedReasoningStatementLogicContent,0],[()=>GuardrailAutomatedReasoningStatementNaturalLanguageContent,0]]],GuardrailAutomatedReasoningTooComplexFinding$=[3,n0,_GARTCF,0,[],[]],GuardrailAutomatedReasoningTranslation$=[3,n0,_GART,0,[_p,_cl,_uP,_uC,_conf],[[()=>GuardrailAutomatedReasoningStatementList,0],
|
|
104
|
-
0],1]],GuardrailAutomatedReasoningTranslationAmbiguousFinding$=[3,n0,_GARTAF,0,[_op,_dS],[[()=>GuardrailAutomatedReasoningTranslationOptionList,0],[()=>GuardrailAutomatedReasoningDifferenceScenarioList,0]]],GuardrailAutomatedReasoningTranslationOption$=[3,n0,_GARTO,0,[_tran],[[()=>GuardrailAutomatedReasoningTranslationList,0]]],GuardrailAutomatedReasoningValidFinding$=[
|
|
105
|
-
()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,0]]],GuardrailChecksConfig$=[3,n0,_GCC,0,[_cF,_pA,_sI],[()=>GuardrailChecksContentFilterConfig$,()=>GuardrailChecksPromptAttackConfig$,()=>GuardrailChecksSensitiveInformationConfig$]],GuardrailChecksContentFilterCategoryConfig$=[3,n0,_GCCFCC,0,[_ca],[0],1],GuardrailChecksContentFilterConfig$=[
|
|
106
|
-
0,[_r],[()=>GuardrailChecksContentFilterResultList],1],GuardrailChecksContentFilterResultEntry$=[3,n0,_GCCFRE,0,[_ca,_sS],[0,1],2],GuardrailChecksContentFilterUsage$=[3,n0,_GCCFU,0,[_tU],[1],1],GuardrailChecksMessage$=[3,n0,_GCM,0,[_ro,_co],[0,[()=>GuardrailChecksContentBlockList,0]],2],GuardrailChecksPromptAttackCategoryConfig$=[3,n0,_GCPACC,0,[_ca],[0],1],GuardrailChecksPromptAttackConfig$=[
|
|
107
|
-
3,n0,_GCPAR,0,[_r],[()=>GuardrailChecksPromptAttackResultList],1],GuardrailChecksPromptAttackResultEntry$=[3,n0,_GCPARE,0,[_ca,_sS],[0,1],2],GuardrailChecksPromptAttackUsage$=[3,n0,_GCPAU,0,[_tU],[1],1],GuardrailChecksResults$=[3,n0,_GCR,0,[_cF,_pA,_sI],[()=>GuardrailChecksContentFilterResult$,()=>GuardrailChecksPromptAttackResult$,()=>GuardrailChecksSensitiveInformationResult$]],GuardrailChecksSensitiveInformationConfig$=[
|
|
108
|
-
1],GuardrailChecksSensitiveInformationEntityConfig$=[3,n0,_GCSIEC,0,[_ty],[0],1],GuardrailChecksSensitiveInformationResult$=[3,n0,_GCSIR,0,[_r,_tru],[()=>GuardrailChecksSensitiveInformationResultList,2],1],GuardrailChecksSensitiveInformationResultEntry$=[3,n0,_GCSIRE,0,[_ty,_cS,_bOe,_eO,_mIe,_cI],[0,1,1,1,1,1],6],GuardrailChecksSensitiveInformationUsage$=[3,n0,_GCSIU,0,[_tU],[1],1],GuardrailChecksUsageResults$=[3,n0,_GCUR,
|
|
109
|
-
()=>GuardrailChecksSensitiveInformationUsage$]],GuardrailConfiguration$=[3,n0,_GC,0,[_gIu,_gV,_tr],[0,0,0]],GuardrailContentFilter$=[3,n0,_GCF,0,[_ty,_conf,_a,_fS,_de],[0,0,0,0,2],3],GuardrailContentPolicyAssessment$=[3,n0,_GCPA,0,[_fil],[()=>GuardrailContentFilterList],1],GuardrailContextualGroundingFilter$=[3,n0,_GCGF,0,[_ty,_th,_sc,_a,_de],[0,1,1,0,2],4],GuardrailContextualGroundingPolicyAssessment$=[
|
|
110
|
-
3,n0,_GCIB,8,[_f,_so],[0,[()=>GuardrailConverseImageSource$,0]],2],GuardrailConverseTextBlock$=[3,n0,_GCTB,0,[_te,_q],[0,64],1],GuardrailCoverage$=[3,n0,_GCu,0,[_tCe,_im],[()=>GuardrailTextCharactersCoverage$,()=>GuardrailImageCoverage$]],GuardrailCustomWord$=[3,n0,_GCW,0,[_ma,_a,_de],[0,0,2],2],GuardrailImageBlock$=[3,n0,_GIB,8,[_f,_so],[0,[()=>GuardrailImageSource$,0]],2],GuardrailImageCoverage$=[3,n0,
|
|
111
|
-
()=>GuardrailCoverage$]],GuardrailManagedWord$=[3,n0,_GMW,0,[_ma,_ty,_a,_de],[0,0,0,2],3],GuardrailOutputContent$=[3,n0,_GOC,0,[_te],[0]],GuardrailPiiEntityFilter$=[3,n0,_GPEF,0,[_ma,_ty,_a,_de],[0,0,0,2],3],GuardrailRegexFilter$=[3,n0,_GRF,0,[_a,_n,_ma,_re,_de],[0,0,0,0,2],1],GuardrailSensitiveInformationPolicyAssessment$=[3,n0,_GSIPA,0,[_pE,_reg],[()=>GuardrailPiiEntityFilterList,()=>GuardrailRegexFilterList],
|
|
112
|
-
3,n0,_GTB,0,[_te,_q],[0,64],1],GuardrailTextCharactersCoverage$=[3,n0,_GTCC,0,[_gu,_to],[1,1]],GuardrailTopic$=[3,n0,_GT,0,[_n,_ty,_a,_de],[0,0,0,2],3],GuardrailTopicPolicyAssessment$=[3,n0,_GTPA,0,[_top],[()=>GuardrailTopicList],1],GuardrailTraceAssessment$=[3,n0,_GTA,0,[_mO,_iAn,_oA,_aR],[64,[()=>GuardrailAssessmentMap,0],[()=>GuardrailAssessmentListMap,0],0]],GuardrailUsage$=[3,n0,_GU,0,[_tPU,_cPU,
|
|
113
|
-
3,n0,_GWPA,0,[_cW,_mWL],[()=>GuardrailCustomWordList,()=>GuardrailManagedWordList],2],ImageBlock$=[3,n0,_IB,0,[_f,_so,_e],[0,[()=>ImageSource$,0],[()=>ErrorBlock$,0]],2],ImageBlockDelta$=[3,n0,_IBD,0,[_so,_e],[[()=>ImageSource$,0],[()=>ErrorBlock$,0]]],ImageBlockStart$=[3,n0,_IBS,0,[_f],[0],1],InferenceConfiguration$=[3,n0,_IC,0,[_mT,_tem,_tPo,_sSt],[1,1,1,64]],InvokeGuardrailChecksRequest$=[3,n0,_IGCR,
|
|
114
|
-
3,n0,_IGCRn,0,[_r,_u],[()=>GuardrailChecksResults$,()=>GuardrailChecksUsageResults$],2],InvokeModelRequest$=[3,n0,_IMR,0,[_mI,_bo,_cT,_ac,_tr,_gIu,_gV,_pCL,_sTe,_rM],[[0,1],[()=>Body,16],[0,{[_hH]:_CT_}],[0,{[_hH]:_A}],[0,{[_hH]:_XABT}],[0,{[_hH]:_XABG}],[0,{[_hH]:_XABG_}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}],[()=>RequestMetadataJson,{[_hH]:_XABRM}]
|
|
115
|
-
3,n0,_IMTR,0,[_bo],[[()=>Body,0]],1],InvokeModelWithBidirectionalStreamRequest$=[3,n0,_IMWBSR,0,[_mI,_bo],[[0,1],[()=>InvokeModelWithBidirectionalStreamInput$,16]],2],InvokeModelWithBidirectionalStreamResponse$=[3,n0,_IMWBSRn,0,[_bo],[[()=>InvokeModelWithBidirectionalStreamOutput$,16]],1],InvokeModelWithResponseStreamRequest$=[3,n0,_IMWRSR,0,[_mI,_bo,_cT,_ac,_tr,_gIu,
|
|
116
|
-
[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}],[()=>RequestMetadataJson,{[_hH]:_XABRM}]],1],InvokeModelWithResponseStreamResponse$=[3,n0,_IMWRSRn,0,[_bo,_cT,_pCL,_sTe],[[()=>ResponseStream$,16],[0,{[_hH]:_XABCT}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}]],2],JsonSchemaDefinition$=[3,n0,_JSD,0,[_sch,_n,_des],[0,0,0],1],ListAsyncInvokesRequest$=[3,n0,_LAIR,0,[_sTA,
|
|
117
|
-
3,n0,_LAIRi,0,[_nT,_aIS],[0,[()=>AsyncInvokeSummaries,0]]],Message$=[3,n0,_M,0,[_ro,_co],[0,[()=>ContentBlocks,0]],2],MessageStartEvent$=[3,n0,_MSE,0,[_ro],[0],1],MessageStopEvent$=[3,n0,_MSEe,0,[_sR,_aMRFd],[0,15],1],OutputConfig$=[3,n0,_OC,0,[_tF,_ef],[[()=>OutputFormat$,0],0]],OutputFormat$=[3,n0,_OF,0,[_ty,_stru],[0,[()=>OutputFormatStructure$,
|
|
118
|
-
ReasoningTextBlock$=[3,n0,_RTB,8,[_te,_si],[0,0],1],S3Location$=[3,n0,_SL,0,[_ur,_bO],[0,0],1],SearchResultBlock$=[3,n0,_SRB,0,[_so,_ti,_co,_ci],[0,0,()=>SearchResultContentBlocks,()=>CitationsConfig$],3],SearchResultContentBlock$=[3,n0,_SRCB,0,[_te],[0],1],SearchResultLocation$=[3,n0,_SRL,0,[_sRI,_sta,_end],[1,1,1]],ServiceTier$=[3,n0,_ST,0,[_ty],
|
|
119
|
-
[0,4],()=>TagList],3],StartAsyncInvokeResponse$=[3,n0,_SAIRt,0,[_iA],[0],1],SystemTool$=[3,n0,_STy,0,[_n],[0],1],Tag$=[3,n0,_T,0,[_k,_v],[0,0],2],TokenUsage$=[3,n0,_TU,0,[_iT,_oT,_tT,_cRIT,_cWIT,_cD],[1,1,1,1,1,()=>CacheDetailsList],3],ToolAdditionBlock$=[3,n0,_TAB,0,[_too],[()=>ToolReference$],1],ToolConfiguration$=[3,n0,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
0]],
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
()=>DocumentPageLocation$,()=>DocumentChunkLocation$,()=>SearchResultLocation$]],CitationSourceContent$=[4,n0,_CSC,0,[_te],[0]],ContentBlock$=[4,n0,_CBo,0,[_te,_ima,_doc,_vi,_au,_tUo,_tR,_gCua,_cPa,_rC,_cC,_sRe,_tA,_tRo],[0,[()=>ImageBlock$,
|
|
129
|
-
()=>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
4,n0,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
()=>
|
|
137
|
-
|
|
138
|
-
()=>
|
|
139
|
-
()=>ListAsyncInvokesRequest$,()=>ListAsyncInvokesResponse$],StartAsyncInvoke$=[9,n0,_SAI,{[_h]:["POST","/async-invoke",200]},()=>StartAsyncInvokeRequest$,()=>StartAsyncInvokeResponse$],getRuntimeConfig$1=config=>({apiVersion:"2023-09-30",base64Decoder:config?.
|
|
140
|
-
httpAuthSchemeProvider??defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:config?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:ipc=>ipc.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"smithy
|
|
141
|
-
{defaultNamespace:"com.amazonaws.bedrockruntime",errorTypeRegistries,version:"2023-09-30",serviceTarget:"AmazonBedrockFrontendService"},serviceId:config?.serviceId??"Bedrock Runtime",sha256:config?.sha256??Sha256,urlParser:config?.urlParser??
|
|
142
|
-
then(loadConfigsForDefaultMode),clientSharedValues=getRuntimeConfig$1(config);emitWarningIfUnsupportedVersion$1(process.version);let loaderConfig={profile:config?.profile,logger:clientSharedValues.logger,signingName:"bedrock"};return{...clientSharedValues
|
|
143
|
-
credentialDefaultProvider??defaultProvider,defaultUserAgentProvider:config?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:clientSharedValues.serviceId,clientVersion:packageInfo.version}),eventStreamPayloadHandlerProvider:config?.
|
|
144
|
-
"aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:ipc=>ipc.getIdentityProvider("smithy.api#httpBearerAuth")||(async idProps=>{try{return await fromEnvSigningName({signingName:"
|
|
145
|
-
...loaderConfig}),requestHandler:NodeHttp2Handler.create(config?.requestHandler??(async()=>({...await defaultConfigProvider(),disableConcurrentStreams:!0}))),retryMode:config?.retryMode??loadConfig({...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
146
|
-
useFipsEndpoint??loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,loaderConfig),userAgentAppId:config?.userAgentAppId??loadConfig(NODE_APP_ID_CONFIG_OPTIONS,loaderConfig)}},getHttpAuthExtensionConfiguration=runtimeConfig=>{
|
|
147
|
-
httpAuthScheme.schemeId);index===-1?_httpAuthSchemes.push(httpAuthScheme):_httpAuthSchemes.splice(index,1,httpAuthScheme)},httpAuthSchemes(){return _httpAuthSchemes},setHttpAuthSchemeProvider(httpAuthSchemeProvider){_httpAuthSchemeProvider=
|
|
148
|
-
httpAuthSchemes:config.httpAuthSchemes(),httpAuthSchemeProvider:config.httpAuthSchemeProvider(),credentials:config.credentials(),token:config.token()}),resolveRuntimeExtensions=(runtimeConfig,extensions)=>{let extensionConfiguration=Object.
|
|
149
|
-
extensionConfiguration)),Object.assign(runtimeConfig,resolveAwsRegionExtensionConfiguration(extensionConfiguration),resolveDefaultRuntimeConfig(extensionConfiguration),resolveHttpHandlerRuntimeConfig(extensionConfiguration),resolveHttpAuthRuntimeConfig(
|
|
150
|
-
_config_0),_config_2=resolveUserAgentConfig(_config_1),_config_3=resolveRetryConfig(_config_2),_config_4=resolveRegionConfig(_config_3),_config_5=resolveHostHeaderConfig(_config_4),_config_6=resolveEndpointConfig(_config_5),_config_7=resolveEventStreamSerdeConfig(
|
|
151
|
-
|
|
152
|
-
{httpAuthSchemeParametersProvider:defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async config=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":config.credentials,"smithy.api#httpBearerAuth":config.token})})),this.middlewareStack.
|
|
153
|
-
getEventStreamPlugin(config),getWebSocketPlugin(config,{headerPrefix:"x-amz-bedrock-"})],ApplyGuardrailCommand=class extends command(_ep0,_mw0,"ApplyGuardrail",ApplyGuardrail$){},ConverseCommand=class extends command(_ep0,_mw0,"Converse",Converse$){},ConverseStreamCommand2=class extends command(
|
|
154
|
-
|
|
155
|
-
_ep0,_mw0,"ListAsyncInvokes",ListAsyncInvokes$){},StartAsyncInvokeCommand=class extends command(_ep0,_mw0,"StartAsyncInvoke",StartAsyncInvoke$){},paginateListAsyncInvokes=createPaginator(BedrockRuntimeClient2,ListAsyncInvokesCommand,"nextToken","nextToken","
|
|
156
|
-
ListAsyncInvokesCommand,StartAsyncInvokeCommand},paginators={paginateListAsyncInvokes},BedrockRuntime=class extends BedrockRuntimeClient2{};createAggregatedClient(commands,BedrockRuntime,{paginators});var AsyncInvokeStatus={COMPLETED:"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
assistant",SYSTEM:"system",USER:"user"},GuardrailTrace={DISABLED:"disabled",ENABLED:"enabled",ENABLED_FULL:"enabled_full"},AudioFormat={AAC:"aac",FLAC:"flac",M4A:"m4a",MKA:"mka",MKV:"mkv",MP3:"mp3",MP4:"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
TOOL_USE:"tool_use"},GuardrailStreamProcessingMode={ASYNC:"async",SYNC:"sync"},Trace={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_FULL:"ENABLED_FULL"};exports.AccessDeniedException=AccessDeniedException;
|
|
169
|
-
exports.
|
|
170
|
-
|
|
171
|
-
exports.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
exports.
|
|
175
|
-
exports.
|
|
176
|
-
exports.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
exports.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
exports.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
exports.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
exports.
|
|
195
|
-
|
|
196
|
-
exports.
|
|
197
|
-
|
|
198
|
-
exports.
|
|
199
|
-
VideoSource$;exports.WebLocation$=WebLocation$;exports.errorTypeRegistries=errorTypeRegistries;exports.paginateListAsyncInvokes=paginateListAsyncInvokes}});var import_client_bedrock_runtime=__toESM(require_dist_cjs8(),1),import_node_http_handler=__toESM(require_dist_cjs(),1);var import_debug=__toESM(require_src(),1);init_dist();init_dist2();import*as net from"net";import*as tls from"tls";import{once}from"events";import{URL as URL2}from"url";var debug=(0,import_debug.default)("http-proxy-agent"),HttpProxyAgent=class extends Agent{constructor(proxy,opts){super(opts),this.proxy=typeof proxy=="string"?new URL2(proxy):proxy,this.proxyHeaders=opts?.headers??{},debug("Creating new HttpProxyAgent instance: %o",this.proxy.href),opts?.negotiate?this.onProxyAuth=createNegotiateAuth():
|
|
77
|
+
zn-Bedrock-Content-Type",_XABG="X-Amzn-Bedrock-GuardrailIdentifier",_XABG_="X-Amzn-Bedrock-GuardrailVersion",_XABP="X-Amzn-Bedrock-ProjectIdentifier",_XABPL="X-Amzn-Bedrock-PerformanceConfig-Latency",_XABRM="X-Amzn-Bedrock-Request-Metadata",_XABST="X-Amzn-Bedrock-Service-Tier",_XABT="X-Amzn-Bedrock-Trace",_a="action",_aGD="appliedGuardrailDetails",_aIS="asyncInvokeSummaries",_aMRF="additionalModelRequestFields",_aMRFP="additionalModelResponseFieldPaths",_aMRFd="additionalModelResponseFields",_aR="\
|
|
78
|
+
actionReason",_aRP="automatedReasoningPolicy",_aRPU="automatedReasoningPolicyUnits",_aRPu="automatedReasoningPolicies",_ac="accept",_an="any",_as="assessments",_au="audio",_aut="auto",_b="bytes",_bO="bucketOwner",_bOe="beginOffset",_bo="body",_c="client",_cBD="contentBlockDelta",_cBI="contentBlockIndex",_cBS="contentBlockStart",_cBSo="contentBlockStop",_cC="citationsContent",_cD="cacheDetails",_cF="contentFilter",_cFS="claimsFalseScenario",_cGP="contextualGroundingPolicy",_cGPU="contextualGround\
|
|
79
|
+
ingPolicyUnits",_cI="contentIndex",_cP="contentPolicy",_cPIU="contentPolicyImageUnits",_cPU="contentPolicyUnits",_cPa="cachePoint",_cR="contradictingRules",_cRIT="cacheReadInputTokens",_cRT="clientRequestToken",_cS="confidenceScore",_cT="contentType",_cTS="claimsTrueScenario",_cW="customWords",_cWIT="cacheWriteInputTokens",_ca="category",_cat="categories",_ch="checks",_chu="chunk",_ci="citations",_cit="citation",_cl="claims",_co="content",_con="context",_conf="confidence",_conv="converse",_d="de\
|
|
80
|
+
lta",_dC="documentChar",_dCo="documentChunk",_dI="documentIndex",_dP="documentPage",_dS="differenceScenarios",_de="detected",_des="description",_do="domain",_doc="document",_e="error",_eO="endOffset",_eT="endTime",_ef="effort",_en="enabled",_end="end",_ent="entities",_f="format",_fM="failureMessage",_fS="filterStrength",_fi="findings",_fil="filters",_g="guardrail",_gA="guardrailArn",_gC="guardrailCoverage",_gCu="guardrailConfig",_gCua="guardContent",_gI="guardrailId",_gIu="guardrailIdentifier",_gO="\
|
|
81
|
+
guardrailOrigin",_gOu="guardrailOwnership",_gPL="guardrailProcessingLatency",_gV="guardrailVersion",_gu="guarded",_h="http",_hE="httpError",_hH="httpHeader",_hQ="httpQuery",_i="input",_iA="invocationArn",_iAn="inputAssessment",_iC="inferenceConfig",_iM="invocationMetrics",_iMI="invokedModelId",_iMn="invokeModel",_iS="inputSchema",_iSE="internalServerException",_iT="inputTokens",_id="identifier",_im="images",_ima="image",_imp="impossible",_in="invalid",_j="json",_jS="jsonSchema",_k="key",_kKI="km\
|
|
82
|
+
sKeyId",_l="location",_lM="latencyMs",_lMT="lastModifiedTime",_lW="logicWarning",_la="latency",_lo="logic",_m="message",_mA="modelArn",_mI="modelId",_mIe="messageIndex",_mIo="modelInput",_mO="modelOutput",_mR="maxResults",_mS="messageStart",_mSEE="modelStreamErrorException",_mSe="messageStop",_mT="maxTokens",_mTE="modelTimeoutException",_mWL="managedWordLists",_ma="match",_me="messages",_met="metrics",_meta="metadata",_n="name",_nL="naturalLanguage",_nT="nextToken",_nTo="noTranslations",_o="outp\
|
|
83
|
+
uts",_oA="outputAssessments",_oC="outputConfig",_oDC="outputDataConfig",_oM="originalMessage",_oS="outputScope",_oSC="originalStatusCode",_oT="outputTokens",_op="options",_ou="output",_p="premises",_pA="promptAttack",_pC="performanceConfig",_pCL="performanceConfigLatency",_pE="piiEntities",_pI="projectIdentifier",_pR="promptRouter",_pV="promptVariables",_pVA="policyVersionArn",_q="qualifiers",_r="results",_rC="reasoningContent",_rCe="redactedContent",_rM="requestMetadata",_rN="resourceName",_rT="\
|
|
84
|
+
reasoningText",_re="regex",_reg="regexes",_ro="role",_s="smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime",_sB="sortBy",_sC="sourceContent",_sE="statusEquals",_sI="sensitiveInformation",_sIP="sensitiveInformationPolicy",_sIPFU="sensitiveInformationPolicyFreeUnits",_sIPU="sensitiveInformationPolicyUnits",_sL="s3Location",_sN="serverName",_sO="sortOrder",_sODC="s3OutputDataConfig",_sPM="streamProcessingMode",_sR="stopReason",_sRI="searchResultIndex",_sRL="searchResultLocation",_sRe="searchResu\
|
|
85
|
+
lt",_sRu="supportingRules",_sS="severityScore",_sSt="stopSequences",_sT="submitTime",_sTA="submitTimeAfter",_sTB="submitTimeBefore",_sTe="serviceTier",_sTy="systemTool",_sU="s3Uri",_sUE="serviceUnavailableException",_sa="satisfiable",_sc="score",_sch="schema",_se="server",_si="signature",_so="source",_st="status",_sta="start",_stat="statements",_str="stream",_stre="streaming",_stri="strict",_stru="structure",_sy="system",_t="ttl",_tA="toolAddition",_tAr="translationAmbiguous",_tC="toolConfig",_tCe="\
|
|
86
|
+
textCharacters",_tCo="toolChoice",_tCoo="tooComplex",_tE="throttlingException",_tF="textFormat",_tP="topicPolicy",_tPU="topicPolicyUnits",_tPo="topP",_tR="toolResult",_tRo="toolRemoval",_tS="toolSpec",_tT="totalTokens",_tU="textUnits",_tUI="toolUseId",_tUo="toolUse",_ta="tags",_te="text",_tem="temperature",_th="threshold",_ti="title",_to="total",_too="tool",_tool="tools",_top="topics",_tr="trace",_tra="translation",_tran="translations",_tru="truncated",_ty="type",_u="usage",_uC="untranslatedClai\
|
|
87
|
+
ms",_uP="untranslatedPremises",_ur="uri",_url="url",_v="value",_vE="validationException",_va="valid",_vi="video",_w="web",_wP="wordPolicy",_wPU="wordPolicyUnits",n0="com.amazonaws.bedrockruntime",_s_registry=new TypeRegistry(_s),BedrockRuntimeServiceException$=[-3,_s,"BedrockRuntimeServiceException",0,[],[]];_s_registry.registerError(BedrockRuntimeServiceException$,BedrockRuntimeServiceException2);var n0_registry=new TypeRegistry(n0),AccessDeniedException$=[-3,n0,_ADE,{[_e]:_c,[_hE]:403},[_m],[0]];
|
|
88
|
+
n0_registry.registerError(AccessDeniedException$,AccessDeniedException);var ConflictException$=[-3,n0,_CE,{[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ConflictException$,ConflictException);var InternalServerException$=[-3,n0,_ISE,{[_e]:_se,[_hE]:500},[_m],[0]];n0_registry.registerError(InternalServerException$,InternalServerException);var ModelErrorException$=[-3,n0,_MEE,{[_e]:_c,[_hE]:424},[_m,_oSC,_rN],[0,1,0]];n0_registry.registerError(ModelErrorException$,ModelErrorException);var ModelNotReadyException$=[
|
|
89
|
+
-3,n0,_MNRE,{[_e]:_c,[_hE]:429},[_m],[0]];n0_registry.registerError(ModelNotReadyException$,ModelNotReadyException);var ModelStreamErrorException$=[-3,n0,_MSEE,{[_e]:_c,[_hE]:424},[_m,_oSC,_oM],[0,1,0]];n0_registry.registerError(ModelStreamErrorException$,ModelStreamErrorException);var ModelTimeoutException$=[-3,n0,_MTE,{[_e]:_c,[_hE]:408},[_m],[0]];n0_registry.registerError(ModelTimeoutException$,ModelTimeoutException);var ResourceNotFoundException$=[-3,n0,_RNFE,{[_e]:_c,[_hE]:404},[_m],[0]];n0_registry.
|
|
90
|
+
registerError(ResourceNotFoundException$,ResourceNotFoundException);var ServiceQuotaExceededException$=[-3,n0,_SQEE,{[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ServiceQuotaExceededException$,ServiceQuotaExceededException);var ServiceUnavailableException$=[-3,n0,_SUE,{[_e]:_se,[_hE]:503},[_m],[0]];n0_registry.registerError(ServiceUnavailableException$,ServiceUnavailableException);var ThrottlingException$=[-3,n0,_TE,{[_e]:_c,[_hE]:429},[_m],[0]];n0_registry.registerError(ThrottlingException$,
|
|
91
|
+
ThrottlingException);var ValidationException$=[-3,n0,_VE,{[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ValidationException$,ValidationException);var errorTypeRegistries=[_s_registry,n0_registry],AsyncInvokeMessage=[0,n0,_AIM,8,0],Body=[0,n0,_B,8,21],GuardrailAutomatedReasoningStatementLogicContent=[0,n0,_GARSLC,8,0],GuardrailAutomatedReasoningStatementNaturalLanguageContent=[0,n0,_GARSNLC,8,0],GuardrailChecksTextContent=[0,n0,_GCTC,8,0],ModelInputPayload=[0,n0,_MIP,8,15],PartBody=[0,n0,
|
|
92
|
+
_PB,8,21],RequestMetadataJson=[0,n0,_RMJ,8,0],AnyToolChoice$=[3,n0,_ATC,0,[],[]],AppliedGuardrailDetails$=[3,n0,_AGD,0,[_gI,_gV,_gA,_gO,_gOu],[0,0,0,64,0]],ApplyGuardrailRequest$=[3,n0,_AGR,0,[_gIu,_gV,_so,_co,_oS],[[0,1],[0,1],0,[()=>GuardrailContentBlockList,0],0],4],ApplyGuardrailResponse$=[3,n0,_AGRp,0,[_u,_a,_o,_as,_aR,_gC],[()=>GuardrailUsage$,0,()=>GuardrailOutputContentList,[()=>GuardrailAssessmentList,0],0,()=>GuardrailCoverage$],4],AsyncInvokeS3OutputDataConfig$=[3,n0,_AISODC,0,[_sU,_kKI,
|
|
93
|
+
_bO],[0,0,0],1],AsyncInvokeSummary$=[3,n0,_AIS,0,[_iA,_mA,_sT,_oDC,_cRT,_st,_fM,_lMT,_eT],[0,0,5,()=>AsyncInvokeOutputDataConfig$,0,0,[()=>AsyncInvokeMessage,0],5,5],4],AudioBlock$=[3,n0,_AB,0,[_f,_so,_e],[0,[()=>AudioSource$,0],[()=>ErrorBlock$,0]],2],AutoToolChoice$=[3,n0,_ATCu,0,[],[]],BidirectionalInputPayloadPart$=[3,n0,_BIPP,8,[_b],[[()=>PartBody,0]]],BidirectionalOutputPayloadPart$=[3,n0,_BOPP,8,[_b],[[()=>PartBody,0]]],CacheDetail$=[3,n0,_CD,0,[_t,_iT],[0,1],2],CachePointBlock$=[3,n0,_CPB,
|
|
94
|
+
0,[_ty,_t],[0,0],1],Citation$=[3,n0,_C,0,[_ti,_so,_sC,_l],[0,0,()=>CitationSourceContentList,()=>CitationLocation$]],CitationsConfig$=[3,n0,_CC,0,[_en],[2],1],CitationsContentBlock$=[3,n0,_CCB,0,[_co,_ci],[()=>CitationGeneratedContentList,()=>Citations]],CitationsDelta$=[3,n0,_CDi,0,[_ti,_so,_sC,_l],[0,0,()=>CitationSourceContentListDelta,()=>CitationLocation$]],CitationSourceContentDelta$=[3,n0,_CSCD,0,[_te],[0]],ContentBlockDeltaEvent$=[3,n0,_CBDE,0,[_d,_cBI],[[()=>ContentBlockDelta$,0],1],2],
|
|
95
|
+
ContentBlockStartEvent$=[3,n0,_CBSE,0,[_sta,_cBI],[()=>ContentBlockStart$,1],2],ContentBlockStopEvent$=[3,n0,_CBSEo,0,[_cBI],[1],1],ConverseMetrics$=[3,n0,_CM,0,[_lM],[1],1],ConverseRequest$=[3,n0,_CR,0,[_mI,_me,_sy,_iC,_tC,_gCu,_pI,_aMRF,_pV,_aMRFP,_rM,_pC,_sTe,_oC],[[0,1],[()=>Messages,0],[()=>SystemContentBlocks,0],()=>InferenceConfiguration$,()=>ToolConfiguration$,()=>GuardrailConfiguration$,0,15,[()=>PromptVariableMap,0],64,[()=>RequestMetadata,0],()=>PerformanceConfiguration$,()=>ServiceTier$,
|
|
96
|
+
[()=>OutputConfig$,0]],1],ConverseResponse$=[3,n0,_CRo,0,[_ou,_sR,_u,_met,_aMRFd,_tr,_pC,_sTe],[[()=>ConverseOutput$,0],0,()=>TokenUsage$,()=>ConverseMetrics$,15,[()=>ConverseTrace$,0],()=>PerformanceConfiguration$,()=>ServiceTier$],4],ConverseStreamMetadataEvent$=[3,n0,_CSME,0,[_u,_met,_tr,_pC,_sTe],[()=>TokenUsage$,()=>ConverseStreamMetrics$,[()=>ConverseStreamTrace$,0],()=>PerformanceConfiguration$,()=>ServiceTier$],2],ConverseStreamMetrics$=[3,n0,_CSM,0,[_lM],[1],1],ConverseStreamRequest$=[3,
|
|
97
|
+
n0,_CSR,0,[_mI,_me,_sy,_iC,_tC,_gCu,_pI,_aMRF,_pV,_aMRFP,_rM,_pC,_sTe,_oC],[[0,1],[()=>Messages,0],[()=>SystemContentBlocks,0],()=>InferenceConfiguration$,()=>ToolConfiguration$,()=>GuardrailStreamConfiguration$,0,15,[()=>PromptVariableMap,0],64,[()=>RequestMetadata,0],()=>PerformanceConfiguration$,()=>ServiceTier$,[()=>OutputConfig$,0]],1],ConverseStreamResponse$=[3,n0,_CSRo,0,[_str],[[()=>ConverseStreamOutput$,16]]],ConverseStreamTrace$=[3,n0,_CST,0,[_g,_pR],[[()=>GuardrailTraceAssessment$,0],
|
|
98
|
+
()=>PromptRouterTrace$]],ConverseTokensRequest$=[3,n0,_CTR,0,[_me,_sy,_tC,_aMRF],[[()=>Messages,0],[()=>SystemContentBlocks,0],()=>ToolConfiguration$,15]],ConverseTrace$=[3,n0,_CT,0,[_g,_pR],[[()=>GuardrailTraceAssessment$,0],()=>PromptRouterTrace$]],CountTokensRequest$=[3,n0,_CTRo,0,[_mI,_i],[[0,1],[()=>CountTokensInput$,0]],2],CountTokensResponse$=[3,n0,_CTRou,0,[_iT],[1],1],DocumentBlock$=[3,n0,_DB,0,[_n,_so,_f,_con,_ci],[0,()=>DocumentSource$,0,0,()=>CitationsConfig$],2],DocumentCharLocation$=[
|
|
99
|
+
3,n0,_DCL,0,[_dI,_sta,_end],[1,1,1]],DocumentChunkLocation$=[3,n0,_DCLo,0,[_dI,_sta,_end],[1,1,1]],DocumentPageLocation$=[3,n0,_DPL,0,[_dI,_sta,_end],[1,1,1]],ErrorBlock$=[3,n0,_EB,8,[_m],[0]],GetAsyncInvokeRequest$=[3,n0,_GAIR,0,[_iA],[[0,1]],1],GetAsyncInvokeResponse$=[3,n0,_GAIRe,0,[_iA,_mA,_st,_sT,_oDC,_cRT,_fM,_lMT,_eT],[0,0,0,5,()=>AsyncInvokeOutputDataConfig$,0,[()=>AsyncInvokeMessage,0],5,5],5],GuardrailAssessment$=[3,n0,_GA,0,[_tP,_cP,_wP,_sIP,_cGP,_aRP,_iM,_aGD],[()=>GuardrailTopicPolicyAssessment$,
|
|
100
|
+
()=>GuardrailContentPolicyAssessment$,()=>GuardrailWordPolicyAssessment$,()=>GuardrailSensitiveInformationPolicyAssessment$,()=>GuardrailContextualGroundingPolicyAssessment$,[()=>GuardrailAutomatedReasoningPolicyAssessment$,0],()=>GuardrailInvocationMetrics$,()=>AppliedGuardrailDetails$]],GuardrailAutomatedReasoningImpossibleFinding$=[3,n0,_GARIF,0,[_tra,_cR,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,
|
|
101
|
+
0]]],GuardrailAutomatedReasoningInputTextReference$=[3,n0,_GARITR,0,[_te],[[()=>GuardrailAutomatedReasoningStatementNaturalLanguageContent,0]]],GuardrailAutomatedReasoningInvalidFinding$=[3,n0,_GARIFu,0,[_tra,_cR,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,0]]],GuardrailAutomatedReasoningLogicWarning$=[3,n0,_GARLW,0,[_ty,_p,_cl],[0,[()=>GuardrailAutomatedReasoningStatementList,0],[()=>GuardrailAutomatedReasoningStatementList,
|
|
102
|
+
0]]],GuardrailAutomatedReasoningNoTranslationsFinding$=[3,n0,_GARNTF,0,[],[]],GuardrailAutomatedReasoningPolicyAssessment$=[3,n0,_GARPA,0,[_fi],[[()=>GuardrailAutomatedReasoningFindingList,0]]],GuardrailAutomatedReasoningRule$=[3,n0,_GARR,0,[_id,_pVA],[0,0]],GuardrailAutomatedReasoningSatisfiableFinding$=[3,n0,_GARSF,0,[_tra,_cTS,_cFS,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],[()=>GuardrailAutomatedReasoningScenario$,0],[()=>GuardrailAutomatedReasoningScenario$,0],[()=>GuardrailAutomatedReasoningLogicWarning$,
|
|
103
|
+
0]]],GuardrailAutomatedReasoningScenario$=[3,n0,_GARS,0,[_stat],[[()=>GuardrailAutomatedReasoningStatementList,0]]],GuardrailAutomatedReasoningStatement$=[3,n0,_GARSu,0,[_lo,_nL],[[()=>GuardrailAutomatedReasoningStatementLogicContent,0],[()=>GuardrailAutomatedReasoningStatementNaturalLanguageContent,0]]],GuardrailAutomatedReasoningTooComplexFinding$=[3,n0,_GARTCF,0,[],[]],GuardrailAutomatedReasoningTranslation$=[3,n0,_GART,0,[_p,_cl,_uP,_uC,_conf],[[()=>GuardrailAutomatedReasoningStatementList,0],
|
|
104
|
+
[()=>GuardrailAutomatedReasoningStatementList,0],[()=>GuardrailAutomatedReasoningInputTextReferenceList,0],[()=>GuardrailAutomatedReasoningInputTextReferenceList,0],1]],GuardrailAutomatedReasoningTranslationAmbiguousFinding$=[3,n0,_GARTAF,0,[_op,_dS],[[()=>GuardrailAutomatedReasoningTranslationOptionList,0],[()=>GuardrailAutomatedReasoningDifferenceScenarioList,0]]],GuardrailAutomatedReasoningTranslationOption$=[3,n0,_GARTO,0,[_tran],[[()=>GuardrailAutomatedReasoningTranslationList,0]]],GuardrailAutomatedReasoningValidFinding$=[
|
|
105
|
+
3,n0,_GARVF,0,[_tra,_cTS,_sRu,_lW],[[()=>GuardrailAutomatedReasoningTranslation$,0],[()=>GuardrailAutomatedReasoningScenario$,0],()=>GuardrailAutomatedReasoningRuleList,[()=>GuardrailAutomatedReasoningLogicWarning$,0]]],GuardrailChecksConfig$=[3,n0,_GCC,0,[_cF,_pA,_sI],[()=>GuardrailChecksContentFilterConfig$,()=>GuardrailChecksPromptAttackConfig$,()=>GuardrailChecksSensitiveInformationConfig$]],GuardrailChecksContentFilterCategoryConfig$=[3,n0,_GCCFCC,0,[_ca],[0],1],GuardrailChecksContentFilterConfig$=[
|
|
106
|
+
3,n0,_GCCFC,0,[_cat],[()=>GuardrailChecksContentFilterCategoryConfigList],1],GuardrailChecksContentFilterResult$=[3,n0,_GCCFR,0,[_r],[()=>GuardrailChecksContentFilterResultList],1],GuardrailChecksContentFilterResultEntry$=[3,n0,_GCCFRE,0,[_ca,_sS],[0,1],2],GuardrailChecksContentFilterUsage$=[3,n0,_GCCFU,0,[_tU],[1],1],GuardrailChecksMessage$=[3,n0,_GCM,0,[_ro,_co],[0,[()=>GuardrailChecksContentBlockList,0]],2],GuardrailChecksPromptAttackCategoryConfig$=[3,n0,_GCPACC,0,[_ca],[0],1],GuardrailChecksPromptAttackConfig$=[
|
|
107
|
+
3,n0,_GCPAC,0,[_cat],[()=>GuardrailChecksPromptAttackCategoryConfigList],1],GuardrailChecksPromptAttackResult$=[3,n0,_GCPAR,0,[_r],[()=>GuardrailChecksPromptAttackResultList],1],GuardrailChecksPromptAttackResultEntry$=[3,n0,_GCPARE,0,[_ca,_sS],[0,1],2],GuardrailChecksPromptAttackUsage$=[3,n0,_GCPAU,0,[_tU],[1],1],GuardrailChecksResults$=[3,n0,_GCR,0,[_cF,_pA,_sI],[()=>GuardrailChecksContentFilterResult$,()=>GuardrailChecksPromptAttackResult$,()=>GuardrailChecksSensitiveInformationResult$]],GuardrailChecksSensitiveInformationConfig$=[
|
|
108
|
+
3,n0,_GCSIC,0,[_ent],[()=>GuardrailChecksSensitiveInformationEntityConfigList],1],GuardrailChecksSensitiveInformationEntityConfig$=[3,n0,_GCSIEC,0,[_ty],[0],1],GuardrailChecksSensitiveInformationResult$=[3,n0,_GCSIR,0,[_r,_tru],[()=>GuardrailChecksSensitiveInformationResultList,2],1],GuardrailChecksSensitiveInformationResultEntry$=[3,n0,_GCSIRE,0,[_ty,_cS,_bOe,_eO,_mIe,_cI],[0,1,1,1,1,1],6],GuardrailChecksSensitiveInformationUsage$=[3,n0,_GCSIU,0,[_tU],[1],1],GuardrailChecksUsageResults$=[3,n0,_GCUR,
|
|
109
|
+
0,[_cF,_pA,_sI],[()=>GuardrailChecksContentFilterUsage$,()=>GuardrailChecksPromptAttackUsage$,()=>GuardrailChecksSensitiveInformationUsage$]],GuardrailConfiguration$=[3,n0,_GC,0,[_gIu,_gV,_tr],[0,0,0]],GuardrailContentFilter$=[3,n0,_GCF,0,[_ty,_conf,_a,_fS,_de],[0,0,0,0,2],3],GuardrailContentPolicyAssessment$=[3,n0,_GCPA,0,[_fil],[()=>GuardrailContentFilterList],1],GuardrailContextualGroundingFilter$=[3,n0,_GCGF,0,[_ty,_th,_sc,_a,_de],[0,1,1,0,2],4],GuardrailContextualGroundingPolicyAssessment$=[
|
|
110
|
+
3,n0,_GCGPA,0,[_fil],[()=>GuardrailContextualGroundingFilters]],GuardrailConverseImageBlock$=[3,n0,_GCIB,8,[_f,_so],[0,[()=>GuardrailConverseImageSource$,0]],2],GuardrailConverseTextBlock$=[3,n0,_GCTB,0,[_te,_q],[0,64],1],GuardrailCoverage$=[3,n0,_GCu,0,[_tCe,_im],[()=>GuardrailTextCharactersCoverage$,()=>GuardrailImageCoverage$]],GuardrailCustomWord$=[3,n0,_GCW,0,[_ma,_a,_de],[0,0,2],2],GuardrailImageBlock$=[3,n0,_GIB,8,[_f,_so],[0,[()=>GuardrailImageSource$,0]],2],GuardrailImageCoverage$=[3,n0,
|
|
111
|
+
_GIC,0,[_gu,_to],[1,1]],GuardrailInvocationMetrics$=[3,n0,_GIM,0,[_gPL,_u,_gC],[1,()=>GuardrailUsage$,()=>GuardrailCoverage$]],GuardrailManagedWord$=[3,n0,_GMW,0,[_ma,_ty,_a,_de],[0,0,0,2],3],GuardrailOutputContent$=[3,n0,_GOC,0,[_te],[0]],GuardrailPiiEntityFilter$=[3,n0,_GPEF,0,[_ma,_ty,_a,_de],[0,0,0,2],3],GuardrailRegexFilter$=[3,n0,_GRF,0,[_a,_n,_ma,_re,_de],[0,0,0,0,2],1],GuardrailSensitiveInformationPolicyAssessment$=[3,n0,_GSIPA,0,[_pE,_reg],[()=>GuardrailPiiEntityFilterList,()=>GuardrailRegexFilterList],
|
|
112
|
+
2],GuardrailStreamConfiguration$=[3,n0,_GSC,0,[_gIu,_gV,_tr,_sPM],[0,0,0,0]],GuardrailTextBlock$=[3,n0,_GTB,0,[_te,_q],[0,64],1],GuardrailTextCharactersCoverage$=[3,n0,_GTCC,0,[_gu,_to],[1,1]],GuardrailTopic$=[3,n0,_GT,0,[_n,_ty,_a,_de],[0,0,0,2],3],GuardrailTopicPolicyAssessment$=[3,n0,_GTPA,0,[_top],[()=>GuardrailTopicList],1],GuardrailTraceAssessment$=[3,n0,_GTA,0,[_mO,_iAn,_oA,_aR],[64,[()=>GuardrailAssessmentMap,0],[()=>GuardrailAssessmentListMap,0],0]],GuardrailUsage$=[3,n0,_GU,0,[_tPU,_cPU,
|
|
113
|
+
_wPU,_sIPU,_sIPFU,_cGPU,_cPIU,_aRPU,_aRPu],[1,1,1,1,1,1,1,1,1],6],GuardrailWordPolicyAssessment$=[3,n0,_GWPA,0,[_cW,_mWL],[()=>GuardrailCustomWordList,()=>GuardrailManagedWordList],2],ImageBlock$=[3,n0,_IB,0,[_f,_so,_e],[0,[()=>ImageSource$,0],[()=>ErrorBlock$,0]],2],ImageBlockDelta$=[3,n0,_IBD,0,[_so,_e],[[()=>ImageSource$,0],[()=>ErrorBlock$,0]]],ImageBlockStart$=[3,n0,_IBS,0,[_f],[0],1],InferenceConfiguration$=[3,n0,_IC,0,[_mT,_tem,_tPo,_sSt],[1,1,1,64]],InvokeGuardrailChecksRequest$=[3,n0,_IGCR,
|
|
114
|
+
0,[_me,_ch],[[()=>GuardrailChecksMessageList,0],()=>GuardrailChecksConfig$],2],InvokeGuardrailChecksResponse$=[3,n0,_IGCRn,0,[_r,_u],[()=>GuardrailChecksResults$,()=>GuardrailChecksUsageResults$],2],InvokeModelRequest$=[3,n0,_IMR,0,[_mI,_bo,_cT,_ac,_tr,_gIu,_gV,_pCL,_sTe,_rM,_pI],[[0,1],[()=>Body,16],[0,{[_hH]:_CT_}],[0,{[_hH]:_A}],[0,{[_hH]:_XABT}],[0,{[_hH]:_XABG}],[0,{[_hH]:_XABG_}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}],[()=>RequestMetadataJson,{[_hH]:_XABRM}],[0,{[_hH]:_XABP}]],1],InvokeModelResponse$=[
|
|
115
|
+
3,n0,_IMRn,0,[_bo,_cT,_pCL,_sTe],[[()=>Body,16],[0,{[_hH]:_CT_}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}]],2],InvokeModelTokensRequest$=[3,n0,_IMTR,0,[_bo],[[()=>Body,0]],1],InvokeModelWithBidirectionalStreamRequest$=[3,n0,_IMWBSR,0,[_mI,_bo],[[0,1],[()=>InvokeModelWithBidirectionalStreamInput$,16]],2],InvokeModelWithBidirectionalStreamResponse$=[3,n0,_IMWBSRn,0,[_bo],[[()=>InvokeModelWithBidirectionalStreamOutput$,16]],1],InvokeModelWithResponseStreamRequest$=[3,n0,_IMWRSR,0,[_mI,_bo,_cT,_ac,_tr,_gIu,
|
|
116
|
+
_gV,_pCL,_sTe,_rM,_pI],[[0,1],[()=>Body,16],[0,{[_hH]:_CT_}],[0,{[_hH]:_XABA}],[0,{[_hH]:_XABT}],[0,{[_hH]:_XABG}],[0,{[_hH]:_XABG_}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}],[()=>RequestMetadataJson,{[_hH]:_XABRM}],[0,{[_hH]:_XABP}]],1],InvokeModelWithResponseStreamResponse$=[3,n0,_IMWRSRn,0,[_bo,_cT,_pCL,_sTe],[[()=>ResponseStream$,16],[0,{[_hH]:_XABCT}],[0,{[_hH]:_XABPL}],[0,{[_hH]:_XABST}]],2],JsonSchemaDefinition$=[3,n0,_JSD,0,[_sch,_n,_des],[0,0,0],1],ListAsyncInvokesRequest$=[3,n0,_LAIR,0,[_sTA,
|
|
117
|
+
_sTB,_sE,_mR,_nT,_sB,_sO],[[5,{[_hQ]:_sTA}],[5,{[_hQ]:_sTB}],[0,{[_hQ]:_sE}],[1,{[_hQ]:_mR}],[0,{[_hQ]:_nT}],[0,{[_hQ]:_sB}],[0,{[_hQ]:_sO}]]],ListAsyncInvokesResponse$=[3,n0,_LAIRi,0,[_nT,_aIS],[0,[()=>AsyncInvokeSummaries,0]]],Message$=[3,n0,_M,0,[_ro,_co],[0,[()=>ContentBlocks,0]],2],MessageStartEvent$=[3,n0,_MSE,0,[_ro],[0],1],MessageStopEvent$=[3,n0,_MSEe,0,[_sR,_aMRFd],[0,15],1],OutputConfig$=[3,n0,_OC,0,[_tF,_ef],[[()=>OutputFormat$,0],0]],OutputFormat$=[3,n0,_OF,0,[_ty,_stru],[0,[()=>OutputFormatStructure$,
|
|
118
|
+
0]],2],PayloadPart$=[3,n0,_PP,8,[_b],[[()=>PartBody,0]]],PerformanceConfiguration$=[3,n0,_PC,0,[_la],[0]],PromptRouterTrace$=[3,n0,_PRT,0,[_iMI],[0]],ReasoningTextBlock$=[3,n0,_RTB,8,[_te,_si],[0,0],1],S3Location$=[3,n0,_SL,0,[_ur,_bO],[0,0],1],SearchResultBlock$=[3,n0,_SRB,0,[_so,_ti,_co,_ci],[0,0,()=>SearchResultContentBlocks,()=>CitationsConfig$],3],SearchResultContentBlock$=[3,n0,_SRCB,0,[_te],[0],1],SearchResultLocation$=[3,n0,_SRL,0,[_sRI,_sta,_end],[1,1,1]],ServiceTier$=[3,n0,_ST,0,[_ty],
|
|
119
|
+
[0],1],SpecificToolChoice$=[3,n0,_STC,0,[_n],[0],1],StartAsyncInvokeRequest$=[3,n0,_SAIR,0,[_mI,_mIo,_oDC,_cRT,_ta],[0,[()=>ModelInputPayload,0],()=>AsyncInvokeOutputDataConfig$,[0,4],()=>TagList],3],StartAsyncInvokeResponse$=[3,n0,_SAIRt,0,[_iA],[0],1],SystemTool$=[3,n0,_STy,0,[_n],[0],1],Tag$=[3,n0,_T,0,[_k,_v],[0,0],2],TokenUsage$=[3,n0,_TU,0,[_iT,_oT,_tT,_cRIT,_cWIT,_cD],[1,1,1,1,1,()=>CacheDetailsList],3],ToolAdditionBlock$=[3,n0,_TAB,0,[_too],[()=>ToolReference$],1],ToolConfiguration$=[3,n0,
|
|
120
|
+
_TC,0,[_tool,_tCo],[()=>Tools,()=>ToolChoice$],1],ToolReference$=[3,n0,_TR,0,[_ty,_n,_sN],[0,0,0]],ToolRemovalBlock$=[3,n0,_TRB,0,[_too],[()=>ToolReference$],1],ToolResultBlock$=[3,n0,_TRBo,0,[_tUI,_co,_st,_ty],[0,[()=>ToolResultContentBlocks,0],0,0],2],ToolResultBlockStart$=[3,n0,_TRBS,0,[_tUI,_ty,_st],[0,0,0],1],ToolSpecification$=[3,n0,_TS,0,[_n,_iS,_des,_stri],[0,()=>ToolInputSchema$,0,2],2],ToolUseBlock$=[3,n0,_TUB,0,[_tUI,_n,_i,_ty],[0,0,15,0],3],ToolUseBlockDelta$=[3,n0,_TUBD,0,[_i],[0],1],
|
|
121
|
+
ToolUseBlockStart$=[3,n0,_TUBS,0,[_tUI,_n,_ty],[0,0,0],2],VideoBlock$=[3,n0,_VB,0,[_f,_so],[0,()=>VideoSource$],2],WebLocation$=[3,n0,_WL,0,[_url,_do],[0,0]],AsyncInvokeSummaries=[1,n0,_AISs,0,[()=>AsyncInvokeSummary$,0]],CacheDetailsList=[1,n0,_CDL,0,()=>CacheDetail$],CitationGeneratedContentList=[1,n0,_CGCL,0,()=>CitationGeneratedContent$],Citations=[1,n0,_Ci,0,()=>Citation$],CitationSourceContentList=[1,n0,_CSCL,0,()=>CitationSourceContent$],CitationSourceContentListDelta=[1,n0,_CSCLD,0,()=>CitationSourceContentDelta$],
|
|
122
|
+
ContentBlocks=[1,n0,_CB,0,[()=>ContentBlock$,0]],DocumentContentBlocks=[1,n0,_DCB,0,()=>DocumentContentBlock$],GuardrailAssessmentList=[1,n0,_GAL,0,[()=>GuardrailAssessment$,0]],GuardrailAutomatedReasoningDifferenceScenarioList=[1,n0,_GARDSL,0,[()=>GuardrailAutomatedReasoningScenario$,0]],GuardrailAutomatedReasoningFindingList=[1,n0,_GARFL,0,[()=>GuardrailAutomatedReasoningFinding$,0]],GuardrailAutomatedReasoningInputTextReferenceList=[1,n0,_GARITRL,0,[()=>GuardrailAutomatedReasoningInputTextReference$,
|
|
123
|
+
0]],GuardrailAutomatedReasoningRuleList=[1,n0,_GARRL,0,()=>GuardrailAutomatedReasoningRule$],GuardrailAutomatedReasoningStatementList=[1,n0,_GARSL,0,[()=>GuardrailAutomatedReasoningStatement$,0]],GuardrailAutomatedReasoningTranslationList=[1,n0,_GARTL,0,[()=>GuardrailAutomatedReasoningTranslation$,0]],GuardrailAutomatedReasoningTranslationOptionList=[1,n0,_GARTOL,0,[()=>GuardrailAutomatedReasoningTranslationOption$,0]],GuardrailChecksContentBlockList=[1,n0,_GCCBL,0,[()=>GuardrailChecksContentBlock$,
|
|
124
|
+
0]],GuardrailChecksContentFilterCategoryConfigList=[1,n0,_GCCFCCL,0,()=>GuardrailChecksContentFilterCategoryConfig$],GuardrailChecksContentFilterResultList=[1,n0,_GCCFRL,0,()=>GuardrailChecksContentFilterResultEntry$],GuardrailChecksMessageList=[1,n0,_GCML,0,[()=>GuardrailChecksMessage$,0]],GuardrailChecksPromptAttackCategoryConfigList=[1,n0,_GCPACCL,0,()=>GuardrailChecksPromptAttackCategoryConfig$],GuardrailChecksPromptAttackResultList=[1,n0,_GCPARL,0,()=>GuardrailChecksPromptAttackResultEntry$],
|
|
125
|
+
GuardrailChecksSensitiveInformationEntityConfigList=[1,n0,_GCSIECL,0,()=>GuardrailChecksSensitiveInformationEntityConfig$],GuardrailChecksSensitiveInformationResultList=[1,n0,_GCSIRL,0,()=>GuardrailChecksSensitiveInformationResultEntry$],GuardrailContentBlockList=[1,n0,_GCBL,0,[()=>GuardrailContentBlock$,0]],GuardrailContentFilterList=[1,n0,_GCFL,0,()=>GuardrailContentFilter$],GuardrailContextualGroundingFilters=[1,n0,_GCGFu,0,()=>GuardrailContextualGroundingFilter$],GuardrailCustomWordList=[1,n0,
|
|
126
|
+
_GCWL,0,()=>GuardrailCustomWord$],GuardrailManagedWordList=[1,n0,_GMWL,0,()=>GuardrailManagedWord$],GuardrailOutputContentList=[1,n0,_GOCL,0,()=>GuardrailOutputContent$],GuardrailPiiEntityFilterList=[1,n0,_GPEFL,0,()=>GuardrailPiiEntityFilter$],GuardrailRegexFilterList=[1,n0,_GRFL,0,()=>GuardrailRegexFilter$],GuardrailTopicList=[1,n0,_GTL,0,()=>GuardrailTopic$],Messages=[1,n0,_Me,0,[()=>Message$,0]],SearchResultContentBlocks=[1,n0,_SRCBe,0,()=>SearchResultContentBlock$],SystemContentBlocks=[1,n0,
|
|
127
|
+
_SCB,0,[()=>SystemContentBlock$,0]],TagList=[1,n0,_TL,0,()=>Tag$],ToolResultBlocksDelta=[1,n0,_TRBD,0,()=>ToolResultBlockDelta$],ToolResultContentBlocks=[1,n0,_TRCB,0,[()=>ToolResultContentBlock$,0]],Tools=[1,n0,_To,0,()=>Tool$],GuardrailAssessmentListMap=[2,n0,_GALM,0,[0,0],[()=>GuardrailAssessmentList,0]],GuardrailAssessmentMap=[2,n0,_GAM,0,[0,0],[()=>GuardrailAssessment$,0]],PromptVariableMap=[2,n0,_PVM,8,0,()=>PromptVariableValues$],RequestMetadata=[2,n0,_RM,8,0,0],AsyncInvokeOutputDataConfig$=[
|
|
128
|
+
4,n0,_AIODC,0,[_sODC],[()=>AsyncInvokeS3OutputDataConfig$]],AudioSource$=[4,n0,_AS,8,[_b,_sL],[21,()=>S3Location$]],CitationGeneratedContent$=[4,n0,_CGC,0,[_te],[0]],CitationLocation$=[4,n0,_CL,0,[_w,_dC,_dP,_dCo,_sRL],[()=>WebLocation$,()=>DocumentCharLocation$,()=>DocumentPageLocation$,()=>DocumentChunkLocation$,()=>SearchResultLocation$]],CitationSourceContent$=[4,n0,_CSC,0,[_te],[0]],ContentBlock$=[4,n0,_CBo,0,[_te,_ima,_doc,_vi,_au,_tUo,_tR,_gCua,_cPa,_rC,_cC,_sRe,_tA,_tRo],[0,[()=>ImageBlock$,
|
|
129
|
+
0],()=>DocumentBlock$,()=>VideoBlock$,[()=>AudioBlock$,0],()=>ToolUseBlock$,[()=>ToolResultBlock$,0],[()=>GuardrailConverseContentBlock$,0],()=>CachePointBlock$,[()=>ReasoningContentBlock$,0],()=>CitationsContentBlock$,()=>SearchResultBlock$,()=>ToolAdditionBlock$,()=>ToolRemovalBlock$]],ContentBlockDelta$=[4,n0,_CBD,0,[_te,_tUo,_tR,_rC,_cit,_ima],[0,()=>ToolUseBlockDelta$,()=>ToolResultBlocksDelta,[()=>ReasoningContentBlockDelta$,0],()=>CitationsDelta$,[()=>ImageBlockDelta$,0]]],ContentBlockStart$=[
|
|
130
|
+
4,n0,_CBS,0,[_tUo,_tR,_ima],[()=>ToolUseBlockStart$,()=>ToolResultBlockStart$,()=>ImageBlockStart$]],ConverseOutput$=[4,n0,_CO,0,[_m],[[()=>Message$,0]]],ConverseStreamOutput$=[4,n0,_CSO,{[_stre]:1},[_mS,_cBS,_cBD,_cBSo,_mSe,_meta,_iSE,_mSEE,_vE,_tE,_sUE],[()=>MessageStartEvent$,()=>ContentBlockStartEvent$,[()=>ContentBlockDeltaEvent$,0],()=>ContentBlockStopEvent$,()=>MessageStopEvent$,[()=>ConverseStreamMetadataEvent$,0],[()=>InternalServerException$,0],[()=>ModelStreamErrorException$,0],[()=>ValidationException$,
|
|
131
|
+
0],[()=>ThrottlingException$,0],[()=>ServiceUnavailableException$,0]]],CountTokensInput$=[4,n0,_CTI,0,[_iMn,_conv],[[()=>InvokeModelTokensRequest$,0],[()=>ConverseTokensRequest$,0]]],DocumentContentBlock$=[4,n0,_DCBo,0,[_te],[0]],DocumentSource$=[4,n0,_DS,0,[_b,_sL,_te,_co],[21,()=>S3Location$,0,()=>DocumentContentBlocks]],GuardrailAutomatedReasoningFinding$=[4,n0,_GARF,0,[_va,_in,_sa,_imp,_tAr,_tCoo,_nTo],[[()=>GuardrailAutomatedReasoningValidFinding$,0],[()=>GuardrailAutomatedReasoningInvalidFinding$,
|
|
132
|
+
0],[()=>GuardrailAutomatedReasoningSatisfiableFinding$,0],[()=>GuardrailAutomatedReasoningImpossibleFinding$,0],[()=>GuardrailAutomatedReasoningTranslationAmbiguousFinding$,0],()=>GuardrailAutomatedReasoningTooComplexFinding$,()=>GuardrailAutomatedReasoningNoTranslationsFinding$]],GuardrailChecksContentBlock$=[4,n0,_GCCB,0,[_te],[[()=>GuardrailChecksTextContent,0]]],GuardrailContentBlock$=[4,n0,_GCB,0,[_te,_ima],[()=>GuardrailTextBlock$,[()=>GuardrailImageBlock$,0]]],GuardrailConverseContentBlock$=[
|
|
133
|
+
4,n0,_GCCBu,0,[_te,_ima],[()=>GuardrailConverseTextBlock$,[()=>GuardrailConverseImageBlock$,0]]],GuardrailConverseImageSource$=[4,n0,_GCIS,8,[_b],[21]],GuardrailImageSource$=[4,n0,_GIS,8,[_b],[21]],ImageSource$=[4,n0,_IS,8,[_b,_sL],[21,()=>S3Location$]],InvokeModelWithBidirectionalStreamInput$=[4,n0,_IMWBSI,{[_stre]:1},[_chu],[[()=>BidirectionalInputPayloadPart$,0]]],InvokeModelWithBidirectionalStreamOutput$=[4,n0,_IMWBSO,{[_stre]:1},[_chu,_iSE,_mSEE,_vE,_tE,_mTE,_sUE],[[()=>BidirectionalOutputPayloadPart$,
|
|
134
|
+
0],[()=>InternalServerException$,0],[()=>ModelStreamErrorException$,0],[()=>ValidationException$,0],[()=>ThrottlingException$,0],[()=>ModelTimeoutException$,0],[()=>ServiceUnavailableException$,0]]],OutputFormatStructure$=[4,n0,_OFS,8,[_jS],[()=>JsonSchemaDefinition$]],PromptVariableValues$=[4,n0,_PVV,0,[_te],[0]],ReasoningContentBlock$=[4,n0,_RCB,8,[_rT,_rCe],[[()=>ReasoningTextBlock$,0],21]],ReasoningContentBlockDelta$=[4,n0,_RCBD,8,[_te,_rCe,_si],[0,21,0]],ResponseStream$=[4,n0,_RS,{[_stre]:1},
|
|
135
|
+
[_chu,_iSE,_mSEE,_vE,_tE,_mTE,_sUE],[[()=>PayloadPart$,0],[()=>InternalServerException$,0],[()=>ModelStreamErrorException$,0],[()=>ValidationException$,0],[()=>ThrottlingException$,0],[()=>ModelTimeoutException$,0],[()=>ServiceUnavailableException$,0]]],SystemContentBlock$=[4,n0,_SCBy,0,[_te,_gCua,_cPa],[0,[()=>GuardrailConverseContentBlock$,0],()=>CachePointBlock$]],Tool$=[4,n0,_Too,0,[_tS,_sTy,_cPa],[()=>ToolSpecification$,()=>SystemTool$,()=>CachePointBlock$]],ToolChoice$=[4,n0,_TCo,0,[_aut,_an,
|
|
136
|
+
_too],[()=>AutoToolChoice$,()=>AnyToolChoice$,()=>SpecificToolChoice$]],ToolInputSchema$=[4,n0,_TIS,0,[_j],[15]],ToolResultBlockDelta$=[4,n0,_TRBDo,0,[_te,_j],[0,15]],ToolResultContentBlock$=[4,n0,_TRCBo,0,[_j,_te,_ima,_doc,_vi,_sRe],[15,0,[()=>ImageBlock$,0],()=>DocumentBlock$,()=>VideoBlock$,()=>SearchResultBlock$]],VideoSource$=[4,n0,_VS,0,[_b,_sL],[21,()=>S3Location$]],ApplyGuardrail$=[9,n0,_AG,{[_h]:["POST","/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply",200]},()=>ApplyGuardrailRequest$,
|
|
137
|
+
()=>ApplyGuardrailResponse$],Converse$=[9,n0,_Co,{[_h]:["POST","/model/{modelId}/converse",200]},()=>ConverseRequest$,()=>ConverseResponse$],ConverseStream$=[9,n0,_CS,{[_h]:["POST","/model/{modelId}/converse-stream",200]},()=>ConverseStreamRequest$,()=>ConverseStreamResponse$],CountTokens$=[9,n0,_CTo,{[_h]:["POST","/model/{modelId}/count-tokens",200]},()=>CountTokensRequest$,()=>CountTokensResponse$],GetAsyncInvoke$=[9,n0,_GAI,{[_h]:["GET","/async-invoke/{invocationArn}",200]},()=>GetAsyncInvokeRequest$,
|
|
138
|
+
()=>GetAsyncInvokeResponse$],InvokeGuardrailChecks$=[9,n0,_IGC,{[_h]:["POST","/guardrail-checks/invoke",200]},()=>InvokeGuardrailChecksRequest$,()=>InvokeGuardrailChecksResponse$],InvokeModel$=[9,n0,_IM,{[_h]:["POST","/model/{modelId}/invoke",200]},()=>InvokeModelRequest$,()=>InvokeModelResponse$],InvokeModelWithBidirectionalStream$=[9,n0,_IMWBS,{[_h]:["POST","/model/{modelId}/invoke-with-bidirectional-stream",200]},()=>InvokeModelWithBidirectionalStreamRequest$,()=>InvokeModelWithBidirectionalStreamResponse$],
|
|
139
|
+
InvokeModelWithResponseStream$=[9,n0,_IMWRS,{[_h]:["POST","/model/{modelId}/invoke-with-response-stream",200]},()=>InvokeModelWithResponseStreamRequest$,()=>InvokeModelWithResponseStreamResponse$],ListAsyncInvokes$=[9,n0,_LAI,{[_h]:["GET","/async-invoke",200]},()=>ListAsyncInvokesRequest$,()=>ListAsyncInvokesResponse$],StartAsyncInvoke$=[9,n0,_SAI,{[_h]:["POST","/async-invoke",200]},()=>StartAsyncInvokeRequest$,()=>StartAsyncInvokeResponse$],getRuntimeConfig$1=config=>({apiVersion:"2023-09-30",base64Decoder:config?.
|
|
140
|
+
base64Decoder??fromBase64,base64Encoder:config?.base64Encoder??toBase64,disableHostPrefix:config?.disableHostPrefix??!1,endpointProvider:config?.endpointProvider??defaultEndpointResolver,extensions:config?.extensions??[],httpAuthSchemeProvider:config?.httpAuthSchemeProvider??defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:config?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:ipc=>ipc.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"smithy\
|
|
141
|
+
.api#httpBearerAuth",identityProvider:ipc=>ipc.getIdentityProvider("smithy.api#httpBearerAuth"),signer:new HttpBearerAuthSigner}],logger:config?.logger??new NoOpLogger,protocol:config?.protocol??AwsRestJsonProtocol,protocolSettings:config?.protocolSettings??{defaultNamespace:"com.amazonaws.bedrockruntime",errorTypeRegistries,version:"2023-09-30",serviceTarget:"AmazonBedrockFrontendService"},serviceId:config?.serviceId??"Bedrock Runtime",sha256:config?.sha256??Sha256,urlParser:config?.urlParser??
|
|
142
|
+
parseUrl,utf8Decoder:config?.utf8Decoder??fromUtf8,utf8Encoder:config?.utf8Encoder??toUtf8}),getRuntimeConfig=config=>{emitWarningIfUnsupportedVersion(process.version);let defaultsMode=resolveDefaultsModeConfig(config),defaultConfigProvider=()=>defaultsMode().then(loadConfigsForDefaultMode),clientSharedValues=getRuntimeConfig$1(config);emitWarningIfUnsupportedVersion$1(process.version);let loaderConfig={profile:config?.profile,logger:clientSharedValues.logger,signingName:"bedrock"};return{...clientSharedValues,
|
|
143
|
+
...config,runtime:"node",defaultsMode,authSchemePreference:config?.authSchemePreference??loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,loaderConfig),bodyLengthChecker:config?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:config?.credentialDefaultProvider??defaultProvider,defaultUserAgentProvider:config?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:clientSharedValues.serviceId,clientVersion:packageInfo.version}),eventStreamPayloadHandlerProvider:config?.
|
|
144
|
+
eventStreamPayloadHandlerProvider??eventStreamPayloadHandlerProvider,eventStreamSerdeProvider:config?.eventStreamSerdeProvider??eventStreamSerdeProvider,httpAuthSchemes:config?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:ipc=>ipc.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:ipc=>ipc.getIdentityProvider("smithy.api#httpBearerAuth")||(async idProps=>{try{return await fromEnvSigningName({signingName:"bed\
|
|
145
|
+
rock"})()}catch{return await nodeProvider(idProps)(idProps)}}),signer:new HttpBearerAuthSigner}],maxAttempts:config?.maxAttempts??loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS,config),region:config?.region??loadConfig(NODE_REGION_CONFIG_OPTIONS,{...NODE_REGION_CONFIG_FILE_OPTIONS,...loaderConfig}),requestHandler:NodeHttp2Handler.create(config?.requestHandler??(async()=>({...await defaultConfigProvider(),disableConcurrentStreams:!0}))),retryMode:config?.retryMode??loadConfig({...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
146
|
+
default:async()=>(await defaultConfigProvider()).retryMode||DEFAULT_RETRY_MODE},config),streamCollector:config?.streamCollector??streamCollector,useDualstackEndpoint:config?.useDualstackEndpoint??loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,loaderConfig),useFipsEndpoint:config?.useFipsEndpoint??loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,loaderConfig),userAgentAppId:config?.userAgentAppId??loadConfig(NODE_APP_ID_CONFIG_OPTIONS,loaderConfig)}},getHttpAuthExtensionConfiguration=runtimeConfig=>{
|
|
147
|
+
let _httpAuthSchemes=runtimeConfig.httpAuthSchemes,_httpAuthSchemeProvider=runtimeConfig.httpAuthSchemeProvider,_credentials=runtimeConfig.credentials,_token=runtimeConfig.token;return{setHttpAuthScheme(httpAuthScheme){let index=_httpAuthSchemes.findIndex(scheme=>scheme.schemeId===httpAuthScheme.schemeId);index===-1?_httpAuthSchemes.push(httpAuthScheme):_httpAuthSchemes.splice(index,1,httpAuthScheme)},httpAuthSchemes(){return _httpAuthSchemes},setHttpAuthSchemeProvider(httpAuthSchemeProvider){_httpAuthSchemeProvider=
|
|
148
|
+
httpAuthSchemeProvider},httpAuthSchemeProvider(){return _httpAuthSchemeProvider},setCredentials(credentials){_credentials=credentials},credentials(){return _credentials},setToken(token){_token=token},token(){return _token}}},resolveHttpAuthRuntimeConfig=config=>({httpAuthSchemes:config.httpAuthSchemes(),httpAuthSchemeProvider:config.httpAuthSchemeProvider(),credentials:config.credentials(),token:config.token()}),resolveRuntimeExtensions=(runtimeConfig,extensions)=>{let extensionConfiguration=Object.
|
|
149
|
+
assign(getAwsRegionExtensionConfiguration(runtimeConfig),getDefaultExtensionConfiguration(runtimeConfig),getHttpHandlerExtensionConfiguration(runtimeConfig),getHttpAuthExtensionConfiguration(runtimeConfig));return extensions.forEach(extension=>extension.configure(extensionConfiguration)),Object.assign(runtimeConfig,resolveAwsRegionExtensionConfiguration(extensionConfiguration),resolveDefaultRuntimeConfig(extensionConfiguration),resolveHttpHandlerRuntimeConfig(extensionConfiguration),resolveHttpAuthRuntimeConfig(
|
|
150
|
+
extensionConfiguration))},BedrockRuntimeClient2=class extends Client{config;constructor(...[configuration]){let _config_0=getRuntimeConfig(configuration||{});super(_config_0),this.initConfig=_config_0;let _config_1=resolveClientEndpointParameters(_config_0),_config_2=resolveUserAgentConfig(_config_1),_config_3=resolveRetryConfig(_config_2),_config_4=resolveRegionConfig(_config_3),_config_5=resolveHostHeaderConfig(_config_4),_config_6=resolveEndpointConfig(_config_5),_config_7=resolveEventStreamSerdeConfig(
|
|
151
|
+
_config_6),_config_8=resolveHttpAuthSchemeConfig(_config_7),_config_9=resolveEventStreamConfig(_config_8),_config_10=resolveWebSocketConfig(_config_9),_config_11=resolveRuntimeExtensions(_config_10,configuration?.extensions||[]);this.config=_config_11,this.middlewareStack.use(getSchemaSerdePlugin(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.
|
|
152
|
+
use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async config=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":config.credentials,"smithy.api#httpBearerAuth":config.token})})),this.middlewareStack.
|
|
153
|
+
use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},command=makeBuilder(commonParams,"AmazonBedrockFrontendService","BedrockRuntimeClient",getEndpointPlugin),_ep0={},_mw0=(Command,cs,config,o)=>[],_mw1=(Command,cs,config,o)=>[getEventStreamPlugin(config),getWebSocketPlugin(config,{headerPrefix:"x-amz-bedrock-"})],ApplyGuardrailCommand=class extends command(_ep0,_mw0,"ApplyGuardrail",ApplyGuardrail$){},ConverseCommand=class extends command(_ep0,_mw0,"Converse",Converse$){},ConverseStreamCommand2=class extends command(
|
|
154
|
+
_ep0,_mw0,"ConverseStream",ConverseStream$){},CountTokensCommand=class extends command(_ep0,_mw0,"CountTokens",CountTokens$){},GetAsyncInvokeCommand=class extends command(_ep0,_mw0,"GetAsyncInvoke",GetAsyncInvoke$){},InvokeGuardrailChecksCommand=class extends command(_ep0,_mw0,"InvokeGuardrailChecks",InvokeGuardrailChecks$){},InvokeModelCommand=class extends command(_ep0,_mw0,"InvokeModel",InvokeModel$){},InvokeModelWithBidirectionalStreamCommand=class extends command(_ep0,_mw1,"InvokeModelWithB\
|
|
155
|
+
idirectionalStream",InvokeModelWithBidirectionalStream$){},InvokeModelWithResponseStreamCommand=class extends command(_ep0,_mw0,"InvokeModelWithResponseStream",InvokeModelWithResponseStream$){},ListAsyncInvokesCommand=class extends command(_ep0,_mw0,"ListAsyncInvokes",ListAsyncInvokes$){},StartAsyncInvokeCommand=class extends command(_ep0,_mw0,"StartAsyncInvoke",StartAsyncInvoke$){},paginateListAsyncInvokes=createPaginator(BedrockRuntimeClient2,ListAsyncInvokesCommand,"nextToken","nextToken","ma\
|
|
156
|
+
xResults"),commands={ApplyGuardrailCommand,ConverseCommand,ConverseStreamCommand:ConverseStreamCommand2,CountTokensCommand,GetAsyncInvokeCommand,InvokeGuardrailChecksCommand,InvokeModelCommand,InvokeModelWithBidirectionalStreamCommand,InvokeModelWithResponseStreamCommand,ListAsyncInvokesCommand,StartAsyncInvokeCommand},paginators={paginateListAsyncInvokes},BedrockRuntime=class extends BedrockRuntimeClient2{};createAggregatedClient(commands,BedrockRuntime,{paginators});var AsyncInvokeStatus={COMPLETED:"\
|
|
157
|
+
Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},SortAsyncInvocationBy={SUBMISSION_TIME:"SubmissionTime"},SortOrder={ASCENDING:"Ascending",DESCENDING:"Descending"},GuardrailImageFormat={JPEG:"jpeg",PNG:"png"},GuardrailContentQualifier={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},GuardrailOutputScope={FULL:"FULL",INTERVENTIONS:"INTERVENTIONS"},GuardrailContentSource={INPUT:"INPUT",OUTPUT:"OUTPUT"},GuardrailAction={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",
|
|
158
|
+
NONE:"NONE"},GuardrailOrigin={ACCOUNT_ENFORCED:"ACCOUNT_ENFORCED",ORGANIZATION_ENFORCED:"ORGANIZATION_ENFORCED",REQUEST:"REQUEST"},GuardrailOwnership={CROSS_ACCOUNT:"CROSS_ACCOUNT",SELF:"SELF"},GuardrailAutomatedReasoningLogicWarningType={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},GuardrailContentPolicyAction={BLOCKED:"BLOCKED",NONE:"NONE"},GuardrailContentFilterConfidence={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},GuardrailContentFilterStrength={HIGH:"HIGH",LOW:"LOW",MEDIUM:"\
|
|
159
|
+
MEDIUM",NONE:"NONE"},GuardrailContentFilterType={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},GuardrailContextualGroundingPolicyAction={BLOCKED:"BLOCKED",NONE:"NONE"},GuardrailContextualGroundingFilterType={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},GuardrailSensitiveInformationPolicyAction={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED",NONE:"NONE"},GuardrailPiiEntityType={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_AC\
|
|
160
|
+
CESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",
|
|
161
|
+
PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",
|
|
162
|
+
US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},GuardrailTopicPolicyAction={BLOCKED:"BLOCKED",NONE:"NONE"},GuardrailTopicType={DENY:"DENY"},GuardrailWordPolicyAction={BLOCKED:"BLOCKED",NONE:"NONE"},GuardrailManagedWordType={PROFANITY:"PROFANITY"},GuardrailChecksContentFilterCategory={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},GuardrailChecksPromptAttackCategory={JAILBREAK:"JAILBRE\
|
|
163
|
+
AK",PROMPT_INJECTION:"PROMPT_INJECTION",PROMPT_LEAKAGE:"PROMPT_LEAKAGE"},GuardrailChecksSensitiveInformationEntityType={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"\
|
|
164
|
+
INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"\
|
|
165
|
+
US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},GuardrailChecksRole={ASSISTANT:"assistant",SYSTEM:"system",USER:"user"},GuardrailTrace={DISABLED:"disabled",ENABLED:"enabled",ENABLED_FULL:"enabled_full"},AudioFormat={AAC:"aac",FLAC:"flac",M4A:"m4a",MKA:"mka",MKV:"mkv",MP3:"mp3",MP4:"mp\
|
|
166
|
+
4",MPEG:"mpeg",MPGA:"mpga",OGG:"ogg",OPUS:"opus",PCM:"pcm",WAV:"wav",WEBM:"webm",X_AAC:"x-aac"},CacheTTL2={FIVE_MINUTES:"5m",ONE_HOUR:"1h"},CachePointType2={DEFAULT:"default"},DocumentFormat={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"},GuardrailConverseImageFormat={JPEG:"jpeg",PNG:"png"},GuardrailConverseContentQualifier={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},ImageFormat2={GIF:"gif",JPEG:"jpeg",PNG:"png",
|
|
167
|
+
WEBP:"webp"},VideoFormat={FLV:"flv",MKV:"mkv",MOV:"mov",MP4:"mp4",MPEG:"mpeg",MPG:"mpg",THREE_GP:"three_gp",WEBM:"webm",WMV:"wmv"},ToolResultStatus2={ERROR:"error",SUCCESS:"success"},ToolUseType={SERVER_TOOL_USE:"server_tool_use"},ConversationRole2={ASSISTANT:"assistant",SYSTEM:"system",USER:"user"},OutputFormatType={JSON_SCHEMA:"json_schema"},PerformanceConfigLatency={OPTIMIZED:"optimized",STANDARD:"standard"},ServiceTierType={DEFAULT:"default",FLEX:"flex",PRIORITY:"priority",RESERVED:"reserved"},
|
|
168
|
+
StopReason={CONTENT_FILTERED:"content_filtered",END_TURN:"end_turn",GUARDRAIL_INTERVENED:"guardrail_intervened",MALFORMED_MODEL_OUTPUT:"malformed_model_output",MALFORMED_TOOL_USE:"malformed_tool_use",MAX_TOKENS:"max_tokens",MODEL_CONTEXT_WINDOW_EXCEEDED:"model_context_window_exceeded",STOP_SEQUENCE:"stop_sequence",TOOL_USE:"tool_use"},GuardrailStreamProcessingMode={ASYNC:"async",SYNC:"sync"},Trace={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_FULL:"ENABLED_FULL"};exports.AccessDeniedException=AccessDeniedException;
|
|
169
|
+
exports.AccessDeniedException$=AccessDeniedException$;exports.AnyToolChoice$=AnyToolChoice$;exports.AppliedGuardrailDetails$=AppliedGuardrailDetails$;exports.ApplyGuardrail$=ApplyGuardrail$;exports.ApplyGuardrailCommand=ApplyGuardrailCommand;exports.ApplyGuardrailRequest$=ApplyGuardrailRequest$;exports.ApplyGuardrailResponse$=ApplyGuardrailResponse$;exports.AsyncInvokeOutputDataConfig$=AsyncInvokeOutputDataConfig$;exports.AsyncInvokeS3OutputDataConfig$=AsyncInvokeS3OutputDataConfig$;exports.AsyncInvokeStatus=
|
|
170
|
+
AsyncInvokeStatus;exports.AsyncInvokeSummary$=AsyncInvokeSummary$;exports.AudioBlock$=AudioBlock$;exports.AudioFormat=AudioFormat;exports.AudioSource$=AudioSource$;exports.AutoToolChoice$=AutoToolChoice$;exports.BedrockRuntime=BedrockRuntime;exports.BedrockRuntimeClient=BedrockRuntimeClient2;exports.BedrockRuntimeServiceException=BedrockRuntimeServiceException2;exports.BedrockRuntimeServiceException$=BedrockRuntimeServiceException$;exports.BidirectionalInputPayloadPart$=BidirectionalInputPayloadPart$;
|
|
171
|
+
exports.BidirectionalOutputPayloadPart$=BidirectionalOutputPayloadPart$;exports.CacheDetail$=CacheDetail$;exports.CachePointBlock$=CachePointBlock$;exports.CachePointType=CachePointType2;exports.CacheTTL=CacheTTL2;exports.Citation$=Citation$;exports.CitationGeneratedContent$=CitationGeneratedContent$;exports.CitationLocation$=CitationLocation$;exports.CitationSourceContent$=CitationSourceContent$;exports.CitationSourceContentDelta$=CitationSourceContentDelta$;exports.CitationsConfig$=CitationsConfig$;
|
|
172
|
+
exports.CitationsContentBlock$=CitationsContentBlock$;exports.CitationsDelta$=CitationsDelta$;exports.ConflictException=ConflictException;exports.ConflictException$=ConflictException$;exports.ContentBlock$=ContentBlock$;exports.ContentBlockDelta$=ContentBlockDelta$;exports.ContentBlockDeltaEvent$=ContentBlockDeltaEvent$;exports.ContentBlockStart$=ContentBlockStart$;exports.ContentBlockStartEvent$=ContentBlockStartEvent$;exports.ContentBlockStopEvent$=ContentBlockStopEvent$;exports.ConversationRole=
|
|
173
|
+
ConversationRole2;exports.Converse$=Converse$;exports.ConverseCommand=ConverseCommand;exports.ConverseMetrics$=ConverseMetrics$;exports.ConverseOutput$=ConverseOutput$;exports.ConverseRequest$=ConverseRequest$;exports.ConverseResponse$=ConverseResponse$;exports.ConverseStream$=ConverseStream$;exports.ConverseStreamCommand=ConverseStreamCommand2;exports.ConverseStreamMetadataEvent$=ConverseStreamMetadataEvent$;exports.ConverseStreamMetrics$=ConverseStreamMetrics$;exports.ConverseStreamOutput$=ConverseStreamOutput$;
|
|
174
|
+
exports.ConverseStreamRequest$=ConverseStreamRequest$;exports.ConverseStreamResponse$=ConverseStreamResponse$;exports.ConverseStreamTrace$=ConverseStreamTrace$;exports.ConverseTokensRequest$=ConverseTokensRequest$;exports.ConverseTrace$=ConverseTrace$;exports.CountTokens$=CountTokens$;exports.CountTokensCommand=CountTokensCommand;exports.CountTokensInput$=CountTokensInput$;exports.CountTokensRequest$=CountTokensRequest$;exports.CountTokensResponse$=CountTokensResponse$;exports.DocumentBlock$=DocumentBlock$;
|
|
175
|
+
exports.DocumentCharLocation$=DocumentCharLocation$;exports.DocumentChunkLocation$=DocumentChunkLocation$;exports.DocumentContentBlock$=DocumentContentBlock$;exports.DocumentFormat=DocumentFormat;exports.DocumentPageLocation$=DocumentPageLocation$;exports.DocumentSource$=DocumentSource$;exports.ErrorBlock$=ErrorBlock$;exports.GetAsyncInvoke$=GetAsyncInvoke$;exports.GetAsyncInvokeCommand=GetAsyncInvokeCommand;exports.GetAsyncInvokeRequest$=GetAsyncInvokeRequest$;exports.GetAsyncInvokeResponse$=GetAsyncInvokeResponse$;
|
|
176
|
+
exports.GuardrailAction=GuardrailAction;exports.GuardrailAssessment$=GuardrailAssessment$;exports.GuardrailAutomatedReasoningFinding$=GuardrailAutomatedReasoningFinding$;exports.GuardrailAutomatedReasoningImpossibleFinding$=GuardrailAutomatedReasoningImpossibleFinding$;exports.GuardrailAutomatedReasoningInputTextReference$=GuardrailAutomatedReasoningInputTextReference$;exports.GuardrailAutomatedReasoningInvalidFinding$=GuardrailAutomatedReasoningInvalidFinding$;exports.GuardrailAutomatedReasoningLogicWarning$=
|
|
177
|
+
GuardrailAutomatedReasoningLogicWarning$;exports.GuardrailAutomatedReasoningLogicWarningType=GuardrailAutomatedReasoningLogicWarningType;exports.GuardrailAutomatedReasoningNoTranslationsFinding$=GuardrailAutomatedReasoningNoTranslationsFinding$;exports.GuardrailAutomatedReasoningPolicyAssessment$=GuardrailAutomatedReasoningPolicyAssessment$;exports.GuardrailAutomatedReasoningRule$=GuardrailAutomatedReasoningRule$;exports.GuardrailAutomatedReasoningSatisfiableFinding$=GuardrailAutomatedReasoningSatisfiableFinding$;
|
|
178
|
+
exports.GuardrailAutomatedReasoningScenario$=GuardrailAutomatedReasoningScenario$;exports.GuardrailAutomatedReasoningStatement$=GuardrailAutomatedReasoningStatement$;exports.GuardrailAutomatedReasoningTooComplexFinding$=GuardrailAutomatedReasoningTooComplexFinding$;exports.GuardrailAutomatedReasoningTranslation$=GuardrailAutomatedReasoningTranslation$;exports.GuardrailAutomatedReasoningTranslationAmbiguousFinding$=GuardrailAutomatedReasoningTranslationAmbiguousFinding$;exports.GuardrailAutomatedReasoningTranslationOption$=
|
|
179
|
+
GuardrailAutomatedReasoningTranslationOption$;exports.GuardrailAutomatedReasoningValidFinding$=GuardrailAutomatedReasoningValidFinding$;exports.GuardrailChecksConfig$=GuardrailChecksConfig$;exports.GuardrailChecksContentBlock$=GuardrailChecksContentBlock$;exports.GuardrailChecksContentFilterCategory=GuardrailChecksContentFilterCategory;exports.GuardrailChecksContentFilterCategoryConfig$=GuardrailChecksContentFilterCategoryConfig$;exports.GuardrailChecksContentFilterConfig$=GuardrailChecksContentFilterConfig$;
|
|
180
|
+
exports.GuardrailChecksContentFilterResult$=GuardrailChecksContentFilterResult$;exports.GuardrailChecksContentFilterResultEntry$=GuardrailChecksContentFilterResultEntry$;exports.GuardrailChecksContentFilterUsage$=GuardrailChecksContentFilterUsage$;exports.GuardrailChecksMessage$=GuardrailChecksMessage$;exports.GuardrailChecksPromptAttackCategory=GuardrailChecksPromptAttackCategory;exports.GuardrailChecksPromptAttackCategoryConfig$=GuardrailChecksPromptAttackCategoryConfig$;exports.GuardrailChecksPromptAttackConfig$=
|
|
181
|
+
GuardrailChecksPromptAttackConfig$;exports.GuardrailChecksPromptAttackResult$=GuardrailChecksPromptAttackResult$;exports.GuardrailChecksPromptAttackResultEntry$=GuardrailChecksPromptAttackResultEntry$;exports.GuardrailChecksPromptAttackUsage$=GuardrailChecksPromptAttackUsage$;exports.GuardrailChecksResults$=GuardrailChecksResults$;exports.GuardrailChecksRole=GuardrailChecksRole;exports.GuardrailChecksSensitiveInformationConfig$=GuardrailChecksSensitiveInformationConfig$;exports.GuardrailChecksSensitiveInformationEntityConfig$=
|
|
182
|
+
GuardrailChecksSensitiveInformationEntityConfig$;exports.GuardrailChecksSensitiveInformationEntityType=GuardrailChecksSensitiveInformationEntityType;exports.GuardrailChecksSensitiveInformationResult$=GuardrailChecksSensitiveInformationResult$;exports.GuardrailChecksSensitiveInformationResultEntry$=GuardrailChecksSensitiveInformationResultEntry$;exports.GuardrailChecksSensitiveInformationUsage$=GuardrailChecksSensitiveInformationUsage$;exports.GuardrailChecksUsageResults$=GuardrailChecksUsageResults$;
|
|
183
|
+
exports.GuardrailConfiguration$=GuardrailConfiguration$;exports.GuardrailContentBlock$=GuardrailContentBlock$;exports.GuardrailContentFilter$=GuardrailContentFilter$;exports.GuardrailContentFilterConfidence=GuardrailContentFilterConfidence;exports.GuardrailContentFilterStrength=GuardrailContentFilterStrength;exports.GuardrailContentFilterType=GuardrailContentFilterType;exports.GuardrailContentPolicyAction=GuardrailContentPolicyAction;exports.GuardrailContentPolicyAssessment$=GuardrailContentPolicyAssessment$;
|
|
184
|
+
exports.GuardrailContentQualifier=GuardrailContentQualifier;exports.GuardrailContentSource=GuardrailContentSource;exports.GuardrailContextualGroundingFilter$=GuardrailContextualGroundingFilter$;exports.GuardrailContextualGroundingFilterType=GuardrailContextualGroundingFilterType;exports.GuardrailContextualGroundingPolicyAction=GuardrailContextualGroundingPolicyAction;exports.GuardrailContextualGroundingPolicyAssessment$=GuardrailContextualGroundingPolicyAssessment$;exports.GuardrailConverseContentBlock$=
|
|
185
|
+
GuardrailConverseContentBlock$;exports.GuardrailConverseContentQualifier=GuardrailConverseContentQualifier;exports.GuardrailConverseImageBlock$=GuardrailConverseImageBlock$;exports.GuardrailConverseImageFormat=GuardrailConverseImageFormat;exports.GuardrailConverseImageSource$=GuardrailConverseImageSource$;exports.GuardrailConverseTextBlock$=GuardrailConverseTextBlock$;exports.GuardrailCoverage$=GuardrailCoverage$;exports.GuardrailCustomWord$=GuardrailCustomWord$;exports.GuardrailImageBlock$=GuardrailImageBlock$;
|
|
186
|
+
exports.GuardrailImageCoverage$=GuardrailImageCoverage$;exports.GuardrailImageFormat=GuardrailImageFormat;exports.GuardrailImageSource$=GuardrailImageSource$;exports.GuardrailInvocationMetrics$=GuardrailInvocationMetrics$;exports.GuardrailManagedWord$=GuardrailManagedWord$;exports.GuardrailManagedWordType=GuardrailManagedWordType;exports.GuardrailOrigin=GuardrailOrigin;exports.GuardrailOutputContent$=GuardrailOutputContent$;exports.GuardrailOutputScope=GuardrailOutputScope;exports.GuardrailOwnership=
|
|
187
|
+
GuardrailOwnership;exports.GuardrailPiiEntityFilter$=GuardrailPiiEntityFilter$;exports.GuardrailPiiEntityType=GuardrailPiiEntityType;exports.GuardrailRegexFilter$=GuardrailRegexFilter$;exports.GuardrailSensitiveInformationPolicyAction=GuardrailSensitiveInformationPolicyAction;exports.GuardrailSensitiveInformationPolicyAssessment$=GuardrailSensitiveInformationPolicyAssessment$;exports.GuardrailStreamConfiguration$=GuardrailStreamConfiguration$;exports.GuardrailStreamProcessingMode=GuardrailStreamProcessingMode;
|
|
188
|
+
exports.GuardrailTextBlock$=GuardrailTextBlock$;exports.GuardrailTextCharactersCoverage$=GuardrailTextCharactersCoverage$;exports.GuardrailTopic$=GuardrailTopic$;exports.GuardrailTopicPolicyAction=GuardrailTopicPolicyAction;exports.GuardrailTopicPolicyAssessment$=GuardrailTopicPolicyAssessment$;exports.GuardrailTopicType=GuardrailTopicType;exports.GuardrailTrace=GuardrailTrace;exports.GuardrailTraceAssessment$=GuardrailTraceAssessment$;exports.GuardrailUsage$=GuardrailUsage$;exports.GuardrailWordPolicyAction=
|
|
189
|
+
GuardrailWordPolicyAction;exports.GuardrailWordPolicyAssessment$=GuardrailWordPolicyAssessment$;exports.ImageBlock$=ImageBlock$;exports.ImageBlockDelta$=ImageBlockDelta$;exports.ImageBlockStart$=ImageBlockStart$;exports.ImageFormat=ImageFormat2;exports.ImageSource$=ImageSource$;exports.InferenceConfiguration$=InferenceConfiguration$;exports.InternalServerException=InternalServerException;exports.InternalServerException$=InternalServerException$;exports.InvokeGuardrailChecks$=InvokeGuardrailChecks$;
|
|
190
|
+
exports.InvokeGuardrailChecksCommand=InvokeGuardrailChecksCommand;exports.InvokeGuardrailChecksRequest$=InvokeGuardrailChecksRequest$;exports.InvokeGuardrailChecksResponse$=InvokeGuardrailChecksResponse$;exports.InvokeModel$=InvokeModel$;exports.InvokeModelCommand=InvokeModelCommand;exports.InvokeModelRequest$=InvokeModelRequest$;exports.InvokeModelResponse$=InvokeModelResponse$;exports.InvokeModelTokensRequest$=InvokeModelTokensRequest$;exports.InvokeModelWithBidirectionalStream$=InvokeModelWithBidirectionalStream$;
|
|
191
|
+
exports.InvokeModelWithBidirectionalStreamCommand=InvokeModelWithBidirectionalStreamCommand;exports.InvokeModelWithBidirectionalStreamInput$=InvokeModelWithBidirectionalStreamInput$;exports.InvokeModelWithBidirectionalStreamOutput$=InvokeModelWithBidirectionalStreamOutput$;exports.InvokeModelWithBidirectionalStreamRequest$=InvokeModelWithBidirectionalStreamRequest$;exports.InvokeModelWithBidirectionalStreamResponse$=InvokeModelWithBidirectionalStreamResponse$;exports.InvokeModelWithResponseStream$=
|
|
192
|
+
InvokeModelWithResponseStream$;exports.InvokeModelWithResponseStreamCommand=InvokeModelWithResponseStreamCommand;exports.InvokeModelWithResponseStreamRequest$=InvokeModelWithResponseStreamRequest$;exports.InvokeModelWithResponseStreamResponse$=InvokeModelWithResponseStreamResponse$;exports.JsonSchemaDefinition$=JsonSchemaDefinition$;exports.ListAsyncInvokes$=ListAsyncInvokes$;exports.ListAsyncInvokesCommand=ListAsyncInvokesCommand;exports.ListAsyncInvokesRequest$=ListAsyncInvokesRequest$;exports.
|
|
193
|
+
ListAsyncInvokesResponse$=ListAsyncInvokesResponse$;exports.Message$=Message$;exports.MessageStartEvent$=MessageStartEvent$;exports.MessageStopEvent$=MessageStopEvent$;exports.ModelErrorException=ModelErrorException;exports.ModelErrorException$=ModelErrorException$;exports.ModelNotReadyException=ModelNotReadyException;exports.ModelNotReadyException$=ModelNotReadyException$;exports.ModelStreamErrorException=ModelStreamErrorException;exports.ModelStreamErrorException$=ModelStreamErrorException$;exports.
|
|
194
|
+
ModelTimeoutException=ModelTimeoutException;exports.ModelTimeoutException$=ModelTimeoutException$;exports.OutputConfig$=OutputConfig$;exports.OutputFormat$=OutputFormat$;exports.OutputFormatStructure$=OutputFormatStructure$;exports.OutputFormatType=OutputFormatType;exports.PayloadPart$=PayloadPart$;exports.PerformanceConfigLatency=PerformanceConfigLatency;exports.PerformanceConfiguration$=PerformanceConfiguration$;exports.PromptRouterTrace$=PromptRouterTrace$;exports.PromptVariableValues$=PromptVariableValues$;
|
|
195
|
+
exports.ReasoningContentBlock$=ReasoningContentBlock$;exports.ReasoningContentBlockDelta$=ReasoningContentBlockDelta$;exports.ReasoningTextBlock$=ReasoningTextBlock$;exports.ResourceNotFoundException=ResourceNotFoundException;exports.ResourceNotFoundException$=ResourceNotFoundException$;exports.ResponseStream$=ResponseStream$;exports.S3Location$=S3Location$;exports.SearchResultBlock$=SearchResultBlock$;exports.SearchResultContentBlock$=SearchResultContentBlock$;exports.SearchResultLocation$=SearchResultLocation$;
|
|
196
|
+
exports.ServiceQuotaExceededException=ServiceQuotaExceededException;exports.ServiceQuotaExceededException$=ServiceQuotaExceededException$;exports.ServiceTier$=ServiceTier$;exports.ServiceTierType=ServiceTierType;exports.ServiceUnavailableException=ServiceUnavailableException;exports.ServiceUnavailableException$=ServiceUnavailableException$;exports.SortAsyncInvocationBy=SortAsyncInvocationBy;exports.SortOrder=SortOrder;exports.SpecificToolChoice$=SpecificToolChoice$;exports.StartAsyncInvoke$=StartAsyncInvoke$;
|
|
197
|
+
exports.StartAsyncInvokeCommand=StartAsyncInvokeCommand;exports.StartAsyncInvokeRequest$=StartAsyncInvokeRequest$;exports.StartAsyncInvokeResponse$=StartAsyncInvokeResponse$;exports.StopReason=StopReason;exports.SystemContentBlock$=SystemContentBlock$;exports.SystemTool$=SystemTool$;exports.Tag$=Tag$;exports.ThrottlingException=ThrottlingException;exports.ThrottlingException$=ThrottlingException$;exports.TokenUsage$=TokenUsage$;exports.Tool$=Tool$;exports.ToolAdditionBlock$=ToolAdditionBlock$;exports.
|
|
198
|
+
ToolChoice$=ToolChoice$;exports.ToolConfiguration$=ToolConfiguration$;exports.ToolInputSchema$=ToolInputSchema$;exports.ToolReference$=ToolReference$;exports.ToolRemovalBlock$=ToolRemovalBlock$;exports.ToolResultBlock$=ToolResultBlock$;exports.ToolResultBlockDelta$=ToolResultBlockDelta$;exports.ToolResultBlockStart$=ToolResultBlockStart$;exports.ToolResultContentBlock$=ToolResultContentBlock$;exports.ToolResultStatus=ToolResultStatus2;exports.ToolSpecification$=ToolSpecification$;exports.ToolUseBlock$=
|
|
199
|
+
ToolUseBlock$;exports.ToolUseBlockDelta$=ToolUseBlockDelta$;exports.ToolUseBlockStart$=ToolUseBlockStart$;exports.ToolUseType=ToolUseType;exports.Trace=Trace;exports.ValidationException=ValidationException;exports.ValidationException$=ValidationException$;exports.VideoBlock$=VideoBlock$;exports.VideoFormat=VideoFormat;exports.VideoSource$=VideoSource$;exports.WebLocation$=WebLocation$;exports.errorTypeRegistries=errorTypeRegistries;exports.paginateListAsyncInvokes=paginateListAsyncInvokes}});var import_client_bedrock_runtime=__toESM(require_dist_cjs8(),1),import_node_http_handler=__toESM(require_dist_cjs(),1);var import_debug=__toESM(require_src(),1);init_dist();init_dist2();import*as net from"net";import*as tls from"tls";import{once}from"events";import{URL as URL2}from"url";var debug=(0,import_debug.default)("http-proxy-agent"),HttpProxyAgent=class extends Agent{constructor(proxy,opts){super(opts),this.proxy=typeof proxy=="string"?new URL2(proxy):proxy,this.proxyHeaders=opts?.headers??{},debug("Creating new HttpProxyAgent instance: %o",this.proxy.href),opts?.negotiate?this.onProxyAuth=createNegotiateAuth():
|
|
200
200
|
opts?.onProxyAuth&&(this.onProxyAuth=opts.onProxyAuth);let host=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),port=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...opts?omit(opts,"headers","onProxyAuth","negotiate"):null,host,port}}addRequest(req,opts){req._header=null,this.setRequestProps(req,opts),super.addRequest(req,opts)}setRequestProps(req,opts){let{proxy}=this,protocol=opts.secureEndpoint?"https:":"http:",hostname=req.
|
|
201
201
|
getHeader("host")||"localhost",base=`${protocol}//${hostname}`,url=new URL2(req.path,base);opts.port!==80&&(url.port=String(opts.port)),req.path=String(url);let headers=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(proxy.username||proxy.password){let auth=`${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;headers["Proxy-Authorization"]=`Basic ${Buffer.from(auth).toString("base64")}`}headers["Proxy-Connection"]||(headers["Proxy-Conne\
|
|
202
202
|
ction"]=this.keepAlive?"Keep-Alive":"close");for(let name of Object.keys(headers)){let value=headers[name];value&&req.setHeader(name,value)}}async connect(req,opts){req._header=null,req.path.includes("://")||this.setRequestProps(req,opts);let first,endOfHeaders;debug("Regenerating stored HTTP header string for request"),req._implicitHeader(),req.outputData&&req.outputData.length>0&&(debug("Patching connection write() output buffer with updated header"),first=req.outputData[0].data,endOfHeaders=first.
|
|
@@ -216,7 +216,7 @@ this.#time(event.message):event.type==="error"&&this.#time(event.error),super.pu
|
|
|
216
216
|
|
|
217
217
|
`){return typeof content=="string"?content:content.filter(block=>block.type==="text").map(block=>block.text).join(separator)}function getSystemMessageText(message){let parts=[contentText(message.content)];for(let text of Object.values(message.sections??{}))text!==null&&parts.push(text);return parts.filter(part=>part.length>0).join(`
|
|
218
218
|
|
|
219
|
-
`)}function ownedSlice(text,start,end=text.length){return`${text.slice(start,end)} `.slice(0,-1)}function providerHeadersToRecord(...headerSources){let merged=new Map;for(let source of headerSources)for(let[name,value]of Object.entries(source??{})){let normalizedName=name.toLowerCase();merged.delete(normalizedName),value!==null&&merged.set(normalizedName,[name,value])}return merged.size>0?Object.fromEntries(merged.values()):void 0}var PI_AI_VERSION="1.
|
|
219
|
+
`)}function ownedSlice(text,start,end=text.length){return`${text.slice(start,end)} `.slice(0,-1)}function providerHeadersToRecord(...headerSources){let merged=new Map;for(let source of headerSources)for(let[name,value]of Object.entries(source??{})){let normalizedName=name.toLowerCase();merged.delete(normalizedName),value!==null&&merged.set(normalizedName,[name,value])}return merged.size>0?Object.fromEntries(merged.values()):void 0}var PI_AI_VERSION="1.6.0";function getClientVersion(identity){return identity?.
|
|
220
220
|
version??PI_AI_VERSION}function getClientProduct(identity){return identity?.product??"pi"}function isSystemMessage(message){return message.role==="system"}function getInitialSystemMessage(messages){let first=messages[0];return first&&isSystemMessage(first)?first:void 0}function withoutInitialSystemMessage(messages){return getInitialSystemMessage(messages)?messages.slice(1):messages}function getCurrentTools(messages){let tools=new Map;for(let message of messages)if(isSystemMessage(message)){for(let tool of message.
|
|
221
221
|
toolsRemoved??[])tools.delete(tool.name);for(let tool of message.toolsAdded??[])tools.set(tool.name,tool)}return[...tools.values()]}function getCurrentSystemMessage(messages){let content=[],sections=new Map,timestamp;for(let message of messages){if(!isSystemMessage(message))continue;timestamp??=message.timestamp;let text=contentText(message.content);text.length>0&&content.push(text);for(let[name,value]of Object.entries(message.sections??{}))value===null?sections.delete(name):sections.set(name,value)}
|
|
222
222
|
let tools=getCurrentTools(messages);if(!(timestamp===void 0&&tools.length===0))return{role:"system",content:content.join(`
|
|
@@ -298,46 +298,47 @@ exec(token);return mantissa===null?void 0:Number(mantissa[1])}function setSlot(c
|
|
|
298
298
|
"number"||!Number.isSafeInteger(value)||value<0)}function supportsDisabledAnthropicThinking(model){let name=`${model.id} ${model.name}`.toLowerCase().replace(/[.\s]+/g,"-");return model.thinkingLevelMap?.off!==null&&!/(?:fable-5|mythos-(?:5|preview)|opus-5-5|sonnet-5-5)(?:-|$)/.test(name)}var UnsupportedStrictJsonSchemaError=class extends Error{},UNSUPPORTED_STRICT_SCHEMA_KEYS=["$ref","$defs","definitions","allOf","oneOf","patternProperties","dependentSchemas","dependencies","unevaluatedProperti\
|
|
299
299
|
es","propertyNames","contains","prefixItems","not","if","then","else"];function isJsonSchemaObject(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function isStructuredSchema(schema){if(!isJsonSchemaObject(schema))return!1;let types=typeof schema.type=="string"?[schema.type]:Array.isArray(schema.type)?schema.type:[];return types.includes("object")||types.includes("array")||schema.properties!==void 0||schema.items!==void 0}function schemaAllowsNull(schema){return isJsonSchemaObject(
|
|
300
300
|
schema)?schema.type==="null"||Array.isArray(schema.type)&&schema.type.includes("null")||schema.const===null||Array.isArray(schema.enum)&&schema.enum.includes(null)?!0:Array.isArray(schema.anyOf)&&schema.anyOf.some(variant=>schemaAllowsNull(variant)):!1}function makeJsonSchemaNodeStrict(schema,isUnsupportedKeyword){if(!isJsonSchemaObject(schema))throw new UnsupportedStrictJsonSchemaError("boolean schemas are unsupported");for(let key of UNSUPPORTED_STRICT_SCHEMA_KEYS)if(schema[key]!==void 0)throw new UnsupportedStrictJsonSchemaError(
|
|
301
|
-
`${key} schemas are unsupported`);if(isUnsupportedKeyword){for(let[key,value]of Object.entries(schema))if(isUnsupportedKeyword(key,value))throw new UnsupportedStrictJsonSchemaError(`${key}: ${JSON.stringify(value)} is unsupported`)}if(schema.
|
|
302
|
-
"object and array unions are unsupported");makeJsonSchemaNodeStrict(variant,isUnsupportedKeyword)}}if(schema.items!==void 0){if(Array.isArray(schema.items))throw new UnsupportedStrictJsonSchemaError("tuple schemas are unsupported");makeJsonSchemaNodeStrict(schema.items,isUnsupportedKeyword)}let isObjectSchema=schema.type==="object";if(schema.properties!==
|
|
303
|
-
void 0&&schema.additionalProperties!==!1)throw new UnsupportedStrictJsonSchemaError("schema-valued or true additionalProperties is unsupported");if(schema.properties!==void 0&&!isJsonSchemaObject(schema.properties))throw new UnsupportedStrictJsonSchemaError("object properties must be a schema map");if(schema.required!==void 0&&(!Array.isArray(
|
|
304
|
-
properties??{},propertyNames=Object.keys(properties),required=new Set(Array.isArray(schema.required)?schema.required:[]);if([...required].some(key=>!propertyNames.includes(key)))throw new UnsupportedStrictJsonSchemaError("required contains an unknown property");for(let[key,property]of Object.entries(properties))makeJsonSchemaNodeStrict(
|
|
305
|
-
additionalProperties=!1}function makeStrictJsonSchema(schema,isUnsupportedKeyword){let cloned=structuredClone(schema);if(!isJsonSchemaObject(cloned))throw new UnsupportedStrictJsonSchemaError("root schema must have type object");if(makeJsonSchemaNodeStrict(cloned,isUnsupportedKeyword),cloned.type!=="object")throw new UnsupportedStrictJsonSchemaError(
|
|
306
|
-
config.type==="json_schema"&&config.strict==="prefer"}function getJsonSchemaToolParameters(tool,strict){return strict===!0?makeStrictJsonSchema(tool.parameters):tool.parameters}function prepareJsonSchemaTool(tool,supportsStrictMode,isUnsupportedKeyword){let fallback={strict:void 0,parameters:tool.parameters},config=tool.constrainedSampling;if(typeof config!=
|
|
307
|
-
isUnsupportedKeyword)}}catch(error){if(!(error instanceof UnsupportedStrictJsonSchemaError))throw error;if(config.strict!=="require")return fallback;throw new Error(`Tool "${tool.name}" requires JSON-schema constrained sampling, but ${error.message}.`)}if(config.strict==="require")throw new Error(`Tool "${tool.name}" requires JSON-schema constrained
|
|
308
|
-
return prepareJsonSchemaTool(tool,supportsStrictMode,isUnsupportedKeyword).strict}var CHARS_PER_TOKEN=3.5,ESTIMATED_IMAGE_CHARS=4800;function calculateContextTokens(usage){return usage.totalTokens||usage.input+usage.output+usage.cacheRead+usage.cacheWrite}function safeJsonStringify2(value){try{return JSON.stringify(value)??"undefined"}catch{return"[
|
|
309
|
-
chars+=block.type==="text"?block.text.length:ESTIMATED_IMAGE_CHARS;return chars}function estimateTextTokens(text){return Math.ceil(text.length/CHARS_PER_TOKEN)}function estimateTextAndImageContentTokens(content){return Math.ceil(estimateTextAndImageContentChars(content)/CHARS_PER_TOKEN)}function estimateMessageTokens(message){let chars=0;if(message.
|
|
310
|
-
if(message.role==="user"||message.role==="toolResult")return estimateTextAndImageContentTokens(message.content);for(let block of message.content)block.type==="text"?chars+=block.text.length:block.type==="thinking"?chars+=block.thinking.length:chars+=block.name.length+safeJsonStringify2(block.arguments).length;return Math.ceil(chars/CHARS_PER_TOKEN)}
|
|
311
|
-
if(message.role==="assistant"){let assistant=message;assistant.timestamp>=latestPrefixTimestamp&&assistant.stopReason!=="aborted"&&assistant.stopReason!=="error"&&calculateContextTokens(assistant.usage)>0&&(usageInfo={usage:assistant.usage,index:i})}latestPrefixTimestamp=Math.max(latestPrefixTimestamp,message.timestamp)}return usageInfo}
|
|
312
|
-
usageInfo.usage),trailingTokens=0;for(let i=usageInfo.index+1;i<messages.length;i++)trailingTokens+=estimateMessageTokens(messages[i]);return{tokens:usageTokens+trailingTokens,usageTokens,trailingTokens,lastUsageIndex:usageInfo.index}}let tokens=0;for(let message of messages)tokens+=estimateMessageTokens(
|
|
313
|
-
var CONTEXT_SAFETY_TOKENS=4096,ESTIMATE_SAFETY_RATIO=.2,MIN_CLAMPED_MAX_TOKENS=CONTEXT_SAFETY_TOKENS,MIN_MAX_TOKENS=1;function clampMaxTokensToContext(model,context,maxTokens){if(model.contextWindow<=0)return Math.max(MIN_MAX_TOKENS,maxTokens);let estimate=estimateContextTokens(context),margin=Math.max(CONTEXT_SAFETY_TOKENS,
|
|
314
|
-
function resolveSamplingParams(model,thinkingLevel,requestParams){let effectiveThinkingLevel=clampThinkingLevel(model,thinkingLevel),thinkingLevelParams=model.samplingParamsByThinkingLevel?.[effectiveThinkingLevel];return model.samplingParams||thinkingLevelParams||requestParams?{...model.samplingParams,...thinkingLevelParams
|
|
315
|
-
return{temperature:options?.temperature,samplingParams,maxTokens:clampMaxTokensToContext(model,context,options?.maxTokens??model.maxTokens),signal:options?.signal,telemetry:options?.telemetry,apiKey:apiKey||options?.apiKey,fetch:options?.fetch,transport:options?.transport,cacheRetention:options?.cacheRetention,sessionId:options?.
|
|
316
|
-
onRequest:options?.onRequest,beforeSubmission:options?.beforeSubmission,onProviderStreamEvent:options?.onProviderStreamEvent,timeoutMs:options?.timeoutMs,websocketConnectTimeoutMs:options?.websocketConnectTimeoutMs,maxRetries:options?.maxRetries,maxRetryDelayMs:options?.maxRetryDelayMs,metadata:options?.metadata,env:options?.env}}
|
|
317
|
-
|
|
318
|
-
void 0?modelMaxTokens:Math.min(baseMaxTokens+thinkingBudget,modelMaxTokens);return maxTokens<=thinkingBudget&&(thinkingBudget=clampThinkingBudgetToAnswerRoom(thinkingBudget,maxTokens)),{maxTokens,thinkingBudget}}var NON_VISION_USER_IMAGE_PLACEHOLDER="(image omitted: model does not support images)",NON_VISION_TOOL_IMAGE_PLACEHOLDER="
|
|
319
|
-
isError)return;let images=msg.content.filter(block=>block.type==="image");if(images.length!==0)return{content:replaceImagesWithPlaceholder(msg.content,ERROR_TOOL_IMAGE_PLACEHOLDER),caption:`Images from the error result of tool call ${msg.toolCallId} (${msg.toolName}):`,images}}function replaceImagesWithPlaceholder(content,placeholder){
|
|
320
|
-
|
|
321
|
-
let toolCallIdMap=new Map,normalizedMessages=messages.map(msg=>msg.content==null?{...msg,content:[]}:msg),transformed=downgradeUnsupportedImages(normalizedMessages,model).map(msg=>{if(msg.role==="system"||msg.role==="user")return msg;if(msg.role==="toolResult"){let normalizedId=toolCallIdMap.get(msg.toolCallId);return normalizedId&&
|
|
322
|
-
assistantMsg.api===model.api&&assistantMsg.model===model.id,transformedContent=assistantMsg.content.flatMap(block=>{if(block.type==="thinking")return isSameModel?block.redacted||block.thinkingSignature?block:!block.thinking||block.thinking.trim()===""?[]:isSameModel?block:{type:"text",text:block.thinking}:[];if(block.type==="text")
|
|
323
|
-
(normalizedToolCall={...toolCall},delete normalizedToolCall.thoughtSignature),!isSameModel&&normalizeToolCallId2){let normalizedId=normalizeToolCallId2(toolCall.id,model,assistantMsg);normalizedId!==toolCall.id&&(toolCallIdMap.set(toolCall.id,normalizedId),normalizedToolCall={...normalizedToolCall,id:normalizedId})}return normalizedToolCall}
|
|
324
|
-
closePendingToolCalls=()=>{if(pendingToolCalls.length>0){for(let tc of pendingToolCalls)existingToolResultIds.has(tc.id)||result.push({role:"toolResult",toolCallId:tc.id,toolName:tc.name,content:[{type:"text",text:"No result provided"}],isError:!0,timestamp:Date.now()});pendingToolCalls=[],existingToolResultIds=new Set}result.push(...heldSystemMessages),
|
|
325
|
-
if(assistantMsg.stopReason==="error"||assistantMsg.stopReason==="aborted")continue;let toolCalls=assistantMsg.content.filter(b=>b.type==="toolCall");toolCalls.length>0&&(pendingToolCalls=toolCalls,existingToolResultIds=new Set),result.push(msg)}else msg.role==="toolResult"?(existingToolResultIds.add(msg.toolCallId),result.push(msg)):msg.
|
|
326
|
-
result}var EMPTY_TEXT_PLACEHOLDER="<empty>",THINKING_BINDING_CONTROLS_BETA="thinking-binding-controls-2026-08-01",REDACTED_THINKING_PLACEHOLDER="[Reasoning redacted]",stream=(model,context,options={})=>{let stream2=new AssistantMessageEventStream,normalizedContext=collapseSystemMessages(context);return(async()=>{let output={
|
|
327
|
-
cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},openBlocks=new Map,optionsProfile=options.profile||options.env?.AWS_PROFILE,config={profile:optionsProfile||getProviderEnvValue("AWS_PROFILE",options.env),customUserAgent:bedrockUserAgent(options.identity)},configuredRegion=getConfiguredBedrockRegion(
|
|
328
|
-
model.baseUrl,configuredRegion,hasAmbientConfiguredProfile);useExplicitEndpoint&&(config.endpoint=model.baseUrl);let skipAuth=getProviderEnvValue("AWS_BEDROCK_SKIP_AUTH",options.env)==="1",bearerToken=options.bearerToken||options.apiKey||getProviderEnvValue("AWS_BEARER_TOKEN_BEDROCK",options.env)||void 0,useBearerToken=bearerToken!==
|
|
329
|
-
arnRegionMatch?config.region=arnRegionMatch[1]:configuredRegion?config.region=configuredRegion:endpointRegion&&useExplicitEndpoint?config.region=endpointRegion:hasAmbientConfiguredProfile||(config.region="us-east-1"),skipAuth&&(config.credentials={accessKeyId:"dummy-access-key",secretAccessKey:"dummy-secret-key"});let credentials=getConfiguredBedrockCredentials(
|
|
330
|
-
void 0:resolveHttpProxyUrlForTarget(model.baseUrl,options.env);proxyUrl?config.requestHandler=new import_node_http_handler.NodeHttpHandler({httpAgent:new HttpProxyAgent(proxyUrl),httpsAgent:new HttpsProxyAgent(proxyUrl)}):shouldUseBedrockHttp1Handler(model.baseUrl,options.env)&&(config.requestHandler=new import_node_http_handler.NodeHttpHandler)}else config.
|
|
331
|
-
config.authSchemePreference=["httpBearerAuth"]);let responseRequestId,client;try{let supportsStrictMode=model.compat?.supportsStrictMode??!1;client=new import_client_bedrock_runtime.BedrockRuntimeClient(config);let observedRawResponse=!1;addResponseHeadersMiddleware(client,options.onResponse,model,()=>{observedRawResponse=!0},options.timeoutMs);let customHeaders=providerHeadersToRecord(
|
|
332
|
-
options.cacheRetention,options.env),inferenceMaxTokens=options.maxTokens??(isAnthropicClaudeModel(model)?model.maxTokens:void 0),messages=convertMessages(normalizedContext,model,cacheRetention,options.env),initialSystemMessage=getInitialSystemMessage(normalizedContext.messages),initialSystemPrompt=initialSystemMessage?getSystemMessageText(initialSystemMessage):void 0,commandInput={
|
|
333
|
-
...inferenceMaxTokens!==void 0&&{maxTokens:inferenceMaxTokens},...options.temperature!==void 0&&{temperature:options.temperature}},toolConfig:convertToolConfig(getCurrentTools(normalizedContext.messages),options.toolChoice,supportsStrictMode),additionalModelRequestFields:buildAdditionalModelRequestFields(model,options,messages),...options.requestMetadata!==void 0&&{requestMetadata:options.
|
|
334
|
-
(commandInput=nextCommandInput),(options.onRequest||options.beforeSubmission)&&addFinalRequestObserverMiddleware(client,options,model);let response=await client.send(new import_client_bedrock_runtime.ConverseStreamCommand(commandInput),{abortSignal:options.signal});if(responseRequestId=normalizeDiagnosticValue(response.$metadata.requestId),!observedRawResponse&&response.$metadata.httpStatusCode!==
|
|
335
|
-
|
|
336
|
-
item.contentBlockStart,openBlocks,output,stream2);else if(item.contentBlockDelta)handleContentBlockDelta(item.contentBlockDelta,openBlocks,output,stream2,options.signal);else if(item.contentBlockStop)handleContentBlockStop(item.contentBlockStop,openBlocks,output,stream2);else if(item.messageStop){output.rawStopReason=item.messageStop.stopReason;let{stopReason,errorMessage}=mapStopReason(
|
|
337
|
-
metadata)handleMetadata(item.metadata,model,output);else{if(item.internalServerException)throw item.internalServerException;if(item.modelStreamErrorException)throw item.modelStreamErrorException;if(item.validationException)throw item.validationException;if(item.throttlingException)throw item.throttlingException;if(item.serviceUnavailableException)throw item.serviceUnavailableException}
|
|
338
|
-
"Bedrock stream ended without a stop reason");if(output.stopReason==="error"||output.stopReason==="aborted")throw new Error(output.errorMessage||"An unknown error occurred");flushOpenBlocks(openBlocks,output),stream2.push({type:"done",reason:output.stopReason,message:output}),stream2.end()}catch(error){flushOpenBlocks(openBlocks,output),output.stopReason=options.signal?.aborted?"
|
|
339
|
-
error)),output.stopReason==="error"&&appendBedrockFailureDiagnostic(output,error,responseRequestId),stream2.push({type:"error",reason:output.stopReason,error:output}),stream2.end()}finally{client?.destroy?.()}})(),stream2},BEDROCK_ERROR_PREFIXES={InternalServerException:"Internal server error",ModelStreamErrorException:"Model stream error",ValidationException:"Validation
|
|
340
|
-
https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html";function formatBedrockError(error){let norm=normalizeProviderError(error),core=error instanceof import_client_bedrock_runtime.BedrockRuntimeServiceException&&error.name.endsWith("Exception")&&norm.message!=="UnknownError"||norm.status===void 0?norm.message:`${norm.status}: ${norm.body??norm.message.
|
|
301
|
+
`${key} schemas are unsupported`);if(isUnsupportedKeyword){for(let[key,value]of Object.entries(schema))if(isUnsupportedKeyword(key,value))throw new UnsupportedStrictJsonSchemaError(`${key}: ${JSON.stringify(value)} is unsupported`)}if(schema.type===void 0&&schema.anyOf===void 0&&schema.enum===void 0)throw new UnsupportedStrictJsonSchemaError("schemas without a type are unsupported");if(schema.anyOf!==void 0){if(!Array.isArray(schema.anyOf)||schema.anyOf.length===0)throw new UnsupportedStrictJsonSchemaError(
|
|
302
|
+
"anyOf must contain at least one schema");for(let variant of schema.anyOf){if(isStructuredSchema(variant))throw new UnsupportedStrictJsonSchemaError("object and array unions are unsupported");makeJsonSchemaNodeStrict(variant,isUnsupportedKeyword)}}if(schema.items!==void 0){if(Array.isArray(schema.items))throw new UnsupportedStrictJsonSchemaError("tuple schemas are unsupported");makeJsonSchemaNodeStrict(schema.items,isUnsupportedKeyword)}let isObjectSchema=schema.type==="object";if(schema.properties!==
|
|
303
|
+
void 0&&!isObjectSchema)throw new UnsupportedStrictJsonSchemaError("properties require type object");if(!isObjectSchema)return;if(schema.additionalProperties!==void 0&&schema.additionalProperties!==!1)throw new UnsupportedStrictJsonSchemaError("schema-valued or true additionalProperties is unsupported");if(schema.properties!==void 0&&!isJsonSchemaObject(schema.properties))throw new UnsupportedStrictJsonSchemaError("object properties must be a schema map");if(schema.required!==void 0&&(!Array.isArray(
|
|
304
|
+
schema.required)||schema.required.some(key=>typeof key!="string")))throw new UnsupportedStrictJsonSchemaError("object required must be a string array");let properties=schema.properties??{},propertyNames=Object.keys(properties),required=new Set(Array.isArray(schema.required)?schema.required:[]);if([...required].some(key=>!propertyNames.includes(key)))throw new UnsupportedStrictJsonSchemaError("required contains an unknown property");for(let[key,property]of Object.entries(properties))makeJsonSchemaNodeStrict(
|
|
305
|
+
property,isUnsupportedKeyword),!required.has(key)&&!schemaAllowsNull(property)&&(properties[key]={anyOf:[property,{type:"null"}]});schema.required=propertyNames,schema.additionalProperties=!1}function makeStrictJsonSchema(schema,isUnsupportedKeyword){let cloned=structuredClone(schema);if(!isJsonSchemaObject(cloned))throw new UnsupportedStrictJsonSchemaError("root schema must have type object");if(makeJsonSchemaNodeStrict(cloned,isUnsupportedKeyword),cloned.type!=="object")throw new UnsupportedStrictJsonSchemaError(
|
|
306
|
+
"root schema must have type object");return cloned}function prefersJsonSchemaStrictSampling(tool){let config=tool.constrainedSampling;return!!config&&config.type==="json_schema"&&config.strict==="prefer"}function getJsonSchemaToolParameters(tool,strict){return strict===!0?makeStrictJsonSchema(tool.parameters):tool.parameters}function prepareJsonSchemaTool(tool,supportsStrictMode,isUnsupportedKeyword){let fallback={strict:void 0,parameters:tool.parameters},config=tool.constrainedSampling;if(typeof config!=
|
|
307
|
+
"object"||config.type!=="json_schema")return fallback;if(supportsStrictMode)try{return{strict:!0,parameters:makeStrictJsonSchema(tool.parameters,isUnsupportedKeyword)}}catch(error){if(!(error instanceof UnsupportedStrictJsonSchemaError))throw error;if(config.strict!=="require")return fallback;throw new Error(`Tool "${tool.name}" requires JSON-schema constrained sampling, but ${error.message}.`)}if(config.strict==="require")throw new Error(`Tool "${tool.name}" requires JSON-schema constrained sam\
|
|
308
|
+
pling, but strict tools are unsupported.`);return fallback}function resolveJsonSchemaStrictSampling(tool,supportsStrictMode,isUnsupportedKeyword){return prepareJsonSchemaTool(tool,supportsStrictMode,isUnsupportedKeyword).strict}var CHARS_PER_TOKEN=3.5,ESTIMATED_IMAGE_CHARS=4800;function calculateContextTokens(usage){return usage.totalTokens||usage.input+usage.output+usage.cacheRead+usage.cacheWrite}function safeJsonStringify2(value){try{return JSON.stringify(value)??"undefined"}catch{return"[uns\
|
|
309
|
+
erializable]"}}function estimateTextAndImageContentChars(content){if(typeof content=="string")return content.length;let chars=0;for(let block of content)chars+=block.type==="text"?block.text.length:ESTIMATED_IMAGE_CHARS;return chars}function estimateTextTokens(text){return Math.ceil(text.length/CHARS_PER_TOKEN)}function estimateTextAndImageContentTokens(content){return Math.ceil(estimateTextAndImageContentChars(content)/CHARS_PER_TOKEN)}function estimateMessageTokens(message){let chars=0;if(message.
|
|
310
|
+
role==="system")return estimateTextTokens(getSystemMessageText(message))+estimateToolsTokens(message.toolsAdded)+estimateToolsTokens(message.toolsRemoved);if(message.role==="user"||message.role==="toolResult")return estimateTextAndImageContentTokens(message.content);for(let block of message.content)block.type==="text"?chars+=block.text.length:block.type==="thinking"?chars+=block.thinking.length:chars+=block.name.length+safeJsonStringify2(block.arguments).length;return Math.ceil(chars/CHARS_PER_TOKEN)}
|
|
311
|
+
function getLastAssistantUsageInfo(messages){let latestPrefixTimestamp=Number.NEGATIVE_INFINITY,usageInfo;for(let i=0;i<messages.length;i++){let message=messages[i];if(message.role==="assistant"){let assistant=message;assistant.timestamp>=latestPrefixTimestamp&&assistant.stopReason!=="aborted"&&assistant.stopReason!=="error"&&calculateContextTokens(assistant.usage)>0&&(usageInfo={usage:assistant.usage,index:i})}latestPrefixTimestamp=Math.max(latestPrefixTimestamp,message.timestamp)}return usageInfo}
|
|
312
|
+
function estimateContextTokens(context){let messages="messages"in context?context.messages:context,usageInfo=getLastAssistantUsageInfo(messages);if(usageInfo){let usageTokens=calculateContextTokens(usageInfo.usage),trailingTokens=0;for(let i=usageInfo.index+1;i<messages.length;i++)trailingTokens+=estimateMessageTokens(messages[i]);return{tokens:usageTokens+trailingTokens,usageTokens,trailingTokens,lastUsageIndex:usageInfo.index}}let tokens=0;for(let message of messages)tokens+=estimateMessageTokens(
|
|
313
|
+
message);return{tokens,usageTokens:0,trailingTokens:tokens,lastUsageIndex:null}}function estimateToolsTokens(tools){return!tools||tools.length===0?0:estimateTextTokens(safeJsonStringify2(tools))}var CONTEXT_SAFETY_TOKENS=4096,ESTIMATE_SAFETY_RATIO=.2,MIN_CLAMPED_MAX_TOKENS=CONTEXT_SAFETY_TOKENS,MIN_MAX_TOKENS=1;function clampMaxTokensToContext(model,context,maxTokens){if(model.contextWindow<=0)return Math.max(MIN_MAX_TOKENS,maxTokens);let estimate=estimateContextTokens(context),margin=Math.max(CONTEXT_SAFETY_TOKENS,
|
|
314
|
+
Math.ceil(estimate.trailingTokens*ESTIMATE_SAFETY_RATIO)),available=model.contextWindow-estimate.tokens-margin;return Math.min(maxTokens,Math.max(MIN_CLAMPED_MAX_TOKENS,available))}function resolveSamplingParams(model,thinkingLevel,requestParams){let effectiveThinkingLevel=clampThinkingLevel(model,thinkingLevel),thinkingLevelParams=model.samplingParamsByThinkingLevel?.[effectiveThinkingLevel];return model.samplingParams||thinkingLevelParams||requestParams?{...model.samplingParams,...thinkingLevelParams,
|
|
315
|
+
...requestParams}:void 0}function buildBaseOptions(model,context,options,apiKey){let samplingParams=resolveSamplingParams(model,options?.reasoning??"off",options?.samplingParams);return{temperature:options?.temperature,samplingParams,maxTokens:clampMaxTokensToContext(model,context,options?.maxTokens??model.maxTokens),signal:options?.signal,telemetry:options?.telemetry,apiKey:apiKey||options?.apiKey,fetch:options?.fetch,transport:options?.transport,cacheRetention:options?.cacheRetention,sessionId:options?.
|
|
316
|
+
sessionId,disableContinuation:options?.disableContinuation,headers:options?.headers,identity:options?.identity,onPayload:options?.onPayload,onResponse:options?.onResponse,onRequest:options?.onRequest,beforeSubmission:options?.beforeSubmission,onProviderStreamEvent:options?.onProviderStreamEvent,timeoutMs:options?.timeoutMs,websocketConnectTimeoutMs:options?.websocketConnectTimeoutMs,maxRetries:options?.maxRetries,maxRetryDelayMs:options?.maxRetryDelayMs,metadata:options?.metadata,env:options?.env}}
|
|
317
|
+
var MIN_ANSWER_TOKENS=1024,DEFAULT_THINKING_BUDGETS={minimal:1024,low:2048,medium:8192,high:16384};function clampReasoning(effort){return effort==="xhigh"||effort==="max"?"high":effort}function thinkingBudgetForLevel(reasoningLevel,customBudgets){let budgets={...DEFAULT_THINKING_BUDGETS,...customBudgets},level=clampReasoning(reasoningLevel);return budgets[level]}function clampThinkingBudgetToAnswerRoom(thinkingBudget,ceiling){return Math.min(thinkingBudget,Math.max(0,ceiling-MIN_ANSWER_TOKENS))}
|
|
318
|
+
function adjustMaxTokensForThinking(baseMaxTokens,modelMaxTokens,reasoningLevel,customBudgets){let thinkingBudget=thinkingBudgetForLevel(reasoningLevel,customBudgets),maxTokens=baseMaxTokens===void 0?modelMaxTokens:Math.min(baseMaxTokens+thinkingBudget,modelMaxTokens);return maxTokens<=thinkingBudget&&(thinkingBudget=clampThinkingBudgetToAnswerRoom(thinkingBudget,maxTokens)),{maxTokens,thinkingBudget}}var NON_VISION_USER_IMAGE_PLACEHOLDER="(image omitted: model does not support images)",NON_VISION_TOOL_IMAGE_PLACEHOLDER="\
|
|
319
|
+
(tool image omitted: model does not support images)",ERROR_TOOL_IMAGE_PLACEHOLDER="(image attached after the tool results)";function splitErrorToolResultImages(msg){if(!msg.isError)return;let images=msg.content.filter(block=>block.type==="image");if(images.length!==0)return{content:replaceImagesWithPlaceholder(msg.content,ERROR_TOOL_IMAGE_PLACEHOLDER),caption:`Images from the error result of tool call ${msg.toolCallId} (${msg.toolName}):`,images}}function replaceImagesWithPlaceholder(content,placeholder){
|
|
320
|
+
let result=[],previousWasPlaceholder=!1;for(let block of content){if(block.type==="image"){previousWasPlaceholder||result.push({type:"text",text:placeholder}),previousWasPlaceholder=!0;continue}result.push(block),previousWasPlaceholder=block.text===placeholder}return result}function downgradeUnsupportedImages(messages,model){return model.input.includes("image")?messages:messages.map(msg=>msg.role==="user"&&Array.isArray(msg.content)?{...msg,content:replaceImagesWithPlaceholder(msg.content,NON_VISION_USER_IMAGE_PLACEHOLDER)}:
|
|
321
|
+
msg.role==="toolResult"?{...msg,content:replaceImagesWithPlaceholder(msg.content,NON_VISION_TOOL_IMAGE_PLACEHOLDER)}:msg)}function transformMessages(messages,model,normalizeToolCallId2){let toolCallIdMap=new Map,normalizedMessages=messages.map(msg=>msg.content==null?{...msg,content:[]}:msg),transformed=downgradeUnsupportedImages(normalizedMessages,model).map(msg=>{if(msg.role==="system"||msg.role==="user")return msg;if(msg.role==="toolResult"){let normalizedId=toolCallIdMap.get(msg.toolCallId);return normalizedId&&
|
|
322
|
+
normalizedId!==msg.toolCallId?{...msg,toolCallId:normalizedId}:msg}if(msg.role==="assistant"){let assistantMsg=msg,isSameModel=assistantMsg.provider===model.provider&&assistantMsg.api===model.api&&assistantMsg.model===model.id,transformedContent=assistantMsg.content.flatMap(block=>{if(block.type==="thinking")return isSameModel?block.redacted||block.thinkingSignature?block:!block.thinking||block.thinking.trim()===""?[]:isSameModel?block:{type:"text",text:block.thinking}:[];if(block.type==="text")
|
|
323
|
+
return isSameModel?block:{type:"text",text:block.text};if(block.type==="toolCall"){let toolCall=block,normalizedToolCall=toolCall;if(!isSameModel&&toolCall.thoughtSignature&&(normalizedToolCall={...toolCall},delete normalizedToolCall.thoughtSignature),!isSameModel&&normalizeToolCallId2){let normalizedId=normalizeToolCallId2(toolCall.id,model,assistantMsg);normalizedId!==toolCall.id&&(toolCallIdMap.set(toolCall.id,normalizedId),normalizedToolCall={...normalizedToolCall,id:normalizedId})}return normalizedToolCall}
|
|
324
|
+
return block});return{...assistantMsg,content:transformedContent}}return msg}),result=[],pendingToolCalls=[],existingToolResultIds=new Set,heldSystemMessages=[],closePendingToolCalls=()=>{if(pendingToolCalls.length>0){for(let tc of pendingToolCalls)existingToolResultIds.has(tc.id)||result.push({role:"toolResult",toolCallId:tc.id,toolName:tc.name,content:[{type:"text",text:"No result provided"}],isError:!0,timestamp:Date.now()});pendingToolCalls=[],existingToolResultIds=new Set}result.push(...heldSystemMessages),
|
|
325
|
+
heldSystemMessages.length=0};for(let i=0;i<transformed.length;i++){let msg=transformed[i];if(msg.role==="assistant"){closePendingToolCalls();let assistantMsg=msg;if(assistantMsg.stopReason==="error"||assistantMsg.stopReason==="aborted")continue;let toolCalls=assistantMsg.content.filter(b=>b.type==="toolCall");toolCalls.length>0&&(pendingToolCalls=toolCalls,existingToolResultIds=new Set),result.push(msg)}else msg.role==="toolResult"?(existingToolResultIds.add(msg.toolCallId),result.push(msg)):msg.
|
|
326
|
+
role==="system"?pendingToolCalls.length>0?heldSystemMessages.push(msg):result.push(msg):(msg.role==="user"&&closePendingToolCalls(),result.push(msg))}return closePendingToolCalls(),result}var EMPTY_TEXT_PLACEHOLDER="<empty>",THINKING_BINDING_CONTROLS_BETA="thinking-binding-controls-2026-08-01",REDACTED_THINKING_PLACEHOLDER="[Reasoning redacted]",stream=(model,context,options={})=>{let stream2=new AssistantMessageEventStream,normalizedContext=collapseSystemMessages(context);return(async()=>{let output={
|
|
327
|
+
role:"assistant",content:[],api:"bedrock-converse-stream",provider:model.provider,model:model.id,usage:{usageIncomplete:!0,input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},openBlocks=new Map,optionsProfile=options.profile||options.env?.AWS_PROFILE,config={profile:optionsProfile||getProviderEnvValue("AWS_PROFILE",options.env),customUserAgent:bedrockUserAgent(options.identity)},configuredRegion=getConfiguredBedrockRegion(
|
|
328
|
+
options),hasAmbientConfiguredProfile=!!getProviderEnvValue("AWS_PROFILE"),endpointRegion=getStandardBedrockEndpointRegion(model.baseUrl),useExplicitEndpoint=shouldUseExplicitBedrockEndpoint(model.baseUrl,configuredRegion,hasAmbientConfiguredProfile);useExplicitEndpoint&&(config.endpoint=model.baseUrl);let skipAuth=getProviderEnvValue("AWS_BEDROCK_SKIP_AUTH",options.env)==="1",bearerToken=options.bearerToken||options.apiKey||getProviderEnvValue("AWS_BEARER_TOKEN_BEDROCK",options.env)||void 0,useBearerToken=bearerToken!==
|
|
329
|
+
void 0&&!skipAuth;if(typeof process<"u"&&(process.versions?.node||process.versions?.bun)){let arnRegionMatch=model.id.match(/^arn:aws(?:-[a-z0-9-]+)?:bedrock:([a-z0-9-]+):/);arnRegionMatch?config.region=arnRegionMatch[1]:configuredRegion?config.region=configuredRegion:endpointRegion&&useExplicitEndpoint?config.region=endpointRegion:hasAmbientConfiguredProfile||(config.region="us-east-1"),skipAuth&&(config.credentials={accessKeyId:"dummy-access-key",secretAccessKey:"dummy-secret-key"});let credentials=getConfiguredBedrockCredentials(
|
|
330
|
+
options.env);!skipAuth&&credentials&&!optionsProfile&&(config.credentials=credentials);let proxyUrl=shouldBypassBedrockProxy(model.baseUrl)?void 0:resolveHttpProxyUrlForTarget(model.baseUrl,options.env);proxyUrl?config.requestHandler=new import_node_http_handler.NodeHttpHandler({httpAgent:new HttpProxyAgent(proxyUrl),httpsAgent:new HttpsProxyAgent(proxyUrl)}):shouldUseBedrockHttp1Handler(model.baseUrl,options.env)&&(config.requestHandler=new import_node_http_handler.NodeHttpHandler)}else config.
|
|
331
|
+
region=configuredRegion||(endpointRegion&&useExplicitEndpoint?endpointRegion:void 0)||"us-east-1";useBearerToken&&(config.token={token:bearerToken},config.authSchemePreference=["httpBearerAuth"]);let responseRequestId,client;try{let supportsStrictMode=model.compat?.supportsStrictMode??!1;client=new import_client_bedrock_runtime.BedrockRuntimeClient(config);let observedRawResponse=!1;addResponseHeadersMiddleware(client,options.onResponse,model,()=>{observedRawResponse=!0},options.timeoutMs);let customHeaders=providerHeadersToRecord(
|
|
332
|
+
options.headers);customHeaders&&addCustomHeadersMiddleware(client,customHeaders);let cacheRetention=resolveCacheRetention(options.cacheRetention,options.env),inferenceMaxTokens=options.maxTokens??(isAnthropicClaudeModel(model)?model.maxTokens:void 0),messages=convertMessages(normalizedContext,model,cacheRetention,options.env),initialSystemMessage=getInitialSystemMessage(normalizedContext.messages),initialSystemPrompt=initialSystemMessage?getSystemMessageText(initialSystemMessage):void 0,commandInput={
|
|
333
|
+
modelId:model.id,messages,system:buildSystemPrompt(initialSystemPrompt,model,cacheRetention,options.env),inferenceConfig:{...inferenceMaxTokens!==void 0&&{maxTokens:inferenceMaxTokens},...options.temperature!==void 0&&{temperature:options.temperature}},toolConfig:convertToolConfig(getCurrentTools(normalizedContext.messages),options.toolChoice,supportsStrictMode),additionalModelRequestFields:buildAdditionalModelRequestFields(model,options,messages),...options.requestMetadata!==void 0&&{requestMetadata:options.
|
|
334
|
+
requestMetadata}},nextCommandInput=await options?.onPayload?.(commandInput,model);nextCommandInput!==void 0&&(commandInput=nextCommandInput),(options.onRequest||options.beforeSubmission)&&addFinalRequestObserverMiddleware(client,options,model);let response=await client.send(new import_client_bedrock_runtime.ConverseStreamCommand(commandInput),{abortSignal:options.signal});if(responseRequestId=normalizeDiagnosticValue(response.$metadata.requestId),!observedRawResponse&&response.$metadata.httpStatusCode!==
|
|
335
|
+
void 0){let responseHeaders={};response.$metadata.requestId&&(responseHeaders["x-amzn-requestid"]=response.$metadata.requestId),await options?.onResponse?.({status:response.$metadata.httpStatusCode,headers:responseHeaders},model)}for await(let item of response.stream)if(await options.onProviderStreamEvent?.(item,model),item.messageStart){if(item.messageStart.role!==import_client_bedrock_runtime.ConversationRole.ASSISTANT)throw new Error("Unexpected assistant message start but got user message st\
|
|
336
|
+
art instead");stream2.push({type:"start",partial:output})}else if(item.contentBlockStart)handleContentBlockStart(item.contentBlockStart,openBlocks,output,stream2);else if(item.contentBlockDelta)handleContentBlockDelta(item.contentBlockDelta,openBlocks,output,stream2,options.signal);else if(item.contentBlockStop)handleContentBlockStop(item.contentBlockStop,openBlocks,output,stream2);else if(item.messageStop){output.rawStopReason=item.messageStop.stopReason;let{stopReason,errorMessage}=mapStopReason(
|
|
337
|
+
item.messageStop.stopReason);output.stopReason=stopReason,errorMessage&&(output.errorMessage=errorMessage)}else if(item.metadata)handleMetadata(item.metadata,model,output);else{if(item.internalServerException)throw item.internalServerException;if(item.modelStreamErrorException)throw item.modelStreamErrorException;if(item.validationException)throw item.validationException;if(item.throttlingException)throw item.throttlingException;if(item.serviceUnavailableException)throw item.serviceUnavailableException}
|
|
338
|
+
if(options.signal?.aborted)throw new Error("Request was aborted");if(output.stopReason==="pending")throw new Error("Bedrock stream ended without a stop reason");if(output.stopReason==="error"||output.stopReason==="aborted")throw new Error(output.errorMessage||"An unknown error occurred");flushOpenBlocks(openBlocks,output),stream2.push({type:"done",reason:output.stopReason,message:output}),stream2.end()}catch(error){flushOpenBlocks(openBlocks,output),output.stopReason=options.signal?.aborted?"abo\
|
|
339
|
+
rted":"error",output.errorMessage=formatBedrockError(error),appendProviderTransportDiagnostic(output,normalizeProviderError(error)),output.stopReason==="error"&&appendBedrockFailureDiagnostic(output,error,responseRequestId),stream2.push({type:"error",reason:output.stopReason,error:output}),stream2.end()}finally{client?.destroy?.()}})(),stream2},BEDROCK_ERROR_PREFIXES={InternalServerException:"Internal server error",ModelStreamErrorException:"Model stream error",ValidationException:"Validation er\
|
|
340
|
+
ror",ThrottlingException:"Throttling error",ServiceUnavailableException:"Service unavailable"},BEDROCK_DATA_RETENTION_DOCS_URL="https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html";function formatBedrockError(error){let norm=normalizeProviderError(error),core=error instanceof import_client_bedrock_runtime.BedrockRuntimeServiceException&&error.name.endsWith("Exception")&&norm.message!=="UnknownError"||norm.status===void 0?norm.message:`${norm.status}: ${norm.body??norm.message.
|
|
341
|
+
split(`
|
|
341
342
|
Deserialization error:`)[0]}`,dataRetentionHint=/data retention mode/i.test(core)?` See ${BEDROCK_DATA_RETENTION_DOCS_URL} for supported data retention modes.`:"",prefix=error instanceof import_client_bedrock_runtime.BedrockRuntimeServiceException?`${BEDROCK_ERROR_PREFIXES[error.name]??error.name}: `:"";return`${truncateErrorText(`${prefix}${core}`,MAX_PROVIDER_ERROR_BODY_CHARS-dataRetentionHint.length)}${dataRetentionHint}`}var MAX_BEDROCK_DIAGNOSTIC_VALUE_CHARS=200;function normalizeDiagnosticValue(value){
|
|
342
343
|
if(typeof value!="string")return;let trimmed=value.trim();if(!(trimmed.length===0||trimmed.length>MAX_BEDROCK_DIAGNOSTIC_VALUE_CHARS||!/^[a-zA-Z0-9._:/-]+$/.test(trimmed)||truncateErrorText(trimmed,MAX_BEDROCK_DIAGNOSTIC_VALUE_CHARS)!==trimmed))return trimmed}function extractBedrockErrorCode(error){if(!(!(error instanceof Error)||!error.name.endsWith("Exception")))return normalizeDiagnosticValue(error.name)}function appendBedrockFailureDiagnostic(output,error,fallbackRequestId){let metadata=error?.
|
|
343
344
|
$metadata,details={};typeof metadata?.httpStatusCode=="number"&&(details.status=metadata.httpStatusCode);let errorCode=extractBedrockErrorCode(error);errorCode!==void 0&&(details.errorCode=errorCode);let requestId=normalizeDiagnosticValue(metadata?.requestId)??fallbackRequestId;requestId!==void 0&&(details.requestId=requestId),Object.keys(details).length!==0&&(appendAssistantMessageDiagnostic(output,{type:"bedrock_response_failure",timestamp:Date.now(),details}),typeof details.status=="number"&&
|