outfitter 0.2.7 → 0.3.3
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 +34 -7
- package/dist/actions/add.d.ts +18 -0
- package/dist/actions/add.js +14 -0
- package/dist/actions/check-automation.d.ts +20 -0
- package/dist/actions/check-automation.js +27 -0
- package/dist/actions/check.d.ts +34 -0
- package/dist/actions/check.js +19 -0
- package/dist/actions/demo.d.ts +12 -0
- package/dist/actions/demo.js +11 -0
- package/dist/actions/docs-output-mode.d.ts +4 -0
- package/dist/actions/docs-output-mode.js +8 -0
- package/dist/actions/docs.d.ts +25 -0
- package/dist/actions/docs.js +31 -0
- package/dist/actions/doctor.d.ts +10 -0
- package/dist/actions/doctor.js +15 -0
- package/dist/actions/init.d.ts +28 -0
- package/dist/actions/init.js +31 -0
- package/dist/actions/scaffold.d.ts +19 -0
- package/dist/actions/scaffold.js +21 -0
- package/dist/actions/shared.d.ts +61 -0
- package/dist/actions/shared.js +30 -0
- package/dist/actions/upgrade.d.ts +17 -0
- package/dist/actions/upgrade.js +21 -0
- package/dist/actions.d.ts +1 -1
- package/dist/actions.js +53 -22
- package/dist/cli.js +66 -4
- package/dist/commands/add.js +3 -3
- package/dist/commands/check-action-ceremony.d.ts +55 -0
- package/dist/commands/check-action-ceremony.js +15 -0
- package/dist/commands/check-docs-sentinel.d.ts +27 -0
- package/dist/commands/check-docs-sentinel.js +18 -0
- package/dist/commands/check-orchestrator.d.ts +2 -0
- package/dist/commands/check-orchestrator.js +17 -0
- package/dist/commands/check-preset-versions.d.ts +20 -0
- package/dist/commands/check-preset-versions.js +15 -0
- package/dist/commands/check-publish-guardrails.d.ts +38 -0
- package/dist/commands/check-publish-guardrails.js +19 -0
- package/dist/commands/check-surface-map-format.d.ts +29 -0
- package/dist/commands/check-surface-map-format.js +19 -0
- package/dist/commands/check-surface-map.d.ts +20 -0
- package/dist/commands/check-surface-map.js +15 -0
- package/dist/commands/check-tsdoc.d.ts +2 -21
- package/dist/commands/check-tsdoc.js +3 -2
- package/dist/commands/check.d.ts +2 -0
- package/dist/commands/check.js +3 -3
- package/dist/commands/demo.js +1 -1
- package/dist/commands/docs-api.d.ts +4 -0
- package/dist/commands/docs-api.js +13 -0
- package/dist/commands/docs-export.d.ts +4 -0
- package/dist/commands/docs-export.js +12 -0
- package/dist/commands/docs-list.d.ts +3 -0
- package/dist/commands/docs-list.js +13 -0
- package/dist/commands/docs-module-loader.d.ts +2 -2
- package/dist/commands/docs-module-loader.js +2 -2
- package/dist/commands/docs-search.d.ts +3 -0
- package/dist/commands/docs-search.js +13 -0
- package/dist/commands/docs-show.d.ts +3 -0
- package/dist/commands/docs-show.js +13 -0
- package/dist/commands/docs-types.d.ts +21 -0
- package/dist/commands/doctor.js +4 -12
- package/dist/commands/init-execution.d.ts +8 -0
- package/dist/commands/init-execution.js +11 -0
- package/dist/commands/init-option-resolution.d.ts +5 -0
- package/dist/commands/init-option-resolution.js +14 -0
- package/dist/commands/init-output.d.ts +9 -0
- package/dist/commands/init-output.js +11 -0
- package/dist/commands/init.d.ts +7 -5
- package/dist/commands/init.js +10 -18
- package/dist/commands/jq-utils.d.ts +17 -0
- package/dist/commands/jq-utils.js +8 -0
- package/dist/commands/repo.d.ts +3 -3
- package/dist/commands/repo.js +8 -4
- package/dist/commands/scaffold-output.d.ts +4 -0
- package/dist/commands/scaffold-output.js +11 -0
- package/dist/commands/scaffold-planning.d.ts +65 -0
- package/dist/commands/scaffold-planning.js +20 -0
- package/dist/commands/scaffold.d.ts +3 -3
- package/dist/commands/scaffold.js +10 -16
- package/dist/commands/shared-deps.d.ts +5 -4
- package/dist/commands/shared-deps.js +3 -3
- package/dist/commands/upgrade-apply.d.ts +14 -0
- package/dist/commands/upgrade-apply.js +8 -0
- package/dist/commands/upgrade-codemods.d.ts +5 -0
- package/dist/commands/upgrade-codemods.js +4 -5
- package/dist/commands/upgrade-latest-version.d.ts +8 -0
- package/dist/commands/upgrade-latest-version.js +8 -0
- package/dist/commands/upgrade-migration-docs.d.ts +3 -0
- package/dist/commands/upgrade-migration-docs.js +15 -0
- package/dist/commands/upgrade-migration-frontmatter.d.ts +2 -0
- package/dist/commands/upgrade-migration-frontmatter.js +10 -0
- package/dist/commands/upgrade-migration-guides.d.ts +5 -0
- package/dist/commands/upgrade-migration-guides.js +10 -0
- package/dist/commands/upgrade-output.d.ts +5 -0
- package/dist/commands/upgrade-output.js +11 -0
- package/dist/commands/upgrade-planner.js +1 -1
- package/dist/commands/upgrade-report.d.ts +5 -0
- package/dist/commands/upgrade-report.js +8 -0
- package/dist/commands/upgrade-workspace.js +2 -2
- package/dist/commands/upgrade.d.ts +4 -220
- package/dist/commands/upgrade.js +21 -9
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +2 -30
- package/dist/create/planner.d.ts +2 -2
- package/dist/create/planner.js +80 -17
- package/dist/create/presets.d.ts +2 -2
- package/dist/create/presets.js +2 -2
- package/dist/create/types.d.ts +1 -1
- package/dist/engine/blocks.d.ts +2 -2
- package/dist/engine/blocks.js +5 -5
- package/dist/engine/collector.d.ts +1 -1
- package/dist/engine/collector.js +1 -1
- package/dist/engine/config.d.ts +2 -2
- package/dist/engine/config.js +4 -4
- package/dist/engine/dependency-versions.d.ts +13 -8
- package/dist/engine/dependency-versions.js +4 -4
- package/dist/engine/executor.d.ts +2 -2
- package/dist/engine/executor.js +149 -12
- package/dist/engine/index.d.ts +9 -7
- package/dist/engine/index.js +17 -31
- package/dist/engine/names.js +1 -1
- package/dist/engine/post-scaffold.d.ts +2 -2
- package/dist/engine/post-scaffold.js +1 -1
- package/dist/engine/preset.d.ts +3 -0
- package/dist/engine/preset.js +17 -0
- package/dist/engine/render-plan.d.ts +1 -1
- package/dist/engine/render-plan.js +1 -1
- package/dist/engine/template.d.ts +3 -2
- package/dist/engine/template.js +24 -7
- package/dist/engine/types.d.ts +1 -1
- package/dist/engine/types.js +1 -1
- package/dist/engine/workspace.d.ts +2 -2
- package/dist/engine/workspace.js +1 -1
- package/dist/index.d.ts +17 -398
- package/dist/index.js +7 -164
- package/dist/manifest.js +2 -2
- package/dist/output-mode.js +1 -1
- package/dist/shared/{outfitter-6fgk6adm.d.ts → outfitter-1tfa9hke.d.ts} +16 -1
- package/dist/shared/{outfitter-6bkqjk86.d.ts → outfitter-2nx0k4b3.d.ts} +1 -0
- package/dist/shared/outfitter-2ysjerp6.d.ts +44 -0
- package/dist/shared/outfitter-2z61gp5w.js +29 -0
- package/dist/shared/outfitter-34vg353f.d.ts +82 -0
- package/dist/shared/{outfitter-5yjr404v.d.ts → outfitter-3dq4r10s.d.ts} +5 -3
- package/dist/shared/outfitter-3rcrvva8.js +103 -0
- package/dist/shared/{outfitter-79vfxt6y.js → outfitter-3tx3adgj.js} +12 -3
- package/dist/shared/{outfitter-63gse8fv.js → outfitter-507ra35w.js} +33 -64
- package/dist/shared/outfitter-56jq0rh2.d.ts +42 -0
- package/dist/shared/{outfitter-r419zfgs.d.ts → outfitter-58rn1sj1.d.ts} +1 -1
- package/dist/shared/outfitter-5d9wbzhh.d.ts +19 -0
- package/dist/shared/outfitter-5j7zee11.d.ts +180 -0
- package/dist/shared/{outfitter-s7jetkge.d.ts → outfitter-5r6q2749.d.ts} +1 -1
- package/dist/shared/outfitter-5vx1bp7h.js +41 -0
- package/dist/shared/outfitter-6ddf91vh.js +190 -0
- package/dist/shared/{outfitter-mt7d1ek2.js → outfitter-6mpkh3zn.js} +39 -305
- package/dist/shared/{outfitter-ybbazsxq.d.ts → outfitter-6rtcemk7.d.ts} +8 -4
- package/dist/shared/{outfitter-9x1brcmq.js → outfitter-6t7xeyg1.js} +13 -38
- package/dist/shared/outfitter-738z4c37.js +262 -0
- package/dist/shared/{outfitter-yvksv5qb.js → outfitter-76k25svs.js} +4 -4
- package/dist/shared/outfitter-7n7vsz95.js +101 -0
- package/dist/shared/outfitter-7q9fnbwa.js +60 -0
- package/dist/shared/outfitter-84chvazx.js +480 -0
- package/dist/shared/outfitter-8ggmja91.js +301 -0
- package/dist/shared/{outfitter-qakwgrrh.d.ts → outfitter-8kmak0wc.d.ts} +1 -1
- package/dist/shared/outfitter-940h0x7b.js +71 -0
- package/dist/shared/{outfitter-fn20r49x.d.ts → outfitter-954y4mzx.d.ts} +1 -1
- package/dist/shared/outfitter-b9cpnr7e.js +110 -0
- package/dist/shared/outfitter-c7sbs7es.js +92 -0
- package/dist/shared/outfitter-cyhzstz0.js +93 -0
- package/dist/shared/{outfitter-n9g1zk4x.d.ts → outfitter-cyvr4r8d.d.ts} +3 -2
- package/dist/shared/outfitter-d0kqashd.d.ts +98 -0
- package/dist/shared/outfitter-dx4hn4ta.js +325 -0
- package/dist/shared/{outfitter-bn9c8p2e.js → outfitter-e84cr97g.js} +37 -9
- package/dist/shared/outfitter-ec83h4v2.js +17 -0
- package/dist/shared/{outfitter-vh4xgb93.js → outfitter-ekb6t1zz.js} +4 -4
- package/dist/shared/outfitter-ex8gn945.js +51 -0
- package/dist/shared/outfitter-f3a70135.js +75 -0
- package/dist/shared/outfitter-fbvfd5zq.d.ts +13 -0
- package/dist/shared/outfitter-fj2v5ffz.js +165 -0
- package/dist/shared/outfitter-fx1m251y.js +122 -0
- package/dist/shared/outfitter-fxry5n58.js +254 -0
- package/dist/shared/outfitter-g3hvjshg.js +1 -0
- package/dist/shared/{outfitter-f9znfhkn.d.ts → outfitter-gdc7b7de.d.ts} +1 -1
- package/dist/shared/outfitter-gyayfx5r.js +156 -0
- package/dist/shared/outfitter-h0wmtxw8.d.ts +23 -0
- package/dist/shared/{outfitter-z5sx06qe.d.ts → outfitter-hcexcvxe.d.ts} +1 -1
- package/dist/shared/outfitter-hf5bj2gq.js +117 -0
- package/dist/shared/{outfitter-e9rrfekb.d.ts → outfitter-htx4asgr.d.ts} +4 -3
- package/dist/shared/outfitter-jkct38dh.js +53 -0
- package/dist/shared/outfitter-jwxggvz4.js +42 -0
- package/dist/shared/outfitter-k6zyvg2n.js +306 -0
- package/dist/shared/outfitter-mstr60zz.js +215 -0
- package/dist/shared/outfitter-n0ed012k.js +101 -0
- package/dist/shared/outfitter-n13pqaft.js +19 -0
- package/dist/shared/outfitter-nxvjxrmw.d.ts +48 -0
- package/dist/shared/outfitter-p2wn07b7.js +160 -0
- package/dist/shared/{outfitter-5y646xzk.js → outfitter-px5sv5gn.js} +29 -9
- package/dist/shared/outfitter-q1g58t85.js +8 -0
- package/dist/shared/{outfitter-pj9vp00r.js → outfitter-qsd5638j.js} +26 -249
- package/dist/shared/outfitter-qsrx7m4w.js +72 -0
- package/dist/shared/outfitter-r2awqszh.d.ts +52 -0
- package/dist/shared/outfitter-rdpw2sbp.d.ts +77 -0
- package/dist/shared/outfitter-rp89dafm.js +109 -0
- package/dist/shared/outfitter-s1c0whzj.js +121 -0
- package/dist/shared/{outfitter-w1j80j1r.js → outfitter-ssrtakh3.js} +21 -5
- package/dist/shared/outfitter-ssynegbs.js +167 -0
- package/dist/shared/{outfitter-zwyvewr1.js → outfitter-svts4wk2.js} +1 -1
- package/dist/shared/outfitter-tavatb5p.js +166 -0
- package/dist/shared/outfitter-tqznjgbm.js +44 -0
- package/dist/shared/{outfitter-yraebrmw.d.ts → outfitter-wcrp7d7m.d.ts} +1 -1
- package/dist/shared/outfitter-wkt0a0ra.js +67 -0
- package/dist/shared/{outfitter-ha89qf8q.js → outfitter-wrcqq29p.js} +4 -4
- package/dist/shared/outfitter-wyg1tpp5.d.ts +43 -0
- package/dist/shared/outfitter-x0vpb7tj.js +126 -0
- package/dist/shared/{outfitter-m44n0qzw.js → outfitter-x39awx8g.js} +11 -26
- package/dist/shared/outfitter-x4cc5xsq.js +168 -0
- package/dist/shared/outfitter-x8w5sjnd.d.ts +39 -0
- package/dist/shared/{outfitter-amc4jbs1.d.ts → outfitter-xr6g13nz.d.ts} +2 -2
- package/dist/shared/outfitter-xs94pkfe.js +106 -0
- package/dist/shared/outfitter-y37yfehn.d.ts +37 -0
- package/dist/shared/{outfitter-fhnjpjwc.d.ts → outfitter-y6ee0k45.d.ts} +1 -1
- package/dist/shared/{outfitter-j833sxws.js → outfitter-ydw7x6bh.js} +1 -1
- package/dist/shared/outfitter-yhb23pjc.js +89 -0
- package/dist/shared/{outfitter-mtbpabf3.js → outfitter-ypcvwg1s.js} +1 -1
- package/dist/shared/outfitter-znbqe5zy.d.ts +45 -0
- package/dist/shared/{outfitter-dpj9erew.d.ts → outfitter-zng6w0t9.d.ts} +1 -1
- package/dist/targets/index.d.ts +2 -2
- package/dist/targets/index.js +2 -3
- package/dist/targets/registry.d.ts +2 -2
- package/dist/targets/registry.js +207 -14
- package/dist/targets/types.d.ts +1 -1
- package/package.json +203 -40
- package/dist/shared/chunk-x6644tk8.js +0 -6491
- package/dist/shared/outfitter-20f6a2n4.js +0 -35
- package/dist/shared/outfitter-5akzvppx.js +0 -125
- package/dist/shared/outfitter-7ch26yq8.js +0 -885
- package/dist/shared/outfitter-ehp18x1n.js +0 -1
- package/dist/shared/outfitter-h3q6ae6d.d.ts +0 -48
- package/dist/shared/outfitter-hvsaxgcp.js +0 -1
- package/dist/shared/outfitter-p71qb0f0.js +0 -82
- package/dist/shared/outfitter-pcj9gg2g.js +0 -909
- package/dist/shared/outfitter-xe5mzgdc.js +0 -208
- package/dist/shared/outfitter-z0we32cp.d.ts +0 -63
- package/template-versions.json +0 -22
- package/templates/.gitkeep +0 -0
- package/templates/basic/.gitignore.template +0 -30
- package/templates/basic/.lefthook.yml.template +0 -26
- package/templates/basic/package.json.template +0 -46
- package/templates/basic/src/index.ts.template +0 -26
- package/templates/basic/tsconfig.json.template +0 -34
- package/templates/cli/.gitignore.template +0 -4
- package/templates/cli/.lefthook.yml.template +0 -26
- package/templates/cli/README.md.template +0 -35
- package/templates/cli/biome.json.template +0 -4
- package/templates/cli/package.json.template +0 -53
- package/templates/cli/src/cli.ts.template +0 -8
- package/templates/cli/src/index.ts.template +0 -7
- package/templates/cli/src/program.ts.template +0 -31
- package/templates/cli/tsconfig.json.template +0 -34
- package/templates/daemon/.gitignore.template +0 -4
- package/templates/daemon/.lefthook.yml.template +0 -26
- package/templates/daemon/README.md.template +0 -67
- package/templates/daemon/biome.json.template +0 -4
- package/templates/daemon/package.json.template +0 -56
- package/templates/daemon/src/cli.ts.template +0 -96
- package/templates/daemon/src/daemon-main.ts.template +0 -79
- package/templates/daemon/src/daemon.ts.template +0 -11
- package/templates/daemon/src/index.ts.template +0 -7
- package/templates/daemon/tsconfig.json.template +0 -23
- package/templates/full-stack/.gitignore.template +0 -30
- package/templates/full-stack/README.md.template +0 -30
- package/templates/full-stack/apps/cli/package.json.template +0 -39
- package/templates/full-stack/apps/cli/src/cli.ts.template +0 -24
- package/templates/full-stack/apps/cli/src/index.test.ts.template +0 -18
- package/templates/full-stack/apps/cli/src/index.ts.template +0 -5
- package/templates/full-stack/apps/cli/tsconfig.json.template +0 -37
- package/templates/full-stack/apps/mcp/package.json.template +0 -40
- package/templates/full-stack/apps/mcp/src/index.test.ts.template +0 -18
- package/templates/full-stack/apps/mcp/src/index.ts.template +0 -6
- package/templates/full-stack/apps/mcp/src/mcp.ts.template +0 -22
- package/templates/full-stack/apps/mcp/src/server.ts.template +0 -10
- package/templates/full-stack/apps/mcp/tsconfig.json.template +0 -37
- package/templates/full-stack/package.json.template +0 -16
- package/templates/full-stack/packages/core/package.json.template +0 -36
- package/templates/full-stack/packages/core/src/handlers.ts.template +0 -31
- package/templates/full-stack/packages/core/src/index.test.ts.template +0 -30
- package/templates/full-stack/packages/core/src/index.ts.template +0 -8
- package/templates/full-stack/packages/core/src/types.ts.template +0 -13
- package/templates/full-stack/packages/core/tsconfig.json.template +0 -34
- package/templates/library/.gitignore.template +0 -30
- package/templates/library/README.md.template +0 -29
- package/templates/library/bunup.config.ts.template +0 -20
- package/templates/library/package.json.template +0 -55
- package/templates/library/src/handlers.ts.template +0 -31
- package/templates/library/src/index.test.ts.template +0 -35
- package/templates/library/src/index.ts.template +0 -8
- package/templates/library/src/types.ts.template +0 -13
- package/templates/library/tsconfig.json.template +0 -34
- package/templates/mcp/.gitignore.template +0 -4
- package/templates/mcp/.lefthook.yml.template +0 -26
- package/templates/mcp/README.md.template +0 -54
- package/templates/mcp/biome.json.template +0 -4
- package/templates/mcp/package.json.template +0 -53
- package/templates/mcp/src/index.ts.template +0 -7
- package/templates/mcp/src/mcp.ts.template +0 -33
- package/templates/mcp/src/server.ts.template +0 -8
- package/templates/mcp/tsconfig.json.template +0 -23
- package/templates/minimal/.gitignore.template +0 -30
- package/templates/minimal/.lefthook.yml.template +0 -26
- package/templates/minimal/package.json.template +0 -53
- package/templates/minimal/src/index.ts.template +0 -26
- package/templates/minimal/tsconfig.json.template +0 -34
- /package/dist/{shared/outfitter-344t1r38.js → commands/docs-types.js} +0 -0
- /package/dist/shared/{outfitter-mdt37hqm.js → outfitter-eepj7rf7.js} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Lefthook configuration
|
|
2
|
-
# https://github.com/evilmartians/lefthook
|
|
3
|
-
|
|
4
|
-
pre-commit:
|
|
5
|
-
parallel: true
|
|
6
|
-
commands:
|
|
7
|
-
format:
|
|
8
|
-
glob: "*.{js,ts,tsx,json,md}"
|
|
9
|
-
run: bunx biome format --no-errors-on-unmatched {staged_files}
|
|
10
|
-
stage_fixed: true
|
|
11
|
-
|
|
12
|
-
lint:
|
|
13
|
-
glob: "*.{js,ts,tsx}"
|
|
14
|
-
run: bunx biome lint --no-errors-on-unmatched {staged_files}
|
|
15
|
-
|
|
16
|
-
typecheck:
|
|
17
|
-
glob: "*.{ts,tsx}"
|
|
18
|
-
run: bun run typecheck
|
|
19
|
-
|
|
20
|
-
pre-push:
|
|
21
|
-
parallel: false
|
|
22
|
-
commands:
|
|
23
|
-
verify:
|
|
24
|
-
# TDD-aware strict verification with RED-phase branch carveout
|
|
25
|
-
# (*-tests, */tests, *_tests).
|
|
26
|
-
run: bunx @outfitter/tooling pre-push
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
{{description}}
|
|
4
|
-
|
|
5
|
-
A background daemon with CLI control interface.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
bun add {{packageName}}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# Start daemon in background
|
|
17
|
-
{{binName}} start
|
|
18
|
-
|
|
19
|
-
# Start daemon in foreground (for debugging)
|
|
20
|
-
{{binName}} start --foreground
|
|
21
|
-
|
|
22
|
-
# Check status
|
|
23
|
-
{{binName}} status
|
|
24
|
-
|
|
25
|
-
# Stop daemon
|
|
26
|
-
{{binName}} stop
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Endpoints
|
|
30
|
-
|
|
31
|
-
The daemon exposes a Unix socket with the following endpoints:
|
|
32
|
-
|
|
33
|
-
### GET /health
|
|
34
|
-
|
|
35
|
-
Returns daemon health information:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"status": "ok",
|
|
40
|
-
"uptime": 12345,
|
|
41
|
-
"version": "{{version}}"
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### POST /shutdown
|
|
46
|
-
|
|
47
|
-
Gracefully shuts down the daemon.
|
|
48
|
-
|
|
49
|
-
## Development
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Install dependencies
|
|
53
|
-
bun install
|
|
54
|
-
|
|
55
|
-
# Run daemon in foreground
|
|
56
|
-
bun run dev
|
|
57
|
-
|
|
58
|
-
# Build
|
|
59
|
-
bun run build
|
|
60
|
-
|
|
61
|
-
# Run tests
|
|
62
|
-
bun run test
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## License
|
|
66
|
-
|
|
67
|
-
MIT
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "{{description}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"{{binName}}": "./dist/cli.js",
|
|
8
|
-
"{{binName}}d": "./dist/daemon.js"
|
|
9
|
-
},
|
|
10
|
-
"main": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "bun build src/cli.ts src/daemon.ts --outdir dist --target bun && bun build src/index.ts --outdir dist --target bun --sourcemap",
|
|
20
|
-
"dev": "bun --watch src/daemon.ts -- --foreground",
|
|
21
|
-
"dev:daemon": "bun --watch src/daemon.ts -- --foreground",
|
|
22
|
-
"typecheck": "tsc --noEmit",
|
|
23
|
-
"check": "ultracite check",
|
|
24
|
-
"verify:ci": "bun run typecheck && bun run check && bun run build && bun run test",
|
|
25
|
-
"test": "bun test",
|
|
26
|
-
"test:watch": "bun test --watch",
|
|
27
|
-
"lint": "biome check .",
|
|
28
|
-
"lint:fix": "biome check . --write",
|
|
29
|
-
"format": "biome format --write .",
|
|
30
|
-
"clean:artifacts": "rm -rf dist .turbo"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@outfitter/contracts": "workspace:*",
|
|
34
|
-
"@outfitter/types": "workspace:*",
|
|
35
|
-
"@outfitter/daemon": "workspace:*",
|
|
36
|
-
"@outfitter/cli": "workspace:*",
|
|
37
|
-
"@outfitter/logging": "workspace:*",
|
|
38
|
-
"commander": "^14.0.2"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@biomejs/biome": "^2.4.4",
|
|
42
|
-
"@outfitter/tooling": "workspace:*",
|
|
43
|
-
"@types/bun": "^1.3.9",
|
|
44
|
-
"lefthook": "^2.1.1",
|
|
45
|
-
"typescript": "^5.9.3",
|
|
46
|
-
"ultracite": "^7.2.3"
|
|
47
|
-
},
|
|
48
|
-
"outfitter": {
|
|
49
|
-
"template": {
|
|
50
|
-
"kind": "runnable",
|
|
51
|
-
"placement": "apps",
|
|
52
|
-
"surfaces": ["cli", "daemon"]
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"license": "MIT"
|
|
56
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* {{projectName}} CLI entry point
|
|
4
|
-
*
|
|
5
|
-
* Commands: start, stop, restart, status
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { createCLI, command } from "@outfitter/cli";
|
|
9
|
-
import { createLogger } from "@outfitter/logging";
|
|
10
|
-
import { spawn } from "node:child_process";
|
|
11
|
-
import { getSocketPath, getLockPath, isDaemonAlive } from "@outfitter/daemon";
|
|
12
|
-
|
|
13
|
-
const logger = createLogger({ name: "{{binName}}" });
|
|
14
|
-
|
|
15
|
-
const TOOL_NAME = "{{binName}}";
|
|
16
|
-
const socketPath = getSocketPath(TOOL_NAME);
|
|
17
|
-
const lockPath = getLockPath(TOOL_NAME);
|
|
18
|
-
|
|
19
|
-
const program = createCLI({
|
|
20
|
-
name: "{{binName}}",
|
|
21
|
-
version: "{{version}}",
|
|
22
|
-
description: "{{description}}",
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
program.register(
|
|
26
|
-
command("start")
|
|
27
|
-
.description("Start the daemon")
|
|
28
|
-
.option("-f, --foreground", "Run in foreground")
|
|
29
|
-
.action(async ({ flags }) => {
|
|
30
|
-
const foreground = Boolean((flags as { foreground?: boolean }).foreground);
|
|
31
|
-
|
|
32
|
-
if (await isDaemonAlive(lockPath)) {
|
|
33
|
-
logger.warn`Daemon is already running`;
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (foreground) {
|
|
38
|
-
// Run in foreground - import and run daemon directly
|
|
39
|
-
const { runDaemon } = await import("./daemon-main.js");
|
|
40
|
-
await runDaemon();
|
|
41
|
-
} else {
|
|
42
|
-
// Spawn daemon in background
|
|
43
|
-
const daemon = spawn(process.execPath, [import.meta.dir + "/daemon.js"], {
|
|
44
|
-
detached: true,
|
|
45
|
-
stdio: "ignore",
|
|
46
|
-
});
|
|
47
|
-
daemon.unref();
|
|
48
|
-
logger.info`Daemon started with PID ${daemon.pid}`;
|
|
49
|
-
}
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
program.register(
|
|
54
|
-
command("stop")
|
|
55
|
-
.description("Stop the daemon")
|
|
56
|
-
.action(async () => {
|
|
57
|
-
if (!(await isDaemonAlive(lockPath))) {
|
|
58
|
-
logger.warn`Daemon is not running`;
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
// Signal daemon to stop via HTTP
|
|
62
|
-
try {
|
|
63
|
-
const response = await fetch(`http://unix:${socketPath}:/shutdown`, {
|
|
64
|
-
method: "POST",
|
|
65
|
-
});
|
|
66
|
-
if (response.ok) {
|
|
67
|
-
logger.info`Daemon stopped`;
|
|
68
|
-
}
|
|
69
|
-
} catch {
|
|
70
|
-
logger.error`Failed to stop daemon`;
|
|
71
|
-
process.exit(1);
|
|
72
|
-
}
|
|
73
|
-
}),
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
program.register(
|
|
77
|
-
command("status")
|
|
78
|
-
.description("Check daemon status")
|
|
79
|
-
.action(async () => {
|
|
80
|
-
if (await isDaemonAlive(lockPath)) {
|
|
81
|
-
logger.info`Daemon is running`;
|
|
82
|
-
// Fetch health info
|
|
83
|
-
try {
|
|
84
|
-
const response = await fetch(`http://unix:${socketPath}:/health`);
|
|
85
|
-
const health = await response.json();
|
|
86
|
-
console.log(JSON.stringify(health, null, 2));
|
|
87
|
-
} catch {
|
|
88
|
-
logger.warn`Could not fetch health info`;
|
|
89
|
-
}
|
|
90
|
-
} else {
|
|
91
|
-
logger.info`Daemon is not running`;
|
|
92
|
-
}
|
|
93
|
-
}),
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
program.parse(process.argv);
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {{projectName}} daemon main logic
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { createLogger } from "@outfitter/logging";
|
|
6
|
-
import {
|
|
7
|
-
getSocketPath,
|
|
8
|
-
getLockPath,
|
|
9
|
-
getDaemonDir,
|
|
10
|
-
acquireDaemonLock,
|
|
11
|
-
releaseDaemonLock,
|
|
12
|
-
} from "@outfitter/daemon";
|
|
13
|
-
import { mkdir } from "node:fs/promises";
|
|
14
|
-
|
|
15
|
-
const logger = createLogger({ name: "{{binName}}d" });
|
|
16
|
-
|
|
17
|
-
const TOOL_NAME = "{{binName}}";
|
|
18
|
-
const startTime = Date.now();
|
|
19
|
-
|
|
20
|
-
export async function runDaemon(): Promise<void> {
|
|
21
|
-
const socketPath = getSocketPath(TOOL_NAME);
|
|
22
|
-
const lockPath = getLockPath(TOOL_NAME);
|
|
23
|
-
const daemonDir = getDaemonDir(TOOL_NAME);
|
|
24
|
-
|
|
25
|
-
// Ensure daemon directory exists
|
|
26
|
-
await mkdir(daemonDir, { recursive: true });
|
|
27
|
-
|
|
28
|
-
// Acquire lock
|
|
29
|
-
const lockResult = await acquireDaemonLock(lockPath);
|
|
30
|
-
if (!lockResult.isOk()) {
|
|
31
|
-
logger.error`Failed to acquire lock: ${lockResult.error.message}`;
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
const lock = lockResult.value;
|
|
35
|
-
|
|
36
|
-
logger.info`Daemon starting on ${socketPath}`;
|
|
37
|
-
|
|
38
|
-
// Create HTTP server on Unix socket
|
|
39
|
-
const server = Bun.serve({
|
|
40
|
-
unix: socketPath,
|
|
41
|
-
fetch(request) {
|
|
42
|
-
const url = new URL(request.url);
|
|
43
|
-
|
|
44
|
-
if (url.pathname === "/health") {
|
|
45
|
-
return Response.json({
|
|
46
|
-
status: "ok",
|
|
47
|
-
uptime: Date.now() - startTime,
|
|
48
|
-
version: "{{version}}",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (url.pathname === "/shutdown" && request.method === "POST") {
|
|
53
|
-
logger.info`Shutdown requested`;
|
|
54
|
-
// Schedule shutdown
|
|
55
|
-
setTimeout(async () => {
|
|
56
|
-
await releaseDaemonLock(lock);
|
|
57
|
-
server.stop();
|
|
58
|
-
process.exit(0);
|
|
59
|
-
}, 100);
|
|
60
|
-
return new Response("Shutting down");
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return new Response("Not found", { status: 404 });
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Handle signals
|
|
68
|
-
const shutdown = async () => {
|
|
69
|
-
logger.info`Received shutdown signal`;
|
|
70
|
-
await releaseDaemonLock(lock);
|
|
71
|
-
server.stop();
|
|
72
|
-
process.exit(0);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
process.on("SIGTERM", shutdown);
|
|
76
|
-
process.on("SIGINT", shutdown);
|
|
77
|
-
|
|
78
|
-
logger.info`Daemon running`;
|
|
79
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"verbatimModuleSyntax": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"declarationDir": "dist",
|
|
12
|
-
"outDir": "dist",
|
|
13
|
-
"rootDir": "src",
|
|
14
|
-
"types": ["bun-types"],
|
|
15
|
-
"noImplicitAny": true,
|
|
16
|
-
"strictNullChecks": true,
|
|
17
|
-
"noUncheckedIndexedAccess": true,
|
|
18
|
-
"exactOptionalPropertyTypes": true,
|
|
19
|
-
"noPropertyAccessFromIndexSignature": true
|
|
20
|
-
},
|
|
21
|
-
"include": ["src"],
|
|
22
|
-
"exclude": ["node_modules", "dist"]
|
|
23
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
**/dist/
|
|
6
|
-
|
|
7
|
-
# IDE
|
|
8
|
-
.idea/
|
|
9
|
-
.vscode/
|
|
10
|
-
*.swp
|
|
11
|
-
*.swo
|
|
12
|
-
|
|
13
|
-
# OS
|
|
14
|
-
.DS_Store
|
|
15
|
-
Thumbs.db
|
|
16
|
-
|
|
17
|
-
# Logs
|
|
18
|
-
*.log
|
|
19
|
-
npm-debug.log*
|
|
20
|
-
|
|
21
|
-
# Environment
|
|
22
|
-
.env
|
|
23
|
-
.env.local
|
|
24
|
-
.env.*.local
|
|
25
|
-
|
|
26
|
-
# Test coverage
|
|
27
|
-
coverage/
|
|
28
|
-
|
|
29
|
-
# Bun
|
|
30
|
-
bun.lockb
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
{{description}}
|
|
4
|
-
|
|
5
|
-
## Workspace Layout
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
{{projectName}}/
|
|
9
|
-
├── apps/
|
|
10
|
-
│ ├── cli/ # CLI surface
|
|
11
|
-
│ └── mcp/ # MCP server surface
|
|
12
|
-
└── packages/
|
|
13
|
-
└── core/ # Shared handler layer
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Development
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Install dependencies for all workspace members
|
|
20
|
-
bun install
|
|
21
|
-
|
|
22
|
-
# Build all packages
|
|
23
|
-
bun run build
|
|
24
|
-
|
|
25
|
-
# Typecheck all packages
|
|
26
|
-
bun run typecheck
|
|
27
|
-
|
|
28
|
-
# Run all tests
|
|
29
|
-
bun run test
|
|
30
|
-
```
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}-cli",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "CLI surface for {{projectName}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"{{projectName}}": "./dist/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/index.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "bun build src/cli.ts --outdir dist --target bun && bun build src/index.ts --outdir dist --target bun --sourcemap",
|
|
19
|
-
"dev": "bun --watch src/cli.ts",
|
|
20
|
-
"test": "bun test",
|
|
21
|
-
"test:watch": "bun test --watch",
|
|
22
|
-
"typecheck": "tsc --noEmit",
|
|
23
|
-
"lint": "biome check .",
|
|
24
|
-
"lint:fix": "biome check . --write",
|
|
25
|
-
"format": "biome format --write .",
|
|
26
|
-
"clean:artifacts": "rm -rf dist .turbo"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"{{packageName}}-core": "workspace:*",
|
|
30
|
-
"@outfitter/cli": "workspace:*",
|
|
31
|
-
"@outfitter/contracts": "workspace:*"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@biomejs/biome": "^2.4.4",
|
|
35
|
-
"@types/bun": "^1.3.9",
|
|
36
|
-
"typescript": "^5.9.3"
|
|
37
|
-
},
|
|
38
|
-
"license": "MIT"
|
|
39
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createContext } from "@outfitter/contracts";
|
|
2
|
-
import { output } from "@outfitter/cli";
|
|
3
|
-
import { createGreeting } from "{{packageName}}-core";
|
|
4
|
-
|
|
5
|
-
export async function runCli(argv: readonly string[] = process.argv): Promise<void> {
|
|
6
|
-
const args = argv.slice(2);
|
|
7
|
-
const name =
|
|
8
|
-
args.find((arg) => !arg.startsWith("-")) ?? "World";
|
|
9
|
-
const excited = args.includes("--excited");
|
|
10
|
-
const result = await createGreeting(
|
|
11
|
-
{ name, excited },
|
|
12
|
-
createContext({ cwd: process.cwd(), env: process.env })
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
if (result.isErr()) {
|
|
16
|
-
throw result.error;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
await output(result.value.message, { mode: "human" });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (import.meta.main) {
|
|
23
|
-
await runCli();
|
|
24
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import { createContext } from "@outfitter/contracts";
|
|
3
|
-
import { createGreeting } from "{{packageName}}-core";
|
|
4
|
-
|
|
5
|
-
describe("cli surface", () => {
|
|
6
|
-
test("can use shared core handler", async () => {
|
|
7
|
-
const result = await createGreeting(
|
|
8
|
-
{ name: "CLI", excited: true },
|
|
9
|
-
createContext({ cwd: process.cwd(), env: process.env })
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
expect(result.isOk()).toBe(true);
|
|
13
|
-
if (result.isErr()) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
expect(result.value.message).toBe("Hello, CLI!");
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"lib": ["ESNext"],
|
|
8
|
-
"types": ["@types/bun"],
|
|
9
|
-
"baseUrl": ".",
|
|
10
|
-
"paths": {
|
|
11
|
-
"{{packageName}}-core": ["../../packages/core/src/index.ts"]
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noImplicitAny": true,
|
|
16
|
-
"strictNullChecks": true,
|
|
17
|
-
"noUncheckedIndexedAccess": true,
|
|
18
|
-
"exactOptionalPropertyTypes": true,
|
|
19
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
20
|
-
"noImplicitReturns": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"declarationMap": true,
|
|
25
|
-
"sourceMap": true,
|
|
26
|
-
"outDir": "./dist",
|
|
27
|
-
|
|
28
|
-
"esModuleInterop": true,
|
|
29
|
-
"forceConsistentCasingInFileNames": true,
|
|
30
|
-
"isolatedModules": true,
|
|
31
|
-
"verbatimModuleSyntax": true,
|
|
32
|
-
"skipLibCheck": true,
|
|
33
|
-
"resolveJsonModule": true
|
|
34
|
-
},
|
|
35
|
-
"include": ["src/**/*"],
|
|
36
|
-
"exclude": ["node_modules", "dist"]
|
|
37
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}-mcp",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "MCP surface for {{projectName}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"{{projectName}}-mcp": "./dist/server.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/index.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "bun build src/server.ts --outdir dist --target bun && bun build src/index.ts --outdir dist --target bun --sourcemap",
|
|
19
|
-
"dev": "bun --watch src/server.ts",
|
|
20
|
-
"test": "bun test",
|
|
21
|
-
"test:watch": "bun test --watch",
|
|
22
|
-
"typecheck": "tsc --noEmit",
|
|
23
|
-
"lint": "biome check .",
|
|
24
|
-
"lint:fix": "biome check . --write",
|
|
25
|
-
"format": "biome format --write .",
|
|
26
|
-
"clean:artifacts": "rm -rf dist .turbo"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"{{packageName}}-core": "workspace:*",
|
|
30
|
-
"@outfitter/contracts": "workspace:*",
|
|
31
|
-
"@outfitter/mcp": "workspace:*",
|
|
32
|
-
"zod": "^4.3.5"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@biomejs/biome": "^2.4.4",
|
|
36
|
-
"@types/bun": "^1.3.9",
|
|
37
|
-
"typescript": "^5.9.3"
|
|
38
|
-
},
|
|
39
|
-
"license": "MIT"
|
|
40
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import { createContext } from "@outfitter/contracts";
|
|
3
|
-
import { createGreeting } from "{{packageName}}-core";
|
|
4
|
-
|
|
5
|
-
describe("mcp surface", () => {
|
|
6
|
-
test("can use shared core handler", async () => {
|
|
7
|
-
const result = await createGreeting(
|
|
8
|
-
{ name: "MCP" },
|
|
9
|
-
createContext({ cwd: process.cwd(), env: process.env })
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
expect(result.isOk()).toBe(true);
|
|
13
|
-
if (result.isErr()) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
expect(result.value.message).toBe("Hello, MCP.");
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createGreeting } from "{{packageName}}-core";
|
|
2
|
-
import { createMcpServer, defineTool } from "@outfitter/mcp";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
|
|
5
|
-
const server = createMcpServer({
|
|
6
|
-
name: "{{projectName}}-mcp",
|
|
7
|
-
version: "{{version}}",
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const greetTool = defineTool({
|
|
11
|
-
name: "greet",
|
|
12
|
-
description: "Generate greeting via shared core handler",
|
|
13
|
-
inputSchema: z.object({
|
|
14
|
-
name: z.string().default("World").describe("Name to greet"),
|
|
15
|
-
excited: z.boolean().default(false),
|
|
16
|
-
}),
|
|
17
|
-
handler: async (input, ctx) => createGreeting(input, ctx),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
server.registerTool(greetTool);
|
|
21
|
-
|
|
22
|
-
export { server };
|