Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion job/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@constructive-io/job-pg": "^2.5.4",
"@constructive-io/job-utils": "^2.5.4",
"@constructive-io/module-loader": "workspace:^",
"@constructive-io/usage-loader": "workspace:^",
"@pgpmjs/logger": "^2.4.3",
"pg": "8.20.0"
},
Expand Down
6 changes: 3 additions & 3 deletions job/worker/src/compute-meter.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Compute metering — fire-and-forget usage logging for every job.
*
* Delegates to @constructive-io/usage-loader which resolves table names
* Delegates to @constructive-io/module-loader which resolves table names
* dynamically from MetaSchema module registration tables.
*
* All writes are non-blocking: errors are logged and swallowed so
* metering never affects job throughput or latency.
*/

import type { Pool } from 'pg';
import { UsageLoader } from '@constructive-io/usage-loader';
import type { MeterEntry } from '@constructive-io/usage-loader';
import { UsageLoader } from '@constructive-io/module-loader';
import type { MeterEntry } from '@constructive-io/module-loader';

export type { MeterEntry };

Expand Down
6 changes: 3 additions & 3 deletions job/worker/src/storage-meter.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Storage metering — fire-and-forget usage logging for S3/MinIO operations.
*
* Delegates to @constructive-io/usage-loader which resolves table names
* Delegates to @constructive-io/module-loader which resolves table names
* dynamically from MetaSchema module registration tables.
*
* All writes are non-blocking: errors are logged and swallowed so
* metering never affects function execution or storage latency.
*/

import type { Pool } from 'pg';
import { UsageLoader } from '@constructive-io/usage-loader';
import type { StorageEntry } from '@constructive-io/usage-loader';
import { UsageLoader } from '@constructive-io/module-loader';
import type { StorageEntry } from '@constructive-io/module-loader';

export type { StorageEntry };

Expand Down
14 changes: 7 additions & 7 deletions job/worker/src/usage-client.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/**
* Re-export from @constructive-io/usage-loader for backward compatibility.
* Re-export from @constructive-io/module-loader for backward compatibility.
*
* The canonical implementation is in packages/usage-loader.
* The canonical implementation is in packages/module-loader.
* This file exists so existing imports from within job/worker/ continue working.
*/

export {
UsageLoader as UsageClient,
UsageLoader,
getLoader,
_resetLoaderCache,
DEFAULTS,
} from '@constructive-io/usage-loader';
getModuleLoader as getLoader,
_resetModuleLoaderCache as _resetLoaderCache,
USAGE_DEFAULTS as DEFAULTS,
} from '@constructive-io/module-loader';

export type {
UsageTableConfig as UsageModuleConfig,
UsageTableConfig,
MeterEntry,
InferenceEntry,
StorageEntry,
} from '@constructive-io/usage-loader';
} from '@constructive-io/module-loader';
2 changes: 1 addition & 1 deletion packages/agentic-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"start": "node dist/standalone.js"
},
"dependencies": {
"@constructive-io/usage-loader": "workspace:^",
"@constructive-io/module-loader": "workspace:^",
"@pgpmjs/logger": "^2.4.3",
"express": "5.2.1"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/agentic-server/src/inference-meter.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Inference metering — fire-and-forget usage logging for LLM calls.
*
* Delegates to @constructive-io/usage-loader which resolves table names
* Delegates to @constructive-io/module-loader which resolves table names
* dynamically from MetaSchema module registration tables.
*
* All writes are non-blocking: errors are logged and swallowed so
* metering never affects inference latency or response delivery.
*/

import type { Pool } from 'pg';
import { UsageLoader, getLoader, _resetLoaderCache } from '@constructive-io/usage-loader';
import type { InferenceEntry } from '@constructive-io/usage-loader';
import { UsageLoader, getModuleLoader as getLoader, _resetModuleLoaderCache as _resetLoaderCache } from '@constructive-io/module-loader';
import type { InferenceEntry } from '@constructive-io/module-loader';

export type { InferenceEntry };

Expand Down
2 changes: 1 addition & 1 deletion packages/fn-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@aws-sdk/client-s3": "^3.1066.0",
"@constructive-io/fn-types": "workspace:^",
"@constructive-io/knative-job-fn": "workspace:^",
"@constructive-io/usage-loader": "workspace:^",
"@constructive-io/module-loader": "workspace:^",
"@pgpmjs/logger": "^2.4.3",
"graphql-request": "^7.1.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fn-runtime/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PutObjectCommand,
DeleteObjectCommand
} from '@aws-sdk/client-s3';
import { UsageLoader } from '@constructive-io/usage-loader';
import { UsageLoader } from '@constructive-io/module-loader';

export type StorageMeterCallback = (info: {
databaseId?: string;
Expand Down
11 changes: 4 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading