diff --git a/kubechain/CHANGELOG.md b/kubechain/CHANGELOG.md index 24182b0..4ddce57 100644 --- a/kubechain/CHANGELOG.md +++ b/kubechain/CHANGELOG.md @@ -1,3 +1,18 @@ +### v0.1.12 (March 24, 2025) + +Features: +- Added OpenTelemetry tracing support + - Spans for LLM requests with context window and tool metrics + - Parent spans for TaskRun lifecycle tracking + - Completion spans for terminal states + - Status and error propagation to spans + +Changes: +- Refactored TaskRun phase transitions and improved phase transition logging +- Enhanced testing infrastructure + - Improved TaskRun and TaskRunToolCall test suites + - Added test utilities for common setup patterns + ### v0.1.11 (March 24, 2025) Features: diff --git a/kubechain/config/manager/kustomization.yaml b/kubechain/config/manager/kustomization.yaml index 4ec3b6b..590e3b7 100644 --- a/kubechain/config/manager/kustomization.yaml +++ b/kubechain/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: controller - newTag: "202503251842" + newName: ghcr.io/humanlayer/smallchain + newTag: v0.1.12 diff --git a/kubechain/config/release/latest-crd.yaml b/kubechain/config/release/latest-crd.yaml index 2327633..77081d6 100644 --- a/kubechain/config/release/latest-crd.yaml +++ b/kubechain/config/release/latest-crd.yaml @@ -731,15 +731,11 @@ spec: items: description: Message represents a single message in the conversation properties: - arguments: - description: Arguments is the arguments to pass to the tool - call - type: string content: description: Content is the message content type: string name: - description: Name is the name of the tool call + description: Name is the name of the tool that was called type: string role: description: Role is the role of the message sender (system, @@ -789,11 +785,6 @@ spec: - type type: object type: array - type: - description: Type is the type of tool call - enum: - - function - type: string required: - content - role @@ -812,10 +803,12 @@ spec: phase: description: Phase indicates the current phase of the TaskRun enum: + - Initializing - Pending - ReadyForLLM - SendContextWindowToLLM - ToolCallsPending + - CheckingToolCalls - FinalAnswer - ErrorBackoff - Failed @@ -823,6 +816,16 @@ spec: ready: description: Ready indicates if the TaskRun is ready to be executed type: boolean + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object startTime: description: StartTime is when the TaskRun started format: date-time @@ -967,6 +970,16 @@ spec: result: description: Result contains the result of the tool call if completed type: string + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object startTime: description: StartTime is when the tool call started format: date-time diff --git a/kubechain/config/release/latest.yaml b/kubechain/config/release/latest.yaml index d9b95c8..a4374ed 100644 --- a/kubechain/config/release/latest.yaml +++ b/kubechain/config/release/latest.yaml @@ -740,15 +740,11 @@ spec: items: description: Message represents a single message in the conversation properties: - arguments: - description: Arguments is the arguments to pass to the tool - call - type: string content: description: Content is the message content type: string name: - description: Name is the name of the tool call + description: Name is the name of the tool that was called type: string role: description: Role is the role of the message sender (system, @@ -798,11 +794,6 @@ spec: - type type: object type: array - type: - description: Type is the type of tool call - enum: - - function - type: string required: - content - role @@ -821,10 +812,12 @@ spec: phase: description: Phase indicates the current phase of the TaskRun enum: + - Initializing - Pending - ReadyForLLM - SendContextWindowToLLM - ToolCallsPending + - CheckingToolCalls - FinalAnswer - ErrorBackoff - Failed @@ -832,6 +825,16 @@ spec: ready: description: Ready indicates if the TaskRun is ready to be executed type: boolean + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object startTime: description: StartTime is when the TaskRun started format: date-time @@ -976,6 +979,16 @@ spec: result: description: Result contains the result of the tool call if completed type: string + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object startTime: description: StartTime is when the tool call started format: date-time @@ -1638,7 +1651,7 @@ spec: - --health-probe-bind-address=:8081 command: - /manager - image: ghcr.io/humanlayer/smallchain:v0.1.11 + image: ghcr.io/humanlayer/smallchain:v0.1.12 livenessProbe: httpGet: path: /healthz diff --git a/kubechain/config/release/v0.1.12-crd.yaml b/kubechain/config/release/v0.1.12-crd.yaml new file mode 100644 index 0000000..77081d6 --- /dev/null +++ b/kubechain/config/release/v0.1.12-crd.yaml @@ -0,0 +1,1274 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: agents.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Agent + listKind: AgentList + plural: agents + singular: agent + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Agent is the Schema for the agents API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: AgentSpec defines the desired state of Agent + properties: + llmRef: + description: LLMRef references the LLM to use for this agent + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + mcpServers: + description: MCPServers is a list of MCP servers this agent can use + items: + description: LocalObjectReference contains enough information to + locate the referenced resource in the same namespace + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + type: array + system: + description: System is the system prompt for the agent + minLength: 1 + type: string + tools: + description: Tools is a list of tools this agent can use + items: + description: LocalObjectReference contains enough information to + locate the referenced resource in the same namespace + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + type: array + required: + - llmRef + - system + type: object + status: + description: AgentStatus defines the observed state of Agent + properties: + ready: + description: Ready indicates if the agent's dependencies (LLM and + Tools) are valid and ready + type: boolean + status: + description: Status indicates the current status of the agent + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + validMCPServers: + description: ValidMCPServers is the list of MCP servers that were + successfully validated + items: + properties: + name: + description: Name of the MCP server + type: string + tools: + description: Tools available from this MCP server + items: + type: string + type: array + required: + - name + type: object + type: array + validTools: + description: ValidTools is the list of tools that were successfully + validated + items: + properties: + kind: + enum: + - Tool + - ToolSet + type: string + name: + description: Name of the tool + type: string + required: + - kind + - name + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: contactchannels.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: ContactChannel + listKind: ContactChannelList + plural: contactchannels + singular: contactchannel + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.channelType + name: ChannelType + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ContactChannel is the Schema for the contactchannels API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ContactChannelSpec defines the desired state of ContactChannel. + properties: + apiKeyFrom: + description: APIKeyFrom references the secret containing the API key + or token + properties: + secretKeyRef: + description: SecretKeyRef references a key in a secret + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + channelType: + description: ChannelType is the type of channel (e.g. "slack", "email") + enum: + - slack + - email + type: string + emailConfig: + description: EmailConfig holds configuration specific to Email channels + properties: + address: + description: Address is the recipient email address + pattern: .+@.+\..+ + type: string + contextAboutUser: + description: ContextAboutUser provides context for the LLM about + the recipient + type: string + subject: + description: Subject is the custom subject line + type: string + required: + - address + type: object + slackConfig: + description: SlackConfig holds configuration specific to Slack channels + properties: + allowedResponderIDs: + description: AllowedResponderIDs restricts who can respond (Slack + user IDs) + items: + type: string + type: array + channelOrUserID: + description: ChannelOrUserID is the Slack channel ID (C...) or + user ID (U...) + pattern: ^[CU][A-Z0-9]+$ + type: string + contextAboutChannelOrUser: + description: ContextAboutChannelOrUser provides context for the + LLM about the channel or user + type: string + required: + - channelOrUserID + type: object + required: + - apiKeyFrom + - channelType + type: object + status: + description: ContactChannelStatus defines the observed state of ContactChannel. + properties: + humanLayerProject: + description: HumanLayerProject is the project ID from HumanLayer API + type: string + ready: + description: Ready indicates if the ContactChannel is ready to be + used + type: boolean + status: + description: Status indicates the current status of the ContactChannel + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: llms.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: LLM + listKind: LLMList + plural: llms + singular: llm + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provider + name: Provider + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: LLM is the Schema for the llms API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: LLMSpec defines the desired state of LLM + properties: + apiKeyFrom: + description: APIKeyFrom references the secret containing the API key + properties: + secretKeyRef: + description: SecretKeyRef references a key in a secret + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + maxTokens: + description: MaxTokens defines the maximum number of tokens for the + LLM. + minimum: 1 + type: integer + provider: + description: 'Provider is the LLM provider name (ex: "openai", "anthropic")' + enum: + - openai + - anthropic + type: string + temperature: + description: Temperature adjusts the LLM response randomness (0.0 + to 1.0) + pattern: ^0(\.[0-9]+)?|1(\.0+)?$ + type: string + required: + - apiKeyFrom + - provider + type: object + status: + description: LLMStatus defines the observed state of LLM + properties: + ready: + description: Ready indicates if the LLM is ready to be used + type: boolean + status: + description: Status indicates the current status of the LLM + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: mcpservers.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: MCPServer + listKind: MCPServerList + plural: mcpservers + singular: mcpserver + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.connected + name: Connected + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: MCPServer is the Schema for the mcpservers API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: MCPServerSpec defines the desired state of MCPServer + properties: + approvalContactChannel: + description: ApprovalContactChannel is the contact channel for approval + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + args: + description: Args are the arguments to pass to the command for stdio + MCP servers + items: + type: string + type: array + command: + description: Command is the command to run for stdio MCP servers + type: string + env: + description: Env are environment variables to set for stdio MCP servers + items: + description: EnvVar represents an environment variable + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable (direct literal + value) + type: string + valueFrom: + description: ValueFrom represents a source for the value of + an environment variable + properties: + secretKeyRef: + description: SecretKeyRef selects a key of a secret in the + pod's namespace + properties: + key: + description: Key within the secret + type: string + name: + description: Name of the secret + type: string + required: + - key + - name + type: object + type: object + required: + - name + type: object + type: array + resources: + description: ResourceRequirements defines CPU/Memory resources requests/limits + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Limits describes the maximum amount of compute resources + allowed + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required + type: object + type: object + transport: + description: Transport specifies the transport type for the MCP server + enum: + - stdio + - http + type: string + url: + description: URL is the endpoint for HTTP MCP servers + type: string + required: + - transport + type: object + status: + description: MCPServerStatus defines the observed state of MCPServer + properties: + connected: + description: Connected indicates if the MCP server is currently connected + and operational + type: boolean + status: + description: Status indicates the current status of the MCP server + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + tools: + description: Tools is the list of tools provided by this MCP server + items: + description: MCPTool represents a tool provided by an MCP server + properties: + description: + description: Description of the tool + type: string + inputSchema: + description: InputSchema is the JSON schema for the tool's input + parameters + type: object + x-kubernetes-preserve-unknown-fields: true + name: + description: Name of the tool + type: string + required: + - name + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: taskruns.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: TaskRun + listKind: TaskRunList + plural: taskruns + singular: taskrun + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .spec.taskRef.name + name: Task + type: string + - jsonPath: .status.userMsgPreview + name: Preview + type: string + - jsonPath: .status.output + name: Output + type: string + - jsonPath: .status.error + name: Error + priority: 1 + type: string + - jsonPath: .status.startTime + name: Started + priority: 1 + type: date + - jsonPath: .status.completionTime + name: Completed + priority: 1 + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: TaskRun is the Schema for the taskruns API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskRunSpec defines the desired state of TaskRun + properties: + agentRef: + description: AgentRef is used when the TaskRun is created for a tool + call delegation. + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + taskRef: + description: TaskRef references the task to run + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + taskRunToolCallRef: + description: TaskRunToolCallRef is used when the TaskRun is created + for a tool call delegation. + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + required: + - taskRef + type: object + status: + description: TaskRunStatus defines the observed state of TaskRun + properties: + completionTime: + description: CompletionTime is when the TaskRun completed + format: date-time + type: string + contextWindow: + description: ContextWindow maintains the conversation history as a + sequence of messages + items: + description: Message represents a single message in the conversation + properties: + content: + description: Content is the message content + type: string + name: + description: Name is the name of the tool that was called + type: string + role: + description: Role is the role of the message sender (system, + user, assistant, tool) + enum: + - system + - user + - assistant + - tool + type: string + toolCallId: + description: ToolCallId is the unique identifier for this tool + call + type: string + toolCalls: + description: ToolCalls contains any tool calls requested by + this message + items: + description: ToolCall represents a request to call a tool + properties: + function: + description: Function contains the details of the function + to call + properties: + arguments: + description: Arguments contains the arguments to pass + to the function in JSON format + type: string + name: + description: Name is the name of the function to call + type: string + required: + - arguments + - name + type: object + id: + description: ID is the unique identifier for this tool + call + type: string + type: + description: Type indicates the type of tool call. Currently + only "function" is supported. + type: string + required: + - function + - id + - type + type: object + type: array + required: + - content + - role + type: object + type: array + error: + description: Error message if the task failed + type: string + messageCount: + description: MessageCount contains the number of messages in the context + window + type: integer + output: + description: Output contains the result of the task execution + type: string + phase: + description: Phase indicates the current phase of the TaskRun + enum: + - Initializing + - Pending + - ReadyForLLM + - SendContextWindowToLLM + - ToolCallsPending + - CheckingToolCalls + - FinalAnswer + - ErrorBackoff + - Failed + type: string + ready: + description: Ready indicates if the TaskRun is ready to be executed + type: boolean + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object + startTime: + description: StartTime is when the TaskRun started + format: date-time + type: string + status: + description: Status indicates the current status of the taskrun + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + userMsgPreview: + description: UserMsgPreview stores the first 50 characters of the + user's message + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: taskruntoolcalls.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: TaskRunToolCall + listKind: TaskRunToolCallList + plural: taskruntoolcalls + singular: taskruntoolcall + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .spec.taskRunRef.name + name: TaskRun + type: string + - jsonPath: .spec.toolRef.name + name: Tool + type: string + - jsonPath: .status.startTime + name: Started + priority: 1 + type: date + - jsonPath: .status.completionTime + name: Completed + priority: 1 + type: date + - jsonPath: .status.error + name: Error + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: TaskRunToolCall is the Schema for the taskruntoolcalls API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskRunToolCallSpec defines the desired state of TaskRunToolCall + properties: + arguments: + description: Arguments contains the arguments for the tool call + type: string + taskRunRef: + description: TaskRunRef references the parent TaskRun + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + toolCallId: + description: ToolCallId is the unique identifier for this tool call + type: string + toolRef: + description: ToolRef references the tool to execute + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + required: + - arguments + - taskRunRef + - toolCallId + - toolRef + type: object + status: + description: TaskRunToolCallStatus defines the observed state of TaskRunToolCall + properties: + completionTime: + description: CompletionTime is when the tool call completed + format: date-time + type: string + error: + description: Error message if the tool call failed + type: string + phase: + description: Phase indicates the current phase of the tool call + enum: + - Pending + - Running + - Succeeded + - Failed + type: string + ready: + description: Ready indicates if the tool call is ready to be executed + type: boolean + result: + description: Result contains the result of the tool call if completed + type: string + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object + startTime: + description: StartTime is when the tool call started + format: date-time + type: string + status: + description: Status indicates the current status of the tool call + enum: + - Ready + - Error + - Pending + - AwaitingHumanApproval + - AwaitingHumanInput + - AwaitingSubAgent + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: tasks.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Task + listKind: TaskList + plural: tasks + singular: task + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + - jsonPath: .spec.agentRef.name + name: Agent + type: string + - jsonPath: .spec.message + name: Message + type: string + - jsonPath: .status.output + name: Output + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Task is the Schema for the tasks API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskSpec defines the desired state of Task + properties: + agentRef: + description: AgentRef references the agent that will execute this + task + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + everythingThatHappenedSoFar: + description: EverythingThatHappenedSoFar is a list of all the things + that have happened so far + items: + type: string + type: array + goal: + description: Goal is the goal of the task + type: string + message: + description: Message is the input prompt or request for the task + minLength: 1 + type: string + required: + - agentRef + - message + type: object + status: + description: TaskStatus defines the observed state of Task + properties: + output: + description: Output contains the result of the task execution + type: string + ready: + description: Ready indicates if the task is ready to be executed + type: boolean + status: + description: Status indicates the current status of the task + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: tools.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Tool + listKind: ToolList + plural: tools + singular: tool + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Tool is the Schema for the tools API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ToolSpec defines the desired state of Tool + properties: + agentRef: + description: AgentRef is used for delegation-type tools. + properties: + name: + type: string + required: + - name + type: object + arguments: + description: Arguments defines the JSON schema for the tool's arguments. + type: object + x-kubernetes-preserve-unknown-fields: true + description: + description: Description provides a description of the tool. + type: string + execute: + description: Execute defines how the tool should be executed. + properties: + builtin: + description: Builtin represents an inline (builtin) tool. + properties: + name: + description: Name is the identifier of the builtin function + to run. Today, supports simple math operations + enum: + - add + - subtract + - multiply + - divide + type: string + type: object + externalAPI: + description: ExternalAPI represents an external API call + properties: + credentialsFrom: + description: Credentials reference for API authentication + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + method: + description: Method specifies the HTTP method to use (GET, + POST, etc.) + type: string + requiresApproval: + description: RequiresApproval indicates if this API call needs + explicit approval + type: boolean + url: + description: URL for the API endpoint + type: string + type: object + type: object + name: + description: Name is used for inline/function tools (optional if the + object name is used). + type: string + parameters: + description: Parameters defines the JSON schema for the tool's parameters. + type: object + x-kubernetes-preserve-unknown-fields: true + toolType: + description: ToolType represents the type of tool; e.g. "function", + "delegateToAgent", "externalAPI" etc. + enum: + - function + - delegateToAgent + - externalAPI + type: string + type: object + status: + description: ToolStatus defines the observed state of Tool + properties: + ready: + description: Ready indicates if the tool is ready to be used + type: boolean + status: + description: Status indicates the current status of the tool + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kubechain/config/release/v0.1.12.yaml b/kubechain/config/release/v0.1.12.yaml new file mode 100644 index 0000000..a4374ed --- /dev/null +++ b/kubechain/config/release/v0.1.12.yaml @@ -0,0 +1,1688 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + control-plane: controller-manager + name: default +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: agents.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Agent + listKind: AgentList + plural: agents + singular: agent + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Agent is the Schema for the agents API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: AgentSpec defines the desired state of Agent + properties: + llmRef: + description: LLMRef references the LLM to use for this agent + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + mcpServers: + description: MCPServers is a list of MCP servers this agent can use + items: + description: LocalObjectReference contains enough information to + locate the referenced resource in the same namespace + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + type: array + system: + description: System is the system prompt for the agent + minLength: 1 + type: string + tools: + description: Tools is a list of tools this agent can use + items: + description: LocalObjectReference contains enough information to + locate the referenced resource in the same namespace + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + type: array + required: + - llmRef + - system + type: object + status: + description: AgentStatus defines the observed state of Agent + properties: + ready: + description: Ready indicates if the agent's dependencies (LLM and + Tools) are valid and ready + type: boolean + status: + description: Status indicates the current status of the agent + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + validMCPServers: + description: ValidMCPServers is the list of MCP servers that were + successfully validated + items: + properties: + name: + description: Name of the MCP server + type: string + tools: + description: Tools available from this MCP server + items: + type: string + type: array + required: + - name + type: object + type: array + validTools: + description: ValidTools is the list of tools that were successfully + validated + items: + properties: + kind: + enum: + - Tool + - ToolSet + type: string + name: + description: Name of the tool + type: string + required: + - kind + - name + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: contactchannels.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: ContactChannel + listKind: ContactChannelList + plural: contactchannels + singular: contactchannel + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.channelType + name: ChannelType + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ContactChannel is the Schema for the contactchannels API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ContactChannelSpec defines the desired state of ContactChannel. + properties: + apiKeyFrom: + description: APIKeyFrom references the secret containing the API key + or token + properties: + secretKeyRef: + description: SecretKeyRef references a key in a secret + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + channelType: + description: ChannelType is the type of channel (e.g. "slack", "email") + enum: + - slack + - email + type: string + emailConfig: + description: EmailConfig holds configuration specific to Email channels + properties: + address: + description: Address is the recipient email address + pattern: .+@.+\..+ + type: string + contextAboutUser: + description: ContextAboutUser provides context for the LLM about + the recipient + type: string + subject: + description: Subject is the custom subject line + type: string + required: + - address + type: object + slackConfig: + description: SlackConfig holds configuration specific to Slack channels + properties: + allowedResponderIDs: + description: AllowedResponderIDs restricts who can respond (Slack + user IDs) + items: + type: string + type: array + channelOrUserID: + description: ChannelOrUserID is the Slack channel ID (C...) or + user ID (U...) + pattern: ^[CU][A-Z0-9]+$ + type: string + contextAboutChannelOrUser: + description: ContextAboutChannelOrUser provides context for the + LLM about the channel or user + type: string + required: + - channelOrUserID + type: object + required: + - apiKeyFrom + - channelType + type: object + status: + description: ContactChannelStatus defines the observed state of ContactChannel. + properties: + humanLayerProject: + description: HumanLayerProject is the project ID from HumanLayer API + type: string + ready: + description: Ready indicates if the ContactChannel is ready to be + used + type: boolean + status: + description: Status indicates the current status of the ContactChannel + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: llms.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: LLM + listKind: LLMList + plural: llms + singular: llm + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provider + name: Provider + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: LLM is the Schema for the llms API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: LLMSpec defines the desired state of LLM + properties: + apiKeyFrom: + description: APIKeyFrom references the secret containing the API key + properties: + secretKeyRef: + description: SecretKeyRef references a key in a secret + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + maxTokens: + description: MaxTokens defines the maximum number of tokens for the + LLM. + minimum: 1 + type: integer + provider: + description: 'Provider is the LLM provider name (ex: "openai", "anthropic")' + enum: + - openai + - anthropic + type: string + temperature: + description: Temperature adjusts the LLM response randomness (0.0 + to 1.0) + pattern: ^0(\.[0-9]+)?|1(\.0+)?$ + type: string + required: + - apiKeyFrom + - provider + type: object + status: + description: LLMStatus defines the observed state of LLM + properties: + ready: + description: Ready indicates if the LLM is ready to be used + type: boolean + status: + description: Status indicates the current status of the LLM + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: mcpservers.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: MCPServer + listKind: MCPServerList + plural: mcpservers + singular: mcpserver + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.connected + name: Connected + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: MCPServer is the Schema for the mcpservers API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: MCPServerSpec defines the desired state of MCPServer + properties: + approvalContactChannel: + description: ApprovalContactChannel is the contact channel for approval + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + args: + description: Args are the arguments to pass to the command for stdio + MCP servers + items: + type: string + type: array + command: + description: Command is the command to run for stdio MCP servers + type: string + env: + description: Env are environment variables to set for stdio MCP servers + items: + description: EnvVar represents an environment variable + properties: + name: + description: Name of the environment variable + type: string + value: + description: Value of the environment variable (direct literal + value) + type: string + valueFrom: + description: ValueFrom represents a source for the value of + an environment variable + properties: + secretKeyRef: + description: SecretKeyRef selects a key of a secret in the + pod's namespace + properties: + key: + description: Key within the secret + type: string + name: + description: Name of the secret + type: string + required: + - key + - name + type: object + type: object + required: + - name + type: object + type: array + resources: + description: ResourceRequirements defines CPU/Memory resources requests/limits + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Limits describes the maximum amount of compute resources + allowed + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required + type: object + type: object + transport: + description: Transport specifies the transport type for the MCP server + enum: + - stdio + - http + type: string + url: + description: URL is the endpoint for HTTP MCP servers + type: string + required: + - transport + type: object + status: + description: MCPServerStatus defines the observed state of MCPServer + properties: + connected: + description: Connected indicates if the MCP server is currently connected + and operational + type: boolean + status: + description: Status indicates the current status of the MCP server + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + tools: + description: Tools is the list of tools provided by this MCP server + items: + description: MCPTool represents a tool provided by an MCP server + properties: + description: + description: Description of the tool + type: string + inputSchema: + description: InputSchema is the JSON schema for the tool's input + parameters + type: object + x-kubernetes-preserve-unknown-fields: true + name: + description: Name of the tool + type: string + required: + - name + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: taskruns.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: TaskRun + listKind: TaskRunList + plural: taskruns + singular: taskrun + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .spec.taskRef.name + name: Task + type: string + - jsonPath: .status.userMsgPreview + name: Preview + type: string + - jsonPath: .status.output + name: Output + type: string + - jsonPath: .status.error + name: Error + priority: 1 + type: string + - jsonPath: .status.startTime + name: Started + priority: 1 + type: date + - jsonPath: .status.completionTime + name: Completed + priority: 1 + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: TaskRun is the Schema for the taskruns API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskRunSpec defines the desired state of TaskRun + properties: + agentRef: + description: AgentRef is used when the TaskRun is created for a tool + call delegation. + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + taskRef: + description: TaskRef references the task to run + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + taskRunToolCallRef: + description: TaskRunToolCallRef is used when the TaskRun is created + for a tool call delegation. + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + required: + - taskRef + type: object + status: + description: TaskRunStatus defines the observed state of TaskRun + properties: + completionTime: + description: CompletionTime is when the TaskRun completed + format: date-time + type: string + contextWindow: + description: ContextWindow maintains the conversation history as a + sequence of messages + items: + description: Message represents a single message in the conversation + properties: + content: + description: Content is the message content + type: string + name: + description: Name is the name of the tool that was called + type: string + role: + description: Role is the role of the message sender (system, + user, assistant, tool) + enum: + - system + - user + - assistant + - tool + type: string + toolCallId: + description: ToolCallId is the unique identifier for this tool + call + type: string + toolCalls: + description: ToolCalls contains any tool calls requested by + this message + items: + description: ToolCall represents a request to call a tool + properties: + function: + description: Function contains the details of the function + to call + properties: + arguments: + description: Arguments contains the arguments to pass + to the function in JSON format + type: string + name: + description: Name is the name of the function to call + type: string + required: + - arguments + - name + type: object + id: + description: ID is the unique identifier for this tool + call + type: string + type: + description: Type indicates the type of tool call. Currently + only "function" is supported. + type: string + required: + - function + - id + - type + type: object + type: array + required: + - content + - role + type: object + type: array + error: + description: Error message if the task failed + type: string + messageCount: + description: MessageCount contains the number of messages in the context + window + type: integer + output: + description: Output contains the result of the task execution + type: string + phase: + description: Phase indicates the current phase of the TaskRun + enum: + - Initializing + - Pending + - ReadyForLLM + - SendContextWindowToLLM + - ToolCallsPending + - CheckingToolCalls + - FinalAnswer + - ErrorBackoff + - Failed + type: string + ready: + description: Ready indicates if the TaskRun is ready to be executed + type: boolean + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object + startTime: + description: StartTime is when the TaskRun started + format: date-time + type: string + status: + description: Status indicates the current status of the taskrun + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + userMsgPreview: + description: UserMsgPreview stores the first 50 characters of the + user's message + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: taskruntoolcalls.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: TaskRunToolCall + listKind: TaskRunToolCallList + plural: taskruntoolcalls + singular: taskruntoolcall + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .spec.taskRunRef.name + name: TaskRun + type: string + - jsonPath: .spec.toolRef.name + name: Tool + type: string + - jsonPath: .status.startTime + name: Started + priority: 1 + type: date + - jsonPath: .status.completionTime + name: Completed + priority: 1 + type: date + - jsonPath: .status.error + name: Error + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: TaskRunToolCall is the Schema for the taskruntoolcalls API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskRunToolCallSpec defines the desired state of TaskRunToolCall + properties: + arguments: + description: Arguments contains the arguments for the tool call + type: string + taskRunRef: + description: TaskRunRef references the parent TaskRun + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + toolCallId: + description: ToolCallId is the unique identifier for this tool call + type: string + toolRef: + description: ToolRef references the tool to execute + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + required: + - arguments + - taskRunRef + - toolCallId + - toolRef + type: object + status: + description: TaskRunToolCallStatus defines the observed state of TaskRunToolCall + properties: + completionTime: + description: CompletionTime is when the tool call completed + format: date-time + type: string + error: + description: Error message if the tool call failed + type: string + phase: + description: Phase indicates the current phase of the tool call + enum: + - Pending + - Running + - Succeeded + - Failed + type: string + ready: + description: Ready indicates if the tool call is ready to be executed + type: boolean + result: + description: Result contains the result of the tool call if completed + type: string + spanContext: + description: SpanContext contains OpenTelemetry span context information + properties: + spanID: + description: SpanID is the span ID + type: string + traceID: + description: TraceID is the trace ID for the span + type: string + type: object + startTime: + description: StartTime is when the tool call started + format: date-time + type: string + status: + description: Status indicates the current status of the tool call + enum: + - Ready + - Error + - Pending + - AwaitingHumanApproval + - AwaitingHumanInput + - AwaitingSubAgent + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: tasks.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Task + listKind: TaskList + plural: tasks + singular: task + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + - jsonPath: .spec.agentRef.name + name: Agent + type: string + - jsonPath: .spec.message + name: Message + type: string + - jsonPath: .status.output + name: Output + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Task is the Schema for the tasks API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TaskSpec defines the desired state of Task + properties: + agentRef: + description: AgentRef references the agent that will execute this + task + properties: + name: + description: Name of the referent + minLength: 1 + type: string + required: + - name + type: object + everythingThatHappenedSoFar: + description: EverythingThatHappenedSoFar is a list of all the things + that have happened so far + items: + type: string + type: array + goal: + description: Goal is the goal of the task + type: string + message: + description: Message is the input prompt or request for the task + minLength: 1 + type: string + required: + - agentRef + - message + type: object + status: + description: TaskStatus defines the observed state of Task + properties: + output: + description: Output contains the result of the task execution + type: string + ready: + description: Ready indicates if the task is ready to be executed + type: boolean + status: + description: Status indicates the current status of the task + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: tools.kubechain.humanlayer.dev +spec: + group: kubechain.humanlayer.dev + names: + kind: Tool + listKind: ToolList + plural: tools + singular: tool + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .status.statusDetail + name: Detail + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Tool is the Schema for the tools API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ToolSpec defines the desired state of Tool + properties: + agentRef: + description: AgentRef is used for delegation-type tools. + properties: + name: + type: string + required: + - name + type: object + arguments: + description: Arguments defines the JSON schema for the tool's arguments. + type: object + x-kubernetes-preserve-unknown-fields: true + description: + description: Description provides a description of the tool. + type: string + execute: + description: Execute defines how the tool should be executed. + properties: + builtin: + description: Builtin represents an inline (builtin) tool. + properties: + name: + description: Name is the identifier of the builtin function + to run. Today, supports simple math operations + enum: + - add + - subtract + - multiply + - divide + type: string + type: object + externalAPI: + description: ExternalAPI represents an external API call + properties: + credentialsFrom: + description: Credentials reference for API authentication + properties: + key: + description: Key is the key in the secret + type: string + name: + description: Name is the name of the secret + type: string + required: + - key + - name + type: object + method: + description: Method specifies the HTTP method to use (GET, + POST, etc.) + type: string + requiresApproval: + description: RequiresApproval indicates if this API call needs + explicit approval + type: boolean + url: + description: URL for the API endpoint + type: string + type: object + type: object + name: + description: Name is used for inline/function tools (optional if the + object name is used). + type: string + parameters: + description: Parameters defines the JSON schema for the tool's parameters. + type: object + x-kubernetes-preserve-unknown-fields: true + toolType: + description: ToolType represents the type of tool; e.g. "function", + "delegateToAgent", "externalAPI" etc. + enum: + - function + - delegateToAgent + - externalAPI + type: string + type: object + status: + description: ToolStatus defines the observed state of Tool + properties: + ready: + description: Ready indicates if the tool is ready to be used + type: boolean + status: + description: Status indicates the current status of the tool + enum: + - Ready + - Error + - Pending + type: string + statusDetail: + description: StatusDetail provides additional details about the current + status + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-controller-manager + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-leader-election-role + namespace: default +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-contactchannel-admin-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels + verbs: + - '*' +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-contactchannel-editor-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-contactchannel-viewer-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels + verbs: + - get + - list + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-llm-admin-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms + verbs: + - '*' +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-llm-editor-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-llm-viewer-role +rules: +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms + verbs: + - get + - list + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - llms/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubechain-manager-role +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - agents + - contactchannels + - llms + - mcpservers + - taskruns + - taskruntoolcalls + - tasks + - tools + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - kubechain.humanlayer.dev + resources: + - agents/status + - contactchannels/status + - llms/status + - mcpservers/status + - taskruns/status + - taskruntoolcalls/status + - tasks/status + - tools/status + verbs: + - get + - patch + - update +- apiGroups: + - kubechain.humanlayer.dev + resources: + - contactchannels/finalizers + verbs: + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubechain-metrics-auth-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubechain-metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-leader-election-rolebinding + namespace: default +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kubechain-leader-election-role +subjects: +- kind: ServiceAccount + name: kubechain-controller-manager + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + name: kubechain-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubechain-manager-role +subjects: +- kind: ServiceAccount + name: kubechain-controller-manager + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubechain-metrics-auth-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubechain-metrics-auth-role +subjects: +- kind: ServiceAccount + name: kubechain-controller-manager + namespace: default +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + control-plane: controller-manager + name: kubechain-controller-manager-metrics-service + namespace: default +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: 8443 + selector: + app.kubernetes.io/name: kubechain + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: kubechain + control-plane: controller-manager + name: kubechain-controller-manager + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kubechain + control-plane: controller-manager + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + app.kubernetes.io/name: kubechain + control-plane: controller-manager + spec: + containers: + - args: + - --metrics-bind-address=:8443 + - --leader-elect + - --health-probe-bind-address=:8081 + command: + - /manager + image: ghcr.io/humanlayer/smallchain:v0.1.12 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + ports: [] + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 1000m + memory: 512Mi + requests: + cpu: 100m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + volumeMounts: [] + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: kubechain-controller-manager + terminationGracePeriodSeconds: 10 + volumes: []