@alwith/module-chat 0.6.25 → 0.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -34
- package/dist/agent/client.d.ts +1 -4
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +21 -15
- package/dist/application-tools.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-mc21sg7m.js → chunk-0e5dx357.js} +1 -1
- package/dist/{chunk-arm9x6kc.js → chunk-0enb3f4n.js} +2 -2
- package/dist/{chunk-e8p4wkbg.js → chunk-0g1hc09b.js} +1 -1
- package/dist/{chunk-knxes674.js → chunk-0jg7hgp5.js} +2 -2
- package/dist/{chunk-27gr882d.js → chunk-0m4s668v.js} +2 -2
- package/dist/{chunk-cf85zhvf.js → chunk-16dyzkha.js} +1 -1
- package/dist/{chunk-dr5swvaa.js → chunk-18kdsdmy.js} +2 -2
- package/dist/{chunk-x2wcwpw3.js → chunk-1wr1ef9x.js} +2 -2
- package/dist/{chunk-zq26pxze.js → chunk-24y0mvqf.js} +2 -2
- package/dist/{chunk-q9b2wsdg.js → chunk-2bbdgf43.js} +2 -2
- package/dist/{chunk-tcg99k9e.js → chunk-2yvj9k42.js} +1 -1
- package/dist/{chunk-g4qwh2sx.js → chunk-30nre2gw.js} +1 -1
- package/dist/{chunk-sjb5stzq.js → chunk-317w17va.js} +2 -2
- package/dist/{chunk-2x5m7g33.js → chunk-3hsft68c.js} +1 -1
- package/dist/{chunk-vfszr27e.js → chunk-3nawfa7b.js} +2 -2
- package/dist/{chunk-d06382wz.js → chunk-3qedn07q.js} +2 -2
- package/dist/{chunk-c2r7xpjf.js → chunk-3z86hy2s.js} +2 -2
- package/dist/{chunk-5m2ydb9j.js → chunk-4a4awnss.js} +2 -2
- package/dist/{chunk-npkk2gzs.js → chunk-4d9sajzj.js} +2 -2
- package/dist/{chunk-1d29gnb2.js → chunk-4g1s7gdh.js} +2 -2
- package/dist/{chunk-x8rfc6wc.js → chunk-4sfxcw58.js} +3 -3
- package/dist/chunk-51xk5tw2.js +2 -0
- package/dist/chunk-53r6pr16.js +2 -0
- package/dist/{chunk-k7z0pgrt.js → chunk-55m88zbv.js} +2 -2
- package/dist/{chunk-kvc3ghat.js → chunk-5bhp61sd.js} +1 -1
- package/dist/chunk-5mjs63fv.js +2 -0
- package/dist/chunk-5x5n3b15.js +2 -0
- package/dist/{chunk-fyxetwxv.js → chunk-64cbt3ym.js} +2 -2
- package/dist/{chunk-3q2zdv9e.js → chunk-6c8wzcja.js} +1 -1
- package/dist/{chunk-mvnze5ts.js → chunk-6e84zbgs.js} +2 -2
- package/dist/{chunk-rd9cgt8p.js → chunk-6ym1a5wa.js} +1 -1
- package/dist/{chunk-ma7thf1j.js → chunk-747qe35q.js} +1 -1
- package/dist/{chunk-ry7bxdb6.js → chunk-75dr7tyz.js} +2 -2
- package/dist/{chunk-6bbtfd0j.js → chunk-7hxdns4x.js} +1 -1
- package/dist/{chunk-18xfysvb.js → chunk-7ng6qs9c.js} +1 -1
- package/dist/{chunk-6f06hbsk.js → chunk-7rtwekkz.js} +2 -2
- package/dist/{chunk-91kpcajz.js → chunk-7s7cevjh.js} +2 -2
- package/dist/chunk-7zww33h8.js +2 -0
- package/dist/{chunk-byvw0vam.js → chunk-81838qem.js} +2 -2
- package/dist/{chunk-ar1bwfn3.js → chunk-84ncszbf.js} +1 -1
- package/dist/{chunk-952vsa4r.js → chunk-8gt8yn8k.js} +2 -2
- package/dist/{chunk-hyhp5ytm.js → chunk-8wk3e4z7.js} +2 -2
- package/dist/{chunk-d0s10qy5.js → chunk-95ywdfe0.js} +2 -2
- package/dist/chunk-9nbkggqn.js +2 -0
- package/dist/chunk-9neb2f30.js +2 -0
- package/dist/{chunk-a6ns5agq.js → chunk-9wc4emwt.js} +2 -2
- package/dist/{chunk-n32wra9r.js → chunk-acf4sdp7.js} +2 -2
- package/dist/{chunk-89j37t04.js → chunk-ag2t01q7.js} +2 -2
- package/dist/{chunk-yn6a84c7.js → chunk-aht6f6tf.js} +2 -2
- package/dist/{chunk-x1aw1r1v.js → chunk-amf0m4tb.js} +2 -2
- package/dist/{chunk-e3bpr3yx.js → chunk-axvjn527.js} +2 -2
- package/dist/{chunk-4t0f01ec.js → chunk-b2n5sj31.js} +1 -1
- package/dist/chunk-bapn03er.js +2 -0
- package/dist/{chunk-jn8b4qrh.js → chunk-bbrx6m7n.js} +2 -2
- package/dist/{chunk-m799f2x5.js → chunk-bztkz3dz.js} +2 -2
- package/dist/{chunk-h82jte5p.js → chunk-bzzx1y15.js} +2 -2
- package/dist/{chunk-gttw4rmx.js → chunk-c22xq7a3.js} +2 -2
- package/dist/{chunk-tcp7c2s0.js → chunk-c7qzvt21.js} +3 -3
- package/dist/chunk-cans04tz.js +3 -0
- package/dist/chunk-cdxdjn5n.js +2 -0
- package/dist/{chunk-4gftpery.js → chunk-cgnzqmqd.js} +2 -2
- package/dist/{chunk-c2ez86jz.js → chunk-chn1mkv0.js} +1 -1
- package/dist/{chunk-z76as4dt.js → chunk-cp4wxmh5.js} +1 -1
- package/dist/chunk-cv0qbty5.js +3 -0
- package/dist/{chunk-0jj029k8.js → chunk-d582db8v.js} +2 -2
- package/dist/{chunk-pw22g3k1.js → chunk-d71nz1je.js} +2 -2
- package/dist/{chunk-jzbg0cx9.js → chunk-dd9k5bbt.js} +2 -2
- package/dist/{chunk-xvg3d2z6.js → chunk-dx5hh359.js} +2 -2
- package/dist/{chunk-7m83dwzq.js → chunk-e3nccytb.js} +1 -1
- package/dist/{chunk-ee7a5gft.js → chunk-e9nvbe3j.js} +1 -1
- package/dist/{chunk-zxfx7psd.js → chunk-ermc9p1p.js} +2 -2
- package/dist/{chunk-w63mha8c.js → chunk-erp1g3as.js} +2 -2
- package/dist/{chunk-jy0jrht0.js → chunk-exrd2xzz.js} +2 -2
- package/dist/{chunk-e13mpwt8.js → chunk-eynwjzqp.js} +2 -2
- package/dist/{chunk-zj7kjjdj.js → chunk-fnm2xznx.js} +1 -1
- package/dist/{chunk-j1frpcqd.js → chunk-fwb6tf7m.js} +2 -2
- package/dist/{chunk-8f5w2tnp.js → chunk-g3y0r56h.js} +1 -1
- package/dist/{chunk-gxb9n7g7.js → chunk-gbsn1qep.js} +3 -3
- package/dist/{chunk-yq4wz4n8.js → chunk-gjtxked2.js} +2 -2
- package/dist/{chunk-n7y094nf.js → chunk-grfrfh7s.js} +1 -1
- package/dist/chunk-h1kvdf3t.js +2 -0
- package/dist/{chunk-wk26bzjj.js → chunk-h3mwzf3d.js} +2 -2
- package/dist/{chunk-bve6cykn.js → chunk-hd11bfmp.js} +2 -2
- package/dist/{chunk-5c42mfat.js → chunk-hf5bpahd.js} +1 -1
- package/dist/{chunk-m0r0v983.js → chunk-j2ffde9c.js} +2 -2
- package/dist/{chunk-z107z7dt.js → chunk-j4w2hbbe.js} +2 -2
- package/dist/{chunk-nfwa8qkt.js → chunk-j62heyzq.js} +1 -1
- package/dist/{chunk-snrbgnwn.js → chunk-j8zpjnf8.js} +2 -2
- package/dist/{chunk-er7ewrf2.js → chunk-jdwd4ta9.js} +3 -3
- package/dist/{chunk-3zsqg6wr.js → chunk-je27hf3t.js} +3 -3
- package/dist/{chunk-2rbaebnr.js → chunk-jmc7ddz8.js} +2 -2
- package/dist/{chunk-ja7x2gvb.js → chunk-jvy6p83k.js} +1 -1
- package/dist/{chunk-0a7vp0ph.js → chunk-knrc6kks.js} +2 -2
- package/dist/{chunk-8qszap2n.js → chunk-kqwfwck2.js} +1 -1
- package/dist/{chunk-beccgzp9.js → chunk-m2n6sxf8.js} +2 -2
- package/dist/{chunk-2kbp0pbe.js → chunk-m68t534g.js} +2 -2
- package/dist/{chunk-b6sfe0k7.js → chunk-ma6ycen5.js} +2 -2
- package/dist/{chunk-gxx5yh45.js → chunk-mckz9qv5.js} +1 -1
- package/dist/{chunk-xx7t8r87.js → chunk-mfmh7ztq.js} +2 -2
- package/dist/{chunk-bcdmjgab.js → chunk-n4wp3h3j.js} +1 -1
- package/dist/{chunk-j5dqww4h.js → chunk-njqan8zg.js} +1 -1
- package/dist/chunk-nvb46gdw.js +2 -0
- package/dist/{chunk-xpfy5g6z.js → chunk-p96vgnxw.js} +1 -1
- package/dist/{chunk-r940xwxq.js → chunk-pebkk426.js} +2 -2
- package/dist/{chunk-9w1vcmbd.js → chunk-pzwnrxvk.js} +2 -2
- package/dist/{chunk-809b75k1.js → chunk-q3s59jyn.js} +2 -2
- package/dist/{chunk-zgqrv879.js → chunk-qa9p0a64.js} +3 -3
- package/dist/{chunk-113maskf.js → chunk-qceex4vv.js} +2 -2
- package/dist/chunk-qkn0y5wx.js +2 -0
- package/dist/{chunk-nwyem2d7.js → chunk-qzerhkyb.js} +2 -2
- package/dist/{chunk-c06k7g9n.js → chunk-qzn6qtmy.js} +1 -1
- package/dist/{chunk-44r55va6.js → chunk-r5f77gtx.js} +2 -2
- package/dist/{chunk-6p4gk1zy.js → chunk-rkwq0grt.js} +2 -2
- package/dist/{chunk-hmy4snze.js → chunk-rn54592t.js} +1 -1
- package/dist/{chunk-sn3sk1j0.js → chunk-s8cj6aw6.js} +1 -1
- package/dist/{chunk-ert67qk1.js → chunk-syjt7y4v.js} +2 -2
- package/dist/{chunk-2wfgbxet.js → chunk-t9t53gsj.js} +1 -1
- package/dist/{chunk-sxz82jq3.js → chunk-tgnftxyb.js} +2 -2
- package/dist/{chunk-51x80v4h.js → chunk-tr0bmqn9.js} +2 -2
- package/dist/{chunk-f54k9xxv.js → chunk-v0wmy9b3.js} +1 -1
- package/dist/{chunk-0j5z842s.js → chunk-v2pa8yak.js} +2 -2
- package/dist/{chunk-wm6zdp7w.js → chunk-v32jvbgx.js} +1 -1
- package/dist/chunk-v3v2twfm.js +2 -0
- package/dist/{chunk-myjsfbp6.js → chunk-v96vkrw2.js} +2 -2
- package/dist/{chunk-ad53zbdb.js → chunk-v9weanq6.js} +2 -2
- package/dist/{chunk-621eg04b.js → chunk-vd6eqshg.js} +1 -1
- package/dist/{chunk-0s2zcz5f.js → chunk-vdt7cp6c.js} +2 -2
- package/dist/{chunk-j2k2mc13.js → chunk-vmfhnkxj.js} +1 -1
- package/dist/{chunk-na6b1fpn.js → chunk-vqby71fp.js} +1 -1
- package/dist/{chunk-dnrcx75n.js → chunk-vzgn8exd.js} +1 -1
- package/dist/{chunk-vyzq2pbd.js → chunk-w562jf57.js} +1 -1
- package/dist/{chunk-yj42tq3z.js → chunk-w5zvy4ex.js} +1 -1
- package/dist/{chunk-3qy743j9.js → chunk-wde0m4pf.js} +3 -3
- package/dist/{chunk-khs8cfkd.js → chunk-why9g2kd.js} +1 -1
- package/dist/{chunk-vhxavb92.js → chunk-xe7ep70k.js} +1 -1
- package/dist/{chunk-cq3j51m2.js → chunk-xnbvdqnt.js} +2 -2
- package/dist/{chunk-7jk8s061.js → chunk-xwwjj45a.js} +2 -2
- package/dist/{chunk-q1kb5z75.js → chunk-y4tj08c1.js} +1 -1
- package/dist/chunk-y8gz9rsc.js +2 -0
- package/dist/{chunk-bw3bpr6m.js → chunk-ypdh88cj.js} +2 -2
- package/dist/{chunk-dba0ttve.js → chunk-z6dx6dnt.js} +1 -1
- package/dist/chunk-zm0j9nw3.js +2 -0
- package/dist/{chunk-2w4kyd2a.js → chunk-zw4ehzza.js} +3 -3
- package/dist/{chunk-vnwt4f99.js → chunk-zypgrbd9.js} +1 -1
- package/dist/chunk-zzz6kmh8.js +2 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.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/patch-view.js +1 -1
- package/dist/codex/timeline-virtualizer.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/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/model-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-inline.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/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.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/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/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/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image.d.ts +20 -21
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/fuzzy.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/streaming-markdown.js +1 -1
- package/dist/mermaid/diagram.js +1 -1
- package/dist/mermaid/export.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.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.js +1 -1
- 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/reference-projection.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/host.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.js +1 -1
- package/dist/session-list/platform.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/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-image-references.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/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.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/turn-error.js +1 -1
- package/dist/session-timeline/turns.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/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +4 -3
- package/dist/chunk-4cr144a7.js +0 -2
- package/dist/chunk-4e622bdk.js +0 -3
- package/dist/chunk-6qxd4jg9.js +0 -2
- package/dist/chunk-6z3fgkkp.js +0 -2
- package/dist/chunk-an3nh155.js +0 -2
- package/dist/chunk-bw1m6407.js +0 -2
- package/dist/chunk-d0nrbf80.js +0 -2
- package/dist/chunk-f7d0hs1y.js +0 -2
- package/dist/chunk-jv327stj.js +0 -2
- package/dist/chunk-kbax1frf.js +0 -2
- package/dist/chunk-n6erf29r.js +0 -2
- package/dist/chunk-q7jm6srr.js +0 -2
- package/dist/chunk-rragk2vb.js +0 -2
- package/dist/chunk-sqkdenb0.js +0 -3
- package/dist/chunk-stse5bdv.js +0 -2
- package/dist/chunk-tc80kegm.js +0 -2
- package/dist/chunk-ytdhstqx.js +0 -2
- package/dist/chunk-zxkpemh4.js +0 -2
package/README.md
CHANGED
|
@@ -404,24 +404,23 @@ Applications import protocol clients and session projections from `@alwith/modul
|
|
|
404
404
|
### Application tools
|
|
405
405
|
|
|
406
406
|
Pass `applicationTools` to `CodexClient` from `@alwith/module-chat/client`. Each
|
|
407
|
-
application owns its capabilities and data; the client
|
|
408
|
-
|
|
407
|
+
application owns its capabilities and data; the client serves them to its own
|
|
408
|
+
sessions as a standard MCP server over the ACP connection
|
|
409
|
+
([MCP-over-ACP](https://agentclientprotocol.com/rfds/mcp-over-acp)).
|
|
409
410
|
|
|
410
411
|
```ts
|
|
411
412
|
const readCount = defineApplicationTool({
|
|
412
413
|
name: "read_count",
|
|
413
414
|
description: "Read the current item count",
|
|
414
|
-
revision: "1",
|
|
415
415
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
416
|
+
annotations: { readOnlyHint: true },
|
|
416
417
|
parse(input: unknown) {
|
|
417
418
|
if (!input || typeof input !== "object" || Array.isArray(input) || Object.keys(input).length)
|
|
418
419
|
throw new Error("Expected an empty object")
|
|
419
420
|
return undefined
|
|
420
421
|
},
|
|
421
|
-
autoApprove: () => true,
|
|
422
422
|
execute: async (_input, { sessionId, signal }) => ({
|
|
423
|
-
|
|
424
|
-
contentItems: [{ type: "text", text: String(await readCountForSession(sessionId, signal)) }]
|
|
423
|
+
content: [{ type: "text", text: String(await readCountForSession(sessionId, signal)) }]
|
|
425
424
|
})
|
|
426
425
|
})
|
|
427
426
|
const client = new CodexClient(openPort, {
|
|
@@ -433,36 +432,29 @@ const client = new CodexClient(openPort, {
|
|
|
433
432
|
|
|
434
433
|
`defineApplicationTool` runs the supplied parser before executing the handler and
|
|
435
434
|
preserves its argument type. `inputSchema` describes the same arguments to the
|
|
436
|
-
model; the parser enforces their business constraints. Results
|
|
437
|
-
`
|
|
435
|
+
model; the parser enforces their business constraints. Results are MCP
|
|
436
|
+
`CallToolResult`s; a thrown error becomes a result with `isError`, which the model
|
|
437
|
+
can read and recover from.
|
|
438
438
|
|
|
439
439
|
A selector can replace the array: `applicationTools: ({ cwd, operation, options }) => tools`.
|
|
440
|
-
It runs for new, restored and forked sessions
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
close, stop, rebinding, disconnection and individual `$/cancel_request` withdrawal
|
|
459
|
-
abort active calls; late results are discarded. Cancellation cannot undo a side
|
|
460
|
-
effect that already completed. Pending calls from an earlier client attachment
|
|
461
|
-
are not replayed. Runtime and the adapter continue to own processes and turns.
|
|
462
|
-
|
|
463
|
-
Applications that already declare raw `_meta.alwith.tools` and handle their own
|
|
464
|
-
calls remain supported. Do not combine raw declarations with registered tools in
|
|
465
|
-
the same session. New integrations should use the registry above.
|
|
440
|
+
It runs for new, restored and forked sessions; a session's own tools can also be
|
|
441
|
+
passed as `applicationTools` in its request options. Each session request declares
|
|
442
|
+
one `"type": "acp"` server named `alwith` with the selected tools, and the agent
|
|
443
|
+
replaces the session's previous declaration with it. Subclasses can compose the
|
|
444
|
+
default selection through `applicationToolsFor`. The agent must advertise
|
|
445
|
+
`session.mcp.acp`; selecting tools for one that does not is an error.
|
|
446
|
+
|
|
447
|
+
Approval belongs to the agent and its mode, as for any MCP server. Annotate tools
|
|
448
|
+
truthfully: Codex runs a tool without asking when `readOnlyHint` is true, and asks
|
|
449
|
+
when `destructiveHint` or `openWorldHint` is true (both default to true).
|
|
450
|
+
|
|
451
|
+
Handlers receive `sessionId`, `turnId`, `toolCallId`, `agent` and `signal`. Pass the
|
|
452
|
+
signal to external operations and check it before applying changes. Session
|
|
453
|
+
cancellation, close, stop, rebinding, disconnection and the agent's
|
|
454
|
+
`$/cancel_request` abort active calls, which are then answered as cancelled.
|
|
455
|
+
Cancellation cannot undo a side effect that already completed. Pending calls from
|
|
456
|
+
an earlier client attachment are not replayed. Runtime and the adapter continue to
|
|
457
|
+
own processes and turns.
|
|
466
458
|
|
|
467
459
|
### Existing Claude login (Bun host only)
|
|
468
460
|
|
package/dist/agent/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
2
|
import { type RuntimeClient, type SessionRunState } from "@alwith/api";
|
|
3
|
-
import { type
|
|
3
|
+
import { type AppsInstalledParams, type ClientOptions as AdapterOptions, CodexClient as AdapterClient, type CodexClientState, type ForkOptions, type ForkOrigin, type NewSessionOptions, type PendingAction, type PromptOptions, type ReplayScope, type Session, type SessionOperation, type SessionRequestOptions, type SessionSummary } from "@nyssance/codex-acp-v2/client";
|
|
4
4
|
import { type ApplicationSessionOptions, type ApplicationTools } from "../application-tools";
|
|
5
5
|
import { type ImageSelection } from "../image";
|
|
6
6
|
import { type SessionInputConfig, type SessionInputConfigSnapshot } from "./input-config";
|
|
@@ -99,9 +99,6 @@ export declare class CodexClient extends AdapterClient<AppState> {
|
|
|
99
99
|
protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<AdapterClient<AppState>["requestContext"]>;
|
|
100
100
|
private requestModelContext;
|
|
101
101
|
private requestToolContext;
|
|
102
|
-
protected acceptsPendingRequest(request: AgentRequest): boolean;
|
|
103
|
-
protected handleNotification(method: string, params: unknown): boolean;
|
|
104
|
-
protected handleAgentRequest(agent: Agent, request: AgentRequest): boolean;
|
|
105
102
|
installedApps(params?: AppsInstalledParams): Promise<{
|
|
106
103
|
apps: {
|
|
107
104
|
id: string;
|
package/dist/agent/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,
|
|
1
|
+
import{b,Hi}from"../chunk-nvb46gdw.js";import"../chunk-v9weanq6.js";import"../chunk-eynwjzqp.js";import"../chunk-cdxdjn5n.js";import"../chunk-4sfxcw58.js";import"../chunk-bbrx6m7n.js";import"../chunk-7tw7rn0m.js";import"../chunk-nrpgmawz.js";import"../chunk-ypdh88cj.js";import"../chunk-vd6eqshg.js";import"../chunk-6ym1a5wa.js";import"../chunk-9neb2f30.js";import"../chunk-e1fzfaqj.js";import"../chunk-etvdqkvb.js";import"../chunk-v3v2twfm.js";import"../chunk-rv3k0kfr.js";export{Hi as CodexClient,b as NATIVE_MODEL_GROUP};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{so}from"../chunk-eynwjzqp.js";export{so as customModelEffort};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Gi,ao,zi}from"../chunk-4sfxcw58.js";export{Gi as IMAGE_WORKFLOW_INSTRUCTIONS,zi as imageGenerationPrompt,ao as imageRequestAspect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bi}from"../chunk-cdxdjn5n.js";import"../chunk-4sfxcw58.js";import"../chunk-9neb2f30.js";import"../chunk-v3v2twfm.js";import"../chunk-rv3k0kfr.js";export{Bi as createImageTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vi,Nn}from"../chunk-bbrx6m7n.js";export{Vi as parseInputConfig,Nn as parseInputSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{lo}from"../../chunk-ypdh88cj.js";export{lo as executionMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fe}from"../../chunk-
|
|
1
|
+
import{fe}from"../../chunk-6ym1a5wa.js";import"../../chunk-9neb2f30.js";import"../../chunk-etvdqkvb.js";import"../../chunk-rv3k0kfr.js";export{fe as imageInputMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ot,Ge,va}from"../../chunk-
|
|
1
|
+
import{ot,Ge,va}from"../../chunk-vd6eqshg.js";import"../../chunk-6ym1a5wa.js";import"../../chunk-9neb2f30.js";import"../../chunk-e1fzfaqj.js";import"../../chunk-etvdqkvb.js";import"../../chunk-rv3k0kfr.js";export{Ge as inputModeDefinition,ot as isInputMode,va as resolveInputMode};
|
package/dist/app-reference.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{be}from"./chunk-
|
|
1
|
+
import{be}from"./chunk-e3nccytb.js";import"./chunk-m2n6sxf8.js";import"./chunk-4vayk46h.js";export{be as AppReferenceBadge};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type {
|
|
1
|
+
import type { McpServer } from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import { type CallToolResult, type ToolAnnotations } from "@modelcontextprotocol/server";
|
|
3
|
+
import type { Agent, Session, SessionOperation, SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
|
|
4
|
+
export type ApplicationToolResult = CallToolResult;
|
|
4
5
|
export type ApplicationToolContext = {
|
|
5
6
|
sessionId: string;
|
|
6
7
|
toolCallId: string;
|
|
@@ -10,10 +11,10 @@ export type ApplicationToolContext = {
|
|
|
10
11
|
};
|
|
11
12
|
export type ApplicationTool = {
|
|
12
13
|
name: string;
|
|
14
|
+
title?: string;
|
|
13
15
|
description: string;
|
|
14
16
|
inputSchema: Record<string, unknown>;
|
|
15
|
-
|
|
16
|
-
autoApprove?: (sessionId: string) => boolean;
|
|
17
|
+
annotations?: ToolAnnotations;
|
|
17
18
|
execute: (input: unknown, context: ApplicationToolContext) => Promise<ApplicationToolResult> | ApplicationToolResult;
|
|
18
19
|
};
|
|
19
20
|
export type ApplicationSessionOptions = SessionRequestOptions & {
|
|
@@ -25,21 +26,26 @@ export type ApplicationToolSelection = {
|
|
|
25
26
|
options: ApplicationSessionOptions;
|
|
26
27
|
};
|
|
27
28
|
export type ApplicationTools = readonly ApplicationTool[] | ((selection: ApplicationToolSelection) => readonly ApplicationTool[] | Promise<readonly ApplicationTool[]>);
|
|
29
|
+
export type ApplicationCallIdentity = (meta: Record<string, unknown>) => {
|
|
30
|
+
toolCallId: string;
|
|
31
|
+
turnId: string;
|
|
32
|
+
};
|
|
28
33
|
export declare function defineApplicationTool<T>(tool: Omit<ApplicationTool, "execute"> & {
|
|
29
34
|
parse: (input: unknown) => T;
|
|
30
35
|
execute: (input: T, context: ApplicationToolContext) => Promise<ApplicationToolResult> | ApplicationToolResult;
|
|
31
36
|
}): ApplicationTool;
|
|
32
|
-
export declare
|
|
37
|
+
export declare const APPLICATION_SERVER_NAME = "alwith";
|
|
33
38
|
export declare class ApplicationToolRegistry {
|
|
34
|
-
private readonly
|
|
35
|
-
private readonly calls;
|
|
39
|
+
private readonly servers;
|
|
36
40
|
private readonly session;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
private readonly identity;
|
|
42
|
+
constructor(session: (id: string) => Session | undefined, identity: ApplicationCallIdentity);
|
|
43
|
+
declare(agent: Agent, tools: readonly ApplicationTool[]): Extract<McpServer, {
|
|
44
|
+
type: "acp";
|
|
45
|
+
}>;
|
|
46
|
+
bind(serverId: string, sessionId: string): void;
|
|
47
|
+
drop(sessionId: string): void;
|
|
41
48
|
clear(): void;
|
|
42
|
-
private
|
|
43
|
-
|
|
44
|
-
handle(agent: Agent, request: AgentRequest): boolean;
|
|
49
|
+
private dispose;
|
|
50
|
+
private server;
|
|
45
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rn,
|
|
1
|
+
import{Rn,co,uo}from"./chunk-v3v2twfm.js";export{co as APPLICATION_SERVER_NAME,uo as ApplicationToolRegistry,Rn as defineApplicationTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xi,eo,Ye,rn}from"../chunk-81838qem.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?xi(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Ye(i)){let c=rn(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Ye(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Ye(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=rn(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=rn(r),m=Ye(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:eo(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:eo(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xi,eo,Ye,rn}from"../chunk-81838qem.js";export{xi as elicitationFields,eo as elicitationLabels,rn as elicitationOptions,Ye as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa,
|
|
1
|
+
import{aa,Si,ja,$a}from"../chunk-2bbdgf43.js";export{aa as PERMISSION_KIND_GROUP_ORDER,ja as isAllowKind,$a as isAlwaysKind,Si as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{wi}from"../chunk-vdt7cp6c.js";import"../chunk-2bbdgf43.js";export{wi as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pa,la,Ia,
|
|
1
|
+
import{Pa,la,Ia,_i}from"../chunk-q3s59jyn.js";export{_i as SchemaElicitationForm,Pa as elicitationFields,la as initialValues,Ia as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ki}from"../chunk-1wr1ef9x.js";export{ki as UrlElicitationCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-acf4sdp7.js";import{Xt,Yt}from"./chunk-bgnxw313.js";import{S}from"./chunk-3z86hy2s.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Zs({providers:n,store:l}){let{t:m}=e().host,d=Xt(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=S(s.id,o.api_id);return t(w,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function w({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Yt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
|
|
2
2
|
export{Zs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function mo(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function St(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=mo(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{mo,St};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y}from"./chunk-
|
|
1
|
+
import{y}from"./chunk-y8gz9rsc.js";import{e}from"./chunk-acf4sdp7.js";import{he,S}from"./chunk-3z86hy2s.js";import{Ue}from"./chunk-bztkz3dz.js";import{Tn}from"./chunk-6c8wzcja.js";import{useRef as E,useState as c}from"react";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as s,jsxs as b}from"react/jsx-runtime";function _n({client:l,session:i,providers:w,catalog:P}){let{host:n}=e(),m=(o)=>n.reportError?n.reportError(o):console.error(o),a=Ue(w,m),[p,u]=c(!1),d=E(!1),[f,v]=c(null),g=y(l.store,(o)=>o.connection==="ready"),x=p||!g||i.restoring,[r,M]=c(null),C=y(l.store,(o)=>o.nativeModels),h=r!==null&&(C.some((o)=>o.id===r)||a!==null&&he(a).some((o)=>o.models.some((t)=>S(o.id,t.id)===r)));async function k(o){if(d.current||!g||i.restoring)return;d.current=!0,M(o),v(null),u(!0);try{await l.resumeModel(i.id,o)}catch(t){v(t instanceof Error?t.message:String(t)),m(t)}finally{d.current=!1,u(!1)}}return b("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":p,"data-model-recovery":!0,children:[b("div",{className:"min-w-0 flex-1 basis-full",children:[s("p",{children:n.t("provider.managed.reselect")}),f&&s("p",{role:"alert",className:"text-destructive break-words",children:f})]}),s("fieldset",{disabled:x,children:s(Tn,{snapshot:a,model:r,onChange:M,nativeModels:C,catalog:P})}),s(B,{size:"sm",disabled:x||!h,onClick:()=>{if(r!==null)k(r)},children:n.t("provider.managed.resume")})]})}
|
|
2
2
|
export{_n};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G}from"./chunk-jp4xjks0.js";import{Ee}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{G}from"./chunk-jp4xjks0.js";import{Ee}from"./chunk-chn1mkv0.js";import{A,me}from"./chunk-aht6f6tf.js";import{V,re}from"./chunk-e00dz09f.js";import{De,pe}from"./chunk-fwb6tf7m.js";import{cn as F}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as E,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as M}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as z,DropdownMenuContent as L,DropdownMenuGroup as N,DropdownMenuItem as y,DropdownMenuRadioGroup as j,DropdownMenuRadioItem as _,DropdownMenuSeparator as K,DropdownMenuTrigger as q}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as J}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function ui({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:k=n?"none":void 0,allowRemove:O=!0,submenu:g=!1,className:R,onOpenChange:x}){let{t}=A(),c=pe(),B=me(),T=Ee(),{collections:s,order:C}=De(),i=C.find((o)=>s[o].sessionIds.includes(l)),[H,P]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(P(o),T(o),x?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),B(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(z,{modal:!1,open:H,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(q,{disabled:r,"data-hover-background":k,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(M,{variant:"ghost",size:"icon-sm",className:R,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:F(i!==void 0&&"fill-current")})})}),a(L,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(N,{children:e(j,{value:i??null,children:C.map((o)=>a(_,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===V?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:re(s[o],t)})]},o))})}),e(K,{}),a(N,{children:[a(y,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),O&&i!==void 0&&a(y,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(J,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(M,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Qs({sessionId:l,allowRemove:f=!0}){let{t:n}=A();return e(ui,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(G,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
|
|
2
|
+
export{ui,Qs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ss}from"./chunk-dxwbgg69.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function
|
|
2
|
-
export{
|
|
1
|
+
import{ss}from"./chunk-dxwbgg69.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Bo({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(ss,{src:c,alt:"",onClose:()=>a(!1)})]})}function rs({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e(Bo,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
|
|
2
|
+
export{Bo,rs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A}from"./chunk-
|
|
1
|
+
import{A}from"./chunk-aht6f6tf.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as b}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function mt({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=A();return n(x,{open:m,onOpenChange:r,children:[o(b,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
|
|
2
2
|
export{mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function Ce(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function
|
|
2
|
-
export{Ce,
|
|
1
|
+
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function Ce(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function qo(n){let t=n.replaceAll(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(t)}
|
|
2
|
+
export{Ce,qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function ki({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(c,{size:"sm",children:[e(m,{children:[a(p,{children:i("approval.needed")}),a(v,{children:r})]}),a(s,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(d,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(C,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
|
|
2
|
+
export{ki};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ne}from"./chunk-
|
|
2
|
-
export{oi,
|
|
1
|
+
import{Ne}from"./chunk-ermc9p1p.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function ni({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:Ne(t)}):null}function oi({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(ni,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Kt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(oi,{label:t,shortcut:o}):t})]})}
|
|
2
|
+
export{ni,oi,Kt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var aa={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function
|
|
2
|
-
export{aa,
|
|
1
|
+
var aa={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Si(e){return[...e].toSorted((o,n)=>(aa[o.kind]??99)-(aa[n.kind]??99))}function ja(e){return e==="allow_once"||e==="allow_always"}function $a(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{aa,Si,ja,$a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-
|
|
1
|
+
import{d,i}from"./chunk-njqan8zg.js";import{k}from"./chunk-qk1yqepm.js";import{B}from"./chunk-m68t534g.js";import{Se}from"./chunk-3qedn07q.js";import{Q,_e,Pe}from"./chunk-pqz2471h.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as F,DialogDescription as G,DialogHeader as J,DialogTitle as K}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function jt({entry:o,onBack:p}){let u=d(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,U]=y(null),[D,I]=y(null),[j,R]=y(0),[c,z]=y(null);_(()=>{let a=!0;return I(null),U(null),P(o).then((g)=>{if(a)U(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,j]);let m=n?.summary??o.plugin,r=C?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=r.availability!=="AVAILABLE"||r.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(Pe,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(B,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(O,{children:[r.source.type==="remote"?null:e(X,{checked:r.enabled,disabled:!!v||b,"aria-label":l(r.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(r,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(r),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(r.localVersion??r.version)&&e(x,{label:l("plugins.detail.version"),children:r.localVersion??r.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(B,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(B,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(F,{className:_e,children:c&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(B,{name:c.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(J,{className:"gap-3",children:[e(K,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(G,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(Se,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
2
|
export{jt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E}from"./chunk-
|
|
1
|
+
import{E}from"./chunk-r5f77gtx.js";import{s}from"./chunk-5mjs63fv.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function js({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return E(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
2
|
export{js};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function*
|
|
2
|
-
export{
|
|
1
|
+
function*So(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function xr(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of So(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
+
export{So,xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
1
|
+
import{d}from"./chunk-njqan8zg.js";import{q,K,W,Z}from"./chunk-gdtpwbqn.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function we({skills:l=!1}){let{t:o}=d();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(W,{children:e(s,{className:"size-10 rounded-xl"})}),a(K,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(q,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
|
|
2
2
|
export{we};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
export{Me,
|
|
1
|
+
import{a}from"./chunk-5mjs63fv.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function Me(t,n){let e=t.runStates[n];return e!==void 0&&(!e.reusableDraft||t.drafts[n]!==void 0)}function d(t,n,e){let r=t.filter((s)=>Me(e,s)),S=new Set(r),c=e.runStates!==n.runStates&&l(e.runStates)==="event";for(let[s,i]of Object.entries(e.runStates)){if(S.has(s)||!Me(e,s))continue;let o=n.runStates[s],g=!o||i.state!==o.state||i.since!==o.since||i.lastActivityAt!==o.lastActivityAt||i.interruption!==o.interruption;if(i.reusableDraft&&e.drafts[s]!==void 0||c&&g&&(!o||i.state!=="idle")&&i.interruption!=="runtime restarted")r.push(s)}return r.length===t.length&&r.every((s,i)=>s===t[i])?t:r}var u=new WeakMap;function v(t){return{view:"sessions",activityOrder:d([],t.state,t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function Qn(t){let n=u.get(t);if(n)return n;let e=v(t),r=new Set,S=(i)=>{e={...e,...i};for(let o of r)o()},c=t.state;t.store.subscribe(()=>{let i=t.store.getState(),o=d(e.activityOrder,c,i);if(c=i,o!==e.activityOrder)S({activityOrder:o})});let s={get:()=>e,set:S,subscribe:(i)=>(r.add(i),()=>r.delete(i))};return u.set(t,s),s}function Bs(t){u.get(t)?.set(v(t))}function J(t){let n=Qn(a());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function de(){return Qn(a()).set}function Gs(){let t=J((e)=>e.view),n=de();return[t,(e)=>n({view:e})]}
|
|
2
|
+
export{Me,Qn,Bs,J,de,Gs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dt}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Dt}from"./chunk-gbsn1qep.js";import{d,Ze}from"./chunk-njqan8zg.js";import{k}from"./chunk-qk1yqepm.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function Xo(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function Se({path:n,renderHeader:s,description:t}){let e=d(),{t:l}=e,c=e.readFile,[a,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{let r=!1;return f(null),w(null),(n===null||!c?Promise.resolve(t??""):c(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,M,c]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(y,{})}),i(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Ze(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Ze(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)Ze(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(x):o("div",{className:"flex justify-end",children:x}),o(k,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(Dt,{text:Xo(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
|
+
export{Xo,Se};
|