Skip to content

feat(sdk): define* authoring builders for every extension registration surface - #342

Merged
unbraind merged 3 commits into
mainfrom
feat/sdk-define-registration-builders
Jun 22, 2026
Merged

unbraind merged 3 commits into
mainfrom
feat/sdk-define-registration-builders

Conversation

@unbraind

Copy link
Copy Markdown
Owner

Summary

Completes the SDK author → register → test ergonomics tripod. The SDK already shipped defineExtension (the module), the assert* helpers (verify a registration), and the run* helpers (invoke a registration) — but there was no authoring-time typed builder for the individual registration definitions a package author hands to api.register*. This PR adds the missing leg.

New src/sdk/define.ts exports 19 zero-cost identity builders covering every ExtensionApi registration surface:

  • Object-definition builders — generic <T extends Def>(x: T): T, preserve the narrow literal type and still infer nested handler params: defineCommand, defineFlag, defineItemType, defineItemField, defineMigration, defineSearchProvider, defineVectorStoreAdapter
  • Function-definition builders — non-generic (fn: Fn): Fn so a bare arrow's parameter is contextually typed instead of falling back to any: defineCommandOverride, defineParserOverride, definePreflightOverride, defineServiceOverride, defineRendererOverride, defineImporter, defineExporter, defineBeforeCommandHook, defineAfterCommandHook, defineOnWriteHook, defineOnReadHook, defineOnIndexHook

Why

In plain-JavaScript packages — the default pm package init scaffold — authors cannot write TypeScript annotations, so a bare const cmd = { ... } is completely unchecked. Wrapping it as const cmd = defineCommand({ ... }) restores full contract checking and infers the nested handler's context parameter through the editor's TypeScript language service. It also lets a definition be colocated, exported, reused, and unit-tested apart from activate().

Every builder is a pure identity function (returns its argument unchanged), exactly like defineExtension and the wider defineConfig/defineComponent convention — the value is entirely at the type level. Validation deliberately stays in register*/loader and the assert* helpers (one source of truth). Design rationale recorded in ADR pm-3mph.

Surface

  • Re-exported through the SDK barrel (export * from "./define.js"); barrel identity locked in a dedicated spec.
  • Documented in docs/SDK.md (new Authoring Builders section + Public Exports list).

Verification

  • tsc --noEmit (src and tsconfig.packages.json) clean; build clean.
  • 100% line + branch coverage (29399/29399 lines, 23831/23831 branches; 4843 tests).
  • Static-quality, docstring, docs-links, and docs-skills gates pass; changelog:pm:check clean.
  • Manual temp-dir test: a real package authored entirely with define* (defineCommand + defineFlag + defineAfterCommandHook + defineSearchProvider) imported from @unbrained/pm-cli/sdk activates via @unbrained/pm-cli/sdk/testing, registers its search provider, and runs greet hello alice --loud returning {greeting:'hi alice',loud:true}. Confirmed dist/sdk/define.d.ts declares all 19 builders and the barrel re-exports them for JS IntelliSense.

pm tracking

  • Closes pm-12tj (Feature, epic pm-ugqx — Extension & package platform maturity).
  • ADR pm-3mph records the identity-vs-validating and generic-vs-non-generic design decisions (kept open as a living record under pm-m2u1).

🤖 Generated with Claude Code

Complete the SDK author->register->test ergonomics tripod. The SDK
already exposes defineExtension (module), assert* (verify), and run*
(invoke) helpers, but had no authoring-time typed builder for the
individual registration definitions package authors hand to
api.register*.

Add src/sdk/define.ts with 19 zero-cost identity builders:
- object-def (generic <T extends Def>(x:T):T; preserves literals and
  still infers nested handler params): defineCommand, defineFlag,
  defineItemType, defineItemField, defineMigration, defineSearchProvider,
  defineVectorStoreAdapter
- function-def (non-generic (fn:Fn):Fn so a bare .js arrow's parameter is
  contextually typed instead of falling back to any): defineCommandOverride,
  defineParserOverride, definePreflightOverride, defineServiceOverride,
  defineRendererOverride, defineImporter, defineExporter,
  defineBeforeCommandHook, defineAfterCommandHook, defineOnWriteHook,
  defineOnReadHook, defineOnIndexHook

Value: in plain-JavaScript packages (the pm package init default) a bare
object literal is unchecked; wrapping it in a builder restores contract
checking + handler-context inference and lets definitions be colocated,
exported, reused, and unit-tested apart from activate(). Validation stays
in register*/loader + assert* (one source of truth), mirroring
defineExtension and the ecosystem defineConfig/defineComponent pattern.

Re-exported via the SDK barrel (export * from ./define.js); barrel
identity locked in tests/unit/sdk/sdk-define.spec.ts. Documented in
docs/SDK.md (new Authoring Builders section + Public Exports list).
100% line+branch coverage (4843 tests); tsc (src + tsconfig.packages.json)
and build clean. Verified end-to-end in a temp dir: a real package
authored entirely with define* from @unbrained/pm-cli/sdk activates,
registers, and runs through @unbrained/pm-cli/sdk/testing.

Closes pm-12tj (epic pm-ugqx); ADR rationale in pm-3mph (living record).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lwzzhhu7sVjqEZAwMxN4Wo

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@unbraind

Copy link
Copy Markdown
Owner Author

@coderabbitai full review
/gemini review
@codex review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@unbraind, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 43 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 863b2b55-5cb4-4d31-b191-daa2a96fda17

📥 Commits

Reviewing files that changed from the base of the PR and between d7e31db and 1d5a9d1.

📒 Files selected for processing (3)
  • docs/SDK.md
  • src/sdk/define.ts
  • tests/unit/sdk/sdk-define.spec.ts
📝 Walkthrough

Walkthrough

Adds a new src/sdk/define.ts module exporting 19 authoring-time define* identity functions covering all SDK extension registration surfaces (commands, flags, schema items/fields, migrations, search/vector adapters, overrides, importers/exporters, and lifecycle hooks). The module is re-exported from the SDK barrel, covered by a new unit test suite, and documented in docs/SDK.md.

Changes

SDK define* typed identity builders

Layer / File(s) Summary
define* module and barrel wiring
src/sdk/define.ts, src/sdk/index.ts
Adds 19 exported define* identity functions typed against every *Definition and handler type in the SDK; each returns its argument unchanged. src/sdk/index.ts adds export * from "./define.js" to expose them via the public barrel.
Unit and integration tests
tests/unit/sdk/sdk-define.spec.ts
Verifies reference equality for all object-based and function-based builders, confirms 1:1 mapping through the barrel re-exports, and runs an integration test that activates an extension authored with defineCommand, defineSearchProvider, and defineAfterCommandHook then asserts the run result.
Docs, changelog, and agent tracking
docs/SDK.md, CHANGELOG.md, .agents/pm/decisions/pm-3mph.toon, .agents/pm/features/pm-12tj.toon, .agents/pm/history/pm-12tj.jsonl, .agents/pm/history/pm-3mph.jsonl
docs/SDK.md adds a Registration builders subsection and a new Authoring Builders section with a JS example. CHANGELOG.md adds the Unreleased bullet. Agent PM files record the ADR, feature spec, and task lifecycle for this work.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding define* authoring builders for SDK extension registration surfaces.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the purpose, design, and implementation of the new define* builders.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR Info ==="
gh pr view 342 --repo unbraind/pm-cli --json title,state,baseRefName,headRefName,files

echo ""
echo "=== Changed Files ==="
gh pr diff 342 --repo unbraind/pm-cli

Length of output: 42968



@unbraind — here is the full review of PR #342.


Review: feat(sdk) — define* authoring builders

