copilotkit 4.7.0 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/cli-build-info.json +7 -7
- package/index.js +600 -22
- package/package.json +1 -1
- package/release/release-tool.js +1 -1
package/README.md
CHANGED
|
@@ -77,7 +77,17 @@ persistence, insights), and `init` provisions a free license automatically —
|
|
|
77
77
|
you sign in with your browser during scaffolding. The `-i`/`--intelligence`
|
|
78
78
|
flag is retained as a deprecated no-op for backward compatibility.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Rather than maintaining the list of framework values here, ask the CLI:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
copilotkit framework list
|
|
84
|
+
copilotkit framework list --json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
It reports every value `-f` accepts, the language each framework's agent is
|
|
88
|
+
written in, and which init flags that framework supports — `-i`, `--mock`, and
|
|
89
|
+
`--channel` are each accepted only for some. It answers from a catalog compiled into the
|
|
90
|
+
binary, so it needs no API call, no authentication, and no TTY.
|
|
81
91
|
|
|
82
92
|
`init` and `create` collect your starter choices, then connect project creation
|
|
83
93
|
to your CopilotKit workspace through Ops/Clerk before scaffolding. If you
|
|
@@ -104,8 +114,15 @@ copilotkit channels status
|
|
|
104
114
|
copilotkit channels list
|
|
105
115
|
copilotkit channels rotate support --adapter slack
|
|
106
116
|
copilotkit channels setup
|
|
117
|
+
copilotkit channels providers
|
|
107
118
|
```
|
|
108
119
|
|
|
120
|
+
`channels providers` lists the chat providers a Channel can use and the
|
|
121
|
+
credentials each one asks for, named as that provider's own console names them.
|
|
122
|
+
Unlike every other `channels` subcommand it answers from a compiled-in catalog, so
|
|
123
|
+
it needs no selected project, no credentials, and no API call. Note it is distinct
|
|
124
|
+
from `channels list`, which reports the Channels that exist in _your_ project.
|
|
125
|
+
|
|
109
126
|
This configures **managed Intelligence Channels**. It does not configure the
|
|
110
127
|
open-source `@copilotkit/channels` adapter packages, which are a separate product
|
|
111
128
|
that shares the words "channels" and "Slack".
|
package/cli-build-info.json
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "copilotkit",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.8.1"
|
|
6
6
|
},
|
|
7
7
|
"intelligence": {
|
|
8
|
-
"commit": "
|
|
8
|
+
"commit": "7e4dbf17af5094cde256eeaecdbef1869ebd13e4"
|
|
9
9
|
},
|
|
10
10
|
"copilotKit": {
|
|
11
|
-
"submittedInput": "
|
|
12
|
-
"commit": "
|
|
11
|
+
"submittedInput": "7e502dd4a452",
|
|
12
|
+
"commit": "7e502dd4a452feee7d26c6355fd262948f8c25e6"
|
|
13
13
|
},
|
|
14
14
|
"channel": "production",
|
|
15
15
|
"triggeringActor": "BenTaylorDev",
|
|
16
16
|
"workflow": {
|
|
17
|
-
"runId": "
|
|
18
|
-
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/
|
|
17
|
+
"runId": "31032635990",
|
|
18
|
+
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/31032635990"
|
|
19
19
|
},
|
|
20
20
|
"validationResult": "passed",
|
|
21
21
|
"ag2": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"revision": "main",
|
|
25
25
|
"pinned": false
|
|
26
26
|
},
|
|
27
|
-
"builtAt": "2026-08-
|
|
27
|
+
"builtAt": "2026-08-05T18:01:39Z"
|
|
28
28
|
}
|
package/index.js
CHANGED
|
@@ -87,14 +87,14 @@ function getTelemetryEndpointUrl() {
|
|
|
87
87
|
}
|
|
88
88
|
function getBuildInfo() {
|
|
89
89
|
return {
|
|
90
|
-
version: true ? "4.
|
|
91
|
-
buildNumber: true ? "
|
|
92
|
-
commitSha: true ? "
|
|
90
|
+
version: true ? "4.8.1" : "dev",
|
|
91
|
+
buildNumber: true ? "31032635990" : "dev",
|
|
92
|
+
commitSha: true ? "7e4dbf17af5094cde256eeaecdbef1869ebd13e4" : "dev",
|
|
93
93
|
copilotKitCommit: getTemplateRef()
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
function getTemplateRef() {
|
|
97
|
-
return true ? "
|
|
97
|
+
return true ? "7e502dd4a452feee7d26c6355fd262948f8c25e6" : "main";
|
|
98
98
|
}
|
|
99
99
|
function getC15tBackendUrl() {
|
|
100
100
|
return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
|
|
@@ -460,7 +460,7 @@ function formatIntelligenceUnavailableError(framework) {
|
|
|
460
460
|
...THREADS_FRAMEWORKS
|
|
461
461
|
].join(", ")}.`;
|
|
462
462
|
}
|
|
463
|
-
var AGENT_FRAMEWORKS, FRAMEWORK_ALIASES, FRAMEWORK_EMOJI, FRAMEWORK_CHOICES, TEMPLATE_REPOS, UV_PREREQUISITE, DOTNET_PREREQUISITE, PYTHON3_PREREQUISITE, OPENAI_ENV_KEY, ANTHROPIC_ENV_KEY, GOOGLE_ENV_KEY, COPILOTKIT_LICENSE_ENV_KEY, FRAMEWORK_TEMPLATES, THREADS_FRAMEWORKS;
|
|
463
|
+
var AGENT_FRAMEWORKS, FRAMEWORK_ALIASES, FRAMEWORK_EMOJI, FRAMEWORK_CHOICES, TEMPLATE_REPOS, UV_PREREQUISITE, DOTNET_PREREQUISITE, PYTHON3_PREREQUISITE, OPENAI_ENV_KEY, ANTHROPIC_ENV_KEY, GOOGLE_ENV_KEY, COPILOTKIT_LICENSE_ENV_KEY, FRAMEWORK_TEMPLATES, THREADS_FRAMEWORKS, FRAMEWORK_LANGUAGE, CHANNEL_HOST_FRAMEWORKS, INIT_CHANNEL_NONE;
|
|
464
464
|
var init_types = __esm({
|
|
465
465
|
"apps/cli/src/types.ts"() {
|
|
466
466
|
"use strict";
|
|
@@ -805,6 +805,49 @@ var init_types = __esm({
|
|
|
805
805
|
"a2ui",
|
|
806
806
|
"opengenui"
|
|
807
807
|
]);
|
|
808
|
+
FRAMEWORK_LANGUAGE = {
|
|
809
|
+
"langgraph-py": "python",
|
|
810
|
+
"langgraph-js": "typescript",
|
|
811
|
+
"claude-sdk-typescript": "typescript",
|
|
812
|
+
"claude-sdk-python": "python",
|
|
813
|
+
flows: "python",
|
|
814
|
+
mastra: "typescript",
|
|
815
|
+
"pydantic-ai": "python",
|
|
816
|
+
llamaindex: "python",
|
|
817
|
+
agno: "python",
|
|
818
|
+
ag2: "python",
|
|
819
|
+
adk: "python",
|
|
820
|
+
"adk-angular": "python",
|
|
821
|
+
a2a: "typescript",
|
|
822
|
+
"aws-strands-py": "python",
|
|
823
|
+
"microsoft-agent-framework-dotnet": "dotnet",
|
|
824
|
+
"microsoft-agent-framework-py": "python",
|
|
825
|
+
"mcp-apps": "typescript",
|
|
826
|
+
"agentcore-langgraph": "python",
|
|
827
|
+
"agentcore-strands": "python",
|
|
828
|
+
a2ui: "python",
|
|
829
|
+
opengenui: "python"
|
|
830
|
+
};
|
|
831
|
+
CHANNEL_HOST_FRAMEWORKS = /* @__PURE__ */ new Set([
|
|
832
|
+
"langgraph-py",
|
|
833
|
+
"langgraph-js",
|
|
834
|
+
"claude-sdk-typescript",
|
|
835
|
+
"claude-sdk-python",
|
|
836
|
+
"flows",
|
|
837
|
+
"mastra",
|
|
838
|
+
"pydantic-ai",
|
|
839
|
+
"llamaindex",
|
|
840
|
+
"agno",
|
|
841
|
+
"adk",
|
|
842
|
+
"a2a",
|
|
843
|
+
"aws-strands-py",
|
|
844
|
+
"microsoft-agent-framework-dotnet",
|
|
845
|
+
"microsoft-agent-framework-py",
|
|
846
|
+
"mcp-apps",
|
|
847
|
+
"a2ui",
|
|
848
|
+
"opengenui"
|
|
849
|
+
]);
|
|
850
|
+
INIT_CHANNEL_NONE = "none";
|
|
808
851
|
}
|
|
809
852
|
});
|
|
810
853
|
|
|
@@ -847,9 +890,21 @@ function initTelemetryBase(invokedAs, flags) {
|
|
|
847
890
|
command: "init",
|
|
848
891
|
subcommand: subcommandForInit(flags),
|
|
849
892
|
invoked_as: invokedAs,
|
|
850
|
-
mock_mode: "none"
|
|
893
|
+
mock_mode: "none",
|
|
894
|
+
channel_flag: channelFlagFor(flags)
|
|
851
895
|
};
|
|
852
896
|
}
|
|
897
|
+
function channelFlagFor(flags) {
|
|
898
|
+
switch (flags.channel) {
|
|
899
|
+
case "slack":
|
|
900
|
+
case "teams":
|
|
901
|
+
return flags.channel;
|
|
902
|
+
case "none":
|
|
903
|
+
return "declined";
|
|
904
|
+
default:
|
|
905
|
+
return "unset";
|
|
906
|
+
}
|
|
907
|
+
}
|
|
853
908
|
function resolveMockSubcommand(raw2) {
|
|
854
909
|
if (raw2 === "enable" || raw2 === "disable")
|
|
855
910
|
return raw2;
|
|
@@ -94019,6 +94074,137 @@ var init_license = __esm({
|
|
|
94019
94074
|
}
|
|
94020
94075
|
});
|
|
94021
94076
|
|
|
94077
|
+
// apps/cli/src/commands/framework-catalog.ts
|
|
94078
|
+
function listFrameworks() {
|
|
94079
|
+
return [...AGENT_FRAMEWORKS].sort((left, right) => left.localeCompare(right)).map((id) => ({
|
|
94080
|
+
id,
|
|
94081
|
+
label: LABELS_WITHOUT_EMOJI.get(id) ?? id,
|
|
94082
|
+
aliases: ALIASES_BY_FRAMEWORK.get(id) ?? [],
|
|
94083
|
+
language: FRAMEWORK_LANGUAGE[id],
|
|
94084
|
+
supportsIntelligence: THREADS_FRAMEWORKS.has(id),
|
|
94085
|
+
supportsMock: isMockSupported(id),
|
|
94086
|
+
supportsChannels: CHANNEL_HOST_FRAMEWORKS.has(id),
|
|
94087
|
+
environment: FRAMEWORK_TEMPLATES[id].environment
|
|
94088
|
+
}));
|
|
94089
|
+
}
|
|
94090
|
+
var LABELS_WITHOUT_EMOJI, ALIASES_BY_FRAMEWORK;
|
|
94091
|
+
var init_framework_catalog = __esm({
|
|
94092
|
+
"apps/cli/src/commands/framework-catalog.ts"() {
|
|
94093
|
+
"use strict";
|
|
94094
|
+
init_types();
|
|
94095
|
+
init_mock_llm();
|
|
94096
|
+
LABELS_WITHOUT_EMOJI = new Map(
|
|
94097
|
+
FRAMEWORK_CHOICES.map((choice) => {
|
|
94098
|
+
const emoji3 = FRAMEWORK_EMOJI[choice.value];
|
|
94099
|
+
const label = choice.label.startsWith(`${emoji3} `) ? choice.label.slice(emoji3.length + 1) : choice.label;
|
|
94100
|
+
return [choice.value, label];
|
|
94101
|
+
})
|
|
94102
|
+
);
|
|
94103
|
+
ALIASES_BY_FRAMEWORK = /* @__PURE__ */ new Map();
|
|
94104
|
+
for (const [alias, framework] of Object.entries(FRAMEWORK_ALIASES)) {
|
|
94105
|
+
const existing = ALIASES_BY_FRAMEWORK.get(framework);
|
|
94106
|
+
if (existing === void 0) {
|
|
94107
|
+
ALIASES_BY_FRAMEWORK.set(framework, [alias]);
|
|
94108
|
+
} else {
|
|
94109
|
+
existing.push(alias);
|
|
94110
|
+
}
|
|
94111
|
+
}
|
|
94112
|
+
}
|
|
94113
|
+
});
|
|
94114
|
+
|
|
94115
|
+
// apps/cli/src/commands/framework-list.ts
|
|
94116
|
+
var framework_list_exports = {};
|
|
94117
|
+
__export(framework_list_exports, {
|
|
94118
|
+
renderFrameworkJson: () => renderFrameworkJson,
|
|
94119
|
+
renderFrameworkTable: () => renderFrameworkTable,
|
|
94120
|
+
runFrameworkList: () => runFrameworkList
|
|
94121
|
+
});
|
|
94122
|
+
function acceptedFlags(framework) {
|
|
94123
|
+
const flags = [
|
|
94124
|
+
framework.supportsIntelligence ? "-i" : void 0,
|
|
94125
|
+
framework.supportsMock ? "--mock" : void 0,
|
|
94126
|
+
framework.supportsChannels ? "--channel" : void 0
|
|
94127
|
+
].filter((flag) => flag !== void 0);
|
|
94128
|
+
return flags.length === 0 ? "\u2014" : flags.join(" ");
|
|
94129
|
+
}
|
|
94130
|
+
function renderFrameworkTable(frameworks) {
|
|
94131
|
+
if (frameworks.length === 0) {
|
|
94132
|
+
return "No agent frameworks are available.\n";
|
|
94133
|
+
}
|
|
94134
|
+
const idWidth = Math.max(...frameworks.map((one) => one.id.length));
|
|
94135
|
+
const languageWidth = Math.max(
|
|
94136
|
+
...frameworks.map((one) => one.language.length)
|
|
94137
|
+
);
|
|
94138
|
+
const labelWidth = Math.max(...frameworks.map((one) => one.label.length));
|
|
94139
|
+
const rows = frameworks.map((framework) => {
|
|
94140
|
+
const emoji3 = FRAMEWORK_EMOJI[framework.id];
|
|
94141
|
+
return ` ${framework.id.padEnd(idWidth)} ${framework.language.padEnd(
|
|
94142
|
+
languageWidth
|
|
94143
|
+
)} ${emoji3} ${framework.label.padEnd(labelWidth)} ${acceptedFlags(
|
|
94144
|
+
framework
|
|
94145
|
+
)}`;
|
|
94146
|
+
});
|
|
94147
|
+
const aliased = frameworks.filter((one) => one.aliases.length > 0);
|
|
94148
|
+
const withEnvironment = frameworks.filter(
|
|
94149
|
+
(one) => one.environment.length > 0
|
|
94150
|
+
);
|
|
94151
|
+
const notes = [
|
|
94152
|
+
"Flags shown are the ones each framework accepts: -i (Intelligence threads),",
|
|
94153
|
+
"--mock (keyless mock model), --channel (starter ships a managed Channel host)."
|
|
94154
|
+
];
|
|
94155
|
+
if (aliased.length > 0) {
|
|
94156
|
+
const pairs2 = aliased.flatMap(
|
|
94157
|
+
(one) => one.aliases.map((alias) => `${alias} \u2192 ${one.id}`)
|
|
94158
|
+
);
|
|
94159
|
+
notes.push(`Accepted aliases: ${pairs2.join(", ")}.`);
|
|
94160
|
+
}
|
|
94161
|
+
if (withEnvironment.length > 0) {
|
|
94162
|
+
const frameworksByKey = /* @__PURE__ */ new Map();
|
|
94163
|
+
for (const framework of withEnvironment) {
|
|
94164
|
+
for (const { key } of framework.environment) {
|
|
94165
|
+
const existing = frameworksByKey.get(key);
|
|
94166
|
+
if (existing === void 0) {
|
|
94167
|
+
frameworksByKey.set(key, [framework.id]);
|
|
94168
|
+
} else {
|
|
94169
|
+
existing.push(framework.id);
|
|
94170
|
+
}
|
|
94171
|
+
}
|
|
94172
|
+
}
|
|
94173
|
+
notes.push("Vendor keys each framework reads from .env:");
|
|
94174
|
+
for (const [key, ids] of [...frameworksByKey.entries()].sort(
|
|
94175
|
+
([left], [right]) => left.localeCompare(right)
|
|
94176
|
+
)) {
|
|
94177
|
+
notes.push(` ${key} ${ids.join(", ")}`);
|
|
94178
|
+
}
|
|
94179
|
+
}
|
|
94180
|
+
return `Agent frameworks \u2014 pass one to \`copilotkit init -f <id>\`:
|
|
94181
|
+
|
|
94182
|
+
${rows.join(
|
|
94183
|
+
"\n"
|
|
94184
|
+
)}
|
|
94185
|
+
|
|
94186
|
+
${notes.join("\n")}
|
|
94187
|
+
`;
|
|
94188
|
+
}
|
|
94189
|
+
function renderFrameworkJson(frameworks) {
|
|
94190
|
+
return `${JSON.stringify({ frameworks }, null, 2)}
|
|
94191
|
+
`;
|
|
94192
|
+
}
|
|
94193
|
+
async function runFrameworkList(options) {
|
|
94194
|
+
const frameworks = listFrameworks();
|
|
94195
|
+
process.stdout.write(
|
|
94196
|
+
options.json ? renderFrameworkJson(frameworks) : renderFrameworkTable(frameworks)
|
|
94197
|
+
);
|
|
94198
|
+
return Promise.resolve();
|
|
94199
|
+
}
|
|
94200
|
+
var init_framework_list = __esm({
|
|
94201
|
+
"apps/cli/src/commands/framework-list.ts"() {
|
|
94202
|
+
"use strict";
|
|
94203
|
+
init_framework_catalog();
|
|
94204
|
+
init_types();
|
|
94205
|
+
}
|
|
94206
|
+
});
|
|
94207
|
+
|
|
94022
94208
|
// apps/cli/src/services/project-config.ts
|
|
94023
94209
|
import * as fs15 from "node:fs";
|
|
94024
94210
|
import * as path12 from "node:path";
|
|
@@ -94664,8 +94850,9 @@ function HostedProjectSelect({
|
|
|
94664
94850
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { children: " " }),
|
|
94665
94851
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ProjectExplainer, {}),
|
|
94666
94852
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, children: [
|
|
94667
|
-
"Pre-filled from your app name \u2014 press Enter to accept, or type to change it.
|
|
94853
|
+
defaultName !== "" && !nameDirty ? "Pre-filled from your app name \u2014 press Enter to accept, or type to change it." : "Type a name, then press Enter.",
|
|
94668
94854
|
" ",
|
|
94855
|
+
"Esc to ",
|
|
94669
94856
|
canGoBack ? "go back to the project list" : "cancel",
|
|
94670
94857
|
"."
|
|
94671
94858
|
] }),
|
|
@@ -228820,19 +229007,19 @@ import { createRequire as topLevelCreateRequire86 } from "module";
|
|
|
228820
229007
|
function mapLanguage(lang) {
|
|
228821
229008
|
switch (lang) {
|
|
228822
229009
|
case CodeExecutionLanguage.PYTHON:
|
|
228823
|
-
return
|
|
229010
|
+
return import_types9.Language.LANGUAGE_PYTHON;
|
|
228824
229011
|
case CodeExecutionLanguage.JAVASCRIPT:
|
|
228825
|
-
return
|
|
229012
|
+
return import_types9.Language.LANGUAGE_JAVASCRIPT;
|
|
228826
229013
|
default:
|
|
228827
229014
|
throw new Error(`Unsupported language for Agent Engine Sandbox: ${lang}`);
|
|
228828
229015
|
}
|
|
228829
229016
|
}
|
|
228830
|
-
var import_vertexai,
|
|
229017
|
+
var import_vertexai, import_types9, require87, __defProp3, __getOwnPropDesc3, __decorateClass2, SANDBOX_PATTERN, ENGINE_PATTERN, DEFAULT_MAX_ATTEMPTS, DEFAULT_SANDBOX_TTL, DEFAULT_SANDBOX_DISPLAY_NAME, DEFAULT_ENGINE_DISPLAY_NAME, AgentEngineSandboxCodeExecutor;
|
|
228831
229018
|
var init_agent_engine_sandbox_code_executor = __esm({
|
|
228832
229019
|
"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/code_executors/agent_engine_sandbox_code_executor.js"() {
|
|
228833
229020
|
"use strict";
|
|
228834
229021
|
import_vertexai = __toESM(require_src17(), 1);
|
|
228835
|
-
|
|
229022
|
+
import_types9 = __toESM(require_types3(), 1);
|
|
228836
229023
|
init_experimental();
|
|
228837
229024
|
init_file_utils();
|
|
228838
229025
|
init_logger();
|
|
@@ -356937,6 +357124,77 @@ var init_init_flow = __esm({
|
|
|
356937
357124
|
}
|
|
356938
357125
|
});
|
|
356939
357126
|
|
|
357127
|
+
// apps/cli/src/commands/init-channel-flag.ts
|
|
357128
|
+
var init_channel_flag_exports = {};
|
|
357129
|
+
__export(init_channel_flag_exports, {
|
|
357130
|
+
INIT_CHANNEL_NONE: () => INIT_CHANNEL_NONE,
|
|
357131
|
+
channelFlagUnsupportedError: () => channelFlagUnsupportedError,
|
|
357132
|
+
channelOfferFromFlag: () => channelOfferFromFlag,
|
|
357133
|
+
formatChannelUnsupportedError: () => formatChannelUnsupportedError,
|
|
357134
|
+
resolveInitChannelFlag: () => resolveInitChannelFlag
|
|
357135
|
+
});
|
|
357136
|
+
function resolveInitChannelFlag(input) {
|
|
357137
|
+
if (input.value === void 0) {
|
|
357138
|
+
return { status: "ok", channel: null };
|
|
357139
|
+
}
|
|
357140
|
+
const value = input.value;
|
|
357141
|
+
if (!ACCEPTED_VALUES.includes(value)) {
|
|
357142
|
+
return {
|
|
357143
|
+
status: "invalid",
|
|
357144
|
+
message: `Unknown channel: "${value}". Expected one of: ${ACCEPTED_VALUES.join(
|
|
357145
|
+
", "
|
|
357146
|
+
)}.
|
|
357147
|
+
Run \`copilotkit channels providers\` to see what each provider needs.`
|
|
357148
|
+
};
|
|
357149
|
+
}
|
|
357150
|
+
if (value === INIT_CHANNEL_NONE) {
|
|
357151
|
+
return { status: "ok", channel: INIT_CHANNEL_NONE };
|
|
357152
|
+
}
|
|
357153
|
+
const framework = input.framework === void 0 ? void 0 : resolveFrameworkAlias(input.framework);
|
|
357154
|
+
if (framework !== void 0 && isAgentFramework(framework) && !CHANNEL_HOST_FRAMEWORKS.has(framework)) {
|
|
357155
|
+
return {
|
|
357156
|
+
status: "invalid",
|
|
357157
|
+
message: formatChannelUnsupportedError(framework, value)
|
|
357158
|
+
};
|
|
357159
|
+
}
|
|
357160
|
+
return { status: "ok", channel: value };
|
|
357161
|
+
}
|
|
357162
|
+
function formatChannelUnsupportedError(framework, provider) {
|
|
357163
|
+
return `The ${framework} starter ships no Channel host, so --channel cannot be used with it.
|
|
357164
|
+
Run \`copilotkit framework list\` to see which frameworks accept --channel, or scaffold without it and run \`copilotkit channels add --adapter ${provider}\` against a runtime you host yourself.`;
|
|
357165
|
+
}
|
|
357166
|
+
function channelOfferFromFlag(channel2) {
|
|
357167
|
+
if (channel2 === null) {
|
|
357168
|
+
return void 0;
|
|
357169
|
+
}
|
|
357170
|
+
const adapter2 = channel2 === INIT_CHANNEL_NONE ? void 0 : channel2;
|
|
357171
|
+
return () => Promise.resolve(adapter2);
|
|
357172
|
+
}
|
|
357173
|
+
function channelFlagUnsupportedError(channel2, framework) {
|
|
357174
|
+
if (channel2 === null || channel2 === INIT_CHANNEL_NONE) {
|
|
357175
|
+
return void 0;
|
|
357176
|
+
}
|
|
357177
|
+
if (!isAgentFramework(framework)) {
|
|
357178
|
+
return void 0;
|
|
357179
|
+
}
|
|
357180
|
+
if (CHANNEL_HOST_FRAMEWORKS.has(framework)) {
|
|
357181
|
+
return void 0;
|
|
357182
|
+
}
|
|
357183
|
+
return formatChannelUnsupportedError(framework, channel2);
|
|
357184
|
+
}
|
|
357185
|
+
var ACCEPTED_VALUES;
|
|
357186
|
+
var init_init_channel_flag = __esm({
|
|
357187
|
+
"apps/cli/src/commands/init-channel-flag.ts"() {
|
|
357188
|
+
"use strict";
|
|
357189
|
+
init_channels();
|
|
357190
|
+
init_types();
|
|
357191
|
+
ACCEPTED_VALUES = [
|
|
357192
|
+
...CHANNEL_ADAPTERS,
|
|
357193
|
+
INIT_CHANNEL_NONE
|
|
357194
|
+
];
|
|
357195
|
+
}
|
|
357196
|
+
});
|
|
357197
|
+
|
|
356940
357198
|
// apps/cli/src/services/channel-artifacts.ts
|
|
356941
357199
|
import * as fs26 from "node:fs";
|
|
356942
357200
|
import * as path25 from "node:path";
|
|
@@ -358277,6 +358535,36 @@ var init_channel_credential_prompt = __esm({
|
|
|
358277
358535
|
}
|
|
358278
358536
|
});
|
|
358279
358537
|
|
|
358538
|
+
// apps/cli/src/services/channel-provider-catalog.ts
|
|
358539
|
+
function listChannelProviders() {
|
|
358540
|
+
return CHANNEL_ADAPTERS.map((id) => ({
|
|
358541
|
+
id,
|
|
358542
|
+
label: CHANNEL_PROVIDER_LABELS[id],
|
|
358543
|
+
credentialFields: CREDENTIAL_FIELDS_BY_PROVIDER[id].map((field) => {
|
|
358544
|
+
const label = credentialFieldLabel(field);
|
|
358545
|
+
return { field, name: label.name, where: label.where };
|
|
358546
|
+
}),
|
|
358547
|
+
supportsProvisioning: id === "teams",
|
|
358548
|
+
requiresInvite: id === "slack"
|
|
358549
|
+
}));
|
|
358550
|
+
}
|
|
358551
|
+
var CHANNEL_PROVIDER_LABELS, CREDENTIAL_FIELDS_BY_PROVIDER;
|
|
358552
|
+
var init_channel_provider_catalog = __esm({
|
|
358553
|
+
"apps/cli/src/services/channel-provider-catalog.ts"() {
|
|
358554
|
+
"use strict";
|
|
358555
|
+
init_channels();
|
|
358556
|
+
init_channel_credentials();
|
|
358557
|
+
CHANNEL_PROVIDER_LABELS = Object.freeze({
|
|
358558
|
+
slack: "Slack",
|
|
358559
|
+
teams: "Microsoft Teams"
|
|
358560
|
+
});
|
|
358561
|
+
CREDENTIAL_FIELDS_BY_PROVIDER = Object.freeze({
|
|
358562
|
+
slack: ["channelToken", "signingSecret"],
|
|
358563
|
+
teams: ["clientId", "clientSecret", "tenantId"]
|
|
358564
|
+
});
|
|
358565
|
+
}
|
|
358566
|
+
});
|
|
358567
|
+
|
|
358280
358568
|
// apps/cli/src/ui/channel-offer.tsx
|
|
358281
358569
|
function ChannelOffer(props) {
|
|
358282
358570
|
const indexRef = (0, import_react47.useRef)(0);
|
|
@@ -358340,10 +358628,11 @@ var init_channel_offer = __esm({
|
|
|
358340
358628
|
await init_build2();
|
|
358341
358629
|
import_react47 = __toESM(require_react(), 1);
|
|
358342
358630
|
init_theme();
|
|
358631
|
+
init_channel_provider_catalog();
|
|
358343
358632
|
import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
358344
358633
|
CHOICES2 = [
|
|
358345
|
-
{ adapter: "slack", label:
|
|
358346
|
-
{ adapter: "teams", label:
|
|
358634
|
+
{ adapter: "slack", label: CHANNEL_PROVIDER_LABELS.slack },
|
|
358635
|
+
{ adapter: "teams", label: CHANNEL_PROVIDER_LABELS.teams },
|
|
358347
358636
|
{ adapter: void 0, label: "Not now" }
|
|
358348
358637
|
];
|
|
358349
358638
|
}
|
|
@@ -359014,6 +359303,17 @@ function ScaffoldProgress({
|
|
|
359014
359303
|
const installAlreadyRanRef = (0, import_react48.useRef)(false);
|
|
359015
359304
|
const [credentialRequest, setCredentialRequest] = (0, import_react48.useState)(null);
|
|
359016
359305
|
const [attachingChannel, setAttachingChannel] = (0, import_react48.useState)(false);
|
|
359306
|
+
const channelFlagError = (0, import_react48.useMemo)(
|
|
359307
|
+
() => options.framework === null ? void 0 : channelFlagUnsupportedError(
|
|
359308
|
+
options.channel ?? null,
|
|
359309
|
+
options.framework
|
|
359310
|
+
),
|
|
359311
|
+
[options.channel, options.framework]
|
|
359312
|
+
);
|
|
359313
|
+
const flagChannelOffer = (0, import_react48.useMemo)(
|
|
359314
|
+
() => channelOfferFromFlag(options.channel ?? null),
|
|
359315
|
+
[options.channel]
|
|
359316
|
+
);
|
|
359017
359317
|
const scaffoldDependencies = (0, import_react48.useMemo)(
|
|
359018
359318
|
() => ({
|
|
359019
359319
|
...defaultInitScaffoldDependencies,
|
|
@@ -359033,18 +359333,32 @@ function ScaffoldProgress({
|
|
|
359033
359333
|
// render branch, so a non-interactive run has nothing to drive it and would
|
|
359034
359334
|
// wait on a deferred that never settles -- an init that hangs forever is far
|
|
359035
359335
|
// worse than an init that simply does not offer a Channel.
|
|
359036
|
-
|
|
359037
|
-
|
|
359336
|
+
//
|
|
359337
|
+
// A `--channel` value overrides that entirely: the offer is pre-answered,
|
|
359338
|
+
// so it resolves immediately, nothing renders, and there is no keypress to
|
|
359339
|
+
// mistime. That is what makes the flag safe under a pty, where stdin looks
|
|
359340
|
+
// interactive but nobody is watching and the cursor starts on Slack.
|
|
359341
|
+
...flagChannelOffer !== void 0 || (dependencies?.isVendorKeyPromptInteractive ?? vendorKeyPromptInteractive)() ? {
|
|
359342
|
+
offerChannelAdapter: flagChannelOffer ?? (() => new Promise((resolve4) => {
|
|
359038
359343
|
channelOfferDeferredRef.current = { resolve: resolve4 };
|
|
359039
|
-
}),
|
|
359344
|
+
})),
|
|
359040
359345
|
setUpChannel: (input) => runInitChannelSetup(input),
|
|
359041
|
-
|
|
359346
|
+
// Guided completion is a PROMPT -- it renders ChannelCredentialPrompt
|
|
359347
|
+
// and asks for a provider secret -- so it is wired only for a run that
|
|
359348
|
+
// may legitimately prompt. Gating it on interactivity alone was wrong:
|
|
359349
|
+
// under a pty vendorKeyPromptInteractive() is true, so a `--channel`
|
|
359350
|
+
// run had its offer suppressed and was then asked for a Slack token
|
|
359351
|
+
// anyway. A flag-driven Channel stays silent end to end and reports
|
|
359352
|
+
// what is outstanding instead.
|
|
359353
|
+
...flagChannelOffer === void 0 ? {
|
|
359354
|
+
completeChannelSetup: (input) => runInitChannelCompletion(input)
|
|
359355
|
+
} : {}
|
|
359042
359356
|
} : {},
|
|
359043
359357
|
// Test-injected deps win over the inline wiring above; the production
|
|
359044
359358
|
// shell (InitApp) passes none, so the inline selectHostedProject stands.
|
|
359045
359359
|
...dependencies
|
|
359046
359360
|
}),
|
|
359047
|
-
[browserLogin.runLogin, dependencies]
|
|
359361
|
+
[browserLogin.runLogin, dependencies, flagChannelOffer]
|
|
359048
359362
|
);
|
|
359049
359363
|
(0, import_react48.useEffect)(() => {
|
|
359050
359364
|
if (phase === "success" || phase === "error") {
|
|
@@ -359076,6 +359390,16 @@ function ScaffoldProgress({
|
|
|
359076
359390
|
}, [phase, scaffoldResult]);
|
|
359077
359391
|
(0, import_react48.useEffect)(() => {
|
|
359078
359392
|
let cancelled = false;
|
|
359393
|
+
if (channelFlagError !== void 0) {
|
|
359394
|
+
const error48 = new Error(channelFlagError);
|
|
359395
|
+
error48.displayed = true;
|
|
359396
|
+
scaffoldErrorRef.current = error48;
|
|
359397
|
+
setErrorMessage(channelFlagError);
|
|
359398
|
+
setPhase("error");
|
|
359399
|
+
return () => {
|
|
359400
|
+
cancelled = true;
|
|
359401
|
+
};
|
|
359402
|
+
}
|
|
359079
359403
|
async function run() {
|
|
359080
359404
|
const result = await scaffoldInitProject(
|
|
359081
359405
|
options,
|
|
@@ -359485,18 +359809,20 @@ function InitApp({
|
|
|
359485
359809
|
initialFramework,
|
|
359486
359810
|
noBanner = false,
|
|
359487
359811
|
initialMock = false,
|
|
359812
|
+
initialChannel = null,
|
|
359488
359813
|
renderScaffoldProgress = renderDefaultScaffoldProgress,
|
|
359489
359814
|
onIntelligenceSelected,
|
|
359490
359815
|
onFrameworkSelected,
|
|
359491
359816
|
telemetry
|
|
359492
359817
|
}) {
|
|
359493
359818
|
const mock = initialMock === true;
|
|
359494
|
-
const
|
|
359819
|
+
const prefilledBase = resolvePrefilledOptions(
|
|
359495
359820
|
initialName,
|
|
359496
359821
|
initialIntelligence,
|
|
359497
359822
|
initialFramework,
|
|
359498
359823
|
mock
|
|
359499
359824
|
);
|
|
359825
|
+
const prefilled = prefilledBase === null ? null : { ...prefilledBase, channel: initialChannel };
|
|
359500
359826
|
const [options, setOptions] = (0, import_react48.useState)(prefilled);
|
|
359501
359827
|
(0, import_react48.useEffect)(() => {
|
|
359502
359828
|
if (prefilled !== null) {
|
|
@@ -359530,7 +359856,7 @@ function InitApp({
|
|
|
359530
359856
|
onFrameworkSelected,
|
|
359531
359857
|
onComplete: (resolved) => {
|
|
359532
359858
|
if (resolved !== null) {
|
|
359533
|
-
setOptions({ ...resolved, mock });
|
|
359859
|
+
setOptions({ ...resolved, mock, channel: initialChannel });
|
|
359534
359860
|
}
|
|
359535
359861
|
}
|
|
359536
359862
|
}
|
|
@@ -359573,6 +359899,7 @@ async function runInit(flags, callbacks) {
|
|
|
359573
359899
|
initialIntelligence,
|
|
359574
359900
|
initialFramework,
|
|
359575
359901
|
initialMock: flags.mock ?? false,
|
|
359902
|
+
initialChannel: flags.channel ?? null,
|
|
359576
359903
|
noBanner: flags.noBanner === true,
|
|
359577
359904
|
onIntelligenceSelected: callbacks?.onIntelligenceSelected,
|
|
359578
359905
|
onFrameworkSelected: callbacks?.onFrameworkSelected,
|
|
@@ -359611,6 +359938,7 @@ var init_init = __esm({
|
|
|
359611
359938
|
await init_spinner();
|
|
359612
359939
|
await init_success_text();
|
|
359613
359940
|
await init_channels_events();
|
|
359941
|
+
init_init_channel_flag();
|
|
359614
359942
|
init_config();
|
|
359615
359943
|
init_init_channel_setup();
|
|
359616
359944
|
await init_channel_completion();
|
|
@@ -360397,6 +360725,79 @@ var init_channels_preflight = __esm({
|
|
|
360397
360725
|
}
|
|
360398
360726
|
});
|
|
360399
360727
|
|
|
360728
|
+
// apps/cli/src/commands/channel-providers.ts
|
|
360729
|
+
var channel_providers_exports = {};
|
|
360730
|
+
__export(channel_providers_exports, {
|
|
360731
|
+
listChannelProviders: () => listChannelProviders,
|
|
360732
|
+
renderChannelProviderJson: () => renderChannelProviderJson,
|
|
360733
|
+
renderChannelProviderTable: () => renderChannelProviderTable,
|
|
360734
|
+
runChannelProviders: () => runChannelProviders
|
|
360735
|
+
});
|
|
360736
|
+
function renderChannelProviderTable(providers) {
|
|
360737
|
+
const blocks = providers.map((provider) => {
|
|
360738
|
+
const header = ` ${provider.id} (${provider.label})`;
|
|
360739
|
+
const notes = [];
|
|
360740
|
+
if (provider.supportsProvisioning) {
|
|
360741
|
+
notes.push(
|
|
360742
|
+
` The CLI can create the provider-side app for you: \`channels add --adapter ${provider.id} --provision\`.`
|
|
360743
|
+
);
|
|
360744
|
+
} else {
|
|
360745
|
+
notes.push(
|
|
360746
|
+
` You create the ${provider.label} app yourself; the CLI attaches to it.`
|
|
360747
|
+
);
|
|
360748
|
+
}
|
|
360749
|
+
if (provider.requiresInvite) {
|
|
360750
|
+
notes.push(
|
|
360751
|
+
" Invite the bot to a conversation after attaching. Installed but",
|
|
360752
|
+
" invited nowhere, it answers nothing and looks like a broken Channel."
|
|
360753
|
+
);
|
|
360754
|
+
}
|
|
360755
|
+
const credentials = provider.credentialFields.map(
|
|
360756
|
+
(credential) => ` ${credential.field} \u2014 "${credential.name}", from ${credential.where}`
|
|
360757
|
+
);
|
|
360758
|
+
return [
|
|
360759
|
+
header,
|
|
360760
|
+
...notes,
|
|
360761
|
+
" Credentials it will ask for:",
|
|
360762
|
+
...credentials
|
|
360763
|
+
].join("\n");
|
|
360764
|
+
});
|
|
360765
|
+
return `Chat providers a managed Channel can use:
|
|
360766
|
+
|
|
360767
|
+
${blocks.join("\n\n")}
|
|
360768
|
+
|
|
360769
|
+
Pass one to \`channels add --adapter <id>\` or \`init --channel <id>\`.
|
|
360770
|
+
No flag accepts a credential value: credentials are read from your .env, from
|
|
360771
|
+
a named variable, or from a JSON document on stdin.
|
|
360772
|
+
`;
|
|
360773
|
+
}
|
|
360774
|
+
function renderChannelProviderJson(providers) {
|
|
360775
|
+
return `${JSON.stringify(
|
|
360776
|
+
{
|
|
360777
|
+
envelopeVersion: CHANNELS_ENVELOPE_VERSION,
|
|
360778
|
+
command: "channels providers",
|
|
360779
|
+
providers
|
|
360780
|
+
},
|
|
360781
|
+
null,
|
|
360782
|
+
2
|
|
360783
|
+
)}
|
|
360784
|
+
`;
|
|
360785
|
+
}
|
|
360786
|
+
async function runChannelProviders(options) {
|
|
360787
|
+
const providers = listChannelProviders();
|
|
360788
|
+
process.stdout.write(
|
|
360789
|
+
options.json ? renderChannelProviderJson(providers) : renderChannelProviderTable(providers)
|
|
360790
|
+
);
|
|
360791
|
+
return Promise.resolve();
|
|
360792
|
+
}
|
|
360793
|
+
var init_channel_providers = __esm({
|
|
360794
|
+
"apps/cli/src/commands/channel-providers.ts"() {
|
|
360795
|
+
"use strict";
|
|
360796
|
+
init_src11();
|
|
360797
|
+
init_channel_provider_catalog();
|
|
360798
|
+
}
|
|
360799
|
+
});
|
|
360800
|
+
|
|
360400
360801
|
// apps/cli/src/commands/channels.ts
|
|
360401
360802
|
var channels_exports = {};
|
|
360402
360803
|
__export(channels_exports, {
|
|
@@ -360566,6 +360967,51 @@ async function runChannels(argv) {
|
|
|
360566
360967
|
process.exitCode = 1;
|
|
360567
360968
|
return;
|
|
360568
360969
|
}
|
|
360970
|
+
if (subcommand === "providers") {
|
|
360971
|
+
let providersJson = false;
|
|
360972
|
+
try {
|
|
360973
|
+
const providersArgs = parseArgs2({
|
|
360974
|
+
allowPositionals: false,
|
|
360975
|
+
args: [...argv.slice(1)],
|
|
360976
|
+
options: { json: { type: "boolean" } },
|
|
360977
|
+
strict: true
|
|
360978
|
+
});
|
|
360979
|
+
providersJson = providersArgs.values.json === true;
|
|
360980
|
+
} catch (error48) {
|
|
360981
|
+
recordTelemetryEvent({
|
|
360982
|
+
properties: {
|
|
360983
|
+
command: "channels",
|
|
360984
|
+
subcommand: "providers",
|
|
360985
|
+
outcome: "failed",
|
|
360986
|
+
error_code: "validation"
|
|
360987
|
+
}
|
|
360988
|
+
});
|
|
360989
|
+
process.stderr.write(
|
|
360990
|
+
`${error48 instanceof Error ? error48.message : String(error48)}
|
|
360991
|
+
Usage: copilotkit channels providers [--json]
|
|
360992
|
+
`
|
|
360993
|
+
);
|
|
360994
|
+
process.exitCode = 1;
|
|
360995
|
+
return;
|
|
360996
|
+
}
|
|
360997
|
+
recordTelemetryEvent({
|
|
360998
|
+
properties: {
|
|
360999
|
+
command: "channels",
|
|
361000
|
+
subcommand: "providers",
|
|
361001
|
+
outcome: "started"
|
|
361002
|
+
}
|
|
361003
|
+
});
|
|
361004
|
+
const { runChannelProviders: runChannelProviders2 } = await Promise.resolve().then(() => (init_channel_providers(), channel_providers_exports));
|
|
361005
|
+
await runChannelProviders2({ json: providersJson });
|
|
361006
|
+
recordTelemetryEvent({
|
|
361007
|
+
properties: {
|
|
361008
|
+
command: "channels",
|
|
361009
|
+
subcommand: "providers",
|
|
361010
|
+
outcome: "succeeded"
|
|
361011
|
+
}
|
|
361012
|
+
});
|
|
361013
|
+
return;
|
|
361014
|
+
}
|
|
360569
361015
|
const parsed = parseArgs2({
|
|
360570
361016
|
allowPositionals: true,
|
|
360571
361017
|
args: [...argv.slice(1)],
|
|
@@ -360847,6 +361293,7 @@ var init_channels2 = __esm({
|
|
|
360847
361293
|
SUBCOMMANDS = [
|
|
360848
361294
|
"add",
|
|
360849
361295
|
"list",
|
|
361296
|
+
"providers",
|
|
360850
361297
|
"rotate",
|
|
360851
361298
|
"status"
|
|
360852
361299
|
];
|
|
@@ -361368,7 +361815,9 @@ Commands:
|
|
|
361368
361815
|
license list List CopilotKit license metadata
|
|
361369
361816
|
license ls Alias of license list
|
|
361370
361817
|
project select Select or create a hosted Intelligence project
|
|
361818
|
+
framework list List the agent frameworks init accepts, and their flags
|
|
361371
361819
|
channels Set up managed Intelligence Channels (Slack, Teams)
|
|
361820
|
+
channels providers List the chat providers a Channel can use
|
|
361372
361821
|
skills install Install the CopilotKit agent skills
|
|
361373
361822
|
skills onboard Install skills and start agent-assisted onboarding
|
|
361374
361823
|
${isCliFlagEnabled("cli.aimock-mock-mode") ? " mock enable Wire a scaffolded project to run keyless against a local mock LLM\n mock disable Restore a real vendor API key and remove mock wiring\n" : ""} import [options] Import ADK/LangGraph threads into Intelligence
|
|
@@ -361440,7 +361889,18 @@ Options:
|
|
|
361440
361889
|
persistence, insights) ships with every supported
|
|
361441
361890
|
framework and a free license is provisioned during init.
|
|
361442
361891
|
${isCliFlagEnabled("cli.aimock-mock-mode") ? ` --mock Run keyless against a local mock LLM (supported: ${formatMockSupportedFrameworks()}).
|
|
361443
|
-
` : ""} --
|
|
361892
|
+
` : ""} --channel <what> Pre-answer the managed Channel offer: slack, teams, or
|
|
361893
|
+
none. With this flag the offer is never shown, so a
|
|
361894
|
+
scripted run cannot land on a provider by mistiming a
|
|
361895
|
+
keystroke. \`none\` declines it outright.
|
|
361896
|
+
|
|
361897
|
+
Accepted only for frameworks whose starter ships a
|
|
361898
|
+
Channel host; run \`copilotkit framework list\` to see
|
|
361899
|
+
which, and \`copilotkit channels providers\` for what each
|
|
361900
|
+
provider will ask you for. A named provider is set up as
|
|
361901
|
+
far as it can go without credentials, then reports what
|
|
361902
|
+
is left -- it never prompts for a secret.
|
|
361903
|
+
--no-banner Suppress the CopilotKit welcome banner (used when a
|
|
361444
361904
|
parent tool, e.g. create-ag-ui-app, shows its own)
|
|
361445
361905
|
-h, --help Show help for init
|
|
361446
361906
|
`,
|
|
@@ -361479,6 +361939,12 @@ Subcommands:
|
|
|
361479
361939
|
add [name] Declare a Channel, reconcile it, and report the next step
|
|
361480
361940
|
status Compare your configuration, your code, and the server
|
|
361481
361941
|
list List Channels and their attachment state
|
|
361942
|
+
providers List the chat providers a Channel can use, and the
|
|
361943
|
+
credentials each one asks for. Answers from a catalog
|
|
361944
|
+
compiled into this CLI: no project, no credentials, no
|
|
361945
|
+
API call, no TTY. Emits a catalog response rather than the
|
|
361946
|
+
operation envelope. Distinct from \`list\`, which reports
|
|
361947
|
+
YOUR Channels.
|
|
361482
361948
|
rotate <name> Explicitly replace stored provider credentials
|
|
361483
361949
|
setup Print a setup prompt for your coding agent and copy it
|
|
361484
361950
|
to the clipboard, then paste it into Claude
|
|
@@ -361534,6 +362000,44 @@ persist the choice to .copilotkit/project.json.
|
|
|
361534
362000
|
|
|
361535
362001
|
Options:
|
|
361536
362002
|
-h, --help Show help for project select
|
|
362003
|
+
`,
|
|
362004
|
+
framework: `Usage: copilotkit framework <subcommand>
|
|
362005
|
+
|
|
362006
|
+
Inspect the agent frameworks \`copilotkit init\` can scaffold.
|
|
362007
|
+
|
|
362008
|
+
Subcommands:
|
|
362009
|
+
list List every framework and the init flags it accepts
|
|
362010
|
+
|
|
362011
|
+
Options:
|
|
362012
|
+
-h, --help Show help for framework
|
|
362013
|
+
`,
|
|
362014
|
+
"framework-list": `Usage: copilotkit framework list [options]
|
|
362015
|
+
|
|
362016
|
+
List every agent framework \`copilotkit init -f <id>\` accepts, with the id to
|
|
362017
|
+
pass, the language its agent is written in, and the init flags that framework
|
|
362018
|
+
supports.
|
|
362019
|
+
|
|
362020
|
+
Answers from a catalog compiled into this CLI binary, so it needs no API call, no
|
|
362021
|
+
authentication and no TTY, and cannot fail once the arguments parse \u2014 there is no
|
|
362022
|
+
signed-out or offline case to handle. (Anonymous usage telemetry is still sent
|
|
362023
|
+
unless you have opted out; it is best-effort and never blocks or alters the
|
|
362024
|
+
output.)
|
|
362025
|
+
|
|
362026
|
+
Each row lists only the flags that framework accepts:
|
|
362027
|
+
-i Intelligence threads are available to license
|
|
362028
|
+
--mock A keyless mock model can stand in for a vendor key
|
|
362029
|
+
--channel The starter ships a managed Channel host, so
|
|
362030
|
+
\`init --channel\` can serve Slack or Teams
|
|
362031
|
+
|
|
362032
|
+
Frameworks needing a vendor API key are footnoted with the variable name, so you
|
|
362033
|
+
can have the value ready before scaffolding rather than meeting the prompt.
|
|
362034
|
+
|
|
362035
|
+
Options:
|
|
362036
|
+
--json Emit a machine-readable payload as the ONLY thing on
|
|
362037
|
+
stdout, safe to pipe into a parser. Each entry adds the
|
|
362038
|
+
accepted \`-f\` aliases and whether each environment key
|
|
362039
|
+
is required.
|
|
362040
|
+
-h, --help Show help for framework list
|
|
361537
362041
|
`,
|
|
361538
362042
|
skills: `Usage: copilotkit skills <subcommand>
|
|
361539
362043
|
|
|
@@ -361732,6 +362236,12 @@ function resolveCommandHelpTopic(argv) {
|
|
|
361732
362236
|
}
|
|
361733
362237
|
return "project";
|
|
361734
362238
|
}
|
|
362239
|
+
if (command === "framework" || command === "frameworks") {
|
|
362240
|
+
if (subcommand === "list" || subcommand === "ls") {
|
|
362241
|
+
return "framework-list";
|
|
362242
|
+
}
|
|
362243
|
+
return "framework";
|
|
362244
|
+
}
|
|
361735
362245
|
if (command === "skills") {
|
|
361736
362246
|
if (subcommand === "install") {
|
|
361737
362247
|
return "skills-install";
|
|
@@ -361958,6 +362468,39 @@ ${HELP_TEXT_BY_TOPIC.root}`
|
|
|
361958
362468
|
}
|
|
361959
362469
|
);
|
|
361960
362470
|
}
|
|
362471
|
+
async function runFrameworkCommand(argv) {
|
|
362472
|
+
const subcommand = argv[0];
|
|
362473
|
+
if (subcommand !== "list" && subcommand !== "ls") {
|
|
362474
|
+
recordTelemetryEvent({
|
|
362475
|
+
properties: {
|
|
362476
|
+
command: "framework",
|
|
362477
|
+
outcome: "failed",
|
|
362478
|
+
error_code: "validation"
|
|
362479
|
+
}
|
|
362480
|
+
});
|
|
362481
|
+
const lead = subcommand === void 0 ? "Error: copilotkit framework requires a subcommand (list).\n\n" : `Unknown framework subcommand: "${subcommand}"
|
|
362482
|
+
|
|
362483
|
+
`;
|
|
362484
|
+
process.stderr.write(`${lead}${HELP_TEXT_BY_TOPIC.framework}`);
|
|
362485
|
+
await exitWithFlush(1);
|
|
362486
|
+
return;
|
|
362487
|
+
}
|
|
362488
|
+
const parsed = parseArgs3({
|
|
362489
|
+
args: [...argv.slice(1)],
|
|
362490
|
+
options: {
|
|
362491
|
+
json: { type: "boolean" }
|
|
362492
|
+
},
|
|
362493
|
+
strict: true,
|
|
362494
|
+
allowPositionals: false
|
|
362495
|
+
});
|
|
362496
|
+
const { runFrameworkList: runFrameworkList2 } = await Promise.resolve().then(() => (init_framework_list(), framework_list_exports));
|
|
362497
|
+
await withTelemetry(
|
|
362498
|
+
{ command: "framework", subcommand: "list" },
|
|
362499
|
+
async () => {
|
|
362500
|
+
await runFrameworkList2({ json: parsed.values["json"] === true });
|
|
362501
|
+
}
|
|
362502
|
+
);
|
|
362503
|
+
}
|
|
361961
362504
|
async function runProjectCommand(argv) {
|
|
361962
362505
|
const subcommand = argv[0];
|
|
361963
362506
|
if (subcommand !== "select") {
|
|
@@ -362272,6 +362815,7 @@ var INIT_PARSE_OPTIONS = {
|
|
|
362272
362815
|
intelligence: { type: "boolean", short: "i" },
|
|
362273
362816
|
framework: { type: "string", short: "f" },
|
|
362274
362817
|
mock: { type: "boolean" },
|
|
362818
|
+
channel: { type: "string" },
|
|
362275
362819
|
"no-banner": { type: "boolean" }
|
|
362276
362820
|
};
|
|
362277
362821
|
async function runInitCommand(invokedAs, argv) {
|
|
@@ -362289,8 +362833,29 @@ async function runInitCommand(invokedAs, argv) {
|
|
|
362289
362833
|
const telemetryBase = initTelemetryBase(invokedAs, {
|
|
362290
362834
|
intelligence,
|
|
362291
362835
|
framework,
|
|
362292
|
-
mock
|
|
362836
|
+
mock,
|
|
362837
|
+
// Raw, and read before validation on purpose: the base has to exist for the
|
|
362838
|
+
// validation-failure event below to be reportable.
|
|
362839
|
+
channel: parsed.values["channel"]
|
|
362840
|
+
});
|
|
362841
|
+
const { resolveInitChannelFlag: resolveInitChannelFlag2 } = await Promise.resolve().then(() => (init_init_channel_flag(), init_channel_flag_exports));
|
|
362842
|
+
const channelResolution = resolveInitChannelFlag2({
|
|
362843
|
+
value: parsed.values["channel"],
|
|
362844
|
+
framework: frameworkFlag
|
|
362293
362845
|
});
|
|
362846
|
+
if (channelResolution.status === "invalid") {
|
|
362847
|
+
recordTelemetryEvent({
|
|
362848
|
+
properties: {
|
|
362849
|
+
...telemetryBase,
|
|
362850
|
+
outcome: "failed",
|
|
362851
|
+
error_code: "validation"
|
|
362852
|
+
}
|
|
362853
|
+
});
|
|
362854
|
+
process.stderr.write(`Error: ${channelResolution.message}
|
|
362855
|
+
`);
|
|
362856
|
+
await exitWithFlush(1);
|
|
362857
|
+
return;
|
|
362858
|
+
}
|
|
362294
362859
|
if (!process.stdin.isTTY) {
|
|
362295
362860
|
recordTelemetryEvent({
|
|
362296
362861
|
properties: {
|
|
@@ -362338,6 +362903,7 @@ async function runInitCommand(invokedAs, argv) {
|
|
|
362338
362903
|
intelligence,
|
|
362339
362904
|
framework,
|
|
362340
362905
|
mock,
|
|
362906
|
+
channel: channelResolution.channel,
|
|
362341
362907
|
noBanner: parsed.values["no-banner"]
|
|
362342
362908
|
};
|
|
362343
362909
|
await withTelemetry(telemetryBase, async (ctx) => {
|
|
@@ -362413,6 +362979,18 @@ var COMMAND_TABLE = {
|
|
|
362413
362979
|
await runProjectCommand(argv);
|
|
362414
362980
|
}
|
|
362415
362981
|
},
|
|
362982
|
+
framework: {
|
|
362983
|
+
kind: "self",
|
|
362984
|
+
run: async (argv) => {
|
|
362985
|
+
await runFrameworkCommand(argv);
|
|
362986
|
+
}
|
|
362987
|
+
},
|
|
362988
|
+
frameworks: {
|
|
362989
|
+
kind: "self",
|
|
362990
|
+
run: async (argv) => {
|
|
362991
|
+
await runFrameworkCommand(argv);
|
|
362992
|
+
}
|
|
362993
|
+
},
|
|
362416
362994
|
skills: {
|
|
362417
362995
|
kind: "self",
|
|
362418
362996
|
run: async (argv) => {
|
package/package.json
CHANGED
package/release/release-tool.js
CHANGED
|
@@ -14683,7 +14683,7 @@ import * as path4 from "node:path";
|
|
|
14683
14683
|
|
|
14684
14684
|
// apps/cli/src/config.ts
|
|
14685
14685
|
function getTemplateRef() {
|
|
14686
|
-
return true ? "
|
|
14686
|
+
return true ? "7e502dd4a452feee7d26c6355fd262948f8c25e6" : "main";
|
|
14687
14687
|
}
|
|
14688
14688
|
|
|
14689
14689
|
// apps/cli/src/services/agentcore-config.ts
|