shortcutxl 0.3.43 → 0.3.44

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.44]
4
+
5
+ - **Shorty mascot** — Replaced the braille X logo with a new Shorty block-art mascot.
6
+ - **Plan mode bug fix** — Fixed an issue where plan mode was unable to read files.
7
+
3
8
  ## [0.3.43]
4
9
 
5
10
  - **Security & stability** — Internal hardening fixes across the runtime.
@@ -10,6 +10,8 @@ export declare const SHORTCUT_LLM_PROXY_URL: string;
10
10
  export declare const SHORTCUT_AUTH_URL: string;
11
11
  /** API service for credit balance and billing. */
12
12
  export declare const SHORTCUT_API_URL: string;
13
+ /** Log ingest service for client-side observability. */
14
+ export declare const NEXT_PUBLIC_LOG_INGEST_URL: string;
13
15
  /** Optional directory for fork trace review artifacts. */
14
16
  export declare function getShortcutForkTraceDir(): string | undefined;
15
17
  /** WebSocket URL for the collab signaling server. */
@@ -1,146 +1,146 @@
1
- {
2
- "interfaces": {
3
- "Workbook": {
4
- "docstring": "Workbook wrapper.\nUsage:\n wb = Workbook(app.Workbooks(\"MyFile.xlsx\"))\n\nRaw COM access:\n wb._wb \u2014 the underlying COM Workbook object for direct platform API calls.\n Example: wb._wb.Worksheets(\"Sheet1\").Visible = False",
5
- "functions": {
6
- "getSheetNames": {
7
- "signature": "def getSheetNames() -> list[str]",
8
- "docstring": "Get the names of all sheets in the workbook.",
9
- "tags": ["action", "ask"]
10
- },
11
- "getWorkbookSummary": {
12
- "signature": "def getWorkbookSummary() -> str",
13
- "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": ["action", "ask"]
15
- },
16
- "getSheet": {
17
- "signature": "def getSheet(name: str) -> 'Worksheet'",
18
- "docstring": "Get a sheet by name, returned as a wrapped Worksheet.",
19
- "tags": ["action", "ask"]
20
- },
21
- "addSheet": {
22
- "signature": "def addSheet(name: str, index: int | None = None) -> 'Worksheet'",
23
- "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": ["action"]
25
- },
26
- "moveSheet": {
27
- "signature": "def moveSheet(name: str, index: int) -> None",
28
- "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": ["action"]
30
- },
31
- "calculate": {
32
- "signature": "def calculate() -> None",
33
- "docstring": "Recalculate the entire workbook.\nDependent formulas don't update until after code block completes \u2014 read in a follow-up block.",
34
- "tags": ["action"]
35
- },
36
- "errorCheck": {
37
- "signature": "def errorCheck(ranges: list[str] | None = None) -> str",
38
- "docstring": "Scan for errors (#REF!, #DIV/0!, #NAME?, #VALUE!, #N/A, #NULL!, #NUM!). Ranges MUST include a sheet name (\"Sheet1\" or \"Sheet1!A1:D50\") \u2014 bare ranges like \"A1:D50\" will fail.\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": ["action", "ask"]
40
- },
41
- "copyPasteRange": {
42
- "signature": "def copyPasteRange(from_range: str, to_address: str, paste_type: str = 'all', ) -> None",
43
- "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": ["action"]
45
- },
46
- "getNamedRangeInfo": {
47
- "signature": "def getNamedRangeInfo(max_count: int = 50) -> str",
48
- "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": ["action", "ask"]
50
- }
51
- }
52
- },
53
- "Worksheet": {
54
- "docstring": "Worksheet wrapper.\nUsage:\n sheet = wb.getSheet(\"Sheet1\")\n\nRaw COM access:\n sheet._ws \u2014 the underlying COM Worksheet object for direct platform API calls.\n Use for borders, text orientation, cell protection, and other properties not covered by the wrapper.\n Example: sheet._ws.Range(\"A1\").Borders(9).LineStyle = 1 # xlEdgeBottom, xlContinuous",
55
- "functions": {
56
- "getSheetSummary": {
57
- "signature": "def getSheetSummary() -> str",
58
- "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": ["action", "ask"]
60
- },
61
- "getUsedRange": {
62
- "signature": "def getUsedRange() -> str",
63
- "docstring": "Get the used range address like \"A1:F20\", or \"\" if empty.",
64
- "tags": ["action", "ask"]
65
- },
66
- "getCell": {
67
- "signature": "def getCell(address: str, include_style: bool = True) -> str",
68
- "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": ["action", "ask"]
70
- },
71
- "getCellRange": {
72
- "signature": "def getCellRange(range_addr: str, include_style: bool = True) -> str",
73
- "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": ["action", "ask"]
75
- },
76
- "getRawCellData": {
77
- "signature": "def getRawCellData(address: str, formula: bool = False) -> Any",
78
- "docstring": "Get raw data value from a cell, preserving data type. Set formula=True to get the formula string.",
79
- "tags": ["action", "ask"]
80
- },
81
- "getRawRangeData": {
82
- "signature": "def getRawRangeData(range_addr: str, formula: bool = False) -> list[list[Any]]",
83
- "docstring": "Get raw data for a range as 2D list. Always returns 2D list even for single row/column.",
84
- "tags": ["action", "ask"]
85
- },
86
- "regexSearch": {
87
- "signature": "def regexSearch(patterns: list[str], match_case: bool = False) -> list[dict]",
88
- "docstring": "Regex search across used range using display text. Returns [{\"address\": \"A1\", \"value\": \"display text\"}, ...].\nExample: sheet.regexSearch([\"revenue\", \"cost\"])",
89
- "tags": ["action", "ask"]
90
- },
91
- "setCell": {
92
- "signature": "def setCell(address: str, value: Any, number_format: str | None = None, note: str | None = None, ) -> None",
93
- "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": ["action"]
95
- },
96
- "setCellRange": {
97
- "signature": "def setCellRange(range_addr: str, values: list[list[Any]], number_format: str | None = None, ) -> None",
98
- "docstring": "Bulk write \u2014 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": ["action"]
100
- },
101
- "autoFill": {
102
- "signature": "def autoFill(source_range: str, target_range: str, fill_mode: str = 'auto', ) -> None",
103
- "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": ["action"]
105
- },
106
- "addPicture": {
107
- "signature": "def addPicture(name: str, base64_data: str, anchor_cell: str) -> None",
108
- "docstring": "Add a picture from base64-encoded PNG or JPEG data. No data URI prefix.\nExample: sheet.addPicture(\"chart1\", base64_string, \"F2\")",
109
- "tags": ["action"]
110
- },
111
- "setIBTextColors": {
112
- "signature": "def setIBTextColors(range_addr: str, ignored_constants: list[int] | None = None, colors: dict | None = None, ) -> None",
113
- "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": ["action"]
115
- }
116
- }
117
- }
118
- },
119
- "helpers": {
120
- "hex_to_bgr": {
121
- "signature": "def hex_to_bgr(hex_str: str) -> int",
122
- "docstring": "Convert \"#RRGGBB\" hex string to BGR integer for Excel COM.\nExample: ws.Range(\"A1\").Font.Color = hex_to_bgr(\"#FF0000\") # red",
123
- "tags": ["action", "ask"]
124
- },
125
- "index_to_address": {
126
- "signature": "def index_to_address(row: int, col: int) -> str",
127
- "docstring": "Convert 0-based (row, col) to Excel address: index_to_address(0, 0) \u2192 \"A1\".",
128
- "tags": ["action", "ask"]
129
- },
130
- "address_to_index": {
131
- "signature": "def address_to_index(address: str) -> tuple[int, int]",
132
- "docstring": "Parse \"A1\" into (row, col) 0-based tuple: address_to_index(\"B3\") \u2192 (2, 1).",
133
- "tags": ["action", "ask"]
134
- },
135
- "col_letter": {
136
- "signature": "def col_letter(index: int) -> str",
137
- "docstring": "Convert 0-based column index to letter: col_letter(26) \u2192 \"AA\".",
138
- "tags": ["action", "ask"]
139
- },
140
- "col_index": {
141
- "signature": "def col_index(letter: str) -> int",
142
- "docstring": "Convert column letter to 0-based index: col_index(\"AA\") \u2192 26.",
143
- "tags": ["action", "ask"]
144
- }
145
- }
146
- }
1
+ {
2
+ "interfaces": {
3
+ "Workbook": {
4
+ "docstring": "Workbook wrapper.\nUsage:\n wb = Workbook(app.Workbooks(\"MyFile.xlsx\"))\n\nRaw COM access:\n wb._wb \u2014 the underlying COM Workbook object for direct platform API calls.\n Example: wb._wb.Worksheets(\"Sheet1\").Visible = False",
5
+ "functions": {
6
+ "getSheetNames": {
7
+ "signature": "def getSheetNames() -> list[str]",
8
+ "docstring": "Get the names of all sheets in the workbook.",
9
+ "tags": ["action", "ask"]
10
+ },
11
+ "getWorkbookSummary": {
12
+ "signature": "def getWorkbookSummary() -> str",
13
+ "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": ["action", "ask"]
15
+ },
16
+ "getSheet": {
17
+ "signature": "def getSheet(name: str) -> 'Worksheet'",
18
+ "docstring": "Get a sheet by name, returned as a wrapped Worksheet.",
19
+ "tags": ["action", "ask"]
20
+ },
21
+ "addSheet": {
22
+ "signature": "def addSheet(name: str, index: int | None = None) -> 'Worksheet'",
23
+ "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": ["action"]
25
+ },
26
+ "moveSheet": {
27
+ "signature": "def moveSheet(name: str, index: int) -> None",
28
+ "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": ["action"]
30
+ },
31
+ "calculate": {
32
+ "signature": "def calculate() -> None",
33
+ "docstring": "Recalculate the entire workbook.\nDependent formulas don't update until after code block completes \u2014 read in a follow-up block.",
34
+ "tags": ["action"]
35
+ },
36
+ "errorCheck": {
37
+ "signature": "def errorCheck(ranges: list[str] | None = None) -> str",
38
+ "docstring": "Scan for errors (#REF!, #DIV/0!, #NAME?, #VALUE!, #N/A, #NULL!, #NUM!). Ranges MUST include a sheet name (\"Sheet1\" or \"Sheet1!A1:D50\") \u2014 bare ranges like \"A1:D50\" will fail.\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": ["action", "ask"]
40
+ },
41
+ "copyPasteRange": {
42
+ "signature": "def copyPasteRange(from_range: str, to_address: str, paste_type: str = 'all', ) -> None",
43
+ "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": ["action"]
45
+ },
46
+ "getNamedRangeInfo": {
47
+ "signature": "def getNamedRangeInfo(max_count: int = 50) -> str",
48
+ "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": ["action", "ask"]
50
+ }
51
+ }
52
+ },
53
+ "Worksheet": {
54
+ "docstring": "Worksheet wrapper.\nUsage:\n sheet = wb.getSheet(\"Sheet1\")\n\nRaw COM access:\n sheet._ws \u2014 the underlying COM Worksheet object for direct platform API calls.\n Use for borders, text orientation, cell protection, and other properties not covered by the wrapper.\n Example: sheet._ws.Range(\"A1\").Borders(9).LineStyle = 1 # xlEdgeBottom, xlContinuous",
55
+ "functions": {
56
+ "getSheetSummary": {
57
+ "signature": "def getSheetSummary() -> str",
58
+ "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": ["action", "ask"]
60
+ },
61
+ "getUsedRange": {
62
+ "signature": "def getUsedRange() -> str",
63
+ "docstring": "Get the used range address like \"A1:F20\", or \"\" if empty.",
64
+ "tags": ["action", "ask"]
65
+ },
66
+ "getCell": {
67
+ "signature": "def getCell(address: str, include_style: bool = True) -> str",
68
+ "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": ["action", "ask"]
70
+ },
71
+ "getCellRange": {
72
+ "signature": "def getCellRange(range_addr: str, include_style: bool = True) -> str",
73
+ "docstring": "Markdown-like range: \"A1:Name | B1:Value\\nA2:Alice | B2:100\". Uses display text. Max 3000 cells; read larger areas in smaller chunks.\nAppends \"--- Style patterns ---\" section when include_style=True.",
74
+ "tags": ["action", "ask"]
75
+ },
76
+ "getRawCellData": {
77
+ "signature": "def getRawCellData(address: str, formula: bool = False) -> Any",
78
+ "docstring": "Get raw data value from a cell, preserving data type. Set formula=True to get the formula string.",
79
+ "tags": ["action", "ask"]
80
+ },
81
+ "getRawRangeData": {
82
+ "signature": "def getRawRangeData(range_addr: str, formula: bool = False) -> list[list[Any]]",
83
+ "docstring": "Get raw data for a range as 2D list. Always returns 2D list even for single row/column.",
84
+ "tags": ["action", "ask"]
85
+ },
86
+ "regexSearch": {
87
+ "signature": "def regexSearch(patterns: list[str], match_case: bool = False) -> list[dict]",
88
+ "docstring": "Regex search across used range using display text. Returns [{\"address\": \"A1\", \"value\": \"display text\"}, ...].\nExample: sheet.regexSearch([\"revenue\", \"cost\"])",
89
+ "tags": ["action", "ask"]
90
+ },
91
+ "setCell": {
92
+ "signature": "def setCell(address: str, value: Any, number_format: str | None = None, note: str | None = None, ) -> None",
93
+ "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": ["action"]
95
+ },
96
+ "setCellRange": {
97
+ "signature": "def setCellRange(range_addr: str, values: list[list[Any]], number_format: str | None = None, ) -> None",
98
+ "docstring": "Bulk write \u2014 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": ["action"]
100
+ },
101
+ "autoFill": {
102
+ "signature": "def autoFill(source_range: str, target_range: str, fill_mode: str = 'auto', ) -> None",
103
+ "docstring": "Drag-fill. Source must be contained within target. Default \"auto\" increments hardcoded numeric literals; use fill_mode=\"constant\" to copy literal values, then read back destination cells and check for empty/NaN values.\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": ["action"]
105
+ },
106
+ "addPicture": {
107
+ "signature": "def addPicture(name: str, base64_data: str, anchor_cell: str) -> None",
108
+ "docstring": "Add a picture from base64-encoded PNG or JPEG data. No data URI prefix.\nExample: sheet.addPicture(\"chart1\", base64_string, \"F2\")",
109
+ "tags": ["action"]
110
+ },
111
+ "setIBTextColors": {
112
+ "signature": "def setIBTextColors(range_addr: str, ignored_constants: list[int] | None = None, colors: dict | None = None, ) -> None",
113
+ "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": ["action"]
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "helpers": {
120
+ "hex_to_bgr": {
121
+ "signature": "def hex_to_bgr(hex_str: str) -> int",
122
+ "docstring": "Convert \"#RRGGBB\" hex string to BGR integer for Excel COM.\nExample: ws.Range(\"A1\").Font.Color = hex_to_bgr(\"#FF0000\") # red",
123
+ "tags": ["action", "ask"]
124
+ },
125
+ "index_to_address": {
126
+ "signature": "def index_to_address(row: int, col: int) -> str",
127
+ "docstring": "Convert 0-based (row, col) to Excel address: index_to_address(0, 0) \u2192 \"A1\".",
128
+ "tags": ["action", "ask"]
129
+ },
130
+ "address_to_index": {
131
+ "signature": "def address_to_index(address: str) -> tuple[int, int]",
132
+ "docstring": "Parse \"A1\" into (row, col) 0-based tuple: address_to_index(\"B3\") \u2192 (2, 1).",
133
+ "tags": ["action", "ask"]
134
+ },
135
+ "col_letter": {
136
+ "signature": "def col_letter(index: int) -> str",
137
+ "docstring": "Convert 0-based column index to letter: col_letter(26) \u2192 \"AA\".",
138
+ "tags": ["action", "ask"]
139
+ },
140
+ "col_index": {
141
+ "signature": "def col_index(letter: str) -> int",
142
+ "docstring": "Convert column letter to 0-based index: col_index(\"AA\") \u2192 26.",
143
+ "tags": ["action", "ask"]
144
+ }
145
+ }
146
+ }