@tingrudeng/forgeflow-dispatcher 0.1.0-beta.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/PUBLISHING.md +47 -0
- package/README.md +97 -0
- package/dist/cli.js +10150 -0
- package/package.json +47 -0
package/PUBLISHING.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Publishing @tingrudeng/forgeflow-dispatcher
|
|
2
|
+
|
|
3
|
+
This package is prepared for public npm publishing as the installable ForgeFlow dispatcher/control-plane runtime.
|
|
4
|
+
|
|
5
|
+
## Verification Before Publish
|
|
6
|
+
|
|
7
|
+
Run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm --filter @tingrudeng/forgeflow-dispatcher test
|
|
11
|
+
pnpm --filter @tingrudeng/forgeflow-dispatcher typecheck
|
|
12
|
+
pnpm --filter @tingrudeng/forgeflow-dispatcher build
|
|
13
|
+
pnpm --filter @tingrudeng/forgeflow-dispatcher pack
|
|
14
|
+
pnpm test
|
|
15
|
+
pnpm typecheck
|
|
16
|
+
git diff --check
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Install Smoke Check
|
|
20
|
+
|
|
21
|
+
After a release, verify:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @tingrudeng/forgeflow-dispatcher
|
|
25
|
+
forgeflow-dispatcher init
|
|
26
|
+
forgeflow-dispatcher doctor
|
|
27
|
+
forgeflow-dispatcher version
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Publishing Model
|
|
31
|
+
|
|
32
|
+
This repository uses GitHub Actions Trusted Publishing for `@tingrudeng/*` public packages.
|
|
33
|
+
|
|
34
|
+
Normal path:
|
|
35
|
+
- merge the versioned `packages/forgeflow-dispatcher/package.json` change to `main`
|
|
36
|
+
- let `.github/workflows/release.yml` auto-detect and publish the exact version
|
|
37
|
+
|
|
38
|
+
Manual path:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node scripts/release-package.js --package forgeflow-dispatcher --bump prerelease --tag beta --publish --ci
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- This package bundles dispatcher runtime code from the repository source-of-truth implementation; `apps/dispatcher` itself remains private.
|
|
47
|
+
- Keep the package README, root README, docs/README, and `docs/runbooks/single-machine-deployment.md` aligned when changing package behavior.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# @tingrudeng/forgeflow-dispatcher
|
|
2
|
+
|
|
3
|
+
Self-contained ForgeFlow dispatcher/control-plane runtime package for single-node SQLite deployments.
|
|
4
|
+
|
|
5
|
+
This package is for users who want dispatcher/control-plane behavior without cloning the `forgeflow-platform` source repository.
|
|
6
|
+
|
|
7
|
+
Current scope:
|
|
8
|
+
- initialize local runtime config
|
|
9
|
+
- start a foreground dispatcher server
|
|
10
|
+
- inspect local runtime health/config
|
|
11
|
+
- back up runtime state
|
|
12
|
+
- restore runtime state
|
|
13
|
+
|
|
14
|
+
This package is intentionally a runtime product, not a reusable dispatcher library. The source of truth implementation still lives in `apps/dispatcher` inside the main repository.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @tingrudeng/forgeflow-dispatcher
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
forgeflow-dispatcher init
|
|
26
|
+
forgeflow-dispatcher doctor
|
|
27
|
+
forgeflow-dispatcher start
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The default runtime config is stored at:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
~/.forgeflow-dispatcher/config.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Default values:
|
|
37
|
+
- `host=127.0.0.1`
|
|
38
|
+
- `port=8787`
|
|
39
|
+
- `stateDir=~/.forgeflow-dispatcher/state`
|
|
40
|
+
- `persistenceBackend=sqlite`
|
|
41
|
+
- `authMode=token`
|
|
42
|
+
|
|
43
|
+
`init` generates and saves a token by default when `authMode=token`.
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
forgeflow-dispatcher init
|
|
49
|
+
forgeflow-dispatcher init --host 127.0.0.1 --port 8787 --state-dir ~/.forgeflow-dispatcher/state --auth-mode token
|
|
50
|
+
forgeflow-dispatcher doctor
|
|
51
|
+
forgeflow-dispatcher status
|
|
52
|
+
forgeflow-dispatcher start
|
|
53
|
+
forgeflow-dispatcher backup
|
|
54
|
+
forgeflow-dispatcher restore --backup-dir /abs/path/to/backup
|
|
55
|
+
forgeflow-dispatcher version
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Command notes:
|
|
59
|
+
- `start` runs the dispatcher in the foreground
|
|
60
|
+
- `doctor` validates config, auth expectations, state-dir writability, and optional local `/health`
|
|
61
|
+
- `status` prints configured base URL and best-effort local health reachability
|
|
62
|
+
- `backup` copies `runtime-state.db`, WAL/SHM sidecars, and `runtime-state.json` rescue files when present
|
|
63
|
+
- `restore` copies those files back into the configured `stateDir`
|
|
64
|
+
|
|
65
|
+
## Authentication
|
|
66
|
+
|
|
67
|
+
Supported auth modes:
|
|
68
|
+
- `token` (default)
|
|
69
|
+
- `legacy`
|
|
70
|
+
- `open`
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
forgeflow-dispatcher init --auth-mode token --token your-secret-token
|
|
76
|
+
forgeflow-dispatcher init --auth-mode open
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Limits
|
|
80
|
+
|
|
81
|
+
This package currently targets:
|
|
82
|
+
- single-node SQLite dispatcher deployments
|
|
83
|
+
- local control-plane operators
|
|
84
|
+
- foreground process management
|
|
85
|
+
|
|
86
|
+
It does not yet provide:
|
|
87
|
+
- a detached process supervisor
|
|
88
|
+
- multi-instance orchestration
|
|
89
|
+
- Postgres primary mode
|
|
90
|
+
- public dispatcher library exports
|
|
91
|
+
|
|
92
|
+
## Notes
|
|
93
|
+
|
|
94
|
+
- Node 22+ is required.
|
|
95
|
+
- The package is self-contained and does not require a local checkout of `forgeflow-platform`.
|
|
96
|
+
- For source-repo operation and development workflows, the repository-local path in the main `README.md` is still supported.
|
|
97
|
+
- Release steps are documented in [`PUBLISHING.md`](./PUBLISHING.md).
|