Skip to content

Feat/registry refactor - #214

Merged
Ekyoz merged 1 commit into
devfrom
feat/registry-refactor
Aug 26, 2026
Merged

Feat/registry refactor#214
Ekyoz merged 1 commit into
devfrom
feat/registry-refactor

Conversation

@Ekyoz

@Ekyoz Ekyoz commented Aug 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@Ekyoz
Ekyoz force-pushed the feat/registry-refactor branch 3 times, most recently from 83af4e0 to ab7f34f Compare August 26, 2026 08:01
@Ekyoz Ekyoz self-assigned this Aug 26, 2026
@Ekyoz
Ekyoz force-pushed the feat/registry-refactor branch 3 times, most recently from 927618b to 71f0eb1 Compare August 26, 2026 08:41
feat(manager): Add ToolKit manager to collapse all registry tool into 4 entry with many actions

fix(ci): fix ci divergent from local

fix(test): fix test for python 3.12

feat(sdk): add reconnection via dial + redis==8 and x-task-id in grpc metadata

feat(sdk): 1.0.0.dev19 / reco

feat(sdk): 1.0.0.dev20 / reco

feat(sdk): 1.0.0.dev21 / middleware permission

feat(sdk): 1.0.0.dev22 / middleware permission & ecrets

feat(sdk): 1.0.0.dev23 / associated task id

feat(sdk): 1.0.0.dev23 / log associated task id

feat(sdk): 1.0.0.dev25 / log associated task id

release(beta): staging release

feat(community): add ModuleToolkit to community.agno

One SDK toolkit instead of per-archetype copies.
Every tool call collapsed to "No successful response received from module".

Parses the sentinel protocol (stream.error → "[CODE] message"), plus image
extraction and AG-UI event relay. Adds agno optional extra.

feat(agno): introduce toolkits for chat history, user profile, and registry access

- Added `ChatHistoryTools`, `UserProfileTools`, and `RegistryTools` to enhance agent capabilities.
- Updated `pyproject.toml` to include the new optional dependency `agno`.
- Introduced new module structure for toolkits under `digitalkin.community.agno.toolkits`.
- Enhanced `ModuleServer` to include module type in initialization.
- Updated registry models to support new module types and setups.
- Improved error handling and logging in registry services.

feat(agno): introduce toolkits + storage visibility and cross-context read scopes

feat(agno): registry toolkit refactor — discriminated-action managers (DEV-686)

Collapse the many registry LLM tools into four uniform managers, each a single
agno tool taking one discriminated `action` union:

- tools_manager / services_manager / kins_manager — CRUD (get / search / update /
  delete / change_visibility, plus create/load for services) over setups of each
  module_type, sharing one action set and the guard/normalise plumbing;
- load_manager — external-execution manager that loads a discovered tool into the
  agent (HITL pause + auto-continue) so it is callable in the same turn.

Design:
- Command pattern: each action is a Pydantic model with execute(ctx); shared
  BaseAction/BaseActionCtx, per-family RegistryAction/LoadAction bases.
- Managers register with skip_entrypoint_processing + an explicit schema and
  validate the argument themselves (accepting an object or a JSON string), so a
  bad LLM argument returns a clean {error, metadata} envelope the model can
  self-correct from instead of raising a validate_call traceback.
- Every result is the canonical {output|error, metadata:{success, tool}} envelope.

Hardening (from QA passes):
- type isolation: ensure_kind gates every id-targeting action to its manager's
  kind (no cross-kind read/update/delete); writes on a deleted id are refused.
- load_manager returns distinct failures, catches registry NOT_FOUND, and never
  raises into the agent loop; change_visibility re-reads the committed state.
- dynamic loading invalidates agno's tools cache before acontinue_run so a
  freshly-loaded tool is re-resolved into the model's function map.

Removes the old registry.py / setup.py / tool_loader.py surfaces and their tests.

feat(agno): validate setup content against the module config schema (DEV-686)

Before kins_manager.update/create writes a setup version, compile a throwaway
Pydantic model from the module's config-setup JSON schema (fetched via
GetConfigSetupModule) and validate the content, so an LLM driving the toolkit
gets a correctable error instead of breaking the kin.

The validator mirrors the schema's own strictness rather than a loose superset:
- objects reject non-objects, recursively, resolving $ref/$defs (D5);
- undeclared keys are forbidden unless additionalProperties is true (D8);
- arrays type their elements via items (D9);
- enum/const become closed Literal choices (D10);
- a field is nullable only when the schema declares it (D11);
- scalars are validated in strict mode, no "2"->number / true->number coercion (D13);
- strings reject C0 control characters, e.g. NUL / ANSI escapes (D17);
- numeric bounds, string length/pattern and array minItems/maxItems are enforced
  when declared (D14/D15/D16 close as soon as the module schema tightens them).

Wiring: CommunicationStrategy grows a get_module_config_schema (gRPC override
calls GetConfigSetupModule); ModuleContext exposes it; RegistryActionCtx runs
the validation best-effort (skipped when no context/schema is available).

Also: rename the archive action to delete, and carry the RegistrySetupStatus /
Visibility enums through SetupData with lenient _missing_ coercion.

feat(agno): type mapping values via additionalProperties in content validation (D18)

An object schema with no properties but an additionalProperties value schema
(e.g. a tool's `triggers`: {additionalProperties: {type: boolean}}) now compiles
to dict[str, <value>] instead of a bare dict, so a wrong-typed value (a string
where a boolean is expected) is refused with the field path. Also honour
minProperties/maxProperties as mapping cardinality bounds.

docs(agno): reword internal comments to drop private review references

feat(agno): reject control characters in a write action's name field

fix(agno): harden registry managers against QA-found defects (D3, D6, D7, D9, D10)

- D3: reject content keys carrying control/non-BMP characters, naming the key,
  instead of silently dropping them on write (services create + update)
- D6: exclude versionless (non-instantiable) setups from search results so a
  caller never sees an unusable version:null row
- D7a: populate loaded_functions when a tool is already loaded, so the result
  is as verifiable as a fresh load
- D7b: enumerate the accepted action tags when load_manager receives an
  out-of-union action, matching the CRUD managers
- D9/D10: compute search `truncated` on the rendered page and read limit+1 so
  the flag means "a further usable row exists", not merely "the page is full"

Delete docker directory

Delete scripts directory
@Ekyoz
Ekyoz force-pushed the feat/registry-refactor branch from 71f0eb1 to 34b6e13 Compare August 26, 2026 08:47

@GuillaumeSachet GuillaumeSachet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ekyoz
Ekyoz merged commit 8e5d65d into dev Aug 26, 2026
19 checks passed
@Ekyoz
Ekyoz deleted the feat/registry-refactor branch August 26, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants