@jamesaphoenix/tx-types 0.4.4 → 0.5.1
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 +154 -299
- package/dist/anchor.d.ts +150 -0
- package/dist/anchor.d.ts.map +1 -0
- package/dist/anchor.js +100 -0
- package/dist/anchor.js.map +1 -0
- package/dist/attempt.d.ts +0 -15
- package/dist/attempt.d.ts.map +1 -1
- package/dist/attempt.js +0 -29
- package/dist/attempt.js.map +1 -1
- package/dist/candidate.d.ts +175 -0
- package/dist/candidate.d.ts.map +1 -0
- package/dist/candidate.js +139 -0
- package/dist/candidate.js.map +1 -0
- package/dist/cycle.d.ts +1 -6
- package/dist/cycle.d.ts.map +1 -1
- package/dist/cycle.js.map +1 -1
- package/dist/doc.d.ts.map +1 -1
- package/dist/doc.js.map +1 -1
- package/dist/edge.d.ts +87 -0
- package/dist/edge.d.ts.map +1 -0
- package/dist/edge.js +82 -0
- package/dist/edge.js.map +1 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/learning.d.ts +74 -1
- package/dist/learning.d.ts.map +1 -1
- package/dist/learning.js +40 -1
- package/dist/learning.js.map +1 -1
- package/dist/message.d.ts +83 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.js +82 -0
- package/dist/message.js.map +1 -0
- package/dist/response.d.ts +68 -0
- package/dist/response.d.ts.map +1 -1
- package/dist/response.js +65 -0
- package/dist/response.js.map +1 -1
- package/dist/run.d.ts +0 -30
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +0 -55
- package/dist/run.js.map +1 -1
- package/dist/symbol.d.ts +71 -0
- package/dist/symbol.d.ts.map +1 -0
- package/dist/symbol.js +83 -0
- package/dist/symbol.js.map +1 -0
- package/package.json +7 -21
package/dist/learning.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ export declare const LearningWithScoreSchema: Schema.Struct<{
|
|
|
46
46
|
vectorRank: Schema.filter<typeof Schema.Number>;
|
|
47
47
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
48
48
|
rerankerScore: Schema.optional<typeof Schema.Number>;
|
|
49
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
50
|
+
expansionHops: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
51
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
52
|
+
expansionPath: Schema.optional<Schema.Array$<Schema.brand<Schema.filter<typeof Schema.Number>, "LearningId">>>;
|
|
53
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
54
|
+
sourceEdge: Schema.optional<Schema.NullOr<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
49
55
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
50
56
|
feedbackScore: Schema.optional<typeof Schema.Number>;
|
|
51
57
|
id: Schema.brand<Schema.filter<typeof Schema.Number>, "LearningId">;
|
|
@@ -78,6 +84,20 @@ export declare const UpdateLearningInputSchema: Schema.Struct<{
|
|
|
78
84
|
embedding: Schema.optional<Schema.instanceOf<Float32Array<ArrayBuffer>>>;
|
|
79
85
|
}>;
|
|
80
86
|
export type UpdateLearningInput = typeof UpdateLearningInputSchema.Type;
|
|
87
|
+
/** Options for graph expansion during search. See PRD-016. */
|
|
88
|
+
export declare const GraphExpansionQueryOptionsSchema: Schema.Struct<{
|
|
89
|
+
/** Enable graph expansion (default: false) */
|
|
90
|
+
enabled: typeof Schema.Boolean;
|
|
91
|
+
/** Maximum traversal depth (default: 2) */
|
|
92
|
+
depth: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
93
|
+
/** Score decay factor per hop (default: 0.7) */
|
|
94
|
+
decayFactor: Schema.optional<typeof Schema.Number>;
|
|
95
|
+
/** Maximum nodes to return from expansion (default: 100) */
|
|
96
|
+
maxNodes: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
97
|
+
/** Filter by specific edge types (default: all types) */
|
|
98
|
+
edgeTypes: Schema.optional<Schema.Array$<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
99
|
+
}>;
|
|
100
|
+
export type GraphExpansionQueryOptions = typeof GraphExpansionQueryOptionsSchema.Type;
|
|
81
101
|
/** Query options for learning searches. */
|
|
82
102
|
export declare const LearningQuerySchema: Schema.Struct<{
|
|
83
103
|
query: typeof Schema.String;
|
|
@@ -85,14 +105,41 @@ export declare const LearningQuerySchema: Schema.Struct<{
|
|
|
85
105
|
minScore: Schema.optional<typeof Schema.Number>;
|
|
86
106
|
category: Schema.optional<typeof Schema.String>;
|
|
87
107
|
sourceType: Schema.optional<Schema.Literal<["compaction", "run", "manual", "claude_md"]>>;
|
|
108
|
+
/** Graph expansion options for traversing related learnings */
|
|
109
|
+
graphExpansion: Schema.optional<Schema.Struct<{
|
|
110
|
+
/** Enable graph expansion (default: false) */
|
|
111
|
+
enabled: typeof Schema.Boolean;
|
|
112
|
+
/** Maximum traversal depth (default: 2) */
|
|
113
|
+
depth: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
114
|
+
/** Score decay factor per hop (default: 0.7) */
|
|
115
|
+
decayFactor: Schema.optional<typeof Schema.Number>;
|
|
116
|
+
/** Maximum nodes to return from expansion (default: 100) */
|
|
117
|
+
maxNodes: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
118
|
+
/** Filter by specific edge types (default: all types) */
|
|
119
|
+
edgeTypes: Schema.optional<Schema.Array$<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
120
|
+
}>>;
|
|
88
121
|
}>;
|
|
89
122
|
export type LearningQuery = typeof LearningQuerySchema.Type;
|
|
90
123
|
/** Options for context retrieval. */
|
|
91
124
|
export declare const ContextOptionsSchema: Schema.Struct<{
|
|
92
|
-
/**
|
|
125
|
+
/** Enable graph expansion (default: false) */
|
|
126
|
+
useGraph: Schema.optional<typeof Schema.Boolean>;
|
|
127
|
+
/** Graph expansion depth (default: 2 per PRD-016) */
|
|
128
|
+
expansionDepth: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
129
|
+
/** Edge types to include in expansion */
|
|
130
|
+
edgeTypes: Schema.optional<Schema.Array$<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
131
|
+
/** Maximum number of learnings to return (default: 10) */
|
|
93
132
|
maxTokens: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
94
133
|
}>;
|
|
95
134
|
export type ContextOptions = typeof ContextOptionsSchema.Type;
|
|
135
|
+
/** Statistics about graph expansion during context retrieval. */
|
|
136
|
+
export declare const GraphExpansionStatsSchema: Schema.Struct<{
|
|
137
|
+
enabled: typeof Schema.Boolean;
|
|
138
|
+
seedCount: Schema.filter<typeof Schema.Number>;
|
|
139
|
+
expandedCount: Schema.filter<typeof Schema.Number>;
|
|
140
|
+
maxDepthReached: Schema.filter<typeof Schema.Number>;
|
|
141
|
+
}>;
|
|
142
|
+
export type GraphExpansionStats = typeof GraphExpansionStatsSchema.Type;
|
|
96
143
|
/** Result of context retrieval for a task. */
|
|
97
144
|
export declare const ContextResultSchema: Schema.Struct<{
|
|
98
145
|
taskId: typeof Schema.String;
|
|
@@ -110,6 +157,12 @@ export declare const ContextResultSchema: Schema.Struct<{
|
|
|
110
157
|
vectorRank: Schema.filter<typeof Schema.Number>;
|
|
111
158
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
112
159
|
rerankerScore: Schema.optional<typeof Schema.Number>;
|
|
160
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
161
|
+
expansionHops: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
162
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
163
|
+
expansionPath: Schema.optional<Schema.Array$<Schema.brand<Schema.filter<typeof Schema.Number>, "LearningId">>>;
|
|
164
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
165
|
+
sourceEdge: Schema.optional<Schema.NullOr<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
113
166
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
114
167
|
feedbackScore: Schema.optional<typeof Schema.Number>;
|
|
115
168
|
id: Schema.brand<Schema.filter<typeof Schema.Number>, "LearningId">;
|
|
@@ -126,6 +179,13 @@ export declare const ContextResultSchema: Schema.Struct<{
|
|
|
126
179
|
}>>;
|
|
127
180
|
searchQuery: typeof Schema.String;
|
|
128
181
|
searchDuration: typeof Schema.Number;
|
|
182
|
+
/** Graph expansion statistics (only present when useGraph=true) */
|
|
183
|
+
graphExpansion: Schema.optional<Schema.Struct<{
|
|
184
|
+
enabled: typeof Schema.Boolean;
|
|
185
|
+
seedCount: Schema.filter<typeof Schema.Number>;
|
|
186
|
+
expandedCount: Schema.filter<typeof Schema.Number>;
|
|
187
|
+
maxDepthReached: Schema.filter<typeof Schema.Number>;
|
|
188
|
+
}>>;
|
|
129
189
|
}>;
|
|
130
190
|
export type ContextResult = typeof ContextResultSchema.Type;
|
|
131
191
|
/** Result of a learning search operation. */
|
|
@@ -167,6 +227,19 @@ export declare const RetrievalOptionsSchema: Schema.Struct<{
|
|
|
167
227
|
category: Schema.optional<typeof Schema.String>;
|
|
168
228
|
/** Optional source type filter */
|
|
169
229
|
sourceType: Schema.optional<Schema.Literal<["compaction", "run", "manual", "claude_md"]>>;
|
|
230
|
+
/** Graph expansion options for traversing related learnings */
|
|
231
|
+
graphExpansion: Schema.optional<Schema.Struct<{
|
|
232
|
+
/** Enable graph expansion (default: false) */
|
|
233
|
+
enabled: typeof Schema.Boolean;
|
|
234
|
+
/** Maximum traversal depth (default: 2) */
|
|
235
|
+
depth: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
236
|
+
/** Score decay factor per hop (default: 0.7) */
|
|
237
|
+
decayFactor: Schema.optional<typeof Schema.Number>;
|
|
238
|
+
/** Maximum nodes to return from expansion (default: 100) */
|
|
239
|
+
maxNodes: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
240
|
+
/** Filter by specific edge types (default: all types) */
|
|
241
|
+
edgeTypes: Schema.optional<Schema.Array$<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
242
|
+
}>>;
|
|
170
243
|
/** MMR diversification options for result variety */
|
|
171
244
|
diversification: Schema.optional<Schema.Struct<{
|
|
172
245
|
/** Enable MMR diversification (default: false) */
|
package/dist/learning.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learning.d.ts","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"learning.d.ts","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAO/B;;GAEG;AACH,eAAO,MAAM,qBAAqB,uDAKxB,CAAC;AAMX,2DAA2D;AAC3D,eAAO,MAAM,wBAAwB,8DAA2C,CAAA;AAChF,MAAM,MAAM,kBAAkB,G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G,OAAO,sBAAsB,CAAC,IAAI,CAAA;AAMjE,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,oDAAoD;AACpD,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/learning.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Schema definitions provide both compile-time types and runtime validation.
|
|
8
8
|
*/
|
|
9
9
|
import { Schema } from "effect";
|
|
10
|
+
import { EdgeTypeSchema } from "./edge.js";
|
|
10
11
|
// =============================================================================
|
|
11
12
|
// CONSTANTS
|
|
12
13
|
// =============================================================================
|
|
@@ -55,6 +56,12 @@ export const LearningWithScoreSchema = Schema.Struct({
|
|
|
55
56
|
vectorRank: Schema.Number.pipe(Schema.int()),
|
|
56
57
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
57
58
|
rerankerScore: Schema.optional(Schema.Number),
|
|
59
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
60
|
+
expansionHops: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
61
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
62
|
+
expansionPath: Schema.optional(Schema.Array(LearningIdSchema)),
|
|
63
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
64
|
+
sourceEdge: Schema.optional(Schema.NullOr(EdgeTypeSchema)),
|
|
58
65
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
59
66
|
feedbackScore: Schema.optional(Schema.Number),
|
|
60
67
|
});
|
|
@@ -73,6 +80,19 @@ export const UpdateLearningInputSchema = Schema.Struct({
|
|
|
73
80
|
outcomeScore: Schema.optional(Schema.Number),
|
|
74
81
|
embedding: Schema.optional(Schema.instanceOf(Float32Array)),
|
|
75
82
|
});
|
|
83
|
+
/** Options for graph expansion during search. See PRD-016. */
|
|
84
|
+
export const GraphExpansionQueryOptionsSchema = Schema.Struct({
|
|
85
|
+
/** Enable graph expansion (default: false) */
|
|
86
|
+
enabled: Schema.Boolean,
|
|
87
|
+
/** Maximum traversal depth (default: 2) */
|
|
88
|
+
depth: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
89
|
+
/** Score decay factor per hop (default: 0.7) */
|
|
90
|
+
decayFactor: Schema.optional(Schema.Number),
|
|
91
|
+
/** Maximum nodes to return from expansion (default: 100) */
|
|
92
|
+
maxNodes: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
93
|
+
/** Filter by specific edge types (default: all types) */
|
|
94
|
+
edgeTypes: Schema.optional(Schema.Array(EdgeTypeSchema)),
|
|
95
|
+
});
|
|
76
96
|
/** Query options for learning searches. */
|
|
77
97
|
export const LearningQuerySchema = Schema.Struct({
|
|
78
98
|
query: Schema.String,
|
|
@@ -80,12 +100,27 @@ export const LearningQuerySchema = Schema.Struct({
|
|
|
80
100
|
minScore: Schema.optional(Schema.Number),
|
|
81
101
|
category: Schema.optional(Schema.String),
|
|
82
102
|
sourceType: Schema.optional(LearningSourceTypeSchema),
|
|
103
|
+
/** Graph expansion options for traversing related learnings */
|
|
104
|
+
graphExpansion: Schema.optional(GraphExpansionQueryOptionsSchema),
|
|
83
105
|
});
|
|
84
106
|
/** Options for context retrieval. */
|
|
85
107
|
export const ContextOptionsSchema = Schema.Struct({
|
|
86
|
-
/**
|
|
108
|
+
/** Enable graph expansion (default: false) */
|
|
109
|
+
useGraph: Schema.optional(Schema.Boolean),
|
|
110
|
+
/** Graph expansion depth (default: 2 per PRD-016) */
|
|
111
|
+
expansionDepth: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
112
|
+
/** Edge types to include in expansion */
|
|
113
|
+
edgeTypes: Schema.optional(Schema.Array(EdgeTypeSchema)),
|
|
114
|
+
/** Maximum number of learnings to return (default: 10) */
|
|
87
115
|
maxTokens: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
88
116
|
});
|
|
117
|
+
/** Statistics about graph expansion during context retrieval. */
|
|
118
|
+
export const GraphExpansionStatsSchema = Schema.Struct({
|
|
119
|
+
enabled: Schema.Boolean,
|
|
120
|
+
seedCount: Schema.Number.pipe(Schema.int()),
|
|
121
|
+
expandedCount: Schema.Number.pipe(Schema.int()),
|
|
122
|
+
maxDepthReached: Schema.Number.pipe(Schema.int()),
|
|
123
|
+
});
|
|
89
124
|
/** Result of context retrieval for a task. */
|
|
90
125
|
export const ContextResultSchema = Schema.Struct({
|
|
91
126
|
taskId: Schema.String,
|
|
@@ -93,6 +128,8 @@ export const ContextResultSchema = Schema.Struct({
|
|
|
93
128
|
learnings: Schema.Array(LearningWithScoreSchema),
|
|
94
129
|
searchQuery: Schema.String,
|
|
95
130
|
searchDuration: Schema.Number,
|
|
131
|
+
/** Graph expansion statistics (only present when useGraph=true) */
|
|
132
|
+
graphExpansion: Schema.optional(GraphExpansionStatsSchema),
|
|
96
133
|
});
|
|
97
134
|
/** Result of a learning search operation. */
|
|
98
135
|
export const LearningSearchResultSchema = Schema.Struct({
|
|
@@ -119,6 +156,8 @@ export const RetrievalOptionsSchema = Schema.Struct({
|
|
|
119
156
|
category: Schema.optional(Schema.String),
|
|
120
157
|
/** Optional source type filter */
|
|
121
158
|
sourceType: Schema.optional(LearningSourceTypeSchema),
|
|
159
|
+
/** Graph expansion options for traversing related learnings */
|
|
160
|
+
graphExpansion: Schema.optional(GraphExpansionQueryOptionsSchema),
|
|
122
161
|
/** MMR diversification options for result variety */
|
|
123
162
|
diversification: Schema.optional(DiversificationOptionsSchema),
|
|
124
163
|
});
|
package/dist/learning.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learning.js","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"learning.js","sourceRoot":"","sources":["../src/learning.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,WAAW;CACH,CAAC;AAEX,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,qBAAqB,CAAC,CAAA;AAGhF,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAChD,MAAM,CAAC,GAAG,EAAE,EACZ,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAC3B,CAAA;AAGD,4BAA4B;AAC5B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,gBAAgB;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,UAAU,EAAE,wBAAwB;IACpC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC,YAAY;I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PRD-024).
|
|
5
|
+
* Core type definitions using Effect Schema (Doctrine Rule 10).
|
|
6
|
+
* Schema definitions provide both compile-time types and runtime validation.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
/**
|
|
10
|
+
* Valid message statuses.
|
|
11
|
+
* Two-state lifecycle: pending -> acked
|
|
12
|
+
*/
|
|
13
|
+
export declare const MESSAGE_STATUSES: readonly ["pending", "acked"];
|
|
14
|
+
/** Message status - pending or acked. */
|
|
15
|
+
export declare const MessageStatusSchema: Schema.Literal<["pending", "acked"]>;
|
|
16
|
+
export type MessageStatus = typeof MessageStatusSchema.Type;
|
|
17
|
+
/** Message ID - branded integer. */
|
|
18
|
+
export declare const MessageIdSchema: Schema.brand<Schema.filter<typeof Schema.Number>, "MessageId">;
|
|
19
|
+
export type MessageId = typeof MessageIdSchema.Type;
|
|
20
|
+
/** Message entity - an outbox message in a channel. */
|
|
21
|
+
export declare const MessageSchema: Schema.Struct<{
|
|
22
|
+
id: Schema.brand<Schema.filter<typeof Schema.Number>, "MessageId">;
|
|
23
|
+
channel: typeof Schema.String;
|
|
24
|
+
sender: typeof Schema.String;
|
|
25
|
+
content: typeof Schema.String;
|
|
26
|
+
status: Schema.Literal<["pending", "acked"]>;
|
|
27
|
+
correlationId: Schema.NullOr<typeof Schema.String>;
|
|
28
|
+
taskId: Schema.NullOr<typeof Schema.String>;
|
|
29
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
30
|
+
createdAt: typeof Schema.DateFromSelf;
|
|
31
|
+
ackedAt: Schema.NullOr<typeof Schema.DateFromSelf>;
|
|
32
|
+
expiresAt: Schema.NullOr<typeof Schema.DateFromSelf>;
|
|
33
|
+
}>;
|
|
34
|
+
export type Message = typeof MessageSchema.Type;
|
|
35
|
+
/** Input for sending a new message. */
|
|
36
|
+
export declare const SendMessageInputSchema: Schema.Struct<{
|
|
37
|
+
channel: typeof Schema.String;
|
|
38
|
+
sender: typeof Schema.String;
|
|
39
|
+
content: typeof Schema.String;
|
|
40
|
+
correlationId: Schema.NullOr<typeof Schema.String>;
|
|
41
|
+
taskId: Schema.NullOr<typeof Schema.String>;
|
|
42
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
43
|
+
ttlSeconds: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
44
|
+
}>;
|
|
45
|
+
export type SendMessageInput = typeof SendMessageInputSchema.Type;
|
|
46
|
+
/** Filter for reading inbox messages. */
|
|
47
|
+
export declare const InboxFilterSchema: Schema.Struct<{
|
|
48
|
+
channel: typeof Schema.String;
|
|
49
|
+
afterId: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
50
|
+
limit: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
51
|
+
sender: Schema.optional<typeof Schema.String>;
|
|
52
|
+
correlationId: Schema.optional<typeof Schema.String>;
|
|
53
|
+
includeAcked: Schema.optional<typeof Schema.Boolean>;
|
|
54
|
+
excludeExpired: Schema.optional<typeof Schema.Boolean>;
|
|
55
|
+
}>;
|
|
56
|
+
export type InboxFilter = typeof InboxFilterSchema.Type;
|
|
57
|
+
/** Database row type for messages (snake_case from SQLite). */
|
|
58
|
+
export interface MessageRow {
|
|
59
|
+
id: number;
|
|
60
|
+
channel: string;
|
|
61
|
+
sender: string;
|
|
62
|
+
content: string;
|
|
63
|
+
status: string;
|
|
64
|
+
correlation_id: string | null;
|
|
65
|
+
task_id: string | null;
|
|
66
|
+
metadata: string;
|
|
67
|
+
created_at: string;
|
|
68
|
+
acked_at: string | null;
|
|
69
|
+
expires_at: string | null;
|
|
70
|
+
}
|
|
71
|
+
/** Check if a string is a valid MessageStatus. */
|
|
72
|
+
export declare const isValidMessageStatus: (s: string) => s is MessageStatus;
|
|
73
|
+
/** Runtime error for invalid message status from database. */
|
|
74
|
+
export declare class InvalidMessageStatusError extends Error {
|
|
75
|
+
readonly status: string;
|
|
76
|
+
constructor(opts: {
|
|
77
|
+
status: string;
|
|
78
|
+
id: number;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Assert a string is a valid MessageStatus, throwing if not. */
|
|
82
|
+
export declare const assertMessageStatus: (s: string, id: number) => MessageStatus;
|
|
83
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAM/B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,+BAAgC,CAAA;AAM7D,yCAAyC;AACzC,eAAO,MAAM,mBAAmB,sCAAsC,CAAA;AACtE,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAE3D,oCAAoC;AACpC,eAAO,MAAM,eAAe,gEAG3B,CAAA;AACD,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAEnD,uDAAuD;AACvD,eAAO,MAAM,aAAa;;;;;;;;;;;;EAYxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAE/C,uCAAuC;AACvC,eAAO,MAAM,sBAAsB;;;;;;;;EAQjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA;AAEjE,yCAAyC;AACzC,eAAO,MAAM,iBAAiB;;;;;;;;EAQ5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAMvD,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAMD,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,GAAI,GAAG,MAAM,KAAG,CAAC,IAAI,aAGrD,CAAA;AAED,8DAA8D;AAC9D,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBACX,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE;CAKjD;AAED,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,KAAG,aAK3D,CAAA"}
|
package/dist/message.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message types for tx
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for agent outbox messaging (PRD-024).
|
|
5
|
+
* Core type definitions using Effect Schema (Doctrine Rule 10).
|
|
6
|
+
* Schema definitions provide both compile-time types and runtime validation.
|
|
7
|
+
*/
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// CONSTANTS
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Valid message statuses.
|
|
14
|
+
* Two-state lifecycle: pending -> acked
|
|
15
|
+
*/
|
|
16
|
+
export const MESSAGE_STATUSES = ["pending", "acked"];
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// SCHEMAS & TYPES
|
|
19
|
+
// =============================================================================
|
|
20
|
+
/** Message status - pending or acked. */
|
|
21
|
+
export const MessageStatusSchema = Schema.Literal(...MESSAGE_STATUSES);
|
|
22
|
+
/** Message ID - branded integer. */
|
|
23
|
+
export const MessageIdSchema = Schema.Number.pipe(Schema.int(), Schema.brand("MessageId"));
|
|
24
|
+
/** Message entity - an outbox message in a channel. */
|
|
25
|
+
export const MessageSchema = Schema.Struct({
|
|
26
|
+
id: MessageIdSchema,
|
|
27
|
+
channel: Schema.String,
|
|
28
|
+
sender: Schema.String,
|
|
29
|
+
content: Schema.String,
|
|
30
|
+
status: MessageStatusSchema,
|
|
31
|
+
correlationId: Schema.NullOr(Schema.String),
|
|
32
|
+
taskId: Schema.NullOr(Schema.String),
|
|
33
|
+
metadata: Schema.Record({ key: Schema.String, value: Schema.Unknown }),
|
|
34
|
+
createdAt: Schema.DateFromSelf,
|
|
35
|
+
ackedAt: Schema.NullOr(Schema.DateFromSelf),
|
|
36
|
+
expiresAt: Schema.NullOr(Schema.DateFromSelf),
|
|
37
|
+
});
|
|
38
|
+
/** Input for sending a new message. */
|
|
39
|
+
export const SendMessageInputSchema = Schema.Struct({
|
|
40
|
+
channel: Schema.String,
|
|
41
|
+
sender: Schema.String,
|
|
42
|
+
content: Schema.String,
|
|
43
|
+
correlationId: Schema.NullOr(Schema.String),
|
|
44
|
+
taskId: Schema.NullOr(Schema.String),
|
|
45
|
+
metadata: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Unknown })),
|
|
46
|
+
ttlSeconds: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive())),
|
|
47
|
+
});
|
|
48
|
+
/** Filter for reading inbox messages. */
|
|
49
|
+
export const InboxFilterSchema = Schema.Struct({
|
|
50
|
+
channel: Schema.String,
|
|
51
|
+
afterId: Schema.optional(Schema.Number.pipe(Schema.int())),
|
|
52
|
+
limit: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive())),
|
|
53
|
+
sender: Schema.optional(Schema.String),
|
|
54
|
+
correlationId: Schema.optional(Schema.String),
|
|
55
|
+
includeAcked: Schema.optional(Schema.Boolean),
|
|
56
|
+
excludeExpired: Schema.optional(Schema.Boolean),
|
|
57
|
+
});
|
|
58
|
+
// =============================================================================
|
|
59
|
+
// RUNTIME VALIDATORS
|
|
60
|
+
// =============================================================================
|
|
61
|
+
/** Check if a string is a valid MessageStatus. */
|
|
62
|
+
export const isValidMessageStatus = (s) => {
|
|
63
|
+
const statuses = MESSAGE_STATUSES;
|
|
64
|
+
return statuses.includes(s);
|
|
65
|
+
};
|
|
66
|
+
/** Runtime error for invalid message status from database. */
|
|
67
|
+
export class InvalidMessageStatusError extends Error {
|
|
68
|
+
status;
|
|
69
|
+
constructor(opts) {
|
|
70
|
+
super(`Invalid message status "${opts.status}" for message ${opts.id}`);
|
|
71
|
+
this.name = "InvalidMessageStatusError";
|
|
72
|
+
this.status = opts.status;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** Assert a string is a valid MessageStatus, throwing if not. */
|
|
76
|
+
export const assertMessageStatus = (s, id) => {
|
|
77
|
+
if (!isValidMessageStatus(s)) {
|
|
78
|
+
throw new InvalidMessageStatusError({ status: s, id });
|
|
79
|
+
}
|
|
80
|
+
return s;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,OAAO,CAAU,CAAA;AAE7D,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,yCAAyC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAA;AAGtE,oCAAoC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC/C,MAAM,C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AAC,EAAE,EAAE,CAAC,CAAA;QACvE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAA;QACvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAC3B,CAAC;CACF;AAED,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAS,EAAE,EAAU,EAAiB,EAAE;IAC1E,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACxD,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC,CAAA"}
|
package/dist/response.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type { Learning, LearningWithScore } from "./learning.js";
|
|
|
18
18
|
import type { FileLearning } from "./file-learning.js";
|
|
19
19
|
import type { Run } from "./run.js";
|
|
20
20
|
import type { Attempt } from "./attempt.js";
|
|
21
|
+
import type { Message } from "./message.js";
|
|
21
22
|
/**
|
|
22
23
|
* TaskWithDeps serialized for JSON output.
|
|
23
24
|
* All Date fields converted to ISO strings.
|
|
@@ -85,6 +86,12 @@ export declare const LearningWithScoreSerializedSchema: Schema.Struct<{
|
|
|
85
86
|
vectorRank: Schema.filter<typeof Schema.Number>;
|
|
86
87
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
87
88
|
rerankerScore: Schema.optional<typeof Schema.Number>;
|
|
89
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
90
|
+
expansionHops: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
91
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
92
|
+
expansionPath: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.Number>>>;
|
|
93
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
94
|
+
sourceEdge: Schema.optional<Schema.NullOr<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
88
95
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
89
96
|
feedbackScore: Schema.optional<typeof Schema.Number>;
|
|
90
97
|
id: Schema.filter<typeof Schema.Number>;
|
|
@@ -471,6 +478,12 @@ export declare const LearningSearchResponseSchema: Schema.Struct<{
|
|
|
471
478
|
vectorRank: Schema.filter<typeof Schema.Number>;
|
|
472
479
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
473
480
|
rerankerScore: Schema.optional<typeof Schema.Number>;
|
|
481
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
482
|
+
expansionHops: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
483
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
484
|
+
expansionPath: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.Number>>>;
|
|
485
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
486
|
+
sourceEdge: Schema.optional<Schema.NullOr<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
474
487
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
475
488
|
feedbackScore: Schema.optional<typeof Schema.Number>;
|
|
476
489
|
id: Schema.filter<typeof Schema.Number>;
|
|
@@ -510,6 +523,12 @@ export declare const ContextResponseSchema: Schema.Struct<{
|
|
|
510
523
|
vectorRank: Schema.filter<typeof Schema.Number>;
|
|
511
524
|
/** LLM reranker score (0-1, optional - only present when reranking is applied) */
|
|
512
525
|
rerankerScore: Schema.optional<typeof Schema.Number>;
|
|
526
|
+
/** Number of hops from seed (0 = direct match from RRF, 1+ = expanded via graph) */
|
|
527
|
+
expansionHops: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
528
|
+
/** Path of learning IDs from seed to this learning (only for expanded results) */
|
|
529
|
+
expansionPath: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.Number>>>;
|
|
530
|
+
/** Edge type that led to this learning (null for direct matches) */
|
|
531
|
+
sourceEdge: Schema.optional<Schema.NullOr<Schema.Literal<["ANCHORED_TO", "DERIVED_FROM", "IMPORTS", "CO_CHANGES_WITH", "SIMILAR_TO", "LINKS_TO", "USED_IN_RUN", "INVALIDATED_BY"]>>>;
|
|
513
532
|
/** Feedback score from historical usage (0-1, 0.5 = neutral, optional) */
|
|
514
533
|
feedbackScore: Schema.optional<typeof Schema.Number>;
|
|
515
534
|
id: Schema.filter<typeof Schema.Number>;
|
|
@@ -527,6 +546,13 @@ export declare const ContextResponseSchema: Schema.Struct<{
|
|
|
527
546
|
searchQuery: typeof Schema.String;
|
|
528
547
|
/** Search duration in milliseconds */
|
|
529
548
|
searchDuration: typeof Schema.Number;
|
|
549
|
+
/** Graph expansion statistics (only present when useGraph=true) */
|
|
550
|
+
graphExpansion: Schema.optional<Schema.Struct<{
|
|
551
|
+
enabled: typeof Schema.Boolean;
|
|
552
|
+
seedCount: Schema.filter<typeof Schema.Number>;
|
|
553
|
+
expandedCount: Schema.filter<typeof Schema.Number>;
|
|
554
|
+
maxDepthReached: Schema.filter<typeof Schema.Number>;
|
|
555
|
+
}>>;
|
|
530
556
|
}>;
|
|
531
557
|
export type ContextResponse = typeof ContextResponseSchema.Type;
|
|
532
558
|
/** Response for file learnings. */
|
|
@@ -633,4 +659,46 @@ export declare const SyncImportResponseSchema: Schema.Struct<{
|
|
|
633
659
|
conflicts: Schema.filter<typeof Schema.Number>;
|
|
634
660
|
}>;
|
|
635
661
|
export type SyncImportResponse = typeof SyncImportResponseSchema.Type;
|
|
662
|
+
/**
|
|
663
|
+
* Message serialized for JSON output.
|
|
664
|
+
* All Date fields converted to ISO strings.
|
|
665
|
+
*/
|
|
666
|
+
export declare const MessageSerializedSchema: Schema.Struct<{
|
|
667
|
+
id: Schema.brand<Schema.filter<typeof Schema.Number>, "MessageId">;
|
|
668
|
+
channel: typeof Schema.String;
|
|
669
|
+
sender: typeof Schema.String;
|
|
670
|
+
content: typeof Schema.String;
|
|
671
|
+
status: Schema.Literal<["pending", "acked"]>;
|
|
672
|
+
correlationId: Schema.NullOr<typeof Schema.String>;
|
|
673
|
+
taskId: Schema.NullOr<typeof Schema.String>;
|
|
674
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
675
|
+
createdAt: typeof Schema.String;
|
|
676
|
+
ackedAt: Schema.NullOr<typeof Schema.String>;
|
|
677
|
+
expiresAt: Schema.NullOr<typeof Schema.String>;
|
|
678
|
+
}>;
|
|
679
|
+
export type MessageSerialized = typeof MessageSerializedSchema.Type;
|
|
680
|
+
/**
|
|
681
|
+
* Serialize a Message for JSON output.
|
|
682
|
+
* Converts Date objects to ISO strings.
|
|
683
|
+
*/
|
|
684
|
+
export declare const serializeMessage: (message: Message) => MessageSerialized;
|
|
685
|
+
/** Response for reading inbox messages. */
|
|
686
|
+
export declare const InboxResponseSchema: Schema.Struct<{
|
|
687
|
+
messages: Schema.Array$<Schema.Struct<{
|
|
688
|
+
id: Schema.brand<Schema.filter<typeof Schema.Number>, "MessageId">;
|
|
689
|
+
channel: typeof Schema.String;
|
|
690
|
+
sender: typeof Schema.String;
|
|
691
|
+
content: typeof Schema.String;
|
|
692
|
+
status: Schema.Literal<["pending", "acked"]>;
|
|
693
|
+
correlationId: Schema.NullOr<typeof Schema.String>;
|
|
694
|
+
taskId: Schema.NullOr<typeof Schema.String>;
|
|
695
|
+
metadata: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
696
|
+
createdAt: typeof Schema.String;
|
|
697
|
+
ackedAt: Schema.NullOr<typeof Schema.String>;
|
|
698
|
+
expiresAt: Schema.NullOr<typeof Schema.String>;
|
|
699
|
+
}>>;
|
|
700
|
+
channel: typeof Schema.String;
|
|
701
|
+
count: Schema.filter<typeof Schema.Number>;
|
|
702
|
+
}>;
|
|
703
|
+
export type InboxResponse = typeof InboxResponseSchema.Type;
|
|
636
704
|
//# sourceMappingURL=response.d.ts.map
|
package/dist/response.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAS3C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;IAWvC,oCAAoC;;IAEpC,gCAAgC;;IAEhC,4BAA4B;;IAE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