skill-tree 0.2.0 → 0.3.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/README.md +75 -0
- package/dist/bowser-CQI7RKRA.mjs +2821 -0
- package/dist/bowser-XBWM4HVL.mjs +2821 -0
- package/dist/chunk-2NL4MXNX.mjs +3156 -0
- package/dist/chunk-2STDJU5Y.mjs +1174 -0
- package/dist/chunk-3BCRI4CA.mjs +101 -0
- package/dist/chunk-3MV4GQ3N.mjs +19 -0
- package/dist/chunk-3SRB47JW.mjs +8344 -0
- package/dist/chunk-43YOKLZP.mjs +6081 -0
- package/dist/chunk-4AGZU52D.mjs +7918 -0
- package/dist/chunk-4HXHCEFH.mjs +9157 -0
- package/dist/chunk-4OC5QFIF.mjs +11267 -0
- package/dist/chunk-4QGSDVGH.mjs +580 -0
- package/dist/chunk-4TFMKAVC.mjs +1225 -0
- package/dist/chunk-55SMGVTP.mjs +7126 -0
- package/dist/chunk-5C4MEQMR.mjs +125 -0
- package/dist/chunk-6AZMD3Q3.mjs +1243 -0
- package/dist/chunk-6FX4IK4Z.mjs +5368 -0
- package/dist/chunk-6UPDN5QM.mjs +163 -0
- package/dist/chunk-7EGDKOHV.mjs +9439 -0
- package/dist/chunk-7IHYDFWW.mjs +163 -0
- package/dist/chunk-7LMOQW5H.mjs +4893 -0
- package/dist/chunk-7QIQJVNP.mjs +14206 -0
- package/dist/chunk-7VB4ZRZO.mjs +7127 -0
- package/dist/chunk-A3SILZYX.mjs +8360 -0
- package/dist/chunk-BPVRW25O.mjs +6089 -0
- package/dist/chunk-BZ2JKJ54.mjs +1057 -0
- package/dist/chunk-CI4476KM.mjs +6607 -0
- package/dist/chunk-DCRKELD5.mjs +46 -0
- package/dist/chunk-DDXYQ74I.mjs +13969 -0
- package/dist/chunk-DQOFJXBX.mjs +6595 -0
- package/dist/chunk-E2CVK23F.mjs +8751 -0
- package/dist/chunk-F3YEUQAP.mjs +654 -0
- package/dist/chunk-FKJJ4RJG.mjs +13874 -0
- package/dist/chunk-GBIK7WMX.mjs +9293 -0
- package/dist/chunk-GFK5SZRJ.mjs +580 -0
- package/dist/chunk-GPN6UQVR.mjs +9238 -0
- package/dist/chunk-II7DECZQ.mjs +9111 -0
- package/dist/chunk-INKVOZXK.mjs +15898 -0
- package/dist/chunk-J2JM7HAK.mjs +8787 -0
- package/dist/chunk-K6NRCSAZ.mjs +4355 -0
- package/dist/chunk-LACI6YL4.mjs +1379 -0
- package/dist/chunk-M4RPUUZT.mjs +3156 -0
- package/dist/chunk-MBF2MJS5.mjs +1230 -0
- package/dist/chunk-MBIGW6KU.mjs +644 -0
- package/dist/chunk-MR4TVINH.mjs +1234 -0
- package/dist/chunk-OOECXYLU.mjs +1379 -0
- package/dist/chunk-OYHYXKXO.mjs +7297 -0
- package/dist/chunk-P5GJJ4JB.mjs +9237 -0
- package/dist/chunk-PDPN7FW7.mjs +1045 -0
- package/dist/chunk-PJJJQXJL.mjs +1174 -0
- package/dist/chunk-PK3BAIFW.mjs +9294 -0
- package/dist/chunk-QNK3WYNA.mjs +8971 -0
- package/dist/chunk-QZ7TP4HQ.mjs +7 -0
- package/dist/chunk-RJYJGJO3.mjs +349 -0
- package/dist/chunk-T4PVQW5O.mjs +124 -0
- package/dist/chunk-TENXZJB3.mjs +349 -0
- package/dist/chunk-TEUB6DZR.mjs +6453 -0
- package/dist/chunk-TWPEHDW4.mjs +1067 -0
- package/dist/chunk-VHFTX33A.mjs +6724 -0
- package/dist/chunk-VNZSS2WY.mjs +1057 -0
- package/dist/chunk-WJP5XYS7.mjs +2102 -0
- package/dist/chunk-WX6N7KNO.mjs +1239 -0
- package/dist/chunk-Y54UK2J3.mjs +13071 -0
- package/dist/chunk-YDNGMDXC.mjs +9294 -0
- package/dist/chunk-YDVZIFIU.mjs +2102 -0
- package/dist/chunk-YJ6NZQLT.mjs +9237 -0
- package/dist/chunk-YWRKGXK4.mjs +9300 -0
- package/dist/chunk-ZI4AIAWQ.mjs +46 -0
- package/dist/chunk-ZQVS7MQK.mjs +6081 -0
- package/dist/chunk-ZYKRDDFO.mjs +163 -0
- package/dist/cli/index.js +1173 -324
- package/dist/cli/index.mjs +202 -9164
- package/dist/dist-es-27NPMXP7.mjs +22 -0
- package/dist/dist-es-2JG6ZWFR.mjs +69 -0
- package/dist/dist-es-2JGXQKUP.mjs +6077 -0
- package/dist/dist-es-5QD5QJS2.mjs +495 -0
- package/dist/dist-es-5ZD454R2.mjs +317 -0
- package/dist/dist-es-644EP2LP.mjs +317 -0
- package/dist/dist-es-DSNCHWLJ.mjs +170 -0
- package/dist/dist-es-DYHMPEKZ.mjs +170 -0
- package/dist/dist-es-FIVW7BUZ.mjs +317 -0
- package/dist/dist-es-GXJAFBE5.mjs +22 -0
- package/dist/dist-es-HRBPKDMR.mjs +935 -0
- package/dist/dist-es-L5AMJHSY.mjs +935 -0
- package/dist/dist-es-LHPJ63IO.mjs +4437 -0
- package/dist/dist-es-LT2AQAG7.mjs +4437 -0
- package/dist/dist-es-OK2J7EV3.mjs +378 -0
- package/dist/dist-es-ORE4PQTL.mjs +87 -0
- package/dist/dist-es-TLCYJJ25.mjs +495 -0
- package/dist/dist-es-V4LHTSRG.mjs +69 -0
- package/dist/dist-es-XFAHNA2L.mjs +69 -0
- package/dist/dist-es-XHTU3ZU2.mjs +935 -0
- package/dist/dist-es-XPNJAJI7.mjs +4437 -0
- package/dist/dist-es-Y2MPJ6IO.mjs +378 -0
- package/dist/dist-es-Y4JPNLF3.mjs +6077 -0
- package/dist/dist-es-ZGPJUGVW.mjs +87 -0
- package/dist/dist-es-ZYHLY2E6.mjs +487 -0
- package/dist/event-streams-6MFHPNRF.mjs +42 -0
- package/dist/event-streams-KIAAAC7Z.mjs +42 -0
- package/dist/index.d.mts +1189 -13
- package/dist/index.d.ts +1189 -13
- package/dist/index.js +38737 -601
- package/dist/index.mjs +131 -9693
- package/dist/lib-B245IUXF.mjs +778 -0
- package/dist/loadSso-CAWKILED.mjs +579 -0
- package/dist/loadSso-NPRY7QRT.mjs +579 -0
- package/dist/loadSso-OYKG6ZRE.mjs +579 -0
- package/dist/signin-KUENA7ZD.mjs +743 -0
- package/dist/signin-LMFNL434.mjs +665 -0
- package/dist/signin-LUKXFXSI.mjs +743 -0
- package/dist/sqlite-5LHEQTBD.mjs +7 -0
- package/dist/sqlite-BZK5GF76.mjs +7 -0
- package/dist/sqlite-MG45OOTV.mjs +6 -0
- package/dist/sqlite-OLU72GHB.mjs +6 -0
- package/dist/sqlite-RR2SJ3SR.mjs +7 -0
- package/dist/sqlite-V6GFGHTD.mjs +7 -0
- package/dist/sqlite-XJRPMNAJ.mjs +6 -0
- package/dist/sqlite-ZKQKQKPT.mjs +7 -0
- package/dist/sso-oidc-3VGFPMFD.mjs +832 -0
- package/dist/sso-oidc-NNH6SQIH.mjs +832 -0
- package/dist/sso-oidc-STZH2XK2.mjs +832 -0
- package/dist/sts-EF755UBF.mjs +6290 -0
- package/dist/sts-QGXULWRT.mjs +6290 -0
- package/dist/sts-ZIS4G6FQ.mjs +6290 -0
- package/dist/sync-4DCV43GA.mjs +15 -0
- package/dist/sync-BSWMMDA6.mjs +14 -0
- package/dist/sync-WHIIDHML.mjs +14 -0
- package/dist/sync-XRWFQYBY.mjs +15 -0
- package/package.json +9 -2
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ interface Skill {
|
|
|
50
50
|
interface SkillServingMetadata {
|
|
51
51
|
/** Short summary for collapsed view (defaults to description) */
|
|
52
52
|
summary?: string;
|
|
53
|
+
/** Key insight preview shown in collapsed view to aid routing decisions */
|
|
54
|
+
instructionPreview?: string;
|
|
53
55
|
/** Estimated token count for context budgeting */
|
|
54
56
|
tokenEstimate?: number;
|
|
55
57
|
/** Auto-expand triggers */
|
|
@@ -1056,6 +1058,83 @@ declare class SyncManager {
|
|
|
1056
1058
|
*/
|
|
1057
1059
|
declare function createSyncManager(options: SyncManagerOptions): SyncManager;
|
|
1058
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* Types for the learned execution-grounded utility scorer (Tier 2, T2.1).
|
|
1063
|
+
*
|
|
1064
|
+
* The retrieval signals (BM25, dense cosine) answer "does this skill *look*
|
|
1065
|
+
* relevant?". The utility scorer answers the harder question — "does including
|
|
1066
|
+
* this skill actually *help* solve this task?" — by learning from observed
|
|
1067
|
+
* loadout→outcome traces. This separates genuinely-useful skills from
|
|
1068
|
+
* generic, high-surface-area skills that retrieval over-rewards.
|
|
1069
|
+
*
|
|
1070
|
+
* @packageDocumentation
|
|
1071
|
+
*/
|
|
1072
|
+
/** Per-(task, skill) signals available at scoring time. */
|
|
1073
|
+
interface UtilityFeatures {
|
|
1074
|
+
skillId: string;
|
|
1075
|
+
/** Absolute lexical (BM25) relevance in [0,1]. */
|
|
1076
|
+
lexAbs: number;
|
|
1077
|
+
/** Absolute dense (cosine) relevance in [0,1]; 0 when no embedder is used. */
|
|
1078
|
+
denseAbs: number;
|
|
1079
|
+
}
|
|
1080
|
+
/** A labeled example: did including this skill help on this task? */
|
|
1081
|
+
interface UtilityExample {
|
|
1082
|
+
/** Optional task text (for provenance/debugging; not used as a feature). */
|
|
1083
|
+
taskText?: string;
|
|
1084
|
+
features: UtilityFeatures;
|
|
1085
|
+
/** Ground-truth label: did the skill contribute to task success? */
|
|
1086
|
+
helped: boolean;
|
|
1087
|
+
/** Optional example weight (e.g. counterfactual gain magnitude). Default 1. */
|
|
1088
|
+
weight?: number;
|
|
1089
|
+
}
|
|
1090
|
+
interface UtilityTrainReport {
|
|
1091
|
+
examples: number;
|
|
1092
|
+
positives: number;
|
|
1093
|
+
iterations: number;
|
|
1094
|
+
finalLoss: number;
|
|
1095
|
+
/** Number of distinct skills that accumulated a learned helpfulness prior. */
|
|
1096
|
+
skillsWithPrior: number;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* A learned scorer fθ(task, skill) ∈ [0,1] feeding the confidence gate.
|
|
1100
|
+
* Pluggable so the default logistic model can be swapped for an MLP, etc.
|
|
1101
|
+
*/
|
|
1102
|
+
interface UtilityScorer {
|
|
1103
|
+
/** Score a (task, skill) pair in [0,1]. Higher ⇒ more likely to help. */
|
|
1104
|
+
score(features: UtilityFeatures): number;
|
|
1105
|
+
/** Fit the model to labeled examples. */
|
|
1106
|
+
train(examples: UtilityExample[]): UtilityTrainReport;
|
|
1107
|
+
/** True once fitted; callers fall back to the hybrid blend when false. */
|
|
1108
|
+
readonly trained: boolean;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Listwise reranking (Tier 1.5) — a second-stage scorer over the *full skill
|
|
1113
|
+
* body* of a shortlist, the SkillRouter/Cohere-rerank pattern.
|
|
1114
|
+
*
|
|
1115
|
+
* First-stage retrieval (BM25 + dense) is recall-oriented but cheap and shallow
|
|
1116
|
+
* (it scores fields/embeddings, not the whole document). A cross-encoder
|
|
1117
|
+
* reranker reads the query against each candidate's full text and reorders them,
|
|
1118
|
+
* recovering true positives that retrieval ranked at 4..N into the top-K.
|
|
1119
|
+
* Measured on SkillsBench: BM25 recall@3 50% → reranked top-20 recall@3 65%.
|
|
1120
|
+
*
|
|
1121
|
+
* @packageDocumentation
|
|
1122
|
+
*/
|
|
1123
|
+
interface RerankCandidate {
|
|
1124
|
+
id: string;
|
|
1125
|
+
/** The text the reranker scores against the query (typically the skill body). */
|
|
1126
|
+
text: string;
|
|
1127
|
+
}
|
|
1128
|
+
interface RerankResult {
|
|
1129
|
+
id: string;
|
|
1130
|
+
/** Reranker relevance score (provider-specific scale, higher = better). */
|
|
1131
|
+
score: number;
|
|
1132
|
+
}
|
|
1133
|
+
/** Reorders a shortlist by query-relevance. Returns results sorted desc by score. */
|
|
1134
|
+
interface RerankProvider {
|
|
1135
|
+
rerank(query: string, candidates: RerankCandidate[], topN?: number): Promise<RerankResult[]>;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1059
1138
|
/**
|
|
1060
1139
|
* Types for the skill-tree serving layer
|
|
1061
1140
|
* @packageDocumentation
|
|
@@ -1212,6 +1291,19 @@ interface LoadoutCompilerConfig {
|
|
|
1212
1291
|
defaultStatus?: SkillStatus[];
|
|
1213
1292
|
/** Minimum similarity threshold for semantic matching (default: 0.6) */
|
|
1214
1293
|
semanticThreshold?: number;
|
|
1294
|
+
/**
|
|
1295
|
+
* Hybrid-retrieval options for `compileWithScoring` (Tier 1). When set,
|
|
1296
|
+
* task scoring uses field-weighted BM25 (incl. the skill body) optionally
|
|
1297
|
+
* fused with dense embeddings, instead of the legacy Jaccard scorer.
|
|
1298
|
+
*/
|
|
1299
|
+
retrieval?: HybridRetrievalOptions;
|
|
1300
|
+
/**
|
|
1301
|
+
* Size of the candidate pool that `compileWithScoring` scores over
|
|
1302
|
+
* before confidence-partitioning (default: 200). Larger than
|
|
1303
|
+
* `defaultMaxSkills` so the hybrid ranker re-ranks a real corpus rather
|
|
1304
|
+
* than just the lexically pre-filtered top-N.
|
|
1305
|
+
*/
|
|
1306
|
+
scoringPoolSize?: number;
|
|
1215
1307
|
}
|
|
1216
1308
|
/**
|
|
1217
1309
|
* Configuration for CatalogRenderer (browsable skill catalog)
|
|
@@ -1224,10 +1316,128 @@ interface CatalogRendererConfig {
|
|
|
1224
1316
|
/** Max summary length for leaf-level skill descriptions (default: 80) */
|
|
1225
1317
|
maxSummaryLength: number;
|
|
1226
1318
|
}
|
|
1319
|
+
/**
|
|
1320
|
+
* A skill with its computed relevance score from task-based compilation.
|
|
1321
|
+
*/
|
|
1322
|
+
interface ScoredSkill {
|
|
1323
|
+
skill: Skill;
|
|
1324
|
+
relevanceScore: number;
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Confidence thresholds for hybrid loadout compilation.
|
|
1328
|
+
* Skills above `expandAbove` are auto-expanded; between `expandAbove`
|
|
1329
|
+
* and `includeAbove` are included as summaries; below `includeAbove`
|
|
1330
|
+
* are excluded entirely.
|
|
1331
|
+
*/
|
|
1332
|
+
interface ConfidenceThresholds {
|
|
1333
|
+
/** Score above which skills are auto-expanded (default: 0.3) */
|
|
1334
|
+
expandAbove: number;
|
|
1335
|
+
/** Score above which skills are included as summaries (default: 0.15) */
|
|
1336
|
+
includeAbove: number;
|
|
1337
|
+
/**
|
|
1338
|
+
* Absolute abstain floor (Tier 1, T1.3). If set, and even the
|
|
1339
|
+
* single best-scoring skill falls below this, the loadout injects
|
|
1340
|
+
* **nothing** — a first-class "no relevant skill" outcome (B=0).
|
|
1341
|
+
*
|
|
1342
|
+
* This is distinct from `includeAbove`: it can be set *higher* than
|
|
1343
|
+
* `includeAbove` to demand strong top-of-pool relevance before any
|
|
1344
|
+
* skill is served, which prevents the documented regression where
|
|
1345
|
+
* irrelevant retrieved skills drag task success *below* the no-skill
|
|
1346
|
+
* baseline (SkillsBench: 16/84 tasks went negative with curated skills;
|
|
1347
|
+
* "Skills in the Wild": retrieval drops weak models below baseline).
|
|
1348
|
+
*
|
|
1349
|
+
* Recommended to calibrate per domain. Default: undefined (no extra
|
|
1350
|
+
* floor beyond `includeAbove`).
|
|
1351
|
+
*/
|
|
1352
|
+
minConfidence?: number;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Provider of dense embeddings for hybrid retrieval (Tier 1, T1.1).
|
|
1356
|
+
*
|
|
1357
|
+
* Pluggable so callers can supply any embedding backend (e.g. a local
|
|
1358
|
+
* model, an API, or cognitive-core's provider). When no embedder is
|
|
1359
|
+
* configured, hybrid retrieval gracefully degrades to a field-weighted
|
|
1360
|
+
* BM25 lexical ranking (still a strict improvement over the legacy
|
|
1361
|
+
* Jaccard term-overlap scorer, since BM25 indexes the skill **body**).
|
|
1362
|
+
*/
|
|
1363
|
+
interface EmbeddingProvider {
|
|
1364
|
+
/**
|
|
1365
|
+
* Embed a batch of texts into comparable numeric vectors. The first
|
|
1366
|
+
* element is conventionally the query; the rest are skill documents.
|
|
1367
|
+
* Implementations should return vectors of equal dimensionality.
|
|
1368
|
+
*/
|
|
1369
|
+
embed(texts: string[]): Promise<number[][]>;
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Per-field weights for the BM25(F) lexical signal. Mirrors the
|
|
1373
|
+
* "Skills in the Wild" recipe (name:10 / description:5 / body:5);
|
|
1374
|
+
* tags get a small weight. The skill **body** (instructions) is indexed
|
|
1375
|
+
* because it carries the dominant retrieval signal (SkillRouter: ~92%
|
|
1376
|
+
* of reranker attention is on the body).
|
|
1377
|
+
*/
|
|
1378
|
+
interface FieldWeights {
|
|
1379
|
+
name: number;
|
|
1380
|
+
description: number;
|
|
1381
|
+
body: number;
|
|
1382
|
+
tags: number;
|
|
1383
|
+
}
|
|
1384
|
+
/** How the lexical and dense signals are fused for ordering. */
|
|
1385
|
+
type FusionStrategy = 'weighted' | 'rrf';
|
|
1386
|
+
/**
|
|
1387
|
+
* Options for hybrid retrieval scoring (Tier 1, T1.1 + T1.2).
|
|
1388
|
+
*/
|
|
1389
|
+
interface HybridRetrievalOptions {
|
|
1390
|
+
/** Optional dense-embedding provider. Absent → BM25-only. */
|
|
1391
|
+
embedder?: EmbeddingProvider;
|
|
1392
|
+
/** Field weights for BM25 (default: name:10/description:5/body:5/tags:3). */
|
|
1393
|
+
fieldWeights?: FieldWeights;
|
|
1394
|
+
/** Reciprocal-rank-fusion constant (default: 60). */
|
|
1395
|
+
rrfK?: number;
|
|
1396
|
+
/**
|
|
1397
|
+
* Ordering fusion strategy (default: 'weighted'). Both strategies report
|
|
1398
|
+
* the same absolute, calibrated `relevanceScore` (so confidence thresholds
|
|
1399
|
+
* and the abstain floor stay meaningful); they differ only in sort order.
|
|
1400
|
+
* 'rrf' uses reciprocal rank fusion of the lexical and dense rankings
|
|
1401
|
+
* (only meaningful when an embedder is present).
|
|
1402
|
+
*/
|
|
1403
|
+
fusion?: FusionStrategy;
|
|
1404
|
+
/** Blend weights for the absolute score (renormalized over available signals). */
|
|
1405
|
+
signalWeights?: {
|
|
1406
|
+
lexical: number;
|
|
1407
|
+
dense: number;
|
|
1408
|
+
};
|
|
1409
|
+
/** BM25 term-frequency saturation (default: 1.2). */
|
|
1410
|
+
bm25K1?: number;
|
|
1411
|
+
/** BM25 length normalization (default: 0.75). */
|
|
1412
|
+
bm25B?: number;
|
|
1413
|
+
/**
|
|
1414
|
+
* Saturation constant mapping raw BM25 → absolute [0,1] confidence
|
|
1415
|
+
* (default: 8). Larger = stricter (needs more lexical evidence to look
|
|
1416
|
+
* confident). Keeps the score on the same scale the confidence
|
|
1417
|
+
* thresholds expect.
|
|
1418
|
+
*/
|
|
1419
|
+
bm25Saturation?: number;
|
|
1420
|
+
/**
|
|
1421
|
+
* Optional learned utility scorer (Tier 2, T2.1). When present *and
|
|
1422
|
+
* trained*, its `score(task, skill) ∈ [0,1]` replaces the lexical/dense
|
|
1423
|
+
* blend as the `relevanceScore`, so the confidence gate ranks by *learned
|
|
1424
|
+
* utility* (does this skill help?) rather than raw similarity (does it look
|
|
1425
|
+
* relevant?). Falls back to the blend when absent or untrained.
|
|
1426
|
+
*/
|
|
1427
|
+
utilityScorer?: UtilityScorer;
|
|
1428
|
+
/**
|
|
1429
|
+
* Optional listwise reranker (Tier 1.5). When set, the top `rerankTopN`
|
|
1430
|
+
* candidates from first-stage retrieval are reordered by the reranker over
|
|
1431
|
+
* their full body. Measured lift on SkillsBench: recall@3 50%→65% (BM25→rerank).
|
|
1432
|
+
*/
|
|
1433
|
+
reranker?: RerankProvider;
|
|
1434
|
+
/** Shortlist size sent to the reranker (default: 20). */
|
|
1435
|
+
rerankTopN?: number;
|
|
1436
|
+
}
|
|
1227
1437
|
/**
|
|
1228
1438
|
* Eviction strategy when maxExpanded is reached
|
|
1229
1439
|
*/
|
|
1230
|
-
type EvictionStrategy = 'lru' | 'priority' | 'manual';
|
|
1440
|
+
type EvictionStrategy = 'lru' | 'priority' | 'manual' | 'relevance';
|
|
1231
1441
|
/**
|
|
1232
1442
|
* Configuration for SkillGraphServer
|
|
1233
1443
|
*/
|
|
@@ -1260,6 +1470,19 @@ interface GraphServerConfig {
|
|
|
1260
1470
|
outputFormat?: 'xml' | 'markdown';
|
|
1261
1471
|
/** Include token estimates in output (default: false) */
|
|
1262
1472
|
includeTokenEstimates?: boolean;
|
|
1473
|
+
/** Confidence thresholds for task-based auto-expansion */
|
|
1474
|
+
confidenceThresholds?: ConfidenceThresholds;
|
|
1475
|
+
/**
|
|
1476
|
+
* Hybrid-retrieval options for task-based loadouts (Tier 1). Passed
|
|
1477
|
+
* through to the LoadoutCompiler's `compileWithScoring`. When omitted,
|
|
1478
|
+
* scoring uses field-weighted BM25 over name/description/body/tags with
|
|
1479
|
+
* default weights; supply an `embedder` to enable dense+lexical fusion.
|
|
1480
|
+
*/
|
|
1481
|
+
retrieval?: HybridRetrievalOptions;
|
|
1482
|
+
/** Candidate pool size scored before confidence-partitioning (default: 200). */
|
|
1483
|
+
scoringPoolSize?: number;
|
|
1484
|
+
/** Defer showing expanded content until agent explicitly requests it (default: false) */
|
|
1485
|
+
deferExpansion?: boolean;
|
|
1263
1486
|
/** Enable catalog browsing for large libraries (default: true) */
|
|
1264
1487
|
enableCatalog?: boolean;
|
|
1265
1488
|
/** Catalog renderer config overrides */
|
|
@@ -1326,6 +1549,7 @@ declare class SkillGraphServer {
|
|
|
1326
1549
|
private state;
|
|
1327
1550
|
private handlers;
|
|
1328
1551
|
private lruOrder;
|
|
1552
|
+
private relevanceScores;
|
|
1329
1553
|
constructor(storage: StorageAdapter, config?: GraphServerConfig);
|
|
1330
1554
|
/**
|
|
1331
1555
|
* Initialize the server, applying initial loadout if configured
|
|
@@ -1340,7 +1564,12 @@ declare class SkillGraphServer {
|
|
|
1340
1564
|
*/
|
|
1341
1565
|
setLoadout(criteria: LoadoutCriteria): Promise<LoadoutState>;
|
|
1342
1566
|
/**
|
|
1343
|
-
* Set loadout based on task description
|
|
1567
|
+
* Set loadout based on task description using hybrid confidence-tiered
|
|
1568
|
+
* compilation. Skills above the high threshold are auto-expanded,
|
|
1569
|
+
* skills between high and low thresholds are included as summaries,
|
|
1570
|
+
* and skills below the low threshold are excluded.
|
|
1571
|
+
*
|
|
1572
|
+
* Stores relevance scores for use by the 'relevance' eviction strategy.
|
|
1344
1573
|
*/
|
|
1345
1574
|
setLoadoutForTask(taskDescription: string): Promise<LoadoutState>;
|
|
1346
1575
|
/**
|
|
@@ -1444,6 +1673,11 @@ declare class SkillGraphServer {
|
|
|
1444
1673
|
/**
|
|
1445
1674
|
* Render current state as system prompt content.
|
|
1446
1675
|
* Includes catalog overview when catalog is enabled.
|
|
1676
|
+
*
|
|
1677
|
+
* When `deferExpansion` is enabled, all skills are rendered as
|
|
1678
|
+
* summaries regardless of expansion state — the agent must
|
|
1679
|
+
* explicitly request expansion. This avoids the reactive-signals
|
|
1680
|
+
* problem where upfront skill injection derails model planning.
|
|
1447
1681
|
*/
|
|
1448
1682
|
renderSystemPrompt(): Promise<string>;
|
|
1449
1683
|
/**
|
|
@@ -1459,9 +1693,25 @@ declare class SkillGraphServer {
|
|
|
1459
1693
|
*/
|
|
1460
1694
|
private emit;
|
|
1461
1695
|
/**
|
|
1462
|
-
*
|
|
1696
|
+
* Get the relevance score for a skill (0 if not scored).
|
|
1697
|
+
*/
|
|
1698
|
+
getRelevanceScore(skillId: string): number;
|
|
1699
|
+
/**
|
|
1700
|
+
* Apply a new set of skills as the loadout.
|
|
1701
|
+
* After populating the available set, evaluates autoExpand triggers
|
|
1702
|
+
* on each skill to determine if any should be pre-expanded.
|
|
1463
1703
|
*/
|
|
1464
1704
|
private applyLoadout;
|
|
1705
|
+
/**
|
|
1706
|
+
* Evaluate autoExpand trigger conditions for all skills in the loadout.
|
|
1707
|
+
* Checks keyword matches against the task description, file pattern
|
|
1708
|
+
* matches against the project path, and framework matches.
|
|
1709
|
+
*/
|
|
1710
|
+
private evaluateAutoExpand;
|
|
1711
|
+
/**
|
|
1712
|
+
* Check if a single autoExpand trigger matches the current context.
|
|
1713
|
+
*/
|
|
1714
|
+
private matchesTrigger;
|
|
1465
1715
|
/**
|
|
1466
1716
|
* Evict a skill from expanded based on strategy
|
|
1467
1717
|
*/
|
|
@@ -1525,8 +1775,7 @@ type SkillBankToServingEvent = {
|
|
|
1525
1775
|
*
|
|
1526
1776
|
* `skill:used`, `skill:feedback`, and `skill:requested` were removed when
|
|
1527
1777
|
* skill-tree dropped its `SkillMetrics` model — usage tracking is now
|
|
1528
|
-
* external (e.g., cognitive-core's `playbook.evolution.*`).
|
|
1529
|
-
* docs/SKILL_TREE_METRICS_DEPRECATION.md.
|
|
1778
|
+
* external (e.g., cognitive-core's `playbook.evolution.*`).
|
|
1530
1779
|
*/
|
|
1531
1780
|
type ServingToSkillBankEvent = {
|
|
1532
1781
|
type: 'loadout:changed';
|
|
@@ -2489,8 +2738,7 @@ declare class SkillBank {
|
|
|
2489
2738
|
* The `loadout:changed` event is currently the only one we react to.
|
|
2490
2739
|
* Earlier versions also handled `skill:used` / `skill:feedback` to mutate
|
|
2491
2740
|
* `Skill.metrics`, but skill-tree no longer tracks per-skill usage —
|
|
2492
|
-
* cognitive-core owns that signal via `playbook.evolution.*`.
|
|
2493
|
-
* docs/SKILL_TREE_METRICS_DEPRECATION.md.
|
|
2741
|
+
* cognitive-core owns that signal via `playbook.evolution.*`.
|
|
2494
2742
|
*/
|
|
2495
2743
|
private handleServingEvent;
|
|
2496
2744
|
/**
|
|
@@ -2581,6 +2829,9 @@ declare abstract class BaseStorageAdapter implements StorageAdapter {
|
|
|
2581
2829
|
* Simple text search across skill fields
|
|
2582
2830
|
*/
|
|
2583
2831
|
protected textSearch(skills: Skill[], query: string): Skill[];
|
|
2832
|
+
private static readonly STOP_WORDS;
|
|
2833
|
+
private tokenize;
|
|
2834
|
+
private static stem;
|
|
2584
2835
|
}
|
|
2585
2836
|
/**
|
|
2586
2837
|
* In-memory storage adapter (useful for testing)
|
|
@@ -2606,6 +2857,120 @@ declare class MemoryStorageAdapter extends BaseStorageAdapter {
|
|
|
2606
2857
|
recordFork(sourceSkillId: string, fork: SkillFork): Promise<void>;
|
|
2607
2858
|
}
|
|
2608
2859
|
|
|
2860
|
+
/**
|
|
2861
|
+
* Filesystem storage adapter
|
|
2862
|
+
* Compatible with OpenSkills SKILL.md format (YAML frontmatter + Markdown)
|
|
2863
|
+
*
|
|
2864
|
+
* Directory structure:
|
|
2865
|
+
* basePath/
|
|
2866
|
+
* .skilltree/
|
|
2867
|
+
* config.json <- optional configuration
|
|
2868
|
+
* skills/ <- default skills location
|
|
2869
|
+
* skill-id/
|
|
2870
|
+
* SKILL.md
|
|
2871
|
+
* .skilltree.json <- metadata
|
|
2872
|
+
* .versions/ <- version history
|
|
2873
|
+
*/
|
|
2874
|
+
|
|
2875
|
+
/**
|
|
2876
|
+
* Configuration for filesystem storage
|
|
2877
|
+
*/
|
|
2878
|
+
interface FilesystemStorageConfig {
|
|
2879
|
+
/** Base directory for skill storage */
|
|
2880
|
+
basePath: string;
|
|
2881
|
+
/** Use OpenSkills-compatible format (SKILL.md) */
|
|
2882
|
+
openSkillsCompatible?: boolean;
|
|
2883
|
+
/** Store version history */
|
|
2884
|
+
trackVersions?: boolean;
|
|
2885
|
+
}
|
|
2886
|
+
/**
|
|
2887
|
+
* Filesystem storage adapter with OpenSkills compatibility
|
|
2888
|
+
*
|
|
2889
|
+
* Uses .skilltree/ directory structure:
|
|
2890
|
+
* basePath/.skilltree/skills/ <- skills stored here
|
|
2891
|
+
* basePath/.skilltree/.versions/ <- version history
|
|
2892
|
+
*/
|
|
2893
|
+
declare class FilesystemStorageAdapter extends BaseStorageAdapter {
|
|
2894
|
+
private config;
|
|
2895
|
+
private skilltreeDir;
|
|
2896
|
+
private skillsDir;
|
|
2897
|
+
private versionsDir;
|
|
2898
|
+
constructor(config: FilesystemStorageConfig);
|
|
2899
|
+
initialize(): Promise<void>;
|
|
2900
|
+
/**
|
|
2901
|
+
* Get the base path for this storage
|
|
2902
|
+
*/
|
|
2903
|
+
getBasePath(): string;
|
|
2904
|
+
saveSkill(skill: Skill): Promise<void>;
|
|
2905
|
+
getSkill(id: string, version?: string): Promise<Skill | null>;
|
|
2906
|
+
listSkills(filter?: SkillFilter): Promise<Skill[]>;
|
|
2907
|
+
deleteSkill(id: string, version?: string): Promise<boolean>;
|
|
2908
|
+
getVersionHistory(skillId: string): Promise<SkillVersion[]>;
|
|
2909
|
+
getLineage(skillId: string): Promise<SkillLineage | null>;
|
|
2910
|
+
searchSkills(query: string): Promise<Skill[]>;
|
|
2911
|
+
/**
|
|
2912
|
+
* Serialize skill to YAML frontmatter + Markdown format
|
|
2913
|
+
*/
|
|
2914
|
+
private serializeSkill;
|
|
2915
|
+
/**
|
|
2916
|
+
* Build YAML frontmatter
|
|
2917
|
+
*/
|
|
2918
|
+
private buildFrontmatter;
|
|
2919
|
+
/**
|
|
2920
|
+
* Parse skill from YAML frontmatter + Markdown content
|
|
2921
|
+
*/
|
|
2922
|
+
private parseSkill;
|
|
2923
|
+
/**
|
|
2924
|
+
* Split content into frontmatter and body
|
|
2925
|
+
*/
|
|
2926
|
+
private parseFrontmatterAndBody;
|
|
2927
|
+
/**
|
|
2928
|
+
* Extract a single-line YAML field
|
|
2929
|
+
*/
|
|
2930
|
+
private extractYamlField;
|
|
2931
|
+
/**
|
|
2932
|
+
* Extract a multiline YAML field (using |)
|
|
2933
|
+
*/
|
|
2934
|
+
private extractYamlMultiline;
|
|
2935
|
+
/**
|
|
2936
|
+
* Extract a YAML list
|
|
2937
|
+
*/
|
|
2938
|
+
private extractYamlList;
|
|
2939
|
+
/**
|
|
2940
|
+
* Save a version snapshot
|
|
2941
|
+
*/
|
|
2942
|
+
private saveVersionSnapshot;
|
|
2943
|
+
/**
|
|
2944
|
+
* Get a specific version of a skill
|
|
2945
|
+
*/
|
|
2946
|
+
private getVersionedSkill;
|
|
2947
|
+
/**
|
|
2948
|
+
* Delete a specific version
|
|
2949
|
+
*/
|
|
2950
|
+
private deleteVersion;
|
|
2951
|
+
/**
|
|
2952
|
+
* Create metadata for a skill
|
|
2953
|
+
*/
|
|
2954
|
+
private createMetadata;
|
|
2955
|
+
/**
|
|
2956
|
+
* Load metadata for a skill directory
|
|
2957
|
+
*/
|
|
2958
|
+
private loadMetadata;
|
|
2959
|
+
/**
|
|
2960
|
+
* Save metadata for a skill directory
|
|
2961
|
+
*/
|
|
2962
|
+
private saveMetadata;
|
|
2963
|
+
/**
|
|
2964
|
+
* Compare semantic versions
|
|
2965
|
+
*/
|
|
2966
|
+
private compareVersions;
|
|
2967
|
+
/**
|
|
2968
|
+
* Generate content hash
|
|
2969
|
+
*/
|
|
2970
|
+
private hashContent;
|
|
2971
|
+
recordFork(sourceSkillId: string, fork: SkillFork): Promise<void>;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2609
2974
|
/**
|
|
2610
2975
|
* Cached Storage Adapter
|
|
2611
2976
|
*
|
|
@@ -3128,6 +3493,40 @@ declare class LoadoutCompiler {
|
|
|
3128
3493
|
* Compile based on a task description (semantic matching)
|
|
3129
3494
|
*/
|
|
3130
3495
|
compileForTask(taskDescription: string): Promise<Skill[]>;
|
|
3496
|
+
/**
|
|
3497
|
+
* Compile with hybrid-retrieval scoring against a task description
|
|
3498
|
+
* (Tier 1). Returns skills annotated with absolute relevance scores in
|
|
3499
|
+
* [0,1], sorted by descending relevance. Used by the hybrid loadout
|
|
3500
|
+
* strategy to determine which skills should be auto-expanded vs shown
|
|
3501
|
+
* as summaries vs excluded.
|
|
3502
|
+
*
|
|
3503
|
+
* Scoring uses field-weighted BM25 over the skill name/description/body/
|
|
3504
|
+
* tags (the body matters most), optionally fused with dense embeddings
|
|
3505
|
+
* (when an `embedder` is
|
|
3506
|
+
* configured via `retrieval`). The candidate pool is the (filtered) set
|
|
3507
|
+
* up to `scoringPoolSize` — larger than the final loadout — so the ranker
|
|
3508
|
+
* re-ranks a real corpus rather than only a lexically pre-truncated top-N.
|
|
3509
|
+
*/
|
|
3510
|
+
compileWithScoring(taskDescription: string, criteria?: LoadoutCriteria): Promise<ScoredSkill[]>;
|
|
3511
|
+
/**
|
|
3512
|
+
* Partition scored skills into confidence tiers.
|
|
3513
|
+
* - High confidence (>= expandAbove): should be auto-expanded
|
|
3514
|
+
* - Medium confidence (>= includeAbove): included as summaries
|
|
3515
|
+
* - Below includeAbove: excluded
|
|
3516
|
+
*
|
|
3517
|
+
* Abstain floor (Tier 1, T1.3): if `thresholds.minConfidence` is set and
|
|
3518
|
+
* even the single best-scoring skill is below it, the whole loadout
|
|
3519
|
+
* abstains — every skill is excluded and **nothing** is injected. This
|
|
3520
|
+
* makes "no sufficiently relevant skill" a first-class outcome (B=0),
|
|
3521
|
+
* which prevents irrelevant skills from dragging task success below the
|
|
3522
|
+
* no-skill baseline. `scored` is expected to be sorted descending, but we
|
|
3523
|
+
* defensively take the max rather than assume order.
|
|
3524
|
+
*/
|
|
3525
|
+
partitionByConfidence(scored: ScoredSkill[], thresholds: ConfidenceThresholds): {
|
|
3526
|
+
expand: ScoredSkill[];
|
|
3527
|
+
summarize: ScoredSkill[];
|
|
3528
|
+
excluded: ScoredSkill[];
|
|
3529
|
+
};
|
|
3131
3530
|
/**
|
|
3132
3531
|
* Compile from a named profile
|
|
3133
3532
|
*/
|
|
@@ -3151,12 +3550,14 @@ declare class LoadoutCompiler {
|
|
|
3151
3550
|
*/
|
|
3152
3551
|
applyQualityFilters(skills: Skill[], criteria: LoadoutCriteria): Skill[];
|
|
3153
3552
|
/**
|
|
3154
|
-
* Apply semantic filters (task description
|
|
3553
|
+
* Apply semantic filters (task description matching).
|
|
3155
3554
|
*
|
|
3156
|
-
*
|
|
3157
|
-
*
|
|
3555
|
+
* When `taskDescription` is provided, uses storage.searchSkills()
|
|
3556
|
+
* to find matching skills and boosts them to the front. Skills not
|
|
3557
|
+
* matching the search are retained at lower priority so that tag
|
|
3558
|
+
* filters and explicit includes still work.
|
|
3158
3559
|
*/
|
|
3159
|
-
applySemanticFilters(skills: Skill[],
|
|
3560
|
+
applySemanticFilters(skills: Skill[], criteria: LoadoutCriteria): Promise<Skill[]>;
|
|
3160
3561
|
/**
|
|
3161
3562
|
* Apply relationship-based filters (root skills, dependencies)
|
|
3162
3563
|
*/
|
|
@@ -3370,6 +3771,486 @@ declare class CatalogRenderer {
|
|
|
3370
3771
|
private countNodeSkills;
|
|
3371
3772
|
}
|
|
3372
3773
|
|
|
3774
|
+
/**
|
|
3775
|
+
* Term-overlap similarity scoring for skill-to-task matching.
|
|
3776
|
+
*
|
|
3777
|
+
* Used by the loadout compiler to score skills against a task description,
|
|
3778
|
+
* enabling confidence-tiered expansion (hybrid loadout strategy).
|
|
3779
|
+
*
|
|
3780
|
+
* @packageDocumentation
|
|
3781
|
+
*/
|
|
3782
|
+
/**
|
|
3783
|
+
* Tokenize text into a list of normalized terms (duplicates preserved),
|
|
3784
|
+
* filtering stop words and short tokens. Used where term frequency
|
|
3785
|
+
* matters (e.g. BM25 in hybrid retrieval).
|
|
3786
|
+
*/
|
|
3787
|
+
declare function tokenizeList(text: string): string[];
|
|
3788
|
+
/**
|
|
3789
|
+
* Tokenize text into a set of normalized terms, filtering stop words.
|
|
3790
|
+
*/
|
|
3791
|
+
declare function tokenize(text: string): Set<string>;
|
|
3792
|
+
/**
|
|
3793
|
+
* Compute term-overlap similarity between two texts.
|
|
3794
|
+
*
|
|
3795
|
+
* Returns a score in [0, 1] using Jaccard-like overlap normalized
|
|
3796
|
+
* by the smaller set size. Requires at least 2 overlapping terms
|
|
3797
|
+
* to avoid false positives from single shared words.
|
|
3798
|
+
*/
|
|
3799
|
+
declare function termSimilarity(textA: string, textB: string): number;
|
|
3800
|
+
/**
|
|
3801
|
+
* Score a skill's relevance to a task description.
|
|
3802
|
+
* Combines the skill's name, description, tags, and (when provided) the
|
|
3803
|
+
* SKILL.md body into a single text and scores against the task text.
|
|
3804
|
+
*
|
|
3805
|
+
* The body (`skillBody`) is included because it carries the dominant
|
|
3806
|
+
* matching signal (SkillRouter: ~92% of reranker attention is on the
|
|
3807
|
+
* body); omitting it leaves the strongest evidence unused. It is an
|
|
3808
|
+
* optional trailing argument for backward compatibility.
|
|
3809
|
+
*/
|
|
3810
|
+
declare function scoreSkillRelevance(taskText: string, skillName: string, skillDescription: string, skillTags: string[], skillBody?: string): number;
|
|
3811
|
+
|
|
3812
|
+
/**
|
|
3813
|
+
* Hybrid retrieval scoring for skill selection (Tier 1).
|
|
3814
|
+
*
|
|
3815
|
+
* Replaces the legacy lexical-only Jaccard scorer with a field-weighted
|
|
3816
|
+
* **BM25(F)** lexical signal — indexing the skill *body*, not just its
|
|
3817
|
+
* name/description — optionally fused with a **dense embedding** signal.
|
|
3818
|
+
*
|
|
3819
|
+
* Grounded in the 2026 literature:
|
|
3820
|
+
* - "Skills in the Wild" (arXiv 2604.04323): BM25 with field weights
|
|
3821
|
+
* name:10/description:5/content:5 + dense + RRF (k=60) lifts retrieval
|
|
3822
|
+
* recall from ~27% (keyword-only) to ~68%@10.
|
|
3823
|
+
* - SkillRouter (arXiv 2603.22455): the skill *body* carries ~92% of the
|
|
3824
|
+
* discriminative signal; scoring descriptions alone leaves it unused.
|
|
3825
|
+
*
|
|
3826
|
+
* ### Score calibration
|
|
3827
|
+
* Each skill gets an **absolute** `relevanceScore` in [0,1] (a renormalized
|
|
3828
|
+
* blend of an absolute lexical sub-score and an absolute dense sub-score).
|
|
3829
|
+
* "Absolute" means an irrelevant skill scores ≈0 regardless of the rest of
|
|
3830
|
+
* the pool — this is what makes the confidence thresholds (`expandAbove`/
|
|
3831
|
+
* `includeAbove`) and the abstain floor (`minConfidence`) meaningful.
|
|
3832
|
+
*
|
|
3833
|
+
* The `fusion` option only changes the *sort order*:
|
|
3834
|
+
* - `'weighted'` (default): order by the absolute blended score.
|
|
3835
|
+
* - `'rrf'`: order by reciprocal rank fusion of the lexical and dense
|
|
3836
|
+
* rankings (only meaningful when an embedder is present). The reported
|
|
3837
|
+
* `relevanceScore` is still the calibrated absolute blend, so gating
|
|
3838
|
+
* stays well-defined.
|
|
3839
|
+
*
|
|
3840
|
+
* @packageDocumentation
|
|
3841
|
+
*/
|
|
3842
|
+
|
|
3843
|
+
/**
|
|
3844
|
+
* Default per-field weights (mirrors the "Skills in the Wild" recipe;
|
|
3845
|
+
* tags get a small weight, body is indexed).
|
|
3846
|
+
*/
|
|
3847
|
+
declare const DEFAULT_FIELD_WEIGHTS: FieldWeights;
|
|
3848
|
+
/**
|
|
3849
|
+
* Compute raw BM25(F) scores for `query` over `skills`. Field weights are
|
|
3850
|
+
* folded into the term frequencies (a standard BM25F simplification), so a
|
|
3851
|
+
* name match counts more than a body match. Returns id → raw score (≥0).
|
|
3852
|
+
*/
|
|
3853
|
+
declare function bm25Scores(query: string, skills: Skill[], fieldWeights?: FieldWeights, k1?: number, b?: number): Map<string, number>;
|
|
3854
|
+
/** Cosine similarity of two equal-length numeric vectors (0 if degenerate). */
|
|
3855
|
+
declare function cosineSimilarity(a: number[], b: number[]): number;
|
|
3856
|
+
/**
|
|
3857
|
+
* Reciprocal Rank Fusion. Each ranking is an ordered list of ids (best
|
|
3858
|
+
* first). Returns id → fused score = Σ_rankings 1/(k + rank), rank 1-based.
|
|
3859
|
+
* Items absent from a ranking simply contribute nothing from it.
|
|
3860
|
+
*/
|
|
3861
|
+
declare function reciprocalRankFusion(rankings: string[][], k?: number): Map<string, number>;
|
|
3862
|
+
/**
|
|
3863
|
+
* Score skills against a task/query with hybrid retrieval, returning
|
|
3864
|
+
* `ScoredSkill[]` sorted by descending relevance. `relevanceScore` is an
|
|
3865
|
+
* absolute, calibrated value in [0,1] suitable for confidence thresholds
|
|
3866
|
+
* and the abstain floor.
|
|
3867
|
+
*
|
|
3868
|
+
* Degrades gracefully: with no embedder (or if embedding throws), it
|
|
3869
|
+
* returns a pure field-weighted BM25 ranking — still a strict upgrade over
|
|
3870
|
+
* the legacy Jaccard scorer because it indexes the skill body.
|
|
3871
|
+
*/
|
|
3872
|
+
declare function scoreSkillsHybrid(query: string, skills: Skill[], options?: HybridRetrievalOptions): Promise<ScoredSkill[]>;
|
|
3873
|
+
|
|
3874
|
+
/**
|
|
3875
|
+
* AWS Bedrock {@link EmbeddingProvider}.
|
|
3876
|
+
*
|
|
3877
|
+
* Defaults to Amazon Titan Text Embeddings v2 (`amazon.titan-embed-text-v2:0`),
|
|
3878
|
+
* which embeds one text per `InvokeModel` call; this provider fans the batch
|
|
3879
|
+
* out with bounded concurrency. Cohere embed models (`cohere.embed-*`) are
|
|
3880
|
+
* also supported via their native batch API.
|
|
3881
|
+
*
|
|
3882
|
+
* The `@aws-sdk/client-bedrock-runtime` package is an OPTIONAL dependency,
|
|
3883
|
+
* lazily imported on first use. Wrap this in a {@link CachingEmbeddingProvider}
|
|
3884
|
+
* so the library is embedded once rather than per task.
|
|
3885
|
+
*
|
|
3886
|
+
* @packageDocumentation
|
|
3887
|
+
*/
|
|
3888
|
+
|
|
3889
|
+
interface BedrockEmbeddingConfig {
|
|
3890
|
+
/** Bedrock embedding model id. Default: `amazon.titan-embed-text-v2:0`. */
|
|
3891
|
+
modelId?: string;
|
|
3892
|
+
/** AWS region. Falls back to AWS_REGION / AWS_DEFAULT_REGION. */
|
|
3893
|
+
region?: string;
|
|
3894
|
+
/** Output dimensions (Titan v2 supports 256/512/1024). Default: 1024. */
|
|
3895
|
+
dimensions?: number;
|
|
3896
|
+
/** L2-normalize output (Titan v2 option). Default: true. */
|
|
3897
|
+
normalize?: boolean;
|
|
3898
|
+
/** Max concurrent InvokeModel calls for per-text models (Titan). Default: 8. */
|
|
3899
|
+
concurrency?: number;
|
|
3900
|
+
/**
|
|
3901
|
+
* Cohere `input_type` (asymmetric retrieval). Use `search_document` to embed
|
|
3902
|
+
* the skill library and `search_query` for the task. Default: `search_query`.
|
|
3903
|
+
* Ignored by Titan. (Symmetric use — same type for both — still works but is
|
|
3904
|
+
* slightly weaker for retrieval.)
|
|
3905
|
+
*/
|
|
3906
|
+
inputType?: 'search_query' | 'search_document' | 'classification' | 'clustering';
|
|
3907
|
+
/**
|
|
3908
|
+
* Low-level invoke seam: given (modelId, requestBody), return the parsed
|
|
3909
|
+
* JSON response. Defaults to a lazily-imported Bedrock runtime client.
|
|
3910
|
+
* Override for testing or custom auth.
|
|
3911
|
+
*/
|
|
3912
|
+
invoke?: (modelId: string, body: unknown) => Promise<any>;
|
|
3913
|
+
}
|
|
3914
|
+
declare class BedrockEmbeddingProvider implements EmbeddingProvider {
|
|
3915
|
+
private modelId;
|
|
3916
|
+
private region?;
|
|
3917
|
+
private dimensions;
|
|
3918
|
+
private normalize;
|
|
3919
|
+
private concurrency;
|
|
3920
|
+
private inputType;
|
|
3921
|
+
private invoke;
|
|
3922
|
+
private client;
|
|
3923
|
+
constructor(config?: BedrockEmbeddingConfig);
|
|
3924
|
+
embed(texts: string[]): Promise<number[][]>;
|
|
3925
|
+
private isCohere;
|
|
3926
|
+
/** Titan-style: one InvokeModel per text, fanned out with bounded concurrency. */
|
|
3927
|
+
private embedPerText;
|
|
3928
|
+
/** Cohere embed: batched in chunks of ≤96 (Bedrock's per-request cap). */
|
|
3929
|
+
private embedCohereBatch;
|
|
3930
|
+
private extractSingle;
|
|
3931
|
+
private defaultInvoke;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
/**
|
|
3935
|
+
* AWS SageMaker {@link EmbeddingProvider}.
|
|
3936
|
+
*
|
|
3937
|
+
* Invokes a SageMaker real-time inference endpoint. Endpoint I/O contracts
|
|
3938
|
+
* vary by the deployed model, so request serialization and response parsing
|
|
3939
|
+
* are configurable; the defaults match HuggingFace TEI / feature-extraction
|
|
3940
|
+
* images (`{ inputs: string[] }` → `number[][]`).
|
|
3941
|
+
*
|
|
3942
|
+
* `@aws-sdk/client-sagemaker-runtime` is an OPTIONAL dependency, lazily
|
|
3943
|
+
* imported on first use. Wrap in a {@link CachingEmbeddingProvider} for reuse.
|
|
3944
|
+
*
|
|
3945
|
+
* @packageDocumentation
|
|
3946
|
+
*/
|
|
3947
|
+
|
|
3948
|
+
interface SageMakerEmbeddingConfig {
|
|
3949
|
+
/** Name of the deployed SageMaker endpoint (required). */
|
|
3950
|
+
endpointName: string;
|
|
3951
|
+
/** AWS region. Falls back to AWS_REGION / AWS_DEFAULT_REGION. */
|
|
3952
|
+
region?: string;
|
|
3953
|
+
/** Request content type. Default: `application/json`. */
|
|
3954
|
+
contentType?: string;
|
|
3955
|
+
/**
|
|
3956
|
+
* Serialize the batch of texts into the endpoint's request body.
|
|
3957
|
+
* Default: `JSON.stringify({ inputs: texts })` (HF TEI style).
|
|
3958
|
+
*/
|
|
3959
|
+
serialize?: (texts: string[]) => string;
|
|
3960
|
+
/**
|
|
3961
|
+
* Parse the endpoint's raw response string into vectors. Default handles
|
|
3962
|
+
* `number[][]`, `{ embeddings: number[][] }`, and `{ vectors: number[][] }`.
|
|
3963
|
+
*/
|
|
3964
|
+
deserialize?: (raw: string) => number[][];
|
|
3965
|
+
/**
|
|
3966
|
+
* Low-level invoke seam: given (endpointName, body, contentType), return the
|
|
3967
|
+
* raw response string. Defaults to a lazily-imported SageMaker runtime client.
|
|
3968
|
+
* Override for testing or custom auth.
|
|
3969
|
+
*/
|
|
3970
|
+
invoke?: (endpointName: string, body: string, contentType: string) => Promise<string>;
|
|
3971
|
+
}
|
|
3972
|
+
declare class SageMakerEmbeddingProvider implements EmbeddingProvider {
|
|
3973
|
+
private endpointName;
|
|
3974
|
+
private region?;
|
|
3975
|
+
private contentType;
|
|
3976
|
+
private serialize;
|
|
3977
|
+
private deserialize;
|
|
3978
|
+
private invoke;
|
|
3979
|
+
private client;
|
|
3980
|
+
constructor(config: SageMakerEmbeddingConfig);
|
|
3981
|
+
embed(texts: string[]): Promise<number[][]>;
|
|
3982
|
+
private defaultInvoke;
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
/**
|
|
3986
|
+
* Content-keyed caching wrapper for any {@link EmbeddingProvider}.
|
|
3987
|
+
*
|
|
3988
|
+
* Skill texts are stable across tasks, so without caching every
|
|
3989
|
+
* `setLoadoutForTask` would re-embed the entire library. This wrapper
|
|
3990
|
+
* memoizes embeddings by text content: skills are embedded once (a one-time
|
|
3991
|
+
* warmup), and subsequent task scoring only sends the new query to the
|
|
3992
|
+
* backend. De-duplicates within a single batch as well.
|
|
3993
|
+
*
|
|
3994
|
+
* @packageDocumentation
|
|
3995
|
+
*/
|
|
3996
|
+
|
|
3997
|
+
interface CachingEmbeddingConfig {
|
|
3998
|
+
/**
|
|
3999
|
+
* Maximum number of cached vectors. When exceeded, oldest entries are
|
|
4000
|
+
* evicted (insertion-order). Default: 50000 (effectively unbounded for
|
|
4001
|
+
* typical libraries). Set to 0 to disable the bound.
|
|
4002
|
+
*/
|
|
4003
|
+
maxEntries?: number;
|
|
4004
|
+
}
|
|
4005
|
+
/**
|
|
4006
|
+
* Wraps an EmbeddingProvider with an in-memory, content-keyed LRU-ish cache.
|
|
4007
|
+
*/
|
|
4008
|
+
declare class CachingEmbeddingProvider implements EmbeddingProvider {
|
|
4009
|
+
private inner;
|
|
4010
|
+
private cache;
|
|
4011
|
+
private maxEntries;
|
|
4012
|
+
constructor(inner: EmbeddingProvider, config?: CachingEmbeddingConfig);
|
|
4013
|
+
embed(texts: string[]): Promise<number[][]>;
|
|
4014
|
+
private set;
|
|
4015
|
+
/** Number of cached vectors (useful for tests/diagnostics). */
|
|
4016
|
+
get size(): number;
|
|
4017
|
+
/** Drop all cached vectors. */
|
|
4018
|
+
clear(): void;
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
/**
|
|
4022
|
+
* Logistic-regression utility scorer (Tier 2, T2.1 default).
|
|
4023
|
+
*
|
|
4024
|
+
* A small, dependency-free model fit by batch gradient descent. The feature
|
|
4025
|
+
* vector deliberately mixes retrieval signals with a *learned per-skill
|
|
4026
|
+
* helpfulness prior*:
|
|
4027
|
+
*
|
|
4028
|
+
* [ lexAbs, denseAbs, skillPrior, lexAbs·denseAbs ] (+ bias)
|
|
4029
|
+
*
|
|
4030
|
+
* `skillPrior` is the smoothed rate at which a skill actually helped across
|
|
4031
|
+
* training tasks. It is the lever that down-weights generic, high-surface-area
|
|
4032
|
+
* skills (e.g. `citation-management`) that retrieval scores highly on *every*
|
|
4033
|
+
* task but which rarely contribute — exactly the residual gap that BM25 and
|
|
4034
|
+
* dense embeddings cannot close on their own.
|
|
4035
|
+
*
|
|
4036
|
+
* The output sigmoid is in [0,1], so it drops straight into the existing
|
|
4037
|
+
* confidence thresholds and abstain floor.
|
|
4038
|
+
*
|
|
4039
|
+
* @packageDocumentation
|
|
4040
|
+
*/
|
|
4041
|
+
|
|
4042
|
+
interface LogisticUtilityConfig {
|
|
4043
|
+
/** Gradient-descent learning rate (default: 0.5). */
|
|
4044
|
+
learningRate?: number;
|
|
4045
|
+
/** Number of full-batch iterations (default: 400). */
|
|
4046
|
+
iterations?: number;
|
|
4047
|
+
/** L2 regularization strength (default: 1e-3). */
|
|
4048
|
+
l2?: number;
|
|
4049
|
+
/** Beta-prior pseudo-counts for the per-skill helpfulness rate (default: 1/1). */
|
|
4050
|
+
priorAlpha?: number;
|
|
4051
|
+
priorBeta?: number;
|
|
4052
|
+
/**
|
|
4053
|
+
* Use the *per-skill-ID* helpfulness prior as a feature (default: true).
|
|
4054
|
+
*
|
|
4055
|
+
* WARNING — generalization caveat: a per-skill-ID prior memorizes base rates
|
|
4056
|
+
* and does NOT transfer to held-out tasks where a normally-rare skill is the
|
|
4057
|
+
* answer. On SkillsBench's held-out protocol it is catastrophic (it learns
|
|
4058
|
+
* `citation-management` "rarely helps" and then kills it on the one task it
|
|
4059
|
+
* is curated for). The prior is appropriate only when the *same* skills
|
|
4060
|
+
* recur across *similar* tasks (e.g. a personal library of repeated work).
|
|
4061
|
+
* For cross-task generalization, set this false and rely on task-conditional
|
|
4062
|
+
* features — ultimately the (task, skill) embedding interaction (T2.1 v2),
|
|
4063
|
+
* not an ID lookup. With it false the model reduces to a learned reweighting
|
|
4064
|
+
* of the lexical/dense signals.
|
|
4065
|
+
*/
|
|
4066
|
+
usePrior?: boolean;
|
|
4067
|
+
}
|
|
4068
|
+
interface SerializedScorer {
|
|
4069
|
+
weights: number[];
|
|
4070
|
+
bias: number;
|
|
4071
|
+
globalPrior: number;
|
|
4072
|
+
skillPrior: Record<string, number>;
|
|
4073
|
+
config: Required<LogisticUtilityConfig>;
|
|
4074
|
+
}
|
|
4075
|
+
declare class LogisticUtilityScorer implements UtilityScorer {
|
|
4076
|
+
private weights;
|
|
4077
|
+
private bias;
|
|
4078
|
+
private globalPrior;
|
|
4079
|
+
private skillPrior;
|
|
4080
|
+
private isTrained;
|
|
4081
|
+
private config;
|
|
4082
|
+
constructor(config?: LogisticUtilityConfig);
|
|
4083
|
+
get trained(): boolean;
|
|
4084
|
+
/** Smoothed per-skill helpfulness prior used as a feature. */
|
|
4085
|
+
priorFor(skillId: string): number;
|
|
4086
|
+
private featureVector;
|
|
4087
|
+
score(features: UtilityFeatures): number;
|
|
4088
|
+
train(examples: UtilityExample[]): UtilityTrainReport;
|
|
4089
|
+
toJSON(): SerializedScorer;
|
|
4090
|
+
static fromJSON(data: SerializedScorer): LogisticUtilityScorer;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* Harvests labeled examples for the utility scorer (Tier 2, T2.1).
|
|
4095
|
+
*
|
|
4096
|
+
* The training signal comes from observed loadout→outcome traces: when a skill
|
|
4097
|
+
* was in the served loadout and the task succeeded, that's weak positive
|
|
4098
|
+
* evidence the skill helped; on failure, weak negative. Accumulated across many
|
|
4099
|
+
* tasks, this teaches the scorer which skills genuinely contribute (vs which
|
|
4100
|
+
* are merely retrieved often). Also supports offline supervision from curated
|
|
4101
|
+
* ground-truth sets (e.g. a benchmark's reference skills).
|
|
4102
|
+
*
|
|
4103
|
+
* The recorder is a plain accumulator — the orchestrator (or cognitive-core's
|
|
4104
|
+
* evaluator) calls `recordOutcome` after each task and periodically retrains
|
|
4105
|
+
* the scorer on `getExamples()`. This keeps authoring (the agent run) and the
|
|
4106
|
+
* learning pass in separate lanes.
|
|
4107
|
+
*
|
|
4108
|
+
* @packageDocumentation
|
|
4109
|
+
*/
|
|
4110
|
+
|
|
4111
|
+
/** A scored candidate plus whether it was actually served for the task. */
|
|
4112
|
+
interface OutcomeCandidate {
|
|
4113
|
+
features: UtilityFeatures;
|
|
4114
|
+
selected: boolean;
|
|
4115
|
+
}
|
|
4116
|
+
interface TaskOutcome {
|
|
4117
|
+
taskText?: string;
|
|
4118
|
+
candidates: OutcomeCandidate[];
|
|
4119
|
+
/** Did the task ultimately succeed (e.g. verifier passed)? */
|
|
4120
|
+
success: boolean;
|
|
4121
|
+
/** Weight for these examples (e.g. confidence in the outcome). Default 1. */
|
|
4122
|
+
weight?: number;
|
|
4123
|
+
}
|
|
4124
|
+
declare class FeedbackRecorder {
|
|
4125
|
+
private examples;
|
|
4126
|
+
/** Append a single pre-built example. */
|
|
4127
|
+
record(example: UtilityExample): void;
|
|
4128
|
+
/**
|
|
4129
|
+
* Label a task outcome. Each *selected* candidate becomes an example whose
|
|
4130
|
+
* `helped` label is the task's success. Unselected candidates are not
|
|
4131
|
+
* labeled (we have no counterfactual signal for them).
|
|
4132
|
+
*/
|
|
4133
|
+
recordOutcome(outcome: TaskOutcome): void;
|
|
4134
|
+
/**
|
|
4135
|
+
* Offline supervision from a curated ground-truth set: every candidate in
|
|
4136
|
+
* `curatedIds` is labeled helped, the rest not-helped. Useful for
|
|
4137
|
+
* cold-starting the scorer from a benchmark or human-authored loadouts
|
|
4138
|
+
* before real execution traces exist.
|
|
4139
|
+
*/
|
|
4140
|
+
recordCurated(taskText: string | undefined, candidates: UtilityFeatures[], curatedIds: string[], weight?: number): void;
|
|
4141
|
+
getExamples(): UtilityExample[];
|
|
4142
|
+
get size(): number;
|
|
4143
|
+
clear(): void;
|
|
4144
|
+
toJSON(): UtilityExample[];
|
|
4145
|
+
static fromJSON(examples: UtilityExample[]): FeedbackRecorder;
|
|
4146
|
+
}
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* AWS Bedrock {@link RerankProvider} (Cohere Rerank v3.5 by default).
|
|
4150
|
+
*
|
|
4151
|
+
* Uses the Bedrock `Rerank` API (`@aws-sdk/client-bedrock-agent-runtime`, an
|
|
4152
|
+
* OPTIONAL lazily-imported dependency). Documents are truncated to a char cap
|
|
4153
|
+
* (Cohere truncates long inputs anyway). Pass a custom `invoke` for testing.
|
|
4154
|
+
*
|
|
4155
|
+
* @packageDocumentation
|
|
4156
|
+
*/
|
|
4157
|
+
|
|
4158
|
+
interface BedrockRerankConfig {
|
|
4159
|
+
/** Rerank model id (region-scoped ARN built from this). Default: cohere.rerank-v3-5:0. */
|
|
4160
|
+
modelId?: string;
|
|
4161
|
+
/** Full model ARN (overrides modelId). */
|
|
4162
|
+
modelArn?: string;
|
|
4163
|
+
/** AWS region. Falls back to AWS_REGION / AWS_DEFAULT_REGION. */
|
|
4164
|
+
region?: string;
|
|
4165
|
+
/** Truncate each candidate's text to this many chars before sending. Default: 4000. */
|
|
4166
|
+
maxDocChars?: number;
|
|
4167
|
+
/** Truncate the query to this many chars. Default: 4000. */
|
|
4168
|
+
maxQueryChars?: number;
|
|
4169
|
+
/**
|
|
4170
|
+
* Low-level seam: given (query, docTexts, topN) return [{index, relevanceScore}].
|
|
4171
|
+
* Defaults to a lazily-imported Bedrock agent-runtime client.
|
|
4172
|
+
*/
|
|
4173
|
+
invoke?: (query: string, docs: string[], topN: number) => Promise<{
|
|
4174
|
+
index: number;
|
|
4175
|
+
relevanceScore: number;
|
|
4176
|
+
}[]>;
|
|
4177
|
+
}
|
|
4178
|
+
declare class BedrockRerankProvider implements RerankProvider {
|
|
4179
|
+
private modelId;
|
|
4180
|
+
private region?;
|
|
4181
|
+
private modelArn?;
|
|
4182
|
+
private maxDocChars;
|
|
4183
|
+
private maxQueryChars;
|
|
4184
|
+
private invoke;
|
|
4185
|
+
private client;
|
|
4186
|
+
constructor(config?: BedrockRerankConfig);
|
|
4187
|
+
rerank(query: string, candidates: RerankCandidate[], topN?: number): Promise<RerankResult[]>;
|
|
4188
|
+
private arn;
|
|
4189
|
+
private defaultInvoke;
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
/**
|
|
4193
|
+
* Telemetry collector for progressive disclosure evaluation.
|
|
4194
|
+
*
|
|
4195
|
+
* Subscribes to SkillGraphServer events and accumulates a
|
|
4196
|
+
* DisclosureTrace recording every expand, collapse, and browse
|
|
4197
|
+
* action with token counts.
|
|
4198
|
+
*/
|
|
4199
|
+
|
|
4200
|
+
interface DisclosureEvent {
|
|
4201
|
+
timestamp: number;
|
|
4202
|
+
action: 'expand' | 'collapse' | 'browse_catalog' | 'search' | 'loadout_changed';
|
|
4203
|
+
skillId?: string;
|
|
4204
|
+
category?: string[];
|
|
4205
|
+
tokensBefore: number;
|
|
4206
|
+
tokensAfter: number;
|
|
4207
|
+
}
|
|
4208
|
+
interface DisclosureTrace {
|
|
4209
|
+
sessionId: string;
|
|
4210
|
+
taskId: string;
|
|
4211
|
+
strategyId: string;
|
|
4212
|
+
events: DisclosureEvent[];
|
|
4213
|
+
startedAt: number;
|
|
4214
|
+
finishedAt?: number;
|
|
4215
|
+
finalState: {
|
|
4216
|
+
expanded: string[];
|
|
4217
|
+
collapsed: string[];
|
|
4218
|
+
neverTouched: string[];
|
|
4219
|
+
};
|
|
4220
|
+
}
|
|
4221
|
+
declare class TelemetryCollector {
|
|
4222
|
+
private server;
|
|
4223
|
+
private sessionId;
|
|
4224
|
+
private taskId;
|
|
4225
|
+
private strategyId;
|
|
4226
|
+
private events;
|
|
4227
|
+
private unsubscribe;
|
|
4228
|
+
private startedAt;
|
|
4229
|
+
constructor(server: SkillGraphServer, sessionId: string, taskId: string, strategyId: string);
|
|
4230
|
+
start(): void;
|
|
4231
|
+
stop(): void;
|
|
4232
|
+
getTrace(): DisclosureTrace;
|
|
4233
|
+
getExpandedSkillIds(): string[];
|
|
4234
|
+
getEventCount(): number;
|
|
4235
|
+
private mapEventAction;
|
|
4236
|
+
}
|
|
4237
|
+
/**
|
|
4238
|
+
* Compute decision quality metrics from a disclosure trace.
|
|
4239
|
+
*/
|
|
4240
|
+
declare function computeDecisionMetrics(trace: DisclosureTrace, oracleSkillIds: string[]): DecisionMetrics;
|
|
4241
|
+
interface DecisionMetrics {
|
|
4242
|
+
expandPrecision: number;
|
|
4243
|
+
expandRecall: number;
|
|
4244
|
+
expandF1: number;
|
|
4245
|
+
distractorAvoidance: number;
|
|
4246
|
+
overExpansionRate: number;
|
|
4247
|
+
underExpansionRate: number;
|
|
4248
|
+
totalExpanded: number;
|
|
4249
|
+
totalAvailable: number;
|
|
4250
|
+
expandEvents: number;
|
|
4251
|
+
collapseEvents: number;
|
|
4252
|
+
}
|
|
4253
|
+
|
|
3373
4254
|
/**
|
|
3374
4255
|
* Built-in Loadout Profiles
|
|
3375
4256
|
*
|
|
@@ -3902,6 +4783,301 @@ declare class IndexerService {
|
|
|
3902
4783
|
close(): Promise<void>;
|
|
3903
4784
|
}
|
|
3904
4785
|
|
|
4786
|
+
/**
|
|
4787
|
+
* SkillNet importer — load skills from the SkillNet ecosystem into a SkillBank.
|
|
4788
|
+
*
|
|
4789
|
+
* SkillNet (https://github.com/zjunlp/SkillNet) is a public, hosted search index over
|
|
4790
|
+
* GitHub-hosted SKILL.md folders. Its REST API returns rows whose `skill_url` points at
|
|
4791
|
+
* a GitHub tree/blob path containing a `SKILL.md`. This module is a "hybrid" importer:
|
|
4792
|
+
*
|
|
4793
|
+
* 1. It queries the SkillNet search API (free, no key) to resolve a query → skill URLs.
|
|
4794
|
+
* 2. It fetches each skill's `SKILL.md` directly from GitHub raw (no key for public repos).
|
|
4795
|
+
* 3. It parses the OpenSkills frontmatter and converts to a skill-tree `Skill`.
|
|
4796
|
+
*
|
|
4797
|
+
* This avoids any dependency on the optional `scraper/` package and works entirely over
|
|
4798
|
+
* `fetch`, which is injectable for testing.
|
|
4799
|
+
*/
|
|
4800
|
+
|
|
4801
|
+
/** Default public SkillNet search API base. */
|
|
4802
|
+
declare const DEFAULT_SKILLNET_API = "http://api-skillnet.openkg.cn/v1";
|
|
4803
|
+
/**
|
|
4804
|
+
* Minimal fetch surface so this module does not depend on DOM lib types.
|
|
4805
|
+
* The global `fetch` (Node 18+) satisfies this shape.
|
|
4806
|
+
*/
|
|
4807
|
+
type FetchLike = (url: string, init?: {
|
|
4808
|
+
headers?: Record<string, string>;
|
|
4809
|
+
}) => Promise<{
|
|
4810
|
+
ok: boolean;
|
|
4811
|
+
status: number;
|
|
4812
|
+
statusText: string;
|
|
4813
|
+
text(): Promise<string>;
|
|
4814
|
+
json(): Promise<unknown>;
|
|
4815
|
+
}>;
|
|
4816
|
+
/**
|
|
4817
|
+
* A single result row from the SkillNet search API.
|
|
4818
|
+
* Mirrors the `data[]` entries documented in the SkillNet README.
|
|
4819
|
+
*/
|
|
4820
|
+
interface SkillNetSearchResult {
|
|
4821
|
+
skillName: string;
|
|
4822
|
+
skillDescription?: string;
|
|
4823
|
+
author?: string;
|
|
4824
|
+
stars: number;
|
|
4825
|
+
skillUrl: string;
|
|
4826
|
+
category?: string;
|
|
4827
|
+
/** Optional 5-dimension quality scores, when present on the row. */
|
|
4828
|
+
evaluation?: Record<string, unknown>;
|
|
4829
|
+
}
|
|
4830
|
+
/**
|
|
4831
|
+
* Options for a SkillNet search query.
|
|
4832
|
+
*/
|
|
4833
|
+
interface SkillNetSearchOptions {
|
|
4834
|
+
/** `keyword` (fuzzy) or `vector` (semantic). Defaults to keyword. */
|
|
4835
|
+
mode?: 'keyword' | 'vector';
|
|
4836
|
+
/** Category filter (Development, AIGC, Research, Science, etc.). */
|
|
4837
|
+
category?: string;
|
|
4838
|
+
/** Results per page (max 50). */
|
|
4839
|
+
limit?: number;
|
|
4840
|
+
/** Page number (keyword mode only). */
|
|
4841
|
+
page?: number;
|
|
4842
|
+
/** Minimum star count (keyword mode only). */
|
|
4843
|
+
minStars?: number;
|
|
4844
|
+
/** Sort order (keyword mode only). */
|
|
4845
|
+
sortBy?: 'stars' | 'recent';
|
|
4846
|
+
/** Similarity threshold 0.0–1.0 (vector mode only). */
|
|
4847
|
+
threshold?: number;
|
|
4848
|
+
}
|
|
4849
|
+
/**
|
|
4850
|
+
* Configuration for the SkillNet client.
|
|
4851
|
+
*/
|
|
4852
|
+
interface SkillNetClientConfig {
|
|
4853
|
+
/** Search API base URL. Defaults to the public SkillNet endpoint. */
|
|
4854
|
+
apiBaseUrl?: string;
|
|
4855
|
+
/** GitHub token for raw fetches (private repos / higher rate limits). */
|
|
4856
|
+
githubToken?: string;
|
|
4857
|
+
/** Optional GitHub mirror prefix for restricted networks (e.g. `https://ghfast.top/`). */
|
|
4858
|
+
githubMirror?: string;
|
|
4859
|
+
/** Injectable fetch implementation (defaults to global `fetch`). */
|
|
4860
|
+
fetchImpl?: FetchLike;
|
|
4861
|
+
}
|
|
4862
|
+
/**
|
|
4863
|
+
* Result of converting one SkillNet skill into skill-tree format.
|
|
4864
|
+
*/
|
|
4865
|
+
interface SkillNetConversionResult {
|
|
4866
|
+
skill: Skill;
|
|
4867
|
+
warnings: string[];
|
|
4868
|
+
/** The raw SKILL.md URL that was fetched. */
|
|
4869
|
+
rawUrl: string;
|
|
4870
|
+
}
|
|
4871
|
+
/**
|
|
4872
|
+
* Result of an import-by-search or import-by-url operation.
|
|
4873
|
+
*/
|
|
4874
|
+
interface SkillNetImportResult {
|
|
4875
|
+
imported: number;
|
|
4876
|
+
failed: number;
|
|
4877
|
+
skills: Skill[];
|
|
4878
|
+
errors: string[];
|
|
4879
|
+
}
|
|
4880
|
+
/**
|
|
4881
|
+
* Parse a GitHub tree/blob URL into its components.
|
|
4882
|
+
* Returns null if the URL is not a recognizable GitHub repo URL.
|
|
4883
|
+
*/
|
|
4884
|
+
declare function parseGitHubUrl(url: string): {
|
|
4885
|
+
owner: string;
|
|
4886
|
+
repo: string;
|
|
4887
|
+
ref: string;
|
|
4888
|
+
path: string;
|
|
4889
|
+
} | null;
|
|
4890
|
+
/**
|
|
4891
|
+
* SkillNet client: search the index, fetch SKILL.md, and import into a SkillBank.
|
|
4892
|
+
*/
|
|
4893
|
+
declare class SkillNetClient {
|
|
4894
|
+
private readonly apiBaseUrl;
|
|
4895
|
+
private readonly githubToken?;
|
|
4896
|
+
private readonly githubMirror?;
|
|
4897
|
+
private readonly fetchImpl;
|
|
4898
|
+
constructor(config?: SkillNetClientConfig);
|
|
4899
|
+
/**
|
|
4900
|
+
* Search the SkillNet index. Free and requires no API key.
|
|
4901
|
+
*/
|
|
4902
|
+
search(query: string, options?: SkillNetSearchOptions): Promise<SkillNetSearchResult[]>;
|
|
4903
|
+
/**
|
|
4904
|
+
* Convert a GitHub skill URL into the raw URL for its SKILL.md.
|
|
4905
|
+
* Applies the configured mirror prefix when set.
|
|
4906
|
+
*/
|
|
4907
|
+
toRawSkillMdUrl(skillUrl: string): string;
|
|
4908
|
+
/**
|
|
4909
|
+
* Fetch the raw SKILL.md content for a skill URL.
|
|
4910
|
+
*/
|
|
4911
|
+
fetchSkillMd(skillUrl: string): Promise<{
|
|
4912
|
+
content: string;
|
|
4913
|
+
rawUrl: string;
|
|
4914
|
+
}>;
|
|
4915
|
+
/**
|
|
4916
|
+
* Convert a SkillNet search result + its SKILL.md content into a skill-tree Skill.
|
|
4917
|
+
*/
|
|
4918
|
+
convertSkillNetSkill(result: SkillNetSearchResult, content: string, rawUrl: string): SkillNetConversionResult;
|
|
4919
|
+
/**
|
|
4920
|
+
* Import a single skill by its SkillNet/GitHub URL into a SkillBank.
|
|
4921
|
+
*/
|
|
4922
|
+
importSkill(skillUrl: string, bank: SkillBank, meta?: Partial<SkillNetSearchResult>): Promise<SkillNetConversionResult>;
|
|
4923
|
+
/**
|
|
4924
|
+
* Search SkillNet and import the matching skills into a SkillBank.
|
|
4925
|
+
*/
|
|
4926
|
+
importFromSearch(query: string, bank: SkillBank, options?: SkillNetSearchOptions & {
|
|
4927
|
+
limit?: number;
|
|
4928
|
+
}): Promise<SkillNetImportResult>;
|
|
4929
|
+
}
|
|
4930
|
+
/**
|
|
4931
|
+
* Create a SkillNet client.
|
|
4932
|
+
*/
|
|
4933
|
+
declare function createSkillNetClient(config?: SkillNetClientConfig): SkillNetClient;
|
|
4934
|
+
|
|
4935
|
+
/**
|
|
4936
|
+
* Standalone parser for OpenSkills SKILL.md files (YAML frontmatter + Markdown body).
|
|
4937
|
+
*
|
|
4938
|
+
* This mirrors the frontmatter handling in `storage/filesystem.ts` but is exposed as
|
|
4939
|
+
* pure functions so importers (e.g. the SkillNet importer) can parse raw SKILL.md
|
|
4940
|
+
* fetched from remote sources without instantiating a storage adapter.
|
|
4941
|
+
*
|
|
4942
|
+
* It intentionally supports only the subset of YAML used by the Agent Skills standard
|
|
4943
|
+
* (scalars, `key: |` block scalars, and `- ` lists). It is not a full YAML parser.
|
|
4944
|
+
*/
|
|
4945
|
+
/**
|
|
4946
|
+
* Parsed frontmatter fields plus the Markdown body.
|
|
4947
|
+
*/
|
|
4948
|
+
interface ParsedSkillMd {
|
|
4949
|
+
/** Skill name (`name:`), if present */
|
|
4950
|
+
name?: string;
|
|
4951
|
+
/** Short description (`description:`), supports block scalars */
|
|
4952
|
+
description?: string;
|
|
4953
|
+
/** Semantic version (`version:`) */
|
|
4954
|
+
version?: string;
|
|
4955
|
+
/** Author (`author:`) */
|
|
4956
|
+
author?: string;
|
|
4957
|
+
/** Lifecycle status (`status:`) */
|
|
4958
|
+
status?: string;
|
|
4959
|
+
/** Date string (`date:`) */
|
|
4960
|
+
date?: string;
|
|
4961
|
+
/** Tags (`tags:` list) */
|
|
4962
|
+
tags: string[];
|
|
4963
|
+
/** Markdown body after the frontmatter, trimmed */
|
|
4964
|
+
body: string;
|
|
4965
|
+
/** Whether a frontmatter block was actually present */
|
|
4966
|
+
hasFrontmatter: boolean;
|
|
4967
|
+
}
|
|
4968
|
+
/**
|
|
4969
|
+
* Split a SKILL.md document into its frontmatter block and Markdown body.
|
|
4970
|
+
*/
|
|
4971
|
+
declare function splitFrontmatter(content: string): {
|
|
4972
|
+
frontmatter: string;
|
|
4973
|
+
body: string;
|
|
4974
|
+
hasFrontmatter: boolean;
|
|
4975
|
+
};
|
|
4976
|
+
/**
|
|
4977
|
+
* Parse a raw SKILL.md document into structured fields and a body.
|
|
4978
|
+
*/
|
|
4979
|
+
declare function parseSkillMd(content: string): ParsedSkillMd;
|
|
4980
|
+
|
|
4981
|
+
/**
|
|
4982
|
+
* Generic SKILL.md → Skill converter.
|
|
4983
|
+
*
|
|
4984
|
+
* Source-agnostic: turns any OpenSkills SKILL.md document (plus optional fallback
|
|
4985
|
+
* metadata and provenance) into a skill-tree `Skill`. The SkillNet importer and the
|
|
4986
|
+
* local-directory importer both delegate here so id/tag/status resolution stays
|
|
4987
|
+
* consistent regardless of where the SKILL.md came from.
|
|
4988
|
+
*/
|
|
4989
|
+
|
|
4990
|
+
/**
|
|
4991
|
+
* Convert a free-form string into a kebab-case skill id.
|
|
4992
|
+
*/
|
|
4993
|
+
declare function slugify(input: string): string;
|
|
4994
|
+
/**
|
|
4995
|
+
* Options controlling how a SKILL.md is converted into a Skill.
|
|
4996
|
+
* Frontmatter values always take precedence; the `default*` fields are fallbacks.
|
|
4997
|
+
*/
|
|
4998
|
+
interface SkillFromMdOptions {
|
|
4999
|
+
/** Explicit skill id (slugified). Falls back to frontmatter name, then defaultName. */
|
|
5000
|
+
id?: string;
|
|
5001
|
+
/** Fallback name when frontmatter has none. */
|
|
5002
|
+
defaultName?: string;
|
|
5003
|
+
/** Fallback description when frontmatter has none. */
|
|
5004
|
+
defaultDescription?: string;
|
|
5005
|
+
/** Fallback author when frontmatter has none. */
|
|
5006
|
+
defaultAuthor?: string;
|
|
5007
|
+
/** Fallback version when frontmatter has none (default '1.0.0'). */
|
|
5008
|
+
defaultVersion?: string;
|
|
5009
|
+
/** Status to use when frontmatter has no valid status (default 'active'). */
|
|
5010
|
+
defaultStatus?: SkillStatus;
|
|
5011
|
+
/** Extra tags to merge with frontmatter tags. */
|
|
5012
|
+
extraTags?: string[];
|
|
5013
|
+
/** Taxonomy path to attach. */
|
|
5014
|
+
taxonomyPath?: string[];
|
|
5015
|
+
/** Source provenance. */
|
|
5016
|
+
source?: SkillSource$1;
|
|
5017
|
+
/** External source provenance. */
|
|
5018
|
+
externalSource?: ExternalSource;
|
|
5019
|
+
/** Timestamp for createdAt/updatedAt (default now). */
|
|
5020
|
+
now?: Date;
|
|
5021
|
+
}
|
|
5022
|
+
/**
|
|
5023
|
+
* Result of converting a SKILL.md document.
|
|
5024
|
+
*/
|
|
5025
|
+
interface SkillFromMdResult {
|
|
5026
|
+
skill: Skill;
|
|
5027
|
+
warnings: string[];
|
|
5028
|
+
parsed: ParsedSkillMd;
|
|
5029
|
+
}
|
|
5030
|
+
/**
|
|
5031
|
+
* Convert a raw SKILL.md document into a skill-tree Skill.
|
|
5032
|
+
*/
|
|
5033
|
+
declare function skillFromSkillMd(content: string, options?: SkillFromMdOptions): SkillFromMdResult;
|
|
5034
|
+
|
|
5035
|
+
/**
|
|
5036
|
+
* Local SKILL.md importers.
|
|
5037
|
+
*
|
|
5038
|
+
* Bulk-import skills from the filesystem into a SkillBank — a single SKILL.md file or a
|
|
5039
|
+
* directory tree of OpenSkills-style `<skill-id>/SKILL.md` folders (e.g. a downloaded
|
|
5040
|
+
* skill pack, `.claude/skills/`, or any `skills/` directory). No network involved.
|
|
5041
|
+
*/
|
|
5042
|
+
|
|
5043
|
+
/** Result of a local import operation. */
|
|
5044
|
+
interface LocalImportResult {
|
|
5045
|
+
imported: number;
|
|
5046
|
+
failed: number;
|
|
5047
|
+
skills: Skill[];
|
|
5048
|
+
errors: string[];
|
|
5049
|
+
}
|
|
5050
|
+
/**
|
|
5051
|
+
* A SKILL.md file found on disk.
|
|
5052
|
+
*/
|
|
5053
|
+
interface FoundSkillMd {
|
|
5054
|
+
/** Absolute path to the SKILL.md file */
|
|
5055
|
+
filePath: string;
|
|
5056
|
+
/** Directory containing the SKILL.md file */
|
|
5057
|
+
directory: string;
|
|
5058
|
+
/** Id derived from the containing directory name */
|
|
5059
|
+
id: string;
|
|
5060
|
+
}
|
|
5061
|
+
/**
|
|
5062
|
+
* Recursively find SKILL.md files under a root directory.
|
|
5063
|
+
* Skips hidden directories (except the root itself) and `node_modules`.
|
|
5064
|
+
*/
|
|
5065
|
+
declare function findSkillMdFiles(root: string, maxDepth?: number): Promise<FoundSkillMd[]>;
|
|
5066
|
+
/**
|
|
5067
|
+
* Import a single SKILL.md file into a SkillBank.
|
|
5068
|
+
* The skill id defaults to the containing directory name (OpenSkills convention),
|
|
5069
|
+
* falling back to the frontmatter name.
|
|
5070
|
+
*/
|
|
5071
|
+
declare function importSkillMdFile(filePath: string, bank: SkillBank, options?: SkillFromMdOptions): Promise<{
|
|
5072
|
+
skill: Skill;
|
|
5073
|
+
warnings: string[];
|
|
5074
|
+
}>;
|
|
5075
|
+
/**
|
|
5076
|
+
* Import all SKILL.md skills found under a directory into a SkillBank.
|
|
5077
|
+
* Duplicate ids are skipped (first occurrence wins) and recorded in `errors`.
|
|
5078
|
+
*/
|
|
5079
|
+
declare function importLocalSkillDir(dirPath: string, bank: SkillBank, options?: SkillFromMdOptions): Promise<LocalImportResult>;
|
|
5080
|
+
|
|
3905
5081
|
/**
|
|
3906
5082
|
* skill-tree - A library for managing agent skill versions and evolution
|
|
3907
5083
|
*
|
|
@@ -3913,6 +5089,6 @@ declare class IndexerService {
|
|
|
3913
5089
|
*
|
|
3914
5090
|
* @packageDocumentation
|
|
3915
5091
|
*/
|
|
3916
|
-
declare const VERSION = "0.
|
|
5092
|
+
declare const VERSION = "0.3.0";
|
|
3917
5093
|
|
|
3918
|
-
export { type AgentConfig, AgentsGenerator, type AgentsGeneratorConfig, AgentsParser, AgentsSync, type BaseHookContext, type BumpType, CachedStorageAdapter, type CachedStorageConfig, CatalogRenderer, type CatalogRendererConfig, type ConflictConfig, type ConflictResolution$1 as ConflictResolution, ConflictStore, type ConflictStrategy, DEFAULT_AGENTS_CONFIG, type DiscoveredSkill, type EvictionStrategy, type ExpandTrigger, type ExpandTriggerConfig, type FederatedRemoteConfig, type FederationEvent, type FederationEventHandler, FederationManager, type FederationManagerOptions, type FetchResult, type ForkOptions, GitSyncAdapter, type GitSyncAdapterOptions, type SyncResult$1 as GitSyncResult, type GraphServerConfig, type HookContext, type HookEvent, type HookExecutionResult, type HookHandler, type HookPriority, HookRegistry, type HookResult, type ImportMode, type ImportOptions, type ImportResult, type IndexResult, IndexerService, type IndexerServiceConfig, type SkillSource as IndexerSkillSource, type IndexerStats, LineageTracker, type LineageTree, LoadoutCompiler, type LoadoutCompilerConfig, type LoadoutCriteria, type LoadoutSource, type LoadoutState, type LoadoutView, type MaterializationConfig, Materializer, MemoryStorageAdapter, type MergeConfig, type MergeConflict, type MergePreview, type MergeResult, type MergeStrategy, type MergeSuggestion, type MigrationOptions, type MigrationProgressItem, type MigrationResult, type NewVersionOptions, type ParsedAgentSkill, type ParsedAgentsFile, type ParsedVersion, type ProjectContext, ProjectDetector, type PullOptions, type PullUpstreamOptions, type PullUpstreamResult, type PushOptions, type RegisterHookOptions, type RegisteredHook, type RelationshipResult, type RemoteConfig, RemoteManager, type RemoteState, RemoteStore, type RollbackOptions, type ScrapeResult, type ServingEvent, type ServingEventHandler, type ShareOptions, type ShareResult, type Skill, type SkillAccessControl, SkillBank, type SkillBankConfig, type SkillBankStats, type SkillChange, type SkillConflict, type SkillCrudHookContext, type SkillDiffChanges, type SkillFilter, type SkillFork, type SkillFormat, SkillGraphServer, type SkillLineage, type SkillMergeResult, SkillMerger, type SkillNamespace, type SkillScope, type SkillSelector, type SkillServingMetadata, type SkillSource$1 as SkillSource, type SkillState, type SkillStatus, type SkillSummary, type SkillSyncState, type SkillTreeEvent, type SkillTreeEventHandler, type SkillUpstream, type SkillVersion, type SkillVisibility, type StorageAdapter, type StorageConfig, type StorageHookContext, type SyncBehaviorConfig, type SyncConfig, type ConflictResolution as SyncConflictResolution, type SyncError, SyncManager, type SyncManagerOptions, type SyncOptions, type SyncResult, type SyncState, type SyncStatus, type TaxonomyNode, type UpstreamUpdate, VERSION, type VersionChanges, type VersionDiff, ViewRenderer, type ViewRendererConfig, builtInProfiles, bumpVersion, codeReviewProfile, combineHandlers, compareVersions, conditionalHook, createAgentsGenerator, createAgentsParser, createAgentsSync, createBackupHook, createConflictStore, createDefaultSyncConfig, createFederationManager, createGitSyncAdapter, createLoggingHook, createSaveValidationHook, createSkillBank, createSkillMerger, createSyncManager, debuggingProfile, devopsProfile, discoverSkills, documentationProfile, formatVersion, generateAgentsMd, getBuiltInProfile, getLatestVersion, hasSkilltreeDir, hookRegistry, implementationProfile, importFromAgentsMd, inferBumpType, isValidVersion, listBuiltInProfiles, migrateStorage, parseVersion, refactoringProfile, satisfiesRange, securityProfile, sortVersions, testingProfile, writeAgentsMd };
|
|
5094
|
+
export { type AgentConfig, AgentsGenerator, type AgentsGeneratorConfig, AgentsParser, AgentsSync, type BaseHookContext, type BedrockEmbeddingConfig, BedrockEmbeddingProvider, type BedrockRerankConfig, BedrockRerankProvider, type BumpType, CachedStorageAdapter, type CachedStorageConfig, type CachingEmbeddingConfig, CachingEmbeddingProvider, CatalogRenderer, type CatalogRendererConfig, type ConfidenceThresholds, type ConflictConfig, type ConflictResolution$1 as ConflictResolution, ConflictStore, type ConflictStrategy, DEFAULT_AGENTS_CONFIG, DEFAULT_FIELD_WEIGHTS, DEFAULT_SKILLNET_API, type DecisionMetrics, type DisclosureEvent, type DisclosureTrace, type DiscoveredSkill, type EmbeddingProvider, type EvictionStrategy, type ExpandTrigger, type ExpandTriggerConfig, type FederatedRemoteConfig, type FederationEvent, type FederationEventHandler, FederationManager, type FederationManagerOptions, FeedbackRecorder, type FetchLike, type FetchResult, type FieldWeights, FilesystemStorageAdapter, type FilesystemStorageConfig, type ForkOptions, type FoundSkillMd, type FusionStrategy, GitSyncAdapter, type GitSyncAdapterOptions, type SyncResult$1 as GitSyncResult, type GraphServerConfig, type HookContext, type HookEvent, type HookExecutionResult, type HookHandler, type HookPriority, HookRegistry, type HookResult, type HybridRetrievalOptions, type ImportMode, type ImportOptions, type ImportResult, type IndexResult, IndexerService, type IndexerServiceConfig, type SkillSource as IndexerSkillSource, type IndexerStats, LineageTracker, type LineageTree, LoadoutCompiler, type LoadoutCompilerConfig, type LoadoutCriteria, type LoadoutSource, type LoadoutState, type LoadoutView, type LocalImportResult, type LogisticUtilityConfig, LogisticUtilityScorer, type MaterializationConfig, Materializer, MemoryStorageAdapter, type MergeConfig, type MergeConflict, type MergePreview, type MergeResult, type MergeStrategy, type MergeSuggestion, type MigrationOptions, type MigrationProgressItem, type MigrationResult, type NewVersionOptions, type OutcomeCandidate, type ParsedAgentSkill, type ParsedAgentsFile, type ParsedSkillMd, type ParsedVersion, type ProjectContext, ProjectDetector, type PullOptions, type PullUpstreamOptions, type PullUpstreamResult, type PushOptions, type RegisterHookOptions, type RegisteredHook, type RelationshipResult, type RemoteConfig, RemoteManager, type RemoteState, RemoteStore, type RerankCandidate, type RerankProvider, type RerankResult, type RollbackOptions, type SageMakerEmbeddingConfig, SageMakerEmbeddingProvider, type ScoredSkill, type ScrapeResult, type ServingEvent, type ServingEventHandler, type ShareOptions, type ShareResult, type Skill, type SkillAccessControl, SkillBank, type SkillBankConfig, type SkillBankStats, type SkillChange, type SkillConflict, type SkillCrudHookContext, type SkillDiffChanges, type SkillFilter, type SkillFork, type SkillFormat, type SkillFromMdOptions, type SkillFromMdResult, SkillGraphServer, type SkillLineage, type SkillMergeResult, SkillMerger, type SkillNamespace, SkillNetClient, type SkillNetClientConfig, type SkillNetConversionResult, type SkillNetImportResult, type SkillNetSearchOptions, type SkillNetSearchResult, type SkillScope, type SkillSelector, type SkillServingMetadata, type SkillSource$1 as SkillSource, type SkillState, type SkillStatus, type SkillSummary, type SkillSyncState, type SkillTreeEvent, type SkillTreeEventHandler, type SkillUpstream, type SkillVersion, type SkillVisibility, type StorageAdapter, type StorageConfig, type StorageHookContext, type SyncBehaviorConfig, type SyncConfig, type ConflictResolution as SyncConflictResolution, type SyncError, SyncManager, type SyncManagerOptions, type SyncOptions, type SyncResult, type SyncState, type SyncStatus, type TaskOutcome, type TaxonomyNode, TelemetryCollector, type UpstreamUpdate, type UtilityExample, type UtilityFeatures, type UtilityScorer, type UtilityTrainReport, VERSION, type VersionChanges, type VersionDiff, ViewRenderer, type ViewRendererConfig, bm25Scores, builtInProfiles, bumpVersion, codeReviewProfile, combineHandlers, compareVersions, computeDecisionMetrics, conditionalHook, cosineSimilarity, createAgentsGenerator, createAgentsParser, createAgentsSync, createBackupHook, createConflictStore, createDefaultSyncConfig, createFederationManager, createGitSyncAdapter, createLoggingHook, createSaveValidationHook, createSkillBank, createSkillMerger, createSkillNetClient, createSyncManager, debuggingProfile, devopsProfile, discoverSkills, documentationProfile, findSkillMdFiles, formatVersion, generateAgentsMd, getBuiltInProfile, getLatestVersion, hasSkilltreeDir, hookRegistry, implementationProfile, importFromAgentsMd, importLocalSkillDir, importSkillMdFile, inferBumpType, isValidVersion, listBuiltInProfiles, migrateStorage, parseGitHubUrl, parseSkillMd, parseVersion, reciprocalRankFusion, refactoringProfile, satisfiesRange, scoreSkillRelevance, scoreSkillsHybrid, securityProfile, skillFromSkillMd, slugify, sortVersions, splitFrontmatter, termSimilarity, testingProfile, tokenize, tokenizeList, writeAgentsMd };
|