eve-hub 0.10.2 → 0.11.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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/workspace.mjs +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# eve-hub
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- A bot's roster entry can name whose credential its model calls carry: `"modelAuth": "project" | "user" | "codex"` (default `project`, the workspace's bots project). `hub.workspace.json` rejects any other value, and `user` or `codex` on a bot that does not run on the Mac. Nothing acts on `user` or `codex` yet; this release only lets a workspace carry the key before the hub starts writing it.
|
|
8
|
+
|
|
3
9
|
## 0.10.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-hub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Bot-side code shared by every hub agent: registry tools, the roster hook, the eve channel, the host sandbox and browser, and model helpers.",
|
|
6
6
|
"type": "module",
|
package/workspace.mjs
CHANGED
|
@@ -47,9 +47,12 @@ export const DOMAIN = /^[a-z][a-z0-9-]*(\/[a-z][a-z0-9-]*)*$/;
|
|
|
47
47
|
export const NAME = /^[a-z][a-z0-9-]{1,30}$/;
|
|
48
48
|
export const HUMAN_NAME = /^[a-z][a-z0-9-]{0,30}$/;
|
|
49
49
|
const COLOR = /^#[0-9a-f]{3}([0-9a-f]{3})?$/i;
|
|
50
|
-
const AGENT_KEYS = new Set(["name", "model", "role", "color", "subagents", "subagentCap", "limits", "port", "runsOn", "domains", "kind"]);
|
|
50
|
+
const AGENT_KEYS = new Set(["name", "model", "role", "color", "subagents", "subagentCap", "limits", "port", "runsOn", "modelAuth", "domains", "kind"]);
|
|
51
51
|
|
|
52
52
|
export const RUNS_ON = ["hosted", "local"];
|
|
53
|
+
// Whose credential a bot's model calls carry: the workspace's bots project (default), the human's own
|
|
54
|
+
// Vercel sign-in, or the human's ChatGPT plan. Fixed at definition, like `runsOn`.
|
|
55
|
+
const MODEL_AUTH = ["project", "user", "codex"];
|
|
53
56
|
// The bot's place in the team (team.mjs draws the handoffs between kinds).
|
|
54
57
|
export const KINDS = ["coordinator", "planner", "builder", "reviewer", "git-ops", "demo"];
|
|
55
58
|
|
|
@@ -104,6 +107,7 @@ export function parseWorkspace(data, file = WORKSPACE_FILE) {
|
|
|
104
107
|
// Where the bot runs: on the hosted bots project (default), or on the human's Mac, started by
|
|
105
108
|
// the app's local runner. Fixed at definition.
|
|
106
109
|
if (agent.runsOn !== undefined && !RUNS_ON.includes(agent.runsOn)) fail(file, `${label}.runsOn must be "hosted" or "local"`);
|
|
110
|
+
if (agent.modelAuth !== undefined && !MODEL_AUTH.includes(agent.modelAuth)) fail(file, `${label}.modelAuth must be one of ${MODEL_AUTH.join(", ")}`);
|
|
107
111
|
if (agent.kind !== undefined && !KINDS.includes(agent.kind)) fail(file, `${label}.kind must be one of ${KINDS.join(", ")}`);
|
|
108
112
|
if (agent.domains !== undefined && (!Array.isArray(agent.domains) || agent.domains.some((d) => typeof d !== "string" || !DOMAIN.test(d)))) fail(file, `${label}.domains must be an array of memory folders like "ui" or "ui/motion"`);
|
|
109
113
|
const unknown = Object.keys(agent).filter((k) => !AGENT_KEYS.has(k));
|
|
@@ -115,6 +119,10 @@ export function parseWorkspace(data, file = WORKSPACE_FILE) {
|
|
|
115
119
|
if (!RUNS_ON.includes(data.runsOn)) fail(file, '"runsOn" must be "hosted" or "local"');
|
|
116
120
|
out.runsOn = data.runsOn;
|
|
117
121
|
}
|
|
122
|
+
// `user` and `codex` are credentials only the human's Mac holds; a hosted bot has the bots project's.
|
|
123
|
+
for (const a of agents) {
|
|
124
|
+
if (a.modelAuth !== undefined && a.modelAuth !== "project" && agentRunsOn(out, a.name) !== "local") fail(file, `${a.name}: modelAuth \"${a.modelAuth}\" needs runsOn \"local\"`);
|
|
125
|
+
}
|
|
118
126
|
if (data.humans !== undefined) {
|
|
119
127
|
if (!Array.isArray(data.humans) || !data.humans.length) fail(file, "\"humans\" must be a non-empty array");
|
|
120
128
|
out.humans = data.humans.map((h, i) => {
|