@celljs/ta 4.15.2 → 4.16.0
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/dist/cli.mjs +5 -2
- package/dist/gateway.mjs +663 -46
- package/dist/pi/CHANGELOG.md +7 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-3d/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +8 -6
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +5 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +0 -2
- package/dist/pi/packages/ta-agents/lib/agent-session.js +1 -5
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +7 -2
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +8 -4
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/host/index.mjs +38 -3
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-channels/host/index.mjs +38 -3
- package/dist/pi/packages/ta-channels/package.json +1 -1
- package/dist/pi/packages/ta-computer-use/package.json +1 -1
- package/dist/pi/packages/ta-cron/package.json +1 -1
- package/dist/pi/packages/ta-extensions/package.json +1 -1
- package/dist/pi/packages/ta-extensions/web/index.js +38 -3
- package/dist/pi/packages/ta-games/package.json +1 -1
- package/dist/pi/packages/ta-glance/README.en.md +2 -0
- package/dist/pi/packages/ta-glance/README.md +2 -0
- package/dist/pi/packages/ta-glance/extension/index.mjs +110 -21
- package/dist/pi/packages/ta-glance/lib/card.js +88 -8
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +7 -4
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +34 -2
- package/dist/pi/packages/ta-glance/lib/glance-protocol.js +39 -1
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +93 -19
- package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +13 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.js +28 -0
- package/dist/pi/packages/ta-glance/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/style.js +65 -2
- package/dist/pi/packages/ta-glance/package.json +1 -1
- package/dist/pi/packages/ta-glance/web/index.js +330 -34
- package/dist/pi/packages/ta-initiative/package.json +1 -1
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-manual/package.json +1 -1
- package/dist/pi/packages/ta-moments/extension/index.mjs +38 -3
- package/dist/pi/packages/ta-moments/host/index.mjs +38 -3
- package/dist/pi/packages/ta-moments/package.json +1 -1
- package/dist/pi/packages/ta-moments/web/index.js +38 -3
- package/dist/pi/packages/ta-nearby/package.json +1 -1
- package/dist/pi/packages/ta-notify/package.json +1 -1
- package/dist/pi/packages/ta-plot/package.json +1 -1
- package/dist/pi/packages/ta-recall/package.json +1 -1
- package/dist/pi/packages/ta-rooms/package.json +1 -1
- package/dist/pi/packages/ta-share/package.json +1 -1
- package/dist/pi/packages/ta-sync/package.json +1 -1
- package/dist/pi/packages/ta-sync-cloud/package.json +1 -1
- package/dist/pi/packages/ta-team/package.json +1 -1
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +38 -3
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-Dd51Bqbx.js → abnfDiagram-S7VZAUFO-FSEuUCgT.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-BbG3_x7_.js → architecture-WOLXFQ4H-Do_DyWCg.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-DbJO4t8I.js → architectureDiagram-YGSQEFNW-D-N2qDs4.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-BwtrHF1f.js → blockDiagram-APKKGZFW-Ds6DzHNZ.js} +1 -1
- package/dist/public/assets/{browser-CTbeNBsA.js → browser-KlrZxPbE.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CfBe5A0H.js → c4Diagram-KJ2TOQU5-D5ZdqxrP.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-C7R0mhrg.js → chunk-6MUBBAK2-CWOwhB3b.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-VQgQruZT.js → chunk-AXFCVDMN-Dr6p2RGg.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-CkUi_vD5.js → chunk-BG4553SI-DUCV_pmW.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-BAQq7ktk.js → chunk-DQASFODM-Yxd3jIXM.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-B1oF8lB7.js → chunk-HFQBQIA3-C24I15MF.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DE5amcgT.js → chunk-KQLB2F66-Dxk-aejD.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-ev9S_csp.js → chunk-KS47KZWR-DPyr7gb8.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-ziqnRvTG.js → chunk-LEVMRMFU-D_mEFJGR.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-DaqPdEKA.js → chunk-M57EVK23-DfMFxQib.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-DFOG8j6z.js → chunk-OY52VR5R-O9W83Laa.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-eg35JLLN.js → chunk-QB3YPZ4I-IdikGcw1.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-J73nie-R.js → chunk-R3KSYZAL-DLpaFCvz.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-B8EvDZvB.js → chunk-STOXU5M4-Lx-CZ4Ql.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-DyCM007V.js → chunk-TU62E6Q5-DCnr5NsA.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BBGeCNmA.js → chunk-X4PVCEUW-Ct7aUJFY.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-CAtJ2Wph.js → chunk-XXDRQBXY-CQhxfoYw.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DhQM6yHy.js → classDiagram-v2-L25IHNXF-DPSu5qYq.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-AqIcHabu.js → cose-bilkent-JH36ORCC-CFimsFsN.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dcc0sCHf.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-7SyXzhRd.js → cynefinDiagram-L36ESFBY-CiAWhkVp.js} +1 -1
- package/dist/public/assets/{d3-selection-DsahLieG.js → d3-selection-C8RIDfkO.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-DalaGtMS.js → dagre-SPEB5RXH-l1nRD1Fx.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-BcY-qB9G.js → diagram-3B7GL73J-ipqtnhoX.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-NV7fbe0h.js → diagram-DNEMPZML-VpIcHRUP.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-BPx4GHoj.js → diagram-L3MUGCDN-8VdVmcS6.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-BeUxqmw1.js → diagram-LA4NIPWU-Bej-aiF0.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-Dlg1S5na.js → diagram-MHCOC4E2-D8gW4bVQ.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-DQhRoMkK.js → diagram-XPFHEONP-BMevAJ1M.js} +1 -1
- package/dist/public/assets/{dist-CQU8zJh_.js → dist-DBKJcjvW.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-gVEs3Um2.js → ebnfDiagram-UZSYDL2S-C3HDTOzn.js} +1 -1
- package/dist/public/assets/{editor.api-SQ1snuat.js → editor.api-BMWdjwhK.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CHtlrPwu.js → elk-XV6XMXQE-XOOPrVin.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-B0xok726.js → erDiagram-EYBAPDEH-Cr-vwx1l.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-CFwphA0e.js → eventmodeling-K75KTNOO-DbPhpfxn.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CDXqnHAQ.js +1 -0
- package/dist/public/assets/{freemarker2-DJKO-X2B.js → freemarker2-6h_1-8qB.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-B5wVGN1A.js → ganttDiagram-23REXITY-C7kNPXx3.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-KPsoB6Z1.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DEjNU1R_.js → gitGraphDiagram-STJD7YCW-CVnEJEZr.js} +1 -1
- package/dist/public/assets/{handlebars-ChVN7JPd.js → handlebars-F4lp3oLr.js} +1 -1
- package/dist/public/assets/{html-CQ0znKSa.js → html-Dj6f8B_g.js} +1 -1
- package/dist/public/assets/{index-CLlacdXR.js → index-DnNrrk68.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-CtM6s0SQ.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-CJtrS72M.js → infoDiagram-KBXO4MBG-DcttQWdp.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-qYI1QBsK.js → ishikawaDiagram-M35NCXHK-BSUYTZf6.js} +1 -1
- package/dist/public/assets/{javascript-B-DHbkyI.js → javascript-b_BkOE5Y.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-BOQ2y2ZZ.js → journeyDiagram-OPLOXDXO-BCfd5-6n.js} +1 -1
- package/dist/public/assets/{jsonMode-XuGC5N_z.js → jsonMode-Cq5QJbVZ.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-BJ64tKdP.js → kanban-definition-BZKZHSQY-B3nenaw_.js} +1 -1
- package/dist/public/assets/{liquid-B0Ujylzc.js → liquid-CGuZI_Aa.js} +1 -1
- package/dist/public/assets/{mdx-B19-V510.js → mdx-Dt9yTqnf.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Scb01iBq.js → mermaid-parser.core-CquzROwT.js} +3 -3
- package/dist/public/assets/{mermaid.core-BMuvs7us.js → mermaid.core-Bx-e_Scq.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-BYfOS3XN.js → mindmap-definition-I2QAS2VK-DyeewbnH.js} +1 -1
- package/dist/public/assets/module-C-ofp7U4.js +1 -0
- package/dist/public/assets/{module-DOrYVZ7B.js → module-dnDlIzeV.js} +79 -78
- package/dist/public/assets/{monaco-Bbe2os7m.js → monaco-nvIdDTWu.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-XKjiwdar.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-D-Vlq9Gm.js → pegDiagram-FD4XPPHP-B884_KoR.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-MuCMavHL.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-_-94-aMD.js → pieDiagram-J4AKIIQI-I40wRwyy.js} +1 -1
- package/dist/public/assets/{python-CWnMIOYq.js → python-Djw4wvG9.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-BhFUbUYz.js → quadrantDiagram-XTYBLID2-DyNOImfk.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-Cq12GHJS.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-CfeMswZU.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-yUa9GGCQ.js → railroad-abnf-LNEFI6M7-3G0zWzgf.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-xY4YiL8M.js → railroad-ebnf-DWYD2UWJ-B5XRDRWS.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-BYFYCUAQ.js → railroad-peg-JR7BVNR7-rcIioIyH.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-C9FVhj0k.js → railroadDiagram-MRQ6NCDL-CDM2ahQM.js} +1 -1
- package/dist/public/assets/{razor-bDtpN6EJ.js → razor-CStezNUn.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-DLmAg-6C.js → requirementDiagram-Y7LWUY3S-hbb6WtfM.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Bl5IpDk4.js → sankeyDiagram-WGJFYUXA-DLV3Aoae.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Z-N0OiT_.js → sequenceDiagram-5NDRBG5M-BWxOV5U9.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-ctKQz8Mo.js → stateDiagram-v2-FJ4FJNEA-C-TaUPaQ.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-CWLKnALg.js → swimlanes-UMQ2AFYF-CJY0BFmc.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DdFDl6aK.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DP8Ph_d6.js → timeline-definition-SEUHKTQE-CUfQb8Gv.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-BQ4uUy4s.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BFTTkjF9.js +1 -0
- package/dist/public/assets/{typescript-CGpNlLbn.js → typescript-B7kmi8MF.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-DvFjNj3J.js → usecaseDiagram-AFA6YXN4-BKTVAp-G.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-3m2F2H-I.js → vennDiagram-NNMJR3RB-CN1RxNTS.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-BbyzsA8S.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-CsMntu16.js → wardleyDiagram-S7YFUSEH-JJ6qcpu1.js} +1 -1
- package/dist/public/assets/{xml-ByiLoakX.js → xml-DVamlHEU.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-C80rxvM0.js → xychartDiagram-GGNKY7IX-BNakYgUZ.js} +1 -1
- package/dist/public/assets/{yaml-Cz2Af5Rj.js → yaml-BihGeFrM.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +5283 -4884
- package/package.json +39 -39
- package/dist/public/assets/cynefin-EF2NZ3EQ-yFytgtiy.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-Cwye_DsX.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BYzb--zb.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-na0qX3JP.js +0 -1
- package/dist/public/assets/module-B3SKdB70.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-jhCd70vR.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-DV0NJFsI.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Co-Hlf34.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-DKMPEjDD.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CU76xJSu.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-JMMnu_MW.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-CPlAD3X1.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-Dhc8wpLp.js +0 -1
package/dist/pi/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @celljs/ta
|
|
2
2
|
|
|
3
|
+
## 4.16.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0c55cb1: Cloud workspaces, as Remote SSH without ssh: Ta on a computer works in the directories of its account's sandbox on a Ta gateway (or of any Ta service), `ta://<name>/<path>`, its agent staying on the computer. On the gateway, Settings, Environment, Use it from another Ta makes a token of one's account; in the other Ta, Settings, Remote hosts, Add a cloud workspace takes the gateway's address, the token and a name, checked by connecting first and kept where only its user reads it. The gateway forwards `/api/exec` to the sandbox (counted as a page connected; refused while suspended or out of minutes), whose ta serve answers it with its exec server for its owner's token alone.
|
|
8
|
+
- 60332f5: ta gateway gives its sandboxes models, and holds members to tokens a month: models.json of the gateway (pi's format, keys by the name of a variable of its environment) lists the providers; each sandbox gets a model key of its own (TA_MODEL_PROXY_URL and TA_MODEL_PROXY_KEY), with which its ta serve puts those providers in its models.json at the gateway's /api/models. The gateway passes each call with the provider's key, which no sandbox has, counts the tokens and dollars the answer tells (OpenAI, the responses API, Anthropic, Google, streams too), and refuses the calls of a member past monthlyTokens with words pi does not retry. The console shows the models of the gateway, the tokens of each account against its limit, and takes the limit in the defaults and per account.
|
|
9
|
+
|
|
3
10
|
## 4.15.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/pi/package.json
CHANGED
|
@@ -37,6 +37,10 @@ var Acp;
|
|
|
37
37
|
return options?.find((option) => option.category === category) ?? options?.find((option) => option.id === category);
|
|
38
38
|
}
|
|
39
39
|
Acp.optionOf = optionOf;
|
|
40
|
+
function own(meta) {
|
|
41
|
+
return !Object.keys(meta ?? {}).some((key) => /(parentToolCallId|memberEvent)$/.test(key));
|
|
42
|
+
}
|
|
43
|
+
Acp.own = own;
|
|
40
44
|
})(Acp ||= {});
|
|
41
45
|
|
|
42
46
|
// src/agent-bindings.ts
|
|
@@ -275,7 +279,7 @@ class AgentTurn {
|
|
|
275
279
|
}
|
|
276
280
|
open() {
|
|
277
281
|
for (const run of this.tools.values()) {
|
|
278
|
-
if (!run.done && !run.left && !this.stepped.has(run.id)) {
|
|
282
|
+
if (!run.done && !run.left && !run.others && !this.stepped.has(run.id)) {
|
|
279
283
|
return true;
|
|
280
284
|
}
|
|
281
285
|
}
|
|
@@ -283,7 +287,7 @@ class AgentTurn {
|
|
|
283
287
|
}
|
|
284
288
|
step() {
|
|
285
289
|
for (const run of this.tools.values()) {
|
|
286
|
-
if (!run.done && !run.left) {
|
|
290
|
+
if (!run.done && !run.left && !run.others) {
|
|
287
291
|
this.stepped.add(run.id);
|
|
288
292
|
}
|
|
289
293
|
}
|
|
@@ -334,6 +338,7 @@ class AgentTurn {
|
|
|
334
338
|
output: "",
|
|
335
339
|
done: false,
|
|
336
340
|
left: false,
|
|
341
|
+
others: !Acp.own(update._meta),
|
|
337
342
|
complete: false,
|
|
338
343
|
terminal: "",
|
|
339
344
|
updatedAt: Date.now()
|
|
@@ -581,7 +586,7 @@ class AgentSession {
|
|
|
581
586
|
this.callbacks.title?.(this.title);
|
|
582
587
|
}
|
|
583
588
|
const phase = AgentSession.phase(meta);
|
|
584
|
-
if (phase && !ids.some((id) => this.earlier.has(id)) &&
|
|
589
|
+
if (phase && !ids.some((id) => this.earlier.has(id)) && Acp.own(meta)) {
|
|
585
590
|
this.phase(this.turn, phase, meta);
|
|
586
591
|
}
|
|
587
592
|
if (meta && Object.keys(meta).some((key) => /unsolicitedTurn$/.test(key)) && !this.turn) {
|
|
@@ -801,9 +806,6 @@ class AgentSession {
|
|
|
801
806
|
static internal(meta) {
|
|
802
807
|
return Object.entries(meta ?? {}).some(([key, value]) => /isCompactInternal$/.test(key) && value === true);
|
|
803
808
|
}
|
|
804
|
-
static own(meta) {
|
|
805
|
-
return !Object.keys(meta ?? {}).some((key) => /(parentToolCallId|memberEvent)$/.test(key));
|
|
806
|
-
}
|
|
807
809
|
static requestIds(meta) {
|
|
808
810
|
return Object.entries(meta ?? {}).filter(([key, value]) => /requestId$/i.test(key) && typeof value === "string" && value).map(([, value]) => value);
|
|
809
811
|
}
|
|
@@ -163,5 +163,7 @@ export declare namespace Acp {
|
|
|
163
163
|
function values(option: ConfigOption | undefined): SelectValue[];
|
|
164
164
|
/** The option of a category: the id is the key the protocol gives, the category what it means. */
|
|
165
165
|
function optionOf(options: ConfigOption[] | undefined, category: string): ConfigOption | undefined;
|
|
166
|
+
/** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
|
|
167
|
+
function own(meta: Record<string, unknown> | undefined): boolean;
|
|
166
168
|
}
|
|
167
169
|
//# sourceMappingURL=acp-protocol.d.ts.map
|
|
@@ -51,5 +51,10 @@ var Acp;
|
|
|
51
51
|
return (_a = options === null || options === void 0 ? void 0 : options.find(option => option.category === category)) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.find(option => option.id === category);
|
|
52
52
|
}
|
|
53
53
|
Acp.optionOf = optionOf;
|
|
54
|
+
/** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
|
|
55
|
+
function own(meta) {
|
|
56
|
+
return !Object.keys(meta !== null && meta !== void 0 ? meta : {}).some(key => /(parentToolCallId|memberEvent)$/.test(key));
|
|
57
|
+
}
|
|
58
|
+
Acp.own = own;
|
|
54
59
|
})(Acp || (exports.Acp = Acp = {}));
|
|
55
60
|
//# sourceMappingURL=acp-protocol.js.map
|
|
@@ -136,8 +136,6 @@ export declare class AgentSession {
|
|
|
136
136
|
}): number | undefined;
|
|
137
137
|
/** Whether an update is the agent's own bookkeeping, not for the user: the summary of a compaction (`<agent>/isCompactInternal`). */
|
|
138
138
|
static internal(meta: Record<string, unknown> | undefined): boolean;
|
|
139
|
-
/** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
|
|
140
|
-
static own(meta: Record<string, unknown> | undefined): boolean;
|
|
141
139
|
static requestIds(meta: Record<string, unknown> | undefined): string[];
|
|
142
140
|
/** What the agent says it is doing, if it says (CodeBuddy Code: `_meta['codebuddy.ai/agentPhase'].phase`). */
|
|
143
141
|
/** What an agent's `retrying` phase says of the retry (`…agentPhase` `retry`: `{ reason, attempt }`). */
|
|
@@ -67,7 +67,7 @@ class AgentSession {
|
|
|
67
67
|
}
|
|
68
68
|
const phase = AgentSession.phase(meta);
|
|
69
69
|
// A phase of a request before this prompt (the end of a compaction, say) is not this turn's, nor one of a subagent or a teammate.
|
|
70
|
-
if (phase && !ids.some(id => this.earlier.has(id)) &&
|
|
70
|
+
if (phase && !ids.some(id => this.earlier.has(id)) && acp_protocol_1.Acp.own(meta)) {
|
|
71
71
|
this.phase(this.turn, phase, meta);
|
|
72
72
|
}
|
|
73
73
|
if (meta && Object.keys(meta).some(key => /unsolicitedTurn$/.test(key)) && !this.turn) {
|
|
@@ -339,10 +339,6 @@ class AgentSession {
|
|
|
339
339
|
static internal(meta) {
|
|
340
340
|
return Object.entries(meta !== null && meta !== void 0 ? meta : {}).some(([key, value]) => /isCompactInternal$/.test(key) && value === true);
|
|
341
341
|
}
|
|
342
|
-
/** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
|
|
343
|
-
static own(meta) {
|
|
344
|
-
return !Object.keys(meta !== null && meta !== void 0 ? meta : {}).some(key => /(parentToolCallId|memberEvent)$/.test(key));
|
|
345
|
-
}
|
|
346
342
|
static requestIds(meta) {
|
|
347
343
|
return Object.entries(meta !== null && meta !== void 0 ? meta : {})
|
|
348
344
|
.filter(([key, value]) => /requestId$/i.test(key) && typeof value === 'string' && value)
|
|
@@ -31,6 +31,8 @@ export interface ToolRun {
|
|
|
31
31
|
done: boolean;
|
|
32
32
|
/** The agent went on to its next step without saying the call ended: it dropped it (a call of a tool it does not have, say). */
|
|
33
33
|
left: boolean;
|
|
34
|
+
/** A call of a subagent or a teammate of the agent, which goes on while the agent itself takes its next steps. */
|
|
35
|
+
others: boolean;
|
|
34
36
|
/** Its arguments are all there: the agent said so, or announced the call with them before running it. */
|
|
35
37
|
complete: boolean;
|
|
36
38
|
/** What its terminal printed, as some agents report it (Codex: `_meta.terminal_output_delta`). */
|
|
@@ -94,9 +96,12 @@ export declare class AgentTurn {
|
|
|
94
96
|
settle(id: string, quietMs: number, signal?: AbortSignal): Promise<void>;
|
|
95
97
|
/** The call once it ended, the agent went on without it, or the turn ended. */
|
|
96
98
|
waitTool(id: string, signal?: AbortSignal): Promise<ToolRun | undefined>;
|
|
97
|
-
/** Calls the agent started that neither ended nor were dropped, nor stepped past. */
|
|
99
|
+
/** Calls the agent itself started that neither ended nor were dropped, nor stepped past. */
|
|
98
100
|
open(): boolean;
|
|
99
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* The agent asks its model again: its calls before are over, said so or not, once their end had time to come.
|
|
103
|
+
* Those of its subagents and teammates are not: they work on meanwhile.
|
|
104
|
+
*/
|
|
100
105
|
step(): void;
|
|
101
106
|
/** The calls stepped past that did not end are dropped. */
|
|
102
107
|
protected leave(): void;
|
|
@@ -116,20 +116,23 @@ class AgentTurn {
|
|
|
116
116
|
await this.changed(signal);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
/** Calls the agent started that neither ended nor were dropped, nor stepped past. */
|
|
119
|
+
/** Calls the agent itself started that neither ended nor were dropped, nor stepped past. */
|
|
120
120
|
open() {
|
|
121
121
|
for (const run of this.tools.values()) {
|
|
122
|
-
if (!run.done && !run.left && !this.stepped.has(run.id)) {
|
|
122
|
+
if (!run.done && !run.left && !run.others && !this.stepped.has(run.id)) {
|
|
123
123
|
return true;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* The agent asks its model again: its calls before are over, said so or not, once their end had time to come.
|
|
130
|
+
* Those of its subagents and teammates are not: they work on meanwhile.
|
|
131
|
+
*/
|
|
129
132
|
step() {
|
|
130
133
|
var _a, _b;
|
|
131
134
|
for (const run of this.tools.values()) {
|
|
132
|
-
if (!run.done && !run.left) {
|
|
135
|
+
if (!run.done && !run.left && !run.others) {
|
|
133
136
|
this.stepped.add(run.id);
|
|
134
137
|
}
|
|
135
138
|
}
|
|
@@ -184,6 +187,7 @@ class AgentTurn {
|
|
|
184
187
|
output: '',
|
|
185
188
|
done: false,
|
|
186
189
|
left: false,
|
|
190
|
+
others: !acp_protocol_1.Acp.own(update._meta),
|
|
187
191
|
complete: false,
|
|
188
192
|
terminal: '',
|
|
189
193
|
updatedAt: Date.now(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-agents",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: other coding agents (CodeBuddy Code, Claude Code, Codex and any agent that speaks ACP) as models to pick, each running a conversation on its own harness",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -287,15 +287,47 @@ var TaGatewayServer = Symbol("TaGatewayServer");
|
|
|
287
287
|
var TaLocation;
|
|
288
288
|
(function(TaLocation2) {
|
|
289
289
|
TaLocation2.SSH = "ssh://";
|
|
290
|
+
TaLocation2.CLOUD = "ta://";
|
|
291
|
+
const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
290
292
|
const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
|
|
291
293
|
function isRemote(location) {
|
|
292
|
-
return location.startsWith(TaLocation2.SSH);
|
|
294
|
+
return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
|
|
293
295
|
}
|
|
294
296
|
TaLocation2.isRemote = isRemote;
|
|
297
|
+
function isCloud(host2) {
|
|
298
|
+
return !!host2 && host2.startsWith(TaLocation2.CLOUD);
|
|
299
|
+
}
|
|
300
|
+
TaLocation2.isCloud = isCloud;
|
|
301
|
+
function isCloudName(name) {
|
|
302
|
+
return CLOUD_NAME.test(name);
|
|
303
|
+
}
|
|
304
|
+
TaLocation2.isCloudName = isCloudName;
|
|
305
|
+
function cloud(name, path2 = "") {
|
|
306
|
+
return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
|
|
307
|
+
}
|
|
308
|
+
TaLocation2.cloud = cloud;
|
|
309
|
+
function cloudName(hostOrLocation) {
|
|
310
|
+
if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
|
|
314
|
+
const slash = rest.indexOf("/");
|
|
315
|
+
return slash < 0 ? rest : rest.slice(0, slash);
|
|
316
|
+
}
|
|
317
|
+
TaLocation2.cloudName = cloudName;
|
|
295
318
|
function parse(location) {
|
|
319
|
+
var _a;
|
|
296
320
|
if (!isRemote(location)) {
|
|
297
321
|
return;
|
|
298
322
|
}
|
|
323
|
+
if (location.startsWith(TaLocation2.CLOUD)) {
|
|
324
|
+
const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
|
|
325
|
+
if (!isCloudName(name)) {
|
|
326
|
+
throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
|
|
327
|
+
}
|
|
328
|
+
const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
|
|
329
|
+
return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
|
|
330
|
+
}
|
|
299
331
|
const rest = location.slice(TaLocation2.SSH.length);
|
|
300
332
|
const slash = rest.indexOf("/");
|
|
301
333
|
const host2 = slash < 0 ? rest : rest.slice(0, slash);
|
|
@@ -307,7 +339,7 @@ var TaLocation;
|
|
|
307
339
|
}
|
|
308
340
|
TaLocation2.parse = parse;
|
|
309
341
|
function isHost(host2) {
|
|
310
|
-
return HOST.test(host2);
|
|
342
|
+
return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
|
|
311
343
|
}
|
|
312
344
|
TaLocation2.isHost = isHost;
|
|
313
345
|
const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
|
|
@@ -371,10 +403,13 @@ var TaLocation;
|
|
|
371
403
|
}
|
|
372
404
|
TaLocation2.readHost = readHost;
|
|
373
405
|
function ssh(host2, path2 = "") {
|
|
374
|
-
return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
406
|
+
return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
375
407
|
}
|
|
376
408
|
TaLocation2.ssh = ssh;
|
|
377
409
|
function hostLabel(host2) {
|
|
410
|
+
if (isCloud(host2)) {
|
|
411
|
+
return host2.slice(TaLocation2.CLOUD.length);
|
|
412
|
+
}
|
|
378
413
|
const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
|
|
379
414
|
return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
|
|
380
415
|
}
|
|
@@ -46,15 +46,47 @@ var TaLanguageUtil;
|
|
|
46
46
|
var TaLocation;
|
|
47
47
|
(function(TaLocation2) {
|
|
48
48
|
TaLocation2.SSH = "ssh://";
|
|
49
|
+
TaLocation2.CLOUD = "ta://";
|
|
50
|
+
const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
49
51
|
const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
|
|
50
52
|
function isRemote(location) {
|
|
51
|
-
return location.startsWith(TaLocation2.SSH);
|
|
53
|
+
return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
|
|
52
54
|
}
|
|
53
55
|
TaLocation2.isRemote = isRemote;
|
|
56
|
+
function isCloud(host2) {
|
|
57
|
+
return !!host2 && host2.startsWith(TaLocation2.CLOUD);
|
|
58
|
+
}
|
|
59
|
+
TaLocation2.isCloud = isCloud;
|
|
60
|
+
function isCloudName(name) {
|
|
61
|
+
return CLOUD_NAME.test(name);
|
|
62
|
+
}
|
|
63
|
+
TaLocation2.isCloudName = isCloudName;
|
|
64
|
+
function cloud(name, path2 = "") {
|
|
65
|
+
return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
|
|
66
|
+
}
|
|
67
|
+
TaLocation2.cloud = cloud;
|
|
68
|
+
function cloudName(hostOrLocation) {
|
|
69
|
+
if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
|
|
73
|
+
const slash = rest.indexOf("/");
|
|
74
|
+
return slash < 0 ? rest : rest.slice(0, slash);
|
|
75
|
+
}
|
|
76
|
+
TaLocation2.cloudName = cloudName;
|
|
54
77
|
function parse(location) {
|
|
78
|
+
var _a;
|
|
55
79
|
if (!isRemote(location)) {
|
|
56
80
|
return;
|
|
57
81
|
}
|
|
82
|
+
if (location.startsWith(TaLocation2.CLOUD)) {
|
|
83
|
+
const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
|
|
84
|
+
if (!isCloudName(name)) {
|
|
85
|
+
throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
|
|
86
|
+
}
|
|
87
|
+
const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
|
|
88
|
+
return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
|
|
89
|
+
}
|
|
58
90
|
const rest = location.slice(TaLocation2.SSH.length);
|
|
59
91
|
const slash = rest.indexOf("/");
|
|
60
92
|
const host2 = slash < 0 ? rest : rest.slice(0, slash);
|
|
@@ -66,7 +98,7 @@ var TaLocation;
|
|
|
66
98
|
}
|
|
67
99
|
TaLocation2.parse = parse;
|
|
68
100
|
function isHost(host2) {
|
|
69
|
-
return HOST.test(host2);
|
|
101
|
+
return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
|
|
70
102
|
}
|
|
71
103
|
TaLocation2.isHost = isHost;
|
|
72
104
|
const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
|
|
@@ -130,10 +162,13 @@ var TaLocation;
|
|
|
130
162
|
}
|
|
131
163
|
TaLocation2.readHost = readHost;
|
|
132
164
|
function ssh(host2, path2 = "") {
|
|
133
|
-
return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
165
|
+
return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
134
166
|
}
|
|
135
167
|
TaLocation2.ssh = ssh;
|
|
136
168
|
function hostLabel(host2) {
|
|
169
|
+
if (isCloud(host2)) {
|
|
170
|
+
return host2.slice(TaLocation2.CLOUD.length);
|
|
171
|
+
}
|
|
137
172
|
const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
|
|
138
173
|
return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
|
|
139
174
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-channels",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: agents with roles of their own and channels where the user, Ta and the agents talk; Ta builds the team for what the user wants",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-computer-use",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: the desktop apps of this computer, used in the background through Cua Driver, which starts only when the agent first needs it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-cron",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: prompts that run on a schedule, once, every so often or by a cron expression, each run in a conversation of its own in the Ta service",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-extensions",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: the page of extensions, where the user makes one by saying what it should do, and hands extensions on or takes them in as one file",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -873,15 +873,47 @@ var TaGatewayServer = Symbol("TaGatewayServer");
|
|
|
873
873
|
var TaLocation;
|
|
874
874
|
(function(TaLocation2) {
|
|
875
875
|
TaLocation2.SSH = "ssh://";
|
|
876
|
+
TaLocation2.CLOUD = "ta://";
|
|
877
|
+
const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
876
878
|
const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
|
|
877
879
|
function isRemote(location) {
|
|
878
|
-
return location.startsWith(TaLocation2.SSH);
|
|
880
|
+
return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
|
|
879
881
|
}
|
|
880
882
|
TaLocation2.isRemote = isRemote;
|
|
883
|
+
function isCloud(host2) {
|
|
884
|
+
return !!host2 && host2.startsWith(TaLocation2.CLOUD);
|
|
885
|
+
}
|
|
886
|
+
TaLocation2.isCloud = isCloud;
|
|
887
|
+
function isCloudName(name) {
|
|
888
|
+
return CLOUD_NAME.test(name);
|
|
889
|
+
}
|
|
890
|
+
TaLocation2.isCloudName = isCloudName;
|
|
891
|
+
function cloud(name, path2 = "") {
|
|
892
|
+
return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
|
|
893
|
+
}
|
|
894
|
+
TaLocation2.cloud = cloud;
|
|
895
|
+
function cloudName(hostOrLocation) {
|
|
896
|
+
if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
|
|
900
|
+
const slash = rest.indexOf("/");
|
|
901
|
+
return slash < 0 ? rest : rest.slice(0, slash);
|
|
902
|
+
}
|
|
903
|
+
TaLocation2.cloudName = cloudName;
|
|
881
904
|
function parse(location) {
|
|
905
|
+
var _a;
|
|
882
906
|
if (!isRemote(location)) {
|
|
883
907
|
return;
|
|
884
908
|
}
|
|
909
|
+
if (location.startsWith(TaLocation2.CLOUD)) {
|
|
910
|
+
const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
|
|
911
|
+
if (!isCloudName(name)) {
|
|
912
|
+
throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
|
|
913
|
+
}
|
|
914
|
+
const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
|
|
915
|
+
return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
|
|
916
|
+
}
|
|
885
917
|
const rest = location.slice(TaLocation2.SSH.length);
|
|
886
918
|
const slash = rest.indexOf("/");
|
|
887
919
|
const host2 = slash < 0 ? rest : rest.slice(0, slash);
|
|
@@ -893,7 +925,7 @@ var TaLocation;
|
|
|
893
925
|
}
|
|
894
926
|
TaLocation2.parse = parse;
|
|
895
927
|
function isHost(host2) {
|
|
896
|
-
return HOST.test(host2);
|
|
928
|
+
return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
|
|
897
929
|
}
|
|
898
930
|
TaLocation2.isHost = isHost;
|
|
899
931
|
const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
|
|
@@ -957,10 +989,13 @@ var TaLocation;
|
|
|
957
989
|
}
|
|
958
990
|
TaLocation2.readHost = readHost;
|
|
959
991
|
function ssh(host2, path2 = "") {
|
|
960
|
-
return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
992
|
+
return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
|
|
961
993
|
}
|
|
962
994
|
TaLocation2.ssh = ssh;
|
|
963
995
|
function hostLabel(host2) {
|
|
996
|
+
if (isCloud(host2)) {
|
|
997
|
+
return host2.slice(TaLocation2.CLOUD.length);
|
|
998
|
+
}
|
|
964
999
|
const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
|
|
965
1000
|
return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
|
|
966
1001
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-games",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "A pi package for Ta: games and game-like extensions on Phaser and Three.js, the game engines of Ta's web page, with the ta-game skill and the Games page",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -6,6 +6,8 @@ A pi package that comes with Ta (on by default; Settings → Extensions of the w
|
|
|
6
6
|
- **Results as a card**: when a reply reports work done, results, a comparison, choices to make, or several facts or relations, Ta writes a `ta-glance` block (JSON) after the first line, which the web client draws as a card: key numbers, files changed (opened by a click), steps, before and after, bars, a flow, a Mermaid diagram, a table, choices to tap, risks and to-dos, buttons of what to ask next, folded details. The card grows as the reply streams.
|
|
7
7
|
- **Waiting for you**: a turn whose reply ends with a card of choices (`options`) or `status: "blocked"` is marked in the session with a `ta-ask` entry (`TA_ASK_ENTRY`, which the model never reads): the list of chats, its tab, the double's tasks and Quick open show that the conversation waits for you to decide, until you answer, by a tap or in words. Until then the card is framed in blue with a ?; once answered it shows the choice on every device, after a reload too (`WebCodeRendererProps.answer`).
|
|
8
8
|
- **Elsewhere**: the preview of the list of conversations shows the first line; replies to WeChat and WeCom bots draw no card and stay short paragraphs; `ta` in a terminal replies as before. External agents (ta-agents) get the section too.
|
|
9
|
+
- **Charts**: a key number may have a small line of its values over time (`trend`), and a card may have a line chart (`line`, up to 4 series) and the parts of a whole (`share`), drawn in plain SVG, with no library.
|
|
10
|
+
- **Icons**: a key number, a node of a flow, a choice, a note and a thing to ask next may have a lucide icon (`icon`), to tell items apart at a glance; the prompt gives the model 31 common ones and tells it never to write an emoji. An icon the page does not have is not drawn.
|
|
9
11
|
|
|
10
12
|
The card's format is in `web-src/glance-protocol.ts`, the prompt in `web-src/glance-prompt.ts`. Other packages draw cards for fenced blocks of their own languages with `registerCodeRenderer`.
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
|
|
|
6
6
|
- **结果画成卡片**:汇报完成的工作、结果、对比、要你选的方案、多个事实或关系时,Ta 在第一行之后写一个 `ta-glance` 代码块(JSON),Web 把它画成卡片:关键数字、改了的文件(点开)、步骤、前后对比、横条、流程、Mermaid 关系图、表格、可点选的方案、风险与待办、下一步按钮、折叠的细节。卡片随回复流式长出来。
|
|
7
7
|
- **待你决定**:一轮回复以带选项(`options`)或 `status: "blocked"` 的卡片结束时,pi 扩展在会话里记一条 `ta-ask`(`TA_ASK_ENTRY`,模型读不到),对话列表、标签、分身任务和快捷打开就显示这个对话在等你决定,直到你回答(点选或打字都算)。卡片在你回答前用蓝框和问号标出;回答后各设备都显示已选,刷新也保留(`WebCodeRendererProps.answer`)。
|
|
8
8
|
- **别处**:对话列表的预览显示第一行结论;发到微信、企业微信机器人的回复不画卡片,照常是短段落;终端里的 `ta` 回复照旧。外部 Agent(ta-agents)也会拿到这段写法。
|
|
9
|
+
- **图表**:关键数字可以带一条小走势线(`trend`),还有趋势线(`line`,最多 4 条)和占比(`share`),用原生 SVG 画、不加依赖。
|
|
10
|
+
- **图标**:关键数字、流程节点、方案、提示、下一步可以带一个 lucide 图标(`icon`),一眼分清各项说的是什么;提示词给模型 31 个常用图标,并要求不用 emoji。页面没有的图标不画。
|
|
9
11
|
|
|
10
12
|
卡片的格式见 `web-src/glance-protocol.ts`,提示词见 `web-src/glance-prompt.ts`。别的包也能用 `registerCodeRenderer` 为自己的代码块语言画卡片。
|
|
11
13
|
|