@skydiveai/pi-extensions 0.1.0-beta.330 → 0.1.0-beta.3303
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 +10 -0
- package/dist/index.d.mts +56 -3
- package/dist/index.mjs +2560 -929
- package/package.json +2 -9
package/README.md
CHANGED
|
@@ -14,6 +14,16 @@ Extensions (load agent workspace content):
|
|
|
14
14
|
daemon session tracking, sandbox heartbeats, OTel self-tracing. Every
|
|
15
15
|
session must include these.
|
|
16
16
|
|
|
17
|
+
Proactive evaluation sessions additionally receive `submit_proactive_action_result`.
|
|
18
|
+
The tool schema comes from the authenticated sandbox API, which validates and
|
|
19
|
+
stores the result for the originating evaluation. Ordinary sessions do not
|
|
20
|
+
discover or register this tool. Submission does not deliver a message; the
|
|
21
|
+
worker reconciles it only after the run succeeds.
|
|
22
|
+
|
|
23
|
+
The native tool reaches agents through the normal reviewed pi-extensions
|
|
24
|
+
release and opt-in harness upgrade, not by rewriting their harness files.
|
|
25
|
+
Already-started v1/v2/v3 evaluations retain text-result compatibility.
|
|
26
|
+
|
|
17
27
|
Platform layer:
|
|
18
28
|
|
|
19
29
|
- `createHarness` — composes @skydiveai/pi-server's protocol handlers
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { A2AOptions, Middleware, ProtocolsOptions } from "@skydiveai/pi-server";
|
|
2
2
|
import { ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { Type } from "typebox";
|
|
4
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
3
5
|
import { Logger } from "pino";
|
|
4
6
|
|
|
5
7
|
//#region src/harness.d.ts
|
|
@@ -83,6 +85,13 @@ declare const _default: ExtensionFactory;
|
|
|
83
85
|
//#region src/extensions/memory.d.ts
|
|
84
86
|
declare const memoryExtension: ExtensionFactory;
|
|
85
87
|
//#endregion
|
|
88
|
+
//#region src/extensions/provider-api-compat.d.ts
|
|
89
|
+
/**
|
|
90
|
+
* Keep older harnesses compatible with provider-native model specs that use
|
|
91
|
+
* the OpenAI-compatible wire through the transparent proxy.
|
|
92
|
+
*/
|
|
93
|
+
declare const providerApiCompatExtension: ExtensionFactory;
|
|
94
|
+
//#endregion
|
|
86
95
|
//#region src/extensions/soul.d.ts
|
|
87
96
|
declare const soulExtension: ExtensionFactory;
|
|
88
97
|
//#endregion
|
|
@@ -112,7 +121,7 @@ declare function platformExtensions({
|
|
|
112
121
|
}): ExtensionFactory[];
|
|
113
122
|
//#endregion
|
|
114
123
|
//#region src/tool-update-loop.d.ts
|
|
115
|
-
type SessionLike = {
|
|
124
|
+
type SessionLike$1 = {
|
|
116
125
|
reload: () => Promise<void>;
|
|
117
126
|
bindExtensions: (vars: Record<string, unknown>) => Promise<void>;
|
|
118
127
|
sendCustomMessage: (msg: {
|
|
@@ -126,7 +135,7 @@ type SessionLike = {
|
|
|
126
135
|
};
|
|
127
136
|
type SessionWithAgent = {
|
|
128
137
|
agent: unknown;
|
|
129
|
-
} & SessionLike;
|
|
138
|
+
} & SessionLike$1;
|
|
130
139
|
declare function installToolUpdateAutoStop({
|
|
131
140
|
session,
|
|
132
141
|
log
|
|
@@ -137,9 +146,53 @@ declare function installToolUpdateAutoStop({
|
|
|
137
146
|
declare function runToolUpdateLoop({
|
|
138
147
|
session,
|
|
139
148
|
log
|
|
149
|
+
}: {
|
|
150
|
+
session: SessionLike$1;
|
|
151
|
+
log: Logger;
|
|
152
|
+
}): Promise<void>;
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/closing-text-loop.d.ts
|
|
155
|
+
type TextBlock = {
|
|
156
|
+
type: 'text';
|
|
157
|
+
text?: string;
|
|
158
|
+
};
|
|
159
|
+
type ContentBlock = TextBlock | {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
type SessionMessage = {
|
|
163
|
+
role: string;
|
|
164
|
+
content?: string | ContentBlock[];
|
|
165
|
+
stopReason?: string;
|
|
166
|
+
};
|
|
167
|
+
type SessionLike = {
|
|
168
|
+
messages: SessionMessage[];
|
|
169
|
+
sendCustomMessage: (msg: {
|
|
170
|
+
customType: string;
|
|
171
|
+
content: string;
|
|
172
|
+
display: boolean;
|
|
173
|
+
details: Record<string, unknown>;
|
|
174
|
+
}, options: {
|
|
175
|
+
triggerTurn: boolean;
|
|
176
|
+
}) => Promise<void>;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* True when the assistant produced no visible text since the human's last
|
|
180
|
+
* message this turn — i.e. the turn ended on tool calls / thinking only.
|
|
181
|
+
*
|
|
182
|
+
* We scan from the end back to the most recent `user` message (the human turn
|
|
183
|
+
* that triggered this run) and inspect every `assistant` message after it.
|
|
184
|
+
* A string-content assistant message (rare, but pi allows it) counts as text
|
|
185
|
+
* when non-blank. `toolResult` and custom messages are ignored.
|
|
186
|
+
*/
|
|
187
|
+
declare function turnEndedWithoutVisibleText(messages: readonly SessionMessage[]): boolean;
|
|
188
|
+
declare function runClosingTextLoop({
|
|
189
|
+
session,
|
|
190
|
+
log,
|
|
191
|
+
enabled
|
|
140
192
|
}: {
|
|
141
193
|
session: SessionLike;
|
|
142
194
|
log: Logger;
|
|
195
|
+
enabled?: boolean;
|
|
143
196
|
}): Promise<void>;
|
|
144
197
|
//#endregion
|
|
145
|
-
export { type CreateHarnessOptions, all, createHarness, createHealthHandler, createPlatformEnvMiddleware, installToolUpdateAutoStop, isPlatformConfigLoaded, loadPlatformConfig, localToolsExtension, _default as mcpExtension, memoryExtension, platformExtensions, runToolUpdateLoop, soulExtension, toolCallEnvExtension };
|
|
198
|
+
export { type CreateHarnessOptions, all, createHarness, createHealthHandler, createPlatformEnvMiddleware, installToolUpdateAutoStop, isPlatformConfigLoaded, loadPlatformConfig, localToolsExtension, _default as mcpExtension, memoryExtension, platformExtensions, providerApiCompatExtension, runClosingTextLoop, runToolUpdateLoop, soulExtension, toolCallEnvExtension, turnEndedWithoutVisibleText };
|