@fased/fased 0.1.55 → 0.1.57
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/config/capability-catalog.json +12 -0
- package/dist/agents/authenticated-model-catalog.js +3 -2
- package/dist/agents/bash-tools.exec-host-node.js +1 -1
- package/dist/agents/bash-tools.exec.js +1 -1
- package/dist/agents/copilot-dynamic-headers.js +37 -0
- package/dist/agents/current-model-catalog.js +6 -3
- package/dist/agents/model-catalog-snapshot.js +124 -0
- package/dist/agents/model-catalog-source.js +2 -2
- package/dist/agents/model-catalog.js +1 -1
- package/dist/agents/model-metadata.js +34 -6
- package/dist/agents/openai-codex-app-server.js +524 -0
- package/dist/agents/openai-codex-runtime-component.js +39 -0
- package/dist/agents/pi-embedded-runner/compact.js +3 -3
- package/dist/agents/pi-embedded-runner/extra-params.js +170 -94
- package/dist/agents/pi-embedded-runner/model.js +62 -1
- package/dist/agents/pi-embedded-runner/moonshot-stream-wrappers.js +46 -0
- package/dist/agents/pi-embedded-runner/openai-stream-wrappers.js +221 -0
- package/dist/agents/pi-embedded-runner/run/attempt.js +6 -4
- package/dist/agents/pi-embedded-runner/run.js +5 -2
- package/dist/agents/pi-embedded-runner/utils.js +1 -1
- package/dist/agents/pi-embedded-runner.js +1 -1
- package/dist/agents/pi-tools.js +2 -2
- package/dist/agents/tools/discord-actions-messaging.js +1 -1
- package/dist/agents/tools/message-tool.js +1 -1
- package/dist/agents/tools/session-status-tool.js +3 -3
- package/dist/agents/tools/slack-actions.js +1 -1
- package/dist/agents/tools/tts-tool.js +1 -1
- package/dist/auto-reply/reply/commands-models.js +1 -1
- package/dist/auto-reply/reply/directive-handling.impl.js +4 -1
- package/dist/auto-reply/reply/dispatch-acp.js +1 -1
- package/dist/auto-reply/reply/dispatch-from-config.js +1 -1
- package/dist/auto-reply/reply/get-reply-run.js +20 -2
- package/dist/auto-reply/reply/model-selection.js +1 -1
- package/dist/auto-reply/reply/session-reset-model.js +1 -1
- package/dist/auto-reply/status.js +1 -1
- package/dist/auto-reply/thinking.js +1 -1
- package/dist/brand.js +1 -1
- package/dist/browser/cdp.helpers.js +2 -2
- package/dist/browser/chrome.js +2 -2
- package/dist/browser/extension-relay.js +7 -7
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/capabilities/install.js +43 -0
- package/dist/cli/components-cli.js +9 -31
- package/dist/cli/cron-cli/register.cron-add.js +1 -1
- package/dist/cli/hooks-cli.js +1 -1
- package/dist/cli/plugins-cli.js +3 -3
- package/dist/cli/program/register.agent.js +1 -1
- package/dist/cli/update-cli/update-command.js +50 -12
- package/dist/commands/agent.js +22 -3
- package/dist/commands/auth-choice.apply.openai.js +9 -0
- package/dist/commands/auth-choice.apply.plugin-provider.js +1 -1
- package/dist/commands/doctor-config-flow.js +1 -1
- package/dist/commands/hosted-dashboard-probe.js +3 -3
- package/dist/commands/model-picker.js +4 -3
- package/dist/commands/models/list.probe.js +1 -1
- package/dist/commands/models/list.registry.js +3 -2
- package/dist/commands/models/list.status-command.js +2 -2
- package/dist/commands/onboard-channels.js +1 -1
- package/dist/commands/onboarding/plugin-install.js +2 -2
- package/dist/commands/openai-codex-model-default.js +3 -2
- package/dist/config/zod-schema.agent-defaults.js +4 -2
- package/dist/config/zod-schema.agent-runtime.js +4 -2
- package/dist/config/zod-schema.core.js +4 -2
- package/dist/control-ui/assets/{app-D2RaTXoV.js → app-DltSyY4Y.js} +1723 -1716
- package/dist/control-ui/assets/chat-model-ref-Djkv93yn.js +2 -0
- package/dist/control-ui/assets/{index-D2nC6I-9.js → index-D5JlBp7f.js} +3 -3
- package/dist/control-ui/assets/{providers-CyjiG5Jw.js → providers-Cc89iMdx.js} +3 -3
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/cron/isolated-agent/run.js +6 -2
- package/dist/cron/service/jobs.js +11 -1
- package/dist/discord/monitor/gateway-plugin.js +2 -2
- package/dist/discord/voice/manager.js +1 -1
- package/dist/gateway/client.js +4 -4
- package/dist/gateway/protocol/schema/agents-models-skills.js +106 -5
- package/dist/gateway/server-methods/hooks.js +1 -1
- package/dist/gateway/server-methods/models.js +15 -7
- package/dist/gateway/server-methods/plugins-marketplace.js +3 -3
- package/dist/gateway/server-methods/services.js +1 -1
- package/dist/gateway/server-methods/sessions.js +1 -1
- package/dist/gateway/server-methods/tts.js +2 -2
- package/dist/gateway/server-model-catalog.js +1 -1
- package/dist/gateway/sessions-patch.js +27 -24
- package/dist/light-update-status.js +11 -11
- package/dist/plugin-sdk/{accounts-CeRNo5Ae.js → accounts-CmMwe9Dt.js} +1 -1
- package/dist/plugin-sdk/{actions-OMRHtXPj.js → actions-DYViFQiX.js} +4 -4
- package/dist/plugin-sdk/{active-listener-BlIkS3iR.js → active-listener-DVbpcisf.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BbgPlhtw.js → agent-scope-CCjfjKoO.js} +1 -1
- package/dist/plugin-sdk/{allow-list-BYeKk0Sy.js → allow-list-DyAxs4yw.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-B2n3a2Tj.js → audio-preflight-D-Mfay8i.js} +44 -48
- package/dist/plugin-sdk/{audit-Ppg6dR_b.js → audit-JImYFOzJ.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-B6IAGlE0.js → channel-access-configure-B_qYjml8.js} +1 -1
- package/dist/plugin-sdk/{channel-access-af8dWWRv.js → channel-access-cxCK2mci.js} +1 -1
- package/dist/plugin-sdk/{channel-adapters.discord-IOZP8Cv5.js → channel-adapters.discord-BS4S4Svh.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +3 -3
- package/dist/plugin-sdk/channel-plugin-common.js +5 -5
- package/dist/plugin-sdk/{chunk-CD76Byie.js → chunk-CF8nvZNj.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-Bu19zrYH.js → chunk-items-yLFoO571.js} +1 -1
- package/dist/plugin-sdk/command-status.d.ts +2 -2
- package/dist/plugin-sdk/command-status.js +44 -48
- package/dist/plugin-sdk/{commands-registry-DgS55tNj.js → commands-registry-CK4KmMG0.js} +2 -2
- package/dist/plugin-sdk/{common-CWvfeiX0.js → common-Cky4hpqr.js} +1 -1
- package/dist/plugin-sdk/{config-CYDETqcF.js → config-Dbxj_jUP.js} +1153 -17
- package/dist/plugin-sdk/{config-schema-CQ4EVcQG.js → config-schema-aKPMn6ML.js} +96084 -81132
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/device-pair.js +2 -3
- package/dist/plugin-sdk/{diagnostic-Dfn1iERm.js → diagnostic-DLL_zekv.js} +3 -3
- package/dist/plugin-sdk/{directory-live-DatqU-eS.js → directory-live-CSuYxdwk.js} +1 -1
- package/dist/plugin-sdk/{directory-live-ClwN5KKq.js → directory-live-Dw7ZgC9_.js} +1 -1
- package/dist/plugin-sdk/discord.d.ts +6 -6
- package/dist/plugin-sdk/discord.js +32 -33
- package/dist/plugin-sdk/{draft-stream-controls-D4Tb_iS_.js → draft-stream-controls-BqchW1vi.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-BuYrl6q2.js → fetch-guard-CeG6u6ld.js} +1 -1
- package/dist/plugin-sdk/{filesystem-manager-B9DDPgfU.js → filesystem-manager-ZoHU8oA7.js} +3 -3
- package/dist/plugin-sdk/{fs-safe-BG-VzVkL.js → fs-safe-g4g7GT02.js} +2 -2
- package/dist/plugin-sdk/{group-mentions-BxDgHCgj.d.ts → group-mentions-BHRff6j8.d.ts} +1 -1
- package/dist/plugin-sdk/{guilds-BeT3iHHJ.js → guilds-CDhRIX57.js} +1 -1
- package/dist/plugin-sdk/{handle-action-B75UVKxF.js → handle-action-BSNDD2Vc.js} +25 -26
- package/dist/plugin-sdk/{helpers-BuEwju6y.js → helpers-CDo2XBSr.js} +1 -1
- package/dist/plugin-sdk/{image-ops-C66HPeAZ.js → image-ops-DbeBxbn4.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +18 -18
- package/dist/plugin-sdk/index.js +48 -52
- package/dist/plugin-sdk/{login-Amr2DpKU.js → login-CWXvFTd8.js} +3 -3
- package/dist/plugin-sdk/{login-qr-DMQNEi9m.js → login-qr-CJB2zjmM.js} +4 -4
- package/dist/plugin-sdk/{manager-Bvpq49BI.js → manager-CbiFFLKS.js} +8 -8
- package/dist/plugin-sdk/{markdown-tables-DmQ7oXOm.js → markdown-tables-Bskt9r8i.js} +1 -1
- package/dist/plugin-sdk/{media-ByLQbEwJ.js → media-B3aAg5rh.js} +5 -5
- package/dist/plugin-sdk/{memory-search-C3C0bD2H.js → memory-search-DTjIMw8J.js} +1 -1
- package/dist/plugin-sdk/{monitor-K_u6daGa.js → monitor-BJs6z7AT.js} +52 -56
- package/dist/plugin-sdk/{monitor-S_7LrvSj.js → monitor-BYGbTI5V.js} +62 -66
- package/dist/plugin-sdk/{openresponses-http-BrDJUZXR.js → openresponses-http-BGCl2dS2.js} +44 -48
- package/dist/plugin-sdk/{optional-runtime-dependency-CbYjAC2b.js → optional-runtime-dependency-BlTVkcAg.js} +1 -1
- package/dist/plugin-sdk/{outbound-BuDafBBI.js → outbound-CIemga5_.js} +9 -9
- package/dist/plugin-sdk/{outbound-attachment-DmZmUqFP.js → outbound-attachment-2RckWqrk.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-D0-UWGFJ.d.ts → pairing-message-C403mq4K.d.ts} +2 -2
- package/dist/plugin-sdk/{pairing-message-e4D4eBDA.js → pairing-message-r-VQfhFB.js} +1 -1
- package/dist/plugin-sdk/{pairing-store-T3IGoGZg.js → pairing-store-uPnLfGgB.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-Dg3gU-MA.js → path-alias-guards-DjgDArrp.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-DvAG_Png.js → pi-model-discovery-BpEilAym.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-NjkUgjIf.js → pi-model-discovery-runtime-DwNdFaz-.js} +3 -3
- package/dist/plugin-sdk/{probe-Dlk0Jxpw.js → probe-BFroeK3g.js} +1 -1
- package/dist/plugin-sdk/{probe-Cyb-DGA3.js → probe-CJb5uR8B.js} +2 -2
- package/dist/plugin-sdk/{probe-D8JAILir.js → probe-l_whvGLY.js} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +2 -2
- package/dist/plugin-sdk/{pw-ai-D7eW43DL.js → pw-ai-H7UgunQQ.js} +7 -9
- package/dist/plugin-sdk/{qmd-manager-DCUE21Kj.js → qmd-manager-DSyx77KY.js} +4 -4
- package/dist/plugin-sdk/{query-expansion-Zr9qQixm.js → query-expansion-CAI2kKLQ.js} +1 -1
- package/dist/plugin-sdk/{replies-BMIPmEoP.js → replies-CKMwkH4G.js} +4 -4
- package/dist/plugin-sdk/{reply-prefix-Bqzm6DC1.js → reply-prefix-CeVw7Mn2.js} +1 -1
- package/dist/plugin-sdk/{resolve-channels-ChWKWtA9.js → resolve-channels-87LZrFk_.js} +2 -2
- package/dist/plugin-sdk/{resolve-channels-zEnvugag.js → resolve-channels-_-nV-EK2.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-CXCqUUPV.js → resolve-outbound-target-B68fSoGi.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-DJN-SUSt.js → resolve-route-B8fOfihG.js} +2 -2
- package/dist/plugin-sdk/{resolve-users-BTvjQuui.js → resolve-users-DN9VQBwv.js} +1 -1
- package/dist/plugin-sdk/{resolve-users-CTzoruIZ.js → resolve-users-V6dHh_2B.js} +2 -2
- package/dist/plugin-sdk/{retry-policy-CY1qY6d7.js → retry-policy-B6GQldxB.js} +1 -1
- package/dist/plugin-sdk/{runtime-dependency-DvdRNMvs.js → runtime-dependency-DlqVSsSs.js} +124 -16
- package/dist/plugin-sdk/{runtime-CgOkQe0w.js → runtime-nVJl3PlS.js} +4 -4
- package/dist/plugin-sdk/{sandbox-paths-lj7_EVuA.js → sandbox-paths-Dx2lUqCu.js} +2 -2
- package/dist/plugin-sdk/sat-runtime.d.ts +3 -3
- package/dist/plugin-sdk/sat-runtime.js +45 -11
- package/dist/plugin-sdk/{send-2ITqny2W.js → send-BCJ4hi3t.js} +10 -10
- package/dist/plugin-sdk/{send-Cr-dj6S-.js → send-BHokB4TR.js} +6 -6
- package/dist/plugin-sdk/{send-BAz22RZr.js → send-CPK_HlYW.js} +9 -9
- package/dist/plugin-sdk/{send-eTxqFFsw.js → send-D3DQOg2a.js} +8 -8
- package/dist/plugin-sdk/{send-BG3RWyil.js → send-hSu1HWms.js} +13 -13
- package/dist/plugin-sdk/{session-C8nJmmVE.js → session-DQ4Dr-mf.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-Rm5by9S8.js → skill-commands-CmdoKLh_.js} +103 -103
- package/dist/plugin-sdk/{slack-xvIVvyEM.js → slack-B70NHpMF.js} +65 -69
- package/dist/plugin-sdk/{slack-actions-BNIALJTA.js → slack-actions-fSmP981b.js} +21 -22
- package/dist/plugin-sdk/slack.d.ts +6 -6
- package/dist/plugin-sdk/slack.js +14 -14
- package/dist/plugin-sdk/{ssrf-BZG8Ztod.js → ssrf-fG4UHKBw.js} +180 -2
- package/dist/plugin-sdk/{sticker-cache-D3oDiu2u.js → sticker-cache-B4dG2sKU.js} +3 -3
- package/dist/plugin-sdk/{tables-DS5L7lCA.js → tables-EX4Hy-a-.js} +2 -2
- package/dist/plugin-sdk/{device-pairing-D2Yq-_U6.js → tailscale-status-DwpNdO3Z.js} +104 -2
- package/dist/plugin-sdk/{targets-D6lUomJc.js → targets-BeGUCGWK.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-MSFkDn0m.js → telegram-actions-CM8SJgc9.js} +49 -53
- package/dist/plugin-sdk/telegram.d.ts +6 -6
- package/dist/plugin-sdk/telegram.js +12 -12
- package/dist/plugin-sdk/{thread-bindings.lifecycle-Ry6Vcgw3.js → thread-bindings.lifecycle-tHK_1mvp.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-C0stmvNk.js → thread-bindings.state-D7xG1GHu.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-D91GExk4.d.ts → tmp-fased-dir-Ouj58axY.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DVTIpopt.d.ts → types-B4hj6HgR.d.ts} +2 -2
- package/dist/plugin-sdk/{types-BzadOItY.d.ts → types-DyhXnYUr.d.ts} +1 -1
- package/dist/plugin-sdk/{types-DKvBJHfH.d.ts → types-dWZFX1fk.d.ts} +28 -3
- package/dist/plugin-sdk/{types.plugin-BiHPaDTF.d.ts → types.plugin-_fbu40Re.d.ts} +7 -5
- package/dist/plugin-sdk/{web-DRNJxHXA.js → web-BFolfZ3i.js} +53 -57
- package/dist/plugin-sdk/{whatsapp-actions-BDXZF2R5.js → whatsapp-actions-CYmleHCz.js} +19 -20
- package/dist/plugin-sdk/{whatsapp-heartbeat-CKgmwCGr.js → whatsapp-heartbeat-BEwm4GK3.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +11 -11
- package/dist/plugin-sdk/whatsapp.js +15 -15
- package/dist/plugin-sdk/{wsl-Biw7Mj39.js → wsl-BtMDzMv5.js} +53 -53
- package/dist/plugin-sdk/{zod-schema.providers-core-CIzCjXH9.d.ts → zod-schema.providers-core-FaYR6KdD.d.ts} +61 -61
- package/dist/plugins/lifecycle.js +1 -1
- package/dist/plugins/manifest-registry.js +26 -0
- package/dist/plugins/manifest.js +2 -0
- package/dist/plugins/marketplace.js +1 -1
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins/update.js +1 -1
- package/dist/providers/github-copilot-model-discovery.js +51 -0
- package/dist/providers/openai-codex-model-discovery.js +176 -0
- package/dist/providers/refresh.js +116 -34
- package/dist/providers/registry.js +2 -2
- package/dist/providers/runtime-model-catalog.js +97 -28
- package/dist/shared/model-thinking.js +13 -2
- package/dist/telegram/bot-message-context.js +1 -1
- package/dist/wizard/onboarding.finalize.js +1 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +2 -1
- package/dist/control-ui/assets/chat-model-ref-BZFblCeY.js +0 -2
- package/dist/plugin-sdk/ip-C70a-YlD.js +0 -181
- package/dist/plugin-sdk/tailscale-status-ClsquRGs.js +0 -104
- package/dist/plugin-sdk/wallet-status-f0HagNeO.js +0 -11947
- package/dist/plugin-sdk/ws-CocpWGhl.js +0 -114
- /package/dist/plugin-sdk/{blocks-input-Dcitfh7h.js → blocks-input-Bg-8S2pl.js} +0 -0
- /package/dist/plugin-sdk/{channel-activity-Cg1xRoc2.js → channel-activity-DBDMQ3yI.js} +0 -0
- /package/dist/plugin-sdk/{channel-core-BOkyXXLa.js → channel-core-CFRs8LPy.js} +0 -0
- /package/dist/plugin-sdk/{client-D2N7hqVu.js → client-pI228AVT.js} +0 -0
- /package/dist/plugin-sdk/{command-poll-backoff-NAePk3eL.js → command-poll-backoff-yJU83wEq.js} +0 -0
- /package/dist/plugin-sdk/{date-time-CE3Uer3C.js → date-time-uUevHscU.js} +0 -0
- /package/dist/plugin-sdk/{diagnostic-session-state-HO94DMou.js → diagnostic-session-state-DqgfGYqZ.js} +0 -0
- /package/dist/plugin-sdk/{draft-stream-loop-CKyHn8IX.js → draft-stream-loop-CrOPfV3F.js} +0 -0
- /package/dist/plugin-sdk/{fetch-Cu-ahkie.js → fetch-BtmoPIlf.js} +0 -0
- /package/dist/plugin-sdk/{gateway-registry-DFsoY6C0.js → gateway-registry-DZDsqicG.js} +0 -0
- /package/dist/plugin-sdk/{inbound-context-BFnIdcqI.js → inbound-context-DrAcXE0y.js} +0 -0
- /package/dist/plugin-sdk/{internal-qo16nNU1.js → internal-CG_nHo-2.js} +0 -0
- /package/dist/plugin-sdk/{pairing-token-N_6Jbt1L.js → pairing-token-Cs3BRKc0.js} +0 -0
- /package/dist/plugin-sdk/{polls-DQrR-qT3.js → polls-DKQXVfJp.js} +0 -0
- /package/dist/plugin-sdk/{proxy-7xs_rsnV.js → proxy-DWpYcsvR.js} +0 -0
- /package/dist/plugin-sdk/{qmd-scope-D1sSG_Rx.js → qmd-scope-CdX34VCV.js} +0 -0
- /package/dist/plugin-sdk/{redact-identifier-Q3tkvxhm.js → redact-identifier-Lt7t3l7S.js} +0 -0
- /package/dist/plugin-sdk/{redact-sensitive-url-dPvnFFsK.js → redact-sensitive-url-g-ukZjwA.js} +0 -0
- /package/dist/plugin-sdk/{render-Bwu_WxwA.js → render-e7fENCYH.js} +0 -0
- /package/dist/plugin-sdk/{reply-reference-BkbK_DWT.js → reply-reference-Bqk-7HXE.js} +0 -0
- /package/dist/plugin-sdk/{secure-random-Bl-AVLVb.js → secure-random-BIkG-k4s.js} +0 -0
- /package/dist/plugin-sdk/{shared-clhhbWN3.js → shared-CBgp_GBw.js} +0 -0
- /package/dist/plugin-sdk/{target-errors-C_SVKoEv.js → target-errors-Ckufe179.js} +0 -0
- /package/dist/plugin-sdk/{targets-BDvvnlph.js → targets-CoMJ1ry1.js} +0 -0
- /package/dist/plugin-sdk/{tokens-BvtlOzVP.js → tokens-BbnqfVuu.js} +0 -0
- /package/dist/plugin-sdk/{tool-loop-detection-CWphm1k_.js → tool-loop-detection-Bp8bPJLs.js} +0 -0
- /package/dist/plugin-sdk/{ui-e020ouhJ.js → ui-Be8cLHIS.js} +0 -0
- /package/dist/plugin-sdk/{with-timeout-BYrRAYFV.js → with-timeout-ckWB8rTo.js} +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { log } from "./logger.js";
|
|
2
|
+
import { streamSimple } from "@mariozechner/pi-ai/compat";
|
|
3
|
+
|
|
4
|
+
//#region src/agents/pi-embedded-runner/openai-stream-wrappers.ts
|
|
5
|
+
const VALID_SERVICE_TIERS = new Set([
|
|
6
|
+
"default",
|
|
7
|
+
"auto",
|
|
8
|
+
"priority",
|
|
9
|
+
"standard_only"
|
|
10
|
+
]);
|
|
11
|
+
const VALID_TEXT_VERBOSITY = new Set([
|
|
12
|
+
"low",
|
|
13
|
+
"medium",
|
|
14
|
+
"high"
|
|
15
|
+
]);
|
|
16
|
+
function withPayloadPatch(baseStreamFn, patch) {
|
|
17
|
+
const underlying = baseStreamFn ?? streamSimple;
|
|
18
|
+
return (model, context, options) => underlying(model, context, {
|
|
19
|
+
...options,
|
|
20
|
+
onPayload: (payload) => {
|
|
21
|
+
if (payload && typeof payload === "object") {
|
|
22
|
+
patch(payload, model);
|
|
23
|
+
}
|
|
24
|
+
return options?.onPayload?.(payload);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function readParam(extraParams, keys) {
|
|
29
|
+
if (!extraParams) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
for (const key of keys) {
|
|
33
|
+
if (Object.hasOwn(extraParams, key)) {
|
|
34
|
+
return extraParams[key];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
function isDirectOpenAI(model) {
|
|
40
|
+
if (typeof model.baseUrl !== "string") {
|
|
41
|
+
return model.baseUrl === undefined && model.provider === "openai";
|
|
42
|
+
}
|
|
43
|
+
if (!model.baseUrl.trim()) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
return new URL(model.baseUrl).hostname === "api.openai.com";
|
|
48
|
+
} catch {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function isDirectAzureOpenAI(model) {
|
|
53
|
+
if (typeof model.baseUrl !== "string" || !model.baseUrl.trim()) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
return new URL(model.baseUrl).hostname.endsWith(".openai.azure.com");
|
|
58
|
+
} catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function isOpenAIResponsesApi(model) {
|
|
63
|
+
return model.api === "openai-responses" || model.api === "azure-openai-responses";
|
|
64
|
+
}
|
|
65
|
+
function isCodexResponsesApi(model) {
|
|
66
|
+
return model.api === "openai-codex-responses";
|
|
67
|
+
}
|
|
68
|
+
function supportsStore(model) {
|
|
69
|
+
const compat = model.compat;
|
|
70
|
+
return !(compat && typeof compat === "object" && compat.supportsStore === false);
|
|
71
|
+
}
|
|
72
|
+
function directResponsesRoute(model) {
|
|
73
|
+
return model.api === "openai-responses" && (isDirectOpenAI(model) || isDirectAzureOpenAI(model)) || model.api === "azure-openai-responses" && isDirectAzureOpenAI(model);
|
|
74
|
+
}
|
|
75
|
+
function serviceTierRoute(model) {
|
|
76
|
+
return isCodexResponsesApi(model) || model.api === "openai-responses" && model.provider === "openai" && isDirectOpenAI(model);
|
|
77
|
+
}
|
|
78
|
+
function resolveOpenAIFastMode(extraParams) {
|
|
79
|
+
return typeof extraParams?.fastMode === "boolean" ? extraParams.fastMode : undefined;
|
|
80
|
+
}
|
|
81
|
+
function formatExtraParamValue(value) {
|
|
82
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
83
|
+
return String(value);
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
return JSON.stringify(value) ?? typeof value;
|
|
87
|
+
} catch {
|
|
88
|
+
return Object.prototype.toString.call(value);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function resolveOpenAIServiceTier(extraParams) {
|
|
92
|
+
const value = readParam(extraParams, ["serviceTier", "service_tier"]);
|
|
93
|
+
if (value === undefined || value === null) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
if (typeof value === "string" && VALID_SERVICE_TIERS.has(value)) {
|
|
97
|
+
return value;
|
|
98
|
+
}
|
|
99
|
+
log.warn(`ignoring invalid OpenAI service tier param: ${formatExtraParamValue(value)}`);
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
function resolveOpenAITextVerbosity(extraParams) {
|
|
103
|
+
const value = readParam(extraParams, ["textVerbosity", "text_verbosity"]);
|
|
104
|
+
if (value === undefined || value === null) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "string" && VALID_TEXT_VERBOSITY.has(value)) {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
log.warn(`ignoring invalid OpenAI text verbosity param: ${formatExtraParamValue(value)}`);
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
function createOpenAIDefaultTransportWrapper(baseStreamFn) {
|
|
114
|
+
const underlying = baseStreamFn ?? streamSimple;
|
|
115
|
+
return (model, context, options) => underlying(model, context, {
|
|
116
|
+
...options,
|
|
117
|
+
transport: options?.transport ?? "auto",
|
|
118
|
+
openaiWsWarmup: options?.openaiWsWarmup ?? true
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function createOpenAIAttributionHeadersWrapper(baseStreamFn) {
|
|
122
|
+
return baseStreamFn ?? streamSimple;
|
|
123
|
+
}
|
|
124
|
+
function createOpenAIServiceTierWrapper(baseStreamFn, serviceTier) {
|
|
125
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
126
|
+
if (!serviceTierRoute(model)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (!("service_tier" in payload)) {
|
|
130
|
+
payload.service_tier = serviceTier;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function createOpenAIFastModeWrapper(baseStreamFn) {
|
|
135
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
136
|
+
if (!serviceTierRoute(model)) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (!("service_tier" in payload)) {
|
|
140
|
+
payload.service_tier = "priority";
|
|
141
|
+
}
|
|
142
|
+
const text = payload.text;
|
|
143
|
+
if (!text || typeof text !== "object" || !("verbosity" in text)) {
|
|
144
|
+
payload.text = {
|
|
145
|
+
...text && typeof text === "object" ? text : {},
|
|
146
|
+
verbosity: "low"
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function createOpenAITextVerbosityWrapper(baseStreamFn, textVerbosity) {
|
|
152
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
153
|
+
if (!directResponsesRoute(model) && !isCodexResponsesApi(model)) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const text = payload.text;
|
|
157
|
+
if (!isCodexResponsesApi(model) && text && typeof text === "object" && "verbosity" in text) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
payload.text = {
|
|
161
|
+
...text && typeof text === "object" ? text : {},
|
|
162
|
+
verbosity: textVerbosity
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function createOpenAIReasoningCompatibilityWrapper(baseStreamFn) {
|
|
167
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
168
|
+
if (isOpenAIResponsesApi(model) && !directResponsesRoute(model)) {
|
|
169
|
+
delete payload.reasoning;
|
|
170
|
+
delete payload.reasoningEffort;
|
|
171
|
+
delete payload.reasoning_effort;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function createCodexNativeWebSearchWrapper(baseStreamFn, params) {
|
|
176
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
177
|
+
const config = params.config;
|
|
178
|
+
if (!isCodexResponsesApi(model) || config?.tools?.web?.search?.enabled !== true || config.tools.web.search.openaiCodex?.enabled !== true) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const existing = Array.isArray(payload.tools) ? payload.tools : [];
|
|
182
|
+
if (existing.some((tool) => tool && typeof tool === "object" && tool.type === "web_search")) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
payload.tools = [...existing, {
|
|
186
|
+
type: "web_search",
|
|
187
|
+
external_web_access: true,
|
|
188
|
+
filters: { allowed_domains: ["example.com"] }
|
|
189
|
+
}];
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function createOpenAIResponsesContextManagementWrapper(baseStreamFn, extraParams) {
|
|
193
|
+
return withPayloadPatch(baseStreamFn, (payload, model) => {
|
|
194
|
+
if (!supportsStore(model)) {
|
|
195
|
+
delete payload.store;
|
|
196
|
+
} else if (directResponsesRoute(model) && model.api === "openai-responses") {
|
|
197
|
+
payload.store = true;
|
|
198
|
+
}
|
|
199
|
+
if (isCodexResponsesApi(model)) {
|
|
200
|
+
payload.store = false;
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (isOpenAIResponsesApi(model) && !directResponsesRoute(model)) {
|
|
204
|
+
delete payload.prompt_cache_key;
|
|
205
|
+
delete payload.prompt_cache_retention;
|
|
206
|
+
}
|
|
207
|
+
const compactionParam = readParam(extraParams, ["responsesServerCompaction", "responses_server_compaction"]);
|
|
208
|
+
const shouldCompact = compactionParam === true || compactionParam !== false && model.api === "openai-responses" && isDirectOpenAI(model);
|
|
209
|
+
if (shouldCompact && !("context_management" in payload) && supportsStore(model) && isOpenAIResponsesApi(model)) {
|
|
210
|
+
const configuredThreshold = readParam(extraParams, ["responsesCompactThreshold", "responses_compact_threshold"]);
|
|
211
|
+
const threshold = typeof configuredThreshold === "number" ? configuredThreshold : typeof model.contextWindow === "number" ? Math.trunc(model.contextWindow * .7) : 8e4;
|
|
212
|
+
payload.context_management = [{
|
|
213
|
+
type: "compaction",
|
|
214
|
+
compact_threshold: threshold
|
|
215
|
+
}];
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
//#endregion
|
|
221
|
+
export { createOpenAIResponsesContextManagementWrapper };
|
|
@@ -19,6 +19,7 @@ import { resolveSignalReactionLevel } from "../../../signal/reaction-level.js";
|
|
|
19
19
|
import { resolveTelegramInlineButtonsScope } from "../../../telegram/inline-buttons.js";
|
|
20
20
|
import { resolveTelegramReactionLevel } from "../../../telegram/reaction-level.js";
|
|
21
21
|
import { MAX_IMAGE_BYTES } from "../../../media/constants.js";
|
|
22
|
+
import { resolveImageSanitizationLimits } from "../../image-sanitization.js";
|
|
22
23
|
import { buildModelAliasLines } from "../../model-alias-lines.js";
|
|
23
24
|
import "../model.js";
|
|
24
25
|
import { buildTtsSystemPromptHint } from "../../../tts/tts.js";
|
|
@@ -27,7 +28,6 @@ import { makeBootstrapWarn, resolveBootstrapContextForRun } from "../../bootstra
|
|
|
27
28
|
import { listChannelSupportedActions, resolveChannelMessageToolHints } from "../../channel-tools.js";
|
|
28
29
|
import { resolveFasedAgentDocsPath } from "../../docs-path.js";
|
|
29
30
|
import { createPreparedEmbeddedPiSettingsManager } from "../../pi-project-settings.js";
|
|
30
|
-
import { resolveImageSanitizationLimits } from "../../image-sanitization.js";
|
|
31
31
|
import { detectRuntimeShell } from "../../shell-utils.js";
|
|
32
32
|
import { isTimeoutError } from "../../failover-error.js";
|
|
33
33
|
import { resolveSandboxRuntimeStatus } from "../../sandbox/runtime-status.js";
|
|
@@ -293,7 +293,9 @@ async function runEmbeddedAttempt(params) {
|
|
|
293
293
|
sessionAgentId
|
|
294
294
|
});
|
|
295
295
|
const modelHasVision = params.model.input?.includes("image") ?? false;
|
|
296
|
-
|
|
296
|
+
const responsesLite = params.model.api === "openai-codex-responses" && params.model.compat?.responsesLite === true;
|
|
297
|
+
const toolsDisabled = params.disableTools === true || responsesLite;
|
|
298
|
+
let toolsRaw = toolsDisabled ? [] : createFasedAgentCodingTools({
|
|
297
299
|
agentId: sessionAgentId,
|
|
298
300
|
exec: {
|
|
299
301
|
...params.execOverrides,
|
|
@@ -332,7 +334,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
332
334
|
disableMessageTool: params.disableMessageTool,
|
|
333
335
|
disabledToolNames: params.disabledToolNames
|
|
334
336
|
});
|
|
335
|
-
if (!
|
|
337
|
+
if (!toolsDisabled) {
|
|
336
338
|
bundleMcpRuntime = await createBundleMcpToolRuntime({
|
|
337
339
|
workspaceDir: effectiveWorkspace,
|
|
338
340
|
cfg: params.config,
|
|
@@ -621,7 +623,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
621
623
|
modelApi: params.model.api,
|
|
622
624
|
workspaceDir: params.workspaceDir
|
|
623
625
|
});
|
|
624
|
-
applyExtraParamsToAgent(activeSession.agent, params.config, params.provider, params.modelId, params.streamParams, params.thinkLevel, sessionAgentId);
|
|
626
|
+
applyExtraParamsToAgent(activeSession.agent, params.config, params.provider, params.modelId, params.streamParams, params.thinkLevel, sessionAgentId, agentDir, params.model, params.resolvedApiKey);
|
|
625
627
|
if (cacheTrace) {
|
|
626
628
|
cacheTrace.recordStage("session:loaded", {
|
|
627
629
|
messages: activeSession.messages,
|
|
@@ -13,7 +13,7 @@ import { isMarkdownCapableMessageChannel } from "../../utils/message-channel.js"
|
|
|
13
13
|
import { generateSecureToken } from "../../infra/secure-random.js";
|
|
14
14
|
import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";
|
|
15
15
|
import { enqueueCommandInLane } from "../../process/command-queue.js";
|
|
16
|
-
import {
|
|
16
|
+
import { resolveModelForExecution } from "./model.js";
|
|
17
17
|
import { FailoverError, resolveFailoverStatus } from "../failover-error.js";
|
|
18
18
|
import { derivePromptTokens, normalizeUsage } from "../usage.js";
|
|
19
19
|
import { log } from "./logger.js";
|
|
@@ -205,7 +205,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
205
205
|
modelId = modelResolveOverride.modelOverride;
|
|
206
206
|
log.info(`[hooks] model overridden to ${modelId}`);
|
|
207
207
|
}
|
|
208
|
-
const { model, error, authStorage, modelRegistry } =
|
|
208
|
+
const { model, error, authStorage, modelRegistry } = await resolveModelForExecution(provider, modelId, agentDir, params.config);
|
|
209
209
|
if (!model) {
|
|
210
210
|
throw new FailoverError(error ?? `Unknown model: ${provider}/${modelId}`, {
|
|
211
211
|
reason: "model_not_found",
|
|
@@ -260,6 +260,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
260
260
|
let thinkLevel = initialThinkLevel;
|
|
261
261
|
const attemptedThinking = new Set();
|
|
262
262
|
let apiKeyInfo = null;
|
|
263
|
+
let resolvedApiKey;
|
|
263
264
|
let lastProfileId;
|
|
264
265
|
const resolveAuthProfileFailoverReason = (params) => {
|
|
265
266
|
if (params.allInCooldown) {
|
|
@@ -308,6 +309,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
308
309
|
if (!apiKeyInfo.apiKey) {
|
|
309
310
|
throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
310
311
|
}
|
|
312
|
+
resolvedApiKey = apiKeyInfo.apiKey;
|
|
311
313
|
if (model.provider === "github-copilot") {
|
|
312
314
|
const { resolveCopilotApiToken } = await import("../../providers/github-copilot-token.js");
|
|
313
315
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
@@ -462,6 +464,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
462
464
|
provider,
|
|
463
465
|
modelId,
|
|
464
466
|
model,
|
|
467
|
+
resolvedApiKey,
|
|
465
468
|
authStorage,
|
|
466
469
|
modelRegistry,
|
|
467
470
|
agentId: workspaceResolution.agentId,
|
|
@@ -5,7 +5,7 @@ import { buildEmbeddedSandboxInfo } from "./pi-embedded-runner/sandbox-info.js";
|
|
|
5
5
|
import { createSystemPromptOverride } from "./pi-embedded-runner/system-prompt.js";
|
|
6
6
|
import { splitSdkTools } from "./pi-embedded-runner/tool-split.js";
|
|
7
7
|
import { compactEmbeddedPiSession } from "./pi-embedded-runner/compact.js";
|
|
8
|
-
import { applyExtraParamsToAgent
|
|
8
|
+
import { applyExtraParamsToAgent } from "./pi-embedded-runner/extra-params.js";
|
|
9
9
|
import { abortEmbeddedPiRun, isEmbeddedPiRunActive, isEmbeddedPiRunStreaming, queueEmbeddedPiMessage, waitForEmbeddedPiRunEnd } from "./pi-embedded-runner/runs.js";
|
|
10
10
|
import { runEmbeddedPiAgent } from "./pi-embedded-runner/run.js";
|
|
11
11
|
|
package/dist/agents/pi-tools.js
CHANGED
|
@@ -5,10 +5,10 @@ import { resolveAgentConfig } from "./agent-scope.js";
|
|
|
5
5
|
import { resolveGatewayMessageChannel } from "../utils/message-channel.js";
|
|
6
6
|
import { resolveToolProfilePolicy } from "./tool-policy-shared.js";
|
|
7
7
|
import { applyOwnerOnlyToolPolicy, collectExplicitAllowlist, mergeAlsoAllowPolicy } from "./tool-policy.js";
|
|
8
|
-
import { listChannelAgentTools } from "./channel-tools.js";
|
|
9
|
-
import { resolveMergedSafeBinProfileFixtures } from "../infra/exec-safe-bin-runtime-policy.js";
|
|
10
8
|
import { resolveImageSanitizationLimits } from "./image-sanitization.js";
|
|
11
9
|
import { getSubagentDepthFromSessionStore } from "./subagent-depth.js";
|
|
10
|
+
import { listChannelAgentTools } from "./channel-tools.js";
|
|
11
|
+
import { resolveMergedSafeBinProfileFixtures } from "../infra/exec-safe-bin-runtime-policy.js";
|
|
12
12
|
import { getPluginToolMeta } from "../plugins/tools.js";
|
|
13
13
|
import { createApplyPatchTool } from "./apply-patch.js";
|
|
14
14
|
import { createExecTool } from "./bash-tools.exec.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { withNormalizedTimestamp } from "../date-time.js";
|
|
2
1
|
import { jsonResult, readReactionParams, readStringArrayParam, readStringParam } from "./common.js";
|
|
2
|
+
import { withNormalizedTimestamp } from "../date-time.js";
|
|
3
3
|
import { assertMediaNotDataUrl } from "../sandbox-paths.js";
|
|
4
4
|
import { resolveDiscordChannelId } from "../../discord/targets.js";
|
|
5
5
|
import { fetchChannelPermissionsDiscord } from "../../discord/send.permissions.js";
|
|
@@ -8,11 +8,11 @@ import { normalizeMessageChannel } from "../../utils/message-channel.js";
|
|
|
8
8
|
import { stripReasoningTagsFromText } from "../../shared/text/reasoning-tags.js";
|
|
9
9
|
import { CHANNEL_MESSAGE_ACTION_NAMES } from "../../channels/plugins/message-action-names.js";
|
|
10
10
|
import { BLUEBUBBLES_GROUP_ACTIONS } from "../../channels/plugins/bluebubbles-actions.js";
|
|
11
|
-
import { listChannelSupportedActions } from "../channel-tools.js";
|
|
12
11
|
import { jsonResult, readNumberParam, readStringParam } from "./common.js";
|
|
13
12
|
import { normalizeTargetForProvider } from "../../infra/outbound/target-normalization.js";
|
|
14
13
|
import { channelTargetSchema, channelTargetsSchema, stringEnum } from "../schema/typebox.js";
|
|
15
14
|
import { resolveGatewayOptions } from "./gateway.js";
|
|
15
|
+
import { listChannelSupportedActions } from "../channel-tools.js";
|
|
16
16
|
import { listChannelMessageActions, supportsChannelMessageButtons, supportsChannelMessageButtonsForChannel, supportsChannelMessageCards, supportsChannelMessageCardsForChannel } from "../../channels/plugins/message-actions.js";
|
|
17
17
|
import "../../channels/plugins/types.js";
|
|
18
18
|
import { getToolResult, runMessageAction } from "../../infra/outbound/message-action-runner.js";
|
|
@@ -9,7 +9,6 @@ import { resolveStorePath } from "../../config/sessions/paths.js";
|
|
|
9
9
|
import { loadSessionStore, updateSessionStore } from "../../config/sessions/store.js";
|
|
10
10
|
import "../../config/sessions.js";
|
|
11
11
|
import { loadCombinedSessionStoreForGateway } from "../../gateway/session-utils.js";
|
|
12
|
-
import { formatUserTime, resolveUserTimeFormat, resolveUserTimezone } from "../date-time.js";
|
|
13
12
|
import { readStringParam } from "./common.js";
|
|
14
13
|
import { resolveInternalSessionKey, resolveMainSessionAlias, shouldResolveSessionIdInput } from "./sessions-resolution.js";
|
|
15
14
|
import { createAgentToAgentPolicy } from "./sessions-access.js";
|
|
@@ -17,6 +16,9 @@ import "./sessions-helpers.js";
|
|
|
17
16
|
import { getFollowupQueueDepth } from "../../auto-reply/reply/queue/enqueue.js";
|
|
18
17
|
import { resolveQueueSettings } from "../../auto-reply/reply/queue/settings.js";
|
|
19
18
|
import "../../auto-reply/reply/queue.js";
|
|
19
|
+
import { formatUserTime, resolveUserTimeFormat, resolveUserTimezone } from "../date-time.js";
|
|
20
|
+
import { buildCredentialScopedAllowedModelSet } from "../model-catalog-access.js";
|
|
21
|
+
import { loadModelCatalog } from "../model-catalog.js";
|
|
20
22
|
import { normalizeGroupActivation } from "../../auto-reply/group-activation.js";
|
|
21
23
|
import { buildStatusMessage } from "../../auto-reply/status.js";
|
|
22
24
|
import { resolveUsageProviderId } from "../../infra/provider-usage.shared.js";
|
|
@@ -26,8 +28,6 @@ import "../../infra/provider-usage.js";
|
|
|
26
28
|
import { applyModelOverrideToSessionEntry } from "../../sessions/model-overrides.js";
|
|
27
29
|
import { buildTaskStatusSnapshotForRelatedSessionKeyForOwner } from "../../tasks/task-owner-access.js";
|
|
28
30
|
import { resolveModelAuthLabel } from "../model-auth-label.js";
|
|
29
|
-
import { buildCredentialScopedAllowedModelSet } from "../model-catalog-access.js";
|
|
30
|
-
import { loadModelCatalog } from "../model-catalog.js";
|
|
31
31
|
import { Type } from "@sinclair/typebox";
|
|
32
32
|
|
|
33
33
|
//#region src/agents/tools/session-status-tool.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveSlackAccount } from "../../slack/accounts.js";
|
|
2
2
|
import { parseSlackTarget, resolveSlackChannelId } from "../../slack/targets.js";
|
|
3
|
-
import { withNormalizedTimestamp } from "../date-time.js";
|
|
4
3
|
import { createActionGate, jsonResult, readNumberParam, readReactionParams, readStringParam } from "./common.js";
|
|
4
|
+
import { withNormalizedTimestamp } from "../date-time.js";
|
|
5
5
|
import { parseSlackBlocksInput } from "../../slack/blocks-input.js";
|
|
6
6
|
import { deleteSlackMessage, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage } from "../../slack/actions.js";
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { loadConfig } from "../../config/io.js";
|
|
2
2
|
import "../../config/config.js";
|
|
3
3
|
import { SILENT_REPLY_TOKEN } from "../../auto-reply/tokens.js";
|
|
4
|
-
import { textToSpeech } from "../../tts/tts.js";
|
|
5
4
|
import { readStringParam } from "./common.js";
|
|
5
|
+
import { textToSpeech } from "../../tts/tts.js";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
8
|
//#region src/agents/tools/tts-tool.ts
|
|
@@ -3,9 +3,9 @@ import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "../../agents/defaults.js";
|
|
|
3
3
|
import { ensureAuthProfileStore } from "../../agents/auth-profiles/store.js";
|
|
4
4
|
import "../../agents/auth-profiles.js";
|
|
5
5
|
import { buildModelAliasIndex, normalizeProviderId, resolveConfiguredModelRef, resolveModelRefFromString } from "../../agents/model-selection.js";
|
|
6
|
-
import { resolveModelAuthLabel } from "../../agents/model-auth-label.js";
|
|
7
6
|
import { buildCredentialScopedAllowedModelSet } from "../../agents/model-catalog-access.js";
|
|
8
7
|
import { loadModelCatalog } from "../../agents/model-catalog.js";
|
|
8
|
+
import { resolveModelAuthLabel } from "../../agents/model-auth-label.js";
|
|
9
9
|
import { buildModelsKeyboard, buildProviderKeyboard, calculateTotalPages, getModelsPageSize } from "../../telegram/model-buttons.js";
|
|
10
10
|
|
|
11
11
|
//#region src/auto-reply/reply/commands-models.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatThinkingLevels, formatXHighModelHint, supportsXHighThinking } from "../../shared/model-thinking.js";
|
|
1
|
+
import { formatThinkingLevels, formatXHighModelHint, supportsThinkingLevel, supportsXHighThinking } from "../../shared/model-thinking.js";
|
|
2
2
|
import "../thinking.js";
|
|
3
3
|
import { resolveAgentConfig, resolveAgentDir, resolveSessionAgentId } from "../../agents/agent-scope.js";
|
|
4
4
|
import { updateSessionStore } from "../../config/sessions/store.js";
|
|
@@ -148,6 +148,9 @@ async function handleDirectiveOnly(params) {
|
|
|
148
148
|
if (directives.hasThinkDirective && directives.thinkLevel === "xhigh" && !supportsXHighThinking(resolvedProvider, resolvedModel)) {
|
|
149
149
|
return { text: `Thinking level "xhigh" is only supported for ${formatXHighModelHint()}.` };
|
|
150
150
|
}
|
|
151
|
+
if (directives.hasThinkDirective && (directives.thinkLevel === "max" || directives.thinkLevel === "ultra") && !supportsThinkingLevel(resolvedProvider, resolvedModel, directives.thinkLevel)) {
|
|
152
|
+
return { text: `Thinking level "${directives.thinkLevel}" is not supported for ${resolvedProvider}/${resolvedModel}. Supported levels: ${formatThinkingLevels(resolvedProvider, resolvedModel)}.` };
|
|
153
|
+
}
|
|
151
154
|
const nextThinkLevel = directives.hasThinkDirective ? directives.thinkLevel : sessionEntry?.thinkingLevel ?? currentThinkLevel;
|
|
152
155
|
const shouldDowngradeXHigh = !directives.hasThinkDirective && nextThinkLevel === "xhigh" && !supportsXHighThinking(resolvedProvider, resolvedModel);
|
|
153
156
|
const prevElevatedLevel = currentElevatedLevel ?? sessionEntry.elevatedLevel ?? (elevatedAllowed ? "on" : "off");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { logVerbose } from "../../globals.js";
|
|
2
2
|
import { resolveAgentIdFromSessionKey } from "../../routing/session-key.js";
|
|
3
3
|
import { generateSecureUuid } from "../../infra/secure-random.js";
|
|
4
|
-
import { maybeApplyTtsToPayload, resolveTtsConfig } from "../../tts/tts.js";
|
|
5
4
|
import { isCommandEnabled, maybeResolveTextAlias, shouldHandleTextCommands } from "../commands-registry.js";
|
|
6
5
|
import { routeReply } from "./route-reply.js";
|
|
7
6
|
import { getSessionBindingService } from "../../infra/outbound/session-binding-service.js";
|
|
@@ -14,6 +13,7 @@ import { formatAcpRuntimeErrorText } from "../../acp/runtime/error-text.js";
|
|
|
14
13
|
import { resolveAcpThreadSessionDetailLines } from "../../acp/runtime/session-identifiers.js";
|
|
15
14
|
import { prefixSystemMessage } from "../../infra/system-message.js";
|
|
16
15
|
import { createAcpReplyProjector } from "./acp-projector.js";
|
|
16
|
+
import { maybeApplyTtsToPayload, resolveTtsConfig } from "../../tts/tts.js";
|
|
17
17
|
|
|
18
18
|
//#region src/auto-reply/reply/dispatch-acp.ts
|
|
19
19
|
function resolveFirstContextText(ctx, keys) {
|
|
@@ -8,7 +8,6 @@ import { INTERNAL_MESSAGE_CHANNEL } from "../../utils/message-channel.js";
|
|
|
8
8
|
import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";
|
|
9
9
|
import { isDiagnosticsEnabled } from "../../infra/diagnostic-events.js";
|
|
10
10
|
import { logMessageProcessed, logMessageQueued, logSessionStateChange } from "../../logging/diagnostic.js";
|
|
11
|
-
import { maybeApplyTtsToPayload, normalizeTtsAutoMode, resolveTtsConfig } from "../../tts/tts.js";
|
|
12
11
|
import { shouldSuppressReasoningPayload } from "./reply-payloads.js";
|
|
13
12
|
import { isRoutableChannel, routeReply } from "./route-reply.js";
|
|
14
13
|
import { formatAbortReplyText, tryFastAbortFromMessage } from "./abort.js";
|
|
@@ -17,6 +16,7 @@ import { updateLatestChannelTaskDelivery } from "../../tasks/channel-task-ledger
|
|
|
17
16
|
import { shouldBypassAcpDispatchForCommand, tryDispatchAcpReply } from "./dispatch-acp.js";
|
|
18
17
|
import { shouldSkipDuplicateInbound } from "./inbound-dedupe.js";
|
|
19
18
|
import { resolveRunTypingPolicy } from "./typing-policy.js";
|
|
19
|
+
import { maybeApplyTtsToPayload, normalizeTtsAutoMode, resolveTtsConfig } from "../../tts/tts.js";
|
|
20
20
|
import { getReplyFromConfig } from "./get-reply.js";
|
|
21
21
|
import "../reply.js";
|
|
22
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logVerbose } from "../../globals.js";
|
|
2
|
-
import { formatXHighModelHint, normalizeThinkLevel, supportsXHighThinking } from "../../shared/model-thinking.js";
|
|
2
|
+
import { formatThinkingLevels, formatXHighModelHint, normalizeThinkLevel, supportsThinkingLevel, supportsXHighThinking } from "../../shared/model-thinking.js";
|
|
3
3
|
import "../thinking.js";
|
|
4
4
|
import { normalizeMainKey } from "../../routing/session-key.js";
|
|
5
5
|
import { resolveGroupSessionKey } from "../../config/sessions/group.js";
|
|
@@ -8,13 +8,13 @@ import { updateSessionStore } from "../../config/sessions/store.js";
|
|
|
8
8
|
import "../../config/sessions.js";
|
|
9
9
|
import { SILENT_REPLY_TOKEN } from "../tokens.js";
|
|
10
10
|
import { clearCommandLane, getQueueSize } from "../../process/command-queue.js";
|
|
11
|
-
import { isReasoningTagProvider } from "../../utils/provider-utils.js";
|
|
12
11
|
import "../../agents/pi-embedded.js";
|
|
13
12
|
import { routeReply } from "./route-reply.js";
|
|
14
13
|
import { resolveQueueSettings } from "./queue/settings.js";
|
|
15
14
|
import "./queue.js";
|
|
16
15
|
import { hasControlCommand } from "../command-detection.js";
|
|
17
16
|
import { resolveRunTypingPolicy } from "./typing-policy.js";
|
|
17
|
+
import { isReasoningTagProvider } from "../../utils/provider-utils.js";
|
|
18
18
|
import { resolveEmbeddedSessionLane } from "../../agents/pi-embedded-runner/lanes.js";
|
|
19
19
|
import { abortEmbeddedPiRun, isEmbeddedPiRunActive, isEmbeddedPiRunStreaming } from "../../agents/pi-embedded-runner/runs.js";
|
|
20
20
|
import { resolveSessionAuthProfileOverride } from "../../agents/auth-profiles/session-override.js";
|
|
@@ -199,6 +199,24 @@ async function runPreparedReply(params) {
|
|
|
199
199
|
if (!resolvedThinkLevel) {
|
|
200
200
|
resolvedThinkLevel = await modelState.resolveDefaultThinkingLevel();
|
|
201
201
|
}
|
|
202
|
+
if ((resolvedThinkLevel === "max" || resolvedThinkLevel === "ultra") && !supportsThinkingLevel(provider, model, resolvedThinkLevel)) {
|
|
203
|
+
const explicitThink = directives.hasThinkDirective && directives.thinkLevel !== undefined;
|
|
204
|
+
if (explicitThink) {
|
|
205
|
+
typing.cleanup();
|
|
206
|
+
return { text: `Thinking level "${resolvedThinkLevel}" is not supported for ${provider}/${model}. Supported levels: ${formatThinkingLevels(provider, model)}.` };
|
|
207
|
+
}
|
|
208
|
+
resolvedThinkLevel = "high";
|
|
209
|
+
if (sessionEntry && sessionStore && sessionKey) {
|
|
210
|
+
sessionEntry.thinkingLevel = "high";
|
|
211
|
+
sessionEntry.updatedAt = Date.now();
|
|
212
|
+
sessionStore[sessionKey] = sessionEntry;
|
|
213
|
+
if (storePath) {
|
|
214
|
+
await updateSessionStore(storePath, (store) => {
|
|
215
|
+
store[sessionKey] = sessionEntry;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
202
220
|
if (resolvedThinkLevel === "xhigh" && !supportsXHighThinking(provider, model)) {
|
|
203
221
|
const explicitThink = directives.hasThinkDirective && directives.thinkLevel !== undefined;
|
|
204
222
|
if (explicitThink) {
|
|
@@ -7,9 +7,9 @@ import { buildAllowedModelSet, modelKey, normalizeProviderId, resolveModelRefFro
|
|
|
7
7
|
import { updateSessionStore } from "../../config/sessions/store.js";
|
|
8
8
|
import "../../config/sessions.js";
|
|
9
9
|
import { lookupContextTokens } from "../../agents/context.js";
|
|
10
|
-
import { applyModelOverrideToSessionEntry } from "../../sessions/model-overrides.js";
|
|
11
10
|
import { buildCredentialScopedAllowedModelSet } from "../../agents/model-catalog-access.js";
|
|
12
11
|
import { loadModelCatalog } from "../../agents/model-catalog.js";
|
|
12
|
+
import { applyModelOverrideToSessionEntry } from "../../sessions/model-overrides.js";
|
|
13
13
|
import { clearSessionAuthProfileOverride } from "../../agents/auth-profiles/session-override.js";
|
|
14
14
|
|
|
15
15
|
//#region src/auto-reply/reply/model-selection.ts
|
|
@@ -4,9 +4,9 @@ import "../../agents/auth-profiles.js";
|
|
|
4
4
|
import { modelKey, normalizeProviderId, resolveModelRefFromString } from "../../agents/model-selection.js";
|
|
5
5
|
import { updateSessionStore } from "../../config/sessions/store.js";
|
|
6
6
|
import "../../config/sessions.js";
|
|
7
|
-
import { applyModelOverrideToSessionEntry } from "../../sessions/model-overrides.js";
|
|
8
7
|
import { buildCredentialScopedAllowedModelSet } from "../../agents/model-catalog-access.js";
|
|
9
8
|
import { loadModelCatalog } from "../../agents/model-catalog.js";
|
|
9
|
+
import { applyModelOverrideToSessionEntry } from "../../sessions/model-overrides.js";
|
|
10
10
|
import { resolveModelDirectiveSelection } from "./model-selection.js";
|
|
11
11
|
|
|
12
12
|
//#region src/auto-reply/reply/session-reset-model.ts
|
|
@@ -9,10 +9,10 @@ import { resolveSessionFilePath, resolveSessionFilePathOptions } from "../config
|
|
|
9
9
|
import "../config/sessions.js";
|
|
10
10
|
import { resolveContextTokensForModel } from "../agents/context.js";
|
|
11
11
|
import { resolveChannelModelOverride } from "../channels/model-overrides.js";
|
|
12
|
-
import { getTtsMaxLength, getTtsProvider, isSummarizationEnabled, resolveTtsAutoMode, resolveTtsConfig, resolveTtsPrefsPath } from "../tts/tts.js";
|
|
13
12
|
import { isCommandFlagEnabled } from "../config/commands.js";
|
|
14
13
|
import { listChatCommands, listChatCommandsForConfig } from "./commands-registry.js";
|
|
15
14
|
import { formatTimeAgo } from "../infra/format-time/format-relative.js";
|
|
15
|
+
import { getTtsMaxLength, getTtsProvider, isSummarizationEnabled, resolveTtsAutoMode, resolveTtsConfig, resolveTtsPrefsPath } from "../tts/tts.js";
|
|
16
16
|
import { derivePromptTokens, normalizeUsage } from "../agents/usage.js";
|
|
17
17
|
import { resolveCommitHash } from "../infra/git-commit.js";
|
|
18
18
|
import { estimateUsageCost, formatTokenCount as formatTokenCount$1, formatUsd, resolveModelCostConfig } from "../utils/usage-format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatThinkingLevels, formatXHighModelHint, isBinaryThinkingProvider, listThinkingLevelLabels, listThinkingLevels, normalizeThinkLevel, supportsXHighThinking } from "../shared/model-thinking.js";
|
|
1
|
+
import { formatThinkingLevels, formatXHighModelHint, isBinaryThinkingProvider, listThinkingLevelLabels, listThinkingLevels, normalizeThinkLevel, supportsThinkingLevel, supportsXHighThinking } from "../shared/model-thinking.js";
|
|
2
2
|
|
|
3
3
|
//#region src/auto-reply/thinking.ts
|
|
4
4
|
function normalizeOnOffFullLevel(raw) {
|
package/dist/brand.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const FASED_BRAND_NAME = "Fased";
|
|
3
3
|
const FASED_AGENT_NAME = "Fased Agent";
|
|
4
4
|
const FASED_CONTROL_NAME = "Fased Control";
|
|
5
|
-
const FASED_PRODUCT_VERSION = "0.1.
|
|
5
|
+
const FASED_PRODUCT_VERSION = "0.1.57";
|
|
6
6
|
const FASED_DISPLAY_VERSION = `v${FASED_PRODUCT_VERSION}`;
|
|
7
7
|
function formatFasedDisplayLine() {
|
|
8
8
|
return `${FASED_AGENT_NAME} ${FASED_DISPLAY_VERSION}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isLoopbackHost } from "../gateway/net.js";
|
|
2
2
|
import { rawDataToString } from "../infra/ws.js";
|
|
3
3
|
import { getChromeExtensionRelayAuthHeaders } from "./extension-relay.js";
|
|
4
|
-
import WebSocket from "ws";
|
|
4
|
+
import WebSocket$1 from "ws";
|
|
5
5
|
|
|
6
6
|
//#region src/browser/cdp.helpers.ts
|
|
7
7
|
function getHeadersWithAuth(url, headers = {}) {
|
|
@@ -118,7 +118,7 @@ async function fetchOk(url, timeoutMs = 1500, init) {
|
|
|
118
118
|
async function withCdpSocket(wsUrl, fn, opts) {
|
|
119
119
|
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
120
120
|
const handshakeTimeoutMs = typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : 5e3;
|
|
121
|
-
const ws = new WebSocket(wsUrl, {
|
|
121
|
+
const ws = new WebSocket$1(wsUrl, {
|
|
122
122
|
handshakeTimeout: handshakeTimeoutMs,
|
|
123
123
|
...Object.keys(headers).length ? { headers } : {}
|
|
124
124
|
});
|
package/dist/browser/chrome.js
CHANGED
|
@@ -10,7 +10,7 @@ import fs from "node:fs";
|
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { spawn } from "node:child_process";
|
|
13
|
-
import WebSocket from "ws";
|
|
13
|
+
import WebSocket$1 from "ws";
|
|
14
14
|
|
|
15
15
|
//#region src/browser/chrome.ts
|
|
16
16
|
const log = createSubsystemLogger("browser").child("chrome");
|
|
@@ -68,7 +68,7 @@ async function getChromeWebSocketUrl(cdpUrl, timeoutMs = 500) {
|
|
|
68
68
|
async function canOpenWebSocket(wsUrl, timeoutMs = 800) {
|
|
69
69
|
return await new Promise((resolve) => {
|
|
70
70
|
const headers = getHeadersWithAuth(wsUrl);
|
|
71
|
-
const ws = new WebSocket(wsUrl, {
|
|
71
|
+
const ws = new WebSocket$1(wsUrl, {
|
|
72
72
|
handshakeTimeout: timeoutMs,
|
|
73
73
|
...Object.keys(headers).length ? { headers } : {}
|
|
74
74
|
});
|