@tangle-network/agent-interface 1.2.0 → 1.3.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/agent-execution-preparation-receipt.d.ts +308 -0
- package/dist/agent-execution-preparation-receipt.js +217 -0
- package/dist/agent-execution-preparation.d.ts +5 -300
- package/dist/agent-execution-preparation.js +6 -219
- package/dist/agent-workspace-lease.d.ts +2 -18
- package/dist/agent-workspace-lease.js +2 -14
- package/dist/agent-workspace-source-snapshot.d.ts +21 -0
- package/dist/agent-workspace-source-snapshot.js +18 -0
- package/dist/environment-interactive-control.d.ts +1694 -0
- package/dist/environment-interactive-control.js +456 -0
- package/dist/environment-interactive-shared.d.ts +5 -0
- package/dist/environment-interactive-shared.js +16 -0
- package/dist/environment-interactive-start.d.ts +238 -0
- package/dist/environment-interactive-start.js +95 -0
- package/dist/environment-interactive.d.ts +2 -1930
- package/dist/environment-interactive.js +2 -557
- package/package.json +6 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type AgentInteractiveSessionRef } from "./environment-interactive-control.js";
|
|
3
|
+
import { type AgentExactRunControlRef } from "./runtime-control.js";
|
|
4
|
+
declare const AgentInteractiveSessionRunCoordinatesSchema: z.ZodObject<{
|
|
5
|
+
provider: z.ZodString;
|
|
6
|
+
environmentId: z.ZodString;
|
|
7
|
+
sessionId: z.ZodString;
|
|
8
|
+
executionId: z.ZodString;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
export type AgentInteractiveSessionRunCoordinates = z.infer<typeof AgentInteractiveSessionRunCoordinatesSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Start one native coding-agent TUI from caller-owned request material.
|
|
13
|
+
*
|
|
14
|
+
* The provider owns profile materialization and returns its preparation receipt
|
|
15
|
+
* in the resulting reference. Replaying the same exact request/run returns the
|
|
16
|
+
* same reference, even after the process exits; changed material cannot reuse it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const AgentInteractiveSessionStartSchema: z.ZodObject<{
|
|
19
|
+
run: z.ZodObject<{
|
|
20
|
+
runId: z.ZodString;
|
|
21
|
+
provider: z.ZodString;
|
|
22
|
+
environmentId: z.ZodString;
|
|
23
|
+
sessionId: z.ZodString;
|
|
24
|
+
executionId: z.ZodString;
|
|
25
|
+
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
profile: z.ZodObject<{
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
version: z.ZodOptional<z.ZodString>;
|
|
31
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
prompt: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
appendSystemPrompt: z.ZodOptional<z.ZodString>;
|
|
35
|
+
instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
default: z.ZodOptional<z.ZodString>;
|
|
39
|
+
small: z.ZodOptional<z.ZodString>;
|
|
40
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
41
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
none: "none";
|
|
43
|
+
minimal: "minimal";
|
|
44
|
+
low: "low";
|
|
45
|
+
medium: "medium";
|
|
46
|
+
high: "high";
|
|
47
|
+
xhigh: "xhigh";
|
|
48
|
+
ultracode: "ultracode";
|
|
49
|
+
}>>;
|
|
50
|
+
maxVisibleOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
maxReasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
maxTotalOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
metadata: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
harness: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
"claude-code": "claude-code";
|
|
57
|
+
nanoclaw: "nanoclaw";
|
|
58
|
+
codex: "codex";
|
|
59
|
+
opencode: "opencode";
|
|
60
|
+
"kimi-code": "kimi-code";
|
|
61
|
+
pi: "pi";
|
|
62
|
+
prime: "prime";
|
|
63
|
+
gemini: "gemini";
|
|
64
|
+
hermes: "hermes";
|
|
65
|
+
openclaw: "openclaw";
|
|
66
|
+
amp: "amp";
|
|
67
|
+
"factory-droids": "factory-droids";
|
|
68
|
+
forge: "forge";
|
|
69
|
+
cursor: "cursor";
|
|
70
|
+
acp: "acp";
|
|
71
|
+
"cli-base": "cli-base";
|
|
72
|
+
}>>;
|
|
73
|
+
permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
|
|
74
|
+
tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
|
|
75
|
+
mcp: z.ZodOptional<z.ZodType<Record<string, import("./agent-profile.js").AgentProfileMcpServer>, unknown, z.core.$ZodTypeInternals<Record<string, import("./agent-profile.js").AgentProfileMcpServer>, unknown>>>;
|
|
76
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
77
|
+
connectionId: z.ZodString;
|
|
78
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
79
|
+
alias: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>>>;
|
|
81
|
+
subagents: z.ZodOptional<z.ZodType<Record<string, {
|
|
82
|
+
description?: string | undefined;
|
|
83
|
+
prompt?: string | undefined;
|
|
84
|
+
model?: string | undefined;
|
|
85
|
+
tools?: Record<string, boolean> | undefined;
|
|
86
|
+
permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
|
|
87
|
+
maxSteps?: number | undefined;
|
|
88
|
+
metadata?: Record<string, unknown> | undefined;
|
|
89
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
90
|
+
description?: string | undefined;
|
|
91
|
+
prompt?: string | undefined;
|
|
92
|
+
model?: string | undefined;
|
|
93
|
+
tools?: Record<string, boolean> | undefined;
|
|
94
|
+
permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
|
|
95
|
+
maxSteps?: number | undefined;
|
|
96
|
+
metadata?: Record<string, unknown> | undefined;
|
|
97
|
+
}>, unknown>>>;
|
|
98
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
99
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
path: z.ZodString;
|
|
101
|
+
resource: z.ZodUnion<readonly [z.ZodObject<{
|
|
102
|
+
kind: z.ZodLiteral<"inline">;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
content: z.ZodString;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"github">;
|
|
107
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
108
|
+
path: z.ZodString;
|
|
109
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
110
|
+
name: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strict>]>;
|
|
112
|
+
executable: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
}, z.core.$strict>>>;
|
|
114
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"inline">;
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
content: z.ZodString;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"github">;
|
|
120
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
121
|
+
path: z.ZodString;
|
|
122
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
123
|
+
name: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strict>]>>>;
|
|
125
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
126
|
+
kind: z.ZodLiteral<"inline">;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
content: z.ZodString;
|
|
129
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
+
kind: z.ZodLiteral<"github">;
|
|
131
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
132
|
+
path: z.ZodString;
|
|
133
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
134
|
+
name: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strict>]>>>;
|
|
136
|
+
agents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"inline">;
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
content: z.ZodString;
|
|
140
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
141
|
+
kind: z.ZodLiteral<"github">;
|
|
142
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
143
|
+
path: z.ZodString;
|
|
144
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
145
|
+
name: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$strict>]>>>;
|
|
147
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
148
|
+
kind: z.ZodLiteral<"inline">;
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
content: z.ZodString;
|
|
151
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
+
kind: z.ZodLiteral<"github">;
|
|
153
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
154
|
+
path: z.ZodString;
|
|
155
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
156
|
+
name: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>]>>>;
|
|
158
|
+
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
159
|
+
kind: z.ZodLiteral<"inline">;
|
|
160
|
+
name: z.ZodString;
|
|
161
|
+
content: z.ZodString;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
kind: z.ZodLiteral<"github">;
|
|
164
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
165
|
+
path: z.ZodString;
|
|
166
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
167
|
+
name: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>]>]>>;
|
|
169
|
+
failOnError: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
}, z.core.$strict>>;
|
|
171
|
+
hooks: z.ZodOptional<z.ZodType<Record<string, {
|
|
172
|
+
command: string;
|
|
173
|
+
timeoutMs?: number | undefined;
|
|
174
|
+
blocking?: boolean | undefined;
|
|
175
|
+
matcher?: string | undefined;
|
|
176
|
+
env?: Record<string, {
|
|
177
|
+
kind: "public";
|
|
178
|
+
value: string;
|
|
179
|
+
} | {
|
|
180
|
+
kind: "secret-ref";
|
|
181
|
+
key: string;
|
|
182
|
+
format?: "raw" | "bearer" | undefined;
|
|
183
|
+
}> | undefined;
|
|
184
|
+
}[]>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
185
|
+
command: string;
|
|
186
|
+
timeoutMs?: number | undefined;
|
|
187
|
+
blocking?: boolean | undefined;
|
|
188
|
+
matcher?: string | undefined;
|
|
189
|
+
env?: Record<string, {
|
|
190
|
+
kind: "public";
|
|
191
|
+
value: string;
|
|
192
|
+
} | {
|
|
193
|
+
kind: "secret-ref";
|
|
194
|
+
key: string;
|
|
195
|
+
format?: "raw" | "bearer" | undefined;
|
|
196
|
+
}> | undefined;
|
|
197
|
+
}[]>, unknown>>>;
|
|
198
|
+
modes: z.ZodOptional<z.ZodType<Record<string, {
|
|
199
|
+
description?: string | undefined;
|
|
200
|
+
model?: string | undefined;
|
|
201
|
+
prompt?: string | undefined;
|
|
202
|
+
tools?: Record<string, boolean> | undefined;
|
|
203
|
+
permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
|
|
204
|
+
metadata?: Record<string, unknown> | undefined;
|
|
205
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
206
|
+
description?: string | undefined;
|
|
207
|
+
model?: string | undefined;
|
|
208
|
+
prompt?: string | undefined;
|
|
209
|
+
tools?: Record<string, boolean> | undefined;
|
|
210
|
+
permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
|
|
211
|
+
metadata?: Record<string, unknown> | undefined;
|
|
212
|
+
}>, unknown>>>;
|
|
213
|
+
confidential: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
tee: z.ZodOptional<z.ZodString>;
|
|
215
|
+
attestationNonce: z.ZodOptional<z.ZodString>;
|
|
216
|
+
sealed: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
attestationRefresh: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
}, z.core.$strict>>;
|
|
219
|
+
metadata: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
|
|
220
|
+
extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
requestedProfileDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
223
|
+
initialPrompt: z.ZodOptional<z.ZodString>;
|
|
224
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
225
|
+
cols: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
export type AgentInteractiveSessionStart = z.infer<typeof AgentInteractiveSessionStartSchema>;
|
|
229
|
+
export type AgentInteractiveSessionStartInput = Omit<AgentInteractiveSessionStart, "run">;
|
|
230
|
+
/** Digest the exact process-start request independently of its derived run id. */
|
|
231
|
+
export declare function agentInteractiveSessionRequestDigest(coordinates: AgentInteractiveSessionRunCoordinates, input: AgentInteractiveSessionStartInput): `sha256:${string}`;
|
|
232
|
+
/** Mint the one exact run reference a provider must acknowledge for this start. */
|
|
233
|
+
export declare function agentInteractiveSessionRunRef(coordinates: AgentInteractiveSessionRunCoordinates, input: AgentInteractiveSessionStartInput): AgentExactRunControlRef;
|
|
234
|
+
/** Parse a start request and prove its profile identity before provider work. */
|
|
235
|
+
export declare function exactAgentInteractiveSessionStart(value: AgentInteractiveSessionStart): AgentInteractiveSessionStart;
|
|
236
|
+
/** Prove that a provider returned the exact run and preparation receipt requested. */
|
|
237
|
+
export declare function agentInteractiveSessionRefMatchesStart(request: AgentInteractiveSessionStart, ref: AgentInteractiveSessionRef): boolean;
|
|
238
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { canonicalCandidateDigest, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
|
|
3
|
+
import { canonicalAgentProfileDigest } from "./agent-execution-preparation.js";
|
|
4
|
+
import { boundedIdentifierSchema, boundedStringSchema, } from "./contract-limits.js";
|
|
5
|
+
import { AgentInteractiveSessionRefSchema, } from "./environment-interactive-control.js";
|
|
6
|
+
import { agentInteractiveDimensionSchema as interactiveDimensionSchema, sameAgentExactRun as sameExactRun, } from "./environment-interactive-shared.js";
|
|
7
|
+
import { agentProfileSchema } from "./profile-schema.js";
|
|
8
|
+
import { AgentExactRunControlRefSchema, } from "./runtime-control.js";
|
|
9
|
+
const AgentInteractiveSessionRunCoordinatesSchema = z.strictObject({
|
|
10
|
+
provider: boundedIdentifierSchema,
|
|
11
|
+
environmentId: boundedIdentifierSchema,
|
|
12
|
+
sessionId: boundedIdentifierSchema,
|
|
13
|
+
executionId: boundedIdentifierSchema,
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Start one native coding-agent TUI from caller-owned request material.
|
|
17
|
+
*
|
|
18
|
+
* The provider owns profile materialization and returns its preparation receipt
|
|
19
|
+
* in the resulting reference. Replaying the same exact request/run returns the
|
|
20
|
+
* same reference, even after the process exits; changed material cannot reuse it.
|
|
21
|
+
*/
|
|
22
|
+
export const AgentInteractiveSessionStartSchema = z.strictObject({
|
|
23
|
+
run: AgentExactRunControlRefSchema,
|
|
24
|
+
profile: agentProfileSchema,
|
|
25
|
+
requestedProfileDigest: sha256DigestSchema,
|
|
26
|
+
initialPrompt: boundedStringSchema.optional(),
|
|
27
|
+
cwd: boundedStringSchema.min(1).optional(),
|
|
28
|
+
cols: interactiveDimensionSchema.optional(),
|
|
29
|
+
rows: interactiveDimensionSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
/** Digest the exact process-start request independently of its derived run id. */
|
|
32
|
+
export function agentInteractiveSessionRequestDigest(coordinates, input) {
|
|
33
|
+
const exactCoordinates = AgentInteractiveSessionRunCoordinatesSchema.parse(coordinates);
|
|
34
|
+
const exactInput = AgentInteractiveSessionStartSchema.omit({ run: true }).parse(input);
|
|
35
|
+
return canonicalCandidateDigest({
|
|
36
|
+
kind: "agent-interactive-session-start.v1",
|
|
37
|
+
run: exactCoordinates,
|
|
38
|
+
requestedProfileDigest: exactInput.requestedProfileDigest,
|
|
39
|
+
...(exactInput.initialPrompt === undefined
|
|
40
|
+
? {}
|
|
41
|
+
: { initialPrompt: exactInput.initialPrompt }),
|
|
42
|
+
...(exactInput.cwd === undefined ? {} : { cwd: exactInput.cwd }),
|
|
43
|
+
...(exactInput.cols === undefined ? {} : { cols: exactInput.cols }),
|
|
44
|
+
...(exactInput.rows === undefined ? {} : { rows: exactInput.rows }),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/** Mint the one exact run reference a provider must acknowledge for this start. */
|
|
48
|
+
export function agentInteractiveSessionRunRef(coordinates, input) {
|
|
49
|
+
const exactCoordinates = AgentInteractiveSessionRunCoordinatesSchema.parse(coordinates);
|
|
50
|
+
const requestDigest = agentInteractiveSessionRequestDigest(exactCoordinates, input);
|
|
51
|
+
return AgentExactRunControlRefSchema.parse({
|
|
52
|
+
...exactCoordinates,
|
|
53
|
+
runId: `interactive-run-${requestDigest.slice("sha256:".length)}`,
|
|
54
|
+
requestDigest,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** Parse a start request and prove its profile identity before provider work. */
|
|
58
|
+
export function exactAgentInteractiveSessionStart(value) {
|
|
59
|
+
const parsed = AgentInteractiveSessionStartSchema.parse(value);
|
|
60
|
+
if (parsed.profile.harness === undefined) {
|
|
61
|
+
throw new Error("interactive agent sessions require AgentProfile.harness");
|
|
62
|
+
}
|
|
63
|
+
const digest = canonicalAgentProfileDigest(parsed.profile);
|
|
64
|
+
if (digest !== parsed.requestedProfileDigest) {
|
|
65
|
+
throw new Error("interactive agent session requested profile digest does not match its profile");
|
|
66
|
+
}
|
|
67
|
+
const { run, ...input } = parsed;
|
|
68
|
+
const expectedRun = agentInteractiveSessionRunRef(runCoordinates(run), input);
|
|
69
|
+
if (!sameExactRun(run, expectedRun)) {
|
|
70
|
+
throw new Error("interactive agent session run identity does not match its start request");
|
|
71
|
+
}
|
|
72
|
+
return parsed;
|
|
73
|
+
}
|
|
74
|
+
/** Prove that a provider returned the exact run and preparation receipt requested. */
|
|
75
|
+
export function agentInteractiveSessionRefMatchesStart(request, ref) {
|
|
76
|
+
const parsedRequest = AgentInteractiveSessionStartSchema.safeParse(request);
|
|
77
|
+
const parsedRef = AgentInteractiveSessionRefSchema.safeParse(ref);
|
|
78
|
+
if (!parsedRequest.success || !parsedRef.success)
|
|
79
|
+
return false;
|
|
80
|
+
const requestedHarness = parsedRequest.data.profile.harness;
|
|
81
|
+
if (requestedHarness === undefined)
|
|
82
|
+
return false;
|
|
83
|
+
return (parsedRef.data.preparationReceipt.authoredProfileDigest ===
|
|
84
|
+
parsedRequest.data.requestedProfileDigest &&
|
|
85
|
+
parsedRef.data.preparationReceipt.harness === requestedHarness &&
|
|
86
|
+
sameExactRun(parsedRef.data.run, parsedRequest.data.run));
|
|
87
|
+
}
|
|
88
|
+
function runCoordinates(run) {
|
|
89
|
+
return {
|
|
90
|
+
provider: run.provider,
|
|
91
|
+
environmentId: run.environmentId,
|
|
92
|
+
sessionId: run.sessionId,
|
|
93
|
+
executionId: run.executionId,
|
|
94
|
+
};
|
|
95
|
+
}
|