@idevelopers/agentlock 0.1.4 → 0.1.6

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.
@@ -8,14 +8,14 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "agentlock",
11
- "description": "Local permission firewall for AI coding agents and MCP tools",
11
+ "description": "Local permission firewall and audit guardrails for AI coding agents",
12
12
  "author": {
13
13
  "name": "iDevelopers"
14
14
  },
15
15
  "category": "development",
16
16
  "source": "./",
17
- "version": "0.1.4",
18
- "homepage": "https://www.npmjs.com/package/@idevelopers/agentlock"
17
+ "version": "0.1.6",
18
+ "homepage": "https://github.com/manish-1988/agentlock-installer#readme"
19
19
  }
20
20
  ]
21
21
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "agentlock",
3
- "version": "0.1.4",
4
- "description": "Local permission firewall for AI coding agents and MCP tools",
3
+ "version": "0.1.6",
4
+ "description": "Local permission firewall and audit guardrails for AI coding agents",
5
5
  "author": {
6
6
  "name": "iDevelopers",
7
7
  "url": "https://github.com/manish-1988"
8
8
  },
9
- "repository": "https://www.npmjs.com/package/@idevelopers/agentlock",
9
+ "repository": "https://github.com/manish-1988/agentlock-installer",
10
10
  "license": "MIT"
11
11
  }
package/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # AgentLock
2
2
 
3
- Stop AI coding agents from touching secrets, running unsafe commands, or overusing MCP tools without explicit policy.
3
+ Stop AI coding agents from touching secrets, running unsafe commands, or
4
+ overusing MCP tools without explicit policy.
4
5
 
5
- AgentLock is a local MCP server plus Claude Code and Codex plugin packaging. It gives each agent task a permission capsule for files, shell commands, secret reads, network egress, MCP tools, and actions that require approval.
6
+ AgentLock is a local MCP server plus Claude Code and Codex plugin packaging. It
7
+ gives each agent task a permission capsule for files, shell commands, secret
8
+ reads, network egress, MCP tools, and actions that require approval.
6
9
 
7
10
  ## Install
8
11
 
@@ -29,6 +32,34 @@ node dist/index.js
29
32
 
30
33
  Polar handles paid licenses; npm distributes the runtime package. The public installer repository contains only plugin metadata and points Claude/Codex at `npx -y @idevelopers/agentlock`.
31
34
 
35
+ ## First Useful Run
36
+
37
+ Start with a free local scan before giving an agent a broad task:
38
+
39
+ ```text
40
+ 1. Run agentlock_scan_environment.
41
+ 2. Generate a starter policy with agentlock_generate_policy.
42
+ 3. Save it as agentlock.policy.json.
43
+ 4. Use Pro checks before secret reads, deploys, package publishes, git pushes,
44
+ network egress, or broad MCP tool calls.
45
+ ```
46
+
47
+ The free path surfaces risky files and agent-accessible configuration without
48
+ printing secret values.
49
+
50
+ ## When Free Becomes Pro
51
+
52
+ Upgrade when a scan becomes active enforcement:
53
+
54
+ - check file, command, network, and MCP actions before they run
55
+ - execute shell commands through policy with `shell:false`
56
+ - require approval for publish, deploy, secret, and destructive actions
57
+ - keep a redacted local audit log for sensitive agent work
58
+ - prepare shared signed policies for future team usage
59
+
60
+ Free scanner and policy-generator responses include an `upgrade` block when they
61
+ find a risk surface or produce a policy that is ready for enforcement.
62
+
32
63
  ## Free, Pro, Team
33
64
 
34
65
  Free is the local AgentLock scanner and starter policy generator. The source repository remains private; the public installer repository only contains plugin metadata that points to the public npm runtime.
@@ -82,6 +113,15 @@ export AGENTLOCK_POLICY=agentlock.policy.example.json
82
113
  - `agentlock_audit_log`: Pro redacted local audit log.
83
114
  - `agentlock_activate_license`: store and verify a Polar license key.
84
115
 
116
+ ## Public Support
117
+
118
+ The source repository is private. Public installation metadata, support, and
119
+ issues live at:
120
+
121
+ ```text
122
+ https://github.com/manish-1988/agentlock-installer
123
+ ```
124
+
85
125
  ## License Activation
86
126
 
87
127
  AgentLock uses Polar license keys and caches successful validation in `~/.agentlock/license.json` with a 72-hour offline grace window for Pro and Team licenses.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentlock",
