release-skill 0.9.3 → 0.9.5
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +58 -0
- package/INSTALL.md +2 -2
- package/INSTALL.zh-CN.md +2 -2
- package/README.md +52 -16
- package/README.zh-CN.md +46 -16
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/consumer-contract-vectors.json +7 -7
- package/adapters/claude/bin/foundation-resource-binding.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +1513 -352
- package/adapters/claude/schemas/release-plan.schema.json +36 -0
- package/adapters/claude/schemas/release-project.schema.json +31 -0
- package/adapters/claude/skills/release-finish/SKILL.md +5 -5
- package/adapters/claude/skills/release-help/SKILL.md +11 -4
- package/adapters/claude/skills/release-prepare/SKILL.md +11 -3
- package/adapters/claude/skills/release-verify/SKILL.md +2 -1
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
- package/adapters/codex/bin/foundation-resource-binding.json +1 -1
- package/adapters/codex/bin/release-skill.bundle.mjs +1513 -352
- package/adapters/codex/schemas/release-plan.schema.json +36 -0
- package/adapters/codex/schemas/release-project.schema.json +31 -0
- package/adapters/codex/skills/release-finish/SKILL.md +5 -5
- package/adapters/codex/skills/release-help/SKILL.md +11 -4
- package/adapters/codex/skills/release-prepare/SKILL.md +11 -3
- package/adapters/codex/skills/release-verify/SKILL.md +2 -1
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
- package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +1513 -352
- package/adapters/kimi/schemas/release-plan.schema.json +36 -0
- package/adapters/kimi/schemas/release-project.schema.json +31 -0
- package/adapters/kimi/skills/release-finish/SKILL.md +5 -5
- package/adapters/kimi/skills/release-help/SKILL.md +11 -4
- package/adapters/kimi/skills/release-prepare/SKILL.md +11 -3
- package/adapters/kimi/skills/release-verify/SKILL.md +2 -1
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
- package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +1513 -352
- package/adapters/workbuddy/schemas/release-plan.schema.json +36 -0
- package/adapters/workbuddy/schemas/release-project.schema.json +31 -0
- package/adapters/workbuddy/skills/release-finish/SKILL.md +5 -5
- package/adapters/workbuddy/skills/release-help/SKILL.md +11 -4
- package/adapters/workbuddy/skills/release-prepare/SKILL.md +11 -3
- package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -1
- package/bin/consumer-contract-vectors.json +7 -7
- package/bin/foundation-resource-binding.json +1 -1
- package/bin/release-skill-cli.mjs +113 -22
- package/bin/release-skill.bundle.mjs +1513 -352
- package/package.json +4 -4
- package/platform-manifest.json +4 -4
- package/references/.render-manifest.json +4 -4
- package/references/01-state-machine.md +18 -0
- package/references/02-project-config.md +20 -0
- package/schemas/release-plan.schema.json +36 -0
- package/schemas/release-project.schema.json +31 -0
- package/skills/release-finish/SKILL.md +5 -5
- package/skills/release-help/SKILL.md +11 -4
- package/skills/release-prepare/SKILL.md +11 -3
- package/skills/release-verify/SKILL.md +2 -1
- package/skills-src/release-finish/SKILL.md +5 -5
- package/skills-src/release-help/SKILL.md +11 -4
- package/skills-src/release-prepare/SKILL.md +11 -3
- package/skills-src/release-verify/SKILL.md +2 -1
- package/src/commands/post-release-local.mjs +373 -26
- package/src/commands/prepare.mjs +361 -16
- package/src/commands/ship.mjs +190 -13
- package/src/commands/verify.mjs +175 -2
- package/src/core/foundation-plugin-verification.mjs +22 -2
- package/src/core/plan.mjs +45 -1
- package/src/platforms/registry.mjs +97 -0
- package/src/producers/foundation-resource-projection.mjs +3 -3
- package/src/readme/contract.mjs +23 -3
|
@@ -438,6 +438,103 @@ export function getPlatform(id) {
|
|
|
438
438
|
return platform;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
const STANDALONE_SHA_RE = /^[0-9a-f]{40}$/u;
|
|
442
|
+
|
|
443
|
+
function standaloneIdentityCore(platformOrId, fields) {
|
|
444
|
+
const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
|
|
445
|
+
const id = platform?.id;
|
|
446
|
+
if (id !== 'claude' && id !== 'codex') {
|
|
447
|
+
throw new Error(`standalone-index install identity is unsupported for platform "${id ?? '<unknown>'}"`);
|
|
448
|
+
}
|
|
449
|
+
const { name, source, version } = fields;
|
|
450
|
+
if (typeof name !== 'string' || name.length === 0
|
|
451
|
+
|| !source || typeof source !== 'object' || Array.isArray(source)
|
|
452
|
+
|| typeof source.source !== 'string'
|
|
453
|
+
|| typeof source.ref !== 'string' || source.ref.length === 0
|
|
454
|
+
|| typeof source.sha !== 'string' || !STANDALONE_SHA_RE.test(source.sha)) {
|
|
455
|
+
throw new Error(`${id} standalone-index install identity has invalid owned fields`);
|
|
456
|
+
}
|
|
457
|
+
if (id === 'claude') {
|
|
458
|
+
if (source.source !== 'github' || typeof source.repo !== 'string' || source.repo.length === 0
|
|
459
|
+
|| typeof version !== 'string' || version.length === 0) {
|
|
460
|
+
throw new Error('Claude standalone-index install identity requires github repo, ref, sha, and version');
|
|
461
|
+
}
|
|
462
|
+
return {
|
|
463
|
+
name,
|
|
464
|
+
source: { source: 'github', repo: source.repo, ref: source.ref, sha: source.sha },
|
|
465
|
+
version,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
if (source.source !== 'url' || typeof source.url !== 'string' || source.url.length === 0) {
|
|
469
|
+
throw new Error('Codex standalone-index install identity requires url, ref, and sha');
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
name,
|
|
473
|
+
source: { source: 'url', url: source.url, ref: source.ref, sha: source.sha },
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/** Build the expected install identity from the frozen plugin contract. */
|
|
478
|
+
export function buildExpectedStandaloneIndexInstallIdentity(platformOrId, frozenIdentity = {}) {
|
|
479
|
+
const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
|
|
480
|
+
const id = platform?.id;
|
|
481
|
+
const { name, repo, tag, sha, version } = frozenIdentity;
|
|
482
|
+
if (typeof repo !== 'string' || repo.length === 0 || typeof tag !== 'string' || tag.length === 0) {
|
|
483
|
+
throw new Error('standalone-index expected identity requires a plugin repository and tag');
|
|
484
|
+
}
|
|
485
|
+
if (id === 'claude') {
|
|
486
|
+
return standaloneIdentityCore(platform, {
|
|
487
|
+
name,
|
|
488
|
+
version,
|
|
489
|
+
source: { source: 'github', repo, ref: tag, sha },
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
if (id === 'codex') {
|
|
493
|
+
return standaloneIdentityCore(platform, {
|
|
494
|
+
name,
|
|
495
|
+
source: { source: 'url', url: `https://github.com/${repo}.git`, ref: `refs/tags/${tag}`, sha },
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
return standaloneIdentityCore(platform, { name, source: {}, version });
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/** Project only the actual remote entry; frozen plan fields are never accepted. */
|
|
502
|
+
export function projectObservedStandaloneIndexInstallIdentity(platformOrId, entry) {
|
|
503
|
+
const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
|
|
504
|
+
const id = platform?.id;
|
|
505
|
+
if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
|
|
506
|
+
throw new Error('standalone-index observed identity requires an entry object');
|
|
507
|
+
}
|
|
508
|
+
const source = entry.source;
|
|
509
|
+
if (!source || typeof source !== 'object' || Array.isArray(source)) {
|
|
510
|
+
throw new Error('standalone-index observed identity requires a source object');
|
|
511
|
+
}
|
|
512
|
+
if (id === 'claude') {
|
|
513
|
+
return standaloneIdentityCore(platform, {
|
|
514
|
+
name: entry.name,
|
|
515
|
+
version: entry.version,
|
|
516
|
+
source: {
|
|
517
|
+
source: source.source,
|
|
518
|
+
repo: source.repo,
|
|
519
|
+
ref: source.ref,
|
|
520
|
+
sha: source.sha,
|
|
521
|
+
},
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
if (id === 'codex') {
|
|
525
|
+
return standaloneIdentityCore(platform, {
|
|
526
|
+
name: entry.name,
|
|
527
|
+
source: {
|
|
528
|
+
source: source.source,
|
|
529
|
+
url: source.url,
|
|
530
|
+
ref: source.ref,
|
|
531
|
+
sha: source.sha,
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
return standaloneIdentityCore(platform, { name: entry.name, source });
|
|
536
|
+
}
|
|
537
|
+
|
|
441
538
|
/**
|
|
442
539
|
* Resolve a declared skill projection surface to its public host name.
|
|
443
540
|
* The host is always derived from the descriptor's authoritative
|
|
@@ -55,9 +55,9 @@ import { digestBytes, publishFileOrReplace, readFileStrict, withTemporaryWorkspa
|
|
|
55
55
|
import { canonicalJson } from '../core/digest.mjs';
|
|
56
56
|
|
|
57
57
|
export const FOUNDATION_PACKAGES = Object.freeze({
|
|
58
|
-
'skill-family-contracts': '0.
|
|
59
|
-
'skill-family-engineering-kit': '0.
|
|
60
|
-
'skill-family-harness-node': '0.
|
|
58
|
+
'skill-family-contracts': '0.16.0',
|
|
59
|
+
'skill-family-engineering-kit': '0.16.0',
|
|
60
|
+
'skill-family-harness-node': '0.16.0',
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
export const BINDING_RECORD_PATH = 'bin/foundation-resource-binding.json';
|
package/src/readme/contract.mjs
CHANGED
|
@@ -169,6 +169,28 @@ function findSkillNames(content, manifestSkillNames) {
|
|
|
169
169
|
return manifestSkillNames.filter((name) => content.includes(name));
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Determine whether README content contains a supported installation command.
|
|
174
|
+
*
|
|
175
|
+
* npm and npx remain compatible with the original whole-document check. The
|
|
176
|
+
* platform plugin commands are checked only inside Markdown code so that a
|
|
177
|
+
* marketplace-source explanation cannot be mistaken for an installation.
|
|
178
|
+
* @param {string} content
|
|
179
|
+
* @returns {boolean}
|
|
180
|
+
*/
|
|
181
|
+
function hasInstallCommand(content) {
|
|
182
|
+
if (/npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(content)) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const codeBlocks = [
|
|
187
|
+
...[...content.matchAll(/```[^\n]*\n([\s\S]*?)```/g)].map((match) => match[1]),
|
|
188
|
+
...[...content.matchAll(/`([^`\n]+)`/g)].map((match) => match[1]),
|
|
189
|
+
];
|
|
190
|
+
const pluginInstall = /^(?:[$>]\s*)?(?:codex\s+plugin\s+add|claude\s+plugin\s+install)\s+\S+/i;
|
|
191
|
+
return codeBlocks.some((block) => block.split('\n').some((line) => pluginInstall.test(line.trim())));
|
|
192
|
+
}
|
|
193
|
+
|
|
172
194
|
// ---------------------------------------------------------------------------
|
|
173
195
|
// Public API
|
|
174
196
|
// ---------------------------------------------------------------------------
|
|
@@ -250,9 +272,7 @@ export async function evaluateReadme({ snapshotDir, pluginManifest }) {
|
|
|
250
272
|
|
|
251
273
|
// Readability checks: installation, minimal example, failure diagnosis
|
|
252
274
|
const readabilityChecks = {
|
|
253
|
-
hasInstall: enContent
|
|
254
|
-
? /npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(enContent)
|
|
255
|
-
: false,
|
|
275
|
+
hasInstall: enContent ? hasInstallCommand(enContent) : false,
|
|
256
276
|
hasMinimalExample: enContent
|
|
257
277
|
? /```[\s\S]*?(release-skill|assess|prepare|help)[\s\S]*?```/i.test(enContent)
|
|
258
278
|
: false,
|