refactor(packages): rename rules-core to rules-engine
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
"@oh-my-opencode/boulder-state": "workspace:*",
|
||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||
"@oh-my-opencode/model-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/picomatch": "^4.0.3",
|
||||
@@ -60,7 +60,7 @@
|
||||
"name": "@oh-my-opencode/agents-md-core",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@oh-my-opencode/rules-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
},
|
||||
},
|
||||
@@ -100,8 +100,8 @@
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
},
|
||||
},
|
||||
"packages/rules-core": {
|
||||
"name": "@oh-my-opencode/rules-core",
|
||||
"packages/rules-engine": {
|
||||
"name": "@oh-my-opencode/rules-engine",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"picomatch": "^4.0.4",
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
"@oh-my-opencode/model-core": ["@oh-my-opencode/model-core@workspace:packages/model-core"],
|
||||
|
||||
"@oh-my-opencode/rules-core": ["@oh-my-opencode/rules-core@workspace:packages/rules-core"],
|
||||
"@oh-my-opencode/rules-engine": ["@oh-my-opencode/rules-engine@workspace:packages/rules-engine"],
|
||||
|
||||
"@oh-my-opencode/utils": ["@oh-my-opencode/utils@workspace:packages/utils"],
|
||||
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
"packages/rules-core",
|
||||
"packages/rules-engine",
|
||||
"packages/ast-grep-core",
|
||||
"packages/ast-grep-mcp",
|
||||
"packages/utils",
|
||||
@@ -48,7 +48,7 @@
|
||||
"prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build",
|
||||
"test:model-capabilities": "bun test src/shared/model-capability-aliases.test.ts src/shared/model-capability-guardrails.test.ts src/shared/model-capabilities.test.ts src/cli/doctor/checks/model-resolution.test.ts --bail",
|
||||
"typecheck": "tsgo --noEmit && bun run typecheck:packages",
|
||||
"typecheck:packages": "tsgo --noEmit -p packages/rules-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json",
|
||||
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/ast-grep-core/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json",
|
||||
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
||||
"test": "bun test",
|
||||
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
|
||||
@@ -98,7 +98,7 @@
|
||||
"@oh-my-opencode/boulder-state": "workspace:*",
|
||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||
"@oh-my-opencode/model-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"test": "bun test src/*.test.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oh-my-opencode/rules-core": "workspace:*",
|
||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||
"@oh-my-opencode/utils": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
findAgentsMdUp as findAgentsMdUpCore,
|
||||
} from "@oh-my-opencode/rules-core";
|
||||
} from "@oh-my-opencode/rules-engine";
|
||||
import { isAbsolute, resolve } from "node:path";
|
||||
|
||||
import type { AgentsMdDiscoveryInput } from "./types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentsMdCache } from "@oh-my-opencode/rules-core";
|
||||
import type { AgentsMdCache } from "@oh-my-opencode/rules-engine";
|
||||
import { promises as fsPromises } from "node:fs";
|
||||
import { dirname } from "node:path";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AgentsMdCache } from "@oh-my-opencode/rules-core";
|
||||
import type { AgentsMdCache } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
export interface TruncationResult {
|
||||
readonly result: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@oh-my-opencode/rules-core",
|
||||
"name": "@oh-my-opencode/rules-engine",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createAgentsMdCache } from "@oh-my-opencode/rules-core";
|
||||
import { createAgentsMdCache } from "@oh-my-opencode/rules-engine";
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
|
||||
import { createDynamicTruncator } from "../../shared/dynamic-truncator";
|
||||
|
||||
@@ -5,8 +5,8 @@ export {
|
||||
isDuplicateByRealPath,
|
||||
resetMatcherCache,
|
||||
shouldApplyRule,
|
||||
} from "@oh-my-opencode/rules-core";
|
||||
export type { MatchResult } from "@oh-my-opencode/rules-core";
|
||||
} from "@oh-my-opencode/rules-engine";
|
||||
export type { MatchResult } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
export interface MatcherCacheStats {
|
||||
readonly entries: number;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { parseRuleFrontmatter } from "@oh-my-opencode/rules-core";
|
||||
export type { RuleFrontmatterResult } from "@oh-my-opencode/rules-core";
|
||||
export { parseRuleFrontmatter } from "@oh-my-opencode/rules-engine";
|
||||
export type { RuleFrontmatterResult } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { clearProjectRootCache, findProjectRoot } from "@oh-my-opencode/rules-core";
|
||||
export { clearProjectRootCache, findProjectRoot } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { calculateDistance } from "@oh-my-opencode/rules-core";
|
||||
export { calculateDistance } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { setSisyphusRuleDeprecationLogger } from "@oh-my-opencode/rules-core";
|
||||
import { setSisyphusRuleDeprecationLogger } from "@oh-my-opencode/rules-engine";
|
||||
import { log } from "../../shared/logger";
|
||||
|
||||
setSisyphusRuleDeprecationLogger(log);
|
||||
|
||||
export { findRuleFiles } from "@oh-my-opencode/rules-core";
|
||||
export type { FindRuleFilesOptions } from "@oh-my-opencode/rules-core";
|
||||
export { findRuleFiles } from "@oh-my-opencode/rules-engine";
|
||||
export type { FindRuleFilesOptions } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { findRuleFilesRecursive as findRuleFileEntriesRecursive, safeRealpathSync } from "@oh-my-opencode/rules-core";
|
||||
import type { DirectoryScanEntry } from "@oh-my-opencode/rules-core";
|
||||
import { findRuleFilesRecursive as findRuleFileEntriesRecursive, safeRealpathSync } from "@oh-my-opencode/rules-engine";
|
||||
import type { DirectoryScanEntry } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
export { safeRealpathSync };
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { createRuleScanCache } from "@oh-my-opencode/rules-core";
|
||||
export type { DirectoryScanEntry, RuleScanCache } from "@oh-my-opencode/rules-core";
|
||||
export { createRuleScanCache } from "@oh-my-opencode/rules-engine";
|
||||
export type { DirectoryScanEntry, RuleScanCache } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RuleFileCandidate, RuleMetadata } from "@oh-my-opencode/rules-core";
|
||||
import type { RuleFileCandidate, RuleMetadata } from "@oh-my-opencode/rules-engine";
|
||||
|
||||
export type { RuleFileCandidate, RuleMetadata };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user