create-principles-disciple 1.150.2 → 1.150.3
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/_release/product-identity.json +1 -1
- package/codex-adapter/package.json +1 -1
- package/core/dist/runtime/activation/adaptive-selection-output.d.ts +35 -0
- package/core/dist/runtime/activation/adaptive-selection-output.d.ts.map +1 -0
- package/core/dist/runtime/activation/adaptive-selection-output.js +38 -0
- package/core/dist/runtime/activation/adaptive-selection-output.js.map +1 -0
- package/core/dist/runtime/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.js +89 -27
- package/core/dist/runtime/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/context-budget.d.ts +49 -0
- package/core/dist/runtime/adapter/context-budget.d.ts.map +1 -0
- package/core/dist/runtime/adapter/context-budget.js +127 -0
- package/core/dist/runtime/adapter/context-budget.js.map +1 -0
- package/core/dist/runtime/adapter/output-schema-registry.d.ts.map +1 -1
- package/core/dist/runtime/adapter/output-schema-registry.js +7 -0
- package/core/dist/runtime/adapter/output-schema-registry.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +30 -7
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +467 -206
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +5 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/package.json +1 -1
- package/host-runtime/dist/adaptive-selection.d.ts +3 -1
- package/host-runtime/dist/adaptive-selection.js +38 -9
- package/host-runtime/dist/production-rulehost-gate.js +21 -1
- package/package.json +2 -2
- package/plugin/dist/bundle.js +464 -508
- package/plugin/dist/hooks/gate.d.ts +1 -1
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/release-manager/package.json +1 -1
|
@@ -57,8 +57,6 @@ export interface PiAiRuntimeAdapterConfig {
|
|
|
57
57
|
* append-only configuration surface.
|
|
58
58
|
*/
|
|
59
59
|
systemPrompt?: string;
|
|
60
|
-
/** Internal override for the retry delay backoff, primarily for fast unit testing. */
|
|
61
|
-
_testBackoffDelayMs?: number;
|
|
62
60
|
/**
|
|
63
61
|
* Optional outbound HTTP fetch override applied at EVERY completeSimple
|
|
64
62
|
* boundary (PRI-966 G2 P1-01): callers that must enforce a request budget at
|
|
@@ -70,9 +68,24 @@ export interface PiAiRuntimeAdapterConfig {
|
|
|
70
68
|
*/
|
|
71
69
|
fetch?: FetchFunction;
|
|
72
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* S3: recover the HTTP status from pi-ai's composed provider error message.
|
|
73
|
+
*
|
|
74
|
+
* pi-ai stops carrying the structured status once a failure becomes
|
|
75
|
+
* `AssistantMessage{stopReason:'error'}`, but `formatProviderError` builds the
|
|
76
|
+
* message as `<status>: <body>` (or `<prefix> (<status>): <body>`), so the
|
|
77
|
+
* status is still available without wrapping `fetch` and without inventing a
|
|
78
|
+
* second HTTP observation channel.
|
|
79
|
+
*/
|
|
80
|
+
export declare function extractProviderHttpStatus(rawMessage: string): number | undefined;
|
|
73
81
|
export declare class PiAiRuntimeAdapter implements PDRuntimeAdapter {
|
|
74
82
|
private readonly config;
|
|
75
83
|
private readonly runs;
|
|
84
|
+
/**
|
|
85
|
+
* S1: one controller per in-flight run. cancelRun() aborts it; startRun()
|
|
86
|
+
* clears it in `finally` so a finished run can never be aborted afterwards.
|
|
87
|
+
*/
|
|
88
|
+
private readonly abortControllers;
|
|
76
89
|
private readonly eventEmitter;
|
|
77
90
|
private readonly runtimeKind;
|
|
78
91
|
private readonly defaultCapabilities;
|
|
@@ -160,14 +173,24 @@ export declare class PiAiRuntimeAdapter implements PDRuntimeAdapter {
|
|
|
160
173
|
* Returns extracted text response or null if no content.
|
|
161
174
|
* Reuses same provider/model/apiKey as the original call.
|
|
162
175
|
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
176
|
+
* S1: the repair call inherits the run's REMAINING time budget instead of a
|
|
177
|
+
* fresh fixed 60s allowance. Before this, a repair request could outlive the
|
|
178
|
+
* run's own deadline by up to a minute, so the run "timed out" long after the
|
|
179
|
+
* caller stopped waiting for it.
|
|
166
180
|
*/
|
|
167
181
|
private repairLLMCall;
|
|
168
182
|
/**
|
|
169
|
-
* Call pi-ai complete()
|
|
170
|
-
*
|
|
183
|
+
* Call pi-ai complete().
|
|
184
|
+
*
|
|
185
|
+
* S2: transport retries belong to pi-ai. It already knows which failures are
|
|
186
|
+
* retryable (408/409/429/5xx, `x-should-retry`, `retry-after`) and how long
|
|
187
|
+
* to wait, and its wait is abortable. PD therefore passes `maxRetries` /
|
|
188
|
+
* `maxRetryDelayMs` instead of running its own loop, so one logical failure
|
|
189
|
+
* can no longer cost both layers' retries.
|
|
190
|
+
*
|
|
191
|
+
* The only PD-side retry left is the PRI-1011 output-budget downshift: that
|
|
192
|
+
* is a parameter fix pi-ai cannot infer, and each step strictly shrinks the
|
|
193
|
+
* budget, so the ladder terminates by construction.
|
|
171
194
|
*/
|
|
172
195
|
private completeWithRetry;
|
|
173
196
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi-ai-runtime-adapter.d.ts","sourceRoot":"","sources":["../../../src/runtime/adapter/pi-ai-runtime-adapter.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAgF,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMzI,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"pi-ai-runtime-adapter.d.ts","sourceRoot":"","sources":["../../../src/runtime/adapter/pi-ai-runtime-adapter.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAgF,aAAa,EAAE,MAAM,uBAAuB,CAAC;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