Skip to content

Publish core package as well#34

Merged
Looted merged 2 commits intomasterfrom
develop
Feb 27, 2026
Merged

Publish core package as well#34
Looted merged 2 commits intomasterfrom
develop

Conversation

@Looted
Copy link
Copy Markdown
Owner

@Looted Looted commented Feb 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 12:59
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Looted Looted merged commit 8719e32 into master Feb 27, 2026
1 of 2 checks passed
Copy link
Copy Markdown

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 enables the core package to be published alongside the CLI and MCP packages, establishing proper dependency relationships between them. The change allows the CLI and MCP packages to use kibi-core as an installed dependency while maintaining backward compatibility with the monorepo development workflow.

Changes:

  • Published kibi-core package by removing private flag and adding files configuration
  • Updated version numbers across all packages from 0.1.0 to 0.1.4
  • Modified CLI package to resolve kb.pl from installed kibi-core dependency with monorepo fallback

Reviewed changes

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

Show a summary per file
File Description
packages/core/package.json Removed private flag, added files array to specify publishable Prolog files, and updated version
packages/cli/package.json Added kibi-core dependency and updated version to match 0.1.4
packages/cli/src/prolog.ts Implemented dynamic resolution for kb.pl path with installed dependency preference and dev fallback
packages/mcp/package.json Updated version and kibi-cli dependency to 0.1.4
package.json Modified release script to explicitly publish core package first, then CLI and MCP
Comments suppressed due to low confidence (2)

packages/cli/src/prolog.ts:75

  • The error message could be more actionable by suggesting a specific remedy. Consider adding 'Please run npm install kibi-core or ensure you are in the monorepo root.' to guide users toward resolution.
  throw new Error(
    "Unable to resolve kb.pl. Expected kibi-core to be installed (node_modules) " +
      "or to be running inside the monorepo checkout.",
  );

packages/core/package.json:6

  • The files array includes schema/**/*.pl but the diff doesn't show whether a schema directory exists in the core package. If the schema directory doesn't exist yet or contains no .pl files, this pattern will silently succeed but may cause confusion. Consider verifying the directory exists or documenting the intended structure.
  "files": ["src/**/*.pl", "schema/**/*.pl"]

const importMetaDir = path.dirname(fileURLToPath(import.meta.url));

const require = createRequire(import.meta.url);

Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The resolveKbPlPath function lacks documentation explaining its resolution strategy (installed dependency vs. dev monorepo) and when it should be used. Add a JSDoc comment describing the fallback logic and potential failure scenarios.

Suggested change
/**
* Resolve the absolute path to the Prolog knowledge base file `kb.pl`.
*
* Resolution strategy (in order):
* 1. Treat `kibi-core` as an installed dependency:
* - Use Node's `require.resolve` to locate `kibi-core/package.json`.
* - From that directory, look for `src/kb.pl` and return its path if it exists.
* - This is the expected layout when `kibi-core` is installed from npm in
* `node_modules`.
* 2. Fall back to the monorepo development layout:
* - Resolve `../../core/src/kb.pl` relative to this file's directory.
* - This works when running the CLI from a checkout of the Kibi monorepo.
*
* If neither location contains `kb.pl`, the function throws an `Error` with an
* actionable message. Typical failure scenarios include:
* - `kibi-core` is not installed and the project is not being run from the
* monorepo checkout.
* - The `kb.pl` file has been moved, renamed, or removed from `kibi-core`.
* - Filesystem permission issues prevent checking for or reading `kb.pl`.
*
* Call this helper before spawning SWI-Prolog to obtain the path to the
* knowledge base. Callers should be prepared to handle the thrown `Error`
* if the environment is not correctly set up.
*/

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants