Skip to content

Introduce plugin framework and common bindings#31

Draft
tiranuom wants to merge 6 commits intofeat/introduce-plugin-systemfrom
codex/add-plugin-system-to-intrig-core
Draft

Introduce plugin framework and common bindings#31
tiranuom wants to merge 6 commits intofeat/introduce-plugin-systemfrom
codex/add-plugin-system-to-intrig-core

Conversation

@tiranuom
Copy link
Copy Markdown
Contributor

Summary

  • extract GeneratorBinding into new buildable library @intrig/common
  • add IntrigPlugin interface and builtin plugin list
  • export plugin definitions from next/react bindings
  • wire plugin loading into daemon generator and CLI modules
  • make next-binding and react-binding publishable

Testing


https://chatgpt.com/codex/tasks/task_e_68602d94b3b083298facdcfa6d0d390e

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a formal plugin framework by extracting shared bindings into a standalone @intrig/common (common-bindings) package, defining an IntrigPlugin interface with built-in React/Next plugins, and wiring plugin loading into the daemon generator and CLI modules.

  • Extracted GeneratorBinding to common-bindings and aliased as @intrig/common
  • Added IntrigPlugin interface and default exports for React/Next plugins
  • Updated generator and CLI modules to discover and load plugins dynamically

Reviewed Changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.base.json Added paths mapping for @intrig/common
lib/*-binding/tsconfig.json Injected reference to ../common-bindings
lib/*-binding/src/index.ts Exported plugin objects for React and Next
app/intrig/src/app/plugins/builtin-plugins.ts Populated BUILTIN_PLUGINS array
app/intrig/src/app/cli/cli.module.ts Wire CLI modules/services via BUILTIN_PLUGINS
Comments suppressed due to low confidence (7)

lib/react-binding/tsconfig.json:8

  • This entry is nested inside the previous object block instead of being its own array element. It should be moved out as a separate object in the references array.
    {"path": "../common-bindings"},

app/intrig/src/app/plugins/builtin-plugins.ts:1

  • Update this import to @intrig/common to match the new package name for shared interfaces.
import {IntrigPlugin} from "common";

app/intrig/src/app/cli/cli.module.ts:8

  • The CommonModule import should come from @intrig/common instead of common after the refactoring.
import {CommonModule} from "common";

lib/next-binding/src/index.ts:8

  • The imported identifier IntrigNextBindingService likely mismatches the class name exported in next-binding.service.ts. Please verify and adjust the import/export names.
import {IntrigNextBindingService} from './lib/next-binding.service';

lib/react-binding/package.json:16

  • Using "*" for a dependency version is discouraged; specify a semver range (e.g., ^0.0.1) to ensure reproducible installs.
    "@intrig/common": "*"

Comment on lines +27 to +28
"@intrig/common": ["lib/common-bindings/src/index.ts"],
"@intrig/common/*": ["lib/common-bindings/src/*"]
Copy link

Copilot AI Jun 28, 2025

Choose a reason for hiding this comment

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

The path alias @intrig/common points only to common-bindings, but many imports refer to exports from lib/common. You may need to update this mapping to include the main lib/common index or adjust imports accordingly.

Suggested change
"@intrig/common": ["lib/common-bindings/src/index.ts"],
"@intrig/common/*": ["lib/common-bindings/src/*"]
"@intrig/common": ["lib/common-bindings/src/index.ts", "lib/common/index.ts"],
"@intrig/common/*": ["lib/common-bindings/src/*", "lib/common/*"]

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants