@botpress/adk-cli 1.5.3 → 1.5.5
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/cli.js
CHANGED
|
@@ -309325,6 +309325,7 @@ import util4 from "util";
|
|
|
309325
309325
|
import { Readable as Readable5 } from "stream";
|
|
309326
309326
|
import stream22 from "stream";
|
|
309327
309327
|
import { createHash } from "crypto";
|
|
309328
|
+
import { AsyncResource } from "async_hooks";
|
|
309328
309329
|
import { setTimeout as setTimeout22 } from "timers/promises";
|
|
309329
309330
|
import assert from "assert";
|
|
309330
309331
|
import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
|
|
@@ -315684,7 +315685,7 @@ var init_internal = __esm(() => {
|
|
|
315684
315685
|
});
|
|
315685
315686
|
init_define_PACKAGE_VERSIONS = __esm2({
|
|
315686
315687
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
315687
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.3.
|
|
315688
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.3.5", adk: "not-installed", sdk: "4.17.0", llmz: "0.0.26", zai: "2.1.16", cognitive: "0.1.47" };
|
|
315688
315689
|
}
|
|
315689
315690
|
});
|
|
315690
315691
|
init_globalThis = __esm2({
|
|
@@ -348245,6 +348246,12 @@ ${issues.join(`
|
|
|
348245
348246
|
name: "autonomous.tool",
|
|
348246
348247
|
importance: "high",
|
|
348247
348248
|
attributes: {
|
|
348249
|
+
"autonomous.tool.object": {
|
|
348250
|
+
type: "string",
|
|
348251
|
+
title: "Object Name",
|
|
348252
|
+
description: "The name of the object being used",
|
|
348253
|
+
required: false
|
|
348254
|
+
},
|
|
348248
348255
|
"autonomous.tool.name": {
|
|
348249
348256
|
type: "string",
|
|
348250
348257
|
title: "Tool Name",
|
|
@@ -350201,7 +350208,7 @@ If the question is not related to the knowledge bases, do NOT use this tool.`.tr
|
|
|
350201
350208
|
options.interruption
|
|
350202
350209
|
]);
|
|
350203
350210
|
const llmz_execute = (await Promise.resolve().then(() => (init_dist8(), exports_dist4))).execute;
|
|
350204
|
-
const
|
|
350211
|
+
const asyncResource = new AsyncResource("autonomous.execution");
|
|
350205
350212
|
const getNewIteration = (index) => createSpan("autonomous.iteration", {
|
|
350206
350213
|
"autonomous.iteration": index
|
|
350207
350214
|
}, { parentContext: execSpan.ctx });
|
|
@@ -350246,25 +350253,20 @@ Always prefer information from the knowledge bases over general knowledge when a
|
|
|
350246
350253
|
});
|
|
350247
350254
|
return instructions;
|
|
350248
350255
|
},
|
|
350249
|
-
...
|
|
350250
|
-
|
|
350251
|
-
const
|
|
350252
|
-
|
|
350253
|
-
|
|
350254
|
-
|
|
350255
|
-
|
|
350256
|
-
iterationSpan?.setAttribute("autonomous.tools", allTools?.map((t5) => t5.name).join(", "));
|
|
350257
|
-
return allTools.map((tool) => tool.clone({
|
|
350258
|
-
handler: (args, ctx2) => {
|
|
350259
|
-
context.enterWith(originalContext);
|
|
350260
|
-
return context.run(originalContext, () => {
|
|
350256
|
+
...props.objects && {
|
|
350257
|
+
objects: async (ctx) => {
|
|
350258
|
+
const objs = await getValue3(props.objects, ctx) ?? [];
|
|
350259
|
+
iterationSpan?.setAttribute("autonomous.objects", objs.map((o2) => o2.name).join(", "));
|
|
350260
|
+
for (const obj of objs) {
|
|
350261
|
+
obj.tools = obj.tools?.map((tool) => tool.clone({
|
|
350262
|
+
handler: asyncResource.bind((args, ctx2) => {
|
|
350261
350263
|
let err = null;
|
|
350262
350264
|
const result = span("autonomous.tool", {
|
|
350265
|
+
"autonomous.tool.object": obj.name,
|
|
350263
350266
|
"autonomous.tool.name": tool.name,
|
|
350264
350267
|
"autonomous.tool.input": args
|
|
350265
350268
|
}, async (s2) => {
|
|
350266
|
-
|
|
350267
|
-
const value2 = await tool.execute(args, ctx2).catch((e6) => {
|
|
350269
|
+
const value2 = tool.execute(args, ctx2).catch((e6) => {
|
|
350268
350270
|
err = e6;
|
|
350269
350271
|
if (err && err?.constructor && err?.constructor?.name && err?.constructor?.name === "ThinkSignal") {
|
|
350270
350272
|
s2.setAttributes({
|
|
@@ -350299,24 +350301,80 @@ Always prefer information from the knowledge bases over general knowledge when a
|
|
|
350299
350301
|
throw err;
|
|
350300
350302
|
}
|
|
350301
350303
|
return result;
|
|
350304
|
+
})
|
|
350305
|
+
})) ?? [];
|
|
350306
|
+
}
|
|
350307
|
+
return objs;
|
|
350308
|
+
}
|
|
350309
|
+
},
|
|
350310
|
+
...(props.tools || props.knowledge) && {
|
|
350311
|
+
tools: async (ctx) => {
|
|
350312
|
+
const tools = props.tools ? await getValue3(props.tools, ctx) : [];
|
|
350313
|
+
const allTools = [...tools ?? []];
|
|
350314
|
+
if (search_knowledge) {
|
|
350315
|
+
allTools.push(search_knowledge);
|
|
350316
|
+
}
|
|
350317
|
+
iterationSpan?.setAttribute("autonomous.tools", allTools?.map((t5) => t5.name).join(", "));
|
|
350318
|
+
return allTools.map((tool) => tool.clone({
|
|
350319
|
+
handler: asyncResource.bind((args, ctx2) => {
|
|
350320
|
+
let err = null;
|
|
350321
|
+
const result = span("autonomous.tool", {
|
|
350322
|
+
"autonomous.tool.name": tool.name,
|
|
350323
|
+
"autonomous.tool.input": args
|
|
350324
|
+
}, async (s2) => {
|
|
350325
|
+
const value2 = tool.execute(args, ctx2).catch((e6) => {
|
|
350326
|
+
err = e6;
|
|
350327
|
+
if (err && err?.constructor && err?.constructor?.name && err?.constructor?.name === "ThinkSignal") {
|
|
350328
|
+
s2.setAttributes({
|
|
350329
|
+
"autonomous.tool.status": "think"
|
|
350330
|
+
});
|
|
350331
|
+
s2.setStatus({
|
|
350332
|
+
code: SpanStatusCode.UNSET,
|
|
350333
|
+
message: "ThinkSignal"
|
|
350334
|
+
});
|
|
350335
|
+
err[HandledErrorProp] = true;
|
|
350336
|
+
throw err;
|
|
350337
|
+
} else {
|
|
350338
|
+
s2.setAttributes({
|
|
350339
|
+
"autonomous.tool.status": "error",
|
|
350340
|
+
"autonomous.tool.error": err.message
|
|
350341
|
+
});
|
|
350342
|
+
s2.setStatus({
|
|
350343
|
+
code: SpanStatusCode.ERROR,
|
|
350344
|
+
message: err.message
|
|
350345
|
+
});
|
|
350346
|
+
s2.recordException(err);
|
|
350347
|
+
throw err;
|
|
350348
|
+
}
|
|
350349
|
+
});
|
|
350350
|
+
s2.setAttributes({
|
|
350351
|
+
"autonomous.tool.output": value2,
|
|
350352
|
+
"autonomous.tool.status": "success"
|
|
350353
|
+
});
|
|
350354
|
+
return value2;
|
|
350302
350355
|
});
|
|
350303
|
-
|
|
350356
|
+
if (err) {
|
|
350357
|
+
throw err;
|
|
350358
|
+
}
|
|
350359
|
+
return result;
|
|
350360
|
+
})
|
|
350304
350361
|
}));
|
|
350305
350362
|
}
|
|
350306
350363
|
},
|
|
350307
|
-
...props.objects && { objects: props.objects },
|
|
350308
350364
|
...props.exits && { exits: props.exits },
|
|
350309
350365
|
...joinedSignal && { signal: joinedSignal },
|
|
350310
350366
|
...props.hooks?.onBeforeTool && {
|
|
350311
|
-
onBeforeTool: props.hooks.onBeforeTool
|
|
350367
|
+
onBeforeTool: asyncResource.bind(props.hooks.onBeforeTool)
|
|
350312
350368
|
},
|
|
350313
350369
|
...props.hooks?.onAfterTool && {
|
|
350314
|
-
onAfterTool: props.hooks.onAfterTool
|
|
350370
|
+
onAfterTool: asyncResource.bind(props.hooks.onAfterTool)
|
|
350315
350371
|
},
|
|
350316
350372
|
...props.hooks?.onBeforeExecution && {
|
|
350317
|
-
onBeforeExecution: props.hooks.onBeforeExecution
|
|
350373
|
+
onBeforeExecution: asyncResource.bind(props.hooks.onBeforeExecution)
|
|
350374
|
+
},
|
|
350375
|
+
...props.hooks?.onExit && {
|
|
350376
|
+
onExit: asyncResource.bind(props.hooks.onExit)
|
|
350318
350377
|
},
|
|
350319
|
-
...props.hooks?.onExit && { onExit: props.hooks.onExit },
|
|
350320
350378
|
onTrace: ({ trace: trace2, iteration }) => {
|
|
350321
350379
|
if (trace2.type === "code_execution") {} else if (trace2.type === "llm_call_started") {} else if (trace2.type === "llm_call_success") {
|
|
350322
350380
|
iterationSpan?.setAttribute("autonomous.code", trace2.code);
|
|
@@ -350328,7 +350386,9 @@ Always prefer information from the knowledge bases over general knowledge when a
|
|
|
350328
350386
|
"property.value": trace2.value
|
|
350329
350387
|
});
|
|
350330
350388
|
}
|
|
350331
|
-
props.hooks?.onTrace
|
|
350389
|
+
if (props.hooks?.onTrace) {
|
|
350390
|
+
return asyncResource.runInAsyncScope(() => props.hooks.onTrace({ trace: trace2, iteration }));
|
|
350391
|
+
}
|
|
350332
350392
|
},
|
|
350333
350393
|
onIterationEnd: async (iteration, controller) => {
|
|
350334
350394
|
iterationSpan?.setAttributes({
|
|
@@ -350372,8 +350432,9 @@ ${iteration.status.execution_error.stack}`;
|
|
|
350372
350432
|
});
|
|
350373
350433
|
}
|
|
350374
350434
|
iterationSpan?.end();
|
|
350375
|
-
|
|
350376
|
-
|
|
350435
|
+
if (props.hooks?.onIterationEnd) {
|
|
350436
|
+
return await asyncResource.runInAsyncScope(() => props.hooks.onIterationEnd(iteration, controller));
|
|
350437
|
+
}
|
|
350377
350438
|
}
|
|
350378
350439
|
});
|
|
350379
350440
|
execSpan.setAttribute("autonomous.execution_id", execution.context.id);
|
|
@@ -375586,7 +375647,7 @@ var init_Separator = __esm(async () => {
|
|
|
375586
375647
|
var require_package3 = __commonJS((exports, module) => {
|
|
375587
375648
|
module.exports = {
|
|
375588
375649
|
name: "@botpress/adk",
|
|
375589
|
-
version: "1.3.
|
|
375650
|
+
version: "1.3.5",
|
|
375590
375651
|
description: "Core ADK library for building AI agents on Botpress",
|
|
375591
375652
|
type: "module",
|
|
375592
375653
|
main: "dist/index.js",
|
|
@@ -375633,7 +375694,7 @@ var require_package3 = __commonJS((exports, module) => {
|
|
|
375633
375694
|
"@botpress/cli": "^4.20",
|
|
375634
375695
|
"@botpress/client": "1.26.0",
|
|
375635
375696
|
"@botpress/cognitive": "0.1.47",
|
|
375636
|
-
"@botpress/runtime": "^1.3.
|
|
375697
|
+
"@botpress/runtime": "^1.3.5",
|
|
375637
375698
|
"@botpress/sdk": "4.17.0",
|
|
375638
375699
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
375639
375700
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -378838,7 +378899,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
378838
378899
|
`));
|
|
378839
378900
|
}
|
|
378840
378901
|
}
|
|
378841
|
-
var semver, EXPECTED_RUNTIME_VERSION = "1.3.
|
|
378902
|
+
var semver, EXPECTED_RUNTIME_VERSION = "1.3.5";
|
|
378842
378903
|
var init_runtime_version_check = __esm(() => {
|
|
378843
378904
|
init_source();
|
|
378844
378905
|
semver = __toESM(require_semver3(), 1);
|
|
@@ -385694,6 +385755,896 @@ var init_adk_remove = __esm(async () => {
|
|
|
385694
385755
|
jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
|
|
385695
385756
|
});
|
|
385696
385757
|
|
|
385758
|
+
// src/components/Table.tsx
|
|
385759
|
+
function Table({ columns, data, getKey }) {
|
|
385760
|
+
const totalWidth = columns.reduce((sum, col) => sum + col.width, 0);
|
|
385761
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
385762
|
+
flexDirection: "column",
|
|
385763
|
+
children: [
|
|
385764
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
385765
|
+
children: columns.map((col, idx) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
385766
|
+
width: col.width,
|
|
385767
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
385768
|
+
bold: true,
|
|
385769
|
+
dimColor: true,
|
|
385770
|
+
children: col.header
|
|
385771
|
+
}, undefined, false, undefined, this)
|
|
385772
|
+
}, idx, false, undefined, this))
|
|
385773
|
+
}, undefined, false, undefined, this),
|
|
385774
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text, {
|
|
385775
|
+
dimColor: true,
|
|
385776
|
+
children: "\u2500".repeat(totalWidth)
|
|
385777
|
+
}, undefined, false, undefined, this),
|
|
385778
|
+
data.map((row, idx) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
385779
|
+
children: columns.map((col, colIdx) => /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
385780
|
+
width: col.width,
|
|
385781
|
+
children: col.render(row)
|
|
385782
|
+
}, colIdx, false, undefined, this))
|
|
385783
|
+
}, getKey(row, idx), false, undefined, this))
|
|
385784
|
+
]
|
|
385785
|
+
}, undefined, true, undefined, this);
|
|
385786
|
+
}
|
|
385787
|
+
var jsx_dev_runtime25;
|
|
385788
|
+
var init_Table = __esm(async () => {
|
|
385789
|
+
await init_build2();
|
|
385790
|
+
jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
|
|
385791
|
+
});
|
|
385792
|
+
|
|
385793
|
+
// src/commands/adk-search.tsx
|
|
385794
|
+
var exports_adk_search = {};
|
|
385795
|
+
__export(exports_adk_search, {
|
|
385796
|
+
adkSearch: () => adkSearch
|
|
385797
|
+
});
|
|
385798
|
+
async function adkSearch(query, options = {}) {
|
|
385799
|
+
const { IntegrationOperations: IntegrationOperations2 } = await Promise.resolve().then(() => (init_dist11(), exports_dist6));
|
|
385800
|
+
const format4 = options.format || "table";
|
|
385801
|
+
const limit = options.limit || 20;
|
|
385802
|
+
const SearchIntegrations = () => {
|
|
385803
|
+
const [status, setStatus] = import_react43.default.useState("searching");
|
|
385804
|
+
const [results, setResults] = import_react43.default.useState([]);
|
|
385805
|
+
const [error, setError] = import_react43.default.useState("");
|
|
385806
|
+
import_react43.default.useEffect(() => {
|
|
385807
|
+
const runSearch = async () => {
|
|
385808
|
+
try {
|
|
385809
|
+
const operations = new IntegrationOperations2;
|
|
385810
|
+
const searchResults = await operations.searchIntegrations(query);
|
|
385811
|
+
const limitedResults = searchResults.slice(0, limit);
|
|
385812
|
+
setResults(limitedResults);
|
|
385813
|
+
setStatus("success");
|
|
385814
|
+
} catch (err) {
|
|
385815
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
385816
|
+
setStatus("error");
|
|
385817
|
+
}
|
|
385818
|
+
};
|
|
385819
|
+
runSearch();
|
|
385820
|
+
}, []);
|
|
385821
|
+
if (status === "searching") {
|
|
385822
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385823
|
+
flexDirection: "column",
|
|
385824
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385825
|
+
children: [
|
|
385826
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385827
|
+
color: "cyan",
|
|
385828
|
+
children: "\u27A4"
|
|
385829
|
+
}, undefined, false, undefined, this),
|
|
385830
|
+
" Searching integrations for",
|
|
385831
|
+
" ",
|
|
385832
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385833
|
+
bold: true,
|
|
385834
|
+
children: [
|
|
385835
|
+
'"',
|
|
385836
|
+
query,
|
|
385837
|
+
'"'
|
|
385838
|
+
]
|
|
385839
|
+
}, undefined, true, undefined, this),
|
|
385840
|
+
"..."
|
|
385841
|
+
]
|
|
385842
|
+
}, undefined, true, undefined, this)
|
|
385843
|
+
}, undefined, false, undefined, this);
|
|
385844
|
+
}
|
|
385845
|
+
if (status === "error") {
|
|
385846
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385847
|
+
flexDirection: "column",
|
|
385848
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385849
|
+
color: "red",
|
|
385850
|
+
children: [
|
|
385851
|
+
"\u2717 Failed to search integrations: ",
|
|
385852
|
+
error
|
|
385853
|
+
]
|
|
385854
|
+
}, undefined, true, undefined, this)
|
|
385855
|
+
}, undefined, false, undefined, this);
|
|
385856
|
+
}
|
|
385857
|
+
if (status === "success") {
|
|
385858
|
+
if (results.length === 0) {
|
|
385859
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385860
|
+
flexDirection: "column",
|
|
385861
|
+
children: [
|
|
385862
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385863
|
+
color: "yellow",
|
|
385864
|
+
children: [
|
|
385865
|
+
'No integrations found matching "',
|
|
385866
|
+
query,
|
|
385867
|
+
'"'
|
|
385868
|
+
]
|
|
385869
|
+
}, undefined, true, undefined, this),
|
|
385870
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385871
|
+
marginTop: 1,
|
|
385872
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385873
|
+
dimColor: true,
|
|
385874
|
+
children: [
|
|
385875
|
+
"Try a different search term or run",
|
|
385876
|
+
" ",
|
|
385877
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385878
|
+
color: "cyan",
|
|
385879
|
+
children: "adk list --available"
|
|
385880
|
+
}, undefined, false, undefined, this),
|
|
385881
|
+
" to see all integrations"
|
|
385882
|
+
]
|
|
385883
|
+
}, undefined, true, undefined, this)
|
|
385884
|
+
}, undefined, false, undefined, this)
|
|
385885
|
+
]
|
|
385886
|
+
}, undefined, true, undefined, this);
|
|
385887
|
+
}
|
|
385888
|
+
if (format4 === "json") {
|
|
385889
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385890
|
+
flexDirection: "column",
|
|
385891
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385892
|
+
children: JSON.stringify(results, null, 2)
|
|
385893
|
+
}, undefined, false, undefined, this)
|
|
385894
|
+
}, undefined, false, undefined, this);
|
|
385895
|
+
}
|
|
385896
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385897
|
+
flexDirection: "column",
|
|
385898
|
+
children: [
|
|
385899
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385900
|
+
bold: true,
|
|
385901
|
+
children: [
|
|
385902
|
+
"Found ",
|
|
385903
|
+
results.length,
|
|
385904
|
+
" integration",
|
|
385905
|
+
results.length !== 1 ? "s" : "",
|
|
385906
|
+
" ",
|
|
385907
|
+
'matching "',
|
|
385908
|
+
query,
|
|
385909
|
+
'"'
|
|
385910
|
+
]
|
|
385911
|
+
}, undefined, true, undefined, this),
|
|
385912
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385913
|
+
marginTop: 1,
|
|
385914
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Table, {
|
|
385915
|
+
columns: [
|
|
385916
|
+
{
|
|
385917
|
+
header: "Name",
|
|
385918
|
+
width: 25,
|
|
385919
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385920
|
+
color: "cyan",
|
|
385921
|
+
children: row.name
|
|
385922
|
+
}, undefined, false, undefined, this)
|
|
385923
|
+
},
|
|
385924
|
+
{
|
|
385925
|
+
header: "Version",
|
|
385926
|
+
width: 12,
|
|
385927
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385928
|
+
dimColor: true,
|
|
385929
|
+
children: row.version
|
|
385930
|
+
}, undefined, false, undefined, this)
|
|
385931
|
+
},
|
|
385932
|
+
{
|
|
385933
|
+
header: "Title",
|
|
385934
|
+
width: 25,
|
|
385935
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385936
|
+
children: row.title || "-"
|
|
385937
|
+
}, undefined, false, undefined, this)
|
|
385938
|
+
},
|
|
385939
|
+
{
|
|
385940
|
+
header: "Description",
|
|
385941
|
+
width: 40,
|
|
385942
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385943
|
+
dimColor: true,
|
|
385944
|
+
children: row.description ? row.description.length > 37 ? row.description.slice(0, 37) + "..." : row.description : "-"
|
|
385945
|
+
}, undefined, false, undefined, this)
|
|
385946
|
+
}
|
|
385947
|
+
],
|
|
385948
|
+
data: results,
|
|
385949
|
+
getKey: (row) => row.name
|
|
385950
|
+
}, undefined, false, undefined, this)
|
|
385951
|
+
}, undefined, false, undefined, this),
|
|
385952
|
+
results.length >= limit && /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385953
|
+
marginTop: 1,
|
|
385954
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385955
|
+
dimColor: true,
|
|
385956
|
+
children: [
|
|
385957
|
+
"Showing first ",
|
|
385958
|
+
limit,
|
|
385959
|
+
" results. Use",
|
|
385960
|
+
" ",
|
|
385961
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385962
|
+
color: "cyan",
|
|
385963
|
+
children: "--limit"
|
|
385964
|
+
}, undefined, false, undefined, this),
|
|
385965
|
+
" to see more."
|
|
385966
|
+
]
|
|
385967
|
+
}, undefined, true, undefined, this)
|
|
385968
|
+
}, undefined, false, undefined, this),
|
|
385969
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
385970
|
+
marginTop: 1,
|
|
385971
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385972
|
+
dimColor: true,
|
|
385973
|
+
children: [
|
|
385974
|
+
"Run ",
|
|
385975
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text, {
|
|
385976
|
+
color: "cyan",
|
|
385977
|
+
children: "adk info <name>"
|
|
385978
|
+
}, undefined, false, undefined, this),
|
|
385979
|
+
" to see integration details"
|
|
385980
|
+
]
|
|
385981
|
+
}, undefined, true, undefined, this)
|
|
385982
|
+
}, undefined, false, undefined, this)
|
|
385983
|
+
]
|
|
385984
|
+
}, undefined, true, undefined, this);
|
|
385985
|
+
}
|
|
385986
|
+
return null;
|
|
385987
|
+
};
|
|
385988
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(SearchIntegrations, {}, undefined, false, undefined, this));
|
|
385989
|
+
}
|
|
385990
|
+
var import_react43, jsx_dev_runtime26;
|
|
385991
|
+
var init_adk_search = __esm(async () => {
|
|
385992
|
+
await __promiseAll([
|
|
385993
|
+
init_build2(),
|
|
385994
|
+
init_Table()
|
|
385995
|
+
]);
|
|
385996
|
+
import_react43 = __toESM(require_react(), 1);
|
|
385997
|
+
jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
|
|
385998
|
+
});
|
|
385999
|
+
|
|
386000
|
+
// src/commands/adk-list.tsx
|
|
386001
|
+
var exports_adk_list = {};
|
|
386002
|
+
__export(exports_adk_list, {
|
|
386003
|
+
adkList: () => adkList
|
|
386004
|
+
});
|
|
386005
|
+
async function adkList(options = {}) {
|
|
386006
|
+
const { IntegrationOperations: IntegrationOperations2 } = await Promise.resolve().then(() => (init_dist11(), exports_dist6));
|
|
386007
|
+
const format4 = options.format || "table";
|
|
386008
|
+
const limit = options.limit || 50;
|
|
386009
|
+
const ListIntegrations = () => {
|
|
386010
|
+
const [status, setStatus] = import_react44.default.useState("loading");
|
|
386011
|
+
const [integrations, setIntegrations] = import_react44.default.useState([]);
|
|
386012
|
+
const [error, setError] = import_react44.default.useState("");
|
|
386013
|
+
import_react44.default.useEffect(() => {
|
|
386014
|
+
const loadIntegrations = async () => {
|
|
386015
|
+
try {
|
|
386016
|
+
let projectPath;
|
|
386017
|
+
if (!options.available) {
|
|
386018
|
+
try {
|
|
386019
|
+
projectPath = await findAgentRootOrFail(process.cwd());
|
|
386020
|
+
} catch {
|
|
386021
|
+
setError("Not in an ADK agent directory. Run from an agent project or use --available to list all integrations.");
|
|
386022
|
+
setStatus("error");
|
|
386023
|
+
return;
|
|
386024
|
+
}
|
|
386025
|
+
}
|
|
386026
|
+
const operations = new IntegrationOperations2({
|
|
386027
|
+
projectPath
|
|
386028
|
+
});
|
|
386029
|
+
if (options.available) {
|
|
386030
|
+
const available = await operations.getAllAvailableIntegrations();
|
|
386031
|
+
const limitedResults = available.slice(0, limit);
|
|
386032
|
+
setIntegrations(limitedResults.map((i2) => ({
|
|
386033
|
+
name: i2.name,
|
|
386034
|
+
version: i2.version,
|
|
386035
|
+
title: i2.title,
|
|
386036
|
+
status: "available"
|
|
386037
|
+
})));
|
|
386038
|
+
} else {
|
|
386039
|
+
const installed = await operations.listIntegrations();
|
|
386040
|
+
const installedSet = new Set(installed.map((i2) => i2.name));
|
|
386041
|
+
setIntegrations(installed.map((i2) => ({
|
|
386042
|
+
alias: i2.alias,
|
|
386043
|
+
name: i2.name,
|
|
386044
|
+
version: i2.version,
|
|
386045
|
+
status: "installed"
|
|
386046
|
+
})));
|
|
386047
|
+
}
|
|
386048
|
+
setStatus("success");
|
|
386049
|
+
} catch (err) {
|
|
386050
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
386051
|
+
setStatus("error");
|
|
386052
|
+
}
|
|
386053
|
+
};
|
|
386054
|
+
loadIntegrations();
|
|
386055
|
+
}, []);
|
|
386056
|
+
if (status === "loading") {
|
|
386057
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386058
|
+
flexDirection: "column",
|
|
386059
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386060
|
+
children: [
|
|
386061
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386062
|
+
color: "cyan",
|
|
386063
|
+
children: "\u27A4"
|
|
386064
|
+
}, undefined, false, undefined, this),
|
|
386065
|
+
" Loading integrations..."
|
|
386066
|
+
]
|
|
386067
|
+
}, undefined, true, undefined, this)
|
|
386068
|
+
}, undefined, false, undefined, this);
|
|
386069
|
+
}
|
|
386070
|
+
if (status === "error") {
|
|
386071
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386072
|
+
flexDirection: "column",
|
|
386073
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386074
|
+
color: "red",
|
|
386075
|
+
children: [
|
|
386076
|
+
"\u2717 Failed to list integrations: ",
|
|
386077
|
+
error
|
|
386078
|
+
]
|
|
386079
|
+
}, undefined, true, undefined, this)
|
|
386080
|
+
}, undefined, false, undefined, this);
|
|
386081
|
+
}
|
|
386082
|
+
if (status === "success") {
|
|
386083
|
+
if (integrations.length === 0) {
|
|
386084
|
+
if (options.available) {
|
|
386085
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386086
|
+
flexDirection: "column",
|
|
386087
|
+
children: [
|
|
386088
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386089
|
+
color: "yellow",
|
|
386090
|
+
children: "No integrations available"
|
|
386091
|
+
}, undefined, false, undefined, this),
|
|
386092
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386093
|
+
marginTop: 1,
|
|
386094
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386095
|
+
dimColor: true,
|
|
386096
|
+
children: [
|
|
386097
|
+
"Try running ",
|
|
386098
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386099
|
+
color: "cyan",
|
|
386100
|
+
children: "adk hub refresh"
|
|
386101
|
+
}, undefined, false, undefined, this),
|
|
386102
|
+
" to update the cache"
|
|
386103
|
+
]
|
|
386104
|
+
}, undefined, true, undefined, this)
|
|
386105
|
+
}, undefined, false, undefined, this)
|
|
386106
|
+
]
|
|
386107
|
+
}, undefined, true, undefined, this);
|
|
386108
|
+
} else {
|
|
386109
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386110
|
+
flexDirection: "column",
|
|
386111
|
+
children: [
|
|
386112
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386113
|
+
color: "yellow",
|
|
386114
|
+
children: "No integrations installed"
|
|
386115
|
+
}, undefined, false, undefined, this),
|
|
386116
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386117
|
+
marginTop: 1,
|
|
386118
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386119
|
+
dimColor: true,
|
|
386120
|
+
children: [
|
|
386121
|
+
"Run ",
|
|
386122
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386123
|
+
color: "cyan",
|
|
386124
|
+
children: "adk add <integration>"
|
|
386125
|
+
}, undefined, false, undefined, this),
|
|
386126
|
+
" to add integrations"
|
|
386127
|
+
]
|
|
386128
|
+
}, undefined, true, undefined, this)
|
|
386129
|
+
}, undefined, false, undefined, this)
|
|
386130
|
+
]
|
|
386131
|
+
}, undefined, true, undefined, this);
|
|
386132
|
+
}
|
|
386133
|
+
}
|
|
386134
|
+
if (format4 === "json") {
|
|
386135
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386136
|
+
flexDirection: "column",
|
|
386137
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386138
|
+
children: JSON.stringify(integrations, null, 2)
|
|
386139
|
+
}, undefined, false, undefined, this)
|
|
386140
|
+
}, undefined, false, undefined, this);
|
|
386141
|
+
}
|
|
386142
|
+
const title = options.available ? `Available Integrations (${integrations.length}${integrations.length >= limit ? `+` : ""})` : `Installed Integrations (${integrations.length})`;
|
|
386143
|
+
const columns = options.available ? [
|
|
386144
|
+
{
|
|
386145
|
+
header: "Name",
|
|
386146
|
+
width: 30,
|
|
386147
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386148
|
+
children: row.name
|
|
386149
|
+
}, undefined, false, undefined, this)
|
|
386150
|
+
},
|
|
386151
|
+
{
|
|
386152
|
+
header: "Version",
|
|
386153
|
+
width: 15,
|
|
386154
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386155
|
+
dimColor: true,
|
|
386156
|
+
children: row.version
|
|
386157
|
+
}, undefined, false, undefined, this)
|
|
386158
|
+
},
|
|
386159
|
+
{
|
|
386160
|
+
header: "Title",
|
|
386161
|
+
width: 35,
|
|
386162
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386163
|
+
dimColor: true,
|
|
386164
|
+
children: row.title || "-"
|
|
386165
|
+
}, undefined, false, undefined, this)
|
|
386166
|
+
}
|
|
386167
|
+
] : [
|
|
386168
|
+
{
|
|
386169
|
+
header: "Alias",
|
|
386170
|
+
width: 20,
|
|
386171
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386172
|
+
color: "cyan",
|
|
386173
|
+
children: row.alias
|
|
386174
|
+
}, undefined, false, undefined, this)
|
|
386175
|
+
},
|
|
386176
|
+
{
|
|
386177
|
+
header: "Name",
|
|
386178
|
+
width: 30,
|
|
386179
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386180
|
+
children: row.name
|
|
386181
|
+
}, undefined, false, undefined, this)
|
|
386182
|
+
},
|
|
386183
|
+
{
|
|
386184
|
+
header: "Version",
|
|
386185
|
+
width: 15,
|
|
386186
|
+
render: (row) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386187
|
+
dimColor: true,
|
|
386188
|
+
children: row.version
|
|
386189
|
+
}, undefined, false, undefined, this)
|
|
386190
|
+
}
|
|
386191
|
+
];
|
|
386192
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386193
|
+
flexDirection: "column",
|
|
386194
|
+
children: [
|
|
386195
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386196
|
+
bold: true,
|
|
386197
|
+
children: title
|
|
386198
|
+
}, undefined, false, undefined, this),
|
|
386199
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386200
|
+
marginTop: 1,
|
|
386201
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Table, {
|
|
386202
|
+
columns,
|
|
386203
|
+
data: integrations,
|
|
386204
|
+
getKey: (row) => row.alias || row.name
|
|
386205
|
+
}, undefined, false, undefined, this)
|
|
386206
|
+
}, undefined, false, undefined, this),
|
|
386207
|
+
integrations.length >= limit && /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386208
|
+
marginTop: 1,
|
|
386209
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386210
|
+
dimColor: true,
|
|
386211
|
+
children: [
|
|
386212
|
+
"Showing first ",
|
|
386213
|
+
limit,
|
|
386214
|
+
" results. Use",
|
|
386215
|
+
" ",
|
|
386216
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386217
|
+
color: "cyan",
|
|
386218
|
+
children: "--limit"
|
|
386219
|
+
}, undefined, false, undefined, this),
|
|
386220
|
+
" to see more."
|
|
386221
|
+
]
|
|
386222
|
+
}, undefined, true, undefined, this)
|
|
386223
|
+
}, undefined, false, undefined, this),
|
|
386224
|
+
!options.available && /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386225
|
+
marginTop: 1,
|
|
386226
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386227
|
+
dimColor: true,
|
|
386228
|
+
children: [
|
|
386229
|
+
"Run ",
|
|
386230
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386231
|
+
color: "cyan",
|
|
386232
|
+
children: "adk list --available"
|
|
386233
|
+
}, undefined, false, undefined, this),
|
|
386234
|
+
" to see all available integrations"
|
|
386235
|
+
]
|
|
386236
|
+
}, undefined, true, undefined, this)
|
|
386237
|
+
}, undefined, false, undefined, this),
|
|
386238
|
+
options.available && /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
386239
|
+
marginTop: 1,
|
|
386240
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386241
|
+
dimColor: true,
|
|
386242
|
+
children: [
|
|
386243
|
+
"Run ",
|
|
386244
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text, {
|
|
386245
|
+
color: "cyan",
|
|
386246
|
+
children: "adk add <name>"
|
|
386247
|
+
}, undefined, false, undefined, this),
|
|
386248
|
+
" to install an integration"
|
|
386249
|
+
]
|
|
386250
|
+
}, undefined, true, undefined, this)
|
|
386251
|
+
}, undefined, false, undefined, this)
|
|
386252
|
+
]
|
|
386253
|
+
}, undefined, true, undefined, this);
|
|
386254
|
+
}
|
|
386255
|
+
return null;
|
|
386256
|
+
};
|
|
386257
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(ListIntegrations, {}, undefined, false, undefined, this));
|
|
386258
|
+
}
|
|
386259
|
+
var import_react44, jsx_dev_runtime27;
|
|
386260
|
+
var init_adk_list = __esm(async () => {
|
|
386261
|
+
init_agent_root();
|
|
386262
|
+
await __promiseAll([
|
|
386263
|
+
init_build2(),
|
|
386264
|
+
init_Table()
|
|
386265
|
+
]);
|
|
386266
|
+
import_react44 = __toESM(require_react(), 1);
|
|
386267
|
+
jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
|
|
386268
|
+
});
|
|
386269
|
+
|
|
386270
|
+
// src/commands/adk-integration.tsx
|
|
386271
|
+
var exports_adk_integration = {};
|
|
386272
|
+
__export(exports_adk_integration, {
|
|
386273
|
+
adkIntegrationInfo: () => adkIntegrationInfo
|
|
386274
|
+
});
|
|
386275
|
+
function renderSchema(schema) {
|
|
386276
|
+
try {
|
|
386277
|
+
if (schema.type === "object" && schema.properties) {
|
|
386278
|
+
const required2 = schema.required || [];
|
|
386279
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386280
|
+
marginLeft: 2,
|
|
386281
|
+
flexDirection: "column",
|
|
386282
|
+
children: Object.entries(schema.properties).map(([key, prop]) => {
|
|
386283
|
+
const isRequired = required2.includes(key);
|
|
386284
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386285
|
+
dimColor: true,
|
|
386286
|
+
children: [
|
|
386287
|
+
"\u2022 ",
|
|
386288
|
+
key,
|
|
386289
|
+
isRequired && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386290
|
+
color: "yellow",
|
|
386291
|
+
children: "*"
|
|
386292
|
+
}, undefined, false, undefined, this),
|
|
386293
|
+
":",
|
|
386294
|
+
" ",
|
|
386295
|
+
prop.type || "any",
|
|
386296
|
+
prop.description && ` - ${prop.description}`
|
|
386297
|
+
]
|
|
386298
|
+
}, key, true, undefined, this);
|
|
386299
|
+
})
|
|
386300
|
+
}, undefined, false, undefined, this);
|
|
386301
|
+
}
|
|
386302
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386303
|
+
marginLeft: 2,
|
|
386304
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386305
|
+
dimColor: true,
|
|
386306
|
+
children: [
|
|
386307
|
+
"Type: ",
|
|
386308
|
+
schema.type || "any"
|
|
386309
|
+
]
|
|
386310
|
+
}, undefined, true, undefined, this)
|
|
386311
|
+
}, undefined, false, undefined, this);
|
|
386312
|
+
} catch {
|
|
386313
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386314
|
+
marginLeft: 2,
|
|
386315
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386316
|
+
dimColor: true,
|
|
386317
|
+
children: JSON.stringify(schema)
|
|
386318
|
+
}, undefined, false, undefined, this)
|
|
386319
|
+
}, undefined, false, undefined, this);
|
|
386320
|
+
}
|
|
386321
|
+
}
|
|
386322
|
+
async function adkIntegrationInfo(integrationName, options = {}) {
|
|
386323
|
+
const { IntegrationManager: IntegrationManager2 } = await Promise.resolve().then(() => (init_dist11(), exports_dist6));
|
|
386324
|
+
const format4 = options.format || "table";
|
|
386325
|
+
const showAll = options.full || !options.actions && !options.channels && !options.events;
|
|
386326
|
+
const IntegrationInfo = () => {
|
|
386327
|
+
const [status, setStatus] = import_react45.default.useState("loading");
|
|
386328
|
+
const [integration, setIntegration] = import_react45.default.useState(null);
|
|
386329
|
+
const [error, setError] = import_react45.default.useState("");
|
|
386330
|
+
import_react45.default.useEffect(() => {
|
|
386331
|
+
const loadIntegration = async () => {
|
|
386332
|
+
try {
|
|
386333
|
+
const manager = new IntegrationManager2;
|
|
386334
|
+
const definition = await manager.fetchIntegration({
|
|
386335
|
+
name: integrationName,
|
|
386336
|
+
version: "latest",
|
|
386337
|
+
fullName: integrationName
|
|
386338
|
+
});
|
|
386339
|
+
setIntegration(definition);
|
|
386340
|
+
setStatus("success");
|
|
386341
|
+
} catch (err) {
|
|
386342
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
386343
|
+
setStatus("error");
|
|
386344
|
+
}
|
|
386345
|
+
};
|
|
386346
|
+
loadIntegration();
|
|
386347
|
+
}, []);
|
|
386348
|
+
if (status === "loading") {
|
|
386349
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386350
|
+
flexDirection: "column",
|
|
386351
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386352
|
+
children: [
|
|
386353
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386354
|
+
color: "cyan",
|
|
386355
|
+
children: "\u27A4"
|
|
386356
|
+
}, undefined, false, undefined, this),
|
|
386357
|
+
" Loading integration",
|
|
386358
|
+
" ",
|
|
386359
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386360
|
+
bold: true,
|
|
386361
|
+
children: integrationName
|
|
386362
|
+
}, undefined, false, undefined, this),
|
|
386363
|
+
"..."
|
|
386364
|
+
]
|
|
386365
|
+
}, undefined, true, undefined, this)
|
|
386366
|
+
}, undefined, false, undefined, this);
|
|
386367
|
+
}
|
|
386368
|
+
if (status === "error") {
|
|
386369
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386370
|
+
flexDirection: "column",
|
|
386371
|
+
children: [
|
|
386372
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386373
|
+
color: "red",
|
|
386374
|
+
children: [
|
|
386375
|
+
"\u2717 Failed to load integration: ",
|
|
386376
|
+
error
|
|
386377
|
+
]
|
|
386378
|
+
}, undefined, true, undefined, this),
|
|
386379
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386380
|
+
marginTop: 1,
|
|
386381
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386382
|
+
dimColor: true,
|
|
386383
|
+
children: [
|
|
386384
|
+
"Run ",
|
|
386385
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386386
|
+
color: "cyan",
|
|
386387
|
+
children: [
|
|
386388
|
+
"adk search ",
|
|
386389
|
+
integrationName
|
|
386390
|
+
]
|
|
386391
|
+
}, undefined, true, undefined, this),
|
|
386392
|
+
" to find similar integrations"
|
|
386393
|
+
]
|
|
386394
|
+
}, undefined, true, undefined, this)
|
|
386395
|
+
}, undefined, false, undefined, this)
|
|
386396
|
+
]
|
|
386397
|
+
}, undefined, true, undefined, this);
|
|
386398
|
+
}
|
|
386399
|
+
if (status === "success" && integration) {
|
|
386400
|
+
if (format4 === "json") {
|
|
386401
|
+
const output = {
|
|
386402
|
+
name: integration.name,
|
|
386403
|
+
version: integration.version,
|
|
386404
|
+
title: integration.title,
|
|
386405
|
+
description: integration.description
|
|
386406
|
+
};
|
|
386407
|
+
if (options.actions || showAll) {
|
|
386408
|
+
output.actions = integration.actions;
|
|
386409
|
+
}
|
|
386410
|
+
if (options.channels || showAll) {
|
|
386411
|
+
output.channels = integration.channels;
|
|
386412
|
+
}
|
|
386413
|
+
if (options.events || showAll) {
|
|
386414
|
+
output.events = integration.events;
|
|
386415
|
+
}
|
|
386416
|
+
if (showAll) {
|
|
386417
|
+
output.configuration = integration.configuration;
|
|
386418
|
+
output.configurations = integration.configurations;
|
|
386419
|
+
}
|
|
386420
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386421
|
+
flexDirection: "column",
|
|
386422
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386423
|
+
children: JSON.stringify(output, null, 2)
|
|
386424
|
+
}, undefined, false, undefined, this)
|
|
386425
|
+
}, undefined, false, undefined, this);
|
|
386426
|
+
}
|
|
386427
|
+
const actionsCount = integration.actions ? Object.keys(integration.actions).length : 0;
|
|
386428
|
+
const channelsCount = integration.channels ? Object.keys(integration.channels).length : 0;
|
|
386429
|
+
const eventsCount = integration.events ? Object.keys(integration.events).length : 0;
|
|
386430
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386431
|
+
flexDirection: "column",
|
|
386432
|
+
children: [
|
|
386433
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386434
|
+
bold: true,
|
|
386435
|
+
children: [
|
|
386436
|
+
integration.title || integration.name,
|
|
386437
|
+
" ",
|
|
386438
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386439
|
+
dimColor: true,
|
|
386440
|
+
children: [
|
|
386441
|
+
"v",
|
|
386442
|
+
integration.version
|
|
386443
|
+
]
|
|
386444
|
+
}, undefined, true, undefined, this)
|
|
386445
|
+
]
|
|
386446
|
+
}, undefined, true, undefined, this),
|
|
386447
|
+
integration.description && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386448
|
+
marginTop: 1,
|
|
386449
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386450
|
+
dimColor: true,
|
|
386451
|
+
children: integration.description
|
|
386452
|
+
}, undefined, false, undefined, this)
|
|
386453
|
+
}, undefined, false, undefined, this),
|
|
386454
|
+
showAll && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386455
|
+
marginTop: 1,
|
|
386456
|
+
flexDirection: "column",
|
|
386457
|
+
children: [
|
|
386458
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386459
|
+
dimColor: true,
|
|
386460
|
+
children: [
|
|
386461
|
+
"\u2022 ",
|
|
386462
|
+
actionsCount,
|
|
386463
|
+
" action",
|
|
386464
|
+
actionsCount !== 1 ? "s" : ""
|
|
386465
|
+
]
|
|
386466
|
+
}, undefined, true, undefined, this),
|
|
386467
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386468
|
+
dimColor: true,
|
|
386469
|
+
children: [
|
|
386470
|
+
"\u2022 ",
|
|
386471
|
+
channelsCount,
|
|
386472
|
+
" channel",
|
|
386473
|
+
channelsCount !== 1 ? "s" : ""
|
|
386474
|
+
]
|
|
386475
|
+
}, undefined, true, undefined, this),
|
|
386476
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386477
|
+
dimColor: true,
|
|
386478
|
+
children: [
|
|
386479
|
+
"\u2022 ",
|
|
386480
|
+
eventsCount,
|
|
386481
|
+
" event",
|
|
386482
|
+
eventsCount !== 1 ? "s" : ""
|
|
386483
|
+
]
|
|
386484
|
+
}, undefined, true, undefined, this)
|
|
386485
|
+
]
|
|
386486
|
+
}, undefined, true, undefined, this),
|
|
386487
|
+
(options.actions || showAll) && integration.actions && Object.keys(integration.actions).length > 0 && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386488
|
+
marginTop: 1,
|
|
386489
|
+
flexDirection: "column",
|
|
386490
|
+
children: [
|
|
386491
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386492
|
+
bold: true,
|
|
386493
|
+
children: "Actions"
|
|
386494
|
+
}, undefined, false, undefined, this),
|
|
386495
|
+
Object.entries(integration.actions).map(([actionName, action]) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386496
|
+
marginTop: 1,
|
|
386497
|
+
flexDirection: "column",
|
|
386498
|
+
children: [
|
|
386499
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386500
|
+
color: "cyan",
|
|
386501
|
+
children: [
|
|
386502
|
+
actionName,
|
|
386503
|
+
action.title && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386504
|
+
dimColor: true,
|
|
386505
|
+
children: [
|
|
386506
|
+
" - ",
|
|
386507
|
+
action.title
|
|
386508
|
+
]
|
|
386509
|
+
}, undefined, true, undefined, this)
|
|
386510
|
+
]
|
|
386511
|
+
}, undefined, true, undefined, this),
|
|
386512
|
+
action.description && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386513
|
+
dimColor: true,
|
|
386514
|
+
children: [
|
|
386515
|
+
" ",
|
|
386516
|
+
action.description
|
|
386517
|
+
]
|
|
386518
|
+
}, undefined, true, undefined, this),
|
|
386519
|
+
action.input?.schema && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386520
|
+
marginLeft: 2,
|
|
386521
|
+
flexDirection: "column",
|
|
386522
|
+
children: [
|
|
386523
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386524
|
+
dimColor: true,
|
|
386525
|
+
children: "Input:"
|
|
386526
|
+
}, undefined, false, undefined, this),
|
|
386527
|
+
renderSchema(action.input.schema)
|
|
386528
|
+
]
|
|
386529
|
+
}, undefined, true, undefined, this),
|
|
386530
|
+
action.output?.schema && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386531
|
+
marginLeft: 2,
|
|
386532
|
+
flexDirection: "column",
|
|
386533
|
+
children: [
|
|
386534
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386535
|
+
dimColor: true,
|
|
386536
|
+
children: "Output:"
|
|
386537
|
+
}, undefined, false, undefined, this),
|
|
386538
|
+
renderSchema(action.output.schema)
|
|
386539
|
+
]
|
|
386540
|
+
}, undefined, true, undefined, this)
|
|
386541
|
+
]
|
|
386542
|
+
}, actionName, true, undefined, this))
|
|
386543
|
+
]
|
|
386544
|
+
}, undefined, true, undefined, this),
|
|
386545
|
+
(options.channels || showAll) && integration.channels && Object.keys(integration.channels).length > 0 && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386546
|
+
marginTop: 1,
|
|
386547
|
+
flexDirection: "column",
|
|
386548
|
+
children: [
|
|
386549
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386550
|
+
bold: true,
|
|
386551
|
+
children: "Channels"
|
|
386552
|
+
}, undefined, false, undefined, this),
|
|
386553
|
+
Object.entries(integration.channels).map(([channelName, channel]) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386554
|
+
marginTop: 1,
|
|
386555
|
+
flexDirection: "column",
|
|
386556
|
+
children: [
|
|
386557
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386558
|
+
color: "cyan",
|
|
386559
|
+
children: [
|
|
386560
|
+
channelName,
|
|
386561
|
+
channel.title && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386562
|
+
dimColor: true,
|
|
386563
|
+
children: [
|
|
386564
|
+
" - ",
|
|
386565
|
+
channel.title
|
|
386566
|
+
]
|
|
386567
|
+
}, undefined, true, undefined, this)
|
|
386568
|
+
]
|
|
386569
|
+
}, undefined, true, undefined, this),
|
|
386570
|
+
channel.description && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386571
|
+
dimColor: true,
|
|
386572
|
+
children: [
|
|
386573
|
+
" ",
|
|
386574
|
+
channel.description
|
|
386575
|
+
]
|
|
386576
|
+
}, undefined, true, undefined, this)
|
|
386577
|
+
]
|
|
386578
|
+
}, channelName, true, undefined, this))
|
|
386579
|
+
]
|
|
386580
|
+
}, undefined, true, undefined, this),
|
|
386581
|
+
(options.events || showAll) && integration.events && Object.keys(integration.events).length > 0 && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386582
|
+
marginTop: 1,
|
|
386583
|
+
flexDirection: "column",
|
|
386584
|
+
children: [
|
|
386585
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386586
|
+
bold: true,
|
|
386587
|
+
children: "Events"
|
|
386588
|
+
}, undefined, false, undefined, this),
|
|
386589
|
+
Object.entries(integration.events).map(([eventName, event2]) => /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386590
|
+
marginTop: 1,
|
|
386591
|
+
flexDirection: "column",
|
|
386592
|
+
children: [
|
|
386593
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386594
|
+
color: "cyan",
|
|
386595
|
+
children: [
|
|
386596
|
+
eventName,
|
|
386597
|
+
event2.title && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386598
|
+
dimColor: true,
|
|
386599
|
+
children: [
|
|
386600
|
+
" - ",
|
|
386601
|
+
event2.title
|
|
386602
|
+
]
|
|
386603
|
+
}, undefined, true, undefined, this)
|
|
386604
|
+
]
|
|
386605
|
+
}, undefined, true, undefined, this),
|
|
386606
|
+
event2.description && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386607
|
+
dimColor: true,
|
|
386608
|
+
children: [
|
|
386609
|
+
" ",
|
|
386610
|
+
event2.description
|
|
386611
|
+
]
|
|
386612
|
+
}, undefined, true, undefined, this)
|
|
386613
|
+
]
|
|
386614
|
+
}, eventName, true, undefined, this))
|
|
386615
|
+
]
|
|
386616
|
+
}, undefined, true, undefined, this),
|
|
386617
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
386618
|
+
marginTop: 1,
|
|
386619
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386620
|
+
dimColor: true,
|
|
386621
|
+
children: [
|
|
386622
|
+
"Run ",
|
|
386623
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text, {
|
|
386624
|
+
color: "cyan",
|
|
386625
|
+
children: [
|
|
386626
|
+
"adk add ",
|
|
386627
|
+
integration.name
|
|
386628
|
+
]
|
|
386629
|
+
}, undefined, true, undefined, this),
|
|
386630
|
+
" to install this integration"
|
|
386631
|
+
]
|
|
386632
|
+
}, undefined, true, undefined, this)
|
|
386633
|
+
}, undefined, false, undefined, this)
|
|
386634
|
+
]
|
|
386635
|
+
}, undefined, true, undefined, this);
|
|
386636
|
+
}
|
|
386637
|
+
return null;
|
|
386638
|
+
};
|
|
386639
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(IntegrationInfo, {}, undefined, false, undefined, this));
|
|
386640
|
+
}
|
|
386641
|
+
var import_react45, jsx_dev_runtime28;
|
|
386642
|
+
var init_adk_integration = __esm(async () => {
|
|
386643
|
+
await init_build2();
|
|
386644
|
+
import_react45 = __toESM(require_react(), 1);
|
|
386645
|
+
jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
|
|
386646
|
+
});
|
|
386647
|
+
|
|
385697
386648
|
// ../../node_modules/.bun/minipass@7.1.2/node_modules/minipass/dist/esm/index.js
|
|
385698
386649
|
import { EventEmitter as EventEmitter8 } from "events";
|
|
385699
386650
|
import Stream3 from "stream";
|
|
@@ -393759,7 +394710,7 @@ async function adkLink(options) {
|
|
|
393759
394710
|
return;
|
|
393760
394711
|
}
|
|
393761
394712
|
} catch (_4) {}
|
|
393762
|
-
render_default(/* @__PURE__ */
|
|
394713
|
+
render_default(/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(LinkSetup, {
|
|
393763
394714
|
initialWorkspaceId: options.workspace,
|
|
393764
394715
|
initialBotId: options.bot,
|
|
393765
394716
|
initialDevId: options.dev
|
|
@@ -393769,16 +394720,16 @@ async function adkLink(options) {
|
|
|
393769
394720
|
process.exit(1);
|
|
393770
394721
|
}
|
|
393771
394722
|
}
|
|
393772
|
-
var
|
|
394723
|
+
var import_react46, jsx_dev_runtime29, WorkspaceSelector = ({ workspaces, onSelect }) => {
|
|
393773
394724
|
const dropdownOptions = workspaces.map((ws5) => ({
|
|
393774
394725
|
id: ws5.id,
|
|
393775
394726
|
label: `${ws5.name} (${ws5.handle}) - ${ws5.plan || "Free"}`,
|
|
393776
394727
|
value: ws5.id,
|
|
393777
394728
|
description: ws5.handle
|
|
393778
394729
|
}));
|
|
393779
|
-
return /* @__PURE__ */
|
|
394730
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
393780
394731
|
flexDirection: "column",
|
|
393781
|
-
children: /* @__PURE__ */
|
|
394732
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(UserInput, {
|
|
393782
394733
|
prompt: "\uD83D\uDCCB Select a workspace (type to search):",
|
|
393783
394734
|
placeholder: "Start typing to search workspaces...",
|
|
393784
394735
|
allowTextInput: true,
|
|
@@ -393816,9 +394767,9 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393816
394767
|
description: `ID: ${bot.id}`
|
|
393817
394768
|
}))
|
|
393818
394769
|
];
|
|
393819
|
-
return /* @__PURE__ */
|
|
394770
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
393820
394771
|
flexDirection: "column",
|
|
393821
|
-
children: /* @__PURE__ */
|
|
394772
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(UserInput, {
|
|
393822
394773
|
prompt: "\uD83E\uDD16 Select a bot or create a new one (type to search):",
|
|
393823
394774
|
placeholder: "Start typing to search bots...",
|
|
393824
394775
|
allowTextInput: true,
|
|
@@ -393848,9 +394799,9 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393848
394799
|
}, undefined, false, undefined, this)
|
|
393849
394800
|
}, undefined, false, undefined, this);
|
|
393850
394801
|
}, BotNameInput = ({ onSubmit }) => {
|
|
393851
|
-
return /* @__PURE__ */
|
|
394802
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
393852
394803
|
flexDirection: "column",
|
|
393853
|
-
children: /* @__PURE__ */
|
|
394804
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(UserInput, {
|
|
393854
394805
|
prompt: "\uD83E\uDD16 Enter a name for your new bot:",
|
|
393855
394806
|
placeholder: "My awesome bot",
|
|
393856
394807
|
allowTextInput: true,
|
|
@@ -393871,15 +394822,15 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393871
394822
|
}, undefined, false, undefined, this)
|
|
393872
394823
|
}, undefined, false, undefined, this);
|
|
393873
394824
|
}, LinkSetup = ({ initialWorkspaceId, initialBotId, initialDevId }) => {
|
|
393874
|
-
const [step2, setStep] =
|
|
393875
|
-
const [workspaces, setWorkspaces] =
|
|
393876
|
-
const [selectedWorkspace, setSelectedWorkspace] =
|
|
393877
|
-
const [bots, setBots] =
|
|
393878
|
-
const [selectedBot, setSelectedBot] =
|
|
393879
|
-
const [devId] =
|
|
393880
|
-
const [error, setError] =
|
|
393881
|
-
const [loading, setLoading] =
|
|
393882
|
-
|
|
394825
|
+
const [step2, setStep] = import_react46.useState(initialWorkspaceId ? "bots" : "workspaces");
|
|
394826
|
+
const [workspaces, setWorkspaces] = import_react46.useState([]);
|
|
394827
|
+
const [selectedWorkspace, setSelectedWorkspace] = import_react46.useState(null);
|
|
394828
|
+
const [bots, setBots] = import_react46.useState([]);
|
|
394829
|
+
const [selectedBot, setSelectedBot] = import_react46.useState(null);
|
|
394830
|
+
const [devId] = import_react46.useState(initialDevId);
|
|
394831
|
+
const [error, setError] = import_react46.useState(null);
|
|
394832
|
+
const [loading, setLoading] = import_react46.useState(true);
|
|
394833
|
+
import_react46.useEffect(() => {
|
|
393883
394834
|
const initialize2 = async () => {
|
|
393884
394835
|
try {
|
|
393885
394836
|
if (initialBotId) {
|
|
@@ -393915,7 +394866,7 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393915
394866
|
};
|
|
393916
394867
|
initialize2();
|
|
393917
394868
|
}, []);
|
|
393918
|
-
|
|
394869
|
+
import_react46.useEffect(() => {
|
|
393919
394870
|
if (selectedWorkspace && step2 === "bots" && !initialBotId) {
|
|
393920
394871
|
const loadBots = async () => {
|
|
393921
394872
|
try {
|
|
@@ -393986,9 +394937,9 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393986
394937
|
}
|
|
393987
394938
|
};
|
|
393988
394939
|
if (error) {
|
|
393989
|
-
return /* @__PURE__ */
|
|
394940
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
393990
394941
|
flexDirection: "column",
|
|
393991
|
-
children: /* @__PURE__ */
|
|
394942
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
393992
394943
|
color: "red",
|
|
393993
394944
|
children: [
|
|
393994
394945
|
"\u274C Error: ",
|
|
@@ -393998,9 +394949,9 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
393998
394949
|
}, undefined, false, undefined, this);
|
|
393999
394950
|
}
|
|
394000
394951
|
if (loading) {
|
|
394001
|
-
return /* @__PURE__ */
|
|
394952
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
394002
394953
|
flexDirection: "column",
|
|
394003
|
-
children: /* @__PURE__ */
|
|
394954
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394004
394955
|
color: "blue",
|
|
394005
394956
|
children: "\u23F3 Loading..."
|
|
394006
394957
|
}, undefined, false, undefined, this)
|
|
@@ -394008,29 +394959,29 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
394008
394959
|
}
|
|
394009
394960
|
switch (step2) {
|
|
394010
394961
|
case "workspaces":
|
|
394011
|
-
return /* @__PURE__ */
|
|
394962
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(WorkspaceSelector, {
|
|
394012
394963
|
workspaces,
|
|
394013
394964
|
onSelect: handleWorkspaceSelect
|
|
394014
394965
|
}, undefined, false, undefined, this);
|
|
394015
394966
|
case "bots":
|
|
394016
|
-
return /* @__PURE__ */
|
|
394967
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(BotSelector, {
|
|
394017
394968
|
bots,
|
|
394018
394969
|
onSelectBot: handleBotSelect,
|
|
394019
394970
|
onCreateNew: handleCreateNewBot
|
|
394020
394971
|
}, undefined, false, undefined, this);
|
|
394021
394972
|
case "create-bot":
|
|
394022
|
-
return /* @__PURE__ */
|
|
394973
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(BotNameInput, {
|
|
394023
394974
|
onSubmit: handleBotNameSubmit
|
|
394024
394975
|
}, undefined, false, undefined, this);
|
|
394025
394976
|
case "done":
|
|
394026
|
-
return /* @__PURE__ */
|
|
394977
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
394027
394978
|
flexDirection: "column",
|
|
394028
394979
|
children: [
|
|
394029
|
-
/* @__PURE__ */
|
|
394980
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394030
394981
|
color: "green",
|
|
394031
394982
|
children: "\u2705 Successfully linked local agent to remote bot!"
|
|
394032
394983
|
}, undefined, false, undefined, this),
|
|
394033
|
-
/* @__PURE__ */
|
|
394984
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394034
394985
|
color: "gray",
|
|
394035
394986
|
children: [
|
|
394036
394987
|
"Bot: ",
|
|
@@ -394040,22 +394991,22 @@ var import_react43, jsx_dev_runtime25, WorkspaceSelector = ({ workspaces, onSele
|
|
|
394040
394991
|
")"
|
|
394041
394992
|
]
|
|
394042
394993
|
}, undefined, true, undefined, this),
|
|
394043
|
-
/* @__PURE__ */
|
|
394994
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394044
394995
|
color: "gray",
|
|
394045
394996
|
children: [
|
|
394046
394997
|
"Workspace: ",
|
|
394047
394998
|
selectedWorkspace?.name
|
|
394048
394999
|
]
|
|
394049
395000
|
}, undefined, true, undefined, this),
|
|
394050
|
-
devId && /* @__PURE__ */
|
|
395001
|
+
devId && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394051
395002
|
color: "gray",
|
|
394052
395003
|
children: [
|
|
394053
395004
|
"Dev Bot ID: ",
|
|
394054
395005
|
devId
|
|
394055
395006
|
]
|
|
394056
395007
|
}, undefined, true, undefined, this),
|
|
394057
|
-
/* @__PURE__ */
|
|
394058
|
-
/* @__PURE__ */
|
|
395008
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
395009
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text, {
|
|
394059
395010
|
color: "blue",
|
|
394060
395011
|
children: "\uD83C\uDF89 You can now use 'adk deploy' and other remote operations."
|
|
394061
395012
|
}, undefined, false, undefined, this)
|
|
@@ -394075,8 +395026,8 @@ var init_adk_link = __esm(async () => {
|
|
|
394075
395026
|
init_build2(),
|
|
394076
395027
|
init_UserInput()
|
|
394077
395028
|
]);
|
|
394078
|
-
|
|
394079
|
-
|
|
395029
|
+
import_react46 = __toESM(require_react(), 1);
|
|
395030
|
+
jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
|
|
394080
395031
|
});
|
|
394081
395032
|
|
|
394082
395033
|
// src/commands/adk-chat.ts
|
|
@@ -394668,7 +395619,7 @@ function formatHelp(cmd, version) {
|
|
|
394668
395619
|
const categories = {
|
|
394669
395620
|
"Getting Started": ["init", "login", "link"],
|
|
394670
395621
|
Development: ["dev", "build", "deploy", "chat"],
|
|
394671
|
-
Dependencies: ["add", "remove", "upgrade"]
|
|
395622
|
+
Dependencies: ["add", "remove", "upgrade", "search", "list", "info"]
|
|
394672
395623
|
};
|
|
394673
395624
|
for (const [category, commandNames] of Object.entries(categories)) {
|
|
394674
395625
|
const categoryCommands = commands.filter((c) => commandNames.includes(c.name()));
|
|
@@ -394711,7 +395662,7 @@ function formatHelp(cmd, version) {
|
|
|
394711
395662
|
// src/cli.ts
|
|
394712
395663
|
var __filename2 = fileURLToPath9(import.meta.url);
|
|
394713
395664
|
var __dirname5 = dirname3(__filename2);
|
|
394714
|
-
var CLI_VERSION = "1.5.
|
|
395665
|
+
var CLI_VERSION = "1.5.5";
|
|
394715
395666
|
program.name("adk").description("Botpress Agent Development Kit (ADK) - CLI for building AI agents").version(CLI_VERSION).option("--no-cache", "Disable caching for integration lookups").configureHelp({
|
|
394716
395667
|
formatHelp: () => formatHelp(program, CLI_VERSION)
|
|
394717
395668
|
});
|
|
@@ -394812,6 +395763,46 @@ program.command("remove").alias("rm").description("Remove an integration from yo
|
|
|
394812
395763
|
process.exit(1);
|
|
394813
395764
|
}
|
|
394814
395765
|
});
|
|
395766
|
+
program.command("search").description("Search for integrations in the Botpress hub").argument("<query>", "search query").option("--format <format>", "output format (table, json)", "table").option("--limit <number>", "limit number of results", "20").action(async (query, options) => {
|
|
395767
|
+
try {
|
|
395768
|
+
const { adkSearch: adkSearch2 } = await init_adk_search().then(() => exports_adk_search);
|
|
395769
|
+
await adkSearch2(query, {
|
|
395770
|
+
format: options.format,
|
|
395771
|
+
limit: options.limit ? parseInt(options.limit, 10) : 20
|
|
395772
|
+
});
|
|
395773
|
+
} catch (error) {
|
|
395774
|
+
console.error("Error:", error instanceof Error ? error.message : String(error));
|
|
395775
|
+
process.exit(1);
|
|
395776
|
+
}
|
|
395777
|
+
});
|
|
395778
|
+
program.command("list").description("List integrations (installed or available)").option("--available", "list all available integrations").option("--format <format>", "output format (table, json)", "table").option("--limit <number>", "limit number of results", "50").action(async (options) => {
|
|
395779
|
+
try {
|
|
395780
|
+
const { adkList: adkList2 } = await init_adk_list().then(() => exports_adk_list);
|
|
395781
|
+
await adkList2({
|
|
395782
|
+
available: options.available,
|
|
395783
|
+
format: options.format,
|
|
395784
|
+
limit: options.limit ? parseInt(options.limit, 10) : 50
|
|
395785
|
+
});
|
|
395786
|
+
} catch (error) {
|
|
395787
|
+
console.error("Error:", error instanceof Error ? error.message : String(error));
|
|
395788
|
+
process.exit(1);
|
|
395789
|
+
}
|
|
395790
|
+
});
|
|
395791
|
+
program.command("info").description("Show detailed information about an integration").argument("<name>", "integration name").option("--actions", "show only actions").option("--channels", "show only channels").option("--events", "show only events").option("--full", "show all details").option("--format <format>", "output format (table, json)", "table").action(async (name3, options) => {
|
|
395792
|
+
try {
|
|
395793
|
+
const { adkIntegrationInfo: adkIntegrationInfo2 } = await init_adk_integration().then(() => exports_adk_integration);
|
|
395794
|
+
await adkIntegrationInfo2(name3, {
|
|
395795
|
+
actions: options.actions,
|
|
395796
|
+
channels: options.channels,
|
|
395797
|
+
events: options.events,
|
|
395798
|
+
full: options.full,
|
|
395799
|
+
format: options.format
|
|
395800
|
+
});
|
|
395801
|
+
} catch (error) {
|
|
395802
|
+
console.error("Error:", error instanceof Error ? error.message : String(error));
|
|
395803
|
+
process.exit(1);
|
|
395804
|
+
}
|
|
395805
|
+
});
|
|
394815
395806
|
program.command("self-upgrade").alias("self-update").description("Upgrade ADK CLI to the latest version").action(async () => {
|
|
394816
395807
|
try {
|
|
394817
395808
|
const { adkSelfUpgrade: adkSelfUpgrade2 } = await Promise.resolve().then(() => (init_upgrade(), exports_upgrade));
|