@sellable/install 0.1.473 → 0.1.475-wip.phase158.20260801164717.2f986e6
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.
|
@@ -1091,6 +1091,59 @@ function proveAdminModelAuth(profile) {
|
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
+
function proveAdminAttachmentHandoff(profile) {
|
|
1095
|
+
const mediaPath = join(profile.profileHome, "attachment-canary.csv");
|
|
1096
|
+
writeFileSync(mediaPath, "name,status\nphase158,ready\n", { mode: 0o600 });
|
|
1097
|
+
let probe;
|
|
1098
|
+
try {
|
|
1099
|
+
probe = spawnSync(
|
|
1100
|
+
HERMES_PYTHON,
|
|
1101
|
+
[
|
|
1102
|
+
"-c",
|
|
1103
|
+
[
|
|
1104
|
+
"import json, sys",
|
|
1105
|
+
"from gateway.platforms.base import validate_media_delivery_path",
|
|
1106
|
+
"observed = validate_media_delivery_path(sys.argv[1])",
|
|
1107
|
+
'print(json.dumps({"accepted": observed == sys.argv[1]}))',
|
|
1108
|
+
].join(";"),
|
|
1109
|
+
mediaPath,
|
|
1110
|
+
],
|
|
1111
|
+
{
|
|
1112
|
+
env: {
|
|
1113
|
+
...process.env,
|
|
1114
|
+
HOME: profile.profileHome,
|
|
1115
|
+
HERMES_HOME: DATA_ROOT,
|
|
1116
|
+
HERMES_WRITE_SAFE_ROOT: DATA_ROOT,
|
|
1117
|
+
SELLABLE_HERMES_PROFILE_ID: profile.profile,
|
|
1118
|
+
NO_COLOR: "1",
|
|
1119
|
+
},
|
|
1120
|
+
encoding: "utf8",
|
|
1121
|
+
timeout: TIMEOUT_MS,
|
|
1122
|
+
maxBuffer: 64 * 1024,
|
|
1123
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
} finally {
|
|
1127
|
+
rmSync(mediaPath, { force: true });
|
|
1128
|
+
}
|
|
1129
|
+
let readback = null;
|
|
1130
|
+
try {
|
|
1131
|
+
readback = JSON.parse(probe.stdout ?? "");
|
|
1132
|
+
} catch {
|
|
1133
|
+
readback = null;
|
|
1134
|
+
}
|
|
1135
|
+
if (probe.status !== 0 || probe.error || readback?.accepted !== true) {
|
|
1136
|
+
throw new Error("admin_attachment_media_path_rejected");
|
|
1137
|
+
}
|
|
1138
|
+
return Object.freeze({
|
|
1139
|
+
home: profile.profileHome,
|
|
1140
|
+
hermesHome: DATA_ROOT,
|
|
1141
|
+
writeSafeRoot: DATA_ROOT,
|
|
1142
|
+
mediaPathAccepted: true,
|
|
1143
|
+
deliveryMode: "native",
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1094
1147
|
function clearRuntimeSecrets() {
|
|
1095
1148
|
for (const name of [
|
|
1096
1149
|
"slack-app",
|
|
@@ -2155,6 +2208,7 @@ export async function runAdminCanary() {
|
|
|
2155
2208
|
agentServiceEnv: agentServiceEnvironment,
|
|
2156
2209
|
});
|
|
2157
2210
|
const modelAuth = proveAdminModelAuth(profile);
|
|
2211
|
+
const attachmentHandoff = proveAdminAttachmentHandoff(profile);
|
|
2158
2212
|
const observedSettings = settingsProof(
|
|
2159
2213
|
settingsRoot,
|
|
2160
2214
|
transition.settingsDigest
|
|
@@ -2189,6 +2243,7 @@ export async function runAdminCanary() {
|
|
|
2189
2243
|
),
|
|
2190
2244
|
},
|
|
2191
2245
|
modelAuth,
|
|
2246
|
+
attachmentHandoff,
|
|
2192
2247
|
settings: observedSettings,
|
|
2193
2248
|
adminHome: profile.adminHome,
|
|
2194
2249
|
transition,
|
package/package.json
CHANGED
|
@@ -592,7 +592,12 @@ asset is the contract to load — load the prompt and that asset, verify the `v3
|
|
|
592
592
|
compatible range, and report the version before the first call. Call
|
|
593
593
|
`refill_v3_advance` with `{workspaceId, scope}` — plus `yolo: true` only when the
|
|
594
594
|
operator asked for `--yolo` — and call it again after each `advanced` or
|
|
595
|
-
`campaign_attention_required` result.
|
|
595
|
+
settled `campaign_attention_required` result. `refill_v3_continue` itself calls
|
|
596
|
+
the shared Create Campaign waiter for the exact packet campaign before it
|
|
597
|
+
returns. Call the next advance only when its `settlement.ready` is true; when
|
|
598
|
+
false, repeat `wait_for_campaign_processing({ workspaceId, campaignId,
|
|
599
|
+
requireIdle:true })` for that packet campaign until idle. An
|
|
600
|
+
`awaiting_external_change` result with
|
|
596
601
|
`deferral.code:"campaign_work_in_flight"` and a campaign id is a bounded
|
|
597
602
|
read-only continuation, not permission to walk the next campaign: call
|
|
598
603
|
`wait_for_campaign_processing({ workspaceId, campaignId, requireIdle:true })`,
|
|
@@ -640,7 +645,8 @@ and replacement observation, and never run the action or call its authority agai
|
|
|
640
645
|
Only `campaign_attention_required` needs you — route its one selected campaign to
|
|
641
646
|
`refill-sends-work-campaign` and return the chosen action through
|
|
642
647
|
`refill_v3_continue`, which first revalidates the packet against fresh world
|
|
643
|
-
state
|
|
648
|
+
state, executes at most one existing authority, and settles that exact campaign
|
|
649
|
+
through the shared Create Campaign waiter before a sibling may be considered.
|
|
644
650
|
|
|
645
651
|
This skill chooses no sender, date, lane, campaign, or action, holds no counter or
|
|
646
652
|
cursor between calls, and declares no terminal, exhaustion verdict, or health
|