@rayul/kordis 0.1.12 → 0.1.14
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/assets/kordis-publishing/SKILL.md +12 -0
- package/assets/kordis-using/SKILL.md +8 -0
- package/dist/index.js +56 -10
- package/package.json +1 -1
|
@@ -25,6 +25,18 @@ Publish a valid, AI-review-passing version. ALWAYS dry-run first.
|
|
|
25
25
|
`version` differs from that result, the API rejects with `usage`. Either
|
|
26
26
|
drop the `version` field on updates, set `--bump` to match, or align
|
|
27
27
|
them.
|
|
28
|
+
- RECOMMENDED: **omit `version:` from frontmatter on update pushes** and
|
|
29
|
+
use only `--bump patch|minor|major` to control versioning. Having both
|
|
30
|
+
is the most common push failure.
|
|
31
|
+
|
|
32
|
+
## Deleting a package
|
|
33
|
+
|
|
34
|
+
There is **no `kordis delete` CLI command**. Options:
|
|
35
|
+
- Web UI: `https://kordis.store/p/<full_slug>` (if a delete button is available)
|
|
36
|
+
- Registry owner: soft-delete via the prod Postgres
|
|
37
|
+
(`UPDATE packages SET deleted_at = NOW() WHERE full_slug = '...'`)
|
|
38
|
+
- Workaround: push a new version with `visibility: unlisted` or a
|
|
39
|
+
deprecation notice in the body
|
|
28
40
|
|
|
29
41
|
If the body contains third-party content, MUST preserve the original copyright
|
|
30
42
|
and license text inside the body and link to source via `homepage`.
|
|
@@ -27,6 +27,14 @@ DEFAULT to `read` when you spontaneously want to consult a skill. DEFAULT to
|
|
|
27
27
|
- Trust gate: only `review_status=passed` returned by default. To get a
|
|
28
28
|
`pending_review` body, pass `--allow-pending` AFTER warning the user the
|
|
29
29
|
package has not been AI-reviewed.
|
|
30
|
+
- Note: `jit_blocked` fires for BOTH ineligible types AND packages still
|
|
31
|
+
under review. Check `kordis info --json` to distinguish: `review_status`
|
|
32
|
+
tells you which case you're in.
|
|
33
|
+
|
|
34
|
+
`pull` vs `read` on pending packages: `pull` writes files even while
|
|
35
|
+
`review_status=pending_review`; `read` blocks. When you need the content
|
|
36
|
+
immediately (e.g. to verify a package you just pushed), use `pull` with
|
|
37
|
+
`--tool <name>` — it bypasses the JIT trust gate.
|
|
30
38
|
|
|
31
39
|
## Commands
|
|
32
40
|
|
package/dist/index.js
CHANGED
|
@@ -842,6 +842,9 @@ var init_client = __esm({
|
|
|
842
842
|
getPackage(username, slug) {
|
|
843
843
|
return this.request(`/api/packages/${username}/${slug}`);
|
|
844
844
|
}
|
|
845
|
+
deletePackage(username, slug) {
|
|
846
|
+
return this.request(`/api/packages/${username}/${slug}`, { method: "DELETE" });
|
|
847
|
+
}
|
|
845
848
|
getContent(username, slug, opts = {}) {
|
|
846
849
|
return this.request(
|
|
847
850
|
`/api/packages/${username}/${slug}/content`,
|
|
@@ -972,7 +975,7 @@ var init_src2 = __esm({
|
|
|
972
975
|
|
|
973
976
|
// src/index.ts
|
|
974
977
|
init_src2();
|
|
975
|
-
import { Command as
|
|
978
|
+
import { Command as Command13 } from "commander";
|
|
976
979
|
|
|
977
980
|
// src/commands/login.ts
|
|
978
981
|
import { Command } from "commander";
|
|
@@ -1361,8 +1364,10 @@ function parseFrontmatter(source) {
|
|
|
1361
1364
|
try {
|
|
1362
1365
|
parsed = parseYaml(raw);
|
|
1363
1366
|
} catch (err) {
|
|
1367
|
+
const msg = err.message;
|
|
1368
|
+
const hint = msg.includes("Nested mapping") || msg.includes("compact mapping") ? ' Hint: if a field value (e.g. description) contains a colon, wrap the entire value in quotes: description: "Use when... Trigger: X".' : "";
|
|
1364
1369
|
throw new FrontmatterParseError(
|
|
1365
|
-
`YAML frontmatter is malformed: ${
|
|
1370
|
+
`YAML frontmatter is malformed: ${msg}${hint}`,
|
|
1366
1371
|
{ cause: err }
|
|
1367
1372
|
);
|
|
1368
1373
|
}
|
|
@@ -1408,6 +1413,14 @@ function pushCommand() {
|
|
|
1408
1413
|
} else {
|
|
1409
1414
|
content = await readFile3(abs, "utf8");
|
|
1410
1415
|
}
|
|
1416
|
+
let nameFromFm = null;
|
|
1417
|
+
try {
|
|
1418
|
+
const fm = parseFrontmatter(content).frontmatter ?? {};
|
|
1419
|
+
const v = fm["name"];
|
|
1420
|
+
if (typeof v === "string") nameFromFm = v;
|
|
1421
|
+
} catch (err) {
|
|
1422
|
+
throw new Error(err.message);
|
|
1423
|
+
}
|
|
1411
1424
|
let targetUser = null;
|
|
1412
1425
|
let targetSlug = null;
|
|
1413
1426
|
if (opts.slug && opts.slug.includes("/")) {
|
|
@@ -1417,13 +1430,6 @@ function pushCommand() {
|
|
|
1417
1430
|
targetSlug = s2;
|
|
1418
1431
|
}
|
|
1419
1432
|
} else {
|
|
1420
|
-
let nameFromFm = null;
|
|
1421
|
-
try {
|
|
1422
|
-
const fm = parseFrontmatter(content).frontmatter ?? {};
|
|
1423
|
-
const v = fm["name"];
|
|
1424
|
-
if (typeof v === "string") nameFromFm = v;
|
|
1425
|
-
} catch {
|
|
1426
|
-
}
|
|
1427
1433
|
if (bundle.username && (opts.slug || nameFromFm)) {
|
|
1428
1434
|
targetUser = bundle.username;
|
|
1429
1435
|
targetSlug = opts.slug ?? nameFromFm;
|
|
@@ -2917,9 +2923,48 @@ function unstarCommand() {
|
|
|
2917
2923
|
});
|
|
2918
2924
|
}
|
|
2919
2925
|
|
|
2926
|
+
// src/commands/delete.ts
|
|
2927
|
+
import { Command as Command12 } from "commander";
|
|
2928
|
+
import prompts from "prompts";
|
|
2929
|
+
function deleteCommand() {
|
|
2930
|
+
return new Command12("delete").description("permanently delete a package you own").argument("<full_slug>", "package identifier {username}/{slug}").option("--force", "skip the confirmation prompt").action(async (fullSlug, opts) => {
|
|
2931
|
+
const [username, slug] = fullSlug.split("/");
|
|
2932
|
+
if (!username || !slug) {
|
|
2933
|
+
throw new Error('full_slug must be "{username}/{slug}"');
|
|
2934
|
+
}
|
|
2935
|
+
const bundle = await useClient();
|
|
2936
|
+
const detail = await bundle.api.getPackage(username, slug);
|
|
2937
|
+
if (!opts.force) {
|
|
2938
|
+
printHuman(c.yellow(` \u26A0 You are about to permanently delete:`));
|
|
2939
|
+
printHuman(` ${c.bold(detail.full_slug)} v${detail.current_version}`);
|
|
2940
|
+
printHuman(` "${detail.description?.slice(0, 80) ?? ""}"`);
|
|
2941
|
+
printHuman(c.yellow(` The slug cannot be reused after deletion. This cannot be undone via the CLI.`));
|
|
2942
|
+
printHuman("");
|
|
2943
|
+
const { confirmed } = await prompts({
|
|
2944
|
+
type: "confirm",
|
|
2945
|
+
name: "confirmed",
|
|
2946
|
+
message: `Delete ${c.bold(fullSlug)}?`,
|
|
2947
|
+
initial: false
|
|
2948
|
+
});
|
|
2949
|
+
if (!confirmed) {
|
|
2950
|
+
printHuman(c.gray("Aborted."));
|
|
2951
|
+
process.exit(0);
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
await bundle.authedRequest((api) => api.deletePackage(username, slug));
|
|
2955
|
+
printDual({
|
|
2956
|
+
json: { status: "deleted", full_slug: fullSlug },
|
|
2957
|
+
human: () => {
|
|
2958
|
+
printHuman(c.green(`\u2713 Deleted ${c.bold(fullSlug)}`));
|
|
2959
|
+
printHuman(c.gray(` The package is no longer visible. Slug "${fullSlug}" is reserved permanently.`));
|
|
2960
|
+
}
|
|
2961
|
+
});
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2920
2965
|
// src/index.ts
|
|
2921
2966
|
function buildProgram() {
|
|
2922
|
-
const program = new
|
|
2967
|
+
const program = new Command13("kordis").version(VERSION).description("Kordis \u2014 registry for agentic-coding packages").option("--json", "emit JSON output to stdout (default: human)", false).hook("preAction", (thisCommand) => {
|
|
2923
2968
|
const opts = thisCommand.optsWithGlobals();
|
|
2924
2969
|
if (opts.json) setJsonMode(true);
|
|
2925
2970
|
});
|
|
@@ -2934,6 +2979,7 @@ function buildProgram() {
|
|
|
2934
2979
|
program.addCommand(commentCommand());
|
|
2935
2980
|
program.addCommand(starCommand());
|
|
2936
2981
|
program.addCommand(unstarCommand());
|
|
2982
|
+
program.addCommand(deleteCommand());
|
|
2937
2983
|
program.addCommand(setupCommand());
|
|
2938
2984
|
return program;
|
|
2939
2985
|
}
|