3
- "version": "0.1.4",
4
- "description": "Local permission firewall for AI coding agents and MCP tools",
3
+ "version": "0.1.6",
4
+ "description": "Local permission firewall and audit guardrails for AI coding agents",
5
5
  "author": "iDevelopers",
6
6
  "license": "MIT",
7
7
  "mcpServers": {
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { registerTools } from "./server.js";
5
5
  async function main() {
6
6
  const server = new McpServer({
7
7
  name: "agentlock",
8
- version: "0.1.4",
8
+ version: "0.1.5",
9
9
  });
10
10
  registerTools(server);
11
11
  const transport = new StdioServerTransport();
@@ -1,6 +1,6 @@
1
1
  import { AGENTLOCK_CHECKOUT_URL } from "./constants.js";
2
2
  export function requirePro(feature, tier) {
3
3
  if (tier === "free") {
4
- throw new Error(`Pro license required: ${feature}. Buy a license at ${process.env.AGENTLOCK_CHECKOUT_URL ?? AGENTLOCK_CHECKOUT_URL}, then activate it with agentlock_activate_license.`);
4
+ throw new Error(`AgentLock Pro required for ${feature}. Pro unlocks policy decisions, guarded command execution, and redacted audit logs for AI-agent work. Buy a license at ${process.env.AGENTLOCK_CHECKOUT_URL ?? AGENTLOCK_CHECKOUT_URL}, then activate it with agentlock_activate_license.`);
5
5
  }
6
6
  }
@@ -19,6 +19,9 @@ export function registerActivateLicenseTool(server) {
19
19
  checkoutUrl: verification.tier === "free"
20
20
  ? process.env.AGENTLOCK_CHECKOUT_URL ?? AGENTLOCK_CHECKOUT_URL
21
21
  : undefined,
22
+ nextStep: verification.tier === "free"
23
+ ? "This key did not unlock Pro or Team. Recheck the key, then buy or open the Polar checkout if needed."
24
+ : "License active. Run agentlock_check_action or agentlock_run_guarded_command before sensitive agent work.",
22
25
  });
23
26
  });
24
27
  }
@@ -1,6 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { generatePolicy } from "../enforcement/generate_policy.js";
3
+ import { PolarLicenseValidator } from "../license/validator.js";
3
4
  import { jsonToolResult } from "./response.js";
5
+ import { agentLockUpgradePrompt } from "./upgrade.js";
4
6
  const generatePolicyInputSchema = {
5
7
  mode: z.enum(["strict", "balanced", "relaxed"]).default("balanced"),
6
8
  };
@@ -10,10 +12,14 @@ export function registerGeneratePolicyTool(server) {
10
12
  description: "Generate a starter agentlock.policy.json permission capsule.",
11
13
  inputSchema: generatePolicyInputSchema,
12
14
  }, async ({ mode }) => {
15
+ const license = await new PolarLicenseValidator().verify();
13
16
  const policy = generatePolicy({ mode: mode });
14
17
  return jsonToolResult({
18
+ tier: license.tier,
15
19
  recommendedPath: "agentlock.policy.json",
16
20
  policy,
21
+ nextStep: "Save this policy, then use Pro checks when an agent wants to read secrets, publish packages, push code, deploy, or call broad MCP tools.",
22
+ upgrade: agentLockUpgradePrompt(`Generated a ${mode} policy capsule with ${policy.capsules[0]?.approvalRequired.length ?? 0} approval categories.`, license.tier),
17
23
  });
18
24
  });
19
25
  }
@@ -1,6 +1,8 @@
1
1
  import { z } from "zod";
2
+ import { PolarLicenseValidator } from "../license/validator.js";
2
3
  import { scanEnvironment } from "../scan/environment.js";
3
4
  import { jsonToolResult } from "./response.js";
5
+ import { agentLockUpgradePrompt } from "./upgrade.js";
4
6
  const scanEnvironmentInputSchema = {
5
7
  root: z.string().min(1).optional(),
6
8
  includeHome: z.boolean().default(true),
@@ -11,6 +13,17 @@ export function registerScanEnvironmentTool(server) {
11
13
  description: "Scan local AI-agent, MCP, and secret-adjacent surfaces without printing secret values.",
12
14
  inputSchema: scanEnvironmentInputSchema,
13
15
  }, async ({ root, includeHome }) => {
14
- return jsonToolResult(await scanEnvironment(root ?? process.cwd(), includeHome));
16
+ const license = await new PolarLicenseValidator().verify();
17
+ const scan = await scanEnvironment(root ?? process.cwd(), includeHome);
18
+ return jsonToolResult({
19
+ ...scan,
20
+ tier: license.tier,
21
+ nextStep: scan.riskCount > 0
22
+ ? "Create agentlock.policy.json from agentlock_generate_policy, then enforce it before sensitive agent actions."
23
+ : "No immediate risk surfaces were found. Generate a policy now so the next agent task starts with a boundary.",
24
+ upgrade: agentLockUpgradePrompt(scan.riskCount > 0
25
+ ? `Scan found ${scan.riskCount} agent-accessible risk surfaces.`
26
+ : "The free scan is clean; Pro keeps future agent actions inside policy before they run.", license.tier),
27
+ });
15
28
  });
16
29
  }
@@ -0,0 +1,19 @@
1
+ import { AGENTLOCK_CHECKOUT_URL } from "../license/constants.js";
2
+ export function agentLockUpgradePrompt(trigger, tier) {
3
+ if (tier !== "free") {
4
+ return undefined;
5
+ }
6
+ return {
7
+ product: "AgentLock Pro",
8
+ trigger,
9
+ checkoutUrl: process.env.AGENTLOCK_CHECKOUT_URL ?? AGENTLOCK_CHECKOUT_URL,
10
+ activationTool: "agentlock_activate_license",
11
+ value: "Turn a one-time risk scan into enforceable local policy: every risky command, file read, network call, and MCP action gets checked and logged before the agent proceeds.",
12
+ unlocks: [
13
+ "Evaluate actions against agentlock.policy.json with agentlock_check_action.",
14
+ "Run shell commands through policy enforcement with agentlock_run_guarded_command.",
15
+ "Keep a redacted local audit log for sensitive agent work.",
16
+ "Use Team later for shared signed policies and seat-based controls.",
17
+ ],
18
+ };
19
+ }
@@ -0,0 +1,133 @@
1
+ # AgentLock Conversion Launch Kit
2
+
3
+ Use this as the public launch and directory-submission source for AgentLock.
4
+
5
+ ## Landing Page Copy
6
+
7
+ Headline:
8
+
9
+ ```text
10
+ AgentLock
11
+ ```
12
+
13
+ Subhead:
14
+
15
+ ```text
16
+ A local permission firewall for AI coding agents before they read secrets, run
17
+ dangerous commands, deploy, publish, push, or call broad MCP tools.
18
+ ```
19
+
20
+ Hero CTA:
21
+
22
+ ```text
23
+ Install free: claude mcp add agentlock -- npx -y @idevelopers/agentlock
24
+ Upgrade: https://buy.polar.sh/polar_cl_exvU3F3ZTpiDvwBXIRqrMf30T1kBTsLxyx26B4SCkUz
25
+ ```
26
+
27
+ Value proof:
28
+
29
+ ```text
30
+ AgentLock scans a repo and home environment for agent-accessible risk surfaces,
31
+ then generates a local permission policy. Free users can discover risk and create
32
+ a starter policy. Pro enforces that policy before file reads, shell commands,
33
+ network egress, package publishes, git pushes, deploys, and MCP tool calls.
34
+ ```
35
+
36
+ ## Demo Script
37
+
38
+ ```text
39
+ 1. Install AgentLock from npm.
40
+ 2. Run agentlock_scan_environment in a real repo.
41
+ 3. Show secret-adjacent file paths without printing secret values.
42
+ 4. Generate agentlock.policy.json with agentlock_generate_policy.
43
+ 5. Attempt a risky command through agentlock_check_action.
44
+ 6. Show the Pro-required upgrade message for enforcement.
45
+ 7. Activate a Pro key and rerun the check.
46
+ 8. Show allow, block, or needs_approval with a redacted audit trail.
47
+ ```
48
+
49
+ Screenshot checklist:
50
+
51
+ ```text
52
+ - npm package page showing install command and checkout link
53
+ - free scan result with riskCount and redacted paths
54
+ - generated policy snippet
55
+ - Pro-required check_action output
56
+ - Polar checkout page
57
+ - activated Pro check returning a policy decision
58
+ ```
59
+
60
+ ## Directory Submission
61
+
62
+ Title:
63
+
64
+ ```text
65
+ AgentLock
66
+ ```
67
+
68
+ Tagline:
69
+
70
+ ```text
71
+ Local permission firewall for AI coding agents and MCP tools.
72
+ ```
73
+
74
+ Short description:
75
+
76
+ ```text
77
+ AgentLock scans agent-accessible risk surfaces, generates local permission
78
+ capsules, and enforces policy before an AI coding agent reads secrets, runs
79
+ commands, publishes packages, pushes code, deploys, or calls broad MCP tools.
80
+ ```
81
+
82
+ Category:
83
+
84
+ ```text
85
+ Developer tools, MCP, security, AI coding, agent permissions
86
+ ```
87
+
88
+ Pricing:
89
+
90
+ ```text
91
+ Free scanner and policy generator. Pro unlocks action checks, guarded command
92
+ execution, and redacted local audit logs.
93
+ ```
94
+
95
+ ## Launch Posts
96
+
97
+ Short post:
98
+
99
+ ```text
100
+ Launched AgentLock for AI coding agents.
101
+
102
+ Free: scan a repo for secret-adjacent agent risk and generate a starter policy.
103
+ Pro: enforce the policy before file reads, commands, network calls, package
104
+ publishes, git pushes, deploys, and broad MCP tool calls.
105
+
106
+ npm: @idevelopers/agentlock
107
+ ```
108
+
109
+ Founder/dev post:
110
+
111
+ ```text
112
+ AI coding agents are powerful, but local permission boundaries are still too
113
+ easy to blur.
114
+
115
+ AgentLock adds a local policy layer: scan the environment, generate a permission
116
+ capsule, then check or guard risky actions before they run.
117
+
118
+ Free helps you see the risk. Pro helps you enforce the policy.
119
+ ```
120
+
121
+ ## Conversion Rule
122
+
123
+ Show Pro when the user sees a concrete risk or policy:
124
+
125
+ ```text
126
+ - after a scan finds secret-adjacent files or risky scripts
127
+ - after a policy is generated
128
+ - when the agent wants to read secrets
129
+ - when the agent wants to publish, deploy, push, or run destructive commands
130
+ - when an audit trail would help the user trust the agent session
131
+ ```
132
+
133
+ The product should make users feel protected, not blocked for no reason.
@@ -77,7 +77,7 @@ Validation results:
77
77
 
