@zgeoff/imp-client 0.17.0 → 0.18.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
@@ -363,6 +363,20 @@ declare const ImpEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
363
363
  reserveMib: z.ZodOptional<z.ZodInt>;
364
364
  neededMib: z.ZodOptional<z.ZodInt>;
365
365
  protectedCount: z.ZodOptional<z.ZodInt>;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ v: z.ZodLiteral<1>;
368
+ at: z.ZodDate;
369
+ ev: z.ZodLiteral<"AgentExec">;
370
+ name: z.ZodString;
371
+ actor: z.ZodEnum<{
372
+ dashboard: "dashboard";
373
+ ssh: "ssh";
374
+ tailnet: "tailnet";
375
+ token: "token";
376
+ }>;
377
+ actorName: z.ZodString;
378
+ tty: z.ZodBoolean;
379
+ command: z.ZodString;
366
380
  }, z.core.$strip>], "ev">;
367
381
  type ImpEvent = z.infer<typeof ImpEventSchema>;
368
382
  //#endregion
@@ -11443,6 +11457,15 @@ declare const impContract: {
11443
11457
  reserveMib?: number | undefined;
11444
11458
  neededMib?: number | undefined;
11445
11459
  protectedCount?: number | undefined;
11460
+ } | {
11461
+ v: 1;
11462
+ at: Date;
11463
+ ev: "AgentExec";
11464
+ name: string;
11465
+ actor: "dashboard" | "ssh" | "tailnet" | "token";
11466
+ actorName: string;
11467
+ tty: boolean;
11468
+ command: string;
11446
11469
  }, unknown, void>, import("@orpc/client").AsyncIteratorClass<{
11447
11470
  v: 1;
11448
11471
  at: Date;
@@ -11692,6 +11715,15 @@ declare const impContract: {
11692
11715
  reserveMib?: number | undefined;
11693
11716
  neededMib?: number | undefined;
11694
11717
  protectedCount?: number | undefined;
11718
+ } | {
11719
+ v: 1;
11720
+ at: Date;
11721
+ ev: "AgentExec";
11722
+ name: string;
11723
+ actor: "dashboard" | "ssh" | "tailnet" | "token";
11724
+ actorName: string;
11725
+ tty: boolean;
11726
+ command: string;
11695
11727
  }, unknown, void>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
11696
11728
  NOT_FOUND: {
11697
11729
  readonly message: "Not found";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { RPCLink } from "@orpc/client/fetch";
3
3
  import * as z from "zod";
4
4
  //#endregion
5
5
  //#region src/check-server.ts
6
- const CLIENT_VERSION = "0.17.0";
6
+ const CLIENT_VERSION = "0.18.0";
7
7
  async function checkServer(rpc) {
8
8
  const info = await rpc.system.info();
9
9
  return {
@@ -289,6 +289,7 @@ const ExecStartMessageSchema = z.object({
289
289
  rows: DimensionSchema.optional(),
290
290
  session: SessionNameSchema.optional(),
291
291
  tool: z.enum(["tar"]).optional(),
292
+ outer: z.boolean().optional(),
292
293
  killGraceMs: z.int().min(1).max(6e4).optional(),
293
294
  resumeFrom: ResumeFromSchema.optional()
294
295
  }).refine((start) => start.session === void 0 || start.tty, {
@@ -303,6 +304,9 @@ const ExecStartMessageSchema = z.object({
303
304
  }).refine((start) => start.tool === void 0 || !start.tty && start.session === void 0 && start.env === void 0 && start.cwd === void 0, {
304
305
  message: "a tool takes no tty, session, env or cwd",
305
306
  path: ["tool"]
307
+ }).refine((start) => start.outer !== true || start.tool === void 0 && start.session === void 0, {
308
+ message: "an outer exec takes no tool or session",
309
+ path: ["outer"]
306
310
  });
307
311
  const ExecAttachMessageSchema = z.object({
308
312
  type: z.literal("attach"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/imp-client",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Typed client for impd, the imp host daemon: imps, checkpoints, images and exec",
5
5
  "license": "MIT",
6
6
  "repository": {