You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1add7b0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ All notable changes to Token-Goat are documented in this file. Format follows Ke
7
7
### Changed
8
8
9
9
- The canonical skill now treats whole-file/range denials and the >80%-indexed warning as a per-file circuit breaker, directing reads and edits to surgical token-goat commands.
10
+
- `sqlite-query session` resolves the active Copilot session database; COBOL outlines expose nested data items and level-88 conditions.
|`token-goat openapi-op <spec> <operation>`| Full detail (parameters, request body schema, response schemas, description) for exactly one OpenAPI operation instead of a raw Read. `operation` may be an operationId (exact match) or a `"METHOD path"` spec, e.g. `"GET /users/{id}"`. |
72
72
|`token-goat sqlite-tables <db> [--json]`| Ultra-compact overview of tables, views, row counts, and column counts in a SQLite database instead of a raw Read. |
73
73
|`token-goat sqlite-schema <db>`| Tables/views, columns, indexes, foreign keys, and row counts of a SQLite database instead of a raw Read. |
74
-
|`token-goat sqlite-query <db> "<SELECT ...>"`| Run a read-only `SELECT` against a SQLite database instead of a raw Read or shelling out to `sqlite3` — rejects any non-`SELECT` statement. |
74
+
|`token-goat sqlite-query <db> "<SELECT ...>"`| Run a read-only `SELECT` against a SQLite database instead of a raw Read or shelling out to `sqlite3` — rejects any non-`SELECT` statement. Use `session` for the active Copilot session database. |
75
75
|`token-goat session-schema [table] [--json]`| Authoritative schema catalog for `session_store_sql` (DuckDB/SQLite) and session SQLite tables (`todos`, `todo_deps`), complete with column types, caveats, and common column misnomer mappings (`title` → `summary`, `role` → `agent_name`), eliminating trial-and-error `SELECT *` schema exploration (85–95% smaller). |
76
76
|`token-goat describe <target> [table] [--json]`| Unified database schema inspection helper: inspects any known session store table or SQLite `.db` file on disk, displaying table structure and column definitions instead of exploratory queries. |
77
77
|`token-goat imports "file"`| Show the import graph for a file one level deep. Accepts a comma-separated file list (`"a,b,c"`) to cover several files in one call, one clearly-headed block per file; extra space-separated file arguments are reported in a note naming that comma form instead of being silently dropped. `--grep <pattern>` only shows imports whose MODULE SPECIFIER matches this regex (literal substring if it is not valid regex), applied before `--json`'s truncation; when it matches nothing among real imports, the output names the active filter instead of reading like the file has no imports at all. |
`sqlite-query session "<SELECT ...>"` queries the active Copilot session database. COBOL `.cbl`/`.cpy` files expose procedure sections/paragraphs and named level 01–49/77 items plus 88 conditions to `outline`, `symbol`, and `read`.
65
+
64
66
Sub-agent briefs must carry this gate verbatim: a sub-agent inherits none of this context and its reads spend the same token budget.
65
67
66
68
`token-goat stats` — self-check. Flat counts during code work mean the gate is being skipped.
.description('run a read-only SELECT against a SQLite database instead of a raw Read or shelling out to sqlite3 -- rejects any non-SELECT statement')
620
+
.description('run a read-only SELECT against a SQLite database; rejects non-SELECT statements. Use "session" for the active Copilot session database.')
621
621
.option('--head <n>','limit to the first N returned rows')
622
622
.option('--json','emit rows as a JSON array of objects instead of a table')
Copy file name to clipboardExpand all lines: src/languages/cobol.ts
+45-21Lines changed: 45 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
/** COBOL adapter: programs, procedure-division sections and paragraphs, level-01/77 data items and FD/SD file descriptions, leading comments, `COPY` imports, and `PERFORM`/`GO TO`/`CALL`/embedded-SQL `CALL` references. Reference format (IBM Enterprise COBOL for z/OS, https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=structure-reference-format): columns 1-6 are the sequence number area, column 7 the indicator area, 8-11 Area A, 12-72 Area B, and 73-80 are ignored. Indicator `*` or `/` makes a comment line, `D`/`d` a debugging line, `-` a continuation line (https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=format-indicator-area); `*>` starts a floating comment. Free format (`>>SOURCE FORMAT IS FREE`, the ISO 2002 directive) has no columns: text starts at column 1 and only `*>` comments. */
1
+
/** COBOL adapter: programs, procedure-division sections and paragraphs, level-01/49/77 data items, level-88 conditions, FD/SD file descriptions, leading comments, `COPY` imports, and `PERFORM`/`GO TO`/`CALL`/embedded-SQL `CALL` references. Reference format (IBM Enterprise COBOL for z/OS, https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=structure-reference-format): columns 1-6 are the sequence number area, column 7 the indicator area, 8-11 Area A, 12-72 Area B, and 73-80 are ignored. Indicator `*` or `/` makes a comment line, `D`/`d` a debugging line, `-` a continuation line (https://www.ibm.com/docs/en/cobol-zos/6.4.0?topic=format-indicator-area); `*>` starts a floating comment. Free format (`>>SOURCE FORMAT IS FREE`, the ISO 2002 directive) has no columns: text starts at column 1 and only `*>` comments. */
// A copybook with no division header is a fragment: data items when it opens with a level number, procedure text otherwise; its record level is the lowest level it uses.
198
-
letrecordLevel=1
198
+
// A divisionless copybook is a fragment; ignore leading comments and blank lines when classifying it.
// Reduced, not spread: `structural` holds one entry per matching line with no cap (MAX_SYMBOLS gates `emit`, which runs later), so a large copybook spread into Math.min exceeds the engine's argument limit and throws out of the extractor.
205
-
if(structural.length>0)recordLevel=structural.reduce((a,b)=>(b<a ? b : a),structural[0]!)
Copy file name to clipboardExpand all lines: tests/cobol_natural_adapters.test.ts
+39-4Lines changed: 39 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ function shape(r: Extracted): string[] {
20
20
21
21
describe('COBOL adapter',()=>{
22
22
it('reads a very large copybook instead of throwing out of the extractor',()=>{
23
-
// HAND-DERIVED: a copybook with no division header is a fragment, so the adapter takes the lowest level number it uses. That list holds one entry per data line and has no cap of its own, and spreading a list this size into Math.min exceeds the engine's argument limit -- which threw, so the file indexed to nothing at all rather than to fewer symbols.
23
+
// HAND-DERIVED: a copybook with no division header is a fragment; scanning its levels must not materialize an uncapped list before the symbol limit is applied.
0 commit comments