The design is clean and well-reasoned. The generic-for-objects / non-generic-for-functions distinction is the right call (documented in ADR pm-3mph), every builder is a correct one-liner identity function, and the barrel re-export, docs, and CHANGELOG are all in order. A few things worth addressing before merging:


🐛 observed hook side-effect is never asserted (tests/unit/sdk/sdk-define.spec.ts, Line ~143)

const observed: string[] = [];
// …
api.hooks.afterCommand(
  defineAfterCommandHook((context) => {
    observed.push(context.command);  // ← populated…
  }),
);

// …but observed is never checked — the hook could silently never run
expect(activation.registration_counts.search_providers).toBe(1);
const run = await runRegisteredCommandForTest(…);
expect(run).toEqual(…);
// ← no expect(observed) here

The intent of the afterHook path is clearly to verify that defineAfterCommandHook wires through correctly end-to-end, but without an assertion the test passes even if the hook never fires. Suggest adding:

expect(observed).toEqual(["demo run"]);

after runRegisteredCommandForTest.


📝 defineFlag JSDoc example drops the api. receiver (Line ~74)

 * Authors compose builders into the array
 * (`registerFlags("list", [defineFlag({ long: "--mine" })])`) to get

Every other builder's JSDoc uses api.register* consistently. This should be api.registerFlags("list", [...]) to avoid confusion.


📝 defineMigration JSDoc overstates inference (Line ~107)

 * Infers the `run` migration runner's context and preserves the literal `id`

The identity test confirms SchemaMigrationDefinition can be { id, description } with no run at all, so "infers the run migration runner's context" only applies when run is present. Consider softening to something like:

Preserves the literal id and, when run is provided, infers the migration runner's context …


💡 Consider a compile-time negative test (optional, non-blocking)

The spec confirms runtime identity but doesn't assert compile-time rejection of an invalid shape. Adding a single @ts-expect-error case (e.g., passing {} to defineCommand) would lock the contract in CI without adding much complexity. Not a blocker given tsc --noEmit is already in the gate.


Summary: One functional gap (unasserted hook), two doc nits. The core implementation and design are solid. Address the observed assertion and this is ready to go.

✅ Action performed

Full review finished.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces 19 zero-cost typed identity builders (define*) in src/sdk/define.ts for all extension registration surfaces, enabling type-checking and contextual parameter inference in plain-JavaScript packages. It also updates the SDK barrel exports, adds comprehensive documentation in docs/SDK.md, and includes unit tests in tests/unit/sdk/sdk-define.spec.ts. Feedback on the tests suggests importing and using runRegisteredHookForTest to actually invoke and assert the side-effects of the registered afterCommand hook, ensuring it is fully verified.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/unit/sdk/sdk-define.spec.ts Outdated
defineVectorStoreAdapter as defineVectorStoreAdapterFromBarrel,
type ExtensionApi,
} from "../../../src/sdk/index.js";
import { activateExtensionForTest, runRegisteredCommandForTest } from "../../../src/sdk/testing.js";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Import runRegisteredHookForTest to allow exercising and asserting the registered afterCommand hook in the integration test below.

Suggested change
import { activateExtensionForTest, runRegisteredCommandForTest } from "../../../src/sdk/testing.js";
import { activateExtensionForTest, runRegisteredCommandForTest, runRegisteredHookForTest } from "../../../src/sdk/testing.js";

