@atcx/contract 0.0.0 → 7.4.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/LICENSE +21 -0
- package/README.md +45 -30
- package/dist/agent-list.d.ts +215 -0
- package/dist/agent-session-id.d.ts +2 -0
- package/dist/answer-view.d.ts +10 -0
- package/dist/check-daemon.d.ts +15 -0
- package/dist/commit-id-pattern.d.ts +1 -0
- package/dist/config-file-schema.d.ts +15 -0
- package/dist/contract-version.d.ts +1 -0
- package/dist/daemon-contract.d.ts +1646 -0
- package/dist/daemon-error-map.d.ts +9 -0
- package/dist/daemon-event.d.ts +424 -0
- package/dist/daemon-features.d.ts +2 -0
- package/dist/daemon-id.d.ts +2 -0
- package/dist/events-page.d.ts +39 -0
- package/dist/fleet-entry-view.d.ts +32 -0
- package/dist/fleet-event.d.ts +35 -0
- package/dist/git-probe-result.d.ts +18 -0
- package/dist/git-ref.d.ts +10 -0
- package/dist/hello-result.d.ts +16 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +1121 -0
- package/dist/light/error-codes.d.ts +2 -0
- package/dist/light/index.d.ts +6 -0
- package/dist/light/index.js +131 -0
- package/dist/light/message-sender.d.ts +17 -0
- package/dist/light/resolve-atc-paths.d.ts +11 -0
- package/dist/light/resolve-home-dir.d.ts +1 -0
- package/dist/light/resolve-state-dir.d.ts +1 -0
- package/dist/light/session-env-names.d.ts +7 -0
- package/dist/menu-view.d.ts +12 -0
- package/dist/message-answer.d.ts +10 -0
- package/dist/message-id.d.ts +2 -0
- package/dist/message-status.d.ts +7 -0
- package/dist/message-view.d.ts +36 -0
- package/dist/note-view.d.ts +10 -0
- package/dist/procedure-meta.d.ts +10 -0
- package/dist/published-record-schema.d.ts +3 -0
- package/dist/published-record.d.ts +39 -0
- package/dist/request-param-schemas.d.ts +252 -0
- package/dist/restart-result.d.ts +28 -0
- package/dist/schema/build-optional-boolean.d.ts +2 -0
- package/dist/schema/build-optional-non-empty-string.d.ts +2 -0
- package/dist/schema/build-optional-string-array.d.ts +2 -0
- package/dist/schema/build-optional-string.d.ts +2 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.js +26 -0
- package/dist/session-descriptor.d.ts +71 -0
- package/dist/session-id.d.ts +2 -0
- package/dist/session-lifecycle.d.ts +26 -0
- package/dist/session-workspace.d.ts +8 -0
- package/dist/source-candidate.d.ts +13 -0
- package/dist/source-entry.d.ts +10 -0
- package/dist/source-interpretation.d.ts +14 -0
- package/dist/source-pick.d.ts +9 -0
- package/dist/spawn-answer.d.ts +73 -0
- package/dist/spawn-option-spec.d.ts +16 -0
- package/dist/to-agent-session-id.d.ts +2 -0
- package/dist/to-daemon-id.d.ts +2 -0
- package/dist/to-message-id.d.ts +2 -0
- package/dist/to-session-id.d.ts +2 -0
- package/dist/transcript-row.d.ts +14 -0
- package/package.json +34 -6
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ERROR_CODES: readonly ['protocol_mismatch', 'unauthorized', 'unknown_method', 'bad_args', 'no_such_session', 'session_dead', 'permission_pending', 'menu_changed', 'menu_label_mismatch', 'menu_busy', 'unsupported', 'unsupported_operation', 'unknown_target', 'target_unavailable', 'target_changed', 'target_config_invalid', 'target_forbidden', 'not_a_git_repo', 'no_commits', 'unreadable_tree', 'has_submodules', 'lfs_unsupported', 'workspace_dirty', 'no_origin', 'invalid_git_url', 'git_transports_invalid', 'unpushed_head', 'credential_in_url', 'credential_missing', 'ref_not_found', 'clone_failed', 'git_output_open', 'sanitize_failed', 'tar_failed', 'workspace_exists', 'workspace_overlap', 'transfer_failed', 'workspace_mismatch', 'scope_invalid', 'github_unavailable', 'host_unavailable', 'auth_not_configured', 'auth_target_unsupported', 'auth_signin_needed', 'auth_token_scope', 'auth_token_too_broad', 'auth_host_out_of_scope', 'auth_secret_not_grantable', 'auth_secret_mismatch', 'auth_runtime_mismatch', 'auth_runtime_exists', 'auth_grant_missing', 'auth_grants_mismatch', 'auth_rebind_required', 'auth_blocked', 'auth_binding_mismatch', 'auth_binding_invalid', 'auth_revocation_pending', 'broker_not_ready', 'auth_placeholder_unsupported', 'host_leased', 'confirmation_required', 'confirm_token_invalid', 'session_pinned', 'session_live', 'already_answered', 'too_slow', 'stale_epoch', 'idempotency_conflict', 'outcome_unknown', 'idempotency_key_unknown', 'internal'];
|
|
2
|
+
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// packages/contract/src/light/error-codes.ts
|
|
2
|
+
var ERROR_CODES = [
|
|
3
|
+
"protocol_mismatch",
|
|
4
|
+
"unauthorized",
|
|
5
|
+
"unknown_method",
|
|
6
|
+
"bad_args",
|
|
7
|
+
"no_such_session",
|
|
8
|
+
"session_dead",
|
|
9
|
+
"permission_pending",
|
|
10
|
+
"menu_changed",
|
|
11
|
+
"menu_label_mismatch",
|
|
12
|
+
"menu_busy",
|
|
13
|
+
"unsupported",
|
|
14
|
+
"unsupported_operation",
|
|
15
|
+
"unknown_target",
|
|
16
|
+
"target_unavailable",
|
|
17
|
+
"target_changed",
|
|
18
|
+
"target_config_invalid",
|
|
19
|
+
"target_forbidden",
|
|
20
|
+
"not_a_git_repo",
|
|
21
|
+
"no_commits",
|
|
22
|
+
"unreadable_tree",
|
|
23
|
+
"has_submodules",
|
|
24
|
+
"lfs_unsupported",
|
|
25
|
+
"workspace_dirty",
|
|
26
|
+
"no_origin",
|
|
27
|
+
"invalid_git_url",
|
|
28
|
+
"git_transports_invalid",
|
|
29
|
+
"unpushed_head",
|
|
30
|
+
"credential_in_url",
|
|
31
|
+
"credential_missing",
|
|
32
|
+
"ref_not_found",
|
|
33
|
+
"clone_failed",
|
|
34
|
+
"git_output_open",
|
|
35
|
+
"sanitize_failed",
|
|
36
|
+
"tar_failed",
|
|
37
|
+
"workspace_exists",
|
|
38
|
+
"workspace_overlap",
|
|
39
|
+
"transfer_failed",
|
|
40
|
+
"workspace_mismatch",
|
|
41
|
+
"scope_invalid",
|
|
42
|
+
"github_unavailable",
|
|
43
|
+
"host_unavailable",
|
|
44
|
+
"auth_not_configured",
|
|
45
|
+
"auth_target_unsupported",
|
|
46
|
+
"auth_signin_needed",
|
|
47
|
+
"auth_token_scope",
|
|
48
|
+
"auth_token_too_broad",
|
|
49
|
+
"auth_host_out_of_scope",
|
|
50
|
+
"auth_secret_not_grantable",
|
|
51
|
+
"auth_secret_mismatch",
|
|
52
|
+
"auth_runtime_mismatch",
|
|
53
|
+
"auth_runtime_exists",
|
|
54
|
+
"auth_grant_missing",
|
|
55
|
+
"auth_grants_mismatch",
|
|
56
|
+
"auth_rebind_required",
|
|
57
|
+
"auth_blocked",
|
|
58
|
+
"auth_binding_mismatch",
|
|
59
|
+
"auth_binding_invalid",
|
|
60
|
+
"auth_revocation_pending",
|
|
61
|
+
"broker_not_ready",
|
|
62
|
+
"auth_placeholder_unsupported",
|
|
63
|
+
"host_leased",
|
|
64
|
+
"confirmation_required",
|
|
65
|
+
"confirm_token_invalid",
|
|
66
|
+
"session_pinned",
|
|
67
|
+
"session_live",
|
|
68
|
+
"already_answered",
|
|
69
|
+
"too_slow",
|
|
70
|
+
"stale_epoch",
|
|
71
|
+
"idempotency_conflict",
|
|
72
|
+
"outcome_unknown",
|
|
73
|
+
"idempotency_key_unknown",
|
|
74
|
+
"internal"
|
|
75
|
+
];
|
|
76
|
+
// packages/contract/src/light/message-sender.ts
|
|
77
|
+
import { z } from "zod";
|
|
78
|
+
var MESSAGE_SENDER_SCHEMA = z.discriminatedUnion("kind", [
|
|
79
|
+
z.object({ kind: z.literal("connector"), client: z.string(), name: z.string() }),
|
|
80
|
+
z.object({ kind: z.literal("session"), session: z.string(), name: z.string() }),
|
|
81
|
+
z.object({ kind: z.literal("local"), name: z.string() }),
|
|
82
|
+
z.object({ kind: z.literal("owner"), name: z.string() })
|
|
83
|
+
]);
|
|
84
|
+
// packages/contract/src/light/resolve-atc-paths.ts
|
|
85
|
+
import { join as join2 } from "node:path";
|
|
86
|
+
|
|
87
|
+
// packages/contract/src/light/resolve-home-dir.ts
|
|
88
|
+
import { homedir } from "node:os";
|
|
89
|
+
function resolveHomeDir(env = process.env) {
|
|
90
|
+
const home = env["HOME"];
|
|
91
|
+
return home !== undefined && home !== "" ? home : homedir();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// packages/contract/src/light/resolve-state-dir.ts
|
|
95
|
+
import { join } from "node:path";
|
|
96
|
+
function resolveStateDir(home) {
|
|
97
|
+
return join(home, ".local", "state", "atc");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// packages/contract/src/light/resolve-atc-paths.ts
|
|
101
|
+
function resolveAtcPaths(env) {
|
|
102
|
+
const home = resolveHomeDir(env);
|
|
103
|
+
const stateDir = resolveStateDir(home);
|
|
104
|
+
const runtimeDir = env["XDG_RUNTIME_DIR"] ?? stateDir;
|
|
105
|
+
return {
|
|
106
|
+
configFile: join2(home, ".config", "atc", "config.json"),
|
|
107
|
+
stateDir,
|
|
108
|
+
socketPath: join2(runtimeDir, "atc.sock"),
|
|
109
|
+
daemonSocketPath: join2(runtimeDir, "atc-daemon.sock"),
|
|
110
|
+
eventsSocketPath: join2(runtimeDir, "atc-events.sock"),
|
|
111
|
+
daemonPidFile: join2(runtimeDir, "atc-daemon.pid"),
|
|
112
|
+
daemonRecordFile: join2(stateDir, "daemon.json"),
|
|
113
|
+
statusFile: join2(stateDir, "status.json")
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
// packages/contract/src/light/session-env-names.ts
|
|
117
|
+
var SESSION_ENV_NAMES = {
|
|
118
|
+
sessionID: "ATC_SESSION_ID",
|
|
119
|
+
socket: "ATC_SOCKET",
|
|
120
|
+
bridge: "ATC_BRIDGE",
|
|
121
|
+
outbox: "ATC_OUTBOX",
|
|
122
|
+
sessionRecord: "ATC_SESSION_RECORD"
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
ERROR_CODES,
|
|
126
|
+
MESSAGE_SENDER_SCHEMA,
|
|
127
|
+
SESSION_ENV_NAMES,
|
|
128
|
+
resolveAtcPaths,
|
|
129
|
+
resolveHomeDir,
|
|
130
|
+
resolveStateDir
|
|
131
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MESSAGE_SENDER_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"connector">;
|
|
4
|
+
client: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"session">;
|
|
8
|
+
session: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"local">;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"owner">;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
}, z.core.$strip>], "kind">;
|
|
17
|
+
export type MessageSender = z.output<typeof MESSAGE_SENDER_SCHEMA>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface AtcPaths {
|
|
2
|
+
readonly configFile: string;
|
|
3
|
+
readonly stateDir: string;
|
|
4
|
+
readonly socketPath: string;
|
|
5
|
+
readonly daemonSocketPath: string;
|
|
6
|
+
readonly eventsSocketPath: string;
|
|
7
|
+
readonly daemonPidFile: string;
|
|
8
|
+
readonly daemonRecordFile: string;
|
|
9
|
+
readonly statusFile: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveAtcPaths(env: Readonly<Record<string, string | undefined>>): AtcPaths;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveHomeDir(env?: Readonly<Record<string, string | undefined>>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveStateDir(home: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MENU_VIEW_SCHEMA: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
options: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
5
|
+
option: z.ZodNumber;
|
|
6
|
+
label: z.ZodString;
|
|
7
|
+
checked: z.ZodNullable<z.ZodBoolean>;
|
|
8
|
+
highlighted: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>>>;
|
|
10
|
+
menuToken: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type MenuView = z.output<typeof MENU_VIEW_SCHEMA>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MESSAGE_VIEW_SCHEMA: z.ZodObject<{
|
|
3
|
+
message: z.ZodString;
|
|
4
|
+
session: z.ZodString;
|
|
5
|
+
from: z.ZodString;
|
|
6
|
+
sender: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"connector">;
|
|
8
|
+
client: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"session">;
|
|
12
|
+
session: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"local">;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"owner">;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>], "kind">>;
|
|
21
|
+
text: z.ZodString;
|
|
22
|
+
status: z.ZodEnum<{
|
|
23
|
+
answered: "answered";
|
|
24
|
+
delivered: "delivered";
|
|
25
|
+
queued: "queued";
|
|
26
|
+
unanswered: "unanswered";
|
|
27
|
+
}>;
|
|
28
|
+
sentAt: z.ZodNumber;
|
|
29
|
+
deliveredAt: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
answeredAt: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
32
|
+
unansweredAt: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
unansweredReason: z.ZodOptional<z.ZodString>;
|
|
34
|
+
turn: z.ZodNullable<z.ZodString>;
|
|
35
|
+
answeredWith: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const NOTE_VIEW_SCHEMA: z.ZodObject<{
|
|
3
|
+
note: z.ZodString;
|
|
4
|
+
at: z.ZodNumber;
|
|
5
|
+
session: z.ZodString;
|
|
6
|
+
name: z.ZodNullable<z.ZodString>;
|
|
7
|
+
label: z.ZodString;
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
complete: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PROCEDURE_META_SCHEMA: z.ZodObject<{
|
|
3
|
+
access: z.ZodEnum<{
|
|
4
|
+
owner: "owner";
|
|
5
|
+
principal: "principal";
|
|
6
|
+
}>;
|
|
7
|
+
readOnly: z.ZodBoolean;
|
|
8
|
+
keyed: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ProcedureMeta = Readonly<z.infer<typeof PROCEDURE_META_SCHEMA>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface PublishedRecord {
|
|
2
|
+
readonly format: 'atc.session-record';
|
|
3
|
+
readonly version: 1;
|
|
4
|
+
readonly session: string;
|
|
5
|
+
readonly daemonID: string;
|
|
6
|
+
readonly target: string;
|
|
7
|
+
readonly revision: number;
|
|
8
|
+
readonly updatedAt: string;
|
|
9
|
+
readonly name: string | null;
|
|
10
|
+
readonly transcriptPath: string | null;
|
|
11
|
+
readonly scope: RecordedScope;
|
|
12
|
+
}
|
|
13
|
+
export interface RecordedScope {
|
|
14
|
+
readonly workspace: RecordedWorkspace;
|
|
15
|
+
readonly worktrees: readonly RecordedWorktree[];
|
|
16
|
+
readonly branches: readonly RecordedBranch[];
|
|
17
|
+
readonly pullRequests: readonly RecordedPullRequest[];
|
|
18
|
+
}
|
|
19
|
+
interface RecordedWorkspace {
|
|
20
|
+
readonly path: string;
|
|
21
|
+
readonly branch: string | null;
|
|
22
|
+
readonly repoURL: string | null;
|
|
23
|
+
readonly sha: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface RecordedWorktree {
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly branch: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface RecordedBranch {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly repo: string;
|
|
32
|
+
}
|
|
33
|
+
export interface RecordedPullRequest {
|
|
34
|
+
readonly repo: string;
|
|
35
|
+
readonly number: number;
|
|
36
|
+
readonly url: string;
|
|
37
|
+
readonly branch: string;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const WORKSPACE_SOURCE: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"path">;
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
allowDirty: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
refuse: "refuse";
|
|
7
|
+
warn: "warn";
|
|
8
|
+
}>>;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"git">;
|
|
11
|
+
url: z.ZodString;
|
|
12
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
13
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
14
|
+
credentialRef: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"env">;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
}, z.core.$strict>], "kind">;
|
|
19
|
+
export type SpawnWorkspaceSource = z.infer<typeof WORKSPACE_SOURCE>;
|
|
20
|
+
export declare const REQUEST_PARAM_SCHEMAS: {
|
|
21
|
+
readonly 'daemon.hello': z.ZodObject<{
|
|
22
|
+
client: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
23
|
+
protocol: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
principal: z.ZodOptional<z.ZodString>;
|
|
25
|
+
session: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
readonly 'daemon.ping': z.ZodObject<{}, z.core.$strip>;
|
|
28
|
+
readonly 'daemon.quit': z.ZodObject<{}, z.core.$strip>;
|
|
29
|
+
readonly 'daemon.backup': z.ZodObject<{
|
|
30
|
+
path: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
readonly 'daemon.restarted': z.ZodObject<{
|
|
33
|
+
result: z.ZodObject<{
|
|
34
|
+
runID: z.ZodString;
|
|
35
|
+
code: z.ZodNumber;
|
|
36
|
+
pid: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
build: z.ZodNullable<z.ZodString>;
|
|
38
|
+
listenPort: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
restored: z.ZodNumber;
|
|
40
|
+
total: z.ZodNumber;
|
|
41
|
+
failed: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
reason: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
interrupted: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
error: z.ZodNullable<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
readonly 'session.list': z.ZodObject<{}, z.core.$strip>;
|
|
54
|
+
readonly 'dirs.list': z.ZodObject<{}, z.core.$strip>;
|
|
55
|
+
readonly 'agents.list': z.ZodObject<{}, z.core.$strip>;
|
|
56
|
+
readonly 'sources.list': z.ZodObject<{
|
|
57
|
+
source: z.ZodString;
|
|
58
|
+
target: z.ZodOptional<z.ZodString>;
|
|
59
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
60
|
+
text: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
readonly 'sources.interpret': z.ZodObject<{
|
|
63
|
+
source: z.ZodString;
|
|
64
|
+
input: z.ZodString;
|
|
65
|
+
target: z.ZodOptional<z.ZodString>;
|
|
66
|
+
clientCwd: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
readonly 'sources.complete': z.ZodObject<{
|
|
69
|
+
source: z.ZodString;
|
|
70
|
+
input: z.ZodString;
|
|
71
|
+
target: z.ZodOptional<z.ZodString>;
|
|
72
|
+
clientCwd: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
readonly 'git.probe': z.ZodObject<{
|
|
75
|
+
url: z.ZodString;
|
|
76
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
77
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
78
|
+
credentialRef: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"env">;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
target: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
readonly 'fleet.list': z.ZodObject<{}, z.core.$strip>;
|
|
85
|
+
readonly 'fleet.restore': z.ZodObject<{
|
|
86
|
+
cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
87
|
+
rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
readonly 'session.spawn': z.ZodObject<{
|
|
90
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
91
|
+
name: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
92
|
+
prompt: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
93
|
+
cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
94
|
+
rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
95
|
+
resume: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>, unknown>, z.ZodTransform<boolean | import("./agent-session-id.js").AgentSessionID, string | boolean>>;
|
|
96
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
97
|
+
model: z.ZodOptional<z.ZodString>;
|
|
98
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
99
|
+
pluginDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
101
|
+
replayOnly: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
target: z.ZodOptional<z.ZodString>;
|
|
103
|
+
workspace: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"path">;
|
|
105
|
+
path: z.ZodString;
|
|
106
|
+
allowDirty: z.ZodOptional<z.ZodEnum<{
|
|
107
|
+
refuse: "refuse";
|
|
108
|
+
warn: "warn";
|
|
109
|
+
}>>;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
kind: z.ZodLiteral<"git">;
|
|
112
|
+
url: z.ZodString;
|
|
113
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
114
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
115
|
+
credentialRef: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"env">;
|
|
117
|
+
name: z.ZodString;
|
|
118
|
+
}, z.core.$strict>>;
|
|
119
|
+
}, z.core.$strict>], "kind">>;
|
|
120
|
+
trustClonedWorkspace: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
scope: z.ZodOptional<z.ZodUnknown>;
|
|
122
|
+
parent: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
readonly 'session.kill': z.ZodObject<{
|
|
125
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
126
|
+
stopOnly: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
readonly 'session.ack': z.ZodObject<{
|
|
129
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
readonly 'session.forget': z.ZodObject<{
|
|
132
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
133
|
+
confirmToken: z.ZodOptional<z.ZodString>;
|
|
134
|
+
refusePinned: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
refuseLive: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
readonly 'session.auth.revoke': z.ZodObject<{
|
|
138
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
readonly 'session.auth.rebind': z.ZodObject<{
|
|
141
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
readonly 'session.scope.add': z.ZodObject<{
|
|
144
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
145
|
+
scope: z.ZodUnknown;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
readonly 'session.update': z.ZodObject<{
|
|
148
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
149
|
+
name: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
150
|
+
pinned: z.ZodPreprocess<z.ZodOptional<z.ZodBoolean>, unknown>;
|
|
151
|
+
parent: z.ZodOptional<z.ZodNull>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
readonly 'session.attach': z.ZodObject<{
|
|
154
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
155
|
+
cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
156
|
+
rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
readonly 'session.detach': z.ZodObject<{
|
|
159
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
readonly 'session.watch': z.ZodObject<{
|
|
162
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
readonly 'session.input': z.ZodObject<{
|
|
165
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
166
|
+
data: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
readonly 'session.submit': z.ZodObject<{
|
|
169
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
170
|
+
text: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
readonly 'session.resize': z.ZodObject<{
|
|
173
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
174
|
+
cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
175
|
+
rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
readonly 'session.resumeCommand': z.ZodObject<{
|
|
178
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
readonly 'session.screen': z.ZodObject<{
|
|
181
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
readonly 'session.menu': z.ZodObject<{
|
|
184
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
readonly 'session.choose': z.ZodObject<{
|
|
187
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
188
|
+
menuToken: z.ZodString;
|
|
189
|
+
option: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
label: z.ZodOptional<z.ZodString>;
|
|
191
|
+
key: z.ZodOptional<z.ZodLiteral<"escape">>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
readonly 'session.eject': z.ZodObject<{
|
|
194
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
195
|
+
prompt: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
readonly 'session.adopt': z.ZodObject<{
|
|
198
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
199
|
+
cols: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
200
|
+
rows: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
readonly 'permission.respond': z.ZodObject<{
|
|
203
|
+
request: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
204
|
+
decision: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
readonly 'session.get': z.ZodObject<{
|
|
207
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
readonly 'session.read': z.ZodObject<{
|
|
210
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
211
|
+
cursor: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
212
|
+
limit: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
readonly 'events.read': z.ZodObject<{
|
|
215
|
+
cursor: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
216
|
+
from: z.ZodOptional<z.ZodLiteral<"start">>;
|
|
217
|
+
limit: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
|
|
218
|
+
waitMs: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
|
|
219
|
+
session: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./session-id.js").SessionID, string>>>, unknown>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
readonly 'session.message': z.ZodObject<{
|
|
222
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
223
|
+
text: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
224
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
225
|
+
replayOnly: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
from: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
|
|
227
|
+
notice: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
readonly 'session.tap': z.ZodObject<{
|
|
230
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
231
|
+
notices: z.ZodDefault<z.ZodBoolean>;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
readonly 'message.get': z.ZodObject<{
|
|
234
|
+
message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
|
|
235
|
+
waitMs: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>, z.ZodTransform<number, number>>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
readonly 'note.get': z.ZodObject<{
|
|
238
|
+
note: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
readonly 'answer.get': z.ZodObject<{
|
|
241
|
+
answer: z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
readonly 'message.ack': z.ZodObject<{
|
|
244
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
245
|
+
message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
readonly 'notice.ack': z.ZodObject<{
|
|
248
|
+
session: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./session-id.js").SessionID, string>>;
|
|
249
|
+
message: z.ZodPipe<z.ZodPreprocess<z.ZodDefault<z.ZodString>, unknown>, z.ZodTransform<import("./message-id.js").MessageID, string>>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
};
|
|
252
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const RESTART_FAILED_ROW_SCHEMA: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
reason: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const RESTART_RESULT_SCHEMA: z.ZodObject<{
|
|
8
|
+
runID: z.ZodString;
|
|
9
|
+
code: z.ZodNumber;
|
|
10
|
+
pid: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
build: z.ZodNullable<z.ZodString>;
|
|
12
|
+
listenPort: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
restored: z.ZodNumber;
|
|
14
|
+
total: z.ZodNumber;
|
|
15
|
+
failed: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
reason: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
interrupted: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
error: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type RestartResult = Readonly<z.output<typeof RESTART_RESULT_SCHEMA>>;
|
|
27
|
+
export type RestartFailedRow = Readonly<z.output<typeof RESTART_FAILED_ROW_SCHEMA>>;
|
|
28
|
+
export {};
|