@rayul/kordis 0.4.0 → 0.5.0
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-recommend/SKILL.md +6 -0
- package/dist/index.js +34 -5
- package/package.json +1 -1
|
@@ -95,6 +95,12 @@ Filter mentally by `confidence`. If everything is `low` and `personalized`
|
|
|
95
95
|
is `false`, tell the user personalization is off and they can enable it
|
|
96
96
|
via `kordis setup` (re-asks the prompt on next interactive run).
|
|
97
97
|
|
|
98
|
+
If the response carries `capped_by_author > 0`, ALSO surface a one-line
|
|
99
|
+
note to the user — e.g. "N more candidates from the same publisher were
|
|
100
|
+
skipped by the diversity cap" — so they understand why the list is
|
|
101
|
+
shorter than the requested `--limit`. Without this hint users frequently
|
|
102
|
+
mistake a short menu for a sparse or broken registry.
|
|
103
|
+
|
|
98
104
|
### 3. Present
|
|
99
105
|
Surface 3-5 picks max. For each, show: full_slug, one-line `why_recommended`,
|
|
100
106
|
confidence wording per the table above, and the next-step
|
package/dist/index.js
CHANGED
|
@@ -802,7 +802,21 @@ var init_recommend = __esm({
|
|
|
802
802
|
* the server returned popularity-only results — useful for agents to
|
|
803
803
|
* disclose "context off → less personalised" to the user.
|
|
804
804
|
*/
|
|
805
|
-
personalized: z11.boolean()
|
|
805
|
+
personalized: z11.boolean(),
|
|
806
|
+
/**
|
|
807
|
+
* 0.5.0 — number of additional candidates the server had before applying
|
|
808
|
+
* the per-author cap. When `capped_by_author > 0`, the agent can explain
|
|
809
|
+
* "menu is shorter than --limit because diversity cap fired" instead of
|
|
810
|
+
* the user inferring the registry is sparse. Absent on responses from
|
|
811
|
+
* pre-0.5.0 servers.
|
|
812
|
+
*/
|
|
813
|
+
capped_by_author: z11.number().int().nonnegative().optional(),
|
|
814
|
+
/**
|
|
815
|
+
* 0.5.0 — total number of candidates the server scored before any
|
|
816
|
+
* trimming/capping. Helps the agent surface "we picked N of M" honesty
|
|
817
|
+
* when the menu is short. Absent on pre-0.5.0 servers.
|
|
818
|
+
*/
|
|
819
|
+
total_candidates: z11.number().int().nonnegative().optional()
|
|
806
820
|
});
|
|
807
821
|
}
|
|
808
822
|
});
|
|
@@ -4179,7 +4193,7 @@ function recommendCommand() {
|
|
|
4179
4193
|
if (!enable) {
|
|
4180
4194
|
printHuman(
|
|
4181
4195
|
c.gray(
|
|
4182
|
-
"\u2192 recommendations will use popularity only. Re-enable later: `kordis
|
|
4196
|
+
"\u2192 recommendations will use popularity only. Re-enable later: `kordis setup` (re-asks the opt-in)."
|
|
4183
4197
|
)
|
|
4184
4198
|
);
|
|
4185
4199
|
}
|
|
@@ -4216,10 +4230,18 @@ function recommendCommand() {
|
|
|
4216
4230
|
"\u2192 install any with `kordis pull <full_slug>` or peek with `kordis read <full_slug>`"
|
|
4217
4231
|
)
|
|
4218
4232
|
);
|
|
4233
|
+
if (typeof res.capped_by_author === "number" && res.capped_by_author > 0) {
|
|
4234
|
+
const extras = res.capped_by_author;
|
|
4235
|
+
printHuman(
|
|
4236
|
+
c.gray(
|
|
4237
|
+
`\u2192 ${extras} more candidate${extras === 1 ? "" : "s"} from the same publisher${extras === 1 ? " was" : "s were"} skipped by the diversity cap`
|
|
4238
|
+
)
|
|
4239
|
+
);
|
|
4240
|
+
}
|
|
4219
4241
|
if (!res.personalized) {
|
|
4220
4242
|
printHuman(
|
|
4221
4243
|
c.gray(
|
|
4222
|
-
"\u2192 enable personalization for
|
|
4244
|
+
"\u2192 enable personalization for tailored picks: `kordis setup` (re-asks the opt-in)"
|
|
4223
4245
|
)
|
|
4224
4246
|
);
|
|
4225
4247
|
}
|
|
@@ -4322,8 +4344,15 @@ function handleError(err) {
|
|
|
4322
4344
|
process.exit(err.exitCode());
|
|
4323
4345
|
}
|
|
4324
4346
|
if (err instanceof KordisNetworkError) {
|
|
4325
|
-
|
|
4326
|
-
|
|
4347
|
+
const hint = "Check your network connection, or override the API endpoint with `KORDIS_API_URL=https://api.kordis.store` (or your self-hosted instance). If kordis.store itself is down, see https://kordis.store for status.";
|
|
4348
|
+
if (isJsonMode()) {
|
|
4349
|
+
printJson({
|
|
4350
|
+
error: { code: "network_unreachable", message: err.message, hint }
|
|
4351
|
+
});
|
|
4352
|
+
} else {
|
|
4353
|
+
printHuman(c.red(`\u2717 ${err.message}`));
|
|
4354
|
+
for (const line of hint.split("\n")) printHuman(c.gray(` \u2192 ${line}`));
|
|
4355
|
+
}
|
|
4327
4356
|
process.exit(err.exitCode());
|
|
4328
4357
|
}
|
|
4329
4358
|
if (err instanceof Error) {
|