agent/pkg/agentic/actions_example_test.go
Virgil 43e2a14b82 feat(agentic): add completion journal commit stage
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 22:07:42 +00:00

53 lines
1.1 KiB
Go

// SPDX-License-Identifier: EUPL-1.2
package agentic_test
import (
"context"
core "dappco.re/go/core"
"dappco.re/go/agent/pkg/agentic"
)
func ExampleRegister() {
c := core.New(
core.WithService(agentic.ProcessRegister),
core.WithService(agentic.Register),
)
c.ServiceStartup(context.Background(), nil)
// All actions registered during OnStartup
core.Println(c.Action("agentic.dispatch").Exists())
core.Println(c.Action("agentic.status").Exists())
core.Println(c.Action("agentic.qa").Exists())
// Output:
// true
// true
// true
}
func ExampleRegister_actions() {
c := core.New(
core.WithService(agentic.ProcessRegister),
core.WithService(agentic.Register),
)
c.ServiceStartup(context.Background(), nil)
actions := c.Actions()
core.Println(len(actions) > 0)
// Output: true
}
func ExampleRegister_task() {
c := core.New(
core.WithService(agentic.ProcessRegister),
core.WithService(agentic.Register),
)
c.ServiceStartup(context.Background(), nil)
// Completion pipeline registered as a Task
t := c.Task("agent.completion")
core.Println(t.Description)
// Output: QA → PR → Verify → Commit → Ingest → Poke
}