@mndrk/agx 2.0.3 → 2.0.4
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/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/route.js +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/dependencies/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/route.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/Projects_Agents_agx-cloud_lib_6041e016._.js +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/Projects_Agents_agx-cloud_lib_8c82981b._.js +3 -3
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/[root-of-the-server]__45d4a92e._.js +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/chunks/[root-of-the-server]__5d4e1eab._.js +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/404.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/lib/startup.ts +21 -10
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/package.json +1 -0
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/src/db/init.ts +9 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/worker/index.js +17 -9
- package/package.json +1 -1
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{NUZvhyZNQzdxfq6-qS6F_ → l7UCe_8faNvEh-Be9eis7}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{NUZvhyZNQzdxfq6-qS6F_ → l7UCe_8faNvEh-Be9eis7}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{NUZvhyZNQzdxfq6-qS6F_ → l7UCe_8faNvEh-Be9eis7}/_ssgManifest.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports=[36420,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",
|
|
2
|
-
${e.join("\n")}`)}return function(e){let t=s.default.join(process.cwd(),"db","sqlite","001_agx_board_schema.sql");if(!r.default.existsSync(t))return console.warn(`[sqlite] DDL not found at ${t}, skipping schema init`);let
|
|
1
|
+
module.exports=[36420,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",n=["json1"],i=["fts5"],l=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function a(a,u){let p=[],h=a.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(h.v,s)&&p.push({kind:"version_mismatch",message:`SQLite version ${h.v} is below minimum ${s}`,found:h.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),n))o(a,e)||p.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(a,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let c=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let n=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${n}" 2>/dev/null || df "${n}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);c&&l.some(e=>c.toLowerCase().includes(e))&&p.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${c})`,path:u,found:c,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{a.pragma("journal_mode = wal"),a.pragma("foreign_keys = 1"),a.pragma("busy_timeout = 5000"),a.pragma("synchronous = 1"),a.pragma("cache_size = -64000");let e=a.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){a.pragma("journal_mode = DELETE");let e=a.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(a.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):p.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){p.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return p}e.s(["validateSQLiteEnvironment",()=>a])},62367,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},74949,e=>{"use strict";var t=e.i(17920),r=e.i(22734),s=e.i(14747),n=e.i(62367),i=e.i(36420);class l{expr;constructor(e){this.expr=e}}function o(e){return new l(e)}let a=null;function u(){if(a)return a;let e=process.env.SQLITE_DB_PATH||s.default.join(process.cwd(),"agx-board.db");r.default.existsSync(e),a=new t.default(e);let n=(0,i.validateSQLiteEnvironment)(a,e);if(n.length>0){let e=n.map(e=>` - ${e.message}${e.fix?` (fix: ${e.fix})`:""}`);throw Error(`SQLite startup validation failed:
|
|
2
|
+
${e.join("\n")}`)}return function(e){let t=s.default.join(process.cwd(),"db","sqlite","001_agx_board_schema.sql");if(!r.default.existsSync(t))return console.warn(`[sqlite] DDL not found at ${t}, skipping schema init`);let n=r.default.readFileSync(t,"utf-8");e.exec(n)}(a),a}let p=new Set(["definition","depends_on","input","metadata","models","open_blockers","output","payload","run_index","stage_decisions","swarm_models"]);function h(e){return void 0===e?null:e instanceof Date?e.toISOString():e&&"object"==typeof e?JSON.stringify(e):e}function c(e,t){return null==t?null:t instanceof Date?t.toISOString():p.has(e)?JSON.stringify(t):h(t)}function d(e){let t=(e||"*").trim();if(!t||"*"===t)return{columns:["*"],includeProjectRepos:!1};let r=t.includes("project_repos(*)"),s=t.replace(/project_repos\(\*\)/g,"").split(",").map(e=>e.trim()).filter(Boolean);return 0===s.length?{columns:["*"],includeProjectRepos:r}:{columns:s,includeProjectRepos:r}}class m{table;operation="select";filters=[];orderSpecs=[];limitValue=null;selectColumns="*";returningColumns=null;singleMode="none";payload=null;upsertOptions=null;constructor(e){this.table=e}select(e="*"){return"select"===this.operation?this.selectColumns=e:this.returningColumns=e||"*",this}insert(e){return this.operation="insert",this.payload=e,this}update(e){return this.operation="update",this.payload=e,this}delete(){return this.operation="delete",this}upsert(e,t){return this.operation="upsert",this.payload=e,this.upsertOptions=t||{},this}eq(e,t){return this.filters.push({op:"eq",column:e,value:t}),this}neq(e,t){return this.filters.push({op:"neq",column:e,value:t}),this}gt(e,t){return this.filters.push({op:"gt",column:e,value:t}),this}gte(e,t){return this.filters.push({op:"gte",column:e,value:t}),this}lt(e,t){return this.filters.push({op:"lt",column:e,value:t}),this}lte(e,t){return this.filters.push({op:"lte",column:e,value:t}),this}is(e,t){return this.filters.push({op:"is",column:e,value:t}),this}in(e,t){return this.filters.push({op:"in",column:e,value:t||[]}),this}contains(e,t){return this.filters.push({op:"contains",column:e,value:t}),this}or(e){return this.filters.push({op:"or",expression:e}),this}order(e,t){return this.orderSpecs.push({column:e,...t||{}}),this}limit(e){return this.limitValue=e,this}single(){return this.singleMode="single",this.execute()}maybeSingle(){return this.singleMode="maybeSingle",this.execute()}then(e,t){return this.execute().then(e,t)}buildWhere(e,t){for(let r of this.filters){if("or"===r.op){let s=r.expression.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{var r;let[s,n,...i]=e.split("."),l="true"===(r=i.join("."))||"false"!==r&&("null"===r?null:r);return"eq"===n?(t.push(h(l)),`${s} = ?`):"neq"===n?(t.push(h(l)),`${s} <> ?`):"is"===n?null===l?`${s} IS NULL`:(t.push(h(l)),`${s} IS ?`):"ilike"===n||"like"===n?(t.push(h(l)),`${s} LIKE ?`):"1=1"});s.length>0&&e.push(`(${s.join(" OR ")})`);continue}if("eq"===r.op)t.push(h(r.value)),e.push(`${r.column} = ?`);else if("neq"===r.op)t.push(h(r.value)),e.push(`${r.column} <> ?`);else if("gt"===r.op)t.push(h(r.value)),e.push(`${r.column} > ?`);else if("gte"===r.op)t.push(h(r.value)),e.push(`${r.column} >= ?`);else if("lt"===r.op)t.push(h(r.value)),e.push(`${r.column} < ?`);else if("lte"===r.op)t.push(h(r.value)),e.push(`${r.column} <= ?`);else if("is"===r.op)null===r.value?e.push(`${r.column} IS NULL`):(t.push(h(r.value)),e.push(`${r.column} IS ?`));else if("contains"===r.op){let s=(r.value||[]).map(h);if(0===s.length)e.push("1=1");else{let n=s.map(()=>"?").join(", ");t.push(...s),e.push(`(SELECT COUNT(*) FROM json_each(${r.column}) WHERE json_each.value IN (${n})) = ${s.length}`)}}else if("in"===r.op)if(r.value&&0!==r.value.length){let s=(r.value||[]).map(h),n=s.map(()=>"?").join(", ");t.push(...s),e.push(`${r.column} IN (${n})`)}else e.push("1=0")}}executeSelect(){try{let e=u(),{columns:t,includeProjectRepos:r}=d(this.selectColumns),s=[],n=[];this.buildWhere(n,s);let i=`SELECT ${t.join(", ")} FROM ${this.table}`;if(n.length>0&&(i+=` WHERE ${n.join(" AND ")}`),this.orderSpecs.length>0){let e=this.orderSpecs.map(e=>{let t=!1===e.ascending?"DESC":"ASC";return!0===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 0 ELSE 1 END, ${e.column} ${t}`:!1===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 1 ELSE 0 END, ${e.column} ${t}`:`${e.column} ${t}`}).join(", ");i+=` ORDER BY ${e}`}"number"==typeof this.limitValue&&(s.push(this.limitValue),i+=" LIMIT ?");let l=e.prepare(i).all(...s);if(l=l.map(g),r&&"projects"===this.table&&l.length>0){let t=l.map(e=>e.id).filter(Boolean);if(t.length>0){let r=t.map(()=>"?").join(", "),s=e.prepare(`SELECT * FROM project_repos WHERE project_id IN (${r})`).all(...t),n=new Map;for(let e of s){let t=n.get(e.project_id)||[];t.push(e),n.set(e.project_id,t)}l=l.map(e=>({...e,project_repos:n.get(e.id)||[]}))}}if("single"===this.singleMode){if(0===l.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:l[0],error:null}}if("maybeSingle"===this.singleMode)return{data:l[0]||null,error:null};return{data:l,error:null}}catch(e){return{data:null,error:e}}}executeInsertOrUpsert(){try{let e,t=u(),r=Array.isArray(this.payload)?this.payload:[this.payload];if(!r.length)return{data:[],error:null};let s=Array.from(r.reduce((e,t)=>{for(let r of Object.keys(t||{}))e.add(r);return e},new Set)),n=[],i=r.map(e=>{let t=s.map(t=>(n.push(c(t,e[t])),"?"));return`(${t.join(", ")})`}),l=`INSERT INTO ${this.table} (${s.join(", ")}) VALUES ${i.join(", ")}`;if("upsert"===this.operation){let e=this.upsertOptions?.onConflict||"",t=String(e).split(",").map(e=>e.trim()).filter(Boolean);if(t.length>0)if(this.upsertOptions?.ignoreDuplicates)l+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`;else{let e=s.filter(e=>!t.includes(e)).map(e=>`${e} = EXCLUDED.${e}`);e.length>0?l+=` ON CONFLICT (${t.join(", ")}) DO UPDATE SET ${e.join(", ")}`:l+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`}}if(this.returningColumns){let{columns:e}=d(this.returningColumns);l+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(l).all(...n)).map(g):(t.prepare(l).run(...n),e=[]);let o=this.returningColumns?e:null;if("single"===this.singleMode||"maybeSingle"===this.singleMode)return{data:o&&o[0]||null,error:null};return{data:o,error:null}}catch(e){return{data:null,error:e}}}executeUpdateOrDelete(){try{let e,t=u(),r=[],s=[],n=[];this.buildWhere(n,s);let i="";if("update"===this.operation){let e=Object.keys(this.payload||{}).map(e=>{let t=this.payload[e];return t instanceof l?`${e} = ${t.expr}`:(r.push(c(e,t)),`${e} = ?`)});i=`UPDATE ${this.table} SET ${e.join(", ")}`}else i=`DELETE FROM ${this.table}`;n.length>0&&(i+=` WHERE ${n.join(" AND ")}`);let o=[...r,...s];if(this.returningColumns){let{columns:e}=d(this.returningColumns);i+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(i).all(...o)).map(g):(t.prepare(i).run(...o),e=[]);let a=this.returningColumns?e:null;if("single"===this.singleMode){if(!a||0===a.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:a[0],error:null}}if("maybeSingle"===this.singleMode)return{data:a?.[0]||null,error:null};return{data:a,error:null}}catch(e){return{data:null,error:e}}}async execute(){return"select"===this.operation?this.executeSelect():"insert"===this.operation||"upsert"===this.operation?this.executeInsertOrUpsert():this.executeUpdateOrDelete()}}let f=new Set([...p,"depends_on","open_blockers","swarm_models","run_index","stage_decisions","definition","metadata","models","config","policy","done_criteria","outputs","task_snapshot","data_mapping"]);function g(e){if(!e||"object"!=typeof e)return e;let t={...e};for(let e of Object.keys(t)){if(f.has(e)&&"string"==typeof t[e])try{t[e]=JSON.parse(t[e])}catch{}("swarm"===e||"is_default"===e||"is_public"===e||"had_graph_before"===e)&&(0===t[e]?t[e]=!1:1===t[e]&&(t[e]=!0))}return t}function _(){return{from:e=>new m(e),auth:{getUser:async()=>({data:{user:{id:n.LOCAL_USER.id,email:n.LOCAL_USER.email,user_metadata:{name:n.LOCAL_USER.name,full_name:n.LOCAL_USER.name}}},error:null}),exchangeCodeForSession:async()=>({error:null}),refreshSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600},user:{id:n.LOCAL_USER.id,email:n.LOCAL_USER.email}},error:null})},async rpc(e,t){if("check_rate_limit"!==e)return{data:null,error:{message:`Unsupported rpc: ${e}`}};let r=u(),s=t.p_user_id,n=t.p_endpoint,i=Number(t.p_limit||60),l=Number(t.p_window_seconds||60),o=new Date(Math.floor(new Date().getTime()/(1e3*l))*l*1e3);try{let e=`
|
|
3
3
|
INSERT INTO rate_limits (user_id, endpoint, window_start, request_count)
|
|
4
4
|
VALUES (?, ?, ?, 1)
|
|
5
5
|
ON CONFLICT (user_id, endpoint, window_start)
|
|
6
6
|
DO UPDATE SET request_count = rate_limits.request_count + 1
|
|
7
7
|
RETURNING request_count
|
|
8
|
-
`,t=r.prepare(e).get(s,
|
|
8
|
+
`,t=r.prepare(e).get(s,n,o.toISOString());return{data:Number(t?.request_count||0)<=i,error:null}}catch(e){return{data:!1,error:e}}},channel:()=>({on(){return this},subscribe(e){return e&&e("SUBSCRIBED"),this}}),removeChannel(){}}}e.s(["SqlExpression",()=>l,"createAdminDbClientSQLite",()=>_,"getSQLiteDb",()=>u,"sqlExpr",()=>o])}];
|
|
9
9
|
|
|
10
10
|
//# sourceMappingURL=Projects_Agents_agx-cloud_lib_6041e016._.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports=[62367,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},36420,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",
|
|
2
|
-
${e.join("\n")}`)}return function(e){let t=s.default.join(process.cwd(),"db","sqlite","001_agx_board_schema.sql");if(!r.default.existsSync(t))return console.warn(`[sqlite] DDL not found at ${t}, skipping schema init`);let
|
|
1
|
+
module.exports=[62367,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},36420,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",n=["json1"],i=["fts5"],l=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function a(a,u){let p=[],h=a.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(h.v,s)&&p.push({kind:"version_mismatch",message:`SQLite version ${h.v} is below minimum ${s}`,found:h.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),n))o(a,e)||p.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(a,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let c=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let n=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${n}" 2>/dev/null || df "${n}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);c&&l.some(e=>c.toLowerCase().includes(e))&&p.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${c})`,path:u,found:c,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{a.pragma("journal_mode = wal"),a.pragma("foreign_keys = 1"),a.pragma("busy_timeout = 5000"),a.pragma("synchronous = 1"),a.pragma("cache_size = -64000");let e=a.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){a.pragma("journal_mode = DELETE");let e=a.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(a.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):p.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){p.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return p}e.s(["validateSQLiteEnvironment",()=>a])},74949,e=>{"use strict";var t=e.i(17920),r=e.i(22734),s=e.i(14747),n=e.i(62367),i=e.i(36420);class l{expr;constructor(e){this.expr=e}}function o(e){return new l(e)}let a=null;function u(){if(a)return a;let e=process.env.SQLITE_DB_PATH||s.default.join(process.cwd(),"agx-board.db");r.default.existsSync(e),a=new t.default(e);let n=(0,i.validateSQLiteEnvironment)(a,e);if(n.length>0){let e=n.map(e=>` - ${e.message}${e.fix?` (fix: ${e.fix})`:""}`);throw Error(`SQLite startup validation failed:
|
|
2
|
+
${e.join("\n")}`)}return function(e){let t=s.default.join(process.cwd(),"db","sqlite","001_agx_board_schema.sql");if(!r.default.existsSync(t))return console.warn(`[sqlite] DDL not found at ${t}, skipping schema init`);let n=r.default.readFileSync(t,"utf-8");e.exec(n)}(a),a}let p=new Set(["definition","depends_on","input","metadata","models","open_blockers","output","payload","run_index","stage_decisions","swarm_models"]);function h(e){return void 0===e?null:e instanceof Date?e.toISOString():e&&"object"==typeof e?JSON.stringify(e):e}function c(e,t){return null==t?null:t instanceof Date?t.toISOString():p.has(e)?JSON.stringify(t):h(t)}function d(e){let t=(e||"*").trim();if(!t||"*"===t)return{columns:["*"],includeProjectRepos:!1};let r=t.includes("project_repos(*)"),s=t.replace(/project_repos\(\*\)/g,"").split(",").map(e=>e.trim()).filter(Boolean);return 0===s.length?{columns:["*"],includeProjectRepos:r}:{columns:s,includeProjectRepos:r}}class m{table;operation="select";filters=[];orderSpecs=[];limitValue=null;selectColumns="*";returningColumns=null;singleMode="none";payload=null;upsertOptions=null;constructor(e){this.table=e}select(e="*"){return"select"===this.operation?this.selectColumns=e:this.returningColumns=e||"*",this}insert(e){return this.operation="insert",this.payload=e,this}update(e){return this.operation="update",this.payload=e,this}delete(){return this.operation="delete",this}upsert(e,t){return this.operation="upsert",this.payload=e,this.upsertOptions=t||{},this}eq(e,t){return this.filters.push({op:"eq",column:e,value:t}),this}neq(e,t){return this.filters.push({op:"neq",column:e,value:t}),this}gt(e,t){return this.filters.push({op:"gt",column:e,value:t}),this}gte(e,t){return this.filters.push({op:"gte",column:e,value:t}),this}lt(e,t){return this.filters.push({op:"lt",column:e,value:t}),this}lte(e,t){return this.filters.push({op:"lte",column:e,value:t}),this}is(e,t){return this.filters.push({op:"is",column:e,value:t}),this}in(e,t){return this.filters.push({op:"in",column:e,value:t||[]}),this}contains(e,t){return this.filters.push({op:"contains",column:e,value:t}),this}or(e){return this.filters.push({op:"or",expression:e}),this}order(e,t){return this.orderSpecs.push({column:e,...t||{}}),this}limit(e){return this.limitValue=e,this}single(){return this.singleMode="single",this.execute()}maybeSingle(){return this.singleMode="maybeSingle",this.execute()}then(e,t){return this.execute().then(e,t)}buildWhere(e,t){for(let r of this.filters){if("or"===r.op){let s=r.expression.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{var r;let[s,n,...i]=e.split("."),l="true"===(r=i.join("."))||"false"!==r&&("null"===r?null:r);return"eq"===n?(t.push(h(l)),`${s} = ?`):"neq"===n?(t.push(h(l)),`${s} <> ?`):"is"===n?null===l?`${s} IS NULL`:(t.push(h(l)),`${s} IS ?`):"ilike"===n||"like"===n?(t.push(h(l)),`${s} LIKE ?`):"1=1"});s.length>0&&e.push(`(${s.join(" OR ")})`);continue}if("eq"===r.op)t.push(h(r.value)),e.push(`${r.column} = ?`);else if("neq"===r.op)t.push(h(r.value)),e.push(`${r.column} <> ?`);else if("gt"===r.op)t.push(h(r.value)),e.push(`${r.column} > ?`);else if("gte"===r.op)t.push(h(r.value)),e.push(`${r.column} >= ?`);else if("lt"===r.op)t.push(h(r.value)),e.push(`${r.column} < ?`);else if("lte"===r.op)t.push(h(r.value)),e.push(`${r.column} <= ?`);else if("is"===r.op)null===r.value?e.push(`${r.column} IS NULL`):(t.push(h(r.value)),e.push(`${r.column} IS ?`));else if("contains"===r.op){let s=(r.value||[]).map(h);if(0===s.length)e.push("1=1");else{let n=s.map(()=>"?").join(", ");t.push(...s),e.push(`(SELECT COUNT(*) FROM json_each(${r.column}) WHERE json_each.value IN (${n})) = ${s.length}`)}}else if("in"===r.op)if(r.value&&0!==r.value.length){let s=(r.value||[]).map(h),n=s.map(()=>"?").join(", ");t.push(...s),e.push(`${r.column} IN (${n})`)}else e.push("1=0")}}executeSelect(){try{let e=u(),{columns:t,includeProjectRepos:r}=d(this.selectColumns),s=[],n=[];this.buildWhere(n,s);let i=`SELECT ${t.join(", ")} FROM ${this.table}`;if(n.length>0&&(i+=` WHERE ${n.join(" AND ")}`),this.orderSpecs.length>0){let e=this.orderSpecs.map(e=>{let t=!1===e.ascending?"DESC":"ASC";return!0===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 0 ELSE 1 END, ${e.column} ${t}`:!1===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 1 ELSE 0 END, ${e.column} ${t}`:`${e.column} ${t}`}).join(", ");i+=` ORDER BY ${e}`}"number"==typeof this.limitValue&&(s.push(this.limitValue),i+=" LIMIT ?");let l=e.prepare(i).all(...s);if(l=l.map(g),r&&"projects"===this.table&&l.length>0){let t=l.map(e=>e.id).filter(Boolean);if(t.length>0){let r=t.map(()=>"?").join(", "),s=e.prepare(`SELECT * FROM project_repos WHERE project_id IN (${r})`).all(...t),n=new Map;for(let e of s){let t=n.get(e.project_id)||[];t.push(e),n.set(e.project_id,t)}l=l.map(e=>({...e,project_repos:n.get(e.id)||[]}))}}if("single"===this.singleMode){if(0===l.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:l[0],error:null}}if("maybeSingle"===this.singleMode)return{data:l[0]||null,error:null};return{data:l,error:null}}catch(e){return{data:null,error:e}}}executeInsertOrUpsert(){try{let e,t=u(),r=Array.isArray(this.payload)?this.payload:[this.payload];if(!r.length)return{data:[],error:null};let s=Array.from(r.reduce((e,t)=>{for(let r of Object.keys(t||{}))e.add(r);return e},new Set)),n=[],i=r.map(e=>{let t=s.map(t=>(n.push(c(t,e[t])),"?"));return`(${t.join(", ")})`}),l=`INSERT INTO ${this.table} (${s.join(", ")}) VALUES ${i.join(", ")}`;if("upsert"===this.operation){let e=this.upsertOptions?.onConflict||"",t=String(e).split(",").map(e=>e.trim()).filter(Boolean);if(t.length>0)if(this.upsertOptions?.ignoreDuplicates)l+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`;else{let e=s.filter(e=>!t.includes(e)).map(e=>`${e} = EXCLUDED.${e}`);e.length>0?l+=` ON CONFLICT (${t.join(", ")}) DO UPDATE SET ${e.join(", ")}`:l+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`}}if(this.returningColumns){let{columns:e}=d(this.returningColumns);l+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(l).all(...n)).map(g):(t.prepare(l).run(...n),e=[]);let o=this.returningColumns?e:null;if("single"===this.singleMode||"maybeSingle"===this.singleMode)return{data:o&&o[0]||null,error:null};return{data:o,error:null}}catch(e){return{data:null,error:e}}}executeUpdateOrDelete(){try{let e,t=u(),r=[],s=[],n=[];this.buildWhere(n,s);let i="";if("update"===this.operation){let e=Object.keys(this.payload||{}).map(e=>{let t=this.payload[e];return t instanceof l?`${e} = ${t.expr}`:(r.push(c(e,t)),`${e} = ?`)});i=`UPDATE ${this.table} SET ${e.join(", ")}`}else i=`DELETE FROM ${this.table}`;n.length>0&&(i+=` WHERE ${n.join(" AND ")}`);let o=[...r,...s];if(this.returningColumns){let{columns:e}=d(this.returningColumns);i+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(i).all(...o)).map(g):(t.prepare(i).run(...o),e=[]);let a=this.returningColumns?e:null;if("single"===this.singleMode){if(!a||0===a.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:a[0],error:null}}if("maybeSingle"===this.singleMode)return{data:a?.[0]||null,error:null};return{data:a,error:null}}catch(e){return{data:null,error:e}}}async execute(){return"select"===this.operation?this.executeSelect():"insert"===this.operation||"upsert"===this.operation?this.executeInsertOrUpsert():this.executeUpdateOrDelete()}}let f=new Set([...p,"depends_on","open_blockers","swarm_models","run_index","stage_decisions","definition","metadata","models","config","policy","done_criteria","outputs","task_snapshot","data_mapping"]);function g(e){if(!e||"object"!=typeof e)return e;let t={...e};for(let e of Object.keys(t)){if(f.has(e)&&"string"==typeof t[e])try{t[e]=JSON.parse(t[e])}catch{}("swarm"===e||"is_default"===e||"is_public"===e||"had_graph_before"===e)&&(0===t[e]?t[e]=!1:1===t[e]&&(t[e]=!0))}return t}function _(){return{from:e=>new m(e),auth:{getUser:async()=>({data:{user:{id:n.LOCAL_USER.id,email:n.LOCAL_USER.email,user_metadata:{name:n.LOCAL_USER.name,full_name:n.LOCAL_USER.name}}},error:null}),exchangeCodeForSession:async()=>({error:null}),refreshSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600},user:{id:n.LOCAL_USER.id,email:n.LOCAL_USER.email}},error:null})},async rpc(e,t){if("check_rate_limit"!==e)return{data:null,error:{message:`Unsupported rpc: ${e}`}};let r=u(),s=t.p_user_id,n=t.p_endpoint,i=Number(t.p_limit||60),l=Number(t.p_window_seconds||60),o=new Date(Math.floor(new Date().getTime()/(1e3*l))*l*1e3);try{let e=`
|
|
3
3
|
INSERT INTO rate_limits (user_id, endpoint, window_start, request_count)
|
|
4
4
|
VALUES (?, ?, ?, 1)
|
|
5
5
|
ON CONFLICT (user_id, endpoint, window_start)
|
|
6
6
|
DO UPDATE SET request_count = rate_limits.request_count + 1
|
|
7
7
|
RETURNING request_count
|
|
8
|
-
`,t=r.prepare(e).get(s,
|
|
8
|
+
`,t=r.prepare(e).get(s,n,o.toISOString());return{data:Number(t?.request_count||0)<=i,error:null}}catch(e){return{data:!1,error:e}}},channel:()=>({on(){return this},subscribe(e){return e&&e("SUBSCRIBED"),this}}),removeChannel(){}}}e.s(["SqlExpression",()=>l,"createAdminDbClientSQLite",()=>_,"getSQLiteDb",()=>u,"sqlExpr",()=>o])}];
|
|
9
9
|
|
|
10
10
|
//# sourceMappingURL=Projects_Agents_agx-cloud_lib_8c82981b._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",()=>require("better-sqlite3-e930ad348bee7320"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24246,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",a=["json1"],i=["fts5"],n=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function l(l,u){let d=[],c=l.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(c.v,s)&&d.push({kind:"version_mismatch",message:`SQLite version ${c.v} is below minimum ${s}`,found:c.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),a))o(l,e)||d.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(l,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let p=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let a=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${a}" 2>/dev/null || df "${a}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);p&&n.some(e=>p.toLowerCase().includes(e))&&d.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${p})`,path:u,found:p,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{l.pragma("journal_mode = wal"),l.pragma("foreign_keys = 1"),l.pragma("busy_timeout = 5000"),l.pragma("synchronous = 1"),l.pragma("cache_size = -64000");let e=l.pragma("journal_mode",{simple:!0})
|
|
1
|
+
module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",()=>require("better-sqlite3-e930ad348bee7320"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24246,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",a=["json1"],i=["fts5"],n=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function l(l,u){let d=[],c=l.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(c.v,s)&&d.push({kind:"version_mismatch",message:`SQLite version ${c.v} is below minimum ${s}`,found:c.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),a))o(l,e)||d.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(l,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let p=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let a=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${a}" 2>/dev/null || df "${a}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);p&&n.some(e=>p.toLowerCase().includes(e))&&d.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${p})`,path:u,found:p,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{l.pragma("journal_mode = wal"),l.pragma("foreign_keys = 1"),l.pragma("busy_timeout = 5000"),l.pragma("synchronous = 1"),l.pragma("cache_size = -64000");let e=l.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){l.pragma("journal_mode = DELETE");let e=l.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(l.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):d.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){d.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return d}e.s(["validateSQLiteEnvironment",()=>l])},10165,e=>{"use strict";var t=e.i(17920),r=e.i(66680);let s={randomUUID:r.randomUUID},a=new Uint8Array(256),i=a.length,n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));let o=function(e,t,o){if(s.randomUUID&&!t&&!e)return s.randomUUID();var l=e,u=o;let d=(l=l||{}).random??l.rng?.()??(i>a.length-16&&((0,r.randomFillSync)(a),i=0),a.slice(i,i+=16));if(d.length<16)throw Error("Random bytes length must be >= 16");if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,t){if((u=u||0)<0||u+16>t.length)throw RangeError(`UUID byte range ${u}:${u+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[u+e]=d[e];return t}return function(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}(d)};var l=e.i(14747),u=e.i(22734),d=e.i(24246);process.env.AGX_MAX_WORKERS;class c{timestamps=[];lastWarning=0;WARNING_COOLDOWN_MS=6e4;record(){this.timestamps.push(Date.now())}check(){let e=Date.now(),t=e-1e4;this.timestamps=this.timestamps.filter(e=>e>=t);let r=this.timestamps.length/10,s=r>=40;return s&&e-this.lastWarning>this.WARNING_COOLDOWN_MS&&(this.lastWarning=e,console.warn(`[limits] Write QPS at ${r.toFixed(1)} — approaching ceiling of 50. See docs/LIMITS.md for mitigation steps.`)),{qps:r,warning:s}}}class p{db;workers=new Map;pollingInterval=null;writeRateInterval=null;writeMonitor=new c;workerId;constructor(e){this.workerId=o();const r=e||process.env.SQLITE_QUEUE_PATH||l.default.join(process.cwd(),"agx-queue.db"),s=l.default.dirname(r);u.default.existsSync(s)||u.default.mkdirSync(s,{recursive:!0}),this.db=new t.default(r);const a=(0,d.validateSQLiteEnvironment)(this.db,r);if(a.length>0){const e=a.map(e=>e.message).join("; ");console.error(`[SQLiteQueueAdapter] Startup validation failed: ${e}`)}}async start(){this.initSchema(),this.startPolling()}async stop(){this.stopPolling(),this.db.close()}initSchema(){this.db.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS agx_jobs (
|
|
3
3
|
id TEXT PRIMARY KEY,
|
|
4
4
|
queue TEXT NOT NULL,
|
|
@@ -47,6 +47,6 @@ module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",
|
|
|
47
47
|
UPDATE agx_jobs
|
|
48
48
|
SET status = 'failed', failed_at = ?, error = ?
|
|
49
49
|
WHERE id = ?
|
|
50
|
-
`);this.db.transaction(()=>{for(let n of e){let e=s.get(n);if(e&&e.retry_count<e.retry_limit){let s=(e.retry_count+1)*2e3;a.run(r+s,t,n)}else i.run(r,t,n)}})()}}let f=null;async function h(){return f||(f=new p,await f.start()),f}async function
|
|
50
|
+
`);this.db.transaction(()=>{for(let n of e){let e=s.get(n);if(e&&e.retry_count<e.retry_limit){let s=(e.retry_count+1)*2e3;a.run(r+s,t,n)}else i.run(r,t,n)}})()}}let f=null;async function h(){return f||(f=new p,await f.start()),f}async function m(){f&&(await f.stop(),f=null)}e.s(["QUEUE_NAMES",0,{TASK_PROCESS:"agx.task.process",TASK_CLEANUP:"agx.task.cleanup"},"getQueue",()=>h,"stopQueue",()=>m],10165)}];
|
|
51
51
|
|
|
52
52
|
//# sourceMappingURL=%5Broot-of-the-server%5D__45d4a92e._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",()=>require("better-sqlite3-e930ad348bee7320"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24246,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",a=["json1"],i=["fts5"],n=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function l(l,u){let d=[],c=l.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(c.v,s)&&d.push({kind:"version_mismatch",message:`SQLite version ${c.v} is below minimum ${s}`,found:c.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),a))o(l,e)||d.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(l,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let p=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let a=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${a}" 2>/dev/null || df "${a}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);p&&n.some(e=>p.toLowerCase().includes(e))&&d.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${p})`,path:u,found:p,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{l.pragma("journal_mode = wal"),l.pragma("foreign_keys = 1"),l.pragma("busy_timeout = 5000"),l.pragma("synchronous = 1"),l.pragma("cache_size = -64000");let e=l.pragma("journal_mode",{simple:!0})
|
|
1
|
+
module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",()=>require("better-sqlite3-e930ad348bee7320"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24246,e=>{"use strict";e.i(22734);var t=e.i(46786),r=e.i(14747);let s="3.35.0",a=["json1"],i=["fts5"],n=["nfs","smb","cifs","efs","fuse.sshfs"];function o(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function l(l,u){let d=[],c=l.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(c.v,s)&&d.push({kind:"version_mismatch",message:`SQLite version ${c.v} is below minimum ${s}`,found:c.v,required:`>= ${s}`,fix:"darwin"===t.default.platform()?"brew install sqlite3 && npm rebuild better-sqlite3":"TURBOPACK unreachable"}),a))o(l,e)||d.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)o(l,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let p=function(s){"linux"!==t.default.platform()&&t.default.platform();try{let a=r.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===t.default.platform()){let e=i(`df -T "${a}" 2>/dev/null || df "${a}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(u);p&&n.some(e=>p.toLowerCase().includes(e))&&d.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${p})`,path:u,found:p,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{l.pragma("journal_mode = wal"),l.pragma("foreign_keys = 1"),l.pragma("busy_timeout = 5000"),l.pragma("synchronous = 1"),l.pragma("cache_size = -64000");let e=l.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){l.pragma("journal_mode = DELETE");let e=l.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(l.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):d.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){d.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return d}e.s(["validateSQLiteEnvironment",()=>l])},10165,e=>{"use strict";var t=e.i(17920),r=e.i(66680);let s={randomUUID:r.randomUUID},a=new Uint8Array(256),i=a.length,n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));let o=function(e,t,o){if(s.randomUUID&&!t&&!e)return s.randomUUID();var l=e,u=o;let d=(l=l||{}).random??l.rng?.()??(i>a.length-16&&((0,r.randomFillSync)(a),i=0),a.slice(i,i+=16));if(d.length<16)throw Error("Random bytes length must be >= 16");if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,t){if((u=u||0)<0||u+16>t.length)throw RangeError(`UUID byte range ${u}:${u+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[u+e]=d[e];return t}return function(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}(d)};var l=e.i(14747),u=e.i(22734),d=e.i(24246);process.env.AGX_MAX_WORKERS;class c{timestamps=[];lastWarning=0;WARNING_COOLDOWN_MS=6e4;record(){this.timestamps.push(Date.now())}check(){let e=Date.now(),t=e-1e4;this.timestamps=this.timestamps.filter(e=>e>=t);let r=this.timestamps.length/10,s=r>=40;return s&&e-this.lastWarning>this.WARNING_COOLDOWN_MS&&(this.lastWarning=e,console.warn(`[limits] Write QPS at ${r.toFixed(1)} — approaching ceiling of 50. See docs/LIMITS.md for mitigation steps.`)),{qps:r,warning:s}}}class p{db;workers=new Map;pollingInterval=null;writeRateInterval=null;writeMonitor=new c;workerId;constructor(e){this.workerId=o();const r=e||process.env.SQLITE_QUEUE_PATH||l.default.join(process.cwd(),"agx-queue.db"),s=l.default.dirname(r);u.default.existsSync(s)||u.default.mkdirSync(s,{recursive:!0}),this.db=new t.default(r);const a=(0,d.validateSQLiteEnvironment)(this.db,r);if(a.length>0){const e=a.map(e=>e.message).join("; ");console.error(`[SQLiteQueueAdapter] Startup validation failed: ${e}`)}}async start(){this.initSchema(),this.startPolling()}async stop(){this.stopPolling(),this.db.close()}initSchema(){this.db.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS agx_jobs (
|
|
3
3
|
id TEXT PRIMARY KEY,
|
|
4
4
|
queue TEXT NOT NULL,
|
|
@@ -47,6 +47,6 @@ module.exports=[17920,(e,t,r)=>{t.exports=e.x("better-sqlite3-e930ad348bee7320",
|
|
|
47
47
|
UPDATE agx_jobs
|
|
48
48
|
SET status = 'failed', failed_at = ?, error = ?
|
|
49
49
|
WHERE id = ?
|
|
50
|
-
`);this.db.transaction(()=>{for(let n of e){let e=s.get(n);if(e&&e.retry_count<e.retry_limit){let s=(e.retry_count+1)*2e3;a.run(r+s,t,n)}else i.run(r,t,n)}})()}}let f=null;async function h(){return f||(f=new p,await f.start()),f}async function
|
|
50
|
+
`);this.db.transaction(()=>{for(let n of e){let e=s.get(n);if(e&&e.retry_count<e.retry_limit){let s=(e.retry_count+1)*2e3;a.run(r+s,t,n)}else i.run(r,t,n)}})()}}let f=null;async function h(){return f||(f=new p,await f.start()),f}async function m(){f&&(await f.stop(),f=null)}e.s(["QUEUE_NAMES",0,{TASK_PROCESS:"agx.task.process",TASK_CLEANUP:"agx.task.cleanup"},"getQueue",()=>h,"stopQueue",()=>m],10165)}];
|
|
51
51
|
|
|
52
52
|
//# sourceMappingURL=%5Broot-of-the-server%5D__5d4e1eab._.js.map
|
package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/middleware-manifest.json
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"wasm": [],
|
|
21
21
|
"assets": [],
|
|
22
22
|
"env": {
|
|
23
|
-
"__NEXT_BUILD_ID": "
|
|
24
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
25
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
26
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
27
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
23
|
+
"__NEXT_BUILD_ID": "l7UCe_8faNvEh-Be9eis7",
|
|
24
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "OEEr+ONN4Jxh+J+dCTmZJFxhN9pFzGwNEzHp3g8dqO0=",
|
|
25
|
+
"__NEXT_PREVIEW_MODE_ID": "f14e3e301b0fcc55d48fcb9e2547e396",
|
|
26
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "d4b2b2803794cddd1f3f48a1e6d737efc8245be8e9de19bc916a5a20e1bd04cd",
|
|
27
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "9f3809a487218b64b82dacb9514b8a6a6b91e359f9b3bb8bf8f05ad21a2ce4a5"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--l7UCe_8faNvEh_Be9eis7--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/2473c16c0c2f6b5f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/04612fc0fdf7b4ef.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/35d7a50f82ee022b.js"/><script src="/_next/static/chunks/0de28ce711b17cb2.js" async=""></script><script src="/_next/static/chunks/4b60076b71f35de1.js" async=""></script><script src="/_next/static/chunks/31ae3b31083648d6.js" async=""></script><script src="/_next/static/chunks/1b5be5e5fcbdc0e4.js" async=""></script><script src="/_next/static/chunks/turbopack-00b77899bb57f964.js" async=""></script><script src="/_next/static/chunks/c5049b3131468c12.js" async=""></script><script src="/_next/static/chunks/b24b4ec48b2cc8e8.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-DVQQG95LNL" as="script"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>AGX</title><meta name="description" content="Agent task orchestration and group chat"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased h-screen overflow-hidden bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]"><div hidden=""><!--$--><!--/$--></div><div class="min-h-screen flex items-center justify-center bg-[var(--background)]"><span class="spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"></span></div><script src="/_next/static/chunks/35d7a50f82ee022b.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[56179,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n3:I[41222,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n4:I[32494,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n5:I[98919,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"GoogleAnalytics\"]\n6:I[53696,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"PostHogAnalytics\"]\n7:I[92276,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:I[92276,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"ViewportBoundary\"]\nc:I[92276,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"MetadataBoundary\"]\ne:I[93768,[\"/_next/static/chunks/c5049b3131468c12.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"style\"]\n:HL[\"/_next/static/chunks/04612fc0fdf7b4ef.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"l7UCe_8faNvEh-Be9eis7\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/04612fc0fdf7b4ef.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/c5049b3131468c12.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/b24b4ec48b2cc8e8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased h-screen overflow-hidden bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]\",\"children\":[[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:0:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"9:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"AGX\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Agent task orchestration and group chat\"}]]\n"])</script></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/35d7a50f82ee022b.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[41222,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n3:I[32494,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n4:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"ViewportBoundary\"]\n9:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"MetadataBoundary\"]\nb:I[93768,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--l7UCe_8faNvEh_Be9eis7--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/35d7a50f82ee022b.js"/><script src="/_next/static/chunks/0de28ce711b17cb2.js" async=""></script><script src="/_next/static/chunks/4b60076b71f35de1.js" async=""></script><script src="/_next/static/chunks/31ae3b31083648d6.js" async=""></script><script src="/_next/static/chunks/1b5be5e5fcbdc0e4.js" async=""></script><script src="/_next/static/chunks/turbopack-00b77899bb57f964.js" async=""></script><script src="/_next/static/chunks/db9dc0d8607aa034.js" async=""></script><script src="/_next/static/chunks/b24b4ec48b2cc8e8.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/35d7a50f82ee022b.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[41222,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n3:I[32494,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n4:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"ViewportBoundary\"]\n9:I[92276,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"MetadataBoundary\"]\nb:I[93768,[\"/_next/static/chunks/db9dc0d8607aa034.js\",\"/_next/static/chunks/b24b4ec48b2cc8e8.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"l7UCe_8faNvEh-Be9eis7\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/db9dc0d8607aa034.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/b24b4ec48b2cc8e8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"OEEr+ONN4Jxh+J+dCTmZJFxhN9pFzGwNEzHp3g8dqO0=\"\n}"
|
|
@@ -192,16 +192,27 @@ export function validateSQLiteEnvironment(db: Database.Database, dbPath: string)
|
|
|
192
192
|
db.pragma(`synchronous = ${REQUIRED_PRAGMAS.synchronous}`);
|
|
193
193
|
db.pragma(`cache_size = ${REQUIRED_PRAGMAS.cache_size}`);
|
|
194
194
|
|
|
195
|
-
// Verify journal_mode stuck
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
195
|
+
// Verify journal_mode stuck — WAL preferred, DELETE acceptable (network FS),
|
|
196
|
+
// memory/off are not safe for production.
|
|
197
|
+
const jm = (db.pragma("journal_mode", { simple: true }) as string).toLowerCase();
|
|
198
|
+
const ACCEPTABLE_JOURNAL_MODES = new Set(["wal", "delete"]);
|
|
199
|
+
if (!ACCEPTABLE_JOURNAL_MODES.has(jm)) {
|
|
200
|
+
// WAL failed — try DELETE as fallback (works on network filesystems)
|
|
201
|
+
db.pragma("journal_mode = DELETE");
|
|
202
|
+
const jm2 = (db.pragma("journal_mode", { simple: true }) as string).toLowerCase();
|
|
203
|
+
if (!ACCEPTABLE_JOURNAL_MODES.has(jm2)) {
|
|
204
|
+
errors.push({
|
|
205
|
+
kind: "pragma_error",
|
|
206
|
+
message: `Failed to set journal_mode (got '${jm2}', tried WAL then DELETE)`,
|
|
207
|
+
found: jm2,
|
|
208
|
+
required: "wal or delete",
|
|
209
|
+
fix: "Ensure the database file is on a local filesystem and no other process holds an exclusive lock.",
|
|
210
|
+
});
|
|
211
|
+
} else {
|
|
212
|
+
// DELETE mode needs synchronous=FULL for durability (WAL is safe with NORMAL)
|
|
213
|
+
db.pragma("synchronous = FULL");
|
|
214
|
+
console.warn(`[startup] WAL unavailable, using journal_mode=${jm2} with synchronous=FULL`);
|
|
215
|
+
}
|
|
205
216
|
}
|
|
206
217
|
} catch (err: any) {
|
|
207
218
|
errors.push({
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "node server.js",
|
|
7
|
+
"nuke": "lsof -ti :41741 | xargs kill -9 2>/dev/null; pkill -9 -f 'agx-cloud' 2>/dev/null; echo 'All processes killed'",
|
|
7
8
|
"build": "echo 'standalone build - nothing to build'",
|
|
8
9
|
"start": "node server.js",
|
|
9
10
|
"lint": "next lint",
|
|
@@ -26,9 +26,17 @@ export interface InitOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
export function applyPragmas(db: Database.Database, opts?: InitOptions): void {
|
|
28
28
|
db.pragma("journal_mode = WAL");
|
|
29
|
+
const jm = (db.pragma("journal_mode", { simple: true }) as string).toLowerCase();
|
|
30
|
+
if (jm !== "wal") {
|
|
31
|
+
// WAL unavailable (network FS, locked) — fall back to DELETE
|
|
32
|
+
db.pragma("journal_mode = DELETE");
|
|
33
|
+
db.pragma("synchronous = FULL");
|
|
34
|
+
console.warn(`[db/init] WAL unavailable (got '${jm}'), using DELETE with synchronous=FULL`);
|
|
35
|
+
} else {
|
|
36
|
+
db.pragma(`synchronous = ${opts?.synchronous ?? "NORMAL"}`);
|
|
37
|
+
}
|
|
29
38
|
db.pragma("foreign_keys = ON");
|
|
30
39
|
db.pragma(`busy_timeout = ${opts?.busyTimeout ?? 5000}`);
|
|
31
|
-
db.pragma(`synchronous = ${opts?.synchronous ?? "NORMAL"}`);
|
|
32
40
|
db.pragma(`cache_size = ${opts?.cacheSize ?? -64000}`);
|
|
33
41
|
}
|
|
34
42
|
|
|
@@ -912,15 +912,23 @@ function validateSQLiteEnvironment(db2, dbPath) {
|
|
|
912
912
|
db2.pragma(`busy_timeout = ${REQUIRED_PRAGMAS.busy_timeout}`);
|
|
913
913
|
db2.pragma(`synchronous = ${REQUIRED_PRAGMAS.synchronous}`);
|
|
914
914
|
db2.pragma(`cache_size = ${REQUIRED_PRAGMAS.cache_size}`);
|
|
915
|
-
const jm = db2.pragma("journal_mode", { simple: true });
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
915
|
+
const jm = db2.pragma("journal_mode", { simple: true }).toLowerCase();
|
|
916
|
+
const ACCEPTABLE_JOURNAL_MODES = /* @__PURE__ */ new Set(["wal", "delete"]);
|
|
917
|
+
if (!ACCEPTABLE_JOURNAL_MODES.has(jm)) {
|
|
918
|
+
db2.pragma("journal_mode = DELETE");
|
|
919
|
+
const jm2 = db2.pragma("journal_mode", { simple: true }).toLowerCase();
|
|
920
|
+
if (!ACCEPTABLE_JOURNAL_MODES.has(jm2)) {
|
|
921
|
+
errors.push({
|
|
922
|
+
kind: "pragma_error",
|
|
923
|
+
message: `Failed to set journal_mode (got '${jm2}', tried WAL then DELETE)`,
|
|
924
|
+
found: jm2,
|
|
925
|
+
required: "wal or delete",
|
|
926
|
+
fix: "Ensure the database file is on a local filesystem and no other process holds an exclusive lock."
|
|
927
|
+
});
|
|
928
|
+
} else {
|
|
929
|
+
db2.pragma("synchronous = FULL");
|
|
930
|
+
console.warn(`[startup] WAL unavailable, using journal_mode=${jm2} with synchronous=FULL`);
|
|
931
|
+
}
|
|
924
932
|
}
|
|
925
933
|
} catch (err) {
|
|
926
934
|
errors.push({
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|