nodal-agents 0.3.5 → 0.3.8
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 +24 -14
- package/cli.js +57 -2
- package/migrations/0021_entities_root_agent_grants.sql +22 -0
- package/migrations/0022_approval_requests_executed_at.sql +12 -0
- package/migrations/meta/_journal.json +167 -153
- package/package.json +1 -1
- package/runner.js +1856 -1389
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +7 -7
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/page.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page.js +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/billing/page.js +1 -1
- package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
- package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
- package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/page.js +63 -2
- package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding.html +1 -1
- package/web/.next/server/app/onboarding.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/web/.next/server/app-paths-manifest.json +7 -7
- package/web/.next/server/chunks/1248.js +1 -0
- package/web/.next/server/chunks/3362.js +1 -0
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/5527.js +1 -0
- package/web/.next/server/chunks/7741.js +6 -6
- package/web/.next/server/chunks/8193.js +1 -0
- package/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/5070-4385fb454f6ec84b.js +62 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-6cd433a027afdf32.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-550fcfa4184838ea.js +1 -0
- package/web/.next/server/chunks/277.js +0 -1
- package/web/.next/server/chunks/6294.js +0 -1
- package/web/.next/server/chunks/755.js +0 -1
- package/web/.next/server/chunks/8362.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-efb99104821983ce.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-bd180e5a2b3a5bff.js +0 -1
- /package/web/.next/static/{BQkpUUo2Ux3Z5moUBYJBq → 4iUNkSxNfwq7_PqLIuvuO}/_buildManifest.js +0 -0
- /package/web/.next/static/{BQkpUUo2Ux3Z5moUBYJBq → 4iUNkSxNfwq7_PqLIuvuO}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -22,7 +22,10 @@ no cloud roundtrip.** Runs on any machine with Node 22+ — Mac, PC, Linux.
|
|
|
22
22
|
| 🧠 **Memory that compounds** | Persistent facts (entity-scoped, auto-injected into every job) and chat-thread continuity (your agent remembers what it said 30 seconds ago — and what it said yesterday). |
|
|
23
23
|
| 🤝 **Orchestrators that finish** | Router and planner orchestrators delegate to specialist sub-agents. Hard guards against runaway loops — turn caps, chain caps, per-slug delegation budgets, smart retry on side-effect-free failures. |
|
|
24
24
|
| 🔧 **Multi-instance connectors** | Gmail perso *and* Gmail boulot on the same install. OAuth *and* API-key supported. Active list + Marketplace UI in the dashboard. |
|
|
25
|
-
|
|
|
25
|
+
| 🗂️ **Workspaces** | Multiple isolated workspaces on one install (personal vs work) — each with its own agents, skills, connectors, jobs and memory. Switch from the sidebar. |
|
|
26
|
+
| 🤖 **Self-extending (ROOT agent)** | Designate an orchestrator as ROOT and let it create skills/agents and assign them on your behalf — gated by per-grant toggles and an autonomy level (propose-confirm → fully-autonomous). |
|
|
27
|
+
| 📄 **Office files** | Read + edit Excel in place, create Word & PowerPoint, inside the agent's workspace — gated behind the office-editing skill. |
|
|
28
|
+
| 📡 **MCP support** | Connect MCP servers over Streamable HTTP *and* stdio (local subprocess) — a growing catalogue (Stripe, n8n, Supabase, Vercel, Airtable, Notion…) plus add *and edit* your own custom servers from the UI. Per-job tool discovery, tool whitelisting, multi-instance. |
|
|
26
29
|
| 💬 **Telegram out of the box** | Long-polling, multi-agent routing (`/ask <slug>`), group-chat filters, conversation continuity, delegation gracefulness on Telegram. |
|
|
27
30
|
| ⚙️ **Real engineering** | TypeScript strict, dependency-cruiser-enforced architecture, full unit + integration suite, Playwright e2e, idempotent migrations, encryption at rest for keys. |
|
|
28
31
|
|
|
@@ -131,13 +134,13 @@ Delegations create child jobs that resume the parent on completion.
|
|
|
131
134
|
| `/agents` | Create, edit, assign skills + connectors + MCP servers to agents. |
|
|
132
135
|
| `/jobs` | Live job stream — task, agent, status, full transcript, tool I/O. |
|
|
133
136
|
| `/connectors` | Active connector instances + Marketplace (multi-instance, OAuth or API-key). |
|
|
134
|
-
| `/mcp` | Active MCP servers + Marketplace
|
|
137
|
+
| `/mcp` | Active MCP servers + Marketplace — HTTP & stdio, a growing catalogue, plus add/edit your own custom servers. |
|
|
135
138
|
| `/memories` | Persistent facts per entity — search, edit, archive. |
|
|
136
|
-
| `/skills` |
|
|
139
|
+
| `/skills` | Assigned / Custom / Built-in Library tabs — reusable instructions appended to an agent's prompt; create your own or customise built-ins. |
|
|
137
140
|
| `/logs` | Tool-call audit — input/output JSON per call, filterable by tool name. |
|
|
138
|
-
| `/approvals` | Human-in-the-loop gates for risky tools. |
|
|
141
|
+
| `/approvals` | Human-in-the-loop gates for risky tools (and the ROOT agent's meta-tools under propose-confirm). |
|
|
139
142
|
| `/automations` | Cron-scheduled agent triggers. |
|
|
140
|
-
| `/settings` | LLM keys, auth mode, network (loopback / LAN), bot tokens. |
|
|
143
|
+
| `/settings` | LLM keys, auth mode, network (loopback / LAN), bot tokens, workspace management, ROOT-agent designation + grants/autonomy. |
|
|
141
144
|
|
|
142
145
|
---
|
|
143
146
|
|
|
@@ -177,8 +180,8 @@ packages/
|
|
|
177
180
|
├── runner-adapters Adapter registry, agent ↔ tool wiring
|
|
178
181
|
├── delivery Telegram, email
|
|
179
182
|
├── auth Pluggable auth provider
|
|
180
|
-
├── catalog Shipped system skills (telegram-responder,
|
|
181
|
-
│
|
|
183
|
+
├── catalog Shipped system skills (office-editing, telegram-responder,
|
|
184
|
+
│ obsidian, task-planning, markdown-output, language-mirror …)
|
|
182
185
|
└── secrets AES-256-GCM key vault
|
|
183
186
|
```
|
|
184
187
|
|
|
@@ -201,7 +204,7 @@ pnpm deps:check # runs locally and in CI before every release
|
|
|
201
204
|
|
|
202
205
|
## Status
|
|
203
206
|
|
|
204
|
-
**Current release:** `0.
|
|
207
|
+
**Current release:** `0.3.8` on npm `latest`. Used daily by the
|
|
205
208
|
maintainer, stable enough for personal production. Pre-1.0 — breaking
|
|
206
209
|
changes are still possible between minors.
|
|
207
210
|
|
|
@@ -215,11 +218,18 @@ changes are still possible between minors.
|
|
|
215
218
|
caps
|
|
216
219
|
- Multi-instance connectors with OAuth (Gmail, Drive, Sheets, Docs, Notion,
|
|
217
220
|
Airtable) and API-key (Notion, Airtable, Apify, Firecrawl, Tavily)
|
|
218
|
-
- MCP Streamable HTTP
|
|
221
|
+
- MCP catalog — Streamable HTTP *and* stdio (local subprocess) servers, API-key auth; a growing catalogue (Stripe, n8n, Supabase, Vercel, Airtable, Notion…) with a "test pending" badge on entries not yet verified live, plus add *and edit* your own custom HTTP/stdio servers from the dashboard
|
|
222
|
+
- Top-level workspaces — multiple isolated entities (agents/skills/connectors/jobs/memory per workspace), switch in the sidebar
|
|
223
|
+
- ROOT agent — designate an orchestrator that can create skills/agents and assign them, gated by per-grant toggles + an autonomy/approval level
|
|
224
|
+
- Office file editing — Excel in-place edit, Word/PowerPoint create, in the agent workspace (office-editing skill)
|
|
225
|
+
- Multiple filesystem folders per agent (sandboxed `file_*` tools)
|
|
219
226
|
- Telegram delivery (long-poll, group filters, multi-agent routing,
|
|
220
|
-
delegation gracefulness)
|
|
221
|
-
|
|
227
|
+
delegation gracefulness) — exactly-once delivery contract: anti-spam guard
|
|
228
|
+
against runaway message loops + a guard that re-prompts (then fails loud)
|
|
229
|
+
rather than completing a job without ever replying
|
|
230
|
+
- Approval gates for risky tools (execute-the-approved-action on resume)
|
|
222
231
|
- Cron scheduling
|
|
232
|
+
- `nodal-agents update` — one-command upgrade + boot version notice
|
|
223
233
|
- Encryption at rest for LLM keys + MCP keys
|
|
224
234
|
- Embedded Postgres distribution via npm (no external DB to install)
|
|
225
235
|
|
|
@@ -227,9 +237,9 @@ changes are still possible between minors.
|
|
|
227
237
|
|
|
228
238
|
- **MCP OAuth flow** → unlocks Linear, Notion remote, GitHub remote,
|
|
229
239
|
Atlassian, Sentry, and the rest of the SaaS-as-MCP ecosystem.
|
|
230
|
-
- **
|
|
231
|
-
|
|
232
|
-
|
|
240
|
+
- **Dashboard chat for the ROOT companion** → talk to your ROOT agent in
|
|
241
|
+
the app, multi-turn, instead of via Telegram; plus a dry-run mode and a
|
|
242
|
+
test-workflow meta-tool.
|
|
233
243
|
- **pgvector binaries bundled in the npm pack** → semantic memory search
|
|
234
244
|
active out-of-the-box. Today, installs without pgvector fall back to
|
|
235
245
|
keyword search (which works, just less smart for cross-vocabulary
|
package/cli.js
CHANGED
|
@@ -12158,6 +12158,22 @@ var init_providers = __esm({
|
|
|
12158
12158
|
}
|
|
12159
12159
|
});
|
|
12160
12160
|
|
|
12161
|
+
// ../../packages/shared/src/root-agent.ts
|
|
12162
|
+
import { z as z19 } from "zod";
|
|
12163
|
+
var AutonomyLevelSchema, RootGrantsSchema;
|
|
12164
|
+
var init_root_agent = __esm({
|
|
12165
|
+
"../../packages/shared/src/root-agent.ts"() {
|
|
12166
|
+
"use strict";
|
|
12167
|
+
AutonomyLevelSchema = z19.enum(["propose_confirm", "destructive_gate", "fully_autonomous"]);
|
|
12168
|
+
RootGrantsSchema = z19.object({
|
|
12169
|
+
createAgent: z19.boolean(),
|
|
12170
|
+
createSkill: z19.boolean(),
|
|
12171
|
+
assignSkill: z19.boolean(),
|
|
12172
|
+
autonomy: AutonomyLevelSchema
|
|
12173
|
+
});
|
|
12174
|
+
}
|
|
12175
|
+
});
|
|
12176
|
+
|
|
12161
12177
|
// ../../packages/shared/src/index.ts
|
|
12162
12178
|
var init_src2 = __esm({
|
|
12163
12179
|
"../../packages/shared/src/index.ts"() {
|
|
@@ -12181,6 +12197,7 @@ var init_src2 = __esm({
|
|
|
12181
12197
|
init_agent_run();
|
|
12182
12198
|
init_operation();
|
|
12183
12199
|
init_providers();
|
|
12200
|
+
init_root_agent();
|
|
12184
12201
|
}
|
|
12185
12202
|
});
|
|
12186
12203
|
|
|
@@ -12270,12 +12287,25 @@ var init_entities = __esm({
|
|
|
12270
12287
|
industry: text("industry"),
|
|
12271
12288
|
goal: text("goal"),
|
|
12272
12289
|
mcpToken: uuid("mcp_token").defaultRandom(),
|
|
12290
|
+
// ROOT agent designation (Wave 1 — V4 ROOT agent, 2026-05-29).
|
|
12291
|
+
// Points at the agent that receives meta-tools. Set null when no root
|
|
12292
|
+
// agent is designated. FK uses a lazy callback to avoid the circular
|
|
12293
|
+
// import (agents.ts imports entities.ts for its own FK — a direct TS
|
|
12294
|
+
// import here would create a module cycle; the lazy arrow breaks it at
|
|
12295
|
+
// Drizzle schema resolution time while TS only sees the type via the
|
|
12296
|
+
// forward-reference pattern).
|
|
12297
|
+
rootAgentId: uuid("root_agent_id"),
|
|
12298
|
+
// Per-grant toggles + autonomy level for the root agent. Stored as JSONB
|
|
12299
|
+
// and parsed at runtime via parseRootGrants() from @nodal-agents/shared.
|
|
12300
|
+
// Default is an empty object — the runtime falls back to DEFAULT_ROOT_GRANTS.
|
|
12301
|
+
rootGrants: jsonb("root_grants").notNull().default(sql`'{}'::jsonb`),
|
|
12273
12302
|
createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
|
|
12274
12303
|
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
|
|
12275
12304
|
},
|
|
12276
12305
|
(table) => [
|
|
12277
12306
|
uniqueIndex("entities_mcp_token_idx").on(table.mcpToken),
|
|
12278
|
-
index("idx_entities_user_id").on(table.userId)
|
|
12307
|
+
index("idx_entities_user_id").on(table.userId),
|
|
12308
|
+
index("idx_entities_root_agent_id").on(table.rootAgentId)
|
|
12279
12309
|
]
|
|
12280
12310
|
);
|
|
12281
12311
|
entityMembers = pgTable(
|
|
@@ -12704,7 +12734,13 @@ var init_approvals = __esm({
|
|
|
12704
12734
|
expiresAt: timestamp("expires_at", { withTimezone: true }).default(
|
|
12705
12735
|
sql`now() + interval '1 hour'`
|
|
12706
12736
|
),
|
|
12707
|
-
notes: text("notes")
|
|
12737
|
+
notes: text("notes"),
|
|
12738
|
+
/**
|
|
12739
|
+
* Stamped by the runner's resume step once the approved/rejected tool has
|
|
12740
|
+
* been executed (or its marker replaced). NULL = not yet executed.
|
|
12741
|
+
* Guards against double-execution on duplicate resume triggers.
|
|
12742
|
+
*/
|
|
12743
|
+
executedAt: timestamp("executed_at", { withTimezone: true })
|
|
12708
12744
|
},
|
|
12709
12745
|
(table) => [
|
|
12710
12746
|
index("idx_approval_requests_entity_id").on(table.entityId),
|
|
@@ -13388,6 +13424,23 @@ var init_credentials2 = __esm({
|
|
|
13388
13424
|
}
|
|
13389
13425
|
});
|
|
13390
13426
|
|
|
13427
|
+
// ../../packages/db/src/repos/agents.ts
|
|
13428
|
+
var init_agents2 = __esm({
|
|
13429
|
+
"../../packages/db/src/repos/agents.ts"() {
|
|
13430
|
+
"use strict";
|
|
13431
|
+
init_agents();
|
|
13432
|
+
}
|
|
13433
|
+
});
|
|
13434
|
+
|
|
13435
|
+
// ../../packages/db/src/repos/skills.ts
|
|
13436
|
+
var init_skills2 = __esm({
|
|
13437
|
+
"../../packages/db/src/repos/skills.ts"() {
|
|
13438
|
+
"use strict";
|
|
13439
|
+
init_agents();
|
|
13440
|
+
init_skills();
|
|
13441
|
+
}
|
|
13442
|
+
});
|
|
13443
|
+
|
|
13391
13444
|
// ../../packages/db/src/index.ts
|
|
13392
13445
|
var init_src4 = __esm({
|
|
13393
13446
|
"../../packages/db/src/index.ts"() {
|
|
@@ -13396,6 +13449,8 @@ var init_src4 = __esm({
|
|
|
13396
13449
|
init_transaction();
|
|
13397
13450
|
init_schema2();
|
|
13398
13451
|
init_credentials2();
|
|
13452
|
+
init_agents2();
|
|
13453
|
+
init_skills2();
|
|
13399
13454
|
init_drizzle_orm();
|
|
13400
13455
|
}
|
|
13401
13456
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-- 0021_entities_root_agent_grants.sql
|
|
2
|
+
-- Wave 1 — V4 ROOT agent foundation (2026-05-29):
|
|
3
|
+
-- 1. ADD COLUMN entities.root_agent_id (nullable FK → agents.id, set null on delete)
|
|
4
|
+
-- 2. ADD COLUMN entities.root_grants (jsonb, not null, default '{}')
|
|
5
|
+
-- 3. CREATE INDEX idx_entities_root_agent_id
|
|
6
|
+
--
|
|
7
|
+
-- All steps are idempotent (IF NOT EXISTS / IF EXISTS guards).
|
|
8
|
+
|
|
9
|
+
-- ─── 1. root_agent_id ────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
ALTER TABLE entities
|
|
12
|
+
ADD COLUMN IF NOT EXISTS root_agent_id uuid
|
|
13
|
+
REFERENCES agents(id) ON DELETE SET NULL;
|
|
14
|
+
|
|
15
|
+
-- ─── 2. root_grants ──────────────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
ALTER TABLE entities
|
|
18
|
+
ADD COLUMN IF NOT EXISTS root_grants jsonb NOT NULL DEFAULT '{}'::jsonb;
|
|
19
|
+
|
|
20
|
+
-- ─── 3. Index ────────────────────────────────────────────────────────────────
|
|
21
|
+
|
|
22
|
+
CREATE INDEX IF NOT EXISTS idx_entities_root_agent_id ON entities(root_agent_id);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- 0022_approval_requests_executed_at.sql
|
|
2
|
+
-- Approval-gate execute-on-resume (2026-05-29):
|
|
3
|
+
-- ADD COLUMN approval_requests.executed_at (nullable timestamptz)
|
|
4
|
+
--
|
|
5
|
+
-- When execute.ts resumes a job, it checks for approved/rejected requests
|
|
6
|
+
-- where executed_at IS NULL, executes the tool, and stamps executed_at = now().
|
|
7
|
+
-- This prevents double-execution on duplicate resume triggers.
|
|
8
|
+
--
|
|
9
|
+
-- Idempotent: ADD COLUMN IF NOT EXISTS.
|
|
10
|
+
|
|
11
|
+
ALTER TABLE approval_requests
|
|
12
|
+
ADD COLUMN IF NOT EXISTS executed_at timestamptz;
|
|
@@ -1,153 +1,167 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "7",
|
|
3
|
-
"dialect": "postgresql",
|
|
4
|
-
"entries": [
|
|
5
|
-
{
|
|
6
|
-
"idx": 0,
|
|
7
|
-
"version": "7",
|
|
8
|
-
"when": 1777221376983,
|
|
9
|
-
"tag": "0000_flashy_clea",
|
|
10
|
-
"breakpoints": true
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"idx": 1,
|
|
14
|
-
"version": "7",
|
|
15
|
-
"when": 1777222639218,
|
|
16
|
-
"tag": "0001_exotic_shooting_star",
|
|
17
|
-
"breakpoints": true
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"idx": 2,
|
|
21
|
-
"version": "7",
|
|
22
|
-
"when": 1777222668100,
|
|
23
|
-
"tag": "0002_gray_devos",
|
|
24
|
-
"breakpoints": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"idx": 3,
|
|
28
|
-
"version": "7",
|
|
29
|
-
"when": 1778116559502,
|
|
30
|
-
"tag": "0003_stormy_thaddeus_ross",
|
|
31
|
-
"breakpoints": true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"idx": 4,
|
|
35
|
-
"version": "7",
|
|
36
|
-
"when": 1778141889404,
|
|
37
|
-
"tag": "0004_married_deadpool",
|
|
38
|
-
"breakpoints": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"idx": 5,
|
|
42
|
-
"version": "7",
|
|
43
|
-
"when": 1778237574443,
|
|
44
|
-
"tag": "0005_tense_hedge_knight",
|
|
45
|
-
"breakpoints": true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"idx": 6,
|
|
49
|
-
"version": "7",
|
|
50
|
-
"when": 1778341607214,
|
|
51
|
-
"tag": "0006_credentials_table",
|
|
52
|
-
"breakpoints": true
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"idx": 7,
|
|
56
|
-
"version": "7",
|
|
57
|
-
"when": 1778421836079,
|
|
58
|
-
"tag": "0007_free_speed",
|
|
59
|
-
"breakpoints": true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"idx": 8,
|
|
63
|
-
"version": "7",
|
|
64
|
-
"when": 1778459305708,
|
|
65
|
-
"tag": "0008_curious_thor_girl",
|
|
66
|
-
"breakpoints": true
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"idx": 9,
|
|
70
|
-
"version": "7",
|
|
71
|
-
"when": 1778860776473,
|
|
72
|
-
"tag": "0009_agent_memory_token_budget",
|
|
73
|
-
"breakpoints": true
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"idx": 10,
|
|
77
|
-
"version": "7",
|
|
78
|
-
"when": 1778940762250,
|
|
79
|
-
"tag": "0010_agent_workspace_root",
|
|
80
|
-
"breakpoints": true
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"idx": 11,
|
|
84
|
-
"version": "7",
|
|
85
|
-
"when": 1779000000000,
|
|
86
|
-
"tag": "0011_agent_jobs_failed_delegations_count",
|
|
87
|
-
"breakpoints": true
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"idx": 12,
|
|
91
|
-
"version": "7",
|
|
92
|
-
"when": 1779100000000,
|
|
93
|
-
"tag": "0012_agent_jobs_last_failed_delegation_slug",
|
|
94
|
-
"breakpoints": true
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"idx": 13,
|
|
98
|
-
"version": "7",
|
|
99
|
-
"when": 1779200000000,
|
|
100
|
-
"tag": "0013_cascade_agent_fks",
|
|
101
|
-
"breakpoints": true
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"idx": 14,
|
|
105
|
-
"version": "7",
|
|
106
|
-
"when": 1779400000000,
|
|
107
|
-
"tag": "0014_mcp_server_credentials",
|
|
108
|
-
"breakpoints": true
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"idx": 15,
|
|
112
|
-
"version": "7",
|
|
113
|
-
"when": 1779500000000,
|
|
114
|
-
"tag": "0015_agent_mcp_servers_unique",
|
|
115
|
-
"breakpoints": true
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"idx": 16,
|
|
119
|
-
"version": "7",
|
|
120
|
-
"when": 1779600000000,
|
|
121
|
-
"tag": "0016_drop_connector_entity_slug_unique",
|
|
122
|
-
"breakpoints": true
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"idx": 17,
|
|
126
|
-
"version": "7",
|
|
127
|
-
"when": 1779700000000,
|
|
128
|
-
"tag": "0017_drop_mcp_server_entity_slug_unique",
|
|
129
|
-
"breakpoints": true
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"idx": 18,
|
|
133
|
-
"version": "7",
|
|
134
|
-
"when": 1779800000000,
|
|
135
|
-
"tag": "0018_mcp_servers_bearer_auth",
|
|
136
|
-
"breakpoints": true
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"idx": 19,
|
|
140
|
-
"version": "7",
|
|
141
|
-
"when": 1779900000000,
|
|
142
|
-
"tag": "0019_agents_position",
|
|
143
|
-
"breakpoints": true
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"idx": 20,
|
|
147
|
-
"version": "7",
|
|
148
|
-
"when": 1780000000000,
|
|
149
|
-
"tag": "0020_agent_workspaces",
|
|
150
|
-
"breakpoints": true
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "postgresql",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "7",
|
|
8
|
+
"when": 1777221376983,
|
|
9
|
+
"tag": "0000_flashy_clea",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "7",
|
|
15
|
+
"when": 1777222639218,
|
|
16
|
+
"tag": "0001_exotic_shooting_star",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"idx": 2,
|
|
21
|
+
"version": "7",
|
|
22
|
+
"when": 1777222668100,
|
|
23
|
+
"tag": "0002_gray_devos",
|
|
24
|
+
"breakpoints": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"idx": 3,
|
|
28
|
+
"version": "7",
|
|
29
|
+
"when": 1778116559502,
|
|
30
|
+
"tag": "0003_stormy_thaddeus_ross",
|
|
31
|
+
"breakpoints": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"idx": 4,
|
|
35
|
+
"version": "7",
|
|
36
|
+
"when": 1778141889404,
|
|
37
|
+
"tag": "0004_married_deadpool",
|
|
38
|
+
"breakpoints": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"idx": 5,
|
|
42
|
+
"version": "7",
|
|
43
|
+
"when": 1778237574443,
|
|
44
|
+
"tag": "0005_tense_hedge_knight",
|
|
45
|
+
"breakpoints": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"idx": 6,
|
|
49
|
+
"version": "7",
|
|
50
|
+
"when": 1778341607214,
|
|
51
|
+
"tag": "0006_credentials_table",
|
|
52
|
+
"breakpoints": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"idx": 7,
|
|
56
|
+
"version": "7",
|
|
57
|
+
"when": 1778421836079,
|
|
58
|
+
"tag": "0007_free_speed",
|
|
59
|
+
"breakpoints": true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"idx": 8,
|
|
63
|
+
"version": "7",
|
|
64
|
+
"when": 1778459305708,
|
|
65
|
+
"tag": "0008_curious_thor_girl",
|
|
66
|
+
"breakpoints": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"idx": 9,
|
|
70
|
+
"version": "7",
|
|
71
|
+
"when": 1778860776473,
|
|
72
|
+
"tag": "0009_agent_memory_token_budget",
|
|
73
|
+
"breakpoints": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"idx": 10,
|
|
77
|
+
"version": "7",
|
|
78
|
+
"when": 1778940762250,
|
|
79
|
+
"tag": "0010_agent_workspace_root",
|
|
80
|
+
"breakpoints": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"idx": 11,
|
|
84
|
+
"version": "7",
|
|
85
|
+
"when": 1779000000000,
|
|
86
|
+
"tag": "0011_agent_jobs_failed_delegations_count",
|
|
87
|
+
"breakpoints": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"idx": 12,
|
|
91
|
+
"version": "7",
|
|
92
|
+
"when": 1779100000000,
|
|
93
|
+
"tag": "0012_agent_jobs_last_failed_delegation_slug",
|
|
94
|
+
"breakpoints": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"idx": 13,
|
|
98
|
+
"version": "7",
|
|
99
|
+
"when": 1779200000000,
|
|
100
|
+
"tag": "0013_cascade_agent_fks",
|
|
101
|
+
"breakpoints": true
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"idx": 14,
|
|
105
|
+
"version": "7",
|
|
106
|
+
"when": 1779400000000,
|
|
107
|
+
"tag": "0014_mcp_server_credentials",
|
|
108
|
+
"breakpoints": true
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"idx": 15,
|
|
112
|
+
"version": "7",
|
|
113
|
+
"when": 1779500000000,
|
|
114
|
+
"tag": "0015_agent_mcp_servers_unique",
|
|
115
|
+
"breakpoints": true
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"idx": 16,
|
|
119
|
+
"version": "7",
|
|
120
|
+
"when": 1779600000000,
|
|
121
|
+
"tag": "0016_drop_connector_entity_slug_unique",
|
|
122
|
+
"breakpoints": true
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"idx": 17,
|
|
126
|
+
"version": "7",
|
|
127
|
+
"when": 1779700000000,
|
|
128
|
+
"tag": "0017_drop_mcp_server_entity_slug_unique",
|
|
129
|
+
"breakpoints": true
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"idx": 18,
|
|
133
|
+
"version": "7",
|
|
134
|
+
"when": 1779800000000,
|
|
135
|
+
"tag": "0018_mcp_servers_bearer_auth",
|
|
136
|
+
"breakpoints": true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"idx": 19,
|
|
140
|
+
"version": "7",
|
|
141
|
+
"when": 1779900000000,
|
|
142
|
+
"tag": "0019_agents_position",
|
|
143
|
+
"breakpoints": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"idx": 20,
|
|
147
|
+
"version": "7",
|
|
148
|
+
"when": 1780000000000,
|
|
149
|
+
"tag": "0020_agent_workspaces",
|
|
150
|
+
"breakpoints": true
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"idx": 21,
|
|
154
|
+
"version": "7",
|
|
155
|
+
"when": 1780100000000,
|
|
156
|
+
"tag": "0021_entities_root_agent_grants",
|
|
157
|
+
"breakpoints": true
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"idx": 22,
|
|
161
|
+
"version": "7",
|
|
162
|
+
"when": 1780200000000,
|
|
163
|
+
"tag": "0022_approval_requests_executed_at",
|
|
164
|
+
"breakpoints": true
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|