@wrongstack/runtime 0.310.0 → 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/index.js +17 -7
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -473,6 +473,11 @@ import {
|
|
|
473
473
|
import { EventBus, TOKENS as TOKENS2 } from "@wrongstack/core/kernel";
|
|
474
474
|
import { ToolRegistry } from "@wrongstack/core/registry";
|
|
475
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";
|
|
476
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.";
|
|
477
482
|
var _SUBAGENT_ABORT = "wrongstack:subagent-abort-controller";
|
|
478
483
|
function abortLightSubagent(agent) {
|
|
@@ -634,17 +639,22 @@ function filterToolList(registry, allow) {
|
|
|
634
639
|
return selected;
|
|
635
640
|
}
|
|
636
641
|
function buildProvider(registry, config, providerId, model) {
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
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
|
|
641
651
|
};
|
|
642
|
-
if (!registry.has(
|
|
652
|
+
if (!registry.has(factoryType)) {
|
|
643
653
|
throw new Error(
|
|
644
|
-
`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.`
|
|
645
655
|
);
|
|
646
656
|
}
|
|
647
|
-
return registry.create({ ...providerConfig, type:
|
|
657
|
+
return registry.create({ ...providerConfig, type: factoryType, model }, factoryType);
|
|
648
658
|
}
|
|
649
659
|
async function resolveReasoningConfig(registry, providerId, modelId) {
|
|
650
660
|
if (!registry) return void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/runtime",
|
|
3
|
-
"version": "0.310.
|
|
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,12 +64,12 @@
|
|
|
64
64
|
"README.md"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@wrongstack/core": "0.310.
|
|
68
|
-
"@wrongstack/
|
|
69
|
-
"@wrongstack/sage": "0.310.
|
|
70
|
-
"@wrongstack/
|
|
71
|
-
"@wrongstack/vector-memory": "0.310.
|
|
72
|
-
"@wrongstack/
|
|
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"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/node": "^26.2.0",
|