release-skill 0.9.38 → 0.10.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/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.cursor-plugin/plugin.json +1 -1
- package/.kimi-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/CHANGELOG.md +43 -0
- package/INSTALL.md +2 -2
- package/INSTALL.zh-CN.md +2 -2
- package/README.md +8 -21
- package/README.zh-CN.md +8 -24
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +44 -31
- package/adapters/claude/skills/release-help/SKILL.md +2 -2
- package/adapters/claude/skills/release-prepare/SKILL.md +14 -2
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +44 -31
- package/adapters/codex/skills/release-help/SKILL.md +2 -2
- package/adapters/codex/skills/release-prepare/SKILL.md +14 -2
- package/adapters/cursor/.cursor-plugin/plugin.json +1 -1
- package/adapters/cursor/bin/release-skill.bundle.mjs +44 -31
- package/adapters/cursor/skills/release-help/SKILL.md +2 -2
- package/adapters/cursor/skills/release-prepare/SKILL.md +14 -2
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +44 -31
- package/adapters/kimi/skills/release-help/SKILL.md +2 -2
- package/adapters/kimi/skills/release-prepare/SKILL.md +14 -2
- package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
- package/adapters/qoder/bin/release-skill.bundle.mjs +44 -31
- package/adapters/qoder/skills/release-help/SKILL.md +2 -2
- package/adapters/qoder/skills/release-prepare/SKILL.md +14 -2
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +44 -31
- package/adapters/workbuddy/skills/release-help/SKILL.md +2 -2
- package/adapters/workbuddy/skills/release-prepare/SKILL.md +14 -2
- package/bin/release-skill.bundle.mjs +44 -31
- package/package.json +3 -2
- package/platform-manifest.json +4 -4
- package/skills/release-help/SKILL.md +2 -2
- package/skills/release-prepare/SKILL.md +14 -2
- package/skills-src/release-help/SKILL.md +2 -2
- package/skills-src/release-prepare/SKILL.md +14 -2
- package/src/commands/post-release-finish.mjs +9 -0
- package/src/core/plan-replacement.mjs +1 -1
- package/src/core/pre-authority-failure.mjs +10 -9
- package/src/core/source-authority.mjs +30 -15
- package/src/core/test-candidate.mjs +2 -6
|
@@ -369,6 +369,13 @@ export async function runPostReleaseFinish({
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
const setupSkill = loaded.config.releaseFinish?.setupSkill;
|
|
372
|
+
const setupPlugin = typeof setupSkill === 'string' ? /^([^:\s]+):[^:\s]+$/.exec(setupSkill)?.[1] : undefined;
|
|
373
|
+
const declaredSetupOwners = setupPlugin
|
|
374
|
+
? loaded.config.releaseUnits.filter((unit) => unit.postPublish?.localHostUpdate?.plugin === setupPlugin)
|
|
375
|
+
: [];
|
|
376
|
+
const unselectedSetupOwner = !hasTargets && declaredSetupOwners.length === 1
|
|
377
|
+
&& !plan.units.some((unit) => unit.id === declaredSetupOwners[0].id)
|
|
378
|
+
? declaredSetupOwners[0] : null;
|
|
372
379
|
const candidates = observations.filter((entry) => (
|
|
373
380
|
entry.installation === 'current' && entry.loaded === true && typeof entry.skillFile === 'string'
|
|
374
381
|
));
|
|
@@ -379,6 +386,8 @@ export async function runPostReleaseFinish({
|
|
|
379
386
|
setupStep = step('SKIPPED', '项目未配置 releaseFinish.setupSkill。');
|
|
380
387
|
} else if (skipLocalHosts) {
|
|
381
388
|
setupStep = step('SKIPPED', '调用者已明确跳过宿主更新和加载,本轮不执行 setup。', { setupSkill });
|
|
389
|
+
} else if (unselectedSetupOwner) {
|
|
390
|
+
setupStep = step('SKIPPED', `目标入口 ${setupSkill} 属于未选单元 ${unselectedSetupOwner.id},本轮不适用。`, { setupSkill });
|
|
382
391
|
} else if (candidateOwners.size > 1) {
|
|
383
392
|
setupStep = step('PENDING', `目标入口 ${setupSkill} 存在多个插件身份归属,不能用单个 setup 反馈完整收尾。`, {
|
|
384
393
|
setupSkill, candidates,
|
|
@@ -178,7 +178,7 @@ function targetIdentity(plan) {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function overlaps(left, right) {
|
|
181
|
+
export function overlaps(left, right) {
|
|
182
182
|
return left.units.some((a) => right.units.some((b) => a.id === b.id && a.targetVersion === b.targetVersion));
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -91,7 +91,7 @@ export async function isProvenPreAuthorityFailure(runDir, runName, { strictHisto
|
|
|
91
91
|
if (legacyValid) return !strictHistory && await hasNoState(runDir);
|
|
92
92
|
|
|
93
93
|
const producerVersion = summary?.producer?.version;
|
|
94
|
-
const historical = ['0.9.3', '0.9.14', '0.9.17', '0.9.33', '0.9.37'].includes(producerVersion);
|
|
94
|
+
const historical = ['0.9.3', '0.9.14', '0.9.17', '0.9.33', '0.9.37', '0.9.38', '0.10.0'].includes(producerVersion);
|
|
95
95
|
if (!historical && producerVersion !== resolveProducerVersion()) return false;
|
|
96
96
|
const sameProducer = (value) => value && typeof value === 'object' && !Array.isArray(value)
|
|
97
97
|
&& Object.keys(value).length === 2
|
|
@@ -185,6 +185,7 @@ async function hasNoState(runDir) {
|
|
|
185
185
|
|
|
186
186
|
// A finite prefix of the audited publish writer, not a target inference.
|
|
187
187
|
function closedPublishPrefix(events, summary, version) {
|
|
188
|
+
const auditedCurrentPrefix = ['0.9.38', '0.10.0', '0.10.1'].includes(version);
|
|
188
189
|
let i = 0;
|
|
189
190
|
const take = (phase, status, gate) => {
|
|
190
191
|
const e = events[i];
|
|
@@ -197,10 +198,10 @@ function closedPublishPrefix(events, summary, version) {
|
|
|
197
198
|
['plan-digest', 'started'], ['plan-digest', 'passed'],
|
|
198
199
|
['action-completeness', 'started'], ['action-completeness', 'passed'],
|
|
199
200
|
]) if (!gate(name, status)) return false;
|
|
200
|
-
if (
|
|
201
|
+
if (!auditedCurrentPrefix || events[i]?.details?.gate === 'frozen-artifacts') {
|
|
201
202
|
if (!gate('frozen-artifacts', 'started') || !gate('frozen-artifacts', 'passed')) return false;
|
|
202
203
|
}
|
|
203
|
-
if (
|
|
204
|
+
if (!auditedCurrentPrefix || events[i]?.details?.gate === 'skill-resource-closure') {
|
|
204
205
|
if (!gate('skill-resource-closure', 'started') || !gate('skill-resource-closure', 'passed')) return false;
|
|
205
206
|
}
|
|
206
207
|
if (!gate('approval-load', 'started')) return false;
|
|
@@ -210,14 +211,14 @@ function closedPublishPrefix(events, summary, version) {
|
|
|
210
211
|
&& JSON.stringify(e.error) === JSON.stringify(summary.error)
|
|
211
212
|
&& summary.details?.recoveryActionCode === summary.recoveryActionCode;
|
|
212
213
|
};
|
|
213
|
-
if (
|
|
214
|
+
if ((version === '0.9.33' || auditedCurrentPrefix) && summary.recoveryActionCode === 'DIAGNOSE') return terminal();
|
|
214
215
|
if (summary.recoveryActionCode !== 'RETRY_COMMAND' || !gate('approval-validated', 'passed')) return false;
|
|
215
216
|
for (const name of ['adapter-availability', 'baseline-check']) {
|
|
216
217
|
if (!gate(name, 'started') || !gate(name, 'passed')) return false;
|
|
217
218
|
}
|
|
218
219
|
while (events[i]?.details?.gate === 'previous-public-baseline') {
|
|
219
220
|
const unit = events[i].details.unitId;
|
|
220
|
-
if (
|
|
221
|
+
if (auditedCurrentPrefix && events[i].status === 'passed' && events[i].details.reason === 'fresh repository') {
|
|
221
222
|
if (typeof unit !== 'string' || !gate('previous-public-baseline', 'passed')) return false;
|
|
222
223
|
continue;
|
|
223
224
|
}
|
|
@@ -226,16 +227,16 @@ function closedPublishPrefix(events, summary, version) {
|
|
|
226
227
|
|| events[i]?.details?.unitId !== unit || !gate('previous-public-baseline', 'passed')) return false;
|
|
227
228
|
}
|
|
228
229
|
const sourceGate = events[i]?.details?.gate === 'source-authority';
|
|
229
|
-
if ((sourceGate ||
|
|
230
|
-
if (['0.9.3', '0.9.14', '0.9.33', '0.9.37'
|
|
230
|
+
if ((sourceGate || !auditedCurrentPrefix) && !gate('source-authority', 'started')) return false;
|
|
231
|
+
if ((['0.9.3', '0.9.14', '0.9.33', '0.9.37'].includes(version) || auditedCurrentPrefix)
|
|
231
232
|
&& events[i]?.status === 'failed') {
|
|
232
233
|
return gate('source-authority', 'failed') && terminal();
|
|
233
234
|
}
|
|
234
|
-
if (!
|
|
235
|
+
if (!(version === '0.9.17' || auditedCurrentPrefix) || (sourceGate && !gate('source-authority', 'passed')) || !gate('global-preflight', 'started')) return false;
|
|
235
236
|
let observed = 0;
|
|
236
237
|
while (events[i]?.phase === 'global-preflight-arbitration') {
|
|
237
238
|
if (!take('global-preflight-arbitration', 'pre-observe', undefined)) return false;
|
|
238
239
|
observed += 1;
|
|
239
240
|
}
|
|
240
|
-
return (
|
|
241
|
+
return (auditedCurrentPrefix || observed > 0) && terminal();
|
|
241
242
|
}
|
|
@@ -295,21 +295,37 @@ export async function checkSourceInputDirty({ closure, root, execFn = execFile }
|
|
|
295
295
|
const paths = (closure?.entries ?? []).map((entry) => entry.path);
|
|
296
296
|
if (paths.length === 0) return { dirty: false, dirtyPaths: [] };
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
const records = [];
|
|
299
299
|
try {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
'
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
300
|
+
// Keep the complete selection, but bound each Git invocation well below
|
|
301
|
+
// platform argv limits. Git status does not accept --pathspec-from-file.
|
|
302
|
+
// Retain pathspec-scoped ignored reporting: a whole-repository scan can
|
|
303
|
+
// collapse an ignored sibling into an ancestor of a clean selected file.
|
|
304
|
+
for (let offset = 0; offset < paths.length;) {
|
|
305
|
+
const batch = [];
|
|
306
|
+
let bytes = 0;
|
|
307
|
+
while (offset < paths.length) {
|
|
308
|
+
const size = Buffer.byteLength(paths[offset], 'utf8') + 1;
|
|
309
|
+
if (batch.length > 0 && bytes + size > 16 * 1024) break;
|
|
310
|
+
batch.push(paths[offset]);
|
|
311
|
+
bytes += size;
|
|
312
|
+
offset += 1;
|
|
313
|
+
}
|
|
314
|
+
const { stdout } = await execFn(
|
|
315
|
+
'git',
|
|
316
|
+
[
|
|
317
|
+
'status',
|
|
318
|
+
'--porcelain=v1',
|
|
319
|
+
'-z',
|
|
320
|
+
'--untracked-files=all',
|
|
321
|
+
'--ignored=matching',
|
|
322
|
+
'--',
|
|
323
|
+
...batch,
|
|
324
|
+
],
|
|
325
|
+
{ cwd: root, encoding: 'utf8', shell: false },
|
|
326
|
+
);
|
|
327
|
+
records.push(...String(stdout).split('\0').filter(Boolean));
|
|
328
|
+
}
|
|
313
329
|
} catch (error) {
|
|
314
330
|
throw new ReleaseError(
|
|
315
331
|
DIRTY_SOURCE_INPUT,
|
|
@@ -319,7 +335,6 @@ export async function checkSourceInputDirty({ closure, root, execFn = execFile }
|
|
|
319
335
|
}
|
|
320
336
|
|
|
321
337
|
const dirtyPaths = [];
|
|
322
|
-
const records = String(stdout).split('\0').filter(Boolean);
|
|
323
338
|
for (let index = 0; index < records.length; index += 1) {
|
|
324
339
|
const record = records[index];
|
|
325
340
|
if (record.length < 4) continue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFormalPlans, bindReplacement, canonicalFormalPlanPath } from './plan-replacement.mjs';
|
|
1
|
+
import { readFormalPlans, bindReplacement, canonicalFormalPlanPath, overlaps } from './plan-replacement.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* One test-intake candidate: exclusive save, strict read, and the no-git
|
|
4
4
|
* handoff decision shared by prepare and ship.
|
|
@@ -272,10 +272,6 @@ function targetVersionsOf(plan) {
|
|
|
272
272
|
.filter((version) => typeof version === 'string' && version.length > 0))];
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
function sameTargetVersions(left, right) {
|
|
276
|
-
return left.length === right.length && left.every((version) => right.includes(version));
|
|
277
|
-
}
|
|
278
|
-
|
|
279
275
|
/**
|
|
280
276
|
* Formal plans under `.release-skill/plans`. The convenience pointer is not
|
|
281
277
|
* an acceptance basis. Does not run git.
|
|
@@ -460,7 +456,7 @@ export async function decideTestCandidateHandoff({
|
|
|
460
456
|
const retired = new Set(formalPlans.map((entry) => entry.plan.replacesPlanDigest).filter(Boolean));
|
|
461
457
|
if (predecessor) retired.add(predecessor);
|
|
462
458
|
const differentBasis = formalPlans.filter((plan) => (
|
|
463
|
-
!retired.has(plan.planDigest) &&
|
|
459
|
+
!retired.has(plan.planDigest) && overlaps(plan.plan, loaded.candidate.prepared) && plan.subjectDigest !== subjectDigest
|
|
464
460
|
));
|
|
465
461
|
if (differentBasis.length > 0) {
|
|
466
462
|
throw new ReleaseError(GATE_FAILED, 'a different formal acceptance basis already exists for this target', {
|