sanoma 0.11.21 → 0.11.23
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 +55 -14
- package/app/README.md +12 -8
- package/app/dist/api.d.ts +191 -5
- package/app/dist/api.js +125 -4
- package/app/dist/api.js.map +1 -1
- package/app/dist/build.d.ts +28 -3
- package/app/dist/build.js +154 -15
- package/app/dist/build.js.map +1 -1
- package/app/dist/bundle-build.d.ts +32 -0
- package/app/dist/bundle-build.js +127 -67
- package/app/dist/bundle-build.js.map +1 -1
- package/app/dist/client/assets/ArrowDown.es-BVRf--PS.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/Check.es-b7BdqO2s.js +1 -0
- package/app/dist/client/assets/CheckCircle.es-DKXiWmAT.js +1 -0
- package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
- package/app/dist/client/assets/DialogTitle-5oboyLiq.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-0_Y-lz6G.js +1 -0
- package/app/dist/client/assets/_id-3tGIwJ5T.js +1 -0
- package/app/dist/client/assets/_id-CgPVeQe8.js +1 -0
- package/app/dist/client/assets/_id-DFlFuBDE.js +1 -0
- package/app/dist/client/assets/_id-QNnNLGx_.js +1 -0
- package/app/dist/client/assets/_name-6k1yqjX8.js +1 -0
- package/app/dist/client/assets/_name-B4Qba2-o.js +4 -0
- package/app/dist/client/assets/_name-BfPXcP49.js +1 -0
- package/app/dist/client/assets/_name-CqBzHz7c.js +1 -0
- package/app/dist/client/assets/_vendor-CfHRJBG8.js +1 -0
- package/app/dist/client/assets/_vendor-Dj7KCZ74.js +1 -0
- package/app/dist/client/assets/app-chrome-CFH47gLL.js +5 -0
- package/app/dist/client/assets/app-scope-Z_2GE9oz.js +1 -0
- package/app/dist/client/assets/approval-CgksyU5L.js +1 -0
- package/app/dist/client/assets/apps-BDsPVmMY.js +1 -0
- package/app/dist/client/assets/button-D5kdANef.js +1 -0
- package/app/dist/client/assets/change-glance-D6N6Xaqu.js +1 -0
- package/app/dist/client/assets/changes-B6xxBiC0.js +1 -0
- package/app/dist/client/assets/changes-BS7eJI5T.js +1 -0
- package/app/dist/client/assets/chat-Bw3WhRE9.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-DZLdx_jS.js +3 -0
- package/app/dist/client/assets/composite-CoGyvQjv.js +1 -0
- package/app/dist/client/assets/connect-BMk-KP-f.js +1 -0
- package/app/dist/client/assets/connections-TbS_jeiy.js +5 -0
- package/app/dist/client/assets/connectors-CgRpyRdd.js +1 -0
- package/app/dist/client/assets/credentials-Dxpl8sUw.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-lKkklNeo.js +1 -0
- package/app/dist/client/assets/decidable-w2VGgZwN.js +1 -0
- package/app/dist/client/assets/declaration-form-CAwox7F1.js +1 -0
- package/app/dist/client/assets/dialog-DDAfDsGh.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-2kDivy4p.js +1 -0
- package/app/dist/client/assets/fence-BdtS5gi0.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-BqVQ68hK.js +7 -0
- package/app/dist/client/assets/grid-diff-Jj1nTy52.js +1 -0
- package/app/dist/client/assets/held-card-DjBO8PTe.js +1 -0
- package/app/dist/client/assets/highlighted-body-JLMTFACH-Co7ss_Ht.js +1 -0
- package/app/dist/client/assets/hosting-DC7Pftfb.js +1 -0
- package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
- package/app/dist/client/assets/import-DhVQArmJ.js +1 -0
- package/app/dist/client/assets/inbox-5h39e_tI.js +1 -0
- package/app/dist/client/assets/inbox-CUNaP4uz.js +1 -0
- package/app/dist/client/assets/index-CA_5CFb4.js +10 -0
- package/app/dist/client/assets/item-vV00RYfb.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-BZcdh1Xm.js +1 -0
- package/app/dist/client/assets/lazyRouteComponent-C2a8bGcK.js +1 -0
- package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
- package/app/dist/client/assets/markdown-bsqylRZb.js +164 -0
- package/app/dist/client/assets/mermaid-WFAXDIZX-CYMnek4e.js +1 -0
- package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
- package/app/dist/client/assets/people-Bn8GAJ3z.js +1 -0
- package/app/dist/client/assets/permissions-Csf87P7b.js +2 -0
- package/app/dist/client/assets/permissions-grid-CzK64E29.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-XJ-fmuYb.js +57 -0
- package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
- package/app/dist/client/assets/review-BjpH-tT4.js +1 -0
- package/app/dist/client/assets/route-CD2oErox.js +1 -0
- package/app/dist/client/assets/route-CRwDZE-c.js +1 -0
- package/app/dist/client/assets/routes-gbZbqIhO.js +1 -0
- package/app/dist/client/assets/runs-table-nkQLXJxG.js +1 -0
- package/app/dist/client/assets/scenario-CZ7tmap7.js +1 -0
- package/app/dist/client/assets/scenario-graph-W2XcWuur.js +1 -0
- package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
- package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-P-hJsTeq.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-CXcRF_R0.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-6whPfUoW.js +1 -0
- package/app/dist/client/assets/store-BT988jIX.js +1 -0
- package/app/dist/client/assets/style-DaqPHcI1.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-BIegJC9y.js +1 -0
- package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
- package/app/dist/client/assets/useRegisterFieldControl-CT8iqvDE.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-_7OehU_o.js +1 -0
- package/app/dist/client/assets/workflow-DSNK0oFo.js +1 -0
- package/app/dist/client/assets/workflow-view-VFD3onJL.js +1 -0
- package/app/dist/client/assets/workflows-CT9wqMl2.js +1 -0
- package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
- package/app/dist/components/grid/plan.d.ts +46 -262
- package/app/dist/components/grid/plan.js +134 -138
- package/app/dist/components/grid/plan.js.map +1 -1
- package/app/dist/demo-build.d.ts +58 -0
- package/app/dist/demo-build.js +440 -0
- package/app/dist/demo-build.js.map +1 -0
- package/app/dist/handler.d.ts +9 -7
- package/app/dist/handler.js +10 -10
- package/app/dist/handler.js.map +1 -1
- package/app/dist/index.d.ts +4 -4
- package/app/dist/index.js +52 -35
- package/app/dist/index.js.map +1 -1
- package/app/dist/lib/chat.d.ts +67 -20
- package/app/dist/lib/chat.js +54 -18
- package/app/dist/lib/chat.js.map +1 -1
- package/app/dist/lib/names.d.ts +7 -0
- package/app/dist/lib/names.js +6 -2
- package/app/dist/lib/names.js.map +1 -1
- package/app/dist/login/page.d.ts +1 -10
- package/app/dist/login/page.js +0 -14
- package/app/dist/login/page.js.map +1 -1
- package/app/dist/login/staff.js +3 -3
- package/app/dist/login/staff.js.map +1 -1
- package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id-B6iAc90c.js} +2 -2
- package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-BlceO2iK.js} +3 -3
- package/app/dist/server/assets/{_id-wB8khGTz.js → _id-Cc0uBuJb.js} +12 -7
- package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-DYfvgveB.js} +2 -2
- package/app/dist/server/assets/{_id-BViXAagq.js → _id-Dvn0wB-1.js} +15 -330
- package/app/dist/server/assets/{_name-BGagGBjX.js → _name-3AGcE6tj.js} +7 -7
- package/app/dist/server/assets/{_name-DntbHE-b.js → _name-BIcmcEwj.js} +11 -11
- package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-CfoydEzk.js} +2 -2
- package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-VpcPszKf.js} +210 -63
- package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUL7FcJk.js} +119 -91
- package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-Bwis2sPx.js} +2 -2
- package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DUtH-Z9W.js} +8 -8
- package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-DAOPjcdj.js} +1 -1
- package/app/dist/server/assets/app-chrome-B8oA4uXZ.js +2298 -0
- package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-BxuIu0xV.js} +2 -2
- package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-CHJ_Hr71.js} +8 -7
- package/app/dist/server/assets/{approval-Su315ikC.js → approval-DR_9mBcx.js} +17 -14
- package/app/dist/server/assets/{apps-xwQAehch.js → apps-CtPev5RI.js} +7 -7
- package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
- package/app/dist/server/assets/change-glance-DGqh7Pxb.js +54 -0
- package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-C3qjEBZP.js} +2 -54
- package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-DfOnO87K.js} +8 -7
- package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-B19X0_8f.js} +133 -34
- 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-JUUJLp4v.js} +30 -82
- package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-DKu1UgY-.js} +11 -10
- package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Dyedl4qi.js} +12 -11
- package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-yojQH7WS.js} +8 -8
- package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-2Z6EHitQ.js} +10 -9
- package/app/dist/server/assets/{data-aEdhwcqy.js → data-1padc_i_.js} +7 -7
- package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-MAnn_M8g.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-BZjX_7Aa.js} +8 -7
- package/app/dist/server/assets/fence-BvNu3YNO.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-wlvFaDkF.js} +246 -44
- package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-DjANDk1P.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-CCEypEau.js +75 -0
- package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-Csr6AVC7.js} +321 -42
- package/app/dist/server/assets/{import-DIwvzHb6.js → import-CtPlwdIl.js} +12 -10
- package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-9-WMgjdU.js} +2 -2
- package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BYKHV9Yh.js} +8 -8
- 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-D5moAfcg.js} +57 -4
- package/app/dist/server/assets/markdown-B9odAiMy.js +116 -0
- package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-C4Wn6uHO.js} +325 -285
- package/app/dist/server/assets/{native-select-DLa-He0n.js → native-select-etaMvR-i.js} +2 -9
- package/app/dist/server/assets/{people-CkU_AxrV.js → people-LpcYXtEq.js} +13 -12
- package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-M0kzvVVm.js} +9 -8
- package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CwWWdcQA.js} +4 -4
- package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-BDuQsTdU.js} +141 -59
- package/app/dist/server/assets/review-BFZCPdVZ.js +355 -0
- package/app/dist/server/assets/{route-CF_8jQYY.js → route-BJLQf4ik.js} +2 -2
- package/app/dist/server/assets/{route-BTT7nMJq.js → route-C3uFABee.js} +2 -2
- package/app/dist/server/assets/{router-BvYtxrVN.js → router-Dx7Gu0CN.js} +175 -147
- package/app/dist/server/assets/routes-iVrnGFaR.js +227 -0
- package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-g3QYggO3.js} +6 -6
- package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-B5dGlEGF.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-BNeYUQnQ.js +165 -0
- package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
- package/app/dist/server/assets/{start-CSU4irVK.js → start-CIKqNkKp.js} +2 -2
- package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-BXAi2lVm.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-CavnVMGe.js} +16 -10
- package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BXhqp6S1.js} +5 -5
- package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-go1rbTSF.js} +14 -13
- package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-BCcXZtN-.js} +14 -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/core.d.ts +24 -9
- package/app/dist/server/core.js +58 -119
- package/app/dist/server/core.js.map +1 -1
- package/app/dist/server/go-live.d.ts +11 -2
- package/app/dist/server/go-live.js +27 -27
- package/app/dist/server/go-live.js.map +1 -1
- package/app/dist/server/server.js +68 -48
- package/app/dist/server/setup.js +1 -1
- package/app/dist/server/setup.js.map +1 -1
- package/app/dist/server/token-redeem.d.ts +8 -0
- package/app/dist/server/token-redeem.js +45 -0
- package/app/dist/server/token-redeem.js.map +1 -0
- package/app/dist/site-path.d.ts +15 -0
- package/app/dist/site-path.js +26 -0
- package/app/dist/site-path.js.map +1 -1
- package/app/dist/snapshot-build.js +1 -0
- package/app/dist/snapshot-build.js.map +1 -1
- 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 +37 -16
- 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/steps/index.js +2 -2
- package/app/dist/steps/index.js.map +1 -1
- package/app/dist/steps/writes.d.ts +21 -7
- package/app/dist/steps/writes.js +100 -23
- package/app/dist/steps/writes.js.map +1 -1
- package/app/dist/stylesheet.json +1 -1
- package/app/src/api.ts +188 -4
- package/app/src/build.ts +177 -14
- package/app/src/bundle-build.ts +132 -63
- package/app/src/components/app-chrome.tsx +28 -13
- package/app/src/components/approval.tsx +1 -1
- package/app/src/components/common.tsx +18 -88
- package/app/src/components/data-grid.tsx +2 -1
- package/app/src/components/go-live-cloud.tsx +44 -0
- package/app/src/components/go-live.tsx +51 -13
- package/app/src/components/grid/columns.tsx +175 -53
- package/app/src/components/grid/grid.tsx +4 -2
- package/app/src/components/grid/plan.ts +153 -164
- package/app/src/components/grid/review.tsx +108 -118
- package/app/src/components/home.tsx +199 -0
- package/app/src/components/import/match.tsx +2 -1
- package/app/src/components/import/sheet.ts +2 -1
- package/app/src/components/kit.tsx +55 -1
- package/app/src/components/logo.tsx +25 -0
- package/app/src/components/record-form.tsx +12 -5
- package/app/src/components/shell/bar.tsx +35 -26
- 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/draft-card.tsx +192 -45
- 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 +12 -1
- package/app/src/components/shell/thread.tsx +174 -0
- package/app/src/components/store-move.tsx +2 -1
- 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/radio-group.tsx +26 -0
- package/app/src/components/ui/trace.tsx +133 -0
- package/app/src/components/who-are-you.tsx +8 -3
- package/app/src/demo/api.ts +42 -0
- package/app/src/demo/client-rpc.ts +16 -0
- package/app/src/demo/demo.css +31 -0
- package/app/src/demo/mount.tsx +97 -0
- package/app/src/demo/root.tsx +31 -0
- package/app/src/demo/tailwind.css +4 -0
- package/app/src/demo-build.ts +525 -0
- package/app/src/env.d.ts +12 -0
- package/app/src/functions.ts +50 -7
- package/app/src/handler.ts +20 -14
- package/app/src/hooks/use-highlighted-code.ts +72 -0
- package/app/src/index.ts +55 -36
- package/app/src/lib/chat.ts +113 -23
- package/app/src/lib/cn-tables.ts +23 -23
- package/app/src/lib/company-state.ts +73 -0
- package/app/src/lib/highlighter.tsx +114 -0
- package/app/src/lib/names.ts +13 -2
- package/app/src/login/page.ts +1 -21
- package/app/src/login/staff.ts +3 -3
- package/app/src/queries.ts +121 -18
- package/app/src/routes/__root.tsx +24 -7
- package/app/src/routes/changes/$id.tsx +4 -3
- package/app/src/routes/connectors/index.tsx +1 -1
- package/app/src/routes/data/$name/import.tsx +2 -1
- package/app/src/routes/data/$name/index.tsx +1 -2
- package/app/src/routes/hosting/index.tsx +277 -60
- package/app/src/routes/index.tsx +15 -4
- package/app/src/routes/sites.index.tsx +41 -3
- package/app/src/routes/workflows/$name/runs/$id.tsx +3 -1
- package/app/src/server/chat.ts +41 -19
- package/app/src/server/columns.ts +44 -18
- package/app/src/server/company-state.ts +76 -0
- package/app/src/server/core.ts +72 -116
- package/app/src/server/go-live.ts +35 -27
- package/app/src/server/setup-progress.ts +28 -0
- package/app/src/server/setup.ts +1 -1
- package/app/src/server/token-redeem.ts +49 -0
- package/app/src/site-api.ts +10 -0
- package/app/src/site-path.ts +29 -0
- package/app/src/site.ts +1 -1
- package/app/src/snapshot-build.ts +1 -0
- 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 +45 -17
- package/app/src/steps/agent/transcript.ts +90 -3
- package/app/src/steps/agent/turn.ts +18 -16
- package/app/src/steps/index.ts +2 -2
- package/app/src/steps/writes.ts +121 -31
- package/app/src/worker/app.ts +17 -14
- package/dist/check.js +2 -2
- package/dist/check.js.map +1 -1
- package/dist/cli.js +81 -22
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +8 -1
- package/dist/config.js +49 -8
- package/dist/config.js.map +1 -1
- package/dist/events.d.ts +15 -1
- package/dist/events.js +7 -0
- package/dist/events.js.map +1 -1
- package/dist/init.d.ts +27 -14
- package/dist/init.js +87 -39
- package/dist/init.js.map +1 -1
- package/dist/serve.d.ts +6 -2
- package/dist/serve.js +71 -9
- package/dist/serve.js.map +1 -1
- package/dist/source.d.ts +5 -0
- package/dist/source.js +113 -23
- package/dist/source.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/invoices/README.md +66 -0
- package/invoices/dist/calculate.d.ts +37 -0
- package/invoices/dist/calculate.js +97 -0
- package/invoices/dist/calculate.js.map +1 -0
- package/invoices/dist/index.d.ts +4 -0
- package/invoices/dist/index.js +5 -0
- package/invoices/dist/index.js.map +1 -0
- package/invoices/dist/logo.d.ts +2 -0
- package/invoices/dist/logo.js +89 -0
- package/invoices/dist/logo.js.map +1 -0
- package/invoices/dist/pdf.d.ts +33 -0
- package/invoices/dist/pdf.js +215 -0
- package/invoices/dist/pdf.js.map +1 -0
- package/invoices/dist/schema.d.ts +156 -0
- package/invoices/dist/schema.js +88 -0
- package/invoices/dist/schema.js.map +1 -0
- package/oxlint.json +18 -0
- package/package.json +42 -7
- package/template/.env.example +15 -4
- package/template/AGENTS.md +10 -6
- package/template/package.json +6 -1
- package/template/policies/policy.cedar +5 -5
- package/template/resources/people.ts +5 -13
- package/template/resources/sanoma/infra.ts +8 -0
- package/template/sanoma.config.ts +18 -11
- package/template/scenarios/record-lead/record.feature +14 -0
- package/template/secrets.ts +13 -0
- package/template/tsconfig.json +1 -0
- package/template/workflows/record-lead.ts +30 -0
- package/testing/README.md +4 -4
- 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 +38 -21
- package/testing/dist/host.js +159 -77
- package/testing/dist/host.js.map +1 -1
- package/testing/dist/scenarios.d.ts +2 -1
- package/testing/dist/scenarios.js +14 -4
- package/testing/dist/scenarios.js.map +1 -1
- package/workflows/CLOUD-IDENTITY.md +15 -20
- package/workflows/README.md +54 -19
- package/workflows/dist/app-steps.js +8 -0
- package/workflows/dist/app-steps.js.map +1 -1
- package/workflows/dist/app-workflows.d.ts +172 -6
- package/workflows/dist/app-workflows.js +57 -9
- package/workflows/dist/app-workflows.js.map +1 -1
- package/workflows/dist/approvals.d.ts +3 -1
- package/workflows/dist/approvals.js +3 -1
- package/workflows/dist/approvals.js.map +1 -1
- package/workflows/dist/call.d.ts +8 -40
- package/workflows/dist/call.js +24 -135
- package/workflows/dist/call.js.map +1 -1
- package/workflows/dist/change-steps.d.ts +7 -0
- package/workflows/dist/change-steps.js +37 -13
- package/workflows/dist/change-steps.js.map +1 -1
- package/workflows/dist/change-workflow.d.ts +22 -10
- package/workflows/dist/change-workflow.js +30 -12
- package/workflows/dist/change-workflow.js.map +1 -1
- package/workflows/dist/change.d.ts +233 -7
- package/workflows/dist/change.js +27 -9
- package/workflows/dist/change.js.map +1 -1
- package/workflows/dist/client.d.ts +32 -5
- package/workflows/dist/client.js +94 -35
- 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/collection-driver.d.ts +20 -0
- package/workflows/dist/collection-driver.js +201 -0
- package/workflows/dist/collection-driver.js.map +1 -0
- package/workflows/dist/collection.d.ts +126 -14
- package/workflows/dist/collection.js +45 -168
- package/workflows/dist/collection.js.map +1 -1
- package/workflows/dist/company-file.d.ts +22 -0
- package/workflows/dist/company-file.js +82 -0
- package/workflows/dist/company-file.js.map +1 -0
- package/workflows/dist/config.d.ts +34 -6
- package/workflows/dist/config.js +58 -45
- package/workflows/dist/config.js.map +1 -1
- package/workflows/dist/ctx.d.ts +101 -0
- package/workflows/dist/ctx.js +171 -0
- package/workflows/dist/ctx.js.map +1 -0
- package/workflows/dist/db/company.d.ts +115 -1
- package/workflows/dist/db/company.js +14 -1
- package/workflows/dist/db/company.js.map +1 -1
- package/workflows/dist/db/dbos.d.ts +17 -0
- package/workflows/dist/db/dbos.js +2 -0
- package/workflows/dist/db/dbos.js.map +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/db.d.ts +1 -1
- package/workflows/dist/db.js +10 -6
- package/workflows/dist/db.js.map +1 -1
- package/workflows/dist/deadlines.d.ts +14 -8
- package/workflows/dist/deadlines.js +22 -11
- package/workflows/dist/deadlines.js.map +1 -1
- package/workflows/dist/define.d.ts +0 -8
- package/workflows/dist/define.js +1 -24
- package/workflows/dist/define.js.map +1 -1
- package/workflows/dist/describe.d.ts +1 -1
- package/workflows/dist/describe.js +18 -5
- package/workflows/dist/describe.js.map +1 -1
- package/workflows/dist/description.d.ts +408 -2
- package/workflows/dist/description.js +130 -5
- package/workflows/dist/description.js.map +1 -1
- package/workflows/dist/drift.d.ts +5 -2
- package/workflows/dist/drift.js +5 -3
- package/workflows/dist/drift.js.map +1 -1
- package/workflows/dist/errors.d.ts +11 -11
- package/workflows/dist/errors.js +17 -36
- package/workflows/dist/errors.js.map +1 -1
- package/workflows/dist/fake.d.ts +0 -26
- package/workflows/dist/fake.js +0 -123
- package/workflows/dist/fake.js.map +1 -1
- package/workflows/dist/fakes.d.ts +2 -0
- package/workflows/dist/fakes.js +5 -0
- package/workflows/dist/fakes.js.map +1 -0
- package/workflows/dist/givens.d.ts +51 -0
- package/workflows/dist/givens.js +89 -0
- package/workflows/dist/givens.js.map +1 -0
- package/workflows/dist/host.d.ts +8 -7
- 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/import.d.ts +2 -0
- package/workflows/dist/import.js +7 -6
- package/workflows/dist/import.js.map +1 -1
- package/workflows/dist/index.d.ts +8 -7
- package/workflows/dist/index.js +4 -3
- package/workflows/dist/index.js.map +1 -1
- package/workflows/dist/ledger.js +8 -17
- package/workflows/dist/ledger.js.map +1 -1
- package/workflows/dist/lint.d.ts +2 -2
- package/workflows/dist/lint.js +8 -4
- package/workflows/dist/lint.js.map +1 -1
- package/workflows/dist/load.js +1 -1
- package/workflows/dist/load.js.map +1 -1
- package/workflows/dist/log.d.ts +0 -2
- package/workflows/dist/log.js +0 -11
- package/workflows/dist/log.js.map +1 -1
- package/workflows/dist/op.d.ts +103 -3
- package/workflows/dist/op.js +56 -6
- package/workflows/dist/op.js.map +1 -1
- package/workflows/dist/page-run.d.ts +40 -0
- package/workflows/dist/page-run.js +317 -0
- package/workflows/dist/page-run.js.map +1 -0
- package/workflows/dist/paths.d.ts +0 -13
- package/workflows/dist/paths.js +2 -46
- package/workflows/dist/paths.js.map +1 -1
- package/workflows/dist/renewal.d.ts +1 -1
- package/workflows/dist/renewal.js +1 -1
- package/workflows/dist/run.d.ts +4 -1
- package/workflows/dist/run.js.map +1 -1
- package/workflows/dist/runtime-ops.d.ts +19 -4
- package/workflows/dist/runtime-ops.js +34 -5
- package/workflows/dist/runtime-ops.js.map +1 -1
- package/workflows/dist/sandbox-runner.cjs +4 -4
- package/workflows/dist/sandbox.d.ts +0 -20
- package/workflows/dist/sandbox.js +23 -85
- package/workflows/dist/sandbox.js.map +1 -1
- package/workflows/dist/scenario.d.ts +19 -1
- package/workflows/dist/scenario.js +82 -21
- package/workflows/dist/scenario.js.map +1 -1
- package/workflows/dist/schedules.d.ts +1 -1
- package/workflows/dist/schedules.js +1 -1
- package/workflows/dist/secret.d.ts +4 -5
- package/workflows/dist/secret.js +7 -6
- package/workflows/dist/secret.js.map +1 -1
- package/workflows/dist/shared.d.ts +84 -7
- package/workflows/dist/shared.js +255 -8
- package/workflows/dist/shared.js.map +1 -1
- package/workflows/dist/sites.d.ts +5 -0
- package/workflows/dist/sites.js +7 -0
- package/workflows/dist/sites.js.map +1 -1
- package/workflows/dist/source.d.ts +40 -1
- package/workflows/dist/source.js +3 -3
- package/workflows/dist/source.js.map +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/tokens.d.ts +34 -0
- package/workflows/dist/tokens.js +70 -9
- package/workflows/dist/tokens.js.map +1 -1
- package/workflows/dist/vendor-info.d.ts +12 -3
- package/workflows/dist/vendor-info.js +21 -5
- package/workflows/dist/vendor-info.js.map +1 -1
- package/workflows/dist/version.js +1 -1
- package/workflows/dist/version.js.map +1 -1
- package/workflows/dist/wakeup-driver.js +1 -1
- package/workflows/dist/wakeup-driver.js.map +1 -1
- package/workflows/dist/wakeup-fake.d.ts +27 -0
- package/workflows/dist/wakeup-fake.js +125 -0
- package/workflows/dist/wakeup-fake.js.map +1 -0
- package/workflows/dist/wakeup-service.js +8 -24
- package/workflows/dist/wakeup-service.js.map +1 -1
- package/workflows/dist/wakeup-type.js +1 -1
- package/workflows/dist/wakeup-type.js.map +1 -1
- package/workflows/dist/worker.d.ts +19 -1
- package/workflows/dist/worker.js +67 -49
- package/workflows/dist/worker.js.map +1 -1
- package/workflows/drizzle/company/0007_token_handoffs.sql +8 -0
- package/workflows/drizzle/company/meta/0007_snapshot.json +1281 -0
- package/workflows/drizzle/company/meta/_journal.json +7 -0
- package/workflows/src/app-steps.ts +11 -0
- package/workflows/src/app-workflows.ts +100 -10
- package/workflows/src/approvals.ts +4 -2
- package/workflows/src/call.ts +37 -186
- package/workflows/src/change-steps.ts +43 -14
- package/workflows/src/change-workflow.ts +45 -16
- package/workflows/src/change.ts +39 -10
- package/workflows/src/client.ts +137 -62
- package/workflows/src/cloud-identity.ts +7 -4
- package/workflows/src/collection-driver.ts +230 -0
- package/workflows/src/collection.ts +62 -186
- package/workflows/src/company-file.ts +82 -0
- package/workflows/src/config.ts +97 -56
- package/workflows/src/ctx.ts +266 -0
- package/workflows/src/db/company.ts +15 -1
- package/workflows/src/db/dbos.ts +2 -0
- package/workflows/src/db/identity.ts +2 -2
- package/workflows/src/db.ts +10 -6
- package/workflows/src/deadlines.ts +31 -17
- package/workflows/src/define.ts +1 -24
- package/workflows/src/describe.ts +27 -5
- package/workflows/src/description.ts +152 -5
- package/workflows/src/drift.ts +8 -4
- package/workflows/src/errors.ts +19 -45
- package/workflows/src/fake.ts +4 -139
- package/workflows/src/fakes.ts +4 -0
- package/workflows/src/givens.ts +141 -0
- package/workflows/src/host.ts +8 -7
- package/workflows/src/identity-provisioning.ts +19 -30
- package/workflows/src/import.ts +8 -6
- package/workflows/src/index.ts +13 -2
- package/workflows/src/ledger.ts +8 -16
- package/workflows/src/lint.ts +12 -6
- package/workflows/src/load.ts +1 -1
- package/workflows/src/log.ts +0 -11
- package/workflows/src/op.ts +147 -12
- package/workflows/src/page-run.ts +437 -0
- package/workflows/src/paths.ts +2 -46
- package/workflows/src/renewal.ts +1 -1
- package/workflows/src/run.ts +4 -1
- package/workflows/src/runtime-ops.ts +36 -6
- package/workflows/src/sandbox.ts +31 -109
- package/workflows/src/scenario.ts +102 -19
- package/workflows/src/schedules.ts +1 -1
- package/workflows/src/secret.ts +8 -7
- package/workflows/src/shared.ts +304 -10
- package/workflows/src/sites.ts +8 -0
- package/workflows/src/source.ts +31 -5
- package/workflows/src/supervisor.ts +40 -38
- package/workflows/src/tokens.ts +100 -9
- package/workflows/src/vendor-info.ts +21 -6
- package/workflows/src/version.ts +1 -1
- package/workflows/src/wakeup-driver.ts +1 -1
- package/workflows/src/wakeup-fake.ts +138 -0
- package/workflows/src/wakeup-service.ts +8 -24
- package/workflows/src/wakeup-type.ts +1 -1
- package/workflows/src/worker.ts +121 -58
- 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/useLoaderData-BQd5yMlA.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/sites.index-1l0BtgVf.js +0 -138
- package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
- package/template/scenarios/publish-post/publish.feature +0 -28
- package/template/workflows/publish-post.ts +0 -20
package/app/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import { admitting } from "./login/admission.js";
|
|
|
25
25
|
import { publicFront, servedOnceMade, siteLogin } from "./login/public.js";
|
|
26
26
|
import { loopbackLogin } from "./loopback.js";
|
|
27
27
|
import { siteFileBroken } from "./snapshot.js";
|
|
28
|
+
import { filePath, publicPath } from "./site-path.js";
|
|
28
29
|
import { liveSnapshot } from "./snapshot-build.js";
|
|
29
30
|
export { ACTOR_HEADER } from "./api.js";
|
|
30
31
|
export { staffLogin } from "./login/staff.js";
|
|
@@ -245,12 +246,14 @@ async function builtResponder(distDir) {
|
|
|
245
246
|
const entry = await loadServerEntry(serverEntry);
|
|
246
247
|
return {
|
|
247
248
|
entry,
|
|
248
|
-
files: async (request) => {
|
|
249
|
-
const
|
|
250
|
-
if (
|
|
249
|
+
files: async (request, site) => {
|
|
250
|
+
const path = filePath(request);
|
|
251
|
+
if (path === undefined)
|
|
251
252
|
return undefined;
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
// On a public site's host, the build's own files and the site's public ones at its root.
|
|
254
|
+
const own = site === undefined ? path : publicPath(site, path);
|
|
255
|
+
const file = own === undefined ? undefined : (files.get(path) ?? files.get(own));
|
|
256
|
+
return file && fileResponse(request, file);
|
|
254
257
|
},
|
|
255
258
|
...(stylesheet && { stylesheet }),
|
|
256
259
|
close: async () => { },
|
|
@@ -261,15 +264,23 @@ async function builtResponder(distDir) {
|
|
|
261
264
|
* Vite's own answers (modules, the HMR client, files) are written to the request's socket.
|
|
262
265
|
*/
|
|
263
266
|
async function devResponder({ repo, onFileChange }, server, sockets) {
|
|
264
|
-
const { appDevServer } = await import("./build.js");
|
|
267
|
+
const { appDevServer, publicFileAt } = await import("./build.js");
|
|
265
268
|
const dev = await appDevServer(repo, server, onFileChange);
|
|
266
269
|
return {
|
|
267
|
-
files: (request
|
|
270
|
+
files: async (request, site) => {
|
|
271
|
+
// A site's public file, looked for on disk as it is now: on a public site's host, its own at its root.
|
|
272
|
+
const path = filePath(request);
|
|
273
|
+
const at = path === undefined || site === undefined ? path : publicPath(site, path);
|
|
274
|
+
const found = at?.startsWith("/sites/") ? publicFileAt(repo, at) : undefined;
|
|
275
|
+
if (found)
|
|
276
|
+
return fileResponse(request, { path: found.file, headers: fileHeaders(at.slice(1), found.size) });
|
|
268
277
|
const { req, res } = sockets.get(request);
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
return new Promise((done, fail) => {
|
|
279
|
+
// Vite answers what it serves itself without calling next; the adapter then sends nothing.
|
|
280
|
+
res.once("close", () => done(new Response(null)));
|
|
281
|
+
dev.middlewares(req, res, (err) => (err ? fail(err) : done(undefined)));
|
|
282
|
+
});
|
|
283
|
+
},
|
|
273
284
|
entry: { fetch: async (request, opts) => (await dev.serverEntry()).fetch(request, opts) },
|
|
274
285
|
close: () => dev.close().catch((err) => console.error("sanoma app: closing the dev server also failed:", err)),
|
|
275
286
|
};
|
|
@@ -287,17 +298,28 @@ const TYPES = {
|
|
|
287
298
|
".html": "text/html; charset=utf-8",
|
|
288
299
|
".json": "application/json; charset=utf-8",
|
|
289
300
|
".map": "application/json; charset=utf-8",
|
|
301
|
+
".xml": "application/xml; charset=utf-8",
|
|
302
|
+
".webmanifest": "application/manifest+json; charset=utf-8",
|
|
303
|
+
".wasm": "application/wasm",
|
|
304
|
+
".pdf": "application/pdf",
|
|
290
305
|
".svg": "image/svg+xml",
|
|
291
306
|
".png": "image/png",
|
|
307
|
+
".jpg": "image/jpeg",
|
|
308
|
+
".jpeg": "image/jpeg",
|
|
309
|
+
".gif": "image/gif",
|
|
310
|
+
".avif": "image/avif",
|
|
292
311
|
".ico": "image/x-icon",
|
|
293
312
|
".webp": "image/webp",
|
|
313
|
+
".woff": "font/woff",
|
|
294
314
|
".woff2": "font/woff2",
|
|
315
|
+
".ttf": "font/ttf",
|
|
316
|
+
".otf": "font/otf",
|
|
295
317
|
".txt": "text/plain; charset=utf-8",
|
|
296
318
|
};
|
|
297
319
|
/**
|
|
298
|
-
* The built client's files by URL path,
|
|
299
|
-
* app runs, and only a file found here is
|
|
300
|
-
*
|
|
320
|
+
* The built client's files by URL path, the sites' public files among them (`/sites/<key>/…`),
|
|
321
|
+
* read once at boot: the build does not change while the app runs, and only a file found here is
|
|
322
|
+
* ever served.
|
|
301
323
|
*/
|
|
302
324
|
async function staticFiles(clientDir) {
|
|
303
325
|
const files = new Map();
|
|
@@ -310,33 +332,28 @@ async function staticFiles(clientDir) {
|
|
|
310
332
|
continue;
|
|
311
333
|
const path = join(entry.parentPath, entry.name);
|
|
312
334
|
const rel = relative(clientDir, path).split(sep).join("/");
|
|
313
|
-
files.set(`/${rel}`, {
|
|
314
|
-
path,
|
|
315
|
-
headers: {
|
|
316
|
-
"content-type": TYPES[extname(path)] ?? "application/octet-stream",
|
|
317
|
-
"content-length": String((await stat(path)).size),
|
|
318
|
-
"cache-control": rel.startsWith("assets/") ? "public, max-age=31536000, immutable" : "no-cache",
|
|
319
|
-
"x-content-type-options": "nosniff",
|
|
320
|
-
},
|
|
321
|
-
});
|
|
335
|
+
files.set(`/${rel}`, { path, headers: fileHeaders(rel, (await stat(path)).size) });
|
|
322
336
|
}
|
|
323
337
|
// An empty directory is as unbuilt as a missing one.
|
|
324
338
|
if (files.size === 0)
|
|
325
339
|
throw notBuilt(clientDir);
|
|
326
340
|
return files;
|
|
327
341
|
}
|
|
328
|
-
/**
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
342
|
+
/**
|
|
343
|
+
* A file's headers, by its path from the client's files (`rel`): Vite names everything under
|
|
344
|
+
* assets/ by content hash, so those never change; anything else (a site's public file among them)
|
|
345
|
+
* is revalidated on every use.
|
|
346
|
+
*/
|
|
347
|
+
const fileHeaders = (rel, size) => ({
|
|
348
|
+
"content-type": TYPES[extname(rel).toLowerCase()] ?? "application/octet-stream",
|
|
349
|
+
"content-length": String(size),
|
|
350
|
+
"cache-control": rel.startsWith("assets/") ? "public, max-age=31536000, immutable" : "no-cache",
|
|
351
|
+
"x-content-type-options": "nosniff",
|
|
352
|
+
});
|
|
353
|
+
/** `file` as the answer to `request`: its bytes, streamed, but for a HEAD. */
|
|
354
|
+
const fileResponse = (request, file) => new Response(request.method === "HEAD" ? null : Readable.toWeb(createReadStream(file.path)), {
|
|
355
|
+
headers: file.headers,
|
|
356
|
+
});
|
|
340
357
|
function urlHost({ address, family }) {
|
|
341
358
|
if (address === "0.0.0.0" || address === "::")
|
|
342
359
|
return "localhost";
|
package/app/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,+FAA+F;AAC/F,4FAA4F;AAC5F,8FAA8F;AAC9F,kGAAkG;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AAEpF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,aAAa,EACb,YAAY,GAIb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,UAAU,EAA6C,SAAS,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAoB,cAAc,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAA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/G,OAAO,EAAE,IAAI,CAAC,OAAO;CACtB,CAAC,CAAC;AAEL,SAAS,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAe;IAC/C,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAClE,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;AACtD,CAAC"}
|
package/app/dist/lib/chat.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { CheckResult } from "sanoma/workflows";
|
|
2
|
-
import
|
|
2
|
+
import type { AgentEntry } from "sanoma/workflows/description";
|
|
3
|
+
import { type ChatStatus, DefaultChatTransport, type InferUITools, type UIMessage } from "ai";
|
|
4
|
+
import type { AppConfig } from "../api.ts";
|
|
3
5
|
import type { LoopTools } from "../steps/agent/tools.ts";
|
|
4
6
|
/**
|
|
5
7
|
* The draft card's data, the `data-draft` part an engine writes (one per reply, by the id
|
|
6
8
|
* `draft`, updated in place) whenever the chat's draft changes: the draft's id (its branch's
|
|
7
9
|
* `draft/<id>`, the chat's id; every engine writes it, but a card saved before it did lacks it),
|
|
8
|
-
* its branch, its committed change (`Source.diff
|
|
10
|
+
* its branch, its committed change (`Source.diff`: its files, git's summary and the commit it is at,
|
|
11
|
+
* `head`, which a card saved before it carried one lacks) and, once it ran, the checks since the last edit.
|
|
9
12
|
*/
|
|
10
13
|
export interface DraftCard {
|
|
11
14
|
draft?: string;
|
|
12
15
|
branch: string;
|
|
13
16
|
files: string[];
|
|
14
17
|
summary: string;
|
|
18
|
+
head?: string;
|
|
15
19
|
checks?: CheckResult;
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
@@ -33,35 +37,66 @@ export interface SignInCard {
|
|
|
33
37
|
/** What to do in the command's own terminal once it starts, for `once`. */
|
|
34
38
|
after?: string;
|
|
35
39
|
}
|
|
40
|
+
/** The account a chat's agent runs on: the company's key (our loop's model, or an agent's `onKey`), or the person's own plan over ACP (`own`). */
|
|
41
|
+
export type Plan = "onKey" | "own";
|
|
36
42
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
43
|
+
* What a chat runs on: the agent (`loop`, our own, or a coding agent's id,
|
|
44
|
+
* `ConfigDescription.agents`) and the account it runs on. A chat's row and the engine cookie keep
|
|
45
|
+
* it as one name (`engineName`), which every chat ever opened reads back with `engineOf`: `loop`,
|
|
46
|
+
* `<id>` on the company's key, `acp-<id>` on a person's own plan.
|
|
40
47
|
*/
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
export interface ChatEngine {
|
|
49
|
+
agent: string;
|
|
50
|
+
plan: Plan;
|
|
51
|
+
}
|
|
52
|
+
/** A chat's engine, from the name its row or the cookie keeps (`engineName`). */
|
|
53
|
+
export declare const engineOf: (name: string) => ChatEngine;
|
|
54
|
+
/** The name a chat's row and the cookie keep for an engine (`engineOf` reads it). */
|
|
55
|
+
export declare const engineName: ({ agent, plan }: ChatEngine) => string;
|
|
56
|
+
/** An engine as the chat offers and labels it: its name, its agent's title and mark (from its connector; none for our loop, whose mark is Sanoma's), and its label, the title with the plan. */
|
|
57
|
+
export interface EngineOption extends ChatEngine {
|
|
58
|
+
name: string;
|
|
59
|
+
title: string;
|
|
60
|
+
label: string;
|
|
61
|
+
mark?: AgentEntry["mark"];
|
|
62
|
+
/** A person's own plan whose sign-in is a command they run once on their computer (`AgentEntry.once`). */
|
|
63
|
+
once?: true;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The company's engines: our loop, then each coding agent its connectors give
|
|
67
|
+
* (`ConfigDescription.agents`) on the company's key, then each on a person's own plan.
|
|
68
|
+
*/
|
|
69
|
+
export declare function enginesOf(agents: AgentEntry[]): EngineOption[];
|
|
70
|
+
/**
|
|
71
|
+
* Whether a live instance declares no box for the coding agents, which run in one there
|
|
72
|
+
* (`DECLARE_BOX`): no resource whose type meets the `sandbox` contract.
|
|
73
|
+
*/
|
|
74
|
+
export declare const boxless: (config: Pick<AppConfig, "place" | "resources" | "resourceTypes">) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The engines a chat can open on here, in `enginesOf`'s order: on a live instance, no coding
|
|
77
|
+
* agent while it declares no box (`boxless`), and no own plan whose sign-in runs once on the
|
|
78
|
+
* person's computer. A turn on any other fails, saying why.
|
|
79
|
+
*/
|
|
80
|
+
export declare function enginesHere(config: AppConfig): EngineOption[];
|
|
53
81
|
/** Whether an engine answers on the company's model connector (`chatModel`): our loop; a coding agent says what it lacks itself. */
|
|
54
82
|
export declare const onModelConnector: (engine: string) => engine is "loop";
|
|
55
83
|
/** The connector a company without a model adds: Anthropic's, which the template installs. */
|
|
56
84
|
export declare const MODEL_CONNECTOR = "@sanoma-ai/connector-anthropic";
|
|
57
85
|
/** The file a coding agent's built-in call names: the cross-harness `file_path`, or an adapter's own field. */
|
|
58
86
|
export declare function pathOf(input: unknown): string | undefined;
|
|
59
|
-
/**
|
|
60
|
-
|
|
87
|
+
/**
|
|
88
|
+
* What a reply suggests the person ask next, the `data-suggestions` part (by the id `suggestions`)
|
|
89
|
+
* every engine's reply gets from the asks its text ends with (`suggestedAsks`): each worded as the
|
|
90
|
+
* person would type it, which the chat shows as a button that sends it.
|
|
91
|
+
*/
|
|
92
|
+
export interface Suggestions {
|
|
93
|
+
asks: string[];
|
|
94
|
+
}
|
|
61
95
|
/** The data parts of a chat message, by name: `data-<name>`. */
|
|
62
96
|
export type ChatData = {
|
|
63
97
|
draft: DraftCard;
|
|
64
98
|
signIn: SignInCard;
|
|
99
|
+
suggestions: Suggestions;
|
|
65
100
|
};
|
|
66
101
|
/**
|
|
67
102
|
* A message of the operator agent's chat: our loop's tools typed (`InferAgentUIMessage` of its
|
|
@@ -88,8 +123,19 @@ export declare function errorParts(text: string): {
|
|
|
88
123
|
text: string;
|
|
89
124
|
vendor?: string;
|
|
90
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Whether a message is the cue for the agent to speak first (`POST /api/chat`'s `start`): the
|
|
128
|
+
* app's own, kept in the transcript as the turn's message but never shown.
|
|
129
|
+
*/
|
|
130
|
+
export declare const isIntro: (message: UIMessage) => boolean;
|
|
131
|
+
/** Whether the person has written in a chat: a message of theirs that is not the agent's cue (`isIntro`). */
|
|
132
|
+
export declare const written: (messages: UIMessage[]) => boolean;
|
|
91
133
|
/** A message's text, its text parts joined by `separator`. */
|
|
92
134
|
export declare const textOf: (message: UIMessage, separator?: string) => string;
|
|
135
|
+
/** Whether a turn is under way. */
|
|
136
|
+
export declare const isBusy: (status: ChatStatus) => status is "streaming" | "submitted";
|
|
137
|
+
/** What a reply suggests the person ask next: its last `data-suggestions` part's asks, else none. */
|
|
138
|
+
export declare const suggestionsOf: (message: ChatMessage) => string[];
|
|
93
139
|
/**
|
|
94
140
|
* A part a turn left under way: text still streaming, a tool call without its result, or a held
|
|
95
141
|
* lookup's preliminary output. The chat offers Continue after one; the server settles it (`settle`).
|
|
@@ -99,6 +145,7 @@ export declare const unfinished: (part: UIMessage["parts"][number]) => boolean;
|
|
|
99
145
|
* The chat's transport to `POST /api/chat` (`api`), as the chat column makes it: only the new
|
|
100
146
|
* message is sent, the server reading the rest from the chat's transcript, with the engine a new
|
|
101
147
|
* chat opens on when the send names one (`sendMessage(message, { body: { engine } })`; a chat
|
|
102
|
-
* keeps the one it opened on)
|
|
148
|
+
* keeps the one it opened on), and `start` when the message is the agent's cue to speak first
|
|
149
|
+
* (`sendMessage({ text: "", metadata: { intro: true } }, { body: { engine, start: true } })`).
|
|
103
150
|
*/
|
|
104
151
|
export declare const chatTransport: (api: string, headers: () => Record<string, string>) => DefaultChatTransport<ChatMessage>;
|
package/app/dist/lib/chat.js
CHANGED
|
@@ -1,21 +1,45 @@
|
|
|
1
|
-
import { DefaultChatTransport, isTextUIPart, isToolUIPart } from "ai";
|
|
1
|
+
import { DefaultChatTransport, isTextUIPart, isToolUIPart, } from "ai";
|
|
2
|
+
/** A chat's engine, from the name its row or the cookie keeps (`engineName`). */
|
|
3
|
+
export const engineOf = (name) => name.startsWith("acp-") ? { agent: name.slice("acp-".length), plan: "own" } : { agent: name, plan: "onKey" };
|
|
4
|
+
/** The name a chat's row and the cookie keep for an engine (`engineOf` reads it). */
|
|
5
|
+
export const engineName = ({ agent, plan }) => (plan === "own" ? `acp-${agent}` : agent);
|
|
6
|
+
/** A coding agent's engine on `plan`. */
|
|
7
|
+
const agentEngine = (agent, plan) => ({
|
|
8
|
+
name: engineName({ agent: agent.id, plan }),
|
|
9
|
+
agent: agent.id,
|
|
10
|
+
plan,
|
|
11
|
+
title: agent.title,
|
|
12
|
+
label: plan === "own" ? `${agent.title} (your plan)` : agent.title,
|
|
13
|
+
...(agent.mark && { mark: agent.mark }),
|
|
14
|
+
...(plan === "own" && agent.once && { once: true }),
|
|
15
|
+
});
|
|
2
16
|
/**
|
|
3
|
-
* The engines
|
|
4
|
-
*
|
|
5
|
-
* coding agent over ACP on their own plan (`acp-<agent>`, `ownPlan`).
|
|
17
|
+
* The company's engines: our loop, then each coding agent its connectors give
|
|
18
|
+
* (`ConfigDescription.agents`) on the company's key, then each on a person's own plan.
|
|
6
19
|
*/
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export const
|
|
20
|
+
export function enginesOf(agents) {
|
|
21
|
+
return [
|
|
22
|
+
{ name: "loop", agent: "loop", plan: "onKey", title: "Sanoma", label: "Sanoma" },
|
|
23
|
+
...agents.filter((agent) => agent.onKey).map((agent) => agentEngine(agent, "onKey")),
|
|
24
|
+
...agents.filter((agent) => agent.own).map((agent) => agentEngine(agent, "own")),
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Whether a live instance declares no box for the coding agents, which run in one there
|
|
29
|
+
* (`DECLARE_BOX`): no resource whose type meets the `sandbox` contract.
|
|
30
|
+
*/
|
|
31
|
+
export const boxless = (config) => config.place === "live" &&
|
|
32
|
+
!config.resources.some((r) => config.resourceTypes.find((t) => t.id === `${r.vendor}.${r.type}`)?.capabilities?.includes("sandbox"));
|
|
33
|
+
/**
|
|
34
|
+
* The engines a chat can open on here, in `enginesOf`'s order: on a live instance, no coding
|
|
35
|
+
* agent while it declares no box (`boxless`), and no own plan whose sign-in runs once on the
|
|
36
|
+
* person's computer. A turn on any other fails, saying why.
|
|
37
|
+
*/
|
|
38
|
+
export function enginesHere(config) {
|
|
39
|
+
const live = config.place === "live";
|
|
40
|
+
const box = !boxless(config);
|
|
41
|
+
return enginesOf(config.agents).filter((e) => e.agent === "loop" || (box && !(live && e.once)));
|
|
42
|
+
}
|
|
19
43
|
/** Whether an engine answers on the company's model connector (`chatModel`): our loop; a coding agent says what it lacks itself. */
|
|
20
44
|
export const onModelConnector = (engine) => engine === "loop";
|
|
21
45
|
/** The connector a company without a model adds: Anthropic's, which the template installs. */
|
|
@@ -42,11 +66,22 @@ export function errorParts(text) {
|
|
|
42
66
|
const found = / \[connector:([\w-]+)\]$/.exec(text);
|
|
43
67
|
return found ? { text: text.slice(0, found.index), vendor: found[1] } : { text };
|
|
44
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Whether a message is the cue for the agent to speak first (`POST /api/chat`'s `start`): the
|
|
71
|
+
* app's own, kept in the transcript as the turn's message but never shown.
|
|
72
|
+
*/
|
|
73
|
+
export const isIntro = (message) => message.metadata?.intro === true;
|
|
74
|
+
/** Whether the person has written in a chat: a message of theirs that is not the agent's cue (`isIntro`). */
|
|
75
|
+
export const written = (messages) => messages.some((m) => m.role === "user" && !isIntro(m));
|
|
45
76
|
/** A message's text, its text parts joined by `separator`. */
|
|
46
77
|
export const textOf = (message, separator = "\n\n") => message.parts
|
|
47
78
|
.filter(isTextUIPart)
|
|
48
79
|
.map((part) => part.text)
|
|
49
80
|
.join(separator);
|
|
81
|
+
/** Whether a turn is under way. */
|
|
82
|
+
export const isBusy = (status) => status === "submitted" || status === "streaming";
|
|
83
|
+
/** What a reply suggests the person ask next: its last `data-suggestions` part's asks, else none. */
|
|
84
|
+
export const suggestionsOf = (message) => message.parts.findLast((part) => part.type === "data-suggestions")?.data.asks ?? [];
|
|
50
85
|
/**
|
|
51
86
|
* A part a turn left under way: text still streaming, a tool call without its result, or a held
|
|
52
87
|
* lookup's preliminary output. The chat offers Continue after one; the server settles it (`settle`).
|
|
@@ -60,13 +95,14 @@ export const unfinished = (part) => isToolUIPart(part)
|
|
|
60
95
|
* The chat's transport to `POST /api/chat` (`api`), as the chat column makes it: only the new
|
|
61
96
|
* message is sent, the server reading the rest from the chat's transcript, with the engine a new
|
|
62
97
|
* chat opens on when the send names one (`sendMessage(message, { body: { engine } })`; a chat
|
|
63
|
-
* keeps the one it opened on)
|
|
98
|
+
* keeps the one it opened on), and `start` when the message is the agent's cue to speak first
|
|
99
|
+
* (`sendMessage({ text: "", metadata: { intro: true } }, { body: { engine, start: true } })`).
|
|
64
100
|
*/
|
|
65
101
|
export const chatTransport = (api, headers) => new DefaultChatTransport({
|
|
66
102
|
api,
|
|
67
103
|
headers,
|
|
68
104
|
prepareSendMessagesRequest: ({ id, messages, body }) => ({
|
|
69
|
-
body: { id, message: messages.at(-1), engine: body?.engine },
|
|
105
|
+
body: { id, message: messages.at(-1), engine: body?.engine, start: body?.start },
|
|
70
106
|
}),
|
|
71
107
|
});
|
|
72
108
|
//# sourceMappingURL=chat.js.map
|
package/app/dist/lib/chat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/lib/chat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/lib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AAC,IAAI,KAAK,kBAAkB,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;AAEtF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgC,EAAW,EAAE,CACtE,YAAY,CAAC,IAAI,CAAC;IAChB,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,iBAAiB;QAChC,IAAI,CAAC,KAAK,KAAK,iBAAiB;QAChC,CAAC,IAAI,CAAC,KAAK,KAAK,kBAAkB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC;IAClE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,OAAqC,EAAE,EAAE,CAClF,IAAI,oBAAoB,CAAc;IACpC,GAAG;IACH,OAAO;IACP,0BAA0B,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACvD,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;KACjF,CAAC;CACH,CAAC,CAAC"}
|
package/app/dist/lib/names.d.ts
CHANGED
|
@@ -2,3 +2,10 @@
|
|
|
2
2
|
export declare function initialsOf(name: string): string;
|
|
3
3
|
/** A name's first word, as a sentence calls someone ("Opening it signs Sam in"). */
|
|
4
4
|
export declare const firstWordOf: (name: string) => string;
|
|
5
|
+
/** A company as a page names it: its name, and two initials for its mark. */
|
|
6
|
+
export interface Company {
|
|
7
|
+
name: string;
|
|
8
|
+
initials: string;
|
|
9
|
+
}
|
|
10
|
+
/** The company named `name` (`resolved.name`, already for people to read), with its initials. */
|
|
11
|
+
export declare function companyOf(name: string): Company;
|
package/app/dist/lib/names.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// A person's or a company's name as the pages shorten it, the same on the sign-in pages
|
|
2
|
-
// HTML) and in the app.
|
|
1
|
+
// A person's or a company's name as the pages show and shorten it, the same on the sign-in pages
|
|
2
|
+
// (server HTML) and in the app.
|
|
3
3
|
/** Two initials of a name: its first two words' first letters, or a single word's first two. */
|
|
4
4
|
export function initialsOf(name) {
|
|
5
5
|
const words = name.split(/\s+/).filter(Boolean);
|
|
@@ -8,4 +8,8 @@ export function initialsOf(name) {
|
|
|
8
8
|
}
|
|
9
9
|
/** A name's first word, as a sentence calls someone ("Opening it signs Sam in"). */
|
|
10
10
|
export const firstWordOf = (name) => name.split(/\s+/).find(Boolean) ?? name;
|
|
11
|
+
/** The company named `name` (`resolved.name`, already for people to read), with its initials. */
|
|
12
|
+
export function companyOf(name) {
|
|
13
|
+
return { name, initials: initialsOf(name) };
|
|
14
|
+
}
|
|
11
15
|
//# sourceMappingURL=names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/lib/names.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/lib/names.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,gCAAgC;AAEhC,gGAAgG;AAChG,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChG,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AAQ7F,iGAAiG;AACjG,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;AAC9C,CAAC"}
|
package/app/dist/login/page.d.ts
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
+
import type { Company } from "../lib/names.ts";
|
|
1
2
|
/** Whether `request` wants JSON: the page's server functions and any change (not a GET or HEAD). */
|
|
2
3
|
export declare const wantsJson: (request: Request) => boolean;
|
|
3
4
|
export declare const escapeHtml: (text: string) => string;
|
|
4
|
-
/** A company as a page names it: its app's name humanised, and two initials for its mark. */
|
|
5
|
-
export interface Company {
|
|
6
|
-
name: string;
|
|
7
|
-
initials: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The company an app's name (`package.json`'s, `resolved.appName`) is, for people to read: its
|
|
11
|
-
* scope dropped, `-` and `_` as spaces, each word capitalised (`sanoma-ops` is "Sanoma Ops", "SO").
|
|
12
|
-
*/
|
|
13
|
-
export declare function companyOf(appName: string): Company;
|
|
14
5
|
/** What a small page shows around its card: the kit's stylesheet, the company and a line under the card. */
|
|
15
6
|
export interface PageFrame {
|
|
16
7
|
/** The built kit's stylesheet's path (`AppContext.stylesheet`); without one the page's fallback tokens keep it legible. */
|
package/app/dist/login/page.js
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { initialsOf } from "../lib/names.js";
|
|
2
1
|
// What a login answers before the app's own pages: a small page of its own, or JSON for the page's
|
|
3
2
|
// server functions and any change. The page has the app's look without its shell: it links the
|
|
4
3
|
// kit's stylesheet (`AppContext.stylesheet`) and is written against its tokens.
|
|
5
4
|
/** Whether `request` wants JSON: the page's server functions and any change (not a GET or HEAD). */
|
|
6
5
|
export const wantsJson = (request) => new URL(request.url).pathname.startsWith("/_serverFn/") || (request.method !== "GET" && request.method !== "HEAD");
|
|
7
6
|
export const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
|
|
8
|
-
/**
|
|
9
|
-
* The company an app's name (`package.json`'s, `resolved.appName`) is, for people to read: its
|
|
10
|
-
* scope dropped, `-` and `_` as spaces, each word capitalised (`sanoma-ops` is "Sanoma Ops", "SO").
|
|
11
|
-
*/
|
|
12
|
-
export function companyOf(appName) {
|
|
13
|
-
const words = appName
|
|
14
|
-
.replace(/^@[^/]*\//, "")
|
|
15
|
-
.split(/[-_\s]+/)
|
|
16
|
-
.filter(Boolean)
|
|
17
|
-
.map((word) => word[0].toUpperCase() + word.slice(1));
|
|
18
|
-
const name = words.join(" ") || "Sanoma";
|
|
19
|
-
return { name, initials: initialsOf(name) };
|
|
20
|
-
}
|
|
21
7
|
/** A small page of its own, `body` as HTML in its card: the app's pages are for people signed in. */
|
|
22
8
|
export function smallPage(status, title, body, frame = {}) {
|
|
23
9
|
const { stylesheet, company, footer } = frame;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/login/page.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/login/page.ts"],"names":[],"mappings":"AAEA,mGAAmG;AACnG,+FAA+F;AAC/F,gFAAgF;AAEhF,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,EAAE,CAC5C,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,UAA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;GAIG;AACH,MAAM,YAAY,GAChB,6DAA6D;IAC7D,4FAA4F;IAC5F,qEAAqE,CAAC;AAExE;;;;;GAKG;AACH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAwCU,CAAC"}
|
package/app/dist/login/staff.js
CHANGED
|
@@ -4,8 +4,8 @@ import { personsOf } from "sanoma/workflows/shared";
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { secretValues } from "../server/secrets.js";
|
|
6
6
|
import { loginKey } from "./keys.js";
|
|
7
|
-
import { firstWordOf, initialsOf } from "../lib/names.js";
|
|
8
|
-
import {
|
|
7
|
+
import { companyOf, firstWordOf, initialsOf } from "../lib/names.js";
|
|
8
|
+
import { escapeHtml, smallPage, wantsJson } from "./page.js";
|
|
9
9
|
const INVITE = "/auth/invite";
|
|
10
10
|
/** The sign-in page's own address, where a GitHub sign-in that failed comes back to with `?error=`. */
|
|
11
11
|
const LOGIN = "/auth/login";
|
|
@@ -28,7 +28,7 @@ export function staffLogin(make, social = {}) {
|
|
|
28
28
|
let failed = false;
|
|
29
29
|
const people = () => app.snapshot.people;
|
|
30
30
|
/** How the login's pages look: the kit's stylesheet, and the company they are for. */
|
|
31
|
-
const frame = () => app ? { ...(app.stylesheet && { stylesheet: app.stylesheet }), company: companyOf(app.resolved.
|
|
31
|
+
const frame = () => app ? { ...(app.stylesheet && { stylesheet: app.stylesheet }), company: companyOf(app.resolved.name) } : {};
|
|
32
32
|
/** The declared person `identity` names, as admitted, or undefined. */
|
|
33
33
|
const admitted = (identity) => {
|
|
34
34
|
try {
|