agentic-scaffold 0.1.1 → 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 +43 -77
- package/dist/{chunk-USTEVUWE.js → chunk-FYTHYRXT.js} +2 -2
- package/dist/{chunk-P7R4J6SZ.js → chunk-QWFNPAA4.js} +1 -1
- package/dist/{chunk-E72J53UI.js → chunk-USJ2R2T2.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/mcp-bin.js +3 -3
- package/dist/mcp.js +3 -3
- package/dist/worker.js +1 -1
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -1,108 +1,74 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agentic-scaffold
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/agentic-scaffold)
|
|
4
|
+
[](https://www.npmjs.com/package/agentic-scaffold)
|
|
5
|
+
[](https://opensource.org/license/mit)
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
faces: a terminal command, an npm import, and an MCP server.
|
|
7
|
+
[Package](https://www.npmjs.com/package/agentic-scaffold) · [Source](https://github.com/pooriaarab/agentic-scaffold) · [Support](https://github.com/pooriaarab/agentic-scaffold/issues)
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
agentic-scaffold is an open-source TypeScript starter for developers who need a Node.js library, command-line interface, and Model Context Protocol (MCP) server.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
- Three faces over that core: CLI, library, MCP server.
|
|
12
|
-
- A frozen core contract, so packs share one API.
|
|
13
|
-
- A worker entry and a wrangler sample for edge deploys.
|
|
14
|
-
- Build, typecheck, and tests that pass from a fresh clone.
|
|
15
|
-
|
|
16
|
-
## Quick start
|
|
11
|
+
## Install
|
|
17
12
|
|
|
18
13
|
```sh
|
|
19
|
-
|
|
20
|
-
cd my-pack
|
|
21
|
-
npm install
|
|
22
|
-
npm run build
|
|
23
|
-
npm run typecheck
|
|
24
|
-
npm test
|
|
14
|
+
npm install agentic-scaffold
|
|
25
15
|
```
|
|
26
16
|
|
|
27
|
-
|
|
17
|
+
Requires Node.js 18 or later. Includes TypeScript declarations and two direct dependencies: the MCP SDK and Zod.
|
|
18
|
+
|
|
19
|
+
## Run your first summary
|
|
20
|
+
|
|
21
|
+
No credentials, environment variables, or `.env` loader are required.
|
|
28
22
|
|
|
29
23
|
```sh
|
|
30
|
-
|
|
24
|
+
npx agentic-scaffold summary --text "hello world hello"
|
|
31
25
|
```
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
Success prints JSON with `chars: 17`, `words: 3`, `lines: 1`, and `hello` counted twice.
|
|
34
28
|
|
|
35
29
|
```js
|
|
36
|
-
import { summarizeText } from "
|
|
37
|
-
|
|
30
|
+
import { summarizeText, getCostReport } from "agentic-scaffold";
|
|
38
31
|
console.log(summarizeText("hello world hello"));
|
|
32
|
+
console.log(getCostReport()); // { entries: [], dispatches: 0, units: 0 }
|
|
39
33
|
```
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
node dist/cli.js mcp
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Three usecases
|
|
48
|
-
|
|
49
|
-
1. You run one text summary from the terminal.
|
|
50
|
-
2. You import the summary function in a script.
|
|
51
|
-
3. You let an agent call the same function as an MCP tool.
|
|
52
|
-
|
|
53
|
-
## Clone checklist
|
|
35
|
+
## Features and runtime surfaces
|
|
54
36
|
|
|
55
|
-
|
|
37
|
+
- **Text statistics:** Character, word, line, and top-word counts; no semantic summarization.
|
|
38
|
+
- **Routing:** Two generic adapters: local receipts and HTTP POST with `{ text }`.
|
|
39
|
+
- **Guards:** Optional dispatch caps, UTC quiet hours, and text blocklists.
|
|
40
|
+
- **Utilities:** Brand configuration, stderr logging, dry-run results, and in-memory cost units.
|
|
41
|
+
- **CLI:** `summary`, `dispatch`, `costs`, `mcp`; help via `--help` and version via `--version`.
|
|
42
|
+
- **MCP:** Three tools: `summarize_text`, `dispatch_text`, `get_cost_report`.
|
|
43
|
+
- **Worker scaffold:** Source handler for `GET /health` and `POST /summarize`; users deploy it themselves.
|
|
56
44
|
|
|
57
|
-
|
|
58
|
-
- `__NPM_NAME__`: the npm name, like `agentic-<block>` (bare name, never @pooriaarab/ scoped unless the brief says scoped).
|
|
59
|
-
- `__PACK_COMMAND__`: the terminal command, like `my-pack`.
|
|
60
|
-
- `__PACK_DESCRIPTION__`: one plain sentence, under 100 chars.
|
|
61
|
-
- `__PACK_KEYWORDS__`: plain keywords, like `notes, search, cli`.
|
|
62
|
-
- `__GITHUB_USER__`: the repo owner, like `pooriaarab`.
|
|
45
|
+
Start MCP with `npx agentic-scaffold mcp`. Preview routing with `npx agentic-scaffold dispatch --text hello --dry-run`.
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
`server.json`, `.mcp.json`, `wrangler.jsonc`.
|
|
47
|
+
## Limits
|
|
66
48
|
|
|
67
|
-
|
|
49
|
+
This starter has zero vendor-specific integrations. Local dispatch creates a receipt without external delivery.
|
|
50
|
+
CLI and MCP dispatch use the local adapter by default; SDK callers can supply the HTTP adapter.
|
|
51
|
+
HTTP delivery defaults to a ten-second timeout, with no retries. Cost units count text length rather than billing charges.
|
|
52
|
+
Reports reset when the process exits. CLI help and MCP identity still use the starter name `agentic-pack`.
|
|
68
53
|
|
|
69
|
-
|
|
70
|
-
- `src/index.ts`: the `DEFAULT_BRAND` fields.
|
|
71
|
-
- This file: the pitch and the examples above.
|
|
72
|
-
|
|
73
|
-
At publish time, set `server.json` version to the npm version and
|
|
74
|
-
`server.json` repository id from `gh api repos/OWNER/REPO --jq .id`.
|
|
75
|
-
|
|
76
|
-
## Gates
|
|
77
|
-
|
|
78
|
-
Run all three before you push a pack:
|
|
54
|
+
## Customize a cloned starter
|
|
79
55
|
|
|
80
56
|
```sh
|
|
57
|
+
git clone https://github.com/pooriaarab/agentic-scaffold.git my-pack
|
|
58
|
+
cd my-pack
|
|
59
|
+
npm ci
|
|
81
60
|
npm run build && npm run typecheck && npm test
|
|
61
|
+
node dist/cli.js summary --text "hello world hello"
|
|
82
62
|
```
|
|
83
63
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
npx --yes --package ./pooriaarab-agentic-scaffold-0.1.0.tgz agentic-pack summary --text "hello"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Release flow
|
|
92
|
-
|
|
93
|
-
Push to `main` for review. Merge to `release` to publish. The
|
|
94
|
-
publish workflow ships only when the version is new.
|
|
95
|
-
|
|
96
|
-
## Layout
|
|
64
|
+
Replace `__PACK_NAME__`, `__NPM_NAME__`, `__PACK_COMMAND__`, `__PACK_DESCRIPTION__`, `__PACK_KEYWORDS__`, and `__GITHUB_USER__` wherever they appear.
|
|
65
|
+
Check `AGENTS.md`, `SKILL.md`, `RULES.md`, `llms.txt`, `server.json`, `.mcp.json`, and `wrangler.jsonc`.
|
|
66
|
+
Update package identity, bin commands, `mcpName`, and `DEFAULT_BRAND` in `src/index.ts`.
|
|
67
|
+
Set the MCP manifest version and repository ID before publishing your own package.
|
|
97
68
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- `src/mcp.ts`: the MCP server. `src/mcp-bin.ts` starts it.
|
|
101
|
-
- `src/worker.ts`: the edge worker face.
|
|
102
|
-
- `src/core.ts`: the shared core.
|
|
103
|
-
- `agentic-core.d.ts`: the frozen contract.
|
|
104
|
-
- `docs/agentic-core.md`: the contract in plain words.
|
|
69
|
+
The repository includes a shared core contract and a publish workflow. Inspect that workflow before adopting its release process.
|
|
70
|
+
Version 0.1.1 is an early starter release; interfaces can change.
|
|
105
71
|
|
|
106
72
|
## License
|
|
107
73
|
|
|
108
|
-
MIT.
|
|
74
|
+
MIT.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BRAND
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QWFNPAA4.js";
|
|
4
4
|
import {
|
|
5
5
|
GuardError,
|
|
6
6
|
LocalRouterAdapter,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
dispatchText,
|
|
10
10
|
getCostReport,
|
|
11
11
|
summarizeText
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-USJ2R2T2.js";
|
|
13
13
|
|
|
14
14
|
// src/mcp.ts
|
|
15
15
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -206,7 +206,7 @@ function summarizeText(text, options = {}) {
|
|
|
206
206
|
|
|
207
207
|
// src/version.ts
|
|
208
208
|
import { createRequire } from "module";
|
|
209
|
-
var VERSION = true ? "0.1.
|
|
209
|
+
var VERSION = true ? "0.1.2" : readPackageVersion();
|
|
210
210
|
|
|
211
211
|
export {
|
|
212
212
|
defineBrand,
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
DEFAULT_BRAND
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QWFNPAA4.js";
|
|
5
5
|
import {
|
|
6
6
|
GuardError,
|
|
7
7
|
LocalRouterAdapter,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
dispatchText,
|
|
11
11
|
getCostReport,
|
|
12
12
|
summarizeText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-USJ2R2T2.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import { readFileSync, realpathSync } from "fs";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BRAND
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QWFNPAA4.js";
|
|
4
4
|
import {
|
|
5
5
|
GuardError,
|
|
6
6
|
HttpRouterAdapter,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
recordCost,
|
|
17
17
|
resetCosts,
|
|
18
18
|
summarizeText
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-USJ2R2T2.js";
|
|
20
20
|
export {
|
|
21
21
|
DEFAULT_BRAND,
|
|
22
22
|
GuardError,
|
package/dist/mcp-bin.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startMcp
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FYTHYRXT.js";
|
|
5
|
+
import "./chunk-QWFNPAA4.js";
|
|
6
|
+
import "./chunk-USJ2R2T2.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp-bin.ts
|
|
9
9
|
startMcp().catch((error) => {
|
package/dist/mcp.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMcpServer,
|
|
3
3
|
startMcp
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FYTHYRXT.js";
|
|
5
|
+
import "./chunk-QWFNPAA4.js";
|
|
6
|
+
import "./chunk-USJ2R2T2.js";
|
|
7
7
|
export {
|
|
8
8
|
createMcpServer,
|
|
9
9
|
startMcp
|
package/dist/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-scaffold",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "TypeScript scaffold for a Node.js library, CLI, and MCP server with Zod schemas, text statistics, routing adapters, and dispatch guards.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"Node.js",
|
|
6
8
|
"cli",
|
|
7
9
|
"mcp",
|
|
10
|
+
"Model Context Protocol",
|
|
11
|
+
"Zod",
|
|
8
12
|
"scaffold",
|
|
9
13
|
"starter",
|
|
10
|
-
"
|
|
14
|
+
"sdk",
|
|
15
|
+
"text-statistics",
|
|
16
|
+
"http",
|
|
17
|
+
"dispatch",
|
|
18
|
+
"guards"
|
|
11
19
|
],
|
|
12
20
|
"license": "MIT",
|
|
13
21
|
"author": "Pooria Arab",
|