@apilift/cli 1.9.2 → 1.10.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/dist/apilift-collector.js +226 -119
- package/dist/apilift-native-host.js +128 -68
- package/dist/apilift-session-audit.js +3 -0
- package/dist/apilift.js +1490 -1236
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/skills/discover/SKILL.md +3 -1
- package/dist/plugin/skills/use/SKILL.md +3 -1
- package/package.json +2 -2
|
@@ -4338,7 +4338,7 @@ var require_core = __commonJS({
|
|
|
4338
4338
|
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
4339
4339
|
if (!errors || errors.length === 0)
|
|
4340
4340
|
return "No errors";
|
|
4341
|
-
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((
|
|
4341
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text3, msg) => text3 + separator + msg);
|
|
4342
4342
|
}
|
|
4343
4343
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
4344
4344
|
const rules = this.RULES.all;
|
|
@@ -19173,8 +19173,8 @@ function ko_default() {
|
|
|
19173
19173
|
}
|
|
19174
19174
|
|
|
19175
19175
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/lt.js
|
|
19176
|
-
var capitalizeFirstCharacter = (
|
|
19177
|
-
return
|
|
19176
|
+
var capitalizeFirstCharacter = (text3) => {
|
|
19177
|
+
return text3.charAt(0).toUpperCase() + text3.slice(1);
|
|
19178
19178
|
};
|
|
19179
19179
|
function getUnitTypeFromNumber(number4) {
|
|
19180
19180
|
const abs = Math.abs(number4);
|
|
@@ -29582,6 +29582,7 @@ var errorCategoryByCode = {
|
|
|
29582
29582
|
"publication-budget": "limit",
|
|
29583
29583
|
"publication-throttled": "limit",
|
|
29584
29584
|
"session-limit": "limit",
|
|
29585
|
+
"feedback-throttled": "limit",
|
|
29585
29586
|
"client-upgrade-required": "upgrade",
|
|
29586
29587
|
"backend-unavailable": "unavailable",
|
|
29587
29588
|
"storage-unavailable": "unavailable",
|
|
@@ -30590,6 +30591,64 @@ var descriptions = [
|
|
|
30590
30591
|
];
|
|
30591
30592
|
var categories = categorySlugs.map((slug, index) => ({ slug, label: labels[index], description: descriptions[index] }));
|
|
30592
30593
|
|
|
30594
|
+
// ../../packages/core/dist/api/feedback.js
|
|
30595
|
+
var text = external_exports.string().trim().min(1).max(2e3);
|
|
30596
|
+
var safeLabel = external_exports.string().min(1).max(120).regex(/^[A-Za-z0-9._-]+$/u);
|
|
30597
|
+
var feedbackMetadataSchema = external_exports.strictObject({
|
|
30598
|
+
cliVersion: safeLabel,
|
|
30599
|
+
platform: safeLabel,
|
|
30600
|
+
agent: external_exports.enum(["codex", "claude", "other"]),
|
|
30601
|
+
occurredAt: external_exports.iso.datetime({ offset: true }),
|
|
30602
|
+
invocation: external_exports.strictObject({
|
|
30603
|
+
id: external_exports.uuid(),
|
|
30604
|
+
command: safeLabel,
|
|
30605
|
+
exitCode: external_exports.number().int().min(0).max(255),
|
|
30606
|
+
startedAt: external_exports.iso.datetime({ offset: true }),
|
|
30607
|
+
finishedAt: external_exports.iso.datetime({ offset: true }),
|
|
30608
|
+
diagnostic: safeLabel.optional(),
|
|
30609
|
+
executionId: external_exports.uuid().optional(),
|
|
30610
|
+
discoveryId: external_exports.uuid().optional()
|
|
30611
|
+
}).optional()
|
|
30612
|
+
});
|
|
30613
|
+
function feedbackTextBytes(text3) {
|
|
30614
|
+
return new TextEncoder().encode(text3).length;
|
|
30615
|
+
}
|
|
30616
|
+
function isFeedbackText(text3) {
|
|
30617
|
+
return !Array.from(text3).some((c) => {
|
|
30618
|
+
const code = c.charCodeAt(0);
|
|
30619
|
+
return code === 127 || code < 32 && ![9, 10, 13].includes(code);
|
|
30620
|
+
});
|
|
30621
|
+
}
|
|
30622
|
+
var feedbackAttachmentSchema = external_exports.strictObject({
|
|
30623
|
+
name: external_exports.string().min(1).max(120).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/u),
|
|
30624
|
+
text: external_exports.string().refine(isFeedbackText, "Expected plain UTF-8 text").refine((v) => feedbackTextBytes(v) <= 65536, "Attachment exceeds 64 KiB")
|
|
30625
|
+
});
|
|
30626
|
+
var feedbackReportSchema = external_exports.strictObject({
|
|
30627
|
+
id: external_exports.uuid(),
|
|
30628
|
+
kind: external_exports.enum(["apilift", "action"]),
|
|
30629
|
+
blocked: text,
|
|
30630
|
+
repro: text,
|
|
30631
|
+
expected: text,
|
|
30632
|
+
actual: text,
|
|
30633
|
+
comment: text.optional(),
|
|
30634
|
+
app: external_exports.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9-]*$/u).optional(),
|
|
30635
|
+
action: external_exports.string().max(120).regex(/^[a-z][a-z0-9-]*\.[a-z][a-z0-9-]*$/u).optional(),
|
|
30636
|
+
executionId: external_exports.uuid().optional(),
|
|
30637
|
+
incorrectResult: external_exports.literal(true).optional(),
|
|
30638
|
+
metadata: feedbackMetadataSchema,
|
|
30639
|
+
attachments: external_exports.array(feedbackAttachmentSchema).max(5)
|
|
30640
|
+
}).superRefine((v, ctx) => {
|
|
30641
|
+
if (v.kind === "action" ? !v.app || !v.action : v.app !== void 0 || v.action !== void 0 || v.executionId !== void 0 || v.incorrectResult !== void 0)
|
|
30642
|
+
ctx.addIssue({ code: "custom", message: "Action reports require app and action; general reports have no action target" });
|
|
30643
|
+
if (v.incorrectResult && !v.executionId)
|
|
30644
|
+
ctx.addIssue({ code: "custom", message: "Incorrect-result feedback requires an owned execution" });
|
|
30645
|
+
if (v.attachments.reduce((n, a) => n + feedbackTextBytes(a.text), 0) > 262144)
|
|
30646
|
+
ctx.addIssue({ code: "custom", message: "Attachments exceed 256 KiB combined" });
|
|
30647
|
+
if (new Set(v.attachments.map((a) => a.name)).size !== v.attachments.length)
|
|
30648
|
+
ctx.addIssue({ code: "custom", message: "Attachment names must be distinct" });
|
|
30649
|
+
});
|
|
30650
|
+
var feedbackStatusSchema = external_exports.enum(["new", "triaged", "resolved", "duplicate", "dismissed"]);
|
|
30651
|
+
|
|
30593
30652
|
// ../../packages/core/dist/api/contracts.js
|
|
30594
30653
|
var str = external_exports.string().min(1);
|
|
30595
30654
|
var uuid3 = external_exports.uuid();
|
|
@@ -30649,6 +30708,7 @@ var resourcePublicationResultSchema = external_exports.strictObject({ attributio
|
|
|
30649
30708
|
var resourceBatchSchema = external_exports.strictObject({ mode: external_exports.literal("complete-replacement").optional(), resources: external_exports.array(resourcePublicationSchema).min(1).max(128) }).refine((value) => new Set(value.resources.map((r) => `${r.kind}:${r.name}`)).size === value.resources.length, "Select each resource once").refine((value) => new Set(value.resources.map((r) => r.requestId)).size === value.resources.length, "Use distinct resource request ids");
|
|
30650
30709
|
var page = (item) => external_exports.strictObject({ items: external_exports.array(item), nextCursor: str.nullable().optional() });
|
|
30651
30710
|
var apiContracts = {
|
|
30711
|
+
submitFeedback: apiContract("POST", "/api/v1/feedback", "installation", noParams, noQuery, feedbackReportSchema, external_exports.strictObject({ id: uuid3, status: external_exports.enum(["accepted", "duplicate"]) }), ["feedback-throttled", "request-replay-mismatch", "execution-not-found", "app-not-found"]),
|
|
30652
30712
|
executionFeedback: apiContract("POST", "/api/v1/executions/{executionId}/feedback", "installation", external_exports.strictObject({ executionId: uuid3 }), noQuery, executionFeedbackSchema, external_exports.strictObject({ status: external_exports.enum(["accepted", "duplicate"]) }), ["execution-not-found"]),
|
|
30653
30713
|
publishResources: apiContract("PUT", "/api/v1/apps/{app}/resources", "installation", external_exports.strictObject({ app: str }), noQuery, resourceBatchSchema, external_exports.strictObject({ results: external_exports.array(external_exports.union([
|
|
30654
30714
|
external_exports.strictObject({ kind: resourceKindSchema, name: str, status: external_exports.enum(["published", "unchanged"]), publication: resourcePublicationResultSchema, currentVersion: external_exports.number().int().positive().nullable().optional() }),
|
|
@@ -30852,7 +30912,7 @@ var releaseStateSchema = external_exports.object({
|
|
|
30852
30912
|
var nativeProtocol = "apilift.native/v1";
|
|
30853
30913
|
var nativeOperationSchema = external_exports.enum(["hello", "scopes", "candidates", "claim", "heartbeat", "permit", "window.open", "window.close", "capture.append", "blob.chunk", "jobs.poll", "jobs.body", "jobs.input", "jobs.deliver", "credentials.put", "credentials.status", "credentials.delete", "credentials.rename"]);
|
|
30854
30914
|
var id = external_exports.string().min(1).max(160);
|
|
30855
|
-
var
|
|
30915
|
+
var text2 = external_exports.string().min(1);
|
|
30856
30916
|
var url2 = external_exports.url().refine((value) => /^https?:\/\//.test(value), "Expected an http(s) URL");
|
|
30857
30917
|
var hash3 = external_exports.string().regex(/^[0-9a-f]{64}$/);
|
|
30858
30918
|
var json2 = external_exports.json();
|
|
@@ -30862,27 +30922,27 @@ var lease = { leaseId: id };
|
|
|
30862
30922
|
var scoped = { scope };
|
|
30863
30923
|
var base = { protocol: external_exports.literal(nativeProtocol), id };
|
|
30864
30924
|
var request = (operation2, payload, hasScope = false) => external_exports.strictObject({ ...base, ...hasScope ? scoped : {}, operation: external_exports.literal(operation2), payload });
|
|
30865
|
-
var requirement = external_exports.strictObject({ name:
|
|
30866
|
-
var credential = { workspaceId: external_exports.uuid(), appId: external_exports.uuid(), appTitle:
|
|
30925
|
+
var requirement = external_exports.strictObject({ name: text2, header: text2, prefix: external_exports.string().max(80).optional() });
|
|
30926
|
+
var credential = { workspaceId: external_exports.uuid(), appId: external_exports.uuid(), appTitle: text2, transportName: text2, requirements: external_exports.array(requirement).max(16), draftId: external_exports.uuid().optional() };
|
|
30867
30927
|
var effect = external_exports.enum(["read", "create", "update", "delete"]);
|
|
30868
30928
|
var candidate = external_exports.strictObject({ selector: id, tabId: external_exports.number().int().positive(), active: external_exports.boolean(), title: external_exports.string().max(160) });
|
|
30869
30929
|
var bodyArtifact = external_exports.strictObject({ sha256: hash3, bytes: external_exports.number().int().nonnegative(), encoding: external_exports.literal("utf-8") });
|
|
30870
30930
|
var inputChunk = external_exports.strictObject({ offset: external_exports.number().int().nonnegative(), dataBase64: external_exports.string().max(240400), complete: external_exports.boolean() });
|
|
30871
30931
|
var preparedBinding = external_exports.strictObject({ $prepared: external_exports.string().max(2e3) });
|
|
30872
30932
|
var filePart = external_exports.strictObject({ sha256: hash3, bytes: external_exports.number().int().min(0).max(16 * 1024 * 1024), name: external_exports.string().min(1).max(180), contentType: external_exports.string().min(1).max(100) });
|
|
30873
|
-
var multipart = external_exports.array(external_exports.union([external_exports.strictObject({ name:
|
|
30933
|
+
var multipart = external_exports.array(external_exports.union([external_exports.strictObject({ name: text2, value: external_exports.union([external_exports.string().max(65536), external_exports.number(), external_exports.boolean(), preparedBinding]) }), external_exports.strictObject({ name: text2, file: filePart })])).min(1).max(64);
|
|
30874
30934
|
var filePreparation = external_exports.strictObject({ resultPaths: external_exports.array(external_exports.string().max(512)).min(1).max(8).optional(), url: url2, headers: external_exports.record(external_exports.string(), external_exports.string()), response: external_exports.strictObject({ path: external_exports.string().optional(), fields: external_exports.record(external_exports.string(), external_exports.string()).optional() }), urlFrom: external_exports.string().optional(), query: external_exports.record(external_exports.string(), preparedBinding).optional(), headerBindings: external_exports.record(external_exports.string(), preparedBinding).optional() });
|
|
30875
30935
|
var captureEntry = external_exports.strictObject({
|
|
30876
30936
|
captureId: id,
|
|
30877
30937
|
transactionId: id,
|
|
30878
30938
|
ts: external_exports.number(),
|
|
30879
|
-
label:
|
|
30880
|
-
captureOperation: external_exports.strictObject({ entity:
|
|
30939
|
+
label: text2,
|
|
30940
|
+
captureOperation: external_exports.strictObject({ entity: text2, operation: text2, effect }).nullable().optional(),
|
|
30881
30941
|
captureInputs: json2.optional(),
|
|
30882
|
-
capturePhase:
|
|
30942
|
+
capturePhase: text2.optional(),
|
|
30883
30943
|
page: external_exports.string().optional(),
|
|
30884
|
-
kind:
|
|
30885
|
-
method:
|
|
30944
|
+
kind: text2,
|
|
30945
|
+
method: text2,
|
|
30886
30946
|
url: external_exports.string(),
|
|
30887
30947
|
reqHeaders: external_exports.record(external_exports.string(), external_exports.string()),
|
|
30888
30948
|
reqBody: external_exports.string().nullable().optional(),
|
|
@@ -30904,24 +30964,24 @@ var captureEntry = external_exports.strictObject({
|
|
|
30904
30964
|
target: external_exports.strictObject({ tabId: external_exports.number().int().positive(), sessionId: external_exports.string().nullable(), targetId: external_exports.string().nullable(), targetType: external_exports.string().nullable(), frameId: external_exports.string().nullable(), isTopFrame: external_exports.boolean(), loaderId: external_exports.string().nullable(), documentURL: external_exports.string(), redirectHop: external_exports.number().int().nonnegative().optional() })
|
|
30905
30965
|
});
|
|
30906
30966
|
var nativeRequestSchemas = {
|
|
30907
|
-
hello: request("hello", external_exports.strictObject({ extensionId:
|
|
30967
|
+
hello: request("hello", external_exports.strictObject({ extensionId: text2, extensionVersion: text2, buildFingerprint: text2.optional(), capabilities: external_exports.array(text2) })),
|
|
30908
30968
|
scopes: request("scopes", empty2),
|
|
30909
30969
|
candidates: request("candidates", external_exports.strictObject({ clientId: id, origin: url2, candidates: external_exports.array(candidate).max(32), claimError: external_exports.string().min(1).max(400).optional() }), true),
|
|
30910
|
-
claim: request("claim", external_exports.strictObject({ ...lease, clientId: id, extensionId:
|
|
30911
|
-
heartbeat: request("heartbeat", external_exports.strictObject({ ...lease, clientId: id, extensionVersion:
|
|
30912
|
-
permit: request("permit", external_exports.strictObject({ ...lease, label:
|
|
30913
|
-
"window.open": request("window.open", external_exports.strictObject({ ...lease, windowId: id, windowPermit:
|
|
30970
|
+
claim: request("claim", external_exports.strictObject({ ...lease, clientId: id, extensionId: text2, extensionVersion: text2, capabilities: external_exports.array(text2), tabId: external_exports.number().int().positive(), tabSelector: id, url: url2, origin: url2 }), true),
|
|
30971
|
+
heartbeat: request("heartbeat", external_exports.strictObject({ ...lease, clientId: id, extensionVersion: text2, capabilities: external_exports.array(text2), tabId: external_exports.number().int().positive().optional(), tabSelector: id.optional(), url: url2.optional(), origin: url2.optional(), walDepth: external_exports.number().int().nonnegative().optional(), attached: external_exports.boolean().optional(), detached: external_exports.boolean().optional(), gap: external_exports.string().optional(), lost: external_exports.boolean().optional() }), true),
|
|
30972
|
+
permit: request("permit", external_exports.strictObject({ ...lease, label: text2.optional(), entity: text2.optional(), operation: text2.optional(), effect: effect.optional(), inputs: json2.optional(), phase: text2.optional() }), true),
|
|
30973
|
+
"window.open": request("window.open", external_exports.strictObject({ ...lease, windowId: id, windowPermit: text2, label: text2, transactionId: id, captureOperation: external_exports.strictObject({ entity: text2, operation: text2, effect }).nullable().optional(), captureInputs: json2.optional(), capturePhase: text2.optional(), settleMs: external_exports.number().int().nonnegative().optional(), sequenceBefore: external_exports.number().int().nonnegative().optional() }), true),
|
|
30914
30974
|
"window.close": request("window.close", external_exports.strictObject({ ...lease, windowId: id, transactionId: id, finalSequence: external_exports.number().int().nonnegative(), stoppedAt: external_exports.number().nonnegative().optional(), captured: external_exports.number().int().nonnegative().optional(), outcome: external_exports.strictObject({ executionState: external_exports.enum(["not-dispatched", "dispatched", "unknown"]).optional(), error: external_exports.string().optional() }).optional() }), true),
|
|
30915
30975
|
"capture.append": request("capture.append", external_exports.strictObject({ ...lease, seq: external_exports.number().int().nonnegative(), entries: external_exports.array(captureEntry).max(32) }), true),
|
|
30916
30976
|
"blob.chunk": request("blob.chunk", external_exports.strictObject({ ...lease, recording: id.optional(), jobId: id.optional(), sha256: hash3, bytes: external_exports.number().int().nonnegative(), offset: external_exports.number().int().nonnegative(), dataBase64: external_exports.string(), chunkSha256: hash3 }), true),
|
|
30917
|
-
"jobs.poll": request("jobs.poll", external_exports.strictObject({ ...lease, waitMs: external_exports.number().int().min(0).max(25e3), capabilities: external_exports.array(
|
|
30977
|
+
"jobs.poll": request("jobs.poll", external_exports.strictObject({ ...lease, waitMs: external_exports.number().int().min(0).max(25e3), capabilities: external_exports.array(text2) }), true),
|
|
30918
30978
|
"jobs.body": request("jobs.body", external_exports.strictObject({ ...lease, jobId: id, sha256: hash3, bytes: external_exports.number().int().nonnegative() }), true),
|
|
30919
30979
|
"jobs.input": request("jobs.input", external_exports.strictObject({ ...lease, jobId: id, sha256: hash3, offset: external_exports.number().int().nonnegative() }), true),
|
|
30920
30980
|
"jobs.deliver": request("jobs.deliver", external_exports.strictObject({ ...lease, jobId: id, result: json2 }), true),
|
|
30921
|
-
"credentials.put": request("credentials.put", external_exports.strictObject({ ...credential, name:
|
|
30981
|
+
"credentials.put": request("credentials.put", external_exports.strictObject({ ...credential, name: text2, fields: external_exports.record(external_exports.string(), text2), sessionId: external_exports.string().min(1).max(256).regex(/^(?:codex|claude):\S+$/u).optional() })),
|
|
30922
30982
|
"credentials.status": request("credentials.status", external_exports.strictObject(credential)),
|
|
30923
30983
|
"credentials.delete": request("credentials.delete", external_exports.strictObject({ ...credential, credentialId: external_exports.uuid() })),
|
|
30924
|
-
"credentials.rename": request("credentials.rename", external_exports.strictObject({ ...credential, credentialId: external_exports.uuid(), name:
|
|
30984
|
+
"credentials.rename": request("credentials.rename", external_exports.strictObject({ ...credential, credentialId: external_exports.uuid(), name: text2 }))
|
|
30925
30985
|
};
|
|
30926
30986
|
var requestUnion = external_exports.discriminatedUnion("operation", [nativeRequestSchemas.hello, nativeRequestSchemas.scopes, nativeRequestSchemas.candidates, nativeRequestSchemas.claim, nativeRequestSchemas.heartbeat, nativeRequestSchemas.permit, nativeRequestSchemas["window.open"], nativeRequestSchemas["window.close"], nativeRequestSchemas["capture.append"], nativeRequestSchemas["blob.chunk"], nativeRequestSchemas["jobs.poll"], nativeRequestSchemas["jobs.body"], nativeRequestSchemas["jobs.input"], nativeRequestSchemas["jobs.deliver"], nativeRequestSchemas["credentials.put"], nativeRequestSchemas["credentials.status"], nativeRequestSchemas["credentials.delete"], nativeRequestSchemas["credentials.rename"]]);
|
|
30927
30987
|
var nativeRequestSchema = requestUnion.superRefine((message, context) => {
|
|
@@ -30933,15 +30993,15 @@ var nativeRequestSchema = requestUnion.superRefine((message, context) => {
|
|
|
30933
30993
|
context.addIssue({ code: "custom", path: ["payload", "dataBase64"], message: "Blob chunk must be valid base64 of at most 176 KiB" });
|
|
30934
30994
|
}
|
|
30935
30995
|
});
|
|
30936
|
-
var identity = external_exports.strictObject({ accountId: external_exports.uuid(), workspaceId: external_exports.uuid(), installationId: external_exports.uuid(), enabled: external_exports.boolean(), internal: external_exports.boolean(), environment: external_exports.enum(["production", "test", "disabled"]), projectKey: external_exports.string(), host: external_exports.string(), expiresAt:
|
|
30937
|
-
var nativeHelloResultSchema = external_exports.strictObject({ hostVersion:
|
|
30938
|
-
var nativeScopesResultSchema = external_exports.strictObject({ scopes: external_exports.array(external_exports.strictObject({ kind: external_exports.enum(["inspect", "execute", "capture"]), id, pageOrigin: url2, leaseId: id.optional(), tabSelector: id.optional(), startUrl: url2.optional(), bindingMode: external_exports.enum(["exact-existing-url", "installation-prefix"]).optional(), expiresAt:
|
|
30939
|
-
var nativeCredentialStatusResultSchema = external_exports.strictObject({ status: external_exports.enum(["configured", "missing"]), credentials: external_exports.array(external_exports.strictObject({ id: external_exports.uuid(), name:
|
|
30996
|
+
var identity = external_exports.strictObject({ accountId: external_exports.uuid(), workspaceId: external_exports.uuid(), installationId: external_exports.uuid(), enabled: external_exports.boolean(), internal: external_exports.boolean(), environment: external_exports.enum(["production", "test", "disabled"]), projectKey: external_exports.string(), host: external_exports.string(), expiresAt: text2 });
|
|
30997
|
+
var nativeHelloResultSchema = external_exports.strictObject({ hostVersion: text2, hostBuildFingerprint: text2, minimumHostVersion: text2.optional(), minimumExtensionVersion: text2, availableExtensionVersion: text2, capabilities: external_exports.array(text2), hostRestartRequired: external_exports.boolean(), identity: identity.optional() });
|
|
30998
|
+
var nativeScopesResultSchema = external_exports.strictObject({ scopes: external_exports.array(external_exports.strictObject({ kind: external_exports.enum(["inspect", "execute", "capture"]), id, pageOrigin: url2, leaseId: id.optional(), tabSelector: id.optional(), startUrl: url2.optional(), bindingMode: external_exports.enum(["exact-existing-url", "installation-prefix"]).optional(), expiresAt: text2.optional(), window: json2.optional(), ackThrough: external_exports.number().int().nonnegative().optional(), activatedAt: external_exports.number().optional() })), identity: identity.optional() });
|
|
30999
|
+
var nativeCredentialStatusResultSchema = external_exports.strictObject({ status: external_exports.enum(["configured", "missing"]), credentials: external_exports.array(external_exports.strictObject({ id: external_exports.uuid(), name: text2, fields: external_exports.array(text2) })) });
|
|
30940
31000
|
var nativeJobSchema = external_exports.discriminatedUnion("kind", [
|
|
30941
|
-
external_exports.strictObject({ id, kind: external_exports.literal("replay"), effect, method: external_exports.enum(["GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH", "DELETE"]), url: url2, headers: external_exports.record(external_exports.string(), external_exports.string()), body: json2.optional(), multipart: multipart.optional(), anonymous: external_exports.boolean().optional(), fileResponse: external_exports.boolean().optional(), filePreparation: filePreparation.optional(), pageOrigin: url2, allowedRequestOrigin: url2, timeoutMs: external_exports.number().int().positive(), manualRedirects: external_exports.boolean().optional(), contextBaseUrl: url2.optional(), frame: external_exports.strictObject({ selector:
|
|
30942
|
-
external_exports.strictObject({ id, kind: external_exports.literal("begin"), label:
|
|
31001
|
+
external_exports.strictObject({ id, kind: external_exports.literal("replay"), effect, method: external_exports.enum(["GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH", "DELETE"]), url: url2, headers: external_exports.record(external_exports.string(), external_exports.string()), body: json2.optional(), multipart: multipart.optional(), anonymous: external_exports.boolean().optional(), fileResponse: external_exports.boolean().optional(), filePreparation: filePreparation.optional(), pageOrigin: url2, allowedRequestOrigin: url2, timeoutMs: external_exports.number().int().positive(), manualRedirects: external_exports.boolean().optional(), contextBaseUrl: url2.optional(), frame: external_exports.strictObject({ selector: text2, baseUrl: url2 }).optional(), credentialHeaderNames: external_exports.array(text2).optional(), authRecipeDefinition: json2.optional(), authRecipeId: text2.optional(), authRecipeHash: hash3.optional(), authRefresh: external_exports.boolean().optional(), semanticProvenance: external_exports.array(json2).optional() }),
|
|
31002
|
+
external_exports.strictObject({ id, kind: external_exports.literal("begin"), label: text2, entity: text2.optional(), operation: text2.optional(), effect: effect.optional(), inputs: json2.optional(), phase: text2.optional(), settleMs: external_exports.number().int().nonnegative().optional() }),
|
|
30943
31003
|
external_exports.strictObject({ id, kind: external_exports.literal("stop"), windowId: id.optional() }),
|
|
30944
|
-
external_exports.strictObject({ id, kind: external_exports.literal("auth-probe"), captureId: id, field:
|
|
31004
|
+
external_exports.strictObject({ id, kind: external_exports.literal("auth-probe"), captureId: id, field: text2.optional(), scope: json2.optional() })
|
|
30945
31005
|
]);
|
|
30946
31006
|
var claimResult = external_exports.strictObject({ ackThrough: external_exports.number().int().nonnegative().optional(), captureBatchMax: external_exports.number().int().min(1).max(32).optional() });
|
|
30947
31007
|
var captureAck = external_exports.strictObject({ ackThrough: external_exports.number().int().nonnegative(), discardCaptures: external_exports.array(id).optional(), discardRecording: id.optional(), freezeRequired: id.optional() });
|
|
@@ -30953,7 +31013,7 @@ var nativeResultSchemas = {
|
|
|
30953
31013
|
candidates: empty2,
|
|
30954
31014
|
claim: claimResult,
|
|
30955
31015
|
heartbeat: claimResult,
|
|
30956
|
-
permit: external_exports.strictObject({ windowPermit:
|
|
31016
|
+
permit: external_exports.strictObject({ windowPermit: text2, label: text2.optional(), captureInputs: json2.optional(), capturePhase: text2.optional() }),
|
|
30957
31017
|
"window.open": empty2,
|
|
30958
31018
|
"window.close": frozenWindow,
|
|
30959
31019
|
"capture.append": captureAck,
|
|
@@ -30967,7 +31027,7 @@ var nativeResultSchemas = {
|
|
|
30967
31027
|
"credentials.delete": nativeCredentialStatusResultSchema,
|
|
30968
31028
|
"credentials.rename": nativeCredentialStatusResultSchema
|
|
30969
31029
|
};
|
|
30970
|
-
var nativeErrorSchema = external_exports.strictObject({ code:
|
|
31030
|
+
var nativeErrorSchema = external_exports.strictObject({ code: text2, message: text2, exitCode: external_exports.number().int().optional(), next: external_exports.string().optional(), executionState: external_exports.enum(["not-dispatched", "dispatched", "unknown"]).optional() });
|
|
30971
31031
|
var nativeReplySchema = external_exports.discriminatedUnion("ok", [
|
|
30972
31032
|
external_exports.strictObject({ protocol: external_exports.literal(nativeProtocol), id, ok: external_exports.literal(true), result: external_exports.union([nativeHelloResultSchema, nativeScopesResultSchema, nativeCredentialStatusResultSchema, nativeJobSchema, nativeResultSchemas.permit, nativeResultSchemas["capture.append"], claimResult, blobAck, frozenWindow, bodyArtifact, inputChunk, empty2]) }),
|
|
30973
31033
|
external_exports.strictObject({ protocol: external_exports.literal(nativeProtocol), id, ok: external_exports.literal(false), error: nativeErrorSchema })
|
|
@@ -31088,7 +31148,7 @@ function createCliApi(baseUrl, fetcher = fetch, token, sessionId, observe) {
|
|
|
31088
31148
|
}
|
|
31089
31149
|
}
|
|
31090
31150
|
};
|
|
31091
|
-
return Object.assign(createApiClient(baseUrl, transport), { cacheNamespace: baseUrl });
|
|
31151
|
+
return Object.assign(createApiClient(baseUrl, transport), { cacheNamespace: baseUrl, authenticatedWith: (candidate2) => candidate2 === token });
|
|
31092
31152
|
}
|
|
31093
31153
|
|
|
31094
31154
|
// src/session.ts
|
|
@@ -31314,14 +31374,14 @@ import { createHash as createHash4 } from "node:crypto";
|
|
|
31314
31374
|
import { existsSync as existsSync3, linkSync, readFileSync as readFileSync3, realpathSync as realpathSync2, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
31315
31375
|
|
|
31316
31376
|
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
31317
|
-
function createScanner(
|
|
31318
|
-
const len =
|
|
31377
|
+
function createScanner(text3, ignoreTrivia = false) {
|
|
31378
|
+
const len = text3.length;
|
|
31319
31379
|
let pos = 0, value = "", tokenOffset = 0, token = 16, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0;
|
|
31320
31380
|
function scanHexDigits(count, exact) {
|
|
31321
31381
|
let digits = 0;
|
|
31322
31382
|
let value2 = 0;
|
|
31323
31383
|
while (digits < count || !exact) {
|
|
31324
|
-
let ch =
|
|
31384
|
+
let ch = text3.charCodeAt(pos);
|
|
31325
31385
|
if (ch >= 48 && ch <= 57) {
|
|
31326
31386
|
value2 = value2 * 16 + ch - 48;
|
|
31327
31387
|
} else if (ch >= 65 && ch <= 70) {
|
|
@@ -31348,35 +31408,35 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31348
31408
|
}
|
|
31349
31409
|
function scanNumber() {
|
|
31350
31410
|
let start = pos;
|
|
31351
|
-
if (
|
|
31411
|
+
if (text3.charCodeAt(pos) === 48) {
|
|
31352
31412
|
pos++;
|
|
31353
31413
|
} else {
|
|
31354
31414
|
pos++;
|
|
31355
|
-
while (pos <
|
|
31415
|
+
while (pos < text3.length && isDigit(text3.charCodeAt(pos))) {
|
|
31356
31416
|
pos++;
|
|
31357
31417
|
}
|
|
31358
31418
|
}
|
|
31359
|
-
if (pos <
|
|
31419
|
+
if (pos < text3.length && text3.charCodeAt(pos) === 46) {
|
|
31360
31420
|
pos++;
|
|
31361
|
-
if (pos <
|
|
31421
|
+
if (pos < text3.length && isDigit(text3.charCodeAt(pos))) {
|
|
31362
31422
|
pos++;
|
|
31363
|
-
while (pos <
|
|
31423
|
+
while (pos < text3.length && isDigit(text3.charCodeAt(pos))) {
|
|
31364
31424
|
pos++;
|
|
31365
31425
|
}
|
|
31366
31426
|
} else {
|
|
31367
31427
|
scanError = 3;
|
|
31368
|
-
return
|
|
31428
|
+
return text3.substring(start, pos);
|
|
31369
31429
|
}
|
|
31370
31430
|
}
|
|
31371
31431
|
let end = pos;
|
|
31372
|
-
if (pos <
|
|
31432
|
+
if (pos < text3.length && (text3.charCodeAt(pos) === 69 || text3.charCodeAt(pos) === 101)) {
|
|
31373
31433
|
pos++;
|
|
31374
|
-
if (pos <
|
|
31434
|
+
if (pos < text3.length && text3.charCodeAt(pos) === 43 || text3.charCodeAt(pos) === 45) {
|
|
31375
31435
|
pos++;
|
|
31376
31436
|
}
|
|
31377
|
-
if (pos <
|
|
31437
|
+
if (pos < text3.length && isDigit(text3.charCodeAt(pos))) {
|
|
31378
31438
|
pos++;
|
|
31379
|
-
while (pos <
|
|
31439
|
+
while (pos < text3.length && isDigit(text3.charCodeAt(pos))) {
|
|
31380
31440
|
pos++;
|
|
31381
31441
|
}
|
|
31382
31442
|
end = pos;
|
|
@@ -31384,30 +31444,30 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31384
31444
|
scanError = 3;
|
|
31385
31445
|
}
|
|
31386
31446
|
}
|
|
31387
|
-
return
|
|
31447
|
+
return text3.substring(start, end);
|
|
31388
31448
|
}
|
|
31389
31449
|
function scanString() {
|
|
31390
31450
|
let result = "", start = pos;
|
|
31391
31451
|
while (true) {
|
|
31392
31452
|
if (pos >= len) {
|
|
31393
|
-
result +=
|
|
31453
|
+
result += text3.substring(start, pos);
|
|
31394
31454
|
scanError = 2;
|
|
31395
31455
|
break;
|
|
31396
31456
|
}
|
|
31397
|
-
const ch =
|
|
31457
|
+
const ch = text3.charCodeAt(pos);
|
|
31398
31458
|
if (ch === 34) {
|
|
31399
|
-
result +=
|
|
31459
|
+
result += text3.substring(start, pos);
|
|
31400
31460
|
pos++;
|
|
31401
31461
|
break;
|
|
31402
31462
|
}
|
|
31403
31463
|
if (ch === 92) {
|
|
31404
|
-
result +=
|
|
31464
|
+
result += text3.substring(start, pos);
|
|
31405
31465
|
pos++;
|
|
31406
31466
|
if (pos >= len) {
|
|
31407
31467
|
scanError = 2;
|
|
31408
31468
|
break;
|
|
31409
31469
|
}
|
|
31410
|
-
const ch2 =
|
|
31470
|
+
const ch2 = text3.charCodeAt(pos++);
|
|
31411
31471
|
switch (ch2) {
|
|
31412
31472
|
case 34:
|
|
31413
31473
|
result += '"';
|
|
@@ -31449,7 +31509,7 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31449
31509
|
}
|
|
31450
31510
|
if (ch >= 0 && ch <= 31) {
|
|
31451
31511
|
if (isLineBreak(ch)) {
|
|
31452
|
-
result +=
|
|
31512
|
+
result += text3.substring(start, pos);
|
|
31453
31513
|
scanError = 2;
|
|
31454
31514
|
break;
|
|
31455
31515
|
} else {
|
|
@@ -31470,19 +31530,19 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31470
31530
|
tokenOffset = len;
|
|
31471
31531
|
return token = 17;
|
|
31472
31532
|
}
|
|
31473
|
-
let code =
|
|
31533
|
+
let code = text3.charCodeAt(pos);
|
|
31474
31534
|
if (isWhiteSpace(code)) {
|
|
31475
31535
|
do {
|
|
31476
31536
|
pos++;
|
|
31477
31537
|
value += String.fromCharCode(code);
|
|
31478
|
-
code =
|
|
31538
|
+
code = text3.charCodeAt(pos);
|
|
31479
31539
|
} while (isWhiteSpace(code));
|
|
31480
31540
|
return token = 15;
|
|
31481
31541
|
}
|
|
31482
31542
|
if (isLineBreak(code)) {
|
|
31483
31543
|
pos++;
|
|
31484
31544
|
value += String.fromCharCode(code);
|
|
31485
|
-
if (code === 13 &&
|
|
31545
|
+
if (code === 13 && text3.charCodeAt(pos) === 10) {
|
|
31486
31546
|
pos++;
|
|
31487
31547
|
value += "\n";
|
|
31488
31548
|
}
|
|
@@ -31518,31 +31578,31 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31518
31578
|
// comments
|
|
31519
31579
|
case 47:
|
|
31520
31580
|
const start = pos - 1;
|
|
31521
|
-
if (
|
|
31581
|
+
if (text3.charCodeAt(pos + 1) === 47) {
|
|
31522
31582
|
pos += 2;
|
|
31523
31583
|
while (pos < len) {
|
|
31524
|
-
if (isLineBreak(
|
|
31584
|
+
if (isLineBreak(text3.charCodeAt(pos))) {
|
|
31525
31585
|
break;
|
|
31526
31586
|
}
|
|
31527
31587
|
pos++;
|
|
31528
31588
|
}
|
|
31529
|
-
value =
|
|
31589
|
+
value = text3.substring(start, pos);
|
|
31530
31590
|
return token = 12;
|
|
31531
31591
|
}
|
|
31532
|
-
if (
|
|
31592
|
+
if (text3.charCodeAt(pos + 1) === 42) {
|
|
31533
31593
|
pos += 2;
|
|
31534
31594
|
const safeLength = len - 1;
|
|
31535
31595
|
let commentClosed = false;
|
|
31536
31596
|
while (pos < safeLength) {
|
|
31537
|
-
const ch =
|
|
31538
|
-
if (ch === 42 &&
|
|
31597
|
+
const ch = text3.charCodeAt(pos);
|
|
31598
|
+
if (ch === 42 && text3.charCodeAt(pos + 1) === 47) {
|
|
31539
31599
|
pos += 2;
|
|
31540
31600
|
commentClosed = true;
|
|
31541
31601
|
break;
|
|
31542
31602
|
}
|
|
31543
31603
|
pos++;
|
|
31544
31604
|
if (isLineBreak(ch)) {
|
|
31545
|
-
if (ch === 13 &&
|
|
31605
|
+
if (ch === 13 && text3.charCodeAt(pos) === 10) {
|
|
31546
31606
|
pos++;
|
|
31547
31607
|
}
|
|
31548
31608
|
lineNumber++;
|
|
@@ -31553,7 +31613,7 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31553
31613
|
pos++;
|
|
31554
31614
|
scanError = 1;
|
|
31555
31615
|
}
|
|
31556
|
-
value =
|
|
31616
|
+
value = text3.substring(start, pos);
|
|
31557
31617
|
return token = 13;
|
|
31558
31618
|
}
|
|
31559
31619
|
value += String.fromCharCode(code);
|
|
@@ -31563,7 +31623,7 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31563
31623
|
case 45:
|
|
31564
31624
|
value += String.fromCharCode(code);
|
|
31565
31625
|
pos++;
|
|
31566
|
-
if (pos === len || !isDigit(
|
|
31626
|
+
if (pos === len || !isDigit(text3.charCodeAt(pos))) {
|
|
31567
31627
|
return token = 16;
|
|
31568
31628
|
}
|
|
31569
31629
|
// found a minus, followed by a number so
|
|
@@ -31585,10 +31645,10 @@ function createScanner(text2, ignoreTrivia = false) {
|
|
|
31585
31645
|
default:
|
|
31586
31646
|
while (pos < len && isUnknownContentCharacter(code)) {
|
|
31587
31647
|
pos++;
|
|
31588
|
-
code =
|
|
31648
|
+
code = text3.charCodeAt(pos);
|
|
31589
31649
|
}
|
|
31590
31650
|
if (tokenOffset !== pos) {
|
|
31591
|
-
value =
|
|
31651
|
+
value = text3.substring(tokenOffset, pos);
|
|
31592
31652
|
switch (value) {
|
|
31593
31653
|
case "true":
|
|
31594
31654
|
return token = 8;
|
|
@@ -31771,7 +31831,7 @@ var ParseOptions;
|
|
|
31771
31831
|
allowTrailingComma: false
|
|
31772
31832
|
};
|
|
31773
31833
|
})(ParseOptions || (ParseOptions = {}));
|
|
31774
|
-
function parse3(
|
|
31834
|
+
function parse3(text3, errors = [], options2 = ParseOptions.DEFAULT) {
|
|
31775
31835
|
let currentProperty = null;
|
|
31776
31836
|
let currentParent = [];
|
|
31777
31837
|
const previousParents = [];
|
|
@@ -31811,11 +31871,11 @@ function parse3(text2, errors = [], options2 = ParseOptions.DEFAULT) {
|
|
|
31811
31871
|
errors.push({ error: error62, offset, length });
|
|
31812
31872
|
}
|
|
31813
31873
|
};
|
|
31814
|
-
visit2(
|
|
31874
|
+
visit2(text3, visitor, options2);
|
|
31815
31875
|
return currentParent[0];
|
|
31816
31876
|
}
|
|
31817
|
-
function visit2(
|
|
31818
|
-
const _scanner = createScanner(
|
|
31877
|
+
function visit2(text3, visitor, options2 = ParseOptions.DEFAULT) {
|
|
31878
|
+
const _scanner = createScanner(text3, false);
|
|
31819
31879
|
const _jsonPath = [];
|
|
31820
31880
|
let suppressedCallbacks = 0;
|
|
31821
31881
|
function toNoArgVisit(visitFunction) {
|
|
@@ -51596,6 +51596,9 @@ var commandRegistry = {
|
|
|
51596
51596
|
actionsShow: { path: ["actions", "show"], min: 2, max: 11, values: ["input-template"], flags: ["schema"] },
|
|
51597
51597
|
run: { path: ["run"], min: 2, max: 2, values: ["input", "output"], flags: ["check", "no-context"], repeat: ["select"], actionFlags: true },
|
|
51598
51598
|
feedback: { path: ["feedback"], min: 2, max: 2, values: ["execution"], flags: ["incorrect"] },
|
|
51599
|
+
feedbackReport: { path: ["feedback", "report"], min: 0, max: 0, values: ["blocked", "repro", "expected", "actual", "comment", "from"], repeat: ["attach"] },
|
|
51600
|
+
feedbackAction: { path: ["feedback", "action"], min: 2, max: 2, values: ["blocked", "repro", "expected", "actual", "comment", "from", "execution"], repeat: ["attach"], flags: ["incorrect"] },
|
|
51601
|
+
feedbackRetry: { path: ["feedback", "retry"], min: 1, max: 1 },
|
|
51599
51602
|
credentialsList: { path: ["credentials", "list"], min: 1, max: 2 },
|
|
51600
51603
|
credentialsUse: { path: ["credentials", "use"], min: 3, max: 3 },
|
|
51601
51604
|
credentialsAdd: { path: ["credentials", "add"], min: 2, max: 2, values: ["file"] },
|