@agents-at-scale/ark 0.1.53 → 0.1.56
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/arkServices.js +14 -0
- package/dist/commands/completion/index.js +9 -6
- package/dist/commands/export/index.js +6 -5
- package/dist/commands/generate/generators/agent.js +2 -0
- package/dist/commands/generate/generators/marketplace.js +2 -0
- package/dist/commands/generate/generators/mcpserver.js +2 -0
- package/dist/commands/generate/generators/project.js +9 -2
- package/dist/commands/generate/generators/query.js +2 -0
- package/dist/commands/generate/generators/team.js +2 -1
- package/dist/commands/generate/templateDiscovery.js +1 -0
- package/dist/commands/generate/templateEngine.js +1 -3
- package/dist/commands/import/index.js +1 -1
- package/dist/commands/install/index.js +35 -31
- package/dist/commands/marketplace/index.js +18 -3
- package/dist/commands/models/create.js +1 -0
- package/dist/commands/models/kubernetes/manifest-builder.js +49 -10
- package/dist/commands/models/providers/anthropic.d.ts +15 -0
- package/dist/commands/models/providers/anthropic.js +72 -0
- package/dist/commands/models/providers/azure.d.ts +10 -7
- package/dist/commands/models/providers/azure.js +83 -21
- package/dist/commands/models/providers/factory.js +3 -0
- package/dist/commands/models/providers/index.d.ts +3 -4
- package/dist/commands/models/providers/index.js +1 -0
- package/dist/commands/uninstall/index.js +9 -3
- package/dist/components/ChatUI.js +21 -33
- package/dist/components/statusChecker.js +3 -3
- package/dist/index.js +0 -2
- package/dist/lib/arkApiClient.d.ts +14 -4
- package/dist/lib/arkApiClient.js +61 -42
- package/dist/lib/arkApiProxy.js +1 -0
- package/dist/lib/arkServiceProxy.js +5 -1
- package/dist/lib/chatClient.d.ts +4 -6
- package/dist/lib/chatClient.js +138 -95
- package/dist/lib/config.js +8 -3
- package/dist/lib/errors.d.ts +0 -1
- package/dist/lib/errors.js +3 -1
- package/dist/lib/marketplaceFetcher.d.ts +1 -0
- package/dist/lib/marketplaceFetcher.js +17 -0
- package/dist/lib/types.d.ts +0 -38
- package/dist/marketplaceServices.d.ts +6 -1
- package/dist/marketplaceServices.js +19 -3
- package/dist/types/arkService.d.ts +1 -0
- package/dist/types/marketplace.d.ts +1 -1
- package/dist/ui/asyncOperations/connectingToArk.js +2 -2
- package/package.json +19 -13
- package/templates/marketplace/marketplace.json.example +2 -2
- package/templates/tool/uv.lock +794 -95
- package/dist/arkServices.spec.d.ts +0 -1
- package/dist/arkServices.spec.js +0 -138
- package/dist/commands/agents/index.spec.d.ts +0 -1
- package/dist/commands/agents/index.spec.js +0 -67
- package/dist/commands/cluster/get.spec.d.ts +0 -1
- package/dist/commands/cluster/get.spec.js +0 -92
- package/dist/commands/cluster/index.spec.d.ts +0 -1
- package/dist/commands/cluster/index.spec.js +0 -24
- package/dist/commands/completion/index.spec.d.ts +0 -1
- package/dist/commands/completion/index.spec.js +0 -34
- package/dist/commands/config/index.spec.d.ts +0 -1
- package/dist/commands/config/index.spec.js +0 -78
- package/dist/commands/evaluation/index.d.ts +0 -3
- package/dist/commands/evaluation/index.js +0 -60
- package/dist/commands/evaluation/index.spec.d.ts +0 -1
- package/dist/commands/evaluation/index.spec.js +0 -161
- package/dist/commands/export/index.spec.d.ts +0 -1
- package/dist/commands/export/index.spec.js +0 -145
- package/dist/commands/import/index.spec.d.ts +0 -1
- package/dist/commands/import/index.spec.js +0 -46
- package/dist/commands/install/index.spec.d.ts +0 -1
- package/dist/commands/install/index.spec.js +0 -286
- package/dist/commands/marketplace/index.spec.d.ts +0 -1
- package/dist/commands/marketplace/index.spec.js +0 -88
- package/dist/commands/memory/index.spec.d.ts +0 -1
- package/dist/commands/memory/index.spec.js +0 -124
- package/dist/commands/models/create.spec.d.ts +0 -1
- package/dist/commands/models/create.spec.js +0 -167
- package/dist/commands/models/index.spec.d.ts +0 -1
- package/dist/commands/models/index.spec.js +0 -96
- package/dist/commands/models/providers/azure.spec.d.ts +0 -1
- package/dist/commands/models/providers/azure.spec.js +0 -232
- package/dist/commands/models/providers/bedrock.spec.d.ts +0 -1
- package/dist/commands/models/providers/bedrock.spec.js +0 -241
- package/dist/commands/models/providers/openai.spec.d.ts +0 -1
- package/dist/commands/models/providers/openai.spec.js +0 -180
- package/dist/commands/queries/delete.spec.d.ts +0 -1
- package/dist/commands/queries/delete.spec.js +0 -74
- package/dist/commands/queries/index.spec.d.ts +0 -1
- package/dist/commands/queries/index.spec.js +0 -167
- package/dist/commands/queries/list.spec.d.ts +0 -1
- package/dist/commands/queries/list.spec.js +0 -170
- package/dist/commands/queries/validation.spec.d.ts +0 -1
- package/dist/commands/queries/validation.spec.js +0 -27
- package/dist/commands/query/index.spec.d.ts +0 -1
- package/dist/commands/query/index.spec.js +0 -104
- package/dist/commands/targets/index.spec.d.ts +0 -1
- package/dist/commands/targets/index.spec.js +0 -154
- package/dist/commands/teams/index.spec.d.ts +0 -1
- package/dist/commands/teams/index.spec.js +0 -70
- package/dist/commands/tools/index.spec.d.ts +0 -1
- package/dist/commands/tools/index.spec.js +0 -70
- package/dist/commands/uninstall/index.spec.d.ts +0 -1
- package/dist/commands/uninstall/index.spec.js +0 -125
- package/dist/lib/arkServiceProxy.spec.d.ts +0 -1
- package/dist/lib/arkServiceProxy.spec.js +0 -100
- package/dist/lib/arkStatus.spec.d.ts +0 -1
- package/dist/lib/arkStatus.spec.js +0 -49
- package/dist/lib/chatClient.spec.d.ts +0 -1
- package/dist/lib/chatClient.spec.js +0 -108
- package/dist/lib/cluster.spec.d.ts +0 -1
- package/dist/lib/cluster.spec.js +0 -338
- package/dist/lib/commands.spec.d.ts +0 -1
- package/dist/lib/commands.spec.js +0 -146
- package/dist/lib/config.spec.d.ts +0 -1
- package/dist/lib/config.spec.js +0 -202
- package/dist/lib/duration.spec.d.ts +0 -1
- package/dist/lib/duration.spec.js +0 -13
- package/dist/lib/errors.spec.d.ts +0 -1
- package/dist/lib/errors.spec.js +0 -221
- package/dist/lib/executeEvaluation.d.ts +0 -16
- package/dist/lib/executeEvaluation.js +0 -155
- package/dist/lib/executeQuery.spec.d.ts +0 -1
- package/dist/lib/executeQuery.spec.js +0 -325
- package/dist/lib/kubectl.spec.d.ts +0 -1
- package/dist/lib/kubectl.spec.js +0 -192
- package/dist/lib/marketplaceFetcher.spec.d.ts +0 -1
- package/dist/lib/marketplaceFetcher.spec.js +0 -225
- package/dist/lib/nextSteps.spec.d.ts +0 -1
- package/dist/lib/nextSteps.spec.js +0 -59
- package/dist/lib/output.spec.d.ts +0 -1
- package/dist/lib/output.spec.js +0 -123
- package/dist/lib/startup.spec.d.ts +0 -1
- package/dist/lib/startup.spec.js +0 -152
- package/dist/lib/stdin.spec.d.ts +0 -1
- package/dist/lib/stdin.spec.js +0 -82
- package/dist/lib/timeout.spec.d.ts +0 -1
- package/dist/lib/timeout.spec.js +0 -14
- package/dist/lib/waitForReady.spec.d.ts +0 -1
- package/dist/lib/waitForReady.spec.js +0 -104
- package/dist/marketplaceServices.spec.d.ts +0 -1
- package/dist/marketplaceServices.spec.js +0 -74
- package/dist/ui/statusFormatter.spec.d.ts +0 -1
- package/dist/ui/statusFormatter.spec.js +0 -58
package/dist/arkServices.js
CHANGED
|
@@ -66,6 +66,7 @@ const defaultArkServices = {
|
|
|
66
66
|
helmReleaseName: 'ark-controller',
|
|
67
67
|
description: 'Core Ark controller for managing AI resources',
|
|
68
68
|
enabled: true,
|
|
69
|
+
mandatory: true,
|
|
69
70
|
category: 'core',
|
|
70
71
|
namespace: 'ark-system',
|
|
71
72
|
chartPath: `${REGISTRY_BASE}/ark-controller:${CHART_VERSION}`,
|
|
@@ -73,11 +74,24 @@ const defaultArkServices = {
|
|
|
73
74
|
k8sDeploymentName: 'ark-controller',
|
|
74
75
|
k8sDevDeploymentName: 'ark-controller-devspace',
|
|
75
76
|
},
|
|
77
|
+
'ark-completions': {
|
|
78
|
+
name: 'ark-completions',
|
|
79
|
+
helmReleaseName: 'ark-completions',
|
|
80
|
+
description: 'Completions execution engine for Ark queries',
|
|
81
|
+
enabled: true,
|
|
82
|
+
mandatory: true,
|
|
83
|
+
category: 'core',
|
|
84
|
+
namespace: 'ark-system',
|
|
85
|
+
chartPath: `${REGISTRY_BASE}/ark-completions:${CHART_VERSION}`,
|
|
86
|
+
installArgs: ['--create-namespace'],
|
|
87
|
+
k8sDeploymentName: 'ark-completions',
|
|
88
|
+
},
|
|
76
89
|
'ark-tenant': {
|
|
77
90
|
name: 'ark-tenant',
|
|
78
91
|
helmReleaseName: 'ark-tenant',
|
|
79
92
|
description: 'Tenant provisioning with RBAC and resource quotas',
|
|
80
93
|
enabled: true,
|
|
94
|
+
mandatory: true,
|
|
81
95
|
category: 'core',
|
|
82
96
|
chartPath: `${REGISTRY_BASE}/ark-tenant:${CHART_VERSION}`,
|
|
83
97
|
installArgs: [],
|
|
@@ -28,7 +28,7 @@ _ark_completion() {
|
|
|
28
28
|
|
|
29
29
|
case \${COMP_CWORD} in
|
|
30
30
|
1)
|
|
31
|
-
opts="agents chat cluster completion config dashboard docs
|
|
31
|
+
opts="agents chat cluster completion config dashboard docs export generate import install marketplace memory models queries query routes status targets teams tools uninstall help"
|
|
32
32
|
COMPREPLY=( $(compgen -W "\${opts}" -- \${cur}) )
|
|
33
33
|
return 0
|
|
34
34
|
;;
|
|
@@ -90,12 +90,12 @@ _ark_completion() {
|
|
|
90
90
|
return 0
|
|
91
91
|
;;
|
|
92
92
|
install)
|
|
93
|
-
opts="marketplace/services/phoenix marketplace/services/langfuse marketplace/agents/noah"
|
|
93
|
+
opts="marketplace/services/phoenix marketplace/services/langfuse marketplace/agents/noah marketplace/executors/langchain marketplace/executors/claude-agent-sdk"
|
|
94
94
|
COMPREPLY=( $(compgen -W "\${opts}" -- \${cur}) )
|
|
95
95
|
return 0
|
|
96
96
|
;;
|
|
97
97
|
uninstall)
|
|
98
|
-
opts="marketplace/services/phoenix marketplace/services/langfuse marketplace/agents/noah"
|
|
98
|
+
opts="marketplace/services/phoenix marketplace/services/langfuse marketplace/agents/noah marketplace/executors/langchain marketplace/executors/claude-agent-sdk"
|
|
99
99
|
COMPREPLY=( $(compgen -W "\${opts}" -- \${cur}) )
|
|
100
100
|
return 0
|
|
101
101
|
;;
|
|
@@ -160,7 +160,6 @@ _ark() {
|
|
|
160
160
|
'config[Configuration management]' \\
|
|
161
161
|
'dashboard[Open ARK dashboard]' \\
|
|
162
162
|
'docs[Open ARK documentation]' \\
|
|
163
|
-
'evaluation[Execute evaluations against evaluators]' \\
|
|
164
163
|
'export[Export ARK resources to a file]' \\
|
|
165
164
|
'generate[Generate ARK resources]' \\
|
|
166
165
|
'import[Import ARK resources from a file]' \\
|
|
@@ -244,12 +243,16 @@ _ark() {
|
|
|
244
243
|
install)
|
|
245
244
|
_values 'services to install' \\
|
|
246
245
|
'marketplace/services/phoenix[Phoenix observability platform]' \\
|
|
247
|
-
'marketplace/services/langfuse[Langfuse LLM analytics]'
|
|
246
|
+
'marketplace/services/langfuse[Langfuse LLM analytics]' \\
|
|
247
|
+
'marketplace/executors/langchain[LangChain execution engine]' \\
|
|
248
|
+
'marketplace/executors/claude-agent-sdk[Claude Agent SDK executor]'
|
|
248
249
|
;;
|
|
249
250
|
uninstall)
|
|
250
251
|
_values 'services to uninstall' \\
|
|
251
252
|
'marketplace/services/phoenix[Phoenix observability platform]' \\
|
|
252
|
-
'marketplace/services/langfuse[Langfuse LLM analytics]'
|
|
253
|
+
'marketplace/services/langfuse[Langfuse LLM analytics]' \\
|
|
254
|
+
'marketplace/executors/langchain[LangChain execution engine]' \\
|
|
255
|
+
'marketplace/executors/claude-agent-sdk[Claude Agent SDK executor]'
|
|
253
256
|
;;
|
|
254
257
|
chat)
|
|
255
258
|
# Get available targets dynamically
|
|
@@ -11,7 +11,6 @@ const RESOURCE_ORDER = [
|
|
|
11
11
|
'models',
|
|
12
12
|
'agents',
|
|
13
13
|
'teams',
|
|
14
|
-
'evaluators',
|
|
15
14
|
'mcpservers',
|
|
16
15
|
'a2aservers',
|
|
17
16
|
];
|
|
@@ -19,8 +18,8 @@ async function exportResources(options, config) {
|
|
|
19
18
|
try {
|
|
20
19
|
const allResourceTypes = config.defaultExportTypes || RESOURCE_ORDER;
|
|
21
20
|
const outputPath = options.output || 'ark-export.yaml';
|
|
22
|
-
|
|
23
|
-
?
|
|
21
|
+
const resourceTypes = options.types
|
|
22
|
+
? options.types.split(',')
|
|
24
23
|
: allResourceTypes;
|
|
25
24
|
// ensure that we get resources in the correct order; e.g. agents before teams that use the agents
|
|
26
25
|
resourceTypes.sort((a, b) => {
|
|
@@ -37,7 +36,7 @@ async function exportResources(options, config) {
|
|
|
37
36
|
output.info(`fetching ${resourceType}...`);
|
|
38
37
|
const resources = await listResources(resourceType, {
|
|
39
38
|
namespace: options.namespace,
|
|
40
|
-
labels: options.labels
|
|
39
|
+
labels: options.labels,
|
|
41
40
|
});
|
|
42
41
|
const resourceCount = resources.length;
|
|
43
42
|
if (resources.length > 0) {
|
|
@@ -50,7 +49,9 @@ async function exportResources(options, config) {
|
|
|
50
49
|
output.warning('no resources found to export');
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
const yamlContent = allResources
|
|
52
|
+
const yamlContent = allResources
|
|
53
|
+
.map((resource) => yaml.stringify(resource))
|
|
54
|
+
.join('\n---\n');
|
|
54
55
|
await fs.writeFile(outputPath, yamlContent, 'utf-8');
|
|
55
56
|
output.success(`exported ${allResourceCount} resources to ${outputPath}`);
|
|
56
57
|
}
|
|
@@ -21,6 +21,9 @@ export function createProjectGenerator() {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
class ProjectGenerator {
|
|
24
|
+
templateDiscovery;
|
|
25
|
+
templateEngine;
|
|
26
|
+
samplesPath;
|
|
24
27
|
constructor() {
|
|
25
28
|
this.templateDiscovery = new TemplateDiscovery();
|
|
26
29
|
this.templateEngine = new TemplateEngine();
|
|
@@ -727,7 +730,9 @@ Generated with ARK CLI generator`;
|
|
|
727
730
|
},
|
|
728
731
|
];
|
|
729
732
|
if (config.projectType === 'empty') {
|
|
730
|
-
steps.push({ desc: 'Add YAML files to agents/, teams/, queries/ directories' }, {
|
|
733
|
+
steps.push({ desc: 'Add YAML files to agents/, teams/, queries/ directories' }, {
|
|
734
|
+
desc: 'Use either the default model already in models/ or a configuration template from samples/models/ of ARK repository',
|
|
735
|
+
}, { desc: 'Edit .env file to set your API keys' }, { desc: 'Deploy your project', cmd: 'devspace dev' });
|
|
731
736
|
}
|
|
732
737
|
else if (config.selectedModels && config.selectedModels !== 'none') {
|
|
733
738
|
steps.push({ desc: 'Edit .env file to set your API keys' }, { desc: 'Load environment variables', cmd: 'source .env' }, { desc: 'Deploy your project', cmd: 'devspace dev' }, {
|
|
@@ -736,7 +741,9 @@ Generated with ARK CLI generator`;
|
|
|
736
741
|
});
|
|
737
742
|
}
|
|
738
743
|
else {
|
|
739
|
-
steps.push({
|
|
744
|
+
steps.push({
|
|
745
|
+
desc: 'Use either the default model already in models/ or a configuration template from samples/models/ of ARK repository',
|
|
746
|
+
}, { desc: 'Edit .env file to set your API keys' }, { desc: 'Deploy your project', cmd: 'devspace dev' });
|
|
740
747
|
}
|
|
741
748
|
console.log(chalk.magenta.bold('🚀 NEXT STEPS:\n'));
|
|
742
749
|
let stepNumber = 1;
|
|
@@ -18,6 +18,8 @@ export function createTeamGenerator() {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
class TeamGenerator {
|
|
21
|
+
templateDiscovery;
|
|
22
|
+
templateEngine;
|
|
21
23
|
constructor() {
|
|
22
24
|
this.templateDiscovery = new TemplateDiscovery();
|
|
23
25
|
this.templateEngine = new TemplateEngine();
|
|
@@ -89,7 +91,6 @@ class TeamGenerator {
|
|
|
89
91
|
choices: [
|
|
90
92
|
{ name: 'Sequential - Agents execute in order', value: 'sequential' },
|
|
91
93
|
{ name: 'Round Robin - Agents take turns', value: 'round-robin' },
|
|
92
|
-
{ name: 'Graph - Custom workflow with dependencies', value: 'graph' },
|
|
93
94
|
{
|
|
94
95
|
name: 'Selector - AI chooses the next agent (can add graph constraints)',
|
|
95
96
|
value: 'selector',
|
|
@@ -4,9 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import { SecurityUtils } from '../../lib/security.js';
|
|
5
5
|
import { TemplateError } from '../../lib/errors.js';
|
|
6
6
|
export class TemplateEngine {
|
|
7
|
-
|
|
8
|
-
this.variables = {};
|
|
9
|
-
}
|
|
7
|
+
variables = {};
|
|
10
8
|
/**
|
|
11
9
|
* Set template variables for substitution
|
|
12
10
|
*/
|
|
@@ -5,7 +5,7 @@ async function importResources(filepath) {
|
|
|
5
5
|
try {
|
|
6
6
|
output.info(`importing ark resources from ${filepath}...`);
|
|
7
7
|
const args = ['create', '-f', filepath];
|
|
8
|
-
|
|
8
|
+
await execa('kubectl', args, {
|
|
9
9
|
stdio: 'pipe',
|
|
10
10
|
});
|
|
11
11
|
output.success(`imported resources from ${filepath}`);
|
|
@@ -5,7 +5,7 @@ import inquirer from 'inquirer';
|
|
|
5
5
|
import { showNoClusterError } from '../../lib/startup.js';
|
|
6
6
|
import output from '../../lib/output.js';
|
|
7
7
|
import { getInstallableServices, arkDependencies, arkServices, } from '../../arkServices.js';
|
|
8
|
-
import { isMarketplaceService, getMarketplaceItem, getAllMarketplaceServices, getAllMarketplaceAgents, } from '../../marketplaceServices.js';
|
|
8
|
+
import { isMarketplaceService, getMarketplaceItem, getAllMarketplaceServices, getAllMarketplaceAgents, getAllMarketplaceExecutors, } from '../../marketplaceServices.js';
|
|
9
9
|
import { printNextSteps } from '../../lib/nextSteps.js';
|
|
10
10
|
import ora from 'ora';
|
|
11
11
|
import { waitForServicesReady, } from '../../lib/waitForReady.js';
|
|
@@ -40,6 +40,7 @@ async function checkAndCleanFailedRelease(releaseName, namespace, verbose = fals
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
catch {
|
|
43
|
+
// Ignore errors - prerequisite may not exist
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
async function installService(service, verbose = false) {
|
|
@@ -94,7 +95,13 @@ export async function installArk(config, serviceName, options = {}) {
|
|
|
94
95
|
output.info(` marketplace/agents/${name}`);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
+
const marketplaceExecutors = await getAllMarketplaceExecutors();
|
|
99
|
+
if (marketplaceExecutors) {
|
|
100
|
+
for (const name of Object.keys(marketplaceExecutors)) {
|
|
101
|
+
output.info(` marketplace/executors/${name}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!marketplaceServices && !marketplaceAgents && !marketplaceExecutors) {
|
|
98
105
|
output.warning('Marketplace unavailable');
|
|
99
106
|
}
|
|
100
107
|
process.exit(1);
|
|
@@ -136,41 +143,37 @@ export async function installArk(config, serviceName, options = {}) {
|
|
|
136
143
|
}
|
|
137
144
|
// If not using -y flag, show checklist interface
|
|
138
145
|
if (!options.yes) {
|
|
139
|
-
console.log(chalk.cyan.bold('\nSelect components to install:'));
|
|
140
|
-
console.log(chalk.gray('Use arrow keys to navigate, space to toggle, enter to confirm\n'));
|
|
141
|
-
// Build choices for the checkbox prompt
|
|
142
146
|
const coreServices = Object.values(arkServices)
|
|
143
147
|
.filter((s) => s.category === 'core')
|
|
144
148
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
145
149
|
const otherServices = Object.values(arkServices)
|
|
146
150
|
.filter((s) => s.category === 'service')
|
|
147
151
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
checked: true,
|
|
159
|
-
},
|
|
160
|
-
new inquirer.Separator(chalk.bold('──── Ark Core ────')),
|
|
161
|
-
...coreServices.map((service) => ({
|
|
152
|
+
const mandatoryServiceNames = [...coreServices, ...otherServices]
|
|
153
|
+
.filter((s) => s.mandatory)
|
|
154
|
+
.map((s) => s.helmReleaseName);
|
|
155
|
+
console.log(chalk.cyan.bold('\nSelect components to install:'));
|
|
156
|
+
console.log(chalk.gray('Use arrow keys to navigate, space to toggle, enter to confirm\n'));
|
|
157
|
+
const formatServiceChoice = (service) => {
|
|
158
|
+
if (service.mandatory) {
|
|
159
|
+
return new inquirer.Separator(`${chalk.dim.green('◉')} ${chalk.dim(`${service.name} - ${service.description}`)}`);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
162
|
name: `${service.name} ${chalk.gray(`- ${service.description}`)}`,
|
|
163
163
|
value: service.helmReleaseName,
|
|
164
164
|
checked: Boolean(service.enabled),
|
|
165
|
-
}
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
const allChoices = [
|
|
168
|
+
new inquirer.Separator(chalk.bold('──── Dependencies ────')),
|
|
169
|
+
new inquirer.Separator(`${chalk.dim.green('◉')} ${chalk.dim('cert-manager - Certificate management')}`),
|
|
170
|
+
new inquirer.Separator(`${chalk.dim.green('◉')} ${chalk.dim('gateway-api - Gateway API CRDs')}`),
|
|
171
|
+
new inquirer.Separator(chalk.bold('──── Ark Core ────')),
|
|
172
|
+
...coreServices.map(formatServiceChoice),
|
|
166
173
|
new inquirer.Separator(chalk.bold('──── Ark Services ────')),
|
|
167
|
-
...otherServices.map(
|
|
168
|
-
name: `${service.name} ${chalk.gray(`- ${service.description}`)}`,
|
|
169
|
-
value: service.helmReleaseName,
|
|
170
|
-
checked: Boolean(service.enabled),
|
|
171
|
-
})),
|
|
174
|
+
...otherServices.map(formatServiceChoice),
|
|
172
175
|
];
|
|
173
|
-
let selectedComponents
|
|
176
|
+
let selectedComponents;
|
|
174
177
|
try {
|
|
175
178
|
const answers = await inquirer.prompt([
|
|
176
179
|
{
|
|
@@ -181,11 +184,12 @@ export async function installArk(config, serviceName, options = {}) {
|
|
|
181
184
|
pageSize: 15,
|
|
182
185
|
},
|
|
183
186
|
]);
|
|
184
|
-
selectedComponents =
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
selectedComponents = [
|
|
188
|
+
'cert-manager',
|
|
189
|
+
'gateway-api',
|
|
190
|
+
...mandatoryServiceNames,
|
|
191
|
+
...answers.components,
|
|
192
|
+
];
|
|
189
193
|
}
|
|
190
194
|
catch (error) {
|
|
191
195
|
// Handle Ctrl-C gracefully
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { getMarketplaceRepoUrl, getMarketplaceRegistry, } from '../../lib/config.js';
|
|
4
|
-
import { getAllMarketplaceServices, getAllMarketplaceAgents, } from '../../marketplaceServices.js';
|
|
4
|
+
import { getAllMarketplaceServices, getAllMarketplaceAgents, getAllMarketplaceExecutors, } from '../../marketplaceServices.js';
|
|
5
5
|
import { fetchMarketplaceManifest } from '../../lib/marketplaceFetcher.js';
|
|
6
6
|
function createMarketplaceCommand(_config) {
|
|
7
7
|
const repoUrl = getMarketplaceRepoUrl();
|
|
@@ -18,19 +18,21 @@ Registry: ${chalk.cyan(registry.replace('oci://', ''))}
|
|
|
18
18
|
`)
|
|
19
19
|
.addHelpText('after', `
|
|
20
20
|
${chalk.cyan('Examples:')}
|
|
21
|
-
${chalk.yellow('ark marketplace list')} # List available
|
|
21
|
+
${chalk.yellow('ark marketplace list')} # List available marketplace items
|
|
22
22
|
${chalk.yellow('ark install marketplace/services/phoenix')} # Install Phoenix service
|
|
23
23
|
${chalk.yellow('ark install marketplace/agents/noah')} # Install Noah agent
|
|
24
|
+
${chalk.yellow('ark install marketplace/executors/langchain')} # Install LangChain executor
|
|
24
25
|
${chalk.yellow('ark uninstall marketplace/services/phoenix')} # Uninstall Phoenix
|
|
25
26
|
`);
|
|
26
27
|
// List command
|
|
27
28
|
const list = new Command('list');
|
|
28
29
|
list
|
|
29
30
|
.alias('ls')
|
|
30
|
-
.description('List available marketplace
|
|
31
|
+
.description('List available marketplace items')
|
|
31
32
|
.action(async () => {
|
|
32
33
|
const services = await getAllMarketplaceServices();
|
|
33
34
|
const agents = await getAllMarketplaceAgents();
|
|
35
|
+
const executors = await getAllMarketplaceExecutors();
|
|
34
36
|
const manifest = await fetchMarketplaceManifest();
|
|
35
37
|
console.log(chalk.blue('\n🏪 ARK Marketplace\n'));
|
|
36
38
|
if (!manifest) {
|
|
@@ -68,6 +70,19 @@ ${chalk.cyan('Examples:')}
|
|
|
68
70
|
console.log();
|
|
69
71
|
}
|
|
70
72
|
}
|
|
73
|
+
if (executors && Object.keys(executors).length > 0) {
|
|
74
|
+
console.log(chalk.bold('Executors:'));
|
|
75
|
+
console.log(chalk.gray('Install with: ark install marketplace/executors/<name>\n'));
|
|
76
|
+
for (const [key, executor] of Object.entries(executors)) {
|
|
77
|
+
const icon = '⚙️';
|
|
78
|
+
const executorName = `marketplace/executors/${key.padEnd(12)}`;
|
|
79
|
+
const executorDesc = executor.description;
|
|
80
|
+
console.log(`${icon} ${chalk.green(executorName)} ${chalk.gray(executorDesc)}`);
|
|
81
|
+
const namespaceInfo = `namespace: ${executor.namespace || 'default'}`;
|
|
82
|
+
console.log(` ${chalk.dim(namespaceInfo)}`);
|
|
83
|
+
console.log();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
71
86
|
console.log(chalk.cyan(`Repository: ${repoUrl}`));
|
|
72
87
|
console.log(chalk.cyan(`Registry: ${registry}`));
|
|
73
88
|
console.log();
|
|
@@ -59,6 +59,7 @@ export async function createModel(modelName, options = {}) {
|
|
|
59
59
|
choices: [
|
|
60
60
|
{ name: 'Azure OpenAI', value: 'azure' },
|
|
61
61
|
{ name: 'OpenAI', value: 'openai' },
|
|
62
|
+
{ name: 'Anthropic', value: 'anthropic' },
|
|
62
63
|
{ name: 'AWS Bedrock', value: 'bedrock' },
|
|
63
64
|
],
|
|
64
65
|
default: 'azure',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Kubernetes model manifest builder
|
|
2
2
|
export class KubernetesModelManifestBuilder {
|
|
3
|
+
modelName;
|
|
3
4
|
constructor(modelName) {
|
|
4
5
|
this.modelName = modelName;
|
|
5
6
|
}
|
|
@@ -23,24 +24,40 @@ export class KubernetesModelManifestBuilder {
|
|
|
23
24
|
}
|
|
24
25
|
buildProviderConfig(config) {
|
|
25
26
|
if (config.type === 'azure') {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
const azureConfig = config;
|
|
28
|
+
const azure = {
|
|
29
|
+
baseUrl: { value: azureConfig.baseUrl },
|
|
30
|
+
apiVersion: { value: azureConfig.apiVersion },
|
|
31
|
+
};
|
|
32
|
+
const authMethod = azureConfig.authMethod ?? 'apiKey';
|
|
33
|
+
if (authMethod === 'apiKey') {
|
|
34
|
+
azure.auth = {
|
|
28
35
|
apiKey: {
|
|
29
36
|
valueFrom: {
|
|
30
37
|
secretKeyRef: {
|
|
31
|
-
name:
|
|
38
|
+
name: azureConfig.secretName || 'azure-openai-secret',
|
|
32
39
|
key: 'api-key',
|
|
33
40
|
},
|
|
34
41
|
},
|
|
35
42
|
},
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
else if (authMethod === 'managedIdentity') {
|
|
46
|
+
azure.auth = {
|
|
47
|
+
managedIdentity: azureConfig.clientId ?
|
|
48
|
+
{ clientId: { value: azureConfig.clientId } }
|
|
49
|
+
: {},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
else if (authMethod === 'workloadIdentity') {
|
|
53
|
+
azure.auth = {
|
|
54
|
+
workloadIdentity: {
|
|
55
|
+
clientId: { value: azureConfig.clientId },
|
|
56
|
+
tenantId: { value: azureConfig.tenantId },
|
|
38
57
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
};
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return { azure };
|
|
44
61
|
}
|
|
45
62
|
if (config.type === 'bedrock') {
|
|
46
63
|
return this.buildBedrockConfig(config);
|
|
@@ -62,6 +79,28 @@ export class KubernetesModelManifestBuilder {
|
|
|
62
79
|
},
|
|
63
80
|
};
|
|
64
81
|
}
|
|
82
|
+
if (config.type === 'anthropic') {
|
|
83
|
+
const anthropicConfig = config;
|
|
84
|
+
const anthropic = {
|
|
85
|
+
apiKey: {
|
|
86
|
+
valueFrom: {
|
|
87
|
+
secretKeyRef: {
|
|
88
|
+
name: config.secretName,
|
|
89
|
+
key: 'api-key',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
baseUrl: {
|
|
94
|
+
value: anthropicConfig.baseUrl,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
if (anthropicConfig.version) {
|
|
98
|
+
anthropic.version = {
|
|
99
|
+
value: anthropicConfig.version,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return { anthropic };
|
|
103
|
+
}
|
|
65
104
|
throw new Error(`Unknown provider type: ${config.type}`);
|
|
66
105
|
}
|
|
67
106
|
buildBedrockConfig(config) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseProviderConfig, BaseCollectorOptions, ProviderConfigCollector } from './types.js';
|
|
2
|
+
export interface AnthropicConfig extends BaseProviderConfig {
|
|
3
|
+
type: 'anthropic';
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AnthropicCollectorOptions extends BaseCollectorOptions {
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AnthropicConfigCollector implements ProviderConfigCollector {
|
|
14
|
+
collectConfig(options: BaseCollectorOptions): Promise<AnthropicConfig>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
export class AnthropicConfigCollector {
|
|
3
|
+
async collectConfig(options) {
|
|
4
|
+
const anthropicOptions = options;
|
|
5
|
+
let baseUrl = anthropicOptions.baseUrl;
|
|
6
|
+
if (!baseUrl) {
|
|
7
|
+
const answer = await inquirer.prompt([
|
|
8
|
+
{
|
|
9
|
+
type: 'input',
|
|
10
|
+
name: 'baseUrl',
|
|
11
|
+
message: 'base URL:',
|
|
12
|
+
validate: (input) => {
|
|
13
|
+
if (!input)
|
|
14
|
+
return 'base URL is required';
|
|
15
|
+
try {
|
|
16
|
+
new URL(input);
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return 'please enter a valid URL';
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
]);
|
|
25
|
+
baseUrl = answer.baseUrl;
|
|
26
|
+
}
|
|
27
|
+
if (!baseUrl) {
|
|
28
|
+
throw new Error('base URL is required');
|
|
29
|
+
}
|
|
30
|
+
baseUrl = baseUrl.replace(/\/$/, '');
|
|
31
|
+
let apiKey = anthropicOptions.apiKey;
|
|
32
|
+
if (!apiKey) {
|
|
33
|
+
const answer = await inquirer.prompt([
|
|
34
|
+
{
|
|
35
|
+
type: 'password',
|
|
36
|
+
name: 'apiKey',
|
|
37
|
+
message: 'API key:',
|
|
38
|
+
mask: '*',
|
|
39
|
+
validate: (input) => {
|
|
40
|
+
if (!input)
|
|
41
|
+
return 'API key is required';
|
|
42
|
+
return true;
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
]);
|
|
46
|
+
apiKey = answer.apiKey;
|
|
47
|
+
}
|
|
48
|
+
if (!apiKey) {
|
|
49
|
+
throw new Error('API key is required');
|
|
50
|
+
}
|
|
51
|
+
let version = anthropicOptions.version;
|
|
52
|
+
if (!version) {
|
|
53
|
+
const answer = await inquirer.prompt([
|
|
54
|
+
{
|
|
55
|
+
type: 'input',
|
|
56
|
+
name: 'version',
|
|
57
|
+
message: 'anthropic version:',
|
|
58
|
+
default: '2023-06-01',
|
|
59
|
+
},
|
|
60
|
+
]);
|
|
61
|
+
version = answer.version;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
type: 'anthropic',
|
|
65
|
+
modelValue: options.model,
|
|
66
|
+
secretName: '',
|
|
67
|
+
baseUrl,
|
|
68
|
+
apiKey,
|
|
69
|
+
...(version ? { version } : {}),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { BaseProviderConfig, BaseCollectorOptions, ProviderConfigCollector } from './types.js';
|
|
2
|
+
export type AzureAuthMethod = 'apiKey' | 'managedIdentity' | 'workloadIdentity';
|
|
2
3
|
/**
|
|
3
4
|
* Configuration for Azure OpenAI models.
|
|
4
5
|
*/
|
|
5
6
|
export interface AzureConfig extends BaseProviderConfig {
|
|
6
7
|
type: 'azure';
|
|
7
8
|
baseUrl: string;
|
|
8
|
-
apiKey: string;
|
|
9
9
|
apiVersion: string;
|
|
10
|
+
authMethod?: AzureAuthMethod;
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
tenantId?: string;
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
16
|
* Options specific to Azure collector.
|
|
@@ -15,16 +19,15 @@ export interface AzureCollectorOptions extends BaseCollectorOptions {
|
|
|
15
19
|
baseUrl?: string;
|
|
16
20
|
apiKey?: string;
|
|
17
21
|
apiVersion?: string;
|
|
22
|
+
authMethod?: AzureAuthMethod;
|
|
23
|
+
clientId?: string;
|
|
24
|
+
tenantId?: string;
|
|
18
25
|
}
|
|
19
26
|
/**
|
|
20
27
|
* Configuration collector for Azure OpenAI models.
|
|
21
28
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* - apiVersion: The API version to use (defaults to 2024-12-01-preview)
|
|
25
|
-
* - apiKey: The authentication key for the Azure OpenAI resource
|
|
26
|
-
*
|
|
27
|
-
* Values can be provided via command-line options or will be prompted interactively.
|
|
29
|
+
* Supports API Key, Managed Identity (AKS), and Workload Identity auth.
|
|
30
|
+
* Values can be provided via command-line options or prompted interactively.
|
|
28
31
|
*/
|
|
29
32
|
export declare class AzureConfigCollector implements ProviderConfigCollector {
|
|
30
33
|
collectConfig(options: BaseCollectorOptions): Promise<AzureConfig>;
|