archondev 2.19.52 → 2.19.54
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/dist/{chunk-PQINPCF7.js → chunk-L3FRKAIO.js} +1 -1
- package/dist/{chunk-FKKVJFSW.js → chunk-R4A2C42M.js} +73 -0
- package/dist/{chunk-53OOWYJM.js → chunk-TG3ELXS3.js} +3 -3
- package/dist/{chunk-3A46HCAI.js → chunk-TZNB4BPI.js} +1 -1
- package/dist/{chunk-UTI3SKKA.js → chunk-XHIVKDU5.js} +1 -1
- package/dist/{execute-MQFDA6EX.js → execute-HQ5XANCR.js} +2 -2
- package/dist/index.js +78 -53
- package/dist/{list-T5JXBHBF.js → list-QKB55FIY.js} +2 -2
- package/dist/{parallel-NGAMZ22X.js → parallel-WCUTC4FM.js} +2 -2
- package/dist/{plan-Y5S5VXMT.js → plan-V57SS7O6.js} +1 -1
- package/dist/{show-IL6WBDTI.js → show-QDTDTY4P.js} +2 -2
- package/package.json +1 -1
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
ArchitectureParser
|
|
17
17
|
} from "./chunk-5EVHUDQX.js";
|
|
18
|
+
import {
|
|
19
|
+
getModelCostWithFallback
|
|
20
|
+
} from "./chunk-7C6JELBL.js";
|
|
18
21
|
import {
|
|
19
22
|
KeyManager
|
|
20
23
|
} from "./chunk-RDG5BUED.js";
|
|
@@ -445,6 +448,68 @@ var UsageRecorder = class {
|
|
|
445
448
|
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
446
449
|
return uuidRegex.test(str);
|
|
447
450
|
}
|
|
451
|
+
calculateBaseCost(model, inputTokens, outputTokens) {
|
|
452
|
+
const pricing = getModelCostWithFallback(model, "conservative_max");
|
|
453
|
+
return inputTokens / 1e3 * pricing.costPer1kInput + outputTokens / 1e3 * pricing.costPer1kOutput;
|
|
454
|
+
}
|
|
455
|
+
async tryRecordUsageWithoutRpc(params, idempotencyKey) {
|
|
456
|
+
try {
|
|
457
|
+
const { data: rawProfile, error: profileError } = await this.supabase.from("user_profiles").select("id, tier, credit_balance_cents").eq("id", params.userId).single();
|
|
458
|
+
const profile = rawProfile;
|
|
459
|
+
if (profileError || !profile?.id || !profile.tier) {
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
if (profile.tier === "CREDITS") {
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
const baseCost = this.calculateBaseCost(params.model, params.inputTokens, params.outputTokens);
|
|
466
|
+
const totalCents = profile.tier === "FREE" ? Math.ceil(baseCost * 100) : 0;
|
|
467
|
+
const payload = {
|
|
468
|
+
user_id: params.userId,
|
|
469
|
+
atom_id: params.atomId ?? null,
|
|
470
|
+
execution_id: params.executionId ?? null,
|
|
471
|
+
model: params.model,
|
|
472
|
+
provider: params.provider,
|
|
473
|
+
operation: params.operation,
|
|
474
|
+
input_tokens: params.inputTokens,
|
|
475
|
+
output_tokens: params.outputTokens,
|
|
476
|
+
base_cost: baseCost,
|
|
477
|
+
marked_up_cost: baseCost,
|
|
478
|
+
fee_cents: 0,
|
|
479
|
+
total_cents: totalCents,
|
|
480
|
+
idempotency_key: idempotencyKey
|
|
481
|
+
};
|
|
482
|
+
const { data: rawInsert, error: insertError } = await this.supabase.from("token_usage").insert(payload).select("id").single();
|
|
483
|
+
if (insertError) {
|
|
484
|
+
const pgCode = insertError.code;
|
|
485
|
+
if (pgCode === "23505") {
|
|
486
|
+
const { data: existing } = await this.supabase.from("token_usage").select("id").eq("user_id", params.userId).eq("idempotency_key", idempotencyKey).single();
|
|
487
|
+
const existingId = existing?.id;
|
|
488
|
+
return {
|
|
489
|
+
success: true,
|
|
490
|
+
isDuplicate: true,
|
|
491
|
+
usageId: existingId,
|
|
492
|
+
costCents: totalCents,
|
|
493
|
+
feeCents: 0,
|
|
494
|
+
remainingBalance: profile.credit_balance_cents ?? 0,
|
|
495
|
+
tier: profile.tier
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
return null;
|
|
499
|
+
}
|
|
500
|
+
const usageId = rawInsert?.id;
|
|
501
|
+
return {
|
|
502
|
+
success: true,
|
|
503
|
+
usageId,
|
|
504
|
+
costCents: totalCents,
|
|
505
|
+
feeCents: 0,
|
|
506
|
+
remainingBalance: profile.credit_balance_cents ?? 0,
|
|
507
|
+
tier: profile.tier
|
|
508
|
+
};
|
|
509
|
+
} catch {
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
448
513
|
/**
|
|
449
514
|
* Generate idempotency key for a request
|
|
450
515
|
* Format: {atomId}:{executionId}:{timestamp}:{random}
|
|
@@ -591,6 +656,10 @@ var UsageRecorder = class {
|
|
|
591
656
|
});
|
|
592
657
|
if (error) {
|
|
593
658
|
console.error("[Billing] RPC error:", error.message);
|
|
659
|
+
const fallback = await this.tryRecordUsageWithoutRpc(params, idempotencyKey);
|
|
660
|
+
if (fallback) {
|
|
661
|
+
return fallback;
|
|
662
|
+
}
|
|
594
663
|
return {
|
|
595
664
|
success: false,
|
|
596
665
|
error: "Billing system temporarily unavailable",
|
|
@@ -630,6 +699,10 @@ var UsageRecorder = class {
|
|
|
630
699
|
};
|
|
631
700
|
} catch (err) {
|
|
632
701
|
console.error("[Billing] Exception:", err);
|
|
702
|
+
const fallback = await this.tryRecordUsageWithoutRpc(params, idempotencyKey);
|
|
703
|
+
if (fallback) {
|
|
704
|
+
return fallback;
|
|
705
|
+
}
|
|
633
706
|
return {
|
|
634
707
|
success: false,
|
|
635
708
|
error: "Billing system error. Please try again.",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
UsageRecorder,
|
|
8
8
|
handleInsufficientCreditsRecovery,
|
|
9
9
|
loadAtom
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R4A2C42M.js";
|
|
11
11
|
import {
|
|
12
12
|
transitionAtom
|
|
13
13
|
} from "./chunk-WGLVDEZC.js";
|
|
@@ -4835,7 +4835,7 @@ async function attemptPathScopeAutoRecovery(atom, cwd, parseSchema, options) {
|
|
|
4835
4835
|
if (allowedPaths.length === 0) {
|
|
4836
4836
|
return false;
|
|
4837
4837
|
}
|
|
4838
|
-
const { listLocalAtoms, plan } = await import("./plan-
|
|
4838
|
+
const { listLocalAtoms, plan } = await import("./plan-V57SS7O6.js");
|
|
4839
4839
|
const before = await listLocalAtoms();
|
|
4840
4840
|
const recoveryStartedAt = Date.now();
|
|
4841
4841
|
const recoverySource = atom.description ?? atom.title;
|
|
@@ -4903,7 +4903,7 @@ async function execute(atomId, options) {
|
|
|
4903
4903
|
process.exit(1);
|
|
4904
4904
|
};
|
|
4905
4905
|
if (options.parallel && options.parallel.length > 0) {
|
|
4906
|
-
const { parallelExecute } = await import("./parallel-
|
|
4906
|
+
const { parallelExecute } = await import("./parallel-WCUTC4FM.js");
|
|
4907
4907
|
const allAtomIds = [atomId, ...options.parallel];
|
|
4908
4908
|
await parallelExecute(allAtomIds, { skipGates: options.skipGates === true });
|
|
4909
4909
|
return;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
execute
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TG3ELXS3.js";
|
|
4
4
|
import "./chunk-EBHHIUCB.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-R4A2C42M.js";
|
|
6
6
|
import "./chunk-WGLVDEZC.js";
|
|
7
7
|
import "./chunk-3MZOEZUH.js";
|
|
8
8
|
import "./chunk-F7R3QKHP.js";
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-6URKZ7NB.js";
|
|
14
14
|
import {
|
|
15
15
|
show
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TZNB4BPI.js";
|
|
17
17
|
import {
|
|
18
18
|
bugReport
|
|
19
19
|
} from "./chunk-AHK2ITJX.js";
|
|
@@ -50,13 +50,13 @@ import {
|
|
|
50
50
|
parallelRunWaves,
|
|
51
51
|
parallelSchedule,
|
|
52
52
|
parallelStatus
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-L3FRKAIO.js";
|
|
54
54
|
import {
|
|
55
55
|
DependencyParser,
|
|
56
56
|
EnvironmentConfigLoader,
|
|
57
57
|
EnvironmentValidator,
|
|
58
58
|
execute
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-TG3ELXS3.js";
|
|
60
60
|
import {
|
|
61
61
|
cloudCancel,
|
|
62
62
|
cloudLogs,
|
|
@@ -64,12 +64,12 @@ import {
|
|
|
64
64
|
} from "./chunk-EBHHIUCB.js";
|
|
65
65
|
import {
|
|
66
66
|
list
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-XHIVKDU5.js";
|
|
68
68
|
import {
|
|
69
69
|
listLocalAtoms,
|
|
70
70
|
loadAtom,
|
|
71
71
|
plan
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-R4A2C42M.js";
|
|
73
73
|
import "./chunk-WGLVDEZC.js";
|
|
74
74
|
import "./chunk-3MZOEZUH.js";
|
|
75
75
|
import {
|
|
@@ -3106,43 +3106,68 @@ async function fetchByokUsageStatsFromSupabase(accessToken, authId) {
|
|
|
3106
3106
|
const { SUPABASE_URL: SUPABASE_URL2, SUPABASE_ANON_KEY: SUPABASE_ANON_KEY2 } = await import("./constants-XDIWFFPN.js");
|
|
3107
3107
|
const { createAuthedSupabaseClient: createAuthedSupabaseClient2 } = await import("./client-PHW2C2HB.js");
|
|
3108
3108
|
const supabase = createAuthedSupabaseClient2(SUPABASE_URL2, SUPABASE_ANON_KEY2, accessToken);
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3111
|
-
if (profileError || !profile?.id) {
|
|
3109
|
+
const profileId = await resolveProfileIdForUsage(supabase, authId);
|
|
3110
|
+
if (!profileId) {
|
|
3112
3111
|
return null;
|
|
3113
3112
|
}
|
|
3114
3113
|
const now = /* @__PURE__ */ new Date();
|
|
3115
|
-
const
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
const byModelMap = /* @__PURE__ */ new Map();
|
|
3125
|
-
for (const row of usageRows ?? []) {
|
|
3126
|
-
totalInputTokens += row.input_tokens ?? 0;
|
|
3127
|
-
totalOutputTokens += row.output_tokens ?? 0;
|
|
3128
|
-
const baseCost = typeof row.base_cost === "number" ? row.base_cost : typeof row.total_cents === "number" ? row.total_cents / 100 : typeof row.marked_up_cost === "number" ? row.marked_up_cost : 0;
|
|
3129
|
-
totalBaseCost += baseCost;
|
|
3130
|
-
byModelMap.set(row.model, (byModelMap.get(row.model) ?? 0) + baseCost);
|
|
3114
|
+
const monthStart = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
3115
|
+
const monthStats = await fetchByokUsageWindow(supabase, profileId, monthStart, now);
|
|
3116
|
+
if (hasAnyByokUsage(monthStats)) {
|
|
3117
|
+
return {
|
|
3118
|
+
...monthStats,
|
|
3119
|
+
periodStart: monthStart.toISOString(),
|
|
3120
|
+
periodEnd: now.toISOString(),
|
|
3121
|
+
periodSource: "month"
|
|
3122
|
+
};
|
|
3131
3123
|
}
|
|
3132
|
-
const
|
|
3124
|
+
const trailingStart = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1e3);
|
|
3125
|
+
const trailingStats = await fetchByokUsageWindow(supabase, profileId, trailingStart, now);
|
|
3133
3126
|
return {
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
periodStart: periodStart.toISOString(),
|
|
3139
|
-
periodEnd: periodEnd.toISOString(),
|
|
3140
|
-
periodSource: profile.current_period_start ? "profile_period" : "month"
|
|
3127
|
+
...trailingStats,
|
|
3128
|
+
periodStart: trailingStart.toISOString(),
|
|
3129
|
+
periodEnd: now.toISOString(),
|
|
3130
|
+
periodSource: "profile_period"
|
|
3141
3131
|
};
|
|
3142
3132
|
} catch {
|
|
3143
3133
|
return null;
|
|
3144
3134
|
}
|
|
3145
3135
|
}
|
|
3136
|
+
async function resolveProfileIdForUsage(supabase, authId) {
|
|
3137
|
+
const { data: byAuthRaw } = await supabase.from("user_profiles").select("id").eq("auth_id", authId).maybeSingle();
|
|
3138
|
+
const byAuth = byAuthRaw;
|
|
3139
|
+
if (byAuth?.id) {
|
|
3140
|
+
return byAuth.id;
|
|
3141
|
+
}
|
|
3142
|
+
const { data: byProfileRaw } = await supabase.from("user_profiles").select("id").eq("id", authId).maybeSingle();
|
|
3143
|
+
const byProfile = byProfileRaw;
|
|
3144
|
+
return byProfile?.id ?? null;
|
|
3145
|
+
}
|
|
3146
|
+
async function fetchByokUsageWindow(supabase, profileId, start2, end) {
|
|
3147
|
+
const { data: rawUsageRows } = await supabase.from("token_usage").select("model, input_tokens, output_tokens, base_cost, total_cents, marked_up_cost").eq("user_id", profileId).gte("created_at", start2.toISOString()).lte("created_at", end.toISOString());
|
|
3148
|
+
const usageRows = rawUsageRows;
|
|
3149
|
+
let totalInputTokens = 0;
|
|
3150
|
+
let totalOutputTokens = 0;
|
|
3151
|
+
let totalBaseCost = 0;
|
|
3152
|
+
const byModelMap = /* @__PURE__ */ new Map();
|
|
3153
|
+
for (const row of usageRows ?? []) {
|
|
3154
|
+
totalInputTokens += row.input_tokens ?? 0;
|
|
3155
|
+
totalOutputTokens += row.output_tokens ?? 0;
|
|
3156
|
+
const baseCost = typeof row.base_cost === "number" ? row.base_cost : typeof row.total_cents === "number" ? row.total_cents / 100 : typeof row.marked_up_cost === "number" ? row.marked_up_cost : 0;
|
|
3157
|
+
totalBaseCost += baseCost;
|
|
3158
|
+
byModelMap.set(row.model, (byModelMap.get(row.model) ?? 0) + baseCost);
|
|
3159
|
+
}
|
|
3160
|
+
const byModel = Array.from(byModelMap.entries()).map(([model, cost]) => ({ model, cost })).sort((a, b) => b.cost - a.cost);
|
|
3161
|
+
return {
|
|
3162
|
+
totalInputTokens,
|
|
3163
|
+
totalOutputTokens,
|
|
3164
|
+
totalBaseCost,
|
|
3165
|
+
byModel
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
function hasAnyByokUsage(stats) {
|
|
3169
|
+
return stats.totalInputTokens > 0 || stats.totalOutputTokens > 0 || stats.totalBaseCost > 0 || stats.byModel.length > 0;
|
|
3170
|
+
}
|
|
3146
3171
|
async function fetchCreditsUsageStatsFromSupabase(accessToken, authId) {
|
|
3147
3172
|
try {
|
|
3148
3173
|
const { SUPABASE_URL: SUPABASE_URL2, SUPABASE_ANON_KEY: SUPABASE_ANON_KEY2 } = await import("./constants-XDIWFFPN.js");
|
|
@@ -3394,7 +3419,7 @@ async function runExploreFlow(cwd, followUpInput, options = {}) {
|
|
|
3394
3419
|
case "1": {
|
|
3395
3420
|
const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
|
|
3396
3421
|
if (description.trim()) {
|
|
3397
|
-
const { plan: plan2 } = await import("./plan-
|
|
3422
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
3398
3423
|
await plan2(description, { conversational: true });
|
|
3399
3424
|
}
|
|
3400
3425
|
await showMainMenu();
|
|
@@ -3639,7 +3664,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
|
|
|
3639
3664
|
const hintedTask = initialTaskHint?.trim() ?? "";
|
|
3640
3665
|
if (hintedTask) {
|
|
3641
3666
|
console.log(chalk6.dim("Using your request above as the first task.\n"));
|
|
3642
|
-
const { plan: plan2 } = await import("./plan-
|
|
3667
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
3643
3668
|
await plan2(hintedTask, { conversational: true });
|
|
3644
3669
|
return;
|
|
3645
3670
|
}
|
|
@@ -3664,7 +3689,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
|
|
|
3664
3689
|
description = continueAnswer.trim();
|
|
3665
3690
|
}
|
|
3666
3691
|
if (description.trim()) {
|
|
3667
|
-
const { plan: plan2 } = await import("./plan-
|
|
3692
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
3668
3693
|
await plan2(description, { conversational: true });
|
|
3669
3694
|
}
|
|
3670
3695
|
}
|
|
@@ -3893,7 +3918,7 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3893
3918
|
return true;
|
|
3894
3919
|
}
|
|
3895
3920
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
3896
|
-
const { plan: plan2 } = await import("./plan-
|
|
3921
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
3897
3922
|
await plan2(await withAllowedPathScope(cwd, input), { conversational: true });
|
|
3898
3923
|
if (shouldAutoExecuteAfterPlanning(input)) {
|
|
3899
3924
|
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
@@ -3940,7 +3965,7 @@ async function showProposalForApproval(input) {
|
|
|
3940
3965
|
}
|
|
3941
3966
|
}
|
|
3942
3967
|
async function showLatestPlannedAtom(cwd) {
|
|
3943
|
-
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
3968
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-V57SS7O6.js");
|
|
3944
3969
|
const atoms = await listLocalAtoms2();
|
|
3945
3970
|
if (atoms.length === 0) {
|
|
3946
3971
|
console.log(chalk6.yellow("No atoms found yet. Tell me what to plan."));
|
|
@@ -3958,7 +3983,7 @@ async function showLatestPlannedAtom(cwd) {
|
|
|
3958
3983
|
console.log(chalk6.dim(`
|
|
3959
3984
|
Showing latest planned atom (${latest.externalId})...
|
|
3960
3985
|
`));
|
|
3961
|
-
const { show: show2 } = await import("./show-
|
|
3986
|
+
const { show: show2 } = await import("./show-QDTDTY4P.js");
|
|
3962
3987
|
await show2(latest.externalId);
|
|
3963
3988
|
}
|
|
3964
3989
|
function isContinuationDirective(input) {
|
|
@@ -4091,7 +4116,7 @@ async function applyApprovedProposal(cwd) {
|
|
|
4091
4116
|
console.log(chalk6.dim('\nReply "continue" when you want execution to start.'));
|
|
4092
4117
|
}
|
|
4093
4118
|
async function createTaskFromRequest(cwd, request) {
|
|
4094
|
-
const { plan: plan2, listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
4119
|
+
const { plan: plan2, listLocalAtoms: listLocalAtoms2 } = await import("./plan-V57SS7O6.js");
|
|
4095
4120
|
const before = await listLocalAtoms2();
|
|
4096
4121
|
const beforeIds = new Set(before.map((atom) => atom.externalId));
|
|
4097
4122
|
await plan2(await withAllowedPathScope(cwd, request), { conversational: true });
|
|
@@ -4267,13 +4292,13 @@ function buildSampleCapsuleDraft(cwd, files, capsuleCount) {
|
|
|
4267
4292
|
].join("\n");
|
|
4268
4293
|
}
|
|
4269
4294
|
async function continueWithCurrentTask(cwd, options = {}) {
|
|
4270
|
-
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
4295
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-V57SS7O6.js");
|
|
4271
4296
|
const byMostRecent = (a, b) => {
|
|
4272
4297
|
const aTime = new Date(String(a.updatedAt ?? a.createdAt ?? "")).getTime() || 0;
|
|
4273
4298
|
const bTime = new Date(String(b.updatedAt ?? b.createdAt ?? "")).getTime() || 0;
|
|
4274
4299
|
return bTime - aTime;
|
|
4275
4300
|
};
|
|
4276
|
-
const { execute: execute2 } = await import("./execute-
|
|
4301
|
+
const { execute: execute2 } = await import("./execute-HQ5XANCR.js");
|
|
4277
4302
|
const runAllReady = options.runAllReady === true;
|
|
4278
4303
|
const scopeIds = options.onlyAtomIds ? new Set(options.onlyAtomIds) : null;
|
|
4279
4304
|
const attempted = /* @__PURE__ */ new Set();
|
|
@@ -4349,7 +4374,7 @@ Continuing with ${nextAtom.externalId}...
|
|
|
4349
4374
|
}
|
|
4350
4375
|
}
|
|
4351
4376
|
async function replanLatestBlockedAtom(cwd) {
|
|
4352
|
-
const { listLocalAtoms: listLocalAtoms2, plan: plan2 } = await import("./plan-
|
|
4377
|
+
const { listLocalAtoms: listLocalAtoms2, plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
4353
4378
|
const atoms = await listLocalAtoms2();
|
|
4354
4379
|
const blocked = atoms.filter((a) => a.status === "BLOCKED" && (a.errorMessage ?? "").toLowerCase().includes("outside the allowed paths")).sort((a, b) => {
|
|
4355
4380
|
const aTime = new Date(String(a.updatedAt ?? a.createdAt ?? "")).getTime() || 0;
|
|
@@ -4463,7 +4488,7 @@ async function handleFreeformJourneyInput(cwd, input) {
|
|
|
4463
4488
|
const state = detectProjectState(cwd);
|
|
4464
4489
|
if (state.hasArchitecture) {
|
|
4465
4490
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
4466
|
-
const { plan: plan3 } = await import("./plan-
|
|
4491
|
+
const { plan: plan3 } = await import("./plan-V57SS7O6.js");
|
|
4467
4492
|
await plan3(await withAllowedPathScope(cwd, freeform), { conversational: true });
|
|
4468
4493
|
return true;
|
|
4469
4494
|
}
|
|
@@ -4472,7 +4497,7 @@ async function handleFreeformJourneyInput(cwd, input) {
|
|
|
4472
4497
|
return true;
|
|
4473
4498
|
}
|
|
4474
4499
|
console.log(chalk6.dim("\n> Got it! Creating a task for this...\n"));
|
|
4475
|
-
const { plan: plan2 } = await import("./plan-
|
|
4500
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
4476
4501
|
await plan2(await withAllowedPathScope(cwd, freeform), { conversational: true });
|
|
4477
4502
|
return true;
|
|
4478
4503
|
}
|
|
@@ -4521,7 +4546,7 @@ function isFileLocationQuestion(input) {
|
|
|
4521
4546
|
return true;
|
|
4522
4547
|
}
|
|
4523
4548
|
async function answerLatestOutputLocation(cwd) {
|
|
4524
|
-
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
4549
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-V57SS7O6.js");
|
|
4525
4550
|
const atoms = await listLocalAtoms2();
|
|
4526
4551
|
const latestDone = atoms.filter((atom) => atom.status === "DONE").sort((a, b) => {
|
|
4527
4552
|
const aTime = new Date(String(a.updatedAt ?? a.createdAt ?? "")).getTime() || 0;
|
|
@@ -4570,7 +4595,7 @@ async function handlePostExploreAction(cwd, request, options = {}) {
|
|
|
4570
4595
|
} else {
|
|
4571
4596
|
console.log(chalk6.dim("> Got it! Creating a task for this...\n"));
|
|
4572
4597
|
}
|
|
4573
|
-
const { plan: plan2 } = await import("./plan-
|
|
4598
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
4574
4599
|
await plan2(await withAllowedPathScope(cwd, request), { conversational: true });
|
|
4575
4600
|
if (options.agentMode) {
|
|
4576
4601
|
if (shouldAutoExecuteAfterPlanning(sourceInput)) {
|
|
@@ -4594,18 +4619,18 @@ Constraints:
|
|
|
4594
4619
|
- If required files are outside this scope, propose the minimum architecture path update first.`;
|
|
4595
4620
|
}
|
|
4596
4621
|
async function planTask() {
|
|
4597
|
-
const { plan: plan2 } = await import("./plan-
|
|
4622
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
4598
4623
|
const description = await promptWithCommands("Describe what you want to build", { allowMultiline: true });
|
|
4599
4624
|
if (description.trim()) {
|
|
4600
4625
|
await plan2(description, { conversational: true });
|
|
4601
4626
|
}
|
|
4602
4627
|
}
|
|
4603
4628
|
async function listAtoms() {
|
|
4604
|
-
const { list: list2 } = await import("./list-
|
|
4629
|
+
const { list: list2 } = await import("./list-QKB55FIY.js");
|
|
4605
4630
|
await list2({});
|
|
4606
4631
|
}
|
|
4607
4632
|
async function executeNext() {
|
|
4608
|
-
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-
|
|
4633
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-V57SS7O6.js");
|
|
4609
4634
|
const { analyzeProject, getComplexityDescription, getModeDescription } = await import("./orchestration-HIF3KP25.js");
|
|
4610
4635
|
const { loadExecutionPreferences } = await import("./preferences-MTGN2VZK.js");
|
|
4611
4636
|
const cwd = process.cwd();
|
|
@@ -4676,11 +4701,11 @@ async function executeNext() {
|
|
|
4676
4701
|
}
|
|
4677
4702
|
}
|
|
4678
4703
|
if (selectedMode === "parallel-cloud") {
|
|
4679
|
-
const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-
|
|
4704
|
+
const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-WCUTC4FM.js");
|
|
4680
4705
|
await parallelExecuteCloud2(runIds);
|
|
4681
4706
|
return;
|
|
4682
4707
|
}
|
|
4683
|
-
const { parallelExecute } = await import("./parallel-
|
|
4708
|
+
const { parallelExecute } = await import("./parallel-WCUTC4FM.js");
|
|
4684
4709
|
await parallelExecute(runIds);
|
|
4685
4710
|
return;
|
|
4686
4711
|
}
|
|
@@ -4688,7 +4713,7 @@ async function executeNext() {
|
|
|
4688
4713
|
const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
|
|
4689
4714
|
const targetId = atomId.trim() || pendingAtoms[0]?.id;
|
|
4690
4715
|
if (targetId) {
|
|
4691
|
-
const { execute: execute2 } = await import("./execute-
|
|
4716
|
+
const { execute: execute2 } = await import("./execute-HQ5XANCR.js");
|
|
4692
4717
|
await execute2(targetId, {});
|
|
4693
4718
|
} else {
|
|
4694
4719
|
console.log(chalk6.yellow("No atom to execute."));
|
|
@@ -4837,7 +4862,7 @@ async function handleSlashCommand(input) {
|
|
|
4837
4862
|
const arg = parts.slice(1).join(" ").trim();
|
|
4838
4863
|
switch (command) {
|
|
4839
4864
|
case "/plan": {
|
|
4840
|
-
const { plan: plan2 } = await import("./plan-
|
|
4865
|
+
const { plan: plan2 } = await import("./plan-V57SS7O6.js");
|
|
4841
4866
|
if (arg) {
|
|
4842
4867
|
await plan2(arg, { conversational: true });
|
|
4843
4868
|
} else {
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
parallelRunWaves,
|
|
7
7
|
parallelSchedule,
|
|
8
8
|
parallelStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L3FRKAIO.js";
|
|
10
10
|
import "./chunk-EBHHIUCB.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-R4A2C42M.js";
|
|
12
12
|
import "./chunk-WGLVDEZC.js";
|
|
13
13
|
import "./chunk-3MZOEZUH.js";
|
|
14
14
|
import "./chunk-F7R3QKHP.js";
|