@copilotkit/shared 1.70.0 → 1.70.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attachments/types.d.cts +10 -0
- package/dist/attachments/types.d.cts.map +1 -1
- package/dist/attachments/types.d.mts +10 -0
- package/dist/attachments/types.d.mts.map +1 -1
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +229 -200
- package/dist/index.umd.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/telemetry/index.cjs +15 -0
- package/dist/telemetry/index.d.cts +5 -0
- package/dist/telemetry/index.d.mts +4 -2
- package/dist/telemetry/index.mjs +6 -0
- package/dist/telemetry/telemetry-client.cjs +4 -13
- package/dist/telemetry/telemetry-client.cjs.map +1 -1
- package/dist/telemetry/telemetry-client.d.cts +2 -8
- package/dist/telemetry/telemetry-client.d.cts.map +1 -1
- package/dist/telemetry/telemetry-client.d.mts +2 -8
- package/dist/telemetry/telemetry-client.d.mts.map +1 -1
- package/dist/telemetry/telemetry-client.mjs +4 -12
- package/dist/telemetry/telemetry-client.mjs.map +1 -1
- package/dist/telemetry/telemetry-disabled.cjs +20 -0
- package/dist/telemetry/telemetry-disabled.cjs.map +1 -0
- package/dist/telemetry/telemetry-disabled.d.cts +16 -0
- package/dist/telemetry/telemetry-disabled.d.cts.map +1 -0
- package/dist/telemetry/telemetry-disabled.d.mts +16 -0
- package/dist/telemetry/telemetry-disabled.d.mts.map +1 -0
- package/dist/telemetry/telemetry-disabled.mjs +19 -0
- package/dist/telemetry/telemetry-disabled.mjs.map +1 -0
- package/dist/utils/console-styling.cjs +3 -3
- package/dist/utils/console-styling.cjs.map +1 -1
- package/dist/utils/console-styling.mjs +3 -3
- package/dist/utils/console-styling.mjs.map +1 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -1
- package/dist/utils/index.d.cts.map +1 -1
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.mts.map +1 -1
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/inspector-learning.cjs +185 -0
- package/dist/utils/inspector-learning.cjs.map +1 -0
- package/dist/utils/inspector-learning.d.cts +91 -0
- package/dist/utils/inspector-learning.d.cts.map +1 -0
- package/dist/utils/inspector-learning.d.mts +91 -0
- package/dist/utils/inspector-learning.d.mts.map +1 -0
- package/dist/utils/inspector-learning.mjs +182 -0
- package/dist/utils/inspector-learning.mjs.map +1 -0
- package/dist/utils/types.cjs.map +1 -1
- package/dist/utils/types.d.cts +13 -2
- package/dist/utils/types.d.cts.map +1 -1
- package/dist/utils/types.d.mts +13 -2
- package/dist/utils/types.d.mts.map +1 -1
- package/dist/utils/types.mjs.map +1 -1
- package/package.json +12 -1
- package/src/__tests__/license-context.test.ts +22 -1
- package/src/__tests__/root-entry-browser-safety.test.ts +85 -0
- package/src/attachments/types.ts +10 -0
- package/src/index.ts +27 -2
- package/src/telemetry/telemetry-client.ts +2 -17
- package/src/telemetry/telemetry-disabled.ts +22 -0
- package/src/utils/console-styling.ts +3 -3
- package/src/utils/index.ts +1 -0
- package/src/utils/inspector-learning.test.ts +213 -0
- package/src/utils/inspector-learning.ts +423 -0
- package/src/utils/types.ts +16 -1
- package/tsdown.config.ts +4 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector-learning.mjs","names":[],"sources":["../../src/utils/inspector-learning.ts"],"sourcesContent":["/** A bounded page in the Inspector Learning snapshot. */\nexport interface InspectorLearningPage<T> {\n readonly page: number;\n readonly pageSize: number;\n readonly total: number;\n readonly totalPages: number;\n readonly items: readonly T[];\n}\n\nexport type InspectorLearningEvidence =\n | {\n readonly status: \"available\";\n readonly threadId: string;\n readonly threadName: string | null;\n readonly messageIds: readonly string[];\n readonly updatedAt: string;\n }\n | { readonly status: \"unavailable\" };\n\nexport interface InspectorLearningInsight {\n readonly id: string;\n readonly statement: string;\n readonly impact: string;\n readonly totalThreadCount: number;\n readonly evidenceTruncated: boolean;\n readonly evidence: readonly InspectorLearningEvidence[];\n}\n\nexport interface InspectorLearningSkill {\n readonly id: string;\n readonly name: string;\n readonly description: string;\n readonly revision: number;\n readonly skillMd: string;\n readonly sourceInsight: InspectorLearningInsight | null;\n}\n\nexport interface InspectorLearningSnapshotV1 {\n readonly schemaVersion: 1;\n readonly projectKey: string;\n readonly snapshotVersion: string;\n readonly webAppOrigin: string;\n readonly configuration:\n | { readonly state: \"not_configured\" }\n | {\n readonly state: \"invalid\";\n readonly reason: \"container\" | \"instrumentation\";\n }\n | {\n readonly state: \"configured\";\n readonly container: { readonly id: string; readonly name: string };\n }\n | { readonly state: \"selection_required\" };\n readonly pendingThreadCount: number;\n readonly run: {\n readonly hasActiveRun: boolean;\n readonly hasEverSucceeded: boolean;\n readonly latest: {\n readonly completedAt: string | null;\n readonly status:\n | \"queued\"\n | \"freezing\"\n | \"batching\"\n | \"reducing\"\n | \"finalizing\"\n | \"succeeded\"\n | \"failed\";\n } | null;\n };\n readonly pendingCandidateCount: number;\n readonly skillsPage: InspectorLearningPage<InspectorLearningSkill>;\n readonly insightsPage: InspectorLearningPage<InspectorLearningInsight>;\n readonly links: {\n readonly learning: string;\n readonly candidates: string | null;\n readonly runs: string | null;\n };\n}\n\nexport interface InspectorLearningRequestV1 {\n readonly agentId?: string;\n readonly skillsPage?: number;\n readonly insightsPage?: number;\n}\n\ntype RecordValue = Record<string, unknown>;\n\nconst record = (value: unknown): value is RecordValue =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\nconst string = (value: unknown, maximum: number): value is string =>\n typeof value === \"string\" &&\n value.trim().length > 0 &&\n value.length <= maximum;\nconst integer = (value: unknown, minimum = 0): value is number =>\n typeof value === \"number\" && Number.isSafeInteger(value) && value >= minimum;\nconst date = (value: unknown): value is string =>\n typeof value === \"string\" && !Number.isNaN(Date.parse(value));\n\n/**\n * Accepts only the configured Intelligence web-app origin.\n *\n * Learning links are server-authored actions. Treating every HTTPS origin as\n * trusted would let a misconfigured or compromised upstream turn Inspector\n * copy into a navigation primitive for an arbitrary site.\n */\nexport function parseInspectorLearningUrl(\n value: unknown,\n trustedOrigin: unknown,\n): string | undefined {\n if (\n typeof value !== \"string\" ||\n value.length > 4_000 ||\n typeof trustedOrigin !== \"string\" ||\n trustedOrigin.length > 2_000\n ) {\n return undefined;\n }\n try {\n const parsed = new URL(value);\n const configured = new URL(trustedOrigin);\n const loopback = [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(\n configured.hostname,\n );\n if (\n parsed.username ||\n parsed.password ||\n configured.username ||\n configured.password ||\n configured.pathname !== \"/\" ||\n configured.search ||\n configured.hash ||\n (configured.protocol !== \"https:\" &&\n !(configured.protocol === \"http:\" && loopback)) ||\n parsed.origin !== configured.origin\n ) {\n return undefined;\n }\n return parsed.toString();\n } catch {\n return undefined;\n }\n}\n\nfunction parseEvidence(value: unknown): InspectorLearningEvidence | undefined {\n if (record(value) && value.status === \"unavailable\") {\n return Object.keys(value).length === 1\n ? { status: \"unavailable\" }\n : undefined;\n }\n if (\n !record(value) ||\n value.status !== \"available\" ||\n !string(value.threadId, 128) ||\n !date(value.updatedAt)\n ) {\n return undefined;\n }\n if (\n value.threadName !== null &&\n !(typeof value.threadName === \"string\" && value.threadName.length <= 4_000)\n ) {\n return undefined;\n }\n if (\n !Array.isArray(value.messageIds) ||\n value.messageIds.length > 200 ||\n !value.messageIds.every((id) => string(id, 128))\n ) {\n return undefined;\n }\n return {\n status: \"available\",\n threadId: value.threadId,\n threadName: value.threadName,\n messageIds: [...value.messageIds],\n updatedAt: value.updatedAt,\n };\n}\n\nfunction parseInsight(value: unknown): InspectorLearningInsight | undefined {\n if (\n !record(value) ||\n !string(value.id, 128) ||\n !string(value.statement, 4_000) ||\n !string(value.impact, 4_000) ||\n !integer(value.totalThreadCount) ||\n typeof value.evidenceTruncated !== \"boolean\" ||\n !Array.isArray(value.evidence) ||\n value.evidence.length > 100\n ) {\n return undefined;\n }\n const evidence = value.evidence.map(parseEvidence);\n if (evidence.some((item) => item === undefined)) return undefined;\n return {\n id: value.id,\n statement: value.statement,\n impact: value.impact,\n totalThreadCount: value.totalThreadCount,\n evidenceTruncated: value.evidenceTruncated,\n evidence: evidence as InspectorLearningEvidence[],\n };\n}\n\nfunction parseSkill(value: unknown): InspectorLearningSkill | undefined {\n if (\n !record(value) ||\n !string(value.id, 128) ||\n !string(value.name, 128) ||\n !string(value.description, 4_000) ||\n !integer(value.revision, 1) ||\n typeof value.skillMd !== \"string\" ||\n value.skillMd.length > 131_072\n ) {\n return undefined;\n }\n const sourceInsight =\n value.sourceInsight === null ? null : parseInsight(value.sourceInsight);\n if (sourceInsight === undefined) return undefined;\n return {\n id: value.id,\n name: value.name,\n description: value.description,\n revision: value.revision,\n skillMd: value.skillMd,\n sourceInsight,\n };\n}\n\nfunction parsePage<T>(\n value: unknown,\n pageSize: 3 | 4,\n parseItem: (item: unknown) => T | undefined,\n): InspectorLearningPage<T> | undefined {\n if (\n !record(value) ||\n !integer(value.page, 1) ||\n value.pageSize !== pageSize ||\n !integer(value.total) ||\n !integer(value.totalPages) ||\n !Array.isArray(value.items) ||\n value.items.length > pageSize\n ) {\n return undefined;\n }\n const items = value.items.map(parseItem);\n if (items.some((item) => item === undefined)) return undefined;\n if (value.total === 0) {\n if (value.page !== 1 || value.totalPages !== 0 || items.length !== 0) {\n return undefined;\n }\n } else {\n const totalPages = Math.ceil(value.total / pageSize);\n const expectedItems = Math.min(\n pageSize,\n value.total - (value.page - 1) * pageSize,\n );\n if (\n value.totalPages !== totalPages ||\n value.page > totalPages ||\n items.length !== expectedItems\n ) {\n return undefined;\n }\n }\n return {\n page: value.page,\n pageSize,\n total: value.total,\n totalPages: value.totalPages,\n items: items as T[],\n };\n}\n\nfunction parseConfiguration(\n value: unknown,\n): InspectorLearningSnapshotV1[\"configuration\"] | undefined {\n if (!record(value)) return undefined;\n if (\n value.state === \"not_configured\" ||\n value.state === \"selection_required\"\n ) {\n return { state: value.state };\n }\n if (\n value.state === \"invalid\" &&\n (value.reason === \"container\" || value.reason === \"instrumentation\")\n ) {\n return { state: value.state, reason: value.reason };\n }\n if (\n value.state === \"configured\" &&\n record(value.container) &&\n string(value.container.id, 128) &&\n string(value.container.name, 128)\n ) {\n return {\n state: \"configured\",\n container: { id: value.container.id, name: value.container.name },\n };\n }\n return undefined;\n}\n\nconst runStatuses = new Set([\n \"queued\",\n \"freezing\",\n \"batching\",\n \"reducing\",\n \"finalizing\",\n \"succeeded\",\n \"failed\",\n]);\n\n/** Validates and copies an untrusted Learning snapshot at each process boundary. */\nexport function parseInspectorLearningSnapshotV1(\n value: unknown,\n): InspectorLearningSnapshotV1 | undefined {\n if (\n !record(value) ||\n value.schemaVersion !== 1 ||\n !string(value.projectKey, 128) ||\n !string(value.snapshotVersion, 128) ||\n !integer(value.pendingThreadCount) ||\n !integer(value.pendingCandidateCount) ||\n !record(value.run) ||\n typeof value.run.hasActiveRun !== \"boolean\" ||\n typeof value.run.hasEverSucceeded !== \"boolean\"\n ) {\n return undefined;\n }\n const configuration = parseConfiguration(value.configuration);\n const skillsPage = parsePage(value.skillsPage, 3, parseSkill);\n const insightsPage = parsePage(value.insightsPage, 4, parseInsight);\n if (!configuration || !skillsPage || !insightsPage) return undefined;\n let latest: InspectorLearningSnapshotV1[\"run\"][\"latest\"] = null;\n if (value.run.latest !== null) {\n const latestRun = value.run.latest;\n if (!record(latestRun)) {\n return undefined;\n }\n const { status, completedAt } = latestRun;\n if (\n typeof status !== \"string\" ||\n !runStatuses.has(status) ||\n (completedAt !== null && !date(completedAt))\n )\n return undefined;\n latest = {\n status: status as NonNullable<typeof latest>[\"status\"],\n completedAt: completedAt as NonNullable<typeof latest>[\"completedAt\"],\n };\n }\n if (!record(value.links)) return undefined;\n const originUrl = parseInspectorLearningUrl(\n value.webAppOrigin,\n value.webAppOrigin,\n );\n if (!originUrl || new URL(originUrl).pathname !== \"/\") return undefined;\n const webAppOrigin = new URL(originUrl).origin;\n const learning = parseInspectorLearningUrl(\n value.links.learning,\n webAppOrigin,\n );\n const candidates =\n value.links.candidates === null\n ? null\n : parseInspectorLearningUrl(value.links.candidates, webAppOrigin);\n const runs =\n value.links.runs === null\n ? null\n : parseInspectorLearningUrl(value.links.runs, webAppOrigin);\n if (\n !learning ||\n candidates === undefined ||\n runs === undefined ||\n (value.pendingThreadCount > 0 && runs === null) ||\n (value.pendingCandidateCount > 0 && candidates === null)\n )\n return undefined;\n return {\n schemaVersion: 1,\n projectKey: value.projectKey,\n snapshotVersion: value.snapshotVersion,\n webAppOrigin,\n configuration,\n pendingThreadCount: value.pendingThreadCount,\n run: {\n hasActiveRun: value.run.hasActiveRun,\n hasEverSucceeded: value.run.hasEverSucceeded,\n latest,\n },\n pendingCandidateCount: value.pendingCandidateCount,\n skillsPage,\n insightsPage,\n links: { learning, candidates, runs },\n };\n}\n\n/** Normalizes the browser-owned request without accepting container scope. */\nexport function parseInspectorLearningRequestV1(\n value: unknown,\n): InspectorLearningRequestV1 | undefined {\n if (!record(value)) return undefined;\n if (\n Object.keys(value).some(\n (key) => ![\"agentId\", \"skillsPage\", \"insightsPage\"].includes(key),\n )\n ) {\n return undefined;\n }\n const agentId = value.agentId;\n const skillsPage = value.skillsPage;\n const insightsPage = value.insightsPage;\n if (agentId !== undefined && !string(agentId, 128)) return undefined;\n if (skillsPage !== undefined && !integer(skillsPage, 1)) return undefined;\n if (insightsPage !== undefined && !integer(insightsPage, 1)) return undefined;\n return {\n ...(agentId === undefined ? {} : { agentId }),\n ...(skillsPage === undefined ? {} : { skillsPage }),\n ...(insightsPage === undefined ? {} : { insightsPage }),\n };\n}\n"],"mappings":";AAuFA,MAAM,UAAU,UACd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S,QACzC,MAAM,wBAAwB,KAAK,eAAe,KAEnD,QAAO;AACT,QAAO;EACL,eAAe;EACf,YAAY,MAAM;EAClB,iBAAiB,MAAM;EACvB;EACA;EACA,oBAAoB,MAAM;EAC1B,KAAK;GACH,cAAc,MAAM,IAAI;GACxB,kBAAkB,MAAM,IAAI;GAC5B;GACD;EACD,uBAAuB,MAAM;EAC7B;EACA;EACA,OAAO;GAAE;GAAU;GAAY;GAAM;EACtC;;;AAIH,SAAgB,gCACd,OACwC;AACxC,KAAI,CAAC,OAAO,MAAM,CAAE,QAAO;AAC3B,KACE,OAAO,KAAK,MAAM,CAAC,MAChB,QAAQ,CAAC;EAAC;EAAW;EAAc;EAAe,CAAC,SAAS,IAAI,CAClE,CAED;CAEF,MAAM,UAAU,MAAM;CACtB,MAAM,aAAa,MAAM;CACzB,MAAM,eAAe,MAAM;AAC3B,KAAI,YAAY,UAAa,CAAC,OAAO,SAAS,IAAI,CAAE,QAAO;AAC3D,KAAI,eAAe,UAAa,CAAC,QAAQ,YAAY,EAAE,CAAE,QAAO;AAChE,KAAI,iBAAiB,UAAa,CAAC,QAAQ,cAAc,EAAE,CAAE,QAAO;AACpE,QAAO;EACL,GAAI,YAAY,SAAY,EAAE,GAAG,EAAE,SAAS;EAC5C,GAAI,eAAe,SAAY,EAAE,GAAG,EAAE,YAAY;EAClD,GAAI,iBAAiB,SAAY,EAAE,GAAG,EAAE,cAAc;EACvD"}
|
package/dist/utils/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["import type { AgentCapabilities } from \"@ag-ui/core\";\n\nexport type MaybePromise<T> = T | PromiseLike<T>;\n\n/**\n * More specific utility for records with at least one key\n */\nexport type NonEmptyRecord<T> =\n T extends Record<string, unknown>\n ? keyof T extends never\n ? never\n : T\n : never;\n\n/**\n * Type representing an agent's basic information\n */\nexport interface AgentDescription {\n name: string;\n className: string;\n description: string;\n capabilities?: AgentCapabilities;\n}\n\nexport type RuntimeMode = \"sse\" | \"intelligence\";\n\nexport const RUNTIME_MODE_SSE = \"sse\" as const;\nexport const RUNTIME_MODE_INTELLIGENCE = \"intelligence\" as const;\n\nexport interface IntelligenceRuntimeInfo {\n wsUrl: string;\n}\n\nexport interface ThreadEndpointRuntimeInfo {\n list: boolean;\n inspect: boolean;\n mutations: boolean;\n realtimeMetadata: boolean;\n}\n\nexport type RuntimeLicenseStatus =\n | \"valid\"\n | \"none\"\n | \"expired\"\n | \"expiring\"\n | \"invalid\"\n | \"unknown\";\n\n/** Runtime entitlement authority resolved by a managed or self-hosted backend. */\ninterface RuntimeEntitlement {\n /** Whether the resolved entitlement currently grants product access. */\n active: boolean;\n /** Deployment authority that produced this entitlement. */\n source
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["import type { AgentCapabilities } from \"@ag-ui/core\";\n\nexport type MaybePromise<T> = T | PromiseLike<T>;\n\n/**\n * More specific utility for records with at least one key\n */\nexport type NonEmptyRecord<T> =\n T extends Record<string, unknown>\n ? keyof T extends never\n ? never\n : T\n : never;\n\n/**\n * Type representing an agent's basic information\n */\nexport interface AgentDescription {\n name: string;\n className: string;\n description: string;\n capabilities?: AgentCapabilities;\n}\n\nexport type RuntimeMode = \"sse\" | \"intelligence\";\n\nexport const RUNTIME_MODE_SSE = \"sse\" as const;\nexport const RUNTIME_MODE_INTELLIGENCE = \"intelligence\" as const;\n\nexport interface IntelligenceRuntimeInfo {\n wsUrl: string;\n}\n\nexport interface ThreadEndpointRuntimeInfo {\n list: boolean;\n inspect: boolean;\n mutations: boolean;\n realtimeMetadata: boolean;\n}\n\nexport type RuntimeLicenseStatus =\n | \"valid\"\n | \"none\"\n | \"expired\"\n | \"expiring\"\n | \"invalid\"\n | \"unknown\";\n\n/** Runtime entitlement authority resolved by a managed or self-hosted backend. */\ninterface RuntimeEntitlement {\n /** Whether the resolved entitlement currently grants product access. */\n active: boolean;\n /** Deployment authority that produced this entitlement. */\n source:\n | \"managedOrgSubscription\"\n | \"selfHostedDeploymentLicense\"\n | \"awsMarketplaceDeploymentLicense\";\n /** Boolean feature grants keyed by stable feature id. */\n features: Record<string, boolean>;\n /** Numeric limits keyed by stable feature id. */\n limits: Record<string, number>;\n /** Optional catalog plan code supplied by the entitlement authority. */\n planCode?: string;\n /** Optional lower-level source metadata supplied by the authority. */\n entitlementSource?: string;\n}\n\n/** Public diagnostic returned when Runtime entitlement resolution is not ready. */\ninterface RuntimeEntitlementError {\n /** Stable backend or SDK error code. */\n code: string;\n /** Safe human-readable diagnostic. */\n message: string;\n /** Whether a later resolution attempt may succeed without reconfiguration. */\n retryable: boolean;\n /** Optional originating request correlation id. */\n requestId?: string;\n /** Optional originating trace correlation id. */\n traceId?: string;\n}\n\n/** Successfully resolved Runtime entitlement response. */\ninterface RuntimeEntitlementReadyResponse {\n status: \"ready\";\n entitlement: RuntimeEntitlement;\n error?: never;\n}\n\n/** Structured non-ready Runtime entitlement response. */\ninterface RuntimeEntitlementErrorResponse {\n status: \"degraded\" | \"misconfigured\" | \"unavailable\";\n entitlement?: never;\n error: RuntimeEntitlementError;\n}\n\n/** Final structured Runtime entitlement response exposed through `/info`. */\nexport type RuntimeEntitlementResponse =\n | RuntimeEntitlementReadyResponse\n | RuntimeEntitlementErrorResponse;\n\nexport interface A2UIRuntimeInfo {\n enabled: boolean;\n /**\n * Agent ids the runtime applies A2UI to. When omitted, A2UI applies to\n * every agent served by the runtime.\n */\n agents?: string[];\n}\n\n/** Intelligence resource support available through a single runtime route. */\nexport interface SingleRouteRuntimeInfo {\n /** Whether the runtime accepts resource requests through the single route. */\n resourceOperations: boolean;\n /** Thread features available through the single-route resource bridge. */\n threadEndpoints: ThreadEndpointRuntimeInfo;\n}\n\nexport interface RuntimeInfo {\n version: string;\n agents: Record<string, AgentDescription>;\n audioFileTranscriptionEnabled: boolean;\n mode: RuntimeMode;\n intelligence?: IntelligenceRuntimeInfo;\n threadEndpoints?: ThreadEndpointRuntimeInfo;\n /** Optional capabilities exposed by runtimes that use one HTTP route. */\n singleRoute?: SingleRouteRuntimeInfo;\n /** Whether this runtime exposes trusted inspector metadata. */\n inspectorMetadata?: boolean;\n /** Whether this runtime exposes the debug-authorized Learning snapshot. */\n inspectorLearning?: boolean;\n /**\n * When true, the runtime exposes POST /agent/:agentId/suggest for stateless\n * suggestion generation. Absent on older runtimes; clients fall back to a\n * client-side agent run.\n */\n suggestions?: boolean;\n /**\n * @deprecated Use `a2ui` instead, which preserves per-agent scoping.\n * Kept for backward compatibility with older clients.\n */\n a2uiEnabled?: boolean;\n a2ui?: A2UIRuntimeInfo;\n openGenerativeUIEnabled?: boolean;\n /** Structured Runtime-level entitlement authority, when advertised. */\n runtimeEntitlements?: RuntimeEntitlementResponse;\n /** Legacy compatibility diagnostic retained for older Core/Inspector clients. */\n licenseStatus?: RuntimeLicenseStatus;\n telemetryDisabled?: boolean;\n}\n"],"mappings":";;AA0BA,MAAa,mBAAmB;AAChC,MAAa,4BAA4B"}
|
package/dist/utils/types.d.cts
CHANGED
|
@@ -33,7 +33,7 @@ interface RuntimeEntitlement {
|
|
|
33
33
|
/** Whether the resolved entitlement currently grants product access. */
|
|
34
34
|
active: boolean;
|
|
35
35
|
/** Deployment authority that produced this entitlement. */
|
|
36
|
-
source: "managedOrgSubscription" | "selfHostedDeploymentLicense";
|
|
36
|
+
source: "managedOrgSubscription" | "selfHostedDeploymentLicense" | "awsMarketplaceDeploymentLicense";
|
|
37
37
|
/** Boolean feature grants keyed by stable feature id. */
|
|
38
38
|
features: Record<string, boolean>;
|
|
39
39
|
/** Numeric limits keyed by stable feature id. */
|
|
@@ -78,6 +78,13 @@ interface A2UIRuntimeInfo {
|
|
|
78
78
|
*/
|
|
79
79
|
agents?: string[];
|
|
80
80
|
}
|
|
81
|
+
/** Intelligence resource support available through a single runtime route. */
|
|
82
|
+
interface SingleRouteRuntimeInfo {
|
|
83
|
+
/** Whether the runtime accepts resource requests through the single route. */
|
|
84
|
+
resourceOperations: boolean;
|
|
85
|
+
/** Thread features available through the single-route resource bridge. */
|
|
86
|
+
threadEndpoints: ThreadEndpointRuntimeInfo;
|
|
87
|
+
}
|
|
81
88
|
interface RuntimeInfo {
|
|
82
89
|
version: string;
|
|
83
90
|
agents: Record<string, AgentDescription>;
|
|
@@ -85,8 +92,12 @@ interface RuntimeInfo {
|
|
|
85
92
|
mode: RuntimeMode;
|
|
86
93
|
intelligence?: IntelligenceRuntimeInfo;
|
|
87
94
|
threadEndpoints?: ThreadEndpointRuntimeInfo;
|
|
95
|
+
/** Optional capabilities exposed by runtimes that use one HTTP route. */
|
|
96
|
+
singleRoute?: SingleRouteRuntimeInfo;
|
|
88
97
|
/** Whether this runtime exposes trusted inspector metadata. */
|
|
89
98
|
inspectorMetadata?: boolean;
|
|
99
|
+
/** Whether this runtime exposes the debug-authorized Learning snapshot. */
|
|
100
|
+
inspectorLearning?: boolean;
|
|
90
101
|
/**
|
|
91
102
|
* When true, the runtime exposes POST /agent/:agentId/suggest for stateless
|
|
92
103
|
* suggestion generation. Absent on older runtimes; clients fall back to a
|
|
@@ -107,5 +118,5 @@ interface RuntimeInfo {
|
|
|
107
118
|
telemetryDisabled?: boolean;
|
|
108
119
|
}
|
|
109
120
|
//#endregion
|
|
110
|
-
export { A2UIRuntimeInfo, AgentDescription, IntelligenceRuntimeInfo, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, RuntimeEntitlementResponse, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, ThreadEndpointRuntimeInfo };
|
|
121
|
+
export { A2UIRuntimeInfo, AgentDescription, IntelligenceRuntimeInfo, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, RuntimeEntitlementResponse, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SingleRouteRuntimeInfo, ThreadEndpointRuntimeInfo };
|
|
111
122
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/utils/types.ts"],"mappings":";;;KAEY,YAAA,MAAkB,CAAA,GAAI,WAAA,CAAY,CAAA;;AAA9C;;KAKY,cAAA,MACV,CAAA,SAAU,MAAA,0BACA,CAAA,yBAEJ,CAAA;;;;UAMS,gBAAA;EACf,IAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA,GAAe,iBAAA;AAAA;AAAA,KAGL,WAAA;AAAA,cAEC,gBAAA;AAAA,cACA,yBAAA;AAAA,UAEI,uBAAA;EACf,KAAA;AAAA;AAAA,UAGe,yBAAA;EACf,IAAA;EACA,OAAA;EACA,SAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA;;UASF,kBAAA;EAtCF;EAwCN,MAAA;EAxCO;EA0CP,MAAA;EApC+B;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/utils/types.ts"],"mappings":";;;KAEY,YAAA,MAAkB,CAAA,GAAI,WAAA,CAAY,CAAA;;AAA9C;;KAKY,cAAA,MACV,CAAA,SAAU,MAAA,0BACA,CAAA,yBAEJ,CAAA;;;;UAMS,gBAAA;EACf,IAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA,GAAe,iBAAA;AAAA;AAAA,KAGL,WAAA;AAAA,cAEC,gBAAA;AAAA,cACA,yBAAA;AAAA,UAEI,uBAAA;EACf,KAAA;AAAA;AAAA,UAGe,yBAAA;EACf,IAAA;EACA,OAAA;EACA,SAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA;;UASF,kBAAA;EAtCF;EAwCN,MAAA;EAxCO;EA0CP,MAAA;EApC+B;EAyC/B,QAAA,EAAU,MAAA;EArCsB;EAuChC,MAAA,EAAQ,MAAA;EAzCR;EA2CA,QAAA;EAzCA;EA2CA,iBAAA;AAAA;;UAIQ,uBAAA;EA5Ca;EA8CrB,IAAA;EA9CqB;EAgDrB,OAAA;EA9CW;EAgDX,SAAA;;EAEA,SAAA;EAlD4C;EAoD5C,OAAA;AAAA;;UAIQ,+BAAA;EACR,MAAA;EACA,WAAA,EAAa,kBAAA;EACb,KAAA;AAAA;;UAIQ,+BAAA;EACR,MAAA;EACA,WAAA;EACA,KAAA,EAAO,uBAAA;AAAA;;KAIG,0BAAA,GACR,+BAAA,GACA,+BAAA;AAAA,UAEa,eAAA;EACf,OAAA;EAhEgB;;AAGlB;;EAkEE,MAAA;AAAA;;UAIe,sBAAA;EA7DW;EA+D1B,kBAAA;EApDc;EAsDd,eAAA,EAAiB,yBAAA;AAAA;AAAA,UAGF,WAAA;EACf,OAAA;EACA,MAAA,EAAQ,MAAA,SAAe,gBAAA;EACvB,6BAAA;EACA,IAAA,EAAM,WAAA;EACN,YAAA,GAAe,uBAAA;EACf,eAAA,GAAkB,yBAAA;EA3DD;EA6DjB,WAAA,GAAc,sBAAA;EAzDiB;EA2D/B,iBAAA;EA3D+B;EA6D/B,iBAAA;EAzDA;;;;;EA+DA,WAAA;EArDQ;;;;EA0DR,WAAA;EACA,IAAA,GAAO,eAAA;EACP,uBAAA;EAzDA;EA2DA,mBAAA,GAAsB,0BAAA;EA3DjB;EA6DL,aAAA,GAAgB,oBAAA;EAChB,iBAAA;AAAA"}
|
package/dist/utils/types.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ interface RuntimeEntitlement {
|
|
|
33
33
|
/** Whether the resolved entitlement currently grants product access. */
|
|
34
34
|
active: boolean;
|
|
35
35
|
/** Deployment authority that produced this entitlement. */
|
|
36
|
-
source: "managedOrgSubscription" | "selfHostedDeploymentLicense";
|
|
36
|
+
source: "managedOrgSubscription" | "selfHostedDeploymentLicense" | "awsMarketplaceDeploymentLicense";
|
|
37
37
|
/** Boolean feature grants keyed by stable feature id. */
|
|
38
38
|
features: Record<string, boolean>;
|
|
39
39
|
/** Numeric limits keyed by stable feature id. */
|
|
@@ -78,6 +78,13 @@ interface A2UIRuntimeInfo {
|
|
|
78
78
|
*/
|
|
79
79
|
agents?: string[];
|
|
80
80
|
}
|
|
81
|
+
/** Intelligence resource support available through a single runtime route. */
|
|
82
|
+
interface SingleRouteRuntimeInfo {
|
|
83
|
+
/** Whether the runtime accepts resource requests through the single route. */
|
|
84
|
+
resourceOperations: boolean;
|
|
85
|
+
/** Thread features available through the single-route resource bridge. */
|
|
86
|
+
threadEndpoints: ThreadEndpointRuntimeInfo;
|
|
87
|
+
}
|
|
81
88
|
interface RuntimeInfo {
|
|
82
89
|
version: string;
|
|
83
90
|
agents: Record<string, AgentDescription>;
|
|
@@ -85,8 +92,12 @@ interface RuntimeInfo {
|
|
|
85
92
|
mode: RuntimeMode;
|
|
86
93
|
intelligence?: IntelligenceRuntimeInfo;
|
|
87
94
|
threadEndpoints?: ThreadEndpointRuntimeInfo;
|
|
95
|
+
/** Optional capabilities exposed by runtimes that use one HTTP route. */
|
|
96
|
+
singleRoute?: SingleRouteRuntimeInfo;
|
|
88
97
|
/** Whether this runtime exposes trusted inspector metadata. */
|
|
89
98
|
inspectorMetadata?: boolean;
|
|
99
|
+
/** Whether this runtime exposes the debug-authorized Learning snapshot. */
|
|
100
|
+
inspectorLearning?: boolean;
|
|
90
101
|
/**
|
|
91
102
|
* When true, the runtime exposes POST /agent/:agentId/suggest for stateless
|
|
92
103
|
* suggestion generation. Absent on older runtimes; clients fall back to a
|
|
@@ -107,5 +118,5 @@ interface RuntimeInfo {
|
|
|
107
118
|
telemetryDisabled?: boolean;
|
|
108
119
|
}
|
|
109
120
|
//#endregion
|
|
110
|
-
export { A2UIRuntimeInfo, AgentDescription, IntelligenceRuntimeInfo, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, RuntimeEntitlementResponse, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, ThreadEndpointRuntimeInfo };
|
|
121
|
+
export { A2UIRuntimeInfo, AgentDescription, IntelligenceRuntimeInfo, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, RuntimeEntitlementResponse, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SingleRouteRuntimeInfo, ThreadEndpointRuntimeInfo };
|
|
111
122
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/utils/types.ts"],"mappings":";;;KAEY,YAAA,MAAkB,CAAA,GAAI,WAAA,CAAY,CAAA;;AAA9C;;KAKY,cAAA,MACV,CAAA,SAAU,MAAA,0BACA,CAAA,yBAEJ,CAAA;;;;UAMS,gBAAA;EACf,IAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA,GAAe,iBAAA;AAAA;AAAA,KAGL,WAAA;AAAA,cAEC,gBAAA;AAAA,cACA,yBAAA;AAAA,UAEI,uBAAA;EACf,KAAA;AAAA;AAAA,UAGe,yBAAA;EACf,IAAA;EACA,OAAA;EACA,SAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA;;UASF,kBAAA;EAtCF;EAwCN,MAAA;EAxCO;EA0CP,MAAA;EApC+B;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/utils/types.ts"],"mappings":";;;KAEY,YAAA,MAAkB,CAAA,GAAI,WAAA,CAAY,CAAA;;AAA9C;;KAKY,cAAA,MACV,CAAA,SAAU,MAAA,0BACA,CAAA,yBAEJ,CAAA;;;;UAMS,gBAAA;EACf,IAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA,GAAe,iBAAA;AAAA;AAAA,KAGL,WAAA;AAAA,cAEC,gBAAA;AAAA,cACA,yBAAA;AAAA,UAEI,uBAAA;EACf,KAAA;AAAA;AAAA,UAGe,yBAAA;EACf,IAAA;EACA,OAAA;EACA,SAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA;;UASF,kBAAA;EAtCF;EAwCN,MAAA;EAxCO;EA0CP,MAAA;EApC+B;EAyC/B,QAAA,EAAU,MAAA;EArCsB;EAuChC,MAAA,EAAQ,MAAA;EAzCR;EA2CA,QAAA;EAzCA;EA2CA,iBAAA;AAAA;;UAIQ,uBAAA;EA5Ca;EA8CrB,IAAA;EA9CqB;EAgDrB,OAAA;EA9CW;EAgDX,SAAA;;EAEA,SAAA;EAlD4C;EAoD5C,OAAA;AAAA;;UAIQ,+BAAA;EACR,MAAA;EACA,WAAA,EAAa,kBAAA;EACb,KAAA;AAAA;;UAIQ,+BAAA;EACR,MAAA;EACA,WAAA;EACA,KAAA,EAAO,uBAAA;AAAA;;KAIG,0BAAA,GACR,+BAAA,GACA,+BAAA;AAAA,UAEa,eAAA;EACf,OAAA;EAhEgB;;AAGlB;;EAkEE,MAAA;AAAA;;UAIe,sBAAA;EA7DW;EA+D1B,kBAAA;EApDc;EAsDd,eAAA,EAAiB,yBAAA;AAAA;AAAA,UAGF,WAAA;EACf,OAAA;EACA,MAAA,EAAQ,MAAA,SAAe,gBAAA;EACvB,6BAAA;EACA,IAAA,EAAM,WAAA;EACN,YAAA,GAAe,uBAAA;EACf,eAAA,GAAkB,yBAAA;EA3DD;EA6DjB,WAAA,GAAc,sBAAA;EAzDiB;EA2D/B,iBAAA;EA3D+B;EA6D/B,iBAAA;EAzDA;;;;;EA+DA,WAAA;EArDQ;;;;EA0DR,WAAA;EACA,IAAA,GAAO,eAAA;EACP,uBAAA;EAzDA;EA2DA,mBAAA,GAAsB,0BAAA;EA3DjB;EA6DL,aAAA,GAAgB,oBAAA;EAChB,iBAAA;AAAA"}
|
package/dist/utils/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["import type { AgentCapabilities } from \"@ag-ui/core\";\n\nexport type MaybePromise<T> = T | PromiseLike<T>;\n\n/**\n * More specific utility for records with at least one key\n */\nexport type NonEmptyRecord<T> =\n T extends Record<string, unknown>\n ? keyof T extends never\n ? never\n : T\n : never;\n\n/**\n * Type representing an agent's basic information\n */\nexport interface AgentDescription {\n name: string;\n className: string;\n description: string;\n capabilities?: AgentCapabilities;\n}\n\nexport type RuntimeMode = \"sse\" | \"intelligence\";\n\nexport const RUNTIME_MODE_SSE = \"sse\" as const;\nexport const RUNTIME_MODE_INTELLIGENCE = \"intelligence\" as const;\n\nexport interface IntelligenceRuntimeInfo {\n wsUrl: string;\n}\n\nexport interface ThreadEndpointRuntimeInfo {\n list: boolean;\n inspect: boolean;\n mutations: boolean;\n realtimeMetadata: boolean;\n}\n\nexport type RuntimeLicenseStatus =\n | \"valid\"\n | \"none\"\n | \"expired\"\n | \"expiring\"\n | \"invalid\"\n | \"unknown\";\n\n/** Runtime entitlement authority resolved by a managed or self-hosted backend. */\ninterface RuntimeEntitlement {\n /** Whether the resolved entitlement currently grants product access. */\n active: boolean;\n /** Deployment authority that produced this entitlement. */\n source
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["import type { AgentCapabilities } from \"@ag-ui/core\";\n\nexport type MaybePromise<T> = T | PromiseLike<T>;\n\n/**\n * More specific utility for records with at least one key\n */\nexport type NonEmptyRecord<T> =\n T extends Record<string, unknown>\n ? keyof T extends never\n ? never\n : T\n : never;\n\n/**\n * Type representing an agent's basic information\n */\nexport interface AgentDescription {\n name: string;\n className: string;\n description: string;\n capabilities?: AgentCapabilities;\n}\n\nexport type RuntimeMode = \"sse\" | \"intelligence\";\n\nexport const RUNTIME_MODE_SSE = \"sse\" as const;\nexport const RUNTIME_MODE_INTELLIGENCE = \"intelligence\" as const;\n\nexport interface IntelligenceRuntimeInfo {\n wsUrl: string;\n}\n\nexport interface ThreadEndpointRuntimeInfo {\n list: boolean;\n inspect: boolean;\n mutations: boolean;\n realtimeMetadata: boolean;\n}\n\nexport type RuntimeLicenseStatus =\n | \"valid\"\n | \"none\"\n | \"expired\"\n | \"expiring\"\n | \"invalid\"\n | \"unknown\";\n\n/** Runtime entitlement authority resolved by a managed or self-hosted backend. */\ninterface RuntimeEntitlement {\n /** Whether the resolved entitlement currently grants product access. */\n active: boolean;\n /** Deployment authority that produced this entitlement. */\n source:\n | \"managedOrgSubscription\"\n | \"selfHostedDeploymentLicense\"\n | \"awsMarketplaceDeploymentLicense\";\n /** Boolean feature grants keyed by stable feature id. */\n features: Record<string, boolean>;\n /** Numeric limits keyed by stable feature id. */\n limits: Record<string, number>;\n /** Optional catalog plan code supplied by the entitlement authority. */\n planCode?: string;\n /** Optional lower-level source metadata supplied by the authority. */\n entitlementSource?: string;\n}\n\n/** Public diagnostic returned when Runtime entitlement resolution is not ready. */\ninterface RuntimeEntitlementError {\n /** Stable backend or SDK error code. */\n code: string;\n /** Safe human-readable diagnostic. */\n message: string;\n /** Whether a later resolution attempt may succeed without reconfiguration. */\n retryable: boolean;\n /** Optional originating request correlation id. */\n requestId?: string;\n /** Optional originating trace correlation id. */\n traceId?: string;\n}\n\n/** Successfully resolved Runtime entitlement response. */\ninterface RuntimeEntitlementReadyResponse {\n status: \"ready\";\n entitlement: RuntimeEntitlement;\n error?: never;\n}\n\n/** Structured non-ready Runtime entitlement response. */\ninterface RuntimeEntitlementErrorResponse {\n status: \"degraded\" | \"misconfigured\" | \"unavailable\";\n entitlement?: never;\n error: RuntimeEntitlementError;\n}\n\n/** Final structured Runtime entitlement response exposed through `/info`. */\nexport type RuntimeEntitlementResponse =\n | RuntimeEntitlementReadyResponse\n | RuntimeEntitlementErrorResponse;\n\nexport interface A2UIRuntimeInfo {\n enabled: boolean;\n /**\n * Agent ids the runtime applies A2UI to. When omitted, A2UI applies to\n * every agent served by the runtime.\n */\n agents?: string[];\n}\n\n/** Intelligence resource support available through a single runtime route. */\nexport interface SingleRouteRuntimeInfo {\n /** Whether the runtime accepts resource requests through the single route. */\n resourceOperations: boolean;\n /** Thread features available through the single-route resource bridge. */\n threadEndpoints: ThreadEndpointRuntimeInfo;\n}\n\nexport interface RuntimeInfo {\n version: string;\n agents: Record<string, AgentDescription>;\n audioFileTranscriptionEnabled: boolean;\n mode: RuntimeMode;\n intelligence?: IntelligenceRuntimeInfo;\n threadEndpoints?: ThreadEndpointRuntimeInfo;\n /** Optional capabilities exposed by runtimes that use one HTTP route. */\n singleRoute?: SingleRouteRuntimeInfo;\n /** Whether this runtime exposes trusted inspector metadata. */\n inspectorMetadata?: boolean;\n /** Whether this runtime exposes the debug-authorized Learning snapshot. */\n inspectorLearning?: boolean;\n /**\n * When true, the runtime exposes POST /agent/:agentId/suggest for stateless\n * suggestion generation. Absent on older runtimes; clients fall back to a\n * client-side agent run.\n */\n suggestions?: boolean;\n /**\n * @deprecated Use `a2ui` instead, which preserves per-agent scoping.\n * Kept for backward compatibility with older clients.\n */\n a2uiEnabled?: boolean;\n a2ui?: A2UIRuntimeInfo;\n openGenerativeUIEnabled?: boolean;\n /** Structured Runtime-level entitlement authority, when advertised. */\n runtimeEntitlements?: RuntimeEntitlementResponse;\n /** Legacy compatibility diagnostic retained for older Core/Inspector clients. */\n licenseStatus?: RuntimeLicenseStatus;\n telemetryDisabled?: boolean;\n}\n"],"mappings":";AA0BA,MAAa,mBAAmB;AAChC,MAAa,4BAA4B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/shared",
|
|
3
|
-
"version": "1.70.
|
|
3
|
+
"version": "1.70.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -32,8 +32,19 @@
|
|
|
32
32
|
"import": "./dist/index.mjs",
|
|
33
33
|
"require": "./dist/index.cjs"
|
|
34
34
|
},
|
|
35
|
+
"./telemetry": {
|
|
36
|
+
"import": "./dist/telemetry/index.mjs",
|
|
37
|
+
"require": "./dist/telemetry/index.cjs"
|
|
38
|
+
},
|
|
35
39
|
"./package.json": "./package.json"
|
|
36
40
|
},
|
|
41
|
+
"typesVersions": {
|
|
42
|
+
"*": {
|
|
43
|
+
"telemetry": [
|
|
44
|
+
"./dist/telemetry/index.d.cts"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
37
48
|
"publishConfig": {
|
|
38
49
|
"access": "public"
|
|
39
50
|
},
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { expect, test } from "vitest";
|
|
2
2
|
import { createLicenseContextValue } from "../index";
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
RuntimeEntitlementResponse,
|
|
5
|
+
RuntimeLicenseStatus,
|
|
6
|
+
} from "../utils/types";
|
|
4
7
|
|
|
5
8
|
test("license context fails open when no status is known", () => {
|
|
6
9
|
for (const status of [null, undefined] as const) {
|
|
@@ -162,6 +165,24 @@ test("license context denies features and limits for a ready inactive entitlemen
|
|
|
162
165
|
expect(ctx.getLimit("threads")).toBeNull();
|
|
163
166
|
});
|
|
164
167
|
|
|
168
|
+
test("license context does not fall back for an inactive AWS Marketplace entitlement", () => {
|
|
169
|
+
const marketplaceEntitlements = {
|
|
170
|
+
status: "ready",
|
|
171
|
+
entitlement: {
|
|
172
|
+
active: false,
|
|
173
|
+
source: "awsMarketplaceDeploymentLicense",
|
|
174
|
+
features: {},
|
|
175
|
+
limits: {},
|
|
176
|
+
},
|
|
177
|
+
} as const satisfies RuntimeEntitlementResponse;
|
|
178
|
+
|
|
179
|
+
const ctx = createLicenseContextValue("valid", marketplaceEntitlements);
|
|
180
|
+
|
|
181
|
+
expect(ctx.status).toBe("none");
|
|
182
|
+
expect(ctx.checkFeature("threads")).toBe(false);
|
|
183
|
+
expect(ctx.getLimit("threads")).toBeNull();
|
|
184
|
+
});
|
|
185
|
+
|
|
165
186
|
test.each(["valid", "expiring"] as RuntimeLicenseStatus[])(
|
|
166
187
|
"license context preserves a %s legacy fallback for an inactive self-hosted entitlement",
|
|
167
188
|
(status) => {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `@copilotkit/shared` is imported by browser-facing packages such as
|
|
7
|
+
* `@copilotkit/react-core`. Browser bundlers resolve the whole static module
|
|
8
|
+
* graph before they tree-shake, so a single static edge from this entry to a
|
|
9
|
+
* Node-only package makes every dependent browser build print "Module ... has
|
|
10
|
+
* been externalized for browser compatibility" warnings, even when the
|
|
11
|
+
* consumer never touches the offending code. That was issue #4151, caused by
|
|
12
|
+
* the root entry re-exporting `telemetry/telemetry-client.ts`.
|
|
13
|
+
*
|
|
14
|
+
* Deferring the import does not help: a dynamic import keeps the graph edge.
|
|
15
|
+
* The edge itself has to stay out of this entry. This test walks the static,
|
|
16
|
+
* value-level graph from `src/index.ts` and fails if it reaches a Node-only
|
|
17
|
+
* package. Type-only edges are erased at build time and are therefore fine.
|
|
18
|
+
*/
|
|
19
|
+
const NODE_ONLY_PACKAGES = ["@segment/analytics-node", "node-fetch"];
|
|
20
|
+
|
|
21
|
+
const SRC = resolve(__dirname, "..");
|
|
22
|
+
|
|
23
|
+
function resolveRelative(fromFile: string, specifier: string): string | null {
|
|
24
|
+
const base = join(dirname(fromFile), specifier);
|
|
25
|
+
for (const candidate of [
|
|
26
|
+
`${base}.ts`,
|
|
27
|
+
`${base}.tsx`,
|
|
28
|
+
join(base, "index.ts"),
|
|
29
|
+
base,
|
|
30
|
+
]) {
|
|
31
|
+
if (existsSync(candidate) && !candidate.endsWith("/")) {
|
|
32
|
+
return candidate;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Bare specifiers reachable from `entry` through value (non-type) edges. */
|
|
39
|
+
function collectRuntimeDependencies(entry: string): Set<string> {
|
|
40
|
+
const bare = new Set<string>();
|
|
41
|
+
const seen = new Set<string>();
|
|
42
|
+
const queue = [entry];
|
|
43
|
+
|
|
44
|
+
while (queue.length > 0) {
|
|
45
|
+
const file = queue.pop()!;
|
|
46
|
+
if (seen.has(file)) continue;
|
|
47
|
+
seen.add(file);
|
|
48
|
+
|
|
49
|
+
const source = readFileSync(file, "utf8");
|
|
50
|
+
// `import ... from "x"`, `export ... from "x"`, `import("x")`. The
|
|
51
|
+
// negative lookahead drops `import type` / `export type`, which the
|
|
52
|
+
// compiler erases.
|
|
53
|
+
const pattern =
|
|
54
|
+
/(?:\b(?:import|export)\b(?!\s+type\b)[\s\S]*?\bfrom\s*|\bimport\s*\(\s*)["']([^"']+)["']/g;
|
|
55
|
+
|
|
56
|
+
for (const match of source.matchAll(pattern)) {
|
|
57
|
+
const specifier = match[1];
|
|
58
|
+
if (specifier.startsWith(".")) {
|
|
59
|
+
const target = resolveRelative(file, specifier);
|
|
60
|
+
if (target) queue.push(target);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
bare.add(specifier);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return bare;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
describe("root entry browser safety (#4151)", () => {
|
|
71
|
+
it("does not reach Node-only packages through value imports", () => {
|
|
72
|
+
const reachable = collectRuntimeDependencies(join(SRC, "index.ts"));
|
|
73
|
+
const offenders = NODE_ONLY_PACKAGES.filter((pkg) => reachable.has(pkg));
|
|
74
|
+
expect(offenders).toEqual([]);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("still reaches Node-only packages from the telemetry subpath entry", () => {
|
|
78
|
+
// Guards the test itself: the walker has to be able to see the edge it is
|
|
79
|
+
// asserting the absence of above.
|
|
80
|
+
const reachable = collectRuntimeDependencies(
|
|
81
|
+
join(SRC, "telemetry", "index.ts"),
|
|
82
|
+
);
|
|
83
|
+
expect(reachable).toContain("@segment/analytics-node");
|
|
84
|
+
});
|
|
85
|
+
});
|
package/src/attachments/types.ts
CHANGED
|
@@ -44,6 +44,16 @@ export interface AttachmentsConfig {
|
|
|
44
44
|
accept?: string;
|
|
45
45
|
/** Maximum file size in bytes, default 20MB (20 * 1024 * 1024) */
|
|
46
46
|
maxSize?: number;
|
|
47
|
+
/**
|
|
48
|
+
* How many files may upload at the same time, default 1 — `onUpload` is not
|
|
49
|
+
* called concurrently unless you raise this. Files past the limit wait for a
|
|
50
|
+
* free slot; `Infinity` lifts it. The limit covers everything in flight, so
|
|
51
|
+
* two selections dropped or pasted at once share the slots rather than each
|
|
52
|
+
* taking the full number.
|
|
53
|
+
* Honored by the React `useAttachments` hook — the Vue and Angular bindings
|
|
54
|
+
* still upload serially.
|
|
55
|
+
*/
|
|
56
|
+
maxConcurrentUploads?: number;
|
|
47
57
|
/** Custom upload handler. Return an InputContentSource with optional metadata. */
|
|
48
58
|
onUpload?: (
|
|
49
59
|
file: File,
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export * from "./utils";
|
|
3
3
|
export * from "./constants";
|
|
4
|
-
|
|
4
|
+
// Telemetry is split deliberately. `TelemetryClient` imports
|
|
5
|
+
// `@segment/analytics-node`, which imports `node-fetch`, which imports the
|
|
6
|
+
// Node built-ins `stream`, `http`, `https` and `zlib`. Browser bundlers
|
|
7
|
+
// resolve the whole module graph before they tree-shake, so re-exporting
|
|
8
|
+
// that module here made every browser build of a dependent package print
|
|
9
|
+
// "Module ... has been externalized for browser compatibility" warnings,
|
|
10
|
+
// even when the consumer never touched telemetry (#4151). Only the
|
|
11
|
+
// browser-safe telemetry surface is re-exported from this entry. Server
|
|
12
|
+
// code that needs the client imports it from `@copilotkit/shared/telemetry`.
|
|
13
|
+
// This mirrors the license-verifier note below.
|
|
14
|
+
export { isTelemetryDisabled } from "./telemetry/telemetry-disabled";
|
|
15
|
+
export * from "./telemetry/sampling";
|
|
16
|
+
export {
|
|
17
|
+
firstNonBlankTelemetryId,
|
|
18
|
+
lambdaClient,
|
|
19
|
+
parseTelemetryIdFromLicense,
|
|
20
|
+
parseAndWarnTelemetryId,
|
|
21
|
+
} from "./telemetry/lambda-client";
|
|
22
|
+
export type { LambdaSendOptions } from "./telemetry/lambda-client";
|
|
23
|
+
// Types only: erased at build time, so they add no runtime edge to
|
|
24
|
+
// `telemetry-client.ts` and therefore none to @segment/analytics-node.
|
|
25
|
+
export type {
|
|
26
|
+
TelemetryCapture,
|
|
27
|
+
TelemetryIdentity,
|
|
28
|
+
} from "./telemetry/telemetry-client";
|
|
5
29
|
export * from "./debug";
|
|
6
30
|
export * from "./standard-schema";
|
|
7
31
|
export * from "./attachments";
|
|
@@ -106,7 +130,8 @@ export function createLicenseContextValue(
|
|
|
106
130
|
const activeEntitlement = featureAuthority?.active ? featureAuthority : null;
|
|
107
131
|
const resolvedStatus = activeEntitlement
|
|
108
132
|
? "valid"
|
|
109
|
-
: readyEntitlement?.source === "managedOrgSubscription"
|
|
133
|
+
: readyEntitlement?.source === "managedOrgSubscription" ||
|
|
134
|
+
readyEntitlement?.source === "awsMarketplaceDeploymentLicense"
|
|
110
135
|
? "none"
|
|
111
136
|
: featureAuthority
|
|
112
137
|
? (status ?? "none")
|
|
@@ -8,24 +8,9 @@ import {
|
|
|
8
8
|
parseAndWarnTelemetryId,
|
|
9
9
|
} from "./lambda-client";
|
|
10
10
|
import { computeSamplingMeta, TELEMETRY_EMITTER_V1 } from "./sampling";
|
|
11
|
+
import { isTelemetryDisabled } from "./telemetry-disabled";
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
* Checks if telemetry is disabled via environment variables.
|
|
14
|
-
* Users can opt out by setting:
|
|
15
|
-
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
16
|
-
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
17
|
-
*/
|
|
18
|
-
export function isTelemetryDisabled(): boolean {
|
|
19
|
-
return (
|
|
20
|
-
(process.env as Record<string, string | undefined>)
|
|
21
|
-
.COPILOTKIT_TELEMETRY_DISABLED === "true" ||
|
|
22
|
-
(process.env as Record<string, string | undefined>)
|
|
23
|
-
.COPILOTKIT_TELEMETRY_DISABLED === "1" ||
|
|
24
|
-
(process.env as Record<string, string | undefined>).DO_NOT_TRACK ===
|
|
25
|
-
"true" ||
|
|
26
|
-
(process.env as Record<string, string | undefined>).DO_NOT_TRACK === "1"
|
|
27
|
-
);
|
|
28
|
-
}
|
|
13
|
+
export { isTelemetryDisabled };
|
|
29
14
|
|
|
30
15
|
/** Transport identity and sampling authority resolved for one runtime. */
|
|
31
16
|
export interface TelemetryIdentity {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if telemetry is disabled via environment variables.
|
|
3
|
+
* Users can opt out by setting:
|
|
4
|
+
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
5
|
+
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
6
|
+
*
|
|
7
|
+
* Lives in its own module so that the browser-facing root entry can
|
|
8
|
+
* re-export it without pulling in `telemetry-client.ts`, whose
|
|
9
|
+
* `@segment/analytics-node` import drags Node built-ins into browser
|
|
10
|
+
* bundler module graphs. See the note in `../index.ts`.
|
|
11
|
+
*/
|
|
12
|
+
export function isTelemetryDisabled(): boolean {
|
|
13
|
+
return (
|
|
14
|
+
(process.env as Record<string, string | undefined>)
|
|
15
|
+
.COPILOTKIT_TELEMETRY_DISABLED === "true" ||
|
|
16
|
+
(process.env as Record<string, string | undefined>)
|
|
17
|
+
.COPILOTKIT_TELEMETRY_DISABLED === "1" ||
|
|
18
|
+
(process.env as Record<string, string | undefined>).DO_NOT_TRACK ===
|
|
19
|
+
"true" ||
|
|
20
|
+
(process.env as Record<string, string | undefined>).DO_NOT_TRACK === "1"
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -53,15 +53,15 @@ export function logCopilotKitPlatformMessage() {
|
|
|
53
53
|
console.log(
|
|
54
54
|
`%cCopilotKit Warning%c
|
|
55
55
|
|
|
56
|
-
useCopilotChatHeadless_c provides full compatibility with CopilotKit's newly released Headless UI feature set.
|
|
56
|
+
useCopilotChatHeadless_c provides full compatibility with CopilotKit's newly released Headless UI feature set. Headless UI requires a CopilotKit Intelligence license key, available for free at:
|
|
57
57
|
|
|
58
58
|
%chttps://dashboard.operations.copilotkit.ai%c
|
|
59
59
|
|
|
60
60
|
Alternatively, useCopilotChat is available for basic programmatic control, and does not require a license key.
|
|
61
61
|
|
|
62
|
-
To learn more about
|
|
62
|
+
To learn more about CopilotKit Intelligence, read the documentation here:
|
|
63
63
|
|
|
64
|
-
%chttps://docs.copilotkit.ai/
|
|
64
|
+
%chttps://docs.copilotkit.ai/intelligence/overview%c`,
|
|
65
65
|
ConsoleStyles.header,
|
|
66
66
|
ConsoleStyles.body,
|
|
67
67
|
ConsoleStyles.cta,
|
package/src/utils/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./console-styling";
|
|
|
4
4
|
export * from "./errors";
|
|
5
5
|
export * from "./json-schema";
|
|
6
6
|
export * from "./inspector-metadata";
|
|
7
|
+
export * from "./inspector-learning";
|
|
7
8
|
export * from "./inspector-visibility";
|
|
8
9
|
export * from "./types";
|
|
9
10
|
export * from "./random-id";
|