@wrongstack/core 0.82.6 → 0.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/defaults/index.d.ts +1 -1
- package/dist/defaults/index.js +15 -15
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.js +6 -7
- package/dist/execution/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +84 -78
- package/dist/index.js.map +1 -1
- package/dist/{secret-scrubber-7rSC_emZ.d.ts → secret-scrubber-yGBFQYju.d.ts} +10 -2
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +8 -7
- package/dist/security/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +8 -7
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +12 -1
- package/dist/utils/index.js +23 -10
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/defaults/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOp
|
|
|
3
3
|
export { D as DefaultSessionReader } from '../session-reader-BQU-toaN.js';
|
|
4
4
|
export { A as AuditLevel, a as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-D0u-x576.js';
|
|
5
5
|
export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-CgIc30qi.js';
|
|
6
|
-
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-
|
|
6
|
+
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-yGBFQYju.js';
|
|
7
7
|
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-gW5htOo1.js';
|
|
8
8
|
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-D402RASp.js';
|
|
9
9
|
export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, AutonomyPromptContributorOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor } from '../execution/index.js';
|
package/dist/defaults/index.js
CHANGED
|
@@ -3386,20 +3386,20 @@ var DefaultSecretVault = class {
|
|
|
3386
3386
|
return key;
|
|
3387
3387
|
}
|
|
3388
3388
|
};
|
|
3389
|
-
function decryptConfigSecrets2(cfg, vault) {
|
|
3389
|
+
function decryptConfigSecrets2(cfg, vault, opts) {
|
|
3390
|
+
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
3390
3391
|
return walk2(cfg, vault, (v, key) => {
|
|
3391
3392
|
try {
|
|
3392
3393
|
return vault.decrypt(v);
|
|
3393
3394
|
} catch (err) {
|
|
3394
|
-
|
|
3395
|
-
`[secret-vault] Failed to decrypt "${key}"
|
|
3396
|
-
err instanceof Error ? err.message : err
|
|
3395
|
+
warn(
|
|
3396
|
+
`[secret-vault] Failed to decrypt "${key}": ${err instanceof Error ? err.message : err}`
|
|
3397
3397
|
);
|
|
3398
3398
|
return "";
|
|
3399
3399
|
}
|
|
3400
3400
|
});
|
|
3401
3401
|
}
|
|
3402
|
-
function encryptConfigSecrets(cfg, vault) {
|
|
3402
|
+
function encryptConfigSecrets(cfg, vault, _opts) {
|
|
3403
3403
|
return walk2(cfg, vault, (v) => vault.encrypt(v));
|
|
3404
3404
|
}
|
|
3405
3405
|
function walk2(node, vault, transform) {
|
|
@@ -3460,7 +3460,8 @@ async function migratePlaintextSecrets(configPath, vault) {
|
|
|
3460
3460
|
await restrictFilePermissions(configPath);
|
|
3461
3461
|
return { migrated: counter.n, file: configPath };
|
|
3462
3462
|
}
|
|
3463
|
-
async function restrictFilePermissions(filePath) {
|
|
3463
|
+
async function restrictFilePermissions(filePath, opts) {
|
|
3464
|
+
const warn = ((msg) => console.warn(msg));
|
|
3464
3465
|
if (process.platform === "win32") {
|
|
3465
3466
|
try {
|
|
3466
3467
|
const { execFile: execFile2 } = await import('child_process');
|
|
@@ -3468,7 +3469,7 @@ async function restrictFilePermissions(filePath) {
|
|
|
3468
3469
|
const execFileAsync = promisify2(execFile2);
|
|
3469
3470
|
await execFileAsync("icacls", [filePath, "/inheritance:r", "/grant:r", `${process.env.USERNAME}:(F)`]);
|
|
3470
3471
|
} catch {
|
|
3471
|
-
|
|
3472
|
+
warn(`[secret-vault] Could not restrict permissions on ${filePath} \u2014 config file may be readable by other users on this system.`);
|
|
3472
3473
|
}
|
|
3473
3474
|
} else {
|
|
3474
3475
|
try {
|
|
@@ -4599,7 +4600,7 @@ function handleContentBlockStart(state, ev) {
|
|
|
4599
4600
|
state.textBuffers.push("");
|
|
4600
4601
|
state.blockOrder.push({ kind: "text", idx: state.currentTextIndex });
|
|
4601
4602
|
} else if (kind === "tool_use") {
|
|
4602
|
-
const id = ev.id ??
|
|
4603
|
+
const id = ev.id ?? randomUUID();
|
|
4603
4604
|
state.tools.set(id, { name: ev.name ?? "unknown", partial: "" });
|
|
4604
4605
|
state.blockOrder.push({ kind: "tool", id });
|
|
4605
4606
|
state.currentTextIndex = -1;
|
|
@@ -6700,6 +6701,11 @@ function appendJournal(goal, entry) {
|
|
|
6700
6701
|
};
|
|
6701
6702
|
}
|
|
6702
6703
|
|
|
6704
|
+
// src/utils/sleep.ts
|
|
6705
|
+
function sleep(ms) {
|
|
6706
|
+
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
6707
|
+
}
|
|
6708
|
+
|
|
6703
6709
|
// src/execution/eternal-autonomy.ts
|
|
6704
6710
|
var execFileP = promisify(execFile);
|
|
6705
6711
|
var BRAINSTORM_DONE = /* @__PURE__ */ Symbol("brainstorm-done");
|
|
@@ -7270,9 +7276,6 @@ ${recentJournal}` : "No prior iterations.",
|
|
|
7270
7276
|
await saveGoal(this.goalPath, { ...current, engineState: state });
|
|
7271
7277
|
}
|
|
7272
7278
|
};
|
|
7273
|
-
function sleep(ms) {
|
|
7274
|
-
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
7275
|
-
}
|
|
7276
7279
|
|
|
7277
7280
|
// src/coordination/subagent-budget.ts
|
|
7278
7281
|
var BudgetExceededError = class extends Error {
|
|
@@ -11230,9 +11233,6 @@ function expectDefined9(value) {
|
|
|
11230
11233
|
}
|
|
11231
11234
|
return value;
|
|
11232
11235
|
}
|
|
11233
|
-
function sleep2(ms) {
|
|
11234
|
-
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
11235
|
-
}
|
|
11236
11236
|
var GOAL_COMPLETE_MARKER2 = /^\s*\[goal[_\s-]?complete\]\s*$/im;
|
|
11237
11237
|
var ParallelEternalEngine = class {
|
|
11238
11238
|
constructor(opts) {
|
|
@@ -11307,7 +11307,7 @@ var ParallelEternalEngine = class {
|
|
|
11307
11307
|
);
|
|
11308
11308
|
}
|
|
11309
11309
|
if (this.stopRequested) break;
|
|
11310
|
-
await
|
|
11310
|
+
await sleep(2e3);
|
|
11311
11311
|
}
|
|
11312
11312
|
} finally {
|
|
11313
11313
|
this.state = "stopped";
|