MCPcopy Create free account
hub / github.com/compozy/agh / memoryWriteStore

Method memoryWriteStore

internal/daemon/native_tools.go:5292–5313  ·  view source on GitHub ↗
(
	ctx context.Context,
	callerScope toolspkg.Scope,
	id toolspkg.ToolID,
	selector memoryToolSelector,
	rawType string,
)

Source from the content-addressed store, hash-verified

5290}
5291
5292func (n *daemonNativeTools) memoryWriteStore(
5293 ctx context.Context,
5294 callerScope toolspkg.Scope,
5295 id toolspkg.ToolID,
5296 selector memoryToolSelector,
5297 rawType string,
5298) (memoryToolLocation, error) {
5299 scope, err := core.ParseOptionalMemoryScope(selector.Scope)
5300 if err != nil {
5301 return memoryToolLocation{}, err
5302 }
5303 if scope == "" {
5304 if strings.TrimSpace(firstNonEmpty(selector.AgentName, callerScope.AgentName)) != "" {
5305 scope = memcontract.ScopeAgent
5306 } else if inferred, inferErr := memcontract.DefaultScopeForType(memcontract.Type(rawType)); inferErr == nil {
5307 scope = inferred
5308 } else if strings.TrimSpace(firstNonEmpty(selector.Workspace, callerScope.WorkspaceID)) != "" {
5309 scope = memcontract.ScopeWorkspace
5310 }
5311 }
5312 return n.memoryStoreFor(ctx, callerScope, id, selector, scope)
5313}
5314
5315func (n *daemonNativeTools) memoryCallerActorKind(
5316 ctx context.Context,

Callers 2

memoryProposeMethod · 0.95
memoryNoteMethod · 0.95

Calls 3

memoryStoreForMethod · 0.95
ParseOptionalMemoryScopeFunction · 0.92
firstNonEmptyFunction · 0.70

Tested by

no test coverage detected