eve-hub 0.16.274 → 0.16.277
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 +4 -2
- package/execution-context.mjs +1 -1
- package/hub/functions/.well-known/workflow/v1/flow.func/hub/hub.mjs +220 -70
- package/hub/functions/api/index.func/api/index.mjs +220 -70
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/hub/hub.mjs +220 -70
- package/hub-shared/functions/api/index.func/api/index.mjs +220 -70
- package/kit-change.mjs +1 -1
- package/kit-modules.json +2 -1
- package/main-instructions.mjs +27 -16
- package/memory.mjs +9 -10
- package/onboarding/SKILL.md +1 -1
- package/package.json +1 -1
- package/prepare.mjs +1 -1
- package/skills/onboarding-profile.gen.mjs +1 -1
- package/skills/spend-analysis.d.ts +2 -0
- package/skills/spend-analysis.gen.mjs +2 -0
- package/skills/spend-analysis.js +5 -0
- package/spend-analysis/SKILL.md +56 -0
- package/spend-analysis/report.mjs +149 -0
- package/stubs.mjs +13 -5
- package/sync-kit.mjs +10 -4
- package/templates/deliveries.md +1 -1
- package/templates/execution-context-hosted-main.md +1 -1
- package/templates/main-instructions.md +2 -2
- package/tools/hub_usage.d.ts +28 -0
- package/tools/hub_usage.js +31 -0
- package/tools/read_memory.js +1 -1
- package/tools/tag_threads.d.ts +2 -2
- package/tools/tag_threads.js +22 -11
- package/tools/write_memory.js +2 -2
- package/tools/apply_tags.d.ts +0 -42
- package/tools/apply_tags.js +0 -40
package/README.md
CHANGED
|
@@ -5,12 +5,14 @@ The bot-side code every hub agent shares (milestone M3 in [`docs/architecture`](
|
|
|
5
5
|
| Module | What it is | Bots use it as |
|
|
6
6
|
|---|---|---|
|
|
7
7
|
| `tools/update_thread.ts`, `list_threads.ts`, `read_thread.ts`, `react.ts`, `show.ts`, `browser.ts` | Registry and workspace tools (`defineTool`) | `agent/tools/<same name>.ts` |
|
|
8
|
-
| `tools/create_thread.ts`, `post_message.ts`, `archive_thread.ts`, `unarchive_thread.ts`, `list_agents.ts`, `create_agent.ts`, `remove_agent.ts`, `update_agent.ts`, `restart_agent.ts`, `tag_threads.ts
|
|
8
|
+
| `tools/create_thread.ts`, `post_message.ts`, `archive_thread.ts`, `unarchive_thread.ts`, `list_agents.ts`, `create_agent.ts`, `remove_agent.ts`, `update_agent.ts`, `restart_agent.ts`, `tag_threads.ts` | The orchestrator's tools | `main`'s `agent/tools/<same name>.ts` |
|
|
9
9
|
| `hooks/sandbox.ts` | Migrates legacy Docker sessions to the host sandbox (`defineHook`) | `agent/hooks/sandbox.ts` |
|
|
10
10
|
| `instructions/main.ts`, `main-instructions.mjs` | main's instructions (`defineInstructions`), rendered at build time from the kit's `templates/main-instructions.md` (identity, role) between the shared templates, each in its own tag, so no workspace carries a copy | `main`'s `agent/instructions.ts`; workspace-only additions in `agent/role/*.md` (inside `<role>`) |
|
|
11
11
|
| `instructions.ts` (`botInstructions`) | Every other bot's whole prompt, in order: its identity (`You are **name**. <role>`, from its `hub.workspace.json` entry), the shared sections (`templates/team.md`, `execution.md`, `delegation.md` only when the entry declares `subagents`, `engineering.md`, `deliveries.md`, `reaching-others.md`, `writing.md`, each in its tag) and its `role.md` in `<role>` (left out when empty) | every other bot's `agent/instructions.ts` and `agent/role.md`, which holds only how the bot works. `instructions/protocol.ts` (the shared sections alone, appended after the bot's own `instructions.md`) is the older layout, kept for a workspace that hasn't moved |
|
|
12
12
|
| `instructions/engineering.ts` | The engineering page alone (`templates/engineering.md`), for a subagent that doesn't carry the protocol | the subagent's `instructions/engineering.ts` |
|
|
13
|
-
| `tools/read_memory.ts`, `write_memory.ts` | Read and write memory entries through the hub's `/api/memory` routes,
|
|
13
|
+
| `tools/read_memory.ts`, `write_memory.ts` | Read and write memory entries through the hub's `/api/memory` routes, to the workspace's active source (a database or a GitHub repo) | every bot's `agent/tools/<same name>.ts` |
|
|
14
|
+
| `tools/hub_usage.ts` | Opt-in. Fetches the hub's per-turn spend ledger (`GET /api/usage`, at most 31 days) into the sandbox as JSON; the `spend-analysis` skill reads it | a bot that adds the stub itself, `agent/tools/hub_usage.ts` (`syncKit` never writes or deletes it) |
|
|
15
|
+
| `skills/spend-analysis.ts`, `spend-analysis/` | Opt-in skill (`SKILL.md` and `report.mjs`, embedded by `scripts/build-onboarding.mjs` into `skills/spend-analysis.gen.mjs`) that explains where model spend goes from the `hub_usage` ledger and the AI Gateway bill | a bot that adds the stub itself, `agent/skills/spend-analysis.ts` (`syncKit` never writes or deletes it) |
|
|
14
16
|
| `memory/workspace.ts`, `memory.mjs` | an eve memory slot (default export, constant `workspace` scope) whose provider recalls the workspace's `memory/<id>.md` entries (plus the `memory/<domain>/` folders the bot lists as `domains` in its roster entry), one message each, at every turn start and after compaction, only the ones whose text changed since the session last saw them, as new messages after the history; `validateMemory(root)` for a workspace's tests | every bot's (main too) `agent/memory/workspace.ts`: `export { default } from "eve-hub/memory/workspace"` |
|
|
15
17
|
| `memory/bot.ts` | the same for the bot's own `agents/<bot>/memory/<id>.md` entries; the bot is found from its directory (`findBotDir`), scope is its name | every bot's `agent/memory/bot.ts`: `export { default } from "eve-hub/memory/bot"` |
|
|
16
18
|
| `channels/eve-roster-user.ts` | `eveChannel({ auth: [rosterUser, localDev()] })`: eve's default steer policy, and the registry's `x-roster-user` human as a user principal | every bot's `agent/channels/eve.ts` |
|
package/execution-context.mjs
CHANGED
|
@@ -65,7 +65,7 @@ export function hostedContext({ bot, coordinator, kit, removed, deployment: d, g
|
|
|
65
65
|
git
|
|
66
66
|
? "- **GitHub:** goes through the `git__gh` tool, which runs each command with the human's own GitHub token, so pushes, pull requests and commits are theirs; plain `git` and `gh` in bash cannot authenticate. Clone inside the sandbox workspace, never under `/tmp`: `workingDirectory` must stay inside it, or the tool refuses with \"workingDirectory must stay inside the sandbox workspace\"."
|
|
67
67
|
: "- **GitHub:** your shell has no GitHub credential: `git` cannot authenticate, so a private repository won't clone and nothing can be pushed. When a `vercel-kit` connection is listed, reach GitHub through it (eve__search, then eve__tool); otherwise tell the human this deployment has no GitHub access.",
|
|
68
|
-
"- **Memory:** the standing decisions you recall are the `memory/` and `agents/<bot>/memory
|
|
68
|
+
"- **Memory:** the standing decisions you recall are the active entries of `memory/` and `agents/<bot>/memory/`. A workspace whose files live in the hub's database recalls a `write_memory` entry from your next turn. A workspace built from a repository recalls the files built into each deployment, so an entry takes effect when the deployment that contains it is live.",
|
|
69
69
|
"- **Limits:** there is no `hub` CLI, you cannot restart yourself or any bot, and there are no host paths: your shell is a Vercel Sandbox with its own filesystem, not the owner's machine.",
|
|
70
70
|
`- **Kit tools this build removed:** ${removed.length ? list(removed) : "none"}. They need the hub's machine, or change the roster, which a deployment does by commit.`,
|
|
71
71
|
`- **Logs:** ${dashboard ? `[runtime logs](${dashboard}/logs)${d.deployment ? ` and [this deployment](${dashboard}/${d.deployment.replace(/^dpl_/, "")})` : ""} in the Vercel dashboard` : "the Vercel project's runtime logs in the dashboard"}.`,
|