@skydiveai/pi-extensions 0.1.254-beta.9 → 0.1.254
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/dist/index.d.mts +3 -47
- package/dist/index.mjs +3345 -2675
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -139,7 +139,7 @@ declare function platformExtensions({
|
|
|
139
139
|
}): ExtensionFactory[];
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/tool-update-loop.d.ts
|
|
142
|
-
type SessionLike
|
|
142
|
+
type SessionLike = {
|
|
143
143
|
reload: () => Promise<void>;
|
|
144
144
|
bindExtensions: (vars: Record<string, unknown>) => Promise<void>;
|
|
145
145
|
sendCustomMessage: (msg: {
|
|
@@ -153,7 +153,7 @@ type SessionLike$1 = {
|
|
|
153
153
|
};
|
|
154
154
|
type SessionWithAgent = {
|
|
155
155
|
agent: unknown;
|
|
156
|
-
} & SessionLike
|
|
156
|
+
} & SessionLike;
|
|
157
157
|
declare function installToolUpdateAutoStop({
|
|
158
158
|
session,
|
|
159
159
|
log
|
|
@@ -164,53 +164,9 @@ declare function installToolUpdateAutoStop({
|
|
|
164
164
|
declare function runToolUpdateLoop({
|
|
165
165
|
session,
|
|
166
166
|
log
|
|
167
|
-
}: {
|
|
168
|
-
session: SessionLike$1;
|
|
169
|
-
log: Logger;
|
|
170
|
-
}): Promise<void>;
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/closing-text-loop.d.ts
|
|
173
|
-
type TextBlock = {
|
|
174
|
-
type: 'text';
|
|
175
|
-
text?: string;
|
|
176
|
-
};
|
|
177
|
-
type ContentBlock = TextBlock | {
|
|
178
|
-
type: string;
|
|
179
|
-
};
|
|
180
|
-
type SessionMessage = {
|
|
181
|
-
role: string;
|
|
182
|
-
content?: string | ContentBlock[];
|
|
183
|
-
stopReason?: string;
|
|
184
|
-
};
|
|
185
|
-
type SessionLike = {
|
|
186
|
-
messages: SessionMessage[];
|
|
187
|
-
sendCustomMessage: (msg: {
|
|
188
|
-
customType: string;
|
|
189
|
-
content: string;
|
|
190
|
-
display: boolean;
|
|
191
|
-
details: Record<string, unknown>;
|
|
192
|
-
}, options: {
|
|
193
|
-
triggerTurn: boolean;
|
|
194
|
-
}) => Promise<void>;
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* True when the assistant produced no visible text since the human's last
|
|
198
|
-
* message this turn — i.e. the turn ended on tool calls / thinking only.
|
|
199
|
-
*
|
|
200
|
-
* We scan from the end back to the most recent `user` message (the human turn
|
|
201
|
-
* that triggered this run) and inspect every `assistant` message after it.
|
|
202
|
-
* A string-content assistant message (rare, but pi allows it) counts as text
|
|
203
|
-
* when non-blank. `toolResult` and custom messages are ignored.
|
|
204
|
-
*/
|
|
205
|
-
declare function turnEndedWithoutVisibleText(messages: readonly SessionMessage[]): boolean;
|
|
206
|
-
declare function runClosingTextLoop({
|
|
207
|
-
session,
|
|
208
|
-
log,
|
|
209
|
-
enabled
|
|
210
167
|
}: {
|
|
211
168
|
session: SessionLike;
|
|
212
169
|
log: Logger;
|
|
213
|
-
enabled?: boolean;
|
|
214
170
|
}): Promise<void>;
|
|
215
171
|
//#endregion
|
|
216
|
-
export { type CreateHarnessOptions, all, createHarness, createHealthHandler, createPlatformEnvMiddleware, installToolUpdateAutoStop, isPlatformConfigLoaded, loadPlatformConfig, localToolsExtension, _default as mcpExtension, memoryExtension, platformExtensions, providerApiCompatExtension,
|
|
172
|
+
export { type CreateHarnessOptions, all, createHarness, createHealthHandler, createPlatformEnvMiddleware, installToolUpdateAutoStop, isPlatformConfigLoaded, loadPlatformConfig, localToolsExtension, _default as mcpExtension, memoryExtension, platformExtensions, providerApiCompatExtension, runToolUpdateLoop, soulExtension, toolCallEnvExtension };
|