Why: Allow consumers to download an immutable module revision without nested source checkouts or local path replacements. Evidence: SELF package tests and the prior canonical-path rejection are recorded in the Dev dependency-workspace task card; remote consumption is replayed against the committed candidate. Impact: Change the module identity and its Go imports while preserving API behavior. Existing historical submodule revisions remain buildable. Refs: Versioned dependencies U1/U3; feature/dependency-workspace
19 lines
474 B
Go
19 lines
474 B
Go
package runtime
|
|
|
|
import (
|
|
"testing"
|
|
|
|
agentllm "git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/llm"
|
|
)
|
|
|
|
func TestApplyToolSelectionRemovesName(t *testing.T) {
|
|
decls := []agentllm.ToolDecl{{Name: "read_file"}, {Name: "write_file"}}
|
|
got := applyToolSelection(decls, "-write_file,+missing")
|
|
if len(got) != 1 || got[0].Name != "read_file" {
|
|
t.Fatalf("%+v", got)
|
|
}
|
|
if same := applyToolSelection(decls, ""); len(same) != 2 {
|
|
t.Fatalf("empty: %+v", same)
|
|
}
|
|
}
|