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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build": "node scripts/build.mjs",
"build:packages": "turbo build",
"build:runtime:packages": "pnpm -r --filter @origintrail-official/dkg-core --filter @origintrail-official/dkg-storage --filter @origintrail-official/dkg-query --filter @origintrail-official/dkg-publisher --filter @origintrail-official/dkg-chain --filter @origintrail-official/dkg-epcis --filter @origintrail-official/dkg-random-sampling --filter @origintrail-official/dkg-agent --filter @origintrail-official/dkg-graph-viz --filter @origintrail-official/dkg-node-ui --filter @origintrail-official/dkg-adapter-openclaw --filter @origintrail-official/dkg-adapter-hermes --filter @origintrail-official/kafka-plugin --filter @origintrail-official/dkg run build",
"build:runtime:packages": "pnpm -r --filter @origintrail-official/dkg-core --filter @origintrail-official/dkg-storage --filter @origintrail-official/dkg-query --filter @origintrail-official/dkg-publisher --filter @origintrail-official/dkg-chain --filter @origintrail-official/dkg-epcis --filter @origintrail-official/dkg-okf --filter @origintrail-official/dkg-random-sampling --filter @origintrail-official/dkg-agent --filter @origintrail-official/dkg-graph-viz --filter @origintrail-official/dkg-node-ui --filter @origintrail-official/dkg-adapter-openclaw --filter @origintrail-official/dkg-adapter-hermes --filter @origintrail-official/kafka-plugin --filter @origintrail-official/dkg run build",
"build:runtime": "pnpm run build:runtime:packages && pnpm --filter @origintrail-official/dkg-node-ui run build:ui",
"test": "turbo test",
"test:watch": "vitest --config vitest.config.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@origintrail-official/dkg-core": "workspace:*",
"@origintrail-official/dkg-mcp": "workspace:*",
"@origintrail-official/dkg-epcis": "workspace:*",
"@origintrail-official/dkg-okf": "workspace:*",
"@origintrail-official/dkg-node-ui": "workspace:*",
"@origintrail-official/dkg-publisher": "workspace:*",
"@origintrail-official/dkg-storage": "workspace:*",
Expand Down
8 changes: 6 additions & 2 deletions packages/cli/src/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,18 @@ export class ApiClient {
*/
async sharedMemoryWrite(contextGraphId: string, quads: Array<{
subject: string; predicate: string; object: string; graph: string;
}>): Promise<{
}>, subGraphName?: string): Promise<{
shareOperationId: string;
contextGraphId: string;
graph: string;
triplesWritten: number;
skolemizedBlankNodes?: number;
}> {
return this.post('/api/shared-memory/write', { contextGraphId, quads });
return this.post('/api/shared-memory/write', {
contextGraphId,
quads,
...(subGraphName ? { subGraphName } : {}),
});
}

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { registerNodeOpsCommands } from './commands/node-ops.js';
import { registerQueryCatalogCommand } from './commands/query-catalog.js';
import { registerMaintenanceCommands } from './commands/maintenance.js';
import { registerRandomSamplingCommand } from './commands/random-sampling.js';
import { registerOkfCommand } from './commands/okf.js';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Bug: The top-level OKF import is not covered by the runtime build graph

What's wrong
This adds a required startup dependency for the whole CLI, but the existing runtime build path still omits the new workspace package. That can make the packaged or auto-updated CLI fail to build or fail to start, even for unrelated commands.

Example
On a fresh source/runtime build that runs the existing build:runtime:packages path, packages/okf/dist/index.js is not produced. Starting node packages/cli/dist/cli.js status can fail before command dispatch because commands/okf.js imports @origintrail-official/dkg-okf.

Suggested direction
Wire @origintrail-official/dkg-okf into the same build paths as dkg-epcis before loading the command from the CLI entrypoint.

For Agents
Add the new OKF package to the CLI build graph: include it in packages/cli/tsconfig.json references/prebuild as needed and in the root runtime package build filter used by auto-update/release builds. Prove a clean runtime build can execute a non-OKF command and dkg okf --help.


const program = new Command();
program
Expand Down Expand Up @@ -56,6 +57,7 @@ registerNodeOpsCommands(program);
registerQueryCatalogCommand(program);
registerMaintenanceCommands(program);
registerRandomSamplingCommand(program);
registerOkfCommand(program);

// ─── dkg integration ─────────────────────────────────────────────────

Expand Down
827 changes: 827 additions & 0 deletions packages/cli/src/commands/okf.ts

Large diffs are not rendered by default.

Loading
Loading