picoclaw/pkg/config
admin-mf 93fb7b8794 Merge upstream/main into sync/upstream-2026-05-07
Sync with sipeed/picoclaw upstream/main (~1095 commits since last merge),
including major restructures:

- Launcher migrated to web/backend (#1275): cmd/picoclaw-launcher/* removed.
  Our launcher is dropped (MagicForm doesn't use it; web/backend is the
  upstream replacement when needed).
- Agent loop split (#2585, 12d5421c): pkg/agent/loop.go deleted, replaced by
  pkg/agent/agent_*.go files. Multi-tenancy customizations to be forward-ported
  in follow-up commits on this branch.
- Tool packages reorganized (4c133dc2): pkg/tools/{filesystem,web}.go moved
  to pkg/tools/{fs,integration}/. Customizations to be forward-ported.
- Channels switched to map+Settings model: MagicFormConfig → MagicFormSettings
  registered in config_channel.go alongside other channels; channel constructor
  updated to (channelName, channelType, *Config, *MessageBus) factory pattern.
- Config schema updates: removed deprecated AgentDefaults.Model field;
  removed Config.Bindings (legacy migration in upstream); SessionConfig now
  uses Dimensions instead of DMScope; ExecConfig adds AllowRemote.

Conflicts resolved:
- pkg/agent/loop.go + loop_test.go: accepted upstream deletion (split)
- pkg/tools/{filesystem,web}.go: accepted upstream deletion (moved)
- cmd/picoclaw-launcher/*: dropped (deps deleted upstream, unused by MagicForm)
- cmd/picoclaw/internal/gateway/helpers.go: accepted upstream deletion
- pkg/channels/manager.go: switched to upstream's map-driven channel init
- pkg/config/config.go: merged AgentDefaults fields, kept WorkspaceRoot,
  removed deprecated Model
- pkg/bus/types.go: merged OutboundMessage with upstream's new fields
  (Context, AgentID, SessionKey, Scope, ContextUsage) plus our magicform
  callback fields (Type, Metrics, Progress, Escalation)
- pkg/tools/{cron,shell}.go: combined our customizations with upstream changes
- pkg/skills/installer.go: dropped our LimitReader path (upstream now uses
  chunked DownloadToFile which is size-bounded)

The magicform channel was rebuilt to match upstream's new API:
- *config.MagicFormSettings (SecureString token) instead of MagicFormConfig
- Send returns ([]string, error) per upstream Channel interface
- InboundMessage built with Context (with Raw map for tenancy hints) instead
  of bus.Peer + Metadata field which were removed.

Multi-tenancy hints (workspace_override, config_dir, allowed_tools,
allowed_skills) are still flowing via Context.Raw — the agent loop side of
the integration is forward-ported in a follow-up commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 12:12:44 -05:00
..
config.go Merge upstream/main into sync/upstream-2026-05-07 2026-05-07 12:12:44 -05:00
config_channel.go Merge upstream/main into sync/upstream-2026-05-07 2026-05-07 12:12:44 -05:00
config_channel_test.go refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
config_old.go refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
config_struct.go feat(web): support list editing for channel array fields (#2595) 2026-04-21 16:04:28 +08:00
config_struct_test.go refactor skills registries and add GitHub-backed skill discovery (#2442) 2026-04-14 15:14:16 +08:00
config_test.go Merge branch 'main' into fix/gemini-mcp-schema-sanitization 2026-04-27 21:14:25 +02:00
defaults.go Merge pull request #2677 from alexhoshina/feat/runtime-events-plan 2026-05-03 23:15:25 +02:00
diagnostics.go fix(config): show precise malformed config diagnostics (#2415) 2026-04-27 09:45:52 +08:00
envkeys.go feat(host): complete launcher and gateway multi-host binding support 2026-04-14 14:04:36 +08:00
events.go feat(events): add configurable runtime event logging 2026-04-26 17:41:00 +08:00
events_test.go feat(events): add configurable runtime event logging 2026-04-26 17:41:00 +08:00
example_security_usage.go Merge branch 'main' into fix-doc 2026-03-25 11:13:17 +08:00
gateway.go feat(host): complete launcher and gateway multi-host binding support 2026-04-14 14:04:36 +08:00
gateway_host_env_test.go feat(host): complete launcher and gateway multi-host binding support 2026-04-14 14:04:36 +08:00
legacy_bindings.go fix(session): restore thread and legacy compatibility 2026-04-08 00:32:53 +08:00
migration.go fix(config): show precise malformed config diagnostics (#2415) 2026-04-27 09:45:52 +08:00
migration_integration_test.go refactor skills registries and add GitHub-backed skill discovery (#2442) 2026-04-14 15:14:16 +08:00
migration_test.go refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
model_config_test.go feat(tool): tool schema semplification 2026-04-27 21:10:30 +02:00
multikey_test.go feat(tool): tool schema semplification 2026-04-27 21:10:30 +02:00
security.go fix(config): show precise malformed config diagnostics (#2415) 2026-04-27 09:45:52 +08:00
security_integration_test.go fix(config): show precise malformed config diagnostics (#2415) 2026-04-27 09:45:52 +08:00
security_test.go refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
version.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00
version_test.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00