toolgovern-cli 0.1.0 → 0.1.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.
- package/README.md +82 -0
- package/dist/cli.d.ts +11 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +158 -3
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# toolgovern-cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/toolgovern-cli)
|
|
4
|
+
[](https://github.com/RudrenduPaul/toolgovern/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/RudrenduPaul/toolgovern/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
Validate [toolgovern](https://www.npmjs.com/package/toolgovern) policy files, audit local gate
|
|
8
|
+
traces, and scaffold framework integration boilerplate -- all from the command line, without
|
|
9
|
+
needing a hosted dashboard.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx toolgovern-cli validate ./toolgovern.policy.yml
|
|
13
|
+
npx toolgovern-cli audit ./toolgovern-trace.jsonl --since 24h --decision deny
|
|
14
|
+
npx toolgovern-cli init langgraph
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
### `validate <policy-file>`
|
|
20
|
+
|
|
21
|
+
Checks a `toolgovern.policy.yml` file's structure and rule references before it loads at runtime.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
$ toolgovern-cli validate ./toolgovern.policy.example.yml
|
|
25
|
+
OK ./toolgovern.policy.example.yml is a valid toolgovern policy.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### `audit <trace-file> [flags]`
|
|
29
|
+
|
|
30
|
+
Reads a local trace file written by `toolgovern`'s `TraceWriter` and filters it.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
$ toolgovern-cli audit ./toolgovern-trace.jsonl --decision deny
|
|
34
|
+
DENY research-sub -> bash [TG01-pipe-to-shell, TG03-network-disabled, TG03-known-paste-relay] 2026-07-12T01:39:22.581Z
|
|
35
|
+
|
|
36
|
+
1 of 2 trace entries matched.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
| Flag | What it does |
|
|
40
|
+
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `--since <window>` | Only entries within the window, e.g. `24h`, `7d` |
|
|
42
|
+
| `--decision <allow\|deny\|require-approval>` | Filter by gate decision |
|
|
43
|
+
| `--agent <id>` | Filter by agent identity |
|
|
44
|
+
| `--rule <ruleId>` | Filter by which rule fired |
|
|
45
|
+
| `--verify-chain` | Recompute every entry's signature and confirm the `prior_trace_id` chain is intact -- add `--key-file <path>` if the trace was written with an HMAC `secretKey` |
|
|
46
|
+
|
|
47
|
+
### `init [oma|langgraph] [flags]`
|
|
48
|
+
|
|
49
|
+
Scaffolds a real, working integration file wiring `governTool()` into your project -- not a stub
|
|
50
|
+
comment, actual generated code you fill in a tool list and policy path for and run.
|
|
51
|
+
|
|
52
|
+
With no framework named, it looks at the current directory's `package.json` and detects which
|
|
53
|
+
integration applies: `open-multi-agent`/`node_runner` dependencies scaffold the `oma` adapter,
|
|
54
|
+
`@langchain/langgraph` scaffolds the `langgraph` adapter. Pass the framework explicitly to skip
|
|
55
|
+
detection.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
$ toolgovern-cli init langgraph
|
|
59
|
+
Scaffolded langgraph integration at toolgovern.langgraph.ts.
|
|
60
|
+
Fill in your real tool(s) and confirm the policy path (./toolgovern.policy.yml) before running.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
| Flag | What it does |
|
|
64
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `--policy <path>` | Policy file path baked into the generated `loadPolicy()` call. Defaults to `./toolgovern.policy.yml` |
|
|
66
|
+
| `--out <path>` | Where to write the scaffold file. Defaults to `toolgovern.oma.ts` or `toolgovern.langgraph.ts` |
|
|
67
|
+
| `--force` | Overwrite an existing file at `--out` |
|
|
68
|
+
|
|
69
|
+
## Why a CLI, not just a library
|
|
70
|
+
|
|
71
|
+
`toolgovern`'s `TraceWriter` produces a plain, append-only JSON Lines file on your own machine --
|
|
72
|
+
no server, no account. `toolgovern-cli` is the read side of that: a way to actually look at what
|
|
73
|
+
your agents did without writing a parser yourself, and a way to check `--verify-chain` proves the
|
|
74
|
+
trace hasn't been quietly edited after the fact. `init` is the write side of getting started: a
|
|
75
|
+
real wiring file instead of copy-pasting a README snippet.
|
|
76
|
+
|
|
77
|
+
See the [full toolgovern documentation](https://github.com/RudrenduPaul/toolgovern) on GitHub for
|
|
78
|
+
the middleware itself, the rule pack, and the trace format spec.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
Apache 2.0. See [LICENSE](https://github.com/RudrenduPaul/toolgovern/blob/main/LICENSE).
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* toolgovern-cli -- validate policy files
|
|
4
|
-
* hosted dashboard.
|
|
3
|
+
* toolgovern-cli -- validate policy files, audit local gate traces, and scaffold framework
|
|
4
|
+
* integration boilerplate, without needing the hosted dashboard.
|
|
5
5
|
*
|
|
6
6
|
* toolgovern-cli validate ./toolgovern.policy.yml
|
|
7
7
|
* toolgovern-cli audit ./toolgovern-trace.jsonl --since 24h --decision deny
|
|
8
|
+
* toolgovern-cli init langgraph
|
|
8
9
|
*
|
|
9
10
|
* Every command function below returns a `CliResult` (exit code + stdout/stderr text) instead of
|
|
10
11
|
* writing to `process.stdout`/`process.stderr` directly, so the command logic is testable in
|
|
@@ -23,5 +24,13 @@ export declare function parseArgs(argv: readonly string[]): ParsedFlags;
|
|
|
23
24
|
export declare const USAGE: string;
|
|
24
25
|
export declare function validateCommand(policyFile: string | undefined): CliResult;
|
|
25
26
|
export declare function auditCommand(traceFile: string | undefined, flags: ParsedFlags['flags']): Promise<CliResult>;
|
|
27
|
+
export type ScaffoldFramework = 'oma' | 'langgraph';
|
|
28
|
+
interface PackageJsonShape {
|
|
29
|
+
readonly dependencies?: Readonly<Record<string, string>>;
|
|
30
|
+
readonly devDependencies?: Readonly<Record<string, string>>;
|
|
31
|
+
}
|
|
32
|
+
export declare function detectFrameworks(pkg: PackageJsonShape): ScaffoldFramework[];
|
|
33
|
+
export declare function initCommand(framework: string | undefined, flags: ParsedFlags['flags'], cwd: string): CliResult;
|
|
26
34
|
export declare function runCommand(argv: readonly string[]): Promise<CliResult>;
|
|
35
|
+
export {};
|
|
27
36
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG;AAeH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAC5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,WAAW,CAoB9D;AAED,eAAO,MAAM,KAAK,QAcN,CAAC;AAEb,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAuBzE;AAID,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,GAC1B,OAAO,CAAC,SAAS,CAAC,CA4EpB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,WAAW,CAAC;AAgBpD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC7D;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,iBAAiB,EAAE,CAS3E;AAuDD,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,EAC3B,GAAG,EAAE,MAAM,GACV,SAAS,CA8EX;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAqB5E"}
|
package/dist/cli.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* toolgovern-cli -- validate policy files
|
|
4
|
-
* hosted dashboard.
|
|
3
|
+
* toolgovern-cli -- validate policy files, audit local gate traces, and scaffold framework
|
|
4
|
+
* integration boilerplate, without needing the hosted dashboard.
|
|
5
5
|
*
|
|
6
6
|
* toolgovern-cli validate ./toolgovern.policy.yml
|
|
7
7
|
* toolgovern-cli audit ./toolgovern-trace.jsonl --since 24h --decision deny
|
|
8
|
+
* toolgovern-cli init langgraph
|
|
8
9
|
*
|
|
9
10
|
* Every command function below returns a `CliResult` (exit code + stdout/stderr text) instead of
|
|
10
11
|
* writing to `process.stdout`/`process.stderr` directly, so the command logic is testable in
|
|
11
12
|
* isolation -- `main()` is the only place that touches the real process streams.
|
|
12
13
|
*/
|
|
13
|
-
import { readFileSync } from 'node:fs';
|
|
14
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
15
|
+
import { dirname, join, resolve } from 'node:path';
|
|
14
16
|
import { pathToFileURL } from 'node:url';
|
|
15
17
|
import { parse as parseYaml } from 'yaml';
|
|
16
18
|
import { validatePolicy, filterTrace, readTrace, verifyChain, } from 'toolgovern';
|
|
@@ -42,11 +44,16 @@ export const USAGE = [
|
|
|
42
44
|
'Usage:',
|
|
43
45
|
' toolgovern-cli validate <policy-file>',
|
|
44
46
|
' toolgovern-cli audit <trace-file> [--since <window>] [--decision <allow|deny|require-approval>] [--agent <id>] [--rule <ruleId>] [--verify-chain] [--key-file <path>]',
|
|
47
|
+
' toolgovern-cli init [oma|langgraph] [--policy <path>] [--out <path>] [--force]',
|
|
45
48
|
'',
|
|
46
49
|
' --key-file Path to the secret key file used to verify hmac-sha256-signed trace entries.',
|
|
47
50
|
' Only needed if the trace was written with a TraceWriter secretKey. Entries',
|
|
48
51
|
' signed with the default unkeyed sha256 scheme verify without it.',
|
|
49
52
|
'',
|
|
53
|
+
' init Scaffolds a working integration file wiring toolgovern into the detected (or',
|
|
54
|
+
' named) framework. Detects open-multi-agent/node_runner (-> oma) and',
|
|
55
|
+
" @langchain/langgraph (-> langgraph) in the current directory's package.json.",
|
|
56
|
+
'',
|
|
50
57
|
].join('\n');
|
|
51
58
|
export function validateCommand(policyFile) {
|
|
52
59
|
if (!policyFile) {
|
|
@@ -144,6 +151,151 @@ export async function auditCommand(traceFile, flags) {
|
|
|
144
151
|
stdout += `\n${filtered.length} of ${entries.length} trace entries matched.\n`;
|
|
145
152
|
return { code: 0, stdout, stderr: '' };
|
|
146
153
|
}
|
|
154
|
+
/** Dependency names in a project's package.json that indicate the given framework is in use.
|
|
155
|
+
* `node_runner` is open-multi-agent's own runtime package name, per this repo's
|
|
156
|
+
* `integrations/oma` doc comments; `open-multi-agent` covers a project that depends on the
|
|
157
|
+
* framework by its own package name instead. */
|
|
158
|
+
const FRAMEWORK_DEPENDENCY_MARKERS = {
|
|
159
|
+
oma: ['open-multi-agent', 'node_runner'],
|
|
160
|
+
langgraph: ['@langchain/langgraph'],
|
|
161
|
+
};
|
|
162
|
+
const DEFAULT_SCAFFOLD_PATH = {
|
|
163
|
+
oma: 'toolgovern.oma.ts',
|
|
164
|
+
langgraph: 'toolgovern.langgraph.ts',
|
|
165
|
+
};
|
|
166
|
+
export function detectFrameworks(pkg) {
|
|
167
|
+
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
168
|
+
const detected = [];
|
|
169
|
+
for (const framework of Object.keys(FRAMEWORK_DEPENDENCY_MARKERS)) {
|
|
170
|
+
if (FRAMEWORK_DEPENDENCY_MARKERS[framework].some((marker) => marker in deps)) {
|
|
171
|
+
detected.push(framework);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return detected;
|
|
175
|
+
}
|
|
176
|
+
function omaScaffold(policyPath) {
|
|
177
|
+
return `import { governedTool } from 'toolgovern-integration-oma';
|
|
178
|
+
import { loadPolicy, type ToolDefinition } from 'toolgovern';
|
|
179
|
+
|
|
180
|
+
// Load your real toolgovern policy -- see toolgovern.policy.example.yml in the toolgovern repo
|
|
181
|
+
// for the full schema, or replace this with an inline Policy object.
|
|
182
|
+
const policy = loadPolicy('${policyPath}');
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Wraps one of your framework's tools ({ name, execute(args) }) so every call is evaluated by
|
|
186
|
+
* toolgovern's classifier before it reaches your real implementation. Register the *governed*
|
|
187
|
+
* tool with your framework instead of the raw one, e.g.:
|
|
188
|
+
*
|
|
189
|
+
* registry.register(governTool(myRawTool));
|
|
190
|
+
*/
|
|
191
|
+
export function governTool<Args extends Record<string, unknown>, Result>(
|
|
192
|
+
tool: ToolDefinition<Args, Result>,
|
|
193
|
+
): ToolDefinition<Args, Result> {
|
|
194
|
+
return governedTool(tool, policy);
|
|
195
|
+
}
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
198
|
+
function langgraphScaffold(policyPath) {
|
|
199
|
+
return `import { ToolNode } from '@langchain/langgraph/prebuilt';
|
|
200
|
+
import type { StructuredToolInterface } from '@langchain/core/tools';
|
|
201
|
+
import { governedLangGraphTools } from 'toolgovern-integration-langgraph';
|
|
202
|
+
import { loadPolicy } from 'toolgovern';
|
|
203
|
+
|
|
204
|
+
// Load your real toolgovern policy -- see toolgovern.policy.example.yml in the toolgovern repo
|
|
205
|
+
// for the full schema, or replace this with an inline Policy object.
|
|
206
|
+
const policy = loadPolicy('${policyPath}');
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Wraps your LangChain tools array and returns a ToolNode that gates every call through
|
|
210
|
+
* toolgovern's classifier before it reaches your real tool implementation. Pass this in place
|
|
211
|
+
* of \`new ToolNode(myTools)\` wherever you build your graph.
|
|
212
|
+
*/
|
|
213
|
+
export function governedToolNode(
|
|
214
|
+
myTools: readonly StructuredToolInterface[],
|
|
215
|
+
agentId: string,
|
|
216
|
+
sessionId: string,
|
|
217
|
+
): ToolNode {
|
|
218
|
+
return new ToolNode(governedLangGraphTools(myTools, { ...policy, agentId, sessionId }));
|
|
219
|
+
}
|
|
220
|
+
`;
|
|
221
|
+
}
|
|
222
|
+
const SCAFFOLD_TEMPLATES = {
|
|
223
|
+
oma: omaScaffold,
|
|
224
|
+
langgraph: langgraphScaffold,
|
|
225
|
+
};
|
|
226
|
+
export function initCommand(framework, flags, cwd) {
|
|
227
|
+
let target;
|
|
228
|
+
if (framework) {
|
|
229
|
+
if (framework !== 'oma' && framework !== 'langgraph') {
|
|
230
|
+
return {
|
|
231
|
+
code: 2,
|
|
232
|
+
stdout: '',
|
|
233
|
+
stderr: `Unknown framework "${framework}". Supported: oma, langgraph.\n${USAGE}`,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
target = framework;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
let pkg;
|
|
240
|
+
try {
|
|
241
|
+
pkg = JSON.parse(readFileSync(join(cwd, 'package.json'), 'utf8'));
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
return {
|
|
245
|
+
code: 1,
|
|
246
|
+
stdout: '',
|
|
247
|
+
stderr: `Could not read package.json in "${cwd}": ${error.message}\n`,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const detected = detectFrameworks(pkg);
|
|
251
|
+
if (detected.length === 0) {
|
|
252
|
+
return {
|
|
253
|
+
code: 1,
|
|
254
|
+
stdout: '',
|
|
255
|
+
stderr: 'No supported framework dependency detected in package.json (looked for ' +
|
|
256
|
+
'open-multi-agent/node_runner, @langchain/langgraph). ' +
|
|
257
|
+
'Pass one explicitly: toolgovern-cli init <oma|langgraph>\n',
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
if (detected.length > 1) {
|
|
261
|
+
return {
|
|
262
|
+
code: 1,
|
|
263
|
+
stdout: '',
|
|
264
|
+
stderr: `Multiple supported frameworks detected (${detected.join(', ')}). ` +
|
|
265
|
+
'Pass one explicitly: toolgovern-cli init <framework>\n',
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
target = detected[0];
|
|
269
|
+
}
|
|
270
|
+
const policyPath = typeof flags.policy === 'string' ? flags.policy : './toolgovern.policy.yml';
|
|
271
|
+
const outPath = typeof flags.out === 'string' ? flags.out : DEFAULT_SCAFFOLD_PATH[target];
|
|
272
|
+
const fullOutPath = resolve(cwd, outPath);
|
|
273
|
+
if (existsSync(fullOutPath) && !flags.force) {
|
|
274
|
+
return {
|
|
275
|
+
code: 1,
|
|
276
|
+
stdout: '',
|
|
277
|
+
stderr: `"${outPath}" already exists. Pass --force to overwrite.\n`,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
const content = SCAFFOLD_TEMPLATES[target](policyPath);
|
|
281
|
+
try {
|
|
282
|
+
mkdirSync(dirname(fullOutPath), { recursive: true });
|
|
283
|
+
writeFileSync(fullOutPath, content, 'utf8');
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
return {
|
|
287
|
+
code: 1,
|
|
288
|
+
stdout: '',
|
|
289
|
+
stderr: `Failed to write "${outPath}": ${error.message}\n`,
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
code: 0,
|
|
294
|
+
stdout: `Scaffolded ${target} integration at ${outPath}.\n` +
|
|
295
|
+
`Fill in your real tool(s) and confirm the policy path (${policyPath}) before running.\n`,
|
|
296
|
+
stderr: '',
|
|
297
|
+
};
|
|
298
|
+
}
|
|
147
299
|
export async function runCommand(argv) {
|
|
148
300
|
const [command, ...rest] = argv;
|
|
149
301
|
const { positional, flags } = parseArgs(rest);
|
|
@@ -156,6 +308,9 @@ export async function runCommand(argv) {
|
|
|
156
308
|
if (command === 'audit') {
|
|
157
309
|
return auditCommand(positional[0], flags);
|
|
158
310
|
}
|
|
311
|
+
if (command === 'init') {
|
|
312
|
+
return initCommand(positional[0], flags, process.cwd());
|
|
313
|
+
}
|
|
159
314
|
return { code: 2, stdout: '', stderr: `Unknown command "${command}".\n${USAGE}` };
|
|
160
315
|
}
|
|
161
316
|
async function main() {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CA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.1.2",
|
|
4
|
+
"description": "CLI for toolgovern -- validate policy files, audit local gate traces, and scaffold framework integration boilerplate.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/cli.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean": "rm -rf dist"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"toolgovern": "0.1.
|
|
29
|
+
"toolgovern": "0.1.1",
|
|
30
30
|
"yaml": "^2.6.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|