@wrongstack/runtime 0.309.1 → 0.310.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/clipboard.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +87 -16
- package/dist/kanban-ports.d.ts +3 -0
- package/dist/tool-registration.js +60 -0
- package/package.json +7 -6
package/dist/clipboard.js
CHANGED
|
@@ -154,7 +154,7 @@ function runCmd(cmd, args) {
|
|
|
154
154
|
settled = true;
|
|
155
155
|
clearTimeout(timer);
|
|
156
156
|
clearTimeout(killCap);
|
|
157
|
-
child.stdout
|
|
157
|
+
child.stdout?.off("data", onStdoutData);
|
|
158
158
|
resolve(value);
|
|
159
159
|
};
|
|
160
160
|
const timer = setTimeout(() => {
|
|
@@ -228,7 +228,7 @@ function runCmdToFile(cmd, args, outPath) {
|
|
|
228
228
|
settled = true;
|
|
229
229
|
clearTimeout(timer);
|
|
230
230
|
clearTimeout(killCap);
|
|
231
|
-
child.stdout
|
|
231
|
+
child.stdout?.off("data", onStdoutData);
|
|
232
232
|
resolve(value);
|
|
233
233
|
};
|
|
234
234
|
const timer = setTimeout(() => {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './clipboard.js';
|
|
|
9
9
|
export * from './container.js';
|
|
10
10
|
export { abortLightSubagent, type LightSubagentFactoryDeps, makeLightSubagentFactory, } from './fleet/light-subagent-factory.js';
|
|
11
11
|
export * from './host.js';
|
|
12
|
+
export { wireKanbanPorts } from './kanban-ports.js';
|
|
12
13
|
export { type ProbeOptions, type ProbeResult, probeLocalLlm } from './local-llm-probe.js';
|
|
13
14
|
export * from './pack.js';
|
|
14
15
|
export * from './vision.js';
|
package/dist/index.js
CHANGED
|
@@ -154,7 +154,7 @@ function runCmd(cmd, args) {
|
|
|
154
154
|
settled = true;
|
|
155
155
|
clearTimeout(timer);
|
|
156
156
|
clearTimeout(killCap);
|
|
157
|
-
child.stdout
|
|
157
|
+
child.stdout?.off("data", onStdoutData);
|
|
158
158
|
resolve(value);
|
|
159
159
|
};
|
|
160
160
|
const timer = setTimeout(() => {
|
|
@@ -228,7 +228,7 @@ function runCmdToFile(cmd, args, outPath) {
|
|
|
228
228
|
settled = true;
|
|
229
229
|
clearTimeout(timer);
|
|
230
230
|
clearTimeout(killCap);
|
|
231
|
-
child.stdout
|
|
231
|
+
child.stdout?.off("data", onStdoutData);
|
|
232
232
|
resolve(value);
|
|
233
233
|
};
|
|
234
234
|
const timer = setTimeout(() => {
|
|
@@ -268,26 +268,29 @@ import {
|
|
|
268
268
|
DefaultSystemPromptBuilder,
|
|
269
269
|
FallbackProfileManager
|
|
270
270
|
} from "@wrongstack/core/agent";
|
|
271
|
+
import { ProviderModelStatusTracker } from "@wrongstack/core/coordination";
|
|
271
272
|
import {
|
|
273
|
+
buildRecoveryStrategies,
|
|
272
274
|
createStrategyCompactor,
|
|
273
275
|
DefaultErrorHandler,
|
|
274
276
|
DefaultPromptLoader,
|
|
275
277
|
DefaultRetryPolicy,
|
|
276
278
|
DefaultSkillLoader
|
|
277
279
|
} from "@wrongstack/core/execution";
|
|
278
|
-
import {
|
|
280
|
+
import { DefaultTokenCounter } from "@wrongstack/core/infrastructure";
|
|
279
281
|
import { Container, TOKENS } from "@wrongstack/core/kernel";
|
|
280
282
|
import { DefaultModeStore } from "@wrongstack/core/models";
|
|
281
283
|
import {
|
|
282
|
-
DirectoryPermissionPolicy,
|
|
283
284
|
DefaultPermissionPolicy,
|
|
284
285
|
DefaultSecretScrubber,
|
|
286
|
+
DirectoryPermissionPolicy,
|
|
285
287
|
validateDirectoryPolicy
|
|
286
288
|
} from "@wrongstack/core/security";
|
|
287
|
-
import {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
import {
|
|
290
|
+
DefaultConfigStore,
|
|
291
|
+
DefaultSessionStore,
|
|
292
|
+
getSessionRegistry
|
|
293
|
+
} from "@wrongstack/core/storage";
|
|
291
294
|
import { createProjectSageMemoryPort, isSqliteAvailable } from "@wrongstack/sage";
|
|
292
295
|
function createDefaultContainer(opts) {
|
|
293
296
|
const { config, wpaths, logger, modelsRegistry } = opts;
|
|
@@ -349,7 +352,7 @@ function createDefaultContainer(opts) {
|
|
|
349
352
|
);
|
|
350
353
|
if (!isSqliteAvailable()) {
|
|
351
354
|
throw new Error(
|
|
352
|
-
"SAGE requires
|
|
355
|
+
"SAGE requires synchronous SQLite (node:sqlite on Node >= 22.5 or bun:sqlite on Bun). The JSONL compatibility fallback has been removed."
|
|
353
356
|
);
|
|
354
357
|
}
|
|
355
358
|
const memoryStore = createProjectSageMemoryPort({
|
|
@@ -470,6 +473,11 @@ import {
|
|
|
470
473
|
import { EventBus, TOKENS as TOKENS2 } from "@wrongstack/core/kernel";
|
|
471
474
|
import { ToolRegistry } from "@wrongstack/core/registry";
|
|
472
475
|
import { AutoApprovePermissionPolicy, WIDE_SUBAGENT_CAPABILITIES } from "@wrongstack/core/security";
|
|
476
|
+
import {
|
|
477
|
+
getProxyConfig,
|
|
478
|
+
rewriteBaseUrl,
|
|
479
|
+
shouldRewriteFor
|
|
480
|
+
} from "@wrongstack/core/wiring/proxy-rewrite";
|
|
473
481
|
var SUBAGENT_BASELINE = "You are a subagent executing one delegated task end-to-end. Work autonomously with your tools; do not ask for confirmation on routine in-project actions. Complete only the assigned task: if you notice problems outside it, report them in your result instead of fixing them. Keep output concise.";
|
|
474
482
|
var _SUBAGENT_ABORT = "wrongstack:subagent-abort-controller";
|
|
475
483
|
function abortLightSubagent(agent) {
|
|
@@ -631,17 +639,22 @@ function filterToolList(registry, allow) {
|
|
|
631
639
|
return selected;
|
|
632
640
|
}
|
|
633
641
|
function buildProvider(registry, config, providerId, model) {
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
642
|
+
const savedProviderCfg = config.providers?.[providerId];
|
|
643
|
+
const factoryType = savedProviderCfg?.type ?? providerId;
|
|
644
|
+
const rawBaseUrl = savedProviderCfg?.baseUrl ?? config.baseUrl;
|
|
645
|
+
const proxiedBaseUrl = rawBaseUrl && shouldRewriteFor(factoryType) ? rewriteBaseUrl(rawBaseUrl, getProxyConfig().url) : rawBaseUrl;
|
|
646
|
+
const providerConfig = {
|
|
647
|
+
...savedProviderCfg ?? {},
|
|
648
|
+
apiKey: savedProviderCfg?.apiKey ?? config.apiKey,
|
|
649
|
+
baseUrl: proxiedBaseUrl,
|
|
650
|
+
type: providerId
|
|
638
651
|
};
|
|
639
|
-
if (!registry.has(
|
|
652
|
+
if (!registry.has(factoryType)) {
|
|
640
653
|
throw new Error(
|
|
641
|
-
`No provider factory registered for "${providerId}" \u2014 cannot build a subagent provider for the SDD run.`
|
|
654
|
+
`No provider factory registered for "${factoryType}" (provider "${providerId}") \u2014 cannot build a subagent provider for the SDD run.`
|
|
642
655
|
);
|
|
643
656
|
}
|
|
644
|
-
return registry.create({ ...providerConfig, type:
|
|
657
|
+
return registry.create({ ...providerConfig, type: factoryType, model }, factoryType);
|
|
645
658
|
}
|
|
646
659
|
async function resolveReasoningConfig(registry, providerId, modelId) {
|
|
647
660
|
if (!registry) return void 0;
|
|
@@ -800,6 +813,63 @@ async function applyWrongStackPacks(host, packs, opts = {}) {
|
|
|
800
813
|
}
|
|
801
814
|
}
|
|
802
815
|
|
|
816
|
+
// src/kanban-ports.ts
|
|
817
|
+
import { setKanbanBoundaryOps, setKanbanDispatch } from "@wrongstack/core/coordination";
|
|
818
|
+
import { setKanbanGovernance } from "@wrongstack/core/security";
|
|
819
|
+
import { setBoardStorePort } from "@wrongstack/core/storage";
|
|
820
|
+
import {
|
|
821
|
+
addTask,
|
|
822
|
+
completeKanbanDispatch,
|
|
823
|
+
createBoard,
|
|
824
|
+
describeKanbanBoundary,
|
|
825
|
+
evaluateContractGraphReadiness,
|
|
826
|
+
evaluateKanbanBoundaryOpaque,
|
|
827
|
+
evaluateKanbanBoundaryPath,
|
|
828
|
+
failKanbanDispatch,
|
|
829
|
+
getBoard,
|
|
830
|
+
heartbeatTaskAssignment,
|
|
831
|
+
listBoards,
|
|
832
|
+
listReadyTasks,
|
|
833
|
+
readBoard,
|
|
834
|
+
removeBoard,
|
|
835
|
+
reserveKanbanDispatch,
|
|
836
|
+
resolveKanbanBoundaryLayers,
|
|
837
|
+
startKanbanDispatch,
|
|
838
|
+
updateTask,
|
|
839
|
+
updateTaskAssignment
|
|
840
|
+
} from "@wrongstack/kanban";
|
|
841
|
+
var wired = false;
|
|
842
|
+
function wireKanbanPorts() {
|
|
843
|
+
if (wired) return;
|
|
844
|
+
wired = true;
|
|
845
|
+
setKanbanBoundaryOps({ describeKanbanBoundary });
|
|
846
|
+
setKanbanGovernance({
|
|
847
|
+
readBoard,
|
|
848
|
+
resolveKanbanBoundaryLayers,
|
|
849
|
+
evaluateKanbanBoundaryOpaque,
|
|
850
|
+
evaluateKanbanBoundaryPath,
|
|
851
|
+
evaluateContractGraphReadiness
|
|
852
|
+
});
|
|
853
|
+
setBoardStorePort({
|
|
854
|
+
createBoard,
|
|
855
|
+
listBoards,
|
|
856
|
+
getBoard,
|
|
857
|
+
removeBoard,
|
|
858
|
+
addTask,
|
|
859
|
+
updateTask
|
|
860
|
+
});
|
|
861
|
+
setKanbanDispatch({
|
|
862
|
+
getBoard,
|
|
863
|
+
listReadyTasks,
|
|
864
|
+
reserveKanbanDispatch,
|
|
865
|
+
startKanbanDispatch,
|
|
866
|
+
completeKanbanDispatch,
|
|
867
|
+
failKanbanDispatch,
|
|
868
|
+
updateTaskAssignment,
|
|
869
|
+
heartbeatTaskAssignment
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
|
|
803
873
|
// src/local-llm-probe.ts
|
|
804
874
|
var PROBE_TIMEOUT_MS = 3e3;
|
|
805
875
|
async function probeLocalLlm(opts) {
|
|
@@ -1151,6 +1221,7 @@ export {
|
|
|
1151
1221
|
readClipboardImage,
|
|
1152
1222
|
readClipboardText,
|
|
1153
1223
|
routeImagesForModel,
|
|
1224
|
+
wireKanbanPorts,
|
|
1154
1225
|
writeClipboardText
|
|
1155
1226
|
};
|
|
1156
1227
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,9 +9,69 @@ import {
|
|
|
9
9
|
searchMemoryTool
|
|
10
10
|
} from "@wrongstack/tools/memory";
|
|
11
11
|
import { registerBuiltinToolTier, selectBuiltinToolsForTier } from "@wrongstack/tools/tool-tier";
|
|
12
|
+
|
|
13
|
+
// src/kanban-ports.ts
|
|
14
|
+
import { setKanbanBoundaryOps, setKanbanDispatch } from "@wrongstack/core/coordination";
|
|
15
|
+
import { setKanbanGovernance } from "@wrongstack/core/security";
|
|
16
|
+
import { setBoardStorePort } from "@wrongstack/core/storage";
|
|
17
|
+
import {
|
|
18
|
+
addTask,
|
|
19
|
+
completeKanbanDispatch,
|
|
20
|
+
createBoard,
|
|
21
|
+
describeKanbanBoundary,
|
|
22
|
+
evaluateContractGraphReadiness,
|
|
23
|
+
evaluateKanbanBoundaryOpaque,
|
|
24
|
+
evaluateKanbanBoundaryPath,
|
|
25
|
+
failKanbanDispatch,
|
|
26
|
+
getBoard,
|
|
27
|
+
heartbeatTaskAssignment,
|
|
28
|
+
listBoards,
|
|
29
|
+
listReadyTasks,
|
|
30
|
+
readBoard,
|
|
31
|
+
removeBoard,
|
|
32
|
+
reserveKanbanDispatch,
|
|
33
|
+
resolveKanbanBoundaryLayers,
|
|
34
|
+
startKanbanDispatch,
|
|
35
|
+
updateTask,
|
|
36
|
+
updateTaskAssignment
|
|
37
|
+
} from "@wrongstack/kanban";
|
|
38
|
+
var wired = false;
|
|
39
|
+
function wireKanbanPorts() {
|
|
40
|
+
if (wired) return;
|
|
41
|
+
wired = true;
|
|
42
|
+
setKanbanBoundaryOps({ describeKanbanBoundary });
|
|
43
|
+
setKanbanGovernance({
|
|
44
|
+
readBoard,
|
|
45
|
+
resolveKanbanBoundaryLayers,
|
|
46
|
+
evaluateKanbanBoundaryOpaque,
|
|
47
|
+
evaluateKanbanBoundaryPath,
|
|
48
|
+
evaluateContractGraphReadiness
|
|
49
|
+
});
|
|
50
|
+
setBoardStorePort({
|
|
51
|
+
createBoard,
|
|
52
|
+
listBoards,
|
|
53
|
+
getBoard,
|
|
54
|
+
removeBoard,
|
|
55
|
+
addTask,
|
|
56
|
+
updateTask
|
|
57
|
+
});
|
|
58
|
+
setKanbanDispatch({
|
|
59
|
+
getBoard,
|
|
60
|
+
listReadyTasks,
|
|
61
|
+
reserveKanbanDispatch,
|
|
62
|
+
startKanbanDispatch,
|
|
63
|
+
completeKanbanDispatch,
|
|
64
|
+
failKanbanDispatch,
|
|
65
|
+
updateTaskAssignment,
|
|
66
|
+
heartbeatTaskAssignment
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/tool-registration.ts
|
|
12
71
|
import { createVectorMemoryTools } from "@wrongstack/vector-memory";
|
|
13
72
|
var DIRECT_LAZY_GATEWAYS = ["tool_search", "tool_use", "tool_help"];
|
|
14
73
|
function registerCanonicalHostTools(options) {
|
|
74
|
+
wireKanbanPorts();
|
|
15
75
|
const catalogBuiltinTools = registerBuiltinToolTier({
|
|
16
76
|
registry: options.registry,
|
|
17
77
|
tier: "off"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.310.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack default runtime implementations and host-level composition helpers built on @wrongstack/core.",
|
|
6
6
|
"repository": {
|
|
@@ -64,11 +64,12 @@
|
|
|
64
64
|
"README.md"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@wrongstack/
|
|
68
|
-
"@wrongstack/
|
|
69
|
-
"@wrongstack/
|
|
70
|
-
"@wrongstack/
|
|
71
|
-
"@wrongstack/vector-memory": "0.
|
|
67
|
+
"@wrongstack/core": "0.310.1",
|
|
68
|
+
"@wrongstack/governance": "0.310.1",
|
|
69
|
+
"@wrongstack/sage": "0.310.1",
|
|
70
|
+
"@wrongstack/tools": "0.310.1",
|
|
71
|
+
"@wrongstack/vector-memory": "0.310.1",
|
|
72
|
+
"@wrongstack/kanban": "0.310.1"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@types/node": "^26.2.0",
|