elanous 0.3.9 → 0.3.11
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/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/404/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/404.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/EYSh3cX6PSbWZ9jfAV-ZL/_buildManifest.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/EYSh3cX6PSbWZ9jfAV-ZL/_ssgManifest.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/01d37f32.f1ecc352bfc51dba.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1205.fe10b7987f8524ef.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1349.f7811f2ffa218061.js +115 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1384.1cb410c0f56171eb.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1428.0e64b175c610d66f.js +217 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1573.f7798ecec5a0c856.js +62 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1704.873747d458a61393.js +226 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1744.be78cf6a0a3a74d6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/1984-49012b18b68b1cf9.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2148-6f0c9b53f41fe475.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2320.b695c0cf2687a257.js +86 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2361246f.b0c89bf269cf461a.js +18 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2435.f5c7a8ec43bf380d.js +148 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2444-14f479a9f931d064.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2546.54bca8b2efbfc20f.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2548.d44d521b5f8c4430.js +149 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/261-a046190a9a00a2e9.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2797.075b49a780b777f9.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/2869.89f22df850ffcffb.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/293a491b.83fead916f3d4b84.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3061-347b0ea159fbd1ff.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3090.1ce88a5426850ed6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3092.7ba336afc0ff5129.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3191.8ba727790cf10b35.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3305-72701e4eaf50e6df.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3346.ce452aec61c3b95c.js +66 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3377-ee5f16870d6175ba.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3429.26af58ade120e0f6.js +32 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3441.4826303af0ba2719.js +23 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3476.83efa7b4266c7e51.js +77 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3586.51fa867dadba71b6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3614-9958a689c070352d.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3694.b629d2f7208eac8f.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3722-ccce3970d69d2872.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3730-21d7ec4ebcc8c568.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3778.7c2878335b916833.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3830.397d404d47d8a062.js +8 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/3b874777.9cb8232267532d67.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4009.77649c720a2856f6.js +27 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4215-b3f308605f4b13a8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4244.d72a596d89009db0.js +287 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4319.00de505e04749979.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4377.afed39cdcc4a27ac.js +34 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4512-aaced97ea8e990bb.js +25 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4639-33bcab91d6560f78.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4679-58da0c73ea8fd4c0.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4739.eb609076dc7d0ce5.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/474.3358006016a4c378.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4775.4dcbb1305bc9fdc0.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/479-e85749bccf84c3a1.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4861.4f637b319161ac19.js +94 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/4912.bb366634a6b91a57.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5015-9e7cd0f0977b5fca.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5051.8970f4af47f47d8a.js +24 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5063.29502b1640091906.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/514.d0f3de1f9677a072.js +5 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5217-4a8b3b42eb940df6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5274-170b82d1f713ef4e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/529.7900408e7a632b2a.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5319.e66b9cc59edf68ed.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5481.c7257f98606bca86.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5486.b2f3ef1cc08a5f44.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5493.5ad34e07e4d2e24e.js +38 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5646-4a4067780272d157.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/56667286.ca5125d61802d0fc.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5771-e4339e65e1a8e6e6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5787.6c56877c23d51f70.js +90 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/586.ff5c84cbb8592a98.js +2 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/5980.ed2554b4e5883ef8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6037.a946c7b0d3ccbbf2.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6118.194e7e1a958f3f0e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6136.5a9cd50e34193654.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6177.ab44c9a7bfebdff9.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6226-be213570dc2842c5.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/624.4f0dbb8a82bae173.js +79 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6334-5efa5dc3a22e32be.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6602.87ab7eda9e749a9a.js +36 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/669.7dca63fb3b95ddc1.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6779-35afb880061a9ed1.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/684.7ca728c023a5be43.js +9 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/6944.e9ef3404b61b22ce.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/697.044dbc2599425241.js +64 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7016-71707efce1d33e5f.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/703.22d162ce983376c7.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7147.fd66f2c11680c3e7.js +104 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/730.d287a7a56dc4215c.js +93 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7504-69e607e9d2ccb233.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7647.013fa7f7dd501ed8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7747.4f032894f7b78fc8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7806.06d650368ecaf19f.js +286 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/7845-409d6e1159d19ed2.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8047-92020eb3411682d0.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8066.c20a12b9b6773b64.js +24 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8279.57d08b9e979bc906.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/83-f25b23c8bea39fe4.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8415.bcf8d2b3ea589c60.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8650.c195cacb1e3abfaf.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8668.b01c159a88f542c0.js +41 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/8998.06aa9e56b8064e1b.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9032.acf91f7cb1584b78.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9383.40bd9676ab465b77.js +74 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9460.65cd2094d0bc9c9c.js +309 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9482.2b76ee1769f3ec4e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9673-ba8a3c4683caac32.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/9716.2185e2ff59e8ba1e.js +193 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/a886a261.307a967dd06d12b7.js +66 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/_not-found/page-c775796a00d9389e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/apps/page-7775cfa4c480b4db.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/apps/report/page-6e3a012662c704c6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/board/page-755cecfc4a9b8ed8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/chat/page-b616ac17834db5d8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/credentials/page-8182cf153d7d41f8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/credentials/register/claim/page-3f539594c23d3f8e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/credentials/register/page-ea4f262cb9aba420.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/design-check/page-8165faf239f6e27e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/editor/page-1cf7bd94569f060b.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/healthz/route-c775796a00d9389e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/layout-444d1c4c8fabdbea.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/live-run/adaptive/page-1f4aee3b56fd22f0.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/live-run/page-29d6b10ace96d7af.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/member/invite/page-02ec6c1f61c37ed7.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/not-found-008e905e8d38bf0b.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/ops/release/page-770c3b6e5356cc91.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/page-c775796a00d9389e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/settings/page-93b362aa4a88d529.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/setup/done/page-1cf98810677499bc.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/setup/layout-c775796a00d9389e.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/setup/page-9698cb2297abfb29.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/share/received/page-3be6f5986ce29402.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/signup/complete/page-c5b4b6795a11f869.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/signup/page-fc2da335d0504034.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/term/page-3f7ee4b011d2ef8b.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/app/vault/page-4c7e6af7c5347116.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/bffd1d00-2d9bdb4c8a5d9104.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/cd29f327-7f91f59b9139237c.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/d110d9e0.f5573b826f27af65.js +160 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/d14cd3a4.6d09bf3f19730f21.js +122 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/db225b10.128c168f4a6546cf.js +62 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/framework-8678a23bfc3bab37.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/main-ad7216630e0b83b8.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/main-app-4572a82b0e60345c.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/pages/_app-9a06989434b6a0f6.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/pages/_error-47654d73dd8821dc.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/chunks/webpack-1e12b19ca7234d95.js +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/css/085673d826b98b62.css +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/css/0963166d1794fcd2.css +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/css/0d7fd8c441e32b99.css +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/css/599369d853c61df7.css +31 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/css/659eccb5db697b76.css +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/media/22a5144ee8d83bca-s.p.woff2 +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/media/9766a7e9e2e0ad5a-s.woff2 +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/media/aa016aab0e6d1295-s.woff2 +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/media/b66cf8e69499582a-s.woff2 +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/_next/static/media/f639721981034f88-s.woff2 +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/apps/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/apps/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/apps/report/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/apps/report/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/board/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/board/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/chat/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/chat/index.txt +30 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/register/claim/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/register/claim/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/register/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/credentials/register/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/design-check/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/design-check/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/editor/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/editor/index.txt +35 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/fonts/JetBrainsMonoNerdFontMono-Bold.ttf +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/fonts/JetBrainsMonoNerdFontMono-BoldItalic.ttf +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/fonts/JetBrainsMonoNerdFontMono-Italic.ttf +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/fonts/JetBrainsMonoNerdFontMono-Regular.ttf +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/healthz +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/icons/elanous-16.png +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/icons/elanous-180.png +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/icons/elanous-192.png +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/icons/elanous-32.png +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/icons/elanous-512.png +0 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/index.txt +30 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/live-run/adaptive/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/live-run/adaptive/index.txt +31 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/live-run/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/live-run/index.txt +35 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/manifest.webmanifest +31 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/member/invite/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/member/invite/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/offline.html +84 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/ops/release/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/ops/release/index.txt +34 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/settings/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/settings/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/setup/done/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/setup/done/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/setup/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/setup/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/share/received/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/share/received/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/signup/complete/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/signup/complete/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/signup/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/signup/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/sw-strategies.js +44 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/sw.js +388 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/term/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/term/index.txt +33 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/vault/index.html +1 -0
- package/apps/pwa/.pwa-generations/1794438971150-31097a5b-df19-4054-81ae-c523427dd7b2/vault/index.txt +33 -0
- package/apps/pwa/README.md +59 -0
- package/apps/pwa/bun.lock +1530 -0
- package/apps/pwa/components.json +25 -0
- package/apps/pwa/next.config.ts +60 -0
- package/apps/pwa/package-lock.json +7538 -0
- package/apps/pwa/package.json +73 -0
- package/apps/pwa/postcss.config.mjs +5 -0
- package/apps/pwa/public/fonts/JetBrainsMonoNerdFontMono-Bold.ttf +0 -0
- package/apps/pwa/public/fonts/JetBrainsMonoNerdFontMono-BoldItalic.ttf +0 -0
- package/apps/pwa/public/fonts/JetBrainsMonoNerdFontMono-Italic.ttf +0 -0
- package/apps/pwa/public/fonts/JetBrainsMonoNerdFontMono-Regular.ttf +0 -0
- package/apps/pwa/public/icons/elanous-16.png +0 -0
- package/apps/pwa/public/icons/elanous-180.png +0 -0
- package/apps/pwa/public/icons/elanous-192.png +0 -0
- package/apps/pwa/public/icons/elanous-32.png +0 -0
- package/apps/pwa/public/icons/elanous-512.png +0 -0
- package/apps/pwa/public/manifest.webmanifest +31 -0
- package/apps/pwa/public/offline.html +84 -0
- package/apps/pwa/public/sw-strategies.js +44 -0
- package/apps/pwa/public/sw.js +388 -0
- package/apps/pwa/scripts/publish-static-generation.ts +80 -0
- package/apps/pwa/scripts/static-entry.ts +54 -0
- package/apps/pwa/scripts/static-generation.ts +190 -0
- package/apps/pwa/src/app/apps/page.tsx +135 -0
- package/apps/pwa/src/app/apps/report/page.tsx +50 -0
- package/apps/pwa/src/app/board/page.tsx +12 -0
- package/apps/pwa/src/app/chat/page.tsx +5 -0
- package/apps/pwa/src/app/credentials/CredentialVaultView.tsx +99 -0
- package/apps/pwa/src/app/credentials/page.tsx +15 -0
- package/apps/pwa/src/app/credentials/register/CredentialRegisterView.tsx +123 -0
- package/apps/pwa/src/app/credentials/register/claim/CredentialClaimView.tsx +88 -0
- package/apps/pwa/src/app/credentials/register/claim/page.tsx +35 -0
- package/apps/pwa/src/app/credentials/register/page.tsx +18 -0
- package/apps/pwa/src/app/design-check/page.tsx +17 -0
- package/apps/pwa/src/app/editor/page.tsx +8 -0
- package/apps/pwa/src/app/globals.css +351 -0
- package/apps/pwa/src/app/healthz/route.ts +12 -0
- package/apps/pwa/src/app/layout.tsx +77 -0
- package/apps/pwa/src/app/live-run/adaptive/page.tsx +6 -0
- package/apps/pwa/src/app/live-run/page.tsx +94 -0
- package/apps/pwa/src/app/member/invite/page.tsx +75 -0
- package/apps/pwa/src/app/not-found.tsx +29 -0
- package/apps/pwa/src/app/ops/release/page.tsx +8 -0
- package/apps/pwa/src/app/page.tsx +5 -0
- package/apps/pwa/src/app/settings/page.tsx +13 -0
- package/apps/pwa/src/app/setup/done/SetupNextSteps.tsx +75 -0
- package/apps/pwa/src/app/setup/done/page.tsx +182 -0
- package/apps/pwa/src/app/setup/done/setup-links.ts +55 -0
- package/apps/pwa/src/app/setup/layout.tsx +33 -0
- package/apps/pwa/src/app/setup/page.tsx +501 -0
- package/apps/pwa/src/app/share/received/page.tsx +86 -0
- package/apps/pwa/src/app/signup/complete/page.tsx +92 -0
- package/apps/pwa/src/app/signup/page.tsx +62 -0
- package/apps/pwa/src/app/term/page.tsx +29 -0
- package/apps/pwa/src/app/term/pty-selection-url.ts +8 -0
- package/apps/pwa/src/app/vault/page.tsx +14 -0
- package/apps/pwa/src/components/agent/CollapsibleCodeBlock.tsx +90 -0
- package/apps/pwa/src/components/apps/AppSimLiveView.tsx +161 -0
- package/apps/pwa/src/components/ask-user-question/AskQuestionSheet.tsx +309 -0
- package/apps/pwa/src/components/ask-user-question/use-ask-question.ts +167 -0
- package/apps/pwa/src/components/chat/BudgetPill.tsx +92 -0
- package/apps/pwa/src/components/chat/ChatApprovalsChip.tsx +74 -0
- package/apps/pwa/src/components/chat/ChatConversationList.tsx +190 -0
- package/apps/pwa/src/components/chat/ChatCurrentProject.tsx +239 -0
- package/apps/pwa/src/components/chat/ChatDecisionsChip.tsx +95 -0
- package/apps/pwa/src/components/chat/ChatDropOverlay.tsx +17 -0
- package/apps/pwa/src/components/chat/ChatHistory.tsx +266 -0
- package/apps/pwa/src/components/chat/ChatInput.tsx +1091 -0
- package/apps/pwa/src/components/chat/ChatLayout.tsx +1594 -0
- package/apps/pwa/src/components/chat/ChatMessage.tsx +380 -0
- package/apps/pwa/src/components/chat/ChatPanel.tsx +96 -0
- package/apps/pwa/src/components/chat/ChatPendingDecision.tsx +76 -0
- package/apps/pwa/src/components/chat/ChatProjectSwitcher.tsx +101 -0
- package/apps/pwa/src/components/chat/ChatQueueChips.tsx +20 -0
- package/apps/pwa/src/components/chat/ContextSourcesCard.tsx +14 -0
- package/apps/pwa/src/components/chat/DeployConfirmCard.tsx +13 -0
- package/apps/pwa/src/components/chat/DeployResultCard.tsx +18 -0
- package/apps/pwa/src/components/chat/ElanousCard.tsx +80 -0
- package/apps/pwa/src/components/chat/ElanousProviderChip.tsx +85 -0
- package/apps/pwa/src/components/chat/HarnessAskCard.tsx +61 -0
- package/apps/pwa/src/components/chat/MemberProposalCard.tsx +75 -0
- package/apps/pwa/src/components/chat/MobileChatStatus.tsx +32 -0
- package/apps/pwa/src/components/chat/NowSpeakButton.tsx +78 -0
- package/apps/pwa/src/components/chat/SeatPicker.tsx +27 -0
- package/apps/pwa/src/components/chat/SeatsNowStrip.tsx +43 -0
- package/apps/pwa/src/components/chat/SessionDeleteConfirm.tsx +91 -0
- package/apps/pwa/src/components/chat/SessionIdChip.tsx +120 -0
- package/apps/pwa/src/components/chat/SessionPill.tsx +276 -0
- package/apps/pwa/src/components/chat/VoiceCostPill.tsx +114 -0
- package/apps/pwa/src/components/chat/VoiceOverlay.tsx +181 -0
- package/apps/pwa/src/components/chat/blocks/ChatHud.tsx +165 -0
- package/apps/pwa/src/components/chat/blocks/ChatHudGaugeBar.tsx +90 -0
- package/apps/pwa/src/components/chat/blocks/DebugTapDrawer.tsx +189 -0
- package/apps/pwa/src/components/chat/blocks/DiffBlock.tsx +114 -0
- package/apps/pwa/src/components/chat/blocks/McpAppBlock.tsx +103 -0
- package/apps/pwa/src/components/chat/blocks/McpAppFrame.tsx +81 -0
- package/apps/pwa/src/components/chat/blocks/PerfTickSparkline.tsx +154 -0
- package/apps/pwa/src/components/chat/blocks/PlanBlock.tsx +70 -0
- package/apps/pwa/src/components/chat/blocks/SearchHitList.tsx +122 -0
- package/apps/pwa/src/components/chat/blocks/StatusChip.tsx +63 -0
- package/apps/pwa/src/components/chat/blocks/ThinkingPill.tsx +63 -0
- package/apps/pwa/src/components/chat/blocks/ToolProgressCard.tsx +106 -0
- package/apps/pwa/src/components/chat/budget-pill-view.ts +22 -0
- package/apps/pwa/src/components/chat/context-sources.ts +88 -0
- package/apps/pwa/src/components/chat/seats-now-line.ts +20 -0
- package/apps/pwa/src/components/chat/session-id-utils.ts +22 -0
- package/apps/pwa/src/components/decisions/DecisionCard.tsx +28 -0
- package/apps/pwa/src/components/design/DesignCheckPanel.tsx +318 -0
- package/apps/pwa/src/components/design/DirectionCards.tsx +178 -0
- package/apps/pwa/src/components/design/MakeMySystem.tsx +177 -0
- package/apps/pwa/src/components/editor/GraphCanvasEditor.tsx +853 -0
- package/apps/pwa/src/components/editor/GraphCanvasRunStatus.tsx +88 -0
- package/apps/pwa/src/components/editor/GraphEditor.tsx +357 -0
- package/apps/pwa/src/components/editor/GraphGroupBox.tsx +47 -0
- package/apps/pwa/src/components/editor/GraphRunControl.tsx +127 -0
- package/apps/pwa/src/components/editor/GraphWizardChat.tsx +292 -0
- package/apps/pwa/src/components/editor/graph-canvas-model.ts +570 -0
- package/apps/pwa/src/components/editor/graph-canvas-save.ts +52 -0
- package/apps/pwa/src/components/editor/graph-editor-mode.ts +41 -0
- package/apps/pwa/src/components/editor/graph-groups.ts +139 -0
- package/apps/pwa/src/components/editor/graph-wizard.ts +154 -0
- package/apps/pwa/src/components/editor/use-wizard-canvas.ts +66 -0
- package/apps/pwa/src/components/exec/ExecApprovals.tsx +77 -0
- package/apps/pwa/src/components/fluent-chain/NextFluentChip.tsx +91 -0
- package/apps/pwa/src/components/idle-nudge/IdleNudgeBadge.tsx +79 -0
- package/apps/pwa/src/components/inside/loop-agents-view.ts +75 -0
- package/apps/pwa/src/components/inside/pty-decisions.ts +72 -0
- package/apps/pwa/src/components/inside/public-text.ts +35 -0
- package/apps/pwa/src/components/install-banner.tsx +192 -0
- package/apps/pwa/src/components/intent-panel/IntentButton.tsx +67 -0
- package/apps/pwa/src/components/intent-panel/IntentPanel.tsx +244 -0
- package/apps/pwa/src/components/intent-panel/intent-panel-storage.ts +140 -0
- package/apps/pwa/src/components/intent-panel/use-intent-prediction.ts +269 -0
- package/apps/pwa/src/components/live-run/AdaptiveGraphReplay.tsx +115 -0
- package/apps/pwa/src/components/live-run/GraphInstanceLiveScreen.tsx +95 -0
- package/apps/pwa/src/components/live-run/GraphInstanceRichView.tsx +124 -0
- package/apps/pwa/src/components/live-run/GraphInstanceSimulationScreen.tsx +34 -0
- package/apps/pwa/src/components/live-run/LiveRunAutoFollowPanel.tsx +70 -0
- package/apps/pwa/src/components/live-run/LiveRunGraph.tsx +621 -0
- package/apps/pwa/src/components/live-run/LiveRunPanel.tsx +96 -0
- package/apps/pwa/src/components/live-run/live-run-stage.css +62 -0
- package/apps/pwa/src/components/loops/loop-status.ts +5 -0
- package/apps/pwa/src/components/member-board/MemberMiniBoardView.tsx +163 -0
- package/apps/pwa/src/components/member-board/member-board-model.ts +113 -0
- package/apps/pwa/src/components/nexus/ChannelBotSetupCard.tsx +103 -0
- package/apps/pwa/src/components/notes/NoteFromImageModal.tsx +477 -0
- package/apps/pwa/src/components/notes/SaveAsNoteButton.tsx +71 -0
- package/apps/pwa/src/components/observatory/subject-list.ts +242 -0
- package/apps/pwa/src/components/ops/GateShards.tsx +87 -0
- package/apps/pwa/src/components/ops/OperatorReleaseRoute.tsx +8 -0
- package/apps/pwa/src/components/ops/ReleaseFlow.tsx +143 -0
- package/apps/pwa/src/components/ops/ReleaseGraphRunView.tsx +89 -0
- package/apps/pwa/src/components/ops/ReleaseRunsView.tsx +227 -0
- package/apps/pwa/src/components/provenance/ProvenanceBadge.tsx +15 -0
- package/apps/pwa/src/components/providers/DaemonProvider.tsx +126 -0
- package/apps/pwa/src/components/providers/NewBuildBanner.tsx +55 -0
- package/apps/pwa/src/components/providers/NexusClientProvider.tsx +69 -0
- package/apps/pwa/src/components/providers/OperatorRoleDefault.tsx +16 -0
- package/apps/pwa/src/components/providers/ServiceWorkerRegister.tsx +32 -0
- package/apps/pwa/src/components/providers/ThemeProvider.tsx +93 -0
- package/apps/pwa/src/components/providers/ToastProvider.tsx +12 -0
- package/apps/pwa/src/components/settings/AdvancedSetupMap.tsx +76 -0
- package/apps/pwa/src/components/settings/AnswerDepthCard.tsx +90 -0
- package/apps/pwa/src/components/settings/BudgetGuardWatcher.tsx +125 -0
- package/apps/pwa/src/components/settings/BudgetThresholdModal.tsx +200 -0
- package/apps/pwa/src/components/settings/BuildInfoCard.tsx +70 -0
- package/apps/pwa/src/components/settings/ChannelBotSetupCard.tsx +107 -0
- package/apps/pwa/src/components/settings/ChatRoutingCard.tsx +67 -0
- package/apps/pwa/src/components/settings/ChildLlmPreferenceCard.tsx +224 -0
- package/apps/pwa/src/components/settings/ConnectTokenCard.tsx +117 -0
- package/apps/pwa/src/components/settings/FastReplyCard.tsx +68 -0
- package/apps/pwa/src/components/settings/IntentPanelSettingsCard.tsx +107 -0
- package/apps/pwa/src/components/settings/LlmCatalogCard.tsx +284 -0
- package/apps/pwa/src/components/settings/LlmHostsCard.tsx +399 -0
- package/apps/pwa/src/components/settings/LlmModelTierCard.tsx +246 -0
- package/apps/pwa/src/components/settings/NotesMetricsCard.tsx +192 -0
- package/apps/pwa/src/components/settings/ObsidianSkillsCard.tsx +125 -0
- package/apps/pwa/src/components/settings/OcrPrefsCard.tsx +106 -0
- package/apps/pwa/src/components/settings/PersonaCard.tsx +353 -0
- package/apps/pwa/src/components/settings/PlatformConnectionsCard.tsx +113 -0
- package/apps/pwa/src/components/settings/PresetCardGrid.tsx +194 -0
- package/apps/pwa/src/components/settings/PushcutSettingsCard.tsx +208 -0
- package/apps/pwa/src/components/settings/QuickSetupCard.tsx +256 -0
- package/apps/pwa/src/components/settings/SettingsPanel.tsx +1184 -0
- package/apps/pwa/src/components/settings/TierChangeConfirmModal.tsx +244 -0
- package/apps/pwa/src/components/settings/TtsModelTierCard.tsx +231 -0
- package/apps/pwa/src/components/settings/TtsVoiceIdPickerCard.tsx +445 -0
- package/apps/pwa/src/components/settings/VoiceModelTierCard.tsx +318 -0
- package/apps/pwa/src/components/settings/VoicePrefsCard.tsx +127 -0
- package/apps/pwa/src/components/settings/WelcomeCard.tsx +126 -0
- package/apps/pwa/src/components/settings/persona-card-edits.ts +21 -0
- package/apps/pwa/src/components/shell/AppShell.tsx +126 -0
- package/apps/pwa/src/components/shell/AuthRequiredBanner.tsx +20 -0
- package/apps/pwa/src/components/shell/CompactTopBar.tsx +90 -0
- package/apps/pwa/src/components/shell/MaturityBanner.tsx +15 -0
- package/apps/pwa/src/components/shell/MobileBottomTabs.tsx +131 -0
- package/apps/pwa/src/components/shell/NavSearchProbe.tsx +13 -0
- package/apps/pwa/src/components/shell/PwaRolePicker.tsx +41 -0
- package/apps/pwa/src/components/shell/ShareCaptureButton.tsx +52 -0
- package/apps/pwa/src/components/shell/SidebarNav.tsx +196 -0
- package/apps/pwa/src/components/shell/SkillProblemsBanner.tsx +75 -0
- package/apps/pwa/src/components/shell/TopBar.tsx +269 -0
- package/apps/pwa/src/components/shell/TopBarActivityIndicator.tsx +51 -0
- package/apps/pwa/src/components/shell/activity-snapshot.ts +98 -0
- package/apps/pwa/src/components/shell/fetch-activity-snapshot.ts +43 -0
- package/apps/pwa/src/components/shell/nav-visibility-prefs.ts +16 -0
- package/apps/pwa/src/components/shell/nav-visit.ts +41 -0
- package/apps/pwa/src/components/shell/sidebar-nav-items.ts +122 -0
- package/apps/pwa/src/components/shell/sidebar-nav-private.ts +4 -0
- package/apps/pwa/src/components/shell/use-nav-visit-log.ts +34 -0
- package/apps/pwa/src/components/shell/use-shell-activity.ts +69 -0
- package/apps/pwa/src/components/showroom/ChainForwardGateModal.tsx +161 -0
- package/apps/pwa/src/components/showroom/CostGateModal.tsx +138 -0
- package/apps/pwa/src/components/showroom/HitlBanner.tsx +107 -0
- package/apps/pwa/src/components/showroom/ShowroomCameraIntake.tsx +263 -0
- package/apps/pwa/src/components/showroom/ShowroomHitlToggle.tsx +63 -0
- package/apps/pwa/src/components/showroom/ShowroomInput.tsx +1105 -0
- package/apps/pwa/src/components/showroom/ShowroomLayout.tsx +2166 -0
- package/apps/pwa/src/components/showroom/ShowroomPanel.tsx +722 -0
- package/apps/pwa/src/components/showroom/ShowroomShortcutHelp.tsx +98 -0
- package/apps/pwa/src/components/showroom/ShowroomVoiceIntake.tsx +271 -0
- package/apps/pwa/src/components/showroom/use-hitl-banner.ts +198 -0
- package/apps/pwa/src/components/terminal/CameraAttachButton.tsx +99 -0
- package/apps/pwa/src/components/terminal/CompactTerminalBar.tsx +54 -0
- package/apps/pwa/src/components/terminal/FileAttachButton.tsx +96 -0
- package/apps/pwa/src/components/terminal/LiveCameraControl.tsx +136 -0
- package/apps/pwa/src/components/terminal/ModifierBar.tsx +263 -0
- package/apps/pwa/src/components/terminal/MultiDeviceIndicator.tsx +117 -0
- package/apps/pwa/src/components/terminal/PtyLiveView.lazy.tsx +31 -0
- package/apps/pwa/src/components/terminal/PtyLiveView.tsx +289 -0
- package/apps/pwa/src/components/terminal/PtyWall.tsx +88 -0
- package/apps/pwa/src/components/terminal/TerminalChatDock.lazy.tsx +7 -0
- package/apps/pwa/src/components/terminal/TerminalChatDock.tsx +649 -0
- package/apps/pwa/src/components/terminal/TerminalControls.tsx +311 -0
- package/apps/pwa/src/components/terminal/TerminalDropZone.tsx +142 -0
- package/apps/pwa/src/components/terminal/TerminalPanel.tsx +936 -0
- package/apps/pwa/src/components/terminal/TerminalTabs.tsx +1108 -0
- package/apps/pwa/src/components/terminal/TuiMirrorView.lazy.tsx +8 -0
- package/apps/pwa/src/components/terminal/TuiMirrorView.tsx +129 -0
- package/apps/pwa/src/components/terminal/XtermView.lazy.tsx +30 -0
- package/apps/pwa/src/components/terminal/XtermView.tsx +658 -0
- package/apps/pwa/src/components/terminal/acp-failure.ts +21 -0
- package/apps/pwa/src/components/terminal/initial-terminal-notice.ts +45 -0
- package/apps/pwa/src/components/terminal/pane-layout.ts +132 -0
- package/apps/pwa/src/components/terminal/pane-plan.ts +73 -0
- package/apps/pwa/src/components/terminal/panel-view-state.ts +35 -0
- package/apps/pwa/src/components/terminal/pty-live-poll.ts +57 -0
- package/apps/pwa/src/components/terminal/pty-mouse-forward.ts +22 -0
- package/apps/pwa/src/components/terminal/pty-terminal-list.ts +470 -0
- package/apps/pwa/src/components/terminal/pty-terminal-row-summary.ts +129 -0
- package/apps/pwa/src/components/terminal/pty-wall.ts +46 -0
- package/apps/pwa/src/components/terminal/rename-outcome.ts +22 -0
- package/apps/pwa/src/components/terminal/tab-close-intent.ts +45 -0
- package/apps/pwa/src/components/terminal/terminal-chip-label.ts +78 -0
- package/apps/pwa/src/components/terminal/terminal-clear.ts +3 -0
- package/apps/pwa/src/components/terminal/terminal-input-registry.ts +87 -0
- package/apps/pwa/src/components/terminal/terminal-input-sender.ts +99 -0
- package/apps/pwa/src/components/terminal/terminal-origin-label.ts +22 -0
- package/apps/pwa/src/components/terminal/touch-scroll.ts +86 -0
- package/apps/pwa/src/components/tool-approval/ToolApprovalSheet.tsx +67 -0
- package/apps/pwa/src/components/tool-approval/use-tool-approval.ts +124 -0
- package/apps/pwa/src/components/ui/api-key-field.tsx +154 -0
- package/apps/pwa/src/components/ui/button.tsx +58 -0
- package/apps/pwa/src/components/ui/dialog.tsx +160 -0
- package/apps/pwa/src/components/ui/input.tsx +20 -0
- package/apps/pwa/src/components/ui/scroll-area.tsx +55 -0
- package/apps/pwa/src/components/ui/sheet.tsx +138 -0
- package/apps/pwa/src/components/ui/sonner.tsx +49 -0
- package/apps/pwa/src/components/ui/tabs.tsx +82 -0
- package/apps/pwa/src/components/ui/tooltip.tsx +66 -0
- package/apps/pwa/src/components/vault/MermaidDiagram.tsx +163 -0
- package/apps/pwa/src/components/vault/NewNoteDialog.tsx +73 -0
- package/apps/pwa/src/components/vault/NoteEditor.tsx +196 -0
- package/apps/pwa/src/components/vault/VaultGraph.tsx +77 -0
- package/apps/pwa/src/components/vault/VaultMarkdown.tsx +112 -0
- package/apps/pwa/src/components/vault/VaultPanel.tsx +216 -0
- package/apps/pwa/src/components/vault/VaultTagsPanel.tsx +47 -0
- package/apps/pwa/src/components/vault/mermaid-theme.ts +42 -0
- package/apps/pwa/src/components/voice/TailscaleSecurityBanner.tsx +108 -0
- package/apps/pwa/src/components/workflows/ApprovalModal.tsx +145 -0
- package/apps/pwa/src/components/workflows/ChatPreviewPanel.tsx +144 -0
- package/apps/pwa/src/components/workflows/ExpressionInput.tsx +212 -0
- package/apps/pwa/src/components/workflows/NodeRunPanel.tsx +134 -0
- package/apps/pwa/src/components/workflows/PluginCredentialsField.tsx +131 -0
- package/apps/pwa/src/components/workflows/RunGraphShowcase.tsx +183 -0
- package/apps/pwa/src/components/workflows/RunGraphView.tsx +343 -0
- package/apps/pwa/src/components/workflows/RunsListPanel.tsx +211 -0
- package/apps/pwa/src/components/workflows/SchemaForm.tsx +119 -0
- package/apps/pwa/src/components/workflows/TidyEdge.tsx +44 -0
- package/apps/pwa/src/components/workflows/WorkflowCreateModal.tsx +260 -0
- package/apps/pwa/src/components/workflows/WorkflowGraph.tsx +1151 -0
- package/apps/pwa/src/components/workflows/WorkflowHistoryPanel.tsx +93 -0
- package/apps/pwa/src/components/workflows/WorkflowNLPrompt.tsx +199 -0
- package/apps/pwa/src/components/workflows/WorkflowNodeEditor.tsx +509 -0
- package/apps/pwa/src/components/workflows/WorkflowPublishPanel.tsx +54 -0
- package/apps/pwa/src/components/workflows/WorkflowSynthPreview.tsx +122 -0
- package/apps/pwa/src/components/workflows/WorkflowsPanel.tsx +1226 -0
- package/apps/pwa/src/components/workflows/expression-completion.ts +43 -0
- package/apps/pwa/src/components/workflows/graph-clipboard.ts +78 -0
- package/apps/pwa/src/components/workflows/graph-drop.ts +56 -0
- package/apps/pwa/src/components/workflows/graph-history.ts +40 -0
- package/apps/pwa/src/components/workflows/graph-notes.ts +47 -0
- package/apps/pwa/src/components/workflows/node-run-result.ts +36 -0
- package/apps/pwa/src/components/workflows/node-status-class.ts +14 -0
- package/apps/pwa/src/components/workflows/node-status.css +152 -0
- package/apps/pwa/src/components/workflows/phone-pane.ts +9 -0
- package/apps/pwa/src/components/workflows/run-status-helpers.ts +126 -0
- package/apps/pwa/src/components/workflows/schema-form.ts +222 -0
- package/apps/pwa/src/components/workflows/triggers/ChatTriggerEditor.tsx +170 -0
- package/apps/pwa/src/components/workflows/triggers/DiscordTriggerEditor.tsx +152 -0
- package/apps/pwa/src/components/workflows/triggers/HttpRequestEditor.tsx +287 -0
- package/apps/pwa/src/components/workflows/triggers/ManualTriggerEditor.tsx +94 -0
- package/apps/pwa/src/components/workflows/triggers/ScheduleTriggerEditor.tsx +235 -0
- package/apps/pwa/src/components/workflows/triggers/TelegramTriggerEditor.tsx +160 -0
- package/apps/pwa/src/components/workflows/triggers/TriggerEditorBase.tsx +78 -0
- package/apps/pwa/src/components/workflows/triggers/WebhookTriggerEditor.tsx +197 -0
- package/apps/pwa/src/components/workflows/triggers/cron-preview.ts +81 -0
- package/apps/pwa/src/components/workflows/triggers/trigger-card-preview.ts +125 -0
- package/apps/pwa/src/components/workflows/use-graph-history.ts +32 -0
- package/apps/pwa/src/components/workflows/useKeyboardShortcuts.ts +81 -0
- package/apps/pwa/src/components/workflows/usePanelLayout.ts +135 -0
- package/apps/pwa/src/components/workflows/validation-helpers.ts +122 -0
- package/apps/pwa/src/components/workflows/workflow-file.ts +38 -0
- package/apps/pwa/src/components/workflows/workflow-graph-layout.ts +526 -0
- package/apps/pwa/src/components/workflows/workflow-graph-mutations.ts +415 -0
- package/apps/pwa/src/components/workflows/workflow-publish.ts +50 -0
- package/apps/pwa/src/components/workflows/workflow-save.ts +60 -0
- package/apps/pwa/src/lib/adaptive-graph-replay.ts +57 -0
- package/apps/pwa/src/lib/attachment-content.ts +140 -0
- package/apps/pwa/src/lib/audio-stt-extract.ts +69 -0
- package/apps/pwa/src/lib/auth-required.ts +30 -0
- package/apps/pwa/src/lib/bot-rounds.ts +129 -0
- package/apps/pwa/src/lib/botlab-wall.ts +64 -0
- package/apps/pwa/src/lib/budget-status.ts +114 -0
- package/apps/pwa/src/lib/camera-intake.ts +140 -0
- package/apps/pwa/src/lib/card-followup-client.ts +149 -0
- package/apps/pwa/src/lib/chat-autoscroll.ts +127 -0
- package/apps/pwa/src/lib/chat-deploy.ts +62 -0
- package/apps/pwa/src/lib/chat-fork.ts +31 -0
- package/apps/pwa/src/lib/chat-harness-ask.ts +24 -0
- package/apps/pwa/src/lib/chat-model-commands.ts +104 -0
- package/apps/pwa/src/lib/chat-paste-drop.ts +55 -0
- package/apps/pwa/src/lib/chat-persona.ts +38 -0
- package/apps/pwa/src/lib/chat-queue.ts +24 -0
- package/apps/pwa/src/lib/chat-routing-storage.ts +67 -0
- package/apps/pwa/src/lib/chat-runtime.ts +1956 -0
- package/apps/pwa/src/lib/chat-session-commands.ts +88 -0
- package/apps/pwa/src/lib/chat-status.ts +78 -0
- package/apps/pwa/src/lib/code-block-preview.ts +66 -0
- package/apps/pwa/src/lib/compact-mode.ts +52 -0
- package/apps/pwa/src/lib/control-signals-api.ts +76 -0
- package/apps/pwa/src/lib/daemon-client.ts +2637 -0
- package/apps/pwa/src/lib/daemon-config.ts +129 -0
- package/apps/pwa/src/lib/daemon-session.ts +51 -0
- package/apps/pwa/src/lib/debug.ts +391 -0
- package/apps/pwa/src/lib/decisions-api.ts +71 -0
- package/apps/pwa/src/lib/devices-api.ts +88 -0
- package/apps/pwa/src/lib/dock-attachment-count.ts +4 -0
- package/apps/pwa/src/lib/dock-history-hydrate.ts +149 -0
- package/apps/pwa/src/lib/drop-overlay.ts +14 -0
- package/apps/pwa/src/lib/elanous-ask-extensions.ts +90 -0
- package/apps/pwa/src/lib/elanous-card.ts +92 -0
- package/apps/pwa/src/lib/elanous-feedback-envelope.ts +40 -0
- package/apps/pwa/src/lib/elanous-term-envelope.ts +115 -0
- package/apps/pwa/src/lib/elevenlabs-voices.ts +115 -0
- package/apps/pwa/src/lib/feedback-block-accumulator.ts +567 -0
- package/apps/pwa/src/lib/feedback-envelope.ts +78 -0
- package/apps/pwa/src/lib/field-pick-limits.ts +30 -0
- package/apps/pwa/src/lib/fluent-chain-api.ts +111 -0
- package/apps/pwa/src/lib/graph-approvals-api.ts +112 -0
- package/apps/pwa/src/lib/graph-edge-route.ts +480 -0
- package/apps/pwa/src/lib/graph-run-api.ts +91 -0
- package/apps/pwa/src/lib/graph-wiring.css +9 -0
- package/apps/pwa/src/lib/hosted-chat-runtime.ts +158 -0
- package/apps/pwa/src/lib/hw-keyboard.ts +30 -0
- package/apps/pwa/src/lib/idle-nudge-api.ts +79 -0
- package/apps/pwa/src/lib/inject-attachment-paths.ts +83 -0
- package/apps/pwa/src/lib/inside-events.ts +219 -0
- package/apps/pwa/src/lib/install-banner-state.ts +106 -0
- package/apps/pwa/src/lib/intake-absorb-status.ts +27 -0
- package/apps/pwa/src/lib/intake-front-door-api.ts +127 -0
- package/apps/pwa/src/lib/intake-pipeline-api.ts +192 -0
- package/apps/pwa/src/lib/intake-run-timeline.ts +31 -0
- package/apps/pwa/src/lib/key-sequences.ts +116 -0
- package/apps/pwa/src/lib/live-gate-decision.ts +139 -0
- package/apps/pwa/src/lib/live-public.ts +92 -0
- package/apps/pwa/src/lib/live-run-metrics.ts +56 -0
- package/apps/pwa/src/lib/live-run-scene.ts +120 -0
- package/apps/pwa/src/lib/live-run-stage.ts +175 -0
- package/apps/pwa/src/lib/live-run-view.ts +89 -0
- package/apps/pwa/src/lib/live-signals.ts +341 -0
- package/apps/pwa/src/lib/live-v5.ts +244 -0
- package/apps/pwa/src/lib/markdown-render.ts +8 -0
- package/apps/pwa/src/lib/mcp-app-bridge-host.ts +102 -0
- package/apps/pwa/src/lib/mcp-app-bridge.ts +474 -0
- package/apps/pwa/src/lib/mcp-app-csp.ts +68 -0
- package/apps/pwa/src/lib/mcp-app-resource.ts +90 -0
- package/apps/pwa/src/lib/member-invite-api.ts +39 -0
- package/apps/pwa/src/lib/member-mini-board-api.ts +75 -0
- package/apps/pwa/src/lib/member-signup-intent.ts +20 -0
- package/apps/pwa/src/lib/merge-approvals-api.ts +94 -0
- package/apps/pwa/src/lib/migrate-base-url.ts +64 -0
- package/apps/pwa/src/lib/mini-board-projection.ts +129 -0
- package/apps/pwa/src/lib/model-tier-prefs.ts +115 -0
- package/apps/pwa/src/lib/model-tier-spec.ts +339 -0
- package/apps/pwa/src/lib/model-tier-sync.ts +408 -0
- package/apps/pwa/src/lib/morning-showroom-api.ts +78 -0
- package/apps/pwa/src/lib/new-build.ts +14 -0
- package/apps/pwa/src/lib/notification-target-select.ts +76 -0
- package/apps/pwa/src/lib/ocr-prefs.ts +79 -0
- package/apps/pwa/src/lib/operator-role.ts +40 -0
- package/apps/pwa/src/lib/ops-api.ts +285 -0
- package/apps/pwa/src/lib/outputs-api.ts +20 -0
- package/apps/pwa/src/lib/peer-id.ts +40 -0
- package/apps/pwa/src/lib/preset-catalog.ts +92 -0
- package/apps/pwa/src/lib/projects-api.ts +67 -0
- package/apps/pwa/src/lib/provenance-badge.ts +26 -0
- package/apps/pwa/src/lib/public-app-report.ts +18 -0
- package/apps/pwa/src/lib/public-capture.tsx +19 -0
- package/apps/pwa/src/lib/pushcut-runtime.ts +144 -0
- package/apps/pwa/src/lib/pwa-role.ts +37 -0
- package/apps/pwa/src/lib/quiet-surface.ts +37 -0
- package/apps/pwa/src/lib/register-sw.ts +100 -0
- package/apps/pwa/src/lib/research-fan.ts +93 -0
- package/apps/pwa/src/lib/route-maturity.ts +28 -0
- package/apps/pwa/src/lib/run-graph-flow.ts +144 -0
- package/apps/pwa/src/lib/run-graph-yaml-edit.ts +393 -0
- package/apps/pwa/src/lib/secure-context-guard.ts +112 -0
- package/apps/pwa/src/lib/session-restore.ts +269 -0
- package/apps/pwa/src/lib/sessions-service.ts +294 -0
- package/apps/pwa/src/lib/sessions-store-api.ts +96 -0
- package/apps/pwa/src/lib/setup-link.ts +42 -0
- package/apps/pwa/src/lib/share-capture.ts +119 -0
- package/apps/pwa/src/lib/share-prefill.ts +21 -0
- package/apps/pwa/src/lib/share-scraps.ts +140 -0
- package/apps/pwa/src/lib/share-target-store.ts +234 -0
- package/apps/pwa/src/lib/shared-event-source.ts +158 -0
- package/apps/pwa/src/lib/show-beta.ts +48 -0
- package/apps/pwa/src/lib/showroom/cost-estimator.ts +97 -0
- package/apps/pwa/src/lib/showroom/hitl-toggle.ts +45 -0
- package/apps/pwa/src/lib/showroom/runtime.ts +1386 -0
- package/apps/pwa/src/lib/showroom/storage.ts +260 -0
- package/apps/pwa/src/lib/showroom/types.ts +323 -0
- package/apps/pwa/src/lib/showroom/use-personas.ts +126 -0
- package/apps/pwa/src/lib/showroom/use-resolved-view.ts +179 -0
- package/apps/pwa/src/lib/showroom-keyboard-shortcuts.ts +127 -0
- package/apps/pwa/src/lib/skill-exec-client.ts +54 -0
- package/apps/pwa/src/lib/snapshot.ts +75 -0
- package/apps/pwa/src/lib/swipe-gesture.ts +176 -0
- package/apps/pwa/src/lib/task-api.ts +141 -0
- package/apps/pwa/src/lib/task-card-model.ts +73 -0
- package/apps/pwa/src/lib/term-focus.ts +52 -0
- package/apps/pwa/src/lib/terminal-stream.ts +38 -0
- package/apps/pwa/src/lib/testing/react-hook-harness.ts +269 -0
- package/apps/pwa/src/lib/tui-observe.ts +130 -0
- package/apps/pwa/src/lib/turn-busy.ts +38 -0
- package/apps/pwa/src/lib/upload-attachment.ts +95 -0
- package/apps/pwa/src/lib/use-focus-trap.ts +121 -0
- package/apps/pwa/src/lib/use-live-announcer.ts +79 -0
- package/apps/pwa/src/lib/use-live-camera.ts +289 -0
- package/apps/pwa/src/lib/use-mission-router.ts +126 -0
- package/apps/pwa/src/lib/use-operator.ts +35 -0
- package/apps/pwa/src/lib/use-pointer-capability.ts +53 -0
- package/apps/pwa/src/lib/use-sessions.ts +47 -0
- package/apps/pwa/src/lib/use-wake-lock.ts +104 -0
- package/apps/pwa/src/lib/user-intent-logger.ts +83 -0
- package/apps/pwa/src/lib/utils.ts +6 -0
- package/apps/pwa/src/lib/vault-api.ts +109 -0
- package/apps/pwa/src/lib/vault-helpers.ts +100 -0
- package/apps/pwa/src/lib/vault-tree.ts +22 -0
- package/apps/pwa/src/lib/video-frame-extract.ts +111 -0
- package/apps/pwa/src/lib/voice-intake.ts +232 -0
- package/apps/pwa/src/lib/voice-prefs.ts +81 -0
- package/apps/pwa/src/lib/web-push.ts +213 -0
- package/apps/pwa/src/lib/xterm-capability-filter.ts +50 -0
- package/apps/pwa/src/lib/xterm-resize-controller.ts +162 -0
- package/apps/pwa/src/nexus/client.ts +1719 -0
- package/apps/pwa/src/nexus/components/detail-views/channel-bot-detail.tsx +53 -0
- package/apps/pwa/src/nexus/components/detail-views/chat-detail.tsx +18 -0
- package/apps/pwa/src/nexus/components/detail-views/daemon-detail.tsx +27 -0
- package/apps/pwa/src/nexus/components/detail-views/index.ts +36 -0
- package/apps/pwa/src/nexus/components/detail-views/pwa-host-detail.tsx +33 -0
- package/apps/pwa/src/nexus/components/detail-views/webterm-detail.tsx +16 -0
- package/apps/pwa/src/nexus/components/log-line.tsx +14 -0
- package/apps/pwa/src/nexus/components/mini-term-dock.tsx +83 -0
- package/apps/pwa/src/nexus/components/nexus-sidebar.tsx +77 -0
- package/apps/pwa/src/nexus/components/sidebar-grouping.ts +50 -0
- package/apps/pwa/src/nexus/components/sidebar-tab-item.tsx +54 -0
- package/apps/pwa/src/nexus/components/status-badge.tsx +56 -0
- package/apps/pwa/src/nexus/components/tab-actions.tsx +82 -0
- package/apps/pwa/src/nexus/components/tab-detail.tsx +32 -0
- package/apps/pwa/src/nexus/components/tab-status-panel.tsx +51 -0
- package/apps/pwa/src/nexus/hooks/index.ts +25 -0
- package/apps/pwa/src/nexus/hooks/query-keys.ts +57 -0
- package/apps/pwa/src/nexus/hooks/use-bindings.ts +75 -0
- package/apps/pwa/src/nexus/hooks/use-config.ts +71 -0
- package/apps/pwa/src/nexus/hooks/use-design-check.ts +190 -0
- package/apps/pwa/src/nexus/hooks/use-events.ts +43 -0
- package/apps/pwa/src/nexus/hooks/use-live-signals.ts +71 -0
- package/apps/pwa/src/nexus/hooks/use-nexus-context.tsx +56 -0
- package/apps/pwa/src/nexus/hooks/use-nexus-state.ts +76 -0
- package/apps/pwa/src/nexus/hooks/use-platforms.ts +22 -0
- package/apps/pwa/src/nexus/hooks/use-tab-actions.ts +82 -0
- package/apps/pwa/src/nexus/hooks/use-tab-logs-stream.ts +89 -0
- package/apps/pwa/src/nexus/hooks/use-templates.ts +34 -0
- package/apps/pwa/src/nexus/hooks/use-workflow-pins.ts +34 -0
- package/apps/pwa/src/nexus/hooks/use-workflow-run-modes.ts +18 -0
- package/apps/pwa/src/nexus/hooks/use-workflows.ts +327 -0
- package/apps/pwa/src/nexus/hooks/use-worktrees.ts +76 -0
- package/apps/pwa/src/nexus/runtime-discovery.ts +66 -0
- package/apps/pwa/src/nexus/types.ts +89 -0
- package/apps/pwa/src/test-devices/graph-design-replay.ts +73 -0
- package/apps/pwa/src/voice/barge-in.ts +235 -0
- package/apps/pwa/src/voice/showroom-voice.ts +64 -0
- package/apps/pwa/src/voice/use-showroom-tts.ts +192 -0
- package/apps/pwa/src/voice/use-voice-controller.ts +291 -0
- package/apps/pwa/src/voice/use-voice-tts.ts +169 -0
- package/apps/pwa/src/voice/voice-capture.ts +182 -0
- package/apps/pwa/src/voice/voice-frame-protocol.ts +73 -0
- package/apps/pwa/src/voice/voice-phase-styles.ts +26 -0
- package/apps/pwa/src/voice/voice-playback.ts +73 -0
- package/apps/pwa/src/voice/voice-websocket.ts +191 -0
- package/apps/pwa/tsconfig.json +23 -0
- package/catalog/models/openrouter/onboarding-picks.json +16 -0
- package/catalog/models/openrouter/solar-mini4.yaml +27 -0
- package/catalog/models/openrouter/solar-pro4.yaml +27 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-APP-CONTRACT-SECRET-ENTROPY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-APP-KILL-SWITCH-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-APP-SCRATCH-BOOTSTRAP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-APP-UPGRADE-PATH-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-ARG-MACRO-CANVAS-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-ASIDE-FEEDBACK-LOOP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-AUTHOR-REVIEWER-PRECHECK-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-BACKEND-TIER-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-BOOT-DAEMON-TOOLS-PTY-SHELL-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-BROWSER-HAND-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-BURST-READY-LADDER-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-CENSUS-ORACLE-AXIS-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-CHAIN-LAND-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-CLASSIC-TUI-SEAT-SCENARIOS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-CLI-CONFIG-AUDIT-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-CODEX-WIRE-CAPTURE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-COMPUTER-USE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-DASHBOARD-EVENT-LOOP-STALL-MONITOR-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-DELETE-IMPACT-SIM-TS.json +4 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-DEVICE-CATALOG-SNAPSHOT-FRAGMENTS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-DEVICE-FIDELITY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-DRAFT-INVENTORY-BUILDER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-EDGE-CREATOR-NIGHTLY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-EDGE-CREATOR-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-EVENT-MONKEY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-ABSORB-INGEST-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-ADB-PHONE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-AGENT-HOOK-HOST-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-ANDROID-CLIENT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-AUTH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-DB-BACKUP-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-DB-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-DRIVE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-FAILURES-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-HOST-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-REALTIME-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-SOURCE-CONCURRENT-WRITER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-SOURCE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-STORAGE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-APP-TRAFFIC-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-BIN-ARGS-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-BIN-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-BROWSER-PAGE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-CLOCK-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-CLOUD-BILLING-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-CLOUD-VM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-DATA-GUARD-BOUNDARY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-DNS-CERT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-ELEVENLABS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-FEEDS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-FETCH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-FLEET-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-GH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-GOOGLE-DRIVE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-HERDR-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-HIGGSFIELD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-KUBECTL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-LAND-QUEUE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-LINEAR-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-LLM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-MEMBER-OIDC-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-MOBILE-TOOLCHAIN-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-NEXUS-BOARD-SERVER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-PAYMENT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-PS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-RELAY-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-SSH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-STT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-TELEGRAM-OUTBOUND-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-TELEGRAM-VIDEO-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAKE-TEMP-CLEANUP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-CRED-EXPIRY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-GLM-NO-CREDENTIAL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-NEEDS-HUMAN-REASON-REPAIR-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-NEXTMOVE-DISPATCH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-NEXUS-STALL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-POD-CHILD-RESULT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-POD-CODEX-503-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-POD-DEATH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-POD-REUSE-RESIDUE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-POOL-CAP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-SCOPE-ESCAPE-LIFT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-SQLITE-BUSY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FAULT-TUI-400-AUTOHEAL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FIXTURES-GIT-WORKTREE-ACCEL-LINUX-JSON.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-FLUTTER-DEPLOY-JOURNEY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GATE-IMAGE-LAYERED-DELTA-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GATE-IMAGE-PREFLIGHT-RUNTIME-IDENTITY-FLOW-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GATE-ROSTER-SECOND-POOL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GATE-SHARD-HOST-REROUTE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GATE-STEADY-STATE-PROOF-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GCP-ARCHITECT-EXPAND-FAKE-WORLD-TS.json +7 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GCP-ARCHITECT-EXPAND-TIERED-DESIGN-TS.json +6 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GIT-PUSH-TIMEOUT-PARTIAL-OUTCOME-REMOTE-VERIFY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GOAL-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GOAL-INTERIM-TRACE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-DIFF-APPLY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-ENGINE-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-EVENT-ENTRY-WORLD-TS.json +5 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-PLACEMENT-LEASE-WORLD-TS.json +5 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-RUN-LIFECYCLE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-RUNTIME-OVERLAY-EVENT-PATH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-RUNTIME-OVERLAY-EVENT-PATH-WORKER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRAPH-TRIGGER-HOOK-DEVICE-TS.json +6 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRID-CHAOS-DRIVER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRID-LEDGER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-GRID-READY-TIERS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-HEADLESS-TUI-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-HEAL-REAUTHOR-MATERIALIZED-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-HOTSPOT-FILE-LEASE-WORLD-TS.json +6 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-HQ-MOVE-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-IN-PROCESS-CLI-539-FILE-ADOPTION-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-IN-PROCESS-CLI-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-INPUT-HISTORY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-INSTALL-CONSENT-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-INTERACTION-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-IOS-CHAT-EDGE-ADAPTER-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-KAIST-APP-QR-SIM-TS.json +7 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-KAIST-CLASSIC-PWA-BROWSER-REPLAY-TS.json +7 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-KAIST-CLASSIC-PWA-REPLAY-WORLD-TS.json +7 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-LINEAR-SECRETARY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MAPREDUCE-MULTIHOST-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-AUTHORING-FIRST-RUN-CHILD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-AUTHORING-FIRST-RUN-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-DEVICE-REQUESTS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-SCENARIO-CATALOG-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-SEAT-PTY-FRAME-CHILD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-SEAT-PTY-FRAME-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-SEAT-PTY-SEQUENCE-CHILD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MOCK-SEAT-PTY-SEQUENCE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MULTI-ACTOR-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-MULTI-TENANT-RELAY-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NETWORK-SANDBOX-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NEXT-TUI-CORE-INPUT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NEXT-TUI-PLUGIN-WIZARD-WORLD-TS.json +8 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NEXT-TUI-ROUTE-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NEXT-TUI-SEAT-SCENARIOS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-NL-SCENARIO-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-ONBOARDING-FIRST-RUN-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-OUTBOUND-GUARD-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PLUGIN-RELEASE-OBSERVE-ROUTE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PLUGIN-YAML-GEN-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-POD-FEDERATION-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-POD-PHASE-PREWARM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-POD-REUSE-MATCH-BY-KIND-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-POD-REUSE-SHARED-FAKE-BOUNDARY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-POD-REUSE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PR-LAND-DRIFT-AUTOREPAIR-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PR-LAND-DRIFT-GATE-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PTY-KEY-MODIFIERS-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PUBLIC-AUTH-PROVIDER-CLOUD-VM-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PWA-PROVENANCE-BADGE-WORLD-TS.json +6 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-PWA-RETAINED-ROUTES-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-READINESS-COUNTDOWN-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-REAL-TARGET-SANDBOX-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RELEASE-EVENT-TRACE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RELEASE-PUBLISH-DEVICES-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RELEASE-SAME-VERSION-RUN-ADOPTION-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RELEASE-SIM-RIG-SEAT-GUARD-CHILD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RELEASE-SIM-RIG-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RENDER-FRAME-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RESEARCH-DECISION-CHAIN-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RESUME-PICKER-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RLA-EVENT-RESPONSE-SCORECARD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-RLA-MACROPHAGE-HEAL-TIMEOUT-STALE-OUTPUT-SIM-TS.json +6 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SAFE-PUBLIC-COPY-PUBLISH-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SCENARIO-TARGET-TS.json +6 -0
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SCENARIO-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SECRET-CANARY-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SEMINAR-REHEARSAL-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SERVICE-KEY-SETUP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SESSION-ID-SEED-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SIM-COVERAGE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SIM-RECEIPT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SKILLS-TOOLS-SHELL-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SLASH-MENU-FRAMES-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SMART-MERGE-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-SUBAGENT-TOOLS-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TA-LAND-COUNT-DISPATCHER-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TASK-AGENT-PARENT-HOST-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TASK-AGENT-REJUDGE-ON-HEAD-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TASK-ORCHESTRATOR-SURFACES-SELF-IMPLEMENT-POD-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TEMP-GIT-REMOTE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TEMP-GIT-REPO-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TERM-SLASH-DEVICE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TOOL-ASYNC-FAIL-LOOP-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TOOL-ROUTER-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TRAIN-MANAGER-DECISION-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TRAIN-MANAGER-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TTY-FOREGROUND-STEAL-CHILD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TURN-STATES-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-TURN-THROW-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-USER-CONFIG-DEFAULT-SPARSE-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-USER-CONFIG-TUI-DIET-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WARM-POOL-REUSE-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WARM-POOL-REUSE-SWITCH-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WARM-SI-REUSE-SIM-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-CHAOS-RUNTIME-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-HOST-CHAOS-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-REGRESSION-SUITE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-SCHEMA-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-SNAPSHOT-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-STORE-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-TS.json +4 -1
- package/catalog/sim-world-device-catalog-fragments/devices/MD-UX-SIM-WORLD-WATCH-TS.json +4 -1
- package/catalog/ux-sim/mock-scenario-catalog-fragments/candidates/00670--src-ux-sim-kaist-app-qr-sim-ts-a1e7116f.json +11 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/candidates/00680--src-ux-sim-kaist-app-qr-sim-test-ts-2b726ad2.json +11 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/catalog-additions/00670--src-ux-sim-kaist-app-qr-sim-ts-a1e7116f.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/catalog-additions/00680--src-ux-sim-kaist-app-qr-sim-test-ts-2b726ad2.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/00060--fake-llm-4e9d0461.json +4 -2
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/00240--world-runtime-d26d02c9.json +2 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/00340--fault-injection-60e2a635.json +1 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01855--pwa-installed-package-staging.json +31 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01870--knowledge-pack-auto-select--598a19aa.json +31 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01880--kaist-app-qr-public-isolation-7dff33f1.json +36 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01880--kaist-classic-pwa-browser-replay-7ba58169.json +42 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01880--self-edge-byoc-world.json +27 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01890--gcp-architect-expand-fake-world-1dc2b194.json +27 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01890--kaist-pwa-mobile-approval-extension.json +32 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01891--kcb-integrated-pwa-lap.json +32 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/01892--gcp-architect-tiered-design.json +25 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/devices/02000--delete-impact-sim.json +28 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/metadata.json +1 -1
- package/catalog/ux-sim/mock-scenario-catalog-fragments/omission-required-paths/00670--src-ux-sim-kaist-app-qr-sim-ts-a1e7116f.json +1 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/omission-required-paths/00680--src-ux-sim-kaist-app-qr-sim-test-ts-2b726ad2.json +1 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/fake-llm--bcb74f41.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/gcp-architect-tiered-design--972746e0.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/kaist-classic-pwa-browser-replay--978b5da1.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/kaist-classic-pwa-browser-replay--c8bdb3ba.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/kaist-pwa-mobile-approval-extension--2b700ea3.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/kcb-integrated-pwa-lap--b7be4c21.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/r-arch-delete-impact-sim--1ba1037a.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/reviews/tui-interaction--4336bdfe.json +4 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/scenarios/00400--kaist-app-qr-live-c4d9f8a9.json +24 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/00360--md-ux-sim-fake-llm-ts-df79e477.json +1 -1
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01211--md-ux-sim-scenario-target-ts.json +10 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01880--md-ux-sim-kaist-app-qr-sim-ts-a39fa1af.json +10 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01880--md-ux-sim-kaist-classic-pwa-browser-replay-ts-e5635fd5.json +8 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01880--md-ux-sim-kaist-classic-pwa-replay-world-ts-8dba624f.json +8 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01890--md-ux-sim-gcp-architect-expand-fake-world-ts-50a192ca.json +10 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/01892--md-ux-sim-gcp-architect-expand-tiered-design-ts.json +10 -0
- package/catalog/ux-sim/mock-scenario-catalog-fragments/source-modules/02000--md-ux-sim-delete-impact-sim-ts.json +8 -0
- package/docs/profiles/solar-only-demo.json +13 -0
- package/graphs/demo/integrated-ticketing.yaml +40 -0
- package/graphs/demo/recipes.yaml +8 -0
- package/graphs/drafts/recipes.yaml +1 -1
- package/graphs/ops/host-reservation-watch.yaml +18 -0
- package/graphs/ops/placement.yaml +45 -0
- package/graphs/ops/recipes.yaml +19 -0
- package/graphs/ops/silence-watch.yaml +24 -0
- package/graphs/release/node-command-bindings.json +27 -0
- package/graphs/release/plugin.json +123 -12
- package/graphs/release/recipes.yaml +11 -0
- package/graphs/release/release-loop-fanout.yaml +1 -0
- package/graphs/release/release-loop.yaml +25 -4
- package/graphs/release/rla/loop.yaml +2 -1
- package/graphs/work/web-app.yaml +21 -0
- package/package.json +16 -1
- package/packs/gcp-architect-expand/content/decision-table.md +6 -1
- package/packs/system-architecture-public/README.md +17 -0
- package/packs/system-architecture-public/content/cqrs-event-sourcing-01.json +6 -0
- package/packs/system-architecture-public/content/cqrs-event-sourcing-02.json +6 -0
- package/packs/system-architecture-public/content/cqrs-event-sourcing-03.json +6 -0
- package/packs/system-architecture-public/content/cqrs-event-sourcing-04.json +6 -0
- package/packs/system-architecture-public/content/data-pipeline-01.json +6 -0
- package/packs/system-architecture-public/content/data-pipeline-02.json +6 -0
- package/packs/system-architecture-public/content/data-pipeline-03.json +6 -0
- package/packs/system-architecture-public/content/data-pipeline-04.json +6 -0
- package/packs/system-architecture-public/content/event-queue-01.json +6 -0
- package/packs/system-architecture-public/content/event-queue-02.json +6 -0
- package/packs/system-architecture-public/content/event-queue-03.json +6 -0
- package/packs/system-architecture-public/content/event-queue-04.json +6 -0
- package/packs/system-architecture-public/content/file-media-01.json +6 -0
- package/packs/system-architecture-public/content/file-media-02.json +6 -0
- package/packs/system-architecture-public/content/file-media-03.json +6 -0
- package/packs/system-architecture-public/content/file-media-04.json +6 -0
- package/packs/system-architecture-public/content/microservices-mesh-01.json +6 -0
- package/packs/system-architecture-public/content/microservices-mesh-02.json +6 -0
- package/packs/system-architecture-public/content/microservices-mesh-03.json +6 -0
- package/packs/system-architecture-public/content/microservices-mesh-04.json +6 -0
- package/packs/system-architecture-public/content/ml-serving-01.json +6 -0
- package/packs/system-architecture-public/content/ml-serving-02.json +6 -0
- package/packs/system-architecture-public/content/ml-serving-03.json +6 -0
- package/packs/system-architecture-public/content/ml-serving-04.json +6 -0
- package/packs/system-architecture-public/content/multi-tenant-saas-01.json +6 -0
- package/packs/system-architecture-public/content/multi-tenant-saas-02.json +6 -0
- package/packs/system-architecture-public/content/multi-tenant-saas-03.json +6 -0
- package/packs/system-architecture-public/content/multi-tenant-saas-04.json +6 -0
- package/packs/system-architecture-public/content/realtime-chat-notify-01.json +6 -0
- package/packs/system-architecture-public/content/realtime-chat-notify-02.json +6 -0
- package/packs/system-architecture-public/content/realtime-chat-notify-03.json +6 -0
- package/packs/system-architecture-public/content/realtime-chat-notify-04.json +6 -0
- package/packs/system-architecture-public/content/search-01.json +6 -0
- package/packs/system-architecture-public/content/search-02.json +6 -0
- package/packs/system-architecture-public/content/search-03.json +6 -0
- package/packs/system-architecture-public/content/search-04.json +6 -0
- package/packs/system-architecture-public/content/serverless-01.json +6 -0
- package/packs/system-architecture-public/content/serverless-02.json +6 -0
- package/packs/system-architecture-public/content/serverless-03.json +6 -0
- package/packs/system-architecture-public/content/serverless-04.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-01.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-02.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-03.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-04.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-05.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-06.json +6 -0
- package/packs/system-architecture-public/content/shared-patterns-07.json +6 -0
- package/packs/system-architecture-public/content/three-tier-01.json +6 -0
- package/packs/system-architecture-public/content/three-tier-02.json +6 -0
- package/packs/system-architecture-public/content/three-tier-03.json +6 -0
- package/packs/system-architecture-public/content/three-tier-04.json +6 -0
- package/packs/system-architecture-public/knowledge-pack.json +219 -0
- package/packs/ticketing-architecture-public/README.md +23 -0
- package/packs/ticketing-architecture-public/content/01-scope.json +6 -0
- package/packs/ticketing-architecture-public/content/02-seat.json +6 -0
- package/packs/ticketing-architecture-public/content/03-unique.json +7 -0
- package/packs/ticketing-architecture-public/content/04-queue.json +6 -0
- package/packs/ticketing-architecture-public/content/05-redis.json +6 -0
- package/packs/ticketing-architecture-public/content/06-payment.json +6 -0
- package/packs/ticketing-architecture-public/content/07-idempotency.json +7 -0
- package/packs/ticketing-architecture-public/content/08-webhook.json +6 -0
- package/packs/ticketing-architecture-public/content/09-outbox.json +12 -0
- package/packs/ticketing-architecture-public/content/10-kafka.json +6 -0
- package/packs/ticketing-architecture-public/content/11-edge.json +6 -0
- package/packs/ticketing-architecture-public/content/12-hpa.json +6 -0
- package/packs/ticketing-architecture-public/content/13-probe.json +6 -0
- package/packs/ticketing-architecture-public/content/14-decisions.json +6 -0
- package/packs/ticketing-architecture-public/content/15-primer.json +6 -0
- package/packs/ticketing-architecture-public/content/16-slo.json +6 -0
- package/packs/ticketing-architecture-public/content/17-aws.json +6 -0
- package/packs/ticketing-architecture-public/content/18-azure.json +6 -0
- package/packs/ticketing-architecture-public/content/19-lease.json +6 -0
- package/packs/ticketing-architecture-public/content/20-twelve-factor.json +6 -0
- package/packs/ticketing-architecture-public/knowledge-pack.json +95 -0
- package/plugins/README.md +7 -0
- package/plugins/absorb/graph/absorb-build.yaml +83 -5
- package/plugins/absorb/handlers/board-approval.ts +4 -2
- package/plugins/absorb/plugin.json +11 -0
- package/plugins/absorb/plugin.yaml +6 -2
- package/plugins/absorb/sims/absorb-demo-world.yaml +3 -1
- package/plugins/absorb/skills/absorb/build/SKILL.md +5 -1
- package/plugins/architecture-deliverables/README.md +47 -0
- package/plugins/architecture-deliverables/examples/input-sample.json +5 -0
- package/plugins/architecture-deliverables/examples/legacy-finished-input.json +5 -0
- package/plugins/architecture-deliverables/examples/structured-general.json +204 -0
- package/plugins/architecture-deliverables/examples/structured-ticketing-gcp.json +210 -0
- package/plugins/architecture-deliverables/graphs/architecture-deliverables.yaml +19 -0
- package/plugins/architecture-deliverables/graphs/recipes.yaml +12 -0
- package/plugins/architecture-deliverables/plugin.json +108 -0
- package/plugins/architecture-deliverables/references/official-gcp-icon-data.json +1 -0
- package/plugins/architecture-deliverables/references/official-gcp-icons.json +193 -0
- package/plugins/architecture-deliverables/references/structured-design.schema.json +375 -0
- package/plugins/architecture-deliverables/references/structured-template.css +1 -0
- package/plugins/demo-brief-to-requirements/README.md +20 -0
- package/plugins/demo-brief-to-requirements/examples/absorb-ticketing-records.json +20 -0
- package/plugins/demo-brief-to-requirements/examples/ticketing-brief.json +20 -0
- package/plugins/demo-brief-to-requirements/graphs/brief-to-requirements.yaml +10 -0
- package/plugins/demo-brief-to-requirements/graphs/recipes.yaml +3 -0
- package/plugins/demo-brief-to-requirements/graphs/scene4-architecture.yaml +15 -0
- package/plugins/demo-brief-to-requirements/plugin.json +31 -0
- package/plugins/demo-brief-to-requirements/references/input-contract.md +5 -0
- package/plugins/gcp-architect-expand/README.md +23 -3
- package/plugins/gcp-architect-expand/demo/BOARD-HANDOFF.md +17 -0
- package/plugins/gcp-architect-expand/demo/KCB-SCENE5-RECORDING-SCRIPT.md +30 -0
- package/plugins/gcp-architect-expand/demo/SOLAR-HANDOFF.md +93 -0
- package/plugins/gcp-architect-expand/demo/brief-3-lines.ko.txt +3 -0
- package/plugins/gcp-architect-expand/demo/classic-pty-live-ab56-receipt.json +52 -0
- package/plugins/gcp-architect-expand/demo/classic-pty-seam-receipt.json +21 -0
- package/plugins/gcp-architect-expand/demo/classic-pty-toolsearch-stack-receipt.json +24 -0
- package/plugins/gcp-architect-expand/demo/fixtures/advanced-requirement.json +19 -0
- package/plugins/gcp-architect-expand/demo/fixtures/pressure.json +8 -0
- package/plugins/gcp-architect-expand/demo/fixtures/ticketing-design.json +21 -0
- package/plugins/gcp-architect-expand/demo/graph-direct-test-world-receipt.json +114 -0
- package/plugins/gcp-architect-expand/demo/scene4-json-bridge-test-receipt.json +119 -0
- package/plugins/gcp-architect-expand/demo/security-defaults.json +6 -0
- package/plugins/gcp-architect-expand/demo/solar-original-retest-receipt.json +182 -0
- package/plugins/gcp-architect-expand/demo/structured-assumption-regression-receipt.json +182 -0
- package/plugins/gcp-architect-expand/graph.yaml +52 -20
- package/plugins/gcp-architect-expand/output-contract.json +31 -0
- package/plugins/gcp-architect-expand/plugin.json +77 -2
- package/plugins/gcp-architect-expand/recipes.yaml +12 -6
- package/plugins/gcp-architect-expand/sim/assets/README.md +12 -0
- package/plugins/gcp-architect-expand/sim/assets/cloud-storage.png +0 -0
- package/plugins/gcp-architect-expand/sim/assets/compute-engine.png +0 -0
- package/plugins/gcp-architect-expand/sim/assets/observability.png +0 -0
- package/plugins/gcp-architect-expand/sim/assets/security-identity.png +0 -0
- package/plugins/gcp-architect-expand/sim/sample-output/architecture-design.html +46 -0
- package/plugins/gcp-architect-expand/sim/sample-output/architecture-design.pdf +0 -0
- package/plugins/gcp-architect-expand/sim/sample-output/architecture.excalidraw +2638 -0
- package/plugins/gcp-architect-expand/sim/sample-output/architecture.png +0 -0
- package/plugins/gcp-architect-expand/sim/sample-output/board-attachments.json +45 -0
- package/plugins/gcp-architect-expand/sim/sample-output/demo-result.json +22 -0
- package/plugins/gcp-architect-expand/sim/sample-output/fake-world.json +46 -0
- package/plugins/gcp-architect-expand/sim/sample-output/icon-provenance.json +14 -0
- package/plugins/gcp-architect-expand/sim/sample-output/proposal.json +97 -0
- package/plugins/gcp-architect-expand/tiered-graph.yaml +39 -0
- package/plugins/graph-instance-view/evidence/pty-resource-screen.txt +31 -0
- package/plugins/graph-instance-view/handlers/http-get.ts +22 -0
- package/plugins/graph-instance-view/handlers/project-ledgers.ts +216 -0
- package/plugins/graph-instance-view/handlers/render-terminal.ts +109 -0
- package/plugins/graph-instance-view/handlers/view-model.ts +49 -0
- package/plugins/graph-instance-view/plugin.yaml +16 -0
- package/plugins/graph-instance-view/skills/read/SKILL.md +6 -0
- package/plugins/invest-arg/recipes/notes-to-pack.yaml +10 -0
- package/plugins/kr-flow-composites/plugin.json +1 -0
- package/plugins/release-win-smoke/graphs/release-win-smoke.yaml +19 -0
- package/plugins/release-win-smoke/plugin.json +46 -0
- package/plugins/release-win-smoke/plugin.yaml +11 -0
- package/plugins/release-win-smoke/sims/release-win-smoke.yaml +9 -0
- package/plugins/release-win-smoke/skills/install/SKILL.md +3 -0
- package/scenarios/dashboard-default.yaml +53 -0
- package/scenarios/heap-graph.yaml +46 -0
- package/scenarios/iul-timeline-viewer.yaml +46 -0
- package/scenarios/ux-sim/app-demo-1114.yaml +22 -0
- package/scenarios/ux-sim/arg-macro-canvas.yaml +78 -0
- package/scenarios/ux-sim/author-reviewer-precheck-applied.yaml +27 -0
- package/scenarios/ux-sim/author-reviewer-precheck-rejected-unprovable.yaml +27 -0
- package/scenarios/ux-sim/burst-ready-ladder.yaml +47 -0
- package/scenarios/ux-sim/demo1104-research-arg-graph.yaml +32 -0
- package/scenarios/ux-sim/draft-inventory-200.yaml +44 -0
- package/scenarios/ux-sim/fixtures/phone-pwa-selfheal-broken.html +19 -0
- package/scenarios/ux-sim/fixtures/release-cut-0306-shards.json +7023 -0
- package/scenarios/ux-sim/gate-deps-root-bake.yaml +17 -0
- package/scenarios/ux-sim/gate-receipt-carry-any-run.yaml +31 -0
- package/scenarios/ux-sim/gate-roster-second-pool-world.yaml +9 -0
- package/scenarios/ux-sim/gate-roster-second-pool.yaml +26 -0
- package/scenarios/ux-sim/gate-shard-receipt-payload-corrupt.yaml +14 -0
- package/scenarios/ux-sim/google-drive-files-list-readonly.yaml +21 -0
- package/scenarios/ux-sim/graph-runtime-overlay-event-stream.yaml +27 -0
- package/scenarios/ux-sim/kaist-lecture-scrap-app.yaml +14 -0
- package/scenarios/ux-sim/kaist-selfheal-stage.yaml +14 -0
- package/scenarios/ux-sim/knowhow-pack-release-heal-1107.md +39 -0
- package/scenarios/ux-sim/macro-chain-e2e.yaml +14 -0
- package/scenarios/ux-sim/macrophage-attribution-integration-1107.yaml +86 -0
- package/scenarios/ux-sim/n30-old-graph-measured-waiver.yaml +15 -0
- package/scenarios/ux-sim/night-train-dead-pid-lock.yaml +19 -0
- package/scenarios/ux-sim/night-train-world.yaml +13 -0
- package/scenarios/ux-sim/novice-versioning-scenario.ts +150 -0
- package/scenarios/ux-sim/novice-versioning-world.yaml +6 -0
- package/scenarios/ux-sim/phone-pwa-selfheal-trace.json +30 -0
- package/scenarios/ux-sim/provider-4xx-no-provider.yaml +26 -0
- package/scenarios/ux-sim/pwa-formal-update-world.yaml +5 -0
- package/scenarios/ux-sim/pwa-formal-update.yaml +8 -0
- package/scenarios/ux-sim/rehearsal-hard-2h-mandatory.yaml +37 -0
- package/scenarios/ux-sim/release-cut-preflight-regressions.yaml +31 -0
- package/scenarios/ux-sim/release-day-0307-replay.yaml +138 -0
- package/scenarios/ux-sim/release-gate-fanout.yaml +48 -0
- package/scenarios/ux-sim/release-heal-macrophage-bus.yaml +37 -0
- package/scenarios/ux-sim/release-incident-events-execution.yaml +114 -0
- package/scenarios/ux-sim/release-incident-events.yaml +98 -0
- package/scenarios/ux-sim/release-introduced-repair.yaml +40 -0
- package/scenarios/ux-sim/release-receipt-inheritance.yaml +24 -0
- package/scenarios/ux-sim/release-sim-chain-remaining.yaml +46 -0
- package/scenarios/ux-sim/release-sim-rig.yaml +266 -0
- package/scenarios/ux-sim/rla-arg-adaptive-heal.yaml +45 -0
- package/scenarios/ux-sim/rla-incident-policy-host-lost.yaml +17 -0
- package/scenarios/ux-sim/rla-postland-recovery-hitl.yaml +17 -0
- package/scenarios/ux-sim/rla-rehearsal-cloud-resume-sim.yaml +36 -0
- package/scenarios/ux-sim/rla-rehearsal-incident-sim-b.yaml +29 -0
- package/scenarios/ux-sim/sim-hq-move-world.yaml +9 -0
- package/scenarios/ux-sim/sim-hq-move.yaml +14 -0
- package/scenarios/ux-sim/tui-selfimplement-retry-loop.yaml +29 -0
- package/scenarios/ux-sim/warm-pool-reuse-world.yaml +117 -0
- package/scripts/cycle-fired-judge.ts +8 -7
- package/scripts/gcp-architect-expand/demo/design-result.ts +96 -0
- package/scripts/gcp-architect-expand/demo/export-local-pressure.ts +15 -0
- package/scripts/gcp-architect-expand/demo/pressure-input.ts +37 -0
- package/scripts/gcp-architect-expand/demo/propose.ts +60 -0
- package/scripts/gcp-architect-expand/demo/render-scene5-fallback.py +234 -0
- package/scripts/gcp-architect-expand/demo/run-graph-test-world.ts +141 -0
- package/scripts/gcp-architect-expand/demo/run.py +97 -0
- package/scripts/gcp-architect-expand/demo/tui.py +153 -0
- package/scripts/gcp-architect-expand/sim/build-sample.py +336 -0
- package/scripts/gcp-architect-expand/sim/fake-world.ts +95 -0
- package/scripts/gcp-architect-expand/sim/run-tiered-design.ts +91 -0
- package/scripts/guardian-placement-shadow.ts +23 -0
- package/scripts/heal/run-role.ts +21 -20
- package/scripts/hq/cron-git-credential-audit.ts +200 -0
- package/scripts/hq/hq-runaway-watch.ts +117 -0
- package/scripts/lib/front-route-measurement.ts +1 -4
- package/scripts/llm-cost-ledger.ts +9 -10
- package/scripts/load/members-signup-burst.ts +5 -4
- package/scripts/measure-key-arrival.ts +2 -4
- package/scripts/measure-nl-routing-corpus.ts +1 -1
- package/scripts/next-tui-default-sim.ts +43 -0
- package/scripts/plugin-only-ratchet.ts +39 -14
- package/scripts/release-loop/adaptive-gate-heal-adapter.ts +8 -7
- package/scripts/release-loop/adaptive-gate-heal.ts +13 -7
- package/scripts/release-loop/cloud-elastic-node.ts +454 -0
- package/scripts/release-loop/cloud-lease-deadline.ts +14 -0
- package/scripts/release-loop/cut-branch.ts +6 -0
- package/scripts/release-loop/gate-closure.ts +12 -22
- package/scripts/release-loop/gate-contract-surfaces.json +2 -0
- package/scripts/release-loop/gate-cutover-switch-node.ts +12 -2
- package/scripts/release-loop/gate-file-receipts.ts +10 -2
- package/scripts/release-loop/gate-image-pin.ts +31 -3
- package/scripts/release-loop/gate-node-sim.ts +5 -3
- package/scripts/release-loop/gate-repair-node.ts +24 -0
- package/scripts/release-loop/gate-runtime.ts +62 -14
- package/scripts/release-loop/gate-shard-artifacts.ts +3 -1
- package/scripts/release-loop/gate-shard-dispatch.ts +6 -2
- package/scripts/release-loop/gate-triage-node.ts +1 -0
- package/scripts/release-loop/resume.ts +6 -0
- package/scripts/release-loop/runner-release-node-commands.ts +60 -0
- package/scripts/release-loop/unattended-release.ts +10 -34
- package/scripts/release-loop/version-node.ts +26 -99
- package/scripts/solar-optimize-measure.ts +131 -0
- package/scripts/ux/kcb-phone-rehearsal.ts +90 -0
- package/scripts/ux-sim/openrouter-bare-first-run-no-network.ts +12 -0
- package/scripts/ux-sim/openrouter-bare-first-run-pty.exp +35 -0
- package/scripts/ux-sim/openrouter-first-run-pty.ts +32 -0
- package/skills/diagram-master/references/engines/excalidraw/render_template.html +1 -1
- package/skills/diagram-master/references/uv.lock +11 -8
- package/skills/lecture-note-digitizer/references/convert_to_pdf.py +1 -0
- package/src/agent/autonomous-tools.ts +5 -30
- package/src/agent/self-ambient.ts +2 -2
- package/src/agent-mission/cli-consumer.ts +165 -0
- package/src/agent-substrate/review-cap-policy.ts +78 -0
- package/src/agent-substrate/review-round-design-trigger.ts +89 -0
- package/src/agent-substrate/self-review-cli.ts +158 -43
- package/src/auth/setup-link-tokens.ts +12 -1
- package/src/auto-research/auto-mode/context-keys-bridge.ts +2 -2
- package/src/boot/daemon-prompt-turn.ts +2 -0
- package/src/boot/daemon-tools/index.ts +2 -12
- package/src/boot/daemon-tools/tool-catalog-observability.ts +21 -0
- package/src/cft/andon-context-bridge.ts +2 -2
- package/src/chat/internal-turn-contract.ts +20 -0
- package/src/chat/solar-scene5-context.ts +1 -4
- package/src/cli/agent-cli.ts +3 -1
- package/src/cli/app-cli.ts +24 -2
- package/src/cli/first-run/onboarding-pty-fixture.ts +34 -0
- package/src/cli/first-run/openrouter-key-supply.ts +139 -0
- package/src/cli/first-run/openrouter-picker.ts +19 -0
- package/src/cli/msg-cli.ts +42 -4
- package/src/cli/pr-cli.ts +199 -11
- package/src/cli/release-cli.ts +39 -18
- package/src/cli/release-manual-seat-claim.ts +108 -0
- package/src/cli/resource-ledger-cli.ts +11 -4
- package/src/cli/root-tui-entry.ts +4 -4
- package/src/cli/seat-cli.ts +2 -2
- package/src/cli/self-update.ts +25 -5
- package/src/cli/setup-cli.ts +3 -1
- package/src/cli/setup-keys.ts +68 -5
- package/src/cli/sim-cli.ts +21 -8
- package/src/cli/task-plugin-wizard-host.ts +2 -2
- package/src/context-bus/context-now.ts +28 -15
- package/src/context-bus/long-term-memory.ts +4 -1
- package/src/context-bus/release-tui-status.ts +9 -0
- package/src/conv-substrate/surface-detail.ts +19 -0
- package/src/core-turn/provider-stop-reason.ts +6 -0
- package/src/core-turn/run-core-turn.ts +7 -1
- package/src/core-turn/types.ts +2 -0
- package/src/dashboard/boot-timing.ts +1 -35
- package/src/dashboard/classic-sidetab-mission-job.ts +3 -308
- package/src/dashboard/classic-sidetab-mission-reconcile.ts +3 -212
- package/src/dashboard/classic-sidetab-mission.ts +3 -20
- package/src/dashboard/event-loop-stall-monitor.ts +1 -58
- package/src/dashboard/index.ts +56 -86
- package/src/dashboard/input/chat-main-plain-turn-runtime.ts +15 -0
- package/src/dashboard/input/chat-main-submit-route.ts +0 -17
- package/src/dashboard/input/goal-continue.ts +18 -220
- package/src/dashboard/input/internal-turn.ts +19 -255
- package/src/dashboard/input/turn-typeahead-prompt.ts +7 -31
- package/src/dashboard/mission-cli-consumer.ts +2 -165
- package/src/dashboard/seat-boot-preamble.ts +15 -428
- package/src/dashboard/setup-inline.ts +14 -147
- package/src/dashboard/sidetab-runtime.ts +2 -1
- package/src/dashboard/skill-catalog-preamble.ts +6 -101
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +2 -3
- package/src/dashboard/slash-runtime/registry.ts +1 -160
- package/src/dashboard/term-slash-runtime.ts +1 -277
- package/src/dashboard/terminal/session.ts +7 -35
- package/src/dashboard/tui-400-runtime-adapter.ts +11 -0
- package/src/dashboard/turn-start-segments.ts +16 -222
- package/src/debug/log.ts +20 -4
- package/src/display/dashboard-frame.ts +74 -0
- package/src/display/essential-frame-cursor.ts +26 -0
- package/src/display/events.ts +2 -4
- package/src/esc-abort-gate.ts +1 -13
- package/src/esc-shell-timing.ts +14 -0
- package/src/event-loop-stall-monitor.ts +58 -0
- package/src/exec-requests/planner.ts +10 -6
- package/src/graph-runner/architecture-deliverables.ts +43 -0
- package/src/graph-runner/architecture-output/pdf-body.ts +14 -0
- package/src/graph-runner/architecture-output/run-step.ts +321 -0
- package/src/graph-runner/architecture-output/structured-design.ts +201 -0
- package/src/graph-runner/arg-feedback-consumer.ts +58 -0
- package/src/graph-runner/arg-feedback-lifecycle.ts +312 -0
- package/src/graph-runner/arg-open-proposal.ts +1 -4
- package/src/graph-runner/arg-supervisor.ts +225 -78
- package/src/graph-runner/briefing-requirements/convert.ts +79 -0
- package/src/graph-runner/briefing-requirements/run-step.ts +20 -0
- package/src/graph-runner/capabilities.ts +91 -2
- package/src/graph-runner/capability-providers/architecture-deliverables.ts +51 -0
- package/src/graph-runner/graph-cli.ts +76 -1
- package/src/graph-runner/graph-events.ts +66 -2
- package/src/graph-runner/graph-run-event-ledger.ts +102 -0
- package/src/graph-runner/graph-run-msg-subscriptions.ts +84 -0
- package/src/graph-runner/graph-subscriptions.ts +2 -2
- package/src/graph-runner/in-process-registry.ts +2 -0
- package/src/graph-runner/runner-types.ts +12 -0
- package/src/graph-runner/runner.ts +343 -105
- package/src/graph-runner/scene4-turn-policy.ts +68 -0
- package/src/graph-runner/ticketing-scene4.ts +150 -0
- package/src/graph-v2/input-bindings.ts +81 -0
- package/src/graph-v2/lower.ts +2 -1
- package/src/guardian/placement-shadow.ts +332 -0
- package/src/harness/harness-cli-command.ts +2 -2
- package/src/hq/promote.ts +1 -0
- package/src/index.ts +37 -15
- package/src/input-core/mode-context-bridge.ts +2 -2
- package/src/instance/spawn-elanous.ts +10 -0
- package/src/intelligence-map/budget-context-bridge.ts +2 -2
- package/src/intelligence-map/model-catalog.ts +36 -0
- package/src/intelligence-map/types.ts +1 -0
- package/src/knowledge/notes-to-pack.ts +117 -0
- package/src/knowledge/query.ts +88 -1
- package/src/knowledge/tools/knowledge-query.ts +77 -10
- package/src/llm.ts +99 -20
- package/src/loops/graph-trigger-dispatch.ts +77 -3
- package/src/loops/host-reservation-watch.ts +196 -0
- package/src/loops/loop-scheduler.ts +72 -0
- package/src/loops/loops-table.ts +77 -0
- package/src/loops/msg-address.ts +5 -1
- package/src/loops/msg-wake.ts +8 -2
- package/src/loops/observe.ts +15 -2
- package/src/loops/orchestrator/ready-queue.ts +113 -0
- package/src/loops/orchestrator/tick.ts +31 -4
- package/src/maturity/feature-maturity.ts +2 -2
- package/src/mcp/server.ts +15 -3
- package/src/memory.ts +17 -15
- package/src/model-tier/llm-tier-map.ts +12 -0
- package/src/msg/msg-store.ts +40 -18
- package/src/msg/outbound-guard-world.ts +14 -0
- package/src/mss/logging/record.ts +3 -0
- package/src/native-tool-catalog.ts +15 -32
- package/src/nexus/api/board-api.ts +2 -1
- package/src/nexus/api/graph-run-events.ts +68 -0
- package/src/nexus/api/http-server.ts +34 -2
- package/src/nexus/api/meta-api.ts +2 -0
- package/src/nexus/api/public-routes.ts +8 -0
- package/src/nexus/api/resource-ledger.ts +29 -3
- package/src/nexus/api/setup-child-llm.ts +1 -1
- package/src/nexus/api/setup-credentials.ts +2 -4
- package/src/nexus/api/setup-llm-provider.ts +1 -1
- package/src/nexus/apps/app-api-contract-check.ts +45 -0
- package/src/nexus/apps/app-storage.ts +39 -0
- package/src/nexus/config/secrets/cred-owner.ts +15 -7
- package/src/nexus/index.ts +0 -50
- package/src/nexus/members/kcb-try-deadline.ts +20 -0
- package/src/nexus/members/kcb-try.ts +55 -0
- package/src/nexus/members/member-store.ts +151 -7
- package/src/nexus/members/members-api.ts +69 -5
- package/src/oauth/codex-owner-mirror.ts +49 -16
- package/src/oauth/codex.ts +15 -22
- package/src/onboarding/first-run.ts +64 -7
- package/src/onboarding/non-interactive.ts +1 -0
- package/src/onboarding/openrouter-model-picker.ts +78 -0
- package/src/onboarding.ts +66 -23
- package/src/plan-mode/context-bridge.ts +2 -2
- package/src/plugins/core/declared-handler.ts +38 -0
- package/src/plugins/core/feature-entitlements.ts +24 -0
- package/src/plugins/core/host.ts +51 -3
- package/src/plugins/core/manifest.ts +38 -2
- package/src/plugins/core/plugin-yaml.ts +2 -1
- package/src/plugins/install/plugin-install.ts +340 -13
- package/src/prompt-library/providers/solar.ts +17 -0
- package/src/prompt-library/registry.ts +3 -1
- package/src/provenance/provenance.ts +111 -0
- package/src/pwa/touch-input-mapper.ts +1 -1
- package/src/release-loop/checklist.ts +42 -3
- package/src/release-loop/cloud-elastic.ts +179 -0
- package/src/release-loop/gate-shards.ts +11 -2
- package/src/release-loop/macrophage-safe-cleanup.ts +12 -2
- package/src/release-loop/outbound-guard-world.ts +16 -0
- package/src/release-loop/rehearsal.ts +4 -2
- package/src/release-loop/release-schedule.ts +28 -0
- package/src/repl/index.ts +39 -10
- package/src/resource-ledger/host-readiness.ts +82 -5
- package/src/resource-ledger/resource-ledger.ts +143 -3
- package/src/seat/seat-boot-preamble.ts +428 -0
- package/src/seat-loop/seat-loop.ts +9 -4
- package/src/selector.ts +1 -1
- package/src/self-dev/entrance-registry.ts +1 -2
- package/src/self-dev/shard-run.ts +4 -3
- package/src/self-implement/gate-remote.ts +7 -6
- package/src/self-implement/goal-author.ts +4 -6
- package/src/self-implement/graph-yaml.ts +23 -2
- package/src/session/chat.ts +13 -21
- package/src/session/index.ts +6 -0
- package/src/session-runtime/tier-flip.ts +7 -0
- package/src/setup/provider-options.ts +150 -0
- package/src/shell-runner/terminal-host-facade.ts +1 -1
- package/src/sidetab-core/classic-sidetab-mission-job.ts +308 -0
- package/src/sidetab-core/classic-sidetab-mission-reconcile.ts +212 -0
- package/src/sidetab-core/classic-sidetab-mission-result.ts +20 -0
- package/src/sidetab-core/mission-cli-consumer.ts +2 -0
- package/src/sidetab-core/model.ts +3 -0
- package/src/sidetab-core/workspace-input.ts +135 -0
- package/src/sim-world-device-catalog-history.json +601 -0
- package/src/skills/runner.ts +4 -5
- package/src/skills/skill-catalog-preamble.ts +101 -0
- package/src/skills/tools/acp-session.ts +3 -3
- package/src/skills/tools/agent.ts +34 -12
- package/src/skills/tools/dashboard-state.ts +1 -1
- package/src/skills/tools/dev-harness.ts +1 -1
- package/src/skills/tools/msg-inbox.ts +43 -0
- package/src/skills/tools/schedule-wakeup.ts +8 -2
- package/src/skills/tools/terminal-modal-inject.ts +1 -1
- package/src/skills/tools/terminal-modal.ts +1 -1
- package/src/skills/url-router.ts +19 -2
- package/src/slash/registry.ts +160 -0
- package/src/steward/triage.ts +5 -1
- package/src/supervision/incident-claim.ts +253 -0
- package/src/supervision/silence-watch.ts +221 -0
- package/src/surface/terminal-surface-intent.ts +125 -0
- package/src/telegram-commands.ts +0 -58
- package/src/telegram.ts +0 -39
- package/src/term-slash-runtime.ts +277 -0
- package/src/terminal/coding-agent.ts +1 -0
- package/src/terminal/session-access.ts +31 -0
- package/src/terminal/session-registry.ts +1 -1
- package/src/terminal/tty-required.ts +16 -0
- package/src/tool-hints/gate.ts +1 -0
- package/src/tool-hints/signals.ts +7 -0
- package/src/tool-hints/types.ts +1 -1
- package/src/tool-runtime/dashboard-state-runtime.ts +1 -1
- package/src/tool-runtime/dashboard-state-snapshot.ts +196 -0
- package/src/tool-runtime/index.ts +0 -2
- package/src/tool-runtime/ops-ledger-runtimes.ts +35 -3
- package/src/tool-runtime/types.ts +2 -0
- package/src/tui/boot-timing.ts +35 -0
- package/src/tui/branches/now.ts +50 -9
- package/src/tui/branches/remaining.ts +49 -0
- package/src/tui/branches/sidetab/route.ts +23 -2
- package/src/tui/chat/error-card.ts +10 -0
- package/src/tui/chat/log-view.ts +11 -1
- package/src/tui/chat/status-line.ts +133 -0
- package/src/tui/chat/status-model.ts +16 -0
- package/src/tui/core/agents.ts +33 -5
- package/src/tui/core/entry-render.ts +46 -0
- package/src/tui/core/registry.ts +13 -2
- package/src/tui/core/render.ts +2 -1
- package/src/tui/entry.ts +182 -68
- package/src/tui/input/goal-continue.ts +220 -0
- package/src/tui/input/internal-turn.ts +230 -0
- package/src/tui/input-lag-probe.ts +1 -1
- package/src/tui/persistent-user-memory.ts +11 -4
- package/src/tui/sidetab/attach.ts +28 -5
- package/src/tui/turn-start-segments.ts +222 -0
- package/src/tui-client/fast-repl-child.ts +36 -0
- package/src/tui-client/local-chat-turn.ts +14 -2
- package/src/tui-client/next-dashboard-runtime.ts +3 -3
- package/src/tui-client/next-loop-command.ts +2 -2
- package/src/tui-client/next-wakeup.ts +1 -1
- package/src/tui-client/sidetab-agent-pty.ts +50 -0
- package/src/user-config/read.ts +3 -1
- package/src/user-config/sparse-config.ts +2 -4
- package/src/user-config/write.ts +2 -0
- package/src/user-config.ts +28 -25
- package/src/ux-sim/absorb-v2-runGraph-sim.ts +131 -38
- package/src/ux-sim/architecture-deliverables/run-step.ts +156 -0
- package/src/ux-sim/classic-tui-seat-scenarios.ts +3 -3
- package/src/ux-sim/dashboard-event-loop-stall-monitor-device.ts +1 -1
- package/src/ux-sim/delete-impact-sim.ts +205 -0
- package/src/ux-sim/fake-bin.ts +26 -6
- package/src/ux-sim/fake-cloud-vm.ts +72 -0
- package/src/ux-sim/fake-llm.ts +69 -5
- package/src/ux-sim/fake-member-oidc-world.ts +2 -0
- package/src/ux-sim/fault-pod-codex-503.ts +16 -3
- package/src/ux-sim/fault-tui-400-autoheal.ts +24 -15
- package/src/ux-sim/fixtures/kaist-classic-pty-receipt.json +260 -0
- package/src/ux-sim/fixtures/kcb-ticket-classic-pty-receipt.json +270 -0
- package/src/ux-sim/fixtures/kcb-ticket-requirements-mapping.json +60 -0
- package/src/ux-sim/gcp-architect-expand/architecture-input.ts +45 -0
- package/src/ux-sim/gcp-architect-expand/consumer.ts +18 -0
- package/src/ux-sim/gcp-architect-expand/detect-step.ts +16 -0
- package/src/ux-sim/gcp-architect-expand/local-signals.ts +41 -0
- package/src/ux-sim/gcp-architect-expand/output-contract.ts +100 -0
- package/src/ux-sim/gcp-architect-expand/scene5-fake-provider.ts +191 -0
- package/src/ux-sim/gcp-architect-expand/shared-deliverables.ts +39 -0
- package/src/ux-sim/gcp-architect-expand/tiered-design.ts +211 -0
- package/src/ux-sim/gcp-architect-expand/unimplemented.ts +6 -0
- package/src/ux-sim/gcp-architect-expand/verify-step.ts +8 -0
- package/src/ux-sim/goal-interim-trace.ts +2 -2
- package/src/ux-sim/graph-event-entry-world.ts +28 -20
- package/src/ux-sim/graph-trigger-hook-device.ts +1 -1
- package/src/ux-sim/headless-tui.ts +1 -1
- package/src/ux-sim/kaist-app-qr-sim.ts +53 -0
- package/src/ux-sim/kaist-classic-pwa-browser-replay.ts +568 -0
- package/src/ux-sim/kaist-classic-pwa-replay-world.ts +244 -0
- package/src/ux-sim/kcb-phone-rehearsal.ts +38 -0
- package/src/ux-sim/knowledge-pack-auto-select.ts +144 -0
- package/src/ux-sim/next-tui-seat-scenarios.ts +167 -99
- package/src/ux-sim/onboarding-first-run-device.ts +1 -1
- package/src/ux-sim/outbound-guard-sim.ts +43 -10
- package/src/ux-sim/pty-key-modifiers-device.ts +6 -4
- package/src/ux-sim/release-day-0307-replay.ts +140 -43
- package/src/ux-sim/rla-context-release-status-arrival-event.ts +2 -5
- package/src/ux-sim/scenario-target.ts +143 -0
- package/src/ux-sim/self-edge-byoc-sim.ts +216 -0
- package/src/ux-sim/ta-land-count-dispatcher-sim.ts +5 -5
- package/src/ux-sim/term-slash-device.ts +2 -2
- package/src/ux-sim/tui-400-runtime-contract.ts +8 -0
- package/src/ux-sim/world-regression-suite.ts +2 -0
- package/src/version/packed-revision.json +1 -1
- package/src/voice/intent-router/voice-to-surface-intent.ts +1 -1
- package/src/workflow-runtime/daemon.ts +4 -0
- package/src/workflow-runtime/nodes/bash.ts +6 -1
- package/test/helpers/dashboard-source.ts +110 -0
|
@@ -0,0 +1,1956 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat turn runtime — ACP `session/prompt` by default, SSE `/v1/prompt/stream`
|
|
3
|
+
* when ACP is unavailable, plus local meta-command dispatch.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { cardTextFromToolOutput } from './elanous-card';
|
|
7
|
+
import { parseDeployResult, type DeployResult } from './chat-deploy';
|
|
8
|
+
import { contextSources, type ContextSource } from '../components/chat/context-sources';
|
|
9
|
+
import type {
|
|
10
|
+
AcpConnection,
|
|
11
|
+
AcpFrame,
|
|
12
|
+
DaemonClient,
|
|
13
|
+
PromptUserContentBlock,
|
|
14
|
+
} from './daemon-client';
|
|
15
|
+
import {
|
|
16
|
+
applyFeedbackEnvelope,
|
|
17
|
+
applyHudSegmentEnvelope,
|
|
18
|
+
type HudSegmentPayload,
|
|
19
|
+
} from './feedback-block-accumulator';
|
|
20
|
+
import type { FeedbackEnvelopeWire } from './feedback-envelope';
|
|
21
|
+
import { parseElanousFeedbackEnvelope } from './elanous-feedback-envelope';
|
|
22
|
+
import { forkSession } from './daemon-session';
|
|
23
|
+
import { forkConversation, userTurns } from './chat-fork';
|
|
24
|
+
import { SessionsStoreApi } from './sessions-store-api';
|
|
25
|
+
import { debugLog } from './debug';
|
|
26
|
+
import { fetchBudgetStatus, type BudgetStatusBody } from './budget-status';
|
|
27
|
+
import { remainingLines, statusText, type UsageBody } from './chat-status';
|
|
28
|
+
import { fetchDaemonModelTier, type DaemonHttpConfig } from './model-tier-sync';
|
|
29
|
+
import { isLlmTierProvider, lookupLlmTierSpec } from './model-tier-spec';
|
|
30
|
+
import { handleModelCommand, parseModelCommand } from './chat-model-commands';
|
|
31
|
+
import { handleSessionCommand, parseSessionCommand } from './chat-session-commands';
|
|
32
|
+
import { handleChatPersona, selectedChatPersona } from './chat-persona';
|
|
33
|
+
|
|
34
|
+
function chatPersonaId(sessionId: string): string | undefined {
|
|
35
|
+
return typeof localStorage === 'undefined' ? undefined : selectedChatPersona(sessionId, localStorage);
|
|
36
|
+
}
|
|
37
|
+
import { harnessAskText } from './chat-harness-ask';
|
|
38
|
+
import { submitGraph } from './intake-front-door-api';
|
|
39
|
+
import { runSkillExec } from './skill-exec-client';
|
|
40
|
+
import { isMcpAppHtmlMime } from '../../../../src/tool-runtime/mcp-app-mime';
|
|
41
|
+
import { mcpResultImages, mcpAppResourceUriOf } from '../../../../src/feedback/media';
|
|
42
|
+
|
|
43
|
+
export { mcpResultImages, mcpAppResourceUriOf };
|
|
44
|
+
|
|
45
|
+
// PLAN-chat-hud-multi-surface-port-2026-05-13 §4 M1 — process-wide HUD
|
|
46
|
+
// state lives OUTSIDE the per-turn `ChatBlock[]` because HUD is shared
|
|
47
|
+
// across every chat session/tab in the PWA (multi-tab observers all see
|
|
48
|
+
// the same `↯ variant · ctx 87% · ● 2 agents` strip). Subscribers are
|
|
49
|
+
// fanned out per applied envelope; renderer (M4 `<ChatHud>`) snapshots
|
|
50
|
+
// inside its callback. Keep the store keyed by segment `key` so a flood
|
|
51
|
+
// of updates on one segment doesn't bloat memory.
|
|
52
|
+
const hudSegments: Map<string, HudSegmentPayload> = new Map();
|
|
53
|
+
const hudSubscribers: Set<() => void> = new Set();
|
|
54
|
+
|
|
55
|
+
// useSyncExternalStore requires getSnapshot to be referentially stable
|
|
56
|
+
// across calls when the underlying store hasn't changed — otherwise
|
|
57
|
+
// React detects "store changed" on every render and re-enters, hitting
|
|
58
|
+
// React error #185 (Maximum update depth) which the error boundary
|
|
59
|
+
// surfaces as #418 (hydration mismatch). Cache the sorted array and
|
|
60
|
+
// invalidate inside the mutation path (notifyHudSubscribers).
|
|
61
|
+
let hudSnapshotCache: HudSegmentPayload[] = [];
|
|
62
|
+
let hudSnapshotDirty = false;
|
|
63
|
+
|
|
64
|
+
/** Snapshot priority-sorted HUD segments. Callers MUST treat the array
|
|
65
|
+
* as immutable; identity is stable until the next mutation. */
|
|
66
|
+
export function getHudSegmentsSnapshot(): HudSegmentPayload[] {
|
|
67
|
+
if (hudSnapshotDirty) {
|
|
68
|
+
hudSnapshotCache = Array.from(hudSegments.values()).sort(
|
|
69
|
+
(a, b) => (a.priority ?? 50) - (b.priority ?? 50),
|
|
70
|
+
);
|
|
71
|
+
hudSnapshotDirty = false;
|
|
72
|
+
}
|
|
73
|
+
return hudSnapshotCache;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Subscribe to HUD-state changes. Returns unsubscribe. Callback fires
|
|
77
|
+
* once per applied envelope — duplicates / malformed envelopes silent. */
|
|
78
|
+
export function subscribeHudSegments(callback: () => void): () => void {
|
|
79
|
+
hudSubscribers.add(callback);
|
|
80
|
+
return () => {
|
|
81
|
+
hudSubscribers.delete(callback);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Test-only — reset HUD state + subscribers between cases. Not exported
|
|
86
|
+
* via the index barrel; importing modules grab it directly when needed. */
|
|
87
|
+
export function __resetHudStateForTest(): void {
|
|
88
|
+
hudSegments.clear();
|
|
89
|
+
hudSubscribers.clear();
|
|
90
|
+
hudSnapshotCache = [];
|
|
91
|
+
hudSnapshotDirty = false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function notifyHudSubscribers(): void {
|
|
95
|
+
hudSnapshotDirty = true;
|
|
96
|
+
for (const cb of hudSubscribers) {
|
|
97
|
+
try {
|
|
98
|
+
cb();
|
|
99
|
+
} catch (err) {
|
|
100
|
+
// A buggy subscriber must not poison the wire path. Surface to
|
|
101
|
+
// debug log; subscriber's own error handler should catch.
|
|
102
|
+
debugLog('chat-runtime.hud.subscriber-error', err);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Returns true if the envelope was a HUD segment (and was consumed —
|
|
108
|
+
* caller must NOT then also pass it through applyFeedbackEnvelope).
|
|
109
|
+
* Process-wide: NOT gated by turn lifecycle (multi-tab observer that
|
|
110
|
+
* has `dropCurrentTurn=true` should still receive HUD updates). */
|
|
111
|
+
function maybeDispatchHudEnvelope(env: FeedbackEnvelopeWire): boolean {
|
|
112
|
+
if (env.kind !== 'hud.segment') return false;
|
|
113
|
+
const result = applyHudSegmentEnvelope(hudSegments, env);
|
|
114
|
+
if (result === 'applied') notifyHudSubscribers();
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Public dispatcher for HUD envelopes arriving OUTSIDE the chat-runtime
|
|
119
|
+
* onFeedback path — e.g. ChatLayout's long-lived `/v1/events?topics=
|
|
120
|
+
* hud.segment` SSE subscriber synthesizes envelopes via
|
|
121
|
+
* `consumeHudSegmentSse` (daemon-client.ts M4) and hands them off
|
|
122
|
+
* here. Internally identical to the onFeedback short-circuit so a
|
|
123
|
+
* single store + subscriber set serve both paths. */
|
|
124
|
+
export function dispatchHudSegmentEnvelope(env: FeedbackEnvelopeWire): void {
|
|
125
|
+
maybeDispatchHudEnvelope(env);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type ChatRole = 'user' | 'assistant' | 'system' | 'meta';
|
|
129
|
+
|
|
130
|
+
/** An interrupted turn has no final answer for the minimal chat surface. */
|
|
131
|
+
export function isIncompleteChatStopReason(reason: string | undefined): boolean {
|
|
132
|
+
return reason !== undefined
|
|
133
|
+
&& !['end_turn', 'stop_sequence', 'completed', 'refusal'].includes(reason);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Phase B-2 / B-3 (PWA chat streaming · 2026-05-06) — multimodal
|
|
137
|
+
* block primitives.
|
|
138
|
+
*
|
|
139
|
+
* - `text` (B-1/B-2) — streaming-friendly cumulative text. The
|
|
140
|
+
* accumulator updates one text block in place from each text-delta.
|
|
141
|
+
* - `image` (B-2) — inline media surfaced from a tool_result whose
|
|
142
|
+
* convention matched `{mediaType, dataB64}` (B-2.5 daemon emit).
|
|
143
|
+
* - `tool_use` (B-3) — agent tool-loop status pill. Pushed when the
|
|
144
|
+
* SSE `tool-call` event arrives; mutated in place when the matching
|
|
145
|
+
* `tool-result` event lands so the pill flips running → done/error.
|
|
146
|
+
* Carries `args` for the expand/collapse details panel + `summary`
|
|
147
|
+
* for the collapsed 1-line state. */
|
|
148
|
+
export interface McpAppPayload {
|
|
149
|
+
html: string;
|
|
150
|
+
connectDomains?: string[];
|
|
151
|
+
resourceDomains?: string[];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Accept only an HTML resource that belongs to the already-known MCP App URI.
|
|
156
|
+
* Malformed or unrelated tool content remains text/fallback output instead of
|
|
157
|
+
* becoming executable frame input.
|
|
158
|
+
*/
|
|
159
|
+
/** ⛔⭐⭐ FeedbackEnvelope 이 `agent_thought_chunk` 「위에」 실려 올 때의 «머리 줄».
|
|
160
|
+
*
|
|
161
|
+
* 📏 형식의 canonical 은 `src/acp/elanous-extensions.ts` 의 `formatElanousFeedbackEnvelope` 이다:
|
|
162
|
+
* ```
|
|
163
|
+
* [elanous/feedback/emit] <blockId>
|
|
164
|
+
* <FeedbackEnvelope JSON>
|
|
165
|
+
* <<elanous-feedback-end <blockId>>>
|
|
166
|
+
* ```
|
|
167
|
+
* 이 모듈은 PWA-local `parseElanousFeedbackEnvelope`로 세 줄 전체를 검증한 뒤,
|
|
168
|
+
* 유효한 payload만 기존 블록 누산기로 보낸다. 봉투 모양이지만 깨진 입력은 생각 렌더러에
|
|
169
|
+
* 전달하지 않아 원시 마커가 새지 않는다. */
|
|
170
|
+
const FEEDBACK_ENVELOPE_HEAD = /^\[elanous\/feedback\/[a-zA-Z]+\] /;
|
|
171
|
+
|
|
172
|
+
/** REL9p — a tool answer's ```elanous-card``` blocks become their own text block (rendered as cards).
|
|
173
|
+
* Every place that finishes a tool block calls this, like `mcpResultImages` — the pill never shows output. */
|
|
174
|
+
export function pushToolCards(blocks: ChatBlock[], rawOutput: unknown): boolean {
|
|
175
|
+
const text = cardTextFromToolOutput(rawOutput);
|
|
176
|
+
if (!text || blocks.some((b) => b.kind === 'text' && b.text === text)) return false;
|
|
177
|
+
blocks.push({ kind: 'text', text });
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function pushDeployResult(blocks: ChatBlock[], toolId: string, toolName: string, rawOutput: unknown): boolean {
|
|
182
|
+
const result = parseDeployResult(toolName, rawOutput);
|
|
183
|
+
if (!result) return false;
|
|
184
|
+
const index = blocks.findIndex((block) => block.kind === 'deploy_result' && block.toolId === toolId);
|
|
185
|
+
const block: ChatBlock = { kind: 'deploy_result', toolId, result };
|
|
186
|
+
if (index < 0) blocks.push(block);
|
|
187
|
+
else blocks[index] = block;
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export function parseMcpAppPayload(rawOutput: unknown, screenUrl: string): McpAppPayload | undefined {
|
|
192
|
+
if (!rawOutput || typeof rawOutput !== 'object' || Array.isArray(rawOutput)) return undefined;
|
|
193
|
+
const record = rawOutput as Record<string, unknown>;
|
|
194
|
+
const content = Array.isArray(record.content) ? record.content : [];
|
|
195
|
+
const resourceRecord = content
|
|
196
|
+
.filter((entry): entry is Record<string, unknown> => (
|
|
197
|
+
entry !== null && typeof entry === 'object' && !Array.isArray(entry)
|
|
198
|
+
&& entry.type === 'resource'
|
|
199
|
+
))
|
|
200
|
+
.map((entry) => entry.resource)
|
|
201
|
+
.find((resource): resource is Record<string, unknown> => {
|
|
202
|
+
if (resource === null || typeof resource !== 'object' || Array.isArray(resource)) return false;
|
|
203
|
+
const record = resource as Record<string, unknown>;
|
|
204
|
+
return (
|
|
205
|
+
record.uri === screenUrl
|
|
206
|
+
// ⛔📏 2026-08-21 라이브: 실제 값은 `text/html;profile=mcp-app` 이라 «정확히 일치»는
|
|
207
|
+
// 영영 거짓이었다. 형식 비교는 본질(`type/subtype`)로 한다 — 그 판정은 한 집에 있다.
|
|
208
|
+
&& isMcpAppHtmlMime(record.mimeType)
|
|
209
|
+
&& typeof record.text === 'string'
|
|
210
|
+
);
|
|
211
|
+
});
|
|
212
|
+
if (!resourceRecord) return undefined;
|
|
213
|
+
|
|
214
|
+
const meta = resourceRecord._meta;
|
|
215
|
+
const ui = meta && typeof meta === 'object' && !Array.isArray(meta)
|
|
216
|
+
? (meta as Record<string, unknown>).ui
|
|
217
|
+
: undefined;
|
|
218
|
+
const csp = ui && typeof ui === 'object' && !Array.isArray(ui)
|
|
219
|
+
? (ui as Record<string, unknown>).csp
|
|
220
|
+
: undefined;
|
|
221
|
+
const connectDomains = csp && typeof csp === 'object' && !Array.isArray(csp)
|
|
222
|
+
? (csp as Record<string, unknown>).connectDomains
|
|
223
|
+
: undefined;
|
|
224
|
+
const resourceDomains = csp && typeof csp === 'object' && !Array.isArray(csp)
|
|
225
|
+
? (csp as Record<string, unknown>).resourceDomains
|
|
226
|
+
: undefined;
|
|
227
|
+
const validConnectDomains = Array.isArray(connectDomains)
|
|
228
|
+
? connectDomains.filter((origin): origin is string => typeof origin === 'string')
|
|
229
|
+
: undefined;
|
|
230
|
+
const validResourceDomains = Array.isArray(resourceDomains)
|
|
231
|
+
? resourceDomains.filter((origin): origin is string => typeof origin === 'string')
|
|
232
|
+
: undefined;
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
html: resourceRecord.text as string,
|
|
236
|
+
...(validConnectDomains ? { connectDomains: validConnectDomains } : {}),
|
|
237
|
+
...(validResourceDomains ? { resourceDomains: validResourceDomains } : {}),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type ChatBlock =
|
|
242
|
+
| { kind: 'harness_ask'; acceptanceId: string }
|
|
243
|
+
| { kind: 'deploy_result'; toolId: string; result: DeployResult }
|
|
244
|
+
| { kind: 'text'; text: string }
|
|
245
|
+
| { kind: 'image'; src: string; mediaType: string; alt?: string }
|
|
246
|
+
| {
|
|
247
|
+
kind: 'tool_use';
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
status: 'running' | 'done' | 'error';
|
|
251
|
+
readonly startedAt?: number;
|
|
252
|
+
readonly endedAt?: number;
|
|
253
|
+
args?: Record<string, unknown>;
|
|
254
|
+
summary?: string;
|
|
255
|
+
sources?: ContextSource[];
|
|
256
|
+
}
|
|
257
|
+
| {
|
|
258
|
+
kind: 'mcp_app';
|
|
259
|
+
toolId: string;
|
|
260
|
+
toolName: string;
|
|
261
|
+
screenUrl: string;
|
|
262
|
+
/** ⭐ 이 화면을 만든 툴 호출의 원 결과. 규범상 호스트가 «초기 상태»로 위젯에 밀어야 한다
|
|
263
|
+
* (`ui/notifications/tool-result`). 이 값이 블록에 없으면 밀 것이 없다. */
|
|
264
|
+
toolResult?: unknown;
|
|
265
|
+
html?: string;
|
|
266
|
+
connectDomains?: string[];
|
|
267
|
+
resourceDomains?: string[];
|
|
268
|
+
fallbackText?: string;
|
|
269
|
+
}
|
|
270
|
+
// M3 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) — Feedback
|
|
271
|
+
// Envelope-derived blocks. Merge key is the envelope `blockId`
|
|
272
|
+
// (stable across phases) so start/delta/end mutate one entry rather
|
|
273
|
+
// than appending duplicates.
|
|
274
|
+
| {
|
|
275
|
+
kind: 'agent_thinking';
|
|
276
|
+
blockId: string;
|
|
277
|
+
msg: string;
|
|
278
|
+
/** true when the last envelope was phase='end'. Renderer flips
|
|
279
|
+
* pulse → ✓ checkmark. */
|
|
280
|
+
done: boolean;
|
|
281
|
+
metrics?: { elapsedMs: number; tokenCount: number };
|
|
282
|
+
asciiFallback?: readonly string[];
|
|
283
|
+
}
|
|
284
|
+
| {
|
|
285
|
+
kind: 'agent_status';
|
|
286
|
+
blockId: string;
|
|
287
|
+
agentId: string;
|
|
288
|
+
status: 'running' | 'queued' | 'error' | 'done';
|
|
289
|
+
lastEvent?: string;
|
|
290
|
+
}
|
|
291
|
+
| {
|
|
292
|
+
kind: 'agent_plan';
|
|
293
|
+
blockId: string;
|
|
294
|
+
ref: string;
|
|
295
|
+
steps: Array<{
|
|
296
|
+
text: string;
|
|
297
|
+
status: 'pending' | 'in-progress' | 'done' | 'skipped';
|
|
298
|
+
}>;
|
|
299
|
+
activeIndex?: number;
|
|
300
|
+
}
|
|
301
|
+
// M4 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) — tool.diff
|
|
302
|
+
// and tool.search-hit. Same blockId merge: an Edit/Write tool dispatch
|
|
303
|
+
// pushes one envelope per diff (phase=end), and a Grep/OmniSearch
|
|
304
|
+
// stream phase=delta envelopes with the cumulative hit list. PWA
|
|
305
|
+
// surfaces both as collapsible blocks; M5 wires the actual emit
|
|
306
|
+
// callers on the daemon side.
|
|
307
|
+
| {
|
|
308
|
+
kind: 'tool_diff';
|
|
309
|
+
blockId: string;
|
|
310
|
+
filePath: string;
|
|
311
|
+
language?: string;
|
|
312
|
+
hunks: Array<{
|
|
313
|
+
oldStart: number;
|
|
314
|
+
oldLines: number;
|
|
315
|
+
newStart: number;
|
|
316
|
+
newLines: number;
|
|
317
|
+
lines: Array<{ kind: 'add' | 'del' | 'ctx'; text: string }>;
|
|
318
|
+
}>;
|
|
319
|
+
parentToolCallId?: string;
|
|
320
|
+
}
|
|
321
|
+
| {
|
|
322
|
+
kind: 'tool_search_hits';
|
|
323
|
+
blockId: string;
|
|
324
|
+
query: string;
|
|
325
|
+
hits: Array<{
|
|
326
|
+
filePath: string;
|
|
327
|
+
line: number;
|
|
328
|
+
column?: number;
|
|
329
|
+
snippet: string;
|
|
330
|
+
contextBefore?: string[];
|
|
331
|
+
contextAfter?: string[];
|
|
332
|
+
}>;
|
|
333
|
+
/** Cumulative hit count — may exceed `hits.length` when the
|
|
334
|
+
* server stops streaming raw hits past a cap (truncation). */
|
|
335
|
+
accumCount: number;
|
|
336
|
+
/** Server-side truncation (hit cap reached). */
|
|
337
|
+
truncated?: boolean;
|
|
338
|
+
parentToolCallId?: string;
|
|
339
|
+
}
|
|
340
|
+
// M5 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) — tool
|
|
341
|
+
// runtime progress streams (bash stdout/stderr, HTTP body chunks,
|
|
342
|
+
// large file reads). Lines accumulate across phase=delta envelopes
|
|
343
|
+
// so the user sees the running tail. phase=end flips `done` and
|
|
344
|
+
// records the final exitCode.
|
|
345
|
+
| {
|
|
346
|
+
kind: 'tool_progress';
|
|
347
|
+
blockId: string;
|
|
348
|
+
parentToolCallId?: string;
|
|
349
|
+
stream: 'stdout' | 'stderr' | 'http' | 'generic';
|
|
350
|
+
lines: string[];
|
|
351
|
+
bytesSoFar?: number;
|
|
352
|
+
exitCode?: number;
|
|
353
|
+
done: boolean;
|
|
354
|
+
}
|
|
355
|
+
// M6 PR 1 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) —
|
|
356
|
+
// session-level debug.log mirror block, populated by the
|
|
357
|
+
// `debug.line` envelopes the daemon emits when the PWA opted in via
|
|
358
|
+
// `/chat?debug-tap=on`. One block per session (shared blockId
|
|
359
|
+
// `<sid>:debug:session`); `<DebugTapDrawer>` (M6 PR 2) reads the
|
|
360
|
+
// ring out-of-band so the drawer can live at chat-shell level. Ring
|
|
361
|
+
// cap matches the daemon-side bridge (200 entries · drop oldest).
|
|
362
|
+
| {
|
|
363
|
+
kind: 'debug_session';
|
|
364
|
+
blockId: string;
|
|
365
|
+
lines: Array<{
|
|
366
|
+
seq: number;
|
|
367
|
+
category: string;
|
|
368
|
+
event: string;
|
|
369
|
+
data?: unknown;
|
|
370
|
+
loggedAt: number;
|
|
371
|
+
}>;
|
|
372
|
+
}
|
|
373
|
+
// Opportunistic followup §6.2 #6 (2026-05-13) — `perf.tick`
|
|
374
|
+
// rolling metric stream. One block per session (`<sid>:perf:
|
|
375
|
+
// session`), populated by the daemon's per-turn PerfTicker.
|
|
376
|
+
// Samples cap at 60 (1 minute @ 1Hz) — older samples drop oldest.
|
|
377
|
+
// Renderer `<PerfTickSparkline>` reads the sample list and draws
|
|
378
|
+
// one SVG line per distinct metric name.
|
|
379
|
+
| {
|
|
380
|
+
kind: 'perf_session';
|
|
381
|
+
blockId: string;
|
|
382
|
+
samples: Array<{
|
|
383
|
+
seq: number;
|
|
384
|
+
metric: string;
|
|
385
|
+
value: number;
|
|
386
|
+
unit?: string;
|
|
387
|
+
emittedAt: number;
|
|
388
|
+
}>;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export interface ChatMessage {
|
|
392
|
+
id: string;
|
|
393
|
+
role: ChatRole;
|
|
394
|
+
/** Plain-text rendering — kept as the legacy default for user/meta
|
|
395
|
+
* messages and for assistant messages that contain only text. When
|
|
396
|
+
* `blocks` is present + non-empty, ChatMessageView renders the
|
|
397
|
+
* blocks union and ignores `text`. */
|
|
398
|
+
text: string;
|
|
399
|
+
/** This assistant placeholder is still receiving chunks. */
|
|
400
|
+
streaming?: boolean;
|
|
401
|
+
/** Partial text from a stopped or failed turn must stay folded. */
|
|
402
|
+
incomplete?: boolean;
|
|
403
|
+
/** End of interim prose before the last tool call. */
|
|
404
|
+
finalTextStart?: number;
|
|
405
|
+
/** Multimodal block list (Phase B-2). Absent on legacy messages.
|
|
406
|
+
* Used by `runChatTurnStreaming` to attach image content emitted
|
|
407
|
+
* via the SSE `image-block` event. */
|
|
408
|
+
blocks?: ChatBlock[];
|
|
409
|
+
timestamp: number;
|
|
410
|
+
/** ⭐ 이 메시지가 «어느 터미널과의» 대화인가 (웹터미널 Chat Dock 전용 · 다른 서피스는 안 채운다).
|
|
411
|
+
* ⛔ 없으면 배지를 안 그린다 — 채팅 페이지 등 터미널이 없는 화면의 렌더는 그대로다.
|
|
412
|
+
* 📏 왜 필요한가(대표 2026-08-17): 탭을 바꾸면 부제만 바뀌고 «대화는 그대로 남아»,
|
|
413
|
+
* 18:00:39 의 `btop` 문답이 실제로는 `preview-1` 과의 것인데 화면에는
|
|
414
|
+
* `self_8f9da868` 과 나눈 것처럼 보였다. 대화 자체가 상대를 말해야 한다. */
|
|
415
|
+
terminalId?: string;
|
|
416
|
+
// optional metadata for assistant turns (provider · model · stopReason · tokens · mirror origin)
|
|
417
|
+
meta?: { provider?: string; model?: string; stopReason?: string; mirrored?: 'repl'; systemLevel?: 'note' | 'error' };
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface MetaResult {
|
|
421
|
+
text: string; // rendered as a `meta` message
|
|
422
|
+
newSessionId?: string; // if :fork or :session changes id
|
|
423
|
+
harnessAsk?: { acceptanceId: string };
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface ChatRuntimeContext {
|
|
427
|
+
client: DaemonClient;
|
|
428
|
+
sessionId: string;
|
|
429
|
+
provider: string;
|
|
430
|
+
setSessionId: (id: string) => void;
|
|
431
|
+
/** Daemon HTTP settings for `:budget`. Injected when the caller has them
|
|
432
|
+
* outside this context (tests, or a surface that does not hold DaemonConfig). */
|
|
433
|
+
daemon?: DaemonHttpConfig;
|
|
434
|
+
/** Current screen message buffer. `:history` summarizes this; it does not
|
|
435
|
+
* query the server. */
|
|
436
|
+
messages?: readonly ChatMessage[];
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const HISTORY_DEFAULT_N = 10;
|
|
440
|
+
const HISTORY_PREVIEW_CHARS = 80;
|
|
441
|
+
const EMPTY_HISTORY_TEXT = '아직 대화가 없습니다';
|
|
442
|
+
const BUDGET_UNREAD_TEXT = '예산 상태를 읽지 못했습니다';
|
|
443
|
+
const USAGE_UNREAD_TEXT = '남은 양을 읽지 못했습니다';
|
|
444
|
+
interface PendingWish {
|
|
445
|
+
id: string;
|
|
446
|
+
baseUrl: string;
|
|
447
|
+
sessionId: string;
|
|
448
|
+
text: string;
|
|
449
|
+
ref: string;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const WISH_PENDING_PREFIX = 'elanous:wish:pending:';
|
|
453
|
+
|
|
454
|
+
function pendingWish(id: string): PendingWish | undefined {
|
|
455
|
+
if (!/^[0-9a-f-]{36}$/.test(id)) return undefined;
|
|
456
|
+
const raw = localStorage.getItem(`${WISH_PENDING_PREFIX}${id}`);
|
|
457
|
+
if (!raw) return undefined;
|
|
458
|
+
const value: unknown = JSON.parse(raw);
|
|
459
|
+
if (!value || typeof value !== 'object') return undefined;
|
|
460
|
+
const wish = value as Record<string, unknown>;
|
|
461
|
+
if (wish.id !== id || typeof wish.baseUrl !== 'string' || typeof wish.sessionId !== 'string'
|
|
462
|
+
|| typeof wish.text !== 'string' || typeof wish.ref !== 'string'
|
|
463
|
+
|| !wish.ref.startsWith(`${wish.sessionId}:`) || !wish.ref.endsWith(`:${id}`)) return undefined;
|
|
464
|
+
return { id, baseUrl: wish.baseUrl, sessionId: wish.sessionId, text: wish.text, ref: wish.ref };
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function pendingWishes(baseUrl: string, sessionId: string): PendingWish[] {
|
|
468
|
+
const wishes: PendingWish[] = [];
|
|
469
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
470
|
+
const key = localStorage.key(i);
|
|
471
|
+
if (!key?.startsWith(WISH_PENDING_PREFIX)) continue;
|
|
472
|
+
try {
|
|
473
|
+
const wish = pendingWish(key.slice(WISH_PENDING_PREFIX.length));
|
|
474
|
+
if (wish?.baseUrl === baseUrl && wish.sessionId === sessionId) wishes.push(wish);
|
|
475
|
+
} catch { /* A corrupt entry does not hide other pending wishes. */ }
|
|
476
|
+
}
|
|
477
|
+
return wishes;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
async function fetchChatStatusJson(cfg: DaemonHttpConfig | undefined, path: string): Promise<unknown | null> {
|
|
481
|
+
if (!cfg?.baseUrl) return null;
|
|
482
|
+
try {
|
|
483
|
+
const res = await fetch(`${cfg.baseUrl.replace(/\/$/, '')}${path}`, {
|
|
484
|
+
headers: cfg.token ? { authorization: `Bearer ${cfg.token}` } : {},
|
|
485
|
+
});
|
|
486
|
+
return res.ok ? await res.json() : null;
|
|
487
|
+
} catch {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
async function readUsage(cfg: DaemonHttpConfig | undefined): Promise<UsageBody | undefined> {
|
|
493
|
+
const body = await fetchChatStatusJson(cfg, '/v1/usage');
|
|
494
|
+
if (!body || typeof body !== 'object' || !('ok' in body) || body.ok !== true
|
|
495
|
+
|| !('rows' in body) || !Array.isArray(body.rows)) return undefined;
|
|
496
|
+
return body as UsageBody;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
async function readCurrentModel(cfg: DaemonHttpConfig | undefined, provider: string): Promise<{ provider: string; model?: string }> {
|
|
500
|
+
const [selection, tier] = await Promise.all([
|
|
501
|
+
fetchChatStatusJson(cfg, '/v1/setup/llm-providers'),
|
|
502
|
+
cfg?.baseUrl ? fetchDaemonModelTier(cfg) : null,
|
|
503
|
+
]);
|
|
504
|
+
const active = selection && typeof selection === 'object' && 'activeProvider' in selection
|
|
505
|
+
&& typeof selection.activeProvider === 'string' && selection.activeProvider
|
|
506
|
+
? selection.activeProvider : provider;
|
|
507
|
+
return { provider: active,
|
|
508
|
+
...(selection && isLlmTierProvider(active) && tier?.llm
|
|
509
|
+
? { model: lookupLlmTierSpec(active, tier.llm).model } : {}) };
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export function formatBudgetLine(body: BudgetStatusBody): string {
|
|
513
|
+
const usd = Number.isFinite(body.monthSoFarUsd) ? body.monthSoFarUsd : 0;
|
|
514
|
+
return `budget ${body.monthYYYYMM}: $${usd.toFixed(2)} · 알림 ${body.notifyAtPct}%`;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export function formatHistoryLines(
|
|
518
|
+
messages: readonly ChatMessage[],
|
|
519
|
+
n = HISTORY_DEFAULT_N,
|
|
520
|
+
): string {
|
|
521
|
+
if (messages.length === 0) return EMPTY_HISTORY_TEXT;
|
|
522
|
+
const recent = messages.slice(Math.max(0, messages.length - n));
|
|
523
|
+
return recent
|
|
524
|
+
.map((message) => `${message.role}: ${message.text.slice(0, HISTORY_PREVIEW_CHARS)}`)
|
|
525
|
+
.join('\n');
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export const META_COMMANDS: readonly { name: string; description: string }[] = [
|
|
529
|
+
{ name: 'help', description: '이 도움말 보기' },
|
|
530
|
+
{ name: 'session', description: '현재 대화 ID 보기' },
|
|
531
|
+
{ name: 'remaining', description: '계정별 남은 양과 초기화 시각 보기' },
|
|
532
|
+
{ name: 'status', description: '현재 대화·모델·데몬 판·남은 양 보기' },
|
|
533
|
+
{ name: 'fork', description: '현재 대화를 복사해 새 대화로 분기' },
|
|
534
|
+
{ name: 'rewind', description: 'N개 사용자 턴 이전으로 분기 (/rewind N)' },
|
|
535
|
+
{ name: 'undo', description: '마지막 사용자 턴 이전으로 분기' },
|
|
536
|
+
{ name: 'budget', description: '이번 달 지출과 알림 기준 보기' },
|
|
537
|
+
{ name: 'history', description: '최근 N개 로컬 대화 요약 (기본 10개, 역할: 앞 80자)' },
|
|
538
|
+
{ name: 'clear', description: '로컬 대화 기록 지우기' },
|
|
539
|
+
{ name: 'sessions', description: '최근 대화 목록 보기 (/sessions [N])' },
|
|
540
|
+
{ name: 'resume', description: '대화 이어가기 (/resume <id 앞자리>)' },
|
|
541
|
+
{ name: 'persona', description: '이 대화의 페르소나 보기·고르기·빼기 (/persona [이름|-])' },
|
|
542
|
+
{ name: 'model', description: '모델 티어 보기·바꾸기 (/model <티어|별칭>)' },
|
|
543
|
+
{ name: 'reasoning', description: '추론 단계 보기·설정 안내 (/reasoning <low|medium|high>)' },
|
|
544
|
+
{ name: 'provider', description: '프로바이더 보기·바꾸기 (/provider next|use <이름>)' },
|
|
545
|
+
{ name: 'wish', description: '소원을 카드로 남기기 (:wish <소원 한 줄> · :wish --pending · :wish --retry <작업 ID>)' },
|
|
546
|
+
{ name: 'run-skill', description: '이름을 댄 스킬 하나 바로 실행 (/run-skill <이름> <할 일>)' },
|
|
547
|
+
];
|
|
548
|
+
|
|
549
|
+
const LOCAL_META_NAMES = ['help', 'session', 'fork', 'budget', 'history', 'clear', 'wish'] as const;
|
|
550
|
+
const HELP_TEXT = [
|
|
551
|
+
'메타 명령(:이름 또는 /이름) (Meta commands):',
|
|
552
|
+
...META_COMMANDS.map(({ name, description }) => ` ${(LOCAL_META_NAMES as readonly string[]).includes(name) ? ':' : '/'}${name.padEnd(16)}${description}`),
|
|
553
|
+
].join('\n');
|
|
554
|
+
|
|
555
|
+
// TUI src/chat/index.ts SLASH_COMMANDS names + aliases (not imported into the PWA bundle).
|
|
556
|
+
// Recheck: bun test apps/pwa/src/lib/chat-runtime.meta.test.ts -t 'keeps the local TUI-name snapshot'
|
|
557
|
+
const TUI_SLASH_NAMES = new Set([
|
|
558
|
+
'help', '?', 'resume', 'clear', 'cls', 'status', 'st', 'now', 'wish',
|
|
559
|
+
'remaining', 'setup', 'quit', 'q', 'exit', 'run-skill', 'rs', 'run',
|
|
560
|
+
'ad', 'design', 'design-check', 'decide', 'dec',
|
|
561
|
+
'local', 'll', 'session', 'sess', 'persona', 'fork', 'rewind',
|
|
562
|
+
'resume-turn', 'context', 'ctx', 'paste', 'sync', 's', 'plugin',
|
|
563
|
+
'plugins', 'widget', 'widgets', 'log', 'loops', 'board', 'memory', 'mem', 'export',
|
|
564
|
+
'delta', 'diffs', 'theme', 'debug', 'api-allow', 'api',
|
|
565
|
+
'prompt', 'prompts', 'history', 'hist', 'inputs', 'research', 'rsh',
|
|
566
|
+
'harness', 'plan', 'chat', 'dashboard', 'dash', 'telegram', 'tg',
|
|
567
|
+
'tablet', 'surface', 'term', 'terminal', 'side', 'claude', 'codex', 'gemini',
|
|
568
|
+
'acp', 'conv', 'handoff', 'agent-room', 'showroom', 'sr', 'reply',
|
|
569
|
+
'capture', 'inject', 'relay', 'lane', 'control', 'default', 'qc',
|
|
570
|
+
'directive',
|
|
571
|
+
]);
|
|
572
|
+
const PWA_MODEL_ALIASES: Readonly<Record<string, string>> = {
|
|
573
|
+
m: 'model', r: 'reasoning', think: 'reasoning', p: 'provider',
|
|
574
|
+
rs: 'run-skill', run: 'run-skill',
|
|
575
|
+
};
|
|
576
|
+
const UNSUPPORTED_TUI_SLASH_NAMES = new Set([...TUI_SLASH_NAMES].filter((name) =>
|
|
577
|
+
name !== 'harness' && !Object.hasOwn(PWA_MODEL_ALIASES, name) && !META_COMMANDS.some((command) => command.name === name),
|
|
578
|
+
));
|
|
579
|
+
const LEGACY_META_SLASH_NAMES = LOCAL_META_NAMES.filter((name) => name !== 'wish').map((name) => `/${name}`).join(' ');
|
|
580
|
+
|
|
581
|
+
async function forkFromCommand(
|
|
582
|
+
command: 'fork' | 'rewind' | 'undo',
|
|
583
|
+
args: string[],
|
|
584
|
+
ctx: ChatRuntimeContext,
|
|
585
|
+
): Promise<MetaResult> {
|
|
586
|
+
const turns = userTurns(ctx.messages ?? []);
|
|
587
|
+
const fail = (outcome: string, text: string): MetaResult => {
|
|
588
|
+
debugLog('webterm.chat.fork', { command, outcome, sessionId: ctx.sessionId });
|
|
589
|
+
return { text };
|
|
590
|
+
};
|
|
591
|
+
if (command === 'fork' && args.length > 0) return fail('invalid', '쓰는 법: /fork');
|
|
592
|
+
if (command === 'undo' && args.length > 0) return fail('invalid', '쓰는 법: /undo');
|
|
593
|
+
if (command === 'rewind' && (args.length !== 1 || !/^[1-9]\d*$/.test(args[0]!))) {
|
|
594
|
+
return fail('invalid', '쓰는 법: /rewind N (양의 정수)');
|
|
595
|
+
}
|
|
596
|
+
const count = command === 'undo' ? 1 : command === 'rewind' ? Number(args[0]) : 0;
|
|
597
|
+
if (command !== 'fork' && (!Number.isSafeInteger(count) || count > turns)) {
|
|
598
|
+
return fail('out-of-range', `되돌릴 사용자 턴이 부족합니다 (${turns}개)`);
|
|
599
|
+
}
|
|
600
|
+
const result = await forkConversation(
|
|
601
|
+
new SessionsStoreApi(ctx.client),
|
|
602
|
+
ctx.sessionId,
|
|
603
|
+
command === 'fork' ? {} : { beforeUser: turns - count + 1 },
|
|
604
|
+
);
|
|
605
|
+
if (result.kind === 'error') return fail('error', `대화 분기 실패 — ${result.error}`);
|
|
606
|
+
if (result.kind === 'empty' && command !== 'fork') {
|
|
607
|
+
return fail('empty', '저장된 대화가 없어 되돌릴 수 없습니다');
|
|
608
|
+
}
|
|
609
|
+
const id = result.kind === 'forked' ? result.id : forkSession();
|
|
610
|
+
debugLog('webterm.chat.fork', {
|
|
611
|
+
command, outcome: result.kind === 'empty' ? 'empty' : 'forked',
|
|
612
|
+
sessionId: ctx.sessionId, newSessionId: id,
|
|
613
|
+
...(command === 'fork' ? {} : { beforeUser: turns - count + 1 }),
|
|
614
|
+
});
|
|
615
|
+
return {
|
|
616
|
+
text: command === 'fork' ? `forked → new session ${id}` : `${count}개 사용자 턴 이전으로 분기했습니다 → ${id}`,
|
|
617
|
+
newSessionId: id,
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
async function submitHarnessAsk(text: string, ctx: ChatRuntimeContext): Promise<MetaResult> {
|
|
622
|
+
if (!text) return { text: '무엇을 맡길까요? /harness <한 줄>' };
|
|
623
|
+
try {
|
|
624
|
+
const { acceptanceId } = await submitGraph(ctx.client, text);
|
|
625
|
+
return { text: `하니스 접수 · ${acceptanceId.slice(0, 8)}`, harnessAsk: { acceptanceId } };
|
|
626
|
+
} catch (error) {
|
|
627
|
+
const firstLine = (error instanceof Error ? error.message : String(error)).split(/\r?\n/, 1)[0]!.slice(0, 200);
|
|
628
|
+
return { text: `하니스 접수 실패 — ${firstLine}` };
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export const META_HANDLERS: Record<
|
|
633
|
+
string,
|
|
634
|
+
(args: string[], ctx: ChatRuntimeContext) => Promise<MetaResult>
|
|
635
|
+
> = {
|
|
636
|
+
':help': async () => ({ text: HELP_TEXT }),
|
|
637
|
+
':session': async (_args, ctx) => ({ text: `session = ${ctx.sessionId}` }),
|
|
638
|
+
':remaining': async (_args, ctx) => {
|
|
639
|
+
const usage = await readUsage(ctx.daemon);
|
|
640
|
+
const lines = usage ? remainingLines(usage) : [];
|
|
641
|
+
const ok = usage !== undefined;
|
|
642
|
+
debugLog('webterm.chat.status', { cmd: 'remaining', rows: lines.length, ok });
|
|
643
|
+
return { text: ok ? (lines.length ? lines.join('\n') : '등록된 계정이 없습니다') : USAGE_UNREAD_TEXT };
|
|
644
|
+
},
|
|
645
|
+
':status': async (_args, ctx) => {
|
|
646
|
+
const [health, usage, selected] = await Promise.all([
|
|
647
|
+
fetchChatStatusJson(ctx.daemon, '/v1/health'), readUsage(ctx.daemon), readCurrentModel(ctx.daemon, ctx.provider),
|
|
648
|
+
]);
|
|
649
|
+
const version = health && typeof health === 'object' && 'nexusVersion' in health
|
|
650
|
+
&& typeof health.nexusVersion === 'string' ? health.nexusVersion : undefined;
|
|
651
|
+
const lines = usage ? remainingLines(usage) : [];
|
|
652
|
+
debugLog('webterm.chat.status', { cmd: 'status', rows: lines.length, ok: !!version || usage !== undefined });
|
|
653
|
+
return { text: statusText({ sessionId: ctx.sessionId, ...selected,
|
|
654
|
+
...(version ? { version } : {}), ...(usage ? { usage } : {}) }) };
|
|
655
|
+
},
|
|
656
|
+
':fork': async () => {
|
|
657
|
+
const id = forkSession();
|
|
658
|
+
return { text: `forked → new session ${id}`, newSessionId: id };
|
|
659
|
+
},
|
|
660
|
+
':rewind': async (args, ctx) => forkFromCommand('rewind', args, ctx),
|
|
661
|
+
':undo': async (args, ctx) => forkFromCommand('undo', args, ctx),
|
|
662
|
+
':budget': async (_args, ctx) => {
|
|
663
|
+
const cfg = ctx.daemon;
|
|
664
|
+
if (!cfg?.baseUrl) return { text: BUDGET_UNREAD_TEXT };
|
|
665
|
+
const body = await fetchBudgetStatus(cfg);
|
|
666
|
+
if (!body) return { text: BUDGET_UNREAD_TEXT };
|
|
667
|
+
return { text: formatBudgetLine(body) };
|
|
668
|
+
},
|
|
669
|
+
':history': async (args, ctx) => {
|
|
670
|
+
const requested = Number(args[0]);
|
|
671
|
+
const n = Number.isFinite(requested) && requested > 0 ? Math.floor(requested) : HISTORY_DEFAULT_N;
|
|
672
|
+
return { text: formatHistoryLines(ctx.messages ?? [], n) };
|
|
673
|
+
},
|
|
674
|
+
':clear': async () => ({ text: '__CLEAR__' }), // sentinel; UI clears its buffer
|
|
675
|
+
':sessions': async (args, ctx) => handleSessionCommand(parseSessionCommand('sessions', args), ctx),
|
|
676
|
+
':resume': async (args, ctx) => handleSessionCommand(parseSessionCommand('resume', args), ctx),
|
|
677
|
+
':persona': async (args, ctx) => ({ text: await handleChatPersona(args, ctx.sessionId, ctx.client, localStorage) }),
|
|
678
|
+
':model': async (args, ctx) => ({ text: await handleModelCommand(parseModelCommand('model', args), ctx) }),
|
|
679
|
+
':reasoning': async (args, ctx) => ({ text: await handleModelCommand(parseModelCommand('reasoning', args), ctx) }),
|
|
680
|
+
':provider': async (args, ctx) => ({ text: await handleModelCommand(parseModelCommand('provider', args), ctx) }),
|
|
681
|
+
':wish': async (args, ctx) => {
|
|
682
|
+
const text = args.join(' ').trim();
|
|
683
|
+
if (!text) return { text: ':wish <소원 한 줄>' };
|
|
684
|
+
const cfg = ctx.daemon;
|
|
685
|
+
if (!cfg?.baseUrl) return { text: '소원 카드 저장 실패 — 데몬 연결이 없습니다' };
|
|
686
|
+
const baseUrl = cfg.baseUrl.replace(/\/$/, '');
|
|
687
|
+
let wish: PendingWish;
|
|
688
|
+
try {
|
|
689
|
+
if (text === '--pending') {
|
|
690
|
+
const pending = pendingWishes(baseUrl, ctx.sessionId);
|
|
691
|
+
return { text: pending.length
|
|
692
|
+
? pending.map(({ id, text: pendingText }) => `${id} — ${pendingText}`).join('\n')
|
|
693
|
+
: '재시도할 소원이 없습니다' };
|
|
694
|
+
}
|
|
695
|
+
if (text.startsWith('--retry ')) {
|
|
696
|
+
const id = text.slice('--retry '.length).trim();
|
|
697
|
+
const saved = pendingWish(id);
|
|
698
|
+
if (!saved || saved.baseUrl !== baseUrl || saved.sessionId !== ctx.sessionId) {
|
|
699
|
+
return { text: '소원 카드 저장 실패 — 재시도할 작업을 찾을 수 없습니다' };
|
|
700
|
+
}
|
|
701
|
+
wish = saved;
|
|
702
|
+
} else {
|
|
703
|
+
const id = crypto.randomUUID();
|
|
704
|
+
wish = { id, baseUrl, sessionId: ctx.sessionId, text,
|
|
705
|
+
ref: `${ctx.sessionId}:${Date.now()}:${id}` };
|
|
706
|
+
// Persist before sending: a committed request can lose its response or be interrupted by reload.
|
|
707
|
+
localStorage.setItem(`${WISH_PENDING_PREFIX}${id}`, JSON.stringify(wish));
|
|
708
|
+
}
|
|
709
|
+
} catch (error) {
|
|
710
|
+
return { text: `소원 카드 저장 실패 — 작업 보존 불가: ${error instanceof Error ? error.message : String(error)}` };
|
|
711
|
+
}
|
|
712
|
+
try {
|
|
713
|
+
const res = await fetch(`${baseUrl}/v1/task-cards/wish`, {
|
|
714
|
+
method: 'POST',
|
|
715
|
+
headers: { 'content-type': 'application/json', ...(cfg.token ? { authorization: `Bearer ${cfg.token}` } : {}) },
|
|
716
|
+
body: JSON.stringify({ text: wish.text, ref: wish.ref, sessionId: wish.sessionId }),
|
|
717
|
+
});
|
|
718
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
719
|
+
const card: unknown = await res.json();
|
|
720
|
+
if (!card || typeof card !== 'object' || !('title' in card) || typeof card.title !== 'string') throw new Error('잘못된 응답');
|
|
721
|
+
localStorage.removeItem(`${WISH_PENDING_PREFIX}${wish.id}`);
|
|
722
|
+
return { text: `소원 카드로 남겼습니다 — ${card.title}` };
|
|
723
|
+
} catch (error) {
|
|
724
|
+
return { text: `소원 카드 저장 실패 — ${error instanceof Error ? error.message : String(error)} · 재시도: :wish --retry ${wish.id}` };
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
':run-skill': async (args, ctx) => {
|
|
728
|
+
if (args.length < 2) return { text: '쓰는 법: /run-skill <이름> <할 일>' };
|
|
729
|
+
const skill = args[0]!;
|
|
730
|
+
const task = args.slice(1).join(' ');
|
|
731
|
+
const result = await runSkillExec(ctx.daemon, skill, task);
|
|
732
|
+
debugLog('webterm.chat.run-skill', { skill, kind: result.kind });
|
|
733
|
+
if (result.kind === 'rejected') return { text: `이 스킬은 바로 실행할 수 없습니다 — 대화로 «${skill} 으로 …» 라고 부탁해 보세요` };
|
|
734
|
+
if (result.kind === 'failed') return { text: `스킬 실행을 확인하지 못했습니다(${result.error})` };
|
|
735
|
+
const output = result.output.length > 8000 ? `${result.output.slice(0, 8000)}… (잘림)` : result.output;
|
|
736
|
+
return { text: result.ok ? output : `스킬이 실패했습니다\n${output}` };
|
|
737
|
+
},
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
// The existing command catalog is also the legacy help snapshot; keep its enumeration stable.
|
|
741
|
+
Object.defineProperty(META_HANDLERS, ':harness', {
|
|
742
|
+
value: async (args: string[], ctx: ChatRuntimeContext) => submitHarnessAsk(args.join(' '), ctx),
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
export function isMetaCommand(line: string): boolean {
|
|
746
|
+
const trimmed = line.trimStart();
|
|
747
|
+
if (trimmed.startsWith(':')) return true;
|
|
748
|
+
if (!trimmed.startsWith('/') || trimmed.length < 2 || /\s/.test(trimmed[1]!)) return false;
|
|
749
|
+
const [entered] = trimmed.split(/\s+/);
|
|
750
|
+
return !entered.slice(1).includes('/');
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export async function dispatchMeta(
|
|
754
|
+
line: string,
|
|
755
|
+
ctx: ChatRuntimeContext,
|
|
756
|
+
): Promise<MetaResult | null> {
|
|
757
|
+
const trimmed = line.trim();
|
|
758
|
+
const harnessText = harnessAskText(line);
|
|
759
|
+
if (harnessText !== null && !trimmed.startsWith('/')) return submitHarnessAsk(harnessText, ctx);
|
|
760
|
+
if (!trimmed.startsWith(':') && !trimmed.startsWith('/')) return null;
|
|
761
|
+
const [entered, ...args] = trimmed.split(/\s+/);
|
|
762
|
+
if (entered.startsWith('/') && !isMetaCommand(line)) return null;
|
|
763
|
+
if (entered === '/harness' && harnessText === null) return { text: '무엇을 맡길까요? /harness <한 줄>' };
|
|
764
|
+
const slash = entered.startsWith('/');
|
|
765
|
+
const cmd = slash ? `:${entered.slice(1)}` : entered;
|
|
766
|
+
const alias = slash && Object.hasOwn(PWA_MODEL_ALIASES, entered.slice(1))
|
|
767
|
+
? PWA_MODEL_ALIASES[entered.slice(1)] : entered.slice(1);
|
|
768
|
+
const key = `:${alias}`;
|
|
769
|
+
// Keep legacy unknown-colon behavior for unrecognized provider subcommands;
|
|
770
|
+
// slash commands use the new parser's available-values response.
|
|
771
|
+
const unknownColonProviderAction = !slash && key === ':provider'
|
|
772
|
+
&& args.length > 0 && args[0] !== 'next' && args[0] !== 'use';
|
|
773
|
+
const handler = slash && key === ':fork'
|
|
774
|
+
? (forkArgs: string[], forkCtx: ChatRuntimeContext) => forkFromCommand('fork', forkArgs, forkCtx)
|
|
775
|
+
: !unknownColonProviderAction && Object.hasOwn(META_HANDLERS, key)
|
|
776
|
+
? META_HANDLERS[key] : undefined;
|
|
777
|
+
if (!handler) {
|
|
778
|
+
if (slash) {
|
|
779
|
+
const supportedInTui = UNSUPPORTED_TUI_SLASH_NAMES.has(entered.slice(1));
|
|
780
|
+
debugLog('webterm.chat.meta-command', { cmd, outcome: supportedInTui ? 'unsupported-tui' : 'unknown' });
|
|
781
|
+
return { text: supportedInTui
|
|
782
|
+
? `${entered} 은 PWA 채팅에서 아직 안 됩니다 — 지금 되는 명령: ${LEGACY_META_SLASH_NAMES}`
|
|
783
|
+
: `모르는 명령입니다: ${entered} — /help 로 목록 보기` };
|
|
784
|
+
}
|
|
785
|
+
debugLog('webterm.chat.meta-command', { cmd, outcome: 'unknown' });
|
|
786
|
+
return { text: `unknown meta command: ${entered}` };
|
|
787
|
+
}
|
|
788
|
+
debugLog('webterm.chat.meta-command', { cmd, outcome: 'ok' });
|
|
789
|
+
return handler(args, ctx);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export interface RunTurnResult {
|
|
793
|
+
message: ChatMessage;
|
|
794
|
+
newSessionId?: string;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/** Phase B-1 / B-2 / B-3 (PWA chat streaming · 2026-05-06) — SSE fallback
|
|
798
|
+
* via `/v1/prompt/stream`; forwards events to caller hooks and returns
|
|
799
|
+
* the final `RunTurnResult`.
|
|
800
|
+
*
|
|
801
|
+
* Phase B-3 — also collects `tool-call` / `tool-result` events.
|
|
802
|
+
* `tool-call` pushes a tool_use block with status:'running'; the
|
|
803
|
+
* matching `tool-result` (same id) flips it to done/error + attaches
|
|
804
|
+
* the summary line. ChatLayout shows these as pills so the user can
|
|
805
|
+
* see the agent's tool loop in real time. `handlers.signal` is
|
|
806
|
+
* forwarded to fetch — on abort the daemon's SSE handler detects the
|
|
807
|
+
* client disconnect and aborts the per-turn controller (server-side).
|
|
808
|
+
*/
|
|
809
|
+
export interface RunChatTurnStreamingHandlers {
|
|
810
|
+
/** Fires each text-delta event with the cumulative assistant text.
|
|
811
|
+
* ChatLayout uses this to update a placeholder assistant message
|
|
812
|
+
* in place so the user sees tokens stream. */
|
|
813
|
+
onPartial?: (full: string) => void;
|
|
814
|
+
/** Phase B-2/B-3 — fires after every block-list mutation (text
|
|
815
|
+
* growth · image append · tool_use push or status flip). Caller
|
|
816
|
+
* should re-render the placeholder with the supplied snapshot.
|
|
817
|
+
* The list is freshly cloned on each call so consumers can store
|
|
818
|
+
* the reference directly. */
|
|
819
|
+
onPartialBlocks?: (blocks: ChatBlock[]) => void;
|
|
820
|
+
/** Receives the daemon's terminal SSE error payload before the
|
|
821
|
+
* streaming promise rejects with its message. */
|
|
822
|
+
onError?: (info: { error: string; message?: string; holder?: string }) => void;
|
|
823
|
+
/** Optional fetch-level abort signal — forwarded to `promptStream`.
|
|
824
|
+
* When fired (Stop button / Esc / navigation) the daemon SSE
|
|
825
|
+
* stream cancel callback aborts the in-flight LLM turn server-side. */
|
|
826
|
+
signal?: AbortSignal;
|
|
827
|
+
/** P-3 §6.9 (2026-05-07) — multi-part user content. When present and
|
|
828
|
+
* non-empty, forwarded to the daemon as `userContent` so image /
|
|
829
|
+
* resource blocks reach the LLM intact. Composer Q1=B convention:
|
|
830
|
+
* text first, image blocks after. `userText` still travels in the
|
|
831
|
+
* request body so the daemon's legacy `submit.text` label stays
|
|
832
|
+
* populated. */
|
|
833
|
+
userContent?: PromptUserContentBlock[];
|
|
834
|
+
/** M6 PR 2 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) —
|
|
835
|
+
* opt-in debug-tap. Propagates to `promptStream` so the request
|
|
836
|
+
* URL gains `?debug-tap=on` and daemon's debug-bridge activates. */
|
|
837
|
+
debugTap?: boolean;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
export async function runChatTurnStreaming(
|
|
841
|
+
userText: string,
|
|
842
|
+
ctx: ChatRuntimeContext,
|
|
843
|
+
handlers: RunChatTurnStreamingHandlers = {},
|
|
844
|
+
): Promise<RunTurnResult> {
|
|
845
|
+
debugLog('webterm.chat.runturn.stream.start', {
|
|
846
|
+
sessionId: ctx.sessionId,
|
|
847
|
+
provider: ctx.provider,
|
|
848
|
+
len: userText.length,
|
|
849
|
+
contentBlocks: handlers.userContent?.length ?? 0,
|
|
850
|
+
});
|
|
851
|
+
// Phase B-2/B-3 — accumulate blocks alongside the running text.
|
|
852
|
+
// Text block lives at index 0 (created lazily on first delta);
|
|
853
|
+
// images and tool_use pills append in arrival order. tool_use
|
|
854
|
+
// blocks are mutated in place when the matching `tool-result`
|
|
855
|
+
// event lands (status flip from running → done/error). The final
|
|
856
|
+
// ChatMessage exposes `.blocks` whenever at least one non-text
|
|
857
|
+
// block (image OR tool_use) arrived — otherwise legacy `.text`
|
|
858
|
+
// keeps existing renderers untouched.
|
|
859
|
+
const blocks: ChatBlock[] = [];
|
|
860
|
+
let textIdx = -1;
|
|
861
|
+
let imageCount = 0;
|
|
862
|
+
let toolCount = 0;
|
|
863
|
+
let mcpAppCount = 0;
|
|
864
|
+
let feedbackCount = 0;
|
|
865
|
+
const snapshot = (): ChatBlock[] => blocks.map((b) => ({ ...b }));
|
|
866
|
+
/** ⛔⭐⭐⭐ **끝 관측을 «한 자리»에서만 낸다 — 성공이든 실패든.**
|
|
867
|
+
*
|
|
868
|
+
* 📏 2026-08-22 실측(19차 `[F]` · 라이브): 데몬을 재시작한 뒤 탭의 WebSocket 이 죽어 있었고,
|
|
869
|
+
* 턴을 보내니 화면엔 `error: socket closed: 1006` 이 떴는데 ***로그엔 `…stream.start` 만 남고
|
|
870
|
+
* 끝이 «한 줄도» 없었다.*** ⇒ `elanous logs` 로는 「그 턴이 어떻게 됐나」를 물을 자리가 없다.
|
|
871
|
+
* 🔑 ***시작만 내고 실패한 끝을 안 내면, 관측에는 「영원히 도는 턴」으로 남는다.***
|
|
872
|
+
* ⛔ 그래서 실패 갈래에도 같은 이벤트를 낸다 — 이름을 갈면 조회가 갈린다. */
|
|
873
|
+
const emitEnd = (outcome: {
|
|
874
|
+
stopReason: string | undefined;
|
|
875
|
+
sessionId?: string | undefined;
|
|
876
|
+
error?: string;
|
|
877
|
+
}): void => {
|
|
878
|
+
debugLog('webterm.chat.runturn.stream.end', {
|
|
879
|
+
stopReason: outcome.stopReason,
|
|
880
|
+
sessionId: outcome.sessionId,
|
|
881
|
+
// ⭐ 실패했을 때만 «이유»를 싣는다 — 성공 payload 에 `error: undefined` 를 넣지 않는다.
|
|
882
|
+
...(outcome.error !== undefined ? { error: outcome.error } : {}),
|
|
883
|
+
images: imageCount,
|
|
884
|
+
tools: toolCount,
|
|
885
|
+
// ⛔📏 17차 `[F]`: 이 줄이 «없었다» — 이 경로는 `mcpAppCount` 를 «세면서» 안 내보냈다.
|
|
886
|
+
// ⇒ 대표 위젯 축에서 가장 알고 싶은 값이 세 경로 중 이 경로에서만 보이지 않았다.
|
|
887
|
+
mcpApps: mcpAppCount,
|
|
888
|
+
feedback: feedbackCount,
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
const personaId = chatPersonaId(ctx.sessionId);
|
|
892
|
+
const res = await ctx.client.promptStream(
|
|
893
|
+
{
|
|
894
|
+
sessionId: ctx.sessionId || undefined,
|
|
895
|
+
userText,
|
|
896
|
+
...(handlers.userContent && handlers.userContent.length > 0
|
|
897
|
+
? { userContent: handlers.userContent }
|
|
898
|
+
: {}),
|
|
899
|
+
provider: ctx.provider || undefined,
|
|
900
|
+
...(personaId ? { personaId } : {}),
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
onError: handlers.onError,
|
|
904
|
+
onTextDelta: ({ full }) => {
|
|
905
|
+
if (textIdx === -1) {
|
|
906
|
+
textIdx = blocks.length;
|
|
907
|
+
blocks.push({ kind: 'text', text: full });
|
|
908
|
+
} else {
|
|
909
|
+
blocks[textIdx] = { kind: 'text', text: full };
|
|
910
|
+
}
|
|
911
|
+
handlers.onPartial?.(full);
|
|
912
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
913
|
+
},
|
|
914
|
+
onImageBlock: ({ src, mediaType, alt }) => {
|
|
915
|
+
imageCount += 1;
|
|
916
|
+
blocks.push(
|
|
917
|
+
alt !== undefined
|
|
918
|
+
? { kind: 'image', src, mediaType, alt }
|
|
919
|
+
: { kind: 'image', src, mediaType },
|
|
920
|
+
);
|
|
921
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
922
|
+
},
|
|
923
|
+
// M3 (PLAN-rich-dev-feedback-multi-surface · 2026-05-13) —
|
|
924
|
+
// FeedbackEnvelope → block accumulator. Same merge semantics as
|
|
925
|
+
// tool_use (blockId is stable across phases) so ThinkingPill /
|
|
926
|
+
// StatusChip / PlanBlock pulse + finalize from one identity.
|
|
927
|
+
onFeedback: (env) => {
|
|
928
|
+
// HUD segments are process-wide — route them to the standalone
|
|
929
|
+
// hudSegments map instead of the turn-scoped blocks list.
|
|
930
|
+
if (maybeDispatchHudEnvelope(env)) return;
|
|
931
|
+
const result = applyFeedbackEnvelope(blocks, env);
|
|
932
|
+
if (result === 'applied') {
|
|
933
|
+
feedbackCount += 1;
|
|
934
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
onToolCall: ({ id, name, args }) => {
|
|
938
|
+
toolCount += 1;
|
|
939
|
+
blocks.push({
|
|
940
|
+
kind: 'tool_use',
|
|
941
|
+
id,
|
|
942
|
+
name,
|
|
943
|
+
status: 'running',
|
|
944
|
+
startedAt: Date.now(),
|
|
945
|
+
args,
|
|
946
|
+
});
|
|
947
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
948
|
+
},
|
|
949
|
+
onToolResult: ({ id, name, ok, summary, rawOutput, resourceUri }) => {
|
|
950
|
+
// Find the matching running pill. If no match (rare —
|
|
951
|
+
// server fired result before call, or pill list mutated),
|
|
952
|
+
// synthesize a fresh done pill so the user still sees the
|
|
953
|
+
// tool happened.
|
|
954
|
+
const idx = blocks.findIndex(
|
|
955
|
+
(b) => b.kind === 'tool_use' && b.id === id,
|
|
956
|
+
);
|
|
957
|
+
const status: 'done' | 'error' = ok ? 'done' : 'error';
|
|
958
|
+
const sources = name === 'context_now' ? contextSources(rawOutput, Date.now()) : null;
|
|
959
|
+
if (idx === -1) {
|
|
960
|
+
// Synthesized pill counts toward the non-text gate so the
|
|
961
|
+
// finalized ChatMessage still attaches `.blocks`.
|
|
962
|
+
toolCount += 1;
|
|
963
|
+
blocks.push({
|
|
964
|
+
kind: 'tool_use',
|
|
965
|
+
id,
|
|
966
|
+
name,
|
|
967
|
+
status,
|
|
968
|
+
startedAt: Date.now(),
|
|
969
|
+
endedAt: Date.now(),
|
|
970
|
+
...(summary !== undefined ? { summary } : {}),
|
|
971
|
+
...(sources !== null ? { sources } : {}),
|
|
972
|
+
});
|
|
973
|
+
} else {
|
|
974
|
+
const prev = blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>;
|
|
975
|
+
const updated = {
|
|
976
|
+
...prev,
|
|
977
|
+
status,
|
|
978
|
+
endedAt: Date.now(),
|
|
979
|
+
...(summary !== undefined ? { summary } : {}),
|
|
980
|
+
...(sources !== null ? { sources } : {}),
|
|
981
|
+
};
|
|
982
|
+
if (sources === null) delete updated.sources;
|
|
983
|
+
blocks[idx] = updated;
|
|
984
|
+
}
|
|
985
|
+
pushToolCards(blocks, rawOutput);
|
|
986
|
+
pushDeployResult(blocks, id, name, rawOutput);
|
|
987
|
+
if (typeof resourceUri === 'string' && resourceUri.trim().length > 0) {
|
|
988
|
+
mcpAppCount += 1;
|
|
989
|
+
const payload = parseMcpAppPayload(rawOutput, resourceUri);
|
|
990
|
+
blocks.push({
|
|
991
|
+
kind: 'mcp_app',
|
|
992
|
+
toolId: id,
|
|
993
|
+
toolName: name,
|
|
994
|
+
screenUrl: resourceUri,
|
|
995
|
+
...(rawOutput !== undefined ? { toolResult: rawOutput } : {}),
|
|
996
|
+
...(payload ? payload : {}),
|
|
997
|
+
...(summary !== undefined ? { fallbackText: summary } : {}),
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1001
|
+
},
|
|
1002
|
+
...(handlers.signal ? { signal: handlers.signal } : {}),
|
|
1003
|
+
...(handlers.debugTap === true ? { debugTap: true } : {}),
|
|
1004
|
+
},
|
|
1005
|
+
// ⛔⭐ `.catch` 로 잡는다 — 본문 110줄을 `try {}` 로 감싸 «들여쓰기만» 바꾸는 diff 를 피한다.
|
|
1006
|
+
// ⚠️ 되던지므로(`throw`) 호출자 계약은 불변이다 — 관측 한 줄만 «더» 나갈 뿐이다.
|
|
1007
|
+
).catch((err: unknown) => {
|
|
1008
|
+
emitEnd({
|
|
1009
|
+
stopReason: handlers.signal?.aborted === true ? 'aborted' : 'error',
|
|
1010
|
+
error: err instanceof Error ? err.message : String(err),
|
|
1011
|
+
});
|
|
1012
|
+
throw err;
|
|
1013
|
+
});
|
|
1014
|
+
emitEnd({ stopReason: res.stopReason, sessionId: res.sessionId });
|
|
1015
|
+
// Reconcile: ensure the final text block matches `res.text` (the
|
|
1016
|
+
// server's authoritative copy) so a missed-tail delta doesn't
|
|
1017
|
+
// truncate the bubble. If the daemon never emitted text-delta
|
|
1018
|
+
// (rare — text-only turn aborted before tokens) we still surface
|
|
1019
|
+
// the final text via legacy `.text`.
|
|
1020
|
+
if (textIdx !== -1 && res.text) {
|
|
1021
|
+
blocks[textIdx] = { kind: 'text', text: res.text };
|
|
1022
|
+
}
|
|
1023
|
+
const hasNonTextBlock = imageCount > 0 || toolCount > 0 || mcpAppCount > 0 || feedbackCount > 0;
|
|
1024
|
+
const message: ChatMessage = {
|
|
1025
|
+
id: `m-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
1026
|
+
role: 'assistant',
|
|
1027
|
+
text: res.text ?? '',
|
|
1028
|
+
...(isIncompleteChatStopReason(res.stopReason) ? { incomplete: true } : {}),
|
|
1029
|
+
timestamp: Date.now(),
|
|
1030
|
+
meta: { provider: ctx.provider, stopReason: res.stopReason },
|
|
1031
|
+
...(hasNonTextBlock ? { blocks: snapshot() } : {}),
|
|
1032
|
+
};
|
|
1033
|
+
return {
|
|
1034
|
+
message,
|
|
1035
|
+
newSessionId: res.sessionId !== ctx.sessionId ? res.sessionId : undefined,
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
export function newUserMessage(text: string, terminalId?: string): ChatMessage {
|
|
1040
|
+
return {
|
|
1041
|
+
id: `u-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
1042
|
+
role: 'user',
|
|
1043
|
+
text,
|
|
1044
|
+
timestamp: Date.now(),
|
|
1045
|
+
...(terminalId ? { terminalId } : {}),
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
export function newMetaMessage(text: string, terminalId?: string): ChatMessage {
|
|
1050
|
+
return {
|
|
1051
|
+
id: `meta-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
1052
|
+
role: 'meta',
|
|
1053
|
+
text,
|
|
1054
|
+
timestamp: Date.now(),
|
|
1055
|
+
...(terminalId ? { terminalId } : {}),
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/** Phase B-4 follow-up (PWA chat streaming · 2026-05-06) — observer
|
|
1060
|
+
* callbacks for `runChatTurnObserver`. Mirrors the placeholder
|
|
1061
|
+
* semantics ChatLayout uses for its own POST turns: a `turn-begin`
|
|
1062
|
+
* asks the host to push an empty assistant placeholder; subsequent
|
|
1063
|
+
* events grow the bubble; `turn-end` finalizes (replaces with the
|
|
1064
|
+
* authoritative ChatMessage). The host returns a placeholder id from
|
|
1065
|
+
* `onPlaceholder` so the runtime can route delta updates back to
|
|
1066
|
+
* the same bubble.
|
|
1067
|
+
*
|
|
1068
|
+
* `isLocalTurnInFlight()` is the dedupe gate — when ChatLayout has
|
|
1069
|
+
* its own POST mid-stream for this session, the observer events
|
|
1070
|
+
* duplicate the same wire (the bus fans out POST events too). The
|
|
1071
|
+
* host returns `true` and the runtime drops the event so the local
|
|
1072
|
+
* POST handler stays the sole owner of that turn's bubble.
|
|
1073
|
+
*/
|
|
1074
|
+
export interface ChatObserverHandlers {
|
|
1075
|
+
/** Called on `turn-begin`. Host inserts a fresh assistant
|
|
1076
|
+
* placeholder ChatMessage and returns its id; the runtime stores
|
|
1077
|
+
* the id and routes subsequent deltas back via the other hooks.
|
|
1078
|
+
* Return `null` to skip the turn entirely (e.g., the runtime's
|
|
1079
|
+
* built-in dedupe check is enough but the host has its own veto). */
|
|
1080
|
+
onPlaceholder: (info: { sessionId: string }) => string | null;
|
|
1081
|
+
/** Called on each `text-delta` / `image-block` / `tool-call` /
|
|
1082
|
+
* `tool-result` after the placeholder is allocated. `blocks` is
|
|
1083
|
+
* the full snapshot the host should render. */
|
|
1084
|
+
onPartialBlocks: (placeholderId: string, blocks: ChatBlock[]) => void;
|
|
1085
|
+
/** Called on `turn-end`. `finalMessage` is the authoritative bubble
|
|
1086
|
+
* the host should swap into the placeholder slot. */
|
|
1087
|
+
onFinalize: (placeholderId: string, finalMessage: ChatMessage) => void;
|
|
1088
|
+
/** Called on terminal `error` event for the current remote turn.
|
|
1089
|
+
* Host typically tags the placeholder with stopReason='error' or
|
|
1090
|
+
* drops it. */
|
|
1091
|
+
onError?: (placeholderId: string, info: { error: string; message?: string }) => void;
|
|
1092
|
+
/** A new turn began before this placeholder received turn-end. */
|
|
1093
|
+
onInterrupted?: (placeholderId: string) => void;
|
|
1094
|
+
/** Dedupe gate — when the host has a local POST in flight for this
|
|
1095
|
+
* session, return `true` and the observer drops the duplicate
|
|
1096
|
+
* events. Default `false` (no dedupe) lets every event through. */
|
|
1097
|
+
isLocalTurnInFlight?: () => boolean;
|
|
1098
|
+
/** Provider tag for the synthesized placeholder ChatMessage.meta. */
|
|
1099
|
+
provider?: string;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/** Phase B-4 follow-up — long-lived observer for chat events on the
|
|
1103
|
+
* current session. Translates the SSE wire (turn-begin / text-delta
|
|
1104
|
+
* / image-block / tool-call / tool-result / turn-end) into the
|
|
1105
|
+
* same placeholder + block lifecycle that ChatLayout uses for its
|
|
1106
|
+
* local POST turns. Returns a disposer that ends the subscription.
|
|
1107
|
+
*
|
|
1108
|
+
* A "remote turn" is the span between turn-begin and turn-end. The
|
|
1109
|
+
* runtime owns one in-flight remote turn at a time per
|
|
1110
|
+
* subscription; concurrent turns for the same session are rare in
|
|
1111
|
+
* practice (LLM session is serial) and a second turn-begin
|
|
1112
|
+
* finalizes the prior placeholder with whatever blocks accumulated.
|
|
1113
|
+
*/
|
|
1114
|
+
export function runChatTurnObserver(
|
|
1115
|
+
client: DaemonClient,
|
|
1116
|
+
sessionId: string,
|
|
1117
|
+
handlers: ChatObserverHandlers,
|
|
1118
|
+
): () => void {
|
|
1119
|
+
// Per-remote-turn state. Reset on each turn-begin.
|
|
1120
|
+
let placeholderId: string | null = null;
|
|
1121
|
+
const blocks: ChatBlock[] = [];
|
|
1122
|
+
let textIdx = -1;
|
|
1123
|
+
let finalTextStart = 0;
|
|
1124
|
+
let imageCount = 0;
|
|
1125
|
+
let toolCount = 0;
|
|
1126
|
+
let mcpAppCount = 0;
|
|
1127
|
+
let feedbackCount = 0;
|
|
1128
|
+
let dropCurrentTurn = false;
|
|
1129
|
+
|
|
1130
|
+
const resetTurn = (): void => {
|
|
1131
|
+
placeholderId = null;
|
|
1132
|
+
blocks.length = 0;
|
|
1133
|
+
textIdx = -1;
|
|
1134
|
+
finalTextStart = 0;
|
|
1135
|
+
imageCount = 0;
|
|
1136
|
+
toolCount = 0;
|
|
1137
|
+
mcpAppCount = 0;
|
|
1138
|
+
feedbackCount = 0;
|
|
1139
|
+
dropCurrentTurn = false;
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
const snapshot = (): ChatBlock[] => blocks.map((b) => ({ ...b }));
|
|
1143
|
+
|
|
1144
|
+
return client.subscribeChatEvents(sessionId, {
|
|
1145
|
+
onTurnBegin: (info) => {
|
|
1146
|
+
// If a previous remote turn never received turn-end (rare —
|
|
1147
|
+
// disconnect mid-stream), wipe its in-flight state before
|
|
1148
|
+
// starting the new turn so blocks don't carry over.
|
|
1149
|
+
if (placeholderId !== null && !dropCurrentTurn) handlers.onInterrupted?.(placeholderId);
|
|
1150
|
+
resetTurn();
|
|
1151
|
+
// Dedupe — local POST owns this turn's bubble.
|
|
1152
|
+
if (handlers.isLocalTurnInFlight?.()) {
|
|
1153
|
+
dropCurrentTurn = true;
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1156
|
+
const id = handlers.onPlaceholder({ sessionId: info.sessionId });
|
|
1157
|
+
if (id === null) {
|
|
1158
|
+
dropCurrentTurn = true;
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
placeholderId = id;
|
|
1162
|
+
},
|
|
1163
|
+
onTextDelta: ({ full }) => {
|
|
1164
|
+
if (dropCurrentTurn || placeholderId === null) return;
|
|
1165
|
+
if (textIdx === -1) {
|
|
1166
|
+
textIdx = blocks.length;
|
|
1167
|
+
blocks.push({ kind: 'text', text: full });
|
|
1168
|
+
} else {
|
|
1169
|
+
blocks[textIdx] = { kind: 'text', text: full };
|
|
1170
|
+
}
|
|
1171
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1172
|
+
},
|
|
1173
|
+
onImageBlock: ({ src, mediaType, alt }) => {
|
|
1174
|
+
if (dropCurrentTurn || placeholderId === null) return;
|
|
1175
|
+
imageCount += 1;
|
|
1176
|
+
blocks.push(
|
|
1177
|
+
alt !== undefined
|
|
1178
|
+
? { kind: 'image', src, mediaType, alt }
|
|
1179
|
+
: { kind: 'image', src, mediaType },
|
|
1180
|
+
);
|
|
1181
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1182
|
+
},
|
|
1183
|
+
// M3 — same accumulator as the self-turn path so multi-tab
|
|
1184
|
+
// observers see the identical block lifecycle for thinking /
|
|
1185
|
+
// status / plan envelopes.
|
|
1186
|
+
onFeedback: (env) => {
|
|
1187
|
+
// HUD segments are process-wide — bypass the per-turn drop guard
|
|
1188
|
+
// so multi-tab observers stay in sync even when a turn aborted.
|
|
1189
|
+
if (maybeDispatchHudEnvelope(env)) return;
|
|
1190
|
+
if (dropCurrentTurn || placeholderId === null) return;
|
|
1191
|
+
const result = applyFeedbackEnvelope(blocks, env);
|
|
1192
|
+
if (result === 'applied') {
|
|
1193
|
+
feedbackCount += 1;
|
|
1194
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
onToolCall: ({ id, name, args }) => {
|
|
1198
|
+
if (dropCurrentTurn || placeholderId === null) return;
|
|
1199
|
+
finalTextStart = textIdx === -1 ? 0 : (blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>).text.length;
|
|
1200
|
+
toolCount += 1;
|
|
1201
|
+
blocks.push({ kind: 'tool_use', id, name, status: 'running', startedAt: Date.now(), args });
|
|
1202
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1203
|
+
},
|
|
1204
|
+
onToolResult: ({ id, name, ok, summary, rawOutput, resourceUri }) => {
|
|
1205
|
+
if (dropCurrentTurn || placeholderId === null) return;
|
|
1206
|
+
const idx = blocks.findIndex(
|
|
1207
|
+
(b) => b.kind === 'tool_use' && b.id === id,
|
|
1208
|
+
);
|
|
1209
|
+
const status: 'done' | 'error' = ok ? 'done' : 'error';
|
|
1210
|
+
const sources = name === 'context_now' ? contextSources(rawOutput, Date.now()) : null;
|
|
1211
|
+
if (idx === -1) {
|
|
1212
|
+
finalTextStart = textIdx === -1 ? 0 : (blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>).text.length;
|
|
1213
|
+
toolCount += 1;
|
|
1214
|
+
blocks.push({
|
|
1215
|
+
kind: 'tool_use',
|
|
1216
|
+
id,
|
|
1217
|
+
name,
|
|
1218
|
+
status,
|
|
1219
|
+
startedAt: Date.now(),
|
|
1220
|
+
endedAt: Date.now(),
|
|
1221
|
+
...(summary !== undefined ? { summary } : {}),
|
|
1222
|
+
...(sources !== null ? { sources } : {}),
|
|
1223
|
+
});
|
|
1224
|
+
} else {
|
|
1225
|
+
const prev = blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>;
|
|
1226
|
+
const updated = {
|
|
1227
|
+
...prev,
|
|
1228
|
+
status,
|
|
1229
|
+
endedAt: Date.now(),
|
|
1230
|
+
...(summary !== undefined ? { summary } : {}),
|
|
1231
|
+
...(sources !== null ? { sources } : {}),
|
|
1232
|
+
};
|
|
1233
|
+
if (sources === null) delete updated.sources;
|
|
1234
|
+
blocks[idx] = updated;
|
|
1235
|
+
}
|
|
1236
|
+
pushToolCards(blocks, rawOutput);
|
|
1237
|
+
pushDeployResult(blocks, id, name, rawOutput);
|
|
1238
|
+
if (typeof resourceUri === 'string' && resourceUri.trim().length > 0) {
|
|
1239
|
+
mcpAppCount += 1;
|
|
1240
|
+
const payload = parseMcpAppPayload(rawOutput, resourceUri);
|
|
1241
|
+
blocks.push({
|
|
1242
|
+
kind: 'mcp_app',
|
|
1243
|
+
toolId: id,
|
|
1244
|
+
toolName: name,
|
|
1245
|
+
screenUrl: resourceUri,
|
|
1246
|
+
// ⛔⭐⭐⭐ 📏 2026-08-22 라이브(16차 `[F]`): ***이 한 줄이 «없어서» 위젯이 영영 비어 있었다.***
|
|
1247
|
+
// 같은 블록을 만드는 자리가 «둘»인데(`runChatTurnStreaming` ⊕ 여기),
|
|
1248
|
+
// 결과를 싣는 것은 저쪽뿐이었다 — 그리고 PWA 채팅이 실제로 쓰는 것은 «이쪽»이다.
|
|
1249
|
+
// ⇒ 위젯은 규범대로 악수를 걸고, 브리지는 응답까지 했는데, ***밀 것이 없었다.***
|
|
1250
|
+
// 📋 그것을 말해 준 것이 이 PR 이 심은 관측이다:
|
|
1251
|
+
// `mcp-app.bridge.attach {"hasTool":true,"hasToolResult":false,"skipped":"no-tool-result"}`
|
|
1252
|
+
// ⛔ 이 저장소가 이름 붙인 「배선」 형태의 네 번째 재판이다(15차 §2 ②는 셋을 잡았다).
|
|
1253
|
+
...(rawOutput !== undefined ? { toolResult: rawOutput } : {}),
|
|
1254
|
+
...(payload ? payload : {}),
|
|
1255
|
+
...(summary !== undefined ? { fallbackText: summary } : {}),
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1259
|
+
},
|
|
1260
|
+
onTurnEnd: (res) => {
|
|
1261
|
+
if (dropCurrentTurn || placeholderId === null) {
|
|
1262
|
+
// ⛔⭐📏 17차 `[F]`: 이 갈래는 «조용히» 버려지고 있었다.
|
|
1263
|
+
// 다른 탭의 턴이 화면에 «안 그려졌을» 때 그 이유를 물을 자리가 없었다.
|
|
1264
|
+
// ⇒ 「버렸다」와 「왜」를 남긴다. 세지 «않은» 것은 넣지 않는다 —
|
|
1265
|
+
// 블록을 누적하지 않은 갈래라 0 을 내면 「측정 불가」가 「없다」로 둔갑한다.
|
|
1266
|
+
debugLog('webterm.chat.runturn.observer.end', {
|
|
1267
|
+
sessionId,
|
|
1268
|
+
stopReason: res.stopReason,
|
|
1269
|
+
dropped: true,
|
|
1270
|
+
reason: dropCurrentTurn ? 'dropped-turn' : 'no-placeholder',
|
|
1271
|
+
});
|
|
1272
|
+
resetTurn();
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
const streamedText = textIdx === -1 ? '' : (blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>).text;
|
|
1276
|
+
// A rewritten server answer may coincidentally begin with a progress word.
|
|
1277
|
+
// Require observed post-tool prose, then allow an unstreamed tail at turn-end.
|
|
1278
|
+
const finalStart = streamedText.length > finalTextStart && res.text?.startsWith(streamedText) ? finalTextStart : 0;
|
|
1279
|
+
if (textIdx !== -1 && res.text) {
|
|
1280
|
+
blocks[textIdx] = { kind: 'text', text: res.text };
|
|
1281
|
+
}
|
|
1282
|
+
const hasNonTextBlock = imageCount > 0 || toolCount > 0 || mcpAppCount > 0 || feedbackCount > 0;
|
|
1283
|
+
// ⛔⭐📏 17차 `[F]`: 이 경로에는 ***끝 관측이 통째로 없었다.***
|
|
1284
|
+
// 나머지 둘(`stream.end` · `acp.end`)은 내고 있었다 — ***셋 중 하나만 빠졌다.***
|
|
1285
|
+
// 🔑 16차 §2d 가 「블록을 만드는 자리 셋 중 둘만 결과를 실었다」를 찾았는데,
|
|
1286
|
+
// ***같은 부류가 「관측」 축에서 반복되고 있었다*** — 그리고 관측 결손은
|
|
1287
|
+
// 사용자 눈에 안 보이므로 «아무도 못 본다».
|
|
1288
|
+
debugLog('webterm.chat.runturn.observer.end', {
|
|
1289
|
+
sessionId,
|
|
1290
|
+
stopReason: res.stopReason,
|
|
1291
|
+
dropped: false,
|
|
1292
|
+
images: imageCount,
|
|
1293
|
+
tools: toolCount,
|
|
1294
|
+
mcpApps: mcpAppCount,
|
|
1295
|
+
feedback: feedbackCount,
|
|
1296
|
+
});
|
|
1297
|
+
const finalMessage: ChatMessage = {
|
|
1298
|
+
id: `m-obs-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
1299
|
+
role: 'assistant',
|
|
1300
|
+
text: res.text ?? '',
|
|
1301
|
+
finalTextStart: finalStart,
|
|
1302
|
+
...(isIncompleteChatStopReason(res.stopReason) ? { incomplete: true } : {}),
|
|
1303
|
+
timestamp: Date.now(),
|
|
1304
|
+
meta: {
|
|
1305
|
+
...(handlers.provider ? { provider: handlers.provider } : {}),
|
|
1306
|
+
stopReason: res.stopReason,
|
|
1307
|
+
},
|
|
1308
|
+
...(hasNonTextBlock ? { blocks: snapshot() } : {}),
|
|
1309
|
+
};
|
|
1310
|
+
handlers.onFinalize(placeholderId, finalMessage);
|
|
1311
|
+
resetTurn();
|
|
1312
|
+
},
|
|
1313
|
+
onError: (info) => {
|
|
1314
|
+
if (placeholderId !== null && handlers.onError) {
|
|
1315
|
+
handlers.onError(placeholderId, info);
|
|
1316
|
+
}
|
|
1317
|
+
resetTurn();
|
|
1318
|
+
},
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/** CV-1b (PLAN-pwa-webterm-voice-control v1.2 §5 · 2026-05-07) — chat client's
|
|
1323
|
+
* self-turn ACP path. Replaces the legacy SSE `/v1/prompt/stream` route for
|
|
1324
|
+
* chat's own POST: caller mounts a short-lived listener on the long-lived
|
|
1325
|
+
* ACP connection, fires `session/prompt` RPC, accumulates `session/update`
|
|
1326
|
+
* chunks into a block list, returns a `RunTurnResult` with the same shape
|
|
1327
|
+
* as `runChatTurnStreaming` so the call-site swap stays minimal.
|
|
1328
|
+
*
|
|
1329
|
+
* Why a short-lived listener (and not the long-lived
|
|
1330
|
+
* `runAcpForeignTurnObserver` already mounted by ChatLayout)? Isolation —
|
|
1331
|
+
* the foreign-turn observer drops self chunks via `isLocalTurnInFlight`
|
|
1332
|
+
* (CV-1a Q1=A1 dedup), and this function owns the self-turn placeholder
|
|
1333
|
+
* lifecycle (callbacks fire onPartial/onPartialBlocks; final ChatMessage
|
|
1334
|
+
* reconciles from accumulated text). Both listeners coexist on the same
|
|
1335
|
+
* WebSocket; dedup keeps them mutually exclusive.
|
|
1336
|
+
*
|
|
1337
|
+
* Abort path — `handlers.signal` triggers an ACP `session/cancel`
|
|
1338
|
+
* notification; daemon-side `acpServerBeginPrompt` flips the session's
|
|
1339
|
+
* aborted flag and the in-flight `runTurn` short-circuits. The caller's
|
|
1340
|
+
* Stop button / Esc shortcut both wire here. */
|
|
1341
|
+
export interface RunChatTurnAcpHandlers {
|
|
1342
|
+
signal?: AbortSignal;
|
|
1343
|
+
/** Cumulative assistant text per delta (chat REST `onPartial` mirror). */
|
|
1344
|
+
onPartial?: (full: string) => void;
|
|
1345
|
+
/** Block-list snapshot after every text-delta / image / tool_use event. */
|
|
1346
|
+
onPartialBlocks?: (blocks: ChatBlock[]) => void;
|
|
1347
|
+
/** P-3 §6.9 multi-part user content (image / resource_link blocks). When
|
|
1348
|
+
* present, replaces the default `[{type:'text', text: userText}]`. */
|
|
1349
|
+
userContent?: PromptUserContentBlock[];
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export async function runChatTurnAcp(
|
|
1353
|
+
acp: AcpConnection,
|
|
1354
|
+
userText: string,
|
|
1355
|
+
ctx: ChatRuntimeContext,
|
|
1356
|
+
handlers: RunChatTurnAcpHandlers = {},
|
|
1357
|
+
): Promise<RunTurnResult> {
|
|
1358
|
+
const sessionId = ctx.sessionId;
|
|
1359
|
+
if (!sessionId) {
|
|
1360
|
+
throw new Error('runChatTurnAcp: sessionId required (daemon handshake first)');
|
|
1361
|
+
}
|
|
1362
|
+
const blocks: ChatBlock[] = [];
|
|
1363
|
+
let textIdx = -1;
|
|
1364
|
+
let finalTextStart = 0;
|
|
1365
|
+
let imageCount = 0;
|
|
1366
|
+
let toolCount = 0;
|
|
1367
|
+
// ⭐ 스트리밍 경로와 «같은 이름»으로 센다 — 두 경로를 한 조회로 비교할 수 있어야 한다.
|
|
1368
|
+
let mcpAppCount = 0;
|
|
1369
|
+
let cumulativeText = '';
|
|
1370
|
+
// ⛔⭐⭐⭐ **에이전트의 「생각」** — 대표 2026-08-22 결정(*"보여주시죠"*).
|
|
1371
|
+
//
|
|
1372
|
+
// 📏 17차 `[F]` 실측: 이 경로는 `session/update` 중 «셋»만 봤다
|
|
1373
|
+
// (`agent_message_chunk` · `tool_call` · `tool_call_update`).
|
|
1374
|
+
// ⛔ 그런데 ***ACP 규범에는 `agent_thought_chunk` 가 있고 데몬은 그것을 처리한다***
|
|
1375
|
+
// (`src/acp/event-router.ts` — thought 블록을 누적한다). PWA 는 그 이름을 «어디서도» 안 봤다
|
|
1376
|
+
// (전수 0건). ⇒ 그리고 16차 §2d 가 못 박았듯 ***`ChatLayout` 은 데몬이 있으면 이 길을 탄다***
|
|
1377
|
+
// = 평소 쓰는 길에서 생각·계획이 통째로 사라지고 있었다.
|
|
1378
|
+
//
|
|
1379
|
+
// ⭐ 누적 규칙은 **데몬과 «대칭»**으로 맞춘다(`event-router.ts` 의 flush 로직):
|
|
1380
|
+
// ⓐ thought 청크가 오면 한 블록에 누적한다(여러 블록으로 쪼개지 않는다).
|
|
1381
|
+
// ⓑ ***어시스턴트 «본문»이 시작되면 그 생각은 닫힌다***(`done: true` → 렌더러가 ✓ 로 바꾼다).
|
|
1382
|
+
// ⛔ 그 반대(생각이 본문을 닫는다)는 «하지 않는다» — 본문은 턴 끝에 확정된다.
|
|
1383
|
+
let thoughtIdx = -1;
|
|
1384
|
+
let cumulativeThought = '';
|
|
1385
|
+
let thoughtCount = 0;
|
|
1386
|
+
let appliedFeedbackEnvelopeCount = 0;
|
|
1387
|
+
/** ⭐ 「생각 채널로 왔지만 생각이 아닌 것」의 수 — 아래 봉투 주석이 이유의 canonical.
|
|
1388
|
+
* ⛔ 세면 «반드시» 내보낸다(자 `turn-end-observation` 이 강제한다). */
|
|
1389
|
+
let feedbackEnvelopeChunks = 0;
|
|
1390
|
+
/** ⛔ 어시스턴트 본문이 시작되면 진행 중인 생각을 «닫는다». 없으면 no-op.
|
|
1391
|
+
* @returns 이번 호출이 «실제로» 닫았으면 true — 화면 갱신이 필요한지 부르는 쪽이 안다. */
|
|
1392
|
+
const closeActiveThought = (): boolean => {
|
|
1393
|
+
if (thoughtIdx === -1) return false;
|
|
1394
|
+
const prev = blocks[thoughtIdx] as Extract<ChatBlock, { kind: 'agent_thinking' }>;
|
|
1395
|
+
if (prev.done) return false;
|
|
1396
|
+
blocks[thoughtIdx] = { ...prev, done: true };
|
|
1397
|
+
return true;
|
|
1398
|
+
};
|
|
1399
|
+
const snapshot = (): ChatBlock[] => blocks.map((b) => ({ ...b }));
|
|
1400
|
+
|
|
1401
|
+
const off = acp.on('sessionUpdate', (frame: AcpFrame) => {
|
|
1402
|
+
const params = frame.params as AcpSessionUpdateParams | undefined;
|
|
1403
|
+
if (!params || params.sessionId !== sessionId) return;
|
|
1404
|
+
const update = params.update;
|
|
1405
|
+
if (!update) return;
|
|
1406
|
+
|
|
1407
|
+
if (update.sessionUpdate === 'agent_message_chunk') {
|
|
1408
|
+
const content = update.content;
|
|
1409
|
+
if (
|
|
1410
|
+
content?.type === 'text'
|
|
1411
|
+
&& typeof content.text === 'string'
|
|
1412
|
+
&& content.text.length > 0
|
|
1413
|
+
) {
|
|
1414
|
+
const delta = content.text;
|
|
1415
|
+
cumulativeText += delta;
|
|
1416
|
+
if (textIdx === -1) {
|
|
1417
|
+
// ⛔⭐ 본문이 «시작되는» 순간 진행 중인 생각을 닫는다(데몬 flush 로직과 대칭).
|
|
1418
|
+
closeActiveThought();
|
|
1419
|
+
textIdx = blocks.length;
|
|
1420
|
+
blocks.push({ kind: 'text', text: cumulativeText });
|
|
1421
|
+
} else {
|
|
1422
|
+
blocks[textIdx] = { kind: 'text', text: cumulativeText };
|
|
1423
|
+
}
|
|
1424
|
+
handlers.onPartial?.(cumulativeText);
|
|
1425
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1426
|
+
} else if (
|
|
1427
|
+
content?.type === 'image'
|
|
1428
|
+
&& typeof content.data === 'string'
|
|
1429
|
+
&& typeof content.mimeType === 'string'
|
|
1430
|
+
) {
|
|
1431
|
+
imageCount += 1;
|
|
1432
|
+
const imgBlock: Extract<ChatBlock, { kind: 'image' }> = {
|
|
1433
|
+
kind: 'image',
|
|
1434
|
+
src: content.data,
|
|
1435
|
+
mediaType: content.mimeType,
|
|
1436
|
+
};
|
|
1437
|
+
if (typeof content.uri === 'string') imgBlock.alt = content.uri;
|
|
1438
|
+
// ⛔⭐⭐ **이미지도 「본문의 시작」이다** — 무인 리뷰 must-fix(사후 리뷰 · PR #11308):
|
|
1439
|
+
// *"이미지 분기는 `closeActiveThought()` 를 호출하지 않아, 생각 뒤에 «이미지 본문만»
|
|
1440
|
+
// 오는 턴에서는 완료될 때까지 `done=false` 가 유지된다."*
|
|
1441
|
+
// 🔑 「본문이 시작되면 생각을 닫는다」는 규칙은 ***텍스트에만* 걸린 규칙이 아니다.**
|
|
1442
|
+
closeActiveThought();
|
|
1443
|
+
blocks.push(imgBlock);
|
|
1444
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1445
|
+
}
|
|
1446
|
+
} else if (update.sessionUpdate === 'agent_thought_chunk') {
|
|
1447
|
+
// ⛔⭐⭐⭐ 대표 2026-08-22 결정으로 «신설». 위 `thoughtIdx` 주석이 이유와 규칙의 canonical.
|
|
1448
|
+
const content = update.content;
|
|
1449
|
+
if (content?.type === 'text' && typeof content.text === 'string' && content.text.length > 0) {
|
|
1450
|
+
// ⛔⭐⭐⭐ **이 채널에는 「생각」만 오는 게 아니다** — 📏 라이브 실측(2026-08-22):
|
|
1451
|
+
// `src/acp/elanous-extensions.ts` 가 ***FeedbackEnvelope 을 `agent_thought_chunk` text
|
|
1452
|
+
// 「위에」 싣는다***(ACP SDK 가 커스텀 sessionUpdate 를 거부해서 그렇게 했다).
|
|
1453
|
+
// ⇒ 그래서 이 배선을 켠 «첫 라이브»에서 화면에 ***`<<elanous-feedback-end …>>` 원시 마커가
|
|
1454
|
+
// 그대로 샜다*** — 내가 낸 회귀다(켜기 전엔 이 채널을 통째로 무시했으니 안 보였다).
|
|
1455
|
+
// 🔑 ⇒ 봉투는 «생각이 아니다». 여기서 그리지 않는다.
|
|
1456
|
+
const feedbackEnvelope = parseElanousFeedbackEnvelope(content.text);
|
|
1457
|
+
if (feedbackEnvelope) {
|
|
1458
|
+
if (!maybeDispatchHudEnvelope(feedbackEnvelope.payload)) {
|
|
1459
|
+
const result = applyFeedbackEnvelope(blocks, feedbackEnvelope.payload);
|
|
1460
|
+
if (result === 'applied') {
|
|
1461
|
+
appliedFeedbackEnvelopeCount += 1;
|
|
1462
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
// A feedback-shaped but malformed wire remains suppressed so raw
|
|
1468
|
+
// markers cannot leak into the thought renderer.
|
|
1469
|
+
if (FEEDBACK_ENVELOPE_HEAD.test(content.text)) {
|
|
1470
|
+
feedbackEnvelopeChunks += 1;
|
|
1471
|
+
return;
|
|
1472
|
+
}
|
|
1473
|
+
cumulativeThought += content.text;
|
|
1474
|
+
if (thoughtIdx === -1) {
|
|
1475
|
+
thoughtCount += 1;
|
|
1476
|
+
thoughtIdx = blocks.length;
|
|
1477
|
+
// ⚠️ `blockId` 는 상대가 «안 준다» — 이 턴 안에서만 유일하면 되므로 합성한다
|
|
1478
|
+
// (라이브 병합 키로만 쓰이고 저장·라우팅에는 안 쓰인다).
|
|
1479
|
+
blocks.push({ kind: 'agent_thinking', blockId: `acp-thought-${sessionId}`, msg: cumulativeThought, done: false });
|
|
1480
|
+
} else {
|
|
1481
|
+
const prev = blocks[thoughtIdx] as Extract<ChatBlock, { kind: 'agent_thinking' }>;
|
|
1482
|
+
blocks[thoughtIdx] = { ...prev, msg: cumulativeThought };
|
|
1483
|
+
}
|
|
1484
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1485
|
+
}
|
|
1486
|
+
} else if (update.sessionUpdate === 'tool_call' && typeof update.toolCallId === 'string') {
|
|
1487
|
+
finalTextStart = cumulativeText.length;
|
|
1488
|
+
toolCount += 1;
|
|
1489
|
+
blocks.push({
|
|
1490
|
+
kind: 'tool_use',
|
|
1491
|
+
id: update.toolCallId,
|
|
1492
|
+
name: update.title ?? '',
|
|
1493
|
+
status: 'running',
|
|
1494
|
+
startedAt: Date.now(),
|
|
1495
|
+
...(update.rawInput ? { args: update.rawInput } : {}),
|
|
1496
|
+
});
|
|
1497
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1498
|
+
} else if (update.sessionUpdate === 'tool_call_update' && typeof update.toolCallId === 'string') {
|
|
1499
|
+
const idx = blocks.findIndex(
|
|
1500
|
+
(b) => b.kind === 'tool_use' && b.id === update.toolCallId,
|
|
1501
|
+
);
|
|
1502
|
+
const status: 'done' | 'error' = update.status === 'completed' ? 'done' : 'error';
|
|
1503
|
+
if (idx === -1) {
|
|
1504
|
+
toolCount += 1;
|
|
1505
|
+
blocks.push({
|
|
1506
|
+
kind: 'tool_use',
|
|
1507
|
+
id: update.toolCallId,
|
|
1508
|
+
name: update.title ?? '',
|
|
1509
|
+
status,
|
|
1510
|
+
startedAt: Date.now(),
|
|
1511
|
+
endedAt: Date.now(),
|
|
1512
|
+
...(update.title ? { summary: update.title } : {}),
|
|
1513
|
+
});
|
|
1514
|
+
} else {
|
|
1515
|
+
const prev = blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>;
|
|
1516
|
+
blocks[idx] = {
|
|
1517
|
+
...prev,
|
|
1518
|
+
status,
|
|
1519
|
+
endedAt: Date.now(),
|
|
1520
|
+
...(update.title ? { summary: update.title } : {}),
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
// ⛔⭐⭐⭐ **위젯 블록은 «여기»에도 있어야 한다 — 이 경로가 살아 있는 길이다.**
|
|
1524
|
+
//
|
|
1525
|
+
// 📏 2026-08-21 실측으로 이 자리를 찾았다. 데몬은 위젯 주소를 «제대로» 보낸다:
|
|
1526
|
+
// `acp-push-tool-result | keys=['output','structured','_meta']
|
|
1527
|
+
// | uri=ui://higgsfield/generation-v2.html`
|
|
1528
|
+
// ⛔ 그런데 이 처리기는 «알약만» 갱신하고 `rawOutput` 을 아예 안 봤다.
|
|
1529
|
+
// 스트리밍 경로엔 있는 블록 생성이 ACP 경로엔 «없었고»,
|
|
1530
|
+
// `ChatLayout` 은 데몬이 있으면 ***ACP 경로를 탄다***(`useAcpPath`).
|
|
1531
|
+
// ⇒ 그래서 앞의 열 조각이 전부 통과하는데도 위젯이 «영영» 안 떴다.
|
|
1532
|
+
// ⛔ 「두 경로가 같은 일을 한다」고 «가정»하지 않는다 — 이 저장소에서 그 가정이 여러 번 틀렸다.
|
|
1533
|
+
// ⭐ 결과에 이미지가 있으면 «그려서» 보여 준다 — 링크만 남기지 않는다(대표 2026-08-21).
|
|
1534
|
+
pushToolCards(blocks, update.rawOutput);
|
|
1535
|
+
pushDeployResult(blocks, update.toolCallId,
|
|
1536
|
+
idx >= 0 ? (blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>).name : update.title ?? '', update.rawOutput);
|
|
1537
|
+
for (const img of mcpResultImages(update.rawOutput)) {
|
|
1538
|
+
if (blocks.some((b) => b.kind === 'image' && b.src === img.src)) continue;
|
|
1539
|
+
imageCount += 1;
|
|
1540
|
+
blocks.push({ kind: 'image', ...img });
|
|
1541
|
+
}
|
|
1542
|
+
const acpResourceUri = mcpAppResourceUriOf(update.rawOutput);
|
|
1543
|
+
if (acpResourceUri) {
|
|
1544
|
+
mcpAppCount += 1;
|
|
1545
|
+
const payload = parseMcpAppPayload(update.rawOutput, acpResourceUri);
|
|
1546
|
+
blocks.push({
|
|
1547
|
+
kind: 'mcp_app',
|
|
1548
|
+
toolId: update.toolCallId,
|
|
1549
|
+
toolName: update.title ?? '',
|
|
1550
|
+
screenUrl: acpResourceUri,
|
|
1551
|
+
// ⛔⭐⭐⭐ 📏 2026-08-22 라이브(16차 `[F]`): ***이 한 줄이 없어서 위젯이 「뜨긴 하고 비어 있었다」.***
|
|
1552
|
+
//
|
|
1553
|
+
// 15차가 위 주석대로 이 경로에 블록 «생성»을 세웠고 — 그래서 위젯은 화면에 «떴다».
|
|
1554
|
+
// 그런데 ***결과를 싣는 것을 빠뜨렸다.*** 위젯은 규범대로 악수를 걸고(`ui/initialize`),
|
|
1555
|
+
// 브리지는 응답까지 했는데, **밀 것이 없어** 「Connecting…」 또는 빈 상자로 남았다.
|
|
1556
|
+
// 📋 추론이 아니라 «관측»이 이 자리를 가리켰다(같은 PR 이 심었다):
|
|
1557
|
+
// `mcp-app.bridge.attach {"hasTool":true,"hasToolResult":false,"skipped":"no-tool-result"}`
|
|
1558
|
+
// ⛔⭐ 그리고 이 자리는 «전수로 세서» 찾았다 — 그때 `kind: 'mcp_app'` 을 만드는 곳이 «셋»인데
|
|
1559
|
+
// 결과를 싣는 곳은 «둘»이었다. 두 곳만 보고 「고쳤다」고 했으면 또 틀렸다.
|
|
1560
|
+
//
|
|
1561
|
+
// ⚠️📏 **그 「셋」은 늙었다 — 2026-08-22(17차 `[F]`) 실측으로 «넷»이다**
|
|
1562
|
+
// (streaming · observer · ACP ⊕ **복원** `session-restore.ts`).
|
|
1563
|
+
// ✅ 넷 다 결과를 싣는다(실측). ⛔ 그러나 ***이 축에는 아직 «자»가 없다*** —
|
|
1564
|
+
// 다섯째 자리가 생기면 또 조용히 빠진다.
|
|
1565
|
+
// 🩹 제안(17차): 블록을 만드는 «팩토리 하나»로 접어라. 그러면 자리가 한 집이 되고,
|
|
1566
|
+
// 결과가 없을 때 팩토리가 «말하게» 할 수 있다.
|
|
1567
|
+
// ⛔ 수를 여기 다시 적지 말고 «그때» 세라 — ⭐ **줄 «전체»가 그것인 자리만** 센다:
|
|
1568
|
+
// rg -n "^\s*kind: 'mcp_app',$" apps/pwa/src -g '!*.test.*'
|
|
1569
|
+
// ⛔📏 처음엔 `$` 없이 적었더니 ***이 주석 자신이 세어져 5가 나왔다.***
|
|
1570
|
+
// 🔑 ***「재는 명령」을 적을 때는 그 명령이 «내 글»에 걸리지 않는지도 재야 한다.***
|
|
1571
|
+
...(update.rawOutput !== undefined ? { toolResult: update.rawOutput } : {}),
|
|
1572
|
+
...(payload ? payload : {}),
|
|
1573
|
+
...(update.title ? { fallbackText: update.title } : {}),
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
handlers.onPartialBlocks?.(snapshot());
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
const onAbort = (): void => {
|
|
1581
|
+
void acp.send('session/cancel', { sessionId }).catch(() => {});
|
|
1582
|
+
};
|
|
1583
|
+
const signal = handlers.signal;
|
|
1584
|
+
if (signal) {
|
|
1585
|
+
if (signal.aborted) {
|
|
1586
|
+
off();
|
|
1587
|
+
throw new Error('aborted');
|
|
1588
|
+
}
|
|
1589
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
const promptBlocks: PromptUserContentBlock[] = handlers.userContent && handlers.userContent.length > 0
|
|
1593
|
+
? handlers.userContent
|
|
1594
|
+
: [{ type: 'text', text: userText }];
|
|
1595
|
+
|
|
1596
|
+
debugLog('webterm.chat.runturn.acp.start', {
|
|
1597
|
+
sessionId,
|
|
1598
|
+
provider: ctx.provider,
|
|
1599
|
+
len: userText.length,
|
|
1600
|
+
blocks: promptBlocks.length,
|
|
1601
|
+
});
|
|
1602
|
+
|
|
1603
|
+
/** ⛔⭐⭐⭐ **끝 관측을 «한 자리»에서만 낸다 — 성공이든 실패든**(위 `runChatTurnStreaming` 과 같은 이유).
|
|
1604
|
+
* 📏 19차 `[F]` 라이브: 죽은 소켓 위로 턴을 보내니 `acp.start` 만 남고 끝이 «없었다». */
|
|
1605
|
+
const emitEnd = (outcome: { stopReason: string; error?: string }): void => {
|
|
1606
|
+
debugLog('webterm.chat.runturn.acp.end', {
|
|
1607
|
+
sessionId,
|
|
1608
|
+
stopReason: outcome.stopReason,
|
|
1609
|
+
...(outcome.error !== undefined ? { error: outcome.error } : {}),
|
|
1610
|
+
textLen: cumulativeText.length,
|
|
1611
|
+
images: imageCount,
|
|
1612
|
+
tools: toolCount,
|
|
1613
|
+
mcpApps: mcpAppCount,
|
|
1614
|
+
// ⭐ 대표 결정으로 신설한 축 — ⛔ 세면 «반드시» 내보낸다(자 `turn-end-observation` 이 강제한다).
|
|
1615
|
+
thoughts: thoughtCount,
|
|
1616
|
+
// ⭐ 「생각 채널로 왔지만 생각이 아닌 것」 — 봉투 배선이 붙기 «전»까지 이 수가 그 크기를 말한다.
|
|
1617
|
+
feedbackEnvelopes: feedbackEnvelopeChunks,
|
|
1618
|
+
});
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
try {
|
|
1622
|
+
const personaId = chatPersonaId(sessionId);
|
|
1623
|
+
const res = (await acp.send('session/prompt', {
|
|
1624
|
+
sessionId,
|
|
1625
|
+
prompt: promptBlocks,
|
|
1626
|
+
...(personaId ? { _meta: { elanous: { pwaPersonaId: personaId } } } : {}),
|
|
1627
|
+
})) as { stopReason?: string } | undefined;
|
|
1628
|
+
const stopReason = res?.stopReason ?? 'end_turn';
|
|
1629
|
+
// ⛔⭐ 턴이 끝났는데 생각이 «열린 채»면 닫는다 — 본문 없이 끝나는 턴(툴만 돈 경우)이 있다.
|
|
1630
|
+
// 그대로 두면 렌더러가 영영 맥박치는 알약을 그린다.
|
|
1631
|
+
closeActiveThought();
|
|
1632
|
+
emitEnd({ stopReason });
|
|
1633
|
+
const hasNonTextBlock = imageCount > 0 || toolCount > 0 || mcpAppCount > 0 || thoughtCount > 0 || appliedFeedbackEnvelopeCount > 0;
|
|
1634
|
+
const message: ChatMessage = {
|
|
1635
|
+
id: `m-acp-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
1636
|
+
role: 'assistant',
|
|
1637
|
+
text: cumulativeText,
|
|
1638
|
+
finalTextStart,
|
|
1639
|
+
...(isIncompleteChatStopReason(stopReason) ? { incomplete: true } : {}),
|
|
1640
|
+
timestamp: Date.now(),
|
|
1641
|
+
meta: { provider: ctx.provider, stopReason },
|
|
1642
|
+
...(hasNonTextBlock ? { blocks: snapshot() } : {}),
|
|
1643
|
+
};
|
|
1644
|
+
// ACP `session/prompt` response carries no sessionId — caller bound the
|
|
1645
|
+
// session at handshake time (connectAcp({sessionId})). newSessionId is
|
|
1646
|
+
// undefined by definition; ChatLayout's setSessionId stays a no-op for
|
|
1647
|
+
// self ACP turns.
|
|
1648
|
+
return { message };
|
|
1649
|
+
} catch (err) {
|
|
1650
|
+
// ⛔⭐⭐⭐ **실패한 턴도 「끝」을 낸다.** 안 그러면 관측에는 ***시작만 있고 끝이 없는 턴***이 남고,
|
|
1651
|
+
// 그것은 「도는 중」과 구별되지 않는다. ⚠️ 되던져서 호출자 계약은 불변으로 둔다.
|
|
1652
|
+
emitEnd({
|
|
1653
|
+
stopReason: signal?.aborted === true ? 'aborted' : 'error',
|
|
1654
|
+
error: err instanceof Error ? err.message : String(err),
|
|
1655
|
+
});
|
|
1656
|
+
throw err;
|
|
1657
|
+
} finally {
|
|
1658
|
+
// ⛔⭐⭐ **실패·중단에도 「생각」을 닫는다** — 무인 리뷰 must-fix(사후 리뷰 · PR #11308):
|
|
1659
|
+
// *"`acp.send()` 가 reject/abort 되면 정상 반환 «뒤에만» 있는 `closeActiveThought()` 가
|
|
1660
|
+
// 실행되지 않아 ***열린 ThinkingPill 이 남는다***."*
|
|
1661
|
+
// 🔑 맥박치는 알약은 「아직 생각 중」이라고 «거짓말»한다 — 턴은 이미 죽었는데.
|
|
1662
|
+
// ⚠️ 정상 경로에서 이미 닫혔으면 이 호출은 no-op 이다(`done` 을 다시 세우지 않는다).
|
|
1663
|
+
// ⛔⭐⭐ **닫기만 하면 «화면은 그대로 맥박친다»** — 실패 경로는 `message` 를 반환하지 못하므로
|
|
1664
|
+
// ***호출자가 블록을 다시 받을 길이 이 콜백뿐이다.*** 그래서 실제로 닫았을 때만 스냅샷을 보낸다.
|
|
1665
|
+
if (closeActiveThought()) handlers.onPartialBlocks?.(snapshot());
|
|
1666
|
+
if (signal) signal.removeEventListener('abort', onAbort);
|
|
1667
|
+
off();
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
/** CV-1 (PLAN-pwa-webterm-voice-control v1.2 §5 · 2026-05-07) — observer for
|
|
1672
|
+
* ACP `session/update` notifications on the chat client. The companion to
|
|
1673
|
+
* `runChatTurnObserver` (SSE-based cross-tab fanout); this one taps the
|
|
1674
|
+
* cross-surface ACP broadcaster so turns started on **other surfaces**
|
|
1675
|
+
* (webterm `:agent`, TUI, multi-agent broadcasters) materialize as
|
|
1676
|
+
* assistant placeholders in the chat history.
|
|
1677
|
+
*
|
|
1678
|
+
* Why ACP and not SSE? webterm `:agent` (terminal/repl/exec) does NOT
|
|
1679
|
+
* publish into the daemon `chatEventBus` — it only fires ACP broadcasts
|
|
1680
|
+
* through `getActiveAcpBroadcaster`. So SSE observer never sees those
|
|
1681
|
+
* turns; ACP listener is the only path to mirror them into chat.
|
|
1682
|
+
*
|
|
1683
|
+
* Dedupe (Q1=A1) — when a chat-tab POST is in-flight, the SSE path owns
|
|
1684
|
+
* that turn's bubble and the ACP broadcaster fires the same chunks (chat
|
|
1685
|
+
* REST `handlePromptStreamPost` dual-emit). The host returns `true` from
|
|
1686
|
+
* `isLocalTurnInFlight` and we drop those events so we don't render two
|
|
1687
|
+
* placeholders for the same turn. Same gate also applies when the host's
|
|
1688
|
+
* SSE observer (`runChatTurnObserver`) is mid-bubble for a foreign chat
|
|
1689
|
+
* tab — supply `isRemoteSseTurnInFlight` to suppress double mirror.
|
|
1690
|
+
*
|
|
1691
|
+
* Webterm `:agent` announces begin/end explicitly. Legacy ACP streams
|
|
1692
|
+
* without those signals retain the idle fallback.
|
|
1693
|
+
*/
|
|
1694
|
+
export interface AcpForeignTurnHandlers {
|
|
1695
|
+
/** Allocate an empty assistant placeholder for the foreign turn and
|
|
1696
|
+
* return its id. Return `null` to skip the turn entirely. */
|
|
1697
|
+
onPlaceholder: (info: { sessionId: string }) => string | null;
|
|
1698
|
+
/** Per-event snapshot push. `blocks` is freshly cloned per call. */
|
|
1699
|
+
onPartialBlocks: (placeholderId: string, blocks: ChatBlock[]) => void;
|
|
1700
|
+
/** Optional — fires after the idle timer elapses. Host typically just
|
|
1701
|
+
* logs; the placeholder stays in history as a regular message. */
|
|
1702
|
+
onFinalize?: (placeholderId: string, info?: { stopReason: string; finalTextStart: number }) => void;
|
|
1703
|
+
/** Dedupe: chat-tab's own POST owns this turn — drop ACP fanout. */
|
|
1704
|
+
isLocalTurnInFlight?: () => boolean;
|
|
1705
|
+
/** Dedupe: SSE observer (`runChatTurnObserver`) is mid-bubble for a
|
|
1706
|
+
* cross-tab foreign chat turn — drop ACP fanout to avoid dual
|
|
1707
|
+
* placeholders. */
|
|
1708
|
+
isRemoteSseTurnInFlight?: () => boolean;
|
|
1709
|
+
/** Idle ms after which the placeholder is considered final. Default
|
|
1710
|
+
* 3000. webterm `:agent` does not broadcast turn-end; this heuristic
|
|
1711
|
+
* is the boundary. */
|
|
1712
|
+
idleFinalizeMs?: number;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
interface AcpSessionUpdateContent {
|
|
1716
|
+
type?: string;
|
|
1717
|
+
text?: string;
|
|
1718
|
+
data?: string;
|
|
1719
|
+
mimeType?: string;
|
|
1720
|
+
uri?: string;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
interface AcpSessionUpdate {
|
|
1724
|
+
sessionUpdate?: string;
|
|
1725
|
+
_meta?: { elanousTurn?: { phase?: string; text?: string; stopReason?: string } };
|
|
1726
|
+
content?: AcpSessionUpdateContent;
|
|
1727
|
+
toolCallId?: string;
|
|
1728
|
+
rawInput?: Record<string, unknown>;
|
|
1729
|
+
title?: string;
|
|
1730
|
+
status?: string;
|
|
1731
|
+
/** ⛔⭐ ACP 표준 칸. 데몬은 «이미» 채워 보내는데(실측 2026-08-21) 이 타입에 «없어서»
|
|
1732
|
+
* ACP 경로가 그것을 볼 수 없었고, 그래서 MCP Apps 위젯이 영영 안 떴다.
|
|
1733
|
+
* ⇒ 「타입에 없다」가 「값이 없다」로 «조용히» 바뀐 자리다. */
|
|
1734
|
+
rawOutput?: unknown;
|
|
1735
|
+
text?: string;
|
|
1736
|
+
stopReason?: string;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
interface AcpSessionUpdateParams {
|
|
1740
|
+
sessionId?: string;
|
|
1741
|
+
update?: AcpSessionUpdate;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
export function runAcpForeignTurnObserver(
|
|
1745
|
+
acp: AcpConnection,
|
|
1746
|
+
sessionId: string,
|
|
1747
|
+
handlers: AcpForeignTurnHandlers,
|
|
1748
|
+
): () => void {
|
|
1749
|
+
const idleMs = handlers.idleFinalizeMs ?? 3000;
|
|
1750
|
+
let placeholderId: string | null = null;
|
|
1751
|
+
let blocks: ChatBlock[] = [];
|
|
1752
|
+
let textIdx = -1;
|
|
1753
|
+
let imageCount = 0;
|
|
1754
|
+
let toolCount = 0;
|
|
1755
|
+
let explicitTurn = false;
|
|
1756
|
+
let finalTextStart = 0;
|
|
1757
|
+
let idleTimer: ReturnType<typeof setTimeout> | null = null;
|
|
1758
|
+
|
|
1759
|
+
const reset = (): void => {
|
|
1760
|
+
if (idleTimer) {
|
|
1761
|
+
clearTimeout(idleTimer);
|
|
1762
|
+
idleTimer = null;
|
|
1763
|
+
}
|
|
1764
|
+
placeholderId = null;
|
|
1765
|
+
blocks = [];
|
|
1766
|
+
textIdx = -1;
|
|
1767
|
+
imageCount = 0;
|
|
1768
|
+
toolCount = 0;
|
|
1769
|
+
explicitTurn = false;
|
|
1770
|
+
finalTextStart = 0;
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1773
|
+
const armIdle = (): void => {
|
|
1774
|
+
if (explicitTurn) return;
|
|
1775
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
1776
|
+
idleTimer = setTimeout(() => {
|
|
1777
|
+
const ph = placeholderId;
|
|
1778
|
+
// ⛔⭐📏 17차 `[F]`: 이 경로에는 «끝 관측이 통째로 없었다» — `foreign-turn.start` 만 있었다.
|
|
1779
|
+
// ⭐ 수는 ***`reset()` «전»에*** 읽는다. `reset()` 이 카운터를 0 으로 되돌리므로
|
|
1780
|
+
// 뒤에서 읽으면 ***항상 0*** 이 된다(퇴화 검사 ⓑ「항상 영」의 교과서적 자리).
|
|
1781
|
+
// ⭐ `handlers.onFinalize` 유무와 «무관하게» 낸다 — 「턴이 끝났다」는 그 핸들러의 사정이 아니다.
|
|
1782
|
+
// ⚠️ 이 경로는 `mcpAppCount`·`feedbackCount` 를 «세지 않는다» ⇒ 그 축은 «넣지 않는다».
|
|
1783
|
+
// 0 을 내면 ***「측정 불가」가 「없다」로 둔갑한다***(`MANUAL-time-and-windows` ⑩).
|
|
1784
|
+
// ⛔ 스프레드(`...counted`)로 넣지 «마라» — 자가 정적으로 못 본다(실측: 그래서 한 번 걸렸다).
|
|
1785
|
+
if (ph) debugLog('webterm.chat.acp.foreign-turn.end', { id: ph, images: imageCount, tools: toolCount });
|
|
1786
|
+
reset();
|
|
1787
|
+
if (ph && handlers.onFinalize) {
|
|
1788
|
+
try {
|
|
1789
|
+
handlers.onFinalize(ph);
|
|
1790
|
+
} catch (e) {
|
|
1791
|
+
debugLog('webterm.chat.acp.finalize.error', { reason: String(e) });
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}, idleMs);
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
const snapshot = (): ChatBlock[] => blocks.map((b) => ({ ...b }));
|
|
1798
|
+
|
|
1799
|
+
const ensurePlaceholder = (): boolean => {
|
|
1800
|
+
if (placeholderId !== null) return true;
|
|
1801
|
+
const id = handlers.onPlaceholder({ sessionId });
|
|
1802
|
+
if (id === null) return false;
|
|
1803
|
+
placeholderId = id;
|
|
1804
|
+
debugLog('webterm.chat.acp.foreign-turn.start', { id });
|
|
1805
|
+
return true;
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
const finishIncomplete = (): void => {
|
|
1809
|
+
const ph = placeholderId;
|
|
1810
|
+
if (!ph) return;
|
|
1811
|
+
debugLog('webterm.chat.acp.foreign-turn.end', { id: ph, images: imageCount, tools: toolCount });
|
|
1812
|
+
reset();
|
|
1813
|
+
handlers.onFinalize?.(ph, { stopReason: 'error', finalTextStart: 0 });
|
|
1814
|
+
};
|
|
1815
|
+
|
|
1816
|
+
const off = acp.on('sessionUpdate', (frame: AcpFrame) => {
|
|
1817
|
+
if (handlers.isLocalTurnInFlight?.()) return;
|
|
1818
|
+
if (handlers.isRemoteSseTurnInFlight?.()) return;
|
|
1819
|
+
const params = frame.params as AcpSessionUpdateParams | undefined;
|
|
1820
|
+
if (!params || params.sessionId !== sessionId) return;
|
|
1821
|
+
const update = params.update;
|
|
1822
|
+
if (!update) return;
|
|
1823
|
+
|
|
1824
|
+
const turnBoundary = update._meta?.elanousTurn;
|
|
1825
|
+
if (turnBoundary?.phase === 'begin' || update.sessionUpdate === 'elanous_turn_begin') {
|
|
1826
|
+
// The server now owns this boundary. Do not infer completion from silence.
|
|
1827
|
+
if (placeholderId !== null) finishIncomplete();
|
|
1828
|
+
explicitTurn = true;
|
|
1829
|
+
ensurePlaceholder();
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
if (turnBoundary?.phase === 'end' || update.sessionUpdate === 'elanous_turn_end') {
|
|
1833
|
+
if (!explicitTurn) return;
|
|
1834
|
+
const ph = placeholderId;
|
|
1835
|
+
let finalStart = finalTextStart;
|
|
1836
|
+
const finalText = turnBoundary?.text ?? update.text;
|
|
1837
|
+
const stopReason = turnBoundary?.stopReason ?? update.stopReason;
|
|
1838
|
+
const finalTextIsAuthoritative = typeof finalText === 'string'
|
|
1839
|
+
&& (finalText.length > 0 || !isIncompleteChatStopReason(stopReason));
|
|
1840
|
+
if (ph && finalTextIsAuthoritative && typeof finalText === 'string') {
|
|
1841
|
+
const authoritativeText = finalText;
|
|
1842
|
+
const streamedText = textIdx === -1 ? '' : (blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>).text;
|
|
1843
|
+
// Keep the pre-tool boundary only when that exact prose is still the
|
|
1844
|
+
// beginning of the server's final body. The post-tool prose may change.
|
|
1845
|
+
if (!authoritativeText.startsWith(streamedText.slice(0, finalTextStart))) finalStart = 0;
|
|
1846
|
+
if (textIdx === -1) {
|
|
1847
|
+
textIdx = blocks.length;
|
|
1848
|
+
blocks.push({ kind: 'text', text: authoritativeText });
|
|
1849
|
+
} else {
|
|
1850
|
+
blocks[textIdx] = { kind: 'text', text: authoritativeText };
|
|
1851
|
+
}
|
|
1852
|
+
handlers.onPartialBlocks(ph, snapshot());
|
|
1853
|
+
} else if (finalText === '') {
|
|
1854
|
+
// A cancelled/failed runner may have streamed a useful partial answer.
|
|
1855
|
+
finalStart = 0;
|
|
1856
|
+
}
|
|
1857
|
+
if (ph) debugLog('webterm.chat.acp.foreign-turn.end', { id: ph, images: imageCount, tools: toolCount });
|
|
1858
|
+
reset();
|
|
1859
|
+
if (ph) handlers.onFinalize?.(ph, { stopReason: stopReason ?? 'error', finalTextStart: finalStart });
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
let consumed = false;
|
|
1864
|
+
|
|
1865
|
+
if (update.sessionUpdate === 'agent_message_chunk') {
|
|
1866
|
+
const content = update.content;
|
|
1867
|
+
if (content?.type === 'text' && typeof content.text === 'string' && content.text.length > 0) {
|
|
1868
|
+
if (!ensurePlaceholder()) return;
|
|
1869
|
+
const delta = content.text;
|
|
1870
|
+
if (textIdx === -1) {
|
|
1871
|
+
textIdx = blocks.length;
|
|
1872
|
+
blocks.push({ kind: 'text', text: delta });
|
|
1873
|
+
} else {
|
|
1874
|
+
const prev = blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>;
|
|
1875
|
+
blocks[textIdx] = { kind: 'text', text: prev.text + delta };
|
|
1876
|
+
}
|
|
1877
|
+
consumed = true;
|
|
1878
|
+
} else if (
|
|
1879
|
+
content?.type === 'image'
|
|
1880
|
+
&& typeof content.data === 'string'
|
|
1881
|
+
&& typeof content.mimeType === 'string'
|
|
1882
|
+
) {
|
|
1883
|
+
if (!ensurePlaceholder()) return;
|
|
1884
|
+
imageCount += 1;
|
|
1885
|
+
const block: Extract<ChatBlock, { kind: 'image' }> = {
|
|
1886
|
+
kind: 'image',
|
|
1887
|
+
src: content.data,
|
|
1888
|
+
mediaType: content.mimeType,
|
|
1889
|
+
};
|
|
1890
|
+
if (typeof content.uri === 'string') block.alt = content.uri;
|
|
1891
|
+
blocks.push(block);
|
|
1892
|
+
consumed = true;
|
|
1893
|
+
}
|
|
1894
|
+
} else if (update.sessionUpdate === 'tool_call' && typeof update.toolCallId === 'string') {
|
|
1895
|
+
if (!ensurePlaceholder()) return;
|
|
1896
|
+
if (explicitTurn && textIdx !== -1) finalTextStart = (blocks[textIdx] as Extract<ChatBlock, { kind: 'text' }>).text.length;
|
|
1897
|
+
toolCount += 1;
|
|
1898
|
+
blocks.push({
|
|
1899
|
+
kind: 'tool_use',
|
|
1900
|
+
id: update.toolCallId,
|
|
1901
|
+
name: update.title ?? '',
|
|
1902
|
+
status: 'running',
|
|
1903
|
+
startedAt: Date.now(),
|
|
1904
|
+
...(update.rawInput ? { args: update.rawInput } : {}),
|
|
1905
|
+
});
|
|
1906
|
+
consumed = true;
|
|
1907
|
+
} else if (update.sessionUpdate === 'tool_call_update' && typeof update.toolCallId === 'string') {
|
|
1908
|
+
if (!ensurePlaceholder()) return;
|
|
1909
|
+
const idx = blocks.findIndex(
|
|
1910
|
+
(b) => b.kind === 'tool_use' && b.id === update.toolCallId,
|
|
1911
|
+
);
|
|
1912
|
+
const status: 'done' | 'error' = update.status === 'completed' ? 'done' : 'error';
|
|
1913
|
+
if (idx === -1) {
|
|
1914
|
+
toolCount += 1;
|
|
1915
|
+
blocks.push({
|
|
1916
|
+
kind: 'tool_use',
|
|
1917
|
+
id: update.toolCallId,
|
|
1918
|
+
name: update.title ?? '',
|
|
1919
|
+
status,
|
|
1920
|
+
startedAt: Date.now(),
|
|
1921
|
+
endedAt: Date.now(),
|
|
1922
|
+
...(update.title ? { summary: update.title } : {}),
|
|
1923
|
+
});
|
|
1924
|
+
} else {
|
|
1925
|
+
const prev = blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>;
|
|
1926
|
+
blocks[idx] = {
|
|
1927
|
+
...prev,
|
|
1928
|
+
status,
|
|
1929
|
+
endedAt: Date.now(),
|
|
1930
|
+
...(update.title ? { summary: update.title } : {}),
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
pushDeployResult(blocks, update.toolCallId,
|
|
1934
|
+
idx >= 0 ? (blocks[idx] as Extract<ChatBlock, { kind: 'tool_use' }>).name : update.title ?? '', update.rawOutput);
|
|
1935
|
+
consumed = true;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
if (!consumed || placeholderId === null) return;
|
|
1939
|
+
handlers.onPartialBlocks(placeholderId, snapshot());
|
|
1940
|
+
armIdle();
|
|
1941
|
+
});
|
|
1942
|
+
|
|
1943
|
+
const offState = typeof acp.onState === 'function'
|
|
1944
|
+
? acp.onState((state) => { if ((state === 'FAILED' || state === 'CLOSED') && explicitTurn) finishIncomplete(); })
|
|
1945
|
+
: () => {};
|
|
1946
|
+
|
|
1947
|
+
return () => {
|
|
1948
|
+
if (explicitTurn) finishIncomplete();
|
|
1949
|
+
offState();
|
|
1950
|
+
off();
|
|
1951
|
+
if (idleTimer) {
|
|
1952
|
+
clearTimeout(idleTimer);
|
|
1953
|
+
idleTimer = null;
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
}
|