@seanmozeik/tripwire 0.7.2 → 0.9.0
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 +20 -2
- package/dist/index.js +22 -27
- package/dist/tripwire-cli.js +1 -1
- package/dist/tripwire-hook.js +1 -1
- package/dist/tripwire-pi.js +16 -6
- package/dist/tripwire.js +109 -121
- package/dist/types/dispatch.d.ts +4 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/bash/analyze.d.ts +3 -0
- package/dist/types/lib/bash/carriers.d.ts +11 -0
- package/dist/types/lib/bash/config.d.ts +17 -0
- package/dist/types/lib/bash/execution-types.d.ts +13 -0
- package/dist/types/lib/bash/execution.d.ts +13 -0
- package/dist/types/lib/bash/index.d.ts +8 -0
- package/dist/types/lib/bash/pipeline-inputs.d.ts +10 -0
- package/dist/types/lib/bash/static-command.d.ts +9 -0
- package/dist/types/lib/bash/types.d.ts +64 -0
- package/dist/types/lib/bash/values.d.ts +25 -0
- package/dist/types/lib/bash/wrappers.d.ts +21 -0
- package/dist/types/lib/code/analyze.d.ts +3 -0
- package/dist/types/lib/code/calls.d.ts +8 -0
- package/dist/types/lib/code/carriers.d.ts +18 -0
- package/dist/types/lib/code/containers.d.ts +4 -0
- package/dist/types/lib/code/control.d.ts +13 -0
- package/dist/types/lib/code/data.d.ts +9 -0
- package/dist/types/lib/code/imports.d.ts +5 -0
- package/dist/types/lib/code/members.d.ts +4 -0
- package/dist/types/lib/code/syntax.d.ts +10 -0
- package/dist/types/lib/code/types.d.ts +51 -0
- package/dist/types/lib/code/uv.d.ts +13 -0
- package/dist/types/lib/code/values.d.ts +9 -0
- package/dist/types/lib/config.d.ts +32 -0
- package/dist/types/lib/event.d.ts +7 -1
- package/dist/types/lib/rule-actions.d.ts +27 -0
- package/dist/types/rules/bash-bypass.d.ts +5 -0
- package/dist/types/rules/bash-deny.d.ts +4 -4
- package/dist/types/rules/bash-git.d.ts +2 -2
- package/dist/types/rules/bash-network-install.d.ts +2 -2
- package/dist/types/rules/bash-redirect.d.ts +2 -2
- package/dist/types/rules/bash-scoped-rm.d.ts +2 -2
- package/dist/types/rules/bash-tar-explosion.d.ts +2 -2
- package/dist/types/rules/config-custom.d.ts +3 -3
- package/dist/types/rules/embedded-code.d.ts +15 -0
- package/dist/types/rules/tool-policy.d.ts +2 -2
- package/package.json +11 -8
- package/dist/types/lib/bash.d.ts +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanmozeik/tripwire",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Configurable safety hooks for Claude Code, Codex, Cursor, Pi, and Oh My Pi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -60,16 +60,19 @@
|
|
|
60
60
|
"verify": "bun run format:check && bun run lint && bun run typecheck && bun test && bun run build"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"
|
|
63
|
+
"@lezer/common": "1.5.2",
|
|
64
|
+
"@lezer/javascript": "1.5.4",
|
|
65
|
+
"@lezer/python": "1.1.19",
|
|
66
|
+
"unbash": "4.0.11"
|
|
64
67
|
},
|
|
65
68
|
"devDependencies": {
|
|
66
69
|
"@effect/platform-bun": "4.0.0-rc.112",
|
|
67
|
-
"@effect/tsgo": "0.
|
|
68
|
-
"@seanmozeik/de-clank": "0.1.
|
|
69
|
-
"bun-types": "1.4.
|
|
70
|
+
"@effect/tsgo": "0.45.0",
|
|
71
|
+
"@seanmozeik/de-clank": "0.1.8",
|
|
72
|
+
"bun-types": "1.4.2",
|
|
70
73
|
"effect": "4.0.0-rc.112",
|
|
71
|
-
"oxfmt": "0.
|
|
72
|
-
"oxlint": "1.
|
|
74
|
+
"oxfmt": "0.67.0",
|
|
75
|
+
"oxlint": "1.82.0",
|
|
73
76
|
"oxlint-tsgolint": "7.0.2001",
|
|
74
77
|
"typescript": "7.0.2"
|
|
75
78
|
},
|
|
@@ -78,7 +81,7 @@
|
|
|
78
81
|
"effect": "4.0.0-rc.112"
|
|
79
82
|
},
|
|
80
83
|
"optionalDependencies": {
|
|
81
|
-
"@seanmozeik/tripwire-darwin-arm64": "0.
|
|
84
|
+
"@seanmozeik/tripwire-darwin-arm64": "0.9.0"
|
|
82
85
|
},
|
|
83
86
|
"engines": {
|
|
84
87
|
"bun": ">=1.4"
|
package/dist/types/lib/bash.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface Segment {
|
|
2
|
-
readonly head: string;
|
|
3
|
-
readonly tokens: readonly string[];
|
|
4
|
-
readonly args: readonly string[];
|
|
5
|
-
readonly flags: readonly string[];
|
|
6
|
-
readonly redirects: readonly Redirect[];
|
|
7
|
-
readonly raw: string;
|
|
8
|
-
}
|
|
9
|
-
interface Redirect {
|
|
10
|
-
readonly op: '>' | '>>' | '<' | '<<' | '<<<' | '<>' | '>&' | '<&' | '&>' | '&>>';
|
|
11
|
-
readonly target: string;
|
|
12
|
-
}
|
|
13
|
-
declare const collectHeredocBodies: (cmd: string) => ReadonlyMap<string, string>;
|
|
14
|
-
interface ExecSpec {
|
|
15
|
-
readonly execFlags: ReadonlySet<string>;
|
|
16
|
-
readonly placeholders: ReadonlySet<string>;
|
|
17
|
-
readonly pickRoot: (tokens: readonly string[], execFlagIdx: number) => string;
|
|
18
|
-
}
|
|
19
|
-
declare const EXEC_SPECS: Readonly<Record<string, ExecSpec>>;
|
|
20
|
-
declare const unwrapStaticString: (value: string, heredocBodies?: ReadonlyMap<string, string>) => string;
|
|
21
|
-
declare const UNSUPPORTED_SHELL_HEAD = "__tripwire_unsupported_shell__";
|
|
22
|
-
declare const parseCommand: (cmd: string) => Segment[];
|
|
23
|
-
declare const isSafePathTarget: (raw: string, extraRelative?: readonly string[], extraAbsolute?: readonly string[]) => boolean;
|
|
24
|
-
declare const safeScopesSummary: (extraRelative?: readonly string[], extraAbsolute?: readonly string[]) => string;
|
|
25
|
-
declare const hasBypass: (cmd: string) => boolean;
|
|
26
|
-
export type { Redirect, Segment };
|
|
27
|
-
export { EXEC_SPECS, UNSUPPORTED_SHELL_HEAD, collectHeredocBodies, hasBypass, isSafePathTarget, parseCommand, safeScopesSummary, unwrapStaticString, };
|