@centralu/host-linux-x64 0.1.0-beta.84 → 0.1.0-beta.85
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/host/app-template/AGENTS.md +22 -20
- package/host/app-template/runtime/centralu-app-runtime.mjs +14 -14
- package/host/app-template/runtime/centralu-app-runtime.mjs.map +1 -1
- package/host/bundle-info.json +4 -3
- package/host/centralu-package.json +6 -6
- package/host/codex-centralu-bridge.mjs +4 -2
- package/host/main.mjs +60423 -68944
- package/package.json +1 -1
|
@@ -49,19 +49,22 @@ screen (`ui/index.html`) and agents call the same tools as functions. Same tools
|
|
|
49
49
|
then calls `show` again. Keep that handler, and keep `show` read-only.
|
|
50
50
|
9. **stdout is the MCP channel.** `console.log` is redirected to stderr for you; never write to
|
|
51
51
|
`process.stdout` yourself. stderr is shown to the person when the app fails.
|
|
52
|
-
10. **
|
|
53
|
-
|
|
54
|
-
(the person can read it) and returns
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
10. **Giving the agent work**: inside a tool handler, `const { sessionId, mailId } = await
|
|
53
|
+
centralu.agent('task', { choices, tool })` starts a session of the person's agent under this app
|
|
54
|
+
(the person can read it) and returns at once. Its work is a mail from this app that needs its
|
|
55
|
+
reply; give `choices` (a list of sentences) when the answer is one of them. Read the replies with
|
|
56
|
+
`await centralu.answers(mailId)`, anywhere (a timer included): `state` is "waiting", "answered" or
|
|
57
|
+
"handled" (closed without a reply, with `why`), and `replies` lists every reply, oldest first, each
|
|
58
|
+
with `text` and, when the mail had choices, `choice: { n, text }` (compare by `text`; 0 is "None of
|
|
59
|
+
these"). Nothing is delivered to your app: read again later. The session stays until your code
|
|
60
|
+
archives it with `await centralu.archive(sessionId)` (once its work is done; it stays readable) or
|
|
61
|
+
the person does. It runs under `auto`, but never above the lowest approval setting among
|
|
62
|
+
the sessions calling into the app. It runs under `ask` when nothing says who asked: no call is
|
|
63
|
+
open, the calling session is gone, or the chain of calls can no longer be followed. Under `ask`
|
|
64
|
+
the agent runs with the person's own permission settings for that tool, which may let a file
|
|
65
|
+
write or command run without asking: never count on the person checking its work. Declare `"uses": { "agent": true }` in the manifest for the person's default
|
|
66
|
+
agent, or a list such as `["codex"]` to pick one with `tool`. The task reaches the agent marked as
|
|
67
|
+
mail from this app, not from the person, so say plainly what you need.
|
|
65
68
|
11. **Calling another app**: inside a tool handler, `await centralu.callApp('other-app', 'tool', args)`
|
|
66
69
|
calls a tool of another app and returns its answer (JSON if the tool returns structured
|
|
67
70
|
content, else text). Declare the app in `"uses": { "apps": ["other-app"] }`. Only tools open to
|
|
@@ -76,11 +79,10 @@ screen (`ui/index.html`) and agents call the same tools as functions. Same tools
|
|
|
76
79
|
files (project apps only).
|
|
77
80
|
|
|
78
81
|
All three throw an error that says what Centralu answered. What the manifest declares in `uses` runs
|
|
79
|
-
with no question: the person trusted the app with it.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
remembered from before, comes back as that error: show it plainly instead of retrying.
|
|
82
|
+
with no question: the person trusted the app with it. A call to another app's tool is decided as the
|
|
83
|
+
session that started the chain decides its own: under `ask` a tool that changes something waits on a card
|
|
84
|
+
in that session (up to 5 minutes). A refusal, then or remembered from before, comes back as that error:
|
|
85
|
+
show it plainly instead of retrying.
|
|
84
86
|
|
|
85
87
|
**Background work.** Centralu stops an app with no open screen and no call for 5 minutes. An app
|
|
86
88
|
with work on its own clock (a timer that polls, a queue it drives) declares it in the manifest,
|
|
@@ -94,8 +96,8 @@ there is work.
|
|
|
94
96
|
finished, something needs it), declare `"uses": { "notices": true }`, keep
|
|
95
97
|
`centralu.noticeAddress()` (inside the tool handler of that session's call) with the work, and when
|
|
96
98
|
it is done call `await centralu.notify(address, 'what happened')`: anywhere, a timer included. The
|
|
97
|
-
session receives it as your app
|
|
98
|
-
take it: the session is gone
|
|
99
|
+
session receives it as mail from your app that needs no reply. It resolves false (said on stderr)
|
|
100
|
+
when Centralu did not take it: the session is gone.
|
|
99
101
|
The address is null when a view called, or the manifest does not declare it.
|
|
100
102
|
|
|
101
103
|
## Dragging an item out of the screen
|