@f5-sales-demo/xcsh 20.16.0 → 20.18.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/package.json +8 -8
- package/src/browser/capabilities.generated.ts +8 -4
- package/src/browser/capabilities.json +94 -28
- package/src/browser/chat-conformance.json +659 -36
- package/src/browser/chat-handler.ts +43 -0
- package/src/browser/chat-protocol.ts +37 -1
- package/src/cli.ts +1 -0
- package/src/commands/herdr.ts +122 -0
- package/src/export/html/index.ts +53 -6
- package/src/export/html/template.css +7 -0
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +67 -2
- package/src/extensibility/extensions/bundled/herdr-terminal.ts +135 -0
- package/src/extensibility/extensions/loader.ts +2 -0
- package/src/herdr/client.ts +127 -0
- package/src/herdr/controller.ts +285 -0
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/internal-urls/docs-index.generated.ts +2 -1
- package/src/media/transport.ts +124 -0
- package/src/modes/acp/acp-agent.ts +18 -2
- package/src/modes/acp/acp-event-mapper.ts +27 -5
- package/src/modes/rpc/rpc-client.ts +26 -4
- package/src/modes/rpc/rpc-mode.ts +26 -1
- package/src/modes/rpc/rpc-types.ts +9 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.18.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
64
|
-
"@f5-sales-demo/pi-agent-core": "20.
|
|
65
|
-
"@f5-sales-demo/pi-ai": "20.
|
|
66
|
-
"@f5-sales-demo/pi-natives": "20.
|
|
67
|
-
"@f5-sales-demo/pi-resource-management": "20.
|
|
68
|
-
"@f5-sales-demo/pi-tui": "20.
|
|
69
|
-
"@f5-sales-demo/pi-utils": "20.
|
|
70
|
-
"@f5-sales-demo/xcsh-stats": "20.
|
|
64
|
+
"@f5-sales-demo/pi-agent-core": "20.18.0",
|
|
65
|
+
"@f5-sales-demo/pi-ai": "20.18.0",
|
|
66
|
+
"@f5-sales-demo/pi-natives": "20.18.0",
|
|
67
|
+
"@f5-sales-demo/pi-resource-management": "20.18.0",
|
|
68
|
+
"@f5-sales-demo/pi-tui": "20.18.0",
|
|
69
|
+
"@f5-sales-demo/pi-utils": "20.18.0",
|
|
70
|
+
"@f5-sales-demo/xcsh-stats": "20.18.0",
|
|
71
71
|
"@mozilla/readability": "^0.6",
|
|
72
72
|
"@sinclair/typebox": "^0.34",
|
|
73
73
|
"@xterm/headless": "^6.0",
|
|
@@ -26,7 +26,7 @@ export interface ExtensionCapabilities {
|
|
|
26
26
|
|
|
27
27
|
export const EXTENSION_CAPABILITIES: ExtensionCapabilities = {
|
|
28
28
|
"version": "0.1.0",
|
|
29
|
-
"contractVersion": "2.
|
|
29
|
+
"contractVersion": "2.1.0",
|
|
30
30
|
"multiPortDiscovery": true,
|
|
31
31
|
"protocol": "tool_request/result",
|
|
32
32
|
"tools": [
|
|
@@ -795,9 +795,13 @@ export const EXTENSION_CAPABILITIES: ExtensionCapabilities = {
|
|
|
795
795
|
"host_tool_call",
|
|
796
796
|
"host_tool_update",
|
|
797
797
|
"host_tool_result",
|
|
798
|
-
"host_tool_cancel"
|
|
798
|
+
"host_tool_cancel",
|
|
799
|
+
"chat_media",
|
|
800
|
+
"media_asset_read",
|
|
801
|
+
"media_asset_chunk",
|
|
802
|
+
"media_asset_error"
|
|
799
803
|
],
|
|
800
|
-
"description": "User ↔ xcsh chat over the bridge. The extension side panel sends chat_request (with mode and page-context snapshot); xcsh streams chat_delta tokens then a terminal chat_done (with reference links) or chat_error. Chat ids are prefixed \"c-\". Tool calls during a turn use the normal tool_request flow. chat_stop halts a streaming response. chat_tool_notice is emitted by the EXTENSION (the service worker) to the panel as a best-effort UI signal when a tool runs during a turn — it is NOT sent by xcsh; xcsh must not produce it to avoid double-rendering in the panel.",
|
|
804
|
+
"description": "User ↔ xcsh chat over the bridge. The extension side panel sends chat_request (with mode and page-context snapshot); xcsh streams chat_delta tokens then a terminal chat_done (with reference links) or chat_error. Chat ids are prefixed \"c-\". Tool calls during a turn use the normal tool_request flow. chat_stop halts a streaming response. chat_tool_notice is emitted by the EXTENSION (the service worker) to the panel as a best-effort UI signal when a tool runs during a turn — it is NOT sent by xcsh; xcsh must not produce it to avoid double-rendering in the panel. Rich media uses chat_media descriptors and bounded media_asset_read/media_asset_chunk exchanges; media_asset_error reports unavailable assets.",
|
|
801
805
|
"promptHints": {
|
|
802
806
|
"role": "You are xcsh, the AI assistant embedded in the F5 Distributed Cloud (XC) console side panel. The user is viewing a live console page; help them drive automation and understand settings and their purpose.",
|
|
803
807
|
"grounding": "Every user message carries a page-context snapshot: url/path, title, a trimmed accessibility tree, and — when available — the live XC API resource JSON the page loaded (context.api.body). Treat context.api.body as the authoritative current state of the resource and ground answers in it instead of guessing; respect the truncated flags.",
|
|
@@ -815,6 +819,6 @@ export const EXTENSION_CAPABILITIES: ExtensionCapabilities = {
|
|
|
815
819
|
}
|
|
816
820
|
};
|
|
817
821
|
|
|
818
|
-
export const EXTENSION_CONTRACT_VERSION = "2.
|
|
822
|
+
export const EXTENSION_CONTRACT_VERSION = "2.1.0";
|
|
819
823
|
|
|
820
824
|
export const EXTENSION_TOOL_NAMES: readonly string[] = ["ping","capabilities","reload","debug_exec","detach","set_bridge_port","navigate","scroll_to","resize_window","tabs_list","tabs_create","tabs_close","click","click_element","click_xy","type_text","form_input","key_press","select_option","label_select","file_upload","read_ax","get_page_text","query_dom","find","wait_for","assert_text","screenshot","read_console","read_network","diag_suspension","diag_bridges","diag_activation","diag_ttft","wait_for_api_response","get_page_context","javascript_tool","browser_batch","set_explain_mode","annotate"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
|
-
"contractVersion": "2.
|
|
3
|
+
"contractVersion": "2.1.0",
|
|
4
4
|
"multiPortDiscovery": true,
|
|
5
5
|
"protocol": "tool_request/result",
|
|
6
6
|
"tools": [
|
|
@@ -70,7 +70,9 @@
|
|
|
70
70
|
"category": "meta",
|
|
71
71
|
"params": {
|
|
72
72
|
"type": "object",
|
|
73
|
-
"required": [
|
|
73
|
+
"required": [
|
|
74
|
+
"port"
|
|
75
|
+
],
|
|
74
76
|
"properties": {
|
|
75
77
|
"port": {
|
|
76
78
|
"type": "number"
|
|
@@ -87,7 +89,9 @@
|
|
|
87
89
|
"category": "navigation",
|
|
88
90
|
"params": {
|
|
89
91
|
"type": "object",
|
|
90
|
-
"required": [
|
|
92
|
+
"required": [
|
|
93
|
+
"url"
|
|
94
|
+
],
|
|
91
95
|
"properties": {
|
|
92
96
|
"url": {
|
|
93
97
|
"type": "string"
|
|
@@ -104,7 +108,9 @@
|
|
|
104
108
|
"category": "navigation",
|
|
105
109
|
"params": {
|
|
106
110
|
"type": "object",
|
|
107
|
-
"required": [
|
|
111
|
+
"required": [
|
|
112
|
+
"ref"
|
|
113
|
+
],
|
|
108
114
|
"properties": {
|
|
109
115
|
"ref": {
|
|
110
116
|
"type": "string"
|
|
@@ -121,7 +127,10 @@
|
|
|
121
127
|
"category": "navigation",
|
|
122
128
|
"params": {
|
|
123
129
|
"type": "object",
|
|
124
|
-
"required": [
|
|
130
|
+
"required": [
|
|
131
|
+
"width",
|
|
132
|
+
"height"
|
|
133
|
+
],
|
|
125
134
|
"properties": {
|
|
126
135
|
"width": {
|
|
127
136
|
"type": "number"
|
|
@@ -151,7 +160,9 @@
|
|
|
151
160
|
"category": "navigation",
|
|
152
161
|
"params": {
|
|
153
162
|
"type": "object",
|
|
154
|
-
"required": [
|
|
163
|
+
"required": [
|
|
164
|
+
"url"
|
|
165
|
+
],
|
|
155
166
|
"properties": {
|
|
156
167
|
"url": {
|
|
157
168
|
"type": "string"
|
|
@@ -168,7 +179,9 @@
|
|
|
168
179
|
"category": "navigation",
|
|
169
180
|
"params": {
|
|
170
181
|
"type": "object",
|
|
171
|
-
"required": [
|
|
182
|
+
"required": [
|
|
183
|
+
"tabId"
|
|
184
|
+
],
|
|
172
185
|
"properties": {
|
|
173
186
|
"tabId": {
|
|
174
187
|
"type": "number"
|
|
@@ -185,7 +198,9 @@
|
|
|
185
198
|
"category": "interaction",
|
|
186
199
|
"params": {
|
|
187
200
|
"type": "object",
|
|
188
|
-
"required": [
|
|
201
|
+
"required": [
|
|
202
|
+
"ref"
|
|
203
|
+
],
|
|
189
204
|
"properties": {
|
|
190
205
|
"ref": {
|
|
191
206
|
"type": "string"
|
|
@@ -202,7 +217,9 @@
|
|
|
202
217
|
"category": "interaction",
|
|
203
218
|
"params": {
|
|
204
219
|
"type": "object",
|
|
205
|
-
"required": [
|
|
220
|
+
"required": [
|
|
221
|
+
"js"
|
|
222
|
+
],
|
|
206
223
|
"properties": {
|
|
207
224
|
"js": {
|
|
208
225
|
"type": "string"
|
|
@@ -222,7 +239,10 @@
|
|
|
222
239
|
"category": "interaction",
|
|
223
240
|
"params": {
|
|
224
241
|
"type": "object",
|
|
225
|
-
"required": [
|
|
242
|
+
"required": [
|
|
243
|
+
"x",
|
|
244
|
+
"y"
|
|
245
|
+
],
|
|
226
246
|
"properties": {
|
|
227
247
|
"x": {
|
|
228
248
|
"type": "number"
|
|
@@ -242,7 +262,9 @@
|
|
|
242
262
|
"category": "interaction",
|
|
243
263
|
"params": {
|
|
244
264
|
"type": "object",
|
|
245
|
-
"required": [
|
|
265
|
+
"required": [
|
|
266
|
+
"text"
|
|
267
|
+
],
|
|
246
268
|
"properties": {
|
|
247
269
|
"text": {
|
|
248
270
|
"type": "string"
|
|
@@ -259,7 +281,10 @@
|
|
|
259
281
|
"category": "interaction",
|
|
260
282
|
"params": {
|
|
261
283
|
"type": "object",
|
|
262
|
-
"required": [
|
|
284
|
+
"required": [
|
|
285
|
+
"ref",
|
|
286
|
+
"value"
|
|
287
|
+
],
|
|
263
288
|
"properties": {
|
|
264
289
|
"ref": {
|
|
265
290
|
"type": "string"
|
|
@@ -279,7 +304,9 @@
|
|
|
279
304
|
"category": "interaction",
|
|
280
305
|
"params": {
|
|
281
306
|
"type": "object",
|
|
282
|
-
"required": [
|
|
307
|
+
"required": [
|
|
308
|
+
"key"
|
|
309
|
+
],
|
|
283
310
|
"properties": {
|
|
284
311
|
"key": {
|
|
285
312
|
"type": "string"
|
|
@@ -296,7 +323,10 @@
|
|
|
296
323
|
"category": "interaction",
|
|
297
324
|
"params": {
|
|
298
325
|
"type": "object",
|
|
299
|
-
"required": [
|
|
326
|
+
"required": [
|
|
327
|
+
"ref",
|
|
328
|
+
"value"
|
|
329
|
+
],
|
|
300
330
|
"properties": {
|
|
301
331
|
"ref": {
|
|
302
332
|
"type": "string"
|
|
@@ -316,7 +346,10 @@
|
|
|
316
346
|
"category": "interaction",
|
|
317
347
|
"params": {
|
|
318
348
|
"type": "object",
|
|
319
|
-
"required": [
|
|
349
|
+
"required": [
|
|
350
|
+
"selector",
|
|
351
|
+
"value"
|
|
352
|
+
],
|
|
320
353
|
"properties": {
|
|
321
354
|
"selector": {
|
|
322
355
|
"type": "string"
|
|
@@ -342,7 +375,10 @@
|
|
|
342
375
|
"category": "interaction",
|
|
343
376
|
"params": {
|
|
344
377
|
"type": "object",
|
|
345
|
-
"required": [
|
|
378
|
+
"required": [
|
|
379
|
+
"ref",
|
|
380
|
+
"files"
|
|
381
|
+
],
|
|
346
382
|
"properties": {
|
|
347
383
|
"ref": {
|
|
348
384
|
"type": "string"
|
|
@@ -389,7 +425,9 @@
|
|
|
389
425
|
"category": "read",
|
|
390
426
|
"params": {
|
|
391
427
|
"type": "object",
|
|
392
|
-
"required": [
|
|
428
|
+
"required": [
|
|
429
|
+
"selector"
|
|
430
|
+
],
|
|
393
431
|
"properties": {
|
|
394
432
|
"selector": {
|
|
395
433
|
"type": "string"
|
|
@@ -406,7 +444,9 @@
|
|
|
406
444
|
"category": "read",
|
|
407
445
|
"params": {
|
|
408
446
|
"type": "object",
|
|
409
|
-
"required": [
|
|
447
|
+
"required": [
|
|
448
|
+
"selector"
|
|
449
|
+
],
|
|
410
450
|
"properties": {
|
|
411
451
|
"selector": {
|
|
412
452
|
"type": "string"
|
|
@@ -423,7 +463,9 @@
|
|
|
423
463
|
"category": "read",
|
|
424
464
|
"params": {
|
|
425
465
|
"type": "object",
|
|
426
|
-
"required": [
|
|
466
|
+
"required": [
|
|
467
|
+
"selector"
|
|
468
|
+
],
|
|
427
469
|
"properties": {
|
|
428
470
|
"selector": {
|
|
429
471
|
"type": "string"
|
|
@@ -446,7 +488,10 @@
|
|
|
446
488
|
"category": "read",
|
|
447
489
|
"params": {
|
|
448
490
|
"type": "object",
|
|
449
|
-
"required": [
|
|
491
|
+
"required": [
|
|
492
|
+
"selector",
|
|
493
|
+
"expected"
|
|
494
|
+
],
|
|
450
495
|
"properties": {
|
|
451
496
|
"selector": {
|
|
452
497
|
"type": "string"
|
|
@@ -584,7 +629,9 @@
|
|
|
584
629
|
"category": "script",
|
|
585
630
|
"params": {
|
|
586
631
|
"type": "object",
|
|
587
|
-
"required": [
|
|
632
|
+
"required": [
|
|
633
|
+
"code"
|
|
634
|
+
],
|
|
588
635
|
"properties": {
|
|
589
636
|
"code": {
|
|
590
637
|
"type": "string"
|
|
@@ -601,13 +648,17 @@
|
|
|
601
648
|
"category": "script",
|
|
602
649
|
"params": {
|
|
603
650
|
"type": "object",
|
|
604
|
-
"required": [
|
|
651
|
+
"required": [
|
|
652
|
+
"actions"
|
|
653
|
+
],
|
|
605
654
|
"properties": {
|
|
606
655
|
"actions": {
|
|
607
656
|
"type": "array",
|
|
608
657
|
"items": {
|
|
609
658
|
"type": "object",
|
|
610
|
-
"required": [
|
|
659
|
+
"required": [
|
|
660
|
+
"tool"
|
|
661
|
+
],
|
|
611
662
|
"properties": {
|
|
612
663
|
"tool": {
|
|
613
664
|
"type": "string"
|
|
@@ -642,7 +693,9 @@
|
|
|
642
693
|
"category": "annotation",
|
|
643
694
|
"params": {
|
|
644
695
|
"type": "object",
|
|
645
|
-
"required": [
|
|
696
|
+
"required": [
|
|
697
|
+
"kind"
|
|
698
|
+
],
|
|
646
699
|
"properties": {
|
|
647
700
|
"kind": {
|
|
648
701
|
"type": "string"
|
|
@@ -679,7 +732,10 @@
|
|
|
679
732
|
"tool": "annotate",
|
|
680
733
|
"requiresExplainMode": true,
|
|
681
734
|
"autoFingerprintOnClick": true,
|
|
682
|
-
"kinds": [
|
|
735
|
+
"kinds": [
|
|
736
|
+
"fingerprint",
|
|
737
|
+
"highlight"
|
|
738
|
+
],
|
|
683
739
|
"description": "Transient annotation overlays. In explain mode, clicks auto-draw a fingerprint; `annotate` draws a named overlay by ref or coordinates."
|
|
684
740
|
},
|
|
685
741
|
"capture": {
|
|
@@ -693,7 +749,13 @@
|
|
|
693
749
|
"chat": {
|
|
694
750
|
"contextTool": "get_page_context",
|
|
695
751
|
"transport": "websocket-bridge",
|
|
696
|
-
"modes": [
|
|
752
|
+
"modes": [
|
|
753
|
+
"educational",
|
|
754
|
+
"presentation",
|
|
755
|
+
"configuration",
|
|
756
|
+
"screenshot",
|
|
757
|
+
"annotation"
|
|
758
|
+
],
|
|
697
759
|
"messages": [
|
|
698
760
|
"chat_request",
|
|
699
761
|
"chat_delta",
|
|
@@ -707,9 +769,13 @@
|
|
|
707
769
|
"host_tool_call",
|
|
708
770
|
"host_tool_update",
|
|
709
771
|
"host_tool_result",
|
|
710
|
-
"host_tool_cancel"
|
|
772
|
+
"host_tool_cancel",
|
|
773
|
+
"chat_media",
|
|
774
|
+
"media_asset_read",
|
|
775
|
+
"media_asset_chunk",
|
|
776
|
+
"media_asset_error"
|
|
711
777
|
],
|
|
712
|
-
"description": "User ↔ xcsh chat over the bridge. The extension side panel sends chat_request (with mode and page-context snapshot); xcsh streams chat_delta tokens then a terminal chat_done (with reference links) or chat_error. Chat ids are prefixed \"c-\". Tool calls during a turn use the normal tool_request flow. chat_stop halts a streaming response. chat_tool_notice is emitted by the EXTENSION (the service worker) to the panel as a best-effort UI signal when a tool runs during a turn — it is NOT sent by xcsh; xcsh must not produce it to avoid double-rendering in the panel.",
|
|
778
|
+
"description": "User ↔ xcsh chat over the bridge. The extension side panel sends chat_request (with mode and page-context snapshot); xcsh streams chat_delta tokens then a terminal chat_done (with reference links) or chat_error. Chat ids are prefixed \"c-\". Tool calls during a turn use the normal tool_request flow. chat_stop halts a streaming response. chat_tool_notice is emitted by the EXTENSION (the service worker) to the panel as a best-effort UI signal when a tool runs during a turn — it is NOT sent by xcsh; xcsh must not produce it to avoid double-rendering in the panel. Rich media uses chat_media descriptors and bounded media_asset_read/media_asset_chunk exchanges; media_asset_error reports unavailable assets.",
|
|
713
779
|
"promptHints": {
|
|
714
780
|
"role": "You are xcsh, the AI assistant embedded in the F5 Distributed Cloud (XC) console side panel. The user is viewing a live console page; help them drive automation and understand settings and their purpose.",
|
|
715
781
|
"grounding": "Every user message carries a page-context snapshot: url/path, title, a trimmed accessibility tree, and — when available — the live XC API resource JSON the page loaded (context.api.body). Treat context.api.body as the authoritative current state of the resource and ground answers in it instead of guessing; respect the truncated flags.",
|