@assertrx/dino 1.0.6 → 1.0.7
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
CHANGED
|
@@ -310,7 +310,7 @@ This single script:
|
|
|
310
310
|
1. Checks that Node.js is installed
|
|
311
311
|
2. Installs `pi` globally if missing
|
|
312
312
|
3. Installs `@assertrx/dino` via `pi install` if missing
|
|
313
|
-
4. Starts the API server on port
|
|
313
|
+
4. Starts the API server on port 4003
|
|
314
314
|
|
|
315
315
|
### Manual setup
|
|
316
316
|
|
|
@@ -378,28 +378,28 @@ All POST bodies accept auth/model options, `cwd` (workspace directory, defaults
|
|
|
378
378
|
|
|
379
379
|
```bash
|
|
380
380
|
# List all prompts
|
|
381
|
-
curl http://localhost:
|
|
381
|
+
curl http://localhost:4003/api/prompts
|
|
382
382
|
|
|
383
383
|
# Discover providers and their auth status
|
|
384
|
-
curl http://localhost:
|
|
384
|
+
curl http://localhost:4003/api/providers
|
|
385
385
|
|
|
386
386
|
# List models available to the server (optionally per provider)
|
|
387
|
-
curl http://localhost:
|
|
388
|
-
curl "http://localhost:
|
|
387
|
+
curl http://localhost:4003/api/models
|
|
388
|
+
curl "http://localhost:4003/api/models?provider=anthropic"
|
|
389
389
|
|
|
390
390
|
# Execute a prompt (SSE streaming, auth from env vars)
|
|
391
|
-
curl -X POST http://localhost:
|
|
391
|
+
curl -X POST http://localhost:4003/api/prompts/setup-playwright \
|
|
392
392
|
-H "Content-Type: application/json" \
|
|
393
393
|
-d '{"cwd": "/path/to/workspace"}'
|
|
394
394
|
|
|
395
395
|
# Execute with a single provider key + model selection
|
|
396
396
|
# (env: export OPENAI_API_KEY=sk-... then:)
|
|
397
|
-
curl -X POST http://localhost:
|
|
397
|
+
curl -X POST http://localhost:4003/api/prompts/setup-playwright \
|
|
398
398
|
-H "Content-Type: application/json" \
|
|
399
399
|
-d '{"cwd": "/path/to/workspace", "model": "openai/gpt-5.2"}'
|
|
400
400
|
|
|
401
401
|
# Execute with multiple per-request API keys and an explicit model
|
|
402
|
-
curl -X POST http://localhost:
|
|
402
|
+
curl -X POST http://localhost:4003/api/prompts/setup-playwright \
|
|
403
403
|
-H "Content-Type: application/json" \
|
|
404
404
|
-d '{
|
|
405
405
|
"cwd": "/path/to/workspace",
|
|
@@ -408,7 +408,7 @@ curl -X POST http://localhost:3000/api/prompts/setup-playwright \
|
|
|
408
408
|
}'
|
|
409
409
|
|
|
410
410
|
# Execute with URL parameter (non-streaming JSON response)
|
|
411
|
-
curl -X POST http://localhost:
|
|
411
|
+
curl -X POST http://localhost:4003/api/prompts/generate-pom-from-url-cli \
|
|
412
412
|
-H "Content-Type: application/json" \
|
|
413
413
|
-d '{"url": "https://example.com", "outputDir": "tests/pom", "stream": false}'
|
|
414
414
|
```
|
|
@@ -439,7 +439,7 @@ event: error → {"message": "..."} # error
|
|
|
439
439
|
|
|
440
440
|
| Variable | Default | Description |
|
|
441
441
|
|----------|---------|-------------|
|
|
442
|
-
| `PORT` | `
|
|
442
|
+
| `PORT` | `4003` | Server port |
|
|
443
443
|
| `HOST` | `0.0.0.0` | Server host |
|
|
444
444
|
| Provider env vars | — | Any provider's standard env var (e.g. `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`); per-request `apiKeys`/`apiKey` override these |
|
|
445
445
|
|
package/package.json
CHANGED
package/scripts/api-server.mjs
CHANGED
|
@@ -545,7 +545,7 @@ app.post("/api/prompts/:name", async (request, reply) => {
|
|
|
545
545
|
});
|
|
546
546
|
|
|
547
547
|
// ── Start server ───────────────────────────────────────────────────────────
|
|
548
|
-
const PORT = parseInt(process.env.PORT || "
|
|
548
|
+
const PORT = parseInt(process.env.PORT || "4003", 10);
|
|
549
549
|
const HOST = process.env.HOST || "0.0.0.0";
|
|
550
550
|
|
|
551
551
|
try {
|
|
@@ -10,7 +10,7 @@ if not exist "%DINO_DIR%" (
|
|
|
10
10
|
exit /b 1
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
echo Starting Dino API server on port %PORT% (default:
|
|
13
|
+
echo Starting Dino API server on port %PORT% (default: 4003)...
|
|
14
14
|
|
|
15
15
|
:: The published npm package may not include api-server.mjs, so fall back
|
|
16
16
|
:: to the local source copy when this script is run from the Dino repo.
|