@adhdev/mesh-shared 1.0.82-rc.47 → 1.0.82-rc.48
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.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/dist/light-task.d.ts +7 -0
- package/dist/worker-protocol.d.ts +7 -0
- package/package.json +1 -1
- package/src/light-task.ts +13 -0
- package/src/worker-protocol.ts +11 -0
package/dist/index.mjs
CHANGED
|
@@ -1729,6 +1729,7 @@ function renderLightWorkspaceRules(light) {
|
|
|
1729
1729
|
light.ownedPaths.length ? `Stay inside \`owned_paths\` (${light.ownedPaths.join(", ")}); if you must touch more, say why in the summary.` : "Stay inside the paths the task names; if you must touch more, say why in the summary."
|
|
1730
1730
|
];
|
|
1731
1731
|
}
|
|
1732
|
+
var WORKER_CURRENT_BRANCH_RULE = "Commit your change on the branch that is currently checked out in this workspace. Do not create or switch branches (no `git checkout -b` / `git switch`) unless the task explicitly says to; report the branch you committed on.";
|
|
1732
1733
|
function hasWorkerProtocolFooter(body) {
|
|
1733
1734
|
return typeof body === "string" && body.includes(WORKER_PROTOCOL_FOOTER_MARKER);
|
|
1734
1735
|
}
|
|
@@ -1751,6 +1752,7 @@ function renderWorkerProtocolFooter(input = {}) {
|
|
|
1751
1752
|
if (scope.length) lines.push(`You are a delegated worker (${scope.join(", ")}).`);
|
|
1752
1753
|
else lines.push("You are a delegated worker.");
|
|
1753
1754
|
if (input.light) lines.push(...renderLightWorkspaceRules(input.light));
|
|
1755
|
+
else if (input.commitOnCurrentBranch && input.stage?.role !== "review") lines.push(WORKER_CURRENT_BRANCH_RULE);
|
|
1754
1756
|
if (input.workerMcp === false) {
|
|
1755
1757
|
lines.push(
|
|
1756
1758
|
"This session has NO adhdev worker tools (`report_completion`, `progress_update`, `peer_context_pull`, `git_*`) \u2014 do not look for them. When your work is finished, blocked, or has failed, end your turn with a plain final summary: what you did, what you found, which files you changed, and where you left the branch. That final message is what the coordinator receives.",
|
|
@@ -4281,6 +4283,12 @@ var LIGHT_BLOCK_REASONS = [
|
|
|
4281
4283
|
var LIGHT_WARNINGS = ["shared_checkout_changed_during_task", "light_base_dirty_overlap"];
|
|
4282
4284
|
var LIGHT_LAND_MODES = ["refine", "apply_to_checkout"];
|
|
4283
4285
|
var LIGHT_TESTS_RUN_MAX = 20;
|
|
4286
|
+
function isLightWorkerSession(session) {
|
|
4287
|
+
const s = session;
|
|
4288
|
+
if (!s || typeof s !== "object") return false;
|
|
4289
|
+
const has = (o) => !!o && typeof o === "object" && typeof o.lightWorkspaceId === "string" && o.lightWorkspaceId.trim() !== "";
|
|
4290
|
+
return has(s.settings) || has(s.launchRecord?.settings) || has(s);
|
|
4291
|
+
}
|
|
4284
4292
|
|
|
4285
4293
|
// src/relay-reprobe.ts
|
|
4286
4294
|
var RELAY_REPROBE_BASE_DELAY_MS = 6e4;
|
|
@@ -4846,6 +4854,7 @@ export {
|
|
|
4846
4854
|
VIEWER_TO_SHARED_SESSION_TYPES,
|
|
4847
4855
|
WORKER_BRANCH_STATES,
|
|
4848
4856
|
WORKER_COMMITS_MAX,
|
|
4857
|
+
WORKER_CURRENT_BRANCH_RULE,
|
|
4849
4858
|
WORKER_DECISIONS_NEEDED_MAX,
|
|
4850
4859
|
WORKER_PROTOCOL_FOOTER_MARKER,
|
|
4851
4860
|
WORKER_REPORT_OUTCOMES,
|
|
@@ -4977,6 +4986,7 @@ export {
|
|
|
4977
4986
|
isInputEnvelopeWire,
|
|
4978
4987
|
isLaunchDefaultRole,
|
|
4979
4988
|
isLaunchDefaultSource,
|
|
4989
|
+
isLightWorkerSession,
|
|
4980
4990
|
isMeshDeliveryMode,
|
|
4981
4991
|
isMeshIndexQueryResponse,
|
|
4982
4992
|
isMeshMissionStatusValue,
|