create-ryu-app 0.1.13 → 0.1.14
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/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var RE_WORD_SEPARATOR = /[-_\s]+/;
|
|
|
16
16
|
var RE_VALID_NAME = /^[a-z0-9][a-z0-9-_]*$/i;
|
|
17
17
|
var RE_LABEL_IMPERSONATES = /ryu|system/i;
|
|
18
18
|
var SAFE_COMPANION_LABEL = "App Panel";
|
|
19
|
-
var SDK_DEPENDENCY_RANGE = "^0.1.
|
|
19
|
+
var SDK_DEPENDENCY_RANGE = "^0.1.14";
|
|
20
20
|
var TEMPLATES = {
|
|
21
21
|
agent: {
|
|
22
22
|
kind: "plugin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ryu-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Scaffold a starter Ryu SDK project with a Runnable, gateway-pointed model config, and manifest.json manifest",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "rm -rf dist"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@ryuhq/sdk": "^0.1.
|
|
23
|
+
"@ryuhq/sdk": "^0.1.14"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/bun": "^1.3.4",
|
package/template/app/README.md
CHANGED
|
@@ -35,8 +35,8 @@ rather than on this app's id.
|
|
|
35
35
|
```bash
|
|
36
36
|
bun install --cwd sidecar
|
|
37
37
|
__APP_TOKEN_ENV__=dev-token bun run dev
|
|
38
|
-
curl -s localhost:
|
|
39
|
-
curl -s -H 'Authorization: Bearer dev-token' localhost:
|
|
38
|
+
curl -s localhost:8342/health
|
|
39
|
+
curl -s -H 'Authorization: Bearer dev-token' localhost:8342/items
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Every route except `GET /health` is bearer-gated and **fails closed**: with no
|
|
@@ -45,10 +45,14 @@ every protected route 401s. Do not relax that — loopback is not a trust bounda
|
|
|
45
45
|
|
|
46
46
|
## Before you ship
|
|
47
47
|
|
|
48
|
-
- **Pick a free port.** There is no
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
- **Pick a free port.** There is no registry and no allocator: the manifest number
|
|
49
|
+
is what Core tries. `8342` is the scaffold default — change it, or every app
|
|
50
|
+
built from this template collides with every other. Pick from the community band
|
|
51
|
+
`8300`–`8699`, avoiding round numbers; Core (`7980`), the Gateway (`7981`), the
|
|
52
|
+
first-party app band (`7990`–`8079`) and the local engines (`8080`–`8096`) are all
|
|
53
|
+
taken. Core injects the profile-shifted port through `__APP_PORT_ENV__`, so read
|
|
54
|
+
it — never hardcode. A collision does not relocate you: Core bind-probes the port
|
|
55
|
+
and refuses to start the sidecar.
|
|
52
56
|
- **Build the binary.** `sidecars[].process.command` names `ryu-__APP_NAME__` on
|
|
53
57
|
`PATH`; `bun run --cwd sidecar build` compiles it. `__APP_BIN_ENV__` points a
|
|
54
58
|
node at a local build instead.
|
|
@@ -27,7 +27,7 @@ import { createServer, type Server } from "node:http";
|
|
|
27
27
|
/** Default loopback port. There is NO port registry: picking a free one is the
|
|
28
28
|
* app author's job. Stay clear of Core (:7980), the Gateway (:7981), the
|
|
29
29
|
* built-in sidecar band (:7990–:8003), and the local engines (:8080–:8087). */
|
|
30
|
-
const CONTROL_BASE_PORT =
|
|
30
|
+
const CONTROL_BASE_PORT = 8342;
|
|
31
31
|
|
|
32
32
|
/** A Core running under `RYU_PROFILE=dev` shifts every port by this much so a dev
|
|
33
33
|
* node and a release node coexist. Core injects the shifted value through
|