shortcutxl 0.3.34 → 0.3.35
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/CHANGELOG.md +14 -9
- package/dist/app/credits/session-credits.d.ts +6 -0
- package/dist/app/credits/shortcut-credits.d.ts +1 -0
- package/dist/app/index.d.ts +1 -0
- package/dist/app/prompts/com-api-reference.json +95 -26
- package/dist/app/settings-manager.d.ts +8 -0
- package/dist/app/startup-info.d.ts +5 -0
- package/dist/app/tools/execute-code/com-executor.d.ts +5 -2
- package/dist/app/tools/execute-code/com.d.ts +2 -2
- package/dist/app/tools/execute-code/edit-mode-retry.d.ts +18 -0
- package/dist/app/tools/execute-code/index.d.ts +1 -2
- package/dist/app/xll/endpoint.d.ts +3 -3
- package/dist/app/xll/http-url.d.ts +10 -2
- package/dist/cli.js +1585 -1472
- package/dist/core/agent-loop.d.ts +5 -6
- package/dist/main-helpers.d.ts +6 -0
- package/dist/main.d.ts +0 -6
- package/dist/remote-control/approval-controller.d.ts +44 -0
- package/dist/remote-control/approval-gate.d.ts +9 -0
- package/dist/remote-control/auto-approve-settings.d.ts +4 -0
- package/dist/remote-control/bootstrap.d.ts +31 -0
- package/dist/remote-control/broker/client.d.ts +49 -0
- package/dist/remote-control/broker/global-settings.d.ts +11 -0
- package/dist/remote-control/broker/surface.d.ts +25 -0
- package/dist/remote-control/broker/types.d.ts +47 -0
- package/dist/remote-control/chat-commands.d.ts +38 -0
- package/dist/remote-control/config-store.d.ts +19 -0
- package/dist/remote-control/desktop-runtime.d.ts +169 -0
- package/dist/remote-control/event-buffer.d.ts +16 -0
- package/dist/remote-control/index.d.ts +14 -0
- package/dist/remote-control/phone-status-notifications.d.ts +4 -0
- package/dist/remote-control/relay-client.d.ts +19 -0
- package/dist/remote-control/session-registry.d.ts +42 -0
- package/dist/remote-control/shorty-phone-manager.d.ts +45 -0
- package/dist/remote-control/whatsapp/controller.d.ts +49 -0
- package/dist/remote-control/whatsapp/formatting.d.ts +4 -0
- package/dist/remote-control/whatsapp/paths.d.ts +6 -0
- package/dist/remote-control/whatsapp/transport.d.ts +19 -0
- package/dist/remote-control/whatsapp/types.d.ts +34 -0
- package/dist/remote-control/whatsapp-binding-store.d.ts +12 -0
- package/dist/remote-control/whatsapp-linked.d.ts +5 -0
- package/dist/remote-control/ws-server.d.ts +23 -0
- package/dist/shell/commands/shorty-command.d.ts +5 -0
- package/dist/shell/components/selectors/extension-selector.d.ts +5 -3
- package/dist/shell/footer-data-provider.d.ts +2 -0
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/interactive/interactive-mode.d.ts +8 -2
- package/dist/shell/interactive/slash-commands.d.ts +8 -2
- package/dist/shell/session-client.d.ts +1 -1
- package/package.json +12 -4
- package/skills/advanced-mog-api/api-reference.json +870 -244
- package/user-docs/dist/index.html +973 -973
- package/user-docs/dist/shortcutxl-docs.pdf +0 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/shortcut_xl/_exec_entry.py +5 -58
- package/xll/modules/shortcut_xl/_managed.py +32 -12
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip-26.0.1.dist-info/RECORD +3 -3
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.12.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/vcruntime140.dll +0 -0
- package/xll/modules/shortcut_xl/_sandbox.py +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [0.3.
|
|
4
|
-
|
|
5
|
-
- **
|
|
6
|
-
- **
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.35]
|
|
4
|
+
|
|
5
|
+
- **Edit-mode detection** — When you're editing a cell, ShortcutXL now detects it and waits instead of throwing a cryptic COM error. You'll see a prompt asking you to press Enter or Escape, and execution resumes automatically.
|
|
6
|
+
- **Bug fixes** — General stability and reliability improvements across credit reporting, Excel operations, session resumption, and concurrency.
|
|
7
|
+
|
|
8
|
+
## [0.3.34]
|
|
9
|
+
|
|
10
|
+
- **Revamped update flow** - When an update is available at launch, ShortcutXL now prompts before the shell starts and runs the update in the foreground.
|
|
11
|
+
- **Import skills from Claude Code and Codex** - New `/port-skills` lets you register skills from Claude Code, Codex, and `.agents` folders.
|
|
12
|
+
- **Better `/autonomous` continuation** - Long-running autonomous tasks now continue more cleanly after a context refresh instead of losing the thread mid-run.
|
|
13
|
+
|
|
14
|
+
## [0.2.32]
|
|
10
15
|
|
|
11
16
|
- **Durable memory** - ShortcutXL now remembers useful context across sessions, so you no longer need to repeat the same preferences and project details every time you start a new conversation.
|
|
12
17
|
- **Faster and more reliable tool use** - Read-only tools can run while the assistant is still streaming, interrupted turns recover more gracefully, and long responses continue more reliably.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentMessage } from '../../core/index.js';
|
|
2
|
+
import type { ModelRegistry } from '../providers/model-registry.js';
|
|
3
|
+
type CreditModelLookup = Pick<ModelRegistry, 'find' | 'getAll'>;
|
|
4
|
+
export declare function computeSessionCreditsUsed(messages: AgentMessage[], modelRegistry: CreditModelLookup): number;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=session-credits.d.ts.map
|
package/dist/app/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export type { SessionPersistenceBackend } from './session/session-persistence-ba
|
|
|
37
37
|
export type { SessionEntry, SessionHeader, SessionInfoEntry, SessionMessageEntry } from './session/session-schema.js';
|
|
38
38
|
export type { BranchSessionStore, ModelSessionStore, PersistenceSessionStore, ProductSessionStore, SessionInfoStore } from './session/session-store-types.js';
|
|
39
39
|
export { SettingsManager, type CompactionSettings, type ImageSettings, type PackageSource, type RetrySettings } from './settings-manager.js';
|
|
40
|
+
export type { StartupInfoEntry } from './startup-info.js';
|
|
40
41
|
export { downloadSkills } from './sync/skills-download.js';
|
|
41
42
|
export { uploadSkills } from './sync/skills-upload.js';
|
|
42
43
|
export type { SkillUploadApprovalRequest, SkillsUploadResult } from './sync/skills-upload.js';
|
|
@@ -6,47 +6,70 @@
|
|
|
6
6
|
"getSheetNames": {
|
|
7
7
|
"signature": "def getSheetNames() -> list[str]",
|
|
8
8
|
"docstring": "Get the names of all sheets in the workbook.",
|
|
9
|
-
"tags": [
|
|
9
|
+
"tags": [
|
|
10
|
+
"action",
|
|
11
|
+
"ask"
|
|
12
|
+
]
|
|
10
13
|
},
|
|
11
14
|
"getWorkbookSummary": {
|
|
12
15
|
"signature": "def getWorkbookSummary() -> str",
|
|
13
16
|
"docstring": "Get sheet names and used ranges for this workbook.\nReturns lines like:\n Sheets and their used ranges:\n Sheet1: A1:D10 (active)\n Inputs: (empty)",
|
|
14
|
-
"tags": [
|
|
17
|
+
"tags": [
|
|
18
|
+
"action",
|
|
19
|
+
"ask"
|
|
20
|
+
]
|
|
15
21
|
},
|
|
16
22
|
"getSheet": {
|
|
17
23
|
"signature": "def getSheet(name: str) -> 'Worksheet'",
|
|
18
24
|
"docstring": "Get a sheet by name, returned as a wrapped Worksheet.",
|
|
19
|
-
"tags": [
|
|
25
|
+
"tags": [
|
|
26
|
+
"action",
|
|
27
|
+
"ask"
|
|
28
|
+
]
|
|
20
29
|
},
|
|
21
30
|
"addSheet": {
|
|
22
31
|
"signature": "def addSheet(name: str, index: int | None = None) -> 'Worksheet'",
|
|
23
32
|
"docstring": "Add a new sheet at 0-based index. index=0 inserts before the first sheet.\nOmit index for Excel's default position.\nExample: wb.addSheet(\"NewSheet\", 0) # insert as first sheet",
|
|
24
|
-
"tags": [
|
|
33
|
+
"tags": [
|
|
34
|
+
"action"
|
|
35
|
+
]
|
|
25
36
|
},
|
|
26
37
|
"moveSheet": {
|
|
27
38
|
"signature": "def moveSheet(name: str, index: int) -> None",
|
|
28
39
|
"docstring": "Move a sheet to 0-based index. index=0 moves to first, index=Count-1 moves to last.\nExample: wb.moveSheet(\"Data\", 0) # move to first position",
|
|
29
|
-
"tags": [
|
|
40
|
+
"tags": [
|
|
41
|
+
"action"
|
|
42
|
+
]
|
|
30
43
|
},
|
|
31
44
|
"calculate": {
|
|
32
45
|
"signature": "def calculate() -> None",
|
|
33
46
|
"docstring": "Recalculate the entire workbook.\nDependent formulas don't update until after code block completes \u00e2\u20ac\u201d read in a follow-up block.",
|
|
34
|
-
"tags": [
|
|
47
|
+
"tags": [
|
|
48
|
+
"action"
|
|
49
|
+
]
|
|
35
50
|
},
|
|
36
51
|
"errorCheck": {
|
|
37
52
|
"signature": "def errorCheck(ranges: list[str] | None = None) -> str",
|
|
38
53
|
"docstring": "Scan for errors (#REF!, #DIV/0!, #NAME?, #VALUE!, #N/A, #NULL!, #NUM!).\n Args:\n ranges: Optional sheet names (\"Sheet1\") or ranges (\"Sheet1!A1:D50\"). Omit to check all.\n Returns:\n \"No issues found.\" or \"Errors (N):\nSheet1!A1: #REF!\n...\"",
|
|
39
|
-
"tags": [
|
|
54
|
+
"tags": [
|
|
55
|
+
"action",
|
|
56
|
+
"ask"
|
|
57
|
+
]
|
|
40
58
|
},
|
|
41
59
|
"copyPasteRange": {
|
|
42
60
|
"signature": "def copyPasteRange(from_range: str, to_address: str, paste_type: str = 'all', ) -> None",
|
|
43
61
|
"docstring": "Copy range within same workbook via range.Copy + PasteSpecial.\nAddresses must include sheet name. Do NOT use Sheet.Copy (broken via pywin32).\nExample: wb.copyPasteRange(\"Sheet1!A1:D10\", \"Sheet2!A1\", paste_type=\"values\")",
|
|
44
|
-
"tags": [
|
|
62
|
+
"tags": [
|
|
63
|
+
"action"
|
|
64
|
+
]
|
|
45
65
|
},
|
|
46
66
|
"getNamedRangeInfo": {
|
|
47
67
|
"signature": "def getNamedRangeInfo(max_count: int = 50) -> str",
|
|
48
68
|
"docstring": "Get named ranges. Returns formatted string with name, reference, scope, and comment.\nExample output: \"Named Ranges (2):\\n Name: TaxRate | Ref: =Settings!$B$2 | Scope: workbook | Comment: ...\"\nReturns \"No named ranges found.\" if none exist.",
|
|
49
|
-
"tags": [
|
|
69
|
+
"tags": [
|
|
70
|
+
"action",
|
|
71
|
+
"ask"
|
|
72
|
+
]
|
|
50
73
|
}
|
|
51
74
|
}
|
|
52
75
|
},
|
|
@@ -56,62 +79,93 @@
|
|
|
56
79
|
"getSheetSummary": {
|
|
57
80
|
"signature": "def getSheetSummary() -> str",
|
|
58
81
|
"docstring": "Overview: name, used range, tables (with style/banded/header/total props),\npivots (with range), conditional formats (type/range/priority/stopIfTrue),\nautofilter (with filtering status), charts (with type).",
|
|
59
|
-
"tags": [
|
|
82
|
+
"tags": [
|
|
83
|
+
"action",
|
|
84
|
+
"ask"
|
|
85
|
+
]
|
|
60
86
|
},
|
|
61
87
|
"getUsedRange": {
|
|
62
88
|
"signature": "def getUsedRange() -> str",
|
|
63
89
|
"docstring": "Get the used range address like \"A1:F20\", or \"\" if empty.",
|
|
64
|
-
"tags": [
|
|
90
|
+
"tags": [
|
|
91
|
+
"action",
|
|
92
|
+
"ask"
|
|
93
|
+
]
|
|
65
94
|
},
|
|
66
95
|
"getCell": {
|
|
67
96
|
"signature": "def getCell(address: str, include_style: bool = True) -> str",
|
|
68
97
|
"docstring": "Formatted cell string: \"value(=FORMULA) (style_json)\". Formula always included.\nZero with custom format appends [0]: \"$ - [0]\".\nExample:\n print(sheet.getCell(\"A1\"))\n print(sheet.getCell(\"A1\", include_style=False))",
|
|
69
|
-
"tags": [
|
|
98
|
+
"tags": [
|
|
99
|
+
"action",
|
|
100
|
+
"ask"
|
|
101
|
+
]
|
|
70
102
|
},
|
|
71
103
|
"getCellRange": {
|
|
72
104
|
"signature": "def getCellRange(range_addr: str, include_style: bool = True) -> str",
|
|
73
105
|
"docstring": "Markdown-like range: \"A1:Name | B1:Value\\nA2:Alice | B2:100\". Uses display text. Max 3000 cells.\nAppends \"--- Style patterns ---\" section when include_style=True.",
|
|
74
|
-
"tags": [
|
|
106
|
+
"tags": [
|
|
107
|
+
"action",
|
|
108
|
+
"ask"
|
|
109
|
+
]
|
|
75
110
|
},
|
|
76
111
|
"getRawCellData": {
|
|
77
112
|
"signature": "def getRawCellData(address: str, formula: bool = False) -> Any",
|
|
78
113
|
"docstring": "Get raw data value from a cell, preserving data type. Set formula=True to get the formula string.",
|
|
79
|
-
"tags": [
|
|
114
|
+
"tags": [
|
|
115
|
+
"action",
|
|
116
|
+
"ask"
|
|
117
|
+
]
|
|
80
118
|
},
|
|
81
119
|
"getRawRangeData": {
|
|
82
120
|
"signature": "def getRawRangeData(range_addr: str, formula: bool = False) -> list[list[Any]]",
|
|
83
121
|
"docstring": "Get raw data for a range as 2D list. Always returns 2D list even for single row/column.",
|
|
84
|
-
"tags": [
|
|
122
|
+
"tags": [
|
|
123
|
+
"action",
|
|
124
|
+
"ask"
|
|
125
|
+
]
|
|
85
126
|
},
|
|
86
127
|
"regexSearch": {
|
|
87
128
|
"signature": "def regexSearch(patterns: list[str], match_case: bool = False) -> list[dict]",
|
|
88
129
|
"docstring": "Regex search across used range using display text. Returns [{\"address\": \"A1\", \"value\": \"display text\"}, ...].\nExample: sheet.regexSearch([\"revenue\", \"cost\"])",
|
|
89
|
-
"tags": [
|
|
130
|
+
"tags": [
|
|
131
|
+
"action",
|
|
132
|
+
"ask"
|
|
133
|
+
]
|
|
90
134
|
},
|
|
91
135
|
"setCell": {
|
|
92
136
|
"signature": "def setCell(address: str, value: Any, number_format: str | None = None, note: str | None = None, ) -> None",
|
|
93
137
|
"docstring": "Write value or formula. \"=\" prefix = formula. None or \"\" clears the cell.\nExamples:\n sheet.setCell(\"A1\", 8000)\n sheet.setCell(\"C1\", 0.15, number_format=\"0%\", note=\"Tax rate\")\n sheet.setCell(\"B1\", \"=SUM(A1:A10)\")",
|
|
94
|
-
"tags": [
|
|
138
|
+
"tags": [
|
|
139
|
+
"action"
|
|
140
|
+
]
|
|
95
141
|
},
|
|
96
142
|
"setCellRange": {
|
|
97
143
|
"signature": "def setCellRange(range_addr: str, values: list[list[Any]], number_format: str | None = None, ) -> None",
|
|
98
144
|
"docstring": "Bulk write \u00e2\u20ac\u201d ALWAYS use for >100 cells. \"=\" prefix = formula.\nExamples:\n sheet.setCellRange(\"A1:B2\", [[1, 2], [3, 4]])\n sheet.setCellRange(\"A1:B2\", [[\"=SUM(C1)\", \"=SUM(D1)\"], [5, 6]], number_format=\"$#,##0\")",
|
|
99
|
-
"tags": [
|
|
145
|
+
"tags": [
|
|
146
|
+
"action"
|
|
147
|
+
]
|
|
100
148
|
},
|
|
101
149
|
"autoFill": {
|
|
102
150
|
"signature": "def autoFill(source_range: str, target_range: str, fill_mode: str = 'auto', ) -> None",
|
|
103
151
|
"docstring": "Drag-fill. Source must be contained within target.\nUse fill_mode=\"constant\" when copying a single value without incrementing.\nWARNING: Single numeric value with \"auto\" creates incrementing sequence (0,1,2,3...).\nExample: sheet.autoFill(\"A1:A2\", \"A1:A10\")",
|
|
104
|
-
"tags": [
|
|
152
|
+
"tags": [
|
|
153
|
+
"action"
|
|
154
|
+
]
|
|
105
155
|
},
|
|
106
156
|
"addPicture": {
|
|
107
157
|
"signature": "def addPicture(name: str, base64_data: str, anchor_cell: str) -> None",
|
|
108
158
|
"docstring": "Add a picture from base64-encoded PNG or JPEG data. No data URI prefix.\nExample: sheet.addPicture(\"chart1\", base64_string, \"F2\")",
|
|
109
|
-
"tags": [
|
|
159
|
+
"tags": [
|
|
160
|
+
"action"
|
|
161
|
+
]
|
|
110
162
|
},
|
|
111
163
|
"setIBTextColors": {
|
|
112
164
|
"signature": "def setIBTextColors(range_addr: str, ignored_constants: list[int] | None = None, colors: dict | None = None, ) -> None",
|
|
113
165
|
"docstring": "IB text colors for numeric inputs only. Text strings and booleans are left untouched.\n- Blue/16711680: hard-coded numeric constants (int/float)\n- Black/0: formulas (same-sheet references)\n- Green/32768: formulas with cross-sheet references (contains '!')\nColors are BGR integers (native COM format).\nExample: sheet.setIBTextColors(\"A1:D10\", ignored_constants=[0])",
|
|
114
|
-
"tags": [
|
|
166
|
+
"tags": [
|
|
167
|
+
"action"
|
|
168
|
+
]
|
|
115
169
|
}
|
|
116
170
|
}
|
|
117
171
|
}
|
|
@@ -120,27 +174,42 @@
|
|
|
120
174
|
"hex_to_bgr": {
|
|
121
175
|
"signature": "def hex_to_bgr(hex_str: str) -> int",
|
|
122
176
|
"docstring": "Convert \"#RRGGBB\" hex string to BGR integer for Excel COM.\nExample: ws.Range(\"A1\").Font.Color = hex_to_bgr(\"#FF0000\") # red",
|
|
123
|
-
"tags": [
|
|
177
|
+
"tags": [
|
|
178
|
+
"action",
|
|
179
|
+
"ask"
|
|
180
|
+
]
|
|
124
181
|
},
|
|
125
182
|
"index_to_address": {
|
|
126
183
|
"signature": "def index_to_address(row: int, col: int) -> str",
|
|
127
184
|
"docstring": "Convert 0-based (row, col) to Excel address: index_to_address(0, 0) \u00e2\u2020\u2019 \"A1\".",
|
|
128
|
-
"tags": [
|
|
185
|
+
"tags": [
|
|
186
|
+
"action",
|
|
187
|
+
"ask"
|
|
188
|
+
]
|
|
129
189
|
},
|
|
130
190
|
"address_to_index": {
|
|
131
191
|
"signature": "def address_to_index(address: str) -> tuple[int, int]",
|
|
132
192
|
"docstring": "Parse \"A1\" into (row, col) 0-based tuple: address_to_index(\"B3\") \u00e2\u2020\u2019 (2, 1).",
|
|
133
|
-
"tags": [
|
|
193
|
+
"tags": [
|
|
194
|
+
"action",
|
|
195
|
+
"ask"
|
|
196
|
+
]
|
|
134
197
|
},
|
|
135
198
|
"col_letter": {
|
|
136
199
|
"signature": "def col_letter(index: int) -> str",
|
|
137
200
|
"docstring": "Convert 0-based column index to letter: col_letter(26) \u00e2\u2020\u2019 \"AA\".",
|
|
138
|
-
"tags": [
|
|
201
|
+
"tags": [
|
|
202
|
+
"action",
|
|
203
|
+
"ask"
|
|
204
|
+
]
|
|
139
205
|
},
|
|
140
206
|
"col_index": {
|
|
141
207
|
"signature": "def col_index(letter: str) -> int",
|
|
142
208
|
"docstring": "Convert column letter to 0-based index: col_index(\"AA\") \u00e2\u2020\u2019 26.",
|
|
143
|
-
"tags": [
|
|
209
|
+
"tags": [
|
|
210
|
+
"action",
|
|
211
|
+
"ask"
|
|
212
|
+
]
|
|
144
213
|
}
|
|
145
214
|
}
|
|
146
215
|
}
|
|
@@ -63,6 +63,10 @@ export interface SandboxSettings {
|
|
|
63
63
|
network?: 'none' | 'proxy' | 'full';
|
|
64
64
|
allowedDomains?: string[];
|
|
65
65
|
}
|
|
66
|
+
export interface RemoteControlSettings {
|
|
67
|
+
enabled?: boolean;
|
|
68
|
+
provider?: 'whatsapp';
|
|
69
|
+
}
|
|
66
70
|
/** Concrete sandbox defaults — always called at runtime so paths resolve correctly. */
|
|
67
71
|
export declare function getDefaultSandboxSettings(): Required<SandboxSettings>;
|
|
68
72
|
export type TransportSetting = Transport;
|
|
@@ -124,6 +128,7 @@ export interface Settings {
|
|
|
124
128
|
fallbackModel?: string;
|
|
125
129
|
stripThinking?: boolean;
|
|
126
130
|
};
|
|
131
|
+
remoteControl?: RemoteControlSettings;
|
|
127
132
|
}
|
|
128
133
|
export type SettingsScope = 'global' | 'project';
|
|
129
134
|
export interface SettingsStorage {
|
|
@@ -326,6 +331,9 @@ export declare class SettingsManager {
|
|
|
326
331
|
getToolSummariesEnabled(): boolean;
|
|
327
332
|
setToolSummariesEnabled(enabled: boolean): void;
|
|
328
333
|
getDurableMemoryEnabled(): boolean;
|
|
334
|
+
getRemoteControlEnabled(): boolean;
|
|
335
|
+
getRemoteControlProvider(): RemoteControlSettings['provider'];
|
|
336
|
+
setRemoteControl(config: RemoteControlSettings): void;
|
|
329
337
|
setDurableMemoryEnabled(enabled: boolean): void;
|
|
330
338
|
/** Remove a connection's metadata. */
|
|
331
339
|
removeConnection(name: string): void;
|
|
@@ -11,14 +11,17 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type ApprovalChoice, type ApprovalGate, type ApprovalRequest } from '../../approvals/types.js';
|
|
13
13
|
import type { ExtensionContext } from '../../extensions/index.js';
|
|
14
|
+
import { type LocalExcelHttpUrl } from '../../xll/http-url.js';
|
|
14
15
|
import type { ExcelApprovalPayload } from './approval-payload.js';
|
|
15
16
|
import { type DiffPayload } from './diff.js';
|
|
17
|
+
import { type EditModeRetryTiming } from './edit-mode-retry.js';
|
|
16
18
|
export interface ComExecResult {
|
|
17
19
|
ok: boolean;
|
|
18
20
|
output?: string;
|
|
19
21
|
error?: string;
|
|
20
22
|
diff?: DiffPayload;
|
|
21
23
|
cfTxId?: string;
|
|
24
|
+
editMode?: boolean;
|
|
22
25
|
}
|
|
23
26
|
export type ApprovalOutcome = 'accepted' | 'reverted' | 'revert-failed' | 'rejected';
|
|
24
27
|
export interface LocalExecResult {
|
|
@@ -32,7 +35,6 @@ export interface ExcelExecApprovalObservability {
|
|
|
32
35
|
onReverted?: (request: ApprovalRequest<ExcelApprovalPayload>) => void;
|
|
33
36
|
onRevertFailed?: (request: ApprovalRequest<ExcelApprovalPayload>) => void;
|
|
34
37
|
}
|
|
35
|
-
export type ExcelHttpEndpoint = number | string | (() => string) | undefined;
|
|
36
38
|
/** Validate that a parsed JSON value has the COM execute result shape. */
|
|
37
39
|
export declare function isComExecResult(v: unknown): v is ComExecResult;
|
|
38
40
|
/**
|
|
@@ -45,10 +47,11 @@ export declare function resolveApproval(result: ComExecResult, approval: Approva
|
|
|
45
47
|
* This is the reusable core for desktop-local COM execution.
|
|
46
48
|
* The XLL endpoint (`httpUrl`) is always local to the machine running the agent.
|
|
47
49
|
*/
|
|
48
|
-
export declare function executeComLocally(
|
|
50
|
+
export declare function executeComLocally(excelHttpUrl: LocalExcelHttpUrl | undefined, code: string, options?: {
|
|
49
51
|
approval?: ApprovalGate<ExcelApprovalPayload>;
|
|
50
52
|
ctx?: ExtensionContext;
|
|
51
53
|
signal?: AbortSignal;
|
|
52
54
|
observability?: ExcelExecApprovalObservability;
|
|
55
|
+
editModeTiming?: Partial<EditModeRetryTiming>;
|
|
53
56
|
}): Promise<LocalExecResult>;
|
|
54
57
|
//# sourceMappingURL=com-executor.d.ts.map
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import type { ToolDefinition } from '../../../core/core-types.js';
|
|
9
9
|
import type { ApprovalGate } from '../../approvals/types.js';
|
|
10
10
|
import type { ExcelApprovalPayload } from './approval-payload.js';
|
|
11
|
-
import { type ComExecResult, type ExcelExecApprovalObservability
|
|
11
|
+
import { type ComExecResult, type ExcelExecApprovalObservability } from './com-executor.js';
|
|
12
12
|
declare const schema: import("@sinclair/typebox").TObject<{
|
|
13
13
|
description: import("@sinclair/typebox").TString;
|
|
14
14
|
code: import("@sinclair/typebox").TString;
|
|
15
15
|
}>;
|
|
16
|
-
export declare function createExcelExecTool(
|
|
16
|
+
export declare function createExcelExecTool(httpPort?: number, approval?: ApprovalGate<ExcelApprovalPayload>, observability?: ExcelExecApprovalObservability): ToolDefinition<typeof schema, ComExecResult>;
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=com.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExtensionContext } from '../../extensions/index.js';
|
|
2
|
+
export interface EditModeAwareResult {
|
|
3
|
+
editMode?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface EditModeRetryTiming {
|
|
6
|
+
retryIntervalMs: number;
|
|
7
|
+
blockingPromptAfterMs: number;
|
|
8
|
+
promptCooldownMs: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function getEditModeAbortMessage(): string;
|
|
11
|
+
export declare function isEditModeAbortError(error: unknown): boolean;
|
|
12
|
+
export declare function resolveEditModeRetry<TResult extends EditModeAwareResult>(initialResult: TResult, options: {
|
|
13
|
+
ctx?: Pick<ExtensionContext, 'hasUI' | 'ui'>;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
send: () => Promise<TResult>;
|
|
16
|
+
timing?: Partial<EditModeRetryTiming>;
|
|
17
|
+
}): Promise<TResult>;
|
|
18
|
+
//# sourceMappingURL=edit-mode-retry.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApprovalGate } from '../../approvals/types.js';
|
|
2
2
|
import type { ExcelApprovalPayload } from './approval-payload.js';
|
|
3
|
-
import type { ExcelExecApprovalObservability
|
|
3
|
+
import type { ExcelExecApprovalObservability } from './com-executor.js';
|
|
4
4
|
import { createExcelExecTool } from './com.js';
|
|
5
5
|
import { createSheetExecTool } from './mog.js';
|
|
6
6
|
export type { ExcelApprovalPayload } from './approval-payload.js';
|
|
@@ -9,7 +9,6 @@ export type ExecuteCodePlatform = 'com' | 'mog';
|
|
|
9
9
|
export type ExecuteCodeFactoryOptions = {
|
|
10
10
|
platform: 'com';
|
|
11
11
|
httpPort?: number;
|
|
12
|
-
httpUrl?: ExcelHttpEndpoint;
|
|
13
12
|
approval?: ApprovalGate<ExcelApprovalPayload>;
|
|
14
13
|
observability?: ExcelExecApprovalObservability;
|
|
15
14
|
} | {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { type LocalExcelHttpUrl } from './http-url.js';
|
|
1
2
|
import { type XllSession } from './session.js';
|
|
2
3
|
type ExcelHttpResolverOptions = {
|
|
3
|
-
env?: NodeJS.ProcessEnv;
|
|
4
4
|
session?: Pick<XllSession, 'port'> | null;
|
|
5
5
|
};
|
|
6
|
-
export declare function resolveEffectiveExcelHttpUrl(options?: ExcelHttpResolverOptions):
|
|
7
|
-
export declare function getEffectiveExcelHttpUrl():
|
|
6
|
+
export declare function resolveEffectiveExcelHttpUrl(options?: ExcelHttpResolverOptions): LocalExcelHttpUrl;
|
|
7
|
+
export declare function getEffectiveExcelHttpUrl(): LocalExcelHttpUrl;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=endpoint.d.ts.map
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
export type LocalExcelHttpUrl = string & {
|
|
2
|
+
readonly __localExcelHttpUrl: unique symbol;
|
|
3
|
+
};
|
|
1
4
|
/**
|
|
2
5
|
* Normalize the Excel XLL base URL and reject anything that is not loopback HTTP.
|
|
3
6
|
* Returning `origin` strips any path/query/fragment before callers append fixed endpoints.
|
|
4
7
|
*/
|
|
5
|
-
export declare function requireLocalExcelHttpUrl(httpUrl: string):
|
|
8
|
+
export declare function requireLocalExcelHttpUrl(httpUrl: string): LocalExcelHttpUrl;
|
|
9
|
+
/**
|
|
10
|
+
* Normalize a full Excel XLL request URL and reject anything that is not loopback HTTP.
|
|
11
|
+
* Unlike `requireLocalExcelHttpUrl`, this preserves the request path/query/fragment.
|
|
12
|
+
*/
|
|
13
|
+
export declare function requireLocalExcelHttpRequestUrl(httpUrl: string): LocalExcelHttpUrl;
|
|
6
14
|
export declare function parseExcelHttpPort(value: string | number): number;
|
|
7
|
-
export declare function buildLocalExcelHttpUrl(port: string | number):
|
|
15
|
+
export declare function buildLocalExcelHttpUrl(port: string | number): LocalExcelHttpUrl;
|
|
8
16
|
//# sourceMappingURL=http-url.d.ts.map
|