eve-hub 0.16.231 → 0.16.234
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 +1 -0
- package/connections/vercel-kit.js +3 -2
- package/hub/functions/.well-known/workflow/v1/flow.func/hub/hub.mjs +1937 -1150
- package/hub/functions/.well-known/workflow/v1/flow.func/migrations/control/0007_shared_setup.sql +8 -0
- package/hub/functions/.well-known/workflow/v1/flow.func/migrations/control/meta/_journal.json +7 -0
- package/hub/functions/.well-known/workflow/v1/flow.func/migrations/workspace/0029_head_version.sql +3 -0
- package/hub/functions/.well-known/workflow/v1/flow.func/migrations/workspace/meta/_journal.json +7 -0
- package/hub/functions/api/index.func/api/index.mjs +1937 -1150
- package/hub/functions/api/index.func/migrations/control/0007_shared_setup.sql +8 -0
- package/hub/functions/api/index.func/migrations/control/meta/_journal.json +7 -0
- package/hub/functions/api/index.func/migrations/workspace/0029_head_version.sql +3 -0
- package/hub/functions/api/index.func/migrations/workspace/meta/_journal.json +7 -0
- package/hub/migrations/control/0007_shared_setup.sql +8 -0
- package/hub/migrations/control/meta/_journal.json +7 -0
- package/hub/migrations/workspace/0029_head_version.sql +3 -0
- package/hub/migrations/workspace/meta/_journal.json +7 -0
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/hub/hub.mjs +1958 -1159
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/migrations/control/0007_shared_setup.sql +8 -0
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/migrations/control/meta/_journal.json +7 -0
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/migrations/workspace/0029_head_version.sql +3 -0
- package/hub-shared/functions/.well-known/workflow/v1/flow.func/migrations/workspace/meta/_journal.json +7 -0
- package/hub-shared/functions/api/index.func/api/index.mjs +1958 -1159
- package/hub-shared/functions/api/index.func/migrations/control/0007_shared_setup.sql +8 -0
- package/hub-shared/functions/api/index.func/migrations/control/meta/_journal.json +7 -0
- package/hub-shared/functions/api/index.func/migrations/workspace/0029_head_version.sql +3 -0
- package/hub-shared/functions/api/index.func/migrations/workspace/meta/_journal.json +7 -0
- package/hub-shared/migrations/control/0007_shared_setup.sql +8 -0
- package/hub-shared/migrations/control/meta/_journal.json +7 -0
- package/hub-shared/migrations/workspace/0029_head_version.sql +3 -0
- package/hub-shared/migrations/workspace/meta/_journal.json +7 -0
- package/hub-upload.js +3 -2
- package/kit-modules.json +3 -1
- package/memory.d.mts +4 -0
- package/onboarding/SKILL.md +1 -1
- package/onboarding/profile.d.mts +1 -0
- package/package.json +1 -1
- package/registry-fetch.mjs +1 -1
- package/skills/onboarding-profile.gen.mjs +1 -1
- package/stubs.mjs +3 -1
- package/tools/read_memory.d.ts +28 -0
- package/tools/read_memory.js +17 -0
- package/tools/restart_agent.js +1 -1
- package/tools/write_memory.d.ts +18 -0
- package/tools/write_memory.js +23 -0
- package/workspace.mjs +2 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ The bot-side code every hub agent shares (milestone M3 in [`docs/architecture`](
|
|
|
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, for a workspace with no repo | every bot's `agent/tools/<same name>.ts` |
|
|
13
14
|
| `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"` |
|
|
14
15
|
| `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"` |
|
|
15
16
|
| `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` |
|
|
@@ -3,13 +3,14 @@ import { join } from "node:path";
|
|
|
3
3
|
import { connect } from "@vercel/connect/eve";
|
|
4
4
|
import { getVercelOidcToken } from "@vercel/oidc";
|
|
5
5
|
import { defineDynamic, defineMcpClientConnection } from "eve/connections";
|
|
6
|
+
import { hubEnv } from "../tenant-env.mjs";
|
|
6
7
|
// Connect authenticates with the project's OIDC token (VERCEL_OIDC_TOKEN). When
|
|
7
8
|
// it's missing or expired, @vercel/oidc refreshes it from the `.vercel/` link
|
|
8
9
|
// above process.cwd(), and agents run in the workspace, which isn't linked.
|
|
9
10
|
// Hub is (HUB_ROOT, set by hub for every agent), so refresh against its link.
|
|
10
11
|
// The refresh writes process.env.VERCEL_OIDC_TOKEN, which Connect reads.
|
|
11
12
|
function hubProject() {
|
|
12
|
-
const root =
|
|
13
|
+
const root = hubEnv().HUB_ROOT;
|
|
13
14
|
if (!root)
|
|
14
15
|
return null;
|
|
15
16
|
try {
|
|
@@ -36,7 +37,7 @@ async function refreshProjectToken() {
|
|
|
36
37
|
// Kit and connector changes update the instance identity used when resuming
|
|
37
38
|
// an approval.
|
|
38
39
|
export default defineDynamic(async () => {
|
|
39
|
-
const connector =
|
|
40
|
+
const connector = hubEnv().KIT_CONNECTOR?.trim();
|
|
40
41
|
if (!connector)
|
|
41
42
|
return null;
|
|
42
43
|
await refreshProjectToken();
|