omp-fabric 1.27.0 → 1.27.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/CHANGELOG.md +13 -0
- package/dist/completed-outputs.d.ts +12 -0
- package/dist/completed-outputs.d.ts.map +1 -0
- package/dist/execution-service.d.ts +2 -0
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +58 -2
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/failure-progress.d.ts +2 -1
- package/dist/failure-progress.d.ts.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +2 -2
- package/docs/configuration.md +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.27.1
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- A `fabric_exec` program that fails after some nested calls finished now gets the output of the last six completed calls in its error text, after the refs line. Each output keeps its first 450 and last 250 characters with a count of what was cut; `omp.bash` style results show their `output` and structured results show JSON. The journal sits in the host bridge, so QuickJS and the Node process executor share it. The line before the outputs reads `(outputs of the last calls follow)` where it used to read `(outputs not returned)`. The durable trace and the persisted execution details do not carry outputs, a program that succeeds is unchanged, and the `agents.handoff` deferral stub is not recorded.
|
|
8
|
+
|
|
9
|
+
### Notes
|
|
10
|
+
|
|
11
|
+
- Origin: 397 of 987 failed results in three days of Wardmote transcripts (487 sessions, 38,495 `fabric_exec` calls) ended with `Completed before the outer failure (outputs not returned)`, so a program that read files and then failed on an edit lost what it read. The 1.27.0 notes left this open.
|
|
12
|
+
- Not measured: the per-call cost of keeping the journal in programs that succeed (a bounded excerpt per nested call), and the effect on agent behavior. The first check after release is the same count of `outputs not returned` lines in new sessions.
|
|
13
|
+
- Review gate: two read-only reviewers passed the commit with no hard findings. Fixed from their soft findings: a throwing getter could have failed a call that succeeded, the handoff stub was recorded as an output, the failure line claimed the latest outputs next to a summary of the first eight calls, and a failing parallel program had no test.
|
|
14
|
+
- CI run 43680154757 passed typecheck, build, dead-code lint and the full suite on ubuntu and windows at 8c7d5936.
|
|
15
|
+
|
|
3
16
|
## 1.27.0
|
|
4
17
|
|
|
5
18
|
### Removed (breaking)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CompletedOutput {
|
|
2
|
+
ref: string;
|
|
3
|
+
target?: string;
|
|
4
|
+
chars: number;
|
|
5
|
+
preview: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class CompletedOutputJournal {
|
|
8
|
+
#private;
|
|
9
|
+
record(ref: string, args: Record<string, unknown>, value: unknown): void;
|
|
10
|
+
entries(): CompletedOutput[];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=completed-outputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completed-outputs.d.ts","sourceRoot":"","sources":["../src/completed-outputs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AA0CD,qBAAa,sBAAsB;;IAGjC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAaxE,OAAO,IAAI,eAAe,EAAE;CAG7B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Usage } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import { type CompletedOutput } from "./completed-outputs.js";
|
|
2
3
|
import type { ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
3
4
|
import { type FabricExecutionTraceV1 } from "./audit/trace.js";
|
|
4
5
|
import { FabricActivityStore } from "./activity/store.js";
|
|
@@ -23,6 +24,7 @@ export interface FabricExecutionResult {
|
|
|
23
24
|
error?: string;
|
|
24
25
|
handoffRequest?: Record<string, unknown>;
|
|
25
26
|
usage?: Usage;
|
|
27
|
+
completedOutputs?: CompletedOutput[];
|
|
26
28
|
}
|
|
27
29
|
interface FabricExecutionPartial {
|
|
28
30
|
audits: FabricCallAudit[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-service.d.ts","sourceRoot":"","sources":["../src/execution-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAML,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,sBAAsB,EAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAKlF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAUnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAsE7D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,MAAM,E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,CAAC,MAAM,EAAE,YAAY;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,mBAAmB;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,yBAAyB;IAC/C,QAAQ,CAAC,sBAAsB;IAC/B,QAAQ,CAAC,gBAAgB;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,mBAAmB;gBANnC,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,mBAAmB,YAAA,EAC9B,UAAU,CAAC,EAAE,yBAAyB,YAAA,EACtC,sBAAsB,+BAAqC,EAC3D,gBAAgB,yBAA+B,EAC/C,aAAa,CAAC,EAAE,mBAAmB,YAAA;IAG9C,iBAAiB,CAAC,IAAI,EAAE,6BAA6B,GAAG,SAAS,GAAG,IAAI;IAIxE,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAIjD,OAAO,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAgtB/E"}
|
|
@@ -2917,6 +2917,55 @@ var FabricToolResultProxy = class {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
};
|
|
2919
2919
|
|
|
2920
|
+
// src/completed-outputs.ts
|
|
2921
|
+
var MAX_ENTRIES = 6;
|
|
2922
|
+
var HEAD_CHARS = 450;
|
|
2923
|
+
var TAIL_CHARS = 250;
|
|
2924
|
+
var TARGET_CHARS = 100;
|
|
2925
|
+
var outputText = (value) => {
|
|
2926
|
+
try {
|
|
2927
|
+
if (typeof value === "string") return value;
|
|
2928
|
+
if (value === null || value === void 0) return void 0;
|
|
2929
|
+
if (typeof value === "object") {
|
|
2930
|
+
const record2 = value;
|
|
2931
|
+
if (typeof record2.output === "string") return record2.output;
|
|
2932
|
+
if (typeof record2.text === "string") return record2.text;
|
|
2933
|
+
return JSON.stringify(value);
|
|
2934
|
+
}
|
|
2935
|
+
return String(value);
|
|
2936
|
+
} catch {
|
|
2937
|
+
return void 0;
|
|
2938
|
+
}
|
|
2939
|
+
};
|
|
2940
|
+
var targetOf = (args) => {
|
|
2941
|
+
const raw = typeof args.path === "string" ? args.path : typeof args.cmd === "string" ? args.cmd : typeof args.command === "string" ? args.command : void 0;
|
|
2942
|
+
if (raw === void 0) return void 0;
|
|
2943
|
+
const line = raw.trim().split("\n", 1)[0] ?? "";
|
|
2944
|
+
if (line === "") return void 0;
|
|
2945
|
+
return line.length <= TARGET_CHARS ? line : `\u2026${line.slice(-(TARGET_CHARS - 1))}`;
|
|
2946
|
+
};
|
|
2947
|
+
var excerpt = (text) => text.length <= HEAD_CHARS + TAIL_CHARS ? text : `${text.slice(0, HEAD_CHARS)}
|
|
2948
|
+
\u2026[${text.length - HEAD_CHARS - TAIL_CHARS} chars omitted]\u2026
|
|
2949
|
+
${text.slice(-TAIL_CHARS)}`;
|
|
2950
|
+
var CompletedOutputJournal = class {
|
|
2951
|
+
#entries = [];
|
|
2952
|
+
record(ref, args, value) {
|
|
2953
|
+
const text = outputText(value);
|
|
2954
|
+
if (text === void 0 || text.trim() === "") return;
|
|
2955
|
+
const target = targetOf(args);
|
|
2956
|
+
this.#entries.push({
|
|
2957
|
+
ref,
|
|
2958
|
+
...target !== void 0 ? { target } : {},
|
|
2959
|
+
chars: text.length,
|
|
2960
|
+
preview: excerpt(text)
|
|
2961
|
+
});
|
|
2962
|
+
if (this.#entries.length > MAX_ENTRIES) this.#entries.shift();
|
|
2963
|
+
}
|
|
2964
|
+
entries() {
|
|
2965
|
+
return [...this.#entries];
|
|
2966
|
+
}
|
|
2967
|
+
};
|
|
2968
|
+
|
|
2920
2969
|
// src/runtime/orchestration.ts
|
|
2921
2970
|
var BLOCKING_ORCHESTRATION_REFS = /* @__PURE__ */ new Set([
|
|
2922
2971
|
"agents.run",
|
|
@@ -3643,6 +3692,12 @@ var FabricExecutionService = class {
|
|
|
3643
3692
|
return value;
|
|
3644
3693
|
}
|
|
3645
3694
|
};
|
|
3695
|
+
const completedOutputs = new CompletedOutputJournal();
|
|
3696
|
+
const journaled = async (ref, args, callContext) => {
|
|
3697
|
+
const value = await invokeAction(ref, args, callContext);
|
|
3698
|
+
if (ref !== "agents.handoff") completedOutputs.record(ref, args, value);
|
|
3699
|
+
return value;
|
|
3700
|
+
};
|
|
3646
3701
|
let sandboxResult;
|
|
3647
3702
|
try {
|
|
3648
3703
|
const runtimeKind = this.config.executor.runtime;
|
|
@@ -3770,7 +3825,7 @@ var FabricExecutionService = class {
|
|
|
3770
3825
|
case "fabric.$call": {
|
|
3771
3826
|
const callArgs = typeof args.args === "object" && args.args !== null && !Array.isArray(args.args) ? args.args : {};
|
|
3772
3827
|
const targetRef = requiredToolsRef("call", args);
|
|
3773
|
-
return
|
|
3828
|
+
return journaled(targetRef, callArgs, callContext);
|
|
3774
3829
|
}
|
|
3775
3830
|
case "fabric.$progress":
|
|
3776
3831
|
return traceAttempt(
|
|
@@ -3866,7 +3921,7 @@ var FabricExecutionService = class {
|
|
|
3866
3921
|
return void 0;
|
|
3867
3922
|
}
|
|
3868
3923
|
default:
|
|
3869
|
-
return
|
|
3924
|
+
return journaled(ref, args, callContext);
|
|
3870
3925
|
}
|
|
3871
3926
|
},
|
|
3872
3927
|
{
|
|
@@ -3905,6 +3960,7 @@ var FabricExecutionService = class {
|
|
|
3905
3960
|
elapsedMs: performance.now() - startedAt,
|
|
3906
3961
|
...sandboxResult.error ? { error: sandboxResult.error } : {},
|
|
3907
3962
|
...handoffRequest ? { handoffRequest } : {},
|
|
3963
|
+
...!succeeded && completedOutputs.entries().length > 0 ? { completedOutputs: completedOutputs.entries() } : {},
|
|
3908
3964
|
...classifierUsages.length > 0 ? { usage: aggregateUsage(classifierUsages) } : {}
|
|
3909
3965
|
};
|
|
3910
3966
|
}
|