Comment on lines +148 to +150
const run = await runRegisteredCommandForTest(activation.commands, { command: "demo run" });
expect(run).toEqual({ handled: true, result: { ok: true, command: "demo run" }, warnings: [] });
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The test registers an afterCommand hook and defines a local observed array to capture the executed command name, but never actually invokes the hook or asserts its side-effects. Use runRegisteredHookForTest to execute the hook and assert that observed contains the expected command name, ensuring the hook registration and builder are fully verified.

    const run = await runRegisteredCommandForTest(activation.commands, { command: "demo run" });
    expect(run).toEqual({ handled: true, result: { ok: true, command: "demo run" }, warnings: [] });

    await runRegisteredHookForTest(activation.hooks, {
      kind: "after_command",
      context: { command: "demo run", args: [], pm_root: "", ok: true },
    });
    expect(observed).toEqual(["demo run"]);
  });

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a complete set of 19 zero-cost typed identity builders (define*) in src/sdk/define.ts to improve authoring ergonomics for extension registration surfaces. These builders enable full type-checking and contextual parameter inference in plain-JavaScript packages. The changes also include re-exporting these builders from the SDK barrel, comprehensive unit tests verifying their identity behavior and integration with the activation harness, updated documentation in docs/SDK.md, and changelog updates. I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/SDK.md`:
- Around line 578-579: The Authoring Builders section heading in docs/SDK.md
lacks the required tracker references as per coding guidelines. Locate the "##
Authoring Builders" section heading and add tracker references near the top
following the pattern used in CHANGELOG.md. Include references to both pm-12tj
(the task reference) and pm-3mph (the ADR reference) either as an HTML comment
or as inline text at the start of the section, as suggested in the comment
details.

In `@tests/unit/sdk/sdk-define.spec.ts`:
- Around line 137-150: The test mutates the observed array inside the
defineAfterCommandHook callback but does not assert that this side effect
actually occurred, so the test could pass even if hook dispatch regresses. After
the runRegisteredCommandForTest call that executes the "demo run" command, add
an assertion to verify that the observed array contains the expected command
value to ensure the afterCommand hook was properly dispatched and executed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 982eeb8e-0be4-470e-9e94-3379ee4babd1

📥 Commits

Reviewing files that changed from the base of the PR and between c376cc2 and d7e31db.

📒 Files selected for processing (9)
  • .agents/pm/decisions/pm-3mph.toon
  • .agents/pm/features/pm-12tj.toon
  • .agents/pm/history/pm-12tj.jsonl
  • .agents/pm/history/pm-3mph.jsonl
  • CHANGELOG.md
  • docs/SDK.md
  • src/sdk/define.ts
  • src/sdk/index.ts
  • tests/unit/sdk/sdk-define.spec.ts

Comment thread docs/SDK.md Resolved
Comment thread tests/unit/sdk/sdk-define.spec.ts Resolved
Address review feedback on PR #342:

- Both CodeRabbit and Gemini flagged that the activation e2e test mutated
  an `observed` array inside the defineAfterCommandHook callback but never
  asserted it, so the test could pass even if hook dispatch regressed. Fire
  the registered after_command hook through runRegisteredHookForTest and
  assert it recorded the command (observed === ["demo run"]) plus zero
  runner warnings. Confirms runRegisteredCommandForTest does not double-fire
  lifecycle hooks.
- CodeRabbit flagged the new docs/SDK.md "Authoring Builders" section lacks
  the tracker reference AGENTS.md requires for pm-driven doc changes. Add a
  "Tracked: pm-12tj (ADR pm-3mph)" line under the heading.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lwzzhhu7sVjqEZAwMxN4Wo
@unbraind

Copy link
Copy Markdown
Owner Author

Addressed review feedback in 282e9b3:

  • CodeRabbit + Gemini (test): the activation e2e test mutated observed inside the defineAfterCommandHook callback but never asserted it. Now fires the registered after_command hook via runRegisteredHookForTest and asserts observed === ["demo run"] with zero runner warnings — so a hook-dispatch regression fails the test (and it confirms runRegisteredCommandForTest does not double-fire lifecycle hooks).
  • CodeRabbit (docs): added the Tracked: pm-12tj (ADR pm-3mph) reference under the new ## Authoring Builders section in docs/SDK.md, per AGENTS.md guideline.

Sourcery was rate-limited (no findings); Codex connector is not configured on this repo.

@coderabbitai full review
/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a complete set of 19 zero-cost identity define* builders in src/sdk/define.ts to support authoring-time type-checking and contextual parameter inference across all extension registration surfaces (such as commands, flags, overrides, and hooks). These builders are re-exported via the SDK barrel, documented in docs/SDK.md, and backed by comprehensive unit tests in tests/unit/sdk/sdk-define.spec.ts along with corresponding ADR and feature records. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR Info ==="
gh pr view 342 --repo unbraind/pm-cli --json title,state,baseRefName,headRefName,commits

echo ""
echo "=== Changed Files ==="
gh pr diff 342 --repo unbraind/pm-cli

Length of output: 46721



@unbraind — commit 282e9b34 looks good. The two primary concerns are resolved cleanly:

✅ Hook assertion — runRegisteredHookForTest now fires the real dispatch path, and expect(observed).toEqual(["demo run"]) properly closes the loop. The note in the commit message about confirming runRegisteredCommandForTest doesn't double-fire is a nice extra.

✅ Docs tracker ref — Tracked: pm-12tj (ADR pm-3mph) added under the new section.


Two minor doc nits from the first pass are still open in src/sdk/define.ts. They're non-blocking but worth a quick follow-up fix:

  1. defineFlag JSDoc (Line ~74) — still reads registerFlags("list", [...]) instead of api.registerFlags("list", [...]), inconsistent with every other builder's JSDoc:

    - * (`registerFlags("list", [defineFlag({ long: "--mine" })])`) to get
    + * (`api.registerFlags("list", [defineFlag({ long: "--mine" })])`) to get
  2. defineMigration JSDoc (Line ~107) — still overstates inference unconditionally. The identity test confirms SchemaMigrationDefinition can be { id, description } with no run:

    - * Infers the `run` migration runner's context and preserves the literal `id`,
    + * Preserves the literal `id` and, when `run` is provided, infers the migration runner's context;

Everything else is in order — implementation, barrel re-export, test coverage, and documentation are all solid. Approving as-is once you decide whether to fold those nits in.

[approve]

CodeRabbit round-2 doc-accuracy nits (approved with these as non-blocking):
- defineFlag JSDoc: use `api.registerFlags(...)` to match every other
  builder's JSDoc.
- defineMigration JSDoc: `run` is optional, so word the inference as
  conditional ("when `run` is provided") instead of unconditional.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lwzzhhu7sVjqEZAwMxN4Wo
@unbraind

Copy link
Copy Markdown
Owner Author

Folded in the two round-2 doc-accuracy nits in 1d5a9d1: defineFlag JSDoc now uses api.registerFlags(...), and defineMigration JSDoc wording is conditional on run being provided. Thanks!

@coderabbitai full review
/gemini review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR Info ==="
gh pr view 342 --repo unbraind/pm-cli --json title,state,baseRefName,headRefName,commits

echo ""
echo "=== Changed Files ==="
gh pr diff 342 --repo unbraind/pm-cli

Length of output: 47623



@unbraind — commit 1d5a9d1f cleanly closes both remaining nits:

  • defineFlag JSDoc → now consistently uses api.registerFlags("list", [...]), matching every other builder.
  • defineMigration JSDoc → now reads "Preserves the literal id and, when run is provided, infers the migration runner's context…" — correctly conditional.

All three rounds of feedback are fully resolved. The implementation, barrel re-export, test coverage (identity + barrel lock + activation e2e with the hook dispatch assertion), docs, ADR, and CHANGELOG are all in order.

[approve]

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a complete set of 19 zero-cost authoring-time typed builders (define*) in src/sdk/define.ts to cover every extension registration surface, enabling full type-checking and contextual parameter inference in both TypeScript and plain JavaScript packages. These builders are re-exported via the SDK barrel, fully documented in docs/SDK.md, and thoroughly tested in tests/unit/sdk/sdk-define.spec.ts. There are no review comments provided, and the implementation is clean, well-documented, and fully tested, so I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@unbraind
unbraind merged commit 26adc04 into main Jun 22, 2026
16 checks passed
@unbraind
unbraind deleted the feat/sdk-define-registration-builders branch June 22, 2026 12: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.

1 participant