@idevelopers/agentgate 0.1.0 → 0.1.1
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +3 -3
- package/README.md +57 -4
- package/codex-plugin/plugin.json +2 -2
- package/dist/index.js +1 -1
- package/dist/license/gate.js +1 -1
- package/dist/tools/activate_license.js +3 -0
- package/dist/tools/budget_status.js +7 -0
- package/dist/tools/run_gate.js +9 -0
- package/dist/tools/upgrade.js +35 -0
- package/docs/CONVERSION_LAUNCH_KIT.md +143 -0
- package/docs/PRODUCTION_REPLICATION_PLAYBOOK.md +659 -0
- package/package.json +24 -4
- package/skills/agentgate-workflow/SKILL.md +1 -1
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
10
10
|
"name": "agentgate",
|
|
11
|
-
"description": "Validation gates
|
|
11
|
+
"description": "Validation gates and token-budget 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.
|
|
18
|
-
"homepage": "https://
|
|
17
|
+
"version": "0.1.1",
|
|
18
|
+
"homepage": "https://github.com/manish-1988/agentgate-installer#readme"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgate",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Validation gates
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Validation gates and token-budget 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://
|
|
9
|
+
"repository": "https://github.com/manish-1988/agentgate-installer",
|
|
10
10
|
"license": "MIT"
|
|
11
11
|
}
|
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# AgentGate
|
|
2
2
|
|
|
3
|
-
Stop
|
|
3
|
+
Stop AI coding agents from burning tokens and marking broken code as done.
|
|
4
4
|
|
|
5
|
-
AgentGate is
|
|
5
|
+
AgentGate is a local MCP server plus Claude Code and Codex plugin packaging. It
|
|
6
|
+
wraps agent work in explicit slices, runs real validation gates, blocks done
|
|
7
|
+
status while gates fail, and adds Pro guardrails for multi-slice plans, token
|
|
8
|
+
budgets, advanced gates, bounded retries, and analytics.
|
|
6
9
|
|
|
7
10
|
## Install
|
|
8
11
|
|
|
@@ -29,8 +32,38 @@ 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/agentgate`.
|
|
31
34
|
|
|
35
|
+
## First Useful Run
|
|
36
|
+
|
|
37
|
+
AgentGate is most useful when an agent is about to claim a task is finished.
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
1. Add agentgate.config.json to the repo.
|
|
41
|
+
2. Define one focused slice with agentgate_define_slice.
|
|
42
|
+
3. Run agentgate_run_gate before accepting "done".
|
|
43
|
+
4. Keep the task open until every returned gate is green.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The free path proves the value locally: one slice, real command output, no
|
|
47
|
+
source upload, and no payment required.
|
|
48
|
+
|
|
49
|
+
## When Free Becomes Pro
|
|
50
|
+
|
|
51
|
+
Upgrade when the same workflow needs to run unattended across a full plan:
|
|
52
|
+
|
|
53
|
+
- multi-slice dependency order
|
|
54
|
+
- bounded retries after gate failures
|
|
55
|
+
- typecheck, build, custom, and Pro-only gates
|
|
56
|
+
- token-budget stop signals
|
|
57
|
+
- validation analytics for team or client handoff
|
|
58
|
+
|
|
59
|
+
Free tool responses include an `upgrade` block only at relevant moments, such as
|
|
60
|
+
after a passing free gate or when a repo already has Pro-ready slices, budgets,
|
|
61
|
+
or advanced gates configured.
|
|
62
|
+
|
|
32
63
|
## Free, Pro, Team
|
|
33
64
|
|
|
65
|
+
Free is the local AgentGate runtime distributed through public npm. The source repository remains private; the public installer repository only contains plugin metadata that points to `npx -y @idevelopers/agentgate`.
|
|
66
|
+
|
|
34
67
|
| Capability | Free | Pro | Team |
|
|
35
68
|
| --- | --- | --- | --- |
|
|
36
69
|
| Single-slice run + basic gates | Yes | Yes | Yes |
|
|
@@ -40,8 +73,8 @@ Polar handles paid licenses; npm distributes the runtime package. The public ins
|
|
|
40
73
|
| Run analytics export | No | Yes | Yes |
|
|
41
74
|
| Shared policies and seats | No | No | Yes |
|
|
42
75
|
|
|
43
|
-
Pro is
|
|
44
|
-
Buy Pro or Team through the live Polar checkout:
|
|
76
|
+
Pro is priced at INR 1,599/month or INR 15,999/year. Team is priced at INR
|
|
77
|
+
4,199/month with seats. Buy Pro or Team through the live Polar checkout:
|
|
45
78
|
|
|
46
79
|
```text
|
|
47
80
|
https://buy.polar.sh/polar_cl_VxlhG8lCO6IUcLcveJ51YOXYXMHWdUNorKr0U1bhyqm
|
|
@@ -88,6 +121,15 @@ export AGENTGATE_CONFIG=agentgate.config.example.json
|
|
|
88
121
|
- `agentgate_budget_status`: report token usage, remaining budget, estimated cost, and state.
|
|
89
122
|
- `agentgate_activate_license`: store and verify a Polar license key.
|
|
90
123
|
|
|
124
|
+
## Public Support
|
|
125
|
+
|
|
126
|
+
The source repository is private. Public installation metadata, support, and
|
|
127
|
+
issues live at:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
https://github.com/manish-1988/agentgate-installer
|
|
131
|
+
```
|
|
132
|
+
|
|
91
133
|
## License Activation
|
|
92
134
|
|
|
93
135
|
AgentGate ships with the public Polar organization id for production license validation:
|
|
@@ -118,9 +160,20 @@ Soft-launch validation was completed on 2026-06-11:
|
|
|
118
160
|
- Dogfood runs passed against AgentGate, Shipnote, PocketScan, and the mushroom tracker syntax check.
|
|
119
161
|
- The live Polar finance page showed account approval complete, payout account setup complete, and identity verification complete.
|
|
120
162
|
- A production free smoke checkout issued a live Pro license key and AgentGate activated it successfully.
|
|
163
|
+
- A live paid Pro Monthly purchase was validated end-to-end through public npm, then immediately canceled/refunded; the Polar benefit grant was revoked and the refunded license no longer validated.
|
|
121
164
|
|
|
122
165
|
Current distribution model: private source repository, public npm package, public installer marketplace, and Polar license monetization.
|
|
123
166
|
|
|
167
|
+
## Production Runbook
|
|
168
|
+
|
|
169
|
+
For the full operator handoff and reusable blueprint for future Polar + npm paid developer tools, see:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
docs/PRODUCTION_REPLICATION_PLAYBOOK.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
That guide records the private-source/public-npm/public-installer pattern, Polar setup, npm publishing, sandbox and live payment validation, refund/cancel cleanup, and the reusable Codex/Claude Code prompt for building similar apps.
|
|
176
|
+
|
|
124
177
|
## Security
|
|
125
178
|
|
|
126
179
|
AgentGate runs locally and does not send repo contents to an AgentGate server. It does spawn the commands listed in `agentgate.config.json`, using `child_process.spawn` with `shell:false`. Treat the config like a CI file: review it before running, and only run trusted gate commands.
|
package/codex-plugin/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentgate",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Validation gates
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Validation gates and token-budget guardrails for AI coding agents",
|
|
5
5
|
"author": "iDevelopers",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"mcpServers": {
|
package/dist/index.js
CHANGED
package/dist/license/gate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AGENTGATE_CHECKOUT_URL } from "./constants.js";
|
|
2
2
|
export function requirePro(feature, tier) {
|
|
3
3
|
if (tier === "free") {
|
|
4
|
-
throw new Error(`Pro
|
|
4
|
+
throw new Error(`AgentGate Pro required for ${feature}. Pro unlocks multi-slice plan execution, typecheck/build/custom gates, token-budget stops, and analytics export. Buy a license at ${AGENTGATE_CHECKOUT_URL}, then activate it with agentgate_activate_license.`);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
@@ -17,6 +17,9 @@ export function registerActivateLicenseTool(server) {
|
|
|
17
17
|
tier: verification.tier,
|
|
18
18
|
validUntil: verification.validUntil,
|
|
19
19
|
checkoutUrl: verification.tier === "free" ? AGENTGATE_CHECKOUT_URL : undefined,
|
|
20
|
+
nextStep: verification.tier === "free"
|
|
21
|
+
? "This key did not unlock Pro or Team. Recheck the key, then buy or open the Polar checkout if needed."
|
|
22
|
+
: "License active. Run agentgate_run_plan to validate a full multi-slice agent handoff.",
|
|
20
23
|
});
|
|
21
24
|
});
|
|
22
25
|
}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import { loadConfig } from "../config/loader.js";
|
|
2
|
+
import { PolarLicenseValidator } from "../license/validator.js";
|
|
2
3
|
import { estimateCostUsd } from "../util/cost.js";
|
|
3
4
|
import { jsonToolResult } from "./response.js";
|
|
4
5
|
import { activeTokenLedger } from "./runtime.js";
|
|
6
|
+
import { agentGateUpgradePrompt } from "./upgrade.js";
|
|
5
7
|
export function registerBudgetStatusTool(server) {
|
|
6
8
|
server.registerTool("agentgate_budget_status", {
|
|
7
9
|
title: "AgentGate Budget Status",
|
|
8
10
|
description: "Report token usage, estimated cost, and budget state.",
|
|
9
11
|
}, async () => {
|
|
10
12
|
const config = await loadConfig(process.cwd());
|
|
13
|
+
const license = await new PolarLicenseValidator().verify();
|
|
11
14
|
const tokensUsed = activeTokenLedger.used();
|
|
12
15
|
if (!config.budget) {
|
|
13
16
|
return jsonToolResult({
|
|
17
|
+
tier: license.tier,
|
|
14
18
|
tokensUsed,
|
|
15
19
|
maxTokens: null,
|
|
16
20
|
remaining: null,
|
|
17
21
|
costUsd: 0,
|
|
18
22
|
model: null,
|
|
19
23
|
state: "ok",
|
|
24
|
+
upgrade: agentGateUpgradePrompt("Add a budget block to show agents their token ceiling before they start drifting.", license.tier),
|
|
20
25
|
});
|
|
21
26
|
}
|
|
22
27
|
return jsonToolResult({
|
|
28
|
+
tier: license.tier,
|
|
23
29
|
tokensUsed,
|
|
24
30
|
maxTokens: config.budget.maxTokens,
|
|
25
31
|
remaining: activeTokenLedger.remaining(config.budget.maxTokens),
|
|
26
32
|
costUsd: estimateCostUsd(tokensUsed, config.budget.model),
|
|
27
33
|
model: config.budget.model,
|
|
28
34
|
state: activeTokenLedger.check(config.budget),
|
|
35
|
+
upgrade: agentGateUpgradePrompt(`Budget tracking is configured for ${config.budget.maxTokens.toLocaleString()} tokens.`, license.tier),
|
|
29
36
|
});
|
|
30
37
|
});
|
|
31
38
|
}
|
package/dist/tools/run_gate.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Orchestrator } from "../orchestrator/orchestrator.js";
|
|
|
5
5
|
import { loadRuntimeConfig } from "./config.js";
|
|
6
6
|
import { jsonToolResult } from "./response.js";
|
|
7
7
|
import { activeRunId, activeTokenLedger } from "./runtime.js";
|
|
8
|
+
import { agentGateUpgradePrompt, freePlanSignals } from "./upgrade.js";
|
|
8
9
|
const runGateInputSchema = {
|
|
9
10
|
sliceId: z.string().min(1),
|
|
10
11
|
};
|
|
@@ -18,9 +19,17 @@ export function registerRunGateTool(server) {
|
|
|
18
19
|
const license = await new PolarLicenseValidator().verify();
|
|
19
20
|
const orchestrator = new Orchestrator(config, new GateRunner(), activeTokenLedger, license.tier, activeRunId);
|
|
20
21
|
const result = await orchestrator.runSlice(sliceId);
|
|
22
|
+
const signals = freePlanSignals(config);
|
|
21
23
|
return jsonToolResult({
|
|
24
|
+
tier: license.tier,
|
|
22
25
|
passed: result.passed,
|
|
23
26
|
gateResults: result.gateResults,
|
|
27
|
+
nextStep: result.passed
|
|
28
|
+
? "This slice passed. Keep the free path for one-off checks, or use Pro when you want AgentGate to run the whole plan without losing the thread."
|
|
29
|
+
: "Fix the failed gate output, rerun this slice, and keep done status blocked until the gate is green.",
|
|
30
|
+
upgrade: agentGateUpgradePrompt(signals.length > 0
|
|
31
|
+
? `This repo already has ${signals.join(", ")} ready for Pro orchestration.`
|
|
32
|
+
: "This free slice passed; Pro turns repeated slice checks into one managed plan run.", license.tier),
|
|
24
33
|
});
|
|
25
34
|
});
|
|
26
35
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AGENTGATE_CHECKOUT_URL } from "../license/constants.js";
|
|
2
|
+
export function agentGateUpgradePrompt(trigger, tier) {
|
|
3
|
+
if (tier !== "free") {
|
|
4
|
+
return undefined;
|
|
5
|
+
}
|
|
6
|
+
return {
|
|
7
|
+
product: "AgentGate Pro",
|
|
8
|
+
trigger,
|
|
9
|
+
checkoutUrl: AGENTGATE_CHECKOUT_URL,
|
|
10
|
+
activationTool: "agentgate_activate_license",
|
|
11
|
+
value: "Turn a single passing gate into a complete agent handoff: dependency-ordered slices, bounded retries, advanced gates, token-budget stops, and analytics export.",
|
|
12
|
+
unlocks: [
|
|
13
|
+
"Run the full multi-slice plan with agentgate_run_plan.",
|
|
14
|
+
"Use typecheck, build, custom, and explicitly Pro-only gates.",
|
|
15
|
+
"Stop runaway agent sessions with token-budget guardrails.",
|
|
16
|
+
"Export validation analytics for client or team handoff.",
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function freePlanSignals(config) {
|
|
21
|
+
const signals = [];
|
|
22
|
+
if (config.slices.length > 1) {
|
|
23
|
+
signals.push(`${config.slices.length} configured slices`);
|
|
24
|
+
}
|
|
25
|
+
if (config.budget) {
|
|
26
|
+
signals.push(`token budget of ${config.budget.maxTokens.toLocaleString()} tokens`);
|
|
27
|
+
}
|
|
28
|
+
if (config.gates.some((gate) => gate.proOnly === true ||
|
|
29
|
+
gate.type === "typecheck" ||
|
|
30
|
+
gate.type === "build" ||
|
|
31
|
+
gate.type === "custom")) {
|
|
32
|
+
signals.push("advanced validation gates");
|
|
33
|
+
}
|
|
34
|
+
return signals;
|
|
35
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# AgentGate Conversion Launch Kit
|
|
2
|
+
|
|
3
|
+
Use this as the public launch and directory-submission source for AgentGate.
|
|
4
|
+
|
|
5
|
+
## Landing Page Copy
|
|
6
|
+
|
|
7
|
+
Headline:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
AgentGate
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Subhead:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Validation gates and token-budget guardrails for AI coding agents that want to
|
|
17
|
+
mark broken work as done.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Hero CTA:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Install free: claude mcp add agentgate -- npx -y @idevelopers/agentgate
|
|
24
|
+
Upgrade: https://buy.polar.sh/polar_cl_VxlhG8lCO6IUcLcveJ51YOXYXMHWdUNorKr0U1bhyqm
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Value proof:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
AgentGate wraps agent work in explicit slices, runs real tests and build checks,
|
|
31
|
+
and blocks "done" until gates pass. Free users can validate one slice locally.
|
|
32
|
+
Pro turns the same workflow into a managed multi-slice plan with bounded retries,
|
|
33
|
+
advanced gates, token budgets, and analytics export.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Demo Script
|
|
37
|
+
|
|
38
|
+
Use this for screenshots, GIFs, launch videos, and directory descriptions.
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
1. Install AgentGate from npm.
|
|
42
|
+
2. Add agentgate.config.json with a test gate and one slice.
|
|
43
|
+
3. Ask the agent to implement a small change.
|
|
44
|
+
4. Run agentgate_run_gate for the slice.
|
|
45
|
+
5. Show a failed gate blocking done status.
|
|
46
|
+
6. Fix the code.
|
|
47
|
+
7. Run agentgate_run_gate again and show a passing slice.
|
|
48
|
+
8. Show the upgrade block explaining that Pro can run the entire multi-slice
|
|
49
|
+
plan with retries, advanced gates, budgets, and analytics.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Screenshot checklist:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
- npm package page showing install command and checkout link
|
|
56
|
+
- first failing gate output
|
|
57
|
+
- second passing gate output
|
|
58
|
+
- free response upgrade block
|
|
59
|
+
- Polar checkout page with Pro Monthly and Pro Annual
|
|
60
|
+
- license activation success with tier=pro
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Directory Submission
|
|
64
|
+
|
|
65
|
+
Title:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
AgentGate
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Tagline:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
Stop AI coding agents from claiming done before validation passes.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Short description:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
AgentGate is a local MCP server for Codex, Claude Code, and agentic coding
|
|
81
|
+
workflows. It splits work into explicit slices, runs validation gates, tracks
|
|
82
|
+
token budgets, and blocks completion until tests, typecheck, build, or custom
|
|
83
|
+
checks pass.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Category:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
Developer tools, MCP, AI coding, CI, agent guardrails
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Pricing:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Free local single-slice validation. Pro unlocks multi-slice plans, bounded
|
|
96
|
+
retries, advanced gates, token-budget guardrails, and analytics.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Launch Posts
|
|
100
|
+
|
|
101
|
+
Short post:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
Launched AgentGate for AI coding agents.
|
|
105
|
+
|
|
106
|
+
It is a local MCP runtime that makes agents prove work is done: define a slice,
|
|
107
|
+
run gates, block completion until validation passes.
|
|
108
|
+
|
|
109
|
+
Free: one-slice validation.
|
|
110
|
+
Pro: multi-slice plans, retries, advanced gates, token budgets, analytics.
|
|
111
|
+
|
|
112
|
+
npm: @idevelopers/agentgate
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Founder/dev post:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
I kept seeing coding agents mark work complete after editing files, while tests
|
|
119
|
+
or build checks were still broken.
|
|
120
|
+
|
|
121
|
+
AgentGate is my answer: a local MCP server that wraps agent work in slices and
|
|
122
|
+
requires real validation before "done".
|
|
123
|
+
|
|
124
|
+
The free version handles one focused slice. Pro is for longer agent handoffs:
|
|
125
|
+
multi-slice ordering, bounded retries, typecheck/build/custom gates, token
|
|
126
|
+
budgets, and analytics export.
|
|
127
|
+
|
|
128
|
+
It runs locally, installs from npm, and uses Polar license keys for paid plans.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Conversion Rule
|
|
132
|
+
|
|
133
|
+
Do not hard-sell on first install. Show Pro only after value is visible:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
- after a free gate passes
|
|
137
|
+
- after a failed gate prevents a bad done status
|
|
138
|
+
- when config already contains multiple slices
|
|
139
|
+
- when config contains typecheck, build, custom, or Pro-only gates
|
|
140
|
+
- when a token budget is configured
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The product should feel like a helpful guardrail first and a paid upgrade second.
|
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
# AgentGate Production Replication Playbook
|
|
2
|
+
|
|
3
|
+
This is the operator handoff for AgentGate and the reusable blueprint for building
|
|
4
|
+
the next 4-5 similar paid developer tools with Codex or Claude Code.
|
|
5
|
+
|
|
6
|
+
It documents the path we used to move AgentGate from idea to production:
|
|
7
|
+
private source repo, public npm runtime, public installer metadata, Polar
|
|
8
|
+
checkout, live license validation, paid smoke test, refund, and post-launch
|
|
9
|
+
cleanup. Use it as the canonical runbook when researching and shipping the next
|
|
10
|
+
small paid MCP, Claude Code, or Codex app.
|
|
11
|
+
|
|
12
|
+
Do not paste license keys, npm tokens, card details, OTPs, or private API keys
|
|
13
|
+
into this document. Record only sanitized results and stable public values.
|
|
14
|
+
|
|
15
|
+
## 1. Final Production State
|
|
16
|
+
|
|
17
|
+
AgentGate is live as a paid local developer tool.
|
|
18
|
+
|
|
19
|
+
Current production shape:
|
|
20
|
+
|
|
21
|
+
- Product: AgentGate, a local MCP server for validation gates and token-budget
|
|
22
|
+
guardrails around autonomous coding agents.
|
|
23
|
+
- Source repository: private GitHub repo, `manish-1988/agentgate`.
|
|
24
|
+
- Public installer repository: `manish-1988/agentgate-installer`.
|
|
25
|
+
- Public npm package: `@idevelopers/agentgate@0.1.1`.
|
|
26
|
+
- Runtime install path: `npx -y @idevelopers/agentgate`.
|
|
27
|
+
- Plugin install path: public installer repo with Claude Code and Codex metadata.
|
|
28
|
+
- Payment provider: Polar live checkout.
|
|
29
|
+
- Checkout URL: `https://buy.polar.sh/polar_cl_VxlhG8lCO6IUcLcveJ51YOXYXMHWdUNorKr0U1bhyqm`.
|
|
30
|
+
- License model: Polar license keys, validated locally by the npm runtime.
|
|
31
|
+
- Free tier: local runtime with single-slice/basic gates.
|
|
32
|
+
- Pro tier: Polar key unlocks multi-slice plans, token budgets, advanced gates,
|
|
33
|
+
and analytics.
|
|
34
|
+
- Team tier: future seat-based license key tier.
|
|
35
|
+
|
|
36
|
+
Production validation completed on 2026-06-11:
|
|
37
|
+
|
|
38
|
+
- Public npm install worked from a clean environment.
|
|
39
|
+
- MCP server exposed all five public tools.
|
|
40
|
+
- Live Polar checkout created a Pro Monthly paid order.
|
|
41
|
+
- The issued live license key activated as Pro.
|
|
42
|
+
- `agentgate_run_plan` passed the production validation slices.
|
|
43
|
+
- Free installs kept free-core access and blocked Pro features with the live
|
|
44
|
+
checkout URL.
|
|
45
|
+
- The live test subscription was canceled immediately.
|
|
46
|
+
- The live test order was refunded.
|
|
47
|
+
- The Polar benefit grant was revoked after refund.
|
|
48
|
+
- Direct Polar license validation then returned that the key was no longer
|
|
49
|
+
active.
|
|
50
|
+
|
|
51
|
+
Conversion polish completed on 2026-08-29:
|
|
52
|
+
|
|
53
|
+
- npm package metadata now includes homepage, public installer repository,
|
|
54
|
+
support/issues URL, funding URL, richer keywords, and packaged docs.
|
|
55
|
+
- Free tool responses include contextual upgrade blocks after useful validation
|
|
56
|
+
moments instead of hard-selling at install time.
|
|
57
|
+
- Pro-required errors explain the concrete paid value before showing the Polar
|
|
58
|
+
checkout URL.
|
|
59
|
+
- Public installer copy now clearly distinguishes free local validation from Pro
|
|
60
|
+
multi-slice orchestration.
|
|
61
|
+
- `docs/CONVERSION_LAUNCH_KIT.md` contains landing copy, demo script, screenshot
|
|
62
|
+
checklist, directory-submission fields, and launch posts.
|
|
63
|
+
|
|
64
|
+
## 2. Pattern To Reuse For Future Apps
|
|
65
|
+
|
|
66
|
+
Use this product architecture for small paid developer tools that run locally:
|
|
67
|
+
|
|
68
|
+
1. Keep source private.
|
|
69
|
+
2. Publish a minimal public npm runtime.
|
|
70
|
+
3. Publish a public installer repo that contains only plugin metadata, skills,
|
|
71
|
+
commands, and install instructions.
|
|
72
|
+
4. Use Polar as Merchant of Record for self-serve card payments.
|
|
73
|
+
5. Use Polar license keys for Pro/Team feature gating.
|
|
74
|
+
6. Validate with sandbox first, then one real live purchase.
|
|
75
|
+
7. Refund the live smoke purchase after proving activation and product behavior.
|
|
76
|
+
8. Keep launch docs honest: "public npm runtime", not "open source", unless the
|
|
77
|
+
source repo is actually public.
|
|
78
|
+
|
|
79
|
+
This pattern works best for:
|
|
80
|
+
|
|
81
|
+
- MCP servers.
|
|
82
|
+
- Claude Code plugins.
|
|
83
|
+
- Codex plugins.
|
|
84
|
+
- Local CLI tools.
|
|
85
|
+
- Developer workflow guards.
|
|
86
|
+
- Small automation utilities where users should not send code to your server.
|
|
87
|
+
|
|
88
|
+
Avoid this pattern when the paid value depends on hosted state, collaborative
|
|
89
|
+
dashboards, or server-side AI compute. Those products need a web app and a
|
|
90
|
+
different billing/enforcement model.
|
|
91
|
+
|
|
92
|
+
## 3. Repository Layout
|
|
93
|
+
|
|
94
|
+
Use two repos.
|
|
95
|
+
|
|
96
|
+
Private source repo:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
apps/<app-name>/
|
|
100
|
+
package.json
|
|
101
|
+
src/
|
|
102
|
+
test/
|
|
103
|
+
README.md
|
|
104
|
+
CONTEXT.md
|
|
105
|
+
agentgate.config.example.json
|
|
106
|
+
.mcp.json
|
|
107
|
+
.claude-plugin/
|
|
108
|
+
codex-plugin/
|
|
109
|
+
skills/
|
|
110
|
+
commands/
|
|
111
|
+
docs/
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Public installer repo:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
apps/<app-name>-installer/
|
|
118
|
+
README.md
|
|
119
|
+
.mcp.json
|
|
120
|
+
.claude-plugin/
|
|
121
|
+
codex-plugin/
|
|
122
|
+
skills/
|
|
123
|
+
commands/
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Rules:
|
|
127
|
+
|
|
128
|
+
- Private repo contains source, tests, and production operator docs.
|
|
129
|
+
- Public installer repo contains no proprietary source.
|
|
130
|
+
- Public installer repo points the agent at the public npm package.
|
|
131
|
+
- npm package contains built runtime files, README, manifests, skills, and
|
|
132
|
+
commands required for install.
|
|
133
|
+
|
|
134
|
+
## 4. Product And Pricing Setup
|
|
135
|
+
|
|
136
|
+
For each new app, define these values before coding:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
APP_NAME=AgentGate
|
|
140
|
+
APP_SLUG=agentgate
|
|
141
|
+
NPM_SCOPE=@idevelopers
|
|
142
|
+
NPM_PACKAGE=@idevelopers/agentgate
|
|
143
|
+
BIN_NAME=agentgate
|
|
144
|
+
PRIVATE_REPO=manish-1988/agentgate
|
|
145
|
+
PUBLIC_INSTALLER_REPO=manish-1988/agentgate-installer
|
|
146
|
+
POLAR_ORGANIZATION_ID=<public organization id>
|
|
147
|
+
POLAR_CHECKOUT_URL=<live checkout URL>
|
|
148
|
+
FREE_PROMISE=<what works without payment>
|
|
149
|
+
PRO_PROMISE=<what payment unlocks>
|
|
150
|
+
TEAM_PROMISE=<what seats/policies unlock>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
AgentGate pricing used for launch:
|
|
154
|
+
|
|
155
|
+
- Free: local npm runtime, single-slice/basic gates.
|
|
156
|
+
- Pro Monthly: monthly paid plan.
|
|
157
|
+
- Pro Annual: annual paid plan.
|
|
158
|
+
- Team: future team/seat plan.
|
|
159
|
+
|
|
160
|
+
The original idea docs suggested USD pricing. The live Polar product used INR
|
|
161
|
+
pricing for the Indian account during production validation. For future apps,
|
|
162
|
+
choose the checkout currency deliberately before launch and make README,
|
|
163
|
+
checkout, and launch copy match.
|
|
164
|
+
|
|
165
|
+
## 5. Build Implementation Checklist
|
|
166
|
+
|
|
167
|
+
For a new app, Codex or Claude Code should implement the product in slices.
|
|
168
|
+
|
|
169
|
+
Minimum technical slices:
|
|
170
|
+
|
|
171
|
+
1. Package skeleton.
|
|
172
|
+
2. Config schema and loader.
|
|
173
|
+
3. MCP server entrypoint.
|
|
174
|
+
4. Free core tools.
|
|
175
|
+
5. Pro-only tools.
|
|
176
|
+
6. Polar license validator.
|
|
177
|
+
7. Local cache and offline grace.
|
|
178
|
+
8. Plugin manifests.
|
|
179
|
+
9. Skills and slash commands.
|
|
180
|
+
10. README and security notes.
|
|
181
|
+
11. Tests.
|
|
182
|
+
12. Production validation scripts or documented commands.
|
|
183
|
+
|
|
184
|
+
For AgentGate, the shipped MCP tools are:
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
agentgate_define_slice
|
|
188
|
+
agentgate_run_gate
|
|
189
|
+
agentgate_run_plan
|
|
190
|
+
agentgate_budget_status
|
|
191
|
+
agentgate_activate_license
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
For future apps, keep tool names stable and product-prefixed:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
<appslug>_<verb>_<noun>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Examples:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
pocketscan_scan_file
|
|
204
|
+
pocketscan_export_report
|
|
205
|
+
shipnote_generate_release_note
|
|
206
|
+
shipnote_publish_digest
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 6. Polar Setup Runbook
|
|
210
|
+
|
|
211
|
+
Do this in Polar live and Polar sandbox.
|
|
212
|
+
|
|
213
|
+
1. Create or select organization.
|
|
214
|
+
2. Complete finance/account verification.
|
|
215
|
+
3. Confirm payout account is active.
|
|
216
|
+
4. Create the product.
|
|
217
|
+
5. Add recurring prices.
|
|
218
|
+
6. Add License Key benefit.
|
|
219
|
+
7. Set activation limits:
|
|
220
|
+
- Pro individual: 1 activation.
|
|
221
|
+
- Team: seat count or activation limit matching seats.
|
|
222
|
+
8. If Polar metadata is available in the product/benefit UI, set:
|
|
223
|
+
- Pro: `tier=pro`.
|
|
224
|
+
- Team: `tier=team`.
|
|
225
|
+
9. Copy the public organization id.
|
|
226
|
+
10. Copy the live checkout URL.
|
|
227
|
+
11. Add checkout URL to README, package docs, and Pro-required error message.
|
|
228
|
+
12. Create sandbox equivalent for payment testing.
|
|
229
|
+
|
|
230
|
+
Notes learned from AgentGate:
|
|
231
|
+
|
|
232
|
+
- The Polar organization id is not secret when used for customer portal license
|
|
233
|
+
validation.
|
|
234
|
+
- Never publish Polar server tokens in a local npm package.
|
|
235
|
+
- One-seat Pro keys hit activation limits after first machine activation. This
|
|
236
|
+
is expected.
|
|
237
|
+
- Cache the activation id locally so the same machine can keep validating
|
|
238
|
+
without consuming another activation.
|
|
239
|
+
- Refund/cancel behavior can revoke the benefit even if the refund table shows a
|
|
240
|
+
separate "revoke benefits" field. Always verify the license after refund.
|
|
241
|
+
|
|
242
|
+
AgentGate production organization id shipped in code:
|
|
243
|
+
|
|
244
|
+
```text
|
|
245
|
+
534c0711-1ded-497c-aa46-d1a7dfa46d6e
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## 7. npm Publishing Runbook
|
|
249
|
+
|
|
250
|
+
Prepare package:
|
|
251
|
+
|
|
252
|
+
```sh
|
|
253
|
+
npm install
|
|
254
|
+
npm run build
|
|
255
|
+
npx vitest run
|
|
256
|
+
npm pack --dry-run
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Publish:
|
|
260
|
+
|
|
261
|
+
```sh
|
|
262
|
+
npm publish --access public
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Post-publish checks:
|
|
266
|
+
|
|
267
|
+
```sh
|
|
268
|
+
npm view @idevelopers/agentgate name version bin dist.tarball
|
|
269
|
+
npm pack @idevelopers/agentgate --dry-run
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Clean MCP smoke from outside the source repo:
|
|
273
|
+
|
|
274
|
+
```sh
|
|
275
|
+
tmp_home=$(mktemp -d /tmp/agentgate-home.XXXXXX)
|
|
276
|
+
tmp_cfg=$(mktemp /tmp/empty-npmrc.XXXXXX)
|
|
277
|
+
|
|
278
|
+
HOME="$tmp_home" NPM_CONFIG_USERCONFIG="$tmp_cfg" \
|
|
279
|
+
AGENTGATE_CONFIG=/absolute/path/to/agentgate.config.example.json \
|
|
280
|
+
node ./scripts-or-oneoff/mcp-smoke.mjs
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Important source-repo testing note:
|
|
284
|
+
|
|
285
|
+
- `npx -y @idevelopers/agentgate` works from a clean consumer environment.
|
|
286
|
+
- When testing inside the source repo for the same package, npm/npx can resolve
|
|
287
|
+
differently and create false negatives.
|
|
288
|
+
- For paid purchase validation from the source repo, use an explicit clean
|
|
289
|
+
install:
|
|
290
|
+
|
|
291
|
+
```sh
|
|
292
|
+
tmp_install=$(mktemp -d /tmp/agentgate-public-install.XXXXXX)
|
|
293
|
+
npm install --prefix "$tmp_install" @idevelopers/agentgate@0.1.1
|
|
294
|
+
"$tmp_install/node_modules/.bin/agentgate"
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Security cleanup after publish:
|
|
298
|
+
|
|
299
|
+
- Revoke temporary npm tokens.
|
|
300
|
+
- Clear local npm auth if a temporary publish token was used.
|
|
301
|
+
- Do not commit `.npmrc` with tokens.
|
|
302
|
+
- Confirm package tarball does not include private source files unless intended.
|
|
303
|
+
|
|
304
|
+
## 8. GitHub Runbook
|
|
305
|
+
|
|
306
|
+
Private source repo:
|
|
307
|
+
|
|
308
|
+
1. Initialize git in `apps/<app-name>`.
|
|
309
|
+
2. Commit implementation slices.
|
|
310
|
+
3. Push to GitHub.
|
|
311
|
+
4. Make the repo private if source should remain proprietary.
|
|
312
|
+
5. Keep issues/discussions strategy deliberate. If source is private, support
|
|
313
|
+
may happen through installer repo, email, or future help desk.
|
|
314
|
+
|
|
315
|
+
Public installer repo:
|
|
316
|
+
|
|
317
|
+
1. Create `apps/<app-name>-installer`.
|
|
318
|
+
2. Copy only public install metadata.
|
|
319
|
+
3. Point `.mcp.json` and plugin manifests at public npm runtime.
|
|
320
|
+
4. Write README with install and checkout instructions.
|
|
321
|
+
5. Push public repo.
|
|
322
|
+
6. Add GitHub metadata:
|
|
323
|
+
- description
|
|
324
|
+
- homepage
|
|
325
|
+
- topics
|
|
326
|
+
|
|
327
|
+
AgentGate correction we made:
|
|
328
|
+
|
|
329
|
+
- The source repo was accidentally public initially.
|
|
330
|
+
- We corrected the model to private source plus public installer repo.
|
|
331
|
+
- This does not harm npm distribution because users install from npm/Polar, not
|
|
332
|
+
by cloning the source repo.
|
|
333
|
+
|
|
334
|
+
## 9. Plugin Packaging Runbook
|
|
335
|
+
|
|
336
|
+
Ship three install surfaces:
|
|
337
|
+
|
|
338
|
+
Direct MCP install:
|
|
339
|
+
|
|
340
|
+
```text
|
|
341
|
+
claude mcp add agentgate -- npx -y @idevelopers/agentgate
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Claude Code plugin marketplace install:
|
|
345
|
+
|
|
346
|
+
```text
|
|
347
|
+
/plugin marketplace add https://github.com/manish-1988/agentgate-installer
|
|
348
|
+
/plugin install agentgate@agentgate-marketplace
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Codex plugin metadata:
|
|
352
|
+
|
|
353
|
+
```text
|
|
354
|
+
codex-plugin/plugin.json
|
|
355
|
+
skills/<workflow>/SKILL.md
|
|
356
|
+
commands/*.md
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
For future apps, ensure:
|
|
360
|
+
|
|
361
|
+
- `.mcp.json` points to the public npm package, not local source.
|
|
362
|
+
- Plugin marketplace `source` points at the public installer files.
|
|
363
|
+
- The plugin README explains that source may remain private.
|
|
364
|
+
- Skills teach the agent how to use the tool safely.
|
|
365
|
+
- Slash commands are small wrappers around MCP tool calls.
|
|
366
|
+
|
|
367
|
+
## 10. License Validation Design
|
|
368
|
+
|
|
369
|
+
AgentGate validator behavior:
|
|
370
|
+
|
|
371
|
+
1. `agentgate_activate_license` stores the key in `~/.agentgate/license.json`.
|
|
372
|
+
2. Validator activates the key through Polar if no activation id exists.
|
|
373
|
+
3. Validator caches activation id, tier, and validation timestamp.
|
|
374
|
+
4. Validator calls Polar customer portal validation with:
|
|
375
|
+
- license key
|
|
376
|
+
- organization id
|
|
377
|
+
- activation id
|
|
378
|
+
5. If Polar says granted, AgentGate treats the tier as Pro/Team.
|
|
379
|
+
6. If network fails, AgentGate allows a 72-hour offline grace for cached paid
|
|
380
|
+
licenses.
|
|
381
|
+
7. If invalid, revoked, expired, or activation limit exceeded, AgentGate falls
|
|
382
|
+
back to Free.
|
|
383
|
+
|
|
384
|
+
Future apps should keep the same user experience:
|
|
385
|
+
|
|
386
|
+
- Paid tool call without license should fail clearly.
|
|
387
|
+
- Error message should include checkout URL.
|
|
388
|
+
- Activation should not require users to edit config files.
|
|
389
|
+
- License cache should live under the app home directory.
|
|
390
|
+
- Network failure should not break paid users immediately.
|
|
391
|
+
- Refunded/revoked keys should stop unlocking Pro.
|
|
392
|
+
|
|
393
|
+
Never log full license keys.
|
|
394
|
+
|
|
395
|
+
## 11. Required Validation Matrix
|
|
396
|
+
|
|
397
|
+
Before launch, run this full matrix.
|
|
398
|
+
|
|
399
|
+
Local source validation:
|
|
400
|
+
|
|
401
|
+
```sh
|
|
402
|
+
npm run build
|
|
403
|
+
npx vitest run
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Public package validation:
|
|
407
|
+
|
|
408
|
+
```sh
|
|
409
|
+
npm view <package> name version bin dist.tarball
|
|
410
|
+
npm pack <package> --dry-run
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Clean direct MCP validation:
|
|
414
|
+
|
|
415
|
+
- Start package from a clean temp HOME.
|
|
416
|
+
- Connect with MCP client.
|
|
417
|
+
- Confirm tool list.
|
|
418
|
+
- Run one free tool.
|
|
419
|
+
- Confirm Pro tool blocks without license.
|
|
420
|
+
|
|
421
|
+
Sandbox payment validation:
|
|
422
|
+
|
|
423
|
+
- Create sandbox product and checkout.
|
|
424
|
+
- Buy with sandbox card.
|
|
425
|
+
- Capture sandbox license key locally.
|
|
426
|
+
- Activate license.
|
|
427
|
+
- Run paid behavior.
|
|
428
|
+
- Refund sandbox order.
|
|
429
|
+
- Confirm license state after refund if possible.
|
|
430
|
+
|
|
431
|
+
Live payment validation:
|
|
432
|
+
|
|
433
|
+
- Buy the real product with a real card.
|
|
434
|
+
- Do not expose card details in docs or chat.
|
|
435
|
+
- Capture issued license key locally only.
|
|
436
|
+
- Activate license.
|
|
437
|
+
- Run paid behavior from public npm package.
|
|
438
|
+
- Run free-vs-Pro contrast test.
|
|
439
|
+
- Cancel subscription.
|
|
440
|
+
- Refund order.
|
|
441
|
+
- Confirm benefit revoked.
|
|
442
|
+
- Confirm direct Polar validation no longer accepts the refunded key.
|
|
443
|
+
|
|
444
|
+
AgentGate live paid validation results on 2026-06-11:
|
|
445
|
+
|
|
446
|
+
```text
|
|
447
|
+
Public package: @idevelopers/agentgate@0.1.1
|
|
448
|
+
Live product: AgentGate Pro Monthly
|
|
449
|
+
Subscription after test: canceled
|
|
450
|
+
Order after test: refunded
|
|
451
|
+
Benefit after refund: revoked
|
|
452
|
+
License after refund: no longer active
|
|
453
|
+
Paid plan result before refund: passed
|
|
454
|
+
Free contrast result: free gate passed, Pro gate and Pro plan blocked
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## 12. Paid Product Smoke Test Procedure
|
|
458
|
+
|
|
459
|
+
Use this exact sequence for future apps.
|
|
460
|
+
|
|
461
|
+
1. Open live checkout.
|
|
462
|
+
2. Purchase the lowest paid recurring tier with a real test buyer identity.
|
|
463
|
+
3. Wait for checkout confirmation.
|
|
464
|
+
4. Copy license key into a local temp file with restricted permissions.
|
|
465
|
+
5. Do not paste the full key into chat or docs.
|
|
466
|
+
6. Install the public npm package into a temp directory.
|
|
467
|
+
7. Run the MCP server from that temp install.
|
|
468
|
+
8. Activate license.
|
|
469
|
+
9. Confirm paid tier in tool output.
|
|
470
|
+
10. Run the main paid tool or paid workflow.
|
|
471
|
+
11. Run a fresh unlicensed temp HOME check.
|
|
472
|
+
12. Confirm unlicensed Pro path blocks.
|
|
473
|
+
13. Return to Polar dashboard.
|
|
474
|
+
14. Cancel the subscription immediately.
|
|
475
|
+
15. Refund the order.
|
|
476
|
+
16. Confirm order status is refunded.
|
|
477
|
+
17. Confirm subscription status is canceled.
|
|
478
|
+
18. Confirm benefit is revoked.
|
|
479
|
+
19. Confirm license no longer validates.
|
|
480
|
+
|
|
481
|
+
Example sanitized local key handling:
|
|
482
|
+
|
|
483
|
+
```sh
|
|
484
|
+
umask 077
|
|
485
|
+
pbpaste > /tmp/<app>-paid-license-key
|
|
486
|
+
chmod 600 /tmp/<app>-paid-license-key
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Delete the temp key file after validation if you no longer need it:
|
|
490
|
+
|
|
491
|
+
```sh
|
|
492
|
+
rm -f /tmp/<app>-paid-license-key
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
## 13. Documentation Update Checklist
|
|
496
|
+
|
|
497
|
+
Update private source docs:
|
|
498
|
+
|
|
499
|
+
- `README.md`: install, tiers, checkout, license activation, launch status.
|
|
500
|
+
- `CONTEXT.md`: product truth and monetization model.
|
|
501
|
+
- `docs/PRODUCTION_REPLICATION_PLAYBOOK.md`: production learnings and reusable
|
|
502
|
+
runbook.
|
|
503
|
+
|
|
504
|
+
Update public installer docs:
|
|
505
|
+
|
|
506
|
+
- `README.md`: plugin install, direct MCP install, checkout link.
|
|
507
|
+
- `.mcp.json`: public npm runtime command.
|
|
508
|
+
- `.claude-plugin/marketplace.json`: public npm/homepage links.
|
|
509
|
+
- `codex-plugin/plugin.json`: public npm runtime command.
|
|
510
|
+
|
|
511
|
+
Update launch assets:
|
|
512
|
+
|
|
513
|
+
- Avoid "open source" unless source is public.
|
|
514
|
+
- Use "free local runtime" or "public npm runtime".
|
|
515
|
+
- State clearly that source remains private if that is the model.
|
|
516
|
+
- Include checkout URL only after live Polar is approved.
|
|
517
|
+
- Include security note: local tool executes user-configured commands.
|
|
518
|
+
|
|
519
|
+
## 14. Reusable Codex / Claude Code Handoff Prompt
|
|
520
|
+
|
|
521
|
+
Use this prompt to start the next app after research is complete.
|
|
522
|
+
|
|
523
|
+
```text
|
|
524
|
+
You are the dedicated build thread for <APP_NAME>.
|
|
525
|
+
|
|
526
|
+
Goal:
|
|
527
|
+
Build a production-ready local developer tool distributed as:
|
|
528
|
+
- private source repo
|
|
529
|
+
- public npm runtime package
|
|
530
|
+
- public installer metadata repo
|
|
531
|
+
- Polar-paid Pro/Team license key model
|
|
532
|
+
|
|
533
|
+
Use the AgentGate production pattern from:
|
|
534
|
+
docs/PRODUCTION_REPLICATION_PLAYBOOK.md
|
|
535
|
+
|
|
536
|
+
Hard constraints:
|
|
537
|
+
- Keep source private unless explicitly told otherwise.
|
|
538
|
+
- Public repo contains installer metadata only.
|
|
539
|
+
- Runtime installs from public npm.
|
|
540
|
+
- Polar handles paid checkout and license keys.
|
|
541
|
+
- Do not publish server secrets.
|
|
542
|
+
- Do not include npm tokens, Polar tokens, card details, OTPs, or license keys in
|
|
543
|
+
docs or commits.
|
|
544
|
+
- Free tier must be useful without payment.
|
|
545
|
+
- Pro tier must unlock paid value through license validation.
|
|
546
|
+
- Paid features must fail with a clear checkout URL when unlicensed.
|
|
547
|
+
- Include sandbox and live purchase validation before marketing.
|
|
548
|
+
|
|
549
|
+
Inputs:
|
|
550
|
+
- APP_NAME=<...>
|
|
551
|
+
- APP_SLUG=<...>
|
|
552
|
+
- NPM_PACKAGE=<...>
|
|
553
|
+
- BIN_NAME=<...>
|
|
554
|
+
- PRIVATE_REPO=<...>
|
|
555
|
+
- PUBLIC_INSTALLER_REPO=<...>
|
|
556
|
+
- POLAR_ORGANIZATION_ID=<...>
|
|
557
|
+
- POLAR_CHECKOUT_URL=<...>
|
|
558
|
+
- FREE_CAPABILITIES=<...>
|
|
559
|
+
- PRO_CAPABILITIES=<...>
|
|
560
|
+
- TEAM_CAPABILITIES=<...>
|
|
561
|
+
|
|
562
|
+
Build slices:
|
|
563
|
+
1. Skeleton, package, TypeScript config, tests.
|
|
564
|
+
2. Core local functionality.
|
|
565
|
+
3. MCP tools.
|
|
566
|
+
4. Free-vs-Pro gating.
|
|
567
|
+
5. Polar license validator with cache and offline grace.
|
|
568
|
+
6. Plugin manifests, skills, commands.
|
|
569
|
+
7. README and installer repo docs.
|
|
570
|
+
8. Validation scripts and production checklist.
|
|
571
|
+
|
|
572
|
+
Validation required:
|
|
573
|
+
- npm run build
|
|
574
|
+
- test suite
|
|
575
|
+
- npm pack --dry-run
|
|
576
|
+
- clean public npm install
|
|
577
|
+
- MCP tool list
|
|
578
|
+
- unlicensed free behavior
|
|
579
|
+
- unlicensed Pro block
|
|
580
|
+
- sandbox purchase and activation
|
|
581
|
+
- live purchase and activation
|
|
582
|
+
- live refund/cancel and revoked-license check
|
|
583
|
+
|
|
584
|
+
Final report must include:
|
|
585
|
+
- what shipped
|
|
586
|
+
- exact repos/packages
|
|
587
|
+
- validation evidence
|
|
588
|
+
- remaining risks
|
|
589
|
+
- launch checklist
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
## 15. Marketing And Monetization Follow-Through
|
|
593
|
+
|
|
594
|
+
Technical production is not the same as revenue.
|
|
595
|
+
|
|
596
|
+
After the paid flow is validated:
|
|
597
|
+
|
|
598
|
+
1. Keep npm and installer repo live.
|
|
599
|
+
2. Submit to relevant plugin directories.
|
|
600
|
+
3. Post the launch kit.
|
|
601
|
+
4. Send direct outreach to likely users.
|
|
602
|
+
5. Offer Pro keys for feedback.
|
|
603
|
+
6. Track install friction.
|
|
604
|
+
7. Track activation friction.
|
|
605
|
+
8. Improve docs before adding features.
|
|
606
|
+
|
|
607
|
+
For each future app, write the launch promise before coding:
|
|
608
|
+
|
|
609
|
+
```text
|
|
610
|
+
This tool saves <buyer> from <pain> by doing <specific local workflow>.
|
|
611
|
+
Free gives <useful narrow outcome>.
|
|
612
|
+
Pro gives <paid outcome worth money>.
|
|
613
|
+
Team gives <collaboration/admin outcome>.
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
If the paid outcome is vague, do not build yet. Research more.
|
|
617
|
+
|
|
618
|
+
## 16. Risk Register
|
|
619
|
+
|
|
620
|
+
Known risks from AgentGate:
|
|
621
|
+
|
|
622
|
+
- External providers can have edge cases: npm, Polar, banks/cards, user machines,
|
|
623
|
+
and plugin marketplaces.
|
|
624
|
+
- One-seat activation means a buyer who changes machine may need a reset flow.
|
|
625
|
+
- Refund and benefit revocation should always be verified directly.
|
|
626
|
+
- Public npm package README must not overpromise support or source access.
|
|
627
|
+
- Private source plus public package is valid, but the wording must be precise.
|
|
628
|
+
- Local tools that spawn commands must keep a strong security warning.
|
|
629
|
+
- Marketing copy must avoid fake revenue, fake usage, or inflated claims.
|
|
630
|
+
|
|
631
|
+
Mitigations:
|
|
632
|
+
|
|
633
|
+
- Keep one clean install smoke script per app.
|
|
634
|
+
- Keep one license validation smoke script per app.
|
|
635
|
+
- Keep public docs short and exact.
|
|
636
|
+
- Keep private operator docs detailed.
|
|
637
|
+
- Test sandbox and live payments before marketing.
|
|
638
|
+
- Revoke temporary tokens immediately after publishing.
|
|
639
|
+
|
|
640
|
+
## 17. Definition Of Production-Ready
|
|
641
|
+
|
|
642
|
+
A future app is production-ready only when all are true:
|
|
643
|
+
|
|
644
|
+
- Private source repo is clean and pushed.
|
|
645
|
+
- Public installer repo is clean and pushed.
|
|
646
|
+
- npm package is published and installable from a clean machine.
|
|
647
|
+
- MCP tool list loads from the public package.
|
|
648
|
+
- Free flow works without license.
|
|
649
|
+
- Paid flow blocks without license.
|
|
650
|
+
- Sandbox paid license unlocks paid flow.
|
|
651
|
+
- Live paid license unlocks paid flow.
|
|
652
|
+
- Live test purchase is canceled/refunded after validation.
|
|
653
|
+
- Refunded live license no longer unlocks paid flow.
|
|
654
|
+
- README and installer README match reality.
|
|
655
|
+
- Launch kit does not claim open source unless source is public.
|
|
656
|
+
- Temporary npm tokens and local auth are cleaned up.
|
|
657
|
+
|
|
658
|
+
If any item is missing, the app can be dogfooded, but it is not ready for
|
|
659
|
+
serious marketing.
|
package/package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idevelopers/agentgate",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Validation gates and token-budget guardrails for
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Validation gates, plan checks, and token-budget guardrails for AI coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"author": "iDevelopers <tech@idevelopers.in>",
|
|
7
|
+
"homepage": "https://github.com/manish-1988/agentgate-installer#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/manish-1988/agentgate-installer.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/manish-1988/agentgate-installer/issues"
|
|
14
|
+
},
|
|
15
|
+
"funding": {
|
|
16
|
+
"type": "polar",
|
|
17
|
+
"url": "https://buy.polar.sh/polar_cl_VxlhG8lCO6IUcLcveJ51YOXYXMHWdUNorKr0U1bhyqm"
|
|
18
|
+
},
|
|
6
19
|
"bin": {
|
|
7
20
|
"agentgate": "dist/index.js"
|
|
8
21
|
},
|
|
@@ -14,6 +27,7 @@
|
|
|
14
27
|
"files": [
|
|
15
28
|
"dist",
|
|
16
29
|
"README.md",
|
|
30
|
+
"docs",
|
|
17
31
|
"agentgate.config.example.json",
|
|
18
32
|
".mcp.json",
|
|
19
33
|
".claude-plugin",
|
|
@@ -23,10 +37,16 @@
|
|
|
23
37
|
],
|
|
24
38
|
"keywords": [
|
|
25
39
|
"mcp",
|
|
40
|
+
"mcp-server",
|
|
26
41
|
"codex",
|
|
27
42
|
"claude-code",
|
|
28
43
|
"agents",
|
|
29
|
-
"
|
|
44
|
+
"ai-agents",
|
|
45
|
+
"agentic-coding",
|
|
46
|
+
"validation",
|
|
47
|
+
"guardrails",
|
|
48
|
+
"token-budget",
|
|
49
|
+
"ci"
|
|
30
50
|
],
|
|
31
51
|
"license": "MIT",
|
|
32
52
|
"publishConfig": {
|
|
@@ -40,7 +60,7 @@
|
|
|
40
60
|
"devDependencies": {
|
|
41
61
|
"@types/node": "^20.19.1",
|
|
42
62
|
"typescript": "^5.8.3",
|
|
43
|
-
"vitest": "^
|
|
63
|
+
"vitest": "^4.1.11"
|
|
44
64
|
},
|
|
45
65
|
"engines": {
|
|
46
66
|
"node": ">=20"
|