@tangle-network/agent-runtime 0.79.2 → 0.79.4
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 +50 -327
- package/dist/agent.js +5 -5
- package/dist/analyst-loop.js +2 -2
- package/dist/{chunk-TSDKBFZP.js → chunk-44CX5JU6.js} +414 -113
- package/dist/chunk-44CX5JU6.js.map +1 -0
- package/dist/{chunk-T2HVQVB4.js → chunk-4J6RBI3K.js} +15 -1
- package/dist/chunk-4J6RBI3K.js.map +1 -0
- package/dist/{chunk-75V2XXYJ.js → chunk-AHZ3YBL6.js} +524 -12
- package/dist/chunk-AHZ3YBL6.js.map +1 -0
- package/dist/{chunk-IODKUOBA.js → chunk-C2FZ6GR6.js} +2 -2
- package/dist/{chunk-Z3RRRPRB.js → chunk-H7IBHAFT.js} +23 -14
- package/dist/chunk-H7IBHAFT.js.map +1 -0
- package/dist/{chunk-VMNEQHJR.js → chunk-IPEQ3ERC.js} +17 -2
- package/dist/chunk-IPEQ3ERC.js.map +1 -0
- package/dist/{chunk-PBE35ULD.js → chunk-NXZEVWKP.js} +2 -2
- package/dist/{chunk-SONQUREI.js → chunk-RUJZK6VH.js} +2 -2
- package/dist/{chunk-2DS6T46I.js → chunk-U6AP535M.js} +4 -4
- package/dist/{coordination-BoEPhGas.d.ts → coordination-BFVtgRax.d.ts} +30 -4
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +30 -2
- package/dist/intelligence.js +33 -23
- package/dist/intelligence.js.map +1 -1
- package/dist/{loop-runner-bin-DCr5OMe5.d.ts → loop-runner-bin-CTVja8e0.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +4 -4
- package/dist/loop-runner-bin.js +7 -7
- package/dist/loops.d.ts +283 -13
- package/dist/loops.js +26 -6
- package/dist/mcp/bin.js +5 -5
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.js +7 -7
- package/dist/{router-client-CMAWGv1h.d.ts → router-client-Ak2IGuXq.d.ts} +33 -1
- package/dist/{types-C1sozrte.d.ts → types-DYW0tloU.d.ts} +2 -2
- package/dist/{worktree-fanout-CtQrRDME.d.ts → worktree-fanout-DaUDwCA_.d.ts} +5 -74
- package/dist/{worktree-CpptK3oF.d.ts → worktree-harness-Dt6s_m3z.d.ts} +74 -2
- package/package.json +1 -1
- package/skills/build-with-agent-runtime/SKILL.md +53 -23
- package/dist/chunk-75V2XXYJ.js.map +0 -1
- package/dist/chunk-T2HVQVB4.js.map +0 -1
- package/dist/chunk-TSDKBFZP.js.map +0 -1
- package/dist/chunk-VMNEQHJR.js.map +0 -1
- package/dist/chunk-Z3RRRPRB.js.map +0 -1
- /package/dist/{chunk-IODKUOBA.js.map → chunk-C2FZ6GR6.js.map} +0 -0
- /package/dist/{chunk-PBE35ULD.js.map → chunk-NXZEVWKP.js.map} +0 -0
- /package/dist/{chunk-SONQUREI.js.map → chunk-RUJZK6VH.js.map} +0 -0
- /package/dist/{chunk-2DS6T46I.js.map → chunk-U6AP535M.js.map} +0 -0
package/dist/intelligence.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildLoopOtelSpans,
|
|
3
3
|
createOtelExporter,
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
flatOtelSpan
|
|
5
|
+
} from "./chunk-IPEQ3ERC.js";
|
|
6
6
|
import "./chunk-DGUM43GV.js";
|
|
7
7
|
|
|
8
8
|
// src/intelligence/effort.ts
|
|
@@ -325,10 +325,8 @@ function composeCertifiedPrompt(base, certified) {
|
|
|
325
325
|
|
|
326
326
|
${parts.join("\n\n")}`;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
const
|
|
330
|
-
const target = config.target ?? config.project;
|
|
331
|
-
const refreshMs = config.refreshMs ?? defaultRefreshMs;
|
|
328
|
+
function createCertifiedPromptSource(opts) {
|
|
329
|
+
const refreshMs = opts.refreshMs ?? defaultRefreshMs;
|
|
332
330
|
let certified = null;
|
|
333
331
|
let lastPullAt = 0;
|
|
334
332
|
let inflight = null;
|
|
@@ -336,13 +334,7 @@ function withCertifiedDelivery(agent, config) {
|
|
|
336
334
|
if (Date.now() - lastPullAt < refreshMs) return;
|
|
337
335
|
if (inflight) return inflight;
|
|
338
336
|
inflight = (async () => {
|
|
339
|
-
const outcome = await pullCertified(
|
|
340
|
-
target,
|
|
341
|
-
apiKey: config.apiKey,
|
|
342
|
-
baseUrl: config.baseUrl,
|
|
343
|
-
timeoutMs: config.timeoutMs,
|
|
344
|
-
fetchImpl: config.fetchImpl
|
|
345
|
-
});
|
|
337
|
+
const outcome = await pullCertified(opts);
|
|
346
338
|
lastPullAt = Date.now();
|
|
347
339
|
if (outcome.succeeded) certified = outcome.value;
|
|
348
340
|
})();
|
|
@@ -352,8 +344,28 @@ function withCertifiedDelivery(agent, config) {
|
|
|
352
344
|
inflight = null;
|
|
353
345
|
}
|
|
354
346
|
}
|
|
347
|
+
return {
|
|
348
|
+
refresh,
|
|
349
|
+
current: () => certified,
|
|
350
|
+
async compose(base) {
|
|
351
|
+
await refresh();
|
|
352
|
+
return composeCertifiedPrompt(base, certified);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
function withCertifiedDelivery(agent, config) {
|
|
357
|
+
const client = createIntelligenceClient(config);
|
|
358
|
+
const source = createCertifiedPromptSource({
|
|
359
|
+
target: config.target ?? config.project,
|
|
360
|
+
...config.apiKey !== void 0 ? { apiKey: config.apiKey } : {},
|
|
361
|
+
...config.baseUrl !== void 0 ? { baseUrl: config.baseUrl } : {},
|
|
362
|
+
...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {},
|
|
363
|
+
...config.fetchImpl !== void 0 ? { fetchImpl: config.fetchImpl } : {},
|
|
364
|
+
...config.refreshMs !== void 0 ? { refreshMs: config.refreshMs } : {}
|
|
365
|
+
});
|
|
355
366
|
const wrapped = (async (input) => {
|
|
356
|
-
await refresh();
|
|
367
|
+
await source.refresh();
|
|
368
|
+
const certified = source.current();
|
|
357
369
|
const applied = {
|
|
358
370
|
certified,
|
|
359
371
|
composePrompt: (base) => composeCertifiedPrompt(base, certified)
|
|
@@ -367,7 +379,7 @@ function withCertifiedDelivery(agent, config) {
|
|
|
367
379
|
}
|
|
368
380
|
);
|
|
369
381
|
});
|
|
370
|
-
wrapped.refresh = refresh;
|
|
382
|
+
wrapped.refresh = source.refresh;
|
|
371
383
|
return wrapped;
|
|
372
384
|
}
|
|
373
385
|
|
|
@@ -832,14 +844,11 @@ function createIntelligenceClient(config) {
|
|
|
832
844
|
if (redactedOutput !== void 0) labels["tangle.output"] = previewJson(redactedOutput);
|
|
833
845
|
try {
|
|
834
846
|
ex.exportSpan(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
payload: labels
|
|
841
|
-
},
|
|
842
|
-
outcome.traceId
|
|
847
|
+
flatOtelSpan(
|
|
848
|
+
"tangle.intelligence.run",
|
|
849
|
+
{ "tangle.runId": outcome.runId, ...labels },
|
|
850
|
+
outcome.traceId,
|
|
851
|
+
Date.now()
|
|
843
852
|
)
|
|
844
853
|
);
|
|
845
854
|
} catch {
|
|
@@ -957,6 +966,7 @@ export {
|
|
|
957
966
|
composeCertifiedProfile,
|
|
958
967
|
composeCertifiedProfileFromWire,
|
|
959
968
|
composeCertifiedPrompt,
|
|
969
|
+
createCertifiedPromptSource,
|
|
960
970
|
createIntelligenceClient,
|
|
961
971
|
defaultEffortTier,
|
|
962
972
|
defaultRedactor,
|