agent/cmd/core-agent/main_example_test.go
Snider ecd47fe3db revert fcb9c189e5
revert fix(agentic): harden TODO workspace write

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-18 11:22:27 +00:00

32 lines
636 B
Go

// SPDX-License-Identifier: EUPL-1.2
package main
import (
agentpkg "dappco.re/go/agent"
core "dappco.re/go/core"
)
func Example_newCoreAgent() {
oldVersion := agentpkg.Version
agentpkg.Version = "0.15.0"
defer func() { agentpkg.Version = oldVersion }()
c := newCoreAgent()
core.Println(c.App().Name)
core.Println(c.App().Version)
core.Println(len(c.Commands()) >= 3)
// Output:
// core-agent
// 0.15.0
// true
}
func Example_applicationVersion() {
oldVersion := agentpkg.Version
agentpkg.Version = "0.15.0"
defer func() { agentpkg.Version = oldVersion }()
core.Println(applicationVersion())
// Output: 0.15.0
}