bilmem 0.1.0 → 0.2.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 +163 -20
- package/dist/{canonical-CglQQ0xc.d.ts → canonical-JS6HUWGc.d.ts} +24 -1
- package/dist/cli/index.js +1433 -200
- package/dist/cli/index.js.map +1 -1
- package/dist/core/index.d.ts +52 -5
- package/dist/core/index.js +623 -1
- package/dist/core/index.js.map +1 -1
- package/dist/{filesystem-B3qAej0l.d.ts → filesystem-CrAkhr85.d.ts} +1 -1
- package/dist/index.d.ts +15 -9
- package/dist/index.js +1451 -303
- package/dist/index.js.map +1 -1
- package/dist/install/index.d.ts +59 -3
- package/dist/install/index.js +1245 -111
- package/dist/install/index.js.map +1 -1
- package/dist/jev/index.d.ts +1 -1
- package/dist/mcp/index.d.ts +12 -1
- package/dist/mcp/index.js +846 -97
- package/dist/mcp/index.js.map +1 -1
- package/dist/rules/index.d.ts +2 -2
- package/dist/rules/index.js.map +1 -1
- package/dist/scanner/index.d.ts +2 -2
- package/dist/scanner/index.js +6 -1
- package/dist/scanner/index.js.map +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/stats/index.d.ts +3 -3
- package/dist/stats/index.js +45 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +6 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/{types-Nxq5Gzay.d.ts → types-DNlvHsj9.d.ts} +120 -3
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* A lightweight, language-independent knowledge and learning runtime for AI agents.
|
|
4
4
|
*/
|
|
5
5
|
type Scope = 'global' | 'user' | 'organization' | 'project' | string;
|
|
6
|
-
type KnowledgeType = 'lesson' | 'fact' | 'decision' | 'convention' | 'rule' | 'architecture' | 'question' | 'failure' | 'heuristic';
|
|
6
|
+
type KnowledgeType = 'lesson' | 'fact' | 'decision' | 'convention' | 'rule' | 'architecture' | 'question' | 'failure' | 'heuristic' | 'unknown';
|
|
7
7
|
type KnowledgeStatus = 'active' | 'candidate' | 'probation' | 'needs_revalidation' | 'stale' | 'contradicted' | 'superseded' | 'invalid' | 'invalidated';
|
|
8
8
|
type KnowledgeStage = 'candidate' | 'probation' | 'active';
|
|
9
9
|
type ConfidenceTier = 'low' | 'medium' | 'high';
|
|
@@ -116,6 +116,11 @@ interface Knowledge {
|
|
|
116
116
|
outcomesSummary?: KnowledgeOutcomesSummary;
|
|
117
117
|
history?: KnowledgeHistoryEntry[];
|
|
118
118
|
value?: number;
|
|
119
|
+
lesson?: string;
|
|
120
|
+
failure_details?: Record<string, unknown>;
|
|
121
|
+
context?: Record<string, unknown>;
|
|
122
|
+
contradicts?: string[];
|
|
123
|
+
blocking?: boolean;
|
|
119
124
|
createdAt: string;
|
|
120
125
|
updatedAt: string;
|
|
121
126
|
}
|
|
@@ -124,7 +129,7 @@ interface Knowledge {
|
|
|
124
129
|
*/
|
|
125
130
|
type ResolutionState = 'KNOWN' | 'PARTIALLY_KNOWN' | 'UNKNOWN' | 'CONFLICTED' | 'STALE';
|
|
126
131
|
type ResolutionReason = 'NOT_OBSERVED' | 'INSUFFICIENT_EVIDENCE' | 'CONFLICTING_EVIDENCE' | 'STALE_EVIDENCE' | 'UNRESOLVABLE_LOCALLY' | 'CONTEXT_MISMATCH';
|
|
127
|
-
type ActionType = 'USE_KNOWLEDGE' | 'INSPECT_FILE' | 'INSPECT_SYMBOL' | 'INSPECT_TEST' | 'SEARCH_REPOSITORY' | 'CHECK_GIT' | 'CHECK_DOCUMENTATION' | 'ASK_USER' | 'STOP';
|
|
132
|
+
type ActionType = 'USE_KNOWLEDGE' | 'REVALIDATE' | 'INSPECT_FILE' | 'INSPECT_SYMBOL' | 'INSPECT_TEST' | 'SEARCH_REPOSITORY' | 'CHECK_GIT' | 'CHECK_DOCUMENTATION' | 'ASK_USER' | 'STOP';
|
|
128
133
|
interface NextEvidenceAction {
|
|
129
134
|
type: ActionType;
|
|
130
135
|
target?: string;
|
|
@@ -182,6 +187,114 @@ interface ResolutionResult {
|
|
|
182
187
|
};
|
|
183
188
|
receiptId?: string;
|
|
184
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Preflight readiness classification:
|
|
192
|
+
* Answers "What must I know before I start this work?"
|
|
193
|
+
*/
|
|
194
|
+
type ReadinessStatus = 'READY' | 'NEEDS_CLARIFICATION' | 'NEEDS_REVALIDATION' | 'CONFLICTED' | 'INSUFFICIENT_KNOWLEDGE';
|
|
195
|
+
type UnknownClassification = 'BLOCKING' | 'IMPORTANT' | 'NON_BLOCKING';
|
|
196
|
+
interface PreflightUnknown {
|
|
197
|
+
id: string;
|
|
198
|
+
statement?: string;
|
|
199
|
+
question?: string;
|
|
200
|
+
classification: UnknownClassification;
|
|
201
|
+
blocking: boolean;
|
|
202
|
+
reason?: string;
|
|
203
|
+
}
|
|
204
|
+
interface PreflightConstraint {
|
|
205
|
+
id: string;
|
|
206
|
+
statement: string;
|
|
207
|
+
type?: KnowledgeType;
|
|
208
|
+
confidence?: number;
|
|
209
|
+
confidenceTier?: ConfidenceTier;
|
|
210
|
+
source?: string;
|
|
211
|
+
}
|
|
212
|
+
interface PreflightLesson {
|
|
213
|
+
id: string;
|
|
214
|
+
statement: string;
|
|
215
|
+
confidence?: number;
|
|
216
|
+
domain?: string;
|
|
217
|
+
evidence?: string[];
|
|
218
|
+
}
|
|
219
|
+
interface PreflightFailure {
|
|
220
|
+
id: string;
|
|
221
|
+
statement: string;
|
|
222
|
+
context?: {
|
|
223
|
+
positive?: string[];
|
|
224
|
+
negative?: string[];
|
|
225
|
+
};
|
|
226
|
+
failure?: string;
|
|
227
|
+
lesson?: string;
|
|
228
|
+
evidence?: string[];
|
|
229
|
+
}
|
|
230
|
+
interface PreflightStale {
|
|
231
|
+
id: string;
|
|
232
|
+
statement: string;
|
|
233
|
+
reason: string;
|
|
234
|
+
changedSources?: string[];
|
|
235
|
+
}
|
|
236
|
+
interface PreflightMissing {
|
|
237
|
+
type: 'evidence' | 'decision';
|
|
238
|
+
subject: string;
|
|
239
|
+
question?: string;
|
|
240
|
+
reason: string;
|
|
241
|
+
}
|
|
242
|
+
interface PreflightQuestion {
|
|
243
|
+
question: string;
|
|
244
|
+
reason: string;
|
|
245
|
+
targetTopic?: string;
|
|
246
|
+
expectedResolutionValue?: number;
|
|
247
|
+
interactionCost?: number;
|
|
248
|
+
priorityScore?: number;
|
|
249
|
+
}
|
|
250
|
+
interface PreflightKnowledgeImpact {
|
|
251
|
+
relevantKnowledge: number;
|
|
252
|
+
validated: number;
|
|
253
|
+
needsRevalidation: number;
|
|
254
|
+
conflicted: number;
|
|
255
|
+
blockingUnknowns: number;
|
|
256
|
+
relevantFailures: number;
|
|
257
|
+
}
|
|
258
|
+
interface PreflightAlreadyInvestigated {
|
|
259
|
+
source: string;
|
|
260
|
+
result: string;
|
|
261
|
+
nextSuggestion?: string;
|
|
262
|
+
}
|
|
263
|
+
interface PreflightOptions {
|
|
264
|
+
goal: string;
|
|
265
|
+
positive?: string[];
|
|
266
|
+
negative?: string[];
|
|
267
|
+
scope?: Scope;
|
|
268
|
+
deep?: boolean;
|
|
269
|
+
maxCandidates?: number;
|
|
270
|
+
}
|
|
271
|
+
interface PreflightResult {
|
|
272
|
+
goal: string;
|
|
273
|
+
readiness: ReadinessStatus;
|
|
274
|
+
known: Array<{
|
|
275
|
+
id: string;
|
|
276
|
+
statement: string;
|
|
277
|
+
confidence: number | string;
|
|
278
|
+
confidenceTier?: ConfidenceTier;
|
|
279
|
+
stage?: KnowledgeStage;
|
|
280
|
+
}>;
|
|
281
|
+
constraints: PreflightConstraint[];
|
|
282
|
+
lessons: PreflightLesson[];
|
|
283
|
+
past_failures: PreflightFailure[];
|
|
284
|
+
unknowns: PreflightUnknown[];
|
|
285
|
+
stale: PreflightStale[];
|
|
286
|
+
missing: PreflightMissing[];
|
|
287
|
+
questions: PreflightQuestion[];
|
|
288
|
+
likely_domains: string[];
|
|
289
|
+
similar_work?: Array<{
|
|
290
|
+
topic: string;
|
|
291
|
+
lesson?: string;
|
|
292
|
+
failure?: string;
|
|
293
|
+
}>;
|
|
294
|
+
already_investigated?: PreflightAlreadyInvestigated[];
|
|
295
|
+
knowledge_impact: PreflightKnowledgeImpact;
|
|
296
|
+
next: NextEvidenceAction[];
|
|
297
|
+
}
|
|
185
298
|
/**
|
|
186
299
|
* First-class Unknown representation.
|
|
187
300
|
*/
|
|
@@ -197,6 +310,10 @@ interface UnknownRecord {
|
|
|
197
310
|
state: UnknownState;
|
|
198
311
|
reason?: UnknownReason;
|
|
199
312
|
statement?: string;
|
|
313
|
+
question?: string;
|
|
314
|
+
blocking?: boolean;
|
|
315
|
+
positive?: string[];
|
|
316
|
+
negative?: string[];
|
|
200
317
|
checked: string[];
|
|
201
318
|
next?: UnknownNextAction;
|
|
202
319
|
scope: Scope;
|
|
@@ -387,4 +504,4 @@ interface RevisionSnapshot {
|
|
|
387
504
|
changesSummary?: string;
|
|
388
505
|
}
|
|
389
506
|
|
|
390
|
-
export type { ActionType as A, BilmemConfig as B, ConfidenceTier as C,
|
|
507
|
+
export type { TrajectoryEventType as $, ActionType as A, BilmemConfig as B, ConfidenceTier as C, PreflightUnknown as D, EvaluatedRule as E, ReadinessStatus as F, ReconciliationAction as G, ReconciliationResult as H, InvestigationReceipt as I, JevResult as J, Knowledge as K, RelationType as L, ResolutionReason as M, NextEvidenceAction as N, OutcomeType as O, Provenance as P, ResolutionState as Q, ResolveOptions as R, Scope as S, TaskTrajectory as T, UnknownRecord as U, RevisionSnapshot as V, RuleCondition as W, RuleDefinition as X, RuleSet as Y, TemporalMetadata as Z, TrajectoryEvent as _, ResolutionResult as a, UnknownClassification as a0, UnknownNextAction as a1, UnknownReason as a2, UnknownState as a3, PreflightOptions as b, PreflightResult as c, BilmemMetrics as d, Evidence as e, EvidenceRelation as f, JevExplanation as g, JevMatchStatus as h, KnowledgeBudgetConfig as i, KnowledgeDiff as j, KnowledgeHistoryEntry as k, KnowledgeMetrics as l, KnowledgeOutcomesSummary as m, KnowledgeStage as n, KnowledgeStatus as o, KnowledgeType as p, Observation as q, OutcomeRecord as r, PreflightAlreadyInvestigated as s, PreflightConstraint as t, PreflightFailure as u, PreflightKnowledgeImpact as v, PreflightLesson as w, PreflightMissing as x, PreflightQuestion as y, PreflightStale as z };
|