@kmmao/happy-wire 0.3.0 → 0.4.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 +39 -1
- package/dist/index.d.cts +106 -2
- package/dist/index.d.mts +106 -2
- package/dist/index.mjs +37 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -320,6 +320,7 @@ const MachineMetadataSchema = z__namespace.object({
|
|
|
320
320
|
});
|
|
321
321
|
const TailscaleServeEntrySchema = z__namespace.object({
|
|
322
322
|
port: z__namespace.number(),
|
|
323
|
+
path: z__namespace.string().optional(),
|
|
323
324
|
protocol: z__namespace.string(),
|
|
324
325
|
target: z__namespace.string(),
|
|
325
326
|
funnel: z__namespace.boolean(),
|
|
@@ -334,6 +335,39 @@ const TailscaleInfoSchema = z__namespace.object({
|
|
|
334
335
|
version: z__namespace.string().optional(),
|
|
335
336
|
serves: z__namespace.array(TailscaleServeEntrySchema).optional()
|
|
336
337
|
});
|
|
338
|
+
const TunnelEntrySchema = z__namespace.object({
|
|
339
|
+
/** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
|
|
340
|
+
provider: z__namespace.string(),
|
|
341
|
+
/** Local port the service is running on */
|
|
342
|
+
localPort: z__namespace.number(),
|
|
343
|
+
/** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
|
|
344
|
+
remotePort: z__namespace.number().optional(),
|
|
345
|
+
/** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
|
|
346
|
+
protocol: z__namespace.string(),
|
|
347
|
+
/** Mount path (Tailscale serve path, e.g. "/api") */
|
|
348
|
+
path: z__namespace.string().optional(),
|
|
349
|
+
/** Proxy target URL "http://127.0.0.1:3000" */
|
|
350
|
+
target: z__namespace.string(),
|
|
351
|
+
/** Full public access URL if available */
|
|
352
|
+
publicUrl: z__namespace.string().optional(),
|
|
353
|
+
/** Access scope */
|
|
354
|
+
accessScope: z__namespace.enum(["public", "private", "tailnet"]),
|
|
355
|
+
/** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
|
|
356
|
+
hostname: z__namespace.string().optional(),
|
|
357
|
+
/** Provider-specific extra info */
|
|
358
|
+
metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
|
|
359
|
+
});
|
|
360
|
+
const TunnelProviderInfoSchema = z__namespace.object({
|
|
361
|
+
provider: z__namespace.string(),
|
|
362
|
+
status: z__namespace.enum(["available", "unavailable", "not-installed"]),
|
|
363
|
+
version: z__namespace.string().optional(),
|
|
364
|
+
entries: z__namespace.array(TunnelEntrySchema),
|
|
365
|
+
/** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
|
|
366
|
+
metadata: z__namespace.record(z__namespace.string(), z__namespace.string()).optional()
|
|
367
|
+
});
|
|
368
|
+
const TunnelStateSchema = z__namespace.object({
|
|
369
|
+
providers: z__namespace.array(TunnelProviderInfoSchema)
|
|
370
|
+
});
|
|
337
371
|
const DaemonStateSchema = z__namespace.object({
|
|
338
372
|
status: z__namespace.union([
|
|
339
373
|
z__namespace.enum(["running", "shutting-down"]),
|
|
@@ -349,7 +383,8 @@ const DaemonStateSchema = z__namespace.object({
|
|
|
349
383
|
z__namespace.string()
|
|
350
384
|
// Forward compatibility
|
|
351
385
|
]).optional(),
|
|
352
|
-
tailscale: TailscaleInfoSchema.optional()
|
|
386
|
+
tailscale: TailscaleInfoSchema.optional(),
|
|
387
|
+
tunnels: TunnelStateSchema.optional()
|
|
353
388
|
});
|
|
354
389
|
|
|
355
390
|
exports.AgentMessageSchema = AgentMessageSchema;
|
|
@@ -369,6 +404,9 @@ exports.SessionMessageSchema = SessionMessageSchema;
|
|
|
369
404
|
exports.SessionProtocolMessageSchema = SessionProtocolMessageSchema;
|
|
370
405
|
exports.TailscaleInfoSchema = TailscaleInfoSchema;
|
|
371
406
|
exports.TailscaleServeEntrySchema = TailscaleServeEntrySchema;
|
|
407
|
+
exports.TunnelEntrySchema = TunnelEntrySchema;
|
|
408
|
+
exports.TunnelProviderInfoSchema = TunnelProviderInfoSchema;
|
|
409
|
+
exports.TunnelStateSchema = TunnelStateSchema;
|
|
372
410
|
exports.UpdateBodySchema = UpdateBodySchema;
|
|
373
411
|
exports.UpdateMachineBodySchema = UpdateMachineBodySchema;
|
|
374
412
|
exports.UpdateNewMessageBodySchema = UpdateNewMessageBodySchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -1193,6 +1193,7 @@ declare const MachineMetadataSchema: z.ZodObject<{
|
|
|
1193
1193
|
type MachineMetadata = z.infer<typeof MachineMetadataSchema>;
|
|
1194
1194
|
declare const TailscaleServeEntrySchema: z.ZodObject<{
|
|
1195
1195
|
port: z.ZodNumber;
|
|
1196
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1196
1197
|
protocol: z.ZodString;
|
|
1197
1198
|
target: z.ZodString;
|
|
1198
1199
|
funnel: z.ZodBoolean;
|
|
@@ -1212,6 +1213,7 @@ declare const TailscaleInfoSchema: z.ZodObject<{
|
|
|
1212
1213
|
version: z.ZodOptional<z.ZodString>;
|
|
1213
1214
|
serves: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1214
1215
|
port: z.ZodNumber;
|
|
1216
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1215
1217
|
protocol: z.ZodString;
|
|
1216
1218
|
target: z.ZodString;
|
|
1217
1219
|
funnel: z.ZodBoolean;
|
|
@@ -1219,6 +1221,79 @@ declare const TailscaleInfoSchema: z.ZodObject<{
|
|
|
1219
1221
|
}, z.core.$strip>>>;
|
|
1220
1222
|
}, z.core.$strip>;
|
|
1221
1223
|
type TailscaleInfo = z.infer<typeof TailscaleInfoSchema>;
|
|
1224
|
+
declare const TunnelEntrySchema: z.ZodObject<{
|
|
1225
|
+
provider: z.ZodString;
|
|
1226
|
+
localPort: z.ZodNumber;
|
|
1227
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1228
|
+
protocol: z.ZodString;
|
|
1229
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
target: z.ZodString;
|
|
1231
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
accessScope: z.ZodEnum<{
|
|
1233
|
+
public: "public";
|
|
1234
|
+
private: "private";
|
|
1235
|
+
tailnet: "tailnet";
|
|
1236
|
+
}>;
|
|
1237
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
type TunnelEntry = z.infer<typeof TunnelEntrySchema>;
|
|
1241
|
+
declare const TunnelProviderInfoSchema: z.ZodObject<{
|
|
1242
|
+
provider: z.ZodString;
|
|
1243
|
+
status: z.ZodEnum<{
|
|
1244
|
+
"not-installed": "not-installed";
|
|
1245
|
+
available: "available";
|
|
1246
|
+
unavailable: "unavailable";
|
|
1247
|
+
}>;
|
|
1248
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1250
|
+
provider: z.ZodString;
|
|
1251
|
+
localPort: z.ZodNumber;
|
|
1252
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1253
|
+
protocol: z.ZodString;
|
|
1254
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1255
|
+
target: z.ZodString;
|
|
1256
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
accessScope: z.ZodEnum<{
|
|
1258
|
+
public: "public";
|
|
1259
|
+
private: "private";
|
|
1260
|
+
tailnet: "tailnet";
|
|
1261
|
+
}>;
|
|
1262
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1263
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1264
|
+
}, z.core.$strip>>;
|
|
1265
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1266
|
+
}, z.core.$strip>;
|
|
1267
|
+
type TunnelProviderInfo = z.infer<typeof TunnelProviderInfoSchema>;
|
|
1268
|
+
declare const TunnelStateSchema: z.ZodObject<{
|
|
1269
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
1270
|
+
provider: z.ZodString;
|
|
1271
|
+
status: z.ZodEnum<{
|
|
1272
|
+
"not-installed": "not-installed";
|
|
1273
|
+
available: "available";
|
|
1274
|
+
unavailable: "unavailable";
|
|
1275
|
+
}>;
|
|
1276
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1278
|
+
provider: z.ZodString;
|
|
1279
|
+
localPort: z.ZodNumber;
|
|
1280
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1281
|
+
protocol: z.ZodString;
|
|
1282
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
target: z.ZodString;
|
|
1284
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
accessScope: z.ZodEnum<{
|
|
1286
|
+
public: "public";
|
|
1287
|
+
private: "private";
|
|
1288
|
+
tailnet: "tailnet";
|
|
1289
|
+
}>;
|
|
1290
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1291
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1292
|
+
}, z.core.$strip>>;
|
|
1293
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1294
|
+
}, z.core.$strip>>;
|
|
1295
|
+
}, z.core.$strip>;
|
|
1296
|
+
type TunnelState = z.infer<typeof TunnelStateSchema>;
|
|
1222
1297
|
declare const DaemonStateSchema: z.ZodObject<{
|
|
1223
1298
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1224
1299
|
running: "running";
|
|
@@ -1247,14 +1322,43 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1247
1322
|
version: z.ZodOptional<z.ZodString>;
|
|
1248
1323
|
serves: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1249
1324
|
port: z.ZodNumber;
|
|
1325
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1250
1326
|
protocol: z.ZodString;
|
|
1251
1327
|
target: z.ZodString;
|
|
1252
1328
|
funnel: z.ZodBoolean;
|
|
1253
1329
|
hostname: z.ZodString;
|
|
1254
1330
|
}, z.core.$strip>>>;
|
|
1255
1331
|
}, z.core.$strip>>;
|
|
1332
|
+
tunnels: z.ZodOptional<z.ZodObject<{
|
|
1333
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
1334
|
+
provider: z.ZodString;
|
|
1335
|
+
status: z.ZodEnum<{
|
|
1336
|
+
"not-installed": "not-installed";
|
|
1337
|
+
available: "available";
|
|
1338
|
+
unavailable: "unavailable";
|
|
1339
|
+
}>;
|
|
1340
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1342
|
+
provider: z.ZodString;
|
|
1343
|
+
localPort: z.ZodNumber;
|
|
1344
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1345
|
+
protocol: z.ZodString;
|
|
1346
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
target: z.ZodString;
|
|
1348
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
accessScope: z.ZodEnum<{
|
|
1350
|
+
public: "public";
|
|
1351
|
+
private: "private";
|
|
1352
|
+
tailnet: "tailnet";
|
|
1353
|
+
}>;
|
|
1354
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1356
|
+
}, z.core.$strip>>;
|
|
1357
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1358
|
+
}, z.core.$strip>>;
|
|
1359
|
+
}, z.core.$strip>>;
|
|
1256
1360
|
}, z.core.$strip>;
|
|
1257
1361
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1258
1362
|
|
|
1259
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1260
|
-
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, DaemonState, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, Update, UpdateBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
|
1363
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1364
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, DaemonState, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, Update, UpdateBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
package/dist/index.d.mts
CHANGED
|
@@ -1193,6 +1193,7 @@ declare const MachineMetadataSchema: z.ZodObject<{
|
|
|
1193
1193
|
type MachineMetadata = z.infer<typeof MachineMetadataSchema>;
|
|
1194
1194
|
declare const TailscaleServeEntrySchema: z.ZodObject<{
|
|
1195
1195
|
port: z.ZodNumber;
|
|
1196
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1196
1197
|
protocol: z.ZodString;
|
|
1197
1198
|
target: z.ZodString;
|
|
1198
1199
|
funnel: z.ZodBoolean;
|
|
@@ -1212,6 +1213,7 @@ declare const TailscaleInfoSchema: z.ZodObject<{
|
|
|
1212
1213
|
version: z.ZodOptional<z.ZodString>;
|
|
1213
1214
|
serves: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1214
1215
|
port: z.ZodNumber;
|
|
1216
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1215
1217
|
protocol: z.ZodString;
|
|
1216
1218
|
target: z.ZodString;
|
|
1217
1219
|
funnel: z.ZodBoolean;
|
|
@@ -1219,6 +1221,79 @@ declare const TailscaleInfoSchema: z.ZodObject<{
|
|
|
1219
1221
|
}, z.core.$strip>>>;
|
|
1220
1222
|
}, z.core.$strip>;
|
|
1221
1223
|
type TailscaleInfo = z.infer<typeof TailscaleInfoSchema>;
|
|
1224
|
+
declare const TunnelEntrySchema: z.ZodObject<{
|
|
1225
|
+
provider: z.ZodString;
|
|
1226
|
+
localPort: z.ZodNumber;
|
|
1227
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1228
|
+
protocol: z.ZodString;
|
|
1229
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
target: z.ZodString;
|
|
1231
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
accessScope: z.ZodEnum<{
|
|
1233
|
+
public: "public";
|
|
1234
|
+
private: "private";
|
|
1235
|
+
tailnet: "tailnet";
|
|
1236
|
+
}>;
|
|
1237
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
type TunnelEntry = z.infer<typeof TunnelEntrySchema>;
|
|
1241
|
+
declare const TunnelProviderInfoSchema: z.ZodObject<{
|
|
1242
|
+
provider: z.ZodString;
|
|
1243
|
+
status: z.ZodEnum<{
|
|
1244
|
+
"not-installed": "not-installed";
|
|
1245
|
+
available: "available";
|
|
1246
|
+
unavailable: "unavailable";
|
|
1247
|
+
}>;
|
|
1248
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1250
|
+
provider: z.ZodString;
|
|
1251
|
+
localPort: z.ZodNumber;
|
|
1252
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1253
|
+
protocol: z.ZodString;
|
|
1254
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1255
|
+
target: z.ZodString;
|
|
1256
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
accessScope: z.ZodEnum<{
|
|
1258
|
+
public: "public";
|
|
1259
|
+
private: "private";
|
|
1260
|
+
tailnet: "tailnet";
|
|
1261
|
+
}>;
|
|
1262
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1263
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1264
|
+
}, z.core.$strip>>;
|
|
1265
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1266
|
+
}, z.core.$strip>;
|
|
1267
|
+
type TunnelProviderInfo = z.infer<typeof TunnelProviderInfoSchema>;
|
|
1268
|
+
declare const TunnelStateSchema: z.ZodObject<{
|
|
1269
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
1270
|
+
provider: z.ZodString;
|
|
1271
|
+
status: z.ZodEnum<{
|
|
1272
|
+
"not-installed": "not-installed";
|
|
1273
|
+
available: "available";
|
|
1274
|
+
unavailable: "unavailable";
|
|
1275
|
+
}>;
|
|
1276
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1278
|
+
provider: z.ZodString;
|
|
1279
|
+
localPort: z.ZodNumber;
|
|
1280
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1281
|
+
protocol: z.ZodString;
|
|
1282
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
target: z.ZodString;
|
|
1284
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
accessScope: z.ZodEnum<{
|
|
1286
|
+
public: "public";
|
|
1287
|
+
private: "private";
|
|
1288
|
+
tailnet: "tailnet";
|
|
1289
|
+
}>;
|
|
1290
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1291
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1292
|
+
}, z.core.$strip>>;
|
|
1293
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1294
|
+
}, z.core.$strip>>;
|
|
1295
|
+
}, z.core.$strip>;
|
|
1296
|
+
type TunnelState = z.infer<typeof TunnelStateSchema>;
|
|
1222
1297
|
declare const DaemonStateSchema: z.ZodObject<{
|
|
1223
1298
|
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1224
1299
|
running: "running";
|
|
@@ -1247,14 +1322,43 @@ declare const DaemonStateSchema: z.ZodObject<{
|
|
|
1247
1322
|
version: z.ZodOptional<z.ZodString>;
|
|
1248
1323
|
serves: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1249
1324
|
port: z.ZodNumber;
|
|
1325
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1250
1326
|
protocol: z.ZodString;
|
|
1251
1327
|
target: z.ZodString;
|
|
1252
1328
|
funnel: z.ZodBoolean;
|
|
1253
1329
|
hostname: z.ZodString;
|
|
1254
1330
|
}, z.core.$strip>>>;
|
|
1255
1331
|
}, z.core.$strip>>;
|
|
1332
|
+
tunnels: z.ZodOptional<z.ZodObject<{
|
|
1333
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
1334
|
+
provider: z.ZodString;
|
|
1335
|
+
status: z.ZodEnum<{
|
|
1336
|
+
"not-installed": "not-installed";
|
|
1337
|
+
available: "available";
|
|
1338
|
+
unavailable: "unavailable";
|
|
1339
|
+
}>;
|
|
1340
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
1342
|
+
provider: z.ZodString;
|
|
1343
|
+
localPort: z.ZodNumber;
|
|
1344
|
+
remotePort: z.ZodOptional<z.ZodNumber>;
|
|
1345
|
+
protocol: z.ZodString;
|
|
1346
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
target: z.ZodString;
|
|
1348
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
accessScope: z.ZodEnum<{
|
|
1350
|
+
public: "public";
|
|
1351
|
+
private: "private";
|
|
1352
|
+
tailnet: "tailnet";
|
|
1353
|
+
}>;
|
|
1354
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1356
|
+
}, z.core.$strip>>;
|
|
1357
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1358
|
+
}, z.core.$strip>>;
|
|
1359
|
+
}, z.core.$strip>>;
|
|
1256
1360
|
}, z.core.$strip>;
|
|
1257
1361
|
type DaemonState = z.infer<typeof DaemonStateSchema>;
|
|
1258
1362
|
|
|
1259
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1260
|
-
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, DaemonState, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, Update, UpdateBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
|
1363
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
1364
|
+
export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, DaemonState, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, TailscaleInfo, TailscaleServeEntry, TunnelEntry, TunnelProviderInfo, TunnelState, Update, UpdateBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };
|
package/dist/index.mjs
CHANGED
|
@@ -299,6 +299,7 @@ const MachineMetadataSchema = z.object({
|
|
|
299
299
|
});
|
|
300
300
|
const TailscaleServeEntrySchema = z.object({
|
|
301
301
|
port: z.number(),
|
|
302
|
+
path: z.string().optional(),
|
|
302
303
|
protocol: z.string(),
|
|
303
304
|
target: z.string(),
|
|
304
305
|
funnel: z.boolean(),
|
|
@@ -313,6 +314,39 @@ const TailscaleInfoSchema = z.object({
|
|
|
313
314
|
version: z.string().optional(),
|
|
314
315
|
serves: z.array(TailscaleServeEntrySchema).optional()
|
|
315
316
|
});
|
|
317
|
+
const TunnelEntrySchema = z.object({
|
|
318
|
+
/** Provider identifier: "tailscale" | "upnp" | "cloudflare" | "frp" */
|
|
319
|
+
provider: z.string(),
|
|
320
|
+
/** Local port the service is running on */
|
|
321
|
+
localPort: z.number(),
|
|
322
|
+
/** Remote/public port (e.g. UPnP external port, Tailscale HTTPS port) */
|
|
323
|
+
remotePort: z.number().optional(),
|
|
324
|
+
/** Protocol: "HTTPS" | "HTTP" | "TCP" | "UDP" */
|
|
325
|
+
protocol: z.string(),
|
|
326
|
+
/** Mount path (Tailscale serve path, e.g. "/api") */
|
|
327
|
+
path: z.string().optional(),
|
|
328
|
+
/** Proxy target URL "http://127.0.0.1:3000" */
|
|
329
|
+
target: z.string(),
|
|
330
|
+
/** Full public access URL if available */
|
|
331
|
+
publicUrl: z.string().optional(),
|
|
332
|
+
/** Access scope */
|
|
333
|
+
accessScope: z.enum(["public", "private", "tailnet"]),
|
|
334
|
+
/** Hostname (Tailscale MagicDNS, Cloudflare domain, etc.) */
|
|
335
|
+
hostname: z.string().optional(),
|
|
336
|
+
/** Provider-specific extra info */
|
|
337
|
+
metadata: z.record(z.string(), z.string()).optional()
|
|
338
|
+
});
|
|
339
|
+
const TunnelProviderInfoSchema = z.object({
|
|
340
|
+
provider: z.string(),
|
|
341
|
+
status: z.enum(["available", "unavailable", "not-installed"]),
|
|
342
|
+
version: z.string().optional(),
|
|
343
|
+
entries: z.array(TunnelEntrySchema),
|
|
344
|
+
/** Provider-level info (e.g. Tailscale ipv4/hostname, UPnP external IP) */
|
|
345
|
+
metadata: z.record(z.string(), z.string()).optional()
|
|
346
|
+
});
|
|
347
|
+
const TunnelStateSchema = z.object({
|
|
348
|
+
providers: z.array(TunnelProviderInfoSchema)
|
|
349
|
+
});
|
|
316
350
|
const DaemonStateSchema = z.object({
|
|
317
351
|
status: z.union([
|
|
318
352
|
z.enum(["running", "shutting-down"]),
|
|
@@ -328,7 +362,8 @@ const DaemonStateSchema = z.object({
|
|
|
328
362
|
z.string()
|
|
329
363
|
// Forward compatibility
|
|
330
364
|
]).optional(),
|
|
331
|
-
tailscale: TailscaleInfoSchema.optional()
|
|
365
|
+
tailscale: TailscaleInfoSchema.optional(),
|
|
366
|
+
tunnels: TunnelStateSchema.optional()
|
|
332
367
|
});
|
|
333
368
|
|
|
334
|
-
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|
|
369
|
+
export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, DaemonStateSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
|