这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,13 @@ Let's make a new task that uses the fetch tool. In this case, we'll use https://
```bash
cat <<EOF | kubectl apply -f -
apiVersion: kubechain.humanlayer.dev/v1alpha1
kind: Task
kind: TaskRun
metadata:
name: fetch-task
spec:
agentRef:
name: my-assistant
message: "what is the data at https://swapi.dev/api/people/1? "
userMessage: "what is the data at https://swapi.dev/api/people/1? "
EOF
```

Expand Down
1 change: 1 addition & 0 deletions knowledge.md
7 changes: 0 additions & 7 deletions kubechain-example/knowledge.md

This file was deleted.

9 changes: 0 additions & 9 deletions kubechain/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ resources:
kind: Agent
path: github.com/humanlayer/smallchain/kubechain/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: humanlayer.dev
group: kubechain
kind: Task
path: github.com/humanlayer/smallchain/kubechain/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
Expand Down
8 changes: 4 additions & 4 deletions kubechain/api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1alpha1 contains API Schema definitions for the kubechain v1alpha1 API group.
// Package v1alpha1 contains API Schema definitions for the kubechain v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=kubechain.humanlayer.dev
package v1alpha1
Expand All @@ -25,16 +25,16 @@ import (
)

var (
// GroupVersion is group version used to register these objects.
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "kubechain.humanlayer.dev", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

func init() {
SchemeBuilder.Register(&LLM{}, &LLMList{}, &Tool{}, &ToolList{}, &Agent{}, &AgentList{}, &Task{}, &TaskList{}, &TaskRun{}, &TaskRunList{}, &TaskRunToolCall{}, &TaskRunToolCallList{}, &MCPServer{}, &MCPServerList{})
SchemeBuilder.Register(&LLM{}, &LLMList{}, &Tool{}, &ToolList{}, &Agent{}, &AgentList{}, &TaskRun{}, &TaskRunList{}, &TaskRunToolCall{}, &TaskRunToolCallList{}, &MCPServer{}, &MCPServerList{})
}
78 changes: 0 additions & 78 deletions kubechain/api/v1alpha1/task_types.go

This file was deleted.

18 changes: 7 additions & 11 deletions kubechain/api/v1alpha1/taskrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ import (

// TaskRunSpec defines the desired state of TaskRun
type TaskRunSpec struct {
// TaskRef references the task to run
// +optional
TaskRef *LocalObjectReference `json:"taskRef,omitempty"`

// TaskRunToolCallRef is used when the TaskRun is created for a tool call delegation.
// +optional
TaskRunToolCallRef *LocalObjectReference `json:"taskRunToolCallRef,omitempty"`

// AgentRef overrides the task's agent for this TaskRun.
// +optional
AgentRef *LocalObjectReference `json:"agentRef,omitempty"`
// AgentRef references the agent that will execute this TaskRun.
// +kubebuilder:validation:Required
AgentRef LocalObjectReference `json:"agentRef"`

// UserMessage overrides the task's message for this TaskRun.
// +optional
UserMessage string `json:"userMessage,omitempty"`
// UserMessage is the message to send to the agent.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
UserMessage string `json:"userMessage"`
}

// Message represents a single message in the conversation
Expand Down Expand Up @@ -170,7 +167,6 @@ const (
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.status"
// +kubebuilder:printcolumn:name="Detail",type="string",JSONPath=".status.statusDetail",priority=1
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
// +kubebuilder:printcolumn:name="Task",type="string",JSONPath=".spec.taskRef.name"
// +kubebuilder:printcolumn:name="Preview",type="string",JSONPath=".status.userMsgPreview"
// +kubebuilder:printcolumn:name="Output",type="string",JSONPath=".status.output"
// +kubebuilder:printcolumn:name="Error",type="string",JSONPath=".status.error",priority=1
Expand Down
106 changes: 1 addition & 105 deletions kubechain/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions kubechain/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/humanlayer/smallchain/kubechain/internal/controller/contactchannel"
"github.com/humanlayer/smallchain/kubechain/internal/controller/llm"
"github.com/humanlayer/smallchain/kubechain/internal/controller/mcpserver"
"github.com/humanlayer/smallchain/kubechain/internal/controller/task"
"github.com/humanlayer/smallchain/kubechain/internal/controller/taskrun"
"github.com/humanlayer/smallchain/kubechain/internal/controller/taskruntoolcall"
"github.com/humanlayer/smallchain/kubechain/internal/controller/tool"
Expand Down Expand Up @@ -256,14 +255,6 @@ func main() {
os.Exit(1)
}

if err = (&task.TaskReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Task")
os.Exit(1)
}

if err = (&taskrun.TaskRunReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ spec:
- jsonPath: .status.phase
name: Phase
type: string
- jsonPath: .spec.taskRef.name
name: Task
type: string
- jsonPath: .status.userMsgPreview
name: Preview
type: string
Expand Down Expand Up @@ -75,17 +72,8 @@ spec:
description: TaskRunSpec defines the desired state of TaskRun
properties:
agentRef:
description: AgentRef overrides the task's agent for this TaskRun.
properties:
name:
description: Name of the referent
minLength: 1
type: string
required:
- name
type: object
taskRef:
description: TaskRef references the task to run
description: AgentRef references the agent that will execute this
TaskRun.
properties:
name:
description: Name of the referent
Expand All @@ -106,8 +94,12 @@ spec:
- name
type: object
userMessage:
description: UserMessage overrides the task's message for this TaskRun.
description: UserMessage is the message to send to the agent.
minLength: 1
type: string
required:
- agentRef
- userMessage
type: object
status:
description: TaskRunStatus defines the observed state of TaskRun
Expand Down
Loading