@kmmao/happy-wire 0.4.2 → 0.6.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/dist/index.cjs +179 -0
- package/dist/index.d.cts +317 -2
- package/dist/index.d.mts +317 -2
- package/dist/index.mjs +162 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -395,6 +395,167 @@ const DaemonStateSchema = z__namespace.object({
|
|
|
395
395
|
tunnels: TunnelStateSchema.optional()
|
|
396
396
|
});
|
|
397
397
|
|
|
398
|
+
const KnowledgeEntryTypeSchema = z__namespace.enum([
|
|
399
|
+
"discovery",
|
|
400
|
+
// New insight or finding
|
|
401
|
+
"decision",
|
|
402
|
+
// Architecture / tech choice
|
|
403
|
+
"fix",
|
|
404
|
+
// Bug fix record
|
|
405
|
+
"convention",
|
|
406
|
+
// Code convention / process rule
|
|
407
|
+
"warning"
|
|
408
|
+
// Known pitfall or gotcha
|
|
409
|
+
]);
|
|
410
|
+
const KnowledgeContributorTypeSchema = z__namespace.enum([
|
|
411
|
+
"session",
|
|
412
|
+
// Auto-generated by Claude session
|
|
413
|
+
"supervisor",
|
|
414
|
+
// Generated by Supervisor analysis
|
|
415
|
+
"user"
|
|
416
|
+
// Manually added by user
|
|
417
|
+
]);
|
|
418
|
+
const KnowledgeActionSchema = z__namespace.enum([
|
|
419
|
+
"create",
|
|
420
|
+
// New entry
|
|
421
|
+
"amend",
|
|
422
|
+
// Correction / supplement
|
|
423
|
+
"supersede",
|
|
424
|
+
// Replace old knowledge
|
|
425
|
+
"verify"
|
|
426
|
+
// Confirm still valid
|
|
427
|
+
]);
|
|
428
|
+
const KnowledgeStatusSchema = z__namespace.enum([
|
|
429
|
+
"active",
|
|
430
|
+
// Currently valid
|
|
431
|
+
"superseded",
|
|
432
|
+
// Replaced by newer knowledge
|
|
433
|
+
"archived"
|
|
434
|
+
// Manually archived by user
|
|
435
|
+
]);
|
|
436
|
+
const KnowledgeConfidenceSchema = z__namespace.enum(["high", "medium", "low"]);
|
|
437
|
+
const CreateKnowledgeEntryBodySchema = z__namespace.object({
|
|
438
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
439
|
+
contributorType: KnowledgeContributorTypeSchema,
|
|
440
|
+
action: KnowledgeActionSchema,
|
|
441
|
+
title: z__namespace.string().min(1).max(200),
|
|
442
|
+
content: z__namespace.string().min(1),
|
|
443
|
+
// Structured SOAP-like fields (optional)
|
|
444
|
+
request: z__namespace.string().optional(),
|
|
445
|
+
// S: What the user asked
|
|
446
|
+
findings: z__namespace.string().optional(),
|
|
447
|
+
// O: What was discovered
|
|
448
|
+
analysis: z__namespace.string().optional(),
|
|
449
|
+
// A: Root cause / assessment
|
|
450
|
+
outcome: z__namespace.string().optional(),
|
|
451
|
+
// P: What was done
|
|
452
|
+
nextSteps: z__namespace.string().optional(),
|
|
453
|
+
// Follow-up suggestions
|
|
454
|
+
tags: z__namespace.array(z__namespace.string().max(50)).max(20).default([]),
|
|
455
|
+
confidence: KnowledgeConfidenceSchema.default("medium"),
|
|
456
|
+
sessionId: z__namespace.string().optional(),
|
|
457
|
+
model: z__namespace.string().optional(),
|
|
458
|
+
supersedesId: z__namespace.string().optional(),
|
|
459
|
+
relatedIds: z__namespace.array(z__namespace.string()).max(10).default([]),
|
|
460
|
+
affectedFiles: z__namespace.array(z__namespace.string()).max(50).default([])
|
|
461
|
+
});
|
|
462
|
+
const UpdateKnowledgeEntryBodySchema = z__namespace.object({
|
|
463
|
+
status: KnowledgeStatusSchema.optional(),
|
|
464
|
+
pinned: z__namespace.boolean().optional(),
|
|
465
|
+
title: z__namespace.string().min(1).max(200).optional(),
|
|
466
|
+
content: z__namespace.string().min(1).optional(),
|
|
467
|
+
tags: z__namespace.array(z__namespace.string().max(50)).max(20).optional(),
|
|
468
|
+
confidence: KnowledgeConfidenceSchema.optional()
|
|
469
|
+
});
|
|
470
|
+
const QueryKnowledgeParamsSchema = z__namespace.object({
|
|
471
|
+
entryType: KnowledgeEntryTypeSchema.optional(),
|
|
472
|
+
status: KnowledgeStatusSchema.optional(),
|
|
473
|
+
tags: z__namespace.array(z__namespace.string()).optional(),
|
|
474
|
+
search: z__namespace.string().optional(),
|
|
475
|
+
limit: z__namespace.number().int().min(1).max(100).default(20),
|
|
476
|
+
offset: z__namespace.number().int().min(0).default(0)
|
|
477
|
+
});
|
|
478
|
+
const ProjectProfileSchema = z__namespace.object({
|
|
479
|
+
techStack: z__namespace.array(z__namespace.string()),
|
|
480
|
+
architectureType: z__namespace.string().optional(),
|
|
481
|
+
knownPitfalls: z__namespace.array(z__namespace.string()),
|
|
482
|
+
coreConventions: z__namespace.array(z__namespace.string()),
|
|
483
|
+
lastUpdatedAt: z__namespace.number(),
|
|
484
|
+
lastUpdatedBy: z__namespace.string().optional()
|
|
485
|
+
});
|
|
486
|
+
const KnowledgeInjectionModeSchema = z__namespace.enum(["auto", "full", "minimal"]);
|
|
487
|
+
const KnowledgeInjectionRequestSchema = z__namespace.object({
|
|
488
|
+
mode: KnowledgeInjectionModeSchema,
|
|
489
|
+
contextHints: z__namespace.array(z__namespace.string()).optional()
|
|
490
|
+
// Keywords from user message for relevance
|
|
491
|
+
});
|
|
492
|
+
const KnowledgeInjectionResponseSchema = z__namespace.object({
|
|
493
|
+
profile: ProjectProfileSchema.nullable(),
|
|
494
|
+
entries: z__namespace.array(z__namespace.object({
|
|
495
|
+
id: z__namespace.string(),
|
|
496
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
497
|
+
title: z__namespace.string(),
|
|
498
|
+
content: z__namespace.string(),
|
|
499
|
+
tags: z__namespace.array(z__namespace.string()),
|
|
500
|
+
confidence: KnowledgeConfidenceSchema,
|
|
501
|
+
createdAt: z__namespace.string()
|
|
502
|
+
}))
|
|
503
|
+
});
|
|
504
|
+
const KnowledgeChainRelationSchema = z__namespace.object({
|
|
505
|
+
from: z__namespace.string(),
|
|
506
|
+
to: z__namespace.string(),
|
|
507
|
+
type: z__namespace.enum(["supersedes", "related"])
|
|
508
|
+
});
|
|
509
|
+
const KnowledgeChainEntrySchema = z__namespace.object({
|
|
510
|
+
id: z__namespace.string(),
|
|
511
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
512
|
+
action: KnowledgeActionSchema,
|
|
513
|
+
status: KnowledgeStatusSchema,
|
|
514
|
+
title: z__namespace.string(),
|
|
515
|
+
content: z__namespace.string(),
|
|
516
|
+
tags: z__namespace.array(z__namespace.string()),
|
|
517
|
+
confidence: KnowledgeConfidenceSchema,
|
|
518
|
+
supersedesId: z__namespace.string().nullable(),
|
|
519
|
+
createdAt: z__namespace.string()
|
|
520
|
+
});
|
|
521
|
+
const KnowledgeChainResponseSchema = z__namespace.object({
|
|
522
|
+
chain: z__namespace.array(KnowledgeChainEntrySchema),
|
|
523
|
+
relations: z__namespace.array(KnowledgeChainRelationSchema)
|
|
524
|
+
});
|
|
525
|
+
const CrossProjectSearchResultSchema = z__namespace.object({
|
|
526
|
+
id: z__namespace.string(),
|
|
527
|
+
projectId: z__namespace.string(),
|
|
528
|
+
projectPath: z__namespace.string(),
|
|
529
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
530
|
+
title: z__namespace.string(),
|
|
531
|
+
content: z__namespace.string(),
|
|
532
|
+
tags: z__namespace.array(z__namespace.string()),
|
|
533
|
+
confidence: KnowledgeConfidenceSchema,
|
|
534
|
+
similarity: z__namespace.number().optional(),
|
|
535
|
+
// Present when using semantic search
|
|
536
|
+
createdAt: z__namespace.string()
|
|
537
|
+
});
|
|
538
|
+
const CrossProjectSearchResponseSchema = z__namespace.object({
|
|
539
|
+
results: z__namespace.array(CrossProjectSearchResultSchema),
|
|
540
|
+
total: z__namespace.number()
|
|
541
|
+
});
|
|
542
|
+
const TurnKnowledgeExtractionSchema = z__namespace.object({
|
|
543
|
+
projectId: z__namespace.string(),
|
|
544
|
+
sessionId: z__namespace.string(),
|
|
545
|
+
model: z__namespace.string(),
|
|
546
|
+
turnId: z__namespace.string(),
|
|
547
|
+
turnData: z__namespace.object({
|
|
548
|
+
userMessage: z__namespace.string().max(2e3),
|
|
549
|
+
assistantText: z__namespace.string().max(5e3),
|
|
550
|
+
fileEdits: z__namespace.array(z__namespace.object({
|
|
551
|
+
path: z__namespace.string(),
|
|
552
|
+
type: z__namespace.enum(["create", "edit"])
|
|
553
|
+
})).max(50),
|
|
554
|
+
toolCallCount: z__namespace.number().int(),
|
|
555
|
+
outputTokens: z__namespace.number().int()
|
|
556
|
+
})
|
|
557
|
+
});
|
|
558
|
+
|
|
398
559
|
exports.AgentMessageSchema = AgentMessageSchema;
|
|
399
560
|
exports.ApiMessageSchema = ApiMessageSchema;
|
|
400
561
|
exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
|
|
@@ -402,11 +563,27 @@ exports.ApiUpdateNewMessageSchema = ApiUpdateNewMessageSchema;
|
|
|
402
563
|
exports.ApiUpdateSessionStateSchema = ApiUpdateSessionStateSchema;
|
|
403
564
|
exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
|
|
404
565
|
exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
|
|
566
|
+
exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
|
|
567
|
+
exports.CrossProjectSearchResponseSchema = CrossProjectSearchResponseSchema;
|
|
568
|
+
exports.CrossProjectSearchResultSchema = CrossProjectSearchResultSchema;
|
|
405
569
|
exports.DaemonStateSchema = DaemonStateSchema;
|
|
570
|
+
exports.KnowledgeActionSchema = KnowledgeActionSchema;
|
|
571
|
+
exports.KnowledgeChainEntrySchema = KnowledgeChainEntrySchema;
|
|
572
|
+
exports.KnowledgeChainRelationSchema = KnowledgeChainRelationSchema;
|
|
573
|
+
exports.KnowledgeChainResponseSchema = KnowledgeChainResponseSchema;
|
|
574
|
+
exports.KnowledgeConfidenceSchema = KnowledgeConfidenceSchema;
|
|
575
|
+
exports.KnowledgeContributorTypeSchema = KnowledgeContributorTypeSchema;
|
|
576
|
+
exports.KnowledgeEntryTypeSchema = KnowledgeEntryTypeSchema;
|
|
577
|
+
exports.KnowledgeInjectionModeSchema = KnowledgeInjectionModeSchema;
|
|
578
|
+
exports.KnowledgeInjectionRequestSchema = KnowledgeInjectionRequestSchema;
|
|
579
|
+
exports.KnowledgeInjectionResponseSchema = KnowledgeInjectionResponseSchema;
|
|
580
|
+
exports.KnowledgeStatusSchema = KnowledgeStatusSchema;
|
|
406
581
|
exports.LegacyMessageContentSchema = LegacyMessageContentSchema;
|
|
407
582
|
exports.MachineMetadataSchema = MachineMetadataSchema;
|
|
408
583
|
exports.MessageContentSchema = MessageContentSchema;
|
|
409
584
|
exports.MessageMetaSchema = MessageMetaSchema;
|
|
585
|
+
exports.ProjectProfileSchema = ProjectProfileSchema;
|
|
586
|
+
exports.QueryKnowledgeParamsSchema = QueryKnowledgeParamsSchema;
|
|
410
587
|
exports.SessionMessageContentSchema = SessionMessageContentSchema;
|
|
411
588
|
exports.SessionMessageSchema = SessionMessageSchema;
|
|
412
589
|
exports.SessionProtocolMessageSchema = SessionProtocolMessageSchema;
|
|
@@ -415,7 +592,9 @@ exports.TailscaleServeEntrySchema = TailscaleServeEntrySchema;
|
|
|
415
592
|
exports.TunnelEntrySchema = TunnelEntrySchema;
|
|
416
593
|
exports.TunnelProviderInfoSchema = TunnelProviderInfoSchema;
|
|
417
594
|
exports.TunnelStateSchema = TunnelStateSchema;
|
|
595
|
+
exports.TurnKnowledgeExtractionSchema = TurnKnowledgeExtractionSchema;
|
|
418
596
|
exports.UpdateBodySchema = UpdateBodySchema;
|
|
597
|
+
exports.UpdateKnowledgeEntryBodySchema = UpdateKnowledgeEntryBodySchema;
|
|
419
598
|
exports.UpdateMachineBodySchema = UpdateMachineBodySchema;
|
|
420
599
|
exports.UpdateNewMessageBodySchema = UpdateNewMessageBodySchema;
|
|
421
600
|
exports.UpdateSchema = UpdateSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -1401,5 +1401,320 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1401
1401
|
}, z.core.$strip>;
|
|
1402
1402
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1403
1403
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1404
|
+
declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
|
|
1405
|
+
discovery: "discovery";
|
|
1406
|
+
decision: "decision";
|
|
1407
|
+
fix: "fix";
|
|
1408
|
+
convention: "convention";
|
|
1409
|
+
warning: "warning";
|
|
1410
|
+
}>;
|
|
1411
|
+
type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
|
|
1412
|
+
declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
|
|
1413
|
+
user: "user";
|
|
1414
|
+
session: "session";
|
|
1415
|
+
supervisor: "supervisor";
|
|
1416
|
+
}>;
|
|
1417
|
+
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
1418
|
+
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
1419
|
+
create: "create";
|
|
1420
|
+
amend: "amend";
|
|
1421
|
+
supersede: "supersede";
|
|
1422
|
+
verify: "verify";
|
|
1423
|
+
}>;
|
|
1424
|
+
type KnowledgeAction = z.infer<typeof KnowledgeActionSchema>;
|
|
1425
|
+
declare const KnowledgeStatusSchema: z.ZodEnum<{
|
|
1426
|
+
active: "active";
|
|
1427
|
+
superseded: "superseded";
|
|
1428
|
+
archived: "archived";
|
|
1429
|
+
}>;
|
|
1430
|
+
type KnowledgeStatus = z.infer<typeof KnowledgeStatusSchema>;
|
|
1431
|
+
declare const KnowledgeConfidenceSchema: z.ZodEnum<{
|
|
1432
|
+
high: "high";
|
|
1433
|
+
medium: "medium";
|
|
1434
|
+
low: "low";
|
|
1435
|
+
}>;
|
|
1436
|
+
type KnowledgeConfidence = z.infer<typeof KnowledgeConfidenceSchema>;
|
|
1437
|
+
declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
1438
|
+
entryType: z.ZodEnum<{
|
|
1439
|
+
discovery: "discovery";
|
|
1440
|
+
decision: "decision";
|
|
1441
|
+
fix: "fix";
|
|
1442
|
+
convention: "convention";
|
|
1443
|
+
warning: "warning";
|
|
1444
|
+
}>;
|
|
1445
|
+
contributorType: z.ZodEnum<{
|
|
1446
|
+
user: "user";
|
|
1447
|
+
session: "session";
|
|
1448
|
+
supervisor: "supervisor";
|
|
1449
|
+
}>;
|
|
1450
|
+
action: z.ZodEnum<{
|
|
1451
|
+
create: "create";
|
|
1452
|
+
amend: "amend";
|
|
1453
|
+
supersede: "supersede";
|
|
1454
|
+
verify: "verify";
|
|
1455
|
+
}>;
|
|
1456
|
+
title: z.ZodString;
|
|
1457
|
+
content: z.ZodString;
|
|
1458
|
+
request: z.ZodOptional<z.ZodString>;
|
|
1459
|
+
findings: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
analysis: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
outcome: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
nextSteps: z.ZodOptional<z.ZodString>;
|
|
1463
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1464
|
+
confidence: z.ZodDefault<z.ZodEnum<{
|
|
1465
|
+
high: "high";
|
|
1466
|
+
medium: "medium";
|
|
1467
|
+
low: "low";
|
|
1468
|
+
}>>;
|
|
1469
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1470
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1471
|
+
supersedesId: z.ZodOptional<z.ZodString>;
|
|
1472
|
+
relatedIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1473
|
+
affectedFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1474
|
+
}, z.core.$strip>;
|
|
1475
|
+
type CreateKnowledgeEntryBody = z.infer<typeof CreateKnowledgeEntryBodySchema>;
|
|
1476
|
+
declare const UpdateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
1477
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1478
|
+
active: "active";
|
|
1479
|
+
superseded: "superseded";
|
|
1480
|
+
archived: "archived";
|
|
1481
|
+
}>>;
|
|
1482
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
1483
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
content: z.ZodOptional<z.ZodString>;
|
|
1485
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1486
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
1487
|
+
high: "high";
|
|
1488
|
+
medium: "medium";
|
|
1489
|
+
low: "low";
|
|
1490
|
+
}>>;
|
|
1491
|
+
}, z.core.$strip>;
|
|
1492
|
+
type UpdateKnowledgeEntryBody = z.infer<typeof UpdateKnowledgeEntryBodySchema>;
|
|
1493
|
+
declare const QueryKnowledgeParamsSchema: z.ZodObject<{
|
|
1494
|
+
entryType: z.ZodOptional<z.ZodEnum<{
|
|
1495
|
+
discovery: "discovery";
|
|
1496
|
+
decision: "decision";
|
|
1497
|
+
fix: "fix";
|
|
1498
|
+
convention: "convention";
|
|
1499
|
+
warning: "warning";
|
|
1500
|
+
}>>;
|
|
1501
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1502
|
+
active: "active";
|
|
1503
|
+
superseded: "superseded";
|
|
1504
|
+
archived: "archived";
|
|
1505
|
+
}>>;
|
|
1506
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1507
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
1509
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
1510
|
+
}, z.core.$strip>;
|
|
1511
|
+
type QueryKnowledgeParams = z.infer<typeof QueryKnowledgeParamsSchema>;
|
|
1512
|
+
declare const ProjectProfileSchema: z.ZodObject<{
|
|
1513
|
+
techStack: z.ZodArray<z.ZodString>;
|
|
1514
|
+
architectureType: z.ZodOptional<z.ZodString>;
|
|
1515
|
+
knownPitfalls: z.ZodArray<z.ZodString>;
|
|
1516
|
+
coreConventions: z.ZodArray<z.ZodString>;
|
|
1517
|
+
lastUpdatedAt: z.ZodNumber;
|
|
1518
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
1519
|
+
}, z.core.$strip>;
|
|
1520
|
+
type ProjectProfile = z.infer<typeof ProjectProfileSchema>;
|
|
1521
|
+
declare const KnowledgeInjectionModeSchema: z.ZodEnum<{
|
|
1522
|
+
auto: "auto";
|
|
1523
|
+
full: "full";
|
|
1524
|
+
minimal: "minimal";
|
|
1525
|
+
}>;
|
|
1526
|
+
type KnowledgeInjectionMode = z.infer<typeof KnowledgeInjectionModeSchema>;
|
|
1527
|
+
declare const KnowledgeInjectionRequestSchema: z.ZodObject<{
|
|
1528
|
+
mode: z.ZodEnum<{
|
|
1529
|
+
auto: "auto";
|
|
1530
|
+
full: "full";
|
|
1531
|
+
minimal: "minimal";
|
|
1532
|
+
}>;
|
|
1533
|
+
contextHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1534
|
+
}, z.core.$strip>;
|
|
1535
|
+
type KnowledgeInjectionRequest = z.infer<typeof KnowledgeInjectionRequestSchema>;
|
|
1536
|
+
declare const KnowledgeInjectionResponseSchema: z.ZodObject<{
|
|
1537
|
+
profile: z.ZodNullable<z.ZodObject<{
|
|
1538
|
+
techStack: z.ZodArray<z.ZodString>;
|
|
1539
|
+
architectureType: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
knownPitfalls: z.ZodArray<z.ZodString>;
|
|
1541
|
+
coreConventions: z.ZodArray<z.ZodString>;
|
|
1542
|
+
lastUpdatedAt: z.ZodNumber;
|
|
1543
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
1544
|
+
}, z.core.$strip>>;
|
|
1545
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1546
|
+
id: z.ZodString;
|
|
1547
|
+
entryType: z.ZodEnum<{
|
|
1548
|
+
discovery: "discovery";
|
|
1549
|
+
decision: "decision";
|
|
1550
|
+
fix: "fix";
|
|
1551
|
+
convention: "convention";
|
|
1552
|
+
warning: "warning";
|
|
1553
|
+
}>;
|
|
1554
|
+
title: z.ZodString;
|
|
1555
|
+
content: z.ZodString;
|
|
1556
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1557
|
+
confidence: z.ZodEnum<{
|
|
1558
|
+
high: "high";
|
|
1559
|
+
medium: "medium";
|
|
1560
|
+
low: "low";
|
|
1561
|
+
}>;
|
|
1562
|
+
createdAt: z.ZodString;
|
|
1563
|
+
}, z.core.$strip>>;
|
|
1564
|
+
}, z.core.$strip>;
|
|
1565
|
+
type KnowledgeInjectionResponse = z.infer<typeof KnowledgeInjectionResponseSchema>;
|
|
1566
|
+
declare const KnowledgeChainRelationSchema: z.ZodObject<{
|
|
1567
|
+
from: z.ZodString;
|
|
1568
|
+
to: z.ZodString;
|
|
1569
|
+
type: z.ZodEnum<{
|
|
1570
|
+
supersedes: "supersedes";
|
|
1571
|
+
related: "related";
|
|
1572
|
+
}>;
|
|
1573
|
+
}, z.core.$strip>;
|
|
1574
|
+
type KnowledgeChainRelation = z.infer<typeof KnowledgeChainRelationSchema>;
|
|
1575
|
+
declare const KnowledgeChainEntrySchema: z.ZodObject<{
|
|
1576
|
+
id: z.ZodString;
|
|
1577
|
+
entryType: z.ZodEnum<{
|
|
1578
|
+
discovery: "discovery";
|
|
1579
|
+
decision: "decision";
|
|
1580
|
+
fix: "fix";
|
|
1581
|
+
convention: "convention";
|
|
1582
|
+
warning: "warning";
|
|
1583
|
+
}>;
|
|
1584
|
+
action: z.ZodEnum<{
|
|
1585
|
+
create: "create";
|
|
1586
|
+
amend: "amend";
|
|
1587
|
+
supersede: "supersede";
|
|
1588
|
+
verify: "verify";
|
|
1589
|
+
}>;
|
|
1590
|
+
status: z.ZodEnum<{
|
|
1591
|
+
active: "active";
|
|
1592
|
+
superseded: "superseded";
|
|
1593
|
+
archived: "archived";
|
|
1594
|
+
}>;
|
|
1595
|
+
title: z.ZodString;
|
|
1596
|
+
content: z.ZodString;
|
|
1597
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1598
|
+
confidence: z.ZodEnum<{
|
|
1599
|
+
high: "high";
|
|
1600
|
+
medium: "medium";
|
|
1601
|
+
low: "low";
|
|
1602
|
+
}>;
|
|
1603
|
+
supersedesId: z.ZodNullable<z.ZodString>;
|
|
1604
|
+
createdAt: z.ZodString;
|
|
1605
|
+
}, z.core.$strip>;
|
|
1606
|
+
type KnowledgeChainEntry = z.infer<typeof KnowledgeChainEntrySchema>;
|
|
1607
|
+
declare const KnowledgeChainResponseSchema: z.ZodObject<{
|
|
1608
|
+
chain: z.ZodArray<z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
entryType: z.ZodEnum<{
|
|
1611
|
+
discovery: "discovery";
|
|
1612
|
+
decision: "decision";
|
|
1613
|
+
fix: "fix";
|
|
1614
|
+
convention: "convention";
|
|
1615
|
+
warning: "warning";
|
|
1616
|
+
}>;
|
|
1617
|
+
action: z.ZodEnum<{
|
|
1618
|
+
create: "create";
|
|
1619
|
+
amend: "amend";
|
|
1620
|
+
supersede: "supersede";
|
|
1621
|
+
verify: "verify";
|
|
1622
|
+
}>;
|
|
1623
|
+
status: z.ZodEnum<{
|
|
1624
|
+
active: "active";
|
|
1625
|
+
superseded: "superseded";
|
|
1626
|
+
archived: "archived";
|
|
1627
|
+
}>;
|
|
1628
|
+
title: z.ZodString;
|
|
1629
|
+
content: z.ZodString;
|
|
1630
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1631
|
+
confidence: z.ZodEnum<{
|
|
1632
|
+
high: "high";
|
|
1633
|
+
medium: "medium";
|
|
1634
|
+
low: "low";
|
|
1635
|
+
}>;
|
|
1636
|
+
supersedesId: z.ZodNullable<z.ZodString>;
|
|
1637
|
+
createdAt: z.ZodString;
|
|
1638
|
+
}, z.core.$strip>>;
|
|
1639
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
1640
|
+
from: z.ZodString;
|
|
1641
|
+
to: z.ZodString;
|
|
1642
|
+
type: z.ZodEnum<{
|
|
1643
|
+
supersedes: "supersedes";
|
|
1644
|
+
related: "related";
|
|
1645
|
+
}>;
|
|
1646
|
+
}, z.core.$strip>>;
|
|
1647
|
+
}, z.core.$strip>;
|
|
1648
|
+
type KnowledgeChainResponse = z.infer<typeof KnowledgeChainResponseSchema>;
|
|
1649
|
+
declare const CrossProjectSearchResultSchema: z.ZodObject<{
|
|
1650
|
+
id: z.ZodString;
|
|
1651
|
+
projectId: z.ZodString;
|
|
1652
|
+
projectPath: z.ZodString;
|
|
1653
|
+
entryType: z.ZodEnum<{
|
|
1654
|
+
discovery: "discovery";
|
|
1655
|
+
decision: "decision";
|
|
1656
|
+
fix: "fix";
|
|
1657
|
+
convention: "convention";
|
|
1658
|
+
warning: "warning";
|
|
1659
|
+
}>;
|
|
1660
|
+
title: z.ZodString;
|
|
1661
|
+
content: z.ZodString;
|
|
1662
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1663
|
+
confidence: z.ZodEnum<{
|
|
1664
|
+
high: "high";
|
|
1665
|
+
medium: "medium";
|
|
1666
|
+
low: "low";
|
|
1667
|
+
}>;
|
|
1668
|
+
similarity: z.ZodOptional<z.ZodNumber>;
|
|
1669
|
+
createdAt: z.ZodString;
|
|
1670
|
+
}, z.core.$strip>;
|
|
1671
|
+
type CrossProjectSearchResult = z.infer<typeof CrossProjectSearchResultSchema>;
|
|
1672
|
+
declare const CrossProjectSearchResponseSchema: z.ZodObject<{
|
|
1673
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1674
|
+
id: z.ZodString;
|
|
1675
|
+
projectId: z.ZodString;
|
|
1676
|
+
projectPath: z.ZodString;
|
|
1677
|
+
entryType: z.ZodEnum<{
|
|
1678
|
+
discovery: "discovery";
|
|
1679
|
+
decision: "decision";
|
|
1680
|
+
fix: "fix";
|
|
1681
|
+
convention: "convention";
|
|
1682
|
+
warning: "warning";
|
|
1683
|
+
}>;
|
|
1684
|
+
title: z.ZodString;
|
|
1685
|
+
content: z.ZodString;
|
|
1686
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1687
|
+
confidence: z.ZodEnum<{
|
|
1688
|
+
high: "high";
|
|
1689
|
+
medium: "medium";
|
|
1690
|
+
low: "low";
|
|
1691
|
+
}>;
|
|
1692
|
+
similarity: z.ZodOptional<z.ZodNumber>;
|
|
1693
|
+
createdAt: z.ZodString;
|
|
1694
|
+
}, z.core.$strip>>;
|
|
1695
|
+
total: z.ZodNumber;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
type CrossProjectSearchResponse = z.infer<typeof CrossProjectSearchResponseSchema>;
|
|
1698
|
+
declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
|
|
1699
|
+
projectId: z.ZodString;
|
|
1700
|
+
sessionId: z.ZodString;
|
|
1701
|
+
model: z.ZodString;
|
|
1702
|
+
turnId: z.ZodString;
|
|
1703
|
+
turnData: z.ZodObject<{
|
|
1704
|
+
userMessage: z.ZodString;
|
|
1705
|
+
assistantText: z.ZodString;
|
|
1706
|
+
fileEdits: z.ZodArray<z.ZodObject<{
|
|
1707
|
+
path: z.ZodString;
|
|
1708
|
+
type: z.ZodEnum<{
|
|
1709
|
+
create: "create";
|
|
1710
|
+
edit: "edit";
|
|
1711
|
+
}>;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
toolCallCount: z.ZodNumber;
|
|
1714
|
+
outputTokens: z.ZodNumber;
|
|
1715
|
+
}, z.core.$strip>;
|
|
1716
|
+
}, z.core.$strip>;
|
|
1717
|
+
type TurnKnowledgeExtraction = z.infer<typeof TurnKnowledgeExtractionSchema>;
|
|
1718
|
+
|
|
1719
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1720
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
package/dist/index.d.mts
CHANGED
|
@@ -1401,5 +1401,320 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1401
1401
|
}, z.core.$strip>;
|
|
1402
1402
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1403
1403
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1404
|
+
declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
|
|
1405
|
+
discovery: "discovery";
|
|
1406
|
+
decision: "decision";
|
|
1407
|
+
fix: "fix";
|
|
1408
|
+
convention: "convention";
|
|
1409
|
+
warning: "warning";
|
|
1410
|
+
}>;
|
|
1411
|
+
type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
|
|
1412
|
+
declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
|
|
1413
|
+
user: "user";
|
|
1414
|
+
session: "session";
|
|
1415
|
+
supervisor: "supervisor";
|
|
1416
|
+
}>;
|
|
1417
|
+
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
1418
|
+
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
1419
|
+
create: "create";
|
|
1420
|
+
amend: "amend";
|
|
1421
|
+
supersede: "supersede";
|
|
1422
|
+
verify: "verify";
|
|
1423
|
+
}>;
|
|
1424
|
+
type KnowledgeAction = z.infer<typeof KnowledgeActionSchema>;
|
|
1425
|
+
declare const KnowledgeStatusSchema: z.ZodEnum<{
|
|
1426
|
+
active: "active";
|
|
1427
|
+
superseded: "superseded";
|
|
1428
|
+
archived: "archived";
|
|
1429
|
+
}>;
|
|
1430
|
+
type KnowledgeStatus = z.infer<typeof KnowledgeStatusSchema>;
|
|
1431
|
+
declare const KnowledgeConfidenceSchema: z.ZodEnum<{
|
|
1432
|
+
high: "high";
|
|
1433
|
+
medium: "medium";
|
|
1434
|
+
low: "low";
|
|
1435
|
+
}>;
|
|
1436
|
+
type KnowledgeConfidence = z.infer<typeof KnowledgeConfidenceSchema>;
|
|
1437
|
+
declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
1438
|
+
entryType: z.ZodEnum<{
|
|
1439
|
+
discovery: "discovery";
|
|
1440
|
+
decision: "decision";
|
|
1441
|
+
fix: "fix";
|
|
1442
|
+
convention: "convention";
|
|
1443
|
+
warning: "warning";
|
|
1444
|
+
}>;
|
|
1445
|
+
contributorType: z.ZodEnum<{
|
|
1446
|
+
user: "user";
|
|
1447
|
+
session: "session";
|
|
1448
|
+
supervisor: "supervisor";
|
|
1449
|
+
}>;
|
|
1450
|
+
action: z.ZodEnum<{
|
|
1451
|
+
create: "create";
|
|
1452
|
+
amend: "amend";
|
|
1453
|
+
supersede: "supersede";
|
|
1454
|
+
verify: "verify";
|
|
1455
|
+
}>;
|
|
1456
|
+
title: z.ZodString;
|
|
1457
|
+
content: z.ZodString;
|
|
1458
|
+
request: z.ZodOptional<z.ZodString>;
|
|
1459
|
+
findings: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
analysis: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
outcome: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
nextSteps: z.ZodOptional<z.ZodString>;
|
|
1463
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1464
|
+
confidence: z.ZodDefault<z.ZodEnum<{
|
|
1465
|
+
high: "high";
|
|
1466
|
+
medium: "medium";
|
|
1467
|
+
low: "low";
|
|
1468
|
+
}>>;
|
|
1469
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1470
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1471
|
+
supersedesId: z.ZodOptional<z.ZodString>;
|
|
1472
|
+
relatedIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1473
|
+
affectedFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1474
|
+
}, z.core.$strip>;
|
|
1475
|
+
type CreateKnowledgeEntryBody = z.infer<typeof CreateKnowledgeEntryBodySchema>;
|
|
1476
|
+
declare const UpdateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
1477
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1478
|
+
active: "active";
|
|
1479
|
+
superseded: "superseded";
|
|
1480
|
+
archived: "archived";
|
|
1481
|
+
}>>;
|
|
1482
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
1483
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
content: z.ZodOptional<z.ZodString>;
|
|
1485
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1486
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
1487
|
+
high: "high";
|
|
1488
|
+
medium: "medium";
|
|
1489
|
+
low: "low";
|
|
1490
|
+
}>>;
|
|
1491
|
+
}, z.core.$strip>;
|
|
1492
|
+
type UpdateKnowledgeEntryBody = z.infer<typeof UpdateKnowledgeEntryBodySchema>;
|
|
1493
|
+
declare const QueryKnowledgeParamsSchema: z.ZodObject<{
|
|
1494
|
+
entryType: z.ZodOptional<z.ZodEnum<{
|
|
1495
|
+
discovery: "discovery";
|
|
1496
|
+
decision: "decision";
|
|
1497
|
+
fix: "fix";
|
|
1498
|
+
convention: "convention";
|
|
1499
|
+
warning: "warning";
|
|
1500
|
+
}>>;
|
|
1501
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1502
|
+
active: "active";
|
|
1503
|
+
superseded: "superseded";
|
|
1504
|
+
archived: "archived";
|
|
1505
|
+
}>>;
|
|
1506
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1507
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
1509
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
1510
|
+
}, z.core.$strip>;
|
|
1511
|
+
type QueryKnowledgeParams = z.infer<typeof QueryKnowledgeParamsSchema>;
|
|
1512
|
+
declare const ProjectProfileSchema: z.ZodObject<{
|
|
1513
|
+
techStack: z.ZodArray<z.ZodString>;
|
|
1514
|
+
architectureType: z.ZodOptional<z.ZodString>;
|
|
1515
|
+
knownPitfalls: z.ZodArray<z.ZodString>;
|
|
1516
|
+
coreConventions: z.ZodArray<z.ZodString>;
|
|
1517
|
+
lastUpdatedAt: z.ZodNumber;
|
|
1518
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
1519
|
+
}, z.core.$strip>;
|
|
1520
|
+
type ProjectProfile = z.infer<typeof ProjectProfileSchema>;
|
|
1521
|
+
declare const KnowledgeInjectionModeSchema: z.ZodEnum<{
|
|
1522
|
+
auto: "auto";
|
|
1523
|
+
full: "full";
|
|
1524
|
+
minimal: "minimal";
|
|
1525
|
+
}>;
|
|
1526
|
+
type KnowledgeInjectionMode = z.infer<typeof KnowledgeInjectionModeSchema>;
|
|
1527
|
+
declare const KnowledgeInjectionRequestSchema: z.ZodObject<{
|
|
1528
|
+
mode: z.ZodEnum<{
|
|
1529
|
+
auto: "auto";
|
|
1530
|
+
full: "full";
|
|
1531
|
+
minimal: "minimal";
|
|
1532
|
+
}>;
|
|
1533
|
+
contextHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1534
|
+
}, z.core.$strip>;
|
|
1535
|
+
type KnowledgeInjectionRequest = z.infer<typeof KnowledgeInjectionRequestSchema>;
|
|
1536
|
+
declare const KnowledgeInjectionResponseSchema: z.ZodObject<{
|
|
1537
|
+
profile: z.ZodNullable<z.ZodObject<{
|
|
1538
|
+
techStack: z.ZodArray<z.ZodString>;
|
|
1539
|
+
architectureType: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
knownPitfalls: z.ZodArray<z.ZodString>;
|
|
1541
|
+
coreConventions: z.ZodArray<z.ZodString>;
|
|
1542
|
+
lastUpdatedAt: z.ZodNumber;
|
|
1543
|
+
lastUpdatedBy: z.ZodOptional<z.ZodString>;
|
|
1544
|
+
}, z.core.$strip>>;
|
|
1545
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1546
|
+
id: z.ZodString;
|
|
1547
|
+
entryType: z.ZodEnum<{
|
|
1548
|
+
discovery: "discovery";
|
|
1549
|
+
decision: "decision";
|
|
1550
|
+
fix: "fix";
|
|
1551
|
+
convention: "convention";
|
|
1552
|
+
warning: "warning";
|
|
1553
|
+
}>;
|
|
1554
|
+
title: z.ZodString;
|
|
1555
|
+
content: z.ZodString;
|
|
1556
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1557
|
+
confidence: z.ZodEnum<{
|
|
1558
|
+
high: "high";
|
|
1559
|
+
medium: "medium";
|
|
1560
|
+
low: "low";
|
|
1561
|
+
}>;
|
|
1562
|
+
createdAt: z.ZodString;
|
|
1563
|
+
}, z.core.$strip>>;
|
|
1564
|
+
}, z.core.$strip>;
|
|
1565
|
+
type KnowledgeInjectionResponse = z.infer<typeof KnowledgeInjectionResponseSchema>;
|
|
1566
|
+
declare const KnowledgeChainRelationSchema: z.ZodObject<{
|
|
1567
|
+
from: z.ZodString;
|
|
1568
|
+
to: z.ZodString;
|
|
1569
|
+
type: z.ZodEnum<{
|
|
1570
|
+
supersedes: "supersedes";
|
|
1571
|
+
related: "related";
|
|
1572
|
+
}>;
|
|
1573
|
+
}, z.core.$strip>;
|
|
1574
|
+
type KnowledgeChainRelation = z.infer<typeof KnowledgeChainRelationSchema>;
|
|
1575
|
+
declare const KnowledgeChainEntrySchema: z.ZodObject<{
|
|
1576
|
+
id: z.ZodString;
|
|
1577
|
+
entryType: z.ZodEnum<{
|
|
1578
|
+
discovery: "discovery";
|
|
1579
|
+
decision: "decision";
|
|
1580
|
+
fix: "fix";
|
|
1581
|
+
convention: "convention";
|
|
1582
|
+
warning: "warning";
|
|
1583
|
+
}>;
|
|
1584
|
+
action: z.ZodEnum<{
|
|
1585
|
+
create: "create";
|
|
1586
|
+
amend: "amend";
|
|
1587
|
+
supersede: "supersede";
|
|
1588
|
+
verify: "verify";
|
|
1589
|
+
}>;
|
|
1590
|
+
status: z.ZodEnum<{
|
|
1591
|
+
active: "active";
|
|
1592
|
+
superseded: "superseded";
|
|
1593
|
+
archived: "archived";
|
|
1594
|
+
}>;
|
|
1595
|
+
title: z.ZodString;
|
|
1596
|
+
content: z.ZodString;
|
|
1597
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1598
|
+
confidence: z.ZodEnum<{
|
|
1599
|
+
high: "high";
|
|
1600
|
+
medium: "medium";
|
|
1601
|
+
low: "low";
|
|
1602
|
+
}>;
|
|
1603
|
+
supersedesId: z.ZodNullable<z.ZodString>;
|
|
1604
|
+
createdAt: z.ZodString;
|
|
1605
|
+
}, z.core.$strip>;
|
|
1606
|
+
type KnowledgeChainEntry = z.infer<typeof KnowledgeChainEntrySchema>;
|
|
1607
|
+
declare const KnowledgeChainResponseSchema: z.ZodObject<{
|
|
1608
|
+
chain: z.ZodArray<z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
entryType: z.ZodEnum<{
|
|
1611
|
+
discovery: "discovery";
|
|
1612
|
+
decision: "decision";
|
|
1613
|
+
fix: "fix";
|
|
1614
|
+
convention: "convention";
|
|
1615
|
+
warning: "warning";
|
|
1616
|
+
}>;
|
|
1617
|
+
action: z.ZodEnum<{
|
|
1618
|
+
create: "create";
|
|
1619
|
+
amend: "amend";
|
|
1620
|
+
supersede: "supersede";
|
|
1621
|
+
verify: "verify";
|
|
1622
|
+
}>;
|
|
1623
|
+
status: z.ZodEnum<{
|
|
1624
|
+
active: "active";
|
|
1625
|
+
superseded: "superseded";
|
|
1626
|
+
archived: "archived";
|
|
1627
|
+
}>;
|
|
1628
|
+
title: z.ZodString;
|
|
1629
|
+
content: z.ZodString;
|
|
1630
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1631
|
+
confidence: z.ZodEnum<{
|
|
1632
|
+
high: "high";
|
|
1633
|
+
medium: "medium";
|
|
1634
|
+
low: "low";
|
|
1635
|
+
}>;
|
|
1636
|
+
supersedesId: z.ZodNullable<z.ZodString>;
|
|
1637
|
+
createdAt: z.ZodString;
|
|
1638
|
+
}, z.core.$strip>>;
|
|
1639
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
1640
|
+
from: z.ZodString;
|
|
1641
|
+
to: z.ZodString;
|
|
1642
|
+
type: z.ZodEnum<{
|
|
1643
|
+
supersedes: "supersedes";
|
|
1644
|
+
related: "related";
|
|
1645
|
+
}>;
|
|
1646
|
+
}, z.core.$strip>>;
|
|
1647
|
+
}, z.core.$strip>;
|
|
1648
|
+
type KnowledgeChainResponse = z.infer<typeof KnowledgeChainResponseSchema>;
|
|
1649
|
+
declare const CrossProjectSearchResultSchema: z.ZodObject<{
|
|
1650
|
+
id: z.ZodString;
|
|
1651
|
+
projectId: z.ZodString;
|
|
1652
|
+
projectPath: z.ZodString;
|
|
1653
|
+
entryType: z.ZodEnum<{
|
|
1654
|
+
discovery: "discovery";
|
|
1655
|
+
decision: "decision";
|
|
1656
|
+
fix: "fix";
|
|
1657
|
+
convention: "convention";
|
|
1658
|
+
warning: "warning";
|
|
1659
|
+
}>;
|
|
1660
|
+
title: z.ZodString;
|
|
1661
|
+
content: z.ZodString;
|
|
1662
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1663
|
+
confidence: z.ZodEnum<{
|
|
1664
|
+
high: "high";
|
|
1665
|
+
medium: "medium";
|
|
1666
|
+
low: "low";
|
|
1667
|
+
}>;
|
|
1668
|
+
similarity: z.ZodOptional<z.ZodNumber>;
|
|
1669
|
+
createdAt: z.ZodString;
|
|
1670
|
+
}, z.core.$strip>;
|
|
1671
|
+
type CrossProjectSearchResult = z.infer<typeof CrossProjectSearchResultSchema>;
|
|
1672
|
+
declare const CrossProjectSearchResponseSchema: z.ZodObject<{
|
|
1673
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1674
|
+
id: z.ZodString;
|
|
1675
|
+
projectId: z.ZodString;
|
|
1676
|
+
projectPath: z.ZodString;
|
|
1677
|
+
entryType: z.ZodEnum<{
|
|
1678
|
+
discovery: "discovery";
|
|
1679
|
+
decision: "decision";
|
|
1680
|
+
fix: "fix";
|
|
1681
|
+
convention: "convention";
|
|
1682
|
+
warning: "warning";
|
|
1683
|
+
}>;
|
|
1684
|
+
title: z.ZodString;
|
|
1685
|
+
content: z.ZodString;
|
|
1686
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1687
|
+
confidence: z.ZodEnum<{
|
|
1688
|
+
high: "high";
|
|
1689
|
+
medium: "medium";
|
|
1690
|
+
low: "low";
|
|
1691
|
+
}>;
|
|
1692
|
+
similarity: z.ZodOptional<z.ZodNumber>;
|
|
1693
|
+
createdAt: z.ZodString;
|
|
1694
|
+
}, z.core.$strip>>;
|
|
1695
|
+
total: z.ZodNumber;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
type CrossProjectSearchResponse = z.infer<typeof CrossProjectSearchResponseSchema>;
|
|
1698
|
+
declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
|
|
1699
|
+
projectId: z.ZodString;
|
|
1700
|
+
sessionId: z.ZodString;
|
|
1701
|
+
model: z.ZodString;
|
|
1702
|
+
turnId: z.ZodString;
|
|
1703
|
+
turnData: z.ZodObject<{
|
|
1704
|
+
userMessage: z.ZodString;
|
|
1705
|
+
assistantText: z.ZodString;
|
|
1706
|
+
fileEdits: z.ZodArray<z.ZodObject<{
|
|
1707
|
+
path: z.ZodString;
|
|
1708
|
+
type: z.ZodEnum<{
|
|
1709
|
+
create: "create";
|
|
1710
|
+
edit: "edit";
|
|
1711
|
+
}>;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
toolCallCount: z.ZodNumber;
|
|
1714
|
+
outputTokens: z.ZodNumber;
|
|
1715
|
+
}, z.core.$strip>;
|
|
1716
|
+
}, z.core.$strip>;
|
|
1717
|
+
type TurnKnowledgeExtraction = z.infer<typeof TurnKnowledgeExtractionSchema>;
|
|
1718
|
+
|
|
1719
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1720
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
package/dist/index.mjs
CHANGED
|
@@ -374,4 +374,165 @@ const DaemonStateSchema = z.object({
|
|
|
374
374
|
tunnels: TunnelStateSchema.optional()
|
|
375
375
|
});
|
|
376
376
|
|
|
377
|
-
|
|
377
|
+
const KnowledgeEntryTypeSchema = z.enum([
|
|
378
|
+
"discovery",
|
|
379
|
+
// New insight or finding
|
|
380
|
+
"decision",
|
|
381
|
+
// Architecture / tech choice
|
|
382
|
+
"fix",
|
|
383
|
+
// Bug fix record
|
|
384
|
+
"convention",
|
|
385
|
+
// Code convention / process rule
|
|
386
|
+
"warning"
|
|
387
|
+
// Known pitfall or gotcha
|
|
388
|
+
]);
|
|
389
|
+
const KnowledgeContributorTypeSchema = z.enum([
|
|
390
|
+
"session",
|
|
391
|
+
// Auto-generated by Claude session
|
|
392
|
+
"supervisor",
|
|
393
|
+
// Generated by Supervisor analysis
|
|
394
|
+
"user"
|
|
395
|
+
// Manually added by user
|
|
396
|
+
]);
|
|
397
|
+
const KnowledgeActionSchema = z.enum([
|
|
398
|
+
"create",
|
|
399
|
+
// New entry
|
|
400
|
+
"amend",
|
|
401
|
+
// Correction / supplement
|
|
402
|
+
"supersede",
|
|
403
|
+
// Replace old knowledge
|
|
404
|
+
"verify"
|
|
405
|
+
// Confirm still valid
|
|
406
|
+
]);
|
|
407
|
+
const KnowledgeStatusSchema = z.enum([
|
|
408
|
+
"active",
|
|
409
|
+
// Currently valid
|
|
410
|
+
"superseded",
|
|
411
|
+
// Replaced by newer knowledge
|
|
412
|
+
"archived"
|
|
413
|
+
// Manually archived by user
|
|
414
|
+
]);
|
|
415
|
+
const KnowledgeConfidenceSchema = z.enum(["high", "medium", "low"]);
|
|
416
|
+
const CreateKnowledgeEntryBodySchema = z.object({
|
|
417
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
418
|
+
contributorType: KnowledgeContributorTypeSchema,
|
|
419
|
+
action: KnowledgeActionSchema,
|
|
420
|
+
title: z.string().min(1).max(200),
|
|
421
|
+
content: z.string().min(1),
|
|
422
|
+
// Structured SOAP-like fields (optional)
|
|
423
|
+
request: z.string().optional(),
|
|
424
|
+
// S: What the user asked
|
|
425
|
+
findings: z.string().optional(),
|
|
426
|
+
// O: What was discovered
|
|
427
|
+
analysis: z.string().optional(),
|
|
428
|
+
// A: Root cause / assessment
|
|
429
|
+
outcome: z.string().optional(),
|
|
430
|
+
// P: What was done
|
|
431
|
+
nextSteps: z.string().optional(),
|
|
432
|
+
// Follow-up suggestions
|
|
433
|
+
tags: z.array(z.string().max(50)).max(20).default([]),
|
|
434
|
+
confidence: KnowledgeConfidenceSchema.default("medium"),
|
|
435
|
+
sessionId: z.string().optional(),
|
|
436
|
+
model: z.string().optional(),
|
|
437
|
+
supersedesId: z.string().optional(),
|
|
438
|
+
relatedIds: z.array(z.string()).max(10).default([]),
|
|
439
|
+
affectedFiles: z.array(z.string()).max(50).default([])
|
|
440
|
+
});
|
|
441
|
+
const UpdateKnowledgeEntryBodySchema = z.object({
|
|
442
|
+
status: KnowledgeStatusSchema.optional(),
|
|
443
|
+
pinned: z.boolean().optional(),
|
|
444
|
+
title: z.string().min(1).max(200).optional(),
|
|
445
|
+
content: z.string().min(1).optional(),
|
|
446
|
+
tags: z.array(z.string().max(50)).max(20).optional(),
|
|
447
|
+
confidence: KnowledgeConfidenceSchema.optional()
|
|
448
|
+
});
|
|
449
|
+
const QueryKnowledgeParamsSchema = z.object({
|
|
450
|
+
entryType: KnowledgeEntryTypeSchema.optional(),
|
|
451
|
+
status: KnowledgeStatusSchema.optional(),
|
|
452
|
+
tags: z.array(z.string()).optional(),
|
|
453
|
+
search: z.string().optional(),
|
|
454
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
455
|
+
offset: z.number().int().min(0).default(0)
|
|
456
|
+
});
|
|
457
|
+
const ProjectProfileSchema = z.object({
|
|
458
|
+
techStack: z.array(z.string()),
|
|
459
|
+
architectureType: z.string().optional(),
|
|
460
|
+
knownPitfalls: z.array(z.string()),
|
|
461
|
+
coreConventions: z.array(z.string()),
|
|
462
|
+
lastUpdatedAt: z.number(),
|
|
463
|
+
lastUpdatedBy: z.string().optional()
|
|
464
|
+
});
|
|
465
|
+
const KnowledgeInjectionModeSchema = z.enum(["auto", "full", "minimal"]);
|
|
466
|
+
const KnowledgeInjectionRequestSchema = z.object({
|
|
467
|
+
mode: KnowledgeInjectionModeSchema,
|
|
468
|
+
contextHints: z.array(z.string()).optional()
|
|
469
|
+
// Keywords from user message for relevance
|
|
470
|
+
});
|
|
471
|
+
const KnowledgeInjectionResponseSchema = z.object({
|
|
472
|
+
profile: ProjectProfileSchema.nullable(),
|
|
473
|
+
entries: z.array(z.object({
|
|
474
|
+
id: z.string(),
|
|
475
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
476
|
+
title: z.string(),
|
|
477
|
+
content: z.string(),
|
|
478
|
+
tags: z.array(z.string()),
|
|
479
|
+
confidence: KnowledgeConfidenceSchema,
|
|
480
|
+
createdAt: z.string()
|
|
481
|
+
}))
|
|
482
|
+
});
|
|
483
|
+
const KnowledgeChainRelationSchema = z.object({
|
|
484
|
+
from: z.string(),
|
|
485
|
+
to: z.string(),
|
|
486
|
+
type: z.enum(["supersedes", "related"])
|
|
487
|
+
});
|
|
488
|
+
const KnowledgeChainEntrySchema = z.object({
|
|
489
|
+
id: z.string(),
|
|
490
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
491
|
+
action: KnowledgeActionSchema,
|
|
492
|
+
status: KnowledgeStatusSchema,
|
|
493
|
+
title: z.string(),
|
|
494
|
+
content: z.string(),
|
|
495
|
+
tags: z.array(z.string()),
|
|
496
|
+
confidence: KnowledgeConfidenceSchema,
|
|
497
|
+
supersedesId: z.string().nullable(),
|
|
498
|
+
createdAt: z.string()
|
|
499
|
+
});
|
|
500
|
+
const KnowledgeChainResponseSchema = z.object({
|
|
501
|
+
chain: z.array(KnowledgeChainEntrySchema),
|
|
502
|
+
relations: z.array(KnowledgeChainRelationSchema)
|
|
503
|
+
});
|
|
504
|
+
const CrossProjectSearchResultSchema = z.object({
|
|
505
|
+
id: z.string(),
|
|
506
|
+
projectId: z.string(),
|
|
507
|
+
projectPath: z.string(),
|
|
508
|
+
entryType: KnowledgeEntryTypeSchema,
|
|
509
|
+
title: z.string(),
|
|
510
|
+
content: z.string(),
|
|
511
|
+
tags: z.array(z.string()),
|
|
512
|
+
confidence: KnowledgeConfidenceSchema,
|
|
513
|
+
similarity: z.number().optional(),
|
|
514
|
+
// Present when using semantic search
|
|
515
|
+
createdAt: z.string()
|
|
516
|
+
});
|
|
517
|
+
const CrossProjectSearchResponseSchema = z.object({
|
|
518
|
+
results: z.array(CrossProjectSearchResultSchema),
|
|
519
|
+
total: z.number()
|
|
520
|
+
});
|
|
521
|
+
const TurnKnowledgeExtractionSchema = z.object({
|
|
522
|
+
projectId: z.string(),
|
|
523
|
+
sessionId: z.string(),
|
|
524
|
+
model: z.string(),
|
|
525
|
+
turnId: z.string(),
|
|
526
|
+
turnData: z.object({
|
|
527
|
+
userMessage: z.string().max(2e3),
|
|
528
|
+
assistantText: z.string().max(5e3),
|
|
529
|
+
fileEdits: z.array(z.object({
|
|
530
|
+
path: z.string(),
|
|
531
|
+
type: z.enum(["create", "edit"])
|
|
532
|
+
})).max(50),
|
|
533
|
+
toolCallCount: z.number().int(),
|
|
534
|
+
outputTokens: z.number().int()
|
|
535
|
+
})
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, DaemonStateSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|