agentxl 1.1.0 → 1.1.2

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/README.md CHANGED
@@ -52,6 +52,18 @@ No server. No cloud account with us. No classic RAG stack. You bring your own AI
52
52
 
53
53
  ## Quick Start
54
54
 
55
+ ## Windows — Quick Start (no coding required)
56
+
57
+ 1. Download the latest `.zip` from [GitHub Releases](https://github.com/satish860/agentxl/releases)
58
+ 2. Extract to a folder (e.g. `Desktop\AgentXL`)
59
+ 3. Double-click **AgentXL.vbs**
60
+ 4. If sign-in is needed, run **AgentXL Login.vbs** first
61
+ 5. Excel opens with AgentXL in the **Home** ribbon
62
+
63
+ The Windows release is self-contained — bundled Node.js, no system install required.
64
+
65
+ Alternatively, install the add-in directly from Excel (see [Install the Excel add-in](#5-add-to-excel) below).
66
+
55
67
  ### 1. Install
56
68
 
57
69
  **Option A — npm**
@@ -60,16 +72,15 @@ No server. No cloud account with us. No classic RAG stack. You bring your own AI
60
72
  npm install -g agentxl
61
73
  ```
62
74
 
63
- **Option B Windows installer**
75
+ This is the simplest cross-platform install path.
64
76
 
65
- Use the packaged `AgentXL-Setup-<version>.exe`.
77
+ **Option B Windows release (no Node.js needed)**
66
78
 
67
- The installer is self-contained. It:
68
- - bundles its own Node.js runtime
69
- - bundles the built AgentXL app and production dependencies
70
- - copies `manifest.xml` into a stable local folder for Excel catalog setup
71
- - creates Start Menu shortcuts for Start/Login/Open Taskpane
72
- - does not require a separate Node.js installation on the target machine
79
+ 1. Download the latest `.zip` from [GitHub Releases](https://github.com/satish860/agentxl/releases)
80
+ 2. Extract to a folder
81
+ 3. Double-click **AgentXL.vbs**
82
+
83
+ The release ZIP is self-contained: it bundles its own Node.js runtime, the built app, and production dependencies. No separate Node.js installation required.
73
84
 
74
85
  ### 2. Start
75
86
 
@@ -105,20 +116,42 @@ Open **https://localhost:3001/taskpane/** in your browser.
105
116
 
106
117
  You should see the AgentXL UI. This confirms the server, HTTPS, and UI all work before you touch Excel.
107
118
 
108
- ### 5. Add to Excel (one-time setup)
119
+ ### 5. Add to Excel
120
+
121
+ Choose one method:
122
+
123
+ **Option A — Office Store (simplest)**
124
+ 1. Open Excel → **Insert** → **Get Add-ins**
125
+ 2. Search **"AgentXL"** → click **Add**
109
126
 
127
+ > The Office Store listing is pending review. Use Option B or C in the meantime.
128
+
129
+ **Option B — Upload hosted manifest (no Trust Center needed)**
130
+ 1. Download [`manifest.xml`](https://satish860.github.io/agentxl/manifest/manifest.xml)
131
+ 2. Open Excel → **Insert** → **Get Add-ins** → **My Add-ins** → **Upload My Add-in**
132
+ 3. Browse to the downloaded `manifest.xml` → **Upload**
133
+
134
+ **Option C — Shared folder catalog (persistent, Windows)**
110
135
  1. **Excel** → **File** → **Options** → **Trust Center** → **Trust Center Settings**
111
136
  2. Click **Trusted Add-in Catalogs**
112
- 3. Add the catalog path printed in your terminal
113
- - Windows installer default: `C:\Program Files\AgentXL\manifest`
114
- - npm install flow: use the path printed by `agentxl start`
137
+ 3. Add the `manifest` folder path from your release ZIP or the path printed by `agentxl start`
115
138
  4. Check **Show in Menu** → **OK** → **OK**
116
139
  5. **Restart Excel**
117
- 6. **Insert** → **My Add-ins** → **SHARED FOLDER** tab → **AgentXL** → **Add**
140
+ 6. **Insert** → **My Add-ins** → **SHARED FOLDER** → **AgentXL** → **Add**
141
+
142
+ **Option D — Windows release auto-setup**
143
+ - Double-click **AgentXL.vbs** from the extracted release folder
144
+ - It handles certificate trust, add-in registration, and opens Excel automatically
118
145
 
119
146
  ### 6. Start from a document folder
120
147
 
121
- Open Excel, launch **AgentXL**, then use a workflow like:
148
+ Open Excel, launch **AgentXL**, and the first-run taskpane now guides the user through:
149
+
150
+ 1. **Connect** — sign in with your model provider if needed
151
+ 2. **Folder** — choose the local folder with supporting documents
152
+ 3. **Ask** — send a grounded question about that folder
153
+
154
+ From there, the working flow is:
122
155
 
123
156
  1. select the workbook you want to populate
124
157
  2. point AgentXL at a local folder of supporting files
@@ -386,10 +419,13 @@ When you ask the agent about your documents or workbook, the relevant content is
386
419
  ### Add-in doesn't appear in Excel
387
420
 
388
421
  1. Is the server running?
389
- 2. Did you add the catalog path in Trust Center → Trusted Add-in Catalogs?
390
- 3. Did you check **Show in Menu**?
391
- 4. Did you restart Excel?
392
- 5. Look in **InsertMy Add-ins → SHARED FOLDER**
422
+ 2. Did you try the automated Windows onboarding path first?
423
+ - Start Menu: `Launch AgentXL onboarding`
424
+ - zip build: `Launch AgentXL Onboarding.cmd`
425
+ 3. If automatic setup failed, did you add the catalog path in Trust Center Trusted Add-in Catalogs?
426
+ 4. Did you check **Show in Menu**?
427
+ 5. Did you restart Excel?
428
+ 6. Look in **Insert → My Add-ins → SHARED FOLDER**
393
429
 
394
430
  ### Port 3001 is already in use
395
431
 
@@ -399,42 +435,19 @@ agentxl start --port 3002
399
435
 
400
436
  > If you change the port, update `manifest/manifest.xml` to match.
401
437
 
402
- ### Building the Windows installer
403
-
404
- From the repo root:
405
-
406
- ```bash
407
- npm run prepare:installer:win
408
- ```
409
-
410
- This creates a **self-contained** installer payload in:
411
-
412
- ```text
413
- release/windows/payload
414
- ```
415
-
416
- It includes:
417
- - the built app
418
- - production `node_modules`
419
- - a bundled Node.js runtime
420
-
421
- To compile the `.exe` installer, install **Inno Setup 6** and run:
438
+ ### Building the Windows release
422
439
 
423
440
  ```bash
424
- npm run build:installer:win
441
+ npm run prepare:release:win
425
442
  ```
426
443
 
427
- The compiled installer is written to:
428
-
429
- ```text
430
- release/windows/dist
431
- ```
444
+ This creates a self-contained ZIP in `release/windows/dist/` containing:
445
+ - Portable Node.js runtime (no system install needed)
446
+ - Built AgentXL app + production dependencies
447
+ - Manifest for Excel sideloading
448
+ - VBScript launchers (double-click to start)
432
449
 
433
- For a fuller release workflow, see:
434
-
435
- ```text
436
- docs/RELEASING.md
437
- ```
450
+ GitHub Actions builds and publishes this automatically on tagged releases.
438
451
 
439
452
  ### "No model available"
440
453
 
@@ -1,14 +1,16 @@
1
1
  /**
2
- * Build the folder context block prepended to every agent message.
2
+ * Build the per-message folder context block.
3
3
  *
4
- * This is the primary mechanism for grounding the agent:
5
- * - Tells the agent what files are available
6
- * - Teaches absolute-path discipline
7
- * - Provides file listing and usage examples
8
- * - Explains document handling strategies (PDF→MD, XLSX/DOCX via code)
4
+ * This block is prepended to every user message and tells the agent:
5
+ * - Which folder is linked
6
+ * - What files are available (with sizes)
7
+ * - Which PDFs have been pre-converted to markdown
8
+ * - How to access XLSX / DOCX files (binary → code)
9
+ * - How to access text / CSV / MD files (read tool)
9
10
  *
10
- * Extracted as its own module because this prompt will be tuned
11
- * frequently as document behavior improves.
11
+ * Behavioral rules (citation format, review-before-write, extraction
12
+ * workflow) live in the system prompt — see ./system-prompt.ts.
13
+ * This module is file-inventory only.
12
14
  */
13
15
  import type { FolderInventory } from "../../server/folder-scanner.js";
14
16
  /** Max supported files to list individually in context. */
@@ -17,8 +19,8 @@ export declare const MAX_FILES_IN_CONTEXT = 50;
17
19
  export declare function formatFileSize(bytes: number): string;
18
20
  /**
19
21
  * Build a folder context block to prepend to the agent message.
20
- * Gives the agent awareness of what files are available and
21
- * how to access them.
22
+ * Contains only the file inventory and access instructions no
23
+ * behavioral rules (those are in the system prompt).
22
24
  */
23
25
  export declare function buildFolderContext(folderPath: string, inventory: FolderInventory): string;
24
26
  //# sourceMappingURL=folder-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"folder-context.d.ts","sourceRoot":"","sources":["../../../src/agent/prompt/folder-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,mDAAmD;AACnD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,eAAe,GACzB,MAAM,CAgSR"}
1
+ {"version":3,"file":"folder-context.d.ts","sourceRoot":"","sources":["../../../src/agent/prompt/folder-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,mDAAmD;AACnD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,eAAe,GACzB,MAAM,CA4GR"}
@@ -1,14 +1,16 @@
1
1
  /**
2
- * Build the folder context block prepended to every agent message.
2
+ * Build the per-message folder context block.
3
3
  *
4
- * This is the primary mechanism for grounding the agent:
5
- * - Tells the agent what files are available
6
- * - Teaches absolute-path discipline
7
- * - Provides file listing and usage examples
8
- * - Explains document handling strategies (PDF→MD, XLSX/DOCX via code)
4
+ * This block is prepended to every user message and tells the agent:
5
+ * - Which folder is linked
6
+ * - What files are available (with sizes)
7
+ * - Which PDFs have been pre-converted to markdown
8
+ * - How to access XLSX / DOCX files (binary → code)
9
+ * - How to access text / CSV / MD files (read tool)
9
10
  *
10
- * Extracted as its own module because this prompt will be tuned
11
- * frequently as document behavior improves.
11
+ * Behavioral rules (citation format, review-before-write, extraction
12
+ * workflow) live in the system prompt — see ./system-prompt.ts.
13
+ * This module is file-inventory only.
12
14
  */
13
15
  import { listConvertedFiles } from "../../server/document-converter.js";
14
16
  /** Max supported files to list individually in context. */
@@ -23,27 +25,23 @@ export function formatFileSize(bytes) {
23
25
  }
24
26
  /**
25
27
  * Build a folder context block to prepend to the agent message.
26
- * Gives the agent awareness of what files are available and
27
- * how to access them.
28
+ * Contains only the file inventory and access instructions no
29
+ * behavioral rules (those are in the system prompt).
28
30
  */
29
31
  export function buildFolderContext(folderPath, inventory) {
30
32
  const lines = [];
31
- lines.push("[AgentXL Context]");
33
+ lines.push("[AgentXL — Linked Folder]");
32
34
  lines.push("");
33
- lines.push("You are AgentXL, a document-to-Excel agent. The user's source documents are in the linked folder below.");
34
- lines.push("Ground every answer in these files. Cite the source file when you reference a value.");
35
- lines.push("If the folder does not contain enough evidence, say so. Do not fabricate data.");
36
- lines.push("");
37
- lines.push("IMPORTANT: All file operations MUST use absolute paths under the linked folder.");
38
- lines.push(`The linked folder is: ${folderPath}`);
39
- lines.push("Do NOT use relative paths. Do NOT read files from the current working directory.");
40
- lines.push(`When the user asks about files, they mean files in: ${folderPath}`);
35
+ lines.push(`Folder: ${folderPath}`);
41
36
  lines.push(`${inventory.supportedFiles} supported file${inventory.supportedFiles !== 1 ? "s" : ""}, ${inventory.totalFiles} total`);
37
+ lines.push("");
38
+ lines.push("IMPORTANT: All file paths MUST be absolute paths under this folder.");
39
+ // ── Supported files ────────────────────────────────────────────────────
42
40
  const supported = inventory.files.filter((f) => f.supported);
43
41
  const unsupported = inventory.files.filter((f) => !f.supported);
44
42
  if (supported.length > 0) {
45
43
  lines.push("");
46
- lines.push("Supported files (you can read these):");
44
+ lines.push("Supported files:");
47
45
  const shown = supported.slice(0, MAX_FILES_IN_CONTEXT);
48
46
  for (const f of shown) {
49
47
  lines.push(`- ${f.relativePath} (${formatFileSize(f.sizeBytes)})`);
@@ -63,222 +61,45 @@ export function buildFolderContext(folderPath, inventory) {
63
61
  : "";
64
62
  lines.push(`Unsupported files (cannot read): ${unsupportedNames}${suffix}`);
65
63
  }
66
- // -----------------------------------------------------------------------
67
- // Document handling instructions
68
- // -----------------------------------------------------------------------
69
- // PDF conversions
64
+ // ── PDF conversions ────────────────────────────────────────────────────
70
65
  const conversions = listConvertedFiles(inventory);
71
66
  if (conversions.length > 0) {
72
67
  lines.push("");
73
68
  lines.push("📄 PDF files (pre-converted to Markdown):");
74
- lines.push("PDFs have been converted to readable Markdown. Read the .md version, NOT the raw PDF.");
69
+ lines.push("Read the .md version, NOT the raw PDF.");
75
70
  for (const c of conversions) {
76
71
  lines.push(`- ${c.source} → READ: "${folderPath}/${c.converted}"`);
77
72
  }
78
73
  }
79
- // XLSX handling
74
+ // ── XLSX handling ──────────────────────────────────────────────────────
80
75
  const xlsxFiles = supported.filter((f) => f.extension === ".xlsx" || f.extension === ".xls");
81
76
  if (xlsxFiles.length > 0) {
82
77
  lines.push("");
83
- lines.push("📊 Excel files (use code to extract):");
84
- lines.push("Do NOT try to read .xlsx/.xls with the read tool — they are binary.");
85
- lines.push("Write a Node.js script via bash that uses the `xlsx` npm package (already installed).");
86
- lines.push("Example:");
78
+ lines.push("📊 Excel files do NOT read with the read tool (binary).");
79
+ lines.push("Use bash + xlsx npm package:");
87
80
  lines.push("```");
88
- lines.push(`bash: node -e "const XLSX = require('xlsx'); const wb = XLSX.readFile('${xlsxFiles[0].absolutePath}'); const ws = wb.Sheets[wb.SheetNames[0]]; console.log(JSON.stringify(XLSX.utils.sheet_to_json(ws), null, 2));"`);
81
+ lines.push(`node -e "const XLSX = require('xlsx'); const wb = XLSX.readFile('${xlsxFiles[0].absolutePath}'); const ws = wb.Sheets[wb.SheetNames[0]]; console.log(JSON.stringify(XLSX.utils.sheet_to_json(ws), null, 2));"`);
89
82
  lines.push("```");
90
83
  }
91
- // DOCX handling
84
+ // ── DOCX handling ──────────────────────────────────────────────────────
92
85
  const docxFiles = supported.filter((f) => f.extension === ".docx" || f.extension === ".doc");
93
86
  if (docxFiles.length > 0) {
94
87
  lines.push("");
95
- lines.push("📝 Word files (use code to extract):");
96
- lines.push("Do NOT try to read .docx/.doc with the read tool — they are binary.");
97
- lines.push("Write a Node.js script via bash that uses the `mammoth` npm package (already installed).");
98
- lines.push("Example:");
88
+ lines.push("📝 Word files do NOT read with the read tool (binary).");
89
+ lines.push("Use bash + mammoth npm package:");
99
90
  lines.push("```");
100
- lines.push(`bash: node -e "const mammoth = require('mammoth'); mammoth.convertToMarkdown({path: '${docxFiles[0].absolutePath}'}).then(r => console.log(r.value));"`);
91
+ lines.push(`node -e "const mammoth = require('mammoth'); mammoth.convertToMarkdown({path: '${docxFiles[0].absolutePath}'}).then(r => console.log(r.value));"`);
101
92
  lines.push("```");
102
93
  }
103
- // -----------------------------------------------------------------------
104
- // EXTRACTION + CITATION WORKFLOW (mandatory)
105
- // -----------------------------------------------------------------------
106
- lines.push("");
107
- lines.push("═══════════════════════════════════════════════════════════════");
108
- lines.push("⚡ EXTRACTION WORKFLOW — WRITE CODE + CITE EVERY VALUE");
109
- lines.push("═══════════════════════════════════════════════════════════════");
110
- lines.push("");
111
- lines.push("When extracting data from documents to write to Excel, you MUST follow");
112
- lines.push("this 3-step workflow. This is NOT optional — every value needs a citation.");
113
- lines.push("");
114
- lines.push("STEP 1: EXTRACT WITH CITATIONS (bash script)");
115
- lines.push("─────────────────────────────────────────────");
116
- lines.push("Write a Node.js script that reads the source files and returns structured");
117
- lines.push("JSON with BOTH the value AND its citation. Do NOT make 10+ individual");
118
- lines.push("read/grep calls — extract everything in one script run.");
119
- lines.push("");
120
- lines.push("The script MUST output JSON in this exact format:");
121
- lines.push("```json");
122
- lines.push("{");
123
- lines.push(' "fieldName": {');
124
- lines.push(' "value": "the extracted value",');
125
- lines.push(' "source": "Original File Name.pdf",');
126
- lines.push(' "page": 14,');
127
- lines.push(' "excerpt": "...surrounding ~150 chars with the extracted value in context..."');
128
- lines.push(" }");
129
- lines.push("}");
130
- lines.push("```");
131
- lines.push("");
132
- lines.push("How to determine page numbers from converted markdown:");
133
- lines.push("- PDF markdown files have `---` page separators");
134
- lines.push("- Count `---` separators before the match to get the page number");
135
- lines.push("- For XLSX: use sheet name + cell reference as 'page'");
136
- lines.push("- For DOCX: use section heading as 'page'");
137
- lines.push("");
138
- lines.push("How to capture excerpts:");
139
- lines.push("- Find the match position in the text");
140
- lines.push("- Take ~75 chars before and ~75 chars after the match");
141
- lines.push("- Trim to word boundaries");
142
- lines.push("- Prefix/suffix with '...' if truncated");
143
- lines.push("");
144
- lines.push("Example extraction script:");
145
- lines.push("```");
146
- lines.push(`bash: node -e "`);
147
- lines.push("const fs = require('fs');");
148
- lines.push("const path = require('path');");
149
- lines.push(`const cacheDir = '${folderPath}/.agentxl-cache';`);
150
- lines.push("const files = fs.readdirSync(cacheDir, {recursive: true}).filter(f => f.toString().endsWith('.md'));");
151
- lines.push("const results = {};");
152
- lines.push("for (const f of files) {");
153
- lines.push(" const text = fs.readFileSync(path.join(cacheDir, f.toString()), 'utf8');");
154
- lines.push(" const sourceFile = f.toString().replace('.md','');");
155
- lines.push(" // Count pages by --- separators");
156
- lines.push(" function getPage(pos) { return (text.slice(0, pos).match(/^---$/gm) || []).length + 1; }");
157
- lines.push(" function getExcerpt(pos, len) {");
158
- lines.push(" const start = Math.max(0, pos - 75);");
159
- lines.push(" const end = Math.min(text.length, pos + len + 75);");
160
- lines.push(" return (start > 0 ? '...' : '') + text.slice(start, end).replace(/\\n/g, ' ').trim() + (end < text.length ? '...' : '');");
161
- lines.push(" }");
162
- lines.push(" const termMatch = text.match(/(?:lease\\s+term|term\\s+of\\s+(?:the\\s+)?lease)[:\\s]+([^.\\n]+)/i);");
163
- lines.push(" if (termMatch) {");
164
- lines.push(" results.leaseTerm = {");
165
- lines.push(" value: termMatch[1].trim(),");
166
- lines.push(" source: sourceFile,");
167
- lines.push(" page: getPage(termMatch.index),");
168
- lines.push(" excerpt: getExcerpt(termMatch.index, termMatch[0].length)");
169
- lines.push(" };");
170
- lines.push(" }");
171
- lines.push(" // ... add more fields with same pattern");
172
- lines.push("}");
173
- lines.push("console.log(JSON.stringify(results, null, 2));");
174
- lines.push('"');
175
- lines.push("```");
176
- lines.push("");
177
- lines.push("If a value is INFERRED (not directly quoted from a source), mark it:");
178
- lines.push(' "source": "INFERRED",');
179
- lines.push(' "page": null,');
180
- lines.push(' "excerpt": "Reasoning: [explain why you inferred this value]"');
181
- lines.push("");
182
- lines.push("STEP 2: WRITE VALUES + COMMENTS TO EXCEL (excel tool)");
183
- lines.push("─────────────────────────────────────────────────────");
184
- lines.push("After extracting data with citations, write to Excel in ONE excel tool call.");
185
- lines.push("For EVERY cell you write, also add an Excel comment with the citation.");
186
- lines.push("IMPORTANT: do NOT use cell.note or range.note — use worksheet.comments.add(cellAddress, content).");
187
- lines.push("");
188
- lines.push("```javascript");
189
- lines.push("// Inside Excel.run(async (context) => { ... }):");
190
- lines.push("const sheet = context.workbook.worksheets.getItem('SheetName');");
191
- lines.push("const address = 'B5';");
94
+ // ── Quick access examples ──────────────────────────────────────────────
192
95
  lines.push("");
193
- lines.push("// Write value");
194
- lines.push("sheet.getRange(address).values = [['12 months']];");
195
- lines.push("");
196
- lines.push("// Add or replace citation comment");
197
- lines.push("try {");
198
- lines.push(" sheet.comments.getItemByCell(address).delete();");
199
- lines.push(" await context.sync();");
200
- lines.push("} catch {}");
201
- lines.push("sheet.comments.add(address, '📄 Source: Operating Lease.pdf\\n📑 Page: 14\\n💬 \"...the lease term shall be twelve (12) months from the Delivery Date...\"\\n🤖 Extracted by AgentXL');");
202
- lines.push("");
203
- lines.push("// For inferred values:");
204
- lines.push("// sheet.comments.add(address, '⚠️ Inferred — no direct source citation\\n💬 Reasoning: Based on aircraft registration VT-YBH (Indian registry)\\n🤖 Extracted by AgentXL');");
205
- lines.push("");
206
- lines.push("await context.sync();");
207
- lines.push("```");
208
- lines.push("");
209
- lines.push("STEP 3: LOG TO _AgentXL_Sources SHEET (excel tool)");
210
- lines.push("──────────────────────────────────────────────────");
211
- lines.push("After writing values, append citation records to a Sources sheet.");
212
- lines.push("Create it if it doesn't exist. This is the audit trail.");
213
- lines.push("");
214
- lines.push("```javascript");
215
- lines.push("// Inside Excel.run(async (context) => { ... }):");
216
- lines.push("let sourcesSheet;");
217
- lines.push("try {");
218
- lines.push(" sourcesSheet = context.workbook.worksheets.getItem('_AgentXL_Sources');");
219
- lines.push("} catch {");
220
- lines.push(" // Create the sheet if it doesn't exist");
221
- lines.push(" sourcesSheet = context.workbook.worksheets.add('_AgentXL_Sources');");
222
- lines.push(" const header = sourcesSheet.getRange('A1:G1');");
223
- lines.push(" header.values = [['Target Sheet', 'Target Cell', 'Value', 'Source File', 'Page', 'Excerpt', 'Timestamp']];");
224
- lines.push(" header.format.font.bold = true;");
225
- lines.push(" header.format.fill.color = '#4472C4';");
226
- lines.push(" header.format.font.color = '#FFFFFF';");
227
- lines.push(" // Set column widths");
228
- lines.push(" sourcesSheet.getRange('A:A').format.columnWidth = 100;");
229
- lines.push(" sourcesSheet.getRange('B:B').format.columnWidth = 70;");
230
- lines.push(" sourcesSheet.getRange('C:C').format.columnWidth = 120;");
231
- lines.push(" sourcesSheet.getRange('D:D').format.columnWidth = 180;");
232
- lines.push(" sourcesSheet.getRange('E:E').format.columnWidth = 50;");
233
- lines.push(" sourcesSheet.getRange('F:F').format.columnWidth = 300;");
234
- lines.push(" sourcesSheet.getRange('G:G').format.columnWidth = 140;");
235
- lines.push("}");
236
- lines.push("");
237
- lines.push("// Find next empty row");
238
- lines.push("const usedRange = sourcesSheet.getUsedRange();");
239
- lines.push("usedRange.load('rowCount');");
240
- lines.push("await context.sync();");
241
- lines.push("const nextRow = usedRange.rowCount + 1;");
242
- lines.push("");
243
- lines.push("// Append citation rows (one per written cell)");
244
- lines.push("const timestamp = new Date().toISOString();");
245
- lines.push("sourcesSheet.getRange(`A${nextRow}:G${nextRow}`).values = [[");
246
- lines.push(" 'Redelivery Details', // target sheet");
247
- lines.push(" 'B5', // target cell");
248
- lines.push(" '12 months', // value written");
249
- lines.push(" 'Operating Lease.pdf', // source file");
250
- lines.push(" 14, // page number");
251
- lines.push(" '...the lease term shall be twelve (12) months...', // excerpt");
252
- lines.push(" timestamp");
253
- lines.push("]];");
254
- lines.push("await context.sync();");
255
- lines.push("```");
256
- lines.push("");
257
- lines.push("IMPORTANT RULES:");
258
- lines.push("- NEVER write a value to Excel without adding a citation comment.");
259
- lines.push("- NEVER skip the _AgentXL_Sources entry.");
260
- lines.push("- If you cannot find a source for a value, mark it as INFERRED with reasoning.");
261
- lines.push("- Combine Steps 2 and 3 into a SINGLE excel tool call when possible.");
262
- lines.push("- The _AgentXL_Sources sheet is APPEND-ONLY — never delete existing rows.");
263
- lines.push("");
264
- lines.push("Use simple read/grep only for:");
265
- lines.push("- Quick single-value lookups");
266
- lines.push("- Checking if a file contains a specific term");
267
- lines.push("- Reading small files in full");
268
- // -----------------------------------------------------------------------
269
- // General file access
270
- // -----------------------------------------------------------------------
271
- lines.push("");
272
- lines.push("How to access files:");
273
- lines.push(`- To list files: ls "${folderPath}"`);
274
- if (supported.length > 0) {
275
- const textExample = supported.find((f) => ![".pdf", ".xlsx", ".xls", ".docx", ".doc"].includes(f.extension));
276
- if (textExample) {
277
- lines.push(`- To read a text file: read "${textExample.absolutePath}"`);
278
- }
96
+ lines.push("File access:");
97
+ lines.push(`- List: ls "${folderPath}"`);
98
+ const textExample = supported.find((f) => ![".pdf", ".xlsx", ".xls", ".docx", ".doc"].includes(f.extension));
99
+ if (textExample) {
100
+ lines.push(`- Read text file: read "${textExample.absolutePath}"`);
279
101
  }
280
- lines.push(`- To search text files: grep with path "${folderPath}"`);
281
- lines.push('Always use the FULL ABSOLUTE PATH shown above. Never use "." or relative paths.');
102
+ lines.push(`- Search: grep with path "${folderPath}"`);
282
103
  return lines.join("\n");
283
104
  }
284
105
  //# sourceMappingURL=folder-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"folder-context.js","sourceRoot":"","sources":["../../../src/agent/prompt/folder-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,mDAAmD;AACnD,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG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KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,eAAe,UAAU,GAAG,CAAC,CAAC;IAEzC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAChC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CACzE,CAAC;IACF,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,2BAA2B,WAAW,CAAC,YAAY,GAAG,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,6BAA6B,UAAU,GAAG,CAAC,CAAC;IAEvD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * AgentXL system prompt — appended on top of Pi's built-in system prompt.
3
+ *
4
+ * This is the behavioral layer that makes the agent act like a
5
+ * document-to-Excel agent with show-your-work traceability.
6
+ *
7
+ * Pi's base prompt handles:
8
+ * - tool descriptions (read, bash, edit, write, custom tools)
9
+ * - tool usage guidelines
10
+ * - skills, context files, AGENTS.md
11
+ * - date/time, cwd
12
+ *
13
+ * This prompt adds:
14
+ * - AgentXL identity and workflow rules
15
+ * - Show-your-work traceability (not a permission gate)
16
+ * - Citation format and traceability rules
17
+ * - Excel comment API guidance (no .note)
18
+ * - _AgentXL_Sources audit sheet spec
19
+ */
20
+ export declare const AGENTXL_SYSTEM_PROMPT: string;
21
+ //# sourceMappingURL=system-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../../src/agent/prompt/system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,eAAO,MAAM,qBAAqB,QA0G1B,CAAC"}