nodal-agents 0.9.0 → 0.9.1
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/cli.js +323 -15
- package/docs-index.json +1524 -0
- package/migrations/0118_agent_jobs_deliverable_check_due.sql +53 -0
- package/migrations/0119_job_checkpoints_snapshot_ms.sql +51 -0
- package/migrations/0120_excluded_project_paths.sql +38 -0
- package/migrations/0121_entities_proof_repair_attempts.sql +32 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +2 -1
- package/runner.js +5084 -3985
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +5 -5
- package/web/.next/server/app/(dashboard)/agents/[id]/channels/page.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/channels/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +4 -4
- 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 +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 +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_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/[id]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/[id]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/code/[id]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/code/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/code/page.js +1 -1
- package/web/.next/server/app/(dashboard)/code/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_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_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/dashboard/page.js +1 -1
- package/web/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +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 +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 +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 +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 +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 +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 +1 -1
- 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_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/scheduled/[id]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/scheduled/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/scheduled/page.js +1 -1
- package/web/.next/server/app/(dashboard)/scheduled/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/page.js +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 +1 -1
- package/web/.next/server/app/(dashboard)/settings/root-context/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_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_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/[id]/files/page.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/[id]/files/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/[id]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/page.js +1 -1
- package/web/.next/server/app/(dashboard)/spaces/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page.js +2 -2
- 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 +2 -2
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page.js +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 +5 -4
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +5 -4
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -13
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/api/chat/stream/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/login/page.js +1 -1
- 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-paths-manifest.json +1 -1
- package/web/.next/server/chunks/1041.js +5 -0
- package/web/.next/server/chunks/1447.js +1 -1
- package/web/.next/server/chunks/168.js +1 -0
- package/web/.next/server/chunks/{3431.js → 192.js} +2 -2
- package/web/.next/server/chunks/2933.js +1 -0
- package/web/.next/server/chunks/3370.js +1 -0
- package/web/.next/server/chunks/3592.js +1 -1
- package/web/.next/server/chunks/3650.js +1 -0
- package/web/.next/server/chunks/3675.js +1 -0
- package/web/.next/server/chunks/385.js +1 -0
- package/web/.next/server/chunks/409.js +1 -0
- package/web/.next/server/chunks/4194.js +1 -0
- package/web/.next/server/chunks/42.js +3 -3
- package/web/.next/server/chunks/{4332.js → 4208.js} +1 -1
- package/web/.next/server/chunks/4357.js +1 -1
- package/web/.next/server/chunks/494.js +1 -0
- package/web/.next/server/chunks/5554.js +1 -0
- package/web/.next/server/chunks/5804.js +1 -1
- package/web/.next/server/chunks/6020.js +1 -1
- package/web/.next/server/chunks/616.js +1 -0
- package/web/.next/server/chunks/{2198.js → 6213.js} +39 -23
- package/web/.next/server/chunks/6724.js +1 -0
- package/web/.next/server/chunks/692.js +1806 -0
- package/web/.next/server/chunks/{2076.js → 7134.js} +6 -6
- package/web/.next/server/chunks/7190.js +1 -0
- package/web/.next/server/chunks/7273.js +3 -0
- package/web/.next/server/chunks/7416.js +1 -0
- package/web/.next/server/chunks/{7957.js → 7663.js} +5 -5
- package/web/.next/server/chunks/7709.js +1 -0
- package/web/.next/server/chunks/7915.js +1 -0
- package/web/.next/server/chunks/7975.js +1 -0
- package/web/.next/server/chunks/8022.js +1 -0
- package/web/.next/server/chunks/8153.js +1 -0
- package/web/.next/server/chunks/8974.js +63 -47
- package/web/.next/server/chunks/9557.js +1 -0
- package/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/server/middleware.js +67 -67
- 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/1054-5f8b510bbf6ff3e9.js +1 -0
- package/web/.next/static/chunks/1091-8f1b68252431e271.js +1 -0
- package/web/.next/static/chunks/1332-0e4a72eac08cebb9.js +1 -0
- package/web/.next/static/chunks/{1789-87079e34582418b3.js → 1789-b436bca079b82fcc.js} +1 -1
- package/web/.next/static/chunks/{2194-f112ed9e30bd88fb.js → 2194-f3fed902cfeb85b5.js} +1 -1
- package/web/.next/static/chunks/296-1b50dd61ac3198f4.js +1 -0
- package/web/.next/static/chunks/3051-466a9da3e351fd0d.js +1 -0
- package/web/.next/static/chunks/3388-530c6d429c484862.js +3 -0
- package/web/.next/static/chunks/341-020b1c47a0991a37.js +1 -0
- package/web/.next/static/chunks/{5361-f266407b731effcd.js → 3742-ab3951ecba6248c1.js} +1 -1
- package/web/.next/static/chunks/377-4f2ca8d34e126b26.js +1 -0
- package/web/.next/static/chunks/3815-aa88c216677b6c3f.js +1 -0
- package/web/.next/static/chunks/4020-dcde3e62f67473f3.js +1 -0
- package/web/.next/static/chunks/4771-a0aadf337f224b72.js +1 -0
- package/web/.next/static/chunks/494-ed02d105fa0ac132.js +1 -0
- package/web/.next/static/chunks/5034-11fd1b56b43dc6e5.js +1 -0
- package/web/.next/static/chunks/{8551-3e88dff507375393.js → 5925-76337eacde3c3bc8.js} +39 -23
- package/web/.next/static/chunks/611-e150bff7f1f9dc6c.js +1 -0
- package/web/.next/static/chunks/6883-73dc26cf02070115.js +1 -0
- package/web/.next/static/chunks/6937-f57b8514bf03179e.js +3 -0
- package/web/.next/static/chunks/7039-7a3b6bdbfda78038.js +1 -0
- package/web/.next/static/chunks/7920-40dc6aa63e653d6b.js +1 -0
- package/web/.next/static/chunks/8312-6ca4507c5413a23d.js +1 -0
- package/web/.next/static/chunks/870-b7151716d04a13c3.js +1 -0
- package/web/.next/static/chunks/8794-2a616d1f9c210117.js +1 -0
- package/web/.next/static/chunks/8861-a108ed6178a56b21.js +1 -0
- package/web/.next/static/chunks/{3196-464a892bb967ebe9.js → 9311-bdd05e5b6fb92a88.js} +1 -1
- package/web/.next/static/chunks/9598-202b803aea26a949.js +1 -0
- package/web/.next/static/chunks/9643-b0b049bb41a7cba4.js +1 -0
- package/web/.next/static/chunks/{8606-679d56e81c4e4550.js → 9765-1501903a64e09ac0.js} +1 -1
- package/web/.next/static/chunks/9901-24977d0da68dcf77.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-4594e5fc99cc04ed.js +6 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/{page-8dd4afd99c54c317.js → page-a26d15238b4c55d3.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-3de0cc34d6dbeaf5.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/automations/[id]/page-bebc71312e736828.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/automations/page-04c38b0a633b5c94.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/chat/[id]/page-faa53d8decd24a6a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/chat/page-c45d840d7ca4faa7.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/code/[id]/page-52a3e2140bd0d64a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-081ca4b9bbeb2fcb.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-cb6bc64b82b8fb28.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/dashboard/{page-fd2a41310f716a3e.js → page-5002d088b635d8f9.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-5573e316921e5315.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-b542af6fe3f7621e.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-950bf08720e4b3aa.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-8ada985ee9578d2f.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/logs/page-a2cf705f0ddb7329.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-17498336e813cd6c.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/memories/page-5c8fc395823f4823.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/page-48d1d32604854d18.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/scheduled/[id]/page-5573e316921e5315.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-f4d50d3900c7387a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-edace0d3a7f0134a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/page-7dc32162faa0e762.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/files/page-4e2d27f80456a1ba.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/page-c81023eaa26c2c7a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/spaces/page-b516d5b0664dffee.js +1 -0
- package/web/.next/static/chunks/app/layout-ef76b16f6546678c.js +1 -0
- package/web/.next/static/chunks/app/login/page-031e915b40cb5be6.js +1 -0
- package/web/.next/static/chunks/app/onboarding/page-06209a6e3a31fb73.js +26 -0
- package/web/.next/static/css/099c0b54fc41e5b0.css +1 -0
- package/web/public/logo-128.png +0 -0
- package/web/.next/server/chunks/1239.js +0 -1
- package/web/.next/server/chunks/1505.js +0 -3
- package/web/.next/server/chunks/1632.js +0 -1
- package/web/.next/server/chunks/1813.js +0 -1
- package/web/.next/server/chunks/2040.js +0 -1
- package/web/.next/server/chunks/2310.js +0 -1
- package/web/.next/server/chunks/2800.js +0 -1790
- package/web/.next/server/chunks/3340.js +0 -1
- package/web/.next/server/chunks/3432.js +0 -1
- package/web/.next/server/chunks/3580.js +0 -1
- package/web/.next/server/chunks/4722.js +0 -3
- package/web/.next/server/chunks/5276.js +0 -1
- package/web/.next/server/chunks/603.js +0 -1
- package/web/.next/server/chunks/7719.js +0 -1
- package/web/.next/server/chunks/7781.js +0 -1
- package/web/.next/server/chunks/8025.js +0 -3
- package/web/.next/server/chunks/8118.js +0 -1
- package/web/.next/server/chunks/9637.js +0 -1
- package/web/.next/server/chunks/976.js +0 -1
- package/web/.next/server/chunks/9939.js +0 -1
- package/web/.next/static/chunks/1091-de54f0c0a4d82875.js +0 -1
- package/web/.next/static/chunks/114-26058433e4e0911e.js +0 -1
- package/web/.next/static/chunks/1219-d120dd8740b553b7.js +0 -1
- package/web/.next/static/chunks/146-923ebb6e4b12939e.js +0 -1
- package/web/.next/static/chunks/2057-de712956dc309abd.js +0 -1
- package/web/.next/static/chunks/2628-662c74c9bc8efdfd.js +0 -1
- package/web/.next/static/chunks/2767-84a838e67c8ed919.js +0 -1
- package/web/.next/static/chunks/3051-63316a56c4c77b78.js +0 -1
- package/web/.next/static/chunks/341-d382e4df5fdd8639.js +0 -1
- package/web/.next/static/chunks/4229-5ad9bb0c30eeb117.js +0 -1
- package/web/.next/static/chunks/443-b0581a9d59c5eddd.js +0 -1
- package/web/.next/static/chunks/4507-e4e79584af8a3dfb.js +0 -1
- package/web/.next/static/chunks/4646-daae31f9eaa82ad1.js +0 -3
- package/web/.next/static/chunks/5034-1424be65bb762fe0.js +0 -1
- package/web/.next/static/chunks/6449-2552e9fd471012bc.js +0 -1
- package/web/.next/static/chunks/6974-c390b37b943e5e3a.js +0 -1
- package/web/.next/static/chunks/750-5f0494d3bcce44e4.js +0 -1
- package/web/.next/static/chunks/7717-41f70e449a27eb21.js +0 -1
- package/web/.next/static/chunks/7890-8030bd449325507e.js +0 -1
- package/web/.next/static/chunks/8288-46c8ea403691cbd8.js +0 -3
- package/web/.next/static/chunks/8571-6149c8881bddf392.js +0 -1
- package/web/.next/static/chunks/9643-135a5b7d3abd518c.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-0a2201e25891e65a.js +0 -6
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-c346b6514a0fb344.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/[id]/page-2ff06d1d46372539.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-e70ea0434087cad1.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/chat/[id]/page-600249784190e2a4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/chat/page-48666512a1c0ac50.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/code/[id]/page-f84236cea1b8e8bd.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-de164554b77a1fa4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-0741d2da25807489.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-702e9eeea18c7ea0.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-1fe1669ec7dc1c13.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-a76814c4a20ecd33.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-aa611ab9ff0baff2.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/logs/page-f22178e7e15984c1.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-8b248ee23cc92855.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/memories/page-69955b9596175468.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/page-4432bf6e8e594109.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/scheduled/[id]/page-f4857bc821e8868b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-2e6cbceef74a8f8a.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-63c38b3c419dfbbc.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/page-99aea8c35e06402b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/files/page-226d430d003759c2.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/page-ded0e3c2ae3aede7.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/spaces/page-a833db411140fb1e.js +0 -1
- package/web/.next/static/chunks/app/layout-e03e26e403cc87a2.js +0 -1
- package/web/.next/static/chunks/app/login/page-16e874ed1f237705.js +0 -1
- package/web/.next/static/chunks/app/onboarding/page-5928b7dd0a4606cc.js +0 -26
- package/web/.next/static/css/67bc2af77aa905d1.css +0 -1
- /package/web/.next/static/{g828Psw_BOEBvk4rOsX86 → bG6cdQqQw9o06-WZ6DrN2}/_buildManifest.js +0 -0
- /package/web/.next/static/{g828Psw_BOEBvk4rOsX86 → bG6cdQqQw9o06-WZ6DrN2}/_ssgManifest.js +0 -0
package/cli.js
CHANGED
|
@@ -11129,6 +11129,9 @@ var init_migrator2 = __esm({
|
|
|
11129
11129
|
// ../../packages/db/src/migrate.ts
|
|
11130
11130
|
var migrate_exports = {};
|
|
11131
11131
|
__export(migrate_exports, {
|
|
11132
|
+
findMigrationGaps: () => findMigrationGaps,
|
|
11133
|
+
gapsBetween: () => gapsBetween,
|
|
11134
|
+
repairMigrations: () => repairMigrations,
|
|
11132
11135
|
runMigrations: () => runMigrations
|
|
11133
11136
|
});
|
|
11134
11137
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -11142,6 +11145,7 @@ import {
|
|
|
11142
11145
|
mkdirSync as mkdirSync3
|
|
11143
11146
|
} from "fs";
|
|
11144
11147
|
import { tmpdir } from "os";
|
|
11148
|
+
import { createHash as createHash2 } from "crypto";
|
|
11145
11149
|
async function runMigrations(connectionString, opts = {}) {
|
|
11146
11150
|
const sql2 = src_default(connectionString, {
|
|
11147
11151
|
max: 1,
|
|
@@ -11151,13 +11155,24 @@ async function runMigrations(connectionString, opts = {}) {
|
|
|
11151
11155
|
}
|
|
11152
11156
|
});
|
|
11153
11157
|
const db = drizzle(sql2);
|
|
11154
|
-
const
|
|
11155
|
-
const sibling = join4(here, "migrations");
|
|
11156
|
-
const sourceFolder = existsSync4(sibling) ? sibling : join4(here, "../migrations");
|
|
11157
|
-
const migrationsFolder = opts.patchVectorAsText ? patchMigrationsForNoVector(sourceFolder) : sourceFolder;
|
|
11158
|
+
const migrationsFolder = effectiveMigrationsFolder(opts);
|
|
11158
11159
|
await migrate(db, { migrationsFolder });
|
|
11159
11160
|
await sql2.end();
|
|
11160
11161
|
}
|
|
11162
|
+
function sourceMigrationsFolder() {
|
|
11163
|
+
const here = dirname2(fileURLToPath2(import.meta.url));
|
|
11164
|
+
const sibling = join4(here, "migrations");
|
|
11165
|
+
return existsSync4(sibling) ? sibling : join4(here, "../migrations");
|
|
11166
|
+
}
|
|
11167
|
+
function effectiveMigrationsFolder(opts) {
|
|
11168
|
+
const source = sourceMigrationsFolder();
|
|
11169
|
+
if (opts.patchVectorAsText !== true) return source;
|
|
11170
|
+
const deja = dossiersPatches.get(source);
|
|
11171
|
+
if (deja !== void 0) return deja;
|
|
11172
|
+
const patche = patchMigrationsForNoVector(source);
|
|
11173
|
+
dossiersPatches.set(source, patche);
|
|
11174
|
+
return patche;
|
|
11175
|
+
}
|
|
11161
11176
|
function patchMigrationsForNoVector(sourceFolder) {
|
|
11162
11177
|
const tmpFolder = mkdtempSync(join4(tmpdir(), "nodalai-migrations-"));
|
|
11163
11178
|
const metaDir = join4(tmpFolder, "meta");
|
|
@@ -11176,12 +11191,74 @@ function patchMigrationsForNoVector(sourceFolder) {
|
|
|
11176
11191
|
}
|
|
11177
11192
|
return tmpFolder;
|
|
11178
11193
|
}
|
|
11194
|
+
function gapsBetween(journal, horodatagesAppliques) {
|
|
11195
|
+
const applique = new Set(horodatagesAppliques.map((w) => Number(w)));
|
|
11196
|
+
return journal.filter((e) => !applique.has(Number(e.when))).map((e) => ({ idx: e.idx, tag: e.tag, when: e.when }));
|
|
11197
|
+
}
|
|
11198
|
+
function readJournal(folder) {
|
|
11199
|
+
const chemin = join4(folder, "meta", "_journal.json");
|
|
11200
|
+
if (!existsSync4(chemin)) {
|
|
11201
|
+
throw new Error(`migration journal not found at ${chemin}`);
|
|
11202
|
+
}
|
|
11203
|
+
const brut = JSON.parse(readFileSync3(chemin, "utf8"));
|
|
11204
|
+
return brut.entries ?? [];
|
|
11205
|
+
}
|
|
11206
|
+
async function appliedWhen(sql2) {
|
|
11207
|
+
const [present] = await sql2`
|
|
11208
|
+
SELECT to_regclass('drizzle.__drizzle_migrations') IS NOT NULL AS ok`;
|
|
11209
|
+
if (present?.ok !== true) return null;
|
|
11210
|
+
const lignes = await sql2`
|
|
11211
|
+
SELECT created_at FROM drizzle.__drizzle_migrations`;
|
|
11212
|
+
return lignes.map((l) => Number(l.created_at)).filter((n) => Number.isFinite(n));
|
|
11213
|
+
}
|
|
11214
|
+
async function findMigrationGaps(connectionString, opts = {}) {
|
|
11215
|
+
const sql2 = src_default(connectionString, { max: 1, onnotice: () => {
|
|
11216
|
+
} });
|
|
11217
|
+
try {
|
|
11218
|
+
const applique = await appliedWhen(sql2);
|
|
11219
|
+
if (applique === null) return [];
|
|
11220
|
+
return gapsBetween(readJournal(effectiveMigrationsFolder(opts)), applique);
|
|
11221
|
+
} finally {
|
|
11222
|
+
await sql2.end();
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
async function repairMigrations(connectionString, opts = {}) {
|
|
11226
|
+
const folder = effectiveMigrationsFolder(opts);
|
|
11227
|
+
const sql2 = src_default(connectionString, { max: 1, onnotice: () => {
|
|
11228
|
+
} });
|
|
11229
|
+
try {
|
|
11230
|
+
const applique = await appliedWhen(sql2);
|
|
11231
|
+
if (applique === null) return [];
|
|
11232
|
+
const trous = gapsBetween(readJournal(folder), applique);
|
|
11233
|
+
for (const trou of trous) {
|
|
11234
|
+
const fichier = join4(folder, `${trou.tag}.sql`);
|
|
11235
|
+
if (!existsSync4(fichier)) {
|
|
11236
|
+
throw new Error(`migration file missing for journal entry ${trou.tag}: ${fichier}`);
|
|
11237
|
+
}
|
|
11238
|
+
const contenu = readFileSync3(fichier, "utf8");
|
|
11239
|
+
const hash = createHash2("sha256").update(contenu).digest("hex");
|
|
11240
|
+
await sql2.begin(async (tx) => {
|
|
11241
|
+
for (const instruction of contenu.split("--> statement-breakpoint")) {
|
|
11242
|
+
if (instruction.trim() === "") continue;
|
|
11243
|
+
await tx.unsafe(instruction).simple();
|
|
11244
|
+
}
|
|
11245
|
+
await tx`INSERT INTO drizzle.__drizzle_migrations ("hash", "created_at")
|
|
11246
|
+
VALUES (${hash}, ${trou.when})`;
|
|
11247
|
+
});
|
|
11248
|
+
}
|
|
11249
|
+
return trous;
|
|
11250
|
+
} finally {
|
|
11251
|
+
await sql2.end();
|
|
11252
|
+
}
|
|
11253
|
+
}
|
|
11254
|
+
var dossiersPatches;
|
|
11179
11255
|
var init_migrate = __esm({
|
|
11180
11256
|
"../../packages/db/src/migrate.ts"() {
|
|
11181
11257
|
"use strict";
|
|
11182
11258
|
init_src();
|
|
11183
11259
|
init_postgres_js();
|
|
11184
11260
|
init_migrator2();
|
|
11261
|
+
dossiersPatches = /* @__PURE__ */ new Map();
|
|
11185
11262
|
}
|
|
11186
11263
|
});
|
|
11187
11264
|
|
|
@@ -11193,6 +11270,7 @@ __export(postgres_exports, {
|
|
|
11193
11270
|
PG_USER: () => PG_USER,
|
|
11194
11271
|
POSTMASTER_GAVE_UP: () => POSTMASTER_GAVE_UP,
|
|
11195
11272
|
buildPgUrl: () => buildPgUrl,
|
|
11273
|
+
findMigrationGaps: () => findMigrationGaps2,
|
|
11196
11274
|
isPostgresAuthFailure: () => isPostgresAuthFailure,
|
|
11197
11275
|
livePostmasterPid: () => livePostmasterPid,
|
|
11198
11276
|
postgresProcessesForDataDir: () => postgresProcessesForDataDir,
|
|
@@ -11200,6 +11278,7 @@ __export(postgres_exports, {
|
|
|
11200
11278
|
processStartedAtMs: () => processStartedAtMs,
|
|
11201
11279
|
readPostmasterClaim: () => readPostmasterClaim,
|
|
11202
11280
|
readPostmasterPid: () => readPostmasterPid,
|
|
11281
|
+
repairMigrations: () => repairMigrations2,
|
|
11203
11282
|
resolvePgCtl: () => resolvePgCtl,
|
|
11204
11283
|
runMigrations: () => runMigrations2,
|
|
11205
11284
|
startAndWaitUntilReady: () => startAndWaitUntilReady,
|
|
@@ -11637,6 +11716,14 @@ async function runMigrations2(databaseUrl, opts = {}) {
|
|
|
11637
11716
|
const { runMigrations: migrate2 } = await Promise.resolve().then(() => (init_migrate(), migrate_exports));
|
|
11638
11717
|
await migrate2(databaseUrl, opts);
|
|
11639
11718
|
}
|
|
11719
|
+
async function findMigrationGaps2(databaseUrl, opts = {}) {
|
|
11720
|
+
const { findMigrationGaps: chercher } = await Promise.resolve().then(() => (init_migrate(), migrate_exports));
|
|
11721
|
+
return chercher(databaseUrl, opts);
|
|
11722
|
+
}
|
|
11723
|
+
async function repairMigrations2(databaseUrl, opts = {}) {
|
|
11724
|
+
const { repairMigrations: reparer } = await Promise.resolve().then(() => (init_migrate(), migrate_exports));
|
|
11725
|
+
return reparer(databaseUrl, opts);
|
|
11726
|
+
}
|
|
11640
11727
|
var LEGACY_PG_PASSWORD, PG_USER, PG_DATABASE, READY_TIMEOUT_MS, POSTMASTER_GAVE_UP;
|
|
11641
11728
|
var init_postgres = __esm({
|
|
11642
11729
|
"src/lib/postgres.ts"() {
|
|
@@ -12651,6 +12738,13 @@ var init_webhook_trigger = __esm({
|
|
|
12651
12738
|
}
|
|
12652
12739
|
});
|
|
12653
12740
|
|
|
12741
|
+
// ../../packages/shared/src/entities/automation.ts
|
|
12742
|
+
var init_automation = __esm({
|
|
12743
|
+
"../../packages/shared/src/entities/automation.ts"() {
|
|
12744
|
+
"use strict";
|
|
12745
|
+
}
|
|
12746
|
+
});
|
|
12747
|
+
|
|
12654
12748
|
// ../../packages/shared/src/entities/skill.ts
|
|
12655
12749
|
import { z as z16 } from "zod";
|
|
12656
12750
|
var SkillOperationSchema, SkillRequiredConfigSchema, AgentSkillSchema, AgentSkillInsertSchema, AgentSkillAssignmentSchema, AgentSkillAssignmentInsertSchema;
|
|
@@ -14379,6 +14473,53 @@ var init_approval_explain = __esm({
|
|
|
14379
14473
|
}
|
|
14380
14474
|
});
|
|
14381
14475
|
|
|
14476
|
+
// ../../packages/shared/src/approval-rules-chain.ts
|
|
14477
|
+
var init_approval_rules_chain = __esm({
|
|
14478
|
+
"../../packages/shared/src/approval-rules-chain.ts"() {
|
|
14479
|
+
"use strict";
|
|
14480
|
+
}
|
|
14481
|
+
});
|
|
14482
|
+
|
|
14483
|
+
// ../../packages/shared/src/approval-tool-default.ts
|
|
14484
|
+
var SAFE_BY_DEFAULT_TOOL_NAMES, SAFE_BY_DEFAULT;
|
|
14485
|
+
var init_approval_tool_default = __esm({
|
|
14486
|
+
"../../packages/shared/src/approval-tool-default.ts"() {
|
|
14487
|
+
"use strict";
|
|
14488
|
+
init_approval_rules_chain();
|
|
14489
|
+
SAFE_BY_DEFAULT_TOOL_NAMES = [
|
|
14490
|
+
"attach_agent",
|
|
14491
|
+
"attach_connector",
|
|
14492
|
+
"attach_mcp",
|
|
14493
|
+
"attach_skill",
|
|
14494
|
+
"cloudflare_delete_worker",
|
|
14495
|
+
"cloudflare_deploy",
|
|
14496
|
+
"code_task",
|
|
14497
|
+
"create_agent",
|
|
14498
|
+
"create_connector",
|
|
14499
|
+
"create_mcp",
|
|
14500
|
+
"create_schedule",
|
|
14501
|
+
"create_skill",
|
|
14502
|
+
"declare_verification",
|
|
14503
|
+
"detach_agent",
|
|
14504
|
+
"detach_connector",
|
|
14505
|
+
"detach_mcp",
|
|
14506
|
+
"detach_skill",
|
|
14507
|
+
"register_project",
|
|
14508
|
+
"run_command",
|
|
14509
|
+
"run_schedule",
|
|
14510
|
+
"run_skill_script",
|
|
14511
|
+
"skill_file_write",
|
|
14512
|
+
"toggle_schedule",
|
|
14513
|
+
"update_agent",
|
|
14514
|
+
"update_schedule",
|
|
14515
|
+
"update_skill",
|
|
14516
|
+
"xlsx_delete_columns",
|
|
14517
|
+
"xlsx_delete_rows"
|
|
14518
|
+
];
|
|
14519
|
+
SAFE_BY_DEFAULT = new Set(SAFE_BY_DEFAULT_TOOL_NAMES);
|
|
14520
|
+
}
|
|
14521
|
+
});
|
|
14522
|
+
|
|
14382
14523
|
// ../../packages/shared/src/untrusted.ts
|
|
14383
14524
|
var init_untrusted = __esm({
|
|
14384
14525
|
"../../packages/shared/src/untrusted.ts"() {
|
|
@@ -14599,7 +14740,7 @@ function parseVerificationSurfaces(raw) {
|
|
|
14599
14740
|
shell: pick("shell")
|
|
14600
14741
|
};
|
|
14601
14742
|
}
|
|
14602
|
-
var VerificationSurfacesSchema, DEFAULT_VERIFICATION_SURFACES, VERIFICATION_SURFACE_TOOLS;
|
|
14743
|
+
var VerificationSurfacesSchema, DEFAULT_VERIFICATION_SURFACES, VERIFICATION_SURFACE_TOOLS, PROOF_REPAIR_ATTEMPTS_CHOICES;
|
|
14603
14744
|
var init_verification_surfaces = __esm({
|
|
14604
14745
|
"../../packages/shared/src/verification-surfaces.ts"() {
|
|
14605
14746
|
"use strict";
|
|
@@ -14648,6 +14789,7 @@ var init_verification_surfaces = __esm({
|
|
|
14648
14789
|
],
|
|
14649
14790
|
shell: ["run_command", "run_skill_script"]
|
|
14650
14791
|
});
|
|
14792
|
+
PROOF_REPAIR_ATTEMPTS_CHOICES = Object.freeze([0, 1, 2, 3]);
|
|
14651
14793
|
}
|
|
14652
14794
|
});
|
|
14653
14795
|
|
|
@@ -14694,6 +14836,7 @@ var init_src2 = __esm({
|
|
|
14694
14836
|
init_approval();
|
|
14695
14837
|
init_memory();
|
|
14696
14838
|
init_webhook_trigger();
|
|
14839
|
+
init_automation();
|
|
14697
14840
|
init_skill();
|
|
14698
14841
|
init_schedule();
|
|
14699
14842
|
init_llm_key();
|
|
@@ -14712,6 +14855,8 @@ var init_src2 = __esm({
|
|
|
14712
14855
|
init_redact_secrets();
|
|
14713
14856
|
init_approval_impact();
|
|
14714
14857
|
init_approval_explain();
|
|
14858
|
+
init_approval_rules_chain();
|
|
14859
|
+
init_approval_tool_default();
|
|
14715
14860
|
init_untrusted();
|
|
14716
14861
|
init_redact_transcript();
|
|
14717
14862
|
init_agent_slug();
|
|
@@ -14880,9 +15025,27 @@ var init_entities = __esm({
|
|
|
14880
15025
|
* vit dans le parseur, jamais deviné par un backfill (même leçon que
|
|
14881
15026
|
* 0084 : un réglage est un geste, pas un état inventé).
|
|
14882
15027
|
*/
|
|
14883
|
-
verificationSurfaces: jsonb("verification_surfaces").notNull().default(sql`'{}'::jsonb`)
|
|
15028
|
+
verificationSurfaces: jsonb("verification_surfaces").notNull().default(sql`'{}'::jsonb`),
|
|
15029
|
+
/**
|
|
15030
|
+
* Combien de tours de réparation un run reçoit au plus après une preuve
|
|
15031
|
+
* rouge (issue #377, migration 0121). La borne de #375 était écrite en
|
|
15032
|
+
* dur dans `finalize.ts` ; elle se règle désormais par espace.
|
|
15033
|
+
*
|
|
15034
|
+
* `0` — le run finit avec le verdict rouge immédiatement, comme avant
|
|
15035
|
+
* #375. `1` (défaut) — un tour, la décision D2 du plan. Jusqu'à `3`.
|
|
15036
|
+
*
|
|
15037
|
+
* LE CHECK EST EN BASE, pas seulement dans le formulaire : cette colonne
|
|
15038
|
+
* borne une boucle du runner (invariant #8), et une valeur de 9 999 écrite
|
|
15039
|
+
* par un script ferait tourner un agent toute la nuit sur une preuve qui
|
|
15040
|
+
* ne passera jamais.
|
|
15041
|
+
*/
|
|
15042
|
+
proofRepairAttempts: integer("proof_repair_attempts").notNull().default(1)
|
|
14884
15043
|
},
|
|
14885
15044
|
(table) => [
|
|
15045
|
+
check(
|
|
15046
|
+
"entities_proof_repair_attempts_check",
|
|
15047
|
+
sql`${table.proofRepairAttempts} >= 0 AND ${table.proofRepairAttempts} <= 3`
|
|
15048
|
+
),
|
|
14886
15049
|
uniqueIndex("entities_mcp_token_idx").on(table.mcpToken),
|
|
14887
15050
|
index("idx_entities_user_id").on(table.userId),
|
|
14888
15051
|
index("idx_entities_root_agent_id").on(table.rootAgentId)
|
|
@@ -15446,6 +15609,35 @@ var init_jobs = __esm({
|
|
|
15446
15609
|
* référence déjà agent_jobs pour `registered_job_id`.
|
|
15447
15610
|
*/
|
|
15448
15611
|
projectId: uuid("project_id"),
|
|
15612
|
+
/**
|
|
15613
|
+
* UN LIVRABLE DE CE RUN ATTEND LE REGARD DE LA PERSONNE (#255, migration
|
|
15614
|
+
* 0118). L'instant où le run a livré ; NULL = rien n'attend.
|
|
15615
|
+
*
|
|
15616
|
+
* POSÉ par la porte terminale de succès (`finalizeJobSuccess`), dans la
|
|
15617
|
+
* MÊME transaction que le statut terminal, quand le run a produit au moins
|
|
15618
|
+
* un livrable `addressed AND produced` — nommé par un outil, ET réellement
|
|
15619
|
+
* écrit. Les deux ensemble : `addressed` seul est une intention, qu'une
|
|
15620
|
+
* écriture ratée laisse en place.
|
|
15621
|
+
*
|
|
15622
|
+
* EFFACÉ par le seul côté web, et par les deux gestes qui sont des
|
|
15623
|
+
* regards : ouvrir le run (`getSpaceConversationAction`, la page qui
|
|
15624
|
+
* MONTRE les livrables) ou ouvrir le fil (`markConversationRead`, au même
|
|
15625
|
+
* endroit que le marqueur de lecture). Le runner ne l'efface jamais : une
|
|
15626
|
+
* livraison de canal ne fait rien regarder à personne, exactement comme
|
|
15627
|
+
* pour `conversation_reads`.
|
|
15628
|
+
*
|
|
15629
|
+
* PORTÉ PAR LE JOB DE TÊTE, jamais par le délégué qui a produit : c'est le
|
|
15630
|
+
* run que la personne ouvre, et la page d'un run remonte déjà les
|
|
15631
|
+
* livrables de toute sa descendance (`collectDescendants`). La chaîne est
|
|
15632
|
+
* remontée à l'écriture, bornée par la profondeur de délégation.
|
|
15633
|
+
*
|
|
15634
|
+
* PAR ESPACE, pas par personne — au contraire de `conversation_reads`.
|
|
15635
|
+
* C'est la règle de la PASTILLE d'attention, à laquelle ce fait s'ajoute :
|
|
15636
|
+
* une approbation résolue par l'un tombe pour tous, et un livrable regardé
|
|
15637
|
+
* par l'un aussi. Une colonne unique dit donc ici la même chose que les
|
|
15638
|
+
* deux autres sources de la pastille.
|
|
15639
|
+
*/
|
|
15640
|
+
deliverableCheckDueAt: timestamp("deliverable_check_due_at", { withTimezone: true }),
|
|
15449
15641
|
completedAt: timestamp("completed_at", { withTimezone: true }),
|
|
15450
15642
|
createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
|
|
15451
15643
|
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
|
|
@@ -15484,6 +15676,12 @@ var init_jobs = __esm({
|
|
|
15484
15676
|
// liste des projets) — partiel, la colonne reste NULL sur l'immense
|
|
15485
15677
|
// majorité des jobs.
|
|
15486
15678
|
index("idx_agent_jobs_project").on(table.projectId).where(sql`${table.projectId} IS NOT NULL`),
|
|
15679
|
+
// 0118 (#255) : la pastille d'attention relit « quels runs de cet espace
|
|
15680
|
+
// attendent un regard » toutes les 15 secondes, sur toutes les pages du
|
|
15681
|
+
// tableau de bord. PARTIEL : la colonne est NULL sur presque tous les
|
|
15682
|
+
// jobs, et elle le redevient dès que la personne a regardé — l'index reste
|
|
15683
|
+
// donc de la taille de ce qui attend, pas de celle de la table.
|
|
15684
|
+
index("idx_agent_jobs_deliverable_check_due").on(table.entityId).where(sql`${table.deliverableCheckDueAt} IS NOT NULL`),
|
|
15487
15685
|
check(
|
|
15488
15686
|
"agent_jobs_status_check",
|
|
15489
15687
|
sql`${table.status} IN ('pending','processing','completed','failed','awaiting_approval','awaiting_delegation','cancelled')`
|
|
@@ -16368,6 +16566,32 @@ var init_code_projects = __esm({
|
|
|
16368
16566
|
}
|
|
16369
16567
|
});
|
|
16370
16568
|
|
|
16569
|
+
// ../../packages/db/src/schema/excluded-project-paths.ts
|
|
16570
|
+
var excludedProjectPaths;
|
|
16571
|
+
var init_excluded_project_paths = __esm({
|
|
16572
|
+
"../../packages/db/src/schema/excluded-project-paths.ts"() {
|
|
16573
|
+
"use strict";
|
|
16574
|
+
init_pg_core();
|
|
16575
|
+
init_entities();
|
|
16576
|
+
excludedProjectPaths = pgTable(
|
|
16577
|
+
"excluded_project_paths",
|
|
16578
|
+
{
|
|
16579
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
16580
|
+
entityId: uuid("entity_id").notNull().references(() => entities.id, { onDelete: "cascade" }),
|
|
16581
|
+
/** Chemin absolu slash-normalisé, tel qu'il s'affiche — jamais recasé après coup. */
|
|
16582
|
+
projectPath: text("project_path").notNull(),
|
|
16583
|
+
/** `projectKey(project_path)` — l'identité, et ce que porte l'unicité. */
|
|
16584
|
+
projectKey: text("project_key").notNull(),
|
|
16585
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
16586
|
+
},
|
|
16587
|
+
(table) => [
|
|
16588
|
+
unique("excluded_project_paths_entity_key_unique").on(table.entityId, table.projectKey),
|
|
16589
|
+
index("idx_excluded_project_paths_entity").on(table.entityId)
|
|
16590
|
+
]
|
|
16591
|
+
);
|
|
16592
|
+
}
|
|
16593
|
+
});
|
|
16594
|
+
|
|
16371
16595
|
// ../../packages/db/src/schema/auth.ts
|
|
16372
16596
|
var sessions, accounts, verifications;
|
|
16373
16597
|
var init_auth = __esm({
|
|
@@ -17193,6 +17417,7 @@ var init_job_checkpoints = __esm({
|
|
|
17193
17417
|
"../../packages/db/src/schema/job-checkpoints.ts"() {
|
|
17194
17418
|
"use strict";
|
|
17195
17419
|
init_pg_core();
|
|
17420
|
+
init_drizzle_orm();
|
|
17196
17421
|
init_jobs();
|
|
17197
17422
|
jobCheckpoints = pgTable(
|
|
17198
17423
|
"job_checkpoints",
|
|
@@ -17205,7 +17430,23 @@ var init_job_checkpoints = __esm({
|
|
|
17205
17430
|
workspace: text("workspace").notNull(),
|
|
17206
17431
|
/** Le commit dans le magasin fantôme — l'état d'avant de ce tour. */
|
|
17207
17432
|
sha: text("sha").notNull(),
|
|
17208
|
-
takenAt: timestamp("taken_at", { withTimezone: true }).notNull().defaultNow()
|
|
17433
|
+
takenAt: timestamp("taken_at", { withTimezone: true }).notNull().defaultNow(),
|
|
17434
|
+
/**
|
|
17435
|
+
* COMBIEN DE TEMPS LA PHOTO A PRIS, en millisecondes (#261, migration 0119).
|
|
17436
|
+
*
|
|
17437
|
+
* Mesurée autour du seul appel de `snapshot`, aux deux endroits qui
|
|
17438
|
+
* photographient : le seam de `packages/tools` et le harnais CLI du runner.
|
|
17439
|
+
*
|
|
17440
|
+
* Elle existe pour que la montée d'un dossier SE VOIE avant qu'elle ne
|
|
17441
|
+
* refuse quoi que ce soit : `git add` est borné à 30 secondes, et jusqu'ici
|
|
17442
|
+
* la durée ne vivait que sur le chemin d'ÉCHEC, en mémoire, le temps de
|
|
17443
|
+
* rendre la phrase du refus. Une photo qui réussit en 24 secondes ne
|
|
17444
|
+
* laissait aucune trace — le cas qu'il faut justement voir venir.
|
|
17445
|
+
*
|
|
17446
|
+
* NULL = pas mesurée (une ligne d'avant la colonne). L'écran le dit ; il
|
|
17447
|
+
* n'affiche jamais un zéro, qui se lirait « instantané » (invariant #4).
|
|
17448
|
+
*/
|
|
17449
|
+
snapshotMs: integer("snapshot_ms")
|
|
17209
17450
|
},
|
|
17210
17451
|
(table) => [
|
|
17211
17452
|
unique("job_checkpoints_job_turn_workspace_unique").on(
|
|
@@ -17213,7 +17454,19 @@ var init_job_checkpoints = __esm({
|
|
|
17213
17454
|
table.turn,
|
|
17214
17455
|
table.workspace
|
|
17215
17456
|
),
|
|
17216
|
-
index("idx_job_checkpoints_job").on(table.jobId)
|
|
17457
|
+
index("idx_job_checkpoints_job").on(table.jobId),
|
|
17458
|
+
// 0119 (#261) : « la dernière photo de cet espace », un `ORDER BY taken_at
|
|
17459
|
+
// DESC LIMIT 1` par espace. Sans lui, le parcours dégénère pour un espace
|
|
17460
|
+
// SILENCIEUX — dont la dernière photo est justement la plus ancienne, donc
|
|
17461
|
+
// la plus loin (revue C, passe 2 de la PR #324).
|
|
17462
|
+
index("idx_job_checkpoints_taken_at").on(sql`${table.takenAt} DESC`),
|
|
17463
|
+
// La durée est un CONSTAT, jamais négative. Pas de borne supérieure : une
|
|
17464
|
+
// photo peut légitimement durer plus que le budget de `git add`, et une
|
|
17465
|
+
// borne inventée refuserait la ligne au moment où elle intéresse le plus.
|
|
17466
|
+
check(
|
|
17467
|
+
"job_checkpoints_snapshot_ms_check",
|
|
17468
|
+
sql`${table.snapshotMs} IS NULL OR ${table.snapshotMs} >= 0`
|
|
17469
|
+
)
|
|
17217
17470
|
]
|
|
17218
17471
|
);
|
|
17219
17472
|
}
|
|
@@ -17313,6 +17566,7 @@ __export(schema_exports, {
|
|
|
17313
17566
|
entityLlmKeys: () => entityLlmKeys,
|
|
17314
17567
|
entityMembers: () => entityMembers,
|
|
17315
17568
|
entitySettings: () => entitySettings,
|
|
17569
|
+
excludedProjectPaths: () => excludedProjectPaths,
|
|
17316
17570
|
jobCheckpoints: () => jobCheckpoints,
|
|
17317
17571
|
jobDeliverableVerificationState: () => jobDeliverableVerificationState,
|
|
17318
17572
|
jobDeliveries: () => jobDeliveries,
|
|
@@ -17353,6 +17607,7 @@ var init_schema2 = __esm({
|
|
|
17353
17607
|
init_llm_keys();
|
|
17354
17608
|
init_mcp();
|
|
17355
17609
|
init_code_projects();
|
|
17610
|
+
init_excluded_project_paths();
|
|
17356
17611
|
init_auth();
|
|
17357
17612
|
init_agent_connector_assignments();
|
|
17358
17613
|
init_agent_workspaces();
|
|
@@ -17731,7 +17986,7 @@ var init_master_key_guard = __esm({
|
|
|
17731
17986
|
});
|
|
17732
17987
|
|
|
17733
17988
|
// ../../packages/db/src/queries/channel-identity.ts
|
|
17734
|
-
import { createHash as
|
|
17989
|
+
import { createHash as createHash3 } from "crypto";
|
|
17735
17990
|
async function resolveOwnerConversation(db, agentId, channel) {
|
|
17736
17991
|
if (channel === "telegram") {
|
|
17737
17992
|
const [row2] = await db.select({ chatId: telegramAllowedChats.chatId }).from(telegramAllowedChats).where(
|
|
@@ -17807,7 +18062,7 @@ function credentialsFingerprint(creds) {
|
|
|
17807
18062
|
const canonical = JSON.stringify(
|
|
17808
18063
|
Object.keys(creds).sort().map((k) => [k, creds[k]])
|
|
17809
18064
|
);
|
|
17810
|
-
return
|
|
18065
|
+
return createHash3("sha256").update(canonical).digest("hex");
|
|
17811
18066
|
}
|
|
17812
18067
|
async function getBindingCredentials(db, agentId, channel) {
|
|
17813
18068
|
if (channel === "telegram") {
|
|
@@ -18488,6 +18743,7 @@ __export(src_exports, {
|
|
|
18488
18743
|
entityMembers: () => entityMembers,
|
|
18489
18744
|
entitySettings: () => entitySettings,
|
|
18490
18745
|
eq: () => eq,
|
|
18746
|
+
excludedProjectPaths: () => excludedProjectPaths,
|
|
18491
18747
|
getAppSetting: () => getAppSetting,
|
|
18492
18748
|
getBindingCredentials: () => getBindingCredentials,
|
|
18493
18749
|
getChannelBinding: () => getChannelBinding,
|
|
@@ -18627,7 +18883,7 @@ var init_local_auth = __esm({
|
|
|
18627
18883
|
});
|
|
18628
18884
|
|
|
18629
18885
|
// ../../packages/auth/src/lib/constant-time.ts
|
|
18630
|
-
import { createHash as
|
|
18886
|
+
import { createHash as createHash4, timingSafeEqual } from "crypto";
|
|
18631
18887
|
var init_constant_time = __esm({
|
|
18632
18888
|
"../../packages/auth/src/lib/constant-time.ts"() {
|
|
18633
18889
|
"use strict";
|
|
@@ -19656,6 +19912,7 @@ var init_processes = __esm({
|
|
|
19656
19912
|
// src/commands/up.ts
|
|
19657
19913
|
var up_exports = {};
|
|
19658
19914
|
__export(up_exports, {
|
|
19915
|
+
migrationGapRefusal: () => migrationGapRefusal,
|
|
19659
19916
|
runUp: () => runUp
|
|
19660
19917
|
});
|
|
19661
19918
|
import chalk from "chalk";
|
|
@@ -19690,6 +19947,21 @@ function printLogTail(service, lines) {
|
|
|
19690
19947
|
${service}: could not read ${logFile}`));
|
|
19691
19948
|
}
|
|
19692
19949
|
}
|
|
19950
|
+
function migrationGapRefusal(gaps, opts) {
|
|
19951
|
+
const combien = `${gaps.length} migration${gaps.length === 1 ? "" : "s"}`;
|
|
19952
|
+
return [
|
|
19953
|
+
`The database is missing ${combien} the journal announces:`,
|
|
19954
|
+
"",
|
|
19955
|
+
...gaps.map((g) => ` ${g.tag}`),
|
|
19956
|
+
"",
|
|
19957
|
+
" Tables are short of columns the code expects, so writes to them will fail.",
|
|
19958
|
+
" Nodal-Agents will not serve a database in that state.",
|
|
19959
|
+
"",
|
|
19960
|
+
" Apply them with:",
|
|
19961
|
+
"",
|
|
19962
|
+
` nodal-agents up --repair-migrations${opts.dev ? " --dev" : ""}${opts.detach ? " --detach" : ""}`
|
|
19963
|
+
].join("\n");
|
|
19964
|
+
}
|
|
19693
19965
|
async function runUp(opts = {}) {
|
|
19694
19966
|
const binaries = await probeEmbeddedPostgres();
|
|
19695
19967
|
if (!binaries.ok) {
|
|
@@ -19996,6 +20268,35 @@ ${lines}
|
|
|
19996
20268
|
await pg.stop();
|
|
19997
20269
|
throw err;
|
|
19998
20270
|
}
|
|
20271
|
+
const vectorPatched = { patchVectorAsText: !pg.vectorAvailable };
|
|
20272
|
+
const gapSpinner = ora("Checking the migration journal\u2026").start();
|
|
20273
|
+
let gaps = await findMigrationGaps2(databaseUrl, vectorPatched).catch(async (err) => {
|
|
20274
|
+
gapSpinner.fail("Could not read the migration journal");
|
|
20275
|
+
await pg.stop();
|
|
20276
|
+
throw err;
|
|
20277
|
+
});
|
|
20278
|
+
if (gaps.length > 0 && opts.repairMigrations === true) {
|
|
20279
|
+
gapSpinner.text = `Repairing ${gaps.length} skipped migration${gaps.length === 1 ? "" : "s"}\u2026`;
|
|
20280
|
+
try {
|
|
20281
|
+
const repaired = await repairMigrations2(databaseUrl, vectorPatched);
|
|
20282
|
+
gapSpinner.succeed(chalk.green(`Repaired: ${repaired.map((g) => g.tag).join(", ")}`));
|
|
20283
|
+
} catch (err) {
|
|
20284
|
+
gapSpinner.fail("Repair failed");
|
|
20285
|
+
await pg.stop();
|
|
20286
|
+
throw err;
|
|
20287
|
+
}
|
|
20288
|
+
gaps = await findMigrationGaps2(databaseUrl, vectorPatched);
|
|
20289
|
+
}
|
|
20290
|
+
if (gaps.length > 0) {
|
|
20291
|
+
gapSpinner.fail(
|
|
20292
|
+
`${gaps.length} migration${gaps.length === 1 ? "" : "s"} in the journal never reached this database`
|
|
20293
|
+
);
|
|
20294
|
+
await pg.stop();
|
|
20295
|
+
throw new Error(
|
|
20296
|
+
migrationGapRefusal(gaps, { dev: opts.dev === true, detach: opts.detach === true })
|
|
20297
|
+
);
|
|
20298
|
+
}
|
|
20299
|
+
gapSpinner.succeed(chalk.green("Migration journal complete"));
|
|
19999
20300
|
{
|
|
20000
20301
|
const { db, close } = createClient(databaseUrl, { max: 1 });
|
|
20001
20302
|
try {
|
|
@@ -20842,7 +21143,7 @@ var init_failure = __esm({
|
|
|
20842
21143
|
|
|
20843
21144
|
// ../../packages/checkpoints/src/checkpoints.ts
|
|
20844
21145
|
import { execFile, spawn } from "child_process";
|
|
20845
|
-
import { createHash as
|
|
21146
|
+
import { createHash as createHash5, randomBytes as randomBytes6 } from "crypto";
|
|
20846
21147
|
import { mkdir, rm, writeFile } from "fs/promises";
|
|
20847
21148
|
import { existsSync as existsSync13 } from "fs";
|
|
20848
21149
|
import { join as join14 } from "path";
|
|
@@ -20917,7 +21218,7 @@ function workspaceKey(workspace) {
|
|
|
20917
21218
|
norm = norm.toLowerCase().replace(/\//g, "\\");
|
|
20918
21219
|
}
|
|
20919
21220
|
norm = norm.replace(/[\\/]+$/, "");
|
|
20920
|
-
return
|
|
21221
|
+
return createHash5("sha256").update(norm).digest("hex").slice(0, 16);
|
|
20921
21222
|
}
|
|
20922
21223
|
function gitEnv(store, workspace, indexFile) {
|
|
20923
21224
|
const key = workspaceKey(workspace);
|
|
@@ -34835,10 +35136,17 @@ program.command("init").description("Interactive wizard \u2014 configure LLM, po
|
|
|
34835
35136
|
process.exit(1);
|
|
34836
35137
|
}
|
|
34837
35138
|
});
|
|
34838
|
-
program.command("up").description("Start Postgres, runner, and web \u2014 open browser when ready").option("--dev", "Run web in `next dev` mode (HMR, no prebuild required)").option("-d, --detach", "Return to the prompt once healthy \u2014 services keep running").
|
|
35139
|
+
program.command("up").description("Start Postgres, runner, and web \u2014 open browser when ready").option("--dev", "Run web in `next dev` mode (HMR, no prebuild required)").option("-d, --detach", "Return to the prompt once healthy \u2014 services keep running").option(
|
|
35140
|
+
"--repair-migrations",
|
|
35141
|
+
"Apply migrations the journal announces and this database never got"
|
|
35142
|
+
).action(async (opts) => {
|
|
34839
35143
|
const { runUp: runUp2 } = await Promise.resolve().then(() => (init_up(), up_exports));
|
|
34840
35144
|
try {
|
|
34841
|
-
await runUp2({
|
|
35145
|
+
await runUp2({
|
|
35146
|
+
dev: opts.dev,
|
|
35147
|
+
detach: opts.detach,
|
|
35148
|
+
repairMigrations: opts.repairMigrations
|
|
35149
|
+
});
|
|
34842
35150
|
} catch (err) {
|
|
34843
35151
|
console.error(chalk8.red("Error:"), err instanceof Error ? err.message : String(err));
|
|
34844
35152
|
process.exit(1);
|