Skip to content

Externalize target architecture registry - #28

Merged
adilei merged 1 commit into
microsoft:release/0.3.0from
Ramakrishnan24689:issue-20-architecture-registry
Aug 3, 2026
Merged

adilei merged 1 commit into
microsoft:release/0.3.0from
Ramakrishnan24689:issue-20-architecture-registry

Conversation

@Ramakrishnan24689

@Ramakrishnan24689 Ramakrishnan Raman (Ramakrishnan24689) commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Issue #20 identified that adding a target architecture required updating several separate lists and builder-specific lookup functions. This change moves the UI-safe architecture metadata into one typed manifest and lets the Electron main process discover catalogue providers automatically.

The metadata and catalogue content are intentionally separate. The renderer imports only the labels and availability information it needs, while catalogue text and versions remain in the Electron main process. Skill and automation builders now ask the registry for the appropriate catalogue instead of maintaining architecture-specific dispatch code.

The existing Scout and Cowork catalogues were moved without changing their content. Target availability is also unchanged: Scout supports skills and automations, Cowork supports skills, and Copilot Studio remains disabled.

Validation

  • npm test
  • npm run build
  • npm run typecheck:evals

Closes #20

@Ramakrishnan24689
Ramakrishnan Raman (Ramakrishnan24689) changed the base branch from main to release/0.3.0 July 30, 2026 11:32
Derive UI metadata from one typed manifest and load validated catalogue providers only in the Electron main process. Preserve existing target availability and catalogue content while enforcing the renderer bundle boundary.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: e4d624ee-fa8f-49d2-8b39-0ec71fc31e84
@adilei

adilei commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Really nice refactor — this cleanly kills the "add a target, edit five separate lists" problem from #20, and the bundle-boundary script that proves catalogue text stays out of the renderer is a great touch. I built it locally: tests / typecheck / build / boundary all pass, and the catalogues move byte-for-byte.

One design thought for a follow-up (not blocking this PR):

Now that the manifest declares which architecture offers skill/automation, the choice grid is fully data-driven (TARGETS.map(...)) — 👍. But there's a second axis, placement (install-in-place vs export/download), that's still inferred from architecture identity in the renderer:

  • src/Library.tsx:496 — default useState<SkillArchitecture>("scout")
  • src/Library.tsx:966 — architecture === "cowork" ? "export" : "install"
  • src/Library.tsx:1130-1161 — "Added to Scout" / "Add to Scout" copy + the Scout-only Download button, gated on architecture === "scout"

That's the same "one target, many edits" smell #20 was about, just on the delivery dimension. I think we can lift it into the same manifest as capabilities rather than identities:

{ id: "scout",  installTargetLabel: "Scout",
  targets: [
    { kind: "skill",      placements: ["install", "export"] },
    { kind: "automation", placements: ["install"] },
  ] }
{ id: "cowork", installTargetLabel: "Microsoft 365 Copilot",
  targets: [
    { kind: "skill", placements: ["export"] },
  ] }

Then the renderer derives default = first enabled target, placement buttons = target.placements, and copy = installTargetLabel — no architecture string literals left in src/. Adding e.g. "Copilot Studio (skill, export-only)" becomes one manifest entry + one catalogue file, with no renderer edits.

Where I'd stop so the config doesn't turn into a UI DSL: keep config for data/capabilities (labels, enabled, kinds, placements, icon key) — the same UI-safe boundary you already enforce for catalogue text — and keep behavior in code. skill vs automation genuinely branch (different builder, plan schema, IPC, render target), so those stay typed primitives; the manifest just decides whether each is offered. For any genuinely bespoke per-architecture UX later, a component registry keyed by SkillArchitecture beats piling more fields into config.

Happy to file this as a separate issue so it doesn't hold up the merge — wdyt?

@Ramakrishnan24689

Copy link
Copy Markdown
Contributor Author

Happy to file this as a separate issue so it doesn't hold up the merge — wdyt?

Thanks, this is a good catch. I agree placement is another architecture-specific concern worth making data-driven. Since it introduces some additional behavior decisions beyond #20, I think a separate follow-up issue would be the cleanest approach. Can you file one? I'll pick it up as a follow-up.

@adilei
adilei merged commit e95b690 into microsoft:release/0.3.0 Aug 3, 2026
5 checks passed
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.

Externalize target architectures so a new one can be added via configuration

2 participants