@super-one/cli 0.67.0-alpha.3 → 0.68.0-alpha
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/MANIFEST.json +2 -2
- package/lib/cli.mjs +832 -110
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -400,10 +400,10 @@ var init_superone_tool_descriptions = __esm({
|
|
|
400
400
|
AUTOMATION_LIST_DESCRIPTION = "List project automations with schedule and last/next run. Pass id for full prompt, agentConfig, and schedule; filter by query or enabled. Find unknown ids here before automation_apply or automation_delete; check for duplicates before creation when needed.";
|
|
401
401
|
AUTOMATION_APPLY_DESCRIPTION = 'Create or update a project automation. create needs name, prompt, schedule; update needs id plus any field (pause via enabled=false). Call automation_list first for ids; remove with automation_delete. Always opens a user confirmation dialog and applies nothing without approval. For schedule and agentConfig shapes see read_manual({ domain: "product", topic: "automation" }).';
|
|
402
402
|
AUTOMATION_DELETE_DESCRIPTION = "Permanently delete project automations by id (from automation_list). Always opens a user confirmation dialog. Current project only. Prefer automation_list to choose ids first.";
|
|
403
|
-
TERMINAL_TABS_DESCRIPTION = "
|
|
403
|
+
TERMINAL_TABS_DESCRIPTION = "Only for commands that run until stopped (servers, watchers) or need keyboard input (REPLs, TUIs, ssh, wizards). Non-interactive commands that finish (build, test, install, git) use your shell tool, even if slow. action=list (default) returns this session's tabs plus the user's as a TOON table; other sessions' tabs are hidden. action=run asks to approve `command`, types it into a new or idle tab, and returns the screen; you control the tab only while that command is in the foreground. action=attach asks to control a command already running in a user tab. action=close kills a tab you opened, never one the user is using. For open tabs: terminal_act / terminal_wait_for / terminal_snapshot.";
|
|
404
404
|
TERMINAL_SNAPSHOT_DESCRIPTION = "Read a terminal tab as rendered text. `include` picks sections: screen (visible rows, default), scrollback (last `tail` lines including scrolled-off output), cursor, meta (title, cwd, status, foreground command, control). Use screen for prompts and full-screen programs, scrollback for server logs. Output over the tail cap is spilled to a file and returned as path + preview. Prefer this before terminal_act; use terminal_wait_for instead of polling.";
|
|
405
405
|
TERMINAL_ACT_DESCRIPTION = 'Send input to a terminal tab you control. actions is an array, e.g. [{type:"type",text:"yes"}] or [{type:"key",key:"Ctrl+C"}]; types: type (Enter by default), key (Enter, Tab, Escape, Up, Ctrl+C, F1\u2026), raw, resize, wait. ONE action per call by default; batch 2\u201320 only for an uninterruptible sequence (answer a wizard). Fail-fast. expect holds the call open until a screen condition is met (text, textGone, idleMs, exited); the screen after the batch is returned. Rejected with status=rejected when the approved command has exited or the user took over \u2014 do not retry, call terminal_tabs run again or ask. description is shown to the user instead of raw keystrokes.';
|
|
406
|
-
TERMINAL_WAIT_FOR_DESCRIPTION = "Block until a terminal tab reaches a state; conditions AND-combine: text (substring visible on screen or in new output), textGone, idleMs (no output for that long), exited (foreground command finished). Use after terminal_tabs run or terminal_act when output arrives asynchronously (a server banner, a
|
|
406
|
+
TERMINAL_WAIT_FOR_DESCRIPTION = "Block until a terminal tab reaches a state; conditions AND-combine: text (substring visible on screen or in new output), textGone, idleMs (no output for that long), exited (foreground command finished). Use after terminal_tabs run or terminal_act when output arrives asynchronously (a server banner, a watch rebuild finishing). timeoutMs default 15000, max 120000. Do not sleep+poll with terminal_snapshot yourself.";
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
|
|
@@ -2220,6 +2220,127 @@ var init_host_action_browser_descriptors = __esm({
|
|
|
2220
2220
|
"additionalProperties": false
|
|
2221
2221
|
}
|
|
2222
2222
|
},
|
|
2223
|
+
{
|
|
2224
|
+
"name": "browser_run",
|
|
2225
|
+
"description": "Experimental (requires the Jev fast loop setting): delegate a multi-step page goal \u2014 clicks, typing, scrolling \u2014 to a fast model that chooses each step and judges completion itself, so you do not pay a turn per click. Start with goal; add presets for values it may type (never passwords) and, optionally, done_when when the finish is machine-checkable. Before anything irreversible (submit, pay, delete, send, leaving the site) or when unsure, the call returns status=paused with a question; answer it by calling again with runId + answer. Every result carries the final snapshot: verify it. Use for click/fill-heavy tasks on one tab; use browser_act for single steps, drag, keys, uploads.",
|
|
2226
|
+
"inputSchema": {
|
|
2227
|
+
"type": "object",
|
|
2228
|
+
"properties": {
|
|
2229
|
+
"description": {
|
|
2230
|
+
"description": "Short, human-friendly summary of the goal for the user watching, in the conversation's language.",
|
|
2231
|
+
"type": "string"
|
|
2232
|
+
},
|
|
2233
|
+
"goal": {
|
|
2234
|
+
"description": 'What to achieve, said as what the page shows when it is done: the loop judges completion from the page text, so name the visible end state, not the steps. "Report.txt is listed inside Archive" rather than "drag Report.txt onto Archive"; "no sheet is open over the document window" rather than "press Escape". When a native condition can say it, pass done_when as well. Required to start a run.',
|
|
2235
|
+
"type": "string"
|
|
2236
|
+
},
|
|
2237
|
+
"presets": {
|
|
2238
|
+
"description": "Values the loop may type. Never include passwords.",
|
|
2239
|
+
"maxItems": 20,
|
|
2240
|
+
"type": "array",
|
|
2241
|
+
"items": {
|
|
2242
|
+
"type": "object",
|
|
2243
|
+
"properties": {
|
|
2244
|
+
"key": {
|
|
2245
|
+
"type": "string",
|
|
2246
|
+
"minLength": 1,
|
|
2247
|
+
"description": "Short name, e.g. Title."
|
|
2248
|
+
},
|
|
2249
|
+
"value": {
|
|
2250
|
+
"type": "string",
|
|
2251
|
+
"description": "The full text to type."
|
|
2252
|
+
},
|
|
2253
|
+
"field": {
|
|
2254
|
+
"description": 'Hint naming the field it belongs in, e.g. "the title textbox".',
|
|
2255
|
+
"type": "string"
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
"required": [
|
|
2259
|
+
"key",
|
|
2260
|
+
"value"
|
|
2261
|
+
],
|
|
2262
|
+
"additionalProperties": false
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
"maxSteps": {
|
|
2266
|
+
"description": "Default 30.",
|
|
2267
|
+
"type": "integer",
|
|
2268
|
+
"minimum": 1,
|
|
2269
|
+
"maximum": 100
|
|
2270
|
+
},
|
|
2271
|
+
"maxWallMs": {
|
|
2272
|
+
"description": "Wall-clock budget per call before pausing. Default 45000.",
|
|
2273
|
+
"type": "integer",
|
|
2274
|
+
"minimum": 5e3,
|
|
2275
|
+
"maximum": 3e5
|
|
2276
|
+
},
|
|
2277
|
+
"runId": {
|
|
2278
|
+
"description": "From a paused result. Resumes that run with `answer`.",
|
|
2279
|
+
"type": "string"
|
|
2280
|
+
},
|
|
2281
|
+
"answer": {
|
|
2282
|
+
"description": "Reply to the pending question when resuming.",
|
|
2283
|
+
"type": "object",
|
|
2284
|
+
"properties": {
|
|
2285
|
+
"questionId": {
|
|
2286
|
+
"type": "string"
|
|
2287
|
+
},
|
|
2288
|
+
"choice": {
|
|
2289
|
+
"description": 'An option key from the question, or "abort".',
|
|
2290
|
+
"type": "string"
|
|
2291
|
+
},
|
|
2292
|
+
"value": {
|
|
2293
|
+
"description": "For type=value questions: { text }; for reason=capability: { actions?: <this platform's *_act actions, run on snapshot.stateId>, presets?: [{ key, value, field? }] }.",
|
|
2294
|
+
"type": "object",
|
|
2295
|
+
"propertyNames": {
|
|
2296
|
+
"type": "string"
|
|
2297
|
+
},
|
|
2298
|
+
"additionalProperties": {}
|
|
2299
|
+
},
|
|
2300
|
+
"goal": {
|
|
2301
|
+
"description": "Optionally revise the goal.",
|
|
2302
|
+
"type": "string"
|
|
2303
|
+
},
|
|
2304
|
+
"abort": {
|
|
2305
|
+
"type": "boolean"
|
|
2306
|
+
}
|
|
2307
|
+
},
|
|
2308
|
+
"required": [
|
|
2309
|
+
"questionId"
|
|
2310
|
+
],
|
|
2311
|
+
"additionalProperties": false
|
|
2312
|
+
},
|
|
2313
|
+
"tab": {
|
|
2314
|
+
"description": "Browser view id. Omit to target the focused browser view.",
|
|
2315
|
+
"type": "string"
|
|
2316
|
+
},
|
|
2317
|
+
"done_when": {
|
|
2318
|
+
"description": "Optional machine-checkable finish (AND-combined, same vocabulary as browser_wait_for). The loop judges completion itself; give this when a URL or element defines it exactly.",
|
|
2319
|
+
"type": "object",
|
|
2320
|
+
"properties": {
|
|
2321
|
+
"selector": {
|
|
2322
|
+
"type": "string"
|
|
2323
|
+
},
|
|
2324
|
+
"selectorGone": {
|
|
2325
|
+
"type": "string"
|
|
2326
|
+
},
|
|
2327
|
+
"text": {
|
|
2328
|
+
"type": "string"
|
|
2329
|
+
},
|
|
2330
|
+
"urlIncludes": {
|
|
2331
|
+
"type": "string"
|
|
2332
|
+
},
|
|
2333
|
+
"urlMatches": {
|
|
2334
|
+
"description": "JavaScript regex source matched against the page URL.",
|
|
2335
|
+
"type": "string"
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"additionalProperties": false
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
"additionalProperties": false
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2223
2344
|
{
|
|
2224
2345
|
"name": "browser_action",
|
|
2225
2346
|
"description": "Saved semantic browser actions (dynamic catalog \u2014 list then do). action=list (optional domain/name; includeArchived to find archived flows). action=read returns one complete definition by domain+name. action=archive hides a flow and prevents execution; archived=false restores it. action=do runs one saved action with input. action=save creates or replaces a named flow (domain+name) \u2014 read the manual first. This does not record prior browser calls. Use browser_act for one-off clicks/types.",
|
|
@@ -2395,7 +2516,7 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2395
2516
|
HOST_ACTION_COMPUTER_DESCRIPTORS = [
|
|
2396
2517
|
{
|
|
2397
2518
|
"name": "computer_apps",
|
|
2398
|
-
"description": "Discover and open desktop apps. action=list (default) returns a compact TOON app catalog: one row per app with app, bundleId, running, frontmost, granted, grantScope, pid, windows. Use query to keyword-filter by display name / bundle id / localized aliases (e.g. query=Notes or com.apple.TextEdit). Paginate with offset + limit (default limit 25, max 100); hasMore means call again with offset+=limit. Rows are sorted running/frontmost/granted first. action=focus|launch accepts display name (any locale) or reverse-DNS bundleId; host resolves to a stable bundleId before the permission grant so one allow covers later snapshot/act. Launch/focus returns a slim {target} confirmation. If the user only asks to open an app, launch once and stop when target is returned.
|
|
2519
|
+
"description": "Discover and open desktop apps. action=list (default) returns a compact TOON app catalog: one row per app with app, bundleId, running, frontmost, granted, grantScope, pid, windows. Use query to keyword-filter by display name / bundle id / localized aliases (e.g. query=Notes or com.apple.TextEdit). Paginate with offset + limit (default limit 25, max 100); hasMore means call again with offset+=limit. Rows are sorted running/frontmost/granted first. action=focus|launch accepts display name (any locale) or reverse-DNS bundleId; host resolves to a stable bundleId before the permission grant so one allow covers later snapshot/act. Launch/focus returns a slim {target} confirmation. If the user only asks to open an app, launch once and stop when target is returned. For navigation, forms or search, prefer computer_run when Jev is enabled; batch known button sequences with computer_act. Focus only raises the window and leaves the app in the background; pass activate=true only when the app must stay the active app for a sequence of foreground-only steps (menu bar commands and \u2318 shortcuts work in the background; no activation is needed for them).",
|
|
2399
2520
|
"inputSchema": {
|
|
2400
2521
|
"type": "object",
|
|
2401
2522
|
"properties": {
|
|
@@ -2418,6 +2539,10 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2418
2539
|
"description": "Display name (any locale) or reverse-DNS bundle id for focus/launch. Prefer bundleId from a prior list when known.",
|
|
2419
2540
|
"type": "string"
|
|
2420
2541
|
},
|
|
2542
|
+
"activate": {
|
|
2543
|
+
"description": "focus only: make the app frontmost and keep it there. Leave unset so the user keeps their current app; menu bar commands do not need it.",
|
|
2544
|
+
"type": "boolean"
|
|
2545
|
+
},
|
|
2421
2546
|
"query": {
|
|
2422
2547
|
"description": "list only: keyword filter on app name / bundleId / aliases",
|
|
2423
2548
|
"type": "string"
|
|
@@ -2447,7 +2572,7 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2447
2572
|
},
|
|
2448
2573
|
{
|
|
2449
2574
|
"name": "computer_snapshot",
|
|
2450
|
-
"description": "Capture an immutable UI snapshot and return stateId (analogous to browser_snapshot for desktop apps). All subsequent query/act/wait_for calls must reference this stateId. mode=visual (and fused) saves the image to a temporary file and returns image.path (not base64). The image is NOT loaded into your context automatically; call Read on image.path if you need to look at pixels, and embed image.path in your reply when it is evidence of the result (read_manual product/show-your-work). mode=semantic returns accessibility outline with @eN refs (no image). mode=fused = screenshot + AX. The outline is a TOON table, not JSON: a header row outline[N]{ref,depth,role,name,value,x,y,w,h,can,state}: followed by one CSV-style row per node, in depth-first reading order. depth is the nesting level (a row is a child of the nearest row above it with a smaller depth). can lists only the supported actions, pipe-joined (press|setText|typeText|scroll|focus); empty means the node is inert. state lists only non-default flags (disabled|focused). x,y,w,h are the frame in capture space, empty when the node reports none. truncation.nodesOmitted > 0 means the returned outline was folded \u2014 reach the rest with computer_query, do not recapture. truncation.sourceTruncated means the native accessibility walk itself hit a limit, so those nodes are missing from the full tree too and computer_query cannot reach them either \u2014 narrow the target with capture=window or a specific rootId instead. Use computer_query on the cached outline for search/expand/inspect without recapturing. capture=window (default) captures only the selected window; coordinates are local to that image and remain valid if the window moves. Use capture=display explicitly when the whole display is required. If the window is resized or moves to a different display scale, input fails closed and a successor observation is created.",
|
|
2575
|
+
"description": "Capture an immutable UI snapshot and return stateId (analogous to browser_snapshot for desktop apps). All subsequent query/act/wait_for calls must reference this stateId. mode=visual (and fused) saves the image to a temporary file and returns image.path (not base64). The image is NOT loaded into your context automatically; call Read on image.path if you need to look at pixels, and embed image.path in your reply when it is evidence of the result (read_manual product/show-your-work). mode=semantic returns accessibility outline with @eN refs (no image). mode=fused = screenshot + AX. The outline is a TOON table, not JSON: a header row outline[N]{ref,depth,role,name,value,x,y,w,h,can,state}: followed by one CSV-style row per node, in depth-first reading order. depth is the nesting level (a row is a child of the nearest row above it with a smaller depth). can lists only the supported actions, pipe-joined (press|select|open|setText|typeText|scroll|focus); empty means the node is inert. state lists only non-default flags (disabled|focused). x,y,w,h are the frame in capture space, empty when the node reports none. truncation.nodesOmitted > 0 means the returned outline was folded \u2014 reach the rest with computer_query, do not recapture. truncation.sourceTruncated means the native accessibility walk itself hit a limit, so those nodes are missing from the full tree too and computer_query cannot reach them either \u2014 narrow the target with capture=window or a specific rootId instead. Use computer_query on the cached outline for search/expand/inspect without recapturing. capture=window (default) captures only the selected window; coordinates are local to that image and remain valid if the window moves. Use capture=display explicitly when the whole display is required. If the window is resized or moves to a different display scale, input fails closed and a successor observation is created.",
|
|
2451
2576
|
"inputSchema": {
|
|
2452
2577
|
"type": "object",
|
|
2453
2578
|
"properties": {
|
|
@@ -2576,7 +2701,7 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2576
2701
|
},
|
|
2577
2702
|
{
|
|
2578
2703
|
"name": "computer_act",
|
|
2579
|
-
"description":
|
|
2704
|
+
"description": `Submit 1\u201320 related UI actions as a checked transaction against a stateId. Batch a known button sequence here; prefer computer_run when each next target must be found from new UI state and Jev is enabled. Everything runs in the background: the host drives a ref through its native action when it has one and otherwise posts input to the app; the app is never brought forward and the user keeps their keyboard and pointer. Menu bar commands and \u2318 shortcuts (keypress keys=["cmd+s"]) work there too. Actions: click, typeText, keypress, scroll(dx,dy[,x,y|ref]), drag(path\u22652 points), moveMouse, press/select/open/setText (AX). click on a ref with a native press is that press; otherwise a pointer click at x,y or the ref's center. select chooses a selectable item; open invokes its observed native open action. typeText is keystrokes at the insertion point, subject to the app's own autocorrect and auto-capitalisation; setText sets a value exactly. scroll: positive dy scrolls content down; a ref with a scroll bar is paged by the bar and reports when it has no room left; else a wheel at x,y (capture space), the ref center or the window center. drag: path is capture-space points; virtual cursor animates along the path. Returns outcome worked|didnt|unknown based on re-observation (not API success codes): worked when AX readback, expect, typed text, or a meaningful successor outline diff confirms effect; unknown only when applied but unprovable; didnt on hard failure or failed expect. When the successor has pixels, successorImage.path contains the fresh screenshot. Set recording=true to save a short video containing only this action transaction. Stale stateId (UI changed since snapshot) is rejected before side effects. System-wide hotkeys (\u2318Space, \u2318Tab, screenshots) are not available; they belong to no app.`,
|
|
2580
2705
|
"inputSchema": {
|
|
2581
2706
|
"type": "object",
|
|
2582
2707
|
"properties": {
|
|
@@ -2600,6 +2725,8 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2600
2725
|
"type": "string",
|
|
2601
2726
|
"enum": [
|
|
2602
2727
|
"press",
|
|
2728
|
+
"select",
|
|
2729
|
+
"open",
|
|
2603
2730
|
"click",
|
|
2604
2731
|
"setText",
|
|
2605
2732
|
"typeText",
|
|
@@ -2677,17 +2804,36 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2677
2804
|
"notExists",
|
|
2678
2805
|
"textEquals",
|
|
2679
2806
|
"textContains",
|
|
2680
|
-
"valueEquals"
|
|
2807
|
+
"valueEquals",
|
|
2808
|
+
"newRoot"
|
|
2681
2809
|
]
|
|
2682
2810
|
},
|
|
2683
2811
|
"ref": {
|
|
2812
|
+
"description": "Required except for newRoot: the target element ref from the starting snapshot.",
|
|
2684
2813
|
"type": "string"
|
|
2685
2814
|
},
|
|
2686
2815
|
"text": {
|
|
2816
|
+
"description": "For textEquals/textContains: element name or value. For newRoot: substring in the new root outline.",
|
|
2687
2817
|
"type": "string"
|
|
2688
2818
|
},
|
|
2689
2819
|
"value": {
|
|
2820
|
+
"description": "Required for valueEquals: the exact element value to wait for.",
|
|
2821
|
+
"type": "string"
|
|
2822
|
+
},
|
|
2823
|
+
"title": {
|
|
2824
|
+
"description": "newRoot: exact title of a visible window, panel, sheet or menu in the same app that was absent at the starting snapshot.",
|
|
2690
2825
|
"type": "string"
|
|
2826
|
+
},
|
|
2827
|
+
"rootKind": {
|
|
2828
|
+
"description": "newRoot: optional kind filter. Supply title and/or text; all supplied filters must match.",
|
|
2829
|
+
"type": "string",
|
|
2830
|
+
"enum": [
|
|
2831
|
+
"window",
|
|
2832
|
+
"sheet",
|
|
2833
|
+
"dialog",
|
|
2834
|
+
"menu",
|
|
2835
|
+
"popover"
|
|
2836
|
+
]
|
|
2691
2837
|
}
|
|
2692
2838
|
},
|
|
2693
2839
|
"required": [
|
|
@@ -2695,24 +2841,15 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2695
2841
|
],
|
|
2696
2842
|
"additionalProperties": false
|
|
2697
2843
|
},
|
|
2698
|
-
"recording": {
|
|
2699
|
-
"description": "Save a video of only this action transaction. Default false.",
|
|
2700
|
-
"type": "boolean"
|
|
2701
|
-
},
|
|
2702
2844
|
"timeoutMs": {
|
|
2703
2845
|
"description": "Maximum wait for expect before the action is judged. Default 5000.",
|
|
2704
2846
|
"type": "integer",
|
|
2705
2847
|
"minimum": 100,
|
|
2706
2848
|
"maximum": 6e4
|
|
2707
2849
|
},
|
|
2708
|
-
"
|
|
2709
|
-
"description": "
|
|
2710
|
-
"type": "
|
|
2711
|
-
"enum": [
|
|
2712
|
-
"semantic",
|
|
2713
|
-
"app-directed",
|
|
2714
|
-
"physical"
|
|
2715
|
-
]
|
|
2850
|
+
"recording": {
|
|
2851
|
+
"description": "Save a video of only this action transaction. Default false.",
|
|
2852
|
+
"type": "boolean"
|
|
2716
2853
|
}
|
|
2717
2854
|
},
|
|
2718
2855
|
"required": [
|
|
@@ -2723,9 +2860,164 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2723
2860
|
"additionalProperties": false
|
|
2724
2861
|
}
|
|
2725
2862
|
},
|
|
2863
|
+
{
|
|
2864
|
+
"name": "computer_run",
|
|
2865
|
+
"description": `Experimental (Jev setting): pursue desktop UI goals with clicks, typing and scrolling chosen without a model turn per step. Start with app (launched in the background if it is not running) or root, and goal; no computer_apps or computer_snapshot call is needed first. If the exact sequence of buttons is already known, use computer_act with a batch instead. Example: presets=[{key:"Query",value:"cats",field:"Search"}], done_when={kind:"valueEquals",ref:"@e7",value:"cats"}. Native computer_wait_for conditions bind at run start. The loop judges each step's risk and the goal's completion itself; before anything irreversible (save, send, delete, quit, leaving the app) or when unsure it pauses with a question. Resume a pause with runId + answer. Phrase goal as the end state the window will show \u2014 a row inside a folder, a text area ending with a line, no sheet open, an icon in a corner of the icon view \u2014 since the loop reads state sentences like these off the window; prefer done_when when a condition can say it. Uses existing grants and tiers; skips secure fields. Use computer_act for single steps, drag, shortcuts or pixels.`,
|
|
2866
|
+
"inputSchema": {
|
|
2867
|
+
"type": "object",
|
|
2868
|
+
"properties": {
|
|
2869
|
+
"description": {
|
|
2870
|
+
"type": "string",
|
|
2871
|
+
"minLength": 1,
|
|
2872
|
+
"maxLength": 160,
|
|
2873
|
+
"description": "Short, human-friendly explanation of the goal for the user watching, in the conversation's language."
|
|
2874
|
+
},
|
|
2875
|
+
"goal": {
|
|
2876
|
+
"description": 'What to achieve, said as what the page shows when it is done: the loop judges completion from the page text, so name the visible end state, not the steps. "Report.txt is listed inside Archive" rather than "drag Report.txt onto Archive"; "no sheet is open over the document window" rather than "press Escape". When a native condition can say it, pass done_when as well. Required to start a run.',
|
|
2877
|
+
"type": "string"
|
|
2878
|
+
},
|
|
2879
|
+
"presets": {
|
|
2880
|
+
"description": "Values the loop may type. Never include passwords.",
|
|
2881
|
+
"maxItems": 20,
|
|
2882
|
+
"type": "array",
|
|
2883
|
+
"items": {
|
|
2884
|
+
"type": "object",
|
|
2885
|
+
"properties": {
|
|
2886
|
+
"key": {
|
|
2887
|
+
"type": "string",
|
|
2888
|
+
"minLength": 1,
|
|
2889
|
+
"description": "Short name, e.g. Title."
|
|
2890
|
+
},
|
|
2891
|
+
"value": {
|
|
2892
|
+
"type": "string",
|
|
2893
|
+
"description": "The full text to type."
|
|
2894
|
+
},
|
|
2895
|
+
"field": {
|
|
2896
|
+
"description": 'Hint naming the field it belongs in, e.g. "the title textbox".',
|
|
2897
|
+
"type": "string"
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
"required": [
|
|
2901
|
+
"key",
|
|
2902
|
+
"value"
|
|
2903
|
+
],
|
|
2904
|
+
"additionalProperties": false
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
"maxSteps": {
|
|
2908
|
+
"description": "Default 30.",
|
|
2909
|
+
"type": "integer",
|
|
2910
|
+
"minimum": 1,
|
|
2911
|
+
"maximum": 100
|
|
2912
|
+
},
|
|
2913
|
+
"maxWallMs": {
|
|
2914
|
+
"description": "Wall-clock budget per call before pausing. Default 45000.",
|
|
2915
|
+
"type": "integer",
|
|
2916
|
+
"minimum": 5e3,
|
|
2917
|
+
"maximum": 3e5
|
|
2918
|
+
},
|
|
2919
|
+
"runId": {
|
|
2920
|
+
"description": "From a paused result. Resumes that run with `answer`.",
|
|
2921
|
+
"type": "string"
|
|
2922
|
+
},
|
|
2923
|
+
"answer": {
|
|
2924
|
+
"description": "Reply to the pending question when resuming.",
|
|
2925
|
+
"type": "object",
|
|
2926
|
+
"properties": {
|
|
2927
|
+
"questionId": {
|
|
2928
|
+
"type": "string"
|
|
2929
|
+
},
|
|
2930
|
+
"choice": {
|
|
2931
|
+
"description": 'An option key from the question, or "abort".',
|
|
2932
|
+
"type": "string"
|
|
2933
|
+
},
|
|
2934
|
+
"value": {
|
|
2935
|
+
"description": "For type=value questions: { text }; for reason=capability: { actions?: <this platform's *_act actions, run on snapshot.stateId>, presets?: [{ key, value, field? }] }.",
|
|
2936
|
+
"type": "object",
|
|
2937
|
+
"propertyNames": {
|
|
2938
|
+
"type": "string"
|
|
2939
|
+
},
|
|
2940
|
+
"additionalProperties": {}
|
|
2941
|
+
},
|
|
2942
|
+
"goal": {
|
|
2943
|
+
"description": "Optionally revise the goal.",
|
|
2944
|
+
"type": "string"
|
|
2945
|
+
},
|
|
2946
|
+
"abort": {
|
|
2947
|
+
"type": "boolean"
|
|
2948
|
+
}
|
|
2949
|
+
},
|
|
2950
|
+
"required": [
|
|
2951
|
+
"questionId"
|
|
2952
|
+
],
|
|
2953
|
+
"additionalProperties": false
|
|
2954
|
+
},
|
|
2955
|
+
"app": {
|
|
2956
|
+
"description": "App name (any locale) or bundle id. Resolves the app grant and its window; an app that is not running or has no window is launched in the background and its first window awaited. Use app or root, not both.",
|
|
2957
|
+
"type": "string"
|
|
2958
|
+
},
|
|
2959
|
+
"root": {
|
|
2960
|
+
"description": "Root id from computer_snapshot/computer_apps. Omit to use the existing target.",
|
|
2961
|
+
"type": "string"
|
|
2962
|
+
},
|
|
2963
|
+
"done_when": {
|
|
2964
|
+
"description": 'Same conditions as computer_wait_for. Bind ref to an element in the starting snapshot, or use {kind:"newRoot",title:"Fonts"} for a new same-app window/panel. newRoot needs title and/or text; supplied filters must all match. No future ref is needed.',
|
|
2965
|
+
"type": "object",
|
|
2966
|
+
"properties": {
|
|
2967
|
+
"kind": {
|
|
2968
|
+
"type": "string",
|
|
2969
|
+
"enum": [
|
|
2970
|
+
"exists",
|
|
2971
|
+
"notExists",
|
|
2972
|
+
"textEquals",
|
|
2973
|
+
"textContains",
|
|
2974
|
+
"valueEquals",
|
|
2975
|
+
"newRoot"
|
|
2976
|
+
]
|
|
2977
|
+
},
|
|
2978
|
+
"ref": {
|
|
2979
|
+
"description": "Required except for newRoot: the target element ref from the starting snapshot.",
|
|
2980
|
+
"type": "string"
|
|
2981
|
+
},
|
|
2982
|
+
"text": {
|
|
2983
|
+
"description": "For textEquals/textContains: element name or value. For newRoot: substring in the new root outline.",
|
|
2984
|
+
"type": "string"
|
|
2985
|
+
},
|
|
2986
|
+
"value": {
|
|
2987
|
+
"description": "Required for valueEquals: the exact element value to wait for.",
|
|
2988
|
+
"type": "string"
|
|
2989
|
+
},
|
|
2990
|
+
"title": {
|
|
2991
|
+
"description": "newRoot: exact title of a visible window, panel, sheet or menu in the same app that was absent at the starting snapshot.",
|
|
2992
|
+
"type": "string"
|
|
2993
|
+
},
|
|
2994
|
+
"rootKind": {
|
|
2995
|
+
"description": "newRoot: optional kind filter. Supply title and/or text; all supplied filters must match.",
|
|
2996
|
+
"type": "string",
|
|
2997
|
+
"enum": [
|
|
2998
|
+
"window",
|
|
2999
|
+
"sheet",
|
|
3000
|
+
"dialog",
|
|
3001
|
+
"menu",
|
|
3002
|
+
"popover"
|
|
3003
|
+
]
|
|
3004
|
+
}
|
|
3005
|
+
},
|
|
3006
|
+
"required": [
|
|
3007
|
+
"kind"
|
|
3008
|
+
],
|
|
3009
|
+
"additionalProperties": false
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
"required": [
|
|
3013
|
+
"description"
|
|
3014
|
+
],
|
|
3015
|
+
"additionalProperties": false
|
|
3016
|
+
}
|
|
3017
|
+
},
|
|
2726
3018
|
{
|
|
2727
3019
|
"name": "computer_wait_for",
|
|
2728
|
-
"description": "Wait until a UI condition holds. Distinguishes preexisting (already true) from verified (became true). Do not sleep+poll with snapshot yourself.",
|
|
3020
|
+
"description": "Wait until a UI condition holds. Distinguishes preexisting (already true) from verified (became true); failed means the timeout ran out, and observed then carries what the element read as. Do not sleep+poll with snapshot yourself.",
|
|
2729
3021
|
"inputSchema": {
|
|
2730
3022
|
"type": "object",
|
|
2731
3023
|
"properties": {
|
|
@@ -2748,17 +3040,36 @@ var init_host_action_computer_descriptors = __esm({
|
|
|
2748
3040
|
"notExists",
|
|
2749
3041
|
"textEquals",
|
|
2750
3042
|
"textContains",
|
|
2751
|
-
"valueEquals"
|
|
3043
|
+
"valueEquals",
|
|
3044
|
+
"newRoot"
|
|
2752
3045
|
]
|
|
2753
3046
|
},
|
|
2754
3047
|
"ref": {
|
|
3048
|
+
"description": "Required except for newRoot: the target element ref from the starting snapshot.",
|
|
2755
3049
|
"type": "string"
|
|
2756
3050
|
},
|
|
2757
3051
|
"text": {
|
|
3052
|
+
"description": "For textEquals/textContains: element name or value. For newRoot: substring in the new root outline.",
|
|
2758
3053
|
"type": "string"
|
|
2759
3054
|
},
|
|
2760
3055
|
"value": {
|
|
3056
|
+
"description": "Required for valueEquals: the exact element value to wait for.",
|
|
3057
|
+
"type": "string"
|
|
3058
|
+
},
|
|
3059
|
+
"title": {
|
|
3060
|
+
"description": "newRoot: exact title of a visible window, panel, sheet or menu in the same app that was absent at the starting snapshot.",
|
|
2761
3061
|
"type": "string"
|
|
3062
|
+
},
|
|
3063
|
+
"rootKind": {
|
|
3064
|
+
"description": "newRoot: optional kind filter. Supply title and/or text; all supplied filters must match.",
|
|
3065
|
+
"type": "string",
|
|
3066
|
+
"enum": [
|
|
3067
|
+
"window",
|
|
3068
|
+
"sheet",
|
|
3069
|
+
"dialog",
|
|
3070
|
+
"menu",
|
|
3071
|
+
"popover"
|
|
3072
|
+
]
|
|
2762
3073
|
}
|
|
2763
3074
|
},
|
|
2764
3075
|
"required": [
|
|
@@ -3441,6 +3752,145 @@ var init_host_action_device_descriptors = __esm({
|
|
|
3441
3752
|
"additionalProperties": false
|
|
3442
3753
|
}
|
|
3443
3754
|
},
|
|
3755
|
+
{
|
|
3756
|
+
"name": "device_run",
|
|
3757
|
+
"description": 'Experimental (Jev setting): pursue a multi-step touch-device goal with taps, typing, swipes on the list that needs them, going back and long-presses chosen without a model turn per step. Requires existing device_request_control approval; never requests control. Start with goal (said as what the screen shows when done), optional device, presets and done_when; the loop judges risk and completion itself. Example: done_when={kind:"exists",label:"About"}. Risky or uncertain steps pause; resume with runId + answer. A capability pause takes device_act actions; its target bounds are screen fractions. Use device_act for known sequences, single steps, gestures or pixels.',
|
|
3758
|
+
"inputSchema": {
|
|
3759
|
+
"type": "object",
|
|
3760
|
+
"properties": {
|
|
3761
|
+
"description": {
|
|
3762
|
+
"type": "string",
|
|
3763
|
+
"minLength": 1,
|
|
3764
|
+
"maxLength": 160,
|
|
3765
|
+
"description": "Short, human-friendly explanation of the goal for the user watching, in the conversation's language."
|
|
3766
|
+
},
|
|
3767
|
+
"goal": {
|
|
3768
|
+
"description": 'What to achieve, said as what the page shows when it is done: the loop judges completion from the page text, so name the visible end state, not the steps. "Report.txt is listed inside Archive" rather than "drag Report.txt onto Archive"; "no sheet is open over the document window" rather than "press Escape". When a native condition can say it, pass done_when as well. Required to start a run.',
|
|
3769
|
+
"type": "string"
|
|
3770
|
+
},
|
|
3771
|
+
"presets": {
|
|
3772
|
+
"description": "Values the loop may type. Never include passwords.",
|
|
3773
|
+
"maxItems": 20,
|
|
3774
|
+
"type": "array",
|
|
3775
|
+
"items": {
|
|
3776
|
+
"type": "object",
|
|
3777
|
+
"properties": {
|
|
3778
|
+
"key": {
|
|
3779
|
+
"type": "string",
|
|
3780
|
+
"minLength": 1,
|
|
3781
|
+
"description": "Short name, e.g. Title."
|
|
3782
|
+
},
|
|
3783
|
+
"value": {
|
|
3784
|
+
"type": "string",
|
|
3785
|
+
"description": "The full text to type."
|
|
3786
|
+
},
|
|
3787
|
+
"field": {
|
|
3788
|
+
"description": 'Hint naming the field it belongs in, e.g. "the title textbox".',
|
|
3789
|
+
"type": "string"
|
|
3790
|
+
}
|
|
3791
|
+
},
|
|
3792
|
+
"required": [
|
|
3793
|
+
"key",
|
|
3794
|
+
"value"
|
|
3795
|
+
],
|
|
3796
|
+
"additionalProperties": false
|
|
3797
|
+
}
|
|
3798
|
+
},
|
|
3799
|
+
"maxSteps": {
|
|
3800
|
+
"description": "Default 30.",
|
|
3801
|
+
"type": "integer",
|
|
3802
|
+
"minimum": 1,
|
|
3803
|
+
"maximum": 100
|
|
3804
|
+
},
|
|
3805
|
+
"maxWallMs": {
|
|
3806
|
+
"description": "Wall-clock budget per call before pausing. Default 45000.",
|
|
3807
|
+
"type": "integer",
|
|
3808
|
+
"minimum": 5e3,
|
|
3809
|
+
"maximum": 3e5
|
|
3810
|
+
},
|
|
3811
|
+
"runId": {
|
|
3812
|
+
"description": "From a paused result. Resumes that run with `answer`.",
|
|
3813
|
+
"type": "string"
|
|
3814
|
+
},
|
|
3815
|
+
"answer": {
|
|
3816
|
+
"description": "Reply to the pending question when resuming.",
|
|
3817
|
+
"type": "object",
|
|
3818
|
+
"properties": {
|
|
3819
|
+
"questionId": {
|
|
3820
|
+
"type": "string"
|
|
3821
|
+
},
|
|
3822
|
+
"choice": {
|
|
3823
|
+
"description": 'An option key from the question, or "abort".',
|
|
3824
|
+
"type": "string"
|
|
3825
|
+
},
|
|
3826
|
+
"value": {
|
|
3827
|
+
"description": "For type=value questions: { text }; for reason=capability: { actions?: <this platform's *_act actions, run on snapshot.stateId>, presets?: [{ key, value, field? }] }.",
|
|
3828
|
+
"type": "object",
|
|
3829
|
+
"propertyNames": {
|
|
3830
|
+
"type": "string"
|
|
3831
|
+
},
|
|
3832
|
+
"additionalProperties": {}
|
|
3833
|
+
},
|
|
3834
|
+
"goal": {
|
|
3835
|
+
"description": "Optionally revise the goal.",
|
|
3836
|
+
"type": "string"
|
|
3837
|
+
},
|
|
3838
|
+
"abort": {
|
|
3839
|
+
"type": "boolean"
|
|
3840
|
+
}
|
|
3841
|
+
},
|
|
3842
|
+
"required": [
|
|
3843
|
+
"questionId"
|
|
3844
|
+
],
|
|
3845
|
+
"additionalProperties": false
|
|
3846
|
+
},
|
|
3847
|
+
"device": {
|
|
3848
|
+
"description": "A device already controlled by this session. Required when starting with more than one held device. A resumed run keeps its original device.",
|
|
3849
|
+
"type": "string"
|
|
3850
|
+
},
|
|
3851
|
+
"done_when": {
|
|
3852
|
+
"description": 'Same vocabulary as device_wait_for. label matches the entire accessibility name, which may combine a title and value; prefer an observed identifier. Refs are positional. Example: {kind:"exists",identifier:"details-page"}.',
|
|
3853
|
+
"type": "object",
|
|
3854
|
+
"properties": {
|
|
3855
|
+
"kind": {
|
|
3856
|
+
"type": "string",
|
|
3857
|
+
"enum": [
|
|
3858
|
+
"exists",
|
|
3859
|
+
"notExists",
|
|
3860
|
+
"textEquals",
|
|
3861
|
+
"textContains"
|
|
3862
|
+
]
|
|
3863
|
+
},
|
|
3864
|
+
"ref": {
|
|
3865
|
+
"description": "Only valid within the snapshot it came from; prefer label or identifier when waiting.",
|
|
3866
|
+
"type": "string"
|
|
3867
|
+
},
|
|
3868
|
+
"label": {
|
|
3869
|
+
"description": "Visible name of the element.",
|
|
3870
|
+
"type": "string"
|
|
3871
|
+
},
|
|
3872
|
+
"identifier": {
|
|
3873
|
+
"description": "Developer-assigned id. Survives copy changes and translation \u2014 the most durable target.",
|
|
3874
|
+
"type": "string"
|
|
3875
|
+
},
|
|
3876
|
+
"text": {
|
|
3877
|
+
"description": "The string textEquals/textContains compares against. Required by those two kinds, and NOT a way to name an element \u2014 use label for that.",
|
|
3878
|
+
"type": "string",
|
|
3879
|
+
"minLength": 1
|
|
3880
|
+
}
|
|
3881
|
+
},
|
|
3882
|
+
"required": [
|
|
3883
|
+
"kind"
|
|
3884
|
+
],
|
|
3885
|
+
"additionalProperties": false
|
|
3886
|
+
}
|
|
3887
|
+
},
|
|
3888
|
+
"required": [
|
|
3889
|
+
"description"
|
|
3890
|
+
],
|
|
3891
|
+
"additionalProperties": false
|
|
3892
|
+
}
|
|
3893
|
+
},
|
|
3444
3894
|
{
|
|
3445
3895
|
"name": "device_wait_for",
|
|
3446
3896
|
"description": "Wait until the screen satisfies a condition, instead of snapshotting in a loop. Target the element by label or identifier, never by ref: refs belong to one snapshot and what you are waiting for usually does not exist yet \u2014 text only says what to compare, it never selects. Returns a fresh settled stateId and tree, and reports preexisting vs verified.",
|
|
@@ -3672,7 +4122,7 @@ var init_host_action_terminal_descriptors = __esm({
|
|
|
3672
4122
|
command: { type: "string", description: "run only. The command the user approves and that is typed into the shell." },
|
|
3673
4123
|
rule: {
|
|
3674
4124
|
type: "string",
|
|
3675
|
-
description: 'run only. The rule offered as "always allow in this project"
|
|
4125
|
+
description: 'run only. The rule offered next to the approval as "allow for this session" / "always allow in this project": a JavaScript regular expression matched against the whole normalized command, e.g. "bun run( .*)?" for "bun run dev", "(\\w+=\\S+ )*bun run dev( .*)?" for "REMOTE_DEBUGGING_PORT=9361 bun run dev", "git commit( .*)?" for "git commit -m \u2026". It must match `command`; keep it as narrow as the user would want (never "sudo.*" / "ssh.*"). Default: derived from the command.'
|
|
3676
4126
|
},
|
|
3677
4127
|
cwd: { type: "string", description: "run only. Absolute working directory for a new tab. Default: the session working directory." },
|
|
3678
4128
|
title: { type: "string", description: "run only. Tab title shown to the user. Default: the command name." },
|
|
@@ -8589,9 +9039,9 @@ var init_superone_system_prompt = __esm({
|
|
|
8589
9039
|
|
|
8590
9040
|
SuperOne tools cover browser, terminal and device control, media, widgets, sessions, collaboration, automations, settings, and mini-apps. Read only the manual topics needed for the task; reuse guidance already in context.
|
|
8591
9041
|
|
|
8592
|
-
Prefer SuperOne's built-in tools unless the user explicitly requests another tool or no suitable SuperOne tool is available.
|
|
9042
|
+
Prefer SuperOne's built-in tools for browser, device, media, widget and session work unless the user explicitly requests another tool or no suitable SuperOne tool is available. Running commands is the exception: your own shell tool stays the default (see Terminals).
|
|
8593
9043
|
|
|
8594
|
-
Terminals: your
|
|
9044
|
+
Terminals: run commands that finish without input in your shell tool, regardless of duration \u2014 a long build, a test suite or an install still belongs there. Use terminal_tabs run only for commands that run until stopped (dev server, watch mode, docker compose up, tail -f) or need keyboard input after launch (REPL, TUI, ssh, interactive wizard). Run those in the foreground of a tab instead of backgrounding them in the shell tool with \`&\`, nohup or setsid. Once a tab is open, use terminal_wait_for for the ready line or prompt, terminal_snapshot to read the screen, terminal_act to type or send keys, and terminal_tabs close when its job is done. Each command is approved by the user and your control ends when it exits; a rejected result means stop and ask, not retry.
|
|
8595
9045
|
|
|
8596
9046
|
Experience memory:
|
|
8597
9047
|
SuperOne keeps per-target experience notes on this node: browser_memory_* (domain), computer_memory_* (platform + appId), device_memory_* (platform + appId).
|
|
@@ -10898,7 +11348,7 @@ function isStaticHostOwnedSuperoneBareName(bare) {
|
|
|
10898
11348
|
function isStaticHostOwnedSuperoneToolQualified(qualifiedName) {
|
|
10899
11349
|
if (!qualifiedName.startsWith(MCP_SUPERONE_TOOL_PREFIX)) return false;
|
|
10900
11350
|
const bare = qualifiedName.slice(MCP_SUPERONE_TOOL_PREFIX.length);
|
|
10901
|
-
return isStaticHostOwnedSuperoneBareName(bare);
|
|
11351
|
+
return isStaticHostOwnedSuperoneBareName(bare) && !isNeverAutoAllowSuperoneBareName(bare);
|
|
10902
11352
|
}
|
|
10903
11353
|
function isNeverAutoAllowSuperoneBareName(bare) {
|
|
10904
11354
|
return NEVER_AUTO_ALLOW_SUPERONE_BARE_NAMES.includes(bare);
|
|
@@ -10938,6 +11388,7 @@ var init_superone_host_owned_tools = __esm({
|
|
|
10938
11388
|
"browser_emulate",
|
|
10939
11389
|
"browser_mock",
|
|
10940
11390
|
"browser_perf_measure",
|
|
11391
|
+
"browser_run",
|
|
10941
11392
|
"browser_tools_list",
|
|
10942
11393
|
"browser_tools_call"
|
|
10943
11394
|
];
|
|
@@ -10961,6 +11412,7 @@ var init_superone_host_owned_tools = __esm({
|
|
|
10961
11412
|
"browser_network",
|
|
10962
11413
|
"browser_perf",
|
|
10963
11414
|
"browser_action",
|
|
11415
|
+
"browser_run",
|
|
10964
11416
|
"browser_tools_list",
|
|
10965
11417
|
"browser_tools_call"
|
|
10966
11418
|
];
|
|
@@ -10977,6 +11429,7 @@ var init_superone_host_owned_tools = __esm({
|
|
|
10977
11429
|
"device_snapshot",
|
|
10978
11430
|
"device_query",
|
|
10979
11431
|
"device_act",
|
|
11432
|
+
"device_run",
|
|
10980
11433
|
"device_wait_for",
|
|
10981
11434
|
"device_release"
|
|
10982
11435
|
];
|
|
@@ -11028,7 +11481,7 @@ var init_superone_host_owned_tools = __esm({
|
|
|
11028
11481
|
];
|
|
11029
11482
|
MINIAPP_LIST_BARE_NAME = "miniapp_list";
|
|
11030
11483
|
MINIAPP_CALL_BARE_NAME = "miniapp_call";
|
|
11031
|
-
NEVER_AUTO_ALLOW_SUPERONE_BARE_NAMES = ["browser_tools_call"];
|
|
11484
|
+
NEVER_AUTO_ALLOW_SUPERONE_BARE_NAMES = ["browser_tools_call", "terminal_tabs"];
|
|
11032
11485
|
STATIC_HOST_OWNED_SUPERONE_QUALIFIED_TOOL_NAMES = [
|
|
11033
11486
|
...BUILT_IN_SUPERONE_TOOL_NAMES,
|
|
11034
11487
|
MINIAPP_LIST_BARE_NAME,
|
|
@@ -11037,6 +11490,70 @@ var init_superone_host_owned_tools = __esm({
|
|
|
11037
11490
|
}
|
|
11038
11491
|
});
|
|
11039
11492
|
|
|
11493
|
+
// ../../packages/shared/src/dead-stream-ledger.ts
|
|
11494
|
+
function evict(topLevel, attempt) {
|
|
11495
|
+
const blocks = [...attempt.toolUseIds].map((toolUseId) => ({ type: "tool_use", toolUseId }));
|
|
11496
|
+
if (topLevel && attempt.text) blocks.push({ type: "text", text: attempt.text, fromEnd: true });
|
|
11497
|
+
if (topLevel && attempt.thinking) blocks.push({ type: "thinking", thinking: attempt.thinking, fromEnd: true });
|
|
11498
|
+
return blocks.length > 0 ? { type: "content_retracted", messageId: attempt.messageId, blocks } : null;
|
|
11499
|
+
}
|
|
11500
|
+
function createDeadStreamLedger() {
|
|
11501
|
+
const attempts = /* @__PURE__ */ new Map();
|
|
11502
|
+
const attemptOf = (parentToolUseId, messageId) => {
|
|
11503
|
+
const key = scopeKey(parentToolUseId);
|
|
11504
|
+
let attempt = attempts.get(key);
|
|
11505
|
+
if (!attempt) {
|
|
11506
|
+
attempt = { messageId, toolUseIds: /* @__PURE__ */ new Set(), text: "", thinking: "" };
|
|
11507
|
+
attempts.set(key, attempt);
|
|
11508
|
+
}
|
|
11509
|
+
return attempt;
|
|
11510
|
+
};
|
|
11511
|
+
return {
|
|
11512
|
+
begin(parentToolUseId, messageId) {
|
|
11513
|
+
const key = scopeKey(parentToolUseId);
|
|
11514
|
+
const previous = attempts.get(key);
|
|
11515
|
+
attempts.set(key, { messageId, toolUseIds: /* @__PURE__ */ new Set(), text: "", thinking: "" });
|
|
11516
|
+
const retracted = previous ? evict(key === "", previous) : null;
|
|
11517
|
+
return retracted ? [retracted] : [];
|
|
11518
|
+
},
|
|
11519
|
+
announceToolUse(parentToolUseId, messageId, toolUseId) {
|
|
11520
|
+
if (toolUseId) attemptOf(parentToolUseId, messageId).toolUseIds.add(toolUseId);
|
|
11521
|
+
},
|
|
11522
|
+
announceText(parentToolUseId, messageId, text2) {
|
|
11523
|
+
if (parentToolUseId === null) attemptOf(parentToolUseId, messageId).text += text2;
|
|
11524
|
+
},
|
|
11525
|
+
announceThinking(parentToolUseId, messageId, thinking) {
|
|
11526
|
+
if (parentToolUseId === null) attemptOf(parentToolUseId, messageId).thinking += thinking;
|
|
11527
|
+
},
|
|
11528
|
+
confirm(parentToolUseId, content) {
|
|
11529
|
+
const attempt = attempts.get(scopeKey(parentToolUseId));
|
|
11530
|
+
if (!attempt || !Array.isArray(content)) return;
|
|
11531
|
+
for (const block of content) {
|
|
11532
|
+
if (!block || typeof block !== "object") continue;
|
|
11533
|
+
if (block.type === "tool_use" && typeof block.id === "string") attempt.toolUseIds.delete(block.id);
|
|
11534
|
+
else if (block.type === "text") attempt.text = "";
|
|
11535
|
+
else if (block.type === "thinking") attempt.thinking = "";
|
|
11536
|
+
}
|
|
11537
|
+
},
|
|
11538
|
+
flush() {
|
|
11539
|
+
const events = [];
|
|
11540
|
+
for (const [key, attempt] of attempts) {
|
|
11541
|
+
const retracted = evict(key === "", attempt);
|
|
11542
|
+
if (retracted) events.push(retracted);
|
|
11543
|
+
}
|
|
11544
|
+
attempts.clear();
|
|
11545
|
+
return events;
|
|
11546
|
+
}
|
|
11547
|
+
};
|
|
11548
|
+
}
|
|
11549
|
+
var scopeKey;
|
|
11550
|
+
var init_dead_stream_ledger = __esm({
|
|
11551
|
+
"../../packages/shared/src/dead-stream-ledger.ts"() {
|
|
11552
|
+
"use strict";
|
|
11553
|
+
scopeKey = (parentToolUseId) => parentToolUseId ?? "";
|
|
11554
|
+
}
|
|
11555
|
+
});
|
|
11556
|
+
|
|
11040
11557
|
// ../../packages/shared/src/model-fallback-wire.ts
|
|
11041
11558
|
function str(value) {
|
|
11042
11559
|
return typeof value === "string" && value ? value : void 0;
|
|
@@ -11188,6 +11705,7 @@ var init_harness_capabilities = __esm({
|
|
|
11188
11705
|
// each turn and keeps going until it is met, so there is no paused state —
|
|
11189
11706
|
// the goal is either live or cleared.
|
|
11190
11707
|
goal: { lifecycleArgs: ["clear"], canPause: false, transport: "slash", semantics: "condition" },
|
|
11708
|
+
terminalCommandApproval: "harness",
|
|
11191
11709
|
displayName: "Claude"
|
|
11192
11710
|
},
|
|
11193
11711
|
codex: {
|
|
@@ -11207,6 +11725,7 @@ var init_harness_capabilities = __esm({
|
|
|
11207
11725
|
// `thread/goal/{get,set,clear}` over the app server; SuperOne drives the
|
|
11208
11726
|
// follow-up turns itself, so every transition is an explicit RPC.
|
|
11209
11727
|
goal: { lifecycleArgs: [], canPause: true, transport: "rpc", semantics: "objective" },
|
|
11728
|
+
terminalCommandApproval: "harness",
|
|
11210
11729
|
displayName: "Codex"
|
|
11211
11730
|
},
|
|
11212
11731
|
acp: {
|
|
@@ -11239,6 +11758,7 @@ var init_harness_capabilities = __esm({
|
|
|
11239
11758
|
transport: "slash",
|
|
11240
11759
|
semantics: "objective"
|
|
11241
11760
|
},
|
|
11761
|
+
terminalCommandApproval: "harness",
|
|
11242
11762
|
displayName: "Others"
|
|
11243
11763
|
},
|
|
11244
11764
|
opencode: {
|
|
@@ -11255,6 +11775,7 @@ var init_harness_capabilities = __esm({
|
|
|
11255
11775
|
// Server-side `forkSession(id, anchor)` + `moveSession`.
|
|
11256
11776
|
supportsFork: true,
|
|
11257
11777
|
goal: null,
|
|
11778
|
+
terminalCommandApproval: "harness",
|
|
11258
11779
|
displayName: "OpenCode"
|
|
11259
11780
|
},
|
|
11260
11781
|
cursor: {
|
|
@@ -11272,6 +11793,8 @@ var init_harness_capabilities = __esm({
|
|
|
11272
11793
|
// SDK has no transcript-fork API; the adapter creates a blank agent.
|
|
11273
11794
|
supportsFork: false,
|
|
11274
11795
|
goal: null,
|
|
11796
|
+
// The @cursor/sdk local executor auto-approves custom tools with no host hook.
|
|
11797
|
+
terminalCommandApproval: "executor",
|
|
11275
11798
|
displayName: "Cursor"
|
|
11276
11799
|
},
|
|
11277
11800
|
dsh: {
|
|
@@ -11298,6 +11821,7 @@ var init_harness_capabilities = __esm({
|
|
|
11298
11821
|
// `runtime.forkSession` copies the log prefix up to an event seq.
|
|
11299
11822
|
supportsFork: true,
|
|
11300
11823
|
goal: null,
|
|
11824
|
+
terminalCommandApproval: "harness",
|
|
11301
11825
|
displayName: "DeepSeek"
|
|
11302
11826
|
}
|
|
11303
11827
|
};
|
|
@@ -11497,6 +12021,7 @@ function createClaudeAgentEventMapper(options) {
|
|
|
11497
12021
|
let lastAssistantUsage = null;
|
|
11498
12022
|
let lastTopLevelAssistantUuid = "";
|
|
11499
12023
|
const retractions = createRetractionLedger();
|
|
12024
|
+
const deadStreams = createDeadStreamLedger();
|
|
11500
12025
|
let lastReplayCheckpointId = "";
|
|
11501
12026
|
let lastAssistantTypedError;
|
|
11502
12027
|
let lastAssistantRequestId;
|
|
@@ -11824,6 +12349,7 @@ function createClaudeAgentEventMapper(options) {
|
|
|
11824
12349
|
const requestId = raw.request_id ?? raw.requestId;
|
|
11825
12350
|
if (requestId) lastAssistantRequestId = String(requestId);
|
|
11826
12351
|
if (raw.message?.model) lastAssistantModel = String(raw.message.model);
|
|
12352
|
+
deadStreams.confirm(assistantParent, raw.message?.content);
|
|
11827
12353
|
if (!assistantParent) {
|
|
11828
12354
|
lastTopLevelAssistantUuid = raw.uuid ?? "";
|
|
11829
12355
|
for (const retracted of retractions.resolve(raw.supersedes)) emit(retracted);
|
|
@@ -11900,16 +12426,19 @@ ${text2}` : text2;
|
|
|
11900
12426
|
const toolName = event.content_block.name ?? "unknown";
|
|
11901
12427
|
activeToolBlocks.set(event.index, toolUseId);
|
|
11902
12428
|
toolIdToName.set(toolUseId, toolName);
|
|
12429
|
+
deadStreams.announceToolUse(streamParent, messageId, toolUseId);
|
|
11903
12430
|
emit({ type: "content_delta", messageId, delta: { type: "tool_use", toolName, toolUseId, input: "", status: "streaming", parentToolUseId: streamParent } });
|
|
11904
12431
|
} else if (event.type === "content_block_start" && event.content_block?.type === "thinking") {
|
|
11905
12432
|
const timestamp = now();
|
|
11906
12433
|
emit({ type: "content_delta", messageId, delta: { type: "thinking", thinking: "", parentToolUseId: streamParent, startedAt: timestamp, endedAt: timestamp } });
|
|
11907
12434
|
} else if (event.type === "content_block_delta") {
|
|
11908
12435
|
if (event.delta?.type === "text_delta" && event.delta.text) {
|
|
12436
|
+
deadStreams.announceText(streamParent, messageId, event.delta.text);
|
|
11909
12437
|
emit({ type: "content_delta", messageId, delta: { type: "text", text: event.delta.text, parentToolUseId: streamParent } });
|
|
11910
12438
|
return { ...emptyResult(sessionId), textDelta: event.delta.text };
|
|
11911
12439
|
}
|
|
11912
12440
|
if (event.delta?.type === "thinking_delta" && typeof event.delta.thinking === "string") {
|
|
12441
|
+
deadStreams.announceThinking(streamParent, messageId, event.delta.thinking);
|
|
11913
12442
|
emit({ type: "content_delta", messageId, delta: { type: "thinking", thinking: event.delta.thinking, parentToolUseId: streamParent, endedAt: now() } });
|
|
11914
12443
|
} else if (event.delta?.type === "input_json_delta" && event.delta.partial_json) {
|
|
11915
12444
|
emit({
|
|
@@ -11923,6 +12452,7 @@ ${text2}` : text2;
|
|
|
11923
12452
|
} else if (event.type === "content_block_stop") {
|
|
11924
12453
|
activeToolBlocks.delete(event.index);
|
|
11925
12454
|
} else if (event.type === "message_start") {
|
|
12455
|
+
for (const retracted of deadStreams.begin(streamParent, messageId)) emit(retracted);
|
|
11926
12456
|
emit({ type: "stream_message_start", messageId, apiMessageId: event.message?.id ?? "", model: event.message?.model ?? "", parentToolUseId: streamParent });
|
|
11927
12457
|
} else if (event.type === "message_stop") {
|
|
11928
12458
|
emit({ type: "stream_message_stop", messageId, parentToolUseId: streamParent });
|
|
@@ -11993,6 +12523,8 @@ ${text2}` : text2;
|
|
|
11993
12523
|
rejectedRateLimit: hasRejectedRateLimit,
|
|
11994
12524
|
resetsAt: rejectedRateLimitResetsAt
|
|
11995
12525
|
});
|
|
12526
|
+
const ghosts = deadStreams.flush();
|
|
12527
|
+
if (!interrupted) for (const retracted of ghosts) emit(retracted);
|
|
11996
12528
|
if (interrupted) {
|
|
11997
12529
|
emit({ type: "message_interrupted", messageId, metadata });
|
|
11998
12530
|
activeBackgroundTasks.clear();
|
|
@@ -12057,6 +12589,7 @@ ${text2}` : text2;
|
|
|
12057
12589
|
var init_agent_event_mapper2 = __esm({
|
|
12058
12590
|
"../../packages/claude/src/agent-event-mapper.ts"() {
|
|
12059
12591
|
"use strict";
|
|
12592
|
+
init_dead_stream_ledger();
|
|
12060
12593
|
init_model_fallback_wire();
|
|
12061
12594
|
init_slash_commands();
|
|
12062
12595
|
init_session_goal();
|
|
@@ -12277,6 +12810,22 @@ var init_map_sdk_message = __esm({
|
|
|
12277
12810
|
}
|
|
12278
12811
|
});
|
|
12279
12812
|
|
|
12813
|
+
// ../../packages/claude/src/provider-settings-env.ts
|
|
12814
|
+
function providerSettingsEnv(providerEnv) {
|
|
12815
|
+
if (!providerEnv) return void 0;
|
|
12816
|
+
const env = {};
|
|
12817
|
+
for (const [key, value] of Object.entries(providerEnv)) {
|
|
12818
|
+
if (value !== void 0) env[key] = value;
|
|
12819
|
+
}
|
|
12820
|
+
if (env.ANTHROPIC_API_KEY && !("ANTHROPIC_AUTH_TOKEN" in env)) env.ANTHROPIC_AUTH_TOKEN = "";
|
|
12821
|
+
return Object.keys(env).length > 0 ? env : void 0;
|
|
12822
|
+
}
|
|
12823
|
+
var init_provider_settings_env = __esm({
|
|
12824
|
+
"../../packages/claude/src/provider-settings-env.ts"() {
|
|
12825
|
+
"use strict";
|
|
12826
|
+
}
|
|
12827
|
+
});
|
|
12828
|
+
|
|
12280
12829
|
// ../../packages/claude/src/resolve-sdk-binary.ts
|
|
12281
12830
|
import { createRequire } from "node:module";
|
|
12282
12831
|
import { existsSync as existsSync5 } from "node:fs";
|
|
@@ -12444,6 +12993,7 @@ var init_run_sdk_turn = __esm({
|
|
|
12444
12993
|
init_superone_host_owned_tools();
|
|
12445
12994
|
init_map_sdk_message();
|
|
12446
12995
|
init_agent_event_mapper2();
|
|
12996
|
+
init_provider_settings_env();
|
|
12447
12997
|
init_resolve_sdk_binary();
|
|
12448
12998
|
init_root_permission_guard();
|
|
12449
12999
|
init_ask_user_question_bridge();
|
|
@@ -12533,9 +13083,21 @@ function hasProviderModelMappingEnv(env) {
|
|
|
12533
13083
|
if (!env) return false;
|
|
12534
13084
|
return MODEL_MAPPING_ENV_IDS.some((key) => !!env[key]);
|
|
12535
13085
|
}
|
|
13086
|
+
function claudeIdToBucket(id) {
|
|
13087
|
+
const lower = id.toLowerCase();
|
|
13088
|
+
if (lower.includes("opus")) return "opus";
|
|
13089
|
+
if (lower.includes("sonnet")) return "sonnet";
|
|
13090
|
+
if (lower.includes("haiku")) return "haiku";
|
|
13091
|
+
return "default";
|
|
13092
|
+
}
|
|
12536
13093
|
function resolveMappedClaudeModelId(model, env) {
|
|
12537
|
-
if (!model || !
|
|
12538
|
-
|
|
13094
|
+
if (!model || !env || !hasProviderModelMappingEnv(env)) return model;
|
|
13095
|
+
const bucket = claudeIdToBucket(model);
|
|
13096
|
+
if (bucket !== "default" && env[BUCKET_ENV_KEYS[bucket].id]) return bucket;
|
|
13097
|
+
const defaultSlot = env[BUCKET_ENV_KEYS.default.id];
|
|
13098
|
+
if (defaultSlot) return defaultSlot;
|
|
13099
|
+
if (env[BUCKET_ENV_KEYS.opus.id]) return "opus";
|
|
13100
|
+
return stripOneM(model);
|
|
12539
13101
|
}
|
|
12540
13102
|
var SESSION_AGENT_LAUNCHES_FIELD, SESSION_AGENT_TASK_MAX, DEFAULT_CONTEXT_WINDOW, CODEX_GPT_5_6_CONTEXT_WINDOW, CODEX_PERMISSION_PRESETS, DEFAULT_CODEX_PERMISSION_PRESET, DEFAULT_CODEX_PERMISSION_PROFILE, MODEL_BUCKETS, BUCKET_ENV_KEYS, ONE_M_SUFFIX, MODEL_MAPPING_ENV_IDS;
|
|
12541
13103
|
var init_agent_types = __esm({
|
|
@@ -12662,6 +13224,7 @@ function buildLiveOptions(opts, onPermission, onQuestion, onPlan, signal, timing
|
|
|
12662
13224
|
const binaryPath = (opts.binaryPath && existsSync6(opts.binaryPath) ? opts.binaryPath : null) ?? resolveSdkClaudeBinary() ?? void 0;
|
|
12663
13225
|
const effort = opts.effort === "low" || opts.effort === "medium" || opts.effort === "high" || opts.effort === "xhigh" || opts.effort === "max" ? opts.effort : void 0;
|
|
12664
13226
|
const env = opts.env ? { ...process.env, ...opts.env } : void 0;
|
|
13227
|
+
const settingsEnv = providerSettingsEnv(opts.env);
|
|
12665
13228
|
const sandbox = opts.sandboxMode === "on" || opts.sandboxMode === "auto" ? {
|
|
12666
13229
|
enabled: true,
|
|
12667
13230
|
autoAllowBashIfSandboxed: opts.sandboxMode === "auto",
|
|
@@ -12707,7 +13270,8 @@ function buildLiveOptions(opts, onPermission, onQuestion, onPlan, signal, timing
|
|
|
12707
13270
|
...opts.sessionId ? { resume: opts.sessionId } : {},
|
|
12708
13271
|
...opts.resumeSessionAt ? { resumeSessionAt: opts.resumeSessionAt } : {},
|
|
12709
13272
|
...opts.resumeDropsTurn ? { resumeDropsTurn: opts.resumeDropsTurn } : {},
|
|
12710
|
-
...env ? { env } : {}
|
|
13273
|
+
...env ? { env } : {},
|
|
13274
|
+
...settingsEnv ? { settings: { env: settingsEnv } } : {}
|
|
12711
13275
|
};
|
|
12712
13276
|
return {
|
|
12713
13277
|
...base,
|
|
@@ -12734,6 +13298,7 @@ var init_claude_live_session = __esm({
|
|
|
12734
13298
|
init_message_bridge();
|
|
12735
13299
|
init_agent_event_mapper2();
|
|
12736
13300
|
init_map_sdk_message();
|
|
13301
|
+
init_provider_settings_env();
|
|
12737
13302
|
init_resolve_sdk_binary();
|
|
12738
13303
|
init_root_permission_guard();
|
|
12739
13304
|
init_ask_user_question_bridge();
|
|
@@ -13137,6 +13702,7 @@ var init_src2 = __esm({
|
|
|
13137
13702
|
"../../packages/claude/src/index.ts"() {
|
|
13138
13703
|
"use strict";
|
|
13139
13704
|
init_run_sdk_turn();
|
|
13705
|
+
init_provider_settings_env();
|
|
13140
13706
|
init_message_bridge();
|
|
13141
13707
|
init_claude_live_session();
|
|
13142
13708
|
init_agent_event_mapper2();
|
|
@@ -17868,11 +18434,20 @@ function protocolServes(protocol, task) {
|
|
|
17868
18434
|
function isVideoWire(protocol) {
|
|
17869
18435
|
return VIDEO_WIRES.includes(protocol);
|
|
17870
18436
|
}
|
|
18437
|
+
function isVersionedRoot(url2) {
|
|
18438
|
+
return VERSIONED_ROOT.test(url2);
|
|
18439
|
+
}
|
|
17871
18440
|
function familyBaseUrl(family, baseUrl) {
|
|
17872
18441
|
const trimmed = baseUrl.replace(/\/+$/, "");
|
|
17873
|
-
if (!trimmed ||
|
|
18442
|
+
if (!trimmed || isVersionedRoot(trimmed)) return trimmed;
|
|
17874
18443
|
return `${trimmed}${FAMILY_PATH[family]}`;
|
|
17875
18444
|
}
|
|
18445
|
+
function joinRootAndPrefix(root, prefix, family) {
|
|
18446
|
+
if (!prefix) return root;
|
|
18447
|
+
if (root.endsWith(prefix)) return root;
|
|
18448
|
+
if (prefix === FAMILY_PATH[family] && isVersionedRoot(root)) return root;
|
|
18449
|
+
return `${root}${prefix}`;
|
|
18450
|
+
}
|
|
17876
18451
|
function protocolRoute(protocol) {
|
|
17877
18452
|
return `${FAMILY_PATH[PROTOCOL_FAMILY[protocol]]}${PROTOCOL_ROUTE[protocol]}`;
|
|
17878
18453
|
}
|
|
@@ -17901,10 +18476,12 @@ function normalizeRouteShape(route) {
|
|
|
17901
18476
|
function endpointBaseUrl(siteRoot, endpoint, protocol) {
|
|
17902
18477
|
const root = (endpoint.baseUrl || siteRoot).replace(/\/+$/, "");
|
|
17903
18478
|
if (!root) return "";
|
|
18479
|
+
const family = PROTOCOL_FAMILY[protocol];
|
|
17904
18480
|
const route = endpointRoute(endpoint, protocol);
|
|
17905
18481
|
const suffix = PROTOCOL_ROUTE[protocol];
|
|
17906
|
-
|
|
17907
|
-
|
|
18482
|
+
if (root.endsWith(suffix)) return root.slice(0, root.length - suffix.length);
|
|
18483
|
+
const prefix = route.endsWith(suffix) ? route.slice(0, route.length - suffix.length) : FAMILY_PATH[family];
|
|
18484
|
+
return joinRootAndPrefix(root, prefix, family);
|
|
17908
18485
|
}
|
|
17909
18486
|
function harnessChatProtocols(harness, options) {
|
|
17910
18487
|
if (harness === "claude" && options?.experimentalClaudeOpenAiChatEnabled) {
|
|
@@ -17912,7 +18489,7 @@ function harnessChatProtocols(harness, options) {
|
|
|
17912
18489
|
}
|
|
17913
18490
|
return HARNESS_CHAT_PROTOCOLS[harness];
|
|
17914
18491
|
}
|
|
17915
|
-
var PROTOCOL_TASKS, PROTOCOL_FAMILIES, FAMILY_PROTOCOLS, PROTOCOL_FAMILY, WIRE_PROTOCOLS, PROTOCOL_ORDER, VIDEO_WIRES, FAMILY_PATH, PROTOCOL_ROUTE, ROUTE_PROTOCOL, HARNESS_CHAT_PROTOCOLS, PROXY_TRANSFORMERS_ENV;
|
|
18492
|
+
var PROTOCOL_TASKS, PROTOCOL_FAMILIES, FAMILY_PROTOCOLS, PROTOCOL_FAMILY, WIRE_PROTOCOLS, PROTOCOL_ORDER, VIDEO_WIRES, FAMILY_PATH, VERSIONED_ROOT, PROTOCOL_ROUTE, ROUTE_PROTOCOL, HARNESS_CHAT_PROTOCOLS, PROXY_TRANSFORMERS_ENV;
|
|
17916
18493
|
var init_protocols = __esm({
|
|
17917
18494
|
"../../packages/shared/src/platform-registry/protocols.ts"() {
|
|
17918
18495
|
"use strict";
|
|
@@ -17950,6 +18527,7 @@ var init_protocols = __esm({
|
|
|
17950
18527
|
newapi: "/v1",
|
|
17951
18528
|
google: "/v1beta"
|
|
17952
18529
|
};
|
|
18530
|
+
VERSIONED_ROOT = /\/(?:api\/)?v\d+(?:alpha|beta)?$/;
|
|
17953
18531
|
PROTOCOL_ROUTE = {
|
|
17954
18532
|
"anthropic-messages": "/v1/messages",
|
|
17955
18533
|
"openai-chat": "/chat/completions",
|
|
@@ -18124,6 +18702,19 @@ var init_capabilities2 = __esm({
|
|
|
18124
18702
|
}
|
|
18125
18703
|
});
|
|
18126
18704
|
|
|
18705
|
+
// ../../packages/shared/src/platform-registry/claude-env.ts
|
|
18706
|
+
function claudeThirdPartyEnv(resolved) {
|
|
18707
|
+
if (CLI_KNOWN_BRANDS.has(resolved.brand)) return {};
|
|
18708
|
+
return { CLAUDE_CODE_MODEL_CAPABILITIES: "-mid_conv_tool_change" };
|
|
18709
|
+
}
|
|
18710
|
+
var CLI_KNOWN_BRANDS;
|
|
18711
|
+
var init_claude_env = __esm({
|
|
18712
|
+
"../../packages/shared/src/platform-registry/claude-env.ts"() {
|
|
18713
|
+
"use strict";
|
|
18714
|
+
CLI_KNOWN_BRANDS = /* @__PURE__ */ new Set(["anthropic", "claude", "bedrock", "vertexai"]);
|
|
18715
|
+
}
|
|
18716
|
+
});
|
|
18717
|
+
|
|
18127
18718
|
// ../../packages/shared/src/model-tasks.ts
|
|
18128
18719
|
var init_model_tasks = __esm({
|
|
18129
18720
|
"../../packages/shared/src/model-tasks.ts"() {
|
|
@@ -18310,16 +18901,16 @@ function openaiChat(prefix, opts = {}) {
|
|
|
18310
18901
|
models: opts.models
|
|
18311
18902
|
};
|
|
18312
18903
|
}
|
|
18313
|
-
var XIAOMI_MODELS, BAILIAN_CODING_PLAN_MODELS, BAILIAN_TOKEN_PLAN_MODELS, BAILIAN_API_MODELS, GLM_MODELS, MINIMAX_MODELS, DOUBAO_MODELS, SEEDANCE_MODELS, SORA_MODELS, VEO_MODELS, ARK_CODE_MODELS, KIMI_API_MODELS, KIMI_ANDANTE_MODELS, KIMI_ANDANTE_ENDPOINT_MODELS, KIMI_MODERATO_MODELS, KIMI_MODERATO_ENDPOINT_MODELS, KIMI_ALLEGRETTO_MODELS, KIMI_ALLEGRETTO_ENDPOINT_MODELS, NVIDIA_MODELS, CODING_TIMEOUT, DISABLE_NONESSENTIAL, EMPTY_AUTH_TOKEN, KIMI_BASE_EXTRA_ENV, KIMI_CTX_256K, KIMI_CTX_1M, KIMI_ANDANTE_EXTRA_ENV, KIMI_MODERATO_EXTRA_ENV, KIMI_ALLEGRETTO_EXTRA_ENV, KIMI_EXTRA_ENV, BUILTIN_PLATFORMS;
|
|
18904
|
+
var XIAOMI_MODELS, BAILIAN_CODING_PLAN_MODELS, BAILIAN_TOKEN_PLAN_MODELS, BAILIAN_API_MODELS, GLM_MODELS, MINIMAX_MODELS, DOUBAO_MODELS, SEEDANCE_MODELS, SORA_MODELS, VEO_MODELS, ARK_CODE_MODELS, KIMI_API_MODELS, KIMI_PLUS_MODELS, KIMI_PLUS_ENDPOINT_MODELS, KIMI_PRO_MODELS, KIMI_PRO_ENDPOINT_MODELS, KIMI_ANDANTE_MODELS, KIMI_ANDANTE_ENDPOINT_MODELS, KIMI_MODERATO_MODELS, KIMI_MODERATO_ENDPOINT_MODELS, KIMI_ALLEGRETTO_MODELS, KIMI_ALLEGRETTO_ENDPOINT_MODELS, KAT_CODER_MODELS, NVIDIA_MODELS, CODING_TIMEOUT, DISABLE_NONESSENTIAL, EMPTY_AUTH_TOKEN, MINIMAX_EXTRA_ENV, KIMI_BASE_EXTRA_ENV, KIMI_CTX_256K, KIMI_CTX_1M, KIMI_ANDANTE_EXTRA_ENV, KIMI_PLUS_EXTRA_ENV, KIMI_PRO_EXTRA_ENV, KIMI_MODERATO_EXTRA_ENV, KIMI_ALLEGRETTO_EXTRA_ENV, KIMI_EXTRA_ENV, BUILTIN_PLATFORMS;
|
|
18314
18905
|
var init_builtin = __esm({
|
|
18315
18906
|
"../../packages/shared/src/platform-registry/builtin.ts"() {
|
|
18316
18907
|
"use strict";
|
|
18317
18908
|
init_effective_endpoints();
|
|
18318
18909
|
init_protocols();
|
|
18319
18910
|
XIAOMI_MODELS = {
|
|
18320
|
-
default: { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
|
|
18321
|
-
opus: { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
|
|
18322
|
-
sonnet: { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
|
|
18911
|
+
default: { id: "mimo-v2.5-pro[1m]", name: "MiMo V2.5 Pro" },
|
|
18912
|
+
opus: { id: "mimo-v2.5-pro[1m]", name: "MiMo V2.5 Pro" },
|
|
18913
|
+
sonnet: { id: "mimo-v2.5-pro[1m]", name: "MiMo V2.5 Pro" },
|
|
18323
18914
|
haiku: { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" }
|
|
18324
18915
|
};
|
|
18325
18916
|
BAILIAN_CODING_PLAN_MODELS = {
|
|
@@ -18330,11 +18921,11 @@ var init_builtin = __esm({
|
|
|
18330
18921
|
subagent: { id: "qwen3.7-plus", name: "Qwen 3.7 Plus" }
|
|
18331
18922
|
};
|
|
18332
18923
|
BAILIAN_TOKEN_PLAN_MODELS = {
|
|
18333
|
-
default: { id: "qwen3.
|
|
18334
|
-
opus: { id: "qwen3.
|
|
18335
|
-
sonnet: { id: "qwen3.
|
|
18924
|
+
default: { id: "qwen3.8-flash", name: "Qwen 3.8 Flash" },
|
|
18925
|
+
opus: { id: "qwen3.8-flash", name: "Qwen 3.8 Flash" },
|
|
18926
|
+
sonnet: { id: "qwen3.8-flash", name: "Qwen 3.8 Flash" },
|
|
18336
18927
|
haiku: { id: "qwen3.6-flash", name: "Qwen 3.6 Flash" },
|
|
18337
|
-
subagent: { id: "qwen3.
|
|
18928
|
+
subagent: { id: "qwen3.8-flash", name: "Qwen 3.8 Flash" }
|
|
18338
18929
|
};
|
|
18339
18930
|
BAILIAN_API_MODELS = {
|
|
18340
18931
|
default: { id: "qwen3.7-max", name: "Qwen 3.7 Max" },
|
|
@@ -18344,22 +18935,23 @@ var init_builtin = __esm({
|
|
|
18344
18935
|
subagent: { id: "qwen3.7-max", name: "Qwen 3.7 Max" }
|
|
18345
18936
|
};
|
|
18346
18937
|
GLM_MODELS = {
|
|
18347
|
-
default: { id: "glm-5.
|
|
18348
|
-
opus: { id: "glm-5.
|
|
18349
|
-
sonnet: { id: "glm-5.
|
|
18350
|
-
haiku: { id: "glm-
|
|
18938
|
+
default: { id: "glm-5.3[1m]", name: "GLM-5.3" },
|
|
18939
|
+
opus: { id: "glm-5.3[1m]", name: "GLM-5.3" },
|
|
18940
|
+
sonnet: { id: "glm-5.3[1m]", name: "GLM-5.3" },
|
|
18941
|
+
haiku: { id: "glm-5.3-flash[1m]", name: "GLM-5.3 Flash" }
|
|
18351
18942
|
};
|
|
18352
18943
|
MINIMAX_MODELS = {
|
|
18353
18944
|
default: { id: "MiniMax-M3[1m]", name: "MiniMax M3" },
|
|
18354
18945
|
opus: { id: "MiniMax-M3[1m]", name: "MiniMax M3" },
|
|
18355
|
-
sonnet: { id: "MiniMax-M3", name: "MiniMax M3" },
|
|
18356
|
-
haiku: { id: "MiniMax-M3", name: "MiniMax M3" }
|
|
18946
|
+
sonnet: { id: "MiniMax-M3[1m]", name: "MiniMax M3" },
|
|
18947
|
+
haiku: { id: "MiniMax-M3[1m]", name: "MiniMax M3" }
|
|
18357
18948
|
};
|
|
18358
18949
|
DOUBAO_MODELS = {
|
|
18359
|
-
default: { id: "doubao-seed-
|
|
18360
|
-
opus: { id: "doubao-seed-
|
|
18361
|
-
sonnet: { id: "doubao-seed-
|
|
18362
|
-
haiku: { id: "doubao-seed-
|
|
18950
|
+
default: { id: "doubao-seed-evolving", name: "Doubao Seed Evolving" },
|
|
18951
|
+
opus: { id: "doubao-seed-evolving", name: "Doubao Seed Evolving" },
|
|
18952
|
+
sonnet: { id: "doubao-seed-evolving", name: "Doubao Seed Evolving" },
|
|
18953
|
+
haiku: { id: "doubao-seed-evolving", name: "Doubao Seed Evolving" },
|
|
18954
|
+
subagent: { id: "doubao-seed-evolving", name: "Doubao Seed Evolving" }
|
|
18363
18955
|
};
|
|
18364
18956
|
SEEDANCE_MODELS = [
|
|
18365
18957
|
{ id: "doubao-seedance-2-0-260128", name: "Seedance 2.0", tasks: ["video"] },
|
|
@@ -18384,15 +18976,39 @@ var init_builtin = __esm({
|
|
|
18384
18976
|
default: { id: "ark-code-latest", name: "Ark Code Latest" },
|
|
18385
18977
|
opus: { id: "ark-code-latest", name: "Ark Code Latest" },
|
|
18386
18978
|
sonnet: { id: "ark-code-latest", name: "Ark Code Latest" },
|
|
18387
|
-
haiku: { id: "ark-code-latest", name: "Ark Code Latest" }
|
|
18979
|
+
haiku: { id: "ark-code-latest", name: "Ark Code Latest" },
|
|
18980
|
+
subagent: { id: "ark-code-latest", name: "Ark Code Latest" }
|
|
18388
18981
|
};
|
|
18389
18982
|
KIMI_API_MODELS = {
|
|
18390
|
-
default: { id: "kimi-k3", name: "Kimi K3" },
|
|
18391
|
-
opus: { id: "kimi-k3", name: "Kimi K3" },
|
|
18392
|
-
sonnet: { id: "kimi-k3", name: "Kimi K3" },
|
|
18393
|
-
haiku: { id: "kimi-k2.7-code
|
|
18394
|
-
subagent: { id: "kimi-k3", name: "Kimi K3" }
|
|
18983
|
+
default: { id: "kimi-k3[1m]", name: "Kimi K3" },
|
|
18984
|
+
opus: { id: "kimi-k3[1m]", name: "Kimi K3" },
|
|
18985
|
+
sonnet: { id: "kimi-k3[1m]", name: "Kimi K3" },
|
|
18986
|
+
haiku: { id: "kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
|
18987
|
+
subagent: { id: "kimi-k3[1m]", name: "Kimi K3" }
|
|
18988
|
+
};
|
|
18989
|
+
KIMI_PLUS_MODELS = {
|
|
18990
|
+
default: { id: "k3-256k", name: "Kimi K3 (256K)" },
|
|
18991
|
+
opus: { id: "k3-256k", name: "Kimi K3 (256K)" },
|
|
18992
|
+
sonnet: { id: "k3-256k", name: "Kimi K3 (256K)" },
|
|
18993
|
+
haiku: { id: "k3-256k", name: "Kimi K3 (256K)" },
|
|
18994
|
+
subagent: { id: "k3-256k", name: "Kimi K3 (256K)" }
|
|
18995
|
+
};
|
|
18996
|
+
KIMI_PLUS_ENDPOINT_MODELS = [
|
|
18997
|
+
{ id: "k3", name: "Kimi K3", tasks: ["chat"] },
|
|
18998
|
+
{ id: "k3-256k", name: "Kimi K3 (256K)", tasks: ["chat"] },
|
|
18999
|
+
{ id: "kimi-for-coding", name: "Kimi for Coding", tasks: ["chat"] }
|
|
19000
|
+
];
|
|
19001
|
+
KIMI_PRO_MODELS = {
|
|
19002
|
+
default: { id: "k3[1m]", name: "Kimi K3" },
|
|
19003
|
+
opus: { id: "k3[1m]", name: "Kimi K3" },
|
|
19004
|
+
sonnet: { id: "k3[1m]", name: "Kimi K3" },
|
|
19005
|
+
haiku: { id: "k3[1m]", name: "Kimi K3" },
|
|
19006
|
+
subagent: { id: "k3[1m]", name: "Kimi K3" }
|
|
18395
19007
|
};
|
|
19008
|
+
KIMI_PRO_ENDPOINT_MODELS = [
|
|
19009
|
+
...KIMI_PLUS_ENDPOINT_MODELS,
|
|
19010
|
+
{ id: "kimi-for-coding-highspeed", name: "Kimi for Coding HighSpeed", tasks: ["chat"] }
|
|
19011
|
+
];
|
|
18396
19012
|
KIMI_ANDANTE_MODELS = {
|
|
18397
19013
|
default: { id: "kimi-for-coding", name: "Kimi for Coding" },
|
|
18398
19014
|
opus: { id: "kimi-for-coding", name: "Kimi for Coding" },
|
|
@@ -18410,10 +19026,7 @@ var init_builtin = __esm({
|
|
|
18410
19026
|
haiku: { id: "kimi-for-coding", name: "Kimi for Coding" },
|
|
18411
19027
|
subagent: { id: "k3", name: "Kimi K3" }
|
|
18412
19028
|
};
|
|
18413
|
-
KIMI_MODERATO_ENDPOINT_MODELS =
|
|
18414
|
-
{ id: "k3", name: "Kimi K3", tasks: ["chat"] },
|
|
18415
|
-
{ id: "kimi-for-coding", name: "Kimi for Coding", tasks: ["chat"] }
|
|
18416
|
-
];
|
|
19029
|
+
KIMI_MODERATO_ENDPOINT_MODELS = KIMI_PLUS_ENDPOINT_MODELS;
|
|
18417
19030
|
KIMI_ALLEGRETTO_MODELS = {
|
|
18418
19031
|
default: { id: "k3[1m]", name: "Kimi K3" },
|
|
18419
19032
|
opus: { id: "k3[1m]", name: "Kimi K3" },
|
|
@@ -18421,11 +19034,14 @@ var init_builtin = __esm({
|
|
|
18421
19034
|
haiku: { id: "kimi-for-coding", name: "Kimi for Coding" },
|
|
18422
19035
|
subagent: { id: "k3[1m]", name: "Kimi K3" }
|
|
18423
19036
|
};
|
|
18424
|
-
KIMI_ALLEGRETTO_ENDPOINT_MODELS =
|
|
18425
|
-
|
|
18426
|
-
{ id: "
|
|
18427
|
-
{ id: "
|
|
18428
|
-
|
|
19037
|
+
KIMI_ALLEGRETTO_ENDPOINT_MODELS = KIMI_PRO_ENDPOINT_MODELS;
|
|
19038
|
+
KAT_CODER_MODELS = {
|
|
19039
|
+
default: { id: "kat-coder-pro-v2.5", name: "KAT-Coder Pro V2.5" },
|
|
19040
|
+
opus: { id: "kat-coder-pro-v2.5", name: "KAT-Coder Pro V2.5" },
|
|
19041
|
+
sonnet: { id: "kat-coder-pro-v2.5", name: "KAT-Coder Pro V2.5" },
|
|
19042
|
+
haiku: { id: "kat-coder-pro-v2.5", name: "KAT-Coder Pro V2.5" },
|
|
19043
|
+
subagent: { id: "kat-coder-pro-v2.5", name: "KAT-Coder Pro V2.5" }
|
|
19044
|
+
};
|
|
18429
19045
|
NVIDIA_MODELS = {
|
|
18430
19046
|
default: { id: "moonshotai/kimi-k3", name: "Kimi K3" },
|
|
18431
19047
|
opus: { id: "moonshotai/kimi-k3", name: "Kimi K3" },
|
|
@@ -18435,6 +19051,12 @@ var init_builtin = __esm({
|
|
|
18435
19051
|
CODING_TIMEOUT = { API_TIMEOUT_MS: "3000000" };
|
|
18436
19052
|
DISABLE_NONESSENTIAL = { CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" };
|
|
18437
19053
|
EMPTY_AUTH_TOKEN = { ANTHROPIC_AUTH_TOKEN: "" };
|
|
19054
|
+
MINIMAX_EXTRA_ENV = {
|
|
19055
|
+
...CODING_TIMEOUT,
|
|
19056
|
+
CLAUDE_CODE_AUTO_COMPACT_WINDOW: "1000000",
|
|
19057
|
+
...DISABLE_NONESSENTIAL,
|
|
19058
|
+
...EMPTY_AUTH_TOKEN
|
|
19059
|
+
};
|
|
18438
19060
|
KIMI_BASE_EXTRA_ENV = {
|
|
18439
19061
|
...CODING_TIMEOUT,
|
|
18440
19062
|
ENABLE_TOOL_SEARCH: "false",
|
|
@@ -18451,21 +19073,24 @@ var init_builtin = __esm({
|
|
|
18451
19073
|
};
|
|
18452
19074
|
KIMI_ANDANTE_EXTRA_ENV = {
|
|
18453
19075
|
...KIMI_BASE_EXTRA_ENV,
|
|
18454
|
-
...
|
|
19076
|
+
...KIMI_CTX_1M
|
|
18455
19077
|
};
|
|
18456
|
-
|
|
19078
|
+
KIMI_PLUS_EXTRA_ENV = {
|
|
18457
19079
|
...KIMI_BASE_EXTRA_ENV,
|
|
18458
19080
|
...KIMI_CTX_256K,
|
|
18459
|
-
CLAUDE_CODE_EFFORT_LEVEL: "
|
|
19081
|
+
CLAUDE_CODE_EFFORT_LEVEL: "high"
|
|
18460
19082
|
};
|
|
18461
|
-
|
|
19083
|
+
KIMI_PRO_EXTRA_ENV = {
|
|
18462
19084
|
...KIMI_BASE_EXTRA_ENV,
|
|
18463
19085
|
...KIMI_CTX_1M,
|
|
18464
|
-
CLAUDE_CODE_EFFORT_LEVEL: "
|
|
19086
|
+
CLAUDE_CODE_EFFORT_LEVEL: "high"
|
|
18465
19087
|
};
|
|
19088
|
+
KIMI_MODERATO_EXTRA_ENV = KIMI_PLUS_EXTRA_ENV;
|
|
19089
|
+
KIMI_ALLEGRETTO_EXTRA_ENV = KIMI_PRO_EXTRA_ENV;
|
|
18466
19090
|
KIMI_EXTRA_ENV = {
|
|
18467
19091
|
...KIMI_BASE_EXTRA_ENV,
|
|
18468
|
-
...KIMI_CTX_1M
|
|
19092
|
+
...KIMI_CTX_1M,
|
|
19093
|
+
CLAUDE_CODE_EFFORT_LEVEL: "max"
|
|
18469
19094
|
};
|
|
18470
19095
|
BUILTIN_PLATFORMS = [
|
|
18471
19096
|
// Official subscription (OAuth) — Credential rows exist so bindings have a target, but hold no secret.
|
|
@@ -18617,10 +19242,67 @@ var init_builtin = __esm({
|
|
|
18617
19242
|
description: "Kimi Code \u2014 \u7F16\u7A0B\u5957\u9910\u8BA2\u9605\uFF0C\u6309\u4F1A\u5458\u6863\u4F4D\u533A\u5206\u6A21\u578B\u4E0E\u4E0A\u4E0B\u6587\u914D\u7F6E",
|
|
18618
19243
|
catalogProviderId: "moonshotai",
|
|
18619
19244
|
plans: [
|
|
19245
|
+
{
|
|
19246
|
+
id: "plus",
|
|
19247
|
+
name: "Plus",
|
|
19248
|
+
description: "Kimi Code Plus \u2014 k3-256k / kimi-for-coding\uFF0CK3 \u9650 256k \u4E0A\u4E0B\u6587",
|
|
19249
|
+
auth: "api-key",
|
|
19250
|
+
baseUrl: "https://api.kimi.com",
|
|
19251
|
+
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
19252
|
+
endpoints: [
|
|
19253
|
+
anthropic("/coding", {
|
|
19254
|
+
extraEnv: KIMI_PLUS_EXTRA_ENV,
|
|
19255
|
+
modelMapping: KIMI_PLUS_MODELS,
|
|
19256
|
+
models: KIMI_PLUS_ENDPOINT_MODELS
|
|
19257
|
+
}),
|
|
19258
|
+
openaiChat("/coding/v1", {
|
|
19259
|
+
modelMapping: KIMI_PLUS_MODELS,
|
|
19260
|
+
models: KIMI_PLUS_ENDPOINT_MODELS
|
|
19261
|
+
})
|
|
19262
|
+
]
|
|
19263
|
+
},
|
|
19264
|
+
{
|
|
19265
|
+
id: "pro",
|
|
19266
|
+
name: "Pro",
|
|
19267
|
+
description: "Kimi Code Pro \u2014 k3[1m] / HighSpeed\uFF0C\u6700\u9AD8 1M \u4E0A\u4E0B\u6587",
|
|
19268
|
+
auth: "api-key",
|
|
19269
|
+
baseUrl: "https://api.kimi.com",
|
|
19270
|
+
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
19271
|
+
endpoints: [
|
|
19272
|
+
anthropic("/coding", {
|
|
19273
|
+
extraEnv: KIMI_PRO_EXTRA_ENV,
|
|
19274
|
+
modelMapping: KIMI_PRO_MODELS,
|
|
19275
|
+
models: KIMI_PRO_ENDPOINT_MODELS
|
|
19276
|
+
}),
|
|
19277
|
+
openaiChat("/coding/v1", {
|
|
19278
|
+
modelMapping: KIMI_PRO_MODELS,
|
|
19279
|
+
models: KIMI_PRO_ENDPOINT_MODELS
|
|
19280
|
+
})
|
|
19281
|
+
]
|
|
19282
|
+
},
|
|
19283
|
+
{
|
|
19284
|
+
id: "max",
|
|
19285
|
+
name: "Max",
|
|
19286
|
+
description: "Kimi Code Max \u2014 \u4E0E Pro \u540C\u6A21\u578B\u96C6\uFF0C\u989D\u5EA6\u66F4\u9AD8",
|
|
19287
|
+
auth: "api-key",
|
|
19288
|
+
baseUrl: "https://api.kimi.com",
|
|
19289
|
+
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
19290
|
+
endpoints: [
|
|
19291
|
+
anthropic("/coding", {
|
|
19292
|
+
extraEnv: KIMI_PRO_EXTRA_ENV,
|
|
19293
|
+
modelMapping: KIMI_PRO_MODELS,
|
|
19294
|
+
models: KIMI_PRO_ENDPOINT_MODELS
|
|
19295
|
+
}),
|
|
19296
|
+
openaiChat("/coding/v1", {
|
|
19297
|
+
modelMapping: KIMI_PRO_MODELS,
|
|
19298
|
+
models: KIMI_PRO_ENDPOINT_MODELS
|
|
19299
|
+
})
|
|
19300
|
+
]
|
|
19301
|
+
},
|
|
18620
19302
|
{
|
|
18621
19303
|
id: "andante",
|
|
18622
|
-
name: "Andante",
|
|
18623
|
-
description: "Kimi Code Andante
|
|
19304
|
+
name: "Andante\uFF08\u5DF2\u505C\u552E\uFF09",
|
|
19305
|
+
description: "Kimi Code Andante\uFF08\u65E7\u5957\u9910\uFF0C\u5DF2\u505C\u552E\uFF09\u2014 kimi-for-coding\uFF0C1M \u4E0A\u4E0B\u6587",
|
|
18624
19306
|
auth: "api-key",
|
|
18625
19307
|
baseUrl: "https://api.kimi.com",
|
|
18626
19308
|
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
@@ -18638,8 +19320,8 @@ var init_builtin = __esm({
|
|
|
18638
19320
|
},
|
|
18639
19321
|
{
|
|
18640
19322
|
id: "moderato",
|
|
18641
|
-
name: "Moderato",
|
|
18642
|
-
description: "Kimi Code Moderato \u2014 k3 / kimi-for-coding\
|
|
19323
|
+
name: "Moderato\uFF08\u5DF2\u505C\u552E\uFF09",
|
|
19324
|
+
description: "Kimi Code Moderato\uFF08\u65E7\u5957\u9910\uFF0C\u5DF2\u505C\u552E\uFF0C\u5BF9\u5E94 Plus\uFF09\u2014 k3 / kimi-for-coding\uFF0CK3 \u9650 256k \u4E0A\u4E0B\u6587",
|
|
18643
19325
|
auth: "api-key",
|
|
18644
19326
|
baseUrl: "https://api.kimi.com",
|
|
18645
19327
|
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
@@ -18657,8 +19339,8 @@ var init_builtin = __esm({
|
|
|
18657
19339
|
},
|
|
18658
19340
|
{
|
|
18659
19341
|
id: "allegretto",
|
|
18660
|
-
name: "Allegretto
|
|
18661
|
-
description: "Kimi Code Allegretto \u53CA\u4EE5\u4E0A \u2014 k3[1m] / HighSpeed\uFF0C\u6700\u9AD8 1M \u4E0A\u4E0B\u6587",
|
|
19342
|
+
name: "Allegretto+\uFF08\u5DF2\u505C\u552E\uFF09",
|
|
19343
|
+
description: "Kimi Code Allegretto \u53CA\u4EE5\u4E0A\uFF08\u65E7\u5957\u9910\uFF0C\u5DF2\u505C\u552E\uFF0C\u5BF9\u5E94 Pro\uFF09\u2014 k3[1m] / HighSpeed\uFF0C\u6700\u9AD8 1M \u4E0A\u4E0B\u6587",
|
|
18662
19344
|
auth: "api-key",
|
|
18663
19345
|
baseUrl: "https://api.kimi.com",
|
|
18664
19346
|
apiKeyUrl: "https://www.kimi.com/code/console",
|
|
@@ -18732,11 +19414,11 @@ var init_builtin = __esm({
|
|
|
18732
19414
|
name: "\u4E2D\u56FD\u7248",
|
|
18733
19415
|
description: "MiniMax \u7F16\u7A0B\u5957\u9910\u6216 API \u2014 \u4E2D\u56FD\u533A\uFF0C\u6D77\u87BA AI \u4EE3\u7801\u6A21\u578B",
|
|
18734
19416
|
auth: "api-key",
|
|
18735
|
-
baseUrl: "https://api.
|
|
18736
|
-
apiKeyUrl: "https://platform.
|
|
19417
|
+
baseUrl: "https://api.minimax.cn",
|
|
19418
|
+
apiKeyUrl: "https://platform.minimax.cn/user-center/basic-information/interface-key",
|
|
18737
19419
|
endpoints: [
|
|
18738
19420
|
anthropic("/anthropic", {
|
|
18739
|
-
extraEnv:
|
|
19421
|
+
extraEnv: MINIMAX_EXTRA_ENV,
|
|
18740
19422
|
modelMapping: MINIMAX_MODELS
|
|
18741
19423
|
}),
|
|
18742
19424
|
openaiChat("/v1", {
|
|
@@ -18753,7 +19435,7 @@ var init_builtin = __esm({
|
|
|
18753
19435
|
apiKeyUrl: "https://platform.minimax.io/user-center/basic-information/interface-key",
|
|
18754
19436
|
endpoints: [
|
|
18755
19437
|
anthropic("/anthropic", {
|
|
18756
|
-
extraEnv:
|
|
19438
|
+
extraEnv: MINIMAX_EXTRA_ENV,
|
|
18757
19439
|
modelMapping: MINIMAX_MODELS
|
|
18758
19440
|
}),
|
|
18759
19441
|
openaiChat("/v1", {
|
|
@@ -18780,7 +19462,7 @@ var init_builtin = __esm({
|
|
|
18780
19462
|
catalogProviderId: "volcengine-agent-plan",
|
|
18781
19463
|
endpoints: [
|
|
18782
19464
|
anthropic("/api/plan", {
|
|
18783
|
-
extraEnv: { ...CODING_TIMEOUT, ...EMPTY_AUTH_TOKEN },
|
|
19465
|
+
extraEnv: { ...CODING_TIMEOUT, ...DISABLE_NONESSENTIAL, ...EMPTY_AUTH_TOKEN },
|
|
18784
19466
|
modelMapping: ARK_CODE_MODELS
|
|
18785
19467
|
}),
|
|
18786
19468
|
// Agent Plan OpenAI path — do not use /api/v3 (bypasses plan quota).
|
|
@@ -18798,7 +19480,7 @@ var init_builtin = __esm({
|
|
|
18798
19480
|
catalogProviderId: "volcengine-coding-plan",
|
|
18799
19481
|
endpoints: [
|
|
18800
19482
|
anthropic("/api/coding", {
|
|
18801
|
-
extraEnv: { ...CODING_TIMEOUT, ...EMPTY_AUTH_TOKEN },
|
|
19483
|
+
extraEnv: { ...CODING_TIMEOUT, ...DISABLE_NONESSENTIAL, ...EMPTY_AUTH_TOKEN },
|
|
18802
19484
|
modelMapping: ARK_CODE_MODELS
|
|
18803
19485
|
}),
|
|
18804
19486
|
// Coding Plan OpenAI path — do not use /api/v3 (bypasses plan quota).
|
|
@@ -18816,7 +19498,7 @@ var init_builtin = __esm({
|
|
|
18816
19498
|
catalogProviderId: "volcengine",
|
|
18817
19499
|
endpoints: [
|
|
18818
19500
|
anthropic("/api/compatible", {
|
|
18819
|
-
extraEnv: { ...CODING_TIMEOUT, ...EMPTY_AUTH_TOKEN },
|
|
19501
|
+
extraEnv: { ...CODING_TIMEOUT, ...DISABLE_NONESSENTIAL, ...EMPTY_AUTH_TOKEN },
|
|
18820
19502
|
modelMapping: DOUBAO_MODELS
|
|
18821
19503
|
}),
|
|
18822
19504
|
openaiChat("/api/v3", {
|
|
@@ -18898,12 +19580,13 @@ var init_builtin = __esm({
|
|
|
18898
19580
|
id: "token",
|
|
18899
19581
|
name: "Token Plan",
|
|
18900
19582
|
auth: "api-key",
|
|
18901
|
-
baseUrl: "https://
|
|
19583
|
+
baseUrl: "https://token-plan.cn-beijing.maas.aliyuncs.com",
|
|
18902
19584
|
apiKeyUrl: "https://bailian.console.aliyun.com/?tab=model#/api-key",
|
|
18903
19585
|
catalogProviderId: "alibaba-token-plan-cn",
|
|
18904
19586
|
endpoints: [
|
|
18905
19587
|
anthropic("/apps/anthropic", {
|
|
18906
|
-
|
|
19588
|
+
// qwen3.8-flash's usable window as published in the Token Plan Claude Code guide.
|
|
19589
|
+
extraEnv: { ...EMPTY_AUTH_TOKEN, CLAUDE_CODE_MAX_CONTEXT_TOKENS: "983616" },
|
|
18907
19590
|
modelMapping: BAILIAN_TOKEN_PLAN_MODELS
|
|
18908
19591
|
}),
|
|
18909
19592
|
openaiChat("/compatible-mode/v1", {
|
|
@@ -18934,23 +19617,39 @@ var init_builtin = __esm({
|
|
|
18934
19617
|
id: "kat-coder",
|
|
18935
19618
|
brand: "kwaikat",
|
|
18936
19619
|
name: "KAT-Coder",
|
|
18937
|
-
description: "KAT-Coder \u2014 \u5FEB\u624B\u65D7\u4E0B AI \u7F16\u7A0B\u6A21\u578B\
|
|
19620
|
+
description: "KAT-Coder \u2014 \u5FEB\u624B\u65D7\u4E0B AI \u7F16\u7A0B\u6A21\u578B\uFF08StreamLake \u4E07\u64CE\uFF09",
|
|
18938
19621
|
plans: [
|
|
18939
19622
|
{
|
|
18940
19623
|
id: "coding",
|
|
18941
19624
|
name: "Coding Plan",
|
|
19625
|
+
description: "StreamLake Coding Plan \u2014 \u8BA2\u9605\u989D\u5EA6\uFF0C\u56FA\u5B9A Claude Code \u7F51\u5173",
|
|
18942
19626
|
auth: "api-key",
|
|
18943
19627
|
baseUrl: "https://vanchin.streamlake.ai",
|
|
18944
|
-
apiKeyUrl: "https://console.streamlake.
|
|
19628
|
+
apiKeyUrl: "https://console.streamlake.ai/console/home/index",
|
|
18945
19629
|
endpoints: [
|
|
18946
|
-
anthropic("/api/gateway/
|
|
18947
|
-
extraEnv: { ...EMPTY_AUTH_TOKEN },
|
|
18948
|
-
modelMapping:
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
19630
|
+
anthropic("/api/gateway/coding/kat-coder-pro-v2.5/claude-code-proxy", {
|
|
19631
|
+
extraEnv: { ...CODING_TIMEOUT, ...EMPTY_AUTH_TOKEN },
|
|
19632
|
+
modelMapping: KAT_CODER_MODELS
|
|
19633
|
+
}),
|
|
19634
|
+
openaiChat("/api/gateway/coding/v1", {
|
|
19635
|
+
modelMapping: KAT_CODER_MODELS
|
|
19636
|
+
})
|
|
19637
|
+
]
|
|
19638
|
+
},
|
|
19639
|
+
{
|
|
19640
|
+
id: "api",
|
|
19641
|
+
name: "API",
|
|
19642
|
+
description: "StreamLake \u6309\u91CF\u8BA1\u8D39 \u2014 \u6309\u5B9E\u9645 token \u4ED8\u8D39",
|
|
19643
|
+
auth: "api-key",
|
|
19644
|
+
baseUrl: "https://vanchin.streamlake.ai",
|
|
19645
|
+
apiKeyUrl: "https://console.streamlake.ai/console/home/index",
|
|
19646
|
+
endpoints: [
|
|
19647
|
+
anthropic("/api/gateway/v1/endpoints/kat-coder-pro-v2.5/claude-code-proxy", {
|
|
19648
|
+
extraEnv: { ...CODING_TIMEOUT, ...EMPTY_AUTH_TOKEN },
|
|
19649
|
+
modelMapping: KAT_CODER_MODELS
|
|
19650
|
+
}),
|
|
19651
|
+
openaiChat("/api/gateway/v1/endpoints", {
|
|
19652
|
+
modelMapping: KAT_CODER_MODELS
|
|
18954
19653
|
})
|
|
18955
19654
|
]
|
|
18956
19655
|
}
|
|
@@ -18972,14 +19671,14 @@ var init_builtin = __esm({
|
|
|
18972
19671
|
anthropic("/anthropic", {
|
|
18973
19672
|
extraEnv: {
|
|
18974
19673
|
...EMPTY_AUTH_TOKEN,
|
|
18975
|
-
CLAUDE_CODE_MAX_OUTPUT_TOKENS: "
|
|
19674
|
+
CLAUDE_CODE_MAX_OUTPUT_TOKENS: "131072",
|
|
18976
19675
|
...DISABLE_NONESSENTIAL
|
|
18977
19676
|
},
|
|
18978
19677
|
modelMapping: {
|
|
18979
|
-
default: { id: "LongCat-
|
|
18980
|
-
opus: { id: "LongCat-
|
|
18981
|
-
sonnet: { id: "LongCat-
|
|
18982
|
-
haiku: { id: "LongCat-
|
|
19678
|
+
default: { id: "LongCat-2.0", name: "LongCat 2.0" },
|
|
19679
|
+
opus: { id: "LongCat-2.0", name: "LongCat 2.0" },
|
|
19680
|
+
sonnet: { id: "LongCat-2.0", name: "LongCat 2.0" },
|
|
19681
|
+
haiku: { id: "LongCat-2.0", name: "LongCat 2.0" }
|
|
18983
19682
|
}
|
|
18984
19683
|
})
|
|
18985
19684
|
]
|
|
@@ -19030,7 +19729,7 @@ var init_builtin = __esm({
|
|
|
19030
19729
|
default: { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
|
19031
19730
|
opus: { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
|
19032
19731
|
sonnet: { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
|
19033
|
-
haiku: { id: "deepseek-
|
|
19732
|
+
haiku: { id: "deepseek-flash", name: "DeepSeek Flash" },
|
|
19034
19733
|
subagent: { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" }
|
|
19035
19734
|
}
|
|
19036
19735
|
})
|
|
@@ -19076,10 +19775,10 @@ var init_builtin = __esm({
|
|
|
19076
19775
|
anthropic("", {
|
|
19077
19776
|
extraEnv: { ...EMPTY_AUTH_TOKEN },
|
|
19078
19777
|
modelMapping: {
|
|
19079
|
-
default: { id: "ZhipuAI/GLM-5.
|
|
19080
|
-
opus: { id: "ZhipuAI/GLM-5.
|
|
19081
|
-
sonnet: { id: "ZhipuAI/GLM-5.
|
|
19082
|
-
haiku: { id: "ZhipuAI/GLM-5.
|
|
19778
|
+
default: { id: "ZhipuAI/GLM-5.2", name: "GLM-5.2" },
|
|
19779
|
+
opus: { id: "ZhipuAI/GLM-5.2", name: "GLM-5.2" },
|
|
19780
|
+
sonnet: { id: "ZhipuAI/GLM-5.2", name: "GLM-5.2" },
|
|
19781
|
+
haiku: { id: "ZhipuAI/GLM-5.2", name: "GLM-5.2" }
|
|
19083
19782
|
}
|
|
19084
19783
|
})
|
|
19085
19784
|
]
|
|
@@ -19304,6 +20003,7 @@ var init_platform_registry = __esm({
|
|
|
19304
20003
|
init_protocols();
|
|
19305
20004
|
init_types2();
|
|
19306
20005
|
init_capabilities2();
|
|
20006
|
+
init_claude_env();
|
|
19307
20007
|
init_merge();
|
|
19308
20008
|
init_relay_discovery();
|
|
19309
20009
|
init_relay_identify();
|
|
@@ -22149,7 +22849,10 @@ function listHarnessApiProviders(store, harness, options) {
|
|
|
22149
22849
|
}
|
|
22150
22850
|
function buildHarnessEnv(harness, resolved) {
|
|
22151
22851
|
if (!resolved) return {};
|
|
22152
|
-
const env = {
|
|
22852
|
+
const env = {
|
|
22853
|
+
...harness === "claude" ? claudeThirdPartyEnv(resolved) : {},
|
|
22854
|
+
...resolved.extraEnv ?? {}
|
|
22855
|
+
};
|
|
22153
22856
|
if (harness === "claude") {
|
|
22154
22857
|
if (resolved.apiKey) {
|
|
22155
22858
|
env.ANTHROPIC_API_KEY = resolved.apiKey;
|
|
@@ -52932,6 +53635,23 @@ var init_computer_use_result_shape = __esm({
|
|
|
52932
53635
|
}
|
|
52933
53636
|
});
|
|
52934
53637
|
|
|
53638
|
+
// ../../packages/shared/src/jev-run-result-shape.ts
|
|
53639
|
+
function isJevRunToolName(toolName) {
|
|
53640
|
+
if (!toolName) return false;
|
|
53641
|
+
return /(?:^|__)(?:browser|computer|device)_run$/.test(toolName);
|
|
53642
|
+
}
|
|
53643
|
+
function looksLikeJevRunResult(obj) {
|
|
53644
|
+
const status = obj.status;
|
|
53645
|
+
if (status !== "paused" && status !== "done" && status !== "aborted") return false;
|
|
53646
|
+
if (typeof obj.runId !== "string") return false;
|
|
53647
|
+
return Array.isArray(obj.since_last) || typeof obj.progress === "object" && obj.progress !== null || typeof obj.steps === "number";
|
|
53648
|
+
}
|
|
53649
|
+
var init_jev_run_result_shape = __esm({
|
|
53650
|
+
"../../packages/shared/src/jev-run-result-shape.ts"() {
|
|
53651
|
+
"use strict";
|
|
53652
|
+
}
|
|
53653
|
+
});
|
|
53654
|
+
|
|
52935
53655
|
// ../../packages/acp/src/tool-result-map.ts
|
|
52936
53656
|
function formatAcpRawOutput(raw) {
|
|
52937
53657
|
return formatAgentToolOutput(raw);
|
|
@@ -53037,11 +53757,12 @@ function shouldKeepFullToolResult(summary2, toolName) {
|
|
|
53037
53757
|
if (looksLikeSessionArchiveToon(summary2)) return true;
|
|
53038
53758
|
if (isComputerUseToolName(toolName)) return true;
|
|
53039
53759
|
if (looksLikeComputerUseOutline(summary2)) return true;
|
|
53760
|
+
if (isJevRunToolName(toolName)) return true;
|
|
53040
53761
|
const trimmed = summary2.trim();
|
|
53041
53762
|
if (!trimmed.startsWith("{")) return false;
|
|
53042
53763
|
try {
|
|
53043
53764
|
const obj = JSON.parse(trimmed);
|
|
53044
|
-
return typeof obj.widget_code === "string" && obj.widget_code.length > 0 || obj.kind === "native" && typeof obj.nativeType === "string" || looksLikeCollabResult(obj) || looksLikeSessionArchiveJson(obj) || looksLikeComputerUseResult(obj);
|
|
53765
|
+
return typeof obj.widget_code === "string" && obj.widget_code.length > 0 || obj.kind === "native" && typeof obj.nativeType === "string" || looksLikeCollabResult(obj) || looksLikeSessionArchiveJson(obj) || looksLikeComputerUseResult(obj) || looksLikeJevRunResult(obj);
|
|
53045
53766
|
} catch {
|
|
53046
53767
|
return false;
|
|
53047
53768
|
}
|
|
@@ -53055,6 +53776,7 @@ var init_tool_result_map = __esm({
|
|
|
53055
53776
|
init_capability_prompt_tags();
|
|
53056
53777
|
init_session_archive_result_shape();
|
|
53057
53778
|
init_computer_use_result_shape();
|
|
53779
|
+
init_jev_run_result_shape();
|
|
53058
53780
|
init_tool_ui();
|
|
53059
53781
|
init_tool_normalization();
|
|
53060
53782
|
}
|
|
@@ -72562,8 +73284,8 @@ import { fileURLToPath } from "node:url";
|
|
|
72562
73284
|
function resolveCliReleaseVersion() {
|
|
72563
73285
|
const fromEnv = process.env.SUPERONE_CLI_VERSION?.trim();
|
|
72564
73286
|
if (fromEnv) return fromEnv;
|
|
72565
|
-
if ("0.
|
|
72566
|
-
return "0.
|
|
73287
|
+
if ("0.68.0-alpha".trim()) {
|
|
73288
|
+
return "0.68.0-alpha".trim();
|
|
72567
73289
|
}
|
|
72568
73290
|
const fromDist = readDistManifestVersion();
|
|
72569
73291
|
if (fromDist) return fromDist;
|