nodal-agents 0.5.0 → 0.5.3
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 +9 -1
- package/cli.js +60 -7
- package/migrations/0037_agent_jobs_total_cost_usd.sql +11 -11
- package/migrations/0038_agent_jobs_served_provider.sql +7 -7
- package/migrations/0039_agent_skills_learning_loop.sql +20 -20
- package/migrations/0040_entities_last_curator_run.sql +7 -7
- package/migrations/0041_reflection_enabled.sql +1 -1
- package/migrations/0042_drop_agent_runs.sql +1 -1
- package/migrations/0043_skill_assignment.sql +2 -2
- package/migrations/0044_entities_lan_command_yolo.sql +1 -0
- package/migrations/0045_app_settings.sql +5 -0
- package/migrations/0046_skill_assignment_scripts_authorized.sql +1 -0
- package/migrations/0047_agent_schedules_timezone.sql +1 -0
- package/migrations/0048_entities_timezone.sql +1 -0
- package/migrations/meta/_journal.json +342 -307
- package/package.json +1 -1
- package/runner.js +3681 -1592
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +2 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/routes-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +5 -3
- 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.js.nft.json +1 -1
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +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 +2 -2
- 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.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/billing/page.js +2 -2
- package/web/.next/server/app/(dashboard)/billing/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +2 -2
- 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 +2 -2
- 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.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
- 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)/learned-skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/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.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
- package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +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.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js +4 -4
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/root-context/page.js +2 -0
- package/web/.next/server/app/(dashboard)/settings/root-context/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -0
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
- 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 +2 -2
- 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.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page.js +3 -3
- 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 +2 -2
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page.js +2 -2
- 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 +3 -3
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- 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 +2 -2
- package/web/.next/server/app/api/auth/[...all]/route.js +1 -1
- package/web/.next/server/app/api/health/route.js +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/auth/callback/route.js +1 -1
- package/web/.next/server/app/login/page.js +2 -2
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page.js +2 -2
- 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 +3 -3
- package/web/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- 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 +2 -1
- package/web/.next/server/chunks/1544.js +1 -0
- package/web/.next/server/chunks/1827.js +1 -0
- package/web/.next/server/chunks/3188.js +1 -0
- package/web/.next/server/chunks/3636.js +1 -1
- package/web/.next/server/chunks/4370.js +1425 -0
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/473.js +1 -0
- package/web/.next/server/chunks/6200.js +1 -0
- package/web/.next/server/chunks/652.js +709 -0
- package/web/.next/server/chunks/6778.js +1 -0
- package/web/.next/server/chunks/7415.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/6097-12165ea99c077896.js +1 -0
- package/web/.next/static/chunks/{7164-a5cae6a1833041a7.js → 7164-080c206b663d64b2.js} +1 -1
- package/web/.next/static/chunks/{6908-e8114db85dca4371.js → 8666-90a1f5d99b79411e.js} +1 -1
- package/web/.next/static/chunks/9711-628acc64d23620d2.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-72e5a7541de7e969.js +4 -0
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-8556dfa45a425603.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-6c4c1c753858c7b8.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-ef2666c5ac3ede9b.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-a34502d1a8386a62.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-d53d13942bd635a4.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/memories/page-ebcc28ea081ae566.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-b3cc57c577895cac.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-6830a271484d97d5.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-ddd8ebba5889c9a4.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-6246f9236b209e76.js +1 -0
- package/web/.next/static/chunks/app/error-f106e9e65e16edb3.js +1 -0
- package/web/.next/static/css/f93e519b745ac2de.css +3 -0
- package/web/.next/static/myxe5H5Kmyn7MUh1XMxek/_buildManifest.js +1 -0
- package/web/public/connector-icons/airtable.svg +13 -0
- package/web/public/connector-icons/git.svg +3 -0
- package/web/public/connector-icons/github.svg +10 -0
- package/web/public/connector-icons/gmail.svg +14 -0
- package/web/public/connector-icons/google-docs.svg +12 -0
- package/web/public/connector-icons/google-drive.svg +8 -0
- package/web/public/connector-icons/google-sheets.svg +25 -0
- package/web/public/connector-icons/notion.svg +3 -0
- package/web/public/connector-icons/postgresql.svg +14 -0
- package/web/public/connector-icons/sentry.svg +10 -0
- package/web/public/connector-icons/stripe.svg +4 -0
- package/web/.next/server/chunks/1567.js +0 -16
- package/web/.next/server/chunks/4108.js +0 -1
- package/web/.next/server/chunks/511.js +0 -1
- package/web/.next/server/chunks/7741.js +0 -1223
- package/web/.next/server/chunks/8978.js +0 -1
- package/web/.next/server/chunks/9798.js +0 -1
- package/web/.next/static/PbmIekL33DORo2X47l_Ar/_buildManifest.js +0 -1
- package/web/.next/static/chunks/3178-bde220b789f10130.js +0 -1
- package/web/.next/static/chunks/6347-6d9d5ab25cbd59b9.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-651673d70c193f79.js +0 -2
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-6d8c74fd86d2d3c3.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-6591a8753b6a19c1.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-19061f4a8bf1978f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-509579b7d75ffd9d.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-f9337250ed07249e.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/memories/page-b935752c6cb36a04.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-5862a4767233ec26.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-85c75cc88ee1d6a8.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-9b0777fccb89a00b.js +0 -1
- package/web/.next/static/chunks/app/error-61e58aa304e1b34e.js +0 -1
- package/web/.next/static/css/46db738e95b440c0.css +0 -3
- /package/web/.next/static/{PbmIekL33DORo2X47l_Ar → myxe5H5Kmyn7MUh1XMxek}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -215,7 +215,7 @@ pnpm deps:check # runs locally and in CI before every release
|
|
|
215
215
|
|
|
216
216
|
## Status
|
|
217
217
|
|
|
218
|
-
**Current release:** `0.5.
|
|
218
|
+
**Current release:** `0.5.2` on npm `latest`. Used daily by the
|
|
219
219
|
maintainer, stable enough for personal production. Pre-1.0 — breaking
|
|
220
220
|
changes are still possible between minors.
|
|
221
221
|
|
|
@@ -270,6 +270,14 @@ changes are still possible between minors.
|
|
|
270
270
|
- ROOT agent — your first orchestrator automatically becomes the workspace ROOT (the single top-level agent; later orchestrators slot under it). It can create *and update* skills, create agents and assign them, and create MCP servers + API connectors — each gated by per-grant toggles + an autonomy/approval level (powers start off, opt in per grant). Provisioning verifies before it writes (an MCP server is connected and its tools listed first); skill authoring is grounded in the workspace's real tools (a linter rejects skills referencing tools the agent doesn't have)
|
|
271
271
|
- Office file editing — Excel in-place edit, Word/PowerPoint create, in the agent workspace (office-editing skill)
|
|
272
272
|
- Multiple filesystem folders per agent (sandboxed `file_*` tools)
|
|
273
|
+
- **Shell execution** — agents can run shell commands in their workspace
|
|
274
|
+
(`run_command`: install deps, run scripts, build steps) via an opt-in
|
|
275
|
+
`command-execution` skill. Safe-by-default: every command pauses for your
|
|
276
|
+
approval, with an optional per-agent auto-run ("Yolo"). On a shared / LAN
|
|
277
|
+
install auto-run is gated behind an explicit workspace-owner opt-in and
|
|
278
|
+
**enforced at execution time** — flip the workspace switch off and even an
|
|
279
|
+
already-trusted agent drops back to requiring approval. A live bell surfaces
|
|
280
|
+
pending approvals from anywhere in the dashboard
|
|
273
281
|
- Telegram delivery (long-poll, group filters, multi-agent routing,
|
|
274
282
|
delegation gracefulness) — exactly-once delivery contract: anti-spam guard
|
|
275
283
|
against runaway message loops + a guard that re-prompts (then fails loud)
|
package/cli.js
CHANGED
|
@@ -12127,12 +12127,16 @@ var init_root_agent = __esm({
|
|
|
12127
12127
|
AutonomyLevelSchema = z18.enum(["propose_confirm", "destructive_gate", "fully_autonomous"]);
|
|
12128
12128
|
RootGrantsSchema = z18.object({
|
|
12129
12129
|
createAgent: z18.boolean(),
|
|
12130
|
+
updateAgent: z18.boolean(),
|
|
12130
12131
|
attachAgent: z18.boolean(),
|
|
12131
12132
|
createSkill: z18.boolean(),
|
|
12132
12133
|
updateSkill: z18.boolean(),
|
|
12133
12134
|
assignSkill: z18.boolean(),
|
|
12134
12135
|
createMcp: z18.boolean(),
|
|
12136
|
+
attachMcp: z18.boolean(),
|
|
12135
12137
|
createConnector: z18.boolean(),
|
|
12138
|
+
attachConnector: z18.boolean(),
|
|
12139
|
+
manageSchedules: z18.boolean(),
|
|
12136
12140
|
autonomy: AutonomyLevelSchema
|
|
12137
12141
|
});
|
|
12138
12142
|
}
|
|
@@ -12152,6 +12156,13 @@ var init_model_catalog = __esm({
|
|
|
12152
12156
|
}
|
|
12153
12157
|
});
|
|
12154
12158
|
|
|
12159
|
+
// ../../packages/shared/src/timezone.ts
|
|
12160
|
+
var init_timezone = __esm({
|
|
12161
|
+
"../../packages/shared/src/timezone.ts"() {
|
|
12162
|
+
"use strict";
|
|
12163
|
+
}
|
|
12164
|
+
});
|
|
12165
|
+
|
|
12155
12166
|
// ../../packages/shared/src/index.ts
|
|
12156
12167
|
var init_src2 = __esm({
|
|
12157
12168
|
"../../packages/shared/src/index.ts"() {
|
|
@@ -12177,6 +12188,7 @@ var init_src2 = __esm({
|
|
|
12177
12188
|
init_root_agent();
|
|
12178
12189
|
init_connector_catalog();
|
|
12179
12190
|
init_model_catalog();
|
|
12191
|
+
init_timezone();
|
|
12180
12192
|
}
|
|
12181
12193
|
});
|
|
12182
12194
|
|
|
@@ -12265,6 +12277,11 @@ var init_entities = __esm({
|
|
|
12265
12277
|
icon: text("icon").default("\u{1F3E2}"),
|
|
12266
12278
|
industry: text("industry"),
|
|
12267
12279
|
goal: text("goal"),
|
|
12280
|
+
// IANA timezone for this workspace (e.g. 'Europe/Paris'). Captured from the
|
|
12281
|
+
// user's browser at onboarding, editable in Settings. Authoritative for the
|
|
12282
|
+
// agent: it reads the current local time and schedules crons in THIS zone.
|
|
12283
|
+
// null = fall back to the server's resolved timezone (legacy / pre-capture).
|
|
12284
|
+
timezone: text("timezone"),
|
|
12268
12285
|
mcpToken: uuid("mcp_token").defaultRandom(),
|
|
12269
12286
|
// ROOT agent designation (Wave 1 — V4 ROOT agent, 2026-05-29).
|
|
12270
12287
|
// Points at the agent that receives meta-tools. Set null when no root
|
|
@@ -12284,7 +12301,12 @@ var init_entities = __esm({
|
|
|
12284
12301
|
reflectionEnabled: boolean("reflection_enabled").notNull().default(false),
|
|
12285
12302
|
// Controls whether agent-authored skills are auto-assigned to the authoring
|
|
12286
12303
|
// agent ('auto') or queued for the entity owner to approve ('approval').
|
|
12287
|
-
skillAssignmentMode: text("skill_assignment_mode").notNull().default("approval").$type()
|
|
12304
|
+
skillAssignmentMode: text("skill_assignment_mode").notNull().default("approval").$type(),
|
|
12305
|
+
// Allows the workspace OWNER to opt into Yolo (auto-approve run_command)
|
|
12306
|
+
// even in non-local-trust (LAN/local-auth) mode. Off by default: in
|
|
12307
|
+
// local-auth mode, commands always require approval unless the owner
|
|
12308
|
+
// explicitly opts in here.
|
|
12309
|
+
lanCommandYolo: boolean("lan_command_yolo").notNull().default(false)
|
|
12288
12310
|
},
|
|
12289
12311
|
(table) => [
|
|
12290
12312
|
uniqueIndex("entities_mcp_token_idx").on(table.mcpToken),
|
|
@@ -12991,6 +13013,12 @@ var init_skills = __esm({
|
|
|
12991
13013
|
approvalOverrides: jsonb("approval_overrides").default(sql`'{}'::jsonb`),
|
|
12992
13014
|
useCustomInstructions: boolean("use_custom_instructions").notNull().default(false),
|
|
12993
13015
|
enabledOperations: text("enabled_operations").array(),
|
|
13016
|
+
// Per-skill × per-agent authorization to EXECUTE the skill's bundled scripts
|
|
13017
|
+
// (installed_scripts) via run_skill_script. Owner opt-in, default FALSE. A
|
|
13018
|
+
// community skill may ship .py/.sh scripts, but the runtime refuses to run
|
|
13019
|
+
// them unless the owner flips this for a specific agent × skill — the
|
|
13020
|
+
// case-by-case execution gate. Loaded by the runner into the ToolContext.
|
|
13021
|
+
scriptsAuthorized: boolean("scripts_authorized").notNull().default(false),
|
|
12994
13022
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
12995
13023
|
},
|
|
12996
13024
|
() => []
|
|
@@ -13016,6 +13044,10 @@ var init_schedules = __esm({
|
|
|
13016
13044
|
type: text("type").notNull().default("cron"),
|
|
13017
13045
|
name: text("name").notNull(),
|
|
13018
13046
|
cronExpr: text("cron_expr").notNull(),
|
|
13047
|
+
// IANA timezone the cron is evaluated in (e.g. 'Asia/Singapore'). null = the
|
|
13048
|
+
// server's local timezone (legacy rows). New schedules capture an explicit tz
|
|
13049
|
+
// so "9am" stays 9am in the user's zone regardless of where the runner hosts.
|
|
13050
|
+
timezone: text("timezone"),
|
|
13019
13051
|
task: text("task"),
|
|
13020
13052
|
objectives: text("objectives"),
|
|
13021
13053
|
active: boolean("active").default(true),
|
|
@@ -13347,6 +13379,20 @@ var init_chat_messages = __esm({
|
|
|
13347
13379
|
}
|
|
13348
13380
|
});
|
|
13349
13381
|
|
|
13382
|
+
// ../../packages/db/src/schema/app-settings.ts
|
|
13383
|
+
var appSettings;
|
|
13384
|
+
var init_app_settings = __esm({
|
|
13385
|
+
"../../packages/db/src/schema/app-settings.ts"() {
|
|
13386
|
+
"use strict";
|
|
13387
|
+
init_pg_core();
|
|
13388
|
+
appSettings = pgTable("app_settings", {
|
|
13389
|
+
key: text("key").primaryKey(),
|
|
13390
|
+
value: text("value").default("").notNull(),
|
|
13391
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow().notNull()
|
|
13392
|
+
});
|
|
13393
|
+
}
|
|
13394
|
+
});
|
|
13395
|
+
|
|
13350
13396
|
// ../../packages/db/src/schema/index.ts
|
|
13351
13397
|
var schema_exports = {};
|
|
13352
13398
|
__export(schema_exports, {
|
|
@@ -13384,6 +13430,7 @@ __export(schema_exports, {
|
|
|
13384
13430
|
agentTasks: () => agentTasks,
|
|
13385
13431
|
agentWorkspaces: () => agentWorkspaces,
|
|
13386
13432
|
agents: () => agents,
|
|
13433
|
+
appSettings: () => appSettings,
|
|
13387
13434
|
approvalRequests: () => approvalRequests,
|
|
13388
13435
|
approvalRules: () => approvalRules,
|
|
13389
13436
|
chatMessages: () => chatMessages,
|
|
@@ -13430,6 +13477,7 @@ var init_schema2 = __esm({
|
|
|
13430
13477
|
init_agent_connector_assignments();
|
|
13431
13478
|
init_agent_workspaces();
|
|
13432
13479
|
init_chat_messages();
|
|
13480
|
+
init_app_settings();
|
|
13433
13481
|
}
|
|
13434
13482
|
});
|
|
13435
13483
|
|
|
@@ -13513,6 +13561,14 @@ var init_retention = __esm({
|
|
|
13513
13561
|
}
|
|
13514
13562
|
});
|
|
13515
13563
|
|
|
13564
|
+
// ../../packages/db/src/repos/app-settings.ts
|
|
13565
|
+
var init_app_settings2 = __esm({
|
|
13566
|
+
"../../packages/db/src/repos/app-settings.ts"() {
|
|
13567
|
+
"use strict";
|
|
13568
|
+
init_schema2();
|
|
13569
|
+
}
|
|
13570
|
+
});
|
|
13571
|
+
|
|
13516
13572
|
// ../../packages/db/src/index.ts
|
|
13517
13573
|
var init_src4 = __esm({
|
|
13518
13574
|
"../../packages/db/src/index.ts"() {
|
|
@@ -13524,6 +13580,7 @@ var init_src4 = __esm({
|
|
|
13524
13580
|
init_agents2();
|
|
13525
13581
|
init_skills2();
|
|
13526
13582
|
init_retention();
|
|
13583
|
+
init_app_settings2();
|
|
13527
13584
|
init_drizzle_orm();
|
|
13528
13585
|
}
|
|
13529
13586
|
});
|
|
@@ -13997,17 +14054,13 @@ async function runUp(opts = {}) {
|
|
|
13997
14054
|
await stopOrphanPostgres();
|
|
13998
14055
|
if (isPidAlive(pgOrphan.pid)) {
|
|
13999
14056
|
try {
|
|
14000
|
-
|
|
14001
|
-
await execa4("taskkill", ["/T", "/F", "/PID", String(pgOrphan.pid)], { reject: false });
|
|
14002
|
-
} else {
|
|
14003
|
-
process.kill(pgOrphan.pid, "SIGKILL");
|
|
14004
|
-
}
|
|
14057
|
+
process.kill(pgOrphan.pid, "SIGKILL");
|
|
14005
14058
|
} catch {
|
|
14006
14059
|
}
|
|
14007
14060
|
await waitForPidDead(pgOrphan.pid, 5e3);
|
|
14008
14061
|
}
|
|
14009
14062
|
if (isPidAlive(pgOrphan.pid)) {
|
|
14010
|
-
const killCmd = process.platform === "win32" ? `
|
|
14063
|
+
const killCmd = process.platform === "win32" ? `powershell Stop-Process -Id ${pgOrphan.pid} -Force` : `kill -9 ${pgOrphan.pid}`;
|
|
14011
14064
|
throw new Error(
|
|
14012
14065
|
`An orphaned Postgres (pid ${pgOrphan.pid}) is still running and holds the shared-memory block for the data dir. Rotating ports won't help \u2014 the SHM segment is keyed to the data dir, not the port.
|
|
14013
14066
|
Fix: run \`nodal-agents down\`, then \`${killCmd}\`. If it persists, reboot to clear the orphan kernel object. No data is lost \u2014 pg-data is preserved.`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
-- Real dollar cost budget (Guard 1e). Track what was ACTUALLY BILLED per job
|
|
2
|
-
-- (not token proxies) so the runner can enforce a hard dollar cap and the
|
|
3
|
-
-- dashboard can surface real $/job cost. Populated by OpenRouter when
|
|
4
|
-
-- `usage:{include:true}` is sent — `usage.cost` in the response lands in
|
|
5
|
-
-- providerMetadata.openrouter.usage.cost on the AI SDK result. NULL / 0 for
|
|
6
|
-
-- providers that don't report per-call cost (Anthropic, Ollama, etc.).
|
|
7
|
-
--
|
|
8
|
-
-- Stored as real (float4) — sub-cent values are common (e.g. $0.00056).
|
|
9
|
-
-- Default 0 so existing rows are valid without a backfill.
|
|
10
|
-
ALTER TABLE "agent_jobs"
|
|
11
|
-
ADD COLUMN IF NOT EXISTS "total_cost_usd" real DEFAULT 0;
|
|
1
|
+
-- Real dollar cost budget (Guard 1e). Track what was ACTUALLY BILLED per job
|
|
2
|
+
-- (not token proxies) so the runner can enforce a hard dollar cap and the
|
|
3
|
+
-- dashboard can surface real $/job cost. Populated by OpenRouter when
|
|
4
|
+
-- `usage:{include:true}` is sent — `usage.cost` in the response lands in
|
|
5
|
+
-- providerMetadata.openrouter.usage.cost on the AI SDK result. NULL / 0 for
|
|
6
|
+
-- providers that don't report per-call cost (Anthropic, Ollama, etc.).
|
|
7
|
+
--
|
|
8
|
+
-- Stored as real (float4) — sub-cent values are common (e.g. $0.00056).
|
|
9
|
+
-- Default 0 so existing rows are valid without a backfill.
|
|
10
|
+
ALTER TABLE "agent_jobs"
|
|
11
|
+
ADD COLUMN IF NOT EXISTS "total_cost_usd" real DEFAULT 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
-- Served-upstream observability (P0-B). Tracks which upstream provider actually
|
|
2
|
-
-- handled a given job execution (e.g. 'DeepSeek' when routed via OpenRouter's
|
|
3
|
-
-- provider-order preference). Populated from providerMetadata.openrouter.provider
|
|
4
|
-
-- on each LLM call; only the LAST non-empty value is stored per job. NULL for
|
|
5
|
-
-- providers that don't report upstream identity (Anthropic, Ollama, etc.).
|
|
6
|
-
ALTER TABLE "agent_jobs"
|
|
7
|
-
ADD COLUMN IF NOT EXISTS "served_provider" text;
|
|
1
|
+
-- Served-upstream observability (P0-B). Tracks which upstream provider actually
|
|
2
|
+
-- handled a given job execution (e.g. 'DeepSeek' when routed via OpenRouter's
|
|
3
|
+
-- provider-order preference). Populated from providerMetadata.openrouter.provider
|
|
4
|
+
-- on each LLM call; only the LAST non-empty value is stored per job. NULL for
|
|
5
|
+
-- providers that don't report upstream identity (Anthropic, Ollama, etc.).
|
|
6
|
+
ALTER TABLE "agent_jobs"
|
|
7
|
+
ADD COLUMN IF NOT EXISTS "served_provider" text;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
-- Learning-loop columns for agent_skills (Phase A).
|
|
2
|
-
-- created_by: provenance — who created this skill ('user' | 'system' | 'agent').
|
|
3
|
-
-- Default 'user' for forward-compatibility; backfilled to 'system' for
|
|
4
|
-
-- community/bundled skills below.
|
|
5
|
-
-- state: lifecycle state — 'active' (default) | 'stale' | 'archived'.
|
|
6
|
-
-- No hard-delete path — skills are archived, never deleted.
|
|
7
|
-
-- last_used_at: fire-and-forget timestamp, bumped each time the skill is injected
|
|
8
|
-
-- into a job's system prompt. NULL = never used. Used to surface stale skills.
|
|
9
|
-
-- patch_count: how many agent-authored patches have been applied. Starts at 0.
|
|
10
|
-
-- archived_at: when the skill was moved to state='archived'. NULL while active.
|
|
11
|
-
|
|
12
|
-
ALTER TABLE "agent_skills"
|
|
13
|
-
ADD COLUMN IF NOT EXISTS "created_by" text NOT NULL DEFAULT 'user',
|
|
14
|
-
ADD COLUMN IF NOT EXISTS "state" text NOT NULL DEFAULT 'active',
|
|
15
|
-
ADD COLUMN IF NOT EXISTS "last_used_at" timestamptz,
|
|
16
|
-
ADD COLUMN IF NOT EXISTS "patch_count" integer NOT NULL DEFAULT 0,
|
|
17
|
-
ADD COLUMN IF NOT EXISTS "archived_at" timestamptz;
|
|
18
|
-
|
|
19
|
-
-- Backfill: community/bundled skills are 'system' provenance
|
|
20
|
-
UPDATE "agent_skills" SET "created_by" = 'system' WHERE "is_community" = true;
|
|
1
|
+
-- Learning-loop columns for agent_skills (Phase A).
|
|
2
|
+
-- created_by: provenance — who created this skill ('user' | 'system' | 'agent').
|
|
3
|
+
-- Default 'user' for forward-compatibility; backfilled to 'system' for
|
|
4
|
+
-- community/bundled skills below.
|
|
5
|
+
-- state: lifecycle state — 'active' (default) | 'stale' | 'archived'.
|
|
6
|
+
-- No hard-delete path — skills are archived, never deleted.
|
|
7
|
+
-- last_used_at: fire-and-forget timestamp, bumped each time the skill is injected
|
|
8
|
+
-- into a job's system prompt. NULL = never used. Used to surface stale skills.
|
|
9
|
+
-- patch_count: how many agent-authored patches have been applied. Starts at 0.
|
|
10
|
+
-- archived_at: when the skill was moved to state='archived'. NULL while active.
|
|
11
|
+
|
|
12
|
+
ALTER TABLE "agent_skills"
|
|
13
|
+
ADD COLUMN IF NOT EXISTS "created_by" text NOT NULL DEFAULT 'user',
|
|
14
|
+
ADD COLUMN IF NOT EXISTS "state" text NOT NULL DEFAULT 'active',
|
|
15
|
+
ADD COLUMN IF NOT EXISTS "last_used_at" timestamptz,
|
|
16
|
+
ADD COLUMN IF NOT EXISTS "patch_count" integer NOT NULL DEFAULT 0,
|
|
17
|
+
ADD COLUMN IF NOT EXISTS "archived_at" timestamptz;
|
|
18
|
+
|
|
19
|
+
-- Backfill: community/bundled skills are 'system' provenance
|
|
20
|
+
UPDATE "agent_skills" SET "created_by" = 'system' WHERE "is_community" = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
-- Tier-2 CURATOR cadence tracker.
|
|
2
|
-
-- Per-entity timestamp of the last LLM consolidation pass. NULL = never run.
|
|
3
|
-
-- Used by run-curator.ts to gate the first-run-deferred pattern (skip first
|
|
4
|
-
-- run, set to now(), run on subsequent ticks beyond CURATOR_INTERVAL_DAYS).
|
|
5
|
-
|
|
6
|
-
ALTER TABLE "entities"
|
|
7
|
-
ADD COLUMN IF NOT EXISTS "last_curator_run_at" timestamptz;
|
|
1
|
+
-- Tier-2 CURATOR cadence tracker.
|
|
2
|
+
-- Per-entity timestamp of the last LLM consolidation pass. NULL = never run.
|
|
3
|
+
-- Used by run-curator.ts to gate the first-run-deferred pattern (skip first
|
|
4
|
+
-- run, set to now(), run on subsequent ticks beyond CURATOR_INTERVAL_DAYS).
|
|
5
|
+
|
|
6
|
+
ALTER TABLE "entities"
|
|
7
|
+
ADD COLUMN IF NOT EXISTS "last_curator_run_at" timestamptz;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
ALTER TABLE entities ADD COLUMN reflection_enabled boolean NOT NULL DEFAULT false;
|
|
1
|
+
ALTER TABLE entities ADD COLUMN reflection_enabled boolean NOT NULL DEFAULT false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
DROP TABLE IF EXISTS "agent_runs" CASCADE;
|
|
1
|
+
DROP TABLE IF EXISTS "agent_runs" CASCADE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
ALTER TABLE entities ADD COLUMN skill_assignment_mode text NOT NULL DEFAULT 'approval';
|
|
2
|
-
ALTER TABLE agent_skills ADD COLUMN created_by_agent_id uuid REFERENCES agents(id) ON DELETE SET NULL;
|
|
1
|
+
ALTER TABLE entities ADD COLUMN skill_assignment_mode text NOT NULL DEFAULT 'approval';
|
|
2
|
+
ALTER TABLE agent_skills ADD COLUMN created_by_agent_id uuid REFERENCES agents(id) ON DELETE SET NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "entities" ADD COLUMN "lan_command_yolo" boolean DEFAULT false NOT NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "agent_skill_assignments" ADD COLUMN "scripts_authorized" boolean DEFAULT false NOT NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "agent_schedules" ADD COLUMN "timezone" text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "entities" ADD COLUMN "timezone" text;
|