supipowers 2.0.0 → 2.0.1
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/package.json
CHANGED
package/src/mempalace/bridge.ts
CHANGED
|
@@ -54,6 +54,14 @@ function mergeDiagnostics(...parts: Array<Record<string, unknown> | undefined>):
|
|
|
54
54
|
return Object.assign({}, ...parts.filter(Boolean));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
function resolveToolTimeoutMs(params: MempalaceParams, bridgeTimeoutMs: number): number {
|
|
58
|
+
if (typeof params.timeout !== "number") return bridgeTimeoutMs;
|
|
59
|
+
|
|
60
|
+
// Public tool schemas express timeouts in seconds, matching the rest of the
|
|
61
|
+
// OMP tool surface. The bridge runner uses milliseconds internally.
|
|
62
|
+
return Math.min(params.timeout * 1000, bridgeTimeoutMs);
|
|
63
|
+
}
|
|
64
|
+
|
|
57
65
|
export function createMempalaceBridge(options: CreateMempalaceBridgeOptions): MempalaceBridgeFacade {
|
|
58
66
|
const resolveBridge = options.runtime?.resolveBridgeScriptPath ?? (() => resolveBridgeScriptPath());
|
|
59
67
|
const runBridge = options.runtime?.runBridgeRequest ?? runBridgeRequest;
|
|
@@ -71,9 +79,7 @@ export function createMempalaceBridge(options: CreateMempalaceBridgeOptions): Me
|
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
const venv = resolveManagedVenvPaths(options.config.managedVenvPath);
|
|
74
|
-
const timeoutMs =
|
|
75
|
-
? Math.min(params.timeout, options.config.timeouts.bridgeMs)
|
|
76
|
-
: options.config.timeouts.bridgeMs;
|
|
82
|
+
const timeoutMs = resolveToolTimeoutMs(params, options.config.timeouts.bridgeMs);
|
|
77
83
|
const palacePath = params.palace ?? options.config.palacePath;
|
|
78
84
|
const runResult = await runBridge({
|
|
79
85
|
pythonPath: venv.python,
|
|
@@ -176,8 +176,8 @@ export function steerMempalaceInitialization(
|
|
|
176
176
|
"",
|
|
177
177
|
"Please initialize and seed memory for this project by running these tool calls in order:",
|
|
178
178
|
"",
|
|
179
|
-
`1. \`mempalace(action="init", dir=".", yes=true)\` — register this project's wing in the palace.`,
|
|
180
|
-
`2. \`mempalace(action="mine", dir=".", limit=20)\` — seed initial drawers from project files.`,
|
|
179
|
+
`1. \`mempalace(action="init", dir=".", yes=true, timeout=30)\` — register this project's wing in the palace.`,
|
|
180
|
+
`2. \`mempalace(action="mine", dir=".", limit=20, timeout=30)\` — seed initial drawers from project files.`,
|
|
181
181
|
"",
|
|
182
182
|
"Step 2 is recommended but optional; skip it if the user prefers an empty wing or is mid-task. After running, summarize what was indexed.",
|
|
183
183
|
].join("\n");
|
package/src/mempalace/schema.ts
CHANGED
|
@@ -201,7 +201,11 @@ export const mempalaceToolParameters = {
|
|
|
201
201
|
include_ignored: { type: "boolean" },
|
|
202
202
|
no_gitignore: { type: "boolean" },
|
|
203
203
|
yes: { type: "boolean" },
|
|
204
|
-
timeout: {
|
|
204
|
+
timeout: {
|
|
205
|
+
type: "integer",
|
|
206
|
+
minimum: 1,
|
|
207
|
+
description: "Optional bridge timeout in seconds; capped by the configured MemPalace bridge timeout.",
|
|
208
|
+
},
|
|
205
209
|
},
|
|
206
210
|
required: ["action"],
|
|
207
211
|
} as const;
|