@kmmao/happy-wire 0.5.0 → 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 CHANGED
@@ -501,6 +501,44 @@ const KnowledgeInjectionResponseSchema = z__namespace.object({
501
501
  createdAt: z__namespace.string()
502
502
  }))
503
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
+ });
504
542
  const TurnKnowledgeExtractionSchema = z__namespace.object({
505
543
  projectId: z__namespace.string(),
506
544
  sessionId: z__namespace.string(),
@@ -526,8 +564,13 @@ exports.ApiUpdateSessionStateSchema = ApiUpdateSessionStateSchema;
526
564
  exports.CoreUpdateBodySchema = CoreUpdateBodySchema;
527
565
  exports.CoreUpdateContainerSchema = CoreUpdateContainerSchema;
528
566
  exports.CreateKnowledgeEntryBodySchema = CreateKnowledgeEntryBodySchema;
567
+ exports.CrossProjectSearchResponseSchema = CrossProjectSearchResponseSchema;
568
+ exports.CrossProjectSearchResultSchema = CrossProjectSearchResultSchema;
529
569
  exports.DaemonStateSchema = DaemonStateSchema;
530
570
  exports.KnowledgeActionSchema = KnowledgeActionSchema;
571
+ exports.KnowledgeChainEntrySchema = KnowledgeChainEntrySchema;
572
+ exports.KnowledgeChainRelationSchema = KnowledgeChainRelationSchema;
573
+ exports.KnowledgeChainResponseSchema = KnowledgeChainResponseSchema;
531
574
  exports.KnowledgeConfidenceSchema = KnowledgeConfidenceSchema;
532
575
  exports.KnowledgeContributorTypeSchema = KnowledgeContributorTypeSchema;
533
576
  exports.KnowledgeEntryTypeSchema = KnowledgeEntryTypeSchema;
package/dist/index.d.cts CHANGED
@@ -1563,6 +1563,138 @@ declare const KnowledgeInjectionResponseSchema: z.ZodObject<{
1563
1563
  }, z.core.$strip>>;
1564
1564
  }, z.core.$strip>;
1565
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>;
1566
1698
  declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
1567
1699
  projectId: z.ZodString;
1568
1700
  sessionId: z.ZodString;
@@ -1584,5 +1716,5 @@ declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
1584
1716
  }, z.core.$strip>;
1585
1717
  type TurnKnowledgeExtraction = z.infer<typeof TurnKnowledgeExtractionSchema>;
1586
1718
 
1587
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, DaemonStateSchema, KnowledgeActionSchema, 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 };
1588
- export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, DaemonState, KnowledgeAction, 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 };
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
@@ -1563,6 +1563,138 @@ declare const KnowledgeInjectionResponseSchema: z.ZodObject<{
1563
1563
  }, z.core.$strip>>;
1564
1564
  }, z.core.$strip>;
1565
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>;
1566
1698
  declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
1567
1699
  projectId: z.ZodString;
1568
1700
  sessionId: z.ZodString;
@@ -1584,5 +1716,5 @@ declare const TurnKnowledgeExtractionSchema: z.ZodObject<{
1584
1716
  }, z.core.$strip>;
1585
1717
  type TurnKnowledgeExtraction = z.infer<typeof TurnKnowledgeExtractionSchema>;
1586
1718
 
1587
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, DaemonStateSchema, KnowledgeActionSchema, 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 };
1588
- export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, DaemonState, KnowledgeAction, 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 };
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
@@ -480,6 +480,44 @@ const KnowledgeInjectionResponseSchema = z.object({
480
480
  createdAt: z.string()
481
481
  }))
482
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
+ });
483
521
  const TurnKnowledgeExtractionSchema = z.object({
484
522
  projectId: z.string(),
485
523
  sessionId: z.string(),
@@ -497,4 +535,4 @@ const TurnKnowledgeExtractionSchema = z.object({
497
535
  })
498
536
  });
499
537
 
500
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, DaemonStateSchema, KnowledgeActionSchema, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmmao/happy-wire",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Shared message wire types and Zod schemas for Happy clients and services",
5
5
  "author": "kmmao",
6
6
  "license": "MIT",