Branch: feat/din-sdk (from develop)
Assignee: @Santiagocetran
Roadmap ref: P4-1.2 (CLI Integration Layer — Shared SDK Extraction) · P3-DOC7 (dind Architecture Document)
Long-running issue (expected to stay open 1–2 months). A detailed task file under Developer/tasks/ will follow — this issue tracks the overall effort, not a weekly task.
Goal
Extract the logic-dependent parts of dincli commands into a shared SDK layer at dincli/sdk/, so the same logic can be driven by both the interactive CLI and the upcoming DIN daemon (dind).
Design
- All logic lives in
dincli/sdk/. CLI command modules become thin wrappers: parse arguments → call SDK function → render output.
- SDK functions return structured JSON outputs. This is the contract between the SDK and its two consumers:
- the CLI reads the JSON and renders terminal UI/UX (tables, colors, human-readable messages);
dind reads the same JSON to update its configuration and job queue.
- The CLI is refactored onto the SDK in this same branch — the branch is done when
dincli commands run through the SDK layer and all existing tests pass.
- No circular dependencies: SDK must be importable standalone (IPFS client, contract interfaces, wallet/account helpers, manifest loading — see P4-1.2 in
Developer/ROADMAP.md for the candidate module list).
Scope
References
Developer/ROADMAP.md — P4-1.2, P3-DOC7, and the P4 phase overview ("Daemon and Agentic AI Layer")
Developer/issues/containerization.md — worker/container runner must be callable "from both CLI commands and future dind daemon jobs"
Developer/issues/validator-operations.md — daemon-mode logging/health expectations
Documentation/ — DIN workflow and Model workflow docs for the command surfaces being extracted
Branching note
Kept separate from the DIN daemon work (see the "start DIN daemon" issue) so the CLI-on-SDK refactor can merge into develop without waiting for the daemon. dind builds on top of this SDK's JSON interface.
Branch:
feat/din-sdk(fromdevelop)Assignee: @Santiagocetran
Roadmap ref: P4-1.2 (CLI Integration Layer — Shared SDK Extraction) · P3-DOC7 (dind Architecture Document)
Goal
Extract the logic-dependent parts of
dinclicommands into a shared SDK layer atdincli/sdk/, so the same logic can be driven by both the interactive CLI and the upcoming DIN daemon (dind).Design
dincli/sdk/. CLI command modules become thin wrappers: parse arguments → call SDK function → render output.dindreads the same JSON to update its configuration and job queue.dinclicommands run through the SDK layer and all existing tests pass.Developer/ROADMAP.mdfor the candidate module list).Scope
dinclicommand modules and identify which logic moves todincli/sdk/dinclicommandsReferences
Developer/ROADMAP.md— P4-1.2, P3-DOC7, and the P4 phase overview ("Daemon and Agentic AI Layer")Developer/issues/containerization.md— worker/container runner must be callable "from both CLI commands and futuredinddaemon jobs"Developer/issues/validator-operations.md— daemon-mode logging/health expectationsDocumentation/— DIN workflow and Model workflow docs for the command surfaces being extractedBranching note
Kept separate from the DIN daemon work (see the "start DIN daemon" issue) so the CLI-on-SDK refactor can merge into
developwithout waiting for the daemon.dindbuilds on top of this SDK's JSON interface.