create-mono-agent 0.12.0 → 0.14.0
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 +59 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# create-mono-agent
|
|
2
2
|
|
|
3
|
-
The unscoped npm-init
|
|
4
|
-
`create
|
|
5
|
-
the
|
|
3
|
+
The unscoped npm-init entry point for mono-agent. Use it for a one-off guided
|
|
4
|
+
setup with `npm create mono-agent@latest init`, or install it globally when you want
|
|
5
|
+
the `mono-agent` command on `PATH`. Both shipped bins delegate to the CLI in
|
|
6
|
+
[`@mono-agent/agent-app`](https://www.npmjs.com/package/@mono-agent/agent-app).
|
|
6
7
|
|
|
7
8
|
Three equivalent entry points, one behaviour:
|
|
8
9
|
|
|
@@ -11,10 +12,12 @@ Three equivalent entry points, one behaviour:
|
|
|
11
12
|
- `npm i -g create-mono-agent` — a global install that puts the natural `mono-agent` command on your `PATH`.
|
|
12
13
|
|
|
13
14
|
On macOS, a one-off `npm create`/npx wizard may start the finished agent in the
|
|
14
|
-
background. Before it does, `@mono-agent/agent-app` copies the
|
|
15
|
-
package
|
|
16
|
-
`~/.mono-agent/runtimes/agent-app
|
|
17
|
-
|
|
15
|
+
background. Before it does, `@mono-agent/agent-app` copies the already-resolved
|
|
16
|
+
package closure it is executing into a private, verified runtime under
|
|
17
|
+
`~/.mono-agent/runtimes/agent-app/`. That publication step never invokes npm or
|
|
18
|
+
lifecycle scripts and never re-resolves dependencies; launchd therefore does
|
|
19
|
+
not keep a disposable npm-cache path. It does not install a global command or
|
|
20
|
+
mutate `PATH`.
|
|
18
21
|
|
|
19
22
|
The bare `mono-agent` npm name is unavailable — npm rejects it as too similar to
|
|
20
23
|
an unrelated `monoagent` package — so this installer follows the `create-*`
|
|
@@ -22,7 +25,14 @@ convention while still exposing the ergonomic `mono-agent` bin.
|
|
|
22
25
|
|
|
23
26
|
## Category
|
|
24
27
|
|
|
28
|
+
<!-- package-metadata:start -->
|
|
29
|
+
<!-- Generated by scripts/generate-package-docs.mjs. Do not edit by hand. -->
|
|
30
|
+
|
|
25
31
|
Category: `app`
|
|
32
|
+
Tier: `alias`
|
|
33
|
+
Catalog responsibility: Unscoped npm-init installer (`npm create mono-agent`) shipping `create-mono-agent` and `mono-agent` bins that forward every command to @mono-agent/agent-app's CLI.
|
|
34
|
+
|
|
35
|
+
<!-- package-metadata:end -->
|
|
26
36
|
|
|
27
37
|
This is the catalog's sole `tier: "alias"` package: an unscoped publishable
|
|
28
38
|
installer, not a core package with its own responsibility. It is excluded from the
|
|
@@ -38,8 +48,10 @@ work, and forward every invocation, unchanged, to `@mono-agent/agent-app`'s
|
|
|
38
48
|
## Install / Usage
|
|
39
49
|
|
|
40
50
|
```bash
|
|
41
|
-
#
|
|
51
|
+
# Recommended: one-off guided setup (npm resolves create-mono-agent):
|
|
42
52
|
npm create mono-agent@latest init
|
|
53
|
+
|
|
54
|
+
# The explicit npx form is equivalent:
|
|
43
55
|
npx create-mono-agent init
|
|
44
56
|
|
|
45
57
|
# Or install globally for the persistent `mono-agent` command:
|
|
@@ -57,8 +69,40 @@ child; see `delegateSignals`). This package adds nothing but the names. Prefer
|
|
|
57
69
|
pinning the scoped host directly (`npm i -g @mono-agent/agent-app`) if you don't
|
|
58
70
|
need the installer.
|
|
59
71
|
|
|
72
|
+
## Architecture
|
|
73
|
+
|
|
74
|
+
### Data flow
|
|
75
|
+
|
|
76
|
+
Both bin names point to `dist/bin/mono-agent.js` and follow one path:
|
|
77
|
+
|
|
78
|
+
1. `resolveAgentAppCliEntry()` resolves the installed
|
|
79
|
+
`@mono-agent/agent-app/package.json` and reads its declared `mono-agent` bin.
|
|
80
|
+
2. The shim starts that exact CLI with the current Node executable, unchanged
|
|
81
|
+
arguments, and inherited standard input/output.
|
|
82
|
+
3. `delegateSignals()` lets group-delivered Ctrl-C reach the child once,
|
|
83
|
+
forwards a targeted `SIGTERM`, and mirrors the child's exit code or signal.
|
|
84
|
+
4. From that point, `@mono-agent/agent-app` owns all command behavior, including
|
|
85
|
+
any verified background-runtime publication.
|
|
86
|
+
|
|
87
|
+
### Package structure
|
|
88
|
+
|
|
89
|
+
| Module | Purpose |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| `src/bin/mono-agent.ts` | Shared entry point for both bin names. |
|
|
92
|
+
| `src/resolve-agent-app-cli.ts` | Finds the dependency's declared CLI without hard-coding its build path. |
|
|
93
|
+
| `src/delegate.ts` | Preserves signal and exit semantics while the real CLI runs. |
|
|
94
|
+
|
|
60
95
|
## Public API
|
|
61
96
|
|
|
97
|
+
### Start here
|
|
98
|
+
|
|
99
|
+
| Surface | Use |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `npm create mono-agent@latest init` | One-off npm-init setup. |
|
|
102
|
+
| `npx create-mono-agent init` | Explicit one-off setup. |
|
|
103
|
+
| Global `mono-agent` bin | Persistent command after `npm i -g create-mono-agent`. |
|
|
104
|
+
| Library imports | None; import programmatic APIs from `@mono-agent/agent-app`. |
|
|
105
|
+
|
|
62
106
|
<!-- public-api-inventory:start -->
|
|
63
107
|
<!-- Generated by scripts/generate-public-api-docs.mjs. Do not edit by hand. -->
|
|
64
108
|
|
|
@@ -82,6 +126,13 @@ command — all of that lives in `@mono-agent/agent-app`. It is metadata plus a
|
|
|
82
126
|
delegating bin, nothing more. If the installer ever needs behaviour, that
|
|
83
127
|
behaviour belongs in `@mono-agent/agent-app`, not here.
|
|
84
128
|
|
|
129
|
+
## Related Documentation
|
|
130
|
+
|
|
131
|
+
- [Create your first agent](https://mono-agent-docs.vercel.app/getting-started/quickstart/)
|
|
132
|
+
- [CLI reference](https://mono-agent-docs.vercel.app/observability/cli-reference/)
|
|
133
|
+
- [Agent folder layout](https://mono-agent-docs.vercel.app/config/folder-layout/)
|
|
134
|
+
- [`@mono-agent/agent-app` package](https://github.com/robertsreberski/mono-agent/tree/main/packages/agent-app)
|
|
135
|
+
|
|
85
136
|
## Verification
|
|
86
137
|
|
|
87
138
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mono-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "npm-init style installer for the mono-agent CLI: `npm create mono-agent`. Ships both a `create-mono-agent` and a `mono-agent` bin, each delegating to the @mono-agent/agent-app CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@mono-agent/agent-app": "0.
|
|
25
|
+
"@mono-agent/agent-app": "0.14.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|