@agents-at-scale/ark 0.1.36 → 0.1.38

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 (129) hide show
  1. package/README.md +53 -70
  2. package/dist/arkServices.d.ts +3 -27
  3. package/dist/arkServices.js +31 -3
  4. package/dist/arkServices.spec.js +118 -10
  5. package/dist/commands/chat/index.js +1 -2
  6. package/dist/commands/completion/index.js +0 -2
  7. package/dist/commands/generate/generators/project.js +33 -26
  8. package/dist/commands/generate/index.js +2 -2
  9. package/dist/commands/generate/templateDiscovery.js +13 -4
  10. package/dist/commands/install/index.js +49 -58
  11. package/dist/commands/models/create.d.ts +9 -1
  12. package/dist/commands/models/create.js +97 -90
  13. package/dist/commands/models/create.spec.js +9 -37
  14. package/dist/commands/models/index.js +8 -2
  15. package/dist/commands/models/index.spec.js +1 -1
  16. package/dist/commands/status/index.d.ts +3 -1
  17. package/dist/commands/status/index.js +54 -2
  18. package/dist/components/AsyncOperation.d.ts +54 -0
  19. package/dist/components/AsyncOperation.js +110 -0
  20. package/dist/components/ChatUI.js +39 -72
  21. package/dist/components/SelectMenu.d.ts +17 -0
  22. package/dist/components/SelectMenu.js +21 -0
  23. package/dist/components/StatusMessage.d.ts +20 -0
  24. package/dist/components/StatusMessage.js +13 -0
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/lib/arkApiClient.d.ts +1 -2
  28. package/dist/lib/arkApiClient.js +5 -6
  29. package/dist/lib/config.d.ts +4 -0
  30. package/dist/lib/config.js +9 -0
  31. package/dist/lib/nextSteps.js +1 -1
  32. package/dist/lib/nextSteps.spec.js +1 -1
  33. package/dist/lib/security.js +4 -0
  34. package/dist/lib/startup.js +6 -2
  35. package/dist/lib/startup.spec.js +1 -1
  36. package/dist/lib/timeout.d.ts +1 -0
  37. package/dist/lib/timeout.js +20 -0
  38. package/dist/lib/timeout.spec.d.ts +1 -0
  39. package/dist/lib/timeout.spec.js +14 -0
  40. package/dist/lib/waitForReady.d.ts +8 -0
  41. package/dist/lib/waitForReady.js +32 -0
  42. package/dist/lib/waitForReady.spec.d.ts +1 -0
  43. package/dist/lib/waitForReady.spec.js +104 -0
  44. package/dist/types/arkService.d.ts +27 -0
  45. package/dist/types/arkService.js +1 -0
  46. package/dist/ui/asyncOperations/connectingToArk.d.ts +15 -0
  47. package/dist/ui/asyncOperations/connectingToArk.js +63 -0
  48. package/package.json +7 -5
  49. package/templates/agent/agent.template.yaml +27 -0
  50. package/templates/marketplace/.editorconfig +24 -0
  51. package/templates/marketplace/.github/.keep +11 -0
  52. package/templates/marketplace/.github/workflows/.keep +16 -0
  53. package/templates/marketplace/.helmignore +23 -0
  54. package/templates/marketplace/.prettierrc.json +20 -0
  55. package/templates/marketplace/.yamllint.yml +53 -0
  56. package/templates/marketplace/README.md +197 -0
  57. package/templates/marketplace/agents/.keep +29 -0
  58. package/templates/marketplace/docs/.keep +19 -0
  59. package/templates/marketplace/mcp-servers/.keep +32 -0
  60. package/templates/marketplace/models/.keep +23 -0
  61. package/templates/marketplace/projects/.keep +43 -0
  62. package/templates/marketplace/queries/.keep +25 -0
  63. package/templates/marketplace/teams/.keep +29 -0
  64. package/templates/marketplace/tools/.keep +32 -0
  65. package/templates/marketplace/tools/examples/.keep +17 -0
  66. package/templates/mcp-server/Dockerfile +133 -0
  67. package/templates/mcp-server/Makefile +186 -0
  68. package/templates/mcp-server/README.md +178 -0
  69. package/templates/mcp-server/build.sh +76 -0
  70. package/templates/mcp-server/chart/Chart.yaml +22 -0
  71. package/templates/mcp-server/chart/templates/_helpers.tpl +62 -0
  72. package/templates/mcp-server/chart/templates/deployment.yaml +80 -0
  73. package/templates/mcp-server/chart/templates/hpa.yaml +32 -0
  74. package/templates/mcp-server/chart/templates/mcpserver.yaml +21 -0
  75. package/templates/mcp-server/chart/templates/secret.yaml +11 -0
  76. package/templates/mcp-server/chart/templates/service.yaml +15 -0
  77. package/templates/mcp-server/chart/templates/serviceaccount.yaml +13 -0
  78. package/templates/mcp-server/chart/values.yaml +84 -0
  79. package/templates/mcp-server/example-values.yaml +74 -0
  80. package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-agent.yaml +33 -0
  81. package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-query.yaml +24 -0
  82. package/templates/models/azure.yaml +33 -0
  83. package/templates/models/claude.yaml +28 -0
  84. package/templates/models/gemini.yaml +28 -0
  85. package/templates/models/openai.yaml +39 -0
  86. package/templates/project/.editorconfig +24 -0
  87. package/templates/project/.helmignore +24 -0
  88. package/templates/project/.prettierrc.json +16 -0
  89. package/templates/project/.yamllint.yml +50 -0
  90. package/templates/project/Chart.yaml +19 -0
  91. package/templates/project/Makefile +360 -0
  92. package/templates/project/README.md +377 -0
  93. package/templates/project/agents/.keep +11 -0
  94. package/templates/project/docs/.keep +14 -0
  95. package/templates/project/mcp-servers/.keep +34 -0
  96. package/templates/project/models/.keep +17 -0
  97. package/templates/project/queries/.keep +11 -0
  98. package/templates/project/scripts/setup.sh +108 -0
  99. package/templates/project/teams/.keep +11 -0
  100. package/templates/project/templates/00-rbac.yaml +168 -0
  101. package/templates/project/templates/01-models.yaml +11 -0
  102. package/templates/project/templates/02-mcp-servers.yaml +22 -0
  103. package/templates/project/templates/03-tools.yaml +12 -0
  104. package/templates/project/templates/04-agents.yaml +12 -0
  105. package/templates/project/templates/05-teams.yaml +11 -0
  106. package/templates/project/templates/06-queries.yaml +11 -0
  107. package/templates/project/templates/_helpers.tpl +91 -0
  108. package/templates/project/tests/e2e/.keep +10 -0
  109. package/templates/project/tests/unit/.keep +10 -0
  110. package/templates/project/tools/.keep +25 -0
  111. package/templates/project/tools/example-tool.yaml.disabled +94 -0
  112. package/templates/project/tools/examples/data-tool/Dockerfile +32 -0
  113. package/templates/project/values.yaml +141 -0
  114. package/templates/query/query.template.yaml +13 -0
  115. package/templates/team/team.template.yaml +17 -0
  116. package/templates/tool/.python-version +1 -0
  117. package/templates/tool/Dockerfile +23 -0
  118. package/templates/tool/README.md +238 -0
  119. package/templates/tool/agent.yaml +19 -0
  120. package/templates/tool/deploy.sh +10 -0
  121. package/templates/tool/deployment/deployment.yaml +31 -0
  122. package/templates/tool/deployment/kustomization.yaml +7 -0
  123. package/templates/tool/deployment/mcpserver.yaml +12 -0
  124. package/templates/tool/deployment/service.yaml +12 -0
  125. package/templates/tool/deployment/serviceaccount.yaml +8 -0
  126. package/templates/tool/deployment/values.yaml +3 -0
  127. package/templates/tool/pyproject.toml +9 -0
  128. package/templates/tool/src/main.py +36 -0
  129. package/templates/tool/uv.lock +498 -0
