@ushawarma/stack 0.1.2 → 0.1.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 +35 -6
- package/bin/stack.cjs +0 -4
- package/binaries/darwin-arm64/stack +0 -0
- package/binaries/darwin-x64/stack +0 -0
- package/binaries/linux-arm64/stack +0 -0
- package/binaries/linux-x64/stack +0 -0
- package/build-info.json +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,8 @@ services = ["postgres"]
|
|
|
38
38
|
bin = ["bin"] # bundle-shipped CLIs go on PATH
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
A project uses bundles from git, an OCI registry, or a local path in `stack.toml
|
|
41
|
+
A project uses bundles from git, an OCI registry, or a local path in `stack.toml` (or defines
|
|
42
|
+
everything itself; `[[use]]` is optional):
|
|
42
43
|
|
|
43
44
|
```toml
|
|
44
45
|
[[use]]
|
|
@@ -47,6 +48,9 @@ bundle = "git+https://github.com/acme/pybase?ref=v1"
|
|
|
47
48
|
[[use]]
|
|
48
49
|
bundle = "oci:ghcr.io/acme/obs:2.0.0"
|
|
49
50
|
|
|
51
|
+
[[use]]
|
|
52
|
+
bundle = "git+https://github.com/acme/bundles?ref=v3&dir=node" # a bundle in a subdirectory
|
|
53
|
+
|
|
50
54
|
[tasks.test]
|
|
51
55
|
run = "uv sync -q && uv run pytest -q"
|
|
52
56
|
services = ["postgres", "redis"]
|
|
@@ -85,8 +89,10 @@ stack down # succeeds only once the processes are co
|
|
|
85
89
|
recorded processes and ports are gone.
|
|
86
90
|
- **Honest failures.** `up` reports the steps it completed, whether anything changed, and whether
|
|
87
91
|
retrying is safe.
|
|
88
|
-
- **Agent-friendly.** `--json` emits one object on stdout
|
|
89
|
-
|
|
92
|
+
- **Agent-friendly.** `--json` emits one object on stdout, including for argument errors and
|
|
93
|
+
`exec` (whose output is captured into the object); errors have a stable `code`, a `hint` and
|
|
94
|
+
`details`. A command that could not do its job reports `ok: false`. `stack mcp` serves the same
|
|
95
|
+
contract over MCP. Git never prompts.
|
|
90
96
|
|
|
91
97
|
## Commands
|
|
92
98
|
|
|
@@ -96,13 +102,34 @@ stack down # succeeds only once the processes are co
|
|
|
96
102
|
| `stack inspect` | Show the composed stack, origins and ports; writes nothing |
|
|
97
103
|
| `stack up [--ttl 30m] [--owner-pid N]` | Start services, verify them, record a session |
|
|
98
104
|
| `stack status` | Verify every service now; session and lease state (exit 1 if unhealthy) |
|
|
99
|
-
| `stack exec [--require S \| --require-all] -- <cmd>` | Run with tools and env; unverified endpoints poisoned |
|
|
105
|
+
| `stack exec [--require S \| --require-all] [--timeout D] -- <cmd>` | Run with tools and env; unverified endpoints poisoned |
|
|
100
106
|
| `stack down` | Stop services and confirm they are gone |
|
|
101
107
|
| `stack renew` / `stack gc` | Renew this session's lease / reclaim expired sessions machine-wide |
|
|
102
|
-
| `stack publish <dir> oci:<registry>/<repo>:<tag
|
|
108
|
+
| `stack publish <dir> oci:<registry>/<repo>:<tag> [--force]` | Publish a bundle as an OCI artifact |
|
|
109
|
+
| `stack doctor` | Check mise, git and tar, and that the project compiles |
|
|
103
110
|
| `stack mcp` | MCP server (stdio) exposing the same operations |
|
|
104
111
|
|
|
105
112
|
All accept `-C <dir>` and `--json`. `exec -C` runs in the selected project directory.
|
|
113
|
+
|
|
114
|
+
- `inspect` before the first `compile` previews what compile would lock; afterwards it fails on drift.
|
|
115
|
+
- `exec --json` captures at most 64 KiB of each stream into the result and exits with the
|
|
116
|
+
command's code (124 when `--timeout` expires). Without `--json` the command keeps the terminal.
|
|
117
|
+
- `gc` fails with `gc_incomplete` if an expired session could not be stopped; ownership records
|
|
118
|
+
are kept so it can be retried. Sessions of deleted projects are listed but cannot be stopped by
|
|
119
|
+
stack (see `mise daemons prune`).
|
|
120
|
+
- `publish` refuses to move an existing tag to different content (`tag_exists`) unless `--force`.
|
|
121
|
+
- `compile` warns about tools that are not pinned (`latest`, `lts`), since the lock cannot pin them.
|
|
122
|
+
- Git sources accept only `ref=` and `dir=`; anything else is an error rather than ignored.
|
|
123
|
+
Values are percent-decoded once, so `dir=a%26b` names the directory `a&b`.
|
|
124
|
+
- `up` and `exec` mark the generated mise config as trusted, so `run` commands from the bundles
|
|
125
|
+
you use execute without mise's trust prompt. Review bundles as you would any dependency.
|
|
126
|
+
- `compile` also warns about service presets mise does not document (it currently documents
|
|
127
|
+
cockroachdb, nats, postgres, redis and spicedb).
|
|
128
|
+
- For a custom service, connect with `http://127.0.0.1:$<NAME>_PORT`. mise also sets
|
|
129
|
+
`<NAME>_URL` to a Pitchfork proxy hostname (`https://<name>.<project>.localhost`), which only
|
|
130
|
+
answers when Pitchfork's proxy is running.
|
|
131
|
+
- A custom service's `run` should `exec` its server (`run = "exec python3 -m http.server $PORT"`),
|
|
132
|
+
so the supervisor stops the server itself rather than a wrapping shell.
|
|
106
133
|
Registry credentials: `STACK_OCI_USERNAME` / `STACK_OCI_PASSWORD`. External token-service origins
|
|
107
134
|
require explicit approval in `STACK_OCI_AUTH_REALMS`, a comma-separated list such as
|
|
108
135
|
`https://auth.docker.io`. Credentials and authorization headers are never forwarded to external upload
|
|
@@ -122,7 +149,9 @@ npm install -g @ushawarma/stack
|
|
|
122
149
|
stack --version
|
|
123
150
|
```
|
|
124
151
|
|
|
125
|
-
Prebuilt binaries cover macOS 13+ and Linux
|
|
152
|
+
Prebuilt binaries cover macOS 13+ and Linux (static, any distribution or libc), on x64 and arm64.
|
|
153
|
+
Services need [mise](https://mise.jdx.dev) on PATH; stack installs everything else, including
|
|
154
|
+
Pitchfork, through it. Run `stack doctor` to check a machine.
|
|
126
155
|
Node.js 22.14+ is required. See [docs/RELEASING.md](docs/RELEASING.md) for CI checks,
|
|
127
156
|
trusted publishing setup, release tags, and recovery.
|
|
128
157
|
|
package/bin/stack.cjs
CHANGED
|
@@ -10,10 +10,6 @@ if (!['darwin-x64', 'darwin-arm64', 'linux-x64', 'linux-arm64'].includes(platfor
|
|
|
10
10
|
console.error(`stack: unsupported platform ${platform}. Build from source: https://github.com/usharma123/stack`);
|
|
11
11
|
process.exit(1);
|
|
12
12
|
}
|
|
13
|
-
if (process.platform === 'linux' && !process.report.getReport().header.glibcVersionRuntime) {
|
|
14
|
-
console.error('stack: Linux requires glibc 2.39 or newer. Alpine/musl is not supported by this package.');
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
13
|
if (!fs.existsSync(binary)) {
|
|
18
14
|
console.error(`stack: missing packaged binary for ${platform}. Reinstall @ushawarma/stack.`);
|
|
19
15
|
process.exit(1);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/binaries/linux-x64/stack
CHANGED
|
Binary file
|
package/build-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
3
|
-
"version": "0.1.
|
|
2
|
+
"commit": "a1358335984610926384c58d9a83bd383301d647",
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"hashes": {
|
|
5
|
-
"linux-x64": "
|
|
6
|
-
"linux-arm64": "
|
|
7
|
-
"darwin-x64": "
|
|
8
|
-
"darwin-arm64": "
|
|
5
|
+
"linux-x64": "456cf1ba078e1b52e5af0a3fe5f0482050822cab6d991a2d19e048918ed51653",
|
|
6
|
+
"linux-arm64": "cd73e067768a3f34abbc3a5daacee4a0cd845b513455716c14cf5a35b7c236b5",
|
|
7
|
+
"darwin-x64": "41f87bba28a49e9dfec1d795364e117e2ec9274b4f90a957e6cc730c14df1e67",
|
|
8
|
+
"darwin-arm64": "d924c2bc91785e92005d52bdfdd477bd233bbdcc2b00e687d14e90b00b0e3a5e"
|
|
9
9
|
}
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ushawarma/stack",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Reusable, agent-safe development stacks",
|
|
5
5
|
"repository": { "type": "git", "url": "git+https://github.com/usharma123/stack.git" },
|
|
6
6
|
"homepage": "https://github.com/usharma123/stack#readme",
|