@vucinatim/agentic-devtools 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 +37 -2
- package/docs/auth-and-setup-guidelines.md +28 -2
- package/docs/publishing.md +12 -0
- package/docs/testing.md +4 -0
- package/docs/usage.md +53 -1
- package/package.json +1 -1
- package/src/cli.mjs +1 -1
- package/src/tools/railway/auth.mjs +1 -1
- package/src/tools/railway/client.mjs +15 -0
- package/src/tools/railway/mcp.mjs +3 -7
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ Agentic Devtools is an MCP-first open-source package for developer platforms
|
|
|
6
6
|
such as Railway, Namecheap, and npm. It is meant to be run directly by MCP hosts with
|
|
7
7
|
`npx`, while still exposing package imports for custom automation.
|
|
8
8
|
|
|
9
|
+
`npx` is the canonical runtime path. Global install is optional terminal
|
|
10
|
+
convenience only.
|
|
11
|
+
|
|
9
12
|
Most users should not install this into their app. Point your agent host at the
|
|
10
13
|
tool you need:
|
|
11
14
|
|
|
@@ -85,8 +88,15 @@ Railway:
|
|
|
85
88
|
}
|
|
86
89
|
```
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
Use:
|
|
92
|
+
|
|
93
|
+
- `RAILWAY_API_TOKEN` for Railway account tokens and workspace tokens
|
|
94
|
+
- `RAILWAY_PROJECT_TOKEN` for Railway project tokens
|
|
95
|
+
- `RAILWAY_PROJECT_ID` as an optional default project id for account/workspace
|
|
96
|
+
token flows
|
|
97
|
+
|
|
98
|
+
After `connect railway`, the same server config can omit `env` because the
|
|
99
|
+
stored token is resolved from `~/.config/agentic-devtools/railway.json`.
|
|
90
100
|
|
|
91
101
|
Namecheap:
|
|
92
102
|
|
|
@@ -128,6 +138,14 @@ GitHub Actions Trusted Publishing over local write tokens. Use
|
|
|
128
138
|
`setup-publishing npm` to run npm's official Trusted Publishing setup command
|
|
129
139
|
through the package.
|
|
130
140
|
|
|
141
|
+
Trusted Publishing notes:
|
|
142
|
+
|
|
143
|
+
- npm currently documents Trusted Publishing for GitHub-hosted GitHub Actions,
|
|
144
|
+
GitLab.com shared runners, and CircleCI cloud
|
|
145
|
+
- npm documents a minimum of Node `22.14.0` and npm CLI `11.5.1` for Trusted
|
|
146
|
+
Publishing
|
|
147
|
+
- each npm package currently has one Trusted Publisher connection at a time
|
|
148
|
+
|
|
131
149
|
### Global CLI
|
|
132
150
|
|
|
133
151
|
Useful if you use the tools often from a terminal:
|
|
@@ -140,6 +158,23 @@ agentic-devtools auth-status railway
|
|
|
140
158
|
agentic-devtools mcp railway
|
|
141
159
|
```
|
|
142
160
|
|
|
161
|
+
If `agentic-devtools` is not found after global install, your shell is not
|
|
162
|
+
exposing npm's global bin path. That is a shell setup issue, most commonly with
|
|
163
|
+
Node version managers such as `fnm` or `nvm`, not a package runtime issue.
|
|
164
|
+
|
|
165
|
+
Check:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm prefix -g
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Then make sure `<that-prefix>/bin` is on your `PATH`, or just use the canonical
|
|
172
|
+
no-install path:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
npx -y @vucinatim/agentic-devtools tools
|
|
176
|
+
```
|
|
177
|
+
|
|
143
178
|
### Project Dependency
|
|
144
179
|
|
|
145
180
|
Use this only when building your own automation on top of the service clients:
|
|
@@ -9,6 +9,10 @@ The ideal user experience is:
|
|
|
9
9
|
npx -y @vucinatim/agentic-devtools connect <tool>
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
This is intentionally the primary path. A global install can be convenient for
|
|
13
|
+
humans in a terminal, but it depends on the user's shell exposing npm's global
|
|
14
|
+
bin directory and should not be treated as the required onboarding contract.
|
|
15
|
+
|
|
12
16
|
After that, MCP host config should not need tokens inline:
|
|
13
17
|
|
|
14
18
|
```json
|
|
@@ -134,15 +138,27 @@ Recommended path:
|
|
|
134
138
|
- `RAILWAY_API_TOKEN`
|
|
135
139
|
- `RAILWAY_TOKEN`
|
|
136
140
|
- `RAILWAY_PROJECT_ID`
|
|
141
|
+
- `RAILWAY_API_ENDPOINT`
|
|
137
142
|
4. make env vars override stored config
|
|
138
143
|
5. add OAuth once the app registration and callback flow are ready
|
|
139
144
|
|
|
140
145
|
Token guidance:
|
|
141
146
|
|
|
142
|
-
-
|
|
143
|
-
-
|
|
147
|
+
- account token: broadest scope across the user's resources and workspaces
|
|
148
|
+
- workspace token: scoped to a single workspace, but still sent as bearer auth
|
|
149
|
+
through `RAILWAY_API_TOKEN` or `RAILWAY_TOKEN`
|
|
150
|
+
- project token: scoped to a single environment and sent through
|
|
151
|
+
`RAILWAY_PROJECT_TOKEN`
|
|
144
152
|
- do not ask for account token when a project token is enough
|
|
145
153
|
|
|
154
|
+
Validation guidance:
|
|
155
|
+
|
|
156
|
+
- do not assume every bearer token can call `me`
|
|
157
|
+
- validate project tokens through a project-token-specific query
|
|
158
|
+
- validate account and workspace tokens through project listing or other
|
|
159
|
+
workspace-compatible reads
|
|
160
|
+
- keep identity-only queries such as `me` as separate optional capabilities
|
|
161
|
+
|
|
146
162
|
## Namecheap
|
|
147
163
|
|
|
148
164
|
Namecheap is Tier 3.
|
|
@@ -196,6 +212,16 @@ For package publishing, prefer GitHub Actions Trusted Publishing through OIDC.
|
|
|
196
212
|
The local npm tool may support publishing for controlled use cases, but real
|
|
197
213
|
publishes must be explicit and confirmation-gated. Dry-run should be the default.
|
|
198
214
|
|
|
215
|
+
Current npm Trusted Publishing guidance:
|
|
216
|
+
|
|
217
|
+
- npm currently documents Trusted Publishing for GitHub-hosted GitHub Actions,
|
|
218
|
+
GitLab.com shared runners, and CircleCI cloud
|
|
219
|
+
- self-hosted runners are not currently the documented path
|
|
220
|
+
- npm currently documents Node `22.14.0+` and npm CLI `11.5.1+`
|
|
221
|
+
- a package currently has one Trusted Publisher configuration at a time
|
|
222
|
+
- after Trusted Publishing is verified, prefer npm's "disallow tokens" publish
|
|
223
|
+
setting for stronger security
|
|
224
|
+
|
|
199
225
|
## Hosted Connect Option
|
|
200
226
|
|
|
201
227
|
A future hosted “Agentic Devtools Connect” service could reduce friction further.
|
package/docs/publishing.md
CHANGED
|
@@ -32,6 +32,14 @@ permission so npm can verify the workflow identity.
|
|
|
32
32
|
npm also publishes provenance attestations automatically when Trusted Publishing
|
|
33
33
|
is used from supported CI.
|
|
34
34
|
|
|
35
|
+
Current npm requirements and limits:
|
|
36
|
+
|
|
37
|
+
- npm documents Trusted Publishing support for GitHub-hosted GitHub Actions,
|
|
38
|
+
GitLab.com shared runners, and CircleCI cloud
|
|
39
|
+
- self-hosted runners are not currently the documented path
|
|
40
|
+
- npm documents a minimum of Node `22.14.0` and npm CLI `11.5.1`
|
|
41
|
+
- each package currently has one Trusted Publisher configuration at a time
|
|
42
|
+
|
|
35
43
|
References:
|
|
36
44
|
|
|
37
45
|
- <https://docs.npmjs.com/trusted-publishers>
|
|
@@ -172,6 +180,10 @@ npx -y npm@^11.10.0 trust github @vucinatim/agentic-devtools --repo vucinatim/ag
|
|
|
172
180
|
This keeps the setup aligned with npm's beta Trusted Publishing flow and lets
|
|
173
181
|
npm handle web/security-key two-factor authentication when required.
|
|
174
182
|
|
|
183
|
+
After the Trusted Publisher is verified, npm recommends restricting token-based
|
|
184
|
+
publishing access for the package so Trusted Publishing becomes the normal write
|
|
185
|
+
path.
|
|
186
|
+
|
|
175
187
|
For this repository it configures:
|
|
176
188
|
|
|
177
189
|
- provider: GitHub Actions
|
package/docs/testing.md
CHANGED
|
@@ -40,6 +40,10 @@ The publish workflow runs this after `npm publish`, so a release is only
|
|
|
40
40
|
considered good after the registry-hosted package passes real installation and
|
|
41
41
|
usage checks.
|
|
42
42
|
|
|
43
|
+
There is also a manual GitHub Actions workflow, `Published Smoke`, which can
|
|
44
|
+
re-run the same checks against any already-published version or against the
|
|
45
|
+
current `latest` release without publishing again.
|
|
46
|
+
|
|
43
47
|
## Coverage Scope
|
|
44
48
|
|
|
45
49
|
Coverage measures library code under `src/`, excluding:
|
package/docs/usage.md
CHANGED
|
@@ -6,6 +6,9 @@ The default user should configure their agent host to run a specific tool with
|
|
|
6
6
|
`npx`. They do not need to add Agentic Devtools to their application
|
|
7
7
|
dependencies.
|
|
8
8
|
|
|
9
|
+
Treat `npx` as the canonical path. Global install is optional shell
|
|
10
|
+
convenience, not the primary contract.
|
|
11
|
+
|
|
9
12
|
Run guided setup once if you want credentials stored locally instead of inline
|
|
10
13
|
in MCP host config:
|
|
11
14
|
|
|
@@ -36,6 +39,12 @@ Railway:
|
|
|
36
39
|
}
|
|
37
40
|
```
|
|
38
41
|
|
|
42
|
+
Use:
|
|
43
|
+
|
|
44
|
+
- `RAILWAY_API_TOKEN` for Railway account tokens and workspace tokens
|
|
45
|
+
- `RAILWAY_PROJECT_TOKEN` for Railway project tokens
|
|
46
|
+
- `RAILWAY_PROJECT_ID` as an optional default project id
|
|
47
|
+
|
|
39
48
|
If `connect railway` has already saved a token locally, omit the `env` block.
|
|
40
49
|
|
|
41
50
|
Namecheap:
|
|
@@ -91,6 +100,23 @@ agentic-devtools auth-status railway
|
|
|
91
100
|
agentic-devtools test-connection railway
|
|
92
101
|
```
|
|
93
102
|
|
|
103
|
+
If the command is not found after `npm install -g`, your shell is not exposing
|
|
104
|
+
npm's global bin directory. This is common with version managers such as `fnm`
|
|
105
|
+
or `nvm`.
|
|
106
|
+
|
|
107
|
+
Check:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm prefix -g
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Then ensure `<that-prefix>/bin` is on your `PATH`, or skip global install and
|
|
114
|
+
use:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx -y @vucinatim/agentic-devtools tools
|
|
118
|
+
```
|
|
119
|
+
|
|
94
120
|
## Tertiary: Project Dependency
|
|
95
121
|
|
|
96
122
|
Install into a project only when you want to build custom automation using the
|
|
@@ -112,8 +138,24 @@ Railway supports:
|
|
|
112
138
|
|
|
113
139
|
- guided local setup through `agentic-devtools connect railway`
|
|
114
140
|
- `RAILWAY_PROJECT_TOKEN` for project-scoped inspection
|
|
115
|
-
- `RAILWAY_API_TOKEN` or `RAILWAY_TOKEN` for account
|
|
141
|
+
- `RAILWAY_API_TOKEN` or `RAILWAY_TOKEN` for account tokens and workspace tokens
|
|
116
142
|
- `RAILWAY_PROJECT_ID` as an optional default project id
|
|
143
|
+
- `RAILWAY_API_ENDPOINT` for endpoint override
|
|
144
|
+
|
|
145
|
+
Railway token guidance:
|
|
146
|
+
|
|
147
|
+
- account token: broadest scope across your resources and workspaces
|
|
148
|
+
- workspace token: scoped to one workspace, still passed as bearer auth through
|
|
149
|
+
`RAILWAY_API_TOKEN` or `RAILWAY_TOKEN`
|
|
150
|
+
- project token: scoped to one environment, passed through
|
|
151
|
+
`RAILWAY_PROJECT_TOKEN`
|
|
152
|
+
|
|
153
|
+
Validation behavior:
|
|
154
|
+
|
|
155
|
+
- project tokens are validated through the `projectToken` query
|
|
156
|
+
- account and workspace tokens are validated through project listing
|
|
157
|
+
- identity-style `me` queries are not treated as the compatibility baseline for
|
|
158
|
+
all bearer tokens
|
|
117
159
|
|
|
118
160
|
Namecheap supports:
|
|
119
161
|
|
|
@@ -134,6 +176,16 @@ npm supports:
|
|
|
134
176
|
- `.npmrc` auth token resolution
|
|
135
177
|
- `NPM_CONFIG_REGISTRY` for registry override
|
|
136
178
|
|
|
179
|
+
npm publishing guidance:
|
|
180
|
+
|
|
181
|
+
- prefer GitHub Actions Trusted Publishing over long-lived write tokens
|
|
182
|
+
- npm currently documents Trusted Publishing for GitHub-hosted runners, not
|
|
183
|
+
self-hosted GitHub Actions runners
|
|
184
|
+
- npm currently documents Node `22.14.0+` and npm CLI `11.5.1+` for Trusted
|
|
185
|
+
Publishing
|
|
186
|
+
- provenance attestations are generated automatically for public packages
|
|
187
|
+
published from public repositories through supported Trusted Publishing flows
|
|
188
|
+
|
|
137
189
|
For publishing, prefer GitHub Actions Trusted Publishing. Local publishing is
|
|
138
190
|
available through the npm MCP client but defaults to dry-run and requires an
|
|
139
191
|
explicit confirmation string for real publishes.
|
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -160,7 +160,7 @@ if (args[0] === "test-connection") {
|
|
|
160
160
|
const result =
|
|
161
161
|
client.auth.kind === "project"
|
|
162
162
|
? await client.getProjectTokenContext()
|
|
163
|
-
: await client.
|
|
163
|
+
: await client.validateAccountToken();
|
|
164
164
|
printJson({
|
|
165
165
|
ok: true,
|
|
166
166
|
tokenSource: client.auth.source,
|
|
@@ -103,6 +103,20 @@ export const createRailwayClient = ({
|
|
|
103
103
|
return data.me;
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
const validateAccountToken = async () => {
|
|
107
|
+
requireAccountToken("validateRailwayAccountToken");
|
|
108
|
+
const projects = await listProjects({ first: 1, includeDeleted: false });
|
|
109
|
+
return {
|
|
110
|
+
ok: true,
|
|
111
|
+
projectCountSampled: projects.length,
|
|
112
|
+
sampleProjects: projects.map((project) => ({
|
|
113
|
+
id: project.id,
|
|
114
|
+
name: project.name,
|
|
115
|
+
workspace: project.workspace?.name ?? null,
|
|
116
|
+
})),
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
|
|
106
120
|
const listProjects = async ({
|
|
107
121
|
workspaceId = null,
|
|
108
122
|
includeDeleted = false,
|
|
@@ -348,6 +362,7 @@ export const createRailwayClient = ({
|
|
|
348
362
|
endpoint,
|
|
349
363
|
getAuthStatus: () => getRailwayAuthStatus(env),
|
|
350
364
|
getCurrentViewer,
|
|
365
|
+
validateAccountToken,
|
|
351
366
|
listProjects,
|
|
352
367
|
getProjectTokenContext,
|
|
353
368
|
getProject,
|
|
@@ -91,16 +91,12 @@ const createServer = () => {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const
|
|
94
|
+
const validation = await client.validateAccountToken();
|
|
95
95
|
return {
|
|
96
96
|
ok: true,
|
|
97
97
|
tokenSource: client.auth.source,
|
|
98
98
|
tokenKind: client.auth.kind,
|
|
99
|
-
|
|
100
|
-
name: viewer.name,
|
|
101
|
-
email: viewer.email,
|
|
102
|
-
workspaceCount: viewer.workspaces.length,
|
|
103
|
-
},
|
|
99
|
+
validation,
|
|
104
100
|
};
|
|
105
101
|
}),
|
|
106
102
|
),
|
|
@@ -260,7 +256,7 @@ if (argv.includes("--test-connection")) {
|
|
|
260
256
|
const result =
|
|
261
257
|
client.auth.kind === "project"
|
|
262
258
|
? await client.getProjectTokenContext()
|
|
263
|
-
: await client.
|
|
259
|
+
: await client.validateAccountToken();
|
|
264
260
|
process.stdout.write(
|
|
265
261
|
`${JSON.stringify(
|
|
266
262
|
{
|