sanoma 0.11.21 → 0.11.22
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 +2 -0
- package/app/README.md +2 -2
- package/app/dist/api.d.ts +16 -2
- package/app/dist/api.js +1 -1
- package/app/dist/client/assets/ArrowDown.es-BOfBLlTP.js +1 -0
- package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
- package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
- package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
- package/app/dist/client/assets/DialogTitle-Dz3loDe5.js +1 -0
- package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
- package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
- package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
- package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
- package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
- package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
- package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
- package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
- package/app/dist/client/assets/_id-C4bMZ73g.js +1 -0
- package/app/dist/client/assets/_id-CUaJYD_3.js +1 -0
- package/app/dist/client/assets/_id-DRetx-BJ.js +1 -0
- package/app/dist/client/assets/_id-mm7bTIIl.js +2 -0
- package/app/dist/client/assets/_id-tN6nFEpD.js +1 -0
- package/app/dist/client/assets/_name-BOi2qVWk.js +1 -0
- package/app/dist/client/assets/_name-CBI1waPs.js +4 -0
- package/app/dist/client/assets/_name-CrsiaFT6.js +1 -0
- package/app/dist/client/assets/_name-TzQfjXo8.js +1 -0
- package/app/dist/client/assets/_vendor-C3TGvx4w.js +1 -0
- package/app/dist/client/assets/_vendor-sHwAlFSF.js +1 -0
- package/app/dist/client/assets/app-chrome-_ahvxx73.js +5 -0
- package/app/dist/client/assets/app-scope-Bht7PIkQ.js +1 -0
- package/app/dist/client/assets/approval-BFFM_yEl.js +1 -0
- package/app/dist/client/assets/apps-CpdXjc1j.js +1 -0
- package/app/dist/client/assets/button-D5kdANef.js +1 -0
- package/app/dist/client/assets/change-glance-CdkbSGxZ.js +1 -0
- package/app/dist/client/assets/changes-C_K2tazO.js +1 -0
- package/app/dist/client/assets/changes-DFcdyDL_.js +1 -0
- package/app/dist/client/assets/chat-Djbdaxw8.js +14 -0
- package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
- package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
- package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
- package/app/dist/client/assets/common-DHOhx6Zn.js +3 -0
- package/app/dist/client/assets/composite-9cNA7N0P.js +1 -0
- package/app/dist/client/assets/connect-DHUdrwwW.js +1 -0
- package/app/dist/client/assets/connections-fGNKJl3J.js +5 -0
- package/app/dist/client/assets/connectors-CuS1paNm.js +1 -0
- package/app/dist/client/assets/credentials-Cb7Lnfxk.js +1 -0
- package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
- package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
- package/app/dist/client/assets/data-DZ-ufRXn.js +1 -0
- package/app/dist/client/assets/decidable-OFQBEcco.js +1 -0
- package/app/dist/client/assets/declaration-form-D2ZMEVC6.js +1 -0
- package/app/dist/client/assets/dialog-B5pmfCdJ.js +1 -0
- package/app/dist/client/assets/diff-woXpYk--.js +1 -0
- package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
- package/app/dist/client/assets/existing-BaPrTDs8.js +1 -0
- package/app/dist/client/assets/fence-CMhOJv7H.js +157 -0
- package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
- package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
- package/app/dist/client/assets/graph-B5TYhcqD.js +7 -0
- package/app/dist/client/assets/grid-diff-wo26YSgM.js +1 -0
- package/app/dist/client/assets/held-card-HrJ6QpRY.js +1 -0
- package/app/dist/client/assets/highlighted-body-JLMTFACH-CjeaSnZq.js +1 -0
- package/app/dist/client/assets/hosting-Beoi95m6.js +1 -0
- package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
- package/app/dist/client/assets/import-8WDFPfe6.js +1 -0
- package/app/dist/client/assets/inbox-B9hsZPsC.js +1 -0
- package/app/dist/client/assets/inbox-DM2npRZI.js +1 -0
- package/app/dist/client/assets/index-CHKfukjt.js +10 -0
- package/app/dist/client/assets/item-B4QRpXse.js +1 -0
- package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
- package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
- package/app/dist/client/assets/json-qhed-kSA.js +1 -0
- package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
- package/app/dist/client/assets/kit-n8CE0xEs.js +1 -0
- package/app/dist/client/assets/lazyRouteComponent-DezoGNoN.js +1 -0
- package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
- package/app/dist/client/assets/markdown-DS_nKu0s.js +164 -0
- package/app/dist/client/assets/mermaid-WFAXDIZX-DQBKIf0O.js +1 -0
- package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
- package/app/dist/client/assets/people-BiiQfYJ8.js +1 -0
- package/app/dist/client/assets/permissions-BmKxEfBi.js +2 -0
- package/app/dist/client/assets/permissions-grid-B755bq5J.js +1 -0
- package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
- package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
- package/app/dist/client/assets/queries-DGlVu9wp.js +57 -0
- package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
- package/app/dist/client/assets/route-BSe5L2p4.js +1 -0
- package/app/dist/client/assets/route-Ds87ixtB.js +1 -0
- package/app/dist/client/assets/runs-table-DMiD4HeY.js +1 -0
- package/app/dist/client/assets/scenario-DrgmfuFx.js +1 -0
- package/app/dist/client/assets/scenario-graph-Blv2e1PV.js +1 -0
- package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
- package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-BKUFUA1l.js} +1 -1
- package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
- package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
- package/app/dist/client/assets/sites.index-K4mrFsLr.js +1 -0
- package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
- package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
- package/app/dist/client/assets/start-form-CJ6VmNPY.js +1 -0
- package/app/dist/client/assets/store-BT988jIX.js +1 -0
- package/app/dist/client/assets/style-CTcG_5y0.css +2 -0
- package/app/dist/client/assets/table-B81tv0LG.js +1 -0
- package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
- package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
- package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
- package/app/dist/client/assets/{useLoaderData-BQd5yMlA.js → useLoaderData-BsksXf-p.js} +1 -1
- package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
- package/app/dist/client/assets/useRegisterFieldControl-DIkKUJkh.js +1 -0
- package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
- package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
- package/app/dist/client/assets/who-are-you-DUoVqvfP.js +1 -0
- package/app/dist/client/assets/workflow-lQtyyxKx.js +1 -0
- package/app/dist/client/assets/workflow-view-hk_RU9WF.js +1 -0
- package/app/dist/client/assets/workflows-DFB7lzzN.js +1 -0
- package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
- package/app/dist/index.d.ts +4 -4
- package/app/dist/lib/chat.d.ts +64 -19
- package/app/dist/lib/chat.js +54 -18
- package/app/dist/lib/chat.js.map +1 -1
- package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id--MWJXj9R.js} +2 -2
- package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-BEGe86NW.js} +2 -2
- package/app/dist/server/assets/{_id-BViXAagq.js → _id-CbO7Ok0w.js} +12 -10
- package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-DwdpIYKk.js} +2 -2
- package/app/dist/server/assets/{_id-wB8khGTz.js → _id-fK_nPFHK.js} +6 -6
- package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-BzD9TxVC.js} +17 -17
- package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-ClgMsl5m.js} +2 -2
- package/app/dist/server/assets/{_name-BGagGBjX.js → _name-DdFVsjcj.js} +7 -7
- package/app/dist/server/assets/{_name-DntbHE-b.js → _name-Dyh4G9Oy.js} +10 -11
- package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUtnBg7y.js} +101 -91
- package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DyeUY8kH.js} +8 -8
- package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-W3KKSusM.js} +2 -2
- package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-BlaOwG6A.js} +1 -1
- package/app/dist/server/assets/app-chrome-BJlxsc9y.js +2116 -0
- package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-ASuhE3xI.js} +2 -2
- package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-Djw1tNPD.js} +8 -7
- package/app/dist/server/assets/{approval-Su315ikC.js → approval-BjTnfr1U.js} +15 -13
- package/app/dist/server/assets/{apps-xwQAehch.js → apps-C28F9Y5C.js} +7 -7
- package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
- package/app/dist/server/assets/change-glance-Bc4htVPy.js +54 -0
- package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-B5P8BJSf.js} +2 -54
- package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-tbeMKxjY.js} +8 -7
- package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-BNMeLc9V.js} +108 -30
- package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
- package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
- package/app/dist/server/assets/{common-CWHLj7KV.js → common-DpZcJvCy.js} +26 -24
- package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-Cljunav2.js} +11 -10
- package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Cfz5LMy5.js} +12 -11
- package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-tt9BF9L1.js} +8 -8
- package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-CYUFAVU8.js} +10 -9
- package/app/dist/server/assets/{data-aEdhwcqy.js → data-D91ZZ5St.js} +7 -7
- package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-BzISD6gw.js} +7 -6
- package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
- package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
- package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZym0xE2.js} +8 -7
- package/app/dist/server/assets/fence-Br7MPP41.js +130 -0
- package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
- package/app/dist/server/assets/{functions-BvFYzabD.js → functions-sf07C1qn.js} +2 -2
- package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-C1Cl7owl.js} +5 -5
- package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
- package/app/dist/server/assets/held-card-CDewk4rs.js +75 -0
- package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-O-l2L0ec.js} +16 -14
- package/app/dist/server/assets/{import-DIwvzHb6.js → import-qvpEIYFx.js} +8 -8
- package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BcJxCIPm.js} +8 -8
- package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-BvpSeC3M.js} +2 -2
- package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
- package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
- package/app/dist/server/assets/{kit-D6EulwBe.js → kit-DlT_THim.js} +2 -2
- package/app/dist/server/assets/markdown-BExKjghi.js +116 -0
- package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-B6RPW0fH.js} +1 -1
- package/app/dist/server/assets/{people-CkU_AxrV.js → people-C8VXQrKg.js} +13 -12
- package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-COAiOoCB.js} +9 -8
- package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CcYUiqhD.js} +4 -4
- package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-DJcZ4mzA.js} +3 -45
- package/app/dist/server/assets/{route-BTT7nMJq.js → route-DOqitvxL.js} +2 -2
- package/app/dist/server/assets/{route-CF_8jQYY.js → route-aa9MThMA.js} +2 -2
- package/app/dist/server/assets/{router-BvYtxrVN.js → router-Co6gRNI1.js} +80 -46
- package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-BtGm2KOO.js} +6 -6
- package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-DidUafqw.js} +5 -5
- package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
- package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
- package/app/dist/server/assets/{sites.index-1l0BtgVf.js → sites.index-4TK8c0QC.js} +4 -4
- package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
- package/app/dist/server/assets/{start-CSU4irVK.js → start-VfVsXenI.js} +2 -2
- package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-CUeEdeP7.js} +10 -9
- package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
- package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
- package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
- package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-DW5qmIzp.js} +8 -7
- package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BRu7ljgU.js} +5 -5
- package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-yF48p1lu.js} +14 -13
- package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-DL-TJFLt.js} +13 -14
- package/app/dist/server/chat.d.ts +6 -1
- package/app/dist/server/chat.js +39 -20
- package/app/dist/server/chat.js.map +1 -1
- package/app/dist/server/server.js +48 -48
- package/app/dist/steps/agent/acp.d.ts +3 -97
- package/app/dist/steps/agent/acp.js +19 -49
- package/app/dist/steps/agent/acp.js.map +1 -1
- package/app/dist/steps/agent/checkout.d.ts +18 -1
- package/app/dist/steps/agent/checkout.js +17 -0
- package/app/dist/steps/agent/checkout.js.map +1 -1
- package/app/dist/steps/agent/harness.d.ts +2 -4
- package/app/dist/steps/agent/harness.js +45 -61
- package/app/dist/steps/agent/harness.js.map +1 -1
- package/app/dist/steps/agent/prompt.d.ts +1 -1
- package/app/dist/steps/agent/prompt.js +35 -14
- package/app/dist/steps/agent/prompt.js.map +1 -1
- package/app/dist/steps/agent/transcript.d.ts +10 -1
- package/app/dist/steps/agent/transcript.js +75 -2
- package/app/dist/steps/agent/transcript.js.map +1 -1
- package/app/dist/steps/agent/turn.d.ts +4 -6
- package/app/dist/steps/agent/turn.js +14 -16
- package/app/dist/steps/agent/turn.js.map +1 -1
- package/app/dist/stylesheet.json +1 -1
- package/app/src/api.ts +1 -1
- package/app/src/components/app-chrome.tsx +28 -13
- package/app/src/components/common.tsx +1 -24
- package/app/src/components/logo.tsx +25 -0
- package/app/src/components/shell/chat-parts.tsx +185 -126
- package/app/src/components/shell/chat-prompt.ts +6 -2
- package/app/src/components/shell/chat.tsx +154 -220
- package/app/src/components/shell/composer.tsx +140 -0
- package/app/src/components/shell/connect-agent.tsx +157 -0
- package/app/src/components/shell/engine-mark.tsx +9 -0
- package/app/src/components/shell/fence.tsx +25 -0
- package/app/src/components/shell/held-card.tsx +58 -0
- package/app/src/components/shell/markdown.tsx +152 -0
- package/app/src/components/shell/nav-user.tsx +11 -1
- package/app/src/components/shell/prefs.ts +9 -1
- package/app/src/components/shell/thread.tsx +174 -0
- package/app/src/components/ui/bubble.tsx +117 -0
- package/app/src/components/ui/code-block.tsx +235 -0
- package/app/src/components/ui/input-group.tsx +136 -0
- package/app/src/components/ui/marker.tsx +67 -0
- package/app/src/components/ui/message-scroller.tsx +117 -0
- package/app/src/components/ui/message.tsx +74 -0
- package/app/src/components/ui/trace.tsx +133 -0
- package/app/src/hooks/use-highlighted-code.ts +72 -0
- package/app/src/index.ts +4 -4
- package/app/src/lib/chat.ts +110 -22
- package/app/src/lib/cn-tables.ts +23 -23
- package/app/src/lib/highlighter.tsx +114 -0
- package/app/src/routes/__root.tsx +7 -4
- package/app/src/routes/connectors/index.tsx +1 -1
- package/app/src/routes/hosting/index.tsx +6 -9
- package/app/src/server/chat.ts +41 -19
- package/app/src/steps/agent/acp.ts +10 -80
- package/app/src/steps/agent/checkout.ts +30 -0
- package/app/src/steps/agent/harness.ts +53 -78
- package/app/src/steps/agent/prompt.ts +42 -14
- package/app/src/steps/agent/transcript.ts +90 -3
- package/app/src/steps/agent/turn.ts +18 -16
- package/app/src/worker/app.ts +6 -5
- package/dist/cli.js +18 -6
- package/dist/cli.js.map +1 -1
- package/dist/serve.js +1 -1
- package/dist/serve.js.map +1 -1
- package/dist/worker-port.d.ts +16 -2
- package/dist/worker-port.js +44 -5
- package/dist/worker-port.js.map +1 -1
- package/package.json +7 -3
- package/testing/README.md +3 -3
- package/testing/dist/build.d.ts +3 -3
- package/testing/dist/build.js +4 -4
- package/testing/dist/build.js.map +1 -1
- package/testing/dist/host.d.ts +34 -21
- package/testing/dist/host.js +135 -75
- package/testing/dist/host.js.map +1 -1
- package/workflows/CLOUD-IDENTITY.md +15 -20
- package/workflows/README.md +9 -7
- package/workflows/dist/client.d.ts +5 -3
- package/workflows/dist/client.js +4 -3
- package/workflows/dist/client.js.map +1 -1
- package/workflows/dist/cloud-identity.d.ts +5 -2
- package/workflows/dist/cloud-identity.js +7 -4
- package/workflows/dist/cloud-identity.js.map +1 -1
- package/workflows/dist/config.d.ts +7 -1
- package/workflows/dist/config.js +24 -1
- package/workflows/dist/config.js.map +1 -1
- package/workflows/dist/db/company.d.ts +1 -1
- package/workflows/dist/db/company.js +1 -1
- package/workflows/dist/db/identity.d.ts +2 -2
- package/workflows/dist/db/identity.js +2 -2
- package/workflows/dist/db/identity.js.map +1 -1
- package/workflows/dist/deadlines.d.ts +7 -2
- package/workflows/dist/deadlines.js +14 -5
- package/workflows/dist/deadlines.js.map +1 -1
- package/workflows/dist/describe.js +15 -3
- package/workflows/dist/describe.js.map +1 -1
- package/workflows/dist/description.d.ts +37 -2
- package/workflows/dist/description.js +22 -1
- package/workflows/dist/description.js.map +1 -1
- package/workflows/dist/host.d.ts +7 -6
- package/workflows/dist/host.js +1 -1
- package/workflows/dist/host.js.map +1 -1
- package/workflows/dist/identity-provisioning.d.ts +2 -5
- package/workflows/dist/identity-provisioning.js +16 -20
- package/workflows/dist/identity-provisioning.js.map +1 -1
- package/workflows/dist/index.d.ts +3 -3
- package/workflows/dist/index.js +1 -1
- package/workflows/dist/index.js.map +1 -1
- package/workflows/dist/op.d.ts +92 -1
- package/workflows/dist/op.js +19 -6
- package/workflows/dist/op.js.map +1 -1
- package/workflows/dist/renewal.d.ts +1 -1
- package/workflows/dist/renewal.js +1 -1
- package/workflows/dist/runtime-ops.d.ts +3 -4
- package/workflows/dist/runtime-ops.js +4 -4
- package/workflows/dist/runtime-ops.js.map +1 -1
- package/workflows/dist/schedules.d.ts +1 -1
- package/workflows/dist/schedules.js +1 -1
- package/workflows/dist/supervisor.d.ts +21 -18
- package/workflows/dist/supervisor.js +20 -22
- package/workflows/dist/supervisor.js.map +1 -1
- package/workflows/dist/vendor-info.d.ts +12 -3
- package/workflows/dist/vendor-info.js +20 -4
- package/workflows/dist/vendor-info.js.map +1 -1
- package/workflows/dist/worker.d.ts +11 -1
- package/workflows/dist/worker.js +9 -3
- package/workflows/dist/worker.js.map +1 -1
- package/workflows/src/client.ts +9 -6
- package/workflows/src/cloud-identity.ts +7 -4
- package/workflows/src/config.ts +36 -1
- package/workflows/src/db/company.ts +1 -1
- package/workflows/src/db/identity.ts +2 -2
- package/workflows/src/deadlines.ts +18 -8
- package/workflows/src/describe.ts +16 -3
- package/workflows/src/description.ts +25 -1
- package/workflows/src/host.ts +7 -6
- package/workflows/src/identity-provisioning.ts +19 -30
- package/workflows/src/index.ts +7 -1
- package/workflows/src/op.ts +104 -10
- package/workflows/src/renewal.ts +1 -1
- package/workflows/src/runtime-ops.ts +5 -5
- package/workflows/src/schedules.ts +1 -1
- package/workflows/src/supervisor.ts +40 -38
- package/workflows/src/vendor-info.ts +20 -5
- package/workflows/src/worker.ts +22 -5
- package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
- package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
- package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
- package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
- package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
- package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
- package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
- package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
- package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
- package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
- package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
- package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
- package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
- package/app/dist/client/assets/_id-BudM76zX.js +0 -1
- package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
- package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
- package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
- package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
- package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
- package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
- package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
- package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
- package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
- package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
- package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
- package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
- package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
- package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
- package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
- package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
- package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
- package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
- package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
- package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
- package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
- package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
- package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
- package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
- package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
- package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
- package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
- package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
- package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
- package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
- package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
- package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
- package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
- package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
- package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
- package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
- package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
- package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
- package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
- package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
- package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
- package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
- package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
- package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
- package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
- package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
- package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
- package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
- package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
- package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
- package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
- package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
- package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
- package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
- package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
- package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
- package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
- package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
- package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
- package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
- package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
- package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
- package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
- package/app/dist/server/assets/native-select-DLa-He0n.js +0 -37
- package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
|
@@ -10,7 +10,7 @@ import { actorQuery } from "../queries.ts";
|
|
|
10
10
|
import { Bar, PhoneBar } from "./shell/bar.tsx";
|
|
11
11
|
import { ChatColumn } from "./shell/chat.tsx";
|
|
12
12
|
import { type ChatPrompt, ChatPromptContext, type Prompt } from "./shell/chat-prompt.ts";
|
|
13
|
-
import { BESIDE_PAGE, CHAT_COOKIE, rememberPref } from "./shell/prefs.ts";
|
|
13
|
+
import { BESIDE_PAGE, CHAT_COOKIE, ENGINE_COOKIE, rememberPref } from "./shell/prefs.ts";
|
|
14
14
|
|
|
15
15
|
// The app's chrome around every page on the app's host: the bar, the chat column, the page, who
|
|
16
16
|
// you are. The root loads it lazily, so a public site's host never does.
|
|
@@ -38,6 +38,13 @@ export default function Root() {
|
|
|
38
38
|
// taken once, as the chrome mounts (hydration has the server's answer, from the cookie).
|
|
39
39
|
const chatPref = useLoaderData({ from: "__root__", select: (data) => data?.chat });
|
|
40
40
|
const compact = useLoaderData({ from: "__root__", select: (data) => data?.compact ?? false });
|
|
41
|
+
// The engine a new chat opens on, kept here as well as in its cookie: a chat opened later starts on it.
|
|
42
|
+
const enginePref = useLoaderData({ from: "__root__", select: (data) => data?.engine });
|
|
43
|
+
const [engine, setEngine] = useState(enginePref);
|
|
44
|
+
const chooseEngine = (name: string) => {
|
|
45
|
+
rememberPref(ENGINE_COOKIE, name);
|
|
46
|
+
setEngine(name);
|
|
47
|
+
};
|
|
41
48
|
const [chat, setChat] = useState(chatPref !== "closed");
|
|
42
49
|
// Never set: open beside the page, and folded where it would lie over it, following the
|
|
43
50
|
// window's width until Chat is used (the server cannot know it, so the column hides there by
|
|
@@ -59,17 +66,18 @@ export default function Root() {
|
|
|
59
66
|
setChat(!chat);
|
|
60
67
|
setUnset(false);
|
|
61
68
|
};
|
|
62
|
-
const chatPrompt = useMemo<ChatPrompt>(
|
|
63
|
-
() =>
|
|
64
|
-
open
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
const chatPrompt = useMemo<ChatPrompt>(() => {
|
|
70
|
+
const openOn = (opening: Omit<Prompt, "id">) => {
|
|
71
|
+
rememberPref(CHAT_COOKIE, "open");
|
|
72
|
+
setChat(true);
|
|
73
|
+
setUnset(false);
|
|
74
|
+
setPrompt({ id: generateId(), ...opening });
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
open: (text) => openOn({ text }),
|
|
78
|
+
chooseAgent: () => openOn({ text: "", choose: true }),
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
73
81
|
// A page that asks for it (a workflow's, for its graph) takes the full width.
|
|
74
82
|
const wide = useMatches({ select: (matches) => matches.some((match) => match.staticData.wide) });
|
|
75
83
|
return (
|
|
@@ -81,7 +89,14 @@ export default function Root() {
|
|
|
81
89
|
<div className="flex min-h-svh">
|
|
82
90
|
<Bar chat={{ open: chat, toggle: toggleChat }} className="sticky top-0 hidden h-svh self-start md:flex" />
|
|
83
91
|
{/* A new prompt opens a column of its own, on the prompt's chat. */}
|
|
84
|
-
{chat &&
|
|
92
|
+
{chat && (
|
|
93
|
+
<ChatColumn
|
|
94
|
+
key={prompt?.id}
|
|
95
|
+
besidePageOnly={unset}
|
|
96
|
+
prompt={prompt}
|
|
97
|
+
engine={{ value: engine, set: chooseEngine }}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
85
100
|
{/* The page: its frame (title row, tabs, one card) is its children, the region gap apart. */}
|
|
86
101
|
<main data-slot="page" className="flex min-w-0 flex-1 flex-col">
|
|
87
102
|
<PhoneBar />
|
|
@@ -40,6 +40,7 @@ import { hasOneUrl } from "#/site-path.ts";
|
|
|
40
40
|
import { useSites } from "#/lib/sites.ts";
|
|
41
41
|
import { utcText } from "#/lib/time.ts";
|
|
42
42
|
import { cn, plural } from "#/lib/utils.ts";
|
|
43
|
+
import { Logo } from "#/components/logo.tsx";
|
|
43
44
|
import { APPROVAL_TONE, DECISION_TONE, RUN_TONE, type Tone } from "#/lib/tone.ts";
|
|
44
45
|
import type { OpEntry, SiteEntry } from "sanoma/workflows/describe";
|
|
45
46
|
import { approverLabel, CALL_WORKFLOW, type Tier } from "sanoma/workflows/shared";
|
|
@@ -134,30 +135,6 @@ export function TierBadge({ tier }: { tier: Tier }) {
|
|
|
134
135
|
return <Badge variant={tier === "community" ? "outline" : "secondary"}>{TIER_LABELS[tier]}</Badge>;
|
|
135
136
|
}
|
|
136
137
|
|
|
137
|
-
/**
|
|
138
|
-
* A logo, 16 px unless `className` sizes it: `src`, and `dark` instead under the dark theme. Only
|
|
139
|
-
* ever an `<img>`, where an SVG's scripts and external references never run or load.
|
|
140
|
-
*/
|
|
141
|
-
export function Logo({
|
|
142
|
-
src,
|
|
143
|
-
dark,
|
|
144
|
-
alt,
|
|
145
|
-
className,
|
|
146
|
-
}: {
|
|
147
|
-
src: string;
|
|
148
|
-
dark?: string | undefined;
|
|
149
|
-
alt: string;
|
|
150
|
-
className?: string | undefined;
|
|
151
|
-
}) {
|
|
152
|
-
// A hidden <img> is out of the accessibility tree: one name is read either way.
|
|
153
|
-
return (
|
|
154
|
-
<>
|
|
155
|
-
<img src={src} alt={alt} className={cn("size-4 shrink-0", dark && "dark:hidden", className)} />
|
|
156
|
-
{dark && <img src={dark} alt={alt} className={cn("hidden size-4 shrink-0 dark:block", className)} />}
|
|
157
|
-
</>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
138
|
/**
|
|
162
139
|
* A vendor's logo, as `Logo` draws it, named by the vendor's title for assistive tech unless
|
|
163
140
|
* `alt` says otherwise (`""` where the title is beside it). `fallback` draws in its place when the
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from "#/lib/utils.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A logo, 16 px unless `className` sizes it: `src`, and `dark` instead under the dark theme. Only
|
|
5
|
+
* ever an `<img>`, where an SVG's scripts and external references never run or load.
|
|
6
|
+
*/
|
|
7
|
+
export function Logo({
|
|
8
|
+
src,
|
|
9
|
+
dark,
|
|
10
|
+
alt,
|
|
11
|
+
className,
|
|
12
|
+
}: {
|
|
13
|
+
src: string;
|
|
14
|
+
dark?: string | undefined;
|
|
15
|
+
alt: string;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
}) {
|
|
18
|
+
// A hidden <img> is out of the accessibility tree: one name is read either way.
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<img src={src} alt={alt} className={cn("size-4 shrink-0", dark && "dark:hidden", className)} />
|
|
22
|
+
{dark && <img src={dark} alt={alt} className={cn("hidden size-4 shrink-0 dark:block", className)} />}
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -1,131 +1,218 @@
|
|
|
1
1
|
import { CheckIcon } from "@phosphor-icons/react/dist/csr/Check";
|
|
2
2
|
import { CopyIcon } from "@phosphor-icons/react/dist/csr/Copy";
|
|
3
|
+
import { SparkleIcon } from "@phosphor-icons/react/dist/csr/Sparkle";
|
|
3
4
|
import { XIcon } from "@phosphor-icons/react/dist/csr/X";
|
|
4
|
-
import { approverLabel } from "sanoma/workflows/shared";
|
|
5
|
-
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
6
|
-
import { Link } from "@tanstack/react-router";
|
|
7
5
|
import { getToolName, isToolUIPart } from "ai";
|
|
8
|
-
import {
|
|
6
|
+
import { CatchBoundary } from "@tanstack/react-router";
|
|
7
|
+
import { type FormEvent, lazy, Suspense, useState } from "react";
|
|
9
8
|
import { toast } from "sonner";
|
|
10
9
|
import { Button } from "#/components/ui/button.tsx";
|
|
11
|
-
import { Card, CardContent,
|
|
10
|
+
import { Card, CardContent, CardHeader } from "#/components/ui/card.tsx";
|
|
11
|
+
import { CodeBlock, CodeBlockContent } from "#/components/ui/code-block.tsx";
|
|
12
12
|
import { Input } from "#/components/ui/input.tsx";
|
|
13
|
+
import { Message, MessageContent, MessageFooter } from "#/components/ui/message.tsx";
|
|
13
14
|
import { Spinner } from "#/components/ui/spinner.tsx";
|
|
14
|
-
import {
|
|
15
|
-
|
|
15
|
+
import {
|
|
16
|
+
Trace,
|
|
17
|
+
TraceCollapsible,
|
|
18
|
+
TraceCollapsibleContent,
|
|
19
|
+
TraceCollapsibleTrigger,
|
|
20
|
+
TraceIcon,
|
|
21
|
+
TraceLine,
|
|
22
|
+
TraceTitle,
|
|
23
|
+
} from "#/components/ui/trace.tsx";
|
|
24
|
+
import { actorHeaders } from "../../actor.ts";
|
|
16
25
|
import { type ChatMessage, type DraftCard, heldRunOf, pathOf, type SignInCard, textOf } from "../../lib/chat.ts";
|
|
17
|
-
import {
|
|
18
|
-
import { approvalKey, configQuery, runQuery } from "../../queries.ts";
|
|
19
|
-
import { ApprovalDecision, ApprovalDetails } from "../approval.tsx";
|
|
20
|
-
import { CardHeading, TipButton } from "../common.tsx";
|
|
26
|
+
import { CardHeading, Notice, TipButton } from "../kit.tsx";
|
|
21
27
|
import { DraftCardView } from "./draft-card.tsx";
|
|
22
28
|
|
|
23
|
-
// What the chat draws of the agent's reply, per app.md's Chat:
|
|
24
|
-
// steps as
|
|
25
|
-
//
|
|
26
|
-
//
|
|
29
|
+
// What the chat draws of the agent's reply, per app.md's Chat: Markdown at the reply size, its
|
|
30
|
+
// thinking and steps as one quiet trace (AI Elements' Reasoning and Tool), a held lookup as the
|
|
31
|
+
// Inbox's approval card, the draft as a small card, a person's own agent's sign-in as its card,
|
|
32
|
+
// and the last reply's suggested asks as buttons. Any engine's reply: a tool part of another
|
|
33
|
+
// engine is a step by its title or name.
|
|
34
|
+
|
|
35
|
+
/** Off the chrome's chunk, which every page loads: until it comes, a reply's text as it is. */
|
|
36
|
+
const Markdown = lazy(() => import("./markdown.tsx"));
|
|
37
|
+
const HeldCard = lazy(() => import("./held-card.tsx"));
|
|
27
38
|
|
|
28
39
|
type Part = ChatMessage["parts"][number];
|
|
29
40
|
type ToolPart = Extract<Part, { toolCallId: string }>;
|
|
41
|
+
type ReasoningPart = Extract<Part, { type: "reasoning" }>;
|
|
42
|
+
type TracePart = ToolPart | ReasoningPart;
|
|
30
43
|
|
|
31
44
|
/**
|
|
32
|
-
* The agent's reply in the chat `chat`: its parts in order (
|
|
33
|
-
* sign-in's card, its draft's card last, and Copy.
|
|
34
|
-
* reply it belongs to.
|
|
45
|
+
* The agent's reply in the chat `chat`: its parts in order (thinking and steps side by side
|
|
46
|
+
* grouped into one trace), a sign-in's card, its draft's card last, and Copy.
|
|
35
47
|
*/
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
live,
|
|
39
|
-
chat,
|
|
40
|
-
}: {
|
|
41
|
-
message: ChatMessage;
|
|
42
|
-
live: boolean;
|
|
43
|
-
chat: string;
|
|
44
|
-
}) {
|
|
45
|
-
const blocks: ({ steps: ToolPart[] } | { part: Part })[] = [];
|
|
48
|
+
export function Reply({ message, live, chat }: { message: ChatMessage; live: boolean; chat: string }) {
|
|
49
|
+
const blocks: ({ trace: TracePart[] } | { part: Part })[] = [];
|
|
46
50
|
let draft: DraftCard | undefined;
|
|
47
51
|
let signIn: SignInCard | undefined;
|
|
48
52
|
for (const part of message.parts) {
|
|
49
53
|
if (part.type === "data-draft") draft = part.data;
|
|
50
54
|
else if (part.type === "data-signIn") signIn = part.data;
|
|
51
|
-
else if (
|
|
55
|
+
else if (part.type === "step-start") continue;
|
|
56
|
+
else if (part.type === "reasoning" || (isToolUIPart(part) && heldRunOf(part.output) === undefined)) {
|
|
52
57
|
const last = blocks.at(-1);
|
|
53
|
-
if (last && "
|
|
54
|
-
else blocks.push({
|
|
58
|
+
if (last && "trace" in last) last.trace.push(part);
|
|
59
|
+
else blocks.push({ trace: [part] });
|
|
55
60
|
} else blocks.push({ part });
|
|
56
61
|
}
|
|
57
62
|
const text = textOf(message);
|
|
58
63
|
return (
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
<Message>
|
|
65
|
+
<MessageContent className="gap-3">
|
|
66
|
+
{blocks.map((block, i) =>
|
|
67
|
+
"trace" in block ? (
|
|
68
|
+
<ReplyTrace key={i} parts={block.trace} live={live} />
|
|
69
|
+
) : (
|
|
70
|
+
<ReplyPart key={i} part={block.part} live={live} />
|
|
71
|
+
),
|
|
72
|
+
)}
|
|
73
|
+
{signIn && <SignInCardView card={signIn} chat={chat} live={live} />}
|
|
74
|
+
{draft && <DraftCardView draft={draft} />}
|
|
75
|
+
{text && !live && (
|
|
76
|
+
<MessageFooter className="-ml-1.5 px-0">
|
|
77
|
+
<TipButton
|
|
78
|
+
tip="Copy"
|
|
79
|
+
size="icon-xs"
|
|
80
|
+
onClick={() =>
|
|
81
|
+
void navigator.clipboard.writeText(text).then(
|
|
82
|
+
() => toast.success("Copied"),
|
|
83
|
+
() => toast.error("Could not copy"),
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
>
|
|
87
|
+
<CopyIcon aria-hidden="true" />
|
|
88
|
+
</TipButton>
|
|
89
|
+
</MessageFooter>
|
|
90
|
+
)}
|
|
91
|
+
</MessageContent>
|
|
92
|
+
</Message>
|
|
82
93
|
);
|
|
83
|
-
}
|
|
94
|
+
}
|
|
84
95
|
|
|
85
|
-
function ReplyPart({ part }: { part: Part }) {
|
|
86
|
-
if (part.type === "text")
|
|
96
|
+
function ReplyPart({ part, live }: { part: Part; live: boolean }) {
|
|
97
|
+
if (part.type === "text") {
|
|
98
|
+
const plain = <p className="text-reply whitespace-pre-wrap">{part.text}</p>;
|
|
99
|
+
return (
|
|
100
|
+
// A chunk that does not come (a deploy since the page loaded) leaves the text as it is.
|
|
101
|
+
<CatchBoundary getResetKey={() => "markdown"} errorComponent={() => plain}>
|
|
102
|
+
<Suspense fallback={plain}>
|
|
103
|
+
<Markdown text={part.text} live={live && part.state === "streaming"} />
|
|
104
|
+
</Suspense>
|
|
105
|
+
</CatchBoundary>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
87
108
|
if (isToolUIPart(part)) {
|
|
88
109
|
const runId = heldRunOf(part.output);
|
|
89
110
|
if (runId !== undefined) {
|
|
90
111
|
return (
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
|
|
112
|
+
<CatchBoundary getResetKey={() => runId} errorComponent={HeldCardMissing}>
|
|
113
|
+
<Suspense fallback={<Spinner />}>
|
|
114
|
+
<HeldCard runId={runId} />
|
|
115
|
+
</Suspense>
|
|
116
|
+
</CatchBoundary>
|
|
94
117
|
);
|
|
95
118
|
}
|
|
96
119
|
}
|
|
97
120
|
return null;
|
|
98
121
|
}
|
|
99
122
|
|
|
100
|
-
|
|
101
|
-
|
|
123
|
+
function HeldCardMissing() {
|
|
124
|
+
return <Notice variant="destructive">This approval did not load. Reload the page to see it.</Notice>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** The agent's thinking and steps as a quiet trace, a line each. */
|
|
128
|
+
function ReplyTrace({ parts, live }: { parts: TracePart[]; live: boolean }) {
|
|
102
129
|
return (
|
|
103
|
-
<
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
</li>
|
|
113
|
-
))}
|
|
114
|
-
</ul>
|
|
130
|
+
<Trace role="group" aria-label="Steps" className="gap-1">
|
|
131
|
+
{parts.map((part, i) =>
|
|
132
|
+
part.type === "reasoning" ? (
|
|
133
|
+
<Reasoning key={`reasoning-${i}`} part={part} live={live} />
|
|
134
|
+
) : (
|
|
135
|
+
<Step key={`step-${part.toolCallId}`} step={part} live={live} />
|
|
136
|
+
),
|
|
137
|
+
)}
|
|
138
|
+
</Trace>
|
|
115
139
|
);
|
|
116
140
|
}
|
|
117
141
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Thinking, open while it streams and folded once it is done, unless the person chose otherwise.
|
|
144
|
+
* Thinking with no text (a model that keeps it to itself) shows only while it is under way.
|
|
145
|
+
*/
|
|
146
|
+
function Reasoning({ part, live }: { part: ReasoningPart; live: boolean }) {
|
|
147
|
+
const running = live && part.state === "streaming";
|
|
148
|
+
const [open, setOpen] = useState<boolean>();
|
|
149
|
+
const title = (
|
|
150
|
+
<TraceLine status={running ? "running" : undefined} className="text-xs">
|
|
151
|
+
<TraceIcon>
|
|
152
|
+
<SparkleIcon aria-hidden="true" />
|
|
153
|
+
</TraceIcon>
|
|
154
|
+
<TraceTitle>{running ? "Thinking" : "Thought"}</TraceTitle>
|
|
155
|
+
</TraceLine>
|
|
156
|
+
);
|
|
157
|
+
if (!part.text) return running ? title : null;
|
|
158
|
+
return (
|
|
159
|
+
<TraceCollapsible open={open ?? running} onOpenChange={setOpen}>
|
|
160
|
+
<TraceCollapsibleTrigger>{title}</TraceCollapsibleTrigger>
|
|
161
|
+
<TraceCollapsibleContent className="text-xs whitespace-pre-wrap">{part.text}</TraceCollapsibleContent>
|
|
162
|
+
</TraceCollapsible>
|
|
163
|
+
);
|
|
125
164
|
}
|
|
126
165
|
|
|
127
|
-
/** A
|
|
128
|
-
|
|
166
|
+
/** A step: done, under way or stopped as a line, and failed or refused with why, open beneath it. */
|
|
167
|
+
function Step({ step, live }: { step: ToolPart; live: boolean }) {
|
|
168
|
+
const label = stepLabel(step);
|
|
169
|
+
const { word, status, icon, why } = stepState(step, live);
|
|
170
|
+
const line = (
|
|
171
|
+
<TraceLine status={status} className="text-xs">
|
|
172
|
+
<TraceIcon>{icon}</TraceIcon>
|
|
173
|
+
<TraceTitle title={label}>
|
|
174
|
+
<span className="sr-only">{word}: </span>
|
|
175
|
+
{label}
|
|
176
|
+
</TraceTitle>
|
|
177
|
+
</TraceLine>
|
|
178
|
+
);
|
|
179
|
+
if (!why) return line;
|
|
180
|
+
return (
|
|
181
|
+
<TraceCollapsible defaultOpen>
|
|
182
|
+
<TraceCollapsibleTrigger>{line}</TraceCollapsibleTrigger>
|
|
183
|
+
<TraceCollapsibleContent className="text-xs">
|
|
184
|
+
{status === "error" ? (
|
|
185
|
+
<CodeBlock size="sm" variant="destructive">
|
|
186
|
+
<CodeBlockContent wrap className="max-h-64">
|
|
187
|
+
{why}
|
|
188
|
+
</CodeBlockContent>
|
|
189
|
+
</CodeBlock>
|
|
190
|
+
) : (
|
|
191
|
+
why
|
|
192
|
+
)}
|
|
193
|
+
</TraceCollapsibleContent>
|
|
194
|
+
</TraceCollapsible>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* A step's state: in a word for a screen reader (the trace's icons are hidden from one), its line's
|
|
200
|
+
* status, its icon, and why when it failed or was refused (a coding agent's step its checkout rule
|
|
201
|
+
* answered no, `HarnessAgent`'s built-in tool).
|
|
202
|
+
*/
|
|
203
|
+
function stepState(step: ToolPart, live: boolean) {
|
|
204
|
+
const stopped = <XIcon aria-hidden="true" />;
|
|
205
|
+
if (step.state === "output-error") {
|
|
206
|
+
return { word: "Failed", status: "error" as const, icon: stopped, why: step.errorText };
|
|
207
|
+
}
|
|
208
|
+
if (step.approval?.approved === false) return { word: "Refused", icon: stopped, why: step.approval.reason };
|
|
209
|
+
if (step.state === "output-available" && !step.preliminary) {
|
|
210
|
+
return { word: "Done", icon: <CheckIcon aria-hidden="true" /> };
|
|
211
|
+
}
|
|
212
|
+
// A step that was under way when the turn stopped is neither: it stopped there.
|
|
213
|
+
if (!live) return { word: "Stopped", icon: stopped };
|
|
214
|
+
return { word: "Under way", status: "running" as const, icon: <Spinner aria-hidden="true" /> };
|
|
215
|
+
}
|
|
129
216
|
|
|
130
217
|
/** A step in words: what the tool did, from its input; a coding agent's by its tool's name and the file it names. */
|
|
131
218
|
function stepLabel(step: ToolPart): string {
|
|
@@ -278,49 +365,21 @@ function SignInCardView({ card, chat, live }: { card: SignInCard; chat: string;
|
|
|
278
365
|
);
|
|
279
366
|
}
|
|
280
367
|
|
|
281
|
-
/**
|
|
282
|
-
|
|
283
|
-
* link to the Inbox; once decided, its status.
|
|
284
|
-
*/
|
|
285
|
-
function HeldCard({ runId }: { runId: string }) {
|
|
286
|
-
const { actor, groups } = useActor();
|
|
287
|
-
const { data: people } = useSuspenseQuery({ ...configQuery(), select: (config) => config.resources });
|
|
288
|
-
const { data } = useQuery(runQuery(runId));
|
|
289
|
-
if (!data) {
|
|
290
|
-
return (
|
|
291
|
-
<p className="flex items-center gap-2 text-muted-foreground">
|
|
292
|
-
<Spinner /> Asking for an approval…
|
|
293
|
-
</p>
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
const { run } = data;
|
|
297
|
-
const approval = pendingApprovals(data)[0] ?? data.approvals.at(-1);
|
|
298
|
-
if (!approval) return null;
|
|
299
|
-
const entry = { run, approval };
|
|
300
|
-
if (approval.status === "pending" && decidableBy(actor, groups, people)([entry]).length === 0) {
|
|
301
|
-
return (
|
|
302
|
-
<p className="text-muted-foreground">
|
|
303
|
-
Waiting for {approverLabel(approval.approver)}:{" "}
|
|
304
|
-
<Link to="/inbox" search={{ approval: approvalKey(entry) }} className="underline underline-offset-4">
|
|
305
|
-
in the Inbox
|
|
306
|
-
</Link>
|
|
307
|
-
.
|
|
308
|
-
</p>
|
|
309
|
-
);
|
|
310
|
-
}
|
|
368
|
+
/** A reply's suggested asks (`suggestionsOf`), each a button that sends it (`onAsk`). */
|
|
369
|
+
export function Suggested({ asks, onAsk }: { asks: string[]; onAsk: (ask: string) => void }) {
|
|
311
370
|
return (
|
|
312
|
-
<
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
</
|
|
323
|
-
)}
|
|
324
|
-
</
|
|
371
|
+
<ul aria-label="Suggested asks" className="flex flex-col gap-2">
|
|
372
|
+
{asks.map((ask) => (
|
|
373
|
+
<li key={ask}>
|
|
374
|
+
<Button
|
|
375
|
+
variant="outline"
|
|
376
|
+
className="h-auto w-full justify-start py-2 text-left whitespace-normal"
|
|
377
|
+
onClick={() => onAsk(ask)}
|
|
378
|
+
>
|
|
379
|
+
{ask}
|
|
380
|
+
</Button>
|
|
381
|
+
</li>
|
|
382
|
+
))}
|
|
383
|
+
</ul>
|
|
325
384
|
);
|
|
326
385
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
|
|
3
3
|
// What a page asks the agent through the chat: New workflow, New app and an app's Add open the
|
|
4
|
-
// chat column on a new chat with a prompt in its composer, which the person finishes and sends
|
|
4
|
+
// chat column on a new chat with a prompt in its composer, which the person finishes and sends;
|
|
5
|
+
// the menu's Agent… opens one on the agents to connect.
|
|
5
6
|
// The chrome (`app-chrome.tsx`) provides it.
|
|
6
7
|
|
|
7
8
|
/** The chat, as a page opens it with a prompt (`useChatPrompt`). */
|
|
8
9
|
export interface ChatPrompt {
|
|
9
10
|
/** Opens the chat column on a new chat with `text` in its composer, focused at its end, not sent. */
|
|
10
11
|
open(text: string): void;
|
|
12
|
+
/** Opens the chat column on a new chat that shows the agents to connect, whatever is connected. */
|
|
13
|
+
chooseAgent(): void;
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
/** A prompt the chat column opens with: its new chat's id,
|
|
16
|
+
/** A prompt the chat column opens with: its new chat's id, the composer's text, and whether it shows the agents to connect. */
|
|
14
17
|
export interface Prompt {
|
|
15
18
|
id: string;
|
|
16
19
|
text: string;
|
|
20
|
+
choose?: boolean;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
export const ChatPromptContext = createContext<ChatPrompt | null>(null);
|