@agents-at-scale/ark 0.1.47 → 0.1.49

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.
Files changed (45) hide show
  1. package/.arkrc.template.yaml +51 -0
  2. package/README.md +2 -0
  3. package/dist/arkServices.js +9 -7
  4. package/dist/commands/chat/index.js +1 -1
  5. package/dist/commands/completion/index.js +17 -1
  6. package/dist/commands/dashboard/index.d.ts +2 -2
  7. package/dist/commands/dashboard/index.js +5 -4
  8. package/dist/commands/export/index.d.ts +3 -0
  9. package/dist/commands/export/index.js +73 -0
  10. package/dist/commands/export/index.spec.d.ts +1 -0
  11. package/dist/commands/export/index.spec.js +145 -0
  12. package/dist/commands/import/index.d.ts +3 -0
  13. package/dist/commands/import/index.js +27 -0
  14. package/dist/commands/import/index.spec.d.ts +1 -0
  15. package/dist/commands/import/index.spec.js +46 -0
  16. package/dist/commands/memory/index.js +9 -4
  17. package/dist/commands/query/index.js +2 -0
  18. package/dist/index.js +4 -0
  19. package/dist/lib/arkApiProxy.d.ts +1 -1
  20. package/dist/lib/arkApiProxy.js +2 -2
  21. package/dist/lib/arkServiceProxy.d.ts +3 -1
  22. package/dist/lib/arkServiceProxy.js +34 -1
  23. package/dist/lib/arkServiceProxy.spec.d.ts +1 -0
  24. package/dist/lib/arkServiceProxy.spec.js +100 -0
  25. package/dist/lib/chatClient.d.ts +1 -0
  26. package/dist/lib/chatClient.js +7 -1
  27. package/dist/lib/config.d.ts +3 -1
  28. package/dist/lib/config.js +21 -7
  29. package/dist/lib/config.spec.js +10 -0
  30. package/dist/lib/executeQuery.d.ts +1 -0
  31. package/dist/lib/executeQuery.js +13 -2
  32. package/dist/lib/kubectl.d.ts +2 -0
  33. package/dist/lib/kubectl.js +6 -0
  34. package/dist/lib/kubectl.spec.js +16 -0
  35. package/dist/lib/types.d.ts +1 -0
  36. package/dist/ui/MainMenu.js +6 -2
  37. package/package.json +4 -2
  38. package/dist/ui/AgentSelector.d.ts +0 -8
  39. package/dist/ui/AgentSelector.js +0 -53
  40. package/dist/ui/ModelSelector.d.ts +0 -8
  41. package/dist/ui/ModelSelector.js +0 -53
  42. package/dist/ui/TeamSelector.d.ts +0 -8
  43. package/dist/ui/TeamSelector.js +0 -55
  44. package/dist/ui/ToolSelector.d.ts +0 -8
  45. package/dist/ui/ToolSelector.js +0 -53
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect } from 'react';
3
- import { Box, Text, useInput } from 'ink';
4
- export function ToolSelector({ arkApiClient, onSelect, onExit, }) {
5
- const [selectedIndex, setSelectedIndex] = useState(0);
6
- const [tools, setTools] = useState([]);
7
- const [loading, setLoading] = useState(true);
8
- const [error, setError] = useState(null);
9
- useEffect(() => {
10
- arkApiClient
11
- .getTools()
12
- .then((fetchedTools) => {
13
- setTools(fetchedTools);
14
- setLoading(false);
15
- })
16
- .catch((err) => {
17
- setError(err.message || 'Failed to fetch tools');
18
- setLoading(false);
19
- });
20
- }, [arkApiClient]);
21
- useInput((input, key) => {
22
- if (key.escape) {
23
- onExit();
24
- }
25
- else if (key.upArrow || input === 'k') {
26
- setSelectedIndex((prev) => (prev === 0 ? tools.length - 1 : prev - 1));
27
- }
28
- else if (key.downArrow || input === 'j') {
29
- setSelectedIndex((prev) => (prev === tools.length - 1 ? 0 : prev + 1));
30
- }
31
- else if (key.return) {
32
- onSelect(tools[selectedIndex]);
33
- }
34
- else {
35
- // Handle number keys for quick selection
36
- const num = parseInt(input, 10);
37
- if (!isNaN(num) && num >= 1 && num <= tools.length) {
38
- onSelect(tools[num - 1]);
39
- }
40
- }
41
- });
42
- if (loading) {
43
- return (_jsx(Box, { children: _jsx(Text, { children: "Loading tools..." }) }));
44
- }
45
- if (error) {
46
- return (_jsx(Box, { children: _jsxs(Text, { color: "red", children: ["Error: ", error] }) }));
47
- }
48
- if (tools.length === 0) {
49
- return (_jsx(Box, { children: _jsx(Text, { children: "No tools available" }) }));
50
- }
51
- const selectedTool = tools[selectedIndex];
52
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 2, paddingY: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, children: "Select Tool" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { dimColor: true, children: "Choose a tool to start a conversation with" }) }), _jsx(Box, { flexDirection: "column", children: tools.map((tool, index) => (_jsx(Box, { marginBottom: 0, children: _jsxs(Text, { color: index === selectedIndex ? 'green' : undefined, children: [index === selectedIndex ? '❯ ' : ' ', index + 1, ". ", tool.name] }) }, tool.name))) }), selectedTool && selectedTool.description && (_jsx(Box, { marginTop: 1, paddingLeft: 2, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: selectedTool.description }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Enter to confirm \u00B7 Number to select \u00B7 Esc to exit" }) })] }));
53
- }