fix(pi): serialize write-leased tool batches
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import path from 'node:path';
|
||||
import { atomicWriteText } from '../../../coding-projects/atomic-json';
|
||||
|
||||
export const MAKELORE_PI_EXTENSION_VERSION = 4;
|
||||
export const MAKELORE_PI_EXTENSION_VERSION = 5;
|
||||
export const MAKELORE_PI_EXTENSION_FILENAME = `makelore-runtime-v${MAKELORE_PI_EXTENSION_VERSION}.mjs`;
|
||||
|
||||
const BUNDLE_SOURCE = String.raw`
|
||||
@@ -172,12 +172,13 @@ export function createMakeloreRuntime(runtimeDefaults = {}) {
|
||||
return response.result;
|
||||
}
|
||||
|
||||
function registerProductTool(name, label, description, parameters) {
|
||||
function registerProductTool(name, label, description, parameters, projectWriteLease = false) {
|
||||
pi.registerTool({
|
||||
name,
|
||||
label,
|
||||
description,
|
||||
parameters,
|
||||
...(projectWriteLease ? { executionMode: 'sequential' } : {}),
|
||||
async execute(toolCallId, params, signal) {
|
||||
return await invokeProduct(toolCallId, name, params, signal);
|
||||
},
|
||||
@@ -219,6 +220,7 @@ export function createMakeloreRuntime(runtimeDefaults = {}) {
|
||||
declaration.label,
|
||||
declaration.description,
|
||||
declaration.inputSchema,
|
||||
dynamicLeaseTools.has(declaration.name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1416,7 +1416,7 @@ export async function runFinalAsarExtensionProof(): Promise<PiReleaseExtensionPr
|
||||
providerRequests: requestCounts,
|
||||
subagentStatus: 'complete',
|
||||
subagentSummary: 'REAL_CHILD_COMPLETE',
|
||||
materializedExtension: 'makelore-runtime-v4.mjs',
|
||||
materializedExtension: 'makelore-runtime-v5.mjs',
|
||||
providerFirstEventDelayMs: PROOF_PROVIDER_FIRST_EVENT_DELAY_MS,
|
||||
managedTurns,
|
||||
managedWorkerMilestones: composition.telemetry,
|
||||
|
||||
Reference in New Issue
Block a user