supertag-ai 0.2.0-alpha.7 → 0.2.0-alpha.9
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/README.md +7 -6
- package/dist/{chunk-US7635QX.js → chunk-2TIOIPHK.js} +195 -34
- package/dist/chunk-2TIOIPHK.js.map +1 -0
- package/dist/{chunk-NLJT7EUA.js → chunk-3L6EOR7H.js} +44 -27
- package/dist/chunk-3L6EOR7H.js.map +1 -0
- package/dist/{chunk-X5UYJR3C.js → chunk-42JFLS2Z.js} +5 -5
- package/dist/{chunk-X5UYJR3C.js.map → chunk-42JFLS2Z.js.map} +1 -1
- package/dist/{chunk-X2YMYYEO.js → chunk-BMAH7OPW.js} +4 -4
- package/dist/{chunk-X2YMYYEO.js.map → chunk-BMAH7OPW.js.map} +1 -1
- package/dist/{chunk-QTMCVECV.js → chunk-BVEGRZSW.js} +53 -24
- package/dist/chunk-BVEGRZSW.js.map +1 -0
- package/dist/{chunk-7I5O2AQ2.js → chunk-ENOLPSQJ.js} +4 -4
- package/dist/chunk-ENOLPSQJ.js.map +1 -0
- package/dist/{chunk-UE7B7IPC.js → chunk-EWVEN2VN.js} +26 -6
- package/dist/chunk-EWVEN2VN.js.map +1 -0
- package/dist/{chunk-ZTO7N6RJ.js → chunk-IJARBUW6.js} +4 -4
- package/dist/{chunk-ZTO7N6RJ.js.map → chunk-IJARBUW6.js.map} +1 -1
- package/dist/{chunk-FXQ4IGSL.js → chunk-KYJZDU5X.js} +9 -9
- package/dist/{chunk-FXQ4IGSL.js.map → chunk-KYJZDU5X.js.map} +1 -1
- package/dist/{chunk-IQIGPLQB.js → chunk-NMNZPBEC.js} +3 -3
- package/dist/{chunk-IQIGPLQB.js.map → chunk-NMNZPBEC.js.map} +1 -1
- package/dist/{chunk-FGNUARJO.js → chunk-RE2LUNL7.js} +246 -37
- package/dist/chunk-RE2LUNL7.js.map +1 -0
- package/dist/{chunk-5EEBCIHE.js → chunk-TVFNWGDL.js} +3 -3
- package/dist/{chunk-5EEBCIHE.js.map → chunk-TVFNWGDL.js.map} +1 -1
- package/dist/{chunk-PNIEQ6LP.js → chunk-UXUMRFHY.js} +4 -4
- package/dist/{chunk-PNIEQ6LP.js.map → chunk-UXUMRFHY.js.map} +1 -1
- package/dist/{chunk-7U3AHYY3.js → chunk-X7OT2DY4.js} +211 -45
- package/dist/chunk-X7OT2DY4.js.map +1 -0
- package/dist/{chunk-JWO6WMSJ.js → chunk-XJUELJ5M.js} +6 -3
- package/dist/chunk-XJUELJ5M.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/control-plane.d.ts +32 -11
- package/dist/control-plane.js +4 -3
- package/dist/coordination.js +2 -2
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/{cursor-sign-in-YGMDEBZU.js → cursor-sign-in-QZNESCIK.js} +4 -4
- package/dist/{cursor-sign-in-YGMDEBZU.js.map → cursor-sign-in-QZNESCIK.js.map} +1 -1
- package/dist/docs/README.md +16 -15
- package/dist/docs/concepts/README.md +9 -13
- package/dist/docs/concepts/context-and-permissions.md +1 -1
- package/dist/docs/concepts/how-it-works.md +5 -4
- package/dist/docs/concepts/interaction-model.md +3 -3
- package/dist/docs/concepts/multiplayer.md +2 -2
- package/dist/docs/concepts/persistence.md +5 -5
- package/dist/docs/concepts/roles.md +1 -1
- package/dist/docs/concepts/supertag-and-other-agent-systems.md +1 -1
- package/dist/docs/concepts/tags.md +17 -18
- package/dist/docs/concepts/tasks.md +25 -25
- package/dist/docs/concepts/workers.md +1 -1
- package/dist/docs/guides/coding-agent-operator.md +31 -33
- package/dist/docs/guides/custom-context.md +1 -1
- package/dist/docs/guides/custom-workers.md +1 -1
- package/dist/docs/guides/deploy-cloudflare.md +1 -1
- package/dist/docs/guides/deploy-fly.md +10 -6
- package/dist/docs/guides/deploy-modal.md +6 -1
- package/dist/docs/guides/deploy-railway.md +1 -1
- package/dist/docs/guides/deploy-render.md +1 -1
- package/dist/docs/guides/deployment-setup.md +1 -1
- package/dist/docs/guides/first-team.md +15 -5
- package/dist/docs/guides/mcp-tools.md +1 -1
- package/dist/docs/guides/modal-workers.md +89 -25
- package/dist/docs/guides/objective-decisions.md +20 -60
- package/dist/docs/guides/objective-overview.md +12 -12
- package/dist/docs/guides/objectives.md +54 -57
- package/dist/docs/guides/ongoing-responsibilities.md +24 -40
- package/dist/docs/guides/python-workers.md +12 -14
- package/dist/docs/guides/self-hosting.md +2 -2
- package/dist/docs/guides/shared-execution.md +1 -1
- package/dist/docs/guides/tag-messaging.md +15 -1
- package/dist/docs/guides/talk-to-a-tag.md +78 -152
- package/dist/docs/guides/teams.md +38 -24
- package/dist/docs/guides/troubleshooting.md +2 -2
- package/dist/docs/guides/workers.md +1 -1
- package/dist/docs/guides/workspaces.md +2 -2
- package/dist/docs/guides/workstreams.md +13 -13
- package/dist/docs/guides/write-an-objective.md +1 -1
- package/dist/docs/operations/cli.md +31 -7
- package/dist/docs/operations/control-plane.md +4 -4
- package/dist/docs/operations/install.md +23 -25
- package/dist/docs/operations/requirements.md +1 -1
- package/dist/docs/operations/resources.md +1 -1
- package/dist/docs/reference/api-stability.md +2 -2
- package/dist/docs/reference/artifacts.md +1 -1
- package/dist/docs/reference/context-resolution.md +1 -1
- package/dist/docs/reference/control-plane-api.md +63 -20
- package/dist/docs/reference/coordination.md +41 -23
- package/dist/docs/reference/glossary.md +5 -5
- package/dist/docs/reference/iam.md +5 -0
- package/dist/docs/reference/operator-api/README.md +2 -2
- package/dist/docs/reference/operator-api/conversation.md +7 -8
- package/dist/docs/reference/operator-api/event.md +4 -0
- package/dist/docs/reference/operator-api/objective.md +18 -3
- package/dist/docs/reference/operator-api/resource.md +3 -2
- package/dist/docs/reference/operator-api/work.md +1 -1
- package/dist/docs/reference/resource-model.md +10 -11
- package/dist/docs/reference/scheduling-and-recovery.md +1 -1
- package/dist/docs/reference/supertag-yaml.md +2 -2
- package/dist/docs/reference/worker.md +25 -8
- package/dist/docs/surfaces/README.md +1 -1
- package/dist/docs/surfaces/github.md +1 -1
- package/dist/docs/surfaces/lark.md +1 -1
- package/dist/docs/surfaces/linear.md +1 -1
- package/dist/docs/surfaces/slack.md +5 -1
- package/dist/docs/surfaces/teams.md +1 -1
- package/dist/docs/surfaces/worker-tools.md +1 -1
- package/dist/{durable-worklet-DVn2oCzG.d.ts → durable-worklet-BN51DsXG.d.ts} +2 -2
- package/dist/environments/e2b.d.ts +3 -3
- package/dist/environments/e2b.js +3 -3
- package/dist/environments/modal.d.ts +4 -3
- package/dist/environments/modal.js +3 -3
- package/dist/environments/shared-execution.d.ts +2 -2
- package/dist/environments/shared-execution.js +2 -2
- package/dist/harnesses/claude-code.d.ts +2 -2
- package/dist/harnesses/claude-code.js +3 -3
- package/dist/harnesses/codex.d.ts +7 -5
- package/dist/harnesses/codex.js +3 -3
- package/dist/harnesses/cursor.d.ts +3 -3
- package/dist/harnesses/cursor.js +4 -4
- package/dist/harnesses/opencode.d.ts +2 -2
- package/dist/harnesses/opencode.js +3 -3
- package/dist/{harnesses-TZJPHPCT.js → harnesses-EFEACUZM.js} +3 -3
- package/dist/{harnesses-TZJPHPCT.js.map → harnesses-EFEACUZM.js.map} +1 -1
- package/dist/{index-4JwxWljl.d.ts → index-5G-1R7uM.d.ts} +40 -4
- package/dist/{index-u5l3dViP.d.ts → index-BS7hoEqj.d.ts} +3 -3
- package/dist/{index-Csw9kVep.d.ts → index-Cc-Cx_Wf.d.ts} +13 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/{mcp-custom-tools-DmMU_jnU.d.ts → mcp-custom-tools-BND99DWZ.d.ts} +1 -1
- package/dist/{opencode-sign-in-TCOKDJYH.js → opencode-sign-in-23JNPKLZ.js} +4 -4
- package/dist/{opencode-sign-in-TCOKDJYH.js.map → opencode-sign-in-23JNPKLZ.js.map} +1 -1
- package/dist/resources/github.d.ts +19 -7
- package/dist/resources/github.js +3 -3
- package/dist/runner.d.ts +3 -3
- package/dist/runner.js +3 -3
- package/dist/{sandbox-workspace-environment-CvpuiK5H.d.ts → sandbox-workspace-environment-DgcGEy4v.d.ts} +4 -2
- package/dist/spec/objectives.md +5 -0
- package/dist/spec/proto/supertag/operator/v1/conversation.proto +7 -9
- package/dist/spec/proto/supertag/operator/v1/event.proto +7 -0
- package/dist/spec/proto/supertag/operator/v1/objective.proto +22 -3
- package/dist/spec/proto/supertag/operator/v1/resource.proto +3 -2
- package/dist/spec/proto/supertag/operator/v1/work.proto +1 -1
- package/dist/{src-AABARFVT.js → src-63ZSFZ4C.js} +5 -5
- package/dist/src-63ZSFZ4C.js.map +1 -0
- package/dist/{src-JBYMQTOH.js → src-7BTXTRKI.js} +6 -6
- package/dist/src-7BTXTRKI.js.map +1 -0
- package/dist/src-DCQ22HEA.js +6 -0
- package/dist/src-DCQ22HEA.js.map +1 -0
- package/dist/{src-PVNGXKKZ.js → src-PL6HXN4U.js} +5 -5
- package/dist/{src-PVNGXKKZ.js.map → src-PL6HXN4U.js.map} +1 -1
- package/dist/{src-NZYS6TFE.js → src-VOMXRMGL.js} +8279 -5598
- package/dist/src-VOMXRMGL.js.map +1 -0
- package/dist/{src-NSMNFU2H.js → src-ZCWK5Q6C.js} +5 -5
- package/dist/src-ZCWK5Q6C.js.map +1 -0
- package/dist/surfaces.d.ts +12 -1
- package/dist/surfaces.js +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +5 -4
- package/dist/testing.js.map +1 -1
- package/dist/transport.d.ts +5 -5
- package/dist/transport.js +3 -3
- package/dist/worker.d.ts +6 -6
- package/dist/worker.js +2 -2
- package/drizzle/postgresql/0035_right_maddog.sql +2 -0
- package/drizzle/postgresql/meta/0035_snapshot.json +7259 -0
- package/drizzle/postgresql/meta/_journal.json +7 -0
- package/drizzle/sqlite/0035_reflective_titanium_man.sql +2 -0
- package/drizzle/sqlite/meta/0035_snapshot.json +5845 -0
- package/drizzle/sqlite/meta/_journal.json +7 -0
- package/install.sh +171 -0
- package/package.json +4 -2
- package/tui/SHA256SUMS +4 -0
- package/tui/supertag-tui-darwin-amd64 +0 -0
- package/tui/supertag-tui-darwin-arm64 +0 -0
- package/tui/supertag-tui-linux-amd64 +0 -0
- package/tui/supertag-tui-linux-arm64 +0 -0
- package/dist/chunk-7I5O2AQ2.js.map +0 -1
- package/dist/chunk-7U3AHYY3.js.map +0 -1
- package/dist/chunk-FGNUARJO.js.map +0 -1
- package/dist/chunk-JWO6WMSJ.js.map +0 -1
- package/dist/chunk-NLJT7EUA.js.map +0 -1
- package/dist/chunk-QTMCVECV.js.map +0 -1
- package/dist/chunk-UE7B7IPC.js.map +0 -1
- package/dist/chunk-US7635QX.js.map +0 -1
- package/dist/src-AABARFVT.js.map +0 -1
- package/dist/src-JBYMQTOH.js.map +0 -1
- package/dist/src-NSMNFU2H.js.map +0 -1
- package/dist/src-NZYS6TFE.js.map +0 -1
- package/dist/src-SU6BAMWL.js +0 -6
- package/dist/src-SU6BAMWL.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# supertag-ai
|
|
2
2
|
|
|
3
|
-
**Persistent AI
|
|
3
|
+
**Persistent AI actors for engineering work.**
|
|
4
4
|
|
|
5
|
-
SuperTag is the open alternative to dots for engineering work. A **Tag** is a persistent AI
|
|
6
|
-
|
|
7
|
-
or
|
|
8
|
-
|
|
5
|
+
SuperTag is the open alternative to dots for engineering work. A **Tag** is a persistent AI actor
|
|
6
|
+
with a stable identity, responsibilities, permissions, and work history. It exists independently of
|
|
7
|
+
the model or harness executing its work. Talk to it in your terminal, in Slack, or on a GitHub issue.
|
|
8
|
+
It runs the work on your coding agents (Claude Code, Codex, Cursor, or OpenCode), asks when a
|
|
9
|
+
decision is yours, and returns a git branch to review.
|
|
9
10
|
|
|
10
11
|
For bigger work, give a Tag an **Objective**: an outcome with done-when evidence, a budget, a
|
|
11
12
|
deadline, and the approvals you keep. For example: “People can invite teammates to a workspace and
|
|
@@ -161,7 +162,7 @@ To find bundled collaboration surface guides and manifests, run `supertag setup
|
|
|
161
162
|
The matching Python SDK is published separately as `supertag` on PyPI:
|
|
162
163
|
|
|
163
164
|
```sh
|
|
164
|
-
python -m pip install 'supertag==0.2.
|
|
165
|
+
python -m pip install 'supertag==0.2.0a9'
|
|
165
166
|
```
|
|
166
167
|
|
|
167
168
|
Pin the prerelease explicitly so pip selects the matching SDK. Python applications can compose
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMMANDS_EXECUTE_CAPABILITY_ID, UNSANDBOXED_COMMANDS_CAPABILITY_ID, WORKSPACE_CLONE_CAPABILITY_ID, WORKSPACE_ENVIRONMENT_CAPABILITY_ID, validateArtifactHarnessSession, validateArtifactPath, DEFAULT_WORKSPACE_REF, gitRefComponent, assertWorkspaceMountPaths, parseMountOutputManifests, parseMountManifests, parseLiveMounts, recordTaskFindings, isValidGitRef, parseWorkspaceMounts, parseVolumeSource, artifactUnavailableMessage, mcpServersOfGrants, MCP_SERVER_NAME, isReservedMcpServerName, MCP_TOOL_NAME, mcpGrantsFor, SKILL_CONTEXT_TYPE, ARTIFACT_CONTEXT_TYPE, mcpApprovalRequirementCovers, sanitizeApprovalText, canonicalJson, approvalArgumentsDigest, parseWorkerHostLabels, automaticWorkerHostLabels, parseModalVolumeCredential, pathsOverlap, isSensitiveWorkspaceMountPath, computeMountUploadChangeSet, DEFAULT_MOUNT_MAX_BYTES, MAX_TASK_FINDING_TEXT, protectedVolumePaths, parseTaskOutputPolicy, workspacePullRequestReference, MAX_TASK_FINDINGS, MAX_MOUNT_OBJECTS, MAX_MOUNT_MAX_BYTES, MAX_MOUNT_MANIFEST_BYTES, mountManifestDigest, WORKSPACE_DELIVERY_PROGRESS_IDS, plainCommandText, objectiveIdOfSessionKey, isInboxSessionKey } from './chunk-
|
|
1
|
+
import { COMMANDS_EXECUTE_CAPABILITY_ID, UNSANDBOXED_COMMANDS_CAPABILITY_ID, WORKSPACE_CLONE_CAPABILITY_ID, WORKSPACE_ENVIRONMENT_CAPABILITY_ID, validateArtifactHarnessSession, validateArtifactPath, DEFAULT_WORKSPACE_REF, gitRefComponent, assertWorkspaceMountPaths, parseMountOutputManifests, parseMountManifests, parseLiveMounts, recordTaskFindings, isValidGitRef, parseWorkspaceMounts, parseVolumeSource, artifactUnavailableMessage, mcpServersOfGrants, MCP_SERVER_NAME, isReservedMcpServerName, MCP_TOOL_NAME, mcpGrantsFor, SKILL_CONTEXT_TYPE, ARTIFACT_CONTEXT_TYPE, mcpApprovalRequirementCovers, sanitizeApprovalText, canonicalJson, approvalArgumentsDigest, parseWorkerHostLabels, automaticWorkerHostLabels, parseModalVolumeCredential, pathsOverlap, isSensitiveWorkspaceMountPath, computeMountUploadChangeSet, DEFAULT_MOUNT_MAX_BYTES, MAX_TASK_FINDING_TEXT, protectedVolumePaths, parseTaskOutputPolicy, workspacePullRequestReference, MAX_TASK_FINDINGS, MAX_MOUNT_OBJECTS, MAX_MOUNT_MAX_BYTES, MAX_MOUNT_MANIFEST_BYTES, mountManifestDigest, WORKSPACE_DELIVERY_PROGRESS_IDS, plainCommandText, objectiveIdOfSessionKey, isInboxSessionKey } from './chunk-3L6EOR7H.js';
|
|
2
2
|
import { resolve, dirname, basename, sep, join, relative, isAbsolute, posix } from 'path';
|
|
3
3
|
import { createHash, randomUUID, randomBytes, sign, verify, timingSafeEqual } from 'crypto';
|
|
4
4
|
import { constants as constants$1, createWriteStream, realpathSync, readFileSync } from 'fs';
|
|
@@ -706,6 +706,10 @@ var WORKSPACE_COPY_MOUNT_CAPABILITY = {
|
|
|
706
706
|
id: "supertag.workspace.mount.copy",
|
|
707
707
|
version: 1
|
|
708
708
|
};
|
|
709
|
+
var WORKSPACE_COPY_MOUNT_WRITE_CAPABILITY = {
|
|
710
|
+
id: "supertag.workspace.mount.copy.write",
|
|
711
|
+
version: 1
|
|
712
|
+
};
|
|
709
713
|
var COMMANDS_EXECUTE_CAPABILITY = {
|
|
710
714
|
id: COMMANDS_EXECUTE_CAPABILITY_ID,
|
|
711
715
|
version: 1
|
|
@@ -730,6 +734,10 @@ var WORKSPACE_NATIVE_MOUNT_CAPABILITY = {
|
|
|
730
734
|
id: "supertag.workspace.mount.native",
|
|
731
735
|
version: 1
|
|
732
736
|
};
|
|
737
|
+
var WORKSPACE_NATIVE_MOUNT_WRITE_CAPABILITY = {
|
|
738
|
+
id: "supertag.workspace.mount.native.write",
|
|
739
|
+
version: 1
|
|
740
|
+
};
|
|
733
741
|
var MAX_ARTIFACT_BYTES = 32 * 1024 * 1024;
|
|
734
742
|
function missingArtifactError() {
|
|
735
743
|
return Object.assign(new Error("Artifact is not stored"), { code: "ENOENT" });
|
|
@@ -5252,13 +5260,26 @@ var LocalWorkspaceEnvironment = class {
|
|
|
5252
5260
|
throw new Error(
|
|
5253
5261
|
`Task worktree ${worktree} is not on branch ${plan.branch} of this repository; remove it to recreate it`
|
|
5254
5262
|
);
|
|
5263
|
+
const head = (await host.run(tree, ["rev-parse", "HEAD"])).trim();
|
|
5264
|
+
const verdict = await this.#verify(repository, plan, head);
|
|
5265
|
+
if (verdict !== "current") {
|
|
5266
|
+
if (verdict === "behind" && await clean()) {
|
|
5267
|
+
await host.discardWorktree(repository, worktree);
|
|
5268
|
+
return void 0;
|
|
5269
|
+
}
|
|
5270
|
+
const error = new Error(
|
|
5271
|
+
`Task worktree ${worktree} is at commit ${head.slice(0, 12)}, which ${verdict === "behind" ? "is behind the branch's origin copy" : "does not continue from the branch's pinned or origin head"}${await clean() ? "" : " and has uncommitted changes"}; it was kept as it is. Commit or copy its work, bring the branch up to date with its origin copy, then retry`
|
|
5272
|
+
);
|
|
5273
|
+
error.name = "WorkspaceSetupError";
|
|
5274
|
+
throw error;
|
|
5275
|
+
}
|
|
5255
5276
|
if (reviewHead) await host.assertContains(tree, reviewHead, "HEAD");
|
|
5256
5277
|
const base = await this.recordedBase(tree, plan, repository);
|
|
5257
5278
|
const trusted = needsTrusted ? await host.trusted(repository, plan, reviewHead ?? base) : void 0;
|
|
5258
5279
|
if (plan.setup === void 0 || await setupDone(tree, trusted, plan.setup)) {
|
|
5259
|
-
const
|
|
5280
|
+
const head2 = (await host.run(tree, ["rev-parse", "HEAD"])).trim();
|
|
5260
5281
|
this.#resumed.set(worktree, trusted);
|
|
5261
|
-
return { base, head, ...trusted === void 0 ? {} : { trusted } };
|
|
5282
|
+
return { base, head: head2, ...trusted === void 0 ? {} : { trusted } };
|
|
5262
5283
|
}
|
|
5263
5284
|
if (!await clean())
|
|
5264
5285
|
throw new Error(
|
|
@@ -5268,6 +5289,28 @@ var LocalWorkspaceEnvironment = class {
|
|
|
5268
5289
|
await host.discardWorktree(repository, worktree);
|
|
5269
5290
|
return void 0;
|
|
5270
5291
|
}
|
|
5292
|
+
/** How a kept worktree's `head` relates to the branch's origin copy and the pinned head. */
|
|
5293
|
+
async #verify(repository, plan, head) {
|
|
5294
|
+
const host = this.#host;
|
|
5295
|
+
const contains = (ancestor, commit) => ancestor === commit ? Promise.resolve(true) : host.run(repository.path, ["merge-base", "--is-ancestor", ancestor, commit]).then(
|
|
5296
|
+
() => true,
|
|
5297
|
+
() => false
|
|
5298
|
+
);
|
|
5299
|
+
const remote = host.remoteBranch(plan.branch);
|
|
5300
|
+
let newest = head;
|
|
5301
|
+
let behind = false;
|
|
5302
|
+
if (repository.managed && await host.hasRef(repository.path, remote)) {
|
|
5303
|
+
const origin = await host.commit(repository.path, remote, `Branch ${remote} is unreadable`);
|
|
5304
|
+
if (await contains(origin, head)) newest = head;
|
|
5305
|
+
else if (await contains(head, origin)) {
|
|
5306
|
+
newest = origin;
|
|
5307
|
+
behind = true;
|
|
5308
|
+
} else return "incompatible";
|
|
5309
|
+
}
|
|
5310
|
+
const pinned = plan.branchPin === plan.branch && typeof plan.branchPinHead === "string" && /^[0-9a-f]{40}(?:[0-9a-f]{24})?$/u.test(plan.branchPinHead) ? plan.branchPinHead : void 0;
|
|
5311
|
+
if (pinned !== void 0 && !await contains(pinned, newest)) return "incompatible";
|
|
5312
|
+
return behind ? "behind" : "current";
|
|
5313
|
+
}
|
|
5271
5314
|
/**
|
|
5272
5315
|
* Adds the Task worktree detached at the trusted commit, so `setup` sees no AI-authored file,
|
|
5273
5316
|
* and runs `setup` there with a private TMPDIR. Setup outputs then get private copies of any
|
|
@@ -8123,6 +8166,14 @@ function workspacePlan(value) {
|
|
|
8123
8166
|
if (plan["branchPin"] === void 0 || !/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/u.test(plan["branchPinHead"]))
|
|
8124
8167
|
throw new Error("workspacePlan branchPinHead requires branchPin and a full commit id");
|
|
8125
8168
|
}
|
|
8169
|
+
if (plan["branchPinPullRequest"] !== void 0) {
|
|
8170
|
+
const pin = fields(plan["branchPinPullRequest"], ["repository"]);
|
|
8171
|
+
const number = pin["number"];
|
|
8172
|
+
if (plan["branchPin"] === void 0 || plan["delivery"] !== "pull-request" || typeof number !== "number" || !Number.isSafeInteger(number) || number <= 0)
|
|
8173
|
+
throw new Error(
|
|
8174
|
+
"workspacePlan branchPinPullRequest requires a pull request branch and number"
|
|
8175
|
+
);
|
|
8176
|
+
}
|
|
8126
8177
|
choice(plan, "delivery", ["patch", "branch", "pull-request"]);
|
|
8127
8178
|
if (plan["ref"] !== void 0) text(plan, "ref");
|
|
8128
8179
|
if (plan["setup"] !== void 0) text(plan, "setup");
|
|
@@ -10356,12 +10407,16 @@ function hasControlCharacters(value) {
|
|
|
10356
10407
|
|
|
10357
10408
|
// ../runtime/sdk/src/sandbox-workspace-environment.ts
|
|
10358
10409
|
var FULL_COMMIT = /^[0-9a-f]{40}([0-9a-f]{24})?$/u;
|
|
10359
|
-
async function assertSandboxWorkspaceMountPaths(environment, mounts, checkout, stagedFiles, protectedDirectories) {
|
|
10410
|
+
async function assertSandboxWorkspaceMountPaths(environment, mounts, checkout, stagedFiles, protectedDirectories, nativeMountSymlinkTargets) {
|
|
10360
10411
|
if (mounts.length === 0) return;
|
|
10361
|
-
const canonical5 = async (path) => {
|
|
10412
|
+
const canonical5 = async (path, expectedLink = "") => {
|
|
10362
10413
|
const script = [
|
|
10363
10414
|
'probe=$1; suffix=""',
|
|
10364
|
-
'if [ -L "$probe" ]; then
|
|
10415
|
+
'if [ -L "$probe" ]; then',
|
|
10416
|
+
' parent=$(dirname "$probe")',
|
|
10417
|
+
' if [ -z "$2" ] || [ "$(readlink "$probe")" != "$2" ] ||',
|
|
10418
|
+
' [ "$(cd -P "$parent" && pwd -P)" != "$parent" ]; then printf "SYMLINK\\n"; exit 0; fi',
|
|
10419
|
+
"fi",
|
|
10365
10420
|
'while [ ! -d "$probe" ]; do',
|
|
10366
10421
|
' if [ -L "$probe" ]; then printf "SYMLINK\\n"; exit 0; fi',
|
|
10367
10422
|
' suffix="/${probe##*/}$suffix"; probe=${probe%/*}',
|
|
@@ -10370,7 +10425,10 @@ async function assertSandboxWorkspaceMountPaths(environment, mounts, checkout, s
|
|
|
10370
10425
|
'cd -P "$probe" || exit 1',
|
|
10371
10426
|
'printf "PATH:%s%s\\n" "$(pwd -P)" "$suffix"'
|
|
10372
10427
|
].join("\n");
|
|
10373
|
-
const process2 = await environment.spawn({
|
|
10428
|
+
const process2 = await environment.spawn({
|
|
10429
|
+
command: "sh",
|
|
10430
|
+
args: ["-c", script, "sh", path, expectedLink]
|
|
10431
|
+
});
|
|
10374
10432
|
const result2 = await process2.wait();
|
|
10375
10433
|
if (result2.exitCode !== 0 || !result2.stdout.startsWith("PATH:")) {
|
|
10376
10434
|
if (result2.stdout.startsWith("SYMLINK"))
|
|
@@ -10382,13 +10440,16 @@ async function assertSandboxWorkspaceMountPaths(environment, mounts, checkout, s
|
|
|
10382
10440
|
const checked = await Promise.all(
|
|
10383
10441
|
mounts.map(async (mount) => ({
|
|
10384
10442
|
...mount,
|
|
10385
|
-
path: await canonical5(
|
|
10443
|
+
path: await canonical5(
|
|
10444
|
+
mount.path,
|
|
10445
|
+
mount.strategy === "mount" ? nativeMountSymlinkTargets?.[mount.path] : void 0
|
|
10446
|
+
)
|
|
10386
10447
|
}))
|
|
10387
10448
|
);
|
|
10388
10449
|
assertWorkspaceMountPaths(
|
|
10389
10450
|
checked,
|
|
10390
10451
|
await canonical5(checkout),
|
|
10391
|
-
await Promise.all(stagedFiles.map(canonical5))
|
|
10452
|
+
await Promise.all(stagedFiles.map((path) => canonical5(path)))
|
|
10392
10453
|
);
|
|
10393
10454
|
const protectedPaths = await Promise.all(
|
|
10394
10455
|
protectedDirectories.map(async ([kind, path]) => [kind, await canonical5(path)])
|
|
@@ -10439,7 +10500,7 @@ var SandboxWorkspaceEnvironment = class {
|
|
|
10439
10500
|
...this.capabilities,
|
|
10440
10501
|
mounts: {
|
|
10441
10502
|
strategies: options.driver.mounts.strategies,
|
|
10442
|
-
access:
|
|
10503
|
+
access: options.driver.mounts.access
|
|
10443
10504
|
}
|
|
10444
10505
|
};
|
|
10445
10506
|
this.provider = options.driver.provider;
|
|
@@ -10704,7 +10765,8 @@ var SandboxWorkspaceEnvironment = class {
|
|
|
10704
10765
|
[
|
|
10705
10766
|
["bundle transfer directory", driver.transferDirectory],
|
|
10706
10767
|
["trusted MCP copy", this.mcpDirectory]
|
|
10707
|
-
]
|
|
10768
|
+
],
|
|
10769
|
+
sandbox.nativeMountSymlinkTargets
|
|
10708
10770
|
);
|
|
10709
10771
|
this.#checkouts.set(environment, {
|
|
10710
10772
|
sandbox,
|
|
@@ -10752,7 +10814,8 @@ var SandboxWorkspaceEnvironment = class {
|
|
|
10752
10814
|
[
|
|
10753
10815
|
["bundle transfer directory", driver.transferDirectory],
|
|
10754
10816
|
["trusted MCP copy", this.mcpDirectory]
|
|
10755
|
-
]
|
|
10817
|
+
],
|
|
10818
|
+
state.sandbox.nativeMountSymlinkTargets
|
|
10756
10819
|
);
|
|
10757
10820
|
this.#views.set(started, view);
|
|
10758
10821
|
return view;
|
|
@@ -10917,12 +10980,13 @@ var SandboxWorkspaceCheckout = class {
|
|
|
10917
10980
|
}
|
|
10918
10981
|
};
|
|
10919
10982
|
var SandboxWorkspaceRuntime = class {
|
|
10920
|
-
constructor(inner, checkout, checkoutDirectory, workspaceMounts, protectedDirectories) {
|
|
10983
|
+
constructor(inner, checkout, checkoutDirectory, workspaceMounts, protectedDirectories, nativeMountSymlinkTargets) {
|
|
10921
10984
|
this.inner = inner;
|
|
10922
10985
|
this.checkout = checkout;
|
|
10923
10986
|
this.checkoutDirectory = checkoutDirectory;
|
|
10924
10987
|
this.workspaceMounts = workspaceMounts;
|
|
10925
10988
|
this.protectedDirectories = protectedDirectories;
|
|
10989
|
+
this.nativeMountSymlinkTargets = nativeMountSymlinkTargets;
|
|
10926
10990
|
this.id = inner.id;
|
|
10927
10991
|
this.rootDirectory = inner.rootDirectory;
|
|
10928
10992
|
this.provenance = { ...checkout.provenance ?? {} };
|
|
@@ -10975,7 +11039,8 @@ var SandboxWorkspaceRuntime = class {
|
|
|
10975
11039
|
this.workspaceMounts,
|
|
10976
11040
|
this.checkoutDirectory,
|
|
10977
11041
|
staged,
|
|
10978
|
-
this.protectedDirectories
|
|
11042
|
+
this.protectedDirectories,
|
|
11043
|
+
this.nativeMountSymlinkTargets
|
|
10979
11044
|
);
|
|
10980
11045
|
for (const file of plan.files) this.#outsideCheckout(file.path, "staged file");
|
|
10981
11046
|
for (const mount of plan.mounts) this.#outsideCheckout(mount.destination, "mount");
|
|
@@ -14704,6 +14769,16 @@ var WorkspaceResolverRegistry = class {
|
|
|
14704
14769
|
supportsCopyMounts(providerId) {
|
|
14705
14770
|
return this.#resolvers.some((resolver) => resolver.supportsCopyMounts?.(providerId) === true);
|
|
14706
14771
|
}
|
|
14772
|
+
supportsCopyMountWrites(providerId) {
|
|
14773
|
+
return this.#resolvers.some(
|
|
14774
|
+
(resolver) => resolver.supportsCopyMountWrites?.(providerId) === true
|
|
14775
|
+
);
|
|
14776
|
+
}
|
|
14777
|
+
supportsNativeMountWrites(providerId) {
|
|
14778
|
+
return this.#resolvers.some(
|
|
14779
|
+
(resolver) => resolver.supportsNativeMountWrites?.(providerId) === true
|
|
14780
|
+
);
|
|
14781
|
+
}
|
|
14707
14782
|
refuseProfile(profile, execution) {
|
|
14708
14783
|
for (const resolver of this.#resolvers) {
|
|
14709
14784
|
const reason = resolver.refuseProfile?.(profile, execution);
|
|
@@ -16432,7 +16507,9 @@ var ConfiguredWorker = class {
|
|
|
16432
16507
|
WORKSPACE_CLONE_CAPABILITY.id,
|
|
16433
16508
|
WORKSPACE_ENVIRONMENT_CAPABILITY.id,
|
|
16434
16509
|
WORKSPACE_COPY_MOUNT_CAPABILITY.id,
|
|
16510
|
+
WORKSPACE_COPY_MOUNT_WRITE_CAPABILITY.id,
|
|
16435
16511
|
WORKSPACE_NATIVE_MOUNT_CAPABILITY.id,
|
|
16512
|
+
WORKSPACE_NATIVE_MOUNT_WRITE_CAPABILITY.id,
|
|
16436
16513
|
COMMANDS_EXECUTE_CAPABILITY.id,
|
|
16437
16514
|
UNSANDBOXED_COMMANDS_CAPABILITY.id
|
|
16438
16515
|
]);
|
|
@@ -16475,6 +16552,10 @@ var ConfiguredWorker = class {
|
|
|
16475
16552
|
capabilities2.push(WORKSPACE_COPY_MOUNT_CAPABILITY);
|
|
16476
16553
|
if (workspaceRefusal === void 0 && this.#options.workspaceResolvers?.supportsNativeMounts(execution.id))
|
|
16477
16554
|
capabilities2.push(WORKSPACE_NATIVE_MOUNT_CAPABILITY);
|
|
16555
|
+
if (workspaceRefusal === void 0 && this.#options.workspaceResolvers?.supportsCopyMountWrites(execution.id))
|
|
16556
|
+
capabilities2.push(WORKSPACE_COPY_MOUNT_WRITE_CAPABILITY);
|
|
16557
|
+
if (workspaceRefusal === void 0 && this.#options.workspaceResolvers?.supportsNativeMountWrites(execution.id))
|
|
16558
|
+
capabilities2.push(WORKSPACE_NATIVE_MOUNT_WRITE_CAPABILITY);
|
|
16478
16559
|
return {
|
|
16479
16560
|
profile: profile.ref,
|
|
16480
16561
|
harness: harness.id,
|
|
@@ -16647,6 +16728,7 @@ var ConfiguredWorker = class {
|
|
|
16647
16728
|
let reason = "failed";
|
|
16648
16729
|
let workspacePrepared = false;
|
|
16649
16730
|
let workspaceSandbox;
|
|
16731
|
+
let disposeWorkspaceSandbox = false;
|
|
16650
16732
|
const boundedCleanup = async (operation) => {
|
|
16651
16733
|
let timer;
|
|
16652
16734
|
try {
|
|
@@ -16709,7 +16791,7 @@ var ConfiguredWorker = class {
|
|
|
16709
16791
|
}
|
|
16710
16792
|
await closeHarness(currentExecution, errors);
|
|
16711
16793
|
try {
|
|
16712
|
-
if (currentExecutionEnvironment && currentExecutionEnvironment !== workspaceSandbox)
|
|
16794
|
+
if (currentExecutionEnvironment && (currentExecutionEnvironment !== workspaceSandbox || disposeWorkspaceSandbox))
|
|
16713
16795
|
await boundedCleanup(() => currentExecutionEnvironment.dispose(reason));
|
|
16714
16796
|
} catch (error) {
|
|
16715
16797
|
errors.push(new Error("Execution environment cleanup failed", { cause: error }));
|
|
@@ -17213,6 +17295,7 @@ var ConfiguredWorker = class {
|
|
|
17213
17295
|
}
|
|
17214
17296
|
if (workspacePrepared) {
|
|
17215
17297
|
workspacePrepared = false;
|
|
17298
|
+
disposeWorkspaceSandbox = workspaceSandbox !== void 0;
|
|
17216
17299
|
const summary = pendingResult?.summary ?? finalOutput;
|
|
17217
17300
|
for (const delivery of await this.#options.workspaceResolvers?.finalize(
|
|
17218
17301
|
spec,
|
|
@@ -17223,7 +17306,8 @@ var ConfiguredWorker = class {
|
|
|
17223
17306
|
...(pendingResult?.changes ?? []).map((change) => change.summary),
|
|
17224
17307
|
...(pendingResult?.decisions ?? []).map((decision) => decision.text)
|
|
17225
17308
|
].slice(0, 20),
|
|
17226
|
-
...finishSignal === void 0 ? {} : { signal: finishSignal }
|
|
17309
|
+
...finishSignal === void 0 ? {} : { signal: finishSignal },
|
|
17310
|
+
...disposeWorkspaceSandbox ? { keepSandboxOpen: true } : {}
|
|
17227
17311
|
}
|
|
17228
17312
|
) ?? []) {
|
|
17229
17313
|
yield workspaceDeliveryProgress(identity, at(), delivery);
|
|
@@ -19195,7 +19279,8 @@ var WorkspaceBranches = class {
|
|
|
19195
19279
|
* reviewer pushed, or a local commit whose push failed, stays on it. A recorded branch rewritten
|
|
19196
19280
|
* without that head, or whose copies diverged, is refused rather than replaced. Without a
|
|
19197
19281
|
* record, a branch the Control Plane pinned at a head another host recorded is adopted when this
|
|
19198
|
-
* repository holds that head on it, and refused
|
|
19282
|
+
* repository holds that head on it, and otherwise refused, never allocated afresh: absent,
|
|
19283
|
+
* older, divergent, or claimed by another owner here, its refs stay as they are. Otherwise
|
|
19199
19284
|
* the owner gets a name no other branch or owner holds, starting afresh: a branch of the same
|
|
19200
19285
|
* name that `owner` did not record, such as a person's or another Session's, is never taken.
|
|
19201
19286
|
*/
|
|
@@ -19208,12 +19293,21 @@ var WorkspaceBranches = class {
|
|
|
19208
19293
|
"refs/heads/",
|
|
19209
19294
|
"refs/remotes/origin/"
|
|
19210
19295
|
])).trim().split("\n").filter(Boolean).map((ref) => ref.replace(/^refs\/(?:heads|remotes\/origin)\//u, ""));
|
|
19296
|
+
const pinned = plan.branchPin === plan.branch && typeof plan.branchPinHead === "string" && /^[0-9a-f]{40}(?:[0-9a-f]{24})?$/u.test(plan.branchPinHead) ? plan.branchPinHead : void 0;
|
|
19211
19297
|
if (recorded) {
|
|
19212
19298
|
if (Object.entries(records).some(
|
|
19213
19299
|
([id, other]) => id !== owner && other.branch.toLowerCase() === recorded.branch.toLowerCase()
|
|
19214
19300
|
))
|
|
19215
19301
|
throw new Error("Recorded Task branch conflicts with another branch");
|
|
19302
|
+
if (pinned !== void 0 && recorded.branch !== plan.branch)
|
|
19303
|
+
throw refusal(
|
|
19304
|
+
`This Worker Host recorded branch "${recorded.branch}" for this work, but the Control Plane pinned branch "${plan.branch}" at commit ${pinned.slice(0, 12)}; no branch was changed. Run this Task on the Worker Host that recorded the pinned branch, or retry once the pin and this host's record name the same branch`
|
|
19305
|
+
);
|
|
19216
19306
|
if (recorded.head === "deleted" && !refs.includes(recorded.branch)) {
|
|
19307
|
+
if (pinned !== void 0)
|
|
19308
|
+
throw refusal(
|
|
19309
|
+
`Branch "${plan.branch}" holds commit ${pinned.slice(0, 12)} on another Worker Host, but this Worker Host deleted its copy and it was not pushed to this Workspace's source; run this Task on that Worker Host, or deliver the Workspace by pull request so its branch is pushed`
|
|
19310
|
+
);
|
|
19217
19311
|
const unpinned2 = { ...plan, branch: recorded.branch };
|
|
19218
19312
|
delete unpinned2.branchPin;
|
|
19219
19313
|
return unpinned2;
|
|
@@ -19221,6 +19315,10 @@ var WorkspaceBranches = class {
|
|
|
19221
19315
|
if (recorded.head && recorded.head !== "deleted") {
|
|
19222
19316
|
const copies = await this.#copies(repository, recorded.branch);
|
|
19223
19317
|
if (copies.length === 0) {
|
|
19318
|
+
if (pinned !== void 0 && !await this.#contains(repository, pinned, recorded.head))
|
|
19319
|
+
throw refusal(
|
|
19320
|
+
await this.#incompatible(repository, recorded.branch, pinned, "another Worker Host")
|
|
19321
|
+
);
|
|
19224
19322
|
await this.host.run(repository.path, [
|
|
19225
19323
|
"update-ref",
|
|
19226
19324
|
`refs/heads/${recorded.branch}`,
|
|
@@ -19229,24 +19327,41 @@ var WorkspaceBranches = class {
|
|
|
19229
19327
|
]);
|
|
19230
19328
|
return { ...plan, branch: recorded.branch, branchPin: recorded.branch };
|
|
19231
19329
|
}
|
|
19232
|
-
if (await this.#continues(repository, copies, recorded.head))
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19330
|
+
if (!await this.#continues(repository, copies, recorded.head))
|
|
19331
|
+
throw refusal(
|
|
19332
|
+
await this.#incompatible(
|
|
19333
|
+
repository,
|
|
19334
|
+
recorded.branch,
|
|
19335
|
+
recorded.head,
|
|
19336
|
+
"this Worker Host"
|
|
19337
|
+
)
|
|
19338
|
+
);
|
|
19339
|
+
if (pinned !== void 0 && !await this.#continues(repository, copies, pinned))
|
|
19340
|
+
throw refusal(
|
|
19341
|
+
await this.#incompatible(repository, recorded.branch, pinned, "another Worker Host")
|
|
19342
|
+
);
|
|
19343
|
+
return { ...plan, branch: recorded.branch, branchPin: recorded.branch };
|
|
19237
19344
|
}
|
|
19238
19345
|
}
|
|
19239
|
-
if (
|
|
19346
|
+
if (pinned !== void 0) {
|
|
19347
|
+
const branchPinHead = pinned;
|
|
19240
19348
|
const named = refs.filter((ref) => ref.toLowerCase() === plan.branch.toLowerCase());
|
|
19241
19349
|
if (named.length === 0)
|
|
19242
19350
|
throw refusal(
|
|
19243
|
-
`Branch ${plan.branch} holds commit ${
|
|
19351
|
+
`Branch ${plan.branch} holds commit ${branchPinHead.slice(0, 12)} on another Worker Host and was not pushed to this Workspace's source; run this Task on that Worker Host, or deliver the Workspace by pull request so its branch is pushed`
|
|
19244
19352
|
);
|
|
19245
|
-
|
|
19246
|
-
(other) => other.branch.toLowerCase() === plan.branch.toLowerCase()
|
|
19247
|
-
)
|
|
19248
|
-
|
|
19353
|
+
if (!named.every((ref) => ref === plan.branch) || Object.entries(records).some(
|
|
19354
|
+
([id, other]) => id !== owner && other.branch.toLowerCase() === plan.branch.toLowerCase()
|
|
19355
|
+
))
|
|
19356
|
+
throw refusal(
|
|
19357
|
+
`Branch ${plan.branch} is pinned at commit ${branchPinHead.slice(0, 12)}, but this Worker Host has ${named.length > 0 && !named.every((ref) => ref === plan.branch) ? `a branch whose name differs only in case (${[...new Set(named)].join(", ")})` : "it recorded for another owner"}; run this Task on the Worker Host that recorded the branch, or rename the conflicting branch, then retry`
|
|
19358
|
+
);
|
|
19359
|
+
const copies = await this.#copies(repository, plan.branch);
|
|
19360
|
+
if (copies.length > 0 && await this.#continues(repository, copies, branchPinHead))
|
|
19249
19361
|
return plan;
|
|
19362
|
+
throw refusal(
|
|
19363
|
+
await this.#incompatible(repository, plan.branch, branchPinHead, "another Worker Host")
|
|
19364
|
+
);
|
|
19250
19365
|
}
|
|
19251
19366
|
const occupied = new Set(
|
|
19252
19367
|
[...refs, ...Object.values(records).map((owner2) => owner2.branch)].map(
|
|
@@ -19276,6 +19391,43 @@ ${owner}`).digest("hex").slice(0, 8);
|
|
|
19276
19391
|
copies.push(await this.host.commit(repository.path, ref, `Branch ${ref} is unreadable`));
|
|
19277
19392
|
return copies;
|
|
19278
19393
|
}
|
|
19394
|
+
/**
|
|
19395
|
+
* Why a branch's copies cannot continue from `head`: each copy's observed head and how it
|
|
19396
|
+
* relates to `head`, with a recovery path. Reads refs only; nothing is moved or deleted.
|
|
19397
|
+
*/
|
|
19398
|
+
async #incompatible(repository, branch, head, recorder) {
|
|
19399
|
+
const ancestor = (a, b) => a === b ? Promise.resolve(true) : this.host.run(repository.path, ["merge-base", "--is-ancestor", a, b]).then(
|
|
19400
|
+
() => true,
|
|
19401
|
+
() => false
|
|
19402
|
+
);
|
|
19403
|
+
const known = await this.host.run(repository.path, ["cat-file", "-e", `${head}^{commit}`]).then(
|
|
19404
|
+
() => true,
|
|
19405
|
+
() => false
|
|
19406
|
+
);
|
|
19407
|
+
const observed = [];
|
|
19408
|
+
const heads = [];
|
|
19409
|
+
for (const [label, ref] of [
|
|
19410
|
+
["local", `refs/heads/${branch}`],
|
|
19411
|
+
...repository.managed ? [["origin", `refs/remotes/origin/${branch}`]] : []
|
|
19412
|
+
]) {
|
|
19413
|
+
if (!await this.host.hasRef(repository.path, ref)) {
|
|
19414
|
+
observed.push(`${label} absent`);
|
|
19415
|
+
continue;
|
|
19416
|
+
}
|
|
19417
|
+
const at = await this.host.commit(repository.path, ref, `Branch ${ref} is unreadable`);
|
|
19418
|
+
heads.push(at);
|
|
19419
|
+
const relation = at === head ? "matches" : !known ? "pinned commit missing here" : await ancestor(head, at) ? "contains it" : await ancestor(at, head) ? "older, behind it" : "divergent from it";
|
|
19420
|
+
observed.push(`${label} ${at.slice(0, 12)} (${relation})`);
|
|
19421
|
+
}
|
|
19422
|
+
const diverged = heads.length === 2 && !await ancestor(heads[0], heads[1]) && !await ancestor(heads[1], heads[0]);
|
|
19423
|
+
return `Branch ${branch} no longer holds commit ${head.slice(0, 12)}, the last one ${recorder} recorded on it (pinned head ${head}), or its local and origin copies diverged; observed ${observed.join("; ")}${diverged ? "; its local and origin copies diverged" : ""}. Existing refs were left unchanged. To recover, make the branch's copies agree and contain commit ${head}: from the Worker Host that holds that commit, push it to branch "${branch}" on this Workspace's source, or merge the local and origin copies so one contains the other, then retry; or run this Task on the Worker Host that recorded the branch`;
|
|
19424
|
+
}
|
|
19425
|
+
#contains(repository, ancestor, commit) {
|
|
19426
|
+
return ancestor === commit ? Promise.resolve(true) : this.host.run(repository.path, ["merge-base", "--is-ancestor", ancestor, commit]).then(
|
|
19427
|
+
() => true,
|
|
19428
|
+
() => false
|
|
19429
|
+
);
|
|
19430
|
+
}
|
|
19279
19431
|
/** Whether the newer of a branch's copies holds `head`, when one copy holds the other. */
|
|
19280
19432
|
async #continues(repository, copies, head) {
|
|
19281
19433
|
const contains = (ancestor, commit) => ancestor === commit ? Promise.resolve(true) : this.host.run(repository.path, ["merge-base", "--is-ancestor", ancestor, commit]).then(
|
|
@@ -19543,6 +19695,14 @@ var WorkspaceEnvironmentResolver = class {
|
|
|
19543
19695
|
const mounts = this.#environments.get(providerId)?.capabilities.mounts;
|
|
19544
19696
|
return mounts?.strategies.includes("mount") === true && mounts.access.includes("read-only");
|
|
19545
19697
|
}
|
|
19698
|
+
supportsCopyMountWrites(providerId) {
|
|
19699
|
+
const mounts = this.#environments.get(providerId)?.capabilities.mounts;
|
|
19700
|
+
return mounts?.strategies.includes("copy") === true && mounts.access.includes("read-write");
|
|
19701
|
+
}
|
|
19702
|
+
supportsNativeMountWrites(providerId) {
|
|
19703
|
+
const mounts = this.#environments.get(providerId)?.capabilities.mounts;
|
|
19704
|
+
return mounts?.strategies.includes("mount") === true && mounts.access.includes("read-write");
|
|
19705
|
+
}
|
|
19546
19706
|
/** Why placement refuses a Workspace Task on this profile and provider. */
|
|
19547
19707
|
refuseProfile(profile, execution) {
|
|
19548
19708
|
return this.#profileRefusal(profile, execution.id);
|
|
@@ -20099,8 +20259,9 @@ SuperTag-Task: ${task.taskId}`,
|
|
|
20099
20259
|
}
|
|
20100
20260
|
/**
|
|
20101
20261
|
* Commits a remote Attempt's work inside its sandbox, imports the returned commits into the
|
|
20102
|
-
* host-managed clone through {@link deliverWorkspace}, then disposes the sandbox
|
|
20103
|
-
* whose sandbox never started has nothing
|
|
20262
|
+
* host-managed clone through {@link deliverWorkspace}, then disposes the sandbox unless the
|
|
20263
|
+
* Worker retains it for output collection. An Attempt whose sandbox never started has nothing
|
|
20264
|
+
* to deliver.
|
|
20104
20265
|
*/
|
|
20105
20266
|
async #finalizeRemote(task, plan, remote, outcome, details) {
|
|
20106
20267
|
const sandbox = remote.sandbox;
|
|
@@ -20146,7 +20307,7 @@ SuperTag-Task: ${task.taskId}`,
|
|
|
20146
20307
|
);
|
|
20147
20308
|
return { ...delivery, worktreeRemoved: false, branchRemoved: false };
|
|
20148
20309
|
} finally {
|
|
20149
|
-
await sandbox.dispose(outcome).catch(() => void 0);
|
|
20310
|
+
if (!details.keepSandboxOpen) await sandbox.dispose(outcome).catch(() => void 0);
|
|
20150
20311
|
}
|
|
20151
20312
|
}
|
|
20152
20313
|
/**
|
|
@@ -20297,6 +20458,6 @@ function namedPlan(plan) {
|
|
|
20297
20458
|
return plan?.status === "workspace" ? plan : void 0;
|
|
20298
20459
|
}
|
|
20299
20460
|
|
|
20300
|
-
export { ArtifactClient, ArtifactContextResolver, ArtifactRequestError, AttemptJournalOwnedError, CHANGE_SUMMARY_INSTRUCTION, COMMANDS_EXECUTE_CAPABILITY, COORDINATION_CAPABILITY, ContextResolverRegistry, DurableLocalWorklet, EXECUTION_WARNING_SUMMARY, ExecutionBudgetExceededError, ExecutionCleanupError, FINDINGS_INSTRUCTION, FileArtifactStore, FileAttemptJournal, FileSessionStateStore, FileSkillResolver, FileToolEffectJournal, HARNESS_EFFORTS, HarnessProviderError, HttpMcpToolProvider, HttpSessionStateStore, InMemorySessionStateStore, LOCAL_PROCESS_CAPABILITY, LocalExecutionEnvironmentProvider, LocalHarnessExecutionControl, LocalHarnessRuntimeProvider, LocalWorklet, LocalWorkspaceCheckout, LocalWorkspaceEnvironment, MAX_ARTIFACT_BYTES, MAX_WORKSPACE_BUNDLE_BYTES, McpToolAdapter, PREPARED_WORKSPACE_LIMITS, PROCESS_INPUT_STREAMING_CAPABILITY, PROCESS_OUTPUT_STREAMING_CAPABILITY, PermissionDeniedError, PreparedWorkspaceCache, ReliableToolInvokerRegistry, RpcTelemetry, RuntimeInputProviderRegistry, S3ArtifactStore, STANDARD_RUNTIME_ACTIONS, SURFACE_COORDINATION_CAPABILITY, SandboxExecutionEnvironmentProvider, SandboxWorkspaceEnvironment, StaticWorker, TASK_ATTEMPT_CANCELLATION_CAPABILITY, TASK_ATTEMPT_EVENT_STREAM_CAPABILITY, TASK_OUTPUT_POLICY_CAPABILITY, ToolAdapterRegistry, ToolEffectInDoubtError, ToolInvokerRegistry, ToolProviderRegistry, UNSANDBOXED_COMMANDS_CAPABILITY, VolumeCopyError, WORKLET_ARTIFACT_TRANSFER_PATH, WORKSPACE_BUNDLE_LIMITS, WORKSPACE_CLONE_CAPABILITY, WORKSPACE_COPY_MOUNT_CAPABILITY, WORKSPACE_ENVIRONMENT_CAPABILITY, WORKSPACE_IN_PLACE_CAPABILITY, WORKSPACE_MCP_VARIABLE_PREFIX, WORKSPACE_NATIVE_MOUNT_CAPABILITY, WorkletAdmissionRejectedError, WorkletArtifactStore, WorkletArtifactTransferClient, WorkletArtifactTransferServer, WorkspaceEnvironmentResolver, WorkspaceHost, WorkspaceIntegrityError, WorkspaceResolverRegistry, artifactInputPath, assertHarnessMcpPolicyEnforceable, assertTagActionAllowed, assertTagContextItemEligible, attemptModel, bundleTaskObjects, bundleTrustedCommit, checkReturnedBundle, childPath, collectTaskAttemptEvents, compatibleDescriptorWorkers, connectExecutionEnvironmentMcpClient, connectWorkerMcpClient, createSplitExecutionBridge, createWorker, decodeTaskAttemptEvent, decodeTaskAttemptSpec, defaultTaskResult, deliverWorkspace, describeToolCall, descriptorForProfile, descriptorSupportsCoordination, descriptorSupportsExecution, descriptorSupportsRequiredContext, descriptorSupportsSurfaceCoordination, devcontainerImageUser, evaluateTagAction, executeToTerminalOutput, executionPreferenceScore, executionRootCheckoutPath, executionRootWorkspace, executionWarningProgress, harnessArtifactRestoreDestination, harnessModels, inPlaceWorkspacePath, isControlPlaneCoordinationTool, isTagActionAllowed, isTagContextItemEligible, listSandboxOutputFiles, localResourceFilter, materializeSandboxArtifactFiles, materializeTrustedBuildContext, minimalProcessEnvironment, missingArtifactError, modalDevcontainerBase, normalizeTaskProgress, openEnvironmentMcpBridge, parseGitBundleHeader, permitsRuntimeAction, prepareSandboxOutputDirectory, preparedWorkspaceDigest, preparedWorkspaceKey, preparedWorkspaceWarmKey, profileAppliesEffort, profileDefaultModel, readMcpServerConfiguration, requestSurfaceActionApproval, resolveHarnessContinuity, resolveLocalMountRoot, resolveSkillPackages, resolvedDevcontainerEnv, runtimeInputs, selectDescriptorExecution, selectWorkletPlacement, signArtifactTransferGrant, startMcpPolicyProxy, terminalOutputText, terminalTaskResult, terminateSandbox, toolCallOutcomeFromText, validateHarnessControlCapabilities, validateHarnessControlCommand, validateHarnessExecutionLimitCapabilities, validateHarnessResolution, validateHarnessSessionCapabilities, validatedDevcontainerDockerfile, withoutProviderCredentials, workerSlots, workspaceDefinition, workspaceHarnessRequirement };
|
|
20301
|
-
//# sourceMappingURL=chunk-
|
|
20302
|
-
//# sourceMappingURL=chunk-
|
|
20461
|
+
export { ArtifactClient, ArtifactContextResolver, ArtifactRequestError, AttemptJournalOwnedError, CHANGE_SUMMARY_INSTRUCTION, COMMANDS_EXECUTE_CAPABILITY, COORDINATION_CAPABILITY, ContextResolverRegistry, DurableLocalWorklet, EXECUTION_WARNING_SUMMARY, ExecutionBudgetExceededError, ExecutionCleanupError, FINDINGS_INSTRUCTION, FileArtifactStore, FileAttemptJournal, FileSessionStateStore, FileSkillResolver, FileToolEffectJournal, HARNESS_EFFORTS, HarnessProviderError, HttpMcpToolProvider, HttpSessionStateStore, InMemorySessionStateStore, LOCAL_PROCESS_CAPABILITY, LocalExecutionEnvironmentProvider, LocalHarnessExecutionControl, LocalHarnessRuntimeProvider, LocalWorklet, LocalWorkspaceCheckout, LocalWorkspaceEnvironment, MAX_ARTIFACT_BYTES, MAX_WORKSPACE_BUNDLE_BYTES, McpToolAdapter, PREPARED_WORKSPACE_LIMITS, PROCESS_INPUT_STREAMING_CAPABILITY, PROCESS_OUTPUT_STREAMING_CAPABILITY, PermissionDeniedError, PreparedWorkspaceCache, ReliableToolInvokerRegistry, RpcTelemetry, RuntimeInputProviderRegistry, S3ArtifactStore, STANDARD_RUNTIME_ACTIONS, SURFACE_COORDINATION_CAPABILITY, SandboxExecutionEnvironmentProvider, SandboxWorkspaceEnvironment, StaticWorker, TASK_ATTEMPT_CANCELLATION_CAPABILITY, TASK_ATTEMPT_EVENT_STREAM_CAPABILITY, TASK_OUTPUT_POLICY_CAPABILITY, ToolAdapterRegistry, ToolEffectInDoubtError, ToolInvokerRegistry, ToolProviderRegistry, UNSANDBOXED_COMMANDS_CAPABILITY, VolumeCopyError, WORKLET_ARTIFACT_TRANSFER_PATH, WORKSPACE_BUNDLE_LIMITS, WORKSPACE_CLONE_CAPABILITY, WORKSPACE_COPY_MOUNT_CAPABILITY, WORKSPACE_COPY_MOUNT_WRITE_CAPABILITY, WORKSPACE_ENVIRONMENT_CAPABILITY, WORKSPACE_IN_PLACE_CAPABILITY, WORKSPACE_MCP_VARIABLE_PREFIX, WORKSPACE_NATIVE_MOUNT_CAPABILITY, WORKSPACE_NATIVE_MOUNT_WRITE_CAPABILITY, WorkletAdmissionRejectedError, WorkletArtifactStore, WorkletArtifactTransferClient, WorkletArtifactTransferServer, WorkspaceEnvironmentResolver, WorkspaceHost, WorkspaceIntegrityError, WorkspaceResolverRegistry, artifactInputPath, assertHarnessMcpPolicyEnforceable, assertTagActionAllowed, assertTagContextItemEligible, attemptModel, bundleTaskObjects, bundleTrustedCommit, checkReturnedBundle, childPath, collectTaskAttemptEvents, compatibleDescriptorWorkers, connectExecutionEnvironmentMcpClient, connectWorkerMcpClient, createSplitExecutionBridge, createWorker, decodeTaskAttemptEvent, decodeTaskAttemptSpec, defaultTaskResult, deliverWorkspace, describeToolCall, descriptorForProfile, descriptorSupportsCoordination, descriptorSupportsExecution, descriptorSupportsRequiredContext, descriptorSupportsSurfaceCoordination, devcontainerImageUser, evaluateTagAction, executeToTerminalOutput, executionPreferenceScore, executionRootCheckoutPath, executionRootWorkspace, executionWarningProgress, harnessArtifactRestoreDestination, harnessModels, inPlaceWorkspacePath, isControlPlaneCoordinationTool, isTagActionAllowed, isTagContextItemEligible, listSandboxOutputFiles, localResourceFilter, materializeSandboxArtifactFiles, materializeTrustedBuildContext, minimalProcessEnvironment, missingArtifactError, modalDevcontainerBase, normalizeTaskProgress, openEnvironmentMcpBridge, parseGitBundleHeader, permitsRuntimeAction, prepareSandboxOutputDirectory, preparedWorkspaceDigest, preparedWorkspaceKey, preparedWorkspaceWarmKey, profileAppliesEffort, profileDefaultModel, readMcpServerConfiguration, requestSurfaceActionApproval, resolveHarnessContinuity, resolveLocalMountRoot, resolveSkillPackages, resolvedDevcontainerEnv, runtimeInputs, selectDescriptorExecution, selectWorkletPlacement, signArtifactTransferGrant, startMcpPolicyProxy, terminalOutputText, terminalTaskResult, terminateSandbox, toolCallOutcomeFromText, validateHarnessControlCapabilities, validateHarnessControlCommand, validateHarnessExecutionLimitCapabilities, validateHarnessResolution, validateHarnessSessionCapabilities, validatedDevcontainerDockerfile, withoutProviderCredentials, workerSlots, workspaceDefinition, workspaceHarnessRequirement };
|
|
20462
|
+
//# sourceMappingURL=chunk-2TIOIPHK.js.map
|
|
20463
|
+
//# sourceMappingURL=chunk-2TIOIPHK.js.map
|