Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ function formatReadMoreLine(options: {
readonly useColor: boolean;
readonly formatDimText: (text: string) => string;
}): string {
const labelPadded =
'Read more' + ' '.repeat(Math.max(0, options.maxLabelWidth - 'Read more'.length));
const labelPadded = `Read more${' '.repeat(Math.max(0, options.maxLabelWidth - 'Read more'.length))}`;
const valueColored = options.useColor ? blue(options.url) : options.url;
return `${options.formatDimText('│')} ${labelPadded} ${valueColored}`;
}
Expand Down
5 changes: 1 addition & 4 deletions packages/1-framework/4-runtime-executor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const core = createRuntimeCore({
driver,
verify: { mode: 'onFirstUse', requireMarker: false },
operationRegistry,
plugins: [budgets()],
plugins: [],
});
```

Expand All @@ -73,13 +73,10 @@ const core = createRuntimeCore({
- `createRuntimeCore` - Create a target-neutral runtime instance
- `RuntimeFamilyAdapter` - Interface for family runtimes
- `MarkerReader` - Interface for marker reading
- `budgets` - Target-neutral budgets plugin
- `runtimeError` - Error envelope utilities
- `computeSqlFingerprint` - SQL fingerprint computation
- `parseContractMarkerRow` - Marker parsing utilities

**Note:** The `lints` plugin has been migrated to the SQL domain. Import `lints` and `LintsOptions` from `@prisma-next/sql-runtime` instead. See [ADR 162](../../../docs/architecture docs/adrs/ADR 162 - Kysely lane emits PN SQL AST.md) for rationale.

## Testing

Includes a mock-family smoke test (`test/mock-family.test.ts`) that proves runtime-executor can work without SQL dependencies.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export type { BudgetFinding, LintFinding, RawGuardrailResult } from '../guardrai
export { evaluateRawGuardrails } from '../guardrails/raw';
export type { ContractMarkerRecord } from '../marker';
export { parseContractMarkerRow } from '../marker';
export type { BudgetsOptions } from '../plugins/budgets';
export { budgets } from '../plugins/budgets';
export type {
AfterExecuteResult,
Log,
Expand Down
309 changes: 0 additions & 309 deletions packages/1-framework/4-runtime-executor/src/plugins/budgets.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/2-sql/5-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ for await (const row of runtime.execute(plan)) {

### Plugins

- `budgets` - Re-exported from `@prisma-next/runtime-executor` (target-neutral)
- `budgets` - **AST-first budget plugin** (canonical in SQL domain), inspects `plan.ast` when present for row estimation
- `lints` - **AST-first lint plugin** (canonical in SQL domain), inspects `plan.ast` when present
- `BudgetsOptions`, `LintsOptions` - Plugin option types
- `Plugin`, `PluginContext` - Plugin interface types (from runtime-executor)
Expand Down
4 changes: 2 additions & 2 deletions packages/2-sql/5-runtime/src/exports/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export type {
AfterExecuteResult,
BudgetsOptions,
Log,
Plugin,
PluginContext,
} from '@prisma-next/runtime-executor';
export { budgets } from '@prisma-next/runtime-executor';
export {
extractCodecIds,
validateCodecRegistryCompleteness,
validateContractCodecMappings,
} from '../codecs/validation';
export { lowerSqlPlan } from '../lower-sql-plan';
export type { BudgetsOptions } from '../plugins/budgets';
export { budgets } from '../plugins/budgets';
export type { LintsOptions } from '../plugins/lints';
export { lints } from '../plugins/lints';
export type {
Expand Down
Loading
Loading