create-ryu-app 0.1.13 → 0.2.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/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.13";
19
+ var SDK_DEPENDENCY_RANGE = "^0.2.0";
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.13",
3
+ "version": "0.2.0",
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.13"
23
+ "@ryuhq/sdk": "^0.2.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "^1.3.4",
@@ -36,7 +36,7 @@ const agent = new Agent({
36
36
  "expense emails, read the relevant ones, and return a concise list of " +
37
37
  "expenses with amount, merchant, date, and a category.",
38
38
  tools: {
39
- gmailSearch: ryuTool("composio__GMAIL_SEARCH_EMAILS", {
39
+ gmailSearch: ryuTool("composio.GMAIL_SEARCH_EMAILS", {
40
40
  description: "Search the user's Gmail messages",
41
41
  parameters: {
42
42
  type: "object",
@@ -50,7 +50,7 @@ const agent = new Agent({
50
50
  required: ["query"],
51
51
  },
52
52
  }),
53
- gmailGet: ryuTool("composio__GMAIL_GET_EMAIL", {
53
+ gmailGet: ryuTool("composio.GMAIL_GET_EMAIL", {
54
54
  description: "Fetch a single Gmail message by id",
55
55
  }),
56
56
  },
@@ -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:7899/health
39
- curl -s -H 'Authorization: Bearer dev-token' localhost:7899/items
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 port registry. `7899` is the scaffold default;
49
- avoid Core (`7980`), the Gateway (`7981`), the built-in sidecar band
50
- (`7990`–`8003`) and the local engines (`8080`–`8087`). Core injects the
51
- profile-shifted port through `__APP_PORT_ENV__`, so read it never hardcode.
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.
@@ -18,7 +18,7 @@
18
18
  "command_env": "__APP_BIN_ENV__",
19
19
  "port_env": "__APP_PORT_ENV__"
20
20
  },
21
- "port": 7899,
21
+ "port": 8342,
22
22
  "health_path": "/health",
23
23
  "lazy": true,
24
24
  "idle_stop_secs": 300,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@example/__APP_NAME__-sidecar",
3
3
  "private": true,
4
- "version": "0.1.13",
4
+ "version": "0.2.0",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "ryu-__APP_NAME__": "./src/main/index.ts"
@@ -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 = 7899;
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
@@ -4,11 +4,11 @@
4
4
  "version": "0.1.0",
5
5
  "runnables": [
6
6
  {
7
- "id": "__APP_NAME____render",
7
+ "id": "__APP_NAME__.render",
8
8
  "name": "render",
9
9
  "kind": "tool",
10
10
  "config": {
11
- "slug": "__APP_NAME____render",
11
+ "slug": "__APP_NAME__.render",
12
12
  "description": "Render the interactive panel inline in the chat reply.",
13
13
  "widget": true,
14
14
  "widget_accessible": true,
@@ -17,11 +17,11 @@
17
17
  }
18
18
  },
19
19
  {
20
- "id": "__APP_NAME____save",
20
+ "id": "__APP_NAME__.save",
21
21
  "name": "save",
22
22
  "kind": "tool",
23
23
  "config": {
24
- "slug": "__APP_NAME____save",
24
+ "slug": "__APP_NAME__.save",
25
25
  "description": "Persist the panel's current state. Callable by the mounted widget via callTool.",
26
26
  "widget": false,
27
27
  "widget_accessible": true,
@@ -46,7 +46,7 @@
46
46
  "slash_commands": [],
47
47
  "widgets": [
48
48
  {
49
- "tool_id": "__APP_NAME____render",
49
+ "tool_id": "__APP_NAME__.render",
50
50
  "uri": "ui://widget/__APP_NAME__.html",
51
51
  "ui_entry": "src/widget.tsx",
52
52
  "mime": "text/html+skybridge",
@@ -5,7 +5,7 @@
5
5
  * that mounts the widget, it declares a `save` tool marked `accessible: true` — a
6
6
  * COMPANION the mounted widget may invoke over the capability-gated bridge:
7
7
  *
8
- * await window.openai.callTool("__APP_NAME____save", { state })
8
+ * await window.openai.callTool("__APP_NAME__.save", { state })
9
9
  *
10
10
  * The host routes that call through the Gateway (allowlist + audit) before it
11
11
  * reaches Core; the frame never holds a token. It also declares a full-page
@@ -27,7 +27,7 @@ declare global {
27
27
  }
28
28
  }
29
29
 
30
- const SAVE_TOOL_ID = "__APP_NAME____save";
30
+ const SAVE_TOOL_ID = "__APP_NAME__.save";
31
31
 
32
32
  function Widget() {
33
33
  const bridge = window.openai ?? {};
@@ -4,11 +4,11 @@
4
4
  "version": "0.1.0",
5
5
  "runnables": [
6
6
  {
7
- "id": "__APP_NAME____render",
7
+ "id": "__APP_NAME__.render",
8
8
  "name": "render",
9
9
  "kind": "tool",
10
10
  "config": {
11
- "slug": "__APP_NAME____render",
11
+ "slug": "__APP_NAME__.render",
12
12
  "description": "Render the __APP_DISPLAY_NAME__ widget inline in the chat reply.",
13
13
  "widget": true,
14
14
  "widget_accessible": false,
@@ -43,7 +43,7 @@
43
43
  "slash_commands": [],
44
44
  "widgets": [
45
45
  {
46
- "tool_id": "__APP_NAME____render",
46
+ "tool_id": "__APP_NAME__.render",
47
47
  "uri": "ui://widget/__APP_NAME__.html",
48
48
  "ui_entry": "src/widget.tsx",
49
49
  "mime": "text/html+skybridge",