@konductro/codex-plugin 2.0.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.
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "konductro",
3
+ "version": "2.0.0",
4
+ "description": "Konductro platform integration for Codex: technical analysis, story decomposition, ticket delivery, repository profiling, and UX prototype workflows.",
5
+ "author": {
6
+ "name": "Konductro",
7
+ "email": "npm@konductro.com",
8
+ "url": "https://konductro.com"
9
+ },
10
+ "homepage": "https://konductro.com",
11
+ "repository": "https://www.npmjs.com/package/@konductro/codex-plugin",
12
+ "license": "UNLICENSED",
13
+ "keywords": [
14
+ "konductro",
15
+ "mcp",
16
+ "delivery",
17
+ "technical-analysis",
18
+ "tickets",
19
+ "prototype"
20
+ ],
21
+ "skills": "./skills/",
22
+ "mcpServers": "./.mcp.json",
23
+ "interface": {
24
+ "displayName": "Konductro",
25
+ "shortDescription": "Plan, decompose, profile, prototype, and deliver Konductro work from Codex.",
26
+ "longDescription": "Konductro for Codex connects Codex to the Konductro platform through an MCP server and guided skills. It supports technical analysis assignments, story decomposition, ticket context and PR workflows, repository profiling, prototype discovery, and prototype publishing.",
27
+ "developerName": "Konductro",
28
+ "category": "Productivity",
29
+ "capabilities": [
30
+ "MCP tools",
31
+ "Guided workflows",
32
+ "Repository analysis",
33
+ "Ticket delivery"
34
+ ],
35
+ "websiteURL": "https://konductro.com",
36
+ "defaultPrompt": [
37
+ "What Konductro tickets are assigned to me?",
38
+ "Run a Konductro technical analysis.",
39
+ "Profile this repository for Konductro."
40
+ ],
41
+ "brandColor": "#2563EB",
42
+ "screenshots": []
43
+ }
44
+ }
package/.mcp.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "konductro": {
4
+ "command": "node",
5
+ "args": ["./servers/konductro-api.js"],
6
+ "cwd": "."
7
+ }
8
+ }
9
+ }
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ # @konductro/codex-plugin
2
+
3
+ Codex plugin for the Konductro platform. It enables technical analysis, story decomposition, ticket management, repository profiling, prototype delivery, and ticket-to-PR workflows directly from Codex.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js 18+
8
+ - Codex
9
+ - A Konductro account with project access
10
+ - A personal CLI token from Konductro -> Settings -> CLI Access
11
+
12
+ ## Install the Plugin
13
+
14
+ The Konductro plugins are published to the public npm registry under the `@konductro` scope. No registry configuration or authentication is required.
15
+
16
+ For Codex:
17
+
18
+ ```bash
19
+ npm install -g @konductro/codex-plugin
20
+ ```
21
+
22
+ ## Generate a CLI Token
23
+
24
+ 1. Open Konductro and navigate to your profile settings.
25
+ 2. Under CLI Tokens, click Generate Token.
26
+ 3. Give it a descriptive name, for example `MacBook - Codex`.
27
+ 4. Copy the token. It is shown only once.
28
+
29
+ ## Configure the Plugin
30
+
31
+ Run the setup command with your Konductro platform URL and CLI token:
32
+
33
+ ```bash
34
+ konductro-codex-setup --url https://platform.konductro.com --token <your-cli-token>
35
+ ```
36
+
37
+ Replace `<your-cli-token>` with the token you copied in the previous step. If your organisation uses a self-hosted instance, replace the URL accordingly.
38
+
39
+ The setup command:
40
+
41
+ - Stores the connection configuration in `~/.codex/konductro.json`
42
+ - Registers the plugin in `~/.agents/plugins/marketplace.json`
43
+ - Enables the plugin in `~/.codex/config.toml`
44
+ - Copies the plugin runtime to `~/plugins/konductro`
45
+
46
+ Restart Codex after setup so the Konductro MCP tools and skills are discovered.
47
+
48
+ ## Verify the Connection
49
+
50
+ After setup, ask Codex to list your assigned Konductro tickets:
51
+
52
+ ```text
53
+ What Konductro tickets are assigned to me?
54
+ ```
55
+
56
+ If Codex can call the Konductro tools and returns your assigned work, you are connected.
57
+
58
+ ## Skills
59
+
60
+ Skills are guided, multi-step workflows invoked by asking Codex naturally:
61
+
62
+ | Skill | Description |
63
+ |---|---|
64
+ | `konductro-technical-analysis` | Perform a full codebase analysis for a Konductro project phase |
65
+ | `konductro-decompose` | Decompose a story into technical tasks by exploring the codebase |
66
+ | `konductro-prototype` | Build, publish, and submit a UX prototype |
67
+ | `konductro-find-prototype` | Find and download approved UX prototypes for the current project |
68
+ | `konductro-profile-repository` | Scan the current repo and submit its profile to Konductro |
69
+ | `konductro-start-ticket` | Pick up an assigned ticket and start work |
70
+
71
+ ## Tools
72
+
73
+ Tools are called automatically by Codex based on natural language. You do not invoke them directly.
74
+
75
+ ### Tickets and Delivery
76
+
77
+ | Tool | What it does |
78
+ |---|---|
79
+ | `list_my_tickets` | List tickets assigned to you with status, project, sprint, and branch info |
80
+ | `get_ticket_context` | Load full ticket context: acceptance criteria, notes, parent story, repo, and artefacts |
81
+ | `start_work` | Start work on a ticket: creates a branch, pushes the ticket spec, and sets `in_progress` |
82
+ | `create_pr` | Create a pull request and move the ticket to `pr_open` |
83
+
84
+ ### Technical Analysis
85
+
86
+ | Tool | What it does |
87
+ |---|---|
88
+ | `list_tech_analysis_tasks` | List your pending technical analysis assignments |
89
+ | `get_task_context` | Load requirements and project context for a technical analysis task |
90
+ | `submit_tech_analysis` | Submit your analysis document back to Konductro |
91
+
92
+ ### Story Decomposition
93
+
94
+ | Tool | What it does |
95
+ |---|---|
96
+ | `list_decomposition_tasks` | List your pending story decomposition assignments |
97
+ | `get_decomposition_context` | Load story details, requirements, architecture, and repositories |
98
+ | `submit_decomposition_task` | Submit one decomposed technical task |
99
+ | `complete_decomposition` | Mark decomposition as complete after all tasks are submitted |
100
+
101
+ ### Prototype Delivery
102
+
103
+ | Tool | What it does |
104
+ |---|---|
105
+ | `find_project_prototypes` | Find published prototypes by matching the git remote URL |
106
+ | `list_prototype_tasks` | List your pending prototype build assignments |
107
+ | `get_prototype_context` | Load engagement details, design system, approved docs, and preview HTML |
108
+ | `start_prototype_work` | Mark a prototype task as in progress |
109
+ | `request_upload_credentials` | Get temporary S3 credentials for prototype upload |
110
+ | `submit_prototype` | Submit the published prototype back to Konductro |
111
+
112
+ ### Repository Profiling
113
+
114
+ | Tool | What it does |
115
+ |---|---|
116
+ | `profile_repository` | Submit a repository profile: tech stack, APIs, dependencies, and events |
117
+
118
+ ## Updating
119
+
120
+ Update to the latest version the same way you installed:
121
+
122
+ ```bash
123
+ npm install -g @konductro/codex-plugin@latest
124
+ konductro-codex-setup --url https://platform.konductro.com --token <your-cli-token>
125
+ ```
126
+
127
+ Restart Codex after updating.
128
+
129
+ ## Troubleshooting
130
+
131
+ | Problem | Solution |
132
+ |---|---|
133
+ | `EACCES` permission error | Use `sudo` or fix npm global permissions |
134
+ | Token rejected | Verify the token has not been revoked in Konductro settings |
135
+ | Plugin not recognised by Codex | Restart Codex after setup |
136
+ | Tools are not available | Confirm `~/.codex/config.toml` contains `konductro@local-konductro` with `enabled = true` |
137
+ | Connection timeout | Check that `platform.konductro.com` is reachable from your network |
138
+
139
+ ## Local Development
140
+
141
+ ```bash
142
+ npm install
143
+ npm run check
144
+ npm pack --dry-run
145
+ ```
146
+
147
+ To test setup from a local checkout:
148
+
149
+ ```bash
150
+ npm run setup -- --url https://platform.konductro.com --token <your-cli-token>
151
+ ```
152
+
153
+ ## Publish
154
+
155
+ For Konductro maintainers:
156
+
157
+ ```bash
158
+ npm login
159
+ npm publish --access public
160
+ ```
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+
3
+ console.log('');
4
+ console.log('Konductro Codex plugin installed');
5
+ console.log('');
6
+ console.log('Configure it with:');
7
+ console.log(' konductro-codex-setup --url <URL> --token <TOKEN>');
8
+ console.log('');
9
+ console.log('Get your CLI token from Konductro -> Settings -> CLI Access.');
10
+ console.log('Restart Codex after setup so the plugin tools and skills are discovered.');
11
+ console.log('');
package/bin/setup.js ADDED
@@ -0,0 +1,221 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { cpSync, chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs';
4
+ import { homedir } from 'os';
5
+ import { dirname, join, relative, resolve } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+ import { spawnSync } from 'child_process';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+ const pluginRoot = resolve(__dirname, '..');
12
+
13
+ function parseArgs(args) {
14
+ const parsed = {};
15
+ for (let i = 0; i < args.length; i++) {
16
+ const arg = args[i];
17
+ if (arg === '--url' && args[i + 1]) {
18
+ parsed.url = args[++i].replace(/\/$/, '');
19
+ } else if (arg === '--token' && args[i + 1]) {
20
+ parsed.token = args[++i];
21
+ } else if (arg === '--skip-plugin-install') {
22
+ parsed.skipPluginInstall = true;
23
+ } else if (arg === '--help' || arg === '-h') {
24
+ parsed.help = true;
25
+ }
26
+ }
27
+ return parsed;
28
+ }
29
+
30
+ function printHelp() {
31
+ console.log(`
32
+ Konductro Codex Plugin Setup
33
+
34
+ Usage:
35
+ konductro-codex-setup --url <konductro-url> --token <cli-token>
36
+ npx @konductro/codex-plugin --url <konductro-url> --token <cli-token>
37
+ npm run setup -- --url <konductro-url> --token <cli-token>
38
+
39
+ Options:
40
+ --url Konductro platform URL
41
+ --token Personal CLI token from Konductro Settings -> CLI Access
42
+ --skip-plugin-install Only write ~/.codex/konductro.json; do not install or enable the Codex plugin
43
+ --help Show this help message
44
+
45
+ Example:
46
+ konductro-codex-setup --url https://platform.konductro.com --token <your-cli-token>
47
+ `);
48
+ }
49
+
50
+ function samePath(a, b) {
51
+ return resolve(a) === resolve(b);
52
+ }
53
+
54
+ function copyPlugin(destination) {
55
+ if (samePath(pluginRoot, destination)) return;
56
+ rmSync(destination, { recursive: true, force: true });
57
+ mkdirSync(dirname(destination), { recursive: true });
58
+ cpSync(pluginRoot, destination, {
59
+ recursive: true,
60
+ filter: (source) => {
61
+ const rel = relative(pluginRoot, source);
62
+ if (!rel) return true;
63
+ const parts = rel.split('/');
64
+ const basename = parts[parts.length - 1];
65
+ return !parts.includes('node_modules')
66
+ && !parts.includes('.git')
67
+ && !basename.endsWith('.tgz')
68
+ && basename !== '.npmrc';
69
+ },
70
+ });
71
+ }
72
+
73
+ function updateMarketplace() {
74
+ const marketplaceDir = join(homedir(), '.agents', 'plugins');
75
+ const marketplacePath = join(marketplaceDir, 'marketplace.json');
76
+ mkdirSync(marketplaceDir, { recursive: true });
77
+
78
+ let marketplace = {
79
+ name: 'local',
80
+ interface: { displayName: 'Local Plugins' },
81
+ plugins: [],
82
+ };
83
+
84
+ if (existsSync(marketplacePath)) {
85
+ try {
86
+ marketplace = JSON.parse(readFileSync(marketplacePath, 'utf8'));
87
+ } catch {
88
+ console.warn(`Warning: Could not parse ${marketplacePath}; replacing it with a new local marketplace.`);
89
+ }
90
+ }
91
+
92
+ if (!marketplace.name) marketplace.name = 'local';
93
+ if (!marketplace.interface) marketplace.interface = { displayName: 'Local Plugins' };
94
+ if (!Array.isArray(marketplace.plugins)) marketplace.plugins = [];
95
+
96
+ const entry = {
97
+ name: 'konductro',
98
+ source: {
99
+ source: 'local',
100
+ path: './plugins/konductro',
101
+ },
102
+ policy: {
103
+ installation: 'AVAILABLE',
104
+ authentication: 'ON_INSTALL',
105
+ },
106
+ category: 'Productivity',
107
+ };
108
+
109
+ const index = marketplace.plugins.findIndex((plugin) => plugin.name === 'konductro');
110
+ if (index === -1) {
111
+ marketplace.plugins.push(entry);
112
+ } else {
113
+ marketplace.plugins[index] = entry;
114
+ }
115
+
116
+ writeFileSync(marketplacePath, `${JSON.stringify(marketplace, null, 2)}\n`);
117
+ return marketplacePath;
118
+ }
119
+
120
+ function upsertTomlBlock(source, header, body) {
121
+ const block = `${header}\n${body.trimEnd()}\n`;
122
+ const escapedHeader = header.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
123
+ const pattern = new RegExp(`(^|\\n)${escapedHeader}\\n[\\s\\S]*?(?=\\n\\[|$)`);
124
+
125
+ if (pattern.test(source)) {
126
+ return source.replace(pattern, (match, prefix) => `${prefix}${block.trimEnd()}`);
127
+ }
128
+
129
+ const separator = source.trim() ? '\n\n' : '';
130
+ return `${source.trimEnd()}${separator}${block}`;
131
+ }
132
+
133
+ function updateCodexConfig() {
134
+ const codexDir = join(homedir(), '.codex');
135
+ const codexConfigPath = join(codexDir, 'config.toml');
136
+ mkdirSync(codexDir, { recursive: true });
137
+
138
+ let config = '';
139
+ if (existsSync(codexConfigPath)) {
140
+ config = readFileSync(codexConfigPath, 'utf8');
141
+ }
142
+
143
+ config = upsertTomlBlock(
144
+ config,
145
+ '[marketplaces.local-konductro]',
146
+ [
147
+ `last_updated = ${JSON.stringify(new Date().toISOString())}`,
148
+ 'source_type = "local"',
149
+ `source = ${JSON.stringify(homedir())}`,
150
+ ].join('\n'),
151
+ );
152
+
153
+ config = upsertTomlBlock(
154
+ config,
155
+ '[plugins."konductro@local-konductro"]',
156
+ 'enabled = true',
157
+ );
158
+
159
+ writeFileSync(codexConfigPath, `${config.trimEnd()}\n`);
160
+ return codexConfigPath;
161
+ }
162
+
163
+ function installDependencies(pluginPath) {
164
+ const packageJson = join(pluginPath, 'package.json');
165
+ if (!existsSync(packageJson)) return;
166
+ const result = spawnSync('npm', ['install', '--omit=dev', '--ignore-scripts', '--silent'], {
167
+ cwd: pluginPath,
168
+ stdio: 'inherit',
169
+ });
170
+ if (result.status !== 0) {
171
+ console.warn('Warning: npm install failed. Run `npm install` inside the installed plugin directory before using the MCP server.');
172
+ }
173
+ }
174
+
175
+ function main() {
176
+ const args = parseArgs(process.argv.slice(2));
177
+
178
+ if (args.help) {
179
+ printHelp();
180
+ process.exit(0);
181
+ }
182
+
183
+ if (!args.url || !args.token) {
184
+ console.error('Error: Both --url and --token are required.\n');
185
+ printHelp();
186
+ process.exit(1);
187
+ }
188
+
189
+ const codexDir = join(homedir(), '.codex');
190
+ mkdirSync(codexDir, { recursive: true });
191
+
192
+ const configPath = join(codexDir, 'konductro.json');
193
+ writeFileSync(configPath, `${JSON.stringify({ url: args.url, token: args.token }, null, 2)}\n`, { mode: 0o600 });
194
+ chmodSync(configPath, 0o600);
195
+
196
+ let installedPluginPath = pluginRoot;
197
+ let marketplacePath = null;
198
+ let codexConfigPath = null;
199
+
200
+ if (!args.skipPluginInstall) {
201
+ installedPluginPath = join(homedir(), 'plugins', 'konductro');
202
+ copyPlugin(installedPluginPath);
203
+ installDependencies(installedPluginPath);
204
+ marketplacePath = updateMarketplace();
205
+ codexConfigPath = updateCodexConfig();
206
+ }
207
+
208
+ console.log('');
209
+ console.log('Konductro plugin configured for Codex');
210
+ console.log('');
211
+ console.log(` Config: ${configPath}`);
212
+ console.log(` Plugin: ${installedPluginPath}`);
213
+ if (marketplacePath) console.log(` Marketplace: ${marketplacePath}`);
214
+ if (codexConfigPath) console.log(` Codex config: ${codexConfigPath}`);
215
+ console.log(` Konductro: ${args.url}`);
216
+ console.log('');
217
+ console.log('Restart Codex after installing the plugin so the Konductro MCP tools and skills are discovered.');
218
+ console.log('');
219
+ }
220
+
221
+ main();
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@konductro/codex-plugin",
3
+ "version": "2.0.0",
4
+ "description": "Codex plugin for the Konductro platform: technical analysis, delivery tasks, repository profiling, and prototype workflows.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "homepage": "https://platform.konductro.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+ssh://git@ssh.dev.azure.com:v3/idealsolution/Conductor/konductro-codex-plugin"
11
+ },
12
+ "keywords": [
13
+ "codex",
14
+ "konductro",
15
+ "mcp",
16
+ "technical-analysis",
17
+ "delivery",
18
+ "tickets",
19
+ "prototype"
20
+ ],
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "bin": {
25
+ "konductro-codex-setup": "bin/setup.js"
26
+ },
27
+ "files": [
28
+ ".codex-plugin/",
29
+ ".mcp.json",
30
+ "bin/",
31
+ "servers/",
32
+ "skills/",
33
+ "README.md"
34
+ ],
35
+ "scripts": {
36
+ "postinstall": "node bin/postinstall.js",
37
+ "setup": "node bin/setup.js",
38
+ "check": "node --check servers/konductro-api.js && node --check bin/setup.js && node --check bin/postinstall.js",
39
+ "prepublishOnly": "npm run check"
40
+ },
41
+ "dependencies": {
42
+ "@modelcontextprotocol/sdk": "^1.0.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ }
47
+ }