@themoltnet/pi-extension 0.36.0 → 0.36.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/dist/index.d.ts +2 -2
- package/dist/index.js +10 -7
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -500,7 +500,7 @@ export declare interface ExecutePiTaskOptions {
|
|
|
500
500
|
* distinct from daemon attempt retry: the active session keeps its context and
|
|
501
501
|
* receives a short continuation prompt.
|
|
502
502
|
*
|
|
503
|
-
* Default `
|
|
503
|
+
* Default `4`. Set to `0` to disable.
|
|
504
504
|
*/
|
|
505
505
|
maxProviderErrorRetries?: number;
|
|
506
506
|
/** Base delay for same-session provider-error retries. Default `2000`. */
|
|
@@ -547,7 +547,7 @@ export declare interface ExecutePiTaskOptions {
|
|
|
547
547
|
* Resolve the main worktree root (where .moltnet/ lives — it's untracked,
|
|
548
548
|
* only exists in the main worktree, not in git worktrees).
|
|
549
549
|
*/
|
|
550
|
-
export declare function findMainWorktree(): string;
|
|
550
|
+
export declare function findMainWorktree(startPath?: string): string;
|
|
551
551
|
|
|
552
552
|
/**
|
|
553
553
|
* The gate's verdict:
|
package/dist/index.js
CHANGED
|
@@ -12103,7 +12103,7 @@ var BUILT_IN_TASK_TYPES = {
|
|
|
12103
12103
|
outputKind: "artifact",
|
|
12104
12104
|
resumable: true,
|
|
12105
12105
|
workspaceMode: "shared_mount",
|
|
12106
|
-
workspaceScope: "
|
|
12106
|
+
workspaceScope: "attempt",
|
|
12107
12107
|
sessionScope: "correlation",
|
|
12108
12108
|
acceptsInputWorkspaceOverride: true,
|
|
12109
12109
|
requiresReferences: false,
|
|
@@ -14968,7 +14968,7 @@ var IsoTimestamp = String$1({ format: "date-time" });
|
|
|
14968
14968
|
/**
|
|
14969
14969
|
* Canonical claim-condition bounds. Single source of truth consumed by the wire
|
|
14970
14970
|
* schema here, the server-side depth validator (`libs/task-service`), and
|
|
14971
|
-
* downstream builders (`@
|
|
14971
|
+
* downstream builders (`@themoltnet/tasks-orchestrator` `joinCondition`) so limits can
|
|
14972
14972
|
* never drift into conditions the server rejects.
|
|
14973
14973
|
*/
|
|
14974
14974
|
var MAX_CLAIM_CONDITION_BRANCHES = 8;
|
|
@@ -20129,10 +20129,12 @@ var AutoParentMemoryProvider = class extends MemoryProvider {
|
|
|
20129
20129
|
* Resolve the main worktree root (where .moltnet/ lives — it's untracked,
|
|
20130
20130
|
* only exists in the main worktree, not in git worktrees).
|
|
20131
20131
|
*/
|
|
20132
|
-
function findMainWorktree() {
|
|
20132
|
+
function findMainWorktree(startPath = process.cwd()) {
|
|
20133
20133
|
let output;
|
|
20134
20134
|
try {
|
|
20135
20135
|
output = execFileSync("git", [
|
|
20136
|
+
"-C",
|
|
20137
|
+
startPath,
|
|
20136
20138
|
"worktree",
|
|
20137
20139
|
"list",
|
|
20138
20140
|
"--porcelain"
|
|
@@ -32571,7 +32573,7 @@ function prepareTaskWorkspace(task, requestedMountPath, executionPlan) {
|
|
|
32571
32573
|
branch: null,
|
|
32572
32574
|
cleanup: () => {}
|
|
32573
32575
|
};
|
|
32574
|
-
const mainRepo = findMainWorktreeForDedicatedTask();
|
|
32576
|
+
const mainRepo = findMainWorktreeForDedicatedTask(requestedMountPath);
|
|
32575
32577
|
const worktreeDir = resolveTaskWorktreePath(mainRepo, executionPlan?.workspaceId ?? `task-${task.id}`);
|
|
32576
32578
|
const relMount = relative(mainRepo, requestedMountPath);
|
|
32577
32579
|
const cwdPath = relMount === "" || relMount.startsWith("..") ? worktreeDir : join(worktreeDir, relMount);
|
|
@@ -32674,9 +32676,9 @@ function gitRefExists(mainRepo, ref) {
|
|
|
32674
32676
|
return false;
|
|
32675
32677
|
}
|
|
32676
32678
|
}
|
|
32677
|
-
function findMainWorktreeForDedicatedTask() {
|
|
32679
|
+
function findMainWorktreeForDedicatedTask(startPath) {
|
|
32678
32680
|
try {
|
|
32679
|
-
return findMainWorktree();
|
|
32681
|
+
return findMainWorktree(startPath);
|
|
32680
32682
|
} catch (err) {
|
|
32681
32683
|
const message = err instanceof Error ? err.message : String(err);
|
|
32682
32684
|
throw new Error(`Dedicated worktree tasks require a git repository: ${message}`);
|
|
@@ -32793,6 +32795,7 @@ function createGondolinToolDefinitions(config) {
|
|
|
32793
32795
|
}
|
|
32794
32796
|
];
|
|
32795
32797
|
}
|
|
32798
|
+
var DEFAULT_PROVIDER_ERROR_RETRIES = 4;
|
|
32796
32799
|
/**
|
|
32797
32800
|
* Factory that builds a pi-specific `executeTask` function suitable for
|
|
32798
32801
|
* injection into `AgentRuntime`. The returned function caches the resolved
|
|
@@ -33277,7 +33280,7 @@ async function executePiTask(claimedTask, reporter, opts) {
|
|
|
33277
33280
|
llmAbort: turnState.llmAbort,
|
|
33278
33281
|
llmErrorMessage: turnState.llmErrorMessage
|
|
33279
33282
|
}),
|
|
33280
|
-
maxRetries: opts.maxProviderErrorRetries ??
|
|
33283
|
+
maxRetries: opts.maxProviderErrorRetries ?? 4,
|
|
33281
33284
|
baseDelayMs: opts.providerErrorRetryBaseDelayMs ?? 2e3,
|
|
33282
33285
|
maxDelayMs: opts.providerErrorRetryMaxDelayMs ?? 3e4,
|
|
33283
33286
|
retryPrompt: opts.providerErrorRetryPrompt ?? "Go on",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/pi-extension",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MoltNet pi extension — sandboxed tool execution in Gondolin VMs with MoltNet identity and persistent memory",
|
|
6
6
|
"keywords": [
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@earendil-works/gondolin": "^0.9.1",
|
|
37
37
|
"@opentelemetry/api": "^1.9.0",
|
|
38
38
|
"typebox": "^1.2.8",
|
|
39
|
+
"@themoltnet/agent-runtime": "0.36.6",
|
|
39
40
|
"@themoltnet/sdk": "0.127.0",
|
|
40
|
-
"@themoltnet/shell-command-analyzer": "0.2.0"
|
|
41
|
-
"@themoltnet/agent-runtime": "0.36.6"
|
|
41
|
+
"@themoltnet/shell-command-analyzer": "0.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@earendil-works/pi-coding-agent": ">=0.74.0",
|