copilotkit 4.9.37 → 4.9.47
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/README.md +51 -3
- package/cli-build-info.json +8 -8
- package/index.js +482 -182
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +33 -16
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +13 -13
- package/onboarding/prompts/credentials/plan.md +20 -20
- package/onboarding/prompts/fallback/best-effort.md +6 -6
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +2 -2
- package/onboarding/prompts/framework/deep-agents.md +2 -2
- package/onboarding/prompts/framework/google-adk.md +2 -2
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +2 -2
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +2 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +2 -2
- package/onboarding/prompts/framework/strands-typescript.md +2 -2
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +6 -6
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +7 -7
- package/onboarding/prompts/proof/complete.md +20 -7
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +9 -9
- package/onboarding/prompts/starter/clone.md +5 -5
- package/onboarding/prompts/subagent/create-plan.md +1 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +29 -11
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +1 -1
- package/release/release-tool.js +1 -1
package/index.js
CHANGED
|
@@ -96,14 +96,14 @@ function getTelemetryEndpointUrl() {
|
|
|
96
96
|
}
|
|
97
97
|
function getBuildInfo() {
|
|
98
98
|
return {
|
|
99
|
-
version: true ? "4.9.
|
|
100
|
-
buildNumber: true ? "
|
|
101
|
-
commitSha: true ? "
|
|
99
|
+
version: true ? "4.9.47" : "dev",
|
|
100
|
+
buildNumber: true ? "34279600219" : "dev",
|
|
101
|
+
commitSha: true ? "85f6b2eb2b4c8fef747bbfb0e3f5991b196ecc43" : "dev",
|
|
102
102
|
copilotKitCommit: getTemplateRef()
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
function getTemplateRef() {
|
|
106
|
-
return true ? "
|
|
106
|
+
return true ? "380ad1220a7bc78104baedc469c4d086c8910494" : "main";
|
|
107
107
|
}
|
|
108
108
|
function getC15tBackendUrl() {
|
|
109
109
|
return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
|
|
@@ -27932,6 +27932,7 @@ __export(src_exports, {
|
|
|
27932
27932
|
cliProductCredentialExchangeResponseSchema: () => cliProductCredentialExchangeResponseSchema,
|
|
27933
27933
|
cliProductCredentialPayloadSchema: () => cliProductCredentialPayloadSchema,
|
|
27934
27934
|
cliProductCredentialSchema: () => cliProductCredentialSchema,
|
|
27935
|
+
cliProductCredentialTokenPayloadSchema: () => cliProductCredentialTokenPayloadSchema,
|
|
27935
27936
|
cliTelemetryIdentityRequestSchema: () => cliTelemetryIdentityRequestSchema,
|
|
27936
27937
|
cliTelemetryIdentityResponseSchema: () => cliTelemetryIdentityResponseSchema,
|
|
27937
27938
|
cliTelemetryProjectIdSchema: () => cliTelemetryProjectIdSchema,
|
|
@@ -28090,7 +28091,7 @@ function parseEntitlementGrantedEvent(input) {
|
|
|
28090
28091
|
function parseManagedFeatureAvailability(input) {
|
|
28091
28092
|
return managedFeatureAvailabilitySchema.parse(input);
|
|
28092
28093
|
}
|
|
28093
|
-
var ENTITLEMENT_SOURCES, ENTITLEMENT_STATES, ENTERPRISE_SUBSCRIPTION_STATUSES, WAITLIST_OFFER_CODES, featureValueSchema, catalogFeatureMapSchema, enterpriseFeaturesSchema, adminClerkOrganizationSchema, enterpriseSubscriptionStatusSchema, planCodeSchema, organizationPlanSelectionGateCompletionReasonSchema, organizationPlanSelectionGateSchema, organizationPlanSelectionGateResponseSchema, organizationPlanSelectionGateRequestSchema, organizationPlanSelectionRequestSchema, organizationPlanSelectionResponseSchema, entitlementSourceSchema, entitlementStateSchema, waitlistOfferCodeSchema, joinWaitlistRequestSchema, waitlistEntrySchema, currentWaitlistResponseSchema, joinWaitlistResponseSchema, adminEnterpriseSubscriptionSchema, customerEffectiveEntitlementSchema, adminEffectiveEntitlementSchema, currentEntitlementResponseSchema, inspectorEntitlementProjectionVariants, inspectorEntitlementProjectionSchema, inspectorEntitlementProjectionTransportSchema, organizationEntitlementResponseSchema, customerEffectiveEntitlementTransportSchema, organizationEntitlementResponseTransportSchema, CLI_PRODUCT_CREDENTIAL_CAPABILITIES, APP_PROJECT_ID_MAX, CLI_TELEMETRY_BINDING_ID_MAX_LENGTH, cliTelemetryProjectIdSchema, cliTelemetryIdentityRequestSchema, cliTelemetryIdentityResponseSchema, cliProductCredentialCapabilitySchema, cliProductCredentialActorSchema, cliProductCredentialSchema, cliProductCredentialPayloadSchema, cliProductCredentialExchangeResponseSchema, ACCOUNT_PROFILE_EMAIL_MAX_LENGTH, ACCOUNT_PROFILE_DISPLAY_NAME_MAX_LENGTH, ACCOUNT_PROFILE_AVATAR_URL_MAX_LENGTH, managedIntelligenceDestinationAppSchema, absoluteUrlSchema, managedHandoffTimestampSchema, emailValidationSchema, optionalAccountProfileEmailSchema, optionalAccountProfileDisplayNameSchema, optionalAccountProfileAvatarUrlSchema, nullableAccountProfileEmailSchema, nullableAccountProfileDisplayNameSchema, nullableAccountProfileAvatarUrlSchema, accountProfileSchema, managedClerkOrganizationSchema, managedHandoffActorSchema, managedIntelligenceSessionSchema, managedIntelligenceHandoffIssueRequestSchema, managedIntelligenceHandoffIssueResponseSchema, managedIntelligenceHandoffExchangeRequestSchema, managedIntelligenceHandoffExchangeResponseSchema, managedIntelligenceHandoffExchangeResponseTransportSchema, intelligenceAuthSessionResponseSchema, adminEnterpriseSubscriptionListResponseSchema, adminEnterpriseSubscriptionResponseSchema, adminEnterpriseSubscriptionDetailResponseSchema, createAdminEnterpriseSubscriptionRequestSchema, updateAdminEnterpriseSubscriptionRequestSchema, entitlementGrantedEventSchema, MANAGED_FEATURE_DISABLED_REASONS, managedFeatureDisabledReasonSchema, managedFeatureAvailabilitySchema, MANAGED_FEATURE_AVAILABLE, MANAGED_FEATURE_DISABLED_BY_FEATURE_FLAG, MANAGED_FEATURE_DISABLED_BY_ENTITLEMENT;
|
|
28094
|
+
var ENTITLEMENT_SOURCES, ENTITLEMENT_STATES, ENTERPRISE_SUBSCRIPTION_STATUSES, WAITLIST_OFFER_CODES, featureValueSchema, catalogFeatureMapSchema, enterpriseFeaturesSchema, adminClerkOrganizationSchema, enterpriseSubscriptionStatusSchema, planCodeSchema, organizationPlanSelectionGateCompletionReasonSchema, organizationPlanSelectionGateSchema, organizationPlanSelectionGateResponseSchema, organizationPlanSelectionGateRequestSchema, organizationPlanSelectionRequestSchema, organizationPlanSelectionResponseSchema, entitlementSourceSchema, entitlementStateSchema, waitlistOfferCodeSchema, joinWaitlistRequestSchema, waitlistEntrySchema, currentWaitlistResponseSchema, joinWaitlistResponseSchema, adminEnterpriseSubscriptionSchema, customerEffectiveEntitlementSchema, adminEffectiveEntitlementSchema, currentEntitlementResponseSchema, inspectorEntitlementProjectionVariants, inspectorEntitlementProjectionSchema, inspectorEntitlementProjectionTransportSchema, organizationEntitlementResponseSchema, customerEffectiveEntitlementTransportSchema, organizationEntitlementResponseTransportSchema, CLI_PRODUCT_CREDENTIAL_CAPABILITIES, APP_PROJECT_ID_MAX, CLI_TELEMETRY_BINDING_ID_MAX_LENGTH, cliTelemetryProjectIdSchema, cliTelemetryIdentityRequestSchema, cliTelemetryIdentityResponseSchema, cliProductCredentialCapabilitySchema, cliProductCredentialActorSchema, cliProductCredentialSchema, cliProductCredentialPayloadSchema, cliProductCredentialTokenPayloadSchema, cliProductCredentialExchangeResponseSchema, ACCOUNT_PROFILE_EMAIL_MAX_LENGTH, ACCOUNT_PROFILE_DISPLAY_NAME_MAX_LENGTH, ACCOUNT_PROFILE_AVATAR_URL_MAX_LENGTH, managedIntelligenceDestinationAppSchema, absoluteUrlSchema, managedHandoffTimestampSchema, emailValidationSchema, optionalAccountProfileEmailSchema, optionalAccountProfileDisplayNameSchema, optionalAccountProfileAvatarUrlSchema, nullableAccountProfileEmailSchema, nullableAccountProfileDisplayNameSchema, nullableAccountProfileAvatarUrlSchema, accountProfileSchema, managedClerkOrganizationSchema, managedHandoffActorSchema, managedIntelligenceSessionSchema, managedIntelligenceHandoffIssueRequestSchema, managedIntelligenceHandoffIssueResponseSchema, managedIntelligenceHandoffExchangeRequestSchema, managedIntelligenceHandoffExchangeResponseSchema, managedIntelligenceHandoffExchangeResponseTransportSchema, intelligenceAuthSessionResponseSchema, adminEnterpriseSubscriptionListResponseSchema, adminEnterpriseSubscriptionResponseSchema, adminEnterpriseSubscriptionDetailResponseSchema, createAdminEnterpriseSubscriptionRequestSchema, updateAdminEnterpriseSubscriptionRequestSchema, entitlementGrantedEventSchema, MANAGED_FEATURE_DISABLED_REASONS, managedFeatureDisabledReasonSchema, managedFeatureAvailabilitySchema, MANAGED_FEATURE_AVAILABLE, MANAGED_FEATURE_DISABLED_BY_FEATURE_FLAG, MANAGED_FEATURE_DISABLED_BY_ENTITLEMENT;
|
|
28094
28095
|
var init_src3 = __esm({
|
|
28095
28096
|
"libs/ops-contracts/src/index.ts"() {
|
|
28096
28097
|
"use strict";
|
|
@@ -28353,6 +28354,9 @@ var init_src3 = __esm({
|
|
|
28353
28354
|
cliProductCredentialPayloadSchema = cliProductCredentialSchema.omit({
|
|
28354
28355
|
token: true
|
|
28355
28356
|
});
|
|
28357
|
+
cliProductCredentialTokenPayloadSchema = cliProductCredentialPayloadSchema.extend({
|
|
28358
|
+
organizationName: external_exports.string().trim().min(1).optional()
|
|
28359
|
+
}).strict();
|
|
28356
28360
|
cliProductCredentialExchangeResponseSchema = external_exports.object({
|
|
28357
28361
|
productCredential: cliProductCredentialSchema
|
|
28358
28362
|
}).strict();
|
|
@@ -98449,6 +98453,196 @@ var init_src6 = __esm({
|
|
|
98449
98453
|
}
|
|
98450
98454
|
});
|
|
98451
98455
|
|
|
98456
|
+
// apps/cli/src/services/runtime-url.ts
|
|
98457
|
+
import * as path22 from "node:path";
|
|
98458
|
+
function portInCommand(command2) {
|
|
98459
|
+
for (const pattern of PORT_PATTERNS) {
|
|
98460
|
+
const match = pattern.exec(command2);
|
|
98461
|
+
if (match?.[1] !== void 0) {
|
|
98462
|
+
const port = Number.parseInt(match[1], 10);
|
|
98463
|
+
if (port > 0 && port < 65536) {
|
|
98464
|
+
return port;
|
|
98465
|
+
}
|
|
98466
|
+
}
|
|
98467
|
+
}
|
|
98468
|
+
return void 0;
|
|
98469
|
+
}
|
|
98470
|
+
function discoverWebDevPort(appDir, projectEnvValues) {
|
|
98471
|
+
const appEnv = resolveProjectEnv(appDir, appDir);
|
|
98472
|
+
const values = { ...projectEnvValues, ...appEnv.values };
|
|
98473
|
+
const declared = values["PORT"];
|
|
98474
|
+
if (declared !== void 0 && /^\d{2,5}$/.test(declared.trim())) {
|
|
98475
|
+
const port2 = Number.parseInt(declared.trim(), 10);
|
|
98476
|
+
if (port2 > 0 && port2 < 65536) {
|
|
98477
|
+
return {
|
|
98478
|
+
origin: `PORT in ${appEnv.origins["PORT"] ?? "the project environment"}`,
|
|
98479
|
+
port: port2
|
|
98480
|
+
};
|
|
98481
|
+
}
|
|
98482
|
+
}
|
|
98483
|
+
const scripts = readAppManifest(appDir)?.scripts ?? {};
|
|
98484
|
+
const dev = scripts["dev"];
|
|
98485
|
+
if (dev === void 0) {
|
|
98486
|
+
return void 0;
|
|
98487
|
+
}
|
|
98488
|
+
const considered = /* @__PURE__ */ new Map([["dev", dev]]);
|
|
98489
|
+
const queue2 = [dev];
|
|
98490
|
+
while (queue2.length > 0) {
|
|
98491
|
+
const body = queue2.shift();
|
|
98492
|
+
for (const match of body.matchAll(DELEGATION_PATTERN)) {
|
|
98493
|
+
const name = match[1];
|
|
98494
|
+
const delegate = name === void 0 ? void 0 : scripts[name];
|
|
98495
|
+
if (name !== void 0 && delegate !== void 0 && !considered.has(name)) {
|
|
98496
|
+
considered.set(name, delegate);
|
|
98497
|
+
queue2.push(delegate);
|
|
98498
|
+
}
|
|
98499
|
+
}
|
|
98500
|
+
}
|
|
98501
|
+
const ports = /* @__PURE__ */ new Map();
|
|
98502
|
+
for (const [name, body] of considered) {
|
|
98503
|
+
if (!WEB_DEV_COMMANDS.test(body)) {
|
|
98504
|
+
continue;
|
|
98505
|
+
}
|
|
98506
|
+
const port2 = portInCommand(body);
|
|
98507
|
+
if (port2 !== void 0 && !ports.has(port2)) {
|
|
98508
|
+
ports.set(port2, `the "${name}" script in ${path22.join(appDir, "package.json")}`);
|
|
98509
|
+
}
|
|
98510
|
+
}
|
|
98511
|
+
if (ports.size !== 1) {
|
|
98512
|
+
return void 0;
|
|
98513
|
+
}
|
|
98514
|
+
const [[port, origin]] = [...ports];
|
|
98515
|
+
return { origin, port };
|
|
98516
|
+
}
|
|
98517
|
+
function resolveRuntimeUrl(inputs) {
|
|
98518
|
+
if (inputs.flagUrl !== void 0) {
|
|
98519
|
+
return { source: "flag", url: inputs.flagUrl };
|
|
98520
|
+
}
|
|
98521
|
+
const pinned = inputs.pinnedUrl?.trim();
|
|
98522
|
+
if (pinned !== void 0 && pinned !== "" && URL.canParse(pinned)) {
|
|
98523
|
+
return {
|
|
98524
|
+
origin: "runtimeUrl in .copilotkit/project.json",
|
|
98525
|
+
source: "project-file",
|
|
98526
|
+
url: pinned
|
|
98527
|
+
};
|
|
98528
|
+
}
|
|
98529
|
+
const declared = inputs.projectEnvValues[RUNTIME_URL_VARIABLE]?.trim();
|
|
98530
|
+
if (declared !== void 0 && declared !== "" && URL.canParse(declared)) {
|
|
98531
|
+
return {
|
|
98532
|
+
origin: `${RUNTIME_URL_VARIABLE} in the project environment`,
|
|
98533
|
+
source: "env",
|
|
98534
|
+
url: declared
|
|
98535
|
+
};
|
|
98536
|
+
}
|
|
98537
|
+
const { apps: apps2 } = resolveAppDirectories(inputs.cwd, inputs.ceiling);
|
|
98538
|
+
if (apps2.length > 1) {
|
|
98539
|
+
return {
|
|
98540
|
+
ambiguousApps: apps2,
|
|
98541
|
+
source: "default",
|
|
98542
|
+
url: DEFAULT_RUNTIME_URL
|
|
98543
|
+
};
|
|
98544
|
+
}
|
|
98545
|
+
const appDir = apps2[0];
|
|
98546
|
+
const discovered = appDir === void 0 ? void 0 : discoverWebDevPort(appDir, inputs.projectEnvValues);
|
|
98547
|
+
if (discovered === void 0) {
|
|
98548
|
+
return { source: "default", url: DEFAULT_RUNTIME_URL };
|
|
98549
|
+
}
|
|
98550
|
+
return {
|
|
98551
|
+
origin: discovered.origin,
|
|
98552
|
+
source: "discovered",
|
|
98553
|
+
url: `http://localhost:${String(discovered.port)}${DEFAULT_RUNTIME_PATH}`
|
|
98554
|
+
};
|
|
98555
|
+
}
|
|
98556
|
+
var DEFAULT_RUNTIME_URL, ASSUMED_RUNTIME_URL_CAVEAT, DEFAULT_RUNTIME_PATH, RUNTIME_URL_VARIABLE, WEB_DEV_COMMANDS, PORT_PATTERNS, DELEGATION_PATTERN;
|
|
98557
|
+
var init_runtime_url = __esm({
|
|
98558
|
+
"apps/cli/src/services/runtime-url.ts"() {
|
|
98559
|
+
"use strict";
|
|
98560
|
+
init_app_directory();
|
|
98561
|
+
init_project_env();
|
|
98562
|
+
DEFAULT_RUNTIME_URL = "http://localhost:3000/api/copilotkit";
|
|
98563
|
+
ASSUMED_RUNTIME_URL_CAVEAT = `The URL is this command's assumed default rather than one this project stated, so which project answered is unverified: another checkout serving this port answers exactly the same. Pass --runtime-url, or record "runtimeUrl" in .copilotkit/project.json, to probe the URL your own project names.`;
|
|
98564
|
+
DEFAULT_RUNTIME_PATH = "/api/copilotkit";
|
|
98565
|
+
RUNTIME_URL_VARIABLE = "COPILOTKIT_RUNTIME_URL";
|
|
98566
|
+
WEB_DEV_COMMANDS = /\b(next|vite|ng serve|react-scripts|nuxt|remix|astro|rsbuild|webpack serve|parcel)\b/;
|
|
98567
|
+
PORT_PATTERNS = [
|
|
98568
|
+
/(?:^|\s)--port[= ](\d{2,5})\b/,
|
|
98569
|
+
/(?:^|\s)-p[= ](\d{2,5})\b/,
|
|
98570
|
+
/(?:^|\s|^)PORT=(\d{2,5})\b/
|
|
98571
|
+
];
|
|
98572
|
+
DELEGATION_PATTERN = /\b(?:npm run|pnpm run|pnpm|yarn run|yarn|bun run)\s+([\w:.-]+)/g;
|
|
98573
|
+
}
|
|
98574
|
+
});
|
|
98575
|
+
|
|
98576
|
+
// apps/cli/src/services/frontend-url.ts
|
|
98577
|
+
var frontend_url_exports = {};
|
|
98578
|
+
__export(frontend_url_exports, {
|
|
98579
|
+
FRONTEND_HOST_KINDS: () => FRONTEND_HOST_KINDS,
|
|
98580
|
+
classifyFrontendHost: () => classifyFrontendHost,
|
|
98581
|
+
isFrontendUrl: () => isFrontendUrl,
|
|
98582
|
+
isIpLiteralHost: () => isIpLiteralHost,
|
|
98583
|
+
resolveFrontendUrl: () => resolveFrontendUrl
|
|
98584
|
+
});
|
|
98585
|
+
function isIpLiteralHost(host) {
|
|
98586
|
+
const bare = host.replace(/^\[|\]$/gu, "");
|
|
98587
|
+
return IPV4_PATTERN.test(bare) || bare.includes(":");
|
|
98588
|
+
}
|
|
98589
|
+
function resolveFrontendUrl(inputs) {
|
|
98590
|
+
if (inputs.flagUrl !== void 0) {
|
|
98591
|
+
return { source: "flag", url: inputs.flagUrl };
|
|
98592
|
+
}
|
|
98593
|
+
const { apps: apps2 } = resolveAppDirectories(inputs.cwd, inputs.ceiling);
|
|
98594
|
+
if (apps2.length > 1) {
|
|
98595
|
+
return { ambiguousApps: apps2, source: "unknown" };
|
|
98596
|
+
}
|
|
98597
|
+
const appDir = apps2[0];
|
|
98598
|
+
const discovered = appDir === void 0 ? void 0 : discoverWebDevPort(appDir, inputs.projectEnvValues);
|
|
98599
|
+
if (discovered === void 0) {
|
|
98600
|
+
return { source: "unknown" };
|
|
98601
|
+
}
|
|
98602
|
+
return {
|
|
98603
|
+
origin: discovered.origin,
|
|
98604
|
+
source: "discovered",
|
|
98605
|
+
url: `http://localhost:${String(discovered.port)}`
|
|
98606
|
+
};
|
|
98607
|
+
}
|
|
98608
|
+
function isFrontendUrl(value) {
|
|
98609
|
+
if (!URL.canParse(value)) {
|
|
98610
|
+
return false;
|
|
98611
|
+
}
|
|
98612
|
+
const parsed = new URL(value);
|
|
98613
|
+
return (parsed.protocol === "http:" || parsed.protocol === "https:") && parsed.hostname !== "";
|
|
98614
|
+
}
|
|
98615
|
+
function classifyFrontendHost(url4) {
|
|
98616
|
+
if (!isFrontendUrl(url4)) {
|
|
98617
|
+
return void 0;
|
|
98618
|
+
}
|
|
98619
|
+
const host = new URL(url4).hostname.toLowerCase();
|
|
98620
|
+
if (isIpLiteralHost(host)) {
|
|
98621
|
+
const bare = host.replace(/^\[|\]$/gu, "");
|
|
98622
|
+
return bare === "::1" || bare.startsWith("127.") ? "loopback-ip" : "other-ip";
|
|
98623
|
+
}
|
|
98624
|
+
return host === "localhost" || host.endsWith(".localhost") ? "loopback-hostname" : "other-hostname";
|
|
98625
|
+
}
|
|
98626
|
+
var IPV4_PATTERN, FRONTEND_HOST_KINDS;
|
|
98627
|
+
var init_frontend_url = __esm({
|
|
98628
|
+
"apps/cli/src/services/frontend-url.ts"() {
|
|
98629
|
+
"use strict";
|
|
98630
|
+
init_runtime_url();
|
|
98631
|
+
init_app_directory();
|
|
98632
|
+
IPV4_PATTERN = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
|
|
98633
|
+
FRONTEND_HOST_KINDS = [
|
|
98634
|
+
/** `localhost`, or a name under it. The state a healthy run is in. */
|
|
98635
|
+
"loopback-hostname",
|
|
98636
|
+
/** `127.0.0.0/8` or `::1`. The failure this field exists to count. */
|
|
98637
|
+
"loopback-ip",
|
|
98638
|
+
/** Any other IP literal, such as a LAN address. It fails the same way. */
|
|
98639
|
+
"other-ip",
|
|
98640
|
+
/** Any other name. One bucket, so no private hostname is ever sent. */
|
|
98641
|
+
"other-hostname"
|
|
98642
|
+
];
|
|
98643
|
+
}
|
|
98644
|
+
});
|
|
98645
|
+
|
|
98452
98646
|
// apps/cli/src/services/verify-checks.ts
|
|
98453
98647
|
function eitherKeyName() {
|
|
98454
98648
|
return API_KEY_VARIABLE_NAMES.join(" or ");
|
|
@@ -98622,8 +98816,9 @@ function runtimeReachableCheck(probe, runtimeUrl) {
|
|
|
98622
98816
|
title
|
|
98623
98817
|
};
|
|
98624
98818
|
}
|
|
98819
|
+
const answered = probe.transport === "single-route" ? `CopilotKit runtime ${probe.info.version} answered its single-route envelope. It refuses GET /info, so it is mounted \`mode: "single-route"\`.` : `CopilotKit runtime ${probe.info.version} answered.`;
|
|
98625
98820
|
return {
|
|
98626
|
-
detail:
|
|
98821
|
+
detail: runtimeUrl.source === "default" ? `${answered} ${ASSUMED_RUNTIME_URL_CAVEAT}` : answered,
|
|
98627
98822
|
id: "runtime_reachable",
|
|
98628
98823
|
status: "pass",
|
|
98629
98824
|
title
|
|
@@ -98639,7 +98834,7 @@ function describeIntelligenceEntitlement(info) {
|
|
|
98639
98834
|
}
|
|
98640
98835
|
return `reports its license as ${info.licenseStatus}`;
|
|
98641
98836
|
}
|
|
98642
|
-
function runtimeAgentsCheck(probe) {
|
|
98837
|
+
function runtimeAgentsCheck(probe, runtimeUrl) {
|
|
98643
98838
|
const title = "The runtime declares at least one agent";
|
|
98644
98839
|
if (probe.kind !== "ok") {
|
|
98645
98840
|
return {
|
|
@@ -98662,8 +98857,9 @@ function runtimeAgentsCheck(probe) {
|
|
|
98662
98857
|
const described = agents.map(
|
|
98663
98858
|
(agent) => agent.className ? `${agent.name} (${agent.className})` : agent.name
|
|
98664
98859
|
).join(", ");
|
|
98860
|
+
const whose = runtimeUrl.source === "default" ? " These are the agents of whatever answered the assumed default URL, not proof that this project declares them." : "";
|
|
98665
98861
|
return {
|
|
98666
|
-
detail: `Declares ${String(agents.length)}: ${described}
|
|
98862
|
+
detail: `Declares ${String(agents.length)}: ${described}.${whose}`,
|
|
98667
98863
|
id: "runtime_agents_declared",
|
|
98668
98864
|
status: "pass",
|
|
98669
98865
|
title
|
|
@@ -98697,7 +98893,7 @@ function intelligenceConsumedCheck(credential, runtime) {
|
|
|
98697
98893
|
}
|
|
98698
98894
|
if (!reportsIntelligenceClient(runtime.info)) {
|
|
98699
98895
|
return {
|
|
98700
|
-
detail: `The key authenticates, but the runtime reports no entitlement, which means it was built without an Intelligence client and is running in OSS/SSE mode. The key is never read and nothing reaches the platform. The default in-memory OSS runner is ephemeral. SQLite, custom, or framework persistence can be durable. Pass \`intelligence: new CopilotKitIntelligence({ apiKey })\` where the runtime is constructed \u2014 https://docs.copilotkit.ai/
|
|
98896
|
+
detail: `The key authenticates, but the runtime reports no entitlement, which means it was built without an Intelligence client and is running in OSS/SSE mode. The key is never read and nothing reaches the platform. The default in-memory OSS runner is ephemeral. SQLite, custom, or framework persistence can be durable. Pass \`intelligence: new CopilotKitIntelligence({ apiKey })\` where the runtime is constructed \u2014 https://docs.copilotkit.ai/intelligence/connect-your-runtime`,
|
|
98701
98897
|
id: "intelligence_consumed",
|
|
98702
98898
|
status: "fail",
|
|
98703
98899
|
title
|
|
@@ -98796,11 +98992,70 @@ function collectFacts(input) {
|
|
|
98796
98992
|
runtimeVersion: info?.version
|
|
98797
98993
|
};
|
|
98798
98994
|
}
|
|
98995
|
+
function frontendAssetsCheck(frontendUrl, probe) {
|
|
98996
|
+
const title = "The frontend serves its own static assets";
|
|
98997
|
+
const id = "frontend_assets_served";
|
|
98998
|
+
if (probe.kind === "unreachable") {
|
|
98999
|
+
return {
|
|
99000
|
+
detail: `Nothing answered at ${probe.url}: ${probe.message}. Start the frontend dev server, then run this again.`,
|
|
99001
|
+
id,
|
|
99002
|
+
status: "undetermined",
|
|
99003
|
+
title
|
|
99004
|
+
};
|
|
99005
|
+
}
|
|
99006
|
+
if (probe.kind === "page-not-served") {
|
|
99007
|
+
return {
|
|
99008
|
+
detail: `A server at ${frontendUrl} answered status ${String(probe.status)} for its own page, so its assets were never asked for. That is the page to fix before a browser step is worth running.`,
|
|
99009
|
+
id,
|
|
99010
|
+
status: "undetermined",
|
|
99011
|
+
title
|
|
99012
|
+
};
|
|
99013
|
+
}
|
|
99014
|
+
if (probe.kind === "no-asset") {
|
|
99015
|
+
return {
|
|
99016
|
+
detail: `The page at ${frontendUrl} named no script or stylesheet on its own origin, so there was nothing to test. A production build inlines its assets, and a dev server normally does not.`,
|
|
99017
|
+
id,
|
|
99018
|
+
status: "undetermined",
|
|
99019
|
+
title
|
|
99020
|
+
};
|
|
99021
|
+
}
|
|
99022
|
+
if (probe.kind === "asset-inconclusive") {
|
|
99023
|
+
return {
|
|
99024
|
+
detail: `The page at ${frontendUrl} was served, and ${probe.assetUrl} answered status ${String(probe.status)} \u2014 neither served nor refused. Read that server's own output for the reason.`,
|
|
99025
|
+
id,
|
|
99026
|
+
status: "undetermined",
|
|
99027
|
+
title
|
|
99028
|
+
};
|
|
99029
|
+
}
|
|
99030
|
+
if (probe.kind === "assets-refused") {
|
|
99031
|
+
const asked = new URL(frontendUrl);
|
|
99032
|
+
const hostname5 = asked.hostname;
|
|
99033
|
+
const withName = new URL(asked.toString());
|
|
99034
|
+
withName.hostname = "localhost";
|
|
99035
|
+
const remedy = isIpLiteralHost(hostname5) ? ` You reached it on an IP literal. Open ${withName.origin} instead, and the assets are served.` : ` Read that server's own output: it decides which hosts it serves assets to, and ${hostname5} is not one of them.`;
|
|
99036
|
+
return {
|
|
99037
|
+
detail: `The dev server at ${frontendUrl} served its page but answered status ${String(probe.status)} for ${probe.assetUrl}, one of the assets that page loads. A page that renders without its own chunks leaves the CopilotKit control dead, which reads as a broken integration rather than as a refused asset.${remedy}`,
|
|
99038
|
+
id,
|
|
99039
|
+
status: "fail",
|
|
99040
|
+
title
|
|
99041
|
+
};
|
|
99042
|
+
}
|
|
99043
|
+
return {
|
|
99044
|
+
detail: `${frontendUrl} served its page and ${probe.assetUrl}, so this host is one the dev server serves assets on.`,
|
|
99045
|
+
id,
|
|
99046
|
+
status: "pass",
|
|
99047
|
+
title
|
|
99048
|
+
};
|
|
99049
|
+
}
|
|
99050
|
+
function frontendAssetChecks(input) {
|
|
99051
|
+
return input.frontendUrl.url === void 0 || input.frontendAssets === void 0 ? [] : [frontendAssetsCheck(input.frontendUrl.url, input.frontendAssets)];
|
|
99052
|
+
}
|
|
98799
99053
|
function runVerifyChecks(input, expectedRuntime = "intelligence") {
|
|
98800
99054
|
const checks = expectedRuntime === "oss" ? [
|
|
98801
99055
|
runtimeReachableCheck(input.runtime, input.runtimeUrl),
|
|
98802
|
-
runtimeAgentsCheck(input.runtime),
|
|
98803
|
-
ossRuntimeModeCheck(input.runtime)
|
|
99056
|
+
runtimeAgentsCheck(input.runtime, input.runtimeUrl),
|
|
99057
|
+
ossRuntimeModeCheck(input.runtime),
|
|
99058
|
+
...frontendAssetChecks(input)
|
|
98804
99059
|
] : [
|
|
98805
99060
|
projectSelectedCheck(input.projectConfig),
|
|
98806
99061
|
apiKeyPresentCheck(
|
|
@@ -98811,9 +99066,10 @@ function runVerifyChecks(input, expectedRuntime = "intelligence") {
|
|
|
98811
99066
|
apiKeyLoadableCheck(input.credentialLoad),
|
|
98812
99067
|
apiKeyAuthenticatesCheck(input.credential),
|
|
98813
99068
|
runtimeReachableCheck(input.runtime, input.runtimeUrl),
|
|
98814
|
-
runtimeAgentsCheck(input.runtime),
|
|
99069
|
+
runtimeAgentsCheck(input.runtime, input.runtimeUrl),
|
|
98815
99070
|
intelligenceConsumedCheck(input.credential, input.runtime),
|
|
98816
|
-
intelligenceThreadRoutesCheck(input.runtime)
|
|
99071
|
+
intelligenceThreadRoutesCheck(input.runtime),
|
|
99072
|
+
...frontendAssetChecks(input)
|
|
98817
99073
|
];
|
|
98818
99074
|
return {
|
|
98819
99075
|
checks,
|
|
@@ -98827,6 +99083,8 @@ var API_KEY_VARIABLE_NAMES;
|
|
|
98827
99083
|
var init_verify_checks = __esm({
|
|
98828
99084
|
"apps/cli/src/services/verify-checks.ts"() {
|
|
98829
99085
|
"use strict";
|
|
99086
|
+
init_frontend_url();
|
|
99087
|
+
init_runtime_url();
|
|
98830
99088
|
API_KEY_VARIABLE_NAMES = [
|
|
98831
99089
|
"CPK_INTELLIGENCE_API_KEY",
|
|
98832
99090
|
"COPILOTKIT_API_KEY",
|
|
@@ -150047,7 +150305,7 @@ function getApiKeyFromEnv() {
|
|
|
150047
150305
|
}
|
|
150048
150306
|
return envGoogleApiKey || envGeminiApiKey || void 0;
|
|
150049
150307
|
}
|
|
150050
|
-
var import_p_retry, import_google_auth_library, _defaultBaseGeminiUrl, _defaultBaseVertexUrl, BaseModule, Language, Outcome, FunctionResponseScheduling, Type, Environment, AuthType, HttpElementLocation, ApiSpec, PhishBlockThreshold, Behavior, DynamicRetrievalConfigMode, FunctionCallingConfigMode, ThinkingLevel, PersonGeneration, ProminentPeople, HarmCategory, HarmBlockMethod, HarmBlockThreshold, FinishReason, HarmProbability, HarmSeverity, UrlRetrievalStatus, BlockedReason, TrafficType, Modality, ModelStage, MediaResolution, TuningMode, AdapterSize, JobState, TuningJobState, AggregationMetric, PairwiseChoice, TuningTask, DocumentState, PartMediaResolutionLevel, ToolType, ResourceScope, ServiceTier, FeatureSelectionPreference, EmbeddingApiType, SafetyFilterLevel, ImagePromptLanguage, MaskReferenceMode, ControlReferenceType, SubjectReferenceType, EditMode, SegmentMode, VideoGenerationReferenceType, VideoGenerationMaskMode, VideoCompressionQuality, ImageResizeMode, TuningMethod, FileState, FileSource, TurnCompleteReason, MediaModality, VadSignalType, VoiceActivityType, StartSensitivity, EndSensitivity, ActivityHandling, TurnCoverage, Scale, MusicGenerationMode, LiveMusicPlaybackControl, HttpResponse, GenerateContentResponse, EmbedContentResponse, GenerateImagesResponse, EditImageResponse, UpscaleImageResponse, RecontextImageResponse, SegmentImageResponse, ListModelsResponse, DeleteModelResponse, CountTokensResponse, ComputeTokensResponse, GenerateVideosOperation, ListTuningJobsResponse, CancelTuningJobResponse, DeleteCachedContentResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, UploadToFileSearchStoreResumableResponse, ImportFileOperation, ListFilesResponse, CreateFileResponse, DeleteFileResponse, RegisterFilesResponse, ListBatchJobsResponse, LiveServerMessage, LiveMusicServerMessage, UploadToFileSearchStoreOperation, PagedItem, Pager, Batches, Caches, Chats, Chat, ApiError, Files, CONTENT_TYPE_HEADER, SERVER_TIMEOUT_HEADER, USER_AGENT_HEADER, GOOGLE_API_CLIENT_HEADER, SDK_VERSION, LIBRARY_LABEL, VERTEX_AI_API_DEFAULT_VERSION, GOOGLE_AI_API_DEFAULT_VERSION, MULTI_REGIONAL_LOCATIONS, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_HTTP_STATUS_CODES, ApiClient, MCP_LABEL, hasMcpToolUsageFromMcpToTool, McpCallableTool, LiveMusic, LiveMusicSession, FUNCTION_RESPONSE_REQUIRES_ID, Live, defaultLiveSendClientContentParamerters, Session, DEFAULT_MAX_REMOTE_CALLS, Models, Operations, Tokens, Documents, FileSearchStores, uuid4Internal, uuid42, castToError, GeminiNextGenAPIClientError, APIError, APIUserAbortError, APIConnectionError, APIConnectionTimeoutError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, startsWithSchemeRegexp, isAbsoluteURL, isArrayInternal, isArray, isReadonlyArrayInternal, isReadonlyArray, validatePositiveInteger, safeJSON, sleep$1, FallbackEncoder, VERSION2, checkFileSupport, isAsyncIterable, isBlobLike, isFileLike, isResponseLike, APIResource, EMPTY, createPathTagFunction,
|
|
150308
|
+
var import_p_retry, import_google_auth_library, _defaultBaseGeminiUrl, _defaultBaseVertexUrl, BaseModule, Language, Outcome, FunctionResponseScheduling, Type, Environment, AuthType, HttpElementLocation, ApiSpec, PhishBlockThreshold, Behavior, DynamicRetrievalConfigMode, FunctionCallingConfigMode, ThinkingLevel, PersonGeneration, ProminentPeople, HarmCategory, HarmBlockMethod, HarmBlockThreshold, FinishReason, HarmProbability, HarmSeverity, UrlRetrievalStatus, BlockedReason, TrafficType, Modality, ModelStage, MediaResolution, TuningMode, AdapterSize, JobState, TuningJobState, AggregationMetric, PairwiseChoice, TuningTask, DocumentState, PartMediaResolutionLevel, ToolType, ResourceScope, ServiceTier, FeatureSelectionPreference, EmbeddingApiType, SafetyFilterLevel, ImagePromptLanguage, MaskReferenceMode, ControlReferenceType, SubjectReferenceType, EditMode, SegmentMode, VideoGenerationReferenceType, VideoGenerationMaskMode, VideoCompressionQuality, ImageResizeMode, TuningMethod, FileState, FileSource, TurnCompleteReason, MediaModality, VadSignalType, VoiceActivityType, StartSensitivity, EndSensitivity, ActivityHandling, TurnCoverage, Scale, MusicGenerationMode, LiveMusicPlaybackControl, HttpResponse, GenerateContentResponse, EmbedContentResponse, GenerateImagesResponse, EditImageResponse, UpscaleImageResponse, RecontextImageResponse, SegmentImageResponse, ListModelsResponse, DeleteModelResponse, CountTokensResponse, ComputeTokensResponse, GenerateVideosOperation, ListTuningJobsResponse, CancelTuningJobResponse, DeleteCachedContentResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, UploadToFileSearchStoreResumableResponse, ImportFileOperation, ListFilesResponse, CreateFileResponse, DeleteFileResponse, RegisterFilesResponse, ListBatchJobsResponse, LiveServerMessage, LiveMusicServerMessage, UploadToFileSearchStoreOperation, PagedItem, Pager, Batches, Caches, Chats, Chat, ApiError, Files, CONTENT_TYPE_HEADER, SERVER_TIMEOUT_HEADER, USER_AGENT_HEADER, GOOGLE_API_CLIENT_HEADER, SDK_VERSION, LIBRARY_LABEL, VERTEX_AI_API_DEFAULT_VERSION, GOOGLE_AI_API_DEFAULT_VERSION, MULTI_REGIONAL_LOCATIONS, DEFAULT_RETRY_ATTEMPTS, DEFAULT_RETRY_HTTP_STATUS_CODES, ApiClient, MCP_LABEL, hasMcpToolUsageFromMcpToTool, McpCallableTool, LiveMusic, LiveMusicSession, FUNCTION_RESPONSE_REQUIRES_ID, Live, defaultLiveSendClientContentParamerters, Session, DEFAULT_MAX_REMOTE_CALLS, Models, Operations, Tokens, Documents, FileSearchStores, uuid4Internal, uuid42, castToError, GeminiNextGenAPIClientError, APIError, APIUserAbortError, APIConnectionError, APIConnectionTimeoutError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, startsWithSchemeRegexp, isAbsoluteURL, isArrayInternal, isArray, isReadonlyArrayInternal, isReadonlyArray, validatePositiveInteger, safeJSON, sleep$1, FallbackEncoder, VERSION2, checkFileSupport, isAsyncIterable, isBlobLike, isFileLike, isResponseLike, APIResource, EMPTY, createPathTagFunction, path23, BaseInteractions, Interactions, BaseWebhooks, Webhooks, encodeUTF8_, decodeUTF8_, LineDecoder, levelNumbers, parseLogLevel, noopLogger, cachedLoggers, formatRequestDetails, Stream4, SSEDecoder, APIPromise, brand_privateNullableHeaders, buildHeaders, readEnv, _a3, BaseGeminiNextGenAPIClient, GeminiNextGenAPIClient, GOOGLE_API_KEY_HEADER, REQUIRED_VERTEX_AI_SCOPE, NodeAuth, NodeDownloader, NodeWebSocketFactory, NodeWebSocket, Tunings, MAX_CHUNK_SIZE, MAX_RETRY_COUNT, INITIAL_RETRY_DELAY_MS, DELAY_MULTIPLIER, X_GOOG_UPLOAD_STATUS_HEADER_FIELD, NodeUploader, NodeFiles, LANGUAGE_LABEL_PREFIX, GoogleGenAI;
|
|
150051
150309
|
var init_node3 = __esm({
|
|
150052
150310
|
"node_modules/.pnpm/@google+genai@1.52.0_@modelcontextprotocol+sdk@1.29.0_@cfworker+json-schema@4.1.1_zod@4.3.6_/node_modules/@google/genai/dist/node/index.mjs"() {
|
|
150053
150311
|
"use strict";
|
|
@@ -155650,7 +155908,7 @@ ${underline}`);
|
|
|
155650
155908
|
}
|
|
155651
155909
|
return path46;
|
|
155652
155910
|
};
|
|
155653
|
-
|
|
155911
|
+
path23 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
155654
155912
|
BaseInteractions = class extends APIResource {
|
|
155655
155913
|
create(params, options) {
|
|
155656
155914
|
var _a21;
|
|
@@ -155661,7 +155919,7 @@ ${underline}`);
|
|
|
155661
155919
|
if ("agent" in body && "generation_config" in body) {
|
|
155662
155920
|
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
155663
155921
|
}
|
|
155664
|
-
return this._client.post(
|
|
155922
|
+
return this._client.post(path23`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a21 = params.stream) !== null && _a21 !== void 0 ? _a21 : false }));
|
|
155665
155923
|
}
|
|
155666
155924
|
/**
|
|
155667
155925
|
* Deletes the interaction by id.
|
|
@@ -155675,7 +155933,7 @@ ${underline}`);
|
|
|
155675
155933
|
*/
|
|
155676
155934
|
delete(id, params = {}, options) {
|
|
155677
155935
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
155678
|
-
return this._client.delete(
|
|
155936
|
+
return this._client.delete(path23`/${api_version}/interactions/${id}`, options);
|
|
155679
155937
|
}
|
|
155680
155938
|
/**
|
|
155681
155939
|
* Cancels an interaction by id. This only applies to background interactions that
|
|
@@ -155690,12 +155948,12 @@ ${underline}`);
|
|
|
155690
155948
|
*/
|
|
155691
155949
|
cancel(id, params = {}, options) {
|
|
155692
155950
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
155693
|
-
return this._client.post(
|
|
155951
|
+
return this._client.post(path23`/${api_version}/interactions/${id}/cancel`, options);
|
|
155694
155952
|
}
|
|
155695
155953
|
get(id, params = {}, options) {
|
|
155696
155954
|
var _a21;
|
|
155697
155955
|
const _b10 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b10, query = __rest(_b10, ["api_version"]);
|
|
155698
|
-
return this._client.get(
|
|
155956
|
+
return this._client.get(path23`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a21 = params === null || params === void 0 ? void 0 : params.stream) !== null && _a21 !== void 0 ? _a21 : false }));
|
|
155699
155957
|
}
|
|
155700
155958
|
};
|
|
155701
155959
|
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
@@ -155707,49 +155965,49 @@ ${underline}`);
|
|
|
155707
155965
|
*/
|
|
155708
155966
|
create(params, options) {
|
|
155709
155967
|
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
155710
|
-
return this._client.post(
|
|
155968
|
+
return this._client.post(path23`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
155711
155969
|
}
|
|
155712
155970
|
/**
|
|
155713
155971
|
* Updates an existing Webhook.
|
|
155714
155972
|
*/
|
|
155715
155973
|
update(id, params = {}, options) {
|
|
155716
155974
|
const _a21 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a21, body = __rest(_a21, ["api_version", "update_mask"]);
|
|
155717
|
-
return this._client.patch(
|
|
155975
|
+
return this._client.patch(path23`/${api_version}/webhooks/${id}`, Object.assign({ query: { update_mask }, body }, options));
|
|
155718
155976
|
}
|
|
155719
155977
|
/**
|
|
155720
155978
|
* Lists all Webhooks.
|
|
155721
155979
|
*/
|
|
155722
155980
|
list(params = {}, options) {
|
|
155723
155981
|
const _a21 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a21, query = __rest(_a21, ["api_version"]);
|
|
155724
|
-
return this._client.get(
|
|
155982
|
+
return this._client.get(path23`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
155725
155983
|
}
|
|
155726
155984
|
/**
|
|
155727
155985
|
* Deletes a Webhook.
|
|
155728
155986
|
*/
|
|
155729
155987
|
delete(id, params = {}, options) {
|
|
155730
155988
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
155731
|
-
return this._client.delete(
|
|
155989
|
+
return this._client.delete(path23`/${api_version}/webhooks/${id}`, options);
|
|
155732
155990
|
}
|
|
155733
155991
|
/**
|
|
155734
155992
|
* Gets a specific Webhook.
|
|
155735
155993
|
*/
|
|
155736
155994
|
get(id, params = {}, options) {
|
|
155737
155995
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
155738
|
-
return this._client.get(
|
|
155996
|
+
return this._client.get(path23`/${api_version}/webhooks/${id}`, options);
|
|
155739
155997
|
}
|
|
155740
155998
|
/**
|
|
155741
155999
|
* Sends a ping event to a Webhook.
|
|
155742
156000
|
*/
|
|
155743
156001
|
ping(id, params = void 0, options) {
|
|
155744
156002
|
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
155745
|
-
return this._client.post(
|
|
156003
|
+
return this._client.post(path23`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
155746
156004
|
}
|
|
155747
156005
|
/**
|
|
155748
156006
|
* Generates a new signing secret for a Webhook.
|
|
155749
156007
|
*/
|
|
155750
156008
|
rotateSigningSecret(id, params = {}, options) {
|
|
155751
156009
|
const _a21 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a21, body = __rest(_a21, ["api_version"]);
|
|
155752
|
-
return this._client.post(
|
|
156010
|
+
return this._client.post(path23`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
155753
156011
|
}
|
|
155754
156012
|
};
|
|
155755
156013
|
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
@@ -235376,7 +235634,7 @@ var init_notification = __esm({
|
|
|
235376
235634
|
|
|
235377
235635
|
// node_modules/.pnpm/@google-cloud+storage@7.21.0_encoding@0.1.13/node_modules/@google-cloud/storage/build/esm/src/bucket.js
|
|
235378
235636
|
import * as fs26 from "fs";
|
|
235379
|
-
import * as
|
|
235637
|
+
import * as path24 from "path";
|
|
235380
235638
|
import { promisify as promisify9 } from "util";
|
|
235381
235639
|
import { Readable as Readable3 } from "stream";
|
|
235382
235640
|
import { URL as URL4 } from "url";
|
|
@@ -238448,7 +238706,7 @@ var init_bucket = __esm({
|
|
|
238448
238706
|
preconditionOpts: this.instancePreconditionOpts
|
|
238449
238707
|
});
|
|
238450
238708
|
} else {
|
|
238451
|
-
const destination =
|
|
238709
|
+
const destination = path24.basename(pathString);
|
|
238452
238710
|
newFile = this.file(destination, {
|
|
238453
238711
|
encryptionKey: options.encryptionKey,
|
|
238454
238712
|
kmsKeyName: options.kmsKeyName,
|
|
@@ -246845,29 +247103,29 @@ var require_src17 = __commonJS({
|
|
|
246845
247103
|
// node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/utils/file_utils.js
|
|
246846
247104
|
import { createRequire as topLevelCreateRequire85 } from "module";
|
|
246847
247105
|
import * as fs27 from "node:fs/promises";
|
|
246848
|
-
import * as
|
|
247106
|
+
import * as path25 from "node:path";
|
|
246849
247107
|
async function materializeFiles(files, dir = process.cwd()) {
|
|
246850
|
-
const resolvedBaseDir =
|
|
247108
|
+
const resolvedBaseDir = path25.resolve(dir);
|
|
246851
247109
|
const createdFiles = [];
|
|
246852
247110
|
for (const file3 of files) {
|
|
246853
|
-
const fullPath =
|
|
247111
|
+
const fullPath = path25.resolve(dir, file3.name);
|
|
246854
247112
|
if (!fullPath.startsWith(resolvedBaseDir)) {
|
|
246855
247113
|
throw new Error(
|
|
246856
247114
|
`Path traversal detected: ${file3.name} resolves outside of ${dir}`
|
|
246857
247115
|
);
|
|
246858
247116
|
}
|
|
246859
|
-
const ext =
|
|
246860
|
-
const dirName =
|
|
246861
|
-
const base =
|
|
247117
|
+
const ext = path25.extname(fullPath);
|
|
247118
|
+
const dirName = path25.dirname(fullPath);
|
|
247119
|
+
const base = path25.basename(fullPath, ext);
|
|
246862
247120
|
let finalPath = fullPath;
|
|
246863
247121
|
let counter = 2;
|
|
246864
247122
|
while (true) {
|
|
246865
247123
|
try {
|
|
246866
247124
|
await fs27.access(finalPath);
|
|
246867
247125
|
const newName = `${base}_${counter}${ext}`;
|
|
246868
|
-
finalPath =
|
|
246869
|
-
const originalDir =
|
|
246870
|
-
file3.name = originalDir === "." ? newName :
|
|
247126
|
+
finalPath = path25.join(dirName, newName);
|
|
247127
|
+
const originalDir = path25.dirname(file3.name);
|
|
247128
|
+
file3.name = originalDir === "." ? newName : path25.join(originalDir, newName);
|
|
246871
247129
|
counter++;
|
|
246872
247130
|
} catch {
|
|
246873
247131
|
break;
|
|
@@ -246878,14 +247136,14 @@ async function materializeFiles(files, dir = process.cwd()) {
|
|
|
246878
247136
|
`Path traversal detected: ${file3.name} resolves outside of ${dir}`
|
|
246879
247137
|
);
|
|
246880
247138
|
}
|
|
246881
|
-
await fs27.mkdir(
|
|
247139
|
+
await fs27.mkdir(path25.dirname(finalPath), { recursive: true });
|
|
246882
247140
|
await fs27.writeFile(
|
|
246883
247141
|
finalPath,
|
|
246884
247142
|
Buffer.from(file3.content, file3.contentEncoding)
|
|
246885
247143
|
);
|
|
246886
247144
|
createdFiles.push({
|
|
246887
247145
|
...file3,
|
|
246888
|
-
name:
|
|
247146
|
+
name: path25.relative(dir, finalPath)
|
|
246889
247147
|
});
|
|
246890
247148
|
}
|
|
246891
247149
|
return createdFiles;
|
|
@@ -254284,7 +254542,7 @@ var init_list_skills_tool = __esm({
|
|
|
254284
254542
|
|
|
254285
254543
|
// node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/tools/skill/load_skill_resource_tool.js
|
|
254286
254544
|
import { createRequire as topLevelCreateRequire128 } from "module";
|
|
254287
|
-
import
|
|
254545
|
+
import path26 from "node:path";
|
|
254288
254546
|
var require129, __defProp8, __getOwnPropDesc8, __decorateClass7, BINARY_FILE_DETECTED_MSG, LoadSkillResourceTool;
|
|
254289
254547
|
var init_load_skill_resource_tool = __esm({
|
|
254290
254548
|
"node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/tools/skill/load_skill_resource_tool.js"() {
|
|
@@ -254353,7 +254611,7 @@ var init_load_skill_resource_tool = __esm({
|
|
|
254353
254611
|
error_code: "MISSING_RESOURCE_PATH"
|
|
254354
254612
|
};
|
|
254355
254613
|
}
|
|
254356
|
-
resourcePath =
|
|
254614
|
+
resourcePath = path26.posix.normalize(resourcePath);
|
|
254357
254615
|
let skill;
|
|
254358
254616
|
try {
|
|
254359
254617
|
skill = await this.toolset.getOrFetchSkill(
|
|
@@ -254772,7 +255030,7 @@ var init_run_skill_inline_script_tool = __esm({
|
|
|
254772
255030
|
|
|
254773
255031
|
// node_modules/.pnpm/@google+adk@1.3.0_@bufbuild+protobuf@2.12.1_@cfworker+json-schema@4.1.1_@grpc+grpc-js@1.14.4__5mkmwgy3xddtjib6vsxkdydt4e/node_modules/@google/adk/dist/esm/tools/skill/run_skill_script_tool.js
|
|
254774
255032
|
import { createRequire as topLevelCreateRequire132 } from "module";
|
|
254775
|
-
import * as
|
|
255033
|
+
import * as path27 from "node:path";
|
|
254776
255034
|
function buildWrapperCode(scriptPath, language) {
|
|
254777
255035
|
switch (language) {
|
|
254778
255036
|
case CodeExecutionLanguage.JAVASCRIPT:
|
|
@@ -254812,7 +255070,7 @@ function getSkillResourceFiles(skill) {
|
|
|
254812
255070
|
if (fileContent === void 0) {
|
|
254813
255071
|
continue;
|
|
254814
255072
|
}
|
|
254815
|
-
const ext =
|
|
255073
|
+
const ext = path27.extname(resourceName2).toLowerCase();
|
|
254816
255074
|
const { encoding, mimeType } = getMimeTypeAndEncoding(ext);
|
|
254817
255075
|
files.push({
|
|
254818
255076
|
name: `${resourceType}/${resourceName2}`,
|
|
@@ -254942,7 +255200,7 @@ var init_run_skill_script_tool = __esm({
|
|
|
254942
255200
|
};
|
|
254943
255201
|
}
|
|
254944
255202
|
try {
|
|
254945
|
-
const language = getScriptLanguageByExtension(
|
|
255203
|
+
const language = getScriptLanguageByExtension(path27.extname(scriptPath));
|
|
254946
255204
|
const result = await codeExecutor.executeCode({
|
|
254947
255205
|
invocationContext: toolContext.invocationContext,
|
|
254948
255206
|
codeExecutionInput: {
|
|
@@ -354418,11 +354676,11 @@ function unlinkSync2(filePath) {
|
|
|
354418
354676
|
function readFileSync14(filePath) {
|
|
354419
354677
|
return nodeFs.readFileSync(filePath, "utf-8");
|
|
354420
354678
|
}
|
|
354421
|
-
var
|
|
354679
|
+
var path28;
|
|
354422
354680
|
var init_fs = __esm({
|
|
354423
354681
|
"node_modules/.pnpm/langsmith@0.5.14_@opentelemetry+api@1.9.1_@opentelemetry+exporter-trace-otlp-proto@0.221.0_@o_totymzifgyhkpjllfvyp65mp54/node_modules/langsmith/dist/utils/fs.js"() {
|
|
354424
354682
|
"use strict";
|
|
354425
|
-
|
|
354683
|
+
path28 = nodePath;
|
|
354426
354684
|
}
|
|
354427
354685
|
});
|
|
354428
354686
|
|
|
@@ -354594,7 +354852,7 @@ var init_prompt_cache = __esm({
|
|
|
354594
354852
|
for (const [key, entry] of this.cache.entries()) {
|
|
354595
354853
|
entries[key] = entry.value;
|
|
354596
354854
|
}
|
|
354597
|
-
const dir =
|
|
354855
|
+
const dir = path28.dirname(filePath);
|
|
354598
354856
|
if (!existsSync16(dir)) {
|
|
354599
354857
|
mkdirSync8(dir);
|
|
354600
354858
|
}
|
|
@@ -359347,7 +359605,7 @@ var init_client4 = __esm({
|
|
|
359347
359605
|
body_base64: bodyBuffer.toString("base64")
|
|
359348
359606
|
});
|
|
359349
359607
|
const filename = `trace_${Date.now()}_${v4_default2().slice(0, 8)}.json`;
|
|
359350
|
-
const filepath =
|
|
359608
|
+
const filepath = path28.join(directory, filename);
|
|
359351
359609
|
if (!_Client._fallbackDirsCreated.has(directory)) {
|
|
359352
359610
|
await mkdir3(directory);
|
|
359353
359611
|
_Client._fallbackDirsCreated.add(directory);
|
|
@@ -359358,7 +359616,7 @@ var init_client4 = __esm({
|
|
|
359358
359616
|
const traceFiles = entries.filter((f4) => f4.startsWith("trace_") && f4.endsWith(".json"));
|
|
359359
359617
|
let total = 0;
|
|
359360
359618
|
for (const name of traceFiles) {
|
|
359361
|
-
const { size } = await stat4(
|
|
359619
|
+
const { size } = await stat4(path28.join(directory, name));
|
|
359362
359620
|
total += size;
|
|
359363
359621
|
}
|
|
359364
359622
|
if (total >= maxBytes) {
|
|
@@ -374507,7 +374765,14 @@ var init_telemetry2 = __esm({
|
|
|
374507
374765
|
});
|
|
374508
374766
|
|
|
374509
374767
|
// apps/cli/src/services/round-trip-checks.ts
|
|
374510
|
-
function runRoundTripCheck(agentId, probe) {
|
|
374768
|
+
function runRoundTripCheck(agentId, probe, runtimeUrlSource) {
|
|
374769
|
+
const check4 = decideRoundTrip(agentId, probe);
|
|
374770
|
+
if (runtimeUrlSource !== "default" || probe.kind === "unreachable") {
|
|
374771
|
+
return check4;
|
|
374772
|
+
}
|
|
374773
|
+
return { ...check4, detail: `${check4.detail} ${ASSUMED_RUNTIME_URL_CAVEAT}` };
|
|
374774
|
+
}
|
|
374775
|
+
function decideRoundTrip(agentId, probe) {
|
|
374511
374776
|
if (probe.kind === "answered") {
|
|
374512
374777
|
const toolNote = probe.toolCallNames.length > 0 ? ` It called ${probe.toolCallNames.join(", ")}.` : "";
|
|
374513
374778
|
return {
|
|
@@ -374558,6 +374823,7 @@ var TITLE;
|
|
|
374558
374823
|
var init_round_trip_checks = __esm({
|
|
374559
374824
|
"apps/cli/src/services/round-trip-checks.ts"() {
|
|
374560
374825
|
"use strict";
|
|
374826
|
+
init_runtime_url();
|
|
374561
374827
|
TITLE = "The agent answers a real request";
|
|
374562
374828
|
}
|
|
374563
374829
|
});
|
|
@@ -374860,7 +375126,64 @@ async function probeCredential(appApiUrl, apiKey, fetchImpl = fetch) {
|
|
|
374860
375126
|
...plan === void 0 ? {} : { planLabel: plan.label }
|
|
374861
375127
|
};
|
|
374862
375128
|
}
|
|
374863
|
-
|
|
375129
|
+
function firstSameOriginAsset(html, pageUrl) {
|
|
375130
|
+
const pageOrigin = new URL(pageUrl).origin;
|
|
375131
|
+
for (const pattern of ASSET_PATTERNS) {
|
|
375132
|
+
const reference = pattern.exec(html)?.[1];
|
|
375133
|
+
if (reference === void 0) {
|
|
375134
|
+
continue;
|
|
375135
|
+
}
|
|
375136
|
+
let resolved;
|
|
375137
|
+
try {
|
|
375138
|
+
resolved = new URL(reference, pageUrl);
|
|
375139
|
+
} catch {
|
|
375140
|
+
continue;
|
|
375141
|
+
}
|
|
375142
|
+
if (resolved.origin === pageOrigin) {
|
|
375143
|
+
return resolved.toString();
|
|
375144
|
+
}
|
|
375145
|
+
}
|
|
375146
|
+
return void 0;
|
|
375147
|
+
}
|
|
375148
|
+
async function probeFrontendAssets(frontendUrl, fetchImpl = fetch) {
|
|
375149
|
+
const pageUrl = new URL("/", frontendUrl).toString();
|
|
375150
|
+
let page;
|
|
375151
|
+
try {
|
|
375152
|
+
page = await fetchImpl(pageUrl, {
|
|
375153
|
+
headers: { accept: "text/html" },
|
|
375154
|
+
method: "GET"
|
|
375155
|
+
});
|
|
375156
|
+
} catch (error98) {
|
|
375157
|
+
return { kind: "unreachable", message: messageOf(error98), url: pageUrl };
|
|
375158
|
+
}
|
|
375159
|
+
if (!page.ok) {
|
|
375160
|
+
return { kind: "page-not-served", status: page.status };
|
|
375161
|
+
}
|
|
375162
|
+
let html;
|
|
375163
|
+
try {
|
|
375164
|
+
html = await page.text();
|
|
375165
|
+
} catch (error98) {
|
|
375166
|
+
return { kind: "unreachable", message: messageOf(error98), url: pageUrl };
|
|
375167
|
+
}
|
|
375168
|
+
const assetUrl = firstSameOriginAsset(html, pageUrl);
|
|
375169
|
+
if (assetUrl === void 0) {
|
|
375170
|
+
return { kind: "no-asset" };
|
|
375171
|
+
}
|
|
375172
|
+
let asset;
|
|
375173
|
+
try {
|
|
375174
|
+
asset = await fetchImpl(assetUrl, { headers: { referer: pageUrl }, method: "GET" });
|
|
375175
|
+
} catch (error98) {
|
|
375176
|
+
return { kind: "unreachable", message: messageOf(error98), url: assetUrl };
|
|
375177
|
+
}
|
|
375178
|
+
if (asset.status === 401 || asset.status === 403) {
|
|
375179
|
+
return { assetUrl, kind: "assets-refused", status: asset.status };
|
|
375180
|
+
}
|
|
375181
|
+
if (!asset.ok) {
|
|
375182
|
+
return { assetUrl, kind: "asset-inconclusive", status: asset.status };
|
|
375183
|
+
}
|
|
375184
|
+
return { assetUrl, kind: "assets-served" };
|
|
375185
|
+
}
|
|
375186
|
+
var runtimeInfoSchema, metadataSchema, ASSET_PATTERNS;
|
|
374864
375187
|
var init_verify_probes = __esm({
|
|
374865
375188
|
"apps/cli/src/services/verify-probes.ts"() {
|
|
374866
375189
|
"use strict";
|
|
@@ -374890,6 +375213,10 @@ var init_verify_probes = __esm({
|
|
|
374890
375213
|
license: external_exports.object({ state: external_exports.string() }).optional(),
|
|
374891
375214
|
plan: external_exports.object({ label: external_exports.string() }).optional()
|
|
374892
375215
|
});
|
|
375216
|
+
ASSET_PATTERNS = [
|
|
375217
|
+
/<script\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/iu,
|
|
375218
|
+
/<link\b[^>]*\bhref\s*=\s*["']([^"']+)["']/iu
|
|
375219
|
+
];
|
|
374893
375220
|
}
|
|
374894
375221
|
});
|
|
374895
375222
|
|
|
@@ -374906,7 +375233,17 @@ function describeRuntimeUrlSource(context3) {
|
|
|
374906
375233
|
case "discovered":
|
|
374907
375234
|
return `(read from this project${origin})`;
|
|
374908
375235
|
case "default":
|
|
374909
|
-
return "(assumed \u2014 nothing in this project named a port
|
|
375236
|
+
return "(assumed \u2014 nothing in this project named a port, so which project answered is unverified. Pass --runtime-url to change it.)";
|
|
375237
|
+
}
|
|
375238
|
+
}
|
|
375239
|
+
function describeFrontendUrlSource(resolution) {
|
|
375240
|
+
switch (resolution.source) {
|
|
375241
|
+
case "flag":
|
|
375242
|
+
return "(from --frontend-url)";
|
|
375243
|
+
case "discovered":
|
|
375244
|
+
return resolution.origin === void 0 ? "(read from this project)" : `(read from this project, from ${resolution.origin})`;
|
|
375245
|
+
case "unknown":
|
|
375246
|
+
return "(not resolved)";
|
|
374910
375247
|
}
|
|
374911
375248
|
}
|
|
374912
375249
|
function factRows(facts) {
|
|
@@ -374961,7 +375298,14 @@ function renderSummary(result, roundTrip) {
|
|
|
374961
375298
|
}
|
|
374962
375299
|
function renderVerifyReport(result, context3, roundTrip) {
|
|
374963
375300
|
const urlNote = `Runtime URL: ${context3.runtimeUrl} ${describeRuntimeUrlSource(context3)}`;
|
|
374964
|
-
const
|
|
375301
|
+
const frontendNote = context3.frontendUrl.url === void 0 ? "Frontend URL: not resolved (nothing in this project named the port its frontend serves; pass --frontend-url)" : `Frontend URL: ${context3.frontendUrl.url} ${describeFrontendUrlSource(context3.frontendUrl)}`;
|
|
375302
|
+
const lines = [
|
|
375303
|
+
"CopilotKit wiring check",
|
|
375304
|
+
"",
|
|
375305
|
+
urlNote,
|
|
375306
|
+
frontendNote,
|
|
375307
|
+
""
|
|
375308
|
+
];
|
|
374965
375309
|
for (const check4 of result.checks) {
|
|
374966
375310
|
lines.push(` ${STATUS_LABELS[check4.status].padEnd(7)} ${check4.title}`);
|
|
374967
375311
|
lines.push(` ${check4.detail}`);
|
|
@@ -374993,6 +375337,11 @@ function renderVerifyJson(result, context3, roundTrip) {
|
|
|
374993
375337
|
// would let the strongest evidence in the report contradict its summary.
|
|
374994
375338
|
ok: result.ok && (roundTrip === void 0 || roundTrip.status === "pass"),
|
|
374995
375339
|
...roundTrip === void 0 ? {} : { roundTrip },
|
|
375340
|
+
// The origin a caller opens, so it never composes one. Absent rather than
|
|
375341
|
+
// guessed when the project named no port (OSS-1126).
|
|
375342
|
+
...context3.frontendUrl.url === void 0 ? {} : { frontendUrl: context3.frontendUrl.url },
|
|
375343
|
+
...context3.frontendUrl.origin === void 0 ? {} : { frontendUrlOrigin: context3.frontendUrl.origin },
|
|
375344
|
+
frontendUrlSource: context3.frontendUrl.source,
|
|
374996
375345
|
runtimeUrl: context3.runtimeUrl,
|
|
374997
375346
|
...context3.runtimeUrlOrigin === void 0 ? {} : { runtimeUrlOrigin: context3.runtimeUrlOrigin },
|
|
374998
375347
|
runtimeUrlSource: context3.runtimeUrlSource
|
|
@@ -375014,125 +375363,6 @@ var init_verify_report = __esm({
|
|
|
375014
375363
|
}
|
|
375015
375364
|
});
|
|
375016
375365
|
|
|
375017
|
-
// apps/cli/src/services/runtime-url.ts
|
|
375018
|
-
import * as path28 from "node:path";
|
|
375019
|
-
function portInCommand(command2) {
|
|
375020
|
-
for (const pattern of PORT_PATTERNS) {
|
|
375021
|
-
const match = pattern.exec(command2);
|
|
375022
|
-
if (match?.[1] !== void 0) {
|
|
375023
|
-
const port = Number.parseInt(match[1], 10);
|
|
375024
|
-
if (port > 0 && port < 65536) {
|
|
375025
|
-
return port;
|
|
375026
|
-
}
|
|
375027
|
-
}
|
|
375028
|
-
}
|
|
375029
|
-
return void 0;
|
|
375030
|
-
}
|
|
375031
|
-
function portForApp(appDir, projectEnvValues) {
|
|
375032
|
-
const appEnv = resolveProjectEnv(appDir, appDir);
|
|
375033
|
-
const values = { ...projectEnvValues, ...appEnv.values };
|
|
375034
|
-
const declared = values["PORT"];
|
|
375035
|
-
if (declared !== void 0 && /^\d{2,5}$/.test(declared.trim())) {
|
|
375036
|
-
const port2 = Number.parseInt(declared.trim(), 10);
|
|
375037
|
-
if (port2 > 0 && port2 < 65536) {
|
|
375038
|
-
return {
|
|
375039
|
-
origin: `PORT in ${appEnv.origins["PORT"] ?? "the project environment"}`,
|
|
375040
|
-
port: port2
|
|
375041
|
-
};
|
|
375042
|
-
}
|
|
375043
|
-
}
|
|
375044
|
-
const scripts = readAppManifest(appDir)?.scripts ?? {};
|
|
375045
|
-
const dev = scripts["dev"];
|
|
375046
|
-
if (dev === void 0) {
|
|
375047
|
-
return void 0;
|
|
375048
|
-
}
|
|
375049
|
-
const considered = /* @__PURE__ */ new Map([["dev", dev]]);
|
|
375050
|
-
const queue2 = [dev];
|
|
375051
|
-
while (queue2.length > 0) {
|
|
375052
|
-
const body = queue2.shift();
|
|
375053
|
-
for (const match of body.matchAll(DELEGATION_PATTERN)) {
|
|
375054
|
-
const name = match[1];
|
|
375055
|
-
const delegate = name === void 0 ? void 0 : scripts[name];
|
|
375056
|
-
if (name !== void 0 && delegate !== void 0 && !considered.has(name)) {
|
|
375057
|
-
considered.set(name, delegate);
|
|
375058
|
-
queue2.push(delegate);
|
|
375059
|
-
}
|
|
375060
|
-
}
|
|
375061
|
-
}
|
|
375062
|
-
const ports = /* @__PURE__ */ new Map();
|
|
375063
|
-
for (const [name, body] of considered) {
|
|
375064
|
-
if (!WEB_DEV_COMMANDS.test(body)) {
|
|
375065
|
-
continue;
|
|
375066
|
-
}
|
|
375067
|
-
const port2 = portInCommand(body);
|
|
375068
|
-
if (port2 !== void 0 && !ports.has(port2)) {
|
|
375069
|
-
ports.set(port2, `the "${name}" script in ${path28.join(appDir, "package.json")}`);
|
|
375070
|
-
}
|
|
375071
|
-
}
|
|
375072
|
-
if (ports.size !== 1) {
|
|
375073
|
-
return void 0;
|
|
375074
|
-
}
|
|
375075
|
-
const [[port, origin]] = [...ports];
|
|
375076
|
-
return { origin, port };
|
|
375077
|
-
}
|
|
375078
|
-
function resolveRuntimeUrl(inputs) {
|
|
375079
|
-
if (inputs.flagUrl !== void 0) {
|
|
375080
|
-
return { source: "flag", url: inputs.flagUrl };
|
|
375081
|
-
}
|
|
375082
|
-
const pinned = inputs.pinnedUrl?.trim();
|
|
375083
|
-
if (pinned !== void 0 && pinned !== "" && URL.canParse(pinned)) {
|
|
375084
|
-
return {
|
|
375085
|
-
origin: "runtimeUrl in .copilotkit/project.json",
|
|
375086
|
-
source: "project-file",
|
|
375087
|
-
url: pinned
|
|
375088
|
-
};
|
|
375089
|
-
}
|
|
375090
|
-
const declared = inputs.projectEnvValues[RUNTIME_URL_VARIABLE]?.trim();
|
|
375091
|
-
if (declared !== void 0 && declared !== "" && URL.canParse(declared)) {
|
|
375092
|
-
return {
|
|
375093
|
-
origin: `${RUNTIME_URL_VARIABLE} in the project environment`,
|
|
375094
|
-
source: "env",
|
|
375095
|
-
url: declared
|
|
375096
|
-
};
|
|
375097
|
-
}
|
|
375098
|
-
const { apps: apps2 } = resolveAppDirectories(inputs.cwd, inputs.ceiling);
|
|
375099
|
-
if (apps2.length > 1) {
|
|
375100
|
-
return {
|
|
375101
|
-
ambiguousApps: apps2,
|
|
375102
|
-
source: "default",
|
|
375103
|
-
url: DEFAULT_RUNTIME_URL
|
|
375104
|
-
};
|
|
375105
|
-
}
|
|
375106
|
-
const appDir = apps2[0];
|
|
375107
|
-
const discovered = appDir === void 0 ? void 0 : portForApp(appDir, inputs.projectEnvValues);
|
|
375108
|
-
if (discovered === void 0) {
|
|
375109
|
-
return { source: "default", url: DEFAULT_RUNTIME_URL };
|
|
375110
|
-
}
|
|
375111
|
-
return {
|
|
375112
|
-
origin: discovered.origin,
|
|
375113
|
-
source: "discovered",
|
|
375114
|
-
url: `http://localhost:${String(discovered.port)}${DEFAULT_RUNTIME_PATH}`
|
|
375115
|
-
};
|
|
375116
|
-
}
|
|
375117
|
-
var DEFAULT_RUNTIME_URL, DEFAULT_RUNTIME_PATH, RUNTIME_URL_VARIABLE, WEB_DEV_COMMANDS, PORT_PATTERNS, DELEGATION_PATTERN;
|
|
375118
|
-
var init_runtime_url = __esm({
|
|
375119
|
-
"apps/cli/src/services/runtime-url.ts"() {
|
|
375120
|
-
"use strict";
|
|
375121
|
-
init_app_directory();
|
|
375122
|
-
init_project_env();
|
|
375123
|
-
DEFAULT_RUNTIME_URL = "http://localhost:3000/api/copilotkit";
|
|
375124
|
-
DEFAULT_RUNTIME_PATH = "/api/copilotkit";
|
|
375125
|
-
RUNTIME_URL_VARIABLE = "COPILOTKIT_RUNTIME_URL";
|
|
375126
|
-
WEB_DEV_COMMANDS = /\b(next|vite|ng serve|react-scripts|nuxt|remix|astro|rsbuild|webpack serve|parcel)\b/;
|
|
375127
|
-
PORT_PATTERNS = [
|
|
375128
|
-
/(?:^|\s)--port[= ](\d{2,5})\b/,
|
|
375129
|
-
/(?:^|\s)-p[= ](\d{2,5})\b/,
|
|
375130
|
-
/(?:^|\s|^)PORT=(\d{2,5})\b/
|
|
375131
|
-
];
|
|
375132
|
-
DELEGATION_PATTERN = /\b(?:npm run|pnpm run|pnpm|yarn run|yarn|bun run)\s+([\w:.-]+)/g;
|
|
375133
|
-
}
|
|
375134
|
-
});
|
|
375135
|
-
|
|
375136
375366
|
// apps/cli/src/commands/verify.ts
|
|
375137
375367
|
var verify_exports = {};
|
|
375138
375368
|
__export(verify_exports, {
|
|
@@ -375169,10 +375399,21 @@ async function runVerify(options, overrides = {}) {
|
|
|
375169
375399
|
...projectConfig.kind === "found" && projectConfig.config.runtimeUrl !== void 0 ? { pinnedUrl: projectConfig.config.runtimeUrl } : {}
|
|
375170
375400
|
});
|
|
375171
375401
|
const runtimeUrl = runtimeUrlResolution.url;
|
|
375402
|
+
const frontendUrlResolution = resolveFrontendUrl({
|
|
375403
|
+
ceiling,
|
|
375404
|
+
cwd: deps.cwd,
|
|
375405
|
+
projectEnvValues: projectEnv.values,
|
|
375406
|
+
...options.frontendUrl === void 0 ? {} : { flagUrl: options.frontendUrl }
|
|
375407
|
+
});
|
|
375172
375408
|
const appApiUrl = (mergedEnv["INTELLIGENCE_API_URL"] ?? "").trim() || deps.appApiUrl;
|
|
375173
|
-
const [credential, runtime] = await Promise.all([
|
|
375409
|
+
const [credential, runtime, frontendAssets] = await Promise.all([
|
|
375174
375410
|
probeCredential(appApiUrl, apiKey?.key, deps.fetchImpl),
|
|
375175
|
-
probeRuntimeInfo(runtimeUrl, deps.fetchImpl)
|
|
375411
|
+
probeRuntimeInfo(runtimeUrl, deps.fetchImpl),
|
|
375412
|
+
// Probed only when the caller named the origin it opens. An origin this
|
|
375413
|
+
// command resolved is always `localhost`, and a frontend dev server is not
|
|
375414
|
+
// a surface `verify` requires to be running, so probing an unasked-for one
|
|
375415
|
+
// would sink the verdict of a correctly wired project (OSS-1126).
|
|
375416
|
+
options.frontendUrl === void 0 || frontendUrlResolution.url === void 0 ? Promise.resolve(void 0) : probeFrontendAssets(frontendUrlResolution.url, deps.fetchImpl)
|
|
375176
375417
|
]);
|
|
375177
375418
|
const apiKeySource = apiKey === void 0 || deps.env[apiKey.variableName] !== void 0 ? void 0 : projectEnv.origins[apiKey.variableName];
|
|
375178
375419
|
const credentialLoad = resolveCredentialLoad({
|
|
@@ -375194,6 +375435,8 @@ async function runVerify(options, overrides = {}) {
|
|
|
375194
375435
|
searchedFrom: projectEnv.searchedFrom,
|
|
375195
375436
|
...projectEnv.appDirectory === void 0 ? {} : { appDirectory: projectEnv.appDirectory }
|
|
375196
375437
|
},
|
|
375438
|
+
frontendAssets,
|
|
375439
|
+
frontendUrl: frontendUrlResolution,
|
|
375197
375440
|
projectConfig,
|
|
375198
375441
|
runtime,
|
|
375199
375442
|
runtimeUrl: runtimeUrlResolution
|
|
@@ -375202,8 +375445,9 @@ async function runVerify(options, overrides = {}) {
|
|
|
375202
375445
|
);
|
|
375203
375446
|
const roundTrip = expectedRuntime === "oss" && (options.roundTrip !== true || options.agent === void 0) ? notAttempted(
|
|
375204
375447
|
"Not attempted: --expect-runtime oss requires --round-trip --agent <id> so the named agent must answer before this command can pass."
|
|
375205
|
-
) : options.roundTrip === true ? await runLiveRoundTrip(options, deps,
|
|
375448
|
+
) : options.roundTrip === true ? await runLiveRoundTrip(options, deps, runtimeUrlResolution, runtime) : void 0;
|
|
375206
375449
|
const context3 = {
|
|
375450
|
+
frontendUrl: frontendUrlResolution,
|
|
375207
375451
|
runtimeUrl,
|
|
375208
375452
|
runtimeUrlSource: runtimeUrlResolution.source,
|
|
375209
375453
|
...runtimeUrlResolution.origin === void 0 ? {} : { runtimeUrlOrigin: runtimeUrlResolution.origin }
|
|
@@ -375245,12 +375489,12 @@ async function runLiveRoundTrip(options, deps, runtimeUrl, runtime) {
|
|
|
375245
375489
|
fetchImpl: deps.fetchImpl,
|
|
375246
375490
|
newId: deps.newId,
|
|
375247
375491
|
newThreadId: deps.newThreadId,
|
|
375248
|
-
runtimeUrl,
|
|
375492
|
+
runtimeUrl: runtimeUrl.url,
|
|
375249
375493
|
sleep: deps.sleep,
|
|
375250
375494
|
...options.headers === void 0 ? {} : { headers: options.headers },
|
|
375251
375495
|
...options.timeoutMs === void 0 ? {} : { timeoutMs: options.timeoutMs }
|
|
375252
375496
|
});
|
|
375253
|
-
return runRoundTripCheck(agentId, probe);
|
|
375497
|
+
return runRoundTripCheck(agentId, probe, runtimeUrl.source);
|
|
375254
375498
|
}
|
|
375255
375499
|
function notAttempted(detail) {
|
|
375256
375500
|
return {
|
|
@@ -375273,6 +375517,7 @@ var init_verify = __esm({
|
|
|
375273
375517
|
init_verify_probes();
|
|
375274
375518
|
init_verify_report();
|
|
375275
375519
|
init_runtime_url();
|
|
375520
|
+
init_frontend_url();
|
|
375276
375521
|
init_runtime_url();
|
|
375277
375522
|
}
|
|
375278
375523
|
});
|
|
@@ -378131,7 +378376,7 @@ function decodePng(bytes, expectedSize) {
|
|
|
378131
378376
|
return { status: "invalid_png" };
|
|
378132
378377
|
}
|
|
378133
378378
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
378134
|
-
const decoder = new TextDecoder(
|
|
378379
|
+
const decoder = new TextDecoder();
|
|
378135
378380
|
let offset = signature.length;
|
|
378136
378381
|
let header = null;
|
|
378137
378382
|
let palette = null;
|
|
@@ -382350,6 +382595,19 @@ function writeJsonLine(stdout, value) {
|
|
|
382350
382595
|
stdout.write(`${JSON.stringify(value)}
|
|
382351
382596
|
`);
|
|
382352
382597
|
}
|
|
382598
|
+
function recordAuthStarted(dependencies) {
|
|
382599
|
+
try {
|
|
382600
|
+
dependencies.recordEvent({
|
|
382601
|
+
event: "cli.login.auth_started",
|
|
382602
|
+
properties: {
|
|
382603
|
+
command: "login",
|
|
382604
|
+
already_authenticated: false,
|
|
382605
|
+
...dependencies.readOnboardingRun()
|
|
382606
|
+
}
|
|
382607
|
+
});
|
|
382608
|
+
} catch {
|
|
382609
|
+
}
|
|
382610
|
+
}
|
|
382353
382611
|
function recordAuthCompleted(dependencies, alreadyAuthenticated) {
|
|
382354
382612
|
try {
|
|
382355
382613
|
dependencies.recordEvent({
|
|
@@ -382387,6 +382645,7 @@ async function runLoginJson(dependencies = {
|
|
|
382387
382645
|
}
|
|
382388
382646
|
let loginUrlWritten = false;
|
|
382389
382647
|
await dependencies.login({
|
|
382648
|
+
authHandoff: { source: "cli", mode: "agent_onboarding" },
|
|
382390
382649
|
openBrowser: false,
|
|
382391
382650
|
onLoginUrl: (url4) => {
|
|
382392
382651
|
if (loginUrlWritten) {
|
|
@@ -382397,8 +382656,9 @@ async function runLoginJson(dependencies = {
|
|
|
382397
382656
|
type: "authentication_url",
|
|
382398
382657
|
url: url4
|
|
382399
382658
|
});
|
|
382659
|
+
recordAuthStarted(dependencies);
|
|
382400
382660
|
writeJsonLine(dependencies.stdout, {
|
|
382401
|
-
action: "Open
|
|
382661
|
+
action: "Open authentication_url once in the default browser. Keep this process running until it emits a terminal event.",
|
|
382402
382662
|
type: "action_required"
|
|
382403
382663
|
});
|
|
382404
382664
|
}
|
|
@@ -383531,7 +383791,10 @@ async function runOnboard(argv, dependencies) {
|
|
|
383531
383791
|
);
|
|
383532
383792
|
}
|
|
383533
383793
|
if (subcommand === "complete") {
|
|
383534
|
-
const
|
|
383794
|
+
const opened = parseFrontendUrl(argv.slice(1));
|
|
383795
|
+
if (opened === void 0)
|
|
383796
|
+
throw new Error(FRONTEND_URL_USAGE);
|
|
383797
|
+
const blocked2 = parseBlocker(opened.rest);
|
|
383535
383798
|
if (blocked2 === void 0)
|
|
383536
383799
|
throw new Error(BLOCKER_USAGE);
|
|
383537
383800
|
const check4 = parseSurfaceCheck(blocked2.rest);
|
|
@@ -383547,6 +383810,11 @@ async function runOnboard(argv, dependencies) {
|
|
|
383547
383810
|
accepted_count: accepted.length,
|
|
383548
383811
|
...check4.kind === "visual" ? { visual_check: check4.outcome } : { device_check: check4.outcome },
|
|
383549
383812
|
...blocked2.blocker === void 0 ? {} : { blocked_by: blocked2.blocker },
|
|
383813
|
+
// The kind of host a browser was pointed at. A run that opened the
|
|
383814
|
+
// loopback IP literal loses every static chunk to a 403 and reads the
|
|
383815
|
+
// dead page as a broken integration, and the recurrence used to be
|
|
383816
|
+
// visible only in a friction report (OSS-1126).
|
|
383817
|
+
...opened.hostKind === void 0 ? {} : { frontend_host_kind: opened.hostKind },
|
|
383550
383818
|
...describeResolvedDependencies(deps.readDependencies())
|
|
383551
383819
|
}
|
|
383552
383820
|
});
|
|
@@ -383924,6 +384192,21 @@ ${detail}${NOTHING_PROVED}`;
|
|
|
383924
384192
|
""
|
|
383925
384193
|
].join("\n");
|
|
383926
384194
|
}
|
|
384195
|
+
function parseFrontendUrl(rest) {
|
|
384196
|
+
const flagIndex = rest.indexOf("--frontend-url");
|
|
384197
|
+
if (flagIndex === -1)
|
|
384198
|
+
return { rest };
|
|
384199
|
+
const value = rest[flagIndex + 1];
|
|
384200
|
+
if (value === void 0)
|
|
384201
|
+
return void 0;
|
|
384202
|
+
const hostKind = classifyFrontendHost(value);
|
|
384203
|
+
if (hostKind === void 0)
|
|
384204
|
+
return void 0;
|
|
384205
|
+
return {
|
|
384206
|
+
hostKind,
|
|
384207
|
+
rest: [...rest.slice(0, flagIndex), ...rest.slice(flagIndex + 2)]
|
|
384208
|
+
};
|
|
384209
|
+
}
|
|
383927
384210
|
function parseBlocker(rest) {
|
|
383928
384211
|
const flagIndex = rest.indexOf("--blocked-by");
|
|
383929
384212
|
if (flagIndex === -1)
|
|
@@ -384461,7 +384744,7 @@ function recordBestEffort(dependencies, event) {
|
|
|
384461
384744
|
} catch {
|
|
384462
384745
|
}
|
|
384463
384746
|
}
|
|
384464
|
-
var ONBOARD_SUBCOMMANDS, RUN_NOT_BOUND, REBASELINE_USAGE, ACCEPT_USAGE, EXCLUSIVE_MODE_USAGE, NOTHING_PROVED, NOTHING_ACCEPTED, VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, BLOCKER_CAUSES, BLOCKER_USAGE, SURFACE_CHECK_USAGE, PROOF_STEPS, PROOF_OUTCOMES, BASELINE_PREDICATE_COUNT, PROOF_USAGE, BLOCKER_REPORTS;
|
|
384747
|
+
var ONBOARD_SUBCOMMANDS, RUN_NOT_BOUND, REBASELINE_USAGE, ACCEPT_USAGE, EXCLUSIVE_MODE_USAGE, NOTHING_PROVED, NOTHING_ACCEPTED, VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, BLOCKER_CAUSES, BLOCKER_USAGE, SURFACE_CHECK_USAGE, FRONTEND_URL_USAGE, PROOF_STEPS, PROOF_OUTCOMES, BASELINE_PREDICATE_COUNT, PROOF_USAGE, BLOCKER_REPORTS;
|
|
384465
384748
|
var init_onboard = __esm({
|
|
384466
384749
|
async "apps/cli/src/commands/onboard.ts"() {
|
|
384467
384750
|
"use strict";
|
|
@@ -384477,6 +384760,7 @@ var init_onboard = __esm({
|
|
|
384477
384760
|
init_framework_vocabulary();
|
|
384478
384761
|
await init_telemetry();
|
|
384479
384762
|
init_app_directory();
|
|
384763
|
+
init_frontend_url();
|
|
384480
384764
|
init_repository_root();
|
|
384481
384765
|
init_resolved_dependencies();
|
|
384482
384766
|
ONBOARD_SUBCOMMANDS = [
|
|
@@ -384520,6 +384804,7 @@ Use \`other\` rather than leaving the flag off. A run with no way to say it was
|
|
|
384520
384804
|
blocked reads the unsupported terminal instead, and reports a path that works
|
|
384521
384805
|
as one this release does not carry.`;
|
|
384522
384806
|
SURFACE_CHECK_USAGE = "Usage: copilotkit onboard complete --visual-check <performed|skipped-no-browser-tool|failed>\n or: copilotkit onboard complete --device-check <performed|skipped-no-device|failed>\nPass exactly one. A web journey is proven in a browser and a mobile one on a device;\nwhich flag you pass is how this run states which surface it proved.";
|
|
384807
|
+
FRONTEND_URL_USAGE = "Usage: copilotkit onboard complete <surface-check> --frontend-url <absolute url>\nPass the URL a browser actually opened, for example http://localhost:3000.\nOnly the kind of host is recorded -- loopback hostname, loopback IP literal,\nother IP literal, other name -- never the host itself.";
|
|
384523
384808
|
PROOF_STEPS = ["oss-baseline", "round-trip"];
|
|
384524
384809
|
PROOF_OUTCOMES = ["passed", "failed", "skipped"];
|
|
384525
384810
|
BASELINE_PREDICATE_COUNT = 6;
|
|
@@ -387843,7 +388128,7 @@ refused before anything is sent, and the reason is printed. Both commands print
|
|
|
387843
388128
|
what they sent. Every refusal exits zero and leaves onboarding unaffected.
|
|
387844
388129
|
`,
|
|
387845
388130
|
verify: `Usage: copilotkit verify [--json] [--runtime-url <url>] [--round-trip]
|
|
387846
|
-
[--expect-runtime <mode>]
|
|
388131
|
+
[--expect-runtime <mode>] [--frontend-url <url>]
|
|
387847
388132
|
|
|
387848
388133
|
Check that this project's CopilotKit wiring works, and report what it found.
|
|
387849
388134
|
|
|
@@ -387876,6 +388161,10 @@ Options:
|
|
|
387876
388161
|
.copilotkit/project.json, COPILOTKIT_RUNTIME_URL, or
|
|
387877
388162
|
the port the app's dev configuration declares \u2014
|
|
387878
388163
|
falling back to http://localhost:3000/api/copilotkit
|
|
388164
|
+
--frontend-url <url> The origin a browser opens. Without it, the origin is
|
|
388165
|
+
read from the port the app's dev configuration
|
|
388166
|
+
declares, always as localhost. Pass the URL you
|
|
388167
|
+
actually opened to have its static assets checked
|
|
387879
388168
|
--expect-runtime <mode> Require intelligence (default) or oss runtime mode
|
|
387880
388169
|
--round-trip Also run the agent and read its answer back
|
|
387881
388170
|
--agent <id> Which declared agent to run, when there are several
|
|
@@ -389072,6 +389361,7 @@ async function runVerifyCommand(argv) {
|
|
|
389072
389361
|
options: {
|
|
389073
389362
|
agent: { type: "string" },
|
|
389074
389363
|
"expect-runtime": { type: "string" },
|
|
389364
|
+
"frontend-url": { type: "string" },
|
|
389075
389365
|
header: { multiple: true, type: "string" },
|
|
389076
389366
|
json: { type: "boolean" },
|
|
389077
389367
|
"round-trip": { type: "boolean" },
|
|
@@ -389091,6 +389381,15 @@ async function runVerifyCommand(argv) {
|
|
|
389091
389381
|
await exitWithFlush(1);
|
|
389092
389382
|
}
|
|
389093
389383
|
}
|
|
389384
|
+
const frontendUrl = parsed.values["frontend-url"];
|
|
389385
|
+
const { isFrontendUrl: isFrontendUrl2 } = await Promise.resolve().then(() => (init_frontend_url(), frontend_url_exports));
|
|
389386
|
+
if (frontendUrl !== void 0 && !isFrontendUrl2(frontendUrl)) {
|
|
389387
|
+
process.stderr.write(
|
|
389388
|
+
`Error: --frontend-url must be an absolute http or https URL with a host (received "${frontendUrl}").
|
|
389389
|
+
`
|
|
389390
|
+
);
|
|
389391
|
+
await exitWithFlush(1);
|
|
389392
|
+
}
|
|
389094
389393
|
const timeoutSeconds = parsed.values["timeout"];
|
|
389095
389394
|
if (timeoutSeconds !== void 0 && !/^\d+$/.test(timeoutSeconds)) {
|
|
389096
389395
|
process.stderr.write(
|
|
@@ -389121,6 +389420,7 @@ async function runVerifyCommand(argv) {
|
|
|
389121
389420
|
...agent === void 0 ? {} : { agent },
|
|
389122
389421
|
...expectedRuntime === void 0 ? {} : { expectRuntime: expectedRuntime },
|
|
389123
389422
|
...headers === void 0 || Object.keys(headers).length === 0 ? {} : { headers },
|
|
389423
|
+
...frontendUrl === void 0 ? {} : { frontendUrl },
|
|
389124
389424
|
...parsed.values["round-trip"] === true ? { roundTrip: true } : {},
|
|
389125
389425
|
...runtimeUrl === void 0 ? {} : { runtimeUrl },
|
|
389126
389426
|
...timeoutSeconds === void 0 ? {} : { timeoutMs: Number(timeoutSeconds) * 1e3 }
|