@seanmozeik/tripwire 0.7.0 → 0.7.2

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.
Files changed (57) hide show
  1. package/README.md +16 -14
  2. package/dist/index.js +35 -0
  3. package/dist/tripwire-cli.js +3 -0
  4. package/dist/tripwire-hook.js +3 -0
  5. package/dist/tripwire-pi.js +6 -4
  6. package/dist/tripwire.js +141 -0
  7. package/dist/types/dispatch.d.ts +18 -0
  8. package/dist/types/index.d.ts +6 -0
  9. package/dist/types/lib/bash.d.ts +27 -0
  10. package/dist/types/lib/config.d.ts +110 -0
  11. package/dist/types/lib/cursor.d.ts +16 -0
  12. package/dist/types/lib/decision.d.ts +13 -0
  13. package/dist/types/lib/diff.d.ts +3 -0
  14. package/dist/types/lib/event.d.ts +45 -0
  15. package/dist/types/lib/log.d.ts +2 -0
  16. package/dist/types/lib/secrets.d.ts +41 -0
  17. package/dist/types/rules/bash-deny.d.ts +5 -0
  18. package/dist/types/rules/bash-git.d.ts +5 -0
  19. package/dist/types/rules/bash-network-install.d.ts +4 -0
  20. package/dist/types/rules/bash-redirect.d.ts +4 -0
  21. package/dist/types/rules/bash-scoped-rm.d.ts +5 -0
  22. package/dist/types/rules/bash-tar-explosion.d.ts +4 -0
  23. package/dist/types/rules/config-custom.d.ts +6 -0
  24. package/dist/types/rules/lazy-code.d.ts +4 -0
  25. package/dist/types/rules/path-protect.d.ts +12 -0
  26. package/dist/types/rules/post-secret-scrub.d.ts +12 -0
  27. package/dist/types/rules/read-protect.d.ts +4 -0
  28. package/dist/types/rules/tool-policy.d.ts +5 -0
  29. package/package.json +16 -13
  30. package/dist/tripwire +0 -0
  31. package/scripts/tripwire-cli +0 -12
  32. package/src/cli.ts +0 -271
  33. package/src/dispatch.ts +0 -562
  34. package/src/index.ts +0 -6
  35. package/src/lib/bash.ts +0 -1328
  36. package/src/lib/config.ts +0 -174
  37. package/src/lib/cursor.ts +0 -336
  38. package/src/lib/decision.ts +0 -36
  39. package/src/lib/diff.ts +0 -29
  40. package/src/lib/event.ts +0 -105
  41. package/src/lib/install.ts +0 -610
  42. package/src/lib/log.ts +0 -23
  43. package/src/lib/secrets.ts +0 -184
  44. package/src/main.ts +0 -31
  45. package/src/pi-extension.ts +0 -337
  46. package/src/rules/bash-deny.ts +0 -404
  47. package/src/rules/bash-git.ts +0 -590
  48. package/src/rules/bash-network-install.ts +0 -75
  49. package/src/rules/bash-redirect.ts +0 -91
  50. package/src/rules/bash-scoped-rm.ts +0 -84
  51. package/src/rules/bash-tar-explosion.ts +0 -77
  52. package/src/rules/config-custom.ts +0 -166
  53. package/src/rules/lazy-code.ts +0 -95
  54. package/src/rules/path-protect.ts +0 -131
  55. package/src/rules/post-secret-scrub.ts +0 -49
  56. package/src/rules/read-protect.ts +0 -57
  57. package/src/rules/tool-policy.ts +0 -54
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bun
2
+ import { Effect } from 'effect';
3
+ import { type Config, type ResolvedConfig, type SecretScannerConfig } from './lib/config';
4
+ import { type Decision } from './lib/decision';
5
+ import { type HookEvent } from './lib/event.ts';
6
+ declare const normalizeToolName: (name: string) => string;
7
+ type RuleFn = () => Decision;
8
+ interface Rule {
9
+ readonly name: string;
10
+ readonly fn: RuleFn;
11
+ }
12
+ declare const collectPreToolUseRules: (tool: string, input: unknown, config: ResolvedConfig) => Rule[];
13
+ declare const collectPostToolUseRules: (tool: string, response: unknown, secretScanner: SecretScannerConfig) => Rule[];
14
+ declare const runRules: (rules: readonly Rule[], timeoutMs: number) => Effect.Effect<Decision>;
15
+ declare const runRulesSync: (rules: readonly Rule[]) => Decision;
16
+ declare const decide: (event: HookEvent, config?: Config) => Decision;
17
+ declare const runHook: () => void;
18
+ export { collectPostToolUseRules, collectPreToolUseRules, decide, normalizeToolName, runHook, runRules, runRulesSync, };
@@ -0,0 +1,6 @@
1
+ export type { Decision } from './lib/decision';
2
+ export type { HookEvent } from './lib/event';
3
+ export type { Config, ConfigLoad, ResolvedConfig } from './lib/config';
4
+ export { allow, deny, ask, warn } from './lib/decision';
5
+ export { decide } from './dispatch';
6
+ export { getDefaultConfig, loadConfig, loadConfigResult, mergeWithDefaults } from './lib/config';
@@ -0,0 +1,27 @@
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, };
@@ -0,0 +1,110 @@
1
+ import { Effect, Schema } from 'effect';
2
+ declare const BlockRuleSchema: Schema.Struct<{
3
+ readonly pattern: Schema.String;
4
+ readonly message: Schema.String;
5
+ readonly action: Schema.optional<Schema.Union<readonly [Schema.Literal<"deny">, Schema.Literal<"ask">]>>;
6
+ readonly requiresFlags: Schema.optional<Schema.$Array<Schema.String>>;
7
+ readonly forbidsFlagValues: Schema.optional<Schema.$Array<Schema.Struct<{
8
+ readonly flag: Schema.String;
9
+ readonly values: Schema.$Array<Schema.String>;
10
+ }>>>;
11
+ }>;
12
+ declare const GitConfigSchema: Schema.Struct<{
13
+ readonly protectedBranches: Schema.optional<Schema.$Array<Schema.String>>;
14
+ readonly enforceConventionalCommits: Schema.optional<Schema.Boolean>;
15
+ }>;
16
+ declare const SafePathsConfigSchema: Schema.Struct<{
17
+ readonly relative: Schema.optional<Schema.$Array<Schema.String>>;
18
+ readonly absolute: Schema.optional<Schema.$Array<Schema.String>>;
19
+ }>;
20
+ declare const ToolPolicySchema: Schema.Struct<{
21
+ readonly rule: Schema.String;
22
+ readonly executables: Schema.$Array<Schema.String>;
23
+ readonly action: Schema.Union<readonly [Schema.Literal<"deny">, Schema.Literal<"warn">]>;
24
+ readonly message: Schema.String;
25
+ readonly match: Schema.optional<Schema.Struct<{
26
+ readonly argumentsIncludeAll: Schema.optional<Schema.$Array<Schema.String>>;
27
+ readonly argumentsStartWith: Schema.optional<Schema.$Array<Schema.String>>;
28
+ readonly shortFlagsIncludeAll: Schema.optional<Schema.$Array<Schema.String>>;
29
+ }>>;
30
+ }>;
31
+ declare const SecretScannerConfigSchema: Schema.Struct<{
32
+ readonly executable: Schema.String;
33
+ readonly timeoutMs: Schema.Finite;
34
+ }>;
35
+ declare const ConfigSchema: Schema.Struct<{
36
+ readonly git: Schema.optional<Schema.Struct<{
37
+ readonly protectedBranches: Schema.optional<Schema.$Array<Schema.String>>;
38
+ readonly enforceConventionalCommits: Schema.optional<Schema.Boolean>;
39
+ }>>;
40
+ readonly safePaths: Schema.optional<Schema.Struct<{
41
+ readonly relative: Schema.optional<Schema.$Array<Schema.String>>;
42
+ readonly absolute: Schema.optional<Schema.$Array<Schema.String>>;
43
+ }>>;
44
+ readonly toolPolicies: Schema.optional<Schema.$Array<Schema.Struct<{
45
+ readonly rule: Schema.String;
46
+ readonly executables: Schema.$Array<Schema.String>;
47
+ readonly action: Schema.Union<readonly [Schema.Literal<"deny">, Schema.Literal<"warn">]>;
48
+ readonly message: Schema.String;
49
+ readonly match: Schema.optional<Schema.Struct<{
50
+ readonly argumentsIncludeAll: Schema.optional<Schema.$Array<Schema.String>>;
51
+ readonly argumentsStartWith: Schema.optional<Schema.$Array<Schema.String>>;
52
+ readonly shortFlagsIncludeAll: Schema.optional<Schema.$Array<Schema.String>>;
53
+ }>>;
54
+ }>>>;
55
+ readonly blockedCommands: Schema.optional<Schema.$Array<Schema.Struct<{
56
+ readonly pattern: Schema.String;
57
+ readonly message: Schema.String;
58
+ readonly action: Schema.optional<Schema.Union<readonly [Schema.Literal<"deny">, Schema.Literal<"ask">]>>;
59
+ readonly requiresFlags: Schema.optional<Schema.$Array<Schema.String>>;
60
+ readonly forbidsFlagValues: Schema.optional<Schema.$Array<Schema.Struct<{
61
+ readonly flag: Schema.String;
62
+ readonly values: Schema.$Array<Schema.String>;
63
+ }>>>;
64
+ }>>>;
65
+ readonly allowedCommands: Schema.optional<Schema.$Array<Schema.Struct<{
66
+ readonly pattern: Schema.String;
67
+ readonly message: Schema.String;
68
+ readonly action: Schema.optional<Schema.Union<readonly [Schema.Literal<"deny">, Schema.Literal<"ask">]>>;
69
+ readonly requiresFlags: Schema.optional<Schema.$Array<Schema.String>>;
70
+ readonly forbidsFlagValues: Schema.optional<Schema.$Array<Schema.Struct<{
71
+ readonly flag: Schema.String;
72
+ readonly values: Schema.$Array<Schema.String>;
73
+ }>>>;
74
+ }>>>;
75
+ readonly secretScanner: Schema.optional<Schema.Struct<{
76
+ readonly executable: Schema.String;
77
+ readonly timeoutMs: Schema.Finite;
78
+ }>>;
79
+ }>;
80
+ declare const CONFIG_PATH: string;
81
+ declare const getDefaultConfig: () => ResolvedConfig;
82
+ declare const mergeWithDefaults: (partial: Config) => ResolvedConfig;
83
+ type ConfigLoad = {
84
+ readonly ok: true;
85
+ readonly config: ResolvedConfig;
86
+ } | {
87
+ readonly ok: false;
88
+ readonly error: string;
89
+ };
90
+ export declare const loadConfigResult: (path?: string) => Effect.Effect<ConfigLoad>;
91
+ export declare const loadConfig: (path?: string) => Effect.Effect<ResolvedConfig>;
92
+ export type BlockRule = typeof BlockRuleSchema.Type;
93
+ export type GitConfig = typeof GitConfigSchema.Type;
94
+ export type SafePathsConfig = typeof SafePathsConfigSchema.Type;
95
+ export type ToolPolicy = typeof ToolPolicySchema.Type;
96
+ export type SecretScannerConfig = typeof SecretScannerConfigSchema.Type;
97
+ export type Config = typeof ConfigSchema.Type;
98
+ export interface ResolvedConfig {
99
+ readonly git: {
100
+ readonly protectedBranches: readonly string[];
101
+ readonly enforceConventionalCommits: boolean;
102
+ };
103
+ readonly safePaths: SafePathsConfig;
104
+ readonly toolPolicies: readonly ToolPolicy[];
105
+ readonly blockedCommands: readonly BlockRule[];
106
+ readonly allowedCommands: readonly BlockRule[];
107
+ readonly secretScanner: SecretScannerConfig;
108
+ }
109
+ export type { ConfigLoad };
110
+ export { CONFIG_PATH, ConfigSchema, SecretScannerConfigSchema, getDefaultConfig, mergeWithDefaults, };
@@ -0,0 +1,16 @@
1
+ type HookHost = {
2
+ readonly kind: 'native';
3
+ } | {
4
+ readonly kind: 'cursor';
5
+ readonly eventName: string;
6
+ readonly post: boolean;
7
+ };
8
+ interface NormalizedHookInput {
9
+ readonly event: unknown;
10
+ readonly host: HookHost;
11
+ }
12
+ declare const CURSOR_PRE_EVENTS: Set<string>;
13
+ declare const CURSOR_POST_EVENTS: Set<string>;
14
+ declare const cursorHost: (eventName: string) => HookHost;
15
+ declare const normalizeHookInput: (raw: unknown, hintedEventName?: string) => NormalizedHookInput;
16
+ export { CURSOR_POST_EVENTS, CURSOR_PRE_EVENTS, cursorHost, normalizeHookInput, type HookHost, type NormalizedHookInput, };
@@ -0,0 +1,13 @@
1
+ type DecisionKind = 'allow' | 'warn' | 'ask' | 'deny';
2
+ interface Decision {
3
+ readonly kind: DecisionKind;
4
+ readonly rule: string;
5
+ readonly message: string;
6
+ }
7
+ declare const allow: (rule: string) => Decision;
8
+ declare const warn: (rule: string, message: string) => Decision;
9
+ declare const ask: (rule: string, message: string) => Decision;
10
+ declare const deny: (rule: string, message: string) => Decision;
11
+ declare const merge: (decisions: readonly Decision[]) => Decision;
12
+ export type { Decision, DecisionKind };
13
+ export { allow, ask, deny, merge, warn };
@@ -0,0 +1,3 @@
1
+ declare const addedLines: (prev: string, next: string) => string[];
2
+ declare const readFileOrEmpty: (path: string) => string;
3
+ export { addedLines, readFileOrEmpty };
@@ -0,0 +1,45 @@
1
+ import { Schema } from 'effect';
2
+ declare const HookEvent: Schema.Struct<{
3
+ readonly hook_event_name: Schema.String;
4
+ readonly tool_name: Schema.optional<Schema.String>;
5
+ readonly tool_input: Schema.optional<Schema.Unknown>;
6
+ readonly tool_response: Schema.optional<Schema.Unknown>;
7
+ readonly cwd: Schema.optional<Schema.String>;
8
+ readonly session_id: Schema.optional<Schema.String>;
9
+ readonly turn_id: Schema.optional<Schema.String>;
10
+ readonly tool_use_id: Schema.optional<Schema.String>;
11
+ }>;
12
+ type HookEventType = typeof HookEvent.Type;
13
+ interface BashInput {
14
+ readonly command: string;
15
+ }
16
+ interface EditInput {
17
+ readonly file_path: string;
18
+ readonly old_string: string;
19
+ readonly new_string: string;
20
+ }
21
+ interface WriteInput {
22
+ readonly file_path: string;
23
+ readonly content: string;
24
+ }
25
+ interface ReadInput {
26
+ readonly file_path: string;
27
+ }
28
+ interface BashResponse {
29
+ readonly stdout?: string;
30
+ readonly stderr?: string;
31
+ readonly interrupted?: boolean;
32
+ }
33
+ interface ReadResponse {
34
+ readonly content?: string;
35
+ readonly file?: {
36
+ readonly content?: string;
37
+ };
38
+ }
39
+ declare const isBashInput: (x: unknown) => x is BashInput;
40
+ declare const isEditInput: (x: unknown) => x is EditInput;
41
+ declare const isWriteInput: (x: unknown) => x is WriteInput;
42
+ declare const isReadInput: (x: unknown) => x is ReadInput;
43
+ declare const extractResponseText: (toolName: string, response: unknown) => string;
44
+ export type { BashInput, BashResponse, EditInput, HookEventType as HookEvent, ReadInput, ReadResponse, WriteInput, };
45
+ export { HookEvent as HookEventSchema, extractResponseText, isBashInput, isEditInput, isReadInput, isWriteInput, };
@@ -0,0 +1,2 @@
1
+ declare const logError: (rule: string, err: unknown) => void;
2
+ export { logError };
@@ -0,0 +1,41 @@
1
+ import { Schema } from 'effect';
2
+ import type { SecretScannerConfig } from './config';
3
+ declare const BetterleaksFindingSchema: Schema.Struct<{
4
+ readonly RuleID: Schema.String;
5
+ readonly Description: Schema.String;
6
+ readonly StartLine: Schema.Finite;
7
+ readonly EndLine: Schema.Finite;
8
+ readonly Secret: Schema.String;
9
+ readonly Match: Schema.String;
10
+ }>;
11
+ type BetterleaksFinding = typeof BetterleaksFindingSchema.Type;
12
+ interface ScanSuccess {
13
+ readonly ok: true;
14
+ readonly hits: readonly {
15
+ readonly rule: string;
16
+ readonly count: number;
17
+ }[];
18
+ readonly redacted: string;
19
+ }
20
+ type ScanFailureCategory = 'missing-executable' | 'timeout' | 'non-zero-exit' | 'malformed-json';
21
+ interface ScanFailure {
22
+ readonly ok: false;
23
+ readonly category: ScanFailureCategory;
24
+ }
25
+ type ScanResult = ScanSuccess | ScanFailure;
26
+ interface ScannerInvocation {
27
+ readonly executable: string;
28
+ readonly args: readonly string[];
29
+ readonly input: string;
30
+ readonly timeoutMs: number;
31
+ }
32
+ interface ScannerProcessResult {
33
+ readonly status: number | null;
34
+ readonly stdout: string;
35
+ readonly error?: unknown;
36
+ }
37
+ type ScannerRunner = (invocation: ScannerInvocation) => ScannerProcessResult;
38
+ declare const escapeRegExp: (value: string) => string;
39
+ declare const scanAndRedact: (input: string, config: SecretScannerConfig, runner?: ScannerRunner) => ScanResult;
40
+ export type { BetterleaksFinding, ScanFailure, ScanFailureCategory, ScannerInvocation, ScannerProcessResult, ScannerRunner, ScanResult, ScanSuccess, };
41
+ export { escapeRegExp, scanAndRedact };
@@ -0,0 +1,5 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import { type Decision } from '../lib/decision';
3
+ declare const UNBYPASSABLE_RULES: ReadonlySet<string>;
4
+ declare const bashDeny: (segments: readonly Segment[], cmd: string) => Decision;
5
+ export { bashDeny, UNBYPASSABLE_RULES };
@@ -0,0 +1,5 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import type { GitConfig } from '../lib/config';
3
+ import { type Decision } from '../lib/decision';
4
+ declare const bashGit: (segments: readonly Segment[], cmd: string, config: GitConfig) => Decision;
5
+ export { bashGit };
@@ -0,0 +1,4 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import { type Decision } from '../lib/decision';
3
+ declare const bashNetworkInstall: (segments: readonly Segment[], cmd: string) => Decision;
4
+ export { bashNetworkInstall };
@@ -0,0 +1,4 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import { type Decision } from '../lib/decision';
3
+ declare const bashRedirect: (segments: readonly Segment[], cmd: string) => Decision;
4
+ export { bashRedirect };
@@ -0,0 +1,5 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import type { SafePathsConfig } from '../lib/config';
3
+ import { type Decision } from '../lib/decision';
4
+ declare const bashScopedRm: (segments: readonly Segment[], cmd: string, config: SafePathsConfig) => Decision;
5
+ export { bashScopedRm };
@@ -0,0 +1,4 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import { type Decision } from '../lib/decision';
3
+ declare const bashTarExplosion: (segments: readonly Segment[], cmd: string) => Decision;
4
+ export { bashTarExplosion };
@@ -0,0 +1,6 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import type { BlockRule } from '../lib/config';
3
+ import { type Decision } from '../lib/decision';
4
+ declare const matchPattern: (segments: readonly Segment[], rule: BlockRule) => boolean;
5
+ export declare const configCustom: (segments: readonly Segment[], cmd: string, blockedCommands: readonly BlockRule[], allowedCommands: readonly BlockRule[]) => Decision;
6
+ export { matchPattern };
@@ -0,0 +1,4 @@
1
+ import { type Decision } from '../lib/decision';
2
+ import type { EditInput, WriteInput } from '../lib/event';
3
+ declare const lazyCode: (input: EditInput | WriteInput) => Decision;
4
+ export { lazyCode };
@@ -0,0 +1,12 @@
1
+ import { type Decision } from '../lib/decision';
2
+ import type { EditInput, WriteInput } from '../lib/event';
3
+ interface ProtectedPathSpec {
4
+ readonly pattern: RegExp;
5
+ readonly rule: string;
6
+ readonly message: string;
7
+ }
8
+ type PathAccess = 'read' | 'write';
9
+ declare const classifyProtectedPath: (submittedPath: string, access: PathAccess, specs: readonly ProtectedPathSpec[]) => ProtectedPathSpec | null;
10
+ declare const pathProtect: (input: EditInput | WriteInput) => Decision;
11
+ export type { PathAccess, ProtectedPathSpec };
12
+ export { classifyProtectedPath, pathProtect };
@@ -0,0 +1,12 @@
1
+ import type { SecretScannerConfig } from '../lib/config';
2
+ import { type Decision } from '../lib/decision';
3
+ import { type ScannerRunner } from '../lib/secrets';
4
+ interface PostInput {
5
+ readonly toolName: string;
6
+ readonly response: unknown;
7
+ readonly secretScanner: SecretScannerConfig;
8
+ readonly scannerRunner?: ScannerRunner;
9
+ }
10
+ declare const postSecretScrub: (input: PostInput) => Decision;
11
+ export type { PostInput };
12
+ export { postSecretScrub };
@@ -0,0 +1,4 @@
1
+ import { type Decision } from '../lib/decision';
2
+ import type { ReadInput } from '../lib/event';
3
+ declare const readProtect: (input: ReadInput) => Decision;
4
+ export { readProtect };
@@ -0,0 +1,5 @@
1
+ import { type Segment } from '../lib/bash';
2
+ import type { ToolPolicy } from '../lib/config';
3
+ import { type Decision } from '../lib/decision';
4
+ declare const toolPolicy: (segments: readonly Segment[], command: string, policies: readonly ToolPolicy[]) => Decision;
5
+ export { toolPolicy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanmozeik/tripwire",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Configurable safety hooks for Claude Code, Codex, Cursor, Pi, and Oh My Pi",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -22,26 +22,26 @@
22
22
  "url": "git+https://github.com/seanmozeik/tripwire.git"
23
23
  },
24
24
  "bin": {
25
- "tripwire": "./scripts/tripwire-cli",
26
- "tripwire-hook": "./dist/tripwire"
25
+ "tripwire": "./dist/tripwire-cli.js",
26
+ "tripwire-hook": "./dist/tripwire-hook.js"
27
27
  },
28
+ "workspaces": [
29
+ "packages/*"
30
+ ],
28
31
  "files": [
29
- "dist/tripwire-pi.js",
32
+ "dist",
30
33
  "LICENSE",
31
34
  "package.json",
32
- "scripts/tripwire-cli",
33
- "src",
34
35
  "README.md"
35
36
  ],
36
- "os": [
37
- "darwin"
38
- ],
39
- "cpu": [
40
- "arm64"
41
- ],
42
37
  "type": "module",
38
+ "types": "./dist/types/index.d.ts",
43
39
  "exports": {
44
- ".": "./src/index.ts"
40
+ ".": {
41
+ "types": "./dist/types/index.d.ts",
42
+ "import": "./dist/index.js",
43
+ "default": "./dist/index.js"
44
+ }
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -77,6 +77,9 @@
77
77
  "@effect/platform-bun": "4.0.0-rc.112",
78
78
  "effect": "4.0.0-rc.112"
79
79
  },
80
+ "optionalDependencies": {
81
+ "@seanmozeik/tripwire-darwin-arm64": "0.7.2"
82
+ },
80
83
  "engines": {
81
84
  "bun": ">=1.4"
82
85
  }
package/dist/tripwire DELETED
Binary file
@@ -1,12 +0,0 @@
1
- #!/bin/sh
2
-
3
- case $0 in
4
- */*) launcher_directory=${0%/*} ;;
5
- *)
6
- launcher_path=$(command -v "$0") || exit 127
7
- launcher_directory=${launcher_path%/*}
8
- ;;
9
- esac
10
-
11
- [ -n "$launcher_directory" ] || launcher_directory=/
12
- exec "$launcher_directory/tripwire-hook" --tripwire-force-cli "$@"