78
78
  ## Enterprise Readiness Hardening
79
79
 
80
- Completed on 2026-08-29 and published as public npm version `0.1.4`:
80
+ Completed on 2026-08-29 and published as public npm version `0.1.5`:
81
81
 
82
82
  - added `SECURITY.md`
83
83
  - added `docs/THREAT_MODEL.md`
@@ -89,7 +89,7 @@ Completed on 2026-08-29 and published as public npm version `0.1.4`:
89
89
  - added `npm run smoke:public`
90
90
  - updated the public package tarball to include the security and readiness docs
91
91
  - refreshed dependencies and confirmed `npm audit` reports 0 vulnerabilities
92
- - confirmed `@idevelopers/agentlock@latest` resolves to `0.1.4`
92
+ - confirmed `@idevelopers/agentlock@latest` resolves to `0.1.5`
93
93
  - confirmed public npm smoke against `@idevelopers/agentlock@latest`
94
94
 
95
95
  ## Validation Checklist
@@ -122,14 +122,29 @@ Sandbox payment:
122
122
  Live payment:
123
123
 
124
124
  1. Create AgentLock live product and checkout. Completed 2026-08-29.
125
- 2. Publish `@idevelopers/agentlock`. Completed 2026-08-29 with version `0.1.2`; hardening docs and CI published as `0.1.4`.
126
- 3. Install from a clean temp environment. Completed 2026-08-29 against public npm versions `0.1.2`, `0.1.3`, and `0.1.4`.
125
+ 2. Publish `@idevelopers/agentlock`. Completed 2026-08-29 with version `0.1.2`; hardening docs and CI published as `0.1.5`.
126
+ 3. Install from a clean temp environment. Completed 2026-08-29 against public npm versions `0.1.2`, `0.1.3`, `0.1.4`, and `0.1.5`.
127
127
  4. Buy the lowest paid recurring tier with a real test purchase. Completed 2026-08-29.
128
128
  5. Activate the issued key locally without pasting it into chat or docs. Completed 2026-08-29.
129
129
  6. Confirm Pro behavior works from public npm. Completed 2026-08-29.
130
130
  7. Confirm a fresh unlicensed temp HOME blocks Pro tools. Completed 2026-08-29.
131
131
  8. Cancel subscription, refund order, revoke benefit, and validate the refunded key no longer unlocks Pro. Completed 2026-08-29.
132
132
 
133
+ ## Conversion Polish
134
+
135
+ Completed on 2026-08-29 for version `0.1.5`:
136
+
137
+ - npm package metadata includes homepage, public installer repository,
138
+ support/issues URL, funding URL, richer keywords, and packaged docs.
139
+ - Free scanner and policy-generator responses include contextual upgrade blocks
140
+ after a risk scan or generated policy.
141
+ - Pro-required errors explain the concrete paid value before showing the Polar
142
+ checkout URL.
143
+ - Public installer copy now clearly distinguishes free scanner/policy generation
144
+ from Pro enforcement and audit logging.
145
+ - `docs/CONVERSION_LAUNCH_KIT.md` contains landing copy, demo script, screenshot
146
+ checklist, directory-submission fields, and launch posts.
147
+
133
148
  ## Security Notes
134
149
 
135
150
  - Never commit license keys, npm tokens, Polar server tokens, card details, OTPs, or private API keys.
@@ -45,4 +45,4 @@ AgentLock protects local developer workflows where AI coding agents can request
45
45
 
46
46
  ## Validation Evidence
47
47
 
48
- The production runbook records the live purchase, Pro activation, public npm smoke, refund, subscription cancellation, and revoked-license validation for AgentLock `0.1.2`. The enterprise-readiness docs, CI matrix, audit gate, and public smoke script are published in AgentLock `0.1.4`.
48
+ The production runbook records the live purchase, Pro activation, public npm smoke, refund, subscription cancellation, and revoked-license validation for AgentLock `0.1.2`. The enterprise-readiness docs, CI matrix, audit gate, and public smoke script are published in AgentLock `0.1.5`.
package/package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "name": "@idevelopers/agentlock",
3
- "version": "0.1.4",
4
- "description": "Local permission firewall for AI coding agents and MCP tools.",
3
+ "version": "0.1.6",
4
+ "description": "Local permission firewall, policy checks, and audit guardrails for AI coding agents.",
5
5
  "type": "module",
6
+ "author": "iDevelopers <tech@idevelopers.in>",
7
+ "homepage": "https://github.com/manish-1988/agentlock-installer#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/manish-1988/agentlock-installer.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/manish-1988/agentlock-installer/issues"
14
+ },
15
+ "funding": {
16
+ "type": "polar",
17
+ "url": "https://buy.polar.sh/polar_cl_exvU3F3ZTpiDvwBXIRqrMf30T1kBTsLxyx26B4SCkUz"
18
+ },
6
19
  "bin": {
7
20
  "agentlock": "dist/index.js"
8
21
  },
@@ -19,6 +32,7 @@
19
32
  "README.md",
20
33
  "SECURITY.md",
21
34
  "docs",
35
+ "scripts/public-package-smoke.mjs",
22
36
  "agentlock.policy.example.json",
23
37
  ".mcp.json",
24
38
  ".claude-plugin",
@@ -28,11 +42,17 @@
28
42
  ],
29
43
  "keywords": [
30
44
  "mcp",
45
+ "mcp-server",
31
46
  "codex",
32
47
  "claude-code",
33
48
  "agents",
49
+ "ai-agents",
50
+ "agentic-coding",
34
51
  "security",
35
- "firewall"
52
+ "firewall",
53
+ "permissions",
54
+ "policy",
55
+ "audit-log"
36
56
  ],
37
57
  "license": "MIT",
38
58
  "publishConfig": {
@@ -46,7 +66,7 @@
46
66
  "devDependencies": {
47
67
  "@types/node": "^20.19.1",
48
68
  "typescript": "^5.8.3",
49
- "vitest": "^3.2.4"
69
+ "vitest": "^4.1.11"
50
70
  },
51
71
  "engines": {
52
72
  "node": ">=20"
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env node
2
+ import { mkdtemp, rm } from "node:fs/promises";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import { spawn } from "node:child_process";
6
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
7
+ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
8
+
9
+ const packageSpec = process.argv[2] ?? "@idevelopers/agentlock@latest";
10
+ const npmCli = process.env.npm_execpath;
11
+ const installDir = await mkdtemp(path.join(os.tmpdir(), "agentlock-smoke-install-"));
12
+ const homeDir = await mkdtemp(path.join(os.tmpdir(), "agentlock-smoke-home-"));
13
+
14
+ try {
15
+ await runNpm(["install", "--prefix", installDir, packageSpec, "--prefer-online"]);
16
+
17
+ const client = new Client({ name: "agentlock-public-smoke", version: "0.0.0" });
18
+ const agentlockEntrypoint = path.join(
19
+ installDir,
20
+ "node_modules",
21
+ "@idevelopers",
22
+ "agentlock",
23
+ "dist",
24
+ "index.js",
25
+ );
26
+ const transport = new StdioClientTransport({
27
+ command: process.execPath,
28
+ args: [agentlockEntrypoint],
29
+ env: {
30
+ ...process.env,
31
+ HOME: homeDir,
32
+ USERPROFILE: homeDir,
33
+ },
34
+ });
35
+
36
+ await client.connect(transport);
37
+ try {
38
+ const tools = await client.listTools();
39
+ const toolNames = tools.tools.map((tool) => tool.name).sort();
40
+ assertIncludes(toolNames, "agentlock_scan_environment");
41
+ assertIncludes(toolNames, "agentlock_generate_policy");
42
+ assertIncludes(toolNames, "agentlock_check_action");
43
+ assertIncludes(toolNames, "agentlock_run_guarded_command");
44
+ assertIncludes(toolNames, "agentlock_audit_log");
45
+ assertIncludes(toolNames, "agentlock_activate_license");
46
+
47
+ const scan = await client.callTool({
48
+ name: "agentlock_scan_environment",
49
+ arguments: {},
50
+ });
51
+ if (scan.isError) {
52
+ throw new Error("agentlock_scan_environment returned an error");
53
+ }
54
+
55
+ const policy = await client.callTool({
56
+ name: "agentlock_generate_policy",
57
+ arguments: {},
58
+ });
59
+ if (policy.isError) {
60
+ throw new Error("agentlock_generate_policy returned an error");
61
+ }
62
+
63
+ const proGate = await client.callTool({
64
+ name: "agentlock_check_action",
65
+ arguments: {
66
+ type: "command",
67
+ command: "node",
68
+ args: [],
69
+ },
70
+ });
71
+ const proGateText = proGate.content?.[0]?.text ?? "";
72
+ if (!proGate.isError || !/Pro license required/.test(proGateText) || !/buy\.polar\.sh/.test(proGateText)) {
73
+ throw new Error("unlicensed Pro gate did not block with checkout guidance");
74
+ }
75
+
76
+ console.log(
77
+ JSON.stringify(
78
+ {
79
+ packageSpec,
80
+ platform: process.platform,
81
+ node: process.version,
82
+ toolCount: toolNames.length,
83
+ freeToolsOk: true,
84
+ unlicensedProGateOk: true,
85
+ },
86
+ null,
87
+ 2,
88
+ ),
89
+ );
90
+ } finally {
91
+ await client.close();
92
+ }
93
+ } finally {
94
+ await rm(installDir, { force: true, recursive: true });
95
+ await rm(homeDir, { force: true, recursive: true });
96
+ }
97
+
98
+ function assertIncludes(values, expected) {
99
+ if (!values.includes(expected)) {
100
+ throw new Error(`Missing expected tool: ${expected}`);
101
+ }
102
+ }
103
+
104
+ function runNpm(args) {
105
+ if (npmCli) {
106
+ return run(process.execPath, [npmCli, ...args]);
107
+ }
108
+
109
+ const command = process.platform === "win32" ? "npm.cmd" : "npm";
110
+ return run(command, args, { shell: process.platform === "win32" });
111
+ }
112
+
113
+ function run(command, args, options = {}) {
114
+ return new Promise((resolve, reject) => {
115
+ const child = spawn(command, args, {
116
+ stdio: "inherit",
117
+ shell: options.shell ?? false,
118
+ });
119
+ child.on("error", reject);
120
+ child.on("close", (code) => {
121
+ if (code === 0) {
122
+ resolve();
123
+ return;
124
+ }
125
+ reject(new Error(`${command} ${args.join(" ")} exited with ${code}`));
126
+ });
127
+ });
128
+ }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agentlock-workflow
3
3
  description: Use when running AI coding work under AgentLock permission capsules, secret-safe scans, command checks, or guarded command execution.
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  ---
6
6
 
7
7
  # AgentLock Workflow