@wrongstack/core 0.9.20 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -33
- package/dist/{agent-bridge-Dti3KXGk.d.ts → agent-bridge-DBBGP5O4.d.ts} +1 -1
- package/dist/{agent-subagent-runner-U-rs7kk7.d.ts → agent-subagent-runner-KwufTWwn.d.ts} +3 -3
- package/dist/{compactor-D7X96RLZ.d.ts → compactor-D1RHFRmF.d.ts} +1 -1
- package/dist/{config-CLXMDOSs.d.ts → config-CJXBka2r.d.ts} +38 -2
- package/dist/{context-zkZeILpr.d.ts → context-7u93AcGD.d.ts} +94 -0
- package/dist/coordination/index.d.ts +12 -12
- package/dist/coordination/index.js +130 -58
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-Uzla85H-.d.ts → default-config-DEXI4jsl.d.ts} +10 -1
- package/dist/defaults/index.d.ts +24 -24
- package/dist/defaults/index.js +611 -95
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-DH-9r-_C.d.ts → events-Bw1K5E6K.d.ts} +8 -1
- package/dist/execution/index.d.ts +18 -15
- package/dist/execution/index.js +309 -61
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/extension/index.js.map +1 -1
- package/dist/goal-store-BeRsj7YX.d.ts +188 -0
- package/dist/{index-CFO9QmJo.d.ts → index-DIt5TIaF.d.ts} +8 -8
- package/dist/{index-BIHJ4uII.d.ts → index-DgQWnZxP.d.ts} +5 -5
- package/dist/index.d.ts +56 -35
- package/dist/index.js +742 -203
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js +57 -8
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-DkESgh0G.d.ts → mcp-servers-BgINZzuo.d.ts} +3 -3
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +163 -10
- package/dist/models/index.js.map +1 -1
- package/dist/models-registry-gwMAo6E3.d.ts +86 -0
- package/dist/{multi-agent-DNp6lAzg.d.ts → multi-agent-C1O8EFzb.d.ts} +45 -4
- package/dist/{multi-agent-coordinator-CAhsegPz.d.ts → multi-agent-coordinator-DoVSBFNx.d.ts} +2 -2
- package/dist/{null-fleet-bus-Dnl19vmf.d.ts → null-fleet-bus-T-s3JaOt.d.ts} +8 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-CHiBL0DD.d.ts → path-resolver-BfyK-I7w.d.ts} +2 -2
- package/dist/{permission-H35s9Evv.d.ts → permission-B6sldrSp.d.ts} +1 -1
- package/dist/{permission-policy-CT-nRmTn.d.ts → permission-policy-CtNscWOA.d.ts} +10 -9
- package/dist/{plan-templates-Bs8iRwi6.d.ts → plan-templates-BWs6Je7j.d.ts} +8 -8
- package/dist/{provider-runner-BZdDrWrS.d.ts → provider-runner-BmPe2RuU.d.ts} +3 -3
- package/dist/{retry-policy-J9N_PM40.d.ts → retry-policy-KF18W4dg.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +130 -58
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +65 -4
- package/dist/security/index.js +67 -19
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-CFTh3Z6p.d.ts → selector-DmXxpFyM.d.ts} +1 -1
- package/dist/{session-reader-C7JJlxOw.d.ts → session-reader-CCSBfQmd.d.ts} +1 -1
- package/dist/storage/index.d.ts +7 -7
- package/dist/storage/index.js +125 -6
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-CneIxVip.d.ts → system-prompt-CM6zOhd2.d.ts} +19 -1
- package/dist/{tool-executor-flTuxsqO.d.ts → tool-executor-D7RxLtg4.d.ts} +4 -4
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.js +344 -14
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +23 -3
- package/dist/utils/index.js +66 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-BCgmTNlG.d.ts → wstack-paths-eMXnY1_X.d.ts} +8 -0
- package/package.json +1 -1
- package/dist/goal-store-C7jcumEh.d.ts +0 -96
- package/dist/models-registry-OG_30xqZ.d.ts +0 -46
package/package.json
CHANGED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Long-running autonomous mission. A goal survives across sessions and
|
|
3
|
-
* drives the EternalAutonomyEngine — every iteration of the engine
|
|
4
|
-
* consults the goal to choose what to do next.
|
|
5
|
-
*
|
|
6
|
-
* Storage: `~/.wrongstack/projects/<hash>/goal.json`. Persistent and
|
|
7
|
-
* project-scoped on purpose: the goal belongs to the codebase, not the
|
|
8
|
-
* REPL session.
|
|
9
|
-
*/
|
|
10
|
-
interface JournalEntry {
|
|
11
|
-
/** ISO timestamp of the iteration. */
|
|
12
|
-
at: string;
|
|
13
|
-
/** Sequential iteration counter (1-based, monotonically increasing). */
|
|
14
|
-
iteration: number;
|
|
15
|
-
/** Source that produced the action ('todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel'). */
|
|
16
|
-
source: 'todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel';
|
|
17
|
-
/** Short one-line description of what the iteration set out to do. */
|
|
18
|
-
task: string;
|
|
19
|
-
/** Outcome status. */
|
|
20
|
-
status: 'success' | 'failure' | 'aborted' | 'skipped';
|
|
21
|
-
/** Optional free-form note (error message, summary, etc.). */
|
|
22
|
-
note?: string;
|
|
23
|
-
/** Optional token usage delta for this iteration. */
|
|
24
|
-
tokens?: {
|
|
25
|
-
input: number;
|
|
26
|
-
output: number;
|
|
27
|
-
};
|
|
28
|
-
/** Optional USD cost delta for this iteration (provider-estimated). */
|
|
29
|
-
costUsd?: number;
|
|
30
|
-
}
|
|
31
|
-
interface GoalFile {
|
|
32
|
-
version: 1;
|
|
33
|
-
/** The mission statement. */
|
|
34
|
-
goal: string;
|
|
35
|
-
/** When the goal was first set or last replaced. */
|
|
36
|
-
setAt: string;
|
|
37
|
-
/** Updated on every iteration completion. */
|
|
38
|
-
lastActivityAt: string;
|
|
39
|
-
/** Total iterations the engine has run against this goal (cumulative). */
|
|
40
|
-
iterations: number;
|
|
41
|
-
/** Engine lifecycle state — 'running' means another process owns this goal. */
|
|
42
|
-
engineState: 'idle' | 'running' | 'stopped';
|
|
43
|
-
/**
|
|
44
|
-
* Mission-level lifecycle. `active` is the default; `completed` is set
|
|
45
|
-
* when the engine detects `[GOAL_COMPLETE]` in a successful iteration's
|
|
46
|
-
* final text AND a verification pass agrees; `abandoned` is set by the
|
|
47
|
-
* user (e.g. `/goal abandon`) or when the engine exceeds a configured
|
|
48
|
-
* failure ceiling. Once not `active`, the engine refuses to run further
|
|
49
|
-
* iterations against this goal — protects against accidental restarts
|
|
50
|
-
* burning through API quota after the work is done.
|
|
51
|
-
*
|
|
52
|
-
* Optional for backward compatibility — pre-existing `goal.json` files
|
|
53
|
-
* without this field load as `active`.
|
|
54
|
-
*/
|
|
55
|
-
goalState?: 'active' | 'paused' | 'completed' | 'abandoned';
|
|
56
|
-
/**
|
|
57
|
-
* Per-todo attempt counter. Keyed by TodoItem id. Used by the engine
|
|
58
|
-
* to skip a todo that has failed N times rather than spinning on it
|
|
59
|
-
* forever. Persisted so attempt counts survive restarts (`/autonomy
|
|
60
|
-
* stop` + resume should not reset progress against a stuck task).
|
|
61
|
-
*/
|
|
62
|
-
todoAttempts?: Record<string, number>;
|
|
63
|
-
/** Bounded ring buffer of recent iterations (newest last). */
|
|
64
|
-
journal: JournalEntry[];
|
|
65
|
-
}
|
|
66
|
-
/** Cap on persisted journal entries — older entries are evicted FIFO. */
|
|
67
|
-
declare const MAX_JOURNAL_ENTRIES = 500;
|
|
68
|
-
/**
|
|
69
|
-
* Resolve the goal file path for a given project root.
|
|
70
|
-
* Exposed so the engine and CLI use one canonical path.
|
|
71
|
-
* Uses `~/.wrongstack/projects/<hash>/goal.json` .<hash>/`.
|
|
72
|
-
*/
|
|
73
|
-
declare function goalFilePath(projectRoot: string): string;
|
|
74
|
-
declare function loadGoal(filePath: string): Promise<GoalFile | null>;
|
|
75
|
-
declare function saveGoal(filePath: string, goal: GoalFile): Promise<void>;
|
|
76
|
-
declare function emptyGoal(goal: string): GoalFile;
|
|
77
|
-
/**
|
|
78
|
-
* Append a journal entry, bumping iteration counters and trimming the
|
|
79
|
-
* ring buffer. Returns a new GoalFile — does not mutate the argument.
|
|
80
|
-
*/
|
|
81
|
-
declare function appendJournal(goal: GoalFile, entry: Omit<JournalEntry, 'iteration' | 'at'>): GoalFile;
|
|
82
|
-
/**
|
|
83
|
-
* Aggregate cumulative cost + tokens across all journal entries. Entries
|
|
84
|
-
* without telemetry are skipped (legacy entries from before the field
|
|
85
|
-
* was added still load cleanly).
|
|
86
|
-
*/
|
|
87
|
-
declare function summarizeUsage(goal: GoalFile): {
|
|
88
|
-
totalCostUsd: number;
|
|
89
|
-
totalInputTokens: number;
|
|
90
|
-
totalOutputTokens: number;
|
|
91
|
-
iterationsWithUsage: number;
|
|
92
|
-
};
|
|
93
|
-
/** Format the goal + recent journal as a human-readable status block. */
|
|
94
|
-
declare function formatGoal(goal: GoalFile, journalLimit?: number): string;
|
|
95
|
-
|
|
96
|
-
export { type GoalFile as G, type JournalEntry as J, MAX_JOURNAL_ENTRIES as M, appendJournal as a, summarizeUsage as b, emptyGoal as e, formatGoal as f, goalFilePath as g, loadGoal as l, saveGoal as s };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { b as ModelsRegistry, M as ModelsDevPayload, c as ResolvedProvider, R as ResolvedModel, W as WireFamily } from './models-registry-BcYJDKLm.js';
|
|
2
|
-
|
|
3
|
-
interface DefaultModelsRegistryOptions {
|
|
4
|
-
cacheFile: string;
|
|
5
|
-
url?: string;
|
|
6
|
-
ttlSeconds?: number;
|
|
7
|
-
fetchImpl?: typeof fetch;
|
|
8
|
-
/** Pre-seeded payload — useful for offline scenarios and tests. */
|
|
9
|
-
seed?: ModelsDevPayload;
|
|
10
|
-
/**
|
|
11
|
-
* Maximum age in seconds for stale cache fallback when network fails.
|
|
12
|
-
* Defaults to 7 days. Set to `Infinity` for full offline resilience
|
|
13
|
-
* (risk: deprecated models, wrong pricing). Set to `0` to disable
|
|
14
|
-
* stale fallback entirely.
|
|
15
|
-
*/
|
|
16
|
-
maxStaleAgeSeconds?: number;
|
|
17
|
-
}
|
|
18
|
-
declare function classifyFamily(npm: string | undefined): WireFamily;
|
|
19
|
-
declare class DefaultModelsRegistry implements ModelsRegistry {
|
|
20
|
-
private payload?;
|
|
21
|
-
private fetchedAt?;
|
|
22
|
-
private readonly cacheFile;
|
|
23
|
-
private readonly url;
|
|
24
|
-
private readonly ttlMs;
|
|
25
|
-
private readonly fetchImpl;
|
|
26
|
-
private readonly seed?;
|
|
27
|
-
private readonly maxStaleAgeMs;
|
|
28
|
-
constructor(opts: DefaultModelsRegistryOptions);
|
|
29
|
-
load(opts?: {
|
|
30
|
-
force?: boolean;
|
|
31
|
-
}): Promise<ModelsDevPayload>;
|
|
32
|
-
refresh(): Promise<ModelsDevPayload>;
|
|
33
|
-
listProviders(): Promise<ResolvedProvider[]>;
|
|
34
|
-
getProvider(id: string): Promise<ResolvedProvider | undefined>;
|
|
35
|
-
getModel(providerId: string, modelId: string): Promise<ResolvedModel | undefined>;
|
|
36
|
-
suggestModel(providerId: string): Promise<string | undefined>;
|
|
37
|
-
ageSeconds(): Promise<number>;
|
|
38
|
-
private resolveProvider;
|
|
39
|
-
private isFresh;
|
|
40
|
-
private isWithinMaxStaleAge;
|
|
41
|
-
private readCache;
|
|
42
|
-
/** Used by `wstack models refresh` to expose where the cache lives. */
|
|
43
|
-
cacheLocation(): string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { DefaultModelsRegistry as D, type DefaultModelsRegistryOptions as a, classifyFamily as c };
|