@heynixie/contract 0.66.0 → 0.68.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.d.ts
CHANGED
|
@@ -12,4 +12,7 @@ export { proposalOutcomeSchema } from './proposal-outcome-schema.js';
|
|
|
12
12
|
export { renderSessionCookie } from './render-session-cookie.js';
|
|
13
13
|
export { sessionCookieName } from './session-cookie-name.js';
|
|
14
14
|
export { spanSchema } from './span-schema.js';
|
|
15
|
+
export { taskMessageInputSchema } from './task-message-input-schema.js';
|
|
16
|
+
export { taskMessageKindSchema } from './task-message-kind-schema.js';
|
|
17
|
+
export { taskMessageResultSchema } from './task-message-result-schema.js';
|
|
15
18
|
export type { ContractClient, ContractInputs, ContractOutputs, HostContractClient, HostContractInputs, ImageMediaType, LogRecord, PendingInput, Span, SpanSource, SpanState, } from './types.js';
|
package/dist/index.js
CHANGED
|
@@ -1219,6 +1219,37 @@ function renderSessionCookie(token) {
|
|
|
1219
1219
|
const maxAgeS = token === null ? 0 : MAX_AGE_S;
|
|
1220
1220
|
return `${sessionCookieName}=${token ?? ""}; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=${maxAgeS}`;
|
|
1221
1221
|
}
|
|
1222
|
+
// src/task-message-input-schema.ts
|
|
1223
|
+
import { z as z12 } from "zod";
|
|
1224
|
+
|
|
1225
|
+
// src/task-message-kind-schema.ts
|
|
1226
|
+
import { z as z11 } from "zod";
|
|
1227
|
+
var taskMessageKindSchema = z11.enum([
|
|
1228
|
+
"progress",
|
|
1229
|
+
"question",
|
|
1230
|
+
"request",
|
|
1231
|
+
"report",
|
|
1232
|
+
"reply",
|
|
1233
|
+
"chat"
|
|
1234
|
+
]);
|
|
1235
|
+
|
|
1236
|
+
// src/task-message-input-schema.ts
|
|
1237
|
+
var taskMessageInputSchema = z12.object({
|
|
1238
|
+
to: z12.string(),
|
|
1239
|
+
kind: taskMessageKindSchema,
|
|
1240
|
+
body: z12.string(),
|
|
1241
|
+
replyTo: z12.string().optional(),
|
|
1242
|
+
onBehalfOf: z12.string().array().optional(),
|
|
1243
|
+
wake: z12.boolean().optional()
|
|
1244
|
+
});
|
|
1245
|
+
// src/task-message-result-schema.ts
|
|
1246
|
+
import { z as z13 } from "zod";
|
|
1247
|
+
var taskMessageResultSchema = z13.object({
|
|
1248
|
+
messageID: z13.string(),
|
|
1249
|
+
woke: z13.boolean(),
|
|
1250
|
+
hop: z13.int().nonnegative(),
|
|
1251
|
+
note: z13.string().optional()
|
|
1252
|
+
});
|
|
1222
1253
|
export {
|
|
1223
1254
|
buildPendingInput,
|
|
1224
1255
|
buildQueryUtils,
|
|
@@ -1232,5 +1263,8 @@ export {
|
|
|
1232
1263
|
proposalOutcomeSchema,
|
|
1233
1264
|
renderSessionCookie,
|
|
1234
1265
|
sessionCookieName,
|
|
1235
|
-
spanSchema
|
|
1266
|
+
spanSchema,
|
|
1267
|
+
taskMessageInputSchema,
|
|
1268
|
+
taskMessageKindSchema,
|
|
1269
|
+
taskMessageResultSchema
|
|
1236
1270
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const taskMessageInputSchema: z.ZodObject<{
|
|
3
|
+
to: z.ZodString;
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
chat: "chat";
|
|
6
|
+
progress: "progress";
|
|
7
|
+
question: "question";
|
|
8
|
+
reply: "reply";
|
|
9
|
+
report: "report";
|
|
10
|
+
request: "request";
|
|
11
|
+
}>;
|
|
12
|
+
body: z.ZodString;
|
|
13
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
14
|
+
onBehalfOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
wake: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|