agent-device 0.14.1 → 0.14.2

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.
@@ -0,0 +1,138 @@
1
+ export declare const BATCH_BLOCKED_COMMANDS: ReadonlySet<string>;
2
+
3
+ export declare type BatchFlags = Record<string, unknown> & {
4
+ batchOnError?: 'stop';
5
+ batchMaxSteps?: number;
6
+ batchSteps?: BatchStep[];
7
+ };
8
+
9
+ export declare type BatchInvoke = (req: BatchRequest) => Promise<DaemonResponse>;
10
+
11
+ export declare type BatchRequest = Omit<DaemonRequest, 'flags'> & {
12
+ flags?: BatchFlags | Record<string, unknown>;
13
+ };
14
+
15
+ export declare type BatchStep = {
16
+ command: string;
17
+ positionals?: string[];
18
+ flags?: Record<string, unknown>;
19
+ runtime?: unknown;
20
+ };
21
+
22
+ export declare type BatchStepResult = {
23
+ step: number;
24
+ command: string;
25
+ ok: true;
26
+ data: Record<string, unknown>;
27
+ durationMs: number;
28
+ };
29
+
30
+ export declare function buildBatchStepFlags(parentFlags: BatchFlags | Record<string, unknown> | undefined, stepFlags: BatchStep['flags'] | Record<string, unknown> | undefined): BatchFlags;
31
+
32
+ declare type DaemonArtifact = {
33
+ field: string;
34
+ artifactId?: string;
35
+ fileName?: string;
36
+ localPath?: string;
37
+ path?: string;
38
+ };
39
+
40
+ declare type DaemonError = {
41
+ code: string;
42
+ message: string;
43
+ hint?: string;
44
+ diagnosticId?: string;
45
+ logPath?: string;
46
+ details?: Record<string, unknown>;
47
+ };
48
+
49
+ declare type DaemonInstallSource = {
50
+ kind: 'url';
51
+ url: string;
52
+ headers?: Record<string, string>;
53
+ } | {
54
+ kind: 'path';
55
+ path: string;
56
+ } | ({
57
+ kind: 'github-actions-artifact';
58
+ owner: string;
59
+ repo: string;
60
+ } & ({
61
+ artifactId: number;
62
+ } | {
63
+ runId: number;
64
+ artifactName: string;
65
+ } | {
66
+ artifactName: string;
67
+ }));
68
+
69
+ declare type DaemonLockPolicy = 'reject' | 'strip';
70
+
71
+ declare type DaemonRequest = {
72
+ token?: string;
73
+ session?: string;
74
+ command: string;
75
+ positionals: string[];
76
+ flags?: Record<string, unknown>;
77
+ runtime?: SessionRuntimeHints;
78
+ meta?: DaemonRequestMeta;
79
+ };
80
+
81
+ declare type DaemonRequestMeta = {
82
+ requestId?: string;
83
+ debug?: boolean;
84
+ cwd?: string;
85
+ tenantId?: string;
86
+ runId?: string;
87
+ leaseId?: string;
88
+ leaseTtlMs?: number;
89
+ leaseBackend?: LeaseBackend;
90
+ sessionIsolation?: 'none' | 'tenant';
91
+ uploadedArtifactId?: string;
92
+ clientArtifactPaths?: Record<string, string>;
93
+ installSource?: DaemonInstallSource;
94
+ retainMaterializedPaths?: boolean;
95
+ materializedPathRetentionMs?: number;
96
+ materializationId?: string;
97
+ lockPolicy?: DaemonLockPolicy;
98
+ lockPlatform?: 'ios' | 'macos' | 'android' | 'linux' | 'apple';
99
+ };
100
+
101
+ declare type DaemonResponse = {
102
+ ok: true;
103
+ data?: DaemonResponseData;
104
+ } | {
105
+ ok: false;
106
+ error: DaemonError;
107
+ };
108
+
109
+ declare type DaemonResponseData = Record<string, unknown> & {
110
+ artifacts?: DaemonArtifact[];
111
+ };
112
+
113
+ export declare const DEFAULT_BATCH_MAX_STEPS = 100;
114
+
115
+ export declare const INHERITED_PARENT_FLAG_KEYS: readonly ["platform", "target", "device", "udid", "serial", "verbose", "out"];
116
+
117
+ declare type LeaseBackend = 'ios-simulator' | 'ios-instance' | 'android-instance';
118
+
119
+ export declare type NormalizedBatchStep = {
120
+ command: string;
121
+ positionals: string[];
122
+ flags: Record<string, unknown>;
123
+ runtime?: unknown;
124
+ };
125
+
126
+ export declare function runBatch(req: BatchRequest, sessionName: string, invoke: BatchInvoke): Promise<DaemonResponse>;
127
+
128
+ declare type SessionRuntimeHints = {
129
+ platform?: 'ios' | 'android';
130
+ metroHost?: string;
131
+ metroPort?: number;
132
+ bundleUrl?: string;
133
+ launchUrl?: string;
134
+ };
135
+
136
+ export declare function validateAndNormalizeBatchSteps(steps: unknown, maxSteps: number): NormalizedBatchStep[];
137
+
138
+ export { }
@@ -0,0 +1 @@
1
+ export{BATCH_BLOCKED_COMMANDS,DEFAULT_BATCH_MAX_STEPS,INHERITED_PARENT_FLAG_KEYS,buildBatchStepFlags,runBatch,validateAndNormalizeBatchSteps}from"./1231.js";