pi-ui-extend 0.1.77 → 0.1.78
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/app/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionManager, type EventBus, type AgentSessionRuntime, type LoadExtensionsResult, type SessionEntry } from "@earendil-works/pi-coding-agent";
|
|
1
|
+
import { SessionManager, type EventBus, type AgentSessionRuntime, type AgentSessionServices, type LoadExtensionsResult, type SessionEntry } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { type PixConfig } from "../config.js";
|
|
3
3
|
import type { AppOptions, ThinkingLevel } from "./types.js";
|
|
4
4
|
export type PiToolsSuiteInstallAction = "installed" | "already-installed" | "existing-kept" | "missing-source";
|
|
@@ -46,5 +46,6 @@ type RuntimeSessionManagerModelState = Pick<SessionManager, "getEntries" | "getB
|
|
|
46
46
|
export declare function resolvePixRuntimeModelRef(options: Pick<AppOptions, "modelRef">, sessionManager: RuntimeSessionManagerModelState, config?: PixConfig): string | undefined;
|
|
47
47
|
export declare function resolvePixRuntimeInitialThinkingLevel(options: Pick<AppOptions, "modelRef">, sessionManager: RuntimeSessionManagerModelState, config: PixConfig): ThinkingLevel | undefined;
|
|
48
48
|
export declare function resolveSessionModelRefFromTail(entries: readonly SessionEntry[]): string | undefined;
|
|
49
|
+
export declare function refreshPixModelRuntimeForStartup(modelRuntime: Pick<AgentSessionServices["modelRuntime"], "refresh">): Promise<void>;
|
|
49
50
|
export declare function createPixRuntime(options: AppOptions, runtimeOptions?: CreatePixRuntimeOptions): Promise<AgentSessionRuntime>;
|
|
50
51
|
export {};
|
package/dist/app/runtime.js
CHANGED
|
@@ -235,6 +235,11 @@ export function resolveSessionModelRefFromTail(entries) {
|
|
|
235
235
|
return undefined;
|
|
236
236
|
return thinkingLevel ? `${modelRef}:${thinkingLevel}` : modelRef;
|
|
237
237
|
}
|
|
238
|
+
export async function refreshPixModelRuntimeForStartup(modelRuntime) {
|
|
239
|
+
// Startup only needs the locally configured model catalog. Remote catalog
|
|
240
|
+
// refreshes belong to explicit model-management flows and must not block boot.
|
|
241
|
+
await modelRuntime.refresh({ allowNetwork: false });
|
|
242
|
+
}
|
|
238
243
|
export async function createPixRuntime(options, runtimeOptions = {}) {
|
|
239
244
|
const agentDir = getAgentDir();
|
|
240
245
|
const reusableServices = reusableRuntimeServices(runtimeOptions.reuseServicesFrom, options.cwd, agentDir);
|
|
@@ -256,7 +261,7 @@ export async function createPixRuntime(options, runtimeOptions = {}) {
|
|
|
256
261
|
config,
|
|
257
262
|
...(runtimeOptions.eventBus === undefined ? {} : { eventBus: runtimeOptions.eventBus }),
|
|
258
263
|
});
|
|
259
|
-
await services.modelRuntime
|
|
264
|
+
await refreshPixModelRuntimeForStartup(services.modelRuntime);
|
|
260
265
|
const model = parsedModel ? services.modelRuntime.getModel(parsedModel.provider, parsedModel.modelId) : undefined;
|
|
261
266
|
if (parsedModel && !model) {
|
|
262
267
|
throw new Error(`Model not found: ${parsedModel.provider}/${parsedModel.modelId}`);
|
|
@@ -221,10 +221,10 @@ export const TODO_TOOL_DESCRIPTION: ToolDescription = {
|
|
|
221
221
|
"Use `todo` for complex work with 3+ steps, explicit user task lists, or new non-trivial requirements. Skip single trivial tasks and purely conversational requests.",
|
|
222
222
|
"For multi-step implementation/debugging plans, include a final user-facing report todo in the initial plan with acceptance criteria for changed files/behavior, verification results, and remaining manual actions; close it immediately before the final response, never via compression.",
|
|
223
223
|
"When create or batch_create already sets the intended status, do not issue a redundant update with the same status; continue the work instead.",
|
|
224
|
-
"Resync before continuing when user/new findings change scope, requirements, safety, feasibility, approach, dependencies, or order
|
|
224
|
+
"Resync before continuing when user/new findings change scope, requirements, safety, feasibility, approach, dependencies, or order. Before creating tasks, review pending/deferred todos; when work resumes, reactivate and reuse an equivalent deferred todo instead of duplicating it.",
|
|
225
225
|
"Update todos when starting, finishing, blocking, splitting, abandoning, or materially changing a step; before planned work mark exactly one in_progress with activeForm and complete it only after verification.",
|
|
226
226
|
"If partial, tests fail, or blocked, keep the task in_progress and add/update a blocker. Never use `clear`, `delete`, or batch deletion to hide unfinished/stale/forgotten todos; delete only on explicit request or creation mistake.",
|
|
227
|
-
"Before a final response
|
|
227
|
+
"Before a final response, list and reconcile all visible todos, including deferred ones: complete any whose outcome was achieved elsewhere, and leave deferred only genuinely unfinished or intentionally out of scope, mentioning each in the response. Do not finish with stale/duplicate deferred todos or a just-finished item in_progress.",
|
|
228
228
|
"Keep subjects short; use parentId/blockers for hierarchy/dependencies. For large explicit plans use batch_create/batch_update but keep exactly one visible in_progress unless asked otherwise; use batch_create replace:true only for superseding plans.",
|
|
229
229
|
"list hides tombstones unless includeDeleted:true; use status/blockedOnly only when needed; export/import for handoff, import replace:true only when explicitly overwriting; when all visible todos complete, state clears automatically.",
|
|
230
230
|
"Persistence: `/todos persist on|off|status` or `/todos-persist on|off|status`; on resume, ask in-scope ids and run `/todos scope <id...>` or `/todos-scope <id...>` so out-of-scope active tasks are deferred.",
|
package/package.json
CHANGED