@@ -0,0 +1,29 @@
1
+ # Agents Directory
2
+
3
+ This directory contains reusable agent definitions that can be shared across projects.
4
+
5
+ ## Structure
6
+
7
+ Each agent should be in its own file or subdirectory (complex agents) with:
8
+
9
+ - agent.yaml (the main agent definition)
10
+ - README.md (documentation)
11
+ - examples/ (optional usage examples)
12
+
13
+ ## Naming Convention
14
+
15
+ Use descriptive names that indicate the agent's purpose:
16
+
17
+ - data-analyst/
18
+ - code-reviewer/
19
+ - security-scanner/
20
+ - documentation-writer/
21
+
22
+ ## Contributing
23
+
24
+ When contributing an agent:
25
+
26
+ 1. Ensure it follows the Ark agent specification
27
+ 2. Include comprehensive documentation
28
+ 3. Provide usage examples
29
+ 4. Test with multiple models when possible
@@ -0,0 +1,19 @@
1
+ # Documentation Directory
2
+
3
+ Documentation for the marketplace and its components.
4
+
5
+ ## Structure
6
+
7
+ - contributing.md - Guidelines for contributors
8
+ - component-specs/ - Specifications for different component types
9
+ - best-practices/ - Development and usage best practices
10
+ - tutorials/ - Step-by-step guides
11
+ - api/ - API documentation
12
+
13
+ ## Documentation Standards
14
+
15
+ 1. Use clear, concise language
16
+ 2. Include code examples
17
+ 3. Keep documentation up-to-date
18
+ 4. Follow markdown conventions
19
+ 5. Include diagrams where helpful
@@ -0,0 +1,32 @@
1
+ # MCP Servers Directory
2
+
3
+ This directory contains Model Context Protocol (MCP) server configurations and implementations.
4
+
5
+ ## Structure
6
+
7
+ Each MCP server should be in its own subdirectory with:
8
+
9
+ - mcp-server.yaml (server configuration)
10
+ - src/ (source code if custom implementation)
11
+ - Dockerfile (if containerized)
12
+ - README.md (documentation)
13
+ - examples/ (usage examples)
14
+
15
+ ## Naming Convention
16
+
17
+ Use descriptive names that indicate the server's purpose:
18
+
19
+ - file-system-server/
20
+ - database-server/
21
+ - api-gateway-server/
22
+ - knowledge-base-server/
23
+
24
+ ## Contributing
25
+
26
+ When contributing an MCP server:
27
+
28
+ 1. Follow MCP protocol specifications
29
+ 2. Include security configurations
30
+ 3. Document all available tools/resources
31
+ 4. Provide integration examples
32
+ 5. Include monitoring and logging setup
@@ -0,0 +1,23 @@
1
+ # Models Directory
2
+
3
+ This directory contains model configurations for different AI providers and use cases.
4
+
5
+ ## Structure
6
+ Each model configuration should be:
7
+ - provider-specific directories (openai/, anthropic/, etc.)
8
+ - model-specific YAML files within each directory
9
+ - README.md documenting capabilities and limitations
10
+
11
+ ## Naming Convention
12
+ Use provider and model names:
13
+ - openai/gpt-4.yaml
14
+ - anthropic/claude-3-sonnet.yaml
15
+ - azure/gpt-4-32k.yaml
16
+ - local/llama2-7b.yaml
17
+
18
+ ## Contributing
19
+ When contributing a model configuration:
20
+ 1. Include provider-specific settings
21
+ 2. Document token limits and capabilities
22
+ 3. Specify recommended use cases
23
+ 4. Include cost considerations if applicable
@@ -0,0 +1,43 @@
1
+ # Projects Directory
2
+
3
+ This directory contains complete, reusable Ark projects that demonstrate comprehensive use cases and multi-component solutions.
4
+
5
+ ## Purpose
6
+
7
+ - **Full Project Templates**: Complete Ark project structures with multiple agents, teams, models, and tools working together
8
+ - **End-to-End Solutions**: Real-world scenarios that showcase complex workflows and integrations
9
+ - **Reference Implementations**: Best practices for structuring large-scale Ark deployments
10
+
11
+ ## Structure Guidelines
12
+
13
+ Each project should include:
14
+
15
+ - **Complete project structure**: All necessary YAML configurations
16
+ - **README.md**: Detailed setup instructions, use case description, and architecture overview
17
+ - **Documentation**: Architecture diagrams, workflow explanations, and deployment guides
18
+ - **Examples**: Sample queries and expected outputs
19
+ - **Dependencies**: Clear list of required models, tools, and external services
20
+
21
+ ## Naming Convention
22
+
23
+ Use descriptive names that indicate the use case:
24
+
25
+ - `customer-support-workflow/` - Multi-agent customer service system
26
+ - `research-assistant-pipeline/` - Academic research and analysis workflow
27
+ - `content-generation-studio/` - Creative content production system
28
+
29
+ ## Project Requirements
30
+
31
+ - Each project must be self-contained and deployable
32
+ - Include comprehensive documentation
33
+ - Provide clear setup and configuration instructions
34
+ - Include sample data or test cases where applicable
35
+ - Follow Ark best practices for resource organization
36
+
37
+ ## Examples
38
+
39
+ - Multi-agent workflows with specialized roles
40
+ - Integration with external APIs and services
41
+ - Complex data processing pipelines
42
+ - Cross-functional team collaboration scenarios
43
+ - Industry-specific solution templates
@@ -0,0 +1,25 @@
1
+ # Queries Directory
2
+
3
+ This directory contains reusable query templates for common use cases.
4
+
5
+ ## Structure
6
+ Each query should be in its own file or subdirectory:
7
+ - query-name.yaml (simple queries)
8
+ - complex-query/ (for queries with multiple files)
9
+ - query.yaml
10
+ - README.md
11
+ - examples/
12
+
13
+ ## Naming Convention
14
+ Use descriptive names that indicate the query's purpose:
15
+ - code-analysis.yaml
16
+ - data-transformation.yaml
17
+ - security-audit.yaml
18
+ - document-summarization.yaml
19
+
20
+ ## Contributing
21
+ When contributing a query:
22
+ 1. Make it parameterizable where possible
23
+ 2. Include clear documentation of expected inputs
24
+ 3. Provide example outputs
25
+ 4. Specify compatible agents/teams
@@ -0,0 +1,29 @@
1
+ # Teams Directory
2
+
3
+ This directory contains reusable team configurations for multi-agent workflows.
4
+
5
+ ## Structure
6
+
7
+ Each team should be in its own file (simple) or subdirectory (complex) with:
8
+
9
+ - team.yaml (the main team definition)
10
+ - README.md (documentation describing the workflow)
11
+ - examples/ (optional usage examples)
12
+
13
+ ## Naming Convention
14
+
15
+ Use descriptive names that indicate the team's workflow:
16
+
17
+ - code-review-team/
18
+ - data-pipeline-team/
19
+ - content-creation-team/
20
+ - security-audit-team/
21
+
22
+ ## Contributing
23
+
24
+ When contributing a team:
25
+
26
+ 1. Document the team's workflow and strategy
27
+ 2. Explain when to use this team configuration
28
+ 3. Include examples of typical inputs and outputs
29
+ 4. Test the team configuration thoroughly
@@ -0,0 +1,32 @@
1
+ # Tools Directory
2
+
3
+ This directory contains reusable tool definitions for extending agent capabilities.
4
+
5
+ ## Structure
6
+
7
+ Each tool should be in its own subdirectory with:
8
+
9
+ - tool.yaml (the main tool definition)
10
+ - src/ (source code if applicable)
11
+ - Dockerfile (if containerized)
12
+ - README.md (documentation)
13
+ - examples/ (usage examples)
14
+
15
+ ## Naming Convention
16
+
17
+ Use descriptive names that indicate the tool's function:
18
+
19
+ - file-processor/
20
+ - database-connector/
21
+ - api-client/
22
+ - data-validator/
23
+
24
+ ## Contributing
25
+
26
+ When contributing a tool:
27
+
28
+ 1. Follow the Ark tool specification
29
+ 2. Include comprehensive documentation
30
+ 3. Provide usage examples
31
+ 4. Ensure proper error handling
32
+ 5. Include security considerations
@@ -0,0 +1,17 @@
1
+ # Tool Examples Directory
2
+
3
+ This directory contains example tool implementations that can serve as templates.
4
+
5
+ Examples should demonstrate:
6
+
7
+ - Best practices for tool development
8
+ - Common patterns and use cases
9
+ - Integration with different agent types
10
+ - Error handling and logging
11
+
12
+ Each example should include:
13
+
14
+ - Complete source code
15
+ - Documentation
16
+ - Build instructions
17
+ - Testing guidelines
@@ -0,0 +1,133 @@
1
+ {{- if eq .Values.technology "node" }}
2
+ FROM node:22
3
+
4
+ # Install the MCP server package
5
+ {{- if .Values.packageSource }}
6
+ {{- if eq .Values.packageSource "npm" }}
7
+ RUN npm install -g {{ .Values.packageName }}
8
+ {{- else if eq .Values.packageSource "local" }}
9
+ COPY . /app
10
+ WORKDIR /app
11
+ RUN npm install
12
+ {{- end }}
13
+ {{- else }}
14
+ COPY . /app
15
+ WORKDIR /app
16
+ RUN npm install
17
+ {{- end }}
18
+
19
+ # Install mcp-proxy for HTTP transport
20
+ RUN npm install -g mcp-proxy
21
+
22
+ EXPOSE 8080
23
+
24
+ {{- if eq .Values.packageSource "npm" }}
25
+ ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"{{ .Values.packageName }} stdio\"" ]
26
+ {{- else }}
27
+ ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"node index.js stdio\"" ]
28
+ {{- end }}
29
+
30
+ {{- else if eq .Values.technology "deno" }}
31
+ FROM denoland/deno:2.1.8
32
+
33
+ USER root
34
+
35
+ # Install Node.js for mcp-proxy
36
+ RUN apt-get update && apt-get install -y \
37
+ curl \
38
+ && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
39
+ && apt-get install -y nodejs \
40
+ && rm -rf /var/lib/apt/lists/*
41
+
42
+ # Install mcp-proxy
43
+ RUN npm install -g mcp-proxy
44
+
45
+ {{- if .Values.packageSource }}
46
+ {{- if eq .Values.packageSource "jsr" }}
47
+ RUN deno install --global -A --node-modules-dir=auto {{ .Values.packageName }}
48
+ {{- else if eq .Values.packageSource "local" }}
49
+ COPY . /app
50
+ WORKDIR /app
51
+ {{- end }}
52
+ {{- else }}
53
+ COPY . /app
54
+ WORKDIR /app
55
+ {{- end }}
56
+
57
+ EXPOSE 8080
58
+
59
+ {{- if eq .Values.packageSource "jsr" }}
60
+ ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"deno run -A --node-modules-dir=auto {{ .Values.packageName }} stdio\"" ]
61
+ {{- else }}
62
+ ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"deno run -A index.ts stdio\"" ]
63
+ {{- end }}
64
+
65
+ {{- else if eq .Values.technology "go" }}
66
+ FROM golang:latest AS go-builder
67
+ {{- if .Values.packageSource }}
68
+ {{- if eq .Values.packageSource "go-install" }}
69
+ RUN go install {{ .Values.packageName }}@latest
70
+ {{- else if eq .Values.packageSource "local" }}
71
+ COPY . /app
72
+ WORKDIR /app
73
+ RUN go build -o {{ .Values.mcpServerName }} .
74
+ {{- end }}
75
+ {{- else }}
76
+ COPY . /app
77
+ WORKDIR /app
78
+ RUN go build -o {{ .Values.mcpServerName }} .
79
+ {{- end }}
80
+
81
+ FROM node:22
82
+ {{- if eq .Values.packageSource "go-install" }}
83
+ COPY --from=go-builder /go/bin/{{ .Values.packageName }} /usr/local/bin/
84
+ {{- else }}
85
+ COPY --from=go-builder /app/{{ .Values.mcpServerName }} /usr/local/bin/
86
+ {{- end }}
87
+ RUN npm install -g mcp-proxy
88
+
89
+ EXPOSE 8080
90
+
91
+ {{- if eq .Values.packageSource "go-install" }}
92
+ ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"/usr/local/bin/{{ .Values.packageName }} stdio\"" ]
93
+ {{- else }}
94
+ ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"/usr/local/bin/{{ .Values.mcpServerName }} stdio\"" ]
95
+ {{- end }}
96
+
97
+ {{- else if eq .Values.technology "python" }}
98
+ FROM python:3.11-slim
99
+
100
+ WORKDIR /app
101
+
102
+ {{- if .Values.packageSource }}
103
+ {{- if eq .Values.packageSource "pip" }}
104
+ RUN pip install {{ .Values.packageName }}
105
+ {{- else if eq .Values.packageSource "local" }}
106
+ COPY requirements.txt .
107
+ RUN pip install -r requirements.txt
108
+ COPY . .
109
+ {{- end }}
110
+ {{- else }}
111
+ COPY requirements.txt .
112
+ RUN pip install -r requirements.txt
113
+ COPY . .
114
+ {{- end }}
115
+
116
+ # Install Node.js for mcp-proxy
117
+ RUN apt-get update && apt-get install -y \
118
+ curl \
119
+ && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
120
+ && apt-get install -y nodejs \
121
+ && rm -rf /var/lib/apt/lists/*
122
+
123
+ RUN npm install -g mcp-proxy
124
+
125
+ EXPOSE 8080
126
+
127
+ {{- if eq .Values.packageSource "pip" }}
128
+ ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"{{ .Values.packageName }} stdio\"" ]
129
+ {{- else }}
130
+ ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"python main.py stdio\"" ]
131
+ {{- end }}
132
+
133
+ {{- end }}
@@ -0,0 +1,186 @@
1
+ # {{ .Values.mcpServerName }} MCP Server Makefile
2
+
3
+ # Variables
4
+ IMAGE_NAME ?= {{ .Values.mcpServerName }}
5
+ IMAGE_TAG ?= latest
6
+ TARGET_CLUSTER ?= auto
7
+ HELM_RELEASE_NAME ?= {{ .Values.mcpServerName }}-mcp
8
+
9
+ # Docker image build
10
+ .PHONY: build
11
+ build:
12
+ @echo "Building {{ .Values.mcpServerName }} MCP Server Docker image..."
13
+ ./build.sh $(IMAGE_TAG) $(TARGET_CLUSTER)
14
+
15
+ {{- if .Values.requiresAuth }}
16
+ # Install using Helm
17
+ .PHONY: install
18
+ install:
19
+ @echo "Installing {{ .Values.mcpServerName }} MCP Server with Helm..."
20
+ @if [ -z "$(AUTH_TOKEN)" ]; then \
21
+ echo "Error: AUTH_TOKEN environment variable is required"; \
22
+ echo "Usage: make install AUTH_TOKEN=your-auth-token"; \
23
+ exit 1; \
24
+ fi
25
+ helm install $(HELM_RELEASE_NAME) ./chart \
26
+ --set auth.token="$(AUTH_TOKEN)"
27
+ {{- else }}
28
+ # Install using Helm
29
+ .PHONY: install
30
+ install:
31
+ @echo "Installing {{ .Values.mcpServerName }} MCP Server with Helm..."
32
+ helm install $(HELM_RELEASE_NAME) ./chart
33
+ {{- end }}
34
+
35
+ # Install with values file
36
+ .PHONY: install-with-values
37
+ install-with-values:
38
+ @echo "Installing {{ .Values.mcpServerName }} MCP Server with values file..."
39
+ @if [ -z "$(VALUES_FILE)" ]; then \
40
+ echo "Error: VALUES_FILE is required"; \
41
+ echo "Usage: make install-with-values VALUES_FILE=example-values.yaml"; \
42
+ exit 1; \
43
+ fi
44
+ helm install $(HELM_RELEASE_NAME) ./chart \
45
+ --values $(VALUES_FILE)
46
+
47
+ # Upgrade using Helm
48
+ .PHONY: upgrade
49
+ upgrade:
50
+ @echo "Upgrading {{ .Values.mcpServerName }} MCP Server with Helm..."
51
+ {{- if .Values.requiresAuth }}
52
+ @if [ -n "$(AUTH_TOKEN)" ]; then \
53
+ helm upgrade $(HELM_RELEASE_NAME) ./chart \
54
+ --set auth.token="$(AUTH_TOKEN)"; \
55
+ elif [ -n "$(VALUES_FILE)" ]; then \
56
+ helm upgrade $(HELM_RELEASE_NAME) ./chart \
57
+ --values $(VALUES_FILE); \
58
+ else \
59
+ helm upgrade $(HELM_RELEASE_NAME) ./chart; \
60
+ fi
61
+ {{- else }}
62
+ @if [ -n "$(VALUES_FILE)" ]; then \
63
+ helm upgrade $(HELM_RELEASE_NAME) ./chart \
64
+ --values $(VALUES_FILE); \
65
+ else \
66
+ helm upgrade $(HELM_RELEASE_NAME) ./chart; \
67
+ fi
68
+ {{- end }}
69
+
70
+ # Uninstall using Helm
71
+ .PHONY: uninstall
72
+ uninstall:
73
+ @echo "Uninstalling {{ .Values.mcpServerName }} MCP Server..."
74
+ helm uninstall $(HELM_RELEASE_NAME)
75
+
76
+ # Check status
77
+ .PHONY: status
78
+ status:
79
+ @echo "Checking {{ .Values.mcpServerName }} MCP Server status..."
80
+ @echo "=== Helm Release Status ==="
81
+ helm status $(HELM_RELEASE_NAME)
82
+ @echo ""
83
+ @echo "=== Pod Status ==="
84
+ kubectl get pods -l app.kubernetes.io/name={{ .Values.mcpServerName }}
85
+ @echo ""
86
+ @echo "=== Service Status ==="
87
+ kubectl get svc -l app.kubernetes.io/name={{ .Values.mcpServerName }}
88
+ @echo ""
89
+ @echo "=== MCP Server Status ==="
90
+ kubectl get mcpservers -l app.kubernetes.io/name={{ .Values.mcpServerName }}
91
+
92
+ # Show logs
93
+ .PHONY: logs
94
+ logs:
95
+ @echo "Showing {{ .Values.mcpServerName }} MCP Server logs..."
96
+ kubectl logs -l app.kubernetes.io/name={{ .Values.mcpServerName }} --follow
97
+
98
+ # Deploy examples
99
+ .PHONY: deploy-examples
100
+ deploy-examples:
101
+ @echo "Deploying example agent and query..."
102
+ kubectl apply -f examples/
103
+
104
+ # Clean up examples
105
+ .PHONY: clean-examples
106
+ clean-examples:
107
+ @echo "Cleaning up example resources..."
108
+ kubectl delete -f examples/ --ignore-not-found
109
+
110
+ # Test the MCP server
111
+ .PHONY: test
112
+ test:
113
+ @echo "Testing {{ .Values.mcpServerName }} MCP Server..."
114
+ {{- if .Values.technology }}
115
+ {{- if eq .Values.technology "node" }}
116
+ npm test
117
+ {{- else if eq .Values.technology "python" }}
118
+ python -m pytest
119
+ {{- else if eq .Values.technology "go" }}
120
+ go test ./...
121
+ {{- else if eq .Values.technology "deno" }}
122
+ deno test
123
+ {{- end }}
124
+ {{- else }}
125
+ @echo "No tests configured for this MCP server"
126
+ {{- end }}
127
+
128
+ # Development server
129
+ .PHONY: dev
130
+ dev:
131
+ @echo "Starting {{ .Values.mcpServerName }} MCP Server in development mode..."
132
+ {{- if .Values.technology }}
133
+ {{- if eq .Values.technology "node" }}
134
+ npm run dev
135
+ {{- else if eq .Values.technology "python" }}
136
+ python main.py
137
+ {{- else if eq .Values.technology "go" }}
138
+ go run .
139
+ {{- else if eq .Values.technology "deno" }}
140
+ deno run -A index.ts
141
+ {{- end }}
142
+ {{- else }}
143
+ @echo "Development mode not configured for this MCP server"
144
+ {{- end }}
145
+
146
+ # Port forward for local testing
147
+ .PHONY: port-forward
148
+ port-forward:
149
+ @echo "Port forwarding {{ .Values.mcpServerName }} MCP Server to localhost:8080..."
150
+ kubectl port-forward svc/$(HELM_RELEASE_NAME) 8080:8080
151
+
152
+ # Help
153
+ .PHONY: help
154
+ help:
155
+ @echo "{{ .Values.mcpServerName }} MCP Server Makefile"
156
+ @echo ""
157
+ @echo "Available targets:"
158
+ @echo " build Build Docker image"
159
+ @echo " install Install with Helm"
160
+ @echo " install-with-values Install with values file"
161
+ @echo " upgrade Upgrade with Helm"
162
+ @echo " uninstall Uninstall from cluster"
163
+ @echo " status Check deployment status"
164
+ @echo " logs Show pod logs"
165
+ @echo " deploy-examples Deploy example resources"
166
+ @echo " clean-examples Clean up example resources"
167
+ @echo " test Run tests"
168
+ @echo " dev Start development server"
169
+ @echo " port-forward Port forward to localhost"
170
+ @echo " help Show this help"
171
+ @echo ""
172
+ {{- if .Values.requiresAuth }}
173
+ @echo "Environment variables:"
174
+ @echo " AUTH_TOKEN Authentication token (required for install)"
175
+ @echo " VALUES_FILE Helm values file path"
176
+ @echo ""
177
+ {{- end }}
178
+ @echo "Examples:"
179
+ {{- if .Values.requiresAuth }}
180
+ @echo " make install AUTH_TOKEN=your-token"
181
+ {{- else }}
182
+ @echo " make install"
183
+ {{- end }}
184
+ @echo " make install-with-values VALUES_FILE=example-values.yaml"
185
+ @echo " make upgrade"
186
+ @echo " make status"