@abelxiaoxing/cadence 2.1.2 → 2.1.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/agents/implementation-worker.md +7 -2
- package/docs/conversation-mode.md +12 -4
- package/docs/reuse-and-distribution.md +20 -12
- package/package.json +1 -1
- package/src/agent-panel-cadence.ts +7 -3
- package/src/agent-panel-model.ts +26 -7
- package/src/cadence-instructions.ts +3 -2
- package/src/cadence-mode.ts +13 -81
- package/src/coordinator-tools.mjs +123 -48
- package/src/model-preview.mjs +11 -2
- package/src/native-build.ts +1 -1
- package/src/sdk-worker.mjs +37 -4
- package/src/service/contracts/workflow.ts +417 -112
- package/src/service-cli.mjs +11 -2
- package/src/service-host.mjs +848 -483
- package/src/worker-model.mjs +35 -1
- package/src/worker-public.mjs +18 -2
- package/src/worker-toolkit.mjs +3 -2
- package/web/dist/assets/cadence.css +1 -1
- package/web/dist/assets/cadence.js +27 -27
- package/web/dist/manifest.json +7 -7
package/src/service-cli.mjs
CHANGED
|
@@ -205,6 +205,7 @@ var LIMITS = Object.freeze({
|
|
|
205
205
|
predecessorBytes: 16 * 1024,
|
|
206
206
|
handoffBytes: 32 * 1024,
|
|
207
207
|
frameBytes: 64 * 1024,
|
|
208
|
+
coordinatorBytes: 384 * 1024,
|
|
208
209
|
chunkBytes: 8 * 1024,
|
|
209
210
|
detailBytes: 32 * 1024 * 1024,
|
|
210
211
|
dataFrames: 1e5,
|
|
@@ -885,14 +886,22 @@ function sourceId(v) {
|
|
|
885
886
|
invalid();
|
|
886
887
|
return s;
|
|
887
888
|
}
|
|
889
|
+
var MODEL_FAILURE_BYTES = 256;
|
|
888
890
|
function decodeModelRetry(v) {
|
|
889
|
-
const o = closed(v, [
|
|
891
|
+
const o = closed(v, [
|
|
892
|
+
"phase",
|
|
893
|
+
"attempt",
|
|
894
|
+
"maxAttempts",
|
|
895
|
+
"delayMs",
|
|
896
|
+
...Object.hasOwn(v ?? {}, "reason") ? ["reason"] : []
|
|
897
|
+
]);
|
|
890
898
|
const maxAttempts = integer(o.maxAttempts, 1);
|
|
891
899
|
const progress = {
|
|
892
900
|
phase: oneOf(o.phase, ["waiting", "requesting"]),
|
|
893
901
|
attempt: integer(o.attempt, 1, maxAttempts),
|
|
894
902
|
maxAttempts,
|
|
895
|
-
delayMs: integer(o.delayMs, 0, 2147483647)
|
|
903
|
+
delayMs: integer(o.delayMs, 0, 2147483647),
|
|
904
|
+
...o.reason === undefined ? {} : { reason: text(o.reason, MODEL_FAILURE_BYTES, true) }
|
|
896
905
|
};
|
|
897
906
|
if (progress.phase === "requesting" && progress.delayMs !== 0)
|
|
898
907
|
throw new ContractError("invalid");
|