@spencerboucher/switchyard-client 0.16.0 → 0.17.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.js +27 -1
- package/dist/types/protocol/host-wire.d.ts +42 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2204,6 +2204,7 @@ var TermCoordinatorMsg = z12.discriminatedUnion("t", [
|
|
|
2204
2204
|
|
|
2205
2205
|
// packages/protocol/dist/host-wire.js
|
|
2206
2206
|
var Origin = z13.enum(["human", "automation"]);
|
|
2207
|
+
var DiffRev = z13.string().regex(/^(uncommitted|[0-9a-f]{40})$/);
|
|
2207
2208
|
var HostCommand = z13.discriminatedUnion("type", [
|
|
2208
2209
|
z13.object({
|
|
2209
2210
|
type: z13.literal("session.start"),
|
|
@@ -2346,7 +2347,15 @@ var HostCommand = z13.discriminatedUnion("type", [
|
|
|
2346
2347
|
type: z13.literal("workspace.diff"),
|
|
2347
2348
|
path: z13.string(),
|
|
2348
2349
|
base: z13.string().nullable(),
|
|
2349
|
-
file: z13.string().nullable()
|
|
2350
|
+
file: z13.string().nullable(),
|
|
2351
|
+
/** Hosts without gitLog.v1 never receive it. */
|
|
2352
|
+
rev: DiffRev.optional()
|
|
2353
|
+
}),
|
|
2354
|
+
z13.object({
|
|
2355
|
+
type: z13.literal("workspace.log"),
|
|
2356
|
+
path: z13.string(),
|
|
2357
|
+
base: z13.string().nullable(),
|
|
2358
|
+
limit: z13.number().int().min(1).max(200)
|
|
2350
2359
|
}),
|
|
2351
2360
|
z13.object({ type: z13.literal("workspace.files"), path: z13.string(), dir: z13.string() }),
|
|
2352
2361
|
z13.object({ type: z13.literal("workspace.readFile"), path: z13.string(), file: z13.string() }),
|
|
@@ -2430,6 +2439,23 @@ var ProjectSuggestion = z13.object({
|
|
|
2430
2439
|
lastActivityAt: z13.string()
|
|
2431
2440
|
});
|
|
2432
2441
|
var ProjectSuggestions = z13.object({ suggestions: z13.array(ProjectSuggestion) });
|
|
2442
|
+
var GitCommit = z13.object({
|
|
2443
|
+
sha: z13.string().regex(/^[0-9a-f]{40}$/),
|
|
2444
|
+
subject: z13.string().max(300),
|
|
2445
|
+
author: z13.string().max(200),
|
|
2446
|
+
authoredAt: z13.string(),
|
|
2447
|
+
pushed: z13.boolean()
|
|
2448
|
+
});
|
|
2449
|
+
var LogResult = z13.object({
|
|
2450
|
+
/** The base branch the commits are counted from. */
|
|
2451
|
+
base: z13.string(),
|
|
2452
|
+
/** `branch`: commits since the merge base; `recent`: HEAD's latest commits (no commits of its own). */
|
|
2453
|
+
scope: z13.enum(["branch", "recent"]),
|
|
2454
|
+
commits: z13.array(GitCommit).max(200),
|
|
2455
|
+
truncated: z13.boolean(),
|
|
2456
|
+
/** Changed and untracked files not committed yet. */
|
|
2457
|
+
uncommitted: z13.number().int().min(0)
|
|
2458
|
+
});
|
|
2433
2459
|
var DiffFile = z13.object({
|
|
2434
2460
|
path: z13.string(),
|
|
2435
2461
|
oldPath: z13.string().nullable(),
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
/** Host feature: the host answers `workspace.log` and `workspace.diff` with `rev`. */
|
|
3
|
+
export declare const GIT_LOG_FEATURE = "gitLog.v1";
|
|
4
|
+
/** A narrower diff: only uncommitted work, or one commit (full SHA) against its first parent. */
|
|
5
|
+
export declare const DiffRev: z.ZodString;
|
|
6
|
+
export type DiffRev = z.infer<typeof DiffRev>;
|
|
2
7
|
export declare const HostCommand: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
8
|
type: z.ZodLiteral<"session.start">;
|
|
4
9
|
sessionId: z.ZodString;
|
|
@@ -244,6 +249,12 @@ export declare const HostCommand: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
244
249
|
path: z.ZodString;
|
|
245
250
|
base: z.ZodNullable<z.ZodString>;
|
|
246
251
|
file: z.ZodNullable<z.ZodString>;
|
|
252
|
+
rev: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"workspace.log">;
|
|
255
|
+
path: z.ZodString;
|
|
256
|
+
base: z.ZodNullable<z.ZodString>;
|
|
257
|
+
limit: z.ZodNumber;
|
|
247
258
|
}, z.core.$strip>, z.ZodObject<{
|
|
248
259
|
type: z.ZodLiteral<"workspace.files">;
|
|
249
260
|
path: z.ZodString;
|
|
@@ -439,6 +450,31 @@ export declare const ProjectSuggestions: z.ZodObject<{
|
|
|
439
450
|
}, z.core.$strip>>;
|
|
440
451
|
}, z.core.$strip>;
|
|
441
452
|
export type ProjectSuggestions = z.infer<typeof ProjectSuggestions>;
|
|
453
|
+
export declare const GitCommit: z.ZodObject<{
|
|
454
|
+
sha: z.ZodString;
|
|
455
|
+
subject: z.ZodString;
|
|
456
|
+
author: z.ZodString;
|
|
457
|
+
authoredAt: z.ZodString;
|
|
458
|
+
pushed: z.ZodBoolean;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
export type GitCommit = z.infer<typeof GitCommit>;
|
|
461
|
+
export declare const LogResult: z.ZodObject<{
|
|
462
|
+
base: z.ZodString;
|
|
463
|
+
scope: z.ZodEnum<{
|
|
464
|
+
branch: "branch";
|
|
465
|
+
recent: "recent";
|
|
466
|
+
}>;
|
|
467
|
+
commits: z.ZodArray<z.ZodObject<{
|
|
468
|
+
sha: z.ZodString;
|
|
469
|
+
subject: z.ZodString;
|
|
470
|
+
author: z.ZodString;
|
|
471
|
+
authoredAt: z.ZodString;
|
|
472
|
+
pushed: z.ZodBoolean;
|
|
473
|
+
}, z.core.$strip>>;
|
|
474
|
+
truncated: z.ZodBoolean;
|
|
475
|
+
uncommitted: z.ZodNumber;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
export type LogResult = z.infer<typeof LogResult>;
|
|
442
478
|
export declare const DiffFile: z.ZodObject<{
|
|
443
479
|
path: z.ZodString;
|
|
444
480
|
oldPath: z.ZodNullable<z.ZodString>;
|
|
@@ -1336,6 +1372,12 @@ export declare const CoordinatorToHost: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1336
1372
|
path: z.ZodString;
|
|
1337
1373
|
base: z.ZodNullable<z.ZodString>;
|
|
1338
1374
|
file: z.ZodNullable<z.ZodString>;
|
|
1375
|
+
rev: z.ZodOptional<z.ZodString>;
|
|
1376
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1377
|
+
type: z.ZodLiteral<"workspace.log">;
|
|
1378
|
+
path: z.ZodString;
|
|
1379
|
+
base: z.ZodNullable<z.ZodString>;
|
|
1380
|
+
limit: z.ZodNumber;
|
|
1339
1381
|
}, z.core.$strip>, z.ZodObject<{
|
|
1340
1382
|
type: z.ZodLiteral<"workspace.files">;
|
|
1341
1383
|
path: z.ZodString;
|