@alwith/module-chat 0.6.24 → 0.6.26
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/activity-host.js +1 -1
- package/dist/agent/client.d.ts +25 -9
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.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/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +27 -13
- 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-n0q8e6sq.js → chunk-0bv3tw1m.js} +2 -2
- package/dist/{chunk-qvw0kyse.js → chunk-0e5dx357.js} +2 -2
- package/dist/{chunk-6cjjwry2.js → chunk-0enb3f4n.js} +2 -2
- package/dist/{chunk-t3m57q06.js → chunk-0jg7hgp5.js} +2 -2
- package/dist/{chunk-m6080rsp.js → chunk-0m4s668v.js} +2 -2
- package/dist/{chunk-7a70nd7e.js → chunk-16dyzkha.js} +2 -2
- package/dist/{chunk-g751pxzk.js → chunk-18kdsdmy.js} +2 -2
- package/dist/{chunk-ck2ax5f6.js → chunk-1gr60c40.js} +2 -2
- package/dist/{chunk-az3g3a94.js → chunk-1wr1ef9x.js} +2 -2
- package/dist/chunk-24y0mvqf.js +2 -0
- package/dist/chunk-2bbdgf43.js +2 -0
- package/dist/chunk-2f8s5gtn.js +2 -0
- package/dist/{chunk-znagg8v9.js → chunk-2yvj9k42.js} +2 -2
- package/dist/{chunk-7wpcdwan.js → chunk-30nre2gw.js} +2 -2
- package/dist/chunk-317w17va.js +2 -0
- package/dist/{chunk-mtn6vdf8.js → chunk-3hsft68c.js} +2 -2
- package/dist/{chunk-rqa21qrv.js → chunk-3nawfa7b.js} +2 -2
- package/dist/{chunk-dxsjz3re.js → chunk-3q8vw3wb.js} +2 -2
- package/dist/{chunk-a6ysp1fp.js → chunk-3qedn07q.js} +2 -2
- package/dist/{chunk-jg4c3zg4.js → chunk-3tvq6xr2.js} +2 -2
- package/dist/{chunk-h8r785ne.js → chunk-3z86hy2s.js} +2 -2
- package/dist/{chunk-1pb43y89.js → chunk-4a4awnss.js} +2 -2
- package/dist/{chunk-jydhbkm8.js → chunk-4d9sajzj.js} +2 -2
- package/dist/{chunk-8h4e3654.js → chunk-4g1s7gdh.js} +2 -2
- package/dist/{chunk-v581r9vt.js → chunk-4sfxcw58.js} +3 -3
- package/dist/{chunk-542c9tpr.js → chunk-4vayk46h.js} +2 -2
- package/dist/chunk-51xk5tw2.js +2 -0
- package/dist/{chunk-ymgc4317.js → chunk-52wrk1mh.js} +2 -2
- package/dist/chunk-53r6pr16.js +2 -0
- package/dist/{chunk-s05ftq29.js → chunk-55m88zbv.js} +2 -2
- package/dist/{chunk-79ayc6qy.js → chunk-5bhp61sd.js} +2 -2
- package/dist/chunk-5mjs63fv.js +2 -0
- package/dist/chunk-5x5n3b15.js +2 -0
- package/dist/{chunk-5xe89qwh.js → chunk-64apxzn7.js} +2 -2
- package/dist/{chunk-z8sheg2r.js → chunk-64cbt3ym.js} +2 -2
- package/dist/{chunk-bane0xc8.js → chunk-6e84zbgs.js} +2 -2
- package/dist/chunk-6ym1a5wa.js +2 -0
- package/dist/{chunk-7wd0kfqr.js → chunk-747qe35q.js} +2 -2
- package/dist/{chunk-11vn501z.js → chunk-75dr7tyz.js} +2 -2
- package/dist/{chunk-73541c5k.js → chunk-7ng6qs9c.js} +2 -2
- package/dist/{chunk-1e83qr49.js → chunk-7rtwekkz.js} +2 -2
- package/dist/{chunk-mfn37eme.js → chunk-7s7cevjh.js} +2 -2
- package/dist/{chunk-r7paw6ba.js → chunk-7tw7rn0m.js} +2 -2
- package/dist/chunk-7zww33h8.js +2 -0
- package/dist/chunk-81838qem.js +2 -0
- package/dist/chunk-84ncszbf.js +2 -0
- package/dist/{chunk-gec6q1jb.js → chunk-84p483n0.js} +2 -2
- package/dist/{chunk-kk9dbwd1.js → chunk-84zzf0ys.js} +2 -2
- package/dist/{chunk-8ew2e3y7.js → chunk-88ysxbdh.js} +2 -2
- package/dist/chunk-8gt8yn8k.js +4 -0
- package/dist/{chunk-zm6b6zyr.js → chunk-8wk3e4z7.js} +2 -2
- package/dist/chunk-94m77zyn.js +2 -0
- package/dist/{chunk-vx6shb4g.js → chunk-95ywdfe0.js} +2 -2
- package/dist/chunk-9nbkggqn.js +2 -0
- package/dist/chunk-9neb2f30.js +2 -0
- package/dist/chunk-9wc4emwt.js +2 -0
- package/dist/chunk-a11wvd8e.js +2 -0
- package/dist/chunk-acf4sdp7.js +2 -0
- package/dist/{chunk-0ne2mz2q.js → chunk-ag2t01q7.js} +3 -3
- package/dist/chunk-aht6f6tf.js +2 -0
- package/dist/chunk-amf0m4tb.js +2 -0
- package/dist/chunk-ax7c2kam.js +2 -0
- package/dist/{chunk-zwyd2bhy.js → chunk-axvjn527.js} +2 -2
- package/dist/{chunk-mc40zb3c.js → chunk-b2n5sj31.js} +2 -2
- package/dist/chunk-bapn03er.js +2 -0
- package/dist/{chunk-jw1c8r97.js → chunk-bbrx6m7n.js} +2 -2
- package/dist/{chunk-x621s275.js → chunk-bf7sgpzq.js} +2 -2
- package/dist/{chunk-81hv0s07.js → chunk-bgnxw313.js} +2 -2
- package/dist/{chunk-rff6c87z.js → chunk-brv52tgj.js} +2 -2
- package/dist/chunk-bztkz3dz.js +2 -0
- package/dist/{chunk-6tvq472s.js → chunk-bzzx1y15.js} +2 -2
- package/dist/{chunk-wf7kfk3p.js → chunk-c13rnm7b.js} +2 -2
- package/dist/{chunk-dypeezvv.js → chunk-c22xq7a3.js} +3 -3
- package/dist/{chunk-4fmn1kk4.js → chunk-c7qzvt21.js} +3 -3
- package/dist/chunk-cans04tz.js +3 -0
- package/dist/{chunk-geh3wyxw.js → chunk-cgnzqmqd.js} +2 -2
- package/dist/chunk-chn1mkv0.js +2 -0
- package/dist/{chunk-qdyyvd2w.js → chunk-cp4wxmh5.js} +2 -2
- package/dist/chunk-cv0qbty5.js +3 -0
- package/dist/{chunk-zzqbe5r0.js → chunk-d582db8v.js} +2 -2
- package/dist/{chunk-2cc8d35c.js → chunk-d71nz1je.js} +2 -2
- package/dist/{chunk-5pmr5dby.js → chunk-dd9k5bbt.js} +2 -2
- package/dist/{chunk-ffs5nkt0.js → chunk-dheg4bs2.js} +2 -2
- package/dist/{chunk-tknyjndw.js → chunk-dx5hh359.js} +3 -3
- package/dist/{chunk-zz582m73.js → chunk-dxwbgg69.js} +2 -2
- package/dist/{chunk-gak8579e.js → chunk-e00dz09f.js} +2 -2
- package/dist/chunk-e1fzfaqj.js +2 -0
- package/dist/{chunk-x4enakra.js → chunk-e3nccytb.js} +1 -1
- package/dist/{chunk-qxssxzws.js → chunk-e9nvbe3j.js} +2 -2
- package/dist/{chunk-mgmv8kap.js → chunk-ermc9p1p.js} +2 -2
- package/dist/{chunk-xadfbbwt.js → chunk-erp1g3as.js} +2 -2
- package/dist/{chunk-nh56sb8e.js → chunk-etvdqkvb.js} +2 -2
- package/dist/{chunk-zsrjzx7g.js → chunk-exrd2xzz.js} +2 -2
- package/dist/{chunk-mbsmb8jn.js → chunk-eynwjzqp.js} +2 -2
- package/dist/chunk-fnm2xznx.js +2 -0
- package/dist/{chunk-rb4p3h5b.js → chunk-ftsnryz8.js} +2 -2
- package/dist/{chunk-4ntxjy8v.js → chunk-fwb6tf7m.js} +2 -2
- package/dist/{chunk-0xshzqb6.js → chunk-fwghjmd1.js} +2 -2
- package/dist/chunk-g1tbd3pd.js +2 -0
- package/dist/{chunk-5kje89r8.js → chunk-g3y0r56h.js} +2 -2
- package/dist/{chunk-ym6jphs4.js → chunk-gbsn1qep.js} +3 -3
- package/dist/{chunk-5d138vq3.js → chunk-gdtpwbqn.js} +1 -1
- package/dist/{chunk-wsyfhh7y.js → chunk-gjtxked2.js} +2 -2
- package/dist/{chunk-js3nhatr.js → chunk-gpv1dc5y.js} +2 -2
- package/dist/{chunk-d5gt1x0n.js → chunk-grfrfh7s.js} +2 -2
- package/dist/chunk-h1kvdf3t.js +2 -0
- package/dist/{chunk-mdercwm8.js → chunk-h3mwzf3d.js} +3 -3
- package/dist/{chunk-4h9ee02f.js → chunk-h5mdgrq6.js} +2 -2
- package/dist/{chunk-bdrcreqs.js → chunk-ha9n1k24.js} +2 -2
- package/dist/chunk-hd11bfmp.js +2 -0
- package/dist/{chunk-tyka859b.js → chunk-hf5bpahd.js} +2 -2
- package/dist/{chunk-wyxa2tfm.js → chunk-j2ffde9c.js} +5 -5
- package/dist/{chunk-fe83mqnb.js → chunk-j4w2hbbe.js} +2 -2
- package/dist/chunk-j62heyzq.js +2 -0
- package/dist/{chunk-h0k80cxs.js → chunk-j8zpjnf8.js} +2 -2
- package/dist/{chunk-q7ka46hb.js → chunk-jdwd4ta9.js} +3 -3
- package/dist/{chunk-ww3f6z4x.js → chunk-je27hf3t.js} +3 -3
- package/dist/{chunk-q01vmp9m.js → chunk-jgqt7k0h.js} +2 -2
- package/dist/{chunk-csbv8m51.js → chunk-jmc7ddz8.js} +3 -3
- package/dist/{chunk-jcyv1q0x.js → chunk-jp4xjks0.js} +2 -2
- package/dist/{chunk-nypr6qtz.js → chunk-jvy6p83k.js} +3 -3
- package/dist/chunk-k2nbrerw.js +2 -0
- package/dist/{chunk-kj3a1k2q.js → chunk-k5nd3vyq.js} +2 -2
- package/dist/chunk-knrc6kks.js +2 -0
- package/dist/chunk-kqwfwck2.js +2 -0
- package/dist/{chunk-vsh9vh4s.js → chunk-m2n6sxf8.js} +2 -2
- package/dist/{chunk-3z5zyra7.js → chunk-m68t534g.js} +2 -2
- package/dist/{chunk-w4bye56s.js → chunk-ma6ycen5.js} +2 -2
- package/dist/{chunk-hcat58sr.js → chunk-masqfje4.js} +2 -2
- package/dist/chunk-mckz9qv5.js +2 -0
- package/dist/{chunk-79pvfyd0.js → chunk-mfmh7ztq.js} +2 -2
- package/dist/{chunk-d6ke5e80.js → chunk-n4wp3h3j.js} +2 -2
- package/dist/{chunk-6r5nzsw8.js → chunk-ncgwbdmj.js} +2 -2
- package/dist/{chunk-8v53bkyr.js → chunk-ne4b53kn.js} +2 -2
- package/dist/chunk-njqan8zg.js +2 -0
- package/dist/{chunk-heqa4swe.js → chunk-nqt9gyz9.js} +2 -2
- package/dist/{chunk-sjqhtpzr.js → chunk-nrpgmawz.js} +2 -2
- package/dist/{chunk-m9ttf96p.js → chunk-p3gawvqr.js} +2 -2
- package/dist/{chunk-et2pdaz7.js → chunk-p96vgnxw.js} +2 -2
- package/dist/{chunk-84eye2j0.js → chunk-pebkk426.js} +2 -2
- package/dist/chunk-pg9gckmw.js +2 -0
- package/dist/{chunk-e04g26qm.js → chunk-pqz2471h.js} +2 -2
- package/dist/chunk-ps408sxd.js +2 -0
- package/dist/{chunk-j3g21ext.js → chunk-pxr5snwm.js} +2 -2
- package/dist/{chunk-2fx3qhyb.js → chunk-q3s59jyn.js} +2 -2
- package/dist/{chunk-w2xjhfm2.js → chunk-qa9p0a64.js} +3 -3
- package/dist/{chunk-7v7wc7k5.js → chunk-qceex4vv.js} +2 -2
- package/dist/chunk-qkn0y5wx.js +2 -0
- package/dist/{chunk-76smt4zv.js → chunk-qzerhkyb.js} +3 -3
- package/dist/chunk-qzn6qtmy.js +2 -0
- package/dist/{chunk-q4nx04sy.js → chunk-r5f77gtx.js} +2 -2
- package/dist/{chunk-rzxnxj25.js → chunk-rkwq0grt.js} +2 -2
- package/dist/{chunk-qghq84r4.js → chunk-rn54592t.js} +2 -2
- package/dist/chunk-rv3k0kfr.js +2 -0
- package/dist/chunk-s1nfyggb.js +2 -0
- package/dist/chunk-s8cj6aw6.js +2 -0
- package/dist/{chunk-76c0cx40.js → chunk-sjm9p42x.js} +2 -2
- package/dist/chunk-stv8pr4v.js +2 -0
- package/dist/{chunk-m8tt5bf9.js → chunk-swqbbw8q.js} +2 -2
- package/dist/{chunk-stc4ctrx.js → chunk-syjt7y4v.js} +2 -2
- package/dist/chunk-t9t53gsj.js +3 -0
- package/dist/{chunk-xk0dt0es.js → chunk-tgnftxyb.js} +2 -2
- package/dist/{chunk-nhstvqjy.js → chunk-tr0bmqn9.js} +2 -2
- package/dist/{chunk-t686zwxk.js → chunk-v0wmy9b3.js} +2 -2
- package/dist/{chunk-vkj5fznh.js → chunk-v2pa8yak.js} +3 -3
- package/dist/{chunk-tctdn4kk.js → chunk-v32jvbgx.js} +2 -2
- package/dist/{chunk-6vdayg6w.js → chunk-v96vkrw2.js} +2 -2
- package/dist/{chunk-qv23mh24.js → chunk-v9weanq6.js} +2 -2
- package/dist/chunk-vd6eqshg.js +2 -0
- package/dist/{chunk-9ts08sma.js → chunk-vdt7cp6c.js} +2 -2
- package/dist/{chunk-wz6765xb.js → chunk-vev9q4t4.js} +3 -3
- package/dist/{chunk-whzs7yxf.js → chunk-vmfhnkxj.js} +2 -2
- package/dist/{chunk-7s3f142h.js → chunk-vqby71fp.js} +2 -2
- package/dist/chunk-vzgn8exd.js +2 -0
- package/dist/{chunk-e5m9kg1w.js → chunk-w562jf57.js} +2 -2
- package/dist/chunk-w5q2ygsa.js +2 -0
- package/dist/{chunk-bcnh0z8e.js → chunk-w5zvy4ex.js} +2 -2
- package/dist/{chunk-50eym2q3.js → chunk-wde0m4pf.js} +3 -3
- package/dist/{chunk-xdcp8tj9.js → chunk-why9g2kd.js} +2 -2
- package/dist/{chunk-whb8ttdy.js → chunk-wpacvdsv.js} +2 -2
- package/dist/{chunk-kbfe7gqw.js → chunk-x49qjrbk.js} +2 -2
- package/dist/{chunk-4r0ffb0s.js → chunk-xe7ep70k.js} +2 -2
- package/dist/{chunk-8mzbkjhk.js → chunk-xnbvdqnt.js} +2 -2
- package/dist/{chunk-e641842r.js → chunk-xqb4thy8.js} +2 -2
- package/dist/{chunk-2sc2z6g5.js → chunk-xwwjj45a.js} +2 -2
- package/dist/{chunk-2qs1ss40.js → chunk-y3mx5sf0.js} +2 -2
- package/dist/chunk-y4tj08c1.js +2 -0
- package/dist/chunk-y8gz9rsc.js +2 -0
- package/dist/{chunk-bfb8bpwc.js → chunk-y8yawx3d.js} +2 -2
- package/dist/{chunk-3a5sn0v8.js → chunk-ypdh88cj.js} +2 -2
- package/dist/{chunk-pnh5t6pc.js → chunk-yryg27yy.js} +2 -2
- package/dist/{chunk-1rwkdezk.js → chunk-z6dx6dnt.js} +2 -2
- package/dist/{chunk-859359n0.js → chunk-z6x70w62.js} +2 -2
- package/dist/chunk-zft4afb8.js +2 -0
- package/dist/chunk-zm0j9nw3.js +2 -0
- package/dist/{chunk-vbbndjfd.js → chunk-zv3bm3np.js} +2 -2
- package/dist/{chunk-3zae491f.js → chunk-zw4ehzza.js} +3 -3
- package/dist/{chunk-wwj743gm.js → chunk-zyn0ys4m.js} +2 -2
- package/dist/{chunk-6w8p1hwb.js → chunk-zypgrbd9.js} +2 -2
- package/dist/chunk-zzz6kmh8.js +2 -0
- package/dist/client.d.ts +2 -3
- 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/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/locales.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/inline-document.js +1 -1
- package/dist/composer/inline-dom.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-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/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/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-lightbox.js +1 -1
- package/dist/image-preview-dialog.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/code-highlighter.js +1 -1
- package/dist/lib/file-url.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/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.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/mermaid/preview.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.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.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/plugins/toolbox-layout.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/find-bar.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/locales.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/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-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/history-timeline.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/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.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.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/agent/application-client.d.ts +0 -30
- package/dist/agent/application-client.js +0 -1
- package/dist/chunk-0myf2ak0.js +0 -2
- package/dist/chunk-1smyy9mt.js +0 -2
- package/dist/chunk-2q1xxs3t.js +0 -2
- package/dist/chunk-36ttr22w.js +0 -2
- package/dist/chunk-3mm1d99e.js +0 -2
- package/dist/chunk-3qwtda21.js +0 -3
- package/dist/chunk-4gxpna3p.js +0 -2
- package/dist/chunk-5ryfm4ka.js +0 -4
- package/dist/chunk-7cab9zy0.js +0 -2
- package/dist/chunk-7xvrsw7x.js +0 -2
- package/dist/chunk-9hjfc08t.js +0 -2
- package/dist/chunk-a8r3mggj.js +0 -2
- package/dist/chunk-a9grdyep.js +0 -3
- package/dist/chunk-ayt0bzr9.js +0 -2
- package/dist/chunk-b42vv8f2.js +0 -2
- package/dist/chunk-b61qhh61.js +0 -2
- package/dist/chunk-bgav9cq2.js +0 -2
- package/dist/chunk-bh0h7fz7.js +0 -2
- package/dist/chunk-bshgrwe9.js +0 -2
- package/dist/chunk-bsnmj69j.js +0 -2
- package/dist/chunk-capkej8s.js +0 -2
- package/dist/chunk-cer4dxas.js +0 -2
- package/dist/chunk-cq7bbgcg.js +0 -2
- package/dist/chunk-d29xbf16.js +0 -2
- package/dist/chunk-dp1nnwk2.js +0 -2
- package/dist/chunk-dpfjxym1.js +0 -2
- package/dist/chunk-eqbp85f3.js +0 -2
- package/dist/chunk-f9z37ptq.js +0 -2
- package/dist/chunk-fn68kh69.js +0 -2
- package/dist/chunk-gkyvgjyx.js +0 -2
- package/dist/chunk-gpcsb4tg.js +0 -3
- package/dist/chunk-j2cdjycf.js +0 -2
- package/dist/chunk-jjgwfpmp.js +0 -2
- package/dist/chunk-mcrd86tx.js +0 -2
- package/dist/chunk-n9jaz2pd.js +0 -2
- package/dist/chunk-nbaxn7jx.js +0 -2
- package/dist/chunk-nvgnan7w.js +0 -2
- package/dist/chunk-p1tcxky2.js +0 -2
- package/dist/chunk-p811gdar.js +0 -2
- package/dist/chunk-p8cm3xw1.js +0 -2
- package/dist/chunk-pr36m3qx.js +0 -2
- package/dist/chunk-q73jne25.js +0 -2
- package/dist/chunk-qm2jq2bq.js +0 -2
- package/dist/chunk-qwet39v5.js +0 -2
- package/dist/chunk-r3hsjwjn.js +0 -2
- package/dist/chunk-rg8kj085.js +0 -2
- package/dist/chunk-s2k0g1hc.js +0 -2
- package/dist/chunk-s3j71dbh.js +0 -2
- package/dist/chunk-sdv06e2k.js +0 -2
- package/dist/chunk-sgbn37kz.js +0 -2
- package/dist/chunk-tfj6v7y4.js +0 -2
- package/dist/chunk-tsdb5jnj.js +0 -2
- package/dist/chunk-v3dq3hx2.js +0 -2
- package/dist/chunk-xk306vq1.js +0 -2
- package/dist/chunk-ymk7ampx.js +0 -2
- package/dist/chunk-zpqj0ka8.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/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ws,c,O}from"./chunk-c13rnm7b.js";export{ws as ActivityHostProvider,O as ActivityMarkdown,c as useActivityHost};
|
package/dist/agent/client.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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 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
|
-
import type
|
|
3
|
+
import { type Agent, type AgentRequest, 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
|
+
import { type ApplicationSessionOptions, type ApplicationTools } from "../application-tools";
|
|
5
5
|
import { type ImageSelection } from "../image";
|
|
6
|
-
import { ApplicationClient as CodexAcpClient, type ClientOptions as BaseClientOptions } from "./application-client";
|
|
7
6
|
import { type SessionInputConfig, type SessionInputConfigSnapshot } from "./input-config";
|
|
8
7
|
import { type InputMode } from "./input-modes";
|
|
9
8
|
export type { ForkOrigin, PendingAction };
|
|
@@ -21,7 +20,8 @@ export type Launch = {
|
|
|
21
20
|
engine: string;
|
|
22
21
|
[key: string]: unknown;
|
|
23
22
|
};
|
|
24
|
-
export type ClientOptions =
|
|
23
|
+
export type ClientOptions = AdapterOptions & {
|
|
24
|
+
applicationTools?: ApplicationTools;
|
|
25
25
|
resolveModel?: (model: string | null, purpose: "session" | "draft") => Promise<string | null>;
|
|
26
26
|
imageService?: {
|
|
27
27
|
inputMode: (sessionId: string) => Promise<InputMode>;
|
|
@@ -41,7 +41,9 @@ export type AppState = CodexClientState & {
|
|
|
41
41
|
sessionWindows: Record<string, DraftOwner>;
|
|
42
42
|
draftSessions: Record<string, DraftOwner>;
|
|
43
43
|
};
|
|
44
|
-
export declare class CodexClient extends
|
|
44
|
+
export declare class CodexClient extends AdapterClient<AppState> {
|
|
45
|
+
private readonly applicationRegistry;
|
|
46
|
+
private readonly toolSelection;
|
|
45
47
|
executeShell(sessionId: string, command: string): Promise<void>;
|
|
46
48
|
private readonly modelListeners;
|
|
47
49
|
private readonly confirmedModelListeners;
|
|
@@ -73,7 +75,7 @@ export declare class CodexClient extends CodexAcpClient<AppState> {
|
|
|
73
75
|
protected promptMeta(id: string, options: PromptOptions): Record<string, unknown> | undefined;
|
|
74
76
|
private readonly promptImages;
|
|
75
77
|
promptWithImages(id: string, prompt: acp.ContentBlock[], options?: PromptOptions): Promise<string>;
|
|
76
|
-
|
|
78
|
+
private applicationToolsFor;
|
|
77
79
|
private releaseImages;
|
|
78
80
|
protected onDisconnected(): void;
|
|
79
81
|
cancel(id: string): Promise<void>;
|
|
@@ -90,12 +92,26 @@ export declare class CodexClient extends CodexAcpClient<AppState> {
|
|
|
90
92
|
private replayWithEffort;
|
|
91
93
|
connect(): Promise<void>;
|
|
92
94
|
listProjectSessions(cwd: string): Promise<SessionSummary[]>;
|
|
93
|
-
newSession(cwd?: string, model?: string | null | NewSessionOptions, owner?: DraftOwner): Promise<string>;
|
|
95
|
+
newSession(cwd?: string, model?: string | null | (NewSessionOptions & ApplicationSessionOptions), owner?: DraftOwner): Promise<string>;
|
|
94
96
|
private createNativeSession;
|
|
95
|
-
open(id: string, cwd: string, owner?: DraftOwner |
|
|
97
|
+
open(id: string, cwd: string, owner?: DraftOwner | ApplicationSessionOptions): Promise<void>;
|
|
96
98
|
private replayForOwner;
|
|
97
|
-
protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<
|
|
99
|
+
protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<AdapterClient<AppState>["requestContext"]>;
|
|
98
100
|
private requestModelContext;
|
|
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
|
+
installedApps(params?: AppsInstalledParams): Promise<{
|
|
106
|
+
apps: {
|
|
107
|
+
id: string;
|
|
108
|
+
runtimeName: string | null;
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
callable: boolean;
|
|
111
|
+
iconUrl?: string | null | undefined;
|
|
112
|
+
iconUrlDark?: string | null | undefined;
|
|
113
|
+
}[];
|
|
114
|
+
}>;
|
|
99
115
|
protected recoverReplay(id: string, cwd: string, error: unknown, scope: ReplayScope): Promise<boolean>;
|
|
100
116
|
markAccountModelsUnavailable(ids: readonly string[]): void;
|
|
101
117
|
resumeModel(id: string, model: string): Promise<void>;
|
package/dist/agent/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b,Hi}from"../chunk-a11wvd8e.js";import"../chunk-v9weanq6.js";import"../chunk-eynwjzqp.js";import"../chunk-ps408sxd.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-2f8s5gtn.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};
|
package/dist/agent/fork-title.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{En}from"../chunk-nrpgmawz.js";export{En as forkTitle};
|
|
@@ -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-ps408sxd.js";import"../chunk-4sfxcw58.js";import"../chunk-9neb2f30.js";import"../chunk-2f8s5gtn.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{qi}from"../../chunk-e1fzfaqj.js";import"../../chunk-etvdqkvb.js";export{qi as chatInputMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{lo}from"../../chunk-ypdh88cj.js";export{lo as executionMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xt}from"../../chunk-etvdqkvb.js";export{xt as imageApplicationContext};
|
|
@@ -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{
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ks}from"../chunk-zv3bm3np.js";export{ks as macProjectPaths};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ge,
|
|
1
|
+
import{ge,An,ha}from"../chunk-7tw7rn0m.js";export{ha as explainRequestError,ge as isAuthenticationRequired,An as isModelSelectionRequired};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ss}from"../chunk-52wrk1mh.js";export{Ss as watchSessionList};
|
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 McpServer } from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import { type CallToolResult, type ToolAnnotations } from "@modelcontextprotocol/server";
|
|
1
3
|
import type { Agent, AgentRequest, Session, SessionOperation, SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
|
|
2
|
-
export type
|
|
3
|
-
import type { ClientToolResult as ApplicationToolResult, ClientToolSet } from "@alwith/api/tools";
|
|
4
|
+
export type ApplicationToolResult = CallToolResult;
|
|
4
5
|
export type ApplicationToolContext = {
|
|
5
6
|
sessionId: string;
|
|
6
7
|
toolCallId: string;
|
|
@@ -10,33 +11,46 @@ 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
|
};
|
|
20
|
+
export type ApplicationSessionOptions = SessionRequestOptions & {
|
|
21
|
+
applicationTools?: readonly ApplicationTool[];
|
|
22
|
+
};
|
|
19
23
|
export type ApplicationToolSelection = {
|
|
20
24
|
cwd: string;
|
|
21
25
|
operation: SessionOperation;
|
|
22
|
-
options:
|
|
26
|
+
options: ApplicationSessionOptions;
|
|
23
27
|
};
|
|
24
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
|
+
};
|
|
25
33
|
export declare function defineApplicationTool<T>(tool: Omit<ApplicationTool, "execute"> & {
|
|
26
34
|
parse: (input: unknown) => T;
|
|
27
35
|
execute: (input: T, context: ApplicationToolContext) => Promise<ApplicationToolResult> | ApplicationToolResult;
|
|
28
36
|
}): ApplicationTool;
|
|
29
|
-
export declare
|
|
37
|
+
export declare const APPLICATION_SERVER_NAME = "alwith";
|
|
30
38
|
export declare class ApplicationToolRegistry {
|
|
31
|
-
private readonly
|
|
32
|
-
private readonly
|
|
39
|
+
private readonly servers;
|
|
40
|
+
private readonly requests;
|
|
33
41
|
private readonly session;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
private readonly identity;
|
|
43
|
+
constructor(session: (id: string) => Session | undefined, identity: ApplicationCallIdentity);
|
|
44
|
+
declare(tools: readonly ApplicationTool[]): Extract<McpServer, {
|
|
45
|
+
type: "acp";
|
|
46
|
+
}>;
|
|
47
|
+
bind(serverId: string, sessionId: string): void;
|
|
48
|
+
cancel(sessionId: string): void;
|
|
49
|
+
drop(sessionId: string): void;
|
|
38
50
|
clear(): void;
|
|
39
|
-
private
|
|
51
|
+
private dispose;
|
|
40
52
|
withdraw(requestId: unknown): boolean;
|
|
41
53
|
handle(agent: Agent, request: AgentRequest): boolean;
|
|
54
|
+
private message;
|
|
55
|
+
private server;
|
|
42
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Rn,co,uo}from"./chunk-2f8s5gtn.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{
|
|
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{
|
|
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{
|
|
2
|
-
export{
|
|
1
|
+
import{u}from"./chunk-stv8pr4v.js";import{cn as o}from"cn";import{motion as v}from"motion/react";import{jsx as i,jsxs as g}from"react/jsx-runtime";function ut({active:n,expanded:r=!1,highlight:s=!0,className:a,...l}){return i("button",{type:"button","data-active":n?"":void 0,"aria-current":n?"page":void 0,className:o(s&&u,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)]":"size-[var(--navigation-row-height,30px)]",a),...l})}function Vs({tabs:n,view:r,onViewChange:s,onReset:a,notifications:l,trailing:p,className:d}){return g("div",{className:o("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",d),children:[i("div",{role:"tablist",className:"bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-52 flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]",children:n.map((e)=>{let t=r===e.key;return g(ut,{role:"tab",active:t,expanded:t,highlight:!1,"aria-selected":t,title:e.title,onClick:()=>s(e.key),onDoubleClick:a&&(()=>a(e.key)),className:o("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-[18px] [&_svg]:shrink-0",t?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[t&&i(v.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-destructive pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:o("relative z-10 grid",t?"ms-1.5 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})}),p!=null&&i("div",{className:"ms-auto flex shrink-0 items-center gap-0.5",children:p})]})}
|
|
2
|
+
export{ut,Vs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
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
|
+
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{
|
|
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{
|
|
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{
|
|
2
|
-
export{
|
|
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
|
+
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
|
|
2
|
-
export{
|
|
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{
|
|
2
|
-
export{
|
|
1
|
+
import{L}from"./chunk-3tvq6xr2.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function er({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(L,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{er};
|
|
@@ -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};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{fromMcpServer as I}from"@agentclientprotocol/sdk/experimental/mcp-server";import{MCP_META_CLIENT_CAPABILITIES as h,MCP_META_CLIENT_INFO as T,MCP_META_PROTOCOL_VERSION as v,MCP_PROTOCOL_VERSION as w,McpBindingErrorCode as A}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{Server as C}from"@modelcontextprotocol/server";function Rn(n){let{parse:t,execute:e,...s}=n;return{...s,execute:(o,i)=>e(t(o),i)}}var co="alwith";function S(n){if(n.length>128)throw Error("Too many application tools");let t=new Map;for(let e of n){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(e.name)||t.has(e.name))throw Error(`Invalid or duplicate application tool: ${e.name}`);if(!e.description.trim()||e.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${e.name}`);t.set(e.name,{...e,inputSchema:structuredClone(e.inputSchema)})}return t}class p extends Error{code;data;constructor(n,t,e){super(t);this.code=n,this.data=e}}var m=(n)=>({content:[{type:"text",text:n instanceof Error?n.message:String(n)}],isError:!0});class uo{servers=new Map;requests=new Map;session;identity;constructor(n,t){this.session=n,this.identity=t}declare(n){let t=crypto.randomUUID(),e={tools:S(n),sessionId:null,active:new Map,calls:new Map,mcp:I(()=>this.server(e))};return this.servers.set(t,e),{type:"acp",name:co,serverId:t}}bind(n,t){let e=this.servers.get(n);if(!e)throw Error(`Application tool server is not registered: ${n}`);for(let[s,o]of this.servers)if(o.sessionId===t)this.dispose(s);e.sessionId=t}cancel(n){for(let t of this.servers.values())if(t.sessionId===n)for(let e of t.active.values())e.abort()}drop(n){for(let[t,e]of this.servers)if(e.sessionId===n)this.dispose(t)}clear(){for(let n of this.servers.keys())this.dispose(n)}dispose(n){let t=this.servers.get(n);if(!t)return;this.servers.delete(n);for(let e of t.active.values())e.abort();t.mcp.close()}withdraw(n){let t=this.requests.get(JSON.stringify(n));if(!t)return!1;return t.abort(),!0}handle(n,t){if(t.method!=="mcp/message")return!1;let e=JSON.stringify(t.id),s=new AbortController;return this.requests.set(e,s),this.message(n,t.params,s.signal).then((o)=>n.respond(t.id,o),(o)=>n.respond(t.id,void 0,o instanceof p?{code:o.code,message:o.message,...o.data===void 0?{}:{data:o.data}}:{code:A.backendFailed,message:"MCP server handler failed",data:{details:o instanceof Error?o.message:String(o)}})).finally(()=>{if(this.requests.get(e)===s)this.requests.delete(e)}).catch(()=>{return}),!0}async message(n,t,e){let s=t;if(!s||typeof s!=="object"||typeof s.serverId!=="string"||typeof s.requestId!=="string"||typeof s.method!=="string"||s.params!=null&&(typeof s.params!=="object"||Array.isArray(s.params)))throw new p(-32602,"Invalid mcp/message params");let{serverId:o,requestId:i,method:c}=s,d=s.params??void 0,r=this.servers.get(o);if(!r)throw new p(A.serverUnavailable,"MCP server registration unavailable",{serverId:o});if(r.active.has(i))throw new p(-32602,"duplicate active MCP request ID",{serverId:o,requestId:i});let a=d?._meta,u=a?.[v],g=a?.[h];if(typeof u!=="string")return{error:{code:-32602,message:`missing ${v} in params._meta`}};if(u!==w)return{error:{code:-32022,message:"Unsupported protocol version",data:{supported:[w],requested:u}}};if(!g||typeof g!=="object"||Array.isArray(g))return{error:{code:-32602,message:`missing ${h} in params._meta`}};let l=new AbortController,y=()=>l.abort();if(e.addEventListener("abort",y,{once:!0}),r.active.set(i,l),r.sessionId!==null)r.calls.set(i,{agent:n,sessionId:r.sessionId,signal:l.signal});try{let f=await r.mcp.handler({serverId:o,requestId:i,method:c,params:d,protocolVersion:u,clientCapabilities:g,clientInfo:a?.[T],envelopeMeta:s._meta,signal:l.signal,notify:async()=>{return}});return l.signal.throwIfAborted(),f}catch(f){if(l.signal.aborted)throw new p(A.requestCancelled,"MCP request was cancelled");throw f}finally{e.removeEventListener("abort",y),r.active.delete(i),r.calls.delete(i)}}server(n){let t=new C({name:co,version:"1.0.0"},{capabilities:{tools:{}}});return t.setRequestHandler("tools/list",()=>({tools:[...n.tools.values()].map((e)=>({name:e.name,...e.title===void 0?{}:{title:e.title},description:e.description,inputSchema:structuredClone(e.inputSchema),...e.annotations===void 0?{}:{annotations:e.annotations}}))})),t.setRequestHandler("tools/call",async(e,s)=>{let o=n.calls.get(String(s.mcpReq.id)),i=n.tools.get(e.params.name);if(!i)return m(Error(`Application tool is not registered: ${e.params.name}`));if(!o)return m(Error("Application tool session is not attached"));let c=this.session(o.sessionId);if(!c?.attached||c.readOnly)return m(Error("Application tool session is not attached"));let{toolCallId:d,turnId:r}=this.identity(e.params._meta??{});try{o.signal.throwIfAborted();let a=await i.execute(e.params.arguments??{},{sessionId:o.sessionId,toolCallId:d,turnId:r,signal:o.signal,agent:o.agent});return o.signal.throwIfAborted(),a}catch(a){if(o.signal.aborted)throw a;return m(a)}}),t}}
|
|
2
|
+
export{Rn,co,uo};
|