@kjerneverk/riotplan 1.0.7-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,96 @@
1
+ {
2
+ "name": "@kjerneverk/riotplan",
3
+ "version": "1.0.7-dev.0",
4
+ "description": "Framework for long-lived, stateful AI workflows (plans)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "riotplan": "./dist/bin.js",
10
+ "riotplan-mcp": "./dist/mcp-server.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ }
17
+ },
18
+ "engines": {
19
+ "node": ">=24.0.0"
20
+ },
21
+ "scripts": {
22
+ "clean": "rm -rf dist",
23
+ "build": "vite build && node scripts/build-mcp.js && chmod 755 ./dist/mcp-server.js 2>/dev/null || true",
24
+ "test": "vitest run --coverage",
25
+ "test:coverage": "vitest run --coverage",
26
+ "lint": "eslint src",
27
+ "precommit": "npm run build && npm run lint && npm run test",
28
+ "prepublishOnly": "npm run clean && npm run build",
29
+ "mcp:build": "vite build && chmod 755 ./dist/mcp-server.js 2>/dev/null || true",
30
+ "mcp:inspect": "mcp-inspector npx -y @kjerneverk/riotplan",
31
+ "docs:dev": "cd docs && cp ../README.md public/ && npm install && npm run dev",
32
+ "docs:build": "cd docs && cp ../README.md public/ && npm install && npm run build",
33
+ "docs:preview": "cd docs && npm run preview",
34
+ "docs:test": "cd docs && npm run test",
35
+ "docs:coverage": "cd docs && npm run coverage"
36
+ },
37
+ "keywords": [
38
+ "plan",
39
+ "workflow",
40
+ "ai",
41
+ "stateful",
42
+ "llm",
43
+ "prompts",
44
+ "execution"
45
+ ],
46
+ "author": "Tim O'Brien <tobrien@discursive.com>",
47
+ "license": "Apache-2.0",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/kjerneverk/riotplan"
51
+ },
52
+ "dependencies": {
53
+ "@modelcontextprotocol/sdk": "^1.25.3",
54
+ "@utilarium/cardigantime": "^0.0.24",
55
+ "@types/inquirer": "^9.0.9",
56
+ "chalk": "^5.4.1",
57
+ "commander": "^14.0.2",
58
+ "inquirer": "^13.2.1",
59
+ "js-yaml": "^4.1.1",
60
+ "marked": "^17.0.1",
61
+ "zod": "^4.3.6"
62
+ },
63
+ "peerDependencies": {
64
+ "@kjerneverk/agentic": "^1.0.4",
65
+ "@kjerneverk/execution": "^1.0.1",
66
+ "@kjerneverk/riotprompt": "^1.0.5"
67
+ },
68
+ "peerDependenciesMeta": {
69
+ "@kjerneverk/agentic": {
70
+ "optional": true
71
+ },
72
+ "@kjerneverk/execution": {
73
+ "optional": true
74
+ },
75
+ "@kjerneverk/riotprompt": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "devDependencies": {
80
+ "@eslint/eslintrc": "^3.3.1",
81
+ "@eslint/js": "^9.28.0",
82
+ "@types/js-yaml": "^4.0.9",
83
+ "@types/node": "^24.10.9",
84
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
85
+ "@typescript-eslint/parser": "^8.34.0",
86
+ "@vitest/coverage-v8": "^4.0.17",
87
+ "ajv": "^8.17.1",
88
+ "eslint": "^9.28.0",
89
+ "eslint-plugin-import": "^2.31.0",
90
+ "globals": "^17.0.0",
91
+ "typescript": "^5.8.3",
92
+ "vite": "^7.0.4",
93
+ "vite-plugin-dts": "^4.5.4",
94
+ "vitest": "^4.0.17"
95
+ }
96
+ }
package/package.json~ ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@riotprompt/riotplan",
3
+ "version": "0.0.5-dev.0",
4
+ "description": "Framework for long-lived, stateful AI workflows (plans)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "riotplan": "./dist/bin.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "engines": {
18
+ "node": ">=24.0.0"
19
+ },
20
+ "scripts": {
21
+ "clean": "rm -rf dist",
22
+ "build": "vite build",
23
+ "test": "vitest run --coverage",
24
+ "test:coverage": "vitest run --coverage",
25
+ "lint": "eslint src",
26
+ "precommit": "npm run build && npm run lint && npm run test",
27
+ "prepublishOnly": "npm run clean && npm run build"
28
+ },
29
+ "keywords": [
30
+ "plan",
31
+ "workflow",
32
+ "ai",
33
+ "stateful",
34
+ "llm",
35
+ "prompts",
36
+ "execution"
37
+ ],
38
+ "author": "Tim O'Brien <tobrien@discursive.com>",
39
+ "license": "Apache-2.0",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/kjerneverk/riotplan"
43
+ },
44
+ "dependencies": {
45
+ "@theunwalked/cardigantime": "^0.0.22",
46
+ "@types/inquirer": "^9.0.9",
47
+ "chalk": "^5.4.1",
48
+ "commander": "^14.0.2",
49
+ "inquirer": "^13.2.1",
50
+ "js-yaml": "^4.1.1",
51
+ "marked": "^16.0.0"
52
+ },
53
+ "peerDependencies": {
54
+ "@riotprompt/agentic": "^1.0.0",
55
+ "@riotprompt/execution": "^1.0.0",
56
+ "@riotprompt/riotprompt": "^1.0.0"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "@riotprompt/agentic": {
60
+ "optional": true
61
+ },
62
+ "@riotprompt/execution": {
63
+ "optional": true
64
+ },
65
+ "@riotprompt/riotprompt": {
66
+ "optional": true
67
+ }
68
+ },
69
+ "devDependencies": {
70
+ "@eslint/eslintrc": "^3.3.1",
71
+ "@eslint/js": "^9.28.0",
72
+ "@types/js-yaml": "^4.0.9",
73
+ "@types/node": "^22.15.30",
74
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
75
+ "@typescript-eslint/parser": "^8.34.0",
76
+ "@vitest/coverage-v8": "^3.2.4",
77
+ "eslint": "^9.28.0",
78
+ "eslint-plugin-import": "^2.31.0",
79
+ "globals": "^16.2.0",
80
+ "typescript": "^5.8.3",
81
+ "vite": "^7.0.4",
82
+ "vite-plugin-dts": "^4.5.4",
83
+ "vitest": "^3.2.4"
84
+ }
85
+ }
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Build script for MCP server
4
+ *
5
+ * This script bundles the MCP server into a single executable file
6
+ * and copies the prompt markdown files to the dist directory.
7
+ */
8
+
9
+ import { build } from 'vite';
10
+ import { resolve, dirname } from 'node:path';
11
+ import { fileURLToPath } from 'node:url';
12
+ import { copyFileSync, mkdirSync, readdirSync, statSync } from 'node:fs';
13
+
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = dirname(__filename);
16
+ const rootDir = resolve(__dirname, '..');
17
+
18
+ async function buildMcpServer() {
19
+ console.log('Building MCP server...');
20
+
21
+ await build({
22
+ configFile: false,
23
+ build: {
24
+ lib: {
25
+ entry: resolve(rootDir, 'src/mcp/server.ts'),
26
+ formats: ['es'],
27
+ fileName: () => 'mcp-server.js',
28
+ },
29
+ outDir: resolve(rootDir, 'dist'),
30
+ emptyOutDir: false,
31
+ rollupOptions: {
32
+ external: [
33
+ '@modelcontextprotocol/sdk',
34
+ '@modelcontextprotocol/sdk/server/mcp.js',
35
+ '@modelcontextprotocol/sdk/server/stdio.js',
36
+ 'zod',
37
+ '@kjerneverk/execution',
38
+ '@kjerneverk/execution-anthropic',
39
+ '@kjerneverk/execution-openai',
40
+ '@kjerneverk/execution-gemini',
41
+ '@kjerneverk/riotprompt',
42
+ '@kjerneverk/agentic',
43
+ /^node:/,
44
+ ],
45
+ },
46
+ },
47
+ });
48
+
49
+ console.log('MCP server built successfully');
50
+ }
51
+
52
+ function copyPrompts() {
53
+ console.log('Copying prompt files...');
54
+
55
+ const promptsDir = resolve(rootDir, 'src/mcp/prompts');
56
+ const distPromptsDir = resolve(rootDir, 'dist/mcp/prompts');
57
+
58
+ // Create dist prompts directory
59
+ mkdirSync(distPromptsDir, { recursive: true });
60
+
61
+ // Copy all .md files
62
+ const files = readdirSync(promptsDir);
63
+ for (const file of files) {
64
+ const filePath = resolve(promptsDir, file);
65
+ const stat = statSync(filePath);
66
+
67
+ if (stat.isFile() && file.endsWith('.md')) {
68
+ const destPath = resolve(distPromptsDir, file);
69
+ copyFileSync(filePath, destPath);
70
+ console.log(` Copied ${file}`);
71
+ }
72
+ }
73
+
74
+ console.log('Prompt files copied successfully');
75
+ }
76
+
77
+ async function main() {
78
+ try {
79
+ await buildMcpServer();
80
+ copyPrompts();
81
+ console.log('MCP build complete!');
82
+ } catch (error) {
83
+ console.error('MCP build failed:', error);
84
+ process.exit(1);
85
+ }
86
+ }
87
+
88
+ main();