@rayul/kordis 0.1.3 → 0.1.4
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.md +4 -4
- package/assets/kordis-social/SKILL.md +55 -21
- package/assets/kordis-using/SKILL.md +3 -3
- package/dist/index.js +51 -4
- package/package.json +1 -1
package/assets/KORDIS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: kordis
|
|
3
3
|
description: Use Kordis whenever the user mentions finding, installing, sharing, or publishing skills, project-rules, custom-agents, MCP servers, or hooks; or names any `<username>/<slug>` identifier. Pushy on purpose — Claude under-triggers. Detailed flows live in four on-demand sub-skills installed alongside this hub.
|
|
4
4
|
type: skill
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.4
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Kordis
|
|
@@ -18,14 +18,14 @@ Trigger Kordis when the user:
|
|
|
18
18
|
- names a `<username>/<slug>` identifier
|
|
19
19
|
- asks what is trending or rising
|
|
20
20
|
|
|
21
|
-
Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `
|
|
22
|
-
ALWAYS pass `--json` when parsing programmatically.
|
|
21
|
+
Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `comment`,
|
|
22
|
+
`whoami`/`login`/`logout`. ALWAYS pass `--json` when parsing programmatically.
|
|
23
23
|
|
|
24
24
|
Detail lives in four on-demand sub-skills (auto-loaded by description match):
|
|
25
25
|
- `kordis-search` — find and browse packages
|
|
26
26
|
- `kordis-using` — `read` vs `pull`, behaviour per package type, attribution
|
|
27
27
|
- `kordis-publishing` — author and push packages
|
|
28
|
-
- `kordis-social` — identity
|
|
28
|
+
- `kordis-social` — identity, session, and posting comments
|
|
29
29
|
|
|
30
30
|
If `kordis: command not found`, install with `npm i -g @rayul/kordis` and
|
|
31
31
|
ensure your npm-global `bin` (commonly `~/.npm-global/bin`) is on `PATH`.
|
|
@@ -1,59 +1,93 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kordis-social
|
|
3
|
-
description: Use whenever the user wants to log into Kordis, log out, or
|
|
3
|
+
description: Use whenever the user wants to log into Kordis, log out, check identity, or post a typed comment on a Kordis package. Triggers include "log into Kordis", "kordis login", "who am I logged in as on Kordis", "log me out of Kordis", "leave a tip on <slug>", "report a bug on <slug>", "comment on <slug>".
|
|
4
4
|
type: skill
|
|
5
5
|
allowed-tools: ["Bash(kordis:*)"]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Kordis: Identity &
|
|
8
|
+
# Kordis: Identity & Comments
|
|
9
9
|
|
|
10
10
|
## Goal
|
|
11
|
-
Drive login state
|
|
11
|
+
Drive the user's login state and let them post typed feedback on packages.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Identity commands
|
|
14
14
|
|
|
15
15
|
### `kordis whoami [--json]`
|
|
16
|
-
Show the currently authenticated user (or
|
|
16
|
+
Show the currently authenticated user (or anonymous state).
|
|
17
17
|
|
|
18
18
|
### `kordis login [--provider <name>]`
|
|
19
19
|
Opens browser device-flow pairing. `--provider` defaults to `discord`.
|
|
20
|
-
Required before
|
|
20
|
+
Required before `push` or `comment`.
|
|
21
21
|
|
|
22
22
|
### `kordis logout`
|
|
23
23
|
Clears local tokens.
|
|
24
24
|
|
|
25
|
+
## Comment command
|
|
26
|
+
|
|
27
|
+
### `kordis comment <full_slug> --body <text> [--kind <kind>] [--title <text>] [--json]`
|
|
28
|
+
Post a top-level comment on a package. Auth required.
|
|
29
|
+
|
|
30
|
+
| flag | meaning |
|
|
31
|
+
| -------------- | ---------------------------------------------------------------- |
|
|
32
|
+
| `--body <t>` | required, 1–10000 chars |
|
|
33
|
+
| `--kind <k>` | `comment` (default), `tip`, `report`, `praise`, `question` |
|
|
34
|
+
| `--title <t>` | 1–140 chars; honoured for top-level posts only |
|
|
35
|
+
|
|
36
|
+
Replies, edits, status flips (open/resolved on a `report`), and listing
|
|
37
|
+
existing comments are NOT yet exposed in the CLI. Direct the user to
|
|
38
|
+
`https://kordis.store/p/<full_slug>` for those interactions until verbs land.
|
|
39
|
+
|
|
25
40
|
## Steps
|
|
26
41
|
|
|
27
42
|
### 1. Inspect identity (when in doubt)
|
|
28
43
|
`kordis whoami --json`. **Success criteria**: returns either a username +
|
|
29
|
-
profile, or the anonymous-state error indicating
|
|
44
|
+
profile, or the anonymous-state error indicating not logged in.
|
|
45
|
+
|
|
46
|
+
### 2. Match command to user intent
|
|
47
|
+
- "log me into Kordis" → `kordis login`. Tell the user a browser device-flow
|
|
48
|
+
page will open; they must approve on their auth provider.
|
|
49
|
+
- "log me out" → `kordis logout`.
|
|
50
|
+
- "leave a tip / question / praise / bug-report / comment on <slug>" → pick
|
|
51
|
+
the matching `--kind`, generate a concise `--title` if it's a top-level
|
|
52
|
+
post, and put the substantive content in `--body`.
|
|
30
53
|
|
|
31
|
-
###
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- "log me out" → `kordis logout`. **Success criteria**: subsequent
|
|
36
|
-
`kordis whoami --json` is anonymous.
|
|
54
|
+
### 3. Authenticate before posting
|
|
55
|
+
If `kordis comment` returns `not_authenticated` (exit 10), run `kordis login`
|
|
56
|
+
and retry. **Success criteria**: command exits 0; show returned `id` + `kind`
|
|
57
|
+
+ `title` (when present).
|
|
37
58
|
|
|
38
59
|
## Examples
|
|
39
60
|
|
|
40
61
|
<example>
|
|
41
62
|
User: "who am I logged into Kordis as?"
|
|
42
63
|
- kordis whoami --json
|
|
43
|
-
- show username + display_name
|
|
64
|
+
- show username + display_name
|
|
44
65
|
</example>
|
|
45
66
|
|
|
46
67
|
<example>
|
|
47
68
|
User: "log into Kordis"
|
|
48
69
|
- kordis login
|
|
49
|
-
- explain that a browser device-flow page will open
|
|
50
|
-
|
|
51
|
-
|
|
70
|
+
- explain that a browser device-flow page will open
|
|
71
|
+
- after they confirm, run `kordis whoami --json` to verify
|
|
72
|
+
</example>
|
|
73
|
+
|
|
74
|
+
<example>
|
|
75
|
+
User: "leave a tip on foo/bar saying it pairs well with baz/qux"
|
|
76
|
+
- kordis comment foo/bar --kind tip --title "Pairs well with baz/qux" \
|
|
77
|
+
--body "Combine baz/qux's <feature> with this skill's <step> to <outcome>." --json
|
|
78
|
+
- show returned `{id, kind, title}` so the user can find their post on the web UI
|
|
79
|
+
</example>
|
|
80
|
+
|
|
81
|
+
<example>
|
|
82
|
+
User: "report that the v0.3.0 release of foo/bar is broken on macOS"
|
|
83
|
+
- kordis comment foo/bar --kind report --title "v0.3.0 broken on macOS" \
|
|
84
|
+
--body "<reproducible details>" --json
|
|
85
|
+
- mention that opening/resolving the report later requires the web UI
|
|
52
86
|
</example>
|
|
53
87
|
|
|
54
88
|
## Limitations
|
|
55
89
|
|
|
56
|
-
The CLI does NOT yet expose `
|
|
57
|
-
|
|
58
|
-
truthfully that
|
|
59
|
-
a command.
|
|
90
|
+
The CLI does NOT yet expose `star`/`unstar`, follow, listing comments, replies,
|
|
91
|
+
editing or moderating comments, or notifications. If the user asks for any of
|
|
92
|
+
those, tell them truthfully that the CLI verb is not implemented yet — do NOT
|
|
93
|
+
fabricate a command. For now direct them to `https://kordis.store`.
|
|
@@ -30,9 +30,9 @@ DEFAULT to `read` when you spontaneously want to consult a skill. DEFAULT to
|
|
|
30
30
|
|
|
31
31
|
## Commands
|
|
32
32
|
|
|
33
|
-
### `kordis read <full_slug>[@<version>] [--allow-pending] [--
|
|
33
|
+
### `kordis read <full_slug>[@<version>] [--allow-pending] [--pin <semver>] [--json]`
|
|
34
34
|
Returns the full body (Markdown) of a text-bearing package, plus an
|
|
35
|
-
`attribution` string. `--
|
|
35
|
+
`attribution` string. `--pin <semver>` overrides any `@suffix` on the slug.
|
|
36
36
|
|
|
37
37
|
### `kordis pull <full_slug>[@<version>] [options]`
|
|
38
38
|
Writes files into the current project.
|
|
@@ -116,7 +116,7 @@ User: "install the github MCP server from Kordis"
|
|
|
116
116
|
|
|
117
117
|
<example>
|
|
118
118
|
User: "use the v0.2.0 of <full_slug> specifically"
|
|
119
|
-
- kordis read <full_slug> --
|
|
119
|
+
- kordis read <full_slug> --pin 0.2.0 --json
|
|
120
120
|
(or: kordis read <full_slug>@0.2.0 --json)
|
|
121
121
|
</example>
|
|
122
122
|
|
package/dist/index.js
CHANGED
|
@@ -932,7 +932,7 @@ var init_src2 = __esm({
|
|
|
932
932
|
|
|
933
933
|
// src/index.ts
|
|
934
934
|
init_src2();
|
|
935
|
-
import { Command as
|
|
935
|
+
import { Command as Command11 } from "commander";
|
|
936
936
|
|
|
937
937
|
// src/commands/login.ts
|
|
938
938
|
import { Command } from "commander";
|
|
@@ -2229,12 +2229,12 @@ async function detectTool(root) {
|
|
|
2229
2229
|
// src/commands/read.ts
|
|
2230
2230
|
import { Command as Command6 } from "commander";
|
|
2231
2231
|
function readCommand() {
|
|
2232
|
-
return new Command6("read").description("fetch a package body into the agent context (no install)").argument("<full_slug>", "package identifier {username}/{slug} or {username}/{slug}@{version}").option("--allow-pending", "allow versions whose AI review has not passed", false).option("--
|
|
2232
|
+
return new Command6("read").description("fetch a package body into the agent context (no install)").argument("<full_slug>", "package identifier {username}/{slug} or {username}/{slug}@{version}").option("--allow-pending", "allow versions whose AI review has not passed", false).option("--pin <semver>", "pin to an exact version (overrides @suffix)").action(
|
|
2233
2233
|
async (rawSlug, opts) => {
|
|
2234
2234
|
const atIdx = rawSlug.lastIndexOf("@");
|
|
2235
2235
|
const fullSlug = atIdx > 0 ? rawSlug.slice(0, atIdx) : rawSlug;
|
|
2236
2236
|
const inlineVersion = atIdx > 0 ? rawSlug.slice(atIdx + 1) : void 0;
|
|
2237
|
-
const version = opts.
|
|
2237
|
+
const version = opts.pin ?? inlineVersion;
|
|
2238
2238
|
const [username, slug] = fullSlug.split("/");
|
|
2239
2239
|
if (!username || !slug) {
|
|
2240
2240
|
throw new Error('full_slug must be "{username}/{slug}" (optional "@version")');
|
|
@@ -2509,9 +2509,55 @@ function setupCommand() {
|
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
2511
2511
|
|
|
2512
|
+
// src/commands/comment.ts
|
|
2513
|
+
import { Command as Command10 } from "commander";
|
|
2514
|
+
var KINDS = [
|
|
2515
|
+
"comment",
|
|
2516
|
+
"tip",
|
|
2517
|
+
"report",
|
|
2518
|
+
"praise",
|
|
2519
|
+
"question"
|
|
2520
|
+
];
|
|
2521
|
+
function commentCommand() {
|
|
2522
|
+
return new Command10("comment").description("post a comment on a package").argument("<full_slug>", "package identifier {username}/{slug}").requiredOption("--body <text>", "comment body (1\u201310000 chars)").option("--kind <kind>", `top-level kind: ${KINDS.join("|")}`, "comment").option("--title <text>", "top-level post title (1\u2013140 chars)").action(
|
|
2523
|
+
async (rawSlug, opts) => {
|
|
2524
|
+
if (!KINDS.includes(opts.kind)) {
|
|
2525
|
+
throw new Error(`--kind must be one of ${KINDS.join(", ")}`);
|
|
2526
|
+
}
|
|
2527
|
+
const [username, slug] = rawSlug.split("/");
|
|
2528
|
+
if (!username || !slug) {
|
|
2529
|
+
throw new Error('full_slug must be "{username}/{slug}"');
|
|
2530
|
+
}
|
|
2531
|
+
const bundle = await useClient();
|
|
2532
|
+
if (!bundle.username) {
|
|
2533
|
+
printHuman(c.yellow("Not logged in. Run `kordis login`."));
|
|
2534
|
+
process.exitCode = 10;
|
|
2535
|
+
return;
|
|
2536
|
+
}
|
|
2537
|
+
const res = await bundle.authedRequest(
|
|
2538
|
+
(api) => api.createComment(username, slug, {
|
|
2539
|
+
kind: opts.kind,
|
|
2540
|
+
...opts.title ? { title: opts.title } : {},
|
|
2541
|
+
body: opts.body
|
|
2542
|
+
})
|
|
2543
|
+
);
|
|
2544
|
+
printDual({
|
|
2545
|
+
json: res,
|
|
2546
|
+
human: () => {
|
|
2547
|
+
printHuman(c.green("\u2713 comment posted"));
|
|
2548
|
+
printHuman(c.gray(` id: ${res.id}`));
|
|
2549
|
+
const meta = [`kind: ${res.kind}`];
|
|
2550
|
+
if (res.title) meta.push(`title: "${res.title}"`);
|
|
2551
|
+
printHuman(` ${meta.join(" \xB7 ")}`);
|
|
2552
|
+
}
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2512
2558
|
// src/index.ts
|
|
2513
2559
|
function buildProgram() {
|
|
2514
|
-
const program = new
|
|
2560
|
+
const program = new Command11("kordis").version(VERSION).description("Kordis \u2014 registry for agentic-coding packages").option("--json", "emit JSON output to stdout (default: human)", false).hook("preAction", (thisCommand) => {
|
|
2515
2561
|
const opts = thisCommand.optsWithGlobals();
|
|
2516
2562
|
if (opts.json) setJsonMode(true);
|
|
2517
2563
|
});
|
|
@@ -2523,6 +2569,7 @@ function buildProgram() {
|
|
|
2523
2569
|
program.addCommand(pullCommand());
|
|
2524
2570
|
program.addCommand(readCommand());
|
|
2525
2571
|
program.addCommand(infoCommand());
|
|
2572
|
+
program.addCommand(commentCommand());
|
|
2526
2573
|
program.addCommand(setupCommand());
|
|
2527
2574
|
return program;
|
|
2528
2575
|
}
|