copilotkit 3.0.1 → 3.0.3
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 +60 -7
- package/index.js +159 -101
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# CopilotKit CLI
|
|
2
2
|
|
|
3
|
-
The CopilotKit CLI scaffolds starter apps
|
|
3
|
+
The CopilotKit CLI scaffolds starter apps, connects project creation to a
|
|
4
|
+
CopilotKit workspace through the Ops/Clerk platform, and manages local CLI
|
|
5
|
+
authentication for CopilotKit Intelligence onboarding.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -30,6 +32,11 @@ copilotkit whoami
|
|
|
30
32
|
|
|
31
33
|
Use `copilotkit docs` to open <https://docs.copilotkit.ai> in your browser. In CI, or when the browser cannot be opened, the CLI prints the URL instead.
|
|
32
34
|
|
|
35
|
+
Use `copilotkit login` when you want to sign in before running workspace-gated
|
|
36
|
+
commands. It stores the local CLI session used by `whoami`, `license`, and the
|
|
37
|
+
`init`/`create` workspace connection; it does not scaffold a project or issue a
|
|
38
|
+
license key by itself.
|
|
39
|
+
|
|
33
40
|
The onboarding commands are:
|
|
34
41
|
|
|
35
42
|
- `copilotkit init`
|
|
@@ -49,6 +56,12 @@ flag is retained as a deprecated no-op for backward compatibility.
|
|
|
49
56
|
|
|
50
57
|
Supported framework values include `langgraph-py`, `langgraph-js`, `mastra`, `pydantic-ai`, `aws-strands-py`, `adk`, `a2a`, `microsoft-agent-framework-dotnet`, `microsoft-agent-framework-py`, `flows`, `llamaindex`, and `agno`.
|
|
51
58
|
|
|
59
|
+
`init` and `create` collect your starter choices, then connect project creation
|
|
60
|
+
to your CopilotKit workspace through Ops/Clerk before scaffolding. If you
|
|
61
|
+
already have a valid CLI session, the CLI reuses that workspace connection;
|
|
62
|
+
otherwise it opens browser sign-in. This workspace connection is required for
|
|
63
|
+
project creation and is separate from license issuance.
|
|
64
|
+
|
|
52
65
|
## Skills And Agent-Assisted Onboarding
|
|
53
66
|
|
|
54
67
|
Use `copilotkit create` to start a **new** project. Use `copilotkit skills onboard`
|
|
@@ -94,11 +107,18 @@ The CLI expects:
|
|
|
94
107
|
- Python 3.10+ for the A2A template.
|
|
95
108
|
- The .NET SDK for the Microsoft Agent Framework .NET template.
|
|
96
109
|
|
|
97
|
-
|
|
110
|
+
Project creation requires a CopilotKit workspace connection through Ops/Clerk
|
|
111
|
+
(browser sign-in when no session exists). Standard framework templates use that
|
|
112
|
+
connection only to authorize creation; they do not request or write a license
|
|
113
|
+
key. Threads-framework templates additionally issue a CopilotKit license key and
|
|
114
|
+
write it into the generated project.
|
|
98
115
|
|
|
99
116
|
## Environment Files
|
|
100
117
|
|
|
101
|
-
The scaffold step copies `.env.example` to `.env` when a template provides one.
|
|
118
|
+
The scaffold step copies `.env.example` to `.env` when a template provides one.
|
|
119
|
+
If the selected starter requires a license, the CLI also ensures
|
|
120
|
+
`COPILOTKIT_LICENSE_TOKEN` is present in `.env`. Standard starters do not receive
|
|
121
|
+
a license token.
|
|
102
122
|
|
|
103
123
|
After creation, add any provider secrets required by the template. Most templates use OpenAI:
|
|
104
124
|
|
|
@@ -145,10 +165,11 @@ copilotkit logs --tail --lines 100
|
|
|
145
165
|
|
|
146
166
|
With no flags, `copilotkit logs` prints the log file path. `--tail` prints recent structured log lines. Add `--verbose` to a CLI command when you need high-signal diagnostics mirrored to stderr during the run.
|
|
147
167
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
168
|
+
Project creation (`init`/`create`) connects to and revalidates the live Clerk
|
|
169
|
+
workspace before scaffolding. License commands, including `license list`,
|
|
170
|
+
revalidate the live Clerk organization before using local auth as needed. If a
|
|
171
|
+
workspace or organization check fails because the cached session is stale, the
|
|
172
|
+
CLI may clear local auth and rerun browser login before continuing.
|
|
152
173
|
|
|
153
174
|
## Telemetry
|
|
154
175
|
|
|
@@ -177,3 +198,35 @@ first-run prompt) is always respected; no events are sent until telemetry is
|
|
|
177
198
|
explicitly re-enabled. `copilotkit telemetry reset` restores the full
|
|
178
199
|
fresh-install state: the decision is forgotten and the one-time notice shows
|
|
179
200
|
again on the next interactive run.
|
|
201
|
+
|
|
202
|
+
## Prerelease builds
|
|
203
|
+
|
|
204
|
+
Tester-facing prerelease builds are produced by CI via `workflow_dispatch` on
|
|
205
|
+
the `pkg-pr-new (cli)` workflow — never built locally (the repo root `.env`
|
|
206
|
+
targets local services, and CI is the reproducible path).
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
gh workflow run "pkg-pr-new (cli)" --ref <feature-branch> \
|
|
210
|
+
-f cli_env=production \
|
|
211
|
+
-f template_ref=<copilotkit-branch> # optional; omit to use main
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
- `cli_env` — endpoint set baked into the binary (`local`, `dev`, `staging`,
|
|
215
|
+
`production`; defaults to `production`).
|
|
216
|
+
- `template_ref` — `CopilotKit/CopilotKit` branch or tag that `init` templates
|
|
217
|
+
and the `_intelligence` overlay are pinned to (the workflow validates it
|
|
218
|
+
exists before building). Empty means `main`. The `ag2`
|
|
219
|
+
template comes from the third-party `ag2ai/ag2-copilotkit-starter` repo and
|
|
220
|
+
is never repinned.
|
|
221
|
+
|
|
222
|
+
Open the workflow run and copy the `npx https://pkg.pr.new/...` command from
|
|
223
|
+
the **job summary**; hand that one-liner to testers. Prerelease binaries
|
|
224
|
+
report `<version>-pre.<shortsha>` from `copilotkit --version`, so a tester's
|
|
225
|
+
build is always identifiable.
|
|
226
|
+
|
|
227
|
+
Pushes and PRs continue to publish `CLI_ENV=local` builds automatically, as
|
|
228
|
+
before.
|
|
229
|
+
|
|
230
|
+
Note: `workflow_dispatch` only works against refs that contain the dispatch
|
|
231
|
+
trigger — branches cut before this workflow landed need a merge from `main`
|
|
232
|
+
first.
|
package/index.js
CHANGED
|
@@ -40,6 +40,69 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
40
40
|
mod
|
|
41
41
|
));
|
|
42
42
|
|
|
43
|
+
// apps/cli/src/config.ts
|
|
44
|
+
var config_exports = {};
|
|
45
|
+
__export(config_exports, {
|
|
46
|
+
getBuildInfo: () => getBuildInfo,
|
|
47
|
+
getC15tBackendUrl: () => getC15tBackendUrl,
|
|
48
|
+
getOpsApiUrl: () => getOpsApiUrl,
|
|
49
|
+
getOpsFrontendUrl: () => getOpsFrontendUrl,
|
|
50
|
+
getPrivacyPolicyUrl: () => getPrivacyPolicyUrl,
|
|
51
|
+
getPrivacyPolicyVersion: () => getPrivacyPolicyVersion,
|
|
52
|
+
getTelemetryEndpointUrl: () => getTelemetryEndpointUrl,
|
|
53
|
+
getTemplateRef: () => getTemplateRef,
|
|
54
|
+
setOpsApiUrl: () => setOpsApiUrl,
|
|
55
|
+
setOpsFrontendUrl: () => setOpsFrontendUrl
|
|
56
|
+
});
|
|
57
|
+
function getOpsApiUrl() {
|
|
58
|
+
return opsApiUrlOverride ?? "https://api.operations.copilotkit.ai";
|
|
59
|
+
}
|
|
60
|
+
function setOpsApiUrl(url2) {
|
|
61
|
+
opsApiUrlOverride = url2;
|
|
62
|
+
}
|
|
63
|
+
function getOpsFrontendUrl() {
|
|
64
|
+
return opsFrontendUrlOverride ?? "https://dashboard.operations.copilotkit.ai";
|
|
65
|
+
}
|
|
66
|
+
function setOpsFrontendUrl(url2) {
|
|
67
|
+
opsFrontendUrlOverride = url2;
|
|
68
|
+
}
|
|
69
|
+
function getTelemetryEndpointUrl() {
|
|
70
|
+
const override = process.env["COPILOTKIT_TELEMETRY_ENDPOINT"]?.trim();
|
|
71
|
+
if (override) {
|
|
72
|
+
return override;
|
|
73
|
+
}
|
|
74
|
+
return true ? "https://telemetry.copilotkit.ai/ingest" : "https://telemetry.copilotkit.ai/ingest";
|
|
75
|
+
}
|
|
76
|
+
function getBuildInfo() {
|
|
77
|
+
return {
|
|
78
|
+
version: true ? "3.0.3" : "dev",
|
|
79
|
+
buildNumber: true ? "27069185263" : "dev",
|
|
80
|
+
commitSha: true ? "e755d181d0cbfbf5b6efb885b2a9f14425ebc187" : "dev"
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function getTemplateRef() {
|
|
84
|
+
return true ? "main" : "main";
|
|
85
|
+
}
|
|
86
|
+
function getC15tBackendUrl() {
|
|
87
|
+
return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
|
|
88
|
+
}
|
|
89
|
+
function getPrivacyPolicyUrl() {
|
|
90
|
+
return PRIVACY_POLICY_URL;
|
|
91
|
+
}
|
|
92
|
+
function getPrivacyPolicyVersion() {
|
|
93
|
+
return PRIVACY_POLICY_VERSION;
|
|
94
|
+
}
|
|
95
|
+
var opsApiUrlOverride, opsFrontendUrlOverride, PRIVACY_POLICY_URL, PRIVACY_POLICY_VERSION;
|
|
96
|
+
var init_config = __esm({
|
|
97
|
+
"apps/cli/src/config.ts"() {
|
|
98
|
+
"use strict";
|
|
99
|
+
opsApiUrlOverride = null;
|
|
100
|
+
opsFrontendUrlOverride = null;
|
|
101
|
+
PRIVACY_POLICY_URL = "https://www.copilotkit.ai/privacy-policy";
|
|
102
|
+
PRIVACY_POLICY_VERSION = "2026-06-04";
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
43
106
|
// apps/cli/src/services/agentcore-config.ts
|
|
44
107
|
import * as fs from "node:fs";
|
|
45
108
|
import * as path from "node:path";
|
|
@@ -223,6 +286,14 @@ function isAgentFramework(value) {
|
|
|
223
286
|
function formatInvalidFrameworkError(value) {
|
|
224
287
|
return `Unsupported framework "${value}". Expected one of: ${AGENT_FRAMEWORKS.join(", ")}.`;
|
|
225
288
|
}
|
|
289
|
+
function ckTemplate(examplePath, ref = getTemplateRef()) {
|
|
290
|
+
return {
|
|
291
|
+
owner: "CopilotKit",
|
|
292
|
+
repo: "CopilotKit",
|
|
293
|
+
branch: ref,
|
|
294
|
+
path: examplePath
|
|
295
|
+
};
|
|
296
|
+
}
|
|
226
297
|
function standardTemplate(framework, template, successEmoji) {
|
|
227
298
|
const pythonUvTemplates = /* @__PURE__ */ new Set([
|
|
228
299
|
"langgraph-py",
|
|
@@ -286,10 +357,11 @@ function formatIntelligenceUnavailableError(framework) {
|
|
|
286
357
|
...THREADS_FRAMEWORKS
|
|
287
358
|
].join(", ")}.`;
|
|
288
359
|
}
|
|
289
|
-
var AGENT_FRAMEWORKS, FRAMEWORK_ALIASES, FRAMEWORK_EMOJI, FRAMEWORK_CHOICES, AG2_TEMPLATE_SOURCE,
|
|
360
|
+
var AGENT_FRAMEWORKS, FRAMEWORK_ALIASES, FRAMEWORK_EMOJI, FRAMEWORK_CHOICES, AG2_TEMPLATE_SOURCE, COPILOTKIT_LANGGRAPH_PYTHON_TEMPLATE, COPILOTKIT_AGENTCORE_TEMPLATE, TEMPLATE_REPOS, UV_PREREQUISITE, DOCKER_PREREQUISITE, DOTNET_PREREQUISITE, PYTHON3_PREREQUISITE, OPENAI_ENV_KEY, GOOGLE_ENV_KEY, COPILOTKIT_LICENSE_ENV_KEY, FRAMEWORK_TEMPLATES, THREADS_FRAMEWORKS;
|
|
290
361
|
var init_types = __esm({
|
|
291
362
|
"apps/cli/src/types.ts"() {
|
|
292
363
|
"use strict";
|
|
364
|
+
init_config();
|
|
293
365
|
init_agentcore_config();
|
|
294
366
|
init_showcase_config();
|
|
295
367
|
init_event_properties();
|
|
@@ -323,18 +395,18 @@ var init_types = __esm({
|
|
|
323
395
|
mastra: "\u{1F311}",
|
|
324
396
|
"pydantic-ai": "\u{1F53C}",
|
|
325
397
|
llamaindex: "\u{1F999}",
|
|
326
|
-
agno: "\u{
|
|
398
|
+
agno: "\u{1F9E0}",
|
|
327
399
|
ag2: "\u{1F916}",
|
|
328
400
|
adk: "\u{1F916}",
|
|
329
401
|
a2a: "\u{1F916}",
|
|
330
402
|
"aws-strands-py": "\u{1F9EC}",
|
|
331
403
|
"microsoft-agent-framework-dotnet": "\u{1F7E6}",
|
|
332
404
|
"microsoft-agent-framework-py": "\u{1F7E6}",
|
|
333
|
-
"mcp-apps": "\
|
|
334
|
-
"agentcore-langgraph": "\
|
|
335
|
-
"agentcore-strands": "\
|
|
405
|
+
"mcp-apps": "\u{1F9E9}",
|
|
406
|
+
"agentcore-langgraph": "\u26C5",
|
|
407
|
+
"agentcore-strands": "\u26C5",
|
|
336
408
|
a2ui: "\u{1F3A8}",
|
|
337
|
-
opengenui: "\
|
|
409
|
+
opengenui: "\u2728"
|
|
338
410
|
};
|
|
339
411
|
FRAMEWORK_CHOICES = [
|
|
340
412
|
{
|
|
@@ -389,27 +461,35 @@ var init_types = __esm({
|
|
|
389
461
|
branch: "main",
|
|
390
462
|
path: ""
|
|
391
463
|
};
|
|
392
|
-
|
|
393
|
-
|
|
464
|
+
COPILOTKIT_LANGGRAPH_PYTHON_TEMPLATE = ckTemplate(
|
|
465
|
+
"examples/integrations/langgraph-python"
|
|
466
|
+
);
|
|
467
|
+
COPILOTKIT_AGENTCORE_TEMPLATE = ckTemplate(
|
|
468
|
+
"examples/integrations/agentcore"
|
|
469
|
+
);
|
|
394
470
|
TEMPLATE_REPOS = {
|
|
395
|
-
"langgraph-py":
|
|
396
|
-
"langgraph-js": "
|
|
397
|
-
mastra: "
|
|
398
|
-
flows: "
|
|
399
|
-
llamaindex: "
|
|
400
|
-
agno: "
|
|
401
|
-
"pydantic-ai": "
|
|
471
|
+
"langgraph-py": COPILOTKIT_LANGGRAPH_PYTHON_TEMPLATE,
|
|
472
|
+
"langgraph-js": ckTemplate("examples/integrations/langgraph-js"),
|
|
473
|
+
mastra: ckTemplate("examples/integrations/mastra"),
|
|
474
|
+
flows: ckTemplate("examples/integrations/crewai-flows"),
|
|
475
|
+
llamaindex: ckTemplate("examples/integrations/llamaindex"),
|
|
476
|
+
agno: ckTemplate("examples/integrations/agno"),
|
|
477
|
+
"pydantic-ai": ckTemplate("examples/integrations/pydantic-ai"),
|
|
402
478
|
ag2: AG2_TEMPLATE_SOURCE,
|
|
403
|
-
adk: "
|
|
404
|
-
"aws-strands-py": "
|
|
405
|
-
a2a: "
|
|
406
|
-
"microsoft-agent-framework-dotnet":
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
"
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
479
|
+
adk: ckTemplate("examples/integrations/adk"),
|
|
480
|
+
"aws-strands-py": ckTemplate("examples/integrations/strands-python"),
|
|
481
|
+
a2a: ckTemplate("examples/integrations/a2a-middleware"),
|
|
482
|
+
"microsoft-agent-framework-dotnet": ckTemplate(
|
|
483
|
+
"examples/integrations/ms-agent-framework-dotnet"
|
|
484
|
+
),
|
|
485
|
+
"microsoft-agent-framework-py": ckTemplate(
|
|
486
|
+
"examples/integrations/ms-agent-framework-python"
|
|
487
|
+
),
|
|
488
|
+
"mcp-apps": ckTemplate("examples/integrations/mcp-apps"),
|
|
489
|
+
"agentcore-langgraph": COPILOTKIT_AGENTCORE_TEMPLATE,
|
|
490
|
+
"agentcore-strands": COPILOTKIT_AGENTCORE_TEMPLATE,
|
|
491
|
+
a2ui: COPILOTKIT_LANGGRAPH_PYTHON_TEMPLATE,
|
|
492
|
+
opengenui: COPILOTKIT_LANGGRAPH_PYTHON_TEMPLATE
|
|
413
493
|
};
|
|
414
494
|
UV_PREREQUISITE = {
|
|
415
495
|
command: "uv",
|
|
@@ -711,65 +791,6 @@ var init_event_properties = __esm({
|
|
|
711
791
|
}
|
|
712
792
|
});
|
|
713
793
|
|
|
714
|
-
// apps/cli/src/config.ts
|
|
715
|
-
var config_exports = {};
|
|
716
|
-
__export(config_exports, {
|
|
717
|
-
getBuildInfo: () => getBuildInfo,
|
|
718
|
-
getC15tBackendUrl: () => getC15tBackendUrl,
|
|
719
|
-
getOpsApiUrl: () => getOpsApiUrl,
|
|
720
|
-
getOpsFrontendUrl: () => getOpsFrontendUrl,
|
|
721
|
-
getPrivacyPolicyUrl: () => getPrivacyPolicyUrl,
|
|
722
|
-
getPrivacyPolicyVersion: () => getPrivacyPolicyVersion,
|
|
723
|
-
getTelemetryEndpointUrl: () => getTelemetryEndpointUrl,
|
|
724
|
-
setOpsApiUrl: () => setOpsApiUrl,
|
|
725
|
-
setOpsFrontendUrl: () => setOpsFrontendUrl
|
|
726
|
-
});
|
|
727
|
-
function getOpsApiUrl() {
|
|
728
|
-
return opsApiUrlOverride ?? "https://api.operations.copilotkit.ai";
|
|
729
|
-
}
|
|
730
|
-
function setOpsApiUrl(url2) {
|
|
731
|
-
opsApiUrlOverride = url2;
|
|
732
|
-
}
|
|
733
|
-
function getOpsFrontendUrl() {
|
|
734
|
-
return opsFrontendUrlOverride ?? "https://dashboard.operations.copilotkit.ai";
|
|
735
|
-
}
|
|
736
|
-
function setOpsFrontendUrl(url2) {
|
|
737
|
-
opsFrontendUrlOverride = url2;
|
|
738
|
-
}
|
|
739
|
-
function getTelemetryEndpointUrl() {
|
|
740
|
-
const override = process.env["COPILOTKIT_TELEMETRY_ENDPOINT"]?.trim();
|
|
741
|
-
if (override) {
|
|
742
|
-
return override;
|
|
743
|
-
}
|
|
744
|
-
return true ? "https://telemetry.copilotkit.ai/ingest" : "https://telemetry.copilotkit.ai/ingest";
|
|
745
|
-
}
|
|
746
|
-
function getBuildInfo() {
|
|
747
|
-
return {
|
|
748
|
-
version: true ? "3.0.1" : "dev",
|
|
749
|
-
buildNumber: true ? "27023475022" : "dev",
|
|
750
|
-
commitSha: true ? "12b5e551b94b97bdc29f9345eed689a8abc63837" : "dev"
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
function getC15tBackendUrl() {
|
|
754
|
-
return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
|
|
755
|
-
}
|
|
756
|
-
function getPrivacyPolicyUrl() {
|
|
757
|
-
return PRIVACY_POLICY_URL;
|
|
758
|
-
}
|
|
759
|
-
function getPrivacyPolicyVersion() {
|
|
760
|
-
return PRIVACY_POLICY_VERSION;
|
|
761
|
-
}
|
|
762
|
-
var opsApiUrlOverride, opsFrontendUrlOverride, PRIVACY_POLICY_URL, PRIVACY_POLICY_VERSION;
|
|
763
|
-
var init_config = __esm({
|
|
764
|
-
"apps/cli/src/config.ts"() {
|
|
765
|
-
"use strict";
|
|
766
|
-
opsApiUrlOverride = null;
|
|
767
|
-
opsFrontendUrlOverride = null;
|
|
768
|
-
PRIVACY_POLICY_URL = "https://www.copilotkit.ai/privacy-policy";
|
|
769
|
-
PRIVACY_POLICY_VERSION = "2026-06-04";
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
|
|
773
794
|
// node_modules/.pnpm/dot-prop@10.1.0/node_modules/dot-prop/index.js
|
|
774
795
|
function shouldCoerceToNumber(segment) {
|
|
775
796
|
if (segment === "0") {
|
|
@@ -90099,6 +90120,10 @@ async function login(options = {}) {
|
|
|
90099
90120
|
...isCliAuthDiagnosticsVerboseEnabled() ? { verbose: "1" } : {},
|
|
90100
90121
|
...posthogDistinctId !== null ? { posthog_distinct_id: posthogDistinctId } : {}
|
|
90101
90122
|
});
|
|
90123
|
+
if (options.authHandoff) {
|
|
90124
|
+
loginParams.set("source", options.authHandoff.source);
|
|
90125
|
+
loginParams.set("mode", options.authHandoff.mode);
|
|
90126
|
+
}
|
|
90102
90127
|
const loginUrl = `${getOpsFrontendUrl()}/cli-auth?${loginParams.toString()}`;
|
|
90103
90128
|
diagnostics.logPhase("login.browser-url-prepared", {
|
|
90104
90129
|
callback: summarizeCallbackUrl(callbackUrl),
|
|
@@ -90983,7 +91008,9 @@ function useBrowserLogin() {
|
|
|
90983
91008
|
}
|
|
90984
91009
|
return context;
|
|
90985
91010
|
}
|
|
90986
|
-
function BrowserLoginConfirmation(
|
|
91011
|
+
function BrowserLoginConfirmation({
|
|
91012
|
+
reason
|
|
91013
|
+
} = {}) {
|
|
90987
91014
|
const { state, confirmBrowserLoginStart, submitManualClerkToken } = useBrowserLogin();
|
|
90988
91015
|
const [manualTokenInput, setManualTokenInput] = (0, import_react35.useState)("");
|
|
90989
91016
|
use_input_default((_input, key) => {
|
|
@@ -90996,6 +91023,7 @@ function BrowserLoginConfirmation() {
|
|
|
90996
91023
|
}
|
|
90997
91024
|
if (state.phase === "confirming") {
|
|
90998
91025
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
91026
|
+
reason ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: reason }) }) : null,
|
|
90999
91027
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: BROWSER_LOGIN_CONFIRMATION_MESSAGE }),
|
|
91000
91028
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: BROWSER_LOGIN_CONFIRMATION_PROMPT })
|
|
91001
91029
|
] });
|
|
@@ -91115,12 +91143,21 @@ async function scaffoldProject(options) {
|
|
|
91115
91143
|
};
|
|
91116
91144
|
await cloneTemplate(source, projectDir);
|
|
91117
91145
|
}
|
|
91118
|
-
|
|
91119
|
-
|
|
91146
|
+
function getIntelligenceOverlaySource(ref = getTemplateRef()) {
|
|
91147
|
+
return {
|
|
91120
91148
|
owner: "CopilotKit",
|
|
91121
91149
|
repo: "CopilotKit",
|
|
91122
|
-
branch:
|
|
91123
|
-
|
|
91150
|
+
branch: ref,
|
|
91151
|
+
path: "examples/integrations/_intelligence"
|
|
91152
|
+
};
|
|
91153
|
+
}
|
|
91154
|
+
async function fetchIntelligenceOverlay() {
|
|
91155
|
+
const overlay = getIntelligenceOverlaySource();
|
|
91156
|
+
const source = {
|
|
91157
|
+
owner: overlay.owner,
|
|
91158
|
+
repo: overlay.repo,
|
|
91159
|
+
branch: overlay.branch,
|
|
91160
|
+
subdirectoryPath: overlay.path
|
|
91124
91161
|
};
|
|
91125
91162
|
const overlayDir = fs13.mkdtempSync(
|
|
91126
91163
|
path9.join(os6.tmpdir(), "copilotkit-overlay-")
|
|
@@ -91288,6 +91325,7 @@ var LICENSE_TOKEN_LINE_RE;
|
|
|
91288
91325
|
var init_project_scaffold = __esm({
|
|
91289
91326
|
"apps/cli/src/services/project-scaffold.ts"() {
|
|
91290
91327
|
"use strict";
|
|
91328
|
+
init_config();
|
|
91291
91329
|
init_event_properties();
|
|
91292
91330
|
LICENSE_TOKEN_LINE_RE = /^[ \t]*(?:export\s+)?COPILOTKIT_LICENSE_TOKEN=.*$/m;
|
|
91293
91331
|
}
|
|
@@ -91365,6 +91403,7 @@ var init_license_delivery = __esm({
|
|
|
91365
91403
|
// apps/cli/src/commands/license.tsx
|
|
91366
91404
|
var license_exports = {};
|
|
91367
91405
|
__export(license_exports, {
|
|
91406
|
+
LICENSE_AUTH_REASON: () => LICENSE_AUTH_REASON,
|
|
91368
91407
|
runLicense: () => runLicense,
|
|
91369
91408
|
shouldRenderLicenseCreateBrowserLoginConfirmation: () => shouldRenderLicenseCreateBrowserLoginConfirmation
|
|
91370
91409
|
});
|
|
@@ -91521,10 +91560,14 @@ function LicenseCreateApp({ onIssued }) {
|
|
|
91521
91560
|
};
|
|
91522
91561
|
}, [browserLogin.runLogin, onIssued, exit]);
|
|
91523
91562
|
if (shouldRenderLicenseCreateBrowserLoginConfirmation(browserLogin.state.phase)) {
|
|
91524
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BrowserLoginConfirmation, {});
|
|
91563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BrowserLoginConfirmation, { reason: LICENSE_AUTH_REASON });
|
|
91525
91564
|
}
|
|
91526
91565
|
if (phase === "auth") {
|
|
91527
91566
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
91567
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
91568
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: LICENSE_AUTH_REASON }),
|
|
91569
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: "Sign in with your browser to continue." })
|
|
91570
|
+
] }),
|
|
91528
91571
|
authMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: authMessage }) : null,
|
|
91529
91572
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, { label: "Verifying authentication\u2026" })
|
|
91530
91573
|
] });
|
|
@@ -91590,7 +91633,7 @@ async function runLicense(command) {
|
|
|
91590
91633
|
writeStderr: (text) => process.stderr.write(text)
|
|
91591
91634
|
});
|
|
91592
91635
|
}
|
|
91593
|
-
var import_react36, import_jsx_runtime5;
|
|
91636
|
+
var import_react36, import_jsx_runtime5, LICENSE_AUTH_REASON;
|
|
91594
91637
|
var init_license = __esm({
|
|
91595
91638
|
async "apps/cli/src/commands/license.tsx"() {
|
|
91596
91639
|
"use strict";
|
|
@@ -91606,6 +91649,7 @@ var init_license = __esm({
|
|
|
91606
91649
|
init_project_scaffold();
|
|
91607
91650
|
init_license_delivery();
|
|
91608
91651
|
import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
91652
|
+
LICENSE_AUTH_REASON = "A CopilotKit Intelligence license unlocks Threads and other licensed features. Sign in to issue a free license key for this project.";
|
|
91609
91653
|
}
|
|
91610
91654
|
});
|
|
91611
91655
|
|
|
@@ -91765,6 +91809,7 @@ var init_banner = __esm({
|
|
|
91765
91809
|
// apps/cli/src/commands/skills.tsx
|
|
91766
91810
|
var skills_exports = {};
|
|
91767
91811
|
__export(skills_exports, {
|
|
91812
|
+
SKILLS_AUTH_REASON: () => SKILLS_AUTH_REASON,
|
|
91768
91813
|
SkillsOnboardApp: () => SkillsOnboardApp,
|
|
91769
91814
|
runSkills: () => runSkills
|
|
91770
91815
|
});
|
|
@@ -91849,7 +91894,7 @@ function SkillsOnboardApp({
|
|
|
91849
91894
|
}
|
|
91850
91895
|
}, [step, exit]);
|
|
91851
91896
|
if (step === "authenticating" && shouldRenderBrowserLogin(browserLoginState.phase)) {
|
|
91852
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BrowserLoginConfirmation, {});
|
|
91897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BrowserLoginConfirmation, { reason: SKILLS_AUTH_REASON });
|
|
91853
91898
|
}
|
|
91854
91899
|
if (step === "authenticating") {
|
|
91855
91900
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
@@ -91893,7 +91938,7 @@ async function runSkills(flags) {
|
|
|
91893
91938
|
);
|
|
91894
91939
|
await waitUntilExit();
|
|
91895
91940
|
}
|
|
91896
|
-
var import_react37, import_jsx_runtime7, defaultOnboardDeps;
|
|
91941
|
+
var import_react37, import_jsx_runtime7, SKILLS_AUTH_REASON, defaultOnboardDeps;
|
|
91897
91942
|
var init_skills = __esm({
|
|
91898
91943
|
async "apps/cli/src/commands/skills.tsx"() {
|
|
91899
91944
|
"use strict";
|
|
@@ -91907,6 +91952,7 @@ var init_skills = __esm({
|
|
|
91907
91952
|
await init_browser_login();
|
|
91908
91953
|
await init_spinner();
|
|
91909
91954
|
import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
91955
|
+
SKILLS_AUTH_REASON = "A free CopilotKit account is required for agent-assisted onboarding.";
|
|
91910
91956
|
defaultOnboardDeps = {
|
|
91911
91957
|
verifyAndRefresh,
|
|
91912
91958
|
copyToClipboard,
|
|
@@ -92439,6 +92485,8 @@ var init_init_flow = __esm({
|
|
|
92439
92485
|
// apps/cli/src/commands/init.tsx
|
|
92440
92486
|
var init_exports = {};
|
|
92441
92487
|
__export(init_exports, {
|
|
92488
|
+
INIT_AUTH_REASON_ACCOUNT_ONLY: () => INIT_AUTH_REASON_ACCOUNT_ONLY,
|
|
92489
|
+
INIT_AUTH_REASON_WITH_LICENSE: () => INIT_AUTH_REASON_WITH_LICENSE,
|
|
92442
92490
|
InitApp: () => InitApp,
|
|
92443
92491
|
buildInitNextSteps: () => buildInitNextSteps,
|
|
92444
92492
|
commandExists: () => commandExists,
|
|
@@ -92529,7 +92577,7 @@ async function ensureCliToken2(dependencies, onTerminalSessionInvalidation, onBr
|
|
|
92529
92577
|
openedBrowser = true;
|
|
92530
92578
|
onBrowserOpened?.();
|
|
92531
92579
|
}
|
|
92532
|
-
await dependencies.login();
|
|
92580
|
+
await dependencies.login({ authHandoff: PROJECT_CREATION_AUTH_HANDOFF });
|
|
92533
92581
|
};
|
|
92534
92582
|
try {
|
|
92535
92583
|
session = await dependencies.verifyAndRefresh(
|
|
@@ -92764,15 +92812,16 @@ function ScaffoldProgress({ options, telemetry }) {
|
|
|
92764
92812
|
cancelled = true;
|
|
92765
92813
|
};
|
|
92766
92814
|
}, [options, scaffoldDependencies, telemetry]);
|
|
92815
|
+
const authReason = templateDefinition.provisionLicense ? INIT_AUTH_REASON_WITH_LICENSE : INIT_AUTH_REASON_ACCOUNT_ONLY;
|
|
92767
92816
|
if (shouldRenderInitBrowserLoginConfirmation(browserLogin.state.phase)) {
|
|
92768
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BrowserLoginConfirmation, {});
|
|
92817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BrowserLoginConfirmation, { reason: authReason });
|
|
92769
92818
|
}
|
|
92770
92819
|
if (phase === "auth") {
|
|
92771
92820
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
92772
|
-
|
|
92773
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { children:
|
|
92821
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
92822
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { children: authReason }),
|
|
92774
92823
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: "gray", children: "Sign in with your browser to continue." })
|
|
92775
|
-
] })
|
|
92824
|
+
] }),
|
|
92776
92825
|
authMessage ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: "yellow", children: authMessage }) : null,
|
|
92777
92826
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, { label: "\u{1FA81} Verifying authentication\u2026" })
|
|
92778
92827
|
] });
|
|
@@ -92911,7 +92960,7 @@ async function runInit(flags, callbacks) {
|
|
|
92911
92960
|
);
|
|
92912
92961
|
await waitUntilExit();
|
|
92913
92962
|
}
|
|
92914
|
-
var import_react39, import_jsx_runtime9, defaultInitScaffoldDependencies;
|
|
92963
|
+
var import_react39, import_jsx_runtime9, PROJECT_CREATION_AUTH_HANDOFF, INIT_AUTH_REASON_WITH_LICENSE, INIT_AUTH_REASON_ACCOUNT_ONLY, defaultInitScaffoldDependencies;
|
|
92915
92964
|
var init_init = __esm({
|
|
92916
92965
|
async "apps/cli/src/commands/init.tsx"() {
|
|
92917
92966
|
"use strict";
|
|
@@ -92932,6 +92981,12 @@ var init_init = __esm({
|
|
|
92932
92981
|
await init_spinner();
|
|
92933
92982
|
init_config();
|
|
92934
92983
|
import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
92984
|
+
PROJECT_CREATION_AUTH_HANDOFF = {
|
|
92985
|
+
source: "cli",
|
|
92986
|
+
mode: "project_creation"
|
|
92987
|
+
};
|
|
92988
|
+
INIT_AUTH_REASON_WITH_LICENSE = "Threads and other Intelligence features need a free license, which is issued to your CopilotKit account.";
|
|
92989
|
+
INIT_AUTH_REASON_ACCOUNT_ONLY = "A free CopilotKit account is required to link this project.";
|
|
92935
92990
|
defaultInitScaffoldDependencies = {
|
|
92936
92991
|
verifyAndRefresh,
|
|
92937
92992
|
login,
|
|
@@ -93469,7 +93524,7 @@ Commands:
|
|
|
93469
93524
|
logout Clear local authentication
|
|
93470
93525
|
whoami Show current authentication status
|
|
93471
93526
|
docs Open CopilotKit documentation
|
|
93472
|
-
init [options] Initialize a
|
|
93527
|
+
init [options] Initialize a project and connect a workspace
|
|
93473
93528
|
create [options] Alias of init
|
|
93474
93529
|
logs [options] Show the CLI log path or recent log lines
|
|
93475
93530
|
license Issue a CopilotKit license key
|
|
@@ -93530,7 +93585,10 @@ Options:
|
|
|
93530
93585
|
init: `Usage: copilotkit init [options]
|
|
93531
93586
|
copilotkit create [options]
|
|
93532
93587
|
|
|
93533
|
-
Initialize a new CopilotKit project
|
|
93588
|
+
Initialize a new CopilotKit project and connect it to a CopilotKit workspace
|
|
93589
|
+
through Ops/Clerk before scaffolding. Reuses an existing CLI session or opens
|
|
93590
|
+
browser sign-in when needed. License tokens are issued and written only for
|
|
93591
|
+
starters that require a license.
|
|
93534
93592
|
|
|
93535
93593
|
Aliases:
|
|
93536
93594
|
create Alias of init
|