@lousy-agents/agent-shell 5.8.6 → 5.8.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 +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -170,7 +170,7 @@ Patterns support `*` wildcards for prefix, suffix, and infix matching (e.g., `np
|
|
|
170
170
|
|
|
171
171
|
### Copilot Hook Configuration
|
|
172
172
|
|
|
173
|
-
Add the following to `.github/
|
|
173
|
+
Add the following to `.github/hooks/agent-shell/hooks.json` to use policy-check as a pre-tool-use hook:
|
|
174
174
|
|
|
175
175
|
```json
|
|
176
176
|
{
|
|
@@ -228,7 +228,7 @@ agent-shell policy --init
|
|
|
228
228
|
| File | Description |
|
|
229
229
|
| ------ | ------------- |
|
|
230
230
|
| `.github/hooks/agent-shell/policy.json` | Allow/deny policy derived from discovered commands |
|
|
231
|
-
| `.github/
|
|
231
|
+
| `.github/hooks/agent-shell/hooks.json` | Copilot `preToolUse` hook entry wiring `agent-shell policy-check` |
|
|
232
232
|
|
|
233
233
|
If either file already exists, the command skips writing it and notifies you. Both files are safe to commit for team-wide enforcement.
|
|
234
234
|
|
|
@@ -307,7 +307,7 @@ Once authenticated, `policy --init` will automatically detect the SDK and run AI
|
|
|
307
307
|
Scanning project...
|
|
308
308
|
Discovered: 8 npm script(s), 12 workflow command(s), 3 mise task(s), 1 language(s)
|
|
309
309
|
Created .github/hooks/agent-shell/policy.json
|
|
310
|
-
Created .github/
|
|
310
|
+
Created .github/hooks/agent-shell/hooks.json
|
|
311
311
|
|
|
312
312
|
--- Proposed Policy ---
|
|
313
313
|
{
|
package/dist/index.js
CHANGED
|
@@ -16153,7 +16153,7 @@ const DEFAULT_DENY_RULES = [
|
|
|
16153
16153
|
"sudo *"
|
|
16154
16154
|
];
|
|
16155
16155
|
const POLICY_SUBPATH = ".github/hooks/agent-shell/policy.json";
|
|
16156
|
-
const HOOKS_SUBPATH = ".github/
|
|
16156
|
+
const HOOKS_SUBPATH = ".github/hooks/agent-shell/hooks.json";
|
|
16157
16157
|
/**
|
|
16158
16158
|
* Extracts the script or task name from a command string, skipping any
|
|
16159
16159
|
* flags (tokens starting with `-`) that appear between the prefix and
|
|
@@ -16330,7 +16330,7 @@ const HOOKS_SUBPATH = ".github/copilot/hooks.json";
|
|
|
16330
16330
|
const policyContent = `${JSON.stringify(policy, null, 2)}\n`;
|
|
16331
16331
|
const hooksContent = `${JSON.stringify(hooksConfig, null, 2)}\n`;
|
|
16332
16332
|
await writeFileIfNotExists(policyPath, (0,external_node_path_namespaceObject.join)(repoRoot, ".github", "hooks", "agent-shell"), policyContent, POLICY_SUBPATH, deps.writeStdout);
|
|
16333
|
-
await writeFileIfNotExists(hooksPath, (0,external_node_path_namespaceObject.join)(repoRoot, ".github", "
|
|
16333
|
+
await writeFileIfNotExists(hooksPath, (0,external_node_path_namespaceObject.join)(repoRoot, ".github", "hooks", "agent-shell"), hooksContent, HOOKS_SUBPATH, deps.writeStdout);
|
|
16334
16334
|
deps.writeStdout("\n--- Proposed Policy ---\n");
|
|
16335
16335
|
deps.writeStdout(`${sanitizeOutput(JSON.stringify(policy, null, 2))}\n`);
|
|
16336
16336
|
deps.writeStdout("\n--- Hook Configuration ---\n");
|