ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk carries no composition rule. The catalogue functions only the node-engine's composition reaches (Resolve, Resolution's Compose, Declaration, DataItems, LeftOut, Rules and the rest, the settings, placeholder and template refusals, the rendering helpers) are copied with their tests into internal/compose/resolution; a method of a mesh-sdk shape becomes a function taking it first. The composition calls its own copies, and the captured catalogue its tests read lives here now, shared by mesh-compose's tests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
21 lines
626 B
Go
21 lines
626 B
Go
package resolution
|
|
|
|
import (
|
|
mcat "git.novox.be/novox/mesh-sdk/go/catalogue"
|
|
)
|
|
|
|
// runByAResource is the artifacts one of a module's own resources names — a process that runs it,
|
|
// a step, an archive that unpacks it — by name.
|
|
func runByAResource(m mcat.Manifest) map[string]bool {
|
|
named := map[string]bool{}
|
|
for _, r := range m.Resources {
|
|
if a, ok := r["artifact"].(string); ok && a != "" {
|
|
named[a] = true
|
|
}
|
|
}
|
|
return named
|
|
}
|
|
|
|
// RunByAResource is the bundles of m one of its own resources runs (its service, not its tools).
|
|
func RunByAResource(m mcat.Manifest) map[string]bool { return runByAResource(m) }
|