fix(archied): restore contextcheck directives and drop unused adapter

This commit is contained in:
sam committed 2026-10-03 21:55:48 +10:00
1 parent d5a1da1213
commit 1044129e28
2 files changed
+3 -18

No files matched your search

+3
View File
@@ -1426,6 +1426,7 @@ func (b *boot) wireConfigPublishing(ctx context.Context, cfgPath, overlayPath st
b.chatController.WithRuntime(b.d)
}
//nolint:contextcheck // shutdown runs after the parent context is cancelled
func shutdownCapabilityHost(capabilityHost *plugin.Host, log *slog.Logger) func() {
return func() {
stopCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
@@ -1478,6 +1479,7 @@ func (b *boot) setupBackends(ctx context.Context) error {
return err
}
//nolint:contextcheck // shutdown runs after the parent context is cancelled
func shutdownCuratorRuntime(rt *curator.Runtime, log *slog.Logger) func() {
return func() {
stopCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
@@ -1488,6 +1490,7 @@ func shutdownCuratorRuntime(rt *curator.Runtime, log *slog.Logger) func() {
}
}
//nolint:contextcheck // shutdown runs after the parent context is cancelled
func shutdownCuratorRegistry(reg *curator.Registry, log *slog.Logger) func() {
return func() {
stopCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
-18
View File
@@ -43,7 +43,6 @@ import (
"github.com/samcharles93/archie-core/internal/plugin"
"github.com/samcharles93/archie-core/internal/secret"
"github.com/samcharles93/archie-core/internal/storage"
"github.com/samcharles93/archie-core/internal/taskstate"
"github.com/samcharles93/archie-core/internal/tools"
"github.com/samcharles93/archie-core/internal/tools/mcp"
toolprovider "github.com/samcharles93/archie-core/internal/tools/provider"
@@ -691,23 +690,6 @@ func (a chatTaskLogReaderAdapter) ReadChatTaskLogs(
}, nil
}
// chatTaskActorAdapter sends messaging actions through the Gateway boundary.
type chatTaskActorAdapter struct {
contract gateway.ChatContract
}
func (a chatTaskActorAdapter) ApplyChatTaskAction(
ctx context.Context, identity *string, actor taskactions.Actor, taskID int64, action taskstate.Action, res taskactions.ActionPayload,
) (gateway.TaskActionResult, error) {
if a.contract == nil {
return gateway.TaskActionResult{}, gateway.ErrChatCapabilityUnavailable
}
if identity == nil {
return a.contract.ApplyOperatorTaskAction(ctx, actor, taskID, action, res)
}
return a.contract.ApplyTaskAction(ctx, *identity, taskID, action, res)
}
func chatTaskProfiles(cfg config.Config) ([]gateway.TaskProfile, string) {
if len(cfg.Identities) > 0 {
profiles := make([]gateway.TaskProfile, 0, len(cfg.Identities))