@alwith/module-chat 0.5.27 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +15 -11
- package/assets/provider-catalog.json +2 -2
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-h6jkgcw1.js → chunk-05c7f7pa.js} +2 -2
- package/dist/{chunk-htjpckp6.js → chunk-0d5830mq.js} +3 -3
- package/dist/{chunk-shwnd0ta.js → chunk-0e4zew7m.js} +2 -2
- package/dist/{chunk-cpe2b276.js → chunk-0jz7wsbx.js} +2 -2
- package/dist/{chunk-75vtd3ww.js → chunk-0ms8k740.js} +2 -2
- package/dist/{chunk-s3h496tf.js → chunk-1rs9getz.js} +2 -2
- package/dist/chunk-1vmk34zf.js +2 -0
- package/dist/{chunk-7x1qnb20.js → chunk-1wh82w54.js} +2 -2
- package/dist/{chunk-6t5war9h.js → chunk-1z5htskd.js} +2 -2
- package/dist/{chunk-t2q8cxnh.js → chunk-2emf349g.js} +2 -2
- package/dist/{chunk-wc53vqaw.js → chunk-2g7k5pkt.js} +2 -2
- package/dist/{chunk-scxhc46w.js → chunk-3pvs8s3b.js} +2 -2
- package/dist/{chunk-wpn4rdwv.js → chunk-3sqxe0mw.js} +3 -3
- package/dist/{chunk-3jd4dkv4.js → chunk-3tbg92ns.js} +3 -3
- package/dist/{chunk-spfbykq8.js → chunk-4kevwekp.js} +2 -2
- package/dist/{chunk-qqqcqvrv.js → chunk-4s4e7zzx.js} +2 -2
- package/dist/{chunk-6e1bwjtk.js → chunk-50brsmjd.js} +2 -2
- package/dist/{chunk-kd87rt80.js → chunk-55gczv3j.js} +2 -2
- package/dist/{chunk-h2ewgw0x.js → chunk-5c5z2b48.js} +2 -2
- package/dist/{chunk-hcwgc3r7.js → chunk-5fj4ewez.js} +2 -2
- package/dist/{chunk-d0cb9bks.js → chunk-5p1fxq0k.js} +2 -2
- package/dist/{chunk-qxgmjjh2.js → chunk-5vh4z4yp.js} +2 -2
- package/dist/{chunk-z1aqmqgc.js → chunk-5wc30q2q.js} +2 -2
- package/dist/{chunk-fpmspg92.js → chunk-60z20w9q.js} +2 -2
- package/dist/{chunk-2twh547k.js → chunk-6883ebtb.js} +2 -2
- package/dist/chunk-69p0nqws.js +2 -0
- package/dist/{chunk-wcgwtn6h.js → chunk-6cbbnb7a.js} +2 -2
- package/dist/{chunk-2aw4d623.js → chunk-6h2ysmec.js} +2 -2
- package/dist/{chunk-7zryea1b.js → chunk-6r8jsyqk.js} +2 -2
- package/dist/{chunk-jan870w7.js → chunk-7491nfcw.js} +3 -3
- package/dist/chunk-758e6qf7.js +4 -0
- package/dist/{chunk-x2nemdjf.js → chunk-76a04a6j.js} +2 -2
- package/dist/{chunk-e2q5znh5.js → chunk-78qh8049.js} +2 -2
- package/dist/{chunk-tk2471ny.js → chunk-7962trd3.js} +2 -2
- package/dist/{chunk-v7rtfzg4.js → chunk-7g2fjbn8.js} +2 -2
- package/dist/{chunk-br9wsczn.js → chunk-887d80ps.js} +2 -2
- package/dist/{chunk-9x0qmswv.js → chunk-8ht645rn.js} +2 -2
- package/dist/{chunk-n368fh3r.js → chunk-8j39jdxr.js} +3 -3
- package/dist/{chunk-42atrgm1.js → chunk-8jxcdap5.js} +2 -2
- package/dist/{chunk-n66yy1m1.js → chunk-8mc330j2.js} +2 -2
- package/dist/{chunk-hsp0skqs.js → chunk-8nds14dw.js} +2 -2
- package/dist/{chunk-ggehtpkh.js → chunk-8qnrhq54.js} +2 -2
- package/dist/{chunk-4edeen4z.js → chunk-938k294j.js} +3 -3
- package/dist/{chunk-6vntcyv6.js → chunk-93d3a9wy.js} +2 -2
- package/dist/chunk-97yvajhc.js +2 -0
- package/dist/{chunk-k3e8wper.js → chunk-9cqfjpfk.js} +3 -3
- package/dist/chunk-9g0j2ptv.js +2 -0
- package/dist/chunk-9pgh7zjb.js +2 -0
- package/dist/{chunk-k2q7wjp6.js → chunk-9vm0y271.js} +2 -2
- package/dist/{chunk-5yzjwrat.js → chunk-9vxev5r7.js} +3 -3
- package/dist/{chunk-1sxf2rqx.js → chunk-9x48rd50.js} +2 -2
- package/dist/{chunk-az5ayr2d.js → chunk-a1snxcra.js} +2 -2
- package/dist/chunk-axyfaexd.js +2 -0
- package/dist/chunk-b4evrc3r.js +2 -0
- package/dist/{chunk-5ysapftt.js → chunk-cansmt47.js} +3 -3
- package/dist/{chunk-m9rgwr0p.js → chunk-cc33s37q.js} +2 -2
- package/dist/{chunk-5dkj3ntx.js → chunk-cfhg44ce.js} +2 -2
- package/dist/{chunk-074wn2jr.js → chunk-cpvaqbtq.js} +2 -2
- package/dist/{chunk-zx27nf5b.js → chunk-d09kxrbp.js} +2 -2
- package/dist/chunk-d32738zq.js +2 -0
- package/dist/{chunk-dtsybj2a.js → chunk-d39kpmyz.js} +2 -2
- package/dist/{chunk-xz6pb64j.js → chunk-d444rgtm.js} +2 -2
- package/dist/chunk-d4pm6n4q.js +2 -0
- package/dist/{chunk-0v2d2kme.js → chunk-ddj8ag0b.js} +3 -3
- package/dist/{chunk-79jjxyb7.js → chunk-dmsy511f.js} +2 -2
- package/dist/{chunk-x52rbm87.js → chunk-ewjh6s2b.js} +2 -2
- package/dist/{chunk-53qt3tjb.js → chunk-ezscf6qz.js} +2 -2
- package/dist/{chunk-3kk0rxch.js → chunk-f06zyvek.js} +2 -2
- package/dist/{chunk-6whr1y2s.js → chunk-f192h0js.js} +2 -2
- package/dist/{chunk-z3dwf54f.js → chunk-fjwn02v3.js} +2 -2
- package/dist/{chunk-0stda83g.js → chunk-fynzxex7.js} +2 -2
- package/dist/{chunk-qnc6w06c.js → chunk-fyvq1tqw.js} +3 -3
- package/dist/{chunk-dxgha4a2.js → chunk-gdr4245h.js} +2 -2
- package/dist/{chunk-d0w04ydg.js → chunk-gha517v4.js} +2 -2
- package/dist/chunk-gva03q5f.js +2 -0
- package/dist/{chunk-q0z9jq6p.js → chunk-gxjtydsk.js} +2 -2
- package/dist/chunk-haxhf3gd.js +2 -0
- package/dist/{chunk-2fgwkj52.js → chunk-hd879x7s.js} +3 -3
- package/dist/{chunk-t3s1ydnq.js → chunk-hfjvr394.js} +2 -2
- package/dist/{chunk-p7dd93e5.js → chunk-hp9h8njw.js} +2 -2
- package/dist/{chunk-0tzra5rn.js → chunk-ht6p9j86.js} +2 -2
- package/dist/{chunk-e43x30mv.js → chunk-j1f4spe0.js} +2 -2
- package/dist/{chunk-s56e2286.js → chunk-j6e2t91q.js} +2 -2
- package/dist/chunk-jeedg61t.js +2 -0
- package/dist/{chunk-8xb3b71p.js → chunk-js95dpfd.js} +2 -2
- package/dist/{chunk-1mcg9mwq.js → chunk-jsc8qzkj.js} +1 -1
- package/dist/chunk-jwkm2kgd.js +2 -0
- package/dist/{chunk-90r8y97z.js → chunk-k7y6dqf2.js} +2 -2
- package/dist/chunk-kcke05ds.js +2 -0
- package/dist/chunk-ktpg1m74.js +2 -0
- package/dist/{chunk-g7by9ta9.js → chunk-kyjhngd2.js} +2 -2
- package/dist/chunk-kymztvkv.js +2 -0
- package/dist/{chunk-b67h7yss.js → chunk-kyxdpg6a.js} +2 -2
- package/dist/{chunk-ehdqspxk.js → chunk-m0q3bf05.js} +2 -2
- package/dist/{chunk-thzq3tfa.js → chunk-m7e2zvyk.js} +2 -2
- package/dist/{chunk-6w6yy1md.js → chunk-m8s9nw8b.js} +2 -2
- package/dist/{chunk-6k8m2c80.js → chunk-mb99bpqx.js} +2 -2
- package/dist/chunk-n6kdjmh7.js +2 -0
- package/dist/chunk-nvxcys2c.js +2 -0
- package/dist/{chunk-ngqr3n0s.js → chunk-pa354z8g.js} +2 -2
- package/dist/{chunk-qd7jqtqr.js → chunk-pfft1e99.js} +2 -2
- package/dist/{chunk-sp39pqt6.js → chunk-pqw5qz4e.js} +2 -2
- package/dist/{chunk-r7svwjdg.js → chunk-ps74k3c4.js} +2 -2
- package/dist/{chunk-6rgyckw8.js → chunk-pvnc76cr.js} +2 -2
- package/dist/{chunk-gsnqwd84.js → chunk-pvzceygv.js} +2 -2
- package/dist/chunk-pyah1qdm.js +2 -0
- package/dist/{chunk-5t5y5e8n.js → chunk-q005jp78.js} +2 -2
- package/dist/chunk-q3b79z6s.js +2 -0
- package/dist/chunk-qcabefs0.js +2 -0
- package/dist/chunk-qcy0m7c4.js +2 -0
- package/dist/{chunk-jrmygc4p.js → chunk-qf163g6t.js} +2 -2
- package/dist/{chunk-91zvyqnt.js → chunk-qmhnhgc5.js} +2 -2
- package/dist/{chunk-jkvqtwe6.js → chunk-qvadb210.js} +2 -2
- package/dist/{chunk-tk4t9h7r.js → chunk-qx0xeepz.js} +2 -2
- package/dist/{chunk-c26xgmyr.js → chunk-r0bmsz7b.js} +2 -2
- package/dist/{chunk-4saf1qa5.js → chunk-r25wz0yx.js} +2 -2
- package/dist/chunk-r29eygte.js +2 -0
- package/dist/{chunk-wdrzhaxf.js → chunk-rbj9twq1.js} +2 -2
- package/dist/{chunk-02mwhdhw.js → chunk-rz3njmhn.js} +2 -2
- package/dist/{chunk-8gztbvxt.js → chunk-s7fc1rkz.js} +2 -2
- package/dist/{chunk-h09ez7fc.js → chunk-sc7qd3kj.js} +2 -2
- package/dist/chunk-sn5n38j6.js +2 -0
- package/dist/{chunk-ee0krzt0.js → chunk-ss5xzk9q.js} +2 -2
- package/dist/{chunk-8bdeyvy3.js → chunk-t3vcp85z.js} +2 -2
- package/dist/{chunk-2f9vjmxz.js → chunk-t63mwyg0.js} +2 -2
- package/dist/{chunk-epg5w48v.js → chunk-t9djctkk.js} +2 -2
- package/dist/{chunk-pgqsw2sh.js → chunk-tdys88q3.js} +2 -2
- package/dist/{chunk-jgwrjncj.js → chunk-te3mzdae.js} +2 -2
- package/dist/{chunk-eg86g265.js → chunk-tggrc8e5.js} +2 -2
- package/dist/{chunk-99w9jq4v.js → chunk-tm5dbbgp.js} +2 -2
- package/dist/{chunk-secfh4re.js → chunk-twbp4j4c.js} +2 -2
- package/dist/{chunk-m4eqmf0x.js → chunk-v1x1b7cv.js} +5 -5
- package/dist/{chunk-hck587pb.js → chunk-vetfnaz1.js} +2 -2
- package/dist/{chunk-4j2c9r6m.js → chunk-vxk0kgbf.js} +2 -2
- package/dist/{chunk-srpsc10y.js → chunk-w3eddq0g.js} +2 -2
- package/dist/chunk-w49gke0h.js +2 -0
- package/dist/{chunk-95mynf7q.js → chunk-wc48fzq2.js} +2 -2
- package/dist/{chunk-hs91aaaz.js → chunk-wcwgk4bg.js} +2 -2
- package/dist/{chunk-5b19mbh6.js → chunk-wh5dd7mq.js} +2 -2
- package/dist/{chunk-szwq5b69.js → chunk-wkw61zwr.js} +2 -2
- package/dist/{chunk-41z12m3j.js → chunk-wvs6ttt3.js} +4 -4
- package/dist/{chunk-8a61phqa.js → chunk-wxsb337y.js} +3 -3
- package/dist/{chunk-yg6vhdq9.js → chunk-xke4r5kr.js} +2 -2
- package/dist/chunk-xmrsdhtw.js +2 -0
- package/dist/{chunk-frbakxev.js → chunk-y0cxqkzd.js} +2 -2
- package/dist/{chunk-5yb7twvm.js → chunk-y39xsj1f.js} +2 -2
- package/dist/{chunk-4kbkbvjp.js → chunk-y7nq2yre.js} +2 -2
- package/dist/chunk-yamfntjx.js +1 -0
- package/dist/{chunk-s6m0ske7.js → chunk-yd68z08r.js} +2 -2
- package/dist/{chunk-zfxwm1g9.js → chunk-yep82kwy.js} +2 -2
- package/dist/chunk-yht2h676.js +2 -0
- package/dist/chunk-yvkt9ewq.js +2 -0
- package/dist/{chunk-vm2qb3ns.js → chunk-yvr086m7.js} +2 -2
- package/dist/{chunk-q70h5z14.js → chunk-z20ss7qj.js} +2 -2
- package/dist/{chunk-84yjrafh.js → chunk-z32chhqm.js} +2 -2
- package/dist/{chunk-c0b3zze8.js → chunk-zettt6hy.js} +2 -2
- package/dist/{chunk-31s3s58d.js → chunk-zrh4de8p.js} +2 -2
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/generated/commands.d.ts +363 -0
- package/dist/generated/commands.js +1 -0
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.d.ts +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.d.ts +1 -2
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.d.ts +2 -8
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.d.ts +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/darwin-arm64/THIRD_PARTY_NOTICES.md +210 -0
- package/native/darwin-arm64/artifact.json +8 -0
- package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
- package/native/darwin-arm64/licenses/Inflector-0.11.4/LICENSE.md +22 -0
- package/native/darwin-arm64/licenses/adler32-1.2.0/LICENSE +43 -0
- package/native/darwin-arm64/licenses/aes-0.9.4/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/aes-0.9.4/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/allocator-api2-0.2.21/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/allocator-api2-0.2.21/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/atomic-waker-1.1.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/atomic-waker-1.1.2/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/atomic-waker-1.1.2/LICENSE-THIRD-PARTY +45 -0
- package/native/darwin-arm64/licenses/autocfg-1.5.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/autocfg-1.5.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/aws-lc-rs-1.19.0/LICENSE +202 -0
- package/native/darwin-arm64/licenses/aws-lc-sys-0.47.0/LICENSE +316 -0
- package/native/darwin-arm64/licenses/base64-0.23.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/base64-0.23.1/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/bitflags-2.13.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/bitflags-2.13.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/block-buffer-0.12.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/block-buffer-0.12.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/bumpalo-3.20.3/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/bumpalo-3.20.3/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/bytecount-0.6.9/LICENSE.Apache2 +201 -0
- package/native/darwin-arm64/licenses/bytecount-0.6.9/LICENSE.MIT +19 -0
- package/native/darwin-arm64/licenses/bytes-1.12.1/LICENSE +25 -0
- package/native/darwin-arm64/licenses/bzip2-0.6.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/bzip2-0.6.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cc-1.11.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cc-1.11.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cfg-if-1.0.5/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cfg-if-1.0.5/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cfg_aliases-0.2.2/LICENSE +9 -0
- package/native/darwin-arm64/licenses/chacha20-0.10.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/chacha20-0.10.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/chrono-0.4.45/LICENSE.txt +240 -0
- package/native/darwin-arm64/licenses/cipher-0.5.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cipher-0.5.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cmake-0.1.58/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cmake-0.1.58/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cmov-0.5.4/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/cmov-0.5.4/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/const-oid-0.10.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/const-oid-0.10.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/constant_time_eq-0.6.1/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/constant_time_eq-0.6.1/LICENSE-CC0 +121 -0
- package/native/darwin-arm64/licenses/constant_time_eq-0.6.1/LICENSE-MIT0 +14 -0
- package/native/darwin-arm64/licenses/core-foundation-0.10.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/core-foundation-0.10.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/core-foundation-sys-0.8.7/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/core-foundation-sys-0.8.7/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cpubits-0.1.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cpubits-0.1.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/cpufeatures-0.3.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/cpufeatures-0.3.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/crc32fast-1.5.4/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/crc32fast-1.5.4/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/crypto-common-0.2.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/crypto-common-0.2.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/ctutils-0.4.8/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/ctutils-0.4.8/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/dary_heap-0.3.9/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/dary_heap-0.3.9/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/deflate64-0.1.12/LICENSE +24 -0
- package/native/darwin-arm64/licenses/deranged-0.5.9/LICENSE-Apache +202 -0
- package/native/darwin-arm64/licenses/deranged-0.5.9/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/digest-0.11.3/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/digest-0.11.3/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/displaydoc-0.2.7/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/displaydoc-0.2.7/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/dunce-1.0.5/LICENSE +121 -0
- package/native/darwin-arm64/licenses/equivalent-1.0.3/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/equivalent-1.0.3/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/errno-0.3.14/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/errno-0.3.14/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/fallible-iterator-0.3.0/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/fallible-iterator-0.3.0/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/fallible-streaming-iterator-0.1.9/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/fallible-streaming-iterator-0.1.9/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/fastrand-2.5.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/fastrand-2.5.0/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/find-msvc-tools-0.1.15/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/find-msvc-tools-0.1.15/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/flate2-1.1.10/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/flate2-1.1.10/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/foldhash-0.2.0/LICENSE +19 -0
- package/native/darwin-arm64/licenses/form_urlencoded-1.2.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/form_urlencoded-1.2.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/fs_extra-1.3.0/LICENSE +21 -0
- package/native/darwin-arm64/licenses/futures-channel-0.3.34/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/futures-channel-0.3.34/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/futures-core-0.3.34/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/futures-core-0.3.34/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/futures-task-0.3.34/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/futures-task-0.3.34/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/futures-util-0.3.34/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/futures-util-0.3.34/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/getrandom-0.2.17/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/getrandom-0.2.17/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/getrandom-0.4.3/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/getrandom-0.4.3/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/hashbrown-0.16.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hashbrown-0.16.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/hashbrown-0.17.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hashbrown-0.17.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/hashlink-0.12.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hashlink-0.12.2/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/hmac-0.13.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hmac-0.13.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/http-1.5.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/http-1.5.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/http-body-1.1.0/LICENSE +25 -0
- package/native/darwin-arm64/licenses/http-body-util-0.1.5/LICENSE +25 -0
- package/native/darwin-arm64/licenses/httparse-1.10.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/httparse-1.10.1/LICENSE-MIT +20 -0
- package/native/darwin-arm64/licenses/hybrid-array-0.4.15/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hybrid-array-0.4.15/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/hyper-1.12.0/LICENSE +19 -0
- package/native/darwin-arm64/licenses/hyper-rustls-0.27.10/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/hyper-rustls-0.27.10/LICENSE-ISC +15 -0
- package/native/darwin-arm64/licenses/hyper-rustls-0.27.10/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/hyper-util-0.1.21/LICENSE +19 -0
- package/native/darwin-arm64/licenses/iana-time-zone-0.1.65/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/iana-time-zone-0.1.65/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/icu_collections-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_locale_core-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_normalizer-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_normalizer_data-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_properties-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_properties_data-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/icu_provider-2.4.0/LICENSE +46 -0
- package/native/darwin-arm64/licenses/idna-1.1.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/idna-1.1.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/idna_adapter-1.2.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/idna_adapter-1.2.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/include-flate-0.3.5/LICENSE +202 -0
- package/native/darwin-arm64/licenses/include-flate-codegen-0.3.5/LICENSE +202 -0
- package/native/darwin-arm64/licenses/include-flate-compress-0.3.5/LICENSE +202 -0
- package/native/darwin-arm64/licenses/indexmap-2.14.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/indexmap-2.14.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/inout-0.2.5/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/inout-0.2.5/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/ipnet-2.12.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/ipnet-2.12.2/LICENSE-MIT +7 -0
- package/native/darwin-arm64/licenses/itoa-1.0.18/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/itoa-1.0.18/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/jieba-macros-0.11.0/LICENSE +22 -0
- package/native/darwin-arm64/licenses/jieba-rs-0.11.0/LICENSE +22 -0
- package/native/darwin-arm64/licenses/jobserver-0.1.35/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/jobserver-0.1.35/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/libbz2-rs-sys-0.2.6/LICENSE +48 -0
- package/native/darwin-arm64/licenses/libc-0.2.191/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/libc-0.2.191/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/libflate-2.3.2/LICENSE +21 -0
- package/native/darwin-arm64/licenses/libflate_lz77-2.3.0/LICENSE +21 -0
- package/native/darwin-arm64/licenses/libsqlite3-sys-0.39.1/LICENSE +19 -0
- package/native/darwin-arm64/licenses/litemap-0.8.3/LICENSE +46 -0
- package/native/darwin-arm64/licenses/lock_api-0.4.14/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/lock_api-0.4.14/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/log-0.4.35/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/log-0.4.35/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/lru-slab-0.1.3/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/lru-slab-0.1.3/LICENSE-MIT +7 -0
- package/native/darwin-arm64/licenses/lru-slab-0.1.3/LICENSE-ZLIB +19 -0
- package/native/darwin-arm64/licenses/lzma-rust2-0.24.0/LICENSE +201 -0
- package/native/darwin-arm64/licenses/memchr-2.8.3/COPYING +3 -0
- package/native/darwin-arm64/licenses/memchr-2.8.3/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/mio-1.2.4/LICENSE +19 -0
- package/native/darwin-arm64/licenses/nix-0.31.3/LICENSE +21 -0
- package/native/darwin-arm64/licenses/no_std_io2-0.9.4/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/no_std_io2-0.9.4/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/num-conv-0.2.2/LICENSE-Apache +177 -0
- package/native/darwin-arm64/licenses/num-conv-0.2.2/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/num-traits-0.2.19/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/num-traits-0.2.19/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/once_cell-1.21.4/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/once_cell-1.21.4/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/opencode-ai-models-0.0.124/LICENSE +21 -0
- package/native/darwin-arm64/licenses/parking_lot-0.12.5/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/parking_lot-0.12.5/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/parking_lot_core-0.9.12/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/parking_lot_core-0.9.12/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/pbkdf2-0.13.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/pbkdf2-0.13.0/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/percent-encoding-2.3.2/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/percent-encoding-2.3.2/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
- package/native/darwin-arm64/licenses/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/pkg-config-0.3.34/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/pkg-config-0.3.34/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/potential_utf-0.1.6/LICENSE +46 -0
- package/native/darwin-arm64/licenses/powerfmt-0.2.1/LICENSE-Apache +202 -0
- package/native/darwin-arm64/licenses/powerfmt-0.2.1/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/ppmd-rust-1.5.2/LICENSE-CC0.md +119 -0
- package/native/darwin-arm64/licenses/ppmd-rust-1.5.2/LICENSE-MIT-0.md +16 -0
- package/native/darwin-arm64/licenses/proc-macro-error-attr3-3.1.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/proc-macro-error-attr3-3.1.1/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/proc-macro-error3-3.1.1/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/proc-macro-error3-3.1.1/LICENSE-MIT +22 -0
- package/native/darwin-arm64/licenses/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/proc-macro2-1.0.107/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/quinn-0.11.12/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/quinn-0.11.12/LICENSE-MIT +7 -0
- package/native/darwin-arm64/licenses/quinn-proto-0.11.19/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/quinn-proto-0.11.19/LICENSE-MIT +7 -0
- package/native/darwin-arm64/licenses/quinn-udp-0.5.16/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/quinn-udp-0.5.16/LICENSE-MIT +7 -0
- package/native/darwin-arm64/licenses/quote-1.0.47/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/quote-1.0.47/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/rand-0.10.3/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/rand-0.10.3/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/rand_core-0.10.1/LICENSE-APACHE +187 -0
- package/native/darwin-arm64/licenses/rand_core-0.10.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/rand_pcg-0.10.2/LICENSE-APACHE +187 -0
- package/native/darwin-arm64/licenses/rand_pcg-0.10.2/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/regex-lite-0.1.9/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/regex-lite-0.1.9/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/reqwest-0.13.5/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/reqwest-0.13.5/LICENSE-MIT +20 -0
- package/native/darwin-arm64/licenses/rev_lines-0.3.0/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/ring-0.17.14/LICENSE +9 -0
- package/native/darwin-arm64/licenses/ring-0.17.14/LICENSE-BoringSSL +272 -0
- package/native/darwin-arm64/licenses/ring-0.17.14/LICENSE-other-bits +13 -0
- package/native/darwin-arm64/licenses/rle-decode-fast-1.0.3/LICENSE-APACHE +13 -0
- package/native/darwin-arm64/licenses/rle-decode-fast-1.0.3/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/rusqlite-0.41.1/LICENSE +19 -0
- package/native/darwin-arm64/licenses/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/rustc-hash-2.1.3/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/rustc_version-0.4.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/rustc_version-0.4.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/rustix-1.1.6/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/rustix-1.1.6/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/native/darwin-arm64/licenses/rustix-1.1.6/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/rustls-0.23.46/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/rustls-0.23.46/LICENSE-ISC +15 -0
- package/native/darwin-arm64/licenses/rustls-0.23.46/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/rustls-pki-types-1.15.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/rustls-pki-types-1.15.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/rustls-platform-verifier-0.7.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/rustls-platform-verifier-0.7.1/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/rustls-webpki-0.103.16/LICENSE +19 -0
- package/native/darwin-arm64/licenses/rustversion-1.0.23/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/rustversion-1.0.23/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/scopeguard-1.2.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/scopeguard-1.2.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/security-framework-3.7.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/security-framework-3.7.0/LICENSE-MIT +20 -0
- package/native/darwin-arm64/licenses/security-framework-sys-2.17.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/security-framework-sys-2.17.0/LICENSE-MIT +20 -0
- package/native/darwin-arm64/licenses/semver-1.0.28/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/semver-1.0.28/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/serde-1.0.229/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/serde-1.0.229/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/serde_derive-1.0.229/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/serde_derive-1.0.229/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/serde_json-1.0.154/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/serde_json-1.0.154/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/sha1-0.11.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/sha1-0.11.0/LICENSE-MIT +28 -0
- package/native/darwin-arm64/licenses/sha2-0.11.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/sha2-0.11.1/LICENSE-MIT +28 -0
- package/native/darwin-arm64/licenses/shlex-2.0.1/LICENSE-APACHE +13 -0
- package/native/darwin-arm64/licenses/shlex-2.0.1/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/signal-hook-registry-1.4.8/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/signal-hook-registry-1.4.8/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/simd-adler32-0.3.10/LICENSE.md +21 -0
- package/native/darwin-arm64/licenses/slab-0.4.12/LICENSE +25 -0
- package/native/darwin-arm64/licenses/smallvec-1.16.4/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/smallvec-1.16.4/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/socket2-0.6.5/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/socket2-0.6.5/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/specta-2.0.0-rc.27/LICENSE +21 -0
- package/native/darwin-arm64/licenses/specta-macros-2.0.0-rc.27/LICENSE +21 -0
- package/native/darwin-arm64/licenses/stable_deref_trait-1.2.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/stable_deref_trait-1.2.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/stop-words-0.10.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/stop-words-0.10.1/LICENSE.md +21 -0
- package/native/darwin-arm64/licenses/subtle-2.6.1/LICENSE +29 -0
- package/native/darwin-arm64/licenses/syn-2.0.119/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/syn-2.0.119/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/syn-3.0.9/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/syn-3.0.9/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/sync_wrapper-1.0.2/LICENSE +177 -0
- package/native/darwin-arm64/licenses/synstructure-0.14.0/LICENSE +7 -0
- package/native/darwin-arm64/licenses/tempfile-3.27.0/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/tempfile-3.27.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/thiserror-1.0.69/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/thiserror-1.0.69/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/thiserror-2.0.21/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/thiserror-2.0.21/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/thiserror-impl-1.0.69/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/thiserror-impl-1.0.69/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/thiserror-impl-2.0.21/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/thiserror-impl-2.0.21/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/time-0.3.55/LICENSE-Apache +177 -0
- package/native/darwin-arm64/licenses/time-0.3.55/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/time-core-0.1.9/LICENSE-Apache +177 -0
- package/native/darwin-arm64/licenses/time-core-0.1.9/LICENSE-MIT +19 -0
- package/native/darwin-arm64/licenses/tinystr-0.8.5/LICENSE +46 -0
- package/native/darwin-arm64/licenses/tinyvec-1.13.3/LICENSE-APACHE.md +202 -0
- package/native/darwin-arm64/licenses/tinyvec-1.13.3/LICENSE-MIT.md +5 -0
- package/native/darwin-arm64/licenses/tinyvec-1.13.3/LICENSE-ZLIB.md +11 -0
- package/native/darwin-arm64/licenses/tokio-1.54.1/LICENSE +21 -0
- package/native/darwin-arm64/licenses/tokio-macros-2.7.2/LICENSE +22 -0
- package/native/darwin-arm64/licenses/tokio-rustls-0.26.6/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/tokio-rustls-0.26.6/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/tower-0.5.3/LICENSE +25 -0
- package/native/darwin-arm64/licenses/tower-http-0.6.11/LICENSE +25 -0
- package/native/darwin-arm64/licenses/tower-layer-0.3.3/LICENSE +25 -0
- package/native/darwin-arm64/licenses/tower-service-0.3.3/LICENSE +25 -0
- package/native/darwin-arm64/licenses/tracing-0.1.44/LICENSE +25 -0
- package/native/darwin-arm64/licenses/tracing-core-0.1.36/LICENSE +25 -0
- package/native/darwin-arm64/licenses/try-lock-0.2.5/LICENSE +21 -0
- package/native/darwin-arm64/licenses/typed-path-0.13.0/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/typed-path-0.13.0/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/typenum-1.20.1/LICENSE +1 -0
- package/native/darwin-arm64/licenses/typenum-1.20.1/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/typenum-1.20.1/LICENSE-MIT +21 -0
- package/native/darwin-arm64/licenses/unicode-ident-1.0.27/LICENSE-APACHE +176 -0
- package/native/darwin-arm64/licenses/unicode-ident-1.0.27/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/unicode-ident-1.0.27/LICENSE-UNICODE +39 -0
- package/native/darwin-arm64/licenses/untrusted-0.9.0/LICENSE.txt +13 -0
- package/native/darwin-arm64/licenses/url-2.5.8/LICENSE-APACHE +201 -0
- package/native/darwin-arm64/licenses/url-2.5.8/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/utf8_iter-1.1.0/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/utf8_iter-1.1.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/utf_types-1.0.0/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/utf_types-1.0.0/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/vcpkg-0.2.15/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/vcpkg-0.2.15/LICENSE-MIT +26 -0
- package/native/darwin-arm64/licenses/want-0.3.2/LICENSE +20 -0
- package/native/darwin-arm64/licenses/writeable-0.6.4/LICENSE +46 -0
- package/native/darwin-arm64/licenses/yoke-0.8.4/LICENSE +46 -0
- package/native/darwin-arm64/licenses/yoke-derive-0.8.4/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zerofrom-0.1.8/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zerofrom-derive-0.1.8/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zeroize-1.9.1/LICENSE-APACHE +202 -0
- package/native/darwin-arm64/licenses/zeroize-1.9.1/LICENSE-MIT +25 -0
- package/native/darwin-arm64/licenses/zerotrie-0.2.5/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zerovec-0.11.9/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zerovec-derive-0.11.7/LICENSE +46 -0
- package/native/darwin-arm64/licenses/zip-9.3.0/LICENSE +21 -0
- package/native/darwin-arm64/licenses/zlib-rs-0.6.8/LICENSE +19 -0
- package/native/darwin-arm64/licenses/zmij-1.0.23/LICENSE-MIT +23 -0
- package/native/darwin-arm64/licenses/zopfli-0.8.4/COPYING +201 -0
- package/native/darwin-arm64/licenses/zstd-0.14.3/LICENSE +28 -0
- package/native/darwin-arm64/licenses/zstd-safe-8.2.0/LICENSE +28 -0
- package/native/darwin-arm64/licenses/zstd-sys-2.1.2+zstd.1.5.7/LICENSE +28 -0
- package/native/darwin-arm64/licenses/zstd-sys-2.1.2+zstd.1.5.7/LICENSE.BSD-3-Clause +32 -0
- package/native/win32-x64/THIRD_PARTY_NOTICES.md +203 -0
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +8 -0
- package/native/win32-x64/licenses/Inflector-0.11.4/LICENSE.md +22 -0
- package/native/win32-x64/licenses/adler32-1.2.0/LICENSE +43 -0
- package/native/win32-x64/licenses/aes-0.9.4/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/aes-0.9.4/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/allocator-api2-0.2.21/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/allocator-api2-0.2.21/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/atomic-waker-1.1.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/atomic-waker-1.1.2/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/atomic-waker-1.1.2/LICENSE-THIRD-PARTY +45 -0
- package/native/win32-x64/licenses/autocfg-1.5.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/autocfg-1.5.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/aws-lc-rs-1.19.0/LICENSE +202 -0
- package/native/win32-x64/licenses/aws-lc-sys-0.47.0/LICENSE +316 -0
- package/native/win32-x64/licenses/base64-0.23.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/base64-0.23.1/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/bitflags-2.13.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/bitflags-2.13.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/block-buffer-0.12.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/block-buffer-0.12.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/bumpalo-3.20.3/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/bumpalo-3.20.3/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/bytecount-0.6.9/LICENSE.Apache2 +201 -0
- package/native/win32-x64/licenses/bytecount-0.6.9/LICENSE.MIT +19 -0
- package/native/win32-x64/licenses/bytes-1.12.1/LICENSE +25 -0
- package/native/win32-x64/licenses/bzip2-0.6.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/bzip2-0.6.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cc-1.11.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cc-1.11.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cfg-if-1.0.5/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cfg-if-1.0.5/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cfg_aliases-0.2.2/LICENSE +9 -0
- package/native/win32-x64/licenses/chacha20-0.10.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/chacha20-0.10.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/chrono-0.4.45/LICENSE.txt +240 -0
- package/native/win32-x64/licenses/cipher-0.5.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cipher-0.5.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cmake-0.1.58/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cmake-0.1.58/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cmov-0.5.4/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/cmov-0.5.4/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/const-oid-0.10.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/const-oid-0.10.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/constant_time_eq-0.6.1/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/constant_time_eq-0.6.1/LICENSE-CC0 +121 -0
- package/native/win32-x64/licenses/constant_time_eq-0.6.1/LICENSE-MIT0 +14 -0
- package/native/win32-x64/licenses/cpubits-0.1.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cpubits-0.1.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/cpufeatures-0.3.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/cpufeatures-0.3.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/crc32fast-1.5.4/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/crc32fast-1.5.4/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/crypto-common-0.2.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/crypto-common-0.2.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/ctutils-0.4.8/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/ctutils-0.4.8/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/dary_heap-0.3.9/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/dary_heap-0.3.9/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/deflate64-0.1.12/LICENSE +24 -0
- package/native/win32-x64/licenses/deranged-0.5.9/LICENSE-Apache +202 -0
- package/native/win32-x64/licenses/deranged-0.5.9/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/digest-0.11.3/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/digest-0.11.3/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/displaydoc-0.2.7/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/displaydoc-0.2.7/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/dunce-1.0.5/LICENSE +121 -0
- package/native/win32-x64/licenses/equivalent-1.0.3/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/equivalent-1.0.3/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/fallible-iterator-0.3.0/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/fallible-iterator-0.3.0/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/fallible-streaming-iterator-0.1.9/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/fallible-streaming-iterator-0.1.9/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/fastrand-2.5.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/fastrand-2.5.0/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/find-msvc-tools-0.1.15/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/find-msvc-tools-0.1.15/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/flate2-1.1.10/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/flate2-1.1.10/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/foldhash-0.2.0/LICENSE +19 -0
- package/native/win32-x64/licenses/form_urlencoded-1.2.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/form_urlencoded-1.2.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/fs_extra-1.3.0/LICENSE +21 -0
- package/native/win32-x64/licenses/futures-channel-0.3.34/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/futures-channel-0.3.34/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/futures-core-0.3.34/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/futures-core-0.3.34/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/futures-task-0.3.34/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/futures-task-0.3.34/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/futures-util-0.3.34/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/futures-util-0.3.34/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/getrandom-0.2.17/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/getrandom-0.2.17/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/getrandom-0.4.3/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/getrandom-0.4.3/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/hashbrown-0.16.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hashbrown-0.16.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/hashbrown-0.17.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hashbrown-0.17.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/hashlink-0.12.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hashlink-0.12.2/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/hmac-0.13.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hmac-0.13.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/http-1.5.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/http-1.5.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/http-body-1.1.0/LICENSE +25 -0
- package/native/win32-x64/licenses/http-body-util-0.1.5/LICENSE +25 -0
- package/native/win32-x64/licenses/httparse-1.10.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/httparse-1.10.1/LICENSE-MIT +20 -0
- package/native/win32-x64/licenses/hybrid-array-0.4.15/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hybrid-array-0.4.15/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/hyper-1.12.0/LICENSE +19 -0
- package/native/win32-x64/licenses/hyper-rustls-0.27.10/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/hyper-rustls-0.27.10/LICENSE-ISC +15 -0
- package/native/win32-x64/licenses/hyper-rustls-0.27.10/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/hyper-util-0.1.21/LICENSE +19 -0
- package/native/win32-x64/licenses/icu_collections-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_locale_core-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_normalizer-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_normalizer_data-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_properties-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_properties_data-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/icu_provider-2.4.0/LICENSE +46 -0
- package/native/win32-x64/licenses/idna-1.1.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/idna-1.1.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/idna_adapter-1.2.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/idna_adapter-1.2.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/include-flate-0.3.5/LICENSE +202 -0
- package/native/win32-x64/licenses/include-flate-codegen-0.3.5/LICENSE +202 -0
- package/native/win32-x64/licenses/include-flate-compress-0.3.5/LICENSE +202 -0
- package/native/win32-x64/licenses/indexmap-2.14.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/indexmap-2.14.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/inout-0.2.5/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/inout-0.2.5/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/ipnet-2.12.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/ipnet-2.12.2/LICENSE-MIT +7 -0
- package/native/win32-x64/licenses/itoa-1.0.18/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/itoa-1.0.18/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/jieba-macros-0.11.0/LICENSE +22 -0
- package/native/win32-x64/licenses/jieba-rs-0.11.0/LICENSE +22 -0
- package/native/win32-x64/licenses/jobserver-0.1.35/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/jobserver-0.1.35/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/libbz2-rs-sys-0.2.6/LICENSE +48 -0
- package/native/win32-x64/licenses/libc-0.2.191/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/libc-0.2.191/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/libflate-2.3.2/LICENSE +21 -0
- package/native/win32-x64/licenses/libflate_lz77-2.3.0/LICENSE +21 -0
- package/native/win32-x64/licenses/libsqlite3-sys-0.39.1/LICENSE +19 -0
- package/native/win32-x64/licenses/litemap-0.8.3/LICENSE +46 -0
- package/native/win32-x64/licenses/lock_api-0.4.14/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/lock_api-0.4.14/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/log-0.4.35/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/log-0.4.35/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/lru-slab-0.1.3/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/lru-slab-0.1.3/LICENSE-MIT +7 -0
- package/native/win32-x64/licenses/lru-slab-0.1.3/LICENSE-ZLIB +19 -0
- package/native/win32-x64/licenses/lzma-rust2-0.24.0/LICENSE +201 -0
- package/native/win32-x64/licenses/memchr-2.8.3/COPYING +3 -0
- package/native/win32-x64/licenses/memchr-2.8.3/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/mio-1.2.4/LICENSE +19 -0
- package/native/win32-x64/licenses/no_std_io2-0.9.4/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/no_std_io2-0.9.4/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/num-conv-0.2.2/LICENSE-Apache +177 -0
- package/native/win32-x64/licenses/num-conv-0.2.2/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/num-traits-0.2.19/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/num-traits-0.2.19/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/once_cell-1.21.4/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/once_cell-1.21.4/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/opencode-ai-models-0.0.124/LICENSE +21 -0
- package/native/win32-x64/licenses/parking_lot-0.12.5/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/parking_lot-0.12.5/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/parking_lot_core-0.9.12/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/parking_lot_core-0.9.12/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/pbkdf2-0.13.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/pbkdf2-0.13.0/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/percent-encoding-2.3.2/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/percent-encoding-2.3.2/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
- package/native/win32-x64/licenses/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/pkg-config-0.3.34/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/pkg-config-0.3.34/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/potential_utf-0.1.6/LICENSE +46 -0
- package/native/win32-x64/licenses/powerfmt-0.2.1/LICENSE-Apache +202 -0
- package/native/win32-x64/licenses/powerfmt-0.2.1/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/ppmd-rust-1.5.2/LICENSE-CC0.md +119 -0
- package/native/win32-x64/licenses/ppmd-rust-1.5.2/LICENSE-MIT-0.md +16 -0
- package/native/win32-x64/licenses/proc-macro-error-attr3-3.1.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/proc-macro-error-attr3-3.1.1/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/proc-macro-error3-3.1.1/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/proc-macro-error3-3.1.1/LICENSE-MIT +22 -0
- package/native/win32-x64/licenses/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/proc-macro2-1.0.107/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/quinn-0.11.12/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/quinn-0.11.12/LICENSE-MIT +7 -0
- package/native/win32-x64/licenses/quinn-proto-0.11.19/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/quinn-proto-0.11.19/LICENSE-MIT +7 -0
- package/native/win32-x64/licenses/quinn-udp-0.5.16/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/quinn-udp-0.5.16/LICENSE-MIT +7 -0
- package/native/win32-x64/licenses/quote-1.0.47/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/quote-1.0.47/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/rand-0.10.3/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/rand-0.10.3/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/rand_core-0.10.1/LICENSE-APACHE +187 -0
- package/native/win32-x64/licenses/rand_core-0.10.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/rand_pcg-0.10.2/LICENSE-APACHE +187 -0
- package/native/win32-x64/licenses/rand_pcg-0.10.2/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/regex-lite-0.1.9/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/regex-lite-0.1.9/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/reqwest-0.13.5/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/reqwest-0.13.5/LICENSE-MIT +20 -0
- package/native/win32-x64/licenses/rev_lines-0.3.0/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/ring-0.17.14/LICENSE +9 -0
- package/native/win32-x64/licenses/ring-0.17.14/LICENSE-BoringSSL +272 -0
- package/native/win32-x64/licenses/ring-0.17.14/LICENSE-other-bits +13 -0
- package/native/win32-x64/licenses/rle-decode-fast-1.0.3/LICENSE-APACHE +13 -0
- package/native/win32-x64/licenses/rle-decode-fast-1.0.3/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/rusqlite-0.41.1/LICENSE +19 -0
- package/native/win32-x64/licenses/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/rustc-hash-2.1.3/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/rustc_version-0.4.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/rustc_version-0.4.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/rustls-0.23.46/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/rustls-0.23.46/LICENSE-ISC +15 -0
- package/native/win32-x64/licenses/rustls-0.23.46/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/rustls-pki-types-1.15.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/rustls-pki-types-1.15.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/rustls-platform-verifier-0.7.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/rustls-platform-verifier-0.7.1/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/rustls-webpki-0.103.16/LICENSE +19 -0
- package/native/win32-x64/licenses/rustversion-1.0.23/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/rustversion-1.0.23/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/scopeguard-1.2.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/scopeguard-1.2.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/semver-1.0.28/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/semver-1.0.28/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/serde-1.0.229/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/serde-1.0.229/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/serde_derive-1.0.229/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/serde_derive-1.0.229/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/serde_json-1.0.154/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/serde_json-1.0.154/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/sha1-0.11.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/sha1-0.11.0/LICENSE-MIT +28 -0
- package/native/win32-x64/licenses/sha2-0.11.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/sha2-0.11.1/LICENSE-MIT +28 -0
- package/native/win32-x64/licenses/shlex-2.0.1/LICENSE-APACHE +13 -0
- package/native/win32-x64/licenses/shlex-2.0.1/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/simd-adler32-0.3.10/LICENSE.md +21 -0
- package/native/win32-x64/licenses/slab-0.4.12/LICENSE +25 -0
- package/native/win32-x64/licenses/smallvec-1.16.4/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/smallvec-1.16.4/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/socket2-0.6.5/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/socket2-0.6.5/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/specta-2.0.0-rc.27/LICENSE +21 -0
- package/native/win32-x64/licenses/specta-macros-2.0.0-rc.27/LICENSE +21 -0
- package/native/win32-x64/licenses/stable_deref_trait-1.2.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/stable_deref_trait-1.2.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/stop-words-0.10.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/stop-words-0.10.1/LICENSE.md +21 -0
- package/native/win32-x64/licenses/subtle-2.6.1/LICENSE +29 -0
- package/native/win32-x64/licenses/syn-2.0.119/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/syn-2.0.119/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/syn-3.0.9/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/syn-3.0.9/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/sync_wrapper-1.0.2/LICENSE +177 -0
- package/native/win32-x64/licenses/synstructure-0.14.0/LICENSE +7 -0
- package/native/win32-x64/licenses/tempfile-3.27.0/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/tempfile-3.27.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/thiserror-1.0.69/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/thiserror-1.0.69/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/thiserror-2.0.21/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/thiserror-2.0.21/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/thiserror-impl-1.0.69/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/thiserror-impl-1.0.69/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/thiserror-impl-2.0.21/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/thiserror-impl-2.0.21/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/time-0.3.55/LICENSE-Apache +177 -0
- package/native/win32-x64/licenses/time-0.3.55/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/time-core-0.1.9/LICENSE-Apache +177 -0
- package/native/win32-x64/licenses/time-core-0.1.9/LICENSE-MIT +19 -0
- package/native/win32-x64/licenses/tinystr-0.8.5/LICENSE +46 -0
- package/native/win32-x64/licenses/tinyvec-1.13.3/LICENSE-APACHE.md +202 -0
- package/native/win32-x64/licenses/tinyvec-1.13.3/LICENSE-MIT.md +5 -0
- package/native/win32-x64/licenses/tinyvec-1.13.3/LICENSE-ZLIB.md +11 -0
- package/native/win32-x64/licenses/tokio-1.54.1/LICENSE +21 -0
- package/native/win32-x64/licenses/tokio-macros-2.7.2/LICENSE +22 -0
- package/native/win32-x64/licenses/tokio-rustls-0.26.6/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/tokio-rustls-0.26.6/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/tower-0.5.3/LICENSE +25 -0
- package/native/win32-x64/licenses/tower-http-0.6.11/LICENSE +25 -0
- package/native/win32-x64/licenses/tower-layer-0.3.3/LICENSE +25 -0
- package/native/win32-x64/licenses/tower-service-0.3.3/LICENSE +25 -0
- package/native/win32-x64/licenses/tracing-0.1.44/LICENSE +25 -0
- package/native/win32-x64/licenses/tracing-core-0.1.36/LICENSE +25 -0
- package/native/win32-x64/licenses/try-lock-0.2.5/LICENSE +21 -0
- package/native/win32-x64/licenses/typed-path-0.13.0/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/typed-path-0.13.0/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/typenum-1.20.1/LICENSE +1 -0
- package/native/win32-x64/licenses/typenum-1.20.1/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/typenum-1.20.1/LICENSE-MIT +21 -0
- package/native/win32-x64/licenses/unicode-ident-1.0.27/LICENSE-APACHE +176 -0
- package/native/win32-x64/licenses/unicode-ident-1.0.27/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/unicode-ident-1.0.27/LICENSE-UNICODE +39 -0
- package/native/win32-x64/licenses/untrusted-0.9.0/LICENSE.txt +13 -0
- package/native/win32-x64/licenses/url-2.5.8/LICENSE-APACHE +201 -0
- package/native/win32-x64/licenses/url-2.5.8/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/utf8_iter-1.1.0/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/utf8_iter-1.1.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/utf_types-1.0.0/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/utf_types-1.0.0/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/vcpkg-0.2.15/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/vcpkg-0.2.15/LICENSE-MIT +26 -0
- package/native/win32-x64/licenses/want-0.3.2/LICENSE +20 -0
- package/native/win32-x64/licenses/windows-link-0.2.1/license-apache-2.0 +201 -0
- package/native/win32-x64/licenses/windows-link-0.2.1/license-mit +21 -0
- package/native/win32-x64/licenses/windows-sys-0.61.2/license-apache-2.0 +201 -0
- package/native/win32-x64/licenses/windows-sys-0.61.2/license-mit +21 -0
- package/native/win32-x64/licenses/writeable-0.6.4/LICENSE +46 -0
- package/native/win32-x64/licenses/yoke-0.8.4/LICENSE +46 -0
- package/native/win32-x64/licenses/yoke-derive-0.8.4/LICENSE +46 -0
- package/native/win32-x64/licenses/zerofrom-0.1.8/LICENSE +46 -0
- package/native/win32-x64/licenses/zerofrom-derive-0.1.8/LICENSE +46 -0
- package/native/win32-x64/licenses/zeroize-1.9.1/LICENSE-APACHE +202 -0
- package/native/win32-x64/licenses/zeroize-1.9.1/LICENSE-MIT +25 -0
- package/native/win32-x64/licenses/zerotrie-0.2.5/LICENSE +46 -0
- package/native/win32-x64/licenses/zerovec-0.11.9/LICENSE +46 -0
- package/native/win32-x64/licenses/zerovec-derive-0.11.7/LICENSE +46 -0
- package/native/win32-x64/licenses/zip-9.3.0/LICENSE +21 -0
- package/native/win32-x64/licenses/zlib-rs-0.6.8/LICENSE +19 -0
- package/native/win32-x64/licenses/zmij-1.0.23/LICENSE-MIT +23 -0
- package/native/win32-x64/licenses/zopfli-0.8.4/COPYING +201 -0
- package/native/win32-x64/licenses/zstd-0.14.3/LICENSE +28 -0
- package/native/win32-x64/licenses/zstd-safe-8.2.0/LICENSE +28 -0
- package/native/win32-x64/licenses/zstd-sys-2.1.2+zstd.1.5.7/LICENSE +28 -0
- package/native/win32-x64/licenses/zstd-sys-2.1.2+zstd.1.5.7/LICENSE.BSD-3-Clause +32 -0
- package/package.json +23 -15
- package/dist/chunk-0w6g1w1a.js +0 -2
- package/dist/chunk-0wr12bg8.js +0 -2
- package/dist/chunk-3137n54p.js +0 -2
- package/dist/chunk-3jw1yt27.js +0 -2
- package/dist/chunk-45542yk3.js +0 -2
- package/dist/chunk-4phhhm7t.js +0 -2
- package/dist/chunk-546h1tk7.js +0 -2
- package/dist/chunk-8kwxqckk.js +0 -2
- package/dist/chunk-8qyb69g5.js +0 -2
- package/dist/chunk-93y78gn4.js +0 -2
- package/dist/chunk-95qfzbmx.js +0 -2
- package/dist/chunk-98cbjkvk.js +0 -4
- package/dist/chunk-9gt81b51.js +0 -2
- package/dist/chunk-bfqqsv6a.js +0 -2
- package/dist/chunk-cd4v63j8.js +0 -2
- package/dist/chunk-ek4acj2p.js +0 -2
- package/dist/chunk-eqwga6j5.js +0 -2
- package/dist/chunk-famkkndg.js +0 -2
- package/dist/chunk-jrnfqqfc.js +0 -2
- package/dist/chunk-pym8eb5y.js +0 -2
- package/dist/chunk-qy06pvy8.js +0 -2
- package/dist/chunk-rf5g26qv.js +0 -2
- package/dist/chunk-rfn9vecr.js +0 -2
- package/dist/chunk-tjkftq6f.js +0 -2
- package/dist/chunk-v3etjs4w.js +0 -2
- package/dist/chunk-x54538jy.js +0 -1
- package/dist/chunk-x68b6rmk.js +0 -2
- package/dist/chunk-z8njjc2c.js +0 -2
- package/dist/chunk-zk6745qh.js +0 -2
- package/rust/Cargo.lock +0 -4318
- package/rust/Cargo.toml +0 -44
- package/rust/build.rs +0 -16
- package/rust/permissions/autogenerated/reference.md +0 -296
- package/rust/permissions/default.toml +0 -20
- package/rust/permissions/schemas/schema.json +0 -263
- package/rust/src/__tests__/native_network.rs +0 -406
- package/rust/src/lib.rs +0 -82
- package/rust/src/native_network.rs +0 -302
- package/rust/src/native_network_diagnostics.rs +0 -220
- package/rust/src/providers/managed.rs +0 -801
- package/rust/src/providers/tests.rs +0 -684
- package/rust/src/providers.rs +0 -984
- package/rust/src/skills.rs +0 -130
- package/rust/src/system_proxy.rs +0 -257
package/rust/src/providers.rs
DELETED
|
@@ -1,984 +0,0 @@
|
|
|
1
|
-
//! Application-owned provider credentials. Webviews receive only configured/region metadata.
|
|
2
|
-
//! Independent provider changes apply under Runtime admission; busy session routing stays pinned.
|
|
3
|
-
pub mod managed;
|
|
4
|
-
|
|
5
|
-
use crate::RuntimeAccess;
|
|
6
|
-
use alwith_api::{ResponseError, RuntimeClient};
|
|
7
|
-
use serde::{Deserialize, Serialize};
|
|
8
|
-
use serde_json::{Value, json};
|
|
9
|
-
use std::{
|
|
10
|
-
collections::{BTreeMap, BTreeSet},
|
|
11
|
-
io::Write,
|
|
12
|
-
path::{Path, PathBuf},
|
|
13
|
-
sync::Arc,
|
|
14
|
-
time::Instant,
|
|
15
|
-
};
|
|
16
|
-
use tauri::{AppHandle, Emitter, Manager, State};
|
|
17
|
-
|
|
18
|
-
/// Every snapshot change; the payload is a [`Snapshot`].
|
|
19
|
-
pub const CHANGED_EVENT: &str = "providers:changed";
|
|
20
|
-
/// The file in the application data directory holding credentials, custom providers and the account cache.
|
|
21
|
-
pub const STORE_FILE: &str = "runtime-providers.json";
|
|
22
|
-
/// The directory in the application data directory the bundled model catalogs are written to.
|
|
23
|
-
pub const CATALOG_DIRECTORY: &str = "model-catalogs";
|
|
24
|
-
|
|
25
|
-
const PROVIDER_CATALOG: &str = include_str!("../../assets/provider-catalog.json");
|
|
26
|
-
/// Bundled Codex model catalogs, by the relative path `provider-catalog.json` names them with.
|
|
27
|
-
const MODEL_CATALOGS: &[(&str, &str)] = &[
|
|
28
|
-
("alwith/models.json", include_str!("../../assets/catalogs/alwith/models.json")),
|
|
29
|
-
("custom/models.json", include_str!("../../assets/catalogs/custom/models.json")),
|
|
30
|
-
("deepseek/models.json", include_str!("../../assets/catalogs/deepseek/models.json")),
|
|
31
|
-
("openrouter/models.json", include_str!("../../assets/catalogs/openrouter/models.json")),
|
|
32
|
-
("qwen/models.json", include_str!("../../assets/catalogs/qwen/models.json")),
|
|
33
|
-
("xai/models.json", include_str!("../../assets/catalogs/xai/models.json")),
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
fn bundled_catalog(relative: &str) -> &'static str {
|
|
37
|
-
MODEL_CATALOGS.iter().find(|(path, _)| *path == relative).map(|(_, contents)| *contents).expect("bundled catalog")
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
|
|
41
|
-
#[serde(rename_all = "camelCase")]
|
|
42
|
-
struct Credential {
|
|
43
|
-
api_key: String,
|
|
44
|
-
region: Option<String>,
|
|
45
|
-
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
46
|
-
base_url: Option<String>,
|
|
47
|
-
}
|
|
48
|
-
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
|
|
49
|
-
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
|
50
|
-
pub struct CustomModel {
|
|
51
|
-
label: String,
|
|
52
|
-
#[serde(rename = "api_id")]
|
|
53
|
-
api_id: String,
|
|
54
|
-
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
55
|
-
context_window: Option<u64>,
|
|
56
|
-
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
57
|
-
description: Option<String>,
|
|
58
|
-
}
|
|
59
|
-
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
|
|
60
|
-
#[serde(rename_all = "camelCase")]
|
|
61
|
-
struct CustomProvider {
|
|
62
|
-
id: String,
|
|
63
|
-
name: String,
|
|
64
|
-
base_url: String,
|
|
65
|
-
models: Vec<CustomModel>,
|
|
66
|
-
api_key: String,
|
|
67
|
-
}
|
|
68
|
-
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
|
69
|
-
struct Saved {
|
|
70
|
-
revision: u64,
|
|
71
|
-
#[serde(default)]
|
|
72
|
-
credentials: BTreeMap<String, Credential>,
|
|
73
|
-
#[serde(default)]
|
|
74
|
-
custom_providers: BTreeMap<String, CustomProvider>,
|
|
75
|
-
#[serde(default)]
|
|
76
|
-
managed: Option<managed::Cache>,
|
|
77
|
-
}
|
|
78
|
-
#[derive(Clone, Serialize)]
|
|
79
|
-
#[serde(rename_all = "camelCase")]
|
|
80
|
-
pub struct Snapshot {
|
|
81
|
-
revision: u64,
|
|
82
|
-
applied_revision: Option<u64>,
|
|
83
|
-
providers: BTreeMap<String, Metadata>,
|
|
84
|
-
custom_providers: Vec<PublicCustomProvider>,
|
|
85
|
-
#[serde(skip_serializing_if = "Vec::is_empty")]
|
|
86
|
-
managed_providers: Vec<PublicCustomProvider>,
|
|
87
|
-
status: &'static str,
|
|
88
|
-
error: Option<String>,
|
|
89
|
-
}
|
|
90
|
-
#[derive(Clone, Serialize)]
|
|
91
|
-
pub struct Metadata {
|
|
92
|
-
configured: bool,
|
|
93
|
-
region: Option<String>,
|
|
94
|
-
base_url: Option<String>,
|
|
95
|
-
}
|
|
96
|
-
#[derive(Clone, Serialize)]
|
|
97
|
-
#[serde(rename_all = "camelCase")]
|
|
98
|
-
pub struct PublicCustomProvider {
|
|
99
|
-
id: String,
|
|
100
|
-
name: String,
|
|
101
|
-
base_url: String,
|
|
102
|
-
models: Vec<CustomModel>,
|
|
103
|
-
}
|
|
104
|
-
struct Inner {
|
|
105
|
-
managed_active: bool,
|
|
106
|
-
saved: Saved,
|
|
107
|
-
applied: BTreeMap<String, AppliedProvider>,
|
|
108
|
-
applied_revision: Option<u64>,
|
|
109
|
-
error: Option<String>,
|
|
110
|
-
}
|
|
111
|
-
/// The plugin's managed state.
|
|
112
|
-
pub struct Providers {
|
|
113
|
-
runtime: Arc<dyn RuntimeAccess>,
|
|
114
|
-
catalogs: PathBuf,
|
|
115
|
-
managed: managed::State,
|
|
116
|
-
auxiliary: tokio::sync::Mutex<BTreeMap<String, Inner>>,
|
|
117
|
-
path: PathBuf,
|
|
118
|
-
inner: tokio::sync::Mutex<Inner>,
|
|
119
|
-
}
|
|
120
|
-
#[derive(Deserialize)]
|
|
121
|
-
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
|
122
|
-
pub struct Input {
|
|
123
|
-
#[serde(default)]
|
|
124
|
-
api_key: Option<String>,
|
|
125
|
-
#[serde(default)]
|
|
126
|
-
region: Option<String>,
|
|
127
|
-
#[serde(default)]
|
|
128
|
-
base_url: Option<String>,
|
|
129
|
-
}
|
|
130
|
-
#[derive(Deserialize)]
|
|
131
|
-
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
|
132
|
-
pub struct CustomInput {
|
|
133
|
-
#[serde(default)]
|
|
134
|
-
id: Option<String>,
|
|
135
|
-
name: String,
|
|
136
|
-
#[serde(default)]
|
|
137
|
-
api_key: Option<String>,
|
|
138
|
-
base_url: String,
|
|
139
|
-
models: Vec<CustomModel>,
|
|
140
|
-
}
|
|
141
|
-
#[derive(Clone, PartialEq)]
|
|
142
|
-
enum AppliedProvider {
|
|
143
|
-
BuiltIn(Credential),
|
|
144
|
-
Custom(CustomProvider),
|
|
145
|
-
}
|
|
146
|
-
#[derive(Serialize)]
|
|
147
|
-
#[serde(rename_all = "camelCase")]
|
|
148
|
-
pub struct TestResult {
|
|
149
|
-
ok: bool,
|
|
150
|
-
code: &'static str,
|
|
151
|
-
message: String,
|
|
152
|
-
status: Option<u16>,
|
|
153
|
-
latency_ms: Option<u128>,
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
impl Providers {
|
|
157
|
-
pub(crate) fn load(app: &AppHandle, runtime: Arc<dyn RuntimeAccess>) -> Result<Self, Box<dyn std::error::Error>> {
|
|
158
|
-
let data = app.path().app_data_dir()?;
|
|
159
|
-
let path = data.join(STORE_FILE);
|
|
160
|
-
let saved = match std::fs::read(&path) {
|
|
161
|
-
Ok(bytes) => serde_json::from_slice(&bytes)?,
|
|
162
|
-
Err(error) if error.kind() == std::io::ErrorKind::NotFound => Saved::default(),
|
|
163
|
-
Err(error) => return Err(error.into()),
|
|
164
|
-
};
|
|
165
|
-
let catalogs = data.join(CATALOG_DIRECTORY);
|
|
166
|
-
write_model_catalogs(&catalogs)?;
|
|
167
|
-
Ok(Self {
|
|
168
|
-
runtime,
|
|
169
|
-
catalogs,
|
|
170
|
-
managed: managed::State::default(),
|
|
171
|
-
auxiliary: tokio::sync::Mutex::new(BTreeMap::new()),
|
|
172
|
-
path,
|
|
173
|
-
inner: tokio::sync::Mutex::new(Inner {
|
|
174
|
-
managed_active: false,
|
|
175
|
-
saved,
|
|
176
|
-
applied: BTreeMap::new(),
|
|
177
|
-
applied_revision: None,
|
|
178
|
-
error: None,
|
|
179
|
-
}),
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
/// Forget what the previous Runtime applied; call when the Runtime (re)starts.
|
|
183
|
-
pub async fn reset(&self) {
|
|
184
|
-
self.managed.gate.lock().unwrap().targets.remove(MAIN_AGENT);
|
|
185
|
-
let mut inner = self.inner.lock().await;
|
|
186
|
-
inner.applied.clear();
|
|
187
|
-
inner.applied_revision = None;
|
|
188
|
-
inner.error = None;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
impl Inner {
|
|
192
|
-
fn snapshot(&self) -> Snapshot {
|
|
193
|
-
Snapshot {
|
|
194
|
-
revision: self.saved.revision,
|
|
195
|
-
applied_revision: self.applied_revision,
|
|
196
|
-
providers: self
|
|
197
|
-
.saved
|
|
198
|
-
.credentials
|
|
199
|
-
.iter()
|
|
200
|
-
.map(|(id, key)| {
|
|
201
|
-
(
|
|
202
|
-
id.clone(),
|
|
203
|
-
Metadata { configured: true, region: key.region.clone(), base_url: key.base_url.clone() },
|
|
204
|
-
)
|
|
205
|
-
})
|
|
206
|
-
.collect(),
|
|
207
|
-
custom_providers: self
|
|
208
|
-
.saved
|
|
209
|
-
.custom_providers
|
|
210
|
-
.values()
|
|
211
|
-
.map(|provider| PublicCustomProvider {
|
|
212
|
-
id: provider.id.clone(),
|
|
213
|
-
name: provider.name.clone(),
|
|
214
|
-
base_url: provider.base_url.clone(),
|
|
215
|
-
models: provider.models.clone(),
|
|
216
|
-
})
|
|
217
|
-
.collect(),
|
|
218
|
-
managed_providers: self
|
|
219
|
-
.saved
|
|
220
|
-
.managed
|
|
221
|
-
.as_ref()
|
|
222
|
-
.filter(|_| self.managed_active)
|
|
223
|
-
.and_then(|cache| cache.provider.as_ref())
|
|
224
|
-
.map(|provider| {
|
|
225
|
-
vec![PublicCustomProvider {
|
|
226
|
-
id: provider.id.clone(),
|
|
227
|
-
name: provider.name.clone(),
|
|
228
|
-
base_url: provider.base_url.clone(),
|
|
229
|
-
models: provider.models.clone(),
|
|
230
|
-
}]
|
|
231
|
-
})
|
|
232
|
-
.unwrap_or_default(),
|
|
233
|
-
status: if self.error.is_some() {
|
|
234
|
-
"failed"
|
|
235
|
-
} else if self.applied_revision == Some(self.saved.revision) {
|
|
236
|
-
"applied"
|
|
237
|
-
} else {
|
|
238
|
-
"pending"
|
|
239
|
-
},
|
|
240
|
-
error: self.error.clone(),
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
fn emit(app: &AppHandle, snapshot: &Snapshot) {
|
|
246
|
-
if let Err(error) = app.emit(CHANGED_EVENT, snapshot) {
|
|
247
|
-
log::warn!("Provider catalog: cannot emit {CHANGED_EVENT}: {error}");
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/// The Codex agent the main conversation runs on.
|
|
252
|
-
pub const MAIN_AGENT: &str = "codex";
|
|
253
|
-
|
|
254
|
-
/// Writes the bundled model catalogs under `directory` (unchanged files are left alone).
|
|
255
|
-
fn write_model_catalogs(directory: &Path) -> Result<(), String> {
|
|
256
|
-
for (relative, contents) in MODEL_CATALOGS {
|
|
257
|
-
let path = directory.join(relative);
|
|
258
|
-
if std::fs::read(&path).is_ok_and(|current| current == contents.as_bytes()) {
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
let parent = path.parent().ok_or("Model catalog path has no directory")?;
|
|
262
|
-
std::fs::create_dir_all(parent).map_err(|e| e.to_string())?;
|
|
263
|
-
let mut file = tempfile::NamedTempFile::new_in(parent).map_err(|e| e.to_string())?;
|
|
264
|
-
file.write_all(contents.as_bytes()).map_err(|e| e.to_string())?;
|
|
265
|
-
file.persist(&path).map_err(|e| e.error.to_string())?;
|
|
266
|
-
}
|
|
267
|
-
Ok(())
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/// Provider model catalogs for a Codex bootstrap that merges them before Codex starts (U's
|
|
271
|
-
/// `CODEX_ACP_MODEL_CATALOGS`). Gateway entries remain hidden in the native catalog; the adapter
|
|
272
|
-
/// advertises only the models registered by configured providers.
|
|
273
|
-
pub fn bundled_model_catalogs(app: &AppHandle) -> Result<Vec<PathBuf>, String> {
|
|
274
|
-
catalog_paths(&app.state::<Providers>().catalogs)
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
fn catalog_paths(directory: &Path) -> Result<Vec<PathBuf>, String> {
|
|
278
|
-
catalog()
|
|
279
|
-
.iter()
|
|
280
|
-
.filter_map(|provider| provider["catalog"].as_str())
|
|
281
|
-
.chain(std::iter::once("custom/models.json"))
|
|
282
|
-
.map(|relative| {
|
|
283
|
-
let path = directory.join(relative);
|
|
284
|
-
if path.is_file() { Ok(path) } else { Err(format!("Model catalog missing at {}", path.display())) }
|
|
285
|
-
})
|
|
286
|
-
.collect()
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
fn catalog() -> Vec<Value> {
|
|
290
|
-
serde_json::from_str(PROVIDER_CATALOG).expect("bundled provider catalog")
|
|
291
|
-
}
|
|
292
|
-
fn managed_definition() -> Value {
|
|
293
|
-
catalog()
|
|
294
|
-
.into_iter()
|
|
295
|
-
.find(|provider| provider["id"] == managed::ID && provider["source"] == "account")
|
|
296
|
-
.expect("bundled ALwith account configuration")
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
fn apply_managed_model_overrides(models: &mut Value) {
|
|
300
|
-
let definition = managed_definition();
|
|
301
|
-
let catalog: Value =
|
|
302
|
-
serde_json::from_str(bundled_catalog("alwith/models.json")).expect("bundled ALwith model catalog");
|
|
303
|
-
for model in models.as_array_mut().expect("provider models") {
|
|
304
|
-
if let Some(configured) =
|
|
305
|
-
definition["models"].as_array().expect("configured models").iter().find(|entry| entry["id"] == model["id"])
|
|
306
|
-
{
|
|
307
|
-
model["label"] = configured["label"].clone();
|
|
308
|
-
}
|
|
309
|
-
if let Some(entry) =
|
|
310
|
-
catalog["models"].as_array().expect("catalog models").iter().find(|entry| entry["slug"] == model["id"])
|
|
311
|
-
{
|
|
312
|
-
model["contextWindow"] = entry["context_window"].clone();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
fn has_custom_model_metadata(provider: &CustomProvider) -> bool {
|
|
318
|
-
let catalog: Value =
|
|
319
|
-
serde_json::from_str(bundled_catalog("custom/models.json")).expect("bundled custom model catalog");
|
|
320
|
-
provider.models.iter().any(|model| {
|
|
321
|
-
catalog["models"].as_array().expect("catalog models").iter().any(|entry| entry["slug"] == model.api_id)
|
|
322
|
-
})
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
fn definition(id: &str) -> Result<Value, String> {
|
|
326
|
-
catalog().into_iter().find(|v| v["id"] == id && v["source"] != "account").ok_or("Unknown provider".into())
|
|
327
|
-
}
|
|
328
|
-
fn update(saved: &Saved, id: String, input: Option<Input>, expected_revision: u64) -> Result<Saved, String> {
|
|
329
|
-
if saved.revision != expected_revision {
|
|
330
|
-
return Err("Provider settings changed in another window; reload and retry".into());
|
|
331
|
-
}
|
|
332
|
-
let provider = definition(&id)?;
|
|
333
|
-
let mut credentials = saved.credentials.clone();
|
|
334
|
-
if let Some(input) = input {
|
|
335
|
-
let region = if let Some(regions) = provider["regions"].as_array() {
|
|
336
|
-
let selected = input.region.as_deref().unwrap_or_else(|| regions[0]["id"].as_str().expect("region id"));
|
|
337
|
-
if !regions.iter().any(|r| r["id"] == selected) {
|
|
338
|
-
return Err("Unknown provider region".into());
|
|
339
|
-
}
|
|
340
|
-
Some(selected.to_string())
|
|
341
|
-
} else {
|
|
342
|
-
None
|
|
343
|
-
};
|
|
344
|
-
let api_key = match input.api_key {
|
|
345
|
-
Some(key) if !key.trim().is_empty() => key.trim().to_string(),
|
|
346
|
-
Some(_) => return Err("API key cannot be empty".into()),
|
|
347
|
-
None => credentials.get(&id).ok_or("Configure an API key first")?.api_key.clone(),
|
|
348
|
-
};
|
|
349
|
-
let base_url = match input.base_url {
|
|
350
|
-
Some(value) if !value.trim().is_empty() => Some(normalize_base_url(&value)?),
|
|
351
|
-
Some(_) => None,
|
|
352
|
-
None => credentials.get(&id).and_then(|current| current.base_url.clone()),
|
|
353
|
-
};
|
|
354
|
-
credentials.insert(id, Credential { api_key, region, base_url });
|
|
355
|
-
} else {
|
|
356
|
-
credentials.remove(&id);
|
|
357
|
-
}
|
|
358
|
-
Ok(Saved {
|
|
359
|
-
managed: saved.managed.clone(),
|
|
360
|
-
revision: saved.revision.checked_add(1).ok_or("Provider revision exhausted")?,
|
|
361
|
-
credentials,
|
|
362
|
-
custom_providers: saved.custom_providers.clone(),
|
|
363
|
-
})
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
fn normalize_base_url(value: &str) -> Result<String, String> {
|
|
367
|
-
let mut url = reqwest::Url::parse(value.trim()).map_err(|_| "API base URL is invalid".to_string())?;
|
|
368
|
-
let local_http = url.scheme() == "http" && matches!(url.host_str(), Some("localhost" | "127.0.0.1" | "::1"));
|
|
369
|
-
if url.scheme() != "https" && !local_http {
|
|
370
|
-
return Err("API base URL must use HTTPS (HTTP is allowed only for localhost)".into());
|
|
371
|
-
}
|
|
372
|
-
if url.query().is_some() || url.fragment().is_some() || !url.username().is_empty() || url.password().is_some() {
|
|
373
|
-
return Err("API base URL cannot contain credentials, query parameters, or a fragment".into());
|
|
374
|
-
}
|
|
375
|
-
let trimmed = url.path().trim_end_matches('/').to_string();
|
|
376
|
-
url.set_path(if trimmed.is_empty() { "" } else { &trimmed });
|
|
377
|
-
Ok(url.to_string().trim_end_matches('/').to_string())
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
fn update_custom(saved: &Saved, input: CustomInput, expected_revision: u64) -> Result<Saved, String> {
|
|
381
|
-
if saved.revision != expected_revision {
|
|
382
|
-
return Err("Provider settings changed in another window; reload and retry".into());
|
|
383
|
-
}
|
|
384
|
-
let id = input.id.unwrap_or_else(|| format!("custom_{}", uuid::Uuid::new_v4().simple()));
|
|
385
|
-
if !id.starts_with("custom_") {
|
|
386
|
-
return Err("Custom provider ID is invalid".into());
|
|
387
|
-
}
|
|
388
|
-
let name = input.name.trim();
|
|
389
|
-
if name.is_empty() {
|
|
390
|
-
return Err("Provider name cannot be empty".into());
|
|
391
|
-
}
|
|
392
|
-
if input.models.is_empty() {
|
|
393
|
-
return Err("Add at least one model".into());
|
|
394
|
-
}
|
|
395
|
-
let mut ids = BTreeSet::new();
|
|
396
|
-
let models = input
|
|
397
|
-
.models
|
|
398
|
-
.into_iter()
|
|
399
|
-
.map(|mut model| {
|
|
400
|
-
model.label = model.label.trim().to_string();
|
|
401
|
-
model.api_id = model.api_id.trim().to_string();
|
|
402
|
-
if model.label.is_empty() || model.api_id.is_empty() {
|
|
403
|
-
return Err("Model label and API ID cannot be empty".to_string());
|
|
404
|
-
}
|
|
405
|
-
if !ids.insert(model.api_id.clone()) {
|
|
406
|
-
return Err("Model IDs must be unique".to_string());
|
|
407
|
-
}
|
|
408
|
-
if model.context_window == Some(0) {
|
|
409
|
-
return Err("Model context window must be greater than zero".to_string());
|
|
410
|
-
}
|
|
411
|
-
Ok(model)
|
|
412
|
-
})
|
|
413
|
-
.collect::<Result<Vec<_>, _>>()?;
|
|
414
|
-
let mut custom_providers = saved.custom_providers.clone();
|
|
415
|
-
let api_key = match input.api_key {
|
|
416
|
-
Some(value) if !value.trim().is_empty() => value.trim().to_string(),
|
|
417
|
-
Some(_) => return Err("API key cannot be empty".into()),
|
|
418
|
-
None => custom_providers.get(&id).ok_or("Configure an API key first")?.api_key.clone(),
|
|
419
|
-
};
|
|
420
|
-
custom_providers.insert(
|
|
421
|
-
id.clone(),
|
|
422
|
-
CustomProvider { id, name: name.to_string(), base_url: normalize_base_url(&input.base_url)?, models, api_key },
|
|
423
|
-
);
|
|
424
|
-
Ok(Saved {
|
|
425
|
-
managed: saved.managed.clone(),
|
|
426
|
-
revision: saved.revision.checked_add(1).ok_or("Provider revision exhausted")?,
|
|
427
|
-
credentials: saved.credentials.clone(),
|
|
428
|
-
custom_providers,
|
|
429
|
-
})
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
fn remove_custom(saved: &Saved, id: &str, expected_revision: u64) -> Result<Saved, String> {
|
|
433
|
-
if saved.revision != expected_revision {
|
|
434
|
-
return Err("Provider settings changed in another window; reload and retry".into());
|
|
435
|
-
}
|
|
436
|
-
let mut custom_providers = saved.custom_providers.clone();
|
|
437
|
-
if custom_providers.remove(id).is_none() {
|
|
438
|
-
return Err("Unknown custom provider".into());
|
|
439
|
-
}
|
|
440
|
-
Ok(Saved {
|
|
441
|
-
managed: saved.managed.clone(),
|
|
442
|
-
revision: saved.revision.checked_add(1).ok_or("Provider revision exhausted")?,
|
|
443
|
-
credentials: saved.credentials.clone(),
|
|
444
|
-
custom_providers,
|
|
445
|
-
})
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
fn classify_response_failure(status: u16, body: &str, secret: &str) -> TestResult {
|
|
449
|
-
let code = match status {
|
|
450
|
-
401 | 403 => "unauthorized",
|
|
451
|
-
404 => "not_found",
|
|
452
|
-
429 => "rate_limited",
|
|
453
|
-
400..=499 => "request_rejected",
|
|
454
|
-
_ => "server_error",
|
|
455
|
-
};
|
|
456
|
-
let parsed = serde_json::from_str::<Value>(body).ok();
|
|
457
|
-
let detail = parsed
|
|
458
|
-
.as_ref()
|
|
459
|
-
.and_then(|value| {
|
|
460
|
-
value.pointer("/error/message").or_else(|| value.get("message")).or_else(|| value.get("detail"))
|
|
461
|
-
})
|
|
462
|
-
.and_then(Value::as_str)
|
|
463
|
-
.unwrap_or("The provider rejected the connection test");
|
|
464
|
-
let mut message = detail.replace(secret, "[redacted]");
|
|
465
|
-
message.truncate(message.floor_char_boundary(300));
|
|
466
|
-
TestResult { ok: false, code, message, status: Some(status), latency_ms: None }
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
fn classify_success_response(status: u16, body: &str, latency_ms: u128) -> TestResult {
|
|
470
|
-
let parsed = serde_json::from_str::<Value>(body).ok();
|
|
471
|
-
let valid = parsed.as_ref().is_some_and(|value| {
|
|
472
|
-
value["object"] == "response"
|
|
473
|
-
&& matches!(value["status"].as_str(), Some("completed" | "incomplete"))
|
|
474
|
-
&& value.get("error").is_none_or(Value::is_null)
|
|
475
|
-
});
|
|
476
|
-
if !valid {
|
|
477
|
-
return TestResult {
|
|
478
|
-
ok: false,
|
|
479
|
-
code: "invalid_response",
|
|
480
|
-
message: "The endpoint did not return a successful Responses API result".into(),
|
|
481
|
-
status: Some(status),
|
|
482
|
-
latency_ms: Some(latency_ms),
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
TestResult {
|
|
486
|
-
ok: true,
|
|
487
|
-
code: "ok",
|
|
488
|
-
message: "Connection succeeded".into(),
|
|
489
|
-
status: Some(status),
|
|
490
|
-
latency_ms: Some(latency_ms),
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
fn persist(path: &Path, saved: &Saved) -> Result<(), String> {
|
|
494
|
-
let directory = path.parent().ok_or("Provider path has no directory")?;
|
|
495
|
-
std::fs::create_dir_all(directory).map_err(|e| e.to_string())?;
|
|
496
|
-
// NamedTempFile is private (0600 on Unix); replacement never exposes a partially written key.
|
|
497
|
-
let mut file = tempfile::NamedTempFile::new_in(directory).map_err(|e| e.to_string())?;
|
|
498
|
-
file.write_all(&serde_json::to_vec(saved).map_err(|e| e.to_string())?).map_err(|e| e.to_string())?;
|
|
499
|
-
file.as_file().sync_all().map_err(|e| e.to_string())?;
|
|
500
|
-
file.persist(path).map_err(|e| e.error.to_string())?;
|
|
501
|
-
Ok(())
|
|
502
|
-
}
|
|
503
|
-
#[tauri::command]
|
|
504
|
-
pub(crate) async fn providers_read(state: State<'_, Providers>) -> Result<Snapshot, String> {
|
|
505
|
-
Ok(state.inner.lock().await.snapshot())
|
|
506
|
-
}
|
|
507
|
-
#[tauri::command]
|
|
508
|
-
pub(crate) async fn providers_save(
|
|
509
|
-
app: AppHandle, state: State<'_, Providers>, provider_id: String, input: Option<Input>, expected_revision: u64,
|
|
510
|
-
) -> Result<Snapshot, String> {
|
|
511
|
-
let _admission = state.runtime.admission(&app).lock().await;
|
|
512
|
-
{
|
|
513
|
-
let mut inner = state.inner.lock().await;
|
|
514
|
-
let next = update(&inner.saved, provider_id, input, expected_revision)?;
|
|
515
|
-
persist(&state.path, &next)?;
|
|
516
|
-
inner.saved = next;
|
|
517
|
-
inner.error = None;
|
|
518
|
-
}
|
|
519
|
-
if let Ok(client) = state.runtime.current(&app) {
|
|
520
|
-
let _ = apply_locked(&app, &client).await;
|
|
521
|
-
}
|
|
522
|
-
let snapshot = state.inner.lock().await.snapshot();
|
|
523
|
-
emit(&app, &snapshot);
|
|
524
|
-
Ok(snapshot)
|
|
525
|
-
}
|
|
526
|
-
#[tauri::command]
|
|
527
|
-
pub(crate) async fn providers_save_custom(
|
|
528
|
-
app: AppHandle, state: State<'_, Providers>, input: CustomInput, expected_revision: u64,
|
|
529
|
-
) -> Result<Snapshot, String> {
|
|
530
|
-
let _admission = state.runtime.admission(&app).lock().await;
|
|
531
|
-
{
|
|
532
|
-
let mut inner = state.inner.lock().await;
|
|
533
|
-
let next = update_custom(&inner.saved, input, expected_revision)?;
|
|
534
|
-
persist(&state.path, &next)?;
|
|
535
|
-
inner.saved = next;
|
|
536
|
-
inner.error = None;
|
|
537
|
-
}
|
|
538
|
-
if let Ok(client) = state.runtime.current(&app) {
|
|
539
|
-
let _ = apply_locked(&app, &client).await;
|
|
540
|
-
}
|
|
541
|
-
let snapshot = state.inner.lock().await.snapshot();
|
|
542
|
-
emit(&app, &snapshot);
|
|
543
|
-
Ok(snapshot)
|
|
544
|
-
}
|
|
545
|
-
#[tauri::command]
|
|
546
|
-
pub(crate) async fn providers_remove_custom(
|
|
547
|
-
app: AppHandle, state: State<'_, Providers>, provider_id: String, expected_revision: u64,
|
|
548
|
-
) -> Result<Snapshot, String> {
|
|
549
|
-
let _admission = state.runtime.admission(&app).lock().await;
|
|
550
|
-
{
|
|
551
|
-
let mut inner = state.inner.lock().await;
|
|
552
|
-
let next = remove_custom(&inner.saved, &provider_id, expected_revision)?;
|
|
553
|
-
persist(&state.path, &next)?;
|
|
554
|
-
inner.saved = next;
|
|
555
|
-
inner.error = None;
|
|
556
|
-
}
|
|
557
|
-
if let Ok(client) = state.runtime.current(&app) {
|
|
558
|
-
let _ = apply_locked(&app, &client).await;
|
|
559
|
-
}
|
|
560
|
-
let snapshot = state.inner.lock().await.snapshot();
|
|
561
|
-
emit(&app, &snapshot);
|
|
562
|
-
Ok(snapshot)
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
#[tauri::command]
|
|
566
|
-
pub(crate) async fn providers_test(state: State<'_, Providers>, provider_id: String) -> Result<TestResult, String> {
|
|
567
|
-
let config = {
|
|
568
|
-
let inner = state.inner.lock().await;
|
|
569
|
-
test_config(&inner.saved, &provider_id)?
|
|
570
|
-
};
|
|
571
|
-
Ok(test_connection(config).await)
|
|
572
|
-
}
|
|
573
|
-
#[tauri::command]
|
|
574
|
-
pub(crate) async fn providers_apply(app: AppHandle, state: State<'_, Providers>) -> Result<Snapshot, String> {
|
|
575
|
-
// Draft preparation can use the applied catalog while another admission is pending.
|
|
576
|
-
// The admission owner schedules reconciliation when it releases the lock.
|
|
577
|
-
let _admission = try_apply_admission(state.runtime.admission(&app))?;
|
|
578
|
-
let client = state.runtime.current(&app)?;
|
|
579
|
-
apply_locked(&app, &client).await?;
|
|
580
|
-
Ok(state.inner.lock().await.snapshot())
|
|
581
|
-
}
|
|
582
|
-
fn try_apply_admission(admission: &tokio::sync::Mutex<()>) -> Result<tokio::sync::MutexGuard<'_, ()>, String> {
|
|
583
|
-
admission.try_lock().map_err(|_| PROVIDERS_PENDING.to_owned())
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/// Configures a newly created auxiliary agent (U's Gamepad AI) with the saved providers;
|
|
587
|
-
/// credentials never leave the native host. The host validates which window and agent may ask.
|
|
588
|
-
/// Auxiliary agents are dedicated: ALwith account cleanup may stop them instead of interrupting
|
|
589
|
-
/// the main conversation.
|
|
590
|
-
pub async fn prepare_agent(app: &AppHandle, agent_id: &str) -> Result<(), String> {
|
|
591
|
-
if agent_id == MAIN_AGENT {
|
|
592
|
-
return Err("The main agent is configured by apply".into());
|
|
593
|
-
}
|
|
594
|
-
let providers = app.state::<Providers>();
|
|
595
|
-
let _admission = providers.runtime.admission(app).lock().await;
|
|
596
|
-
let client = providers.runtime.current(app)?;
|
|
597
|
-
if !client.agents().await.map_err(request_error)?.iter().any(|agent| agent["agentId"] == agent_id) {
|
|
598
|
-
return Err("Agent is not running".into());
|
|
599
|
-
}
|
|
600
|
-
let inner = providers.inner.lock().await;
|
|
601
|
-
let saved = inner.saved.clone();
|
|
602
|
-
let managed_active = inner.managed_active && providers.managed.gate.lock().unwrap().account.is_some();
|
|
603
|
-
if managed_active {
|
|
604
|
-
providers.managed.gate.lock().unwrap().targets.insert(agent_id.to_string());
|
|
605
|
-
}
|
|
606
|
-
drop(inner);
|
|
607
|
-
let mut auxiliary = providers.auxiliary.lock().await;
|
|
608
|
-
let ephemeral = auxiliary.entry(agent_id.to_string()).or_insert_with(|| Inner {
|
|
609
|
-
managed_active,
|
|
610
|
-
saved: saved.clone(),
|
|
611
|
-
applied: BTreeMap::new(),
|
|
612
|
-
applied_revision: None,
|
|
613
|
-
error: None,
|
|
614
|
-
});
|
|
615
|
-
ephemeral.saved = saved;
|
|
616
|
-
if ephemeral.managed_active != managed_active {
|
|
617
|
-
ephemeral.applied_revision = None;
|
|
618
|
-
}
|
|
619
|
-
ephemeral.managed_active = managed_active;
|
|
620
|
-
reconcile_target(ephemeral, &client, &providers.catalogs, agent_id).await
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
/// Applies the saved revision once the current admission owner releases the lock: call it when
|
|
624
|
-
/// the Runtime reports a session idle or after a Runtime restart. A failure is recorded in the
|
|
625
|
-
/// snapshot (`status: "failed"`); nothing is repeated automatically.
|
|
626
|
-
pub fn schedule_apply(app: &AppHandle) {
|
|
627
|
-
let app = app.clone();
|
|
628
|
-
tauri::async_runtime::spawn(async move {
|
|
629
|
-
let providers = app.state::<Providers>();
|
|
630
|
-
if let Ok(_transition) = providers.managed.transition.try_lock()
|
|
631
|
-
&& let Err(error) = managed::cleanup(&app).await
|
|
632
|
-
{
|
|
633
|
-
let mut inner = providers.inner.lock().await;
|
|
634
|
-
inner.error = Some(error);
|
|
635
|
-
emit(&app, &inner.snapshot());
|
|
636
|
-
return;
|
|
637
|
-
}
|
|
638
|
-
// The last idle notification may arrive while another admission still owns the lock;
|
|
639
|
-
// wait for it so a saved revision cannot remain pending.
|
|
640
|
-
let _admission = providers.runtime.admission(&app).lock().await;
|
|
641
|
-
if let Ok(client) = providers.runtime.current(&app) {
|
|
642
|
-
let _ = apply_locked(&app, &client).await;
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
/// Applies the saved revision to the main agent and every prepared auxiliary agent. The caller
|
|
647
|
-
/// holds the Runtime admission lock.
|
|
648
|
-
pub async fn apply_locked(app: &AppHandle, client: &Arc<RuntimeClient>) -> Result<(), String> {
|
|
649
|
-
let state = app.state::<Providers>();
|
|
650
|
-
let mut inner = state.inner.lock().await;
|
|
651
|
-
if state.managed.gate.lock().unwrap().account.is_none() && inner.managed_active {
|
|
652
|
-
inner.managed_active = false;
|
|
653
|
-
inner.applied_revision = None;
|
|
654
|
-
}
|
|
655
|
-
if inner.managed_active && inner.saved.managed.as_ref().is_some_and(|cache| cache.provider.is_some()) {
|
|
656
|
-
state.managed.gate.lock().unwrap().targets.insert(MAIN_AGENT.into());
|
|
657
|
-
}
|
|
658
|
-
let outcome = reconcile(&mut inner, client, &state.catalogs).await;
|
|
659
|
-
emit(app, &inner.snapshot());
|
|
660
|
-
let saved = inner.saved.clone();
|
|
661
|
-
let active = inner.managed_active;
|
|
662
|
-
drop(inner);
|
|
663
|
-
let mut auxiliary = state.auxiliary.lock().await;
|
|
664
|
-
if !auxiliary.is_empty() {
|
|
665
|
-
let live = client.agents().await.map_err(request_error)?;
|
|
666
|
-
auxiliary.retain(|id, _| live.iter().any(|agent| agent["agentId"] == *id));
|
|
667
|
-
for (id, target) in auxiliary.iter_mut() {
|
|
668
|
-
target.saved = saved.clone();
|
|
669
|
-
if target.managed_active != active {
|
|
670
|
-
target.applied_revision = None;
|
|
671
|
-
}
|
|
672
|
-
target.managed_active = active;
|
|
673
|
-
if active {
|
|
674
|
-
state.managed.gate.lock().unwrap().targets.insert(id.clone());
|
|
675
|
-
}
|
|
676
|
-
reconcile_target(target, client, &state.catalogs, id).await?;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
outcome
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
fn request_error(error: ResponseError) -> String {
|
|
683
|
-
let details = error.data.filter(|data| !data.is_null()).map(|data| format!("; data: {data}")).unwrap_or_default();
|
|
684
|
-
format!("Runtime request failed ({}): {}{details}", error.code, error.message)
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
fn custom_model_catalog(models: &[CustomModel]) -> Result<PathBuf, String> {
|
|
688
|
-
use sha2::{Digest, Sha256};
|
|
689
|
-
// Reuse the app's generic coding instructions, with explicit custom endpoint capabilities.
|
|
690
|
-
let template: Value = serde_json::from_str(bundled_catalog("qwen/models.json")).map_err(|e| e.to_string())?;
|
|
691
|
-
let entries: Vec<Value> = models
|
|
692
|
-
.iter()
|
|
693
|
-
.map(|model| {
|
|
694
|
-
json!({
|
|
695
|
-
"slug": model.api_id, "display_name": model.label, "description": model.description,
|
|
696
|
-
"base_instructions": template["models"][0]["base_instructions"],
|
|
697
|
-
"supported_reasoning_levels": [], "shell_type": "shell_command",
|
|
698
|
-
"visibility": "list", "supported_in_api": true, "priority": 0,
|
|
699
|
-
"support_verbosity": false, "supports_reasoning_summary_parameter": false,
|
|
700
|
-
"truncation_policy": {"mode": "bytes", "limit": 10000},
|
|
701
|
-
"experimental_supported_tools": [], "input_modalities": ["text"],
|
|
702
|
-
"context_window": model.context_window, "max_context_window": model.context_window,
|
|
703
|
-
"apply_patch_tool_type": "freeform", "tool_mode": "direct",
|
|
704
|
-
"include_apps_usage_instructions": false
|
|
705
|
-
})
|
|
706
|
-
})
|
|
707
|
-
.collect();
|
|
708
|
-
let bytes = serde_json::to_vec(&json!({"models": entries})).map_err(|e| e.to_string())?;
|
|
709
|
-
let path = std::env::temp_dir().join(format!("alwith-model-catalog-{}.json", hex::encode(Sha256::digest(&bytes))));
|
|
710
|
-
let mut file = tempfile::NamedTempFile::new_in(std::env::temp_dir()).map_err(|e| e.to_string())?;
|
|
711
|
-
file.write_all(&bytes).map_err(|e| e.to_string())?;
|
|
712
|
-
file.persist(&path).map_err(|e| e.to_string())?;
|
|
713
|
-
Ok(path)
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
async fn reconcile(inner: &mut Inner, client: &RuntimeClient, catalogs: &Path) -> Result<(), String> {
|
|
717
|
-
reconcile_target(inner, client, catalogs, MAIN_AGENT).await
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
async fn reconcile_target(
|
|
721
|
-
inner: &mut Inner, client: &RuntimeClient, catalogs: &Path, agent_id: &str,
|
|
722
|
-
) -> Result<(), String> {
|
|
723
|
-
if inner.applied_revision == Some(inner.saved.revision) {
|
|
724
|
-
return Ok(());
|
|
725
|
-
}
|
|
726
|
-
// The adapter owns session routing and rejects only changes affecting busy sessions.
|
|
727
|
-
// A global Runtime idle check would also block unrelated provider additions.
|
|
728
|
-
let mut pending = false;
|
|
729
|
-
let mut failures = Vec::new();
|
|
730
|
-
let desired: BTreeMap<String, AppliedProvider> = inner
|
|
731
|
-
.saved
|
|
732
|
-
.credentials
|
|
733
|
-
.iter()
|
|
734
|
-
.map(|(id, key)| (id.clone(), AppliedProvider::BuiltIn(key.clone())))
|
|
735
|
-
.chain(
|
|
736
|
-
inner
|
|
737
|
-
.saved
|
|
738
|
-
.custom_providers
|
|
739
|
-
.iter()
|
|
740
|
-
.map(|(id, provider)| (id.clone(), AppliedProvider::Custom(provider.clone()))),
|
|
741
|
-
)
|
|
742
|
-
.chain(
|
|
743
|
-
inner
|
|
744
|
-
.saved
|
|
745
|
-
.managed
|
|
746
|
-
.as_ref()
|
|
747
|
-
.filter(|_| inner.managed_active)
|
|
748
|
-
.and_then(|cache| cache.provider.as_ref())
|
|
749
|
-
.map(|provider| (managed::ID.to_string(), AppliedProvider::Custom(provider.clone()))),
|
|
750
|
-
)
|
|
751
|
-
.collect();
|
|
752
|
-
// A revision without catalog changes does not need an idle boundary.
|
|
753
|
-
if inner.applied == desired {
|
|
754
|
-
inner.applied_revision = Some(inner.saved.revision);
|
|
755
|
-
inner.error = None;
|
|
756
|
-
return Ok(());
|
|
757
|
-
}
|
|
758
|
-
let outcome: Result<(), String> = async {
|
|
759
|
-
for (id, selected) in &desired {
|
|
760
|
-
if inner.applied.get(id) == Some(selected) { continue; }
|
|
761
|
-
let runtime_id = runtime_provider_id(id);
|
|
762
|
-
let (name, base_url, bearer_token, mut models, mut config, bundled_catalog) = match selected {
|
|
763
|
-
AppliedProvider::BuiltIn(key) => {
|
|
764
|
-
let provider = definition(id)?;
|
|
765
|
-
let default_url = match key.region.as_deref() {
|
|
766
|
-
Some(region) => provider["regions"].as_array().and_then(|regions| regions.iter().find(|r| r["id"] == region)).map(|r| r["baseUrl"].clone()).ok_or("Unknown provider region")?,
|
|
767
|
-
None => provider["baseUrl"].clone(),
|
|
768
|
-
};
|
|
769
|
-
(provider["name"].clone(), key.base_url.clone().map(Value::String).unwrap_or(default_url), key.api_key.clone(), provider["models"].clone(), provider.get("config").cloned().unwrap_or(json!({})), provider["catalog"].as_str().map(str::to_string))
|
|
770
|
-
}
|
|
771
|
-
AppliedProvider::Custom(provider) => {
|
|
772
|
-
let known = has_custom_model_metadata(provider);
|
|
773
|
-
(
|
|
774
|
-
Value::String(provider.name.clone()),
|
|
775
|
-
Value::String(provider.base_url.clone()),
|
|
776
|
-
provider.api_key.clone(),
|
|
777
|
-
Value::Array(provider.models.iter().map(|model| json!({
|
|
778
|
-
"id": model.api_id,
|
|
779
|
-
"label": model.label,
|
|
780
|
-
"description": model.description,
|
|
781
|
-
"contextWindow": model.context_window,
|
|
782
|
-
})).collect()),
|
|
783
|
-
// Uncatalogued Responses endpoints use direct tools; catalogued models keep their declared capabilities.
|
|
784
|
-
if known { json!({"web_search": "disabled", "model_reasoning_summary": "none"}) } else { json!({"features": {"code_mode": false, "code_mode_only": false}}) },
|
|
785
|
-
known.then(|| "custom/models.json".to_string()),
|
|
786
|
-
)},
|
|
787
|
-
};
|
|
788
|
-
let bundled_catalog = if id == managed::ID {
|
|
789
|
-
let definition = managed_definition();
|
|
790
|
-
apply_managed_model_overrides(&mut models);
|
|
791
|
-
config = definition["config"].clone();
|
|
792
|
-
definition["catalog"].as_str().map(str::to_string)
|
|
793
|
-
} else {
|
|
794
|
-
bundled_catalog
|
|
795
|
-
};
|
|
796
|
-
if let Some(catalog) = bundled_catalog {
|
|
797
|
-
config["model_catalog_json"] = json!(catalogs.join(catalog));
|
|
798
|
-
} else if let AppliedProvider::Custom(provider) = selected {
|
|
799
|
-
config["model_catalog_json"] = json!(custom_model_catalog(&provider.models)?);
|
|
800
|
-
}
|
|
801
|
-
let result = client.acp_request(agent_id, "providers/set", json!({"providerId":"openai", "apiType":"openai", "baseUrl":base_url,
|
|
802
|
-
"_meta":{"codex":{"id":runtime_id,"name":name,"mode":"catalog","bearerToken":bearer_token,"config":config}, "alwith":{"models":models}}}), None, None)
|
|
803
|
-
;
|
|
804
|
-
let result = tokio::time::timeout(std::time::Duration::from_secs(10), result).await
|
|
805
|
-
.unwrap_or_else(|_| Err(ResponseError::runtime("Provider configuration timed out")));
|
|
806
|
-
if let Err(error) = result {
|
|
807
|
-
record_application_error(id, "apply", &error, &mut pending, &mut failures);
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
|
-
inner.applied.insert(id.clone(), selected.clone());
|
|
811
|
-
}
|
|
812
|
-
let removed: Vec<_> = inner.applied.keys().filter(|id| !desired.contains_key(*id)).cloned().collect();
|
|
813
|
-
for id in removed {
|
|
814
|
-
let result = client.acp_request(agent_id, "providers/disable", json!({"providerId":"openai","_meta":{"codex":{"id":runtime_provider_id(&id)}}}), None, None)
|
|
815
|
-
;
|
|
816
|
-
let result = tokio::time::timeout(std::time::Duration::from_secs(10), result).await
|
|
817
|
-
.unwrap_or_else(|_| Err(ResponseError::runtime("Provider configuration timed out")));
|
|
818
|
-
if let Err(error) = result {
|
|
819
|
-
record_application_error(&id, "remove", &error, &mut pending, &mut failures);
|
|
820
|
-
continue;
|
|
821
|
-
}
|
|
822
|
-
inner.applied.remove(&id);
|
|
823
|
-
}
|
|
824
|
-
Ok(())
|
|
825
|
-
}.await;
|
|
826
|
-
inner.error = outcome.err().or_else(|| (!failures.is_empty()).then(|| failures.join("; ")));
|
|
827
|
-
if inner.error.is_none() && !pending {
|
|
828
|
-
inner.applied_revision = Some(inner.saved.revision);
|
|
829
|
-
}
|
|
830
|
-
log::info!(
|
|
831
|
-
"Provider catalog: agent={agent_id} saved_revision={} applied_revision={:?} status={} pending_affected_sessions={pending}",
|
|
832
|
-
inner.saved.revision,
|
|
833
|
-
inner.applied_revision,
|
|
834
|
-
inner.snapshot().status
|
|
835
|
-
);
|
|
836
|
-
if let Some(error) = &inner.error {
|
|
837
|
-
Err(error.clone())
|
|
838
|
-
} else if pending {
|
|
839
|
-
Err(PROVIDERS_PENDING.into())
|
|
840
|
-
} else {
|
|
841
|
-
Ok(())
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
const PROVIDERS_PENDING: &str = "Provider settings are pending; waiting for affected sessions to finish";
|
|
846
|
-
|
|
847
|
-
/// Whether an apply error only means that busy sessions hold the remaining changes.
|
|
848
|
-
pub fn application_pending(error: &str) -> bool {
|
|
849
|
-
error == PROVIDERS_PENDING
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
fn record_application_error(
|
|
853
|
-
id: &str, operation: &str, error: &ResponseError, pending: &mut bool, failures: &mut Vec<String>,
|
|
854
|
-
) {
|
|
855
|
-
// Match the installed adapter's busy response exactly; other invalid requests are failures.
|
|
856
|
-
let busy = error.code == -32600
|
|
857
|
-
&& error.message == "Invalid request: Wait for affected sessions to finish before changing their provider";
|
|
858
|
-
log::warn!("Provider catalog: provider={id} operation={operation} code={} waiting_for_sessions={busy}", error.code);
|
|
859
|
-
if busy {
|
|
860
|
-
*pending = true;
|
|
861
|
-
} else {
|
|
862
|
-
failures.push(format!("Provider {id} could not {operation} ({}); retry to apply saved settings", error.code));
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
/// Preserve saved IDs while encoding custom IDs without collisions for the adapter's [a-z0-9-]+ grammar.
|
|
867
|
-
/// Keep this mapping aligned with gatewayModelId in src/settings/providers.ts.
|
|
868
|
-
fn runtime_provider_id(id: &str) -> String {
|
|
869
|
-
if id.starts_with("custom_") {
|
|
870
|
-
format!("custom-{}", id.bytes().map(|byte| format!("{byte:02x}")).collect::<String>())
|
|
871
|
-
} else {
|
|
872
|
-
id.to_string()
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
#[derive(Clone)]
|
|
877
|
-
struct TestConfig {
|
|
878
|
-
base_url: String,
|
|
879
|
-
api_key: String,
|
|
880
|
-
model: String,
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
fn test_config(saved: &Saved, id: &str) -> Result<TestConfig, String> {
|
|
884
|
-
if let Some(provider) = saved.custom_providers.get(id) {
|
|
885
|
-
return Ok(TestConfig {
|
|
886
|
-
base_url: provider.base_url.clone(),
|
|
887
|
-
api_key: provider.api_key.clone(),
|
|
888
|
-
model: provider.models.first().ok_or("Add at least one model")?.api_id.clone(),
|
|
889
|
-
});
|
|
890
|
-
}
|
|
891
|
-
let key = saved.credentials.get(id).ok_or("Configure and save this provider first")?;
|
|
892
|
-
let provider = definition(id)?;
|
|
893
|
-
let base_url = if let Some(url) = &key.base_url {
|
|
894
|
-
url.clone()
|
|
895
|
-
} else if let Some(region) = key.region.as_deref() {
|
|
896
|
-
provider["regions"]
|
|
897
|
-
.as_array()
|
|
898
|
-
.and_then(|regions| regions.iter().find(|item| item["id"] == region))
|
|
899
|
-
.and_then(|item| item["baseUrl"].as_str())
|
|
900
|
-
.ok_or("Unknown provider region")?
|
|
901
|
-
.to_string()
|
|
902
|
-
} else {
|
|
903
|
-
provider["baseUrl"].as_str().ok_or("Provider has no API base URL")?.to_string()
|
|
904
|
-
};
|
|
905
|
-
let model = provider["models"]
|
|
906
|
-
.as_array()
|
|
907
|
-
.and_then(|models| models.first())
|
|
908
|
-
.and_then(|model| model["id"].as_str())
|
|
909
|
-
.ok_or("Provider has no models")?
|
|
910
|
-
.to_string();
|
|
911
|
-
Ok(TestConfig { base_url, api_key: key.api_key.clone(), model })
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
async fn test_connection(config: TestConfig) -> TestResult {
|
|
915
|
-
let started = Instant::now();
|
|
916
|
-
let client = match reqwest::Client::builder().timeout(std::time::Duration::from_secs(20)).build() {
|
|
917
|
-
Ok(client) => client,
|
|
918
|
-
Err(error) => {
|
|
919
|
-
return TestResult {
|
|
920
|
-
ok: false,
|
|
921
|
-
code: "network",
|
|
922
|
-
message: error.to_string(),
|
|
923
|
-
status: None,
|
|
924
|
-
latency_ms: None,
|
|
925
|
-
};
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
let request = match build_test_request(&client, &config) {
|
|
929
|
-
Ok(request) => request,
|
|
930
|
-
Err(error) => {
|
|
931
|
-
return TestResult {
|
|
932
|
-
ok: false,
|
|
933
|
-
code: "request_failed",
|
|
934
|
-
message: error.to_string(),
|
|
935
|
-
status: None,
|
|
936
|
-
latency_ms: None,
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
let response = client.execute(request).await;
|
|
941
|
-
match response {
|
|
942
|
-
Ok(response) if response.status().is_success() => {
|
|
943
|
-
let status = response.status().as_u16();
|
|
944
|
-
match response.text().await {
|
|
945
|
-
Ok(body) => classify_success_response(status, &body, started.elapsed().as_millis()),
|
|
946
|
-
Err(error) => TestResult {
|
|
947
|
-
ok: false,
|
|
948
|
-
code: "invalid_response",
|
|
949
|
-
message: error.to_string(),
|
|
950
|
-
status: Some(status),
|
|
951
|
-
latency_ms: Some(started.elapsed().as_millis()),
|
|
952
|
-
},
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
Ok(response) => {
|
|
956
|
-
let status = response.status().as_u16();
|
|
957
|
-
let body = response.text().await.unwrap_or_default();
|
|
958
|
-
classify_response_failure(status, &body, &config.api_key)
|
|
959
|
-
}
|
|
960
|
-
Err(error) => {
|
|
961
|
-
let code = if error.is_timeout() {
|
|
962
|
-
"timeout"
|
|
963
|
-
} else if error.is_connect() {
|
|
964
|
-
"network"
|
|
965
|
-
} else {
|
|
966
|
-
"request_failed"
|
|
967
|
-
};
|
|
968
|
-
let mut message = error.to_string().replace(&config.api_key, "[redacted]");
|
|
969
|
-
message.truncate(message.floor_char_boundary(300));
|
|
970
|
-
TestResult { ok: false, code, message, status: None, latency_ms: None }
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
fn build_test_request(client: &reqwest::Client, config: &TestConfig) -> Result<reqwest::Request, reqwest::Error> {
|
|
976
|
-
client
|
|
977
|
-
.post(format!("{}/responses", config.base_url.trim_end_matches('/')))
|
|
978
|
-
.bearer_auth(&config.api_key)
|
|
979
|
-
.json(&json!({"model": config.model, "input": "Reply with OK.", "max_output_tokens": 16, "store": false}))
|
|
980
|
-
.build()
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
#[cfg(test)]
|
|
984
|
-
mod tests;
|