token-goat 2.9.6 → 2.9.8
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 +5 -2
- package/dist/{token-goat-chunk-J7LGMKF3.mjs → token-goat-chunk-2SBHUPBF.mjs} +44 -9
- package/dist/{token-goat-chunk-3ZAMYHQG.mjs → token-goat-chunk-3YANZKER.mjs} +5 -5
- package/dist/{token-goat-chunk-46VKOCUH.mjs → token-goat-chunk-6RAUVAKW.mjs} +2 -2
- package/dist/{token-goat-chunk-C7LLUVUT.mjs → token-goat-chunk-EZZ7IJYM.mjs} +3 -3
- package/dist/{token-goat-chunk-T2OE7MYM.mjs → token-goat-chunk-JZYJH76S.mjs} +2712 -2697
- package/dist/{token-goat-chunk-TX64YIIV.mjs → token-goat-chunk-Q4VCAIBR.mjs} +5 -5
- package/dist/{token-goat-chunk-LXIC7MTW.mjs → token-goat-chunk-REHUP2OE.mjs} +1 -1
- package/dist/{token-goat-chunk-3HJQR4OO.mjs → token-goat-chunk-TXZY7C24.mjs} +105 -19
- package/dist/{token-goat-chunk-7GJBID7S.mjs → token-goat-chunk-VEEHPNBV.mjs} +5 -3
- package/dist/{token-goat-chunk-UJORWTI4.mjs → token-goat-chunk-WT5OLTT6.mjs} +2 -2
- package/dist/{token-goat-chunk-EIZYCVBM.mjs → token-goat-chunk-XYLPMQ6I.mjs} +332 -82
- package/dist/token-goat-hook.mjs +5 -5
- package/dist/token-goat.core.mjs +5 -5
- package/docs/install.md +62 -0
- package/docs/security.md +1 -1
- package/package.json +1 -1
package/dist/token-goat-hook.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
relayInProcess
|
|
5
|
-
} from "./token-goat-chunk-
|
|
6
|
-
import "./token-goat-chunk-
|
|
7
|
-
import "./token-goat-chunk-
|
|
8
|
-
import "./token-goat-chunk-
|
|
9
|
-
import "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-XYLPMQ6I.mjs";
|
|
6
|
+
import "./token-goat-chunk-VEEHPNBV.mjs";
|
|
7
|
+
import "./token-goat-chunk-TXZY7C24.mjs";
|
|
8
|
+
import "./token-goat-chunk-REHUP2OE.mjs";
|
|
9
|
+
import "./token-goat-chunk-JZYJH76S.mjs";
|
|
10
10
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
init_define_import_meta_env
|
package/dist/token-goat.core.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
run
|
|
5
|
-
} from "./token-goat-chunk-
|
|
6
|
-
import "./token-goat-chunk-
|
|
7
|
-
import "./token-goat-chunk-
|
|
8
|
-
import "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-2SBHUPBF.mjs";
|
|
6
|
+
import "./token-goat-chunk-6RAUVAKW.mjs";
|
|
7
|
+
import "./token-goat-chunk-VEEHPNBV.mjs";
|
|
8
|
+
import "./token-goat-chunk-TXZY7C24.mjs";
|
|
9
9
|
import {
|
|
10
10
|
installEpipeGuard
|
|
11
|
-
} from "./token-goat-chunk-
|
|
11
|
+
} from "./token-goat-chunk-JZYJH76S.mjs";
|
|
12
12
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_define_import_meta_env
|
package/docs/install.md
CHANGED
|
@@ -223,6 +223,68 @@ To upgrade cleanly:
|
|
|
223
223
|
|
|
224
224
|
**AI agents handling an upgrade:** complete all three steps in sequence. After step 3, confirm no `token_goat` entries remain in `settings.json` before reporting the upgrade done.
|
|
225
225
|
|
|
226
|
+
### Command auto-approval and permissions
|
|
227
|
+
|
|
228
|
+
By default, `token-goat install` configures hook triggers only. It never writes permission entries into your environment. If your setup requires confirmation for shell commands, an approval prompt can appear whenever file names, line numbers, or arguments change.
|
|
229
|
+
|
|
230
|
+
You can add wildcard rules to avoid repeated prompts for routine queries:
|
|
231
|
+
|
|
232
|
+
#### Claude Code (`~/.claude/settings.json`)
|
|
233
|
+
|
|
234
|
+
To allow all `token-goat` commands without prompting:
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{
|
|
238
|
+
"permissions": {
|
|
239
|
+
"allow": [
|
|
240
|
+
"Bash(token-goat *)",
|
|
241
|
+
"Bash(token-goat:*)"
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
To limit auto-approval strictly to read-only queries:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"permissions": {
|
|
252
|
+
"allow": [
|
|
253
|
+
"Bash(token-goat read *)",
|
|
254
|
+
"Bash(token-goat symbol *)",
|
|
255
|
+
"Bash(token-goat section *)",
|
|
256
|
+
"Bash(token-goat outline *)",
|
|
257
|
+
"Bash(token-goat skeleton *)",
|
|
258
|
+
"Bash(token-goat brief *)",
|
|
259
|
+
"Bash(token-goat json-query *)",
|
|
260
|
+
"Bash(token-goat yaml-query *)",
|
|
261
|
+
"Bash(token-goat xml-query *)",
|
|
262
|
+
"Bash(token-goat map *)",
|
|
263
|
+
"Bash(token-goat refs *)",
|
|
264
|
+
"Bash(token-goat deps *)"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### Codex CLI (`~/.codex/config.toml`)
|
|
271
|
+
|
|
272
|
+
Running `token-goat install --codex` automatically computes and writes `trusted_hash` into `[hooks.state]` so Codex trusts the hooks. To allow automatic command execution, set `approval_policy` in `~/.codex/config.toml`:
|
|
273
|
+
|
|
274
|
+
```toml
|
|
275
|
+
approval_policy = "never"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### Copilot and VS Code MCP
|
|
279
|
+
|
|
280
|
+
For VS Code using the token-goat MCP server (`token-goat install --vscode`), enable MCP auto-approval in your VS Code `settings.json`:
|
|
281
|
+
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"chat.mcp.autoApprove": true
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
226
288
|
## What gets installed?
|
|
227
289
|
|
|
228
290
|
`token-goat install` writes the following on your machine — nothing else, anywhere. Every entry is reversed by `token-goat uninstall`. Integrations for other harnesses are additive on the way out as well as in, so a plain uninstall does not touch one you installed with `--codex`, `--copilot`, or a sibling flag: rather than undo something you did not ask about, it names each one still present and the flag that removes it. Run `token-goat doctor` at any time to see which of these are currently present.
|
package/docs/security.md
CHANGED
|
@@ -20,7 +20,7 @@ Outbound network is reserved to these explicit cases:
|
|
|
20
20
|
|
|
21
21
|
**One switch for all of it.** Set `network.offline = true` (env `TOKEN_GOAT_OFFLINE`) and every one of the paths above refuses instead of connecting, saying so rather than failing quietly. Anything already cached keeps working: a machine that has the embedding model still runs `semantic`, and one that has the language data still reads text out of images. This is one of the settings a per-project config file may not touch, so cloning a repository cannot switch it back off.
|
|
22
22
|
|
|
23
|
-
**A repository cannot reconfigure the security controls.** A project-root `.token-goat.toml` layers on top of your global config, which is what it is for: hint thresholds, indexing settings, compression tuning. But that file arrives with the repository, so whoever wrote the repository wrote it. Seven whole sections are therefore off limits to it, and come from your global config or the environment only: `injection` (prompt-injection fencing), `webfetch` (the fetch allow and deny lists), `gdrive` (the Google Drive integration), `mcp` (root confinement and the allowed-roots list), `network` (offline mode), `redaction` (the secret-redaction rules), and `screenshot` (the headless browser).
|
|
23
|
+
**A repository cannot reconfigure the security controls.** A project-root `.token-goat.toml` layers on top of your global config, which is what it is for: hint thresholds, indexing settings, compression tuning. But that file arrives with the repository, so whoever wrote the repository wrote it. Seven whole sections are therefore off limits to it, and come from your global config or the environment only: `injection` (prompt-injection fencing), `webfetch` (the fetch allow and deny lists), `gdrive` (the Google Drive integration), `mcp` (root confinement and the allowed-roots list), `network` (offline mode), `redaction` (the secret-redaction rules), and `screenshot` (the headless browser). Thirteen individual keys inside otherwise-overridable sections are locked the same way. Five decide what gets indexed at all: `indexing.cross_project_symbols`, `indexing.skip_dirs`, `indexing.skip_files`, `indexing.large_file_skip_kb` and `indexing.large_file_symbol_only_kb`, which matter because an unindexed file answers `symbol`, `read` and `semantic` in the same words a name that never existed does. Five more are the switches that decide whether a large file arrives folded rather than whole: `hints.fold_code_bodies`, `hints.fold_comment_blocks`, `hints.fold_prose_paragraphs`, `hints.outline_large_documents` and `hints.skeleton_large_sources`. The last three are `image_shrink.max_image_pixels`, the decompression-bomb cap, `worker.blocked_roots`, the folders you have kept out of the index, and `compact_assist.summary_budget_chars`, the length target token-goat hands to whoever writes your compaction summary, which a repository must not be able to set low enough to erase the session. A project file that sets one of them is ignored, and token-goat prints a line naming what it dropped. Everything else stays project-overridable.
|
|
24
24
|
|
|
25
25
|
**The lock covers the config file, not the environment.** These settings still read a `TOKEN_GOAT_*` environment variable, and a repository has ways to set one: a `.envrc` for direnv, a `terminal.integrated.env.*` block in a committed `.vscode/settings.json`, a `containerEnv` entry in a devcontainer. Refusing environment overrides would break the operator who exports a variable in their own shell, which is the legitimate case and the common one, so token-goat reports instead of refusing: `token-goat doctor` prints a `Security config overrides` line naming every locked security setting the environment is currently deciding, and the variable to unset. It covers all twenty locked keys that read an environment variable, and it derives that set from the same two tables that define what a project config may not write, rather than from a list kept alongside them. Settings with a safe side (booleans) are reported when the environment holds them open; settings without one (lists, sizes) are reported whenever the environment supplies a value at all, since there is nothing to compare against. A default install, where nothing is set, prints a single ok line.
|
|
26
26
|
|