@staff0rd/assist 0.208.0 → 0.209.1
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 +1 -1
- package/claude/commands/sql.md +2 -2
- package/dist/index.js +473 -448
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
181
181
|
- `assist sql auth remove <name>` - Remove a configured connection
|
|
182
182
|
- `assist sql set-connection <name>` - Set the default SQL connection
|
|
183
183
|
- `assist sql query "<sql>" [connection]` - Execute a read-only SQL statement and print results in table format (rejects INSERT/UPDATE/DELETE/DROP/CREATE/ALTER/TRUNCATE/MERGE/GRANT/REVOKE/EXEC)
|
|
184
|
-
- `assist sql mutate "<sql>" [connection]` - Execute a mutating SQL statement (
|
|
184
|
+
- `assist sql mutate "<sql>" [connection]` - Execute a mutating SQL statement and print rows affected (rejects non-mutating statements like pure SELECTs)
|
|
185
185
|
- `assist sql tables [connection]` - List tables in the connected database (via INFORMATION_SCHEMA.TABLES)
|
|
186
186
|
- `assist sql columns <table> [connection]` - List columns for a table (use `schema.table` for non-default schema; via INFORMATION_SCHEMA.COLUMNS)
|
|
187
187
|
- `assist screenshot <process>` - Capture a screenshot of a running application window (e.g. `assist screenshot notepad`). Output directory is configurable via `screenshot.outputDir` (default `./screenshots`)
|
package/claude/commands/sql.md
CHANGED
|
@@ -19,7 +19,7 @@ The user wants to query a MSSQL database. Use the `assist sql` CLI commands belo
|
|
|
19
19
|
## Querying
|
|
20
20
|
|
|
21
21
|
- `assist sql query "<sql>" [connection]` — execute a read-only SQL statement and print results in table format. Rejects mutating statements (INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, TRUNCATE, MERGE, GRANT, REVOKE, EXEC)
|
|
22
|
-
- `assist sql mutate "<sql>" [connection]` — execute a mutating SQL statement (
|
|
22
|
+
- `assist sql mutate "<sql>" [connection]` — execute a mutating SQL statement (INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, TRUNCATE, MERGE, GRANT, REVOKE, EXEC) and print rows affected. Rejects non-mutating statements (pure SELECTs, comment-only inputs)
|
|
23
23
|
|
|
24
24
|
## Workflow
|
|
25
25
|
|
|
@@ -27,6 +27,6 @@ The user wants to query a MSSQL database. Use the `assist sql` CLI commands belo
|
|
|
27
27
|
2. If the user doesn't specify a connection, omit it to use the default.
|
|
28
28
|
3. Prefer `tables` and `columns` for schema discovery before crafting queries.
|
|
29
29
|
4. Quote SQL strings carefully — wrap the statement in double quotes and escape inner double quotes if needed.
|
|
30
|
-
5. Use `query` for SELECTs only
|
|
30
|
+
5. Use `query` for SELECTs only and `mutate` for mutating statements — each command rejects the other kind, so do not work around the guards.
|
|
31
31
|
6. Display query results to the user. If the output is large, summarise key rows and highlight anything notable.
|
|
32
32
|
7. If the user asks follow-up questions, refine the query and re-run.
|