@aidecisionops/decisionops 0.1.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.
Files changed (40) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +161 -0
  3. package/dist/cli.js +950 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/core/auth.js +422 -0
  6. package/dist/core/auth.js.map +1 -0
  7. package/dist/core/controlPlane.js +103 -0
  8. package/dist/core/controlPlane.js.map +1 -0
  9. package/dist/core/git.js +45 -0
  10. package/dist/core/git.js.map +1 -0
  11. package/dist/core/installer.js +408 -0
  12. package/dist/core/installer.js.map +1 -0
  13. package/dist/core/manifest.js +34 -0
  14. package/dist/core/manifest.js.map +1 -0
  15. package/dist/core/platformCatalog.js +88 -0
  16. package/dist/core/platformCatalog.js.map +1 -0
  17. package/dist/core/platforms.js +88 -0
  18. package/dist/core/platforms.js.map +1 -0
  19. package/dist/core/runtime.js +34 -0
  20. package/dist/core/runtime.js.map +1 -0
  21. package/dist/generate-platform-catalog.js +10 -0
  22. package/dist/generate-platform-catalog.js.map +1 -0
  23. package/dist/platform-catalog.json +145 -0
  24. package/dist/ui/prompts.js +138 -0
  25. package/dist/ui/prompts.js.map +1 -0
  26. package/package.json +67 -0
  27. package/platforms/README.md +133 -0
  28. package/platforms/antigravity.toml +29 -0
  29. package/platforms/claude-code.toml +30 -0
  30. package/platforms/codex.toml +31 -0
  31. package/platforms/cursor.toml +30 -0
  32. package/platforms/vscode.toml +26 -0
  33. package/skills/decision-ops/SKILL.md +88 -0
  34. package/skills/decision-ops/agents/openai.yaml +4 -0
  35. package/skills/decision-ops/evals/evals.json +87 -0
  36. package/skills/decision-ops/evals/trigger-queries.json +108 -0
  37. package/skills/decision-ops/references/decision-ops-manifest.md +35 -0
  38. package/skills/decision-ops/references/decision-register-format.md +36 -0
  39. package/skills/decision-ops/references/mcp-interface.md +100 -0
  40. package/skills/decision-ops/scripts/read-manifest.sh +65 -0
@@ -0,0 +1,88 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import * as TOML from "@iarna/toml";
4
+ import { DEFAULT_PLATFORMS_DIR, expandHome } from "./runtime.js";
5
+ export function formatTemplate(template, context) {
6
+ return template.replace(/\{([^}]+)\}/g, (match, key) => {
7
+ if (!(key in context)) {
8
+ throw new Error(`Missing template variable '${key}' in value: ${template}`);
9
+ }
10
+ return context[key] ?? match;
11
+ });
12
+ }
13
+ export function expandPath(value, context) {
14
+ return expandHome(formatTemplate(value, context));
15
+ }
16
+ export function contextForPaths(skillName, repoPath) {
17
+ return {
18
+ skill_name: skillName,
19
+ repo_path: repoPath ?? "",
20
+ };
21
+ }
22
+ export function loadPlatforms(platformsDir = DEFAULT_PLATFORMS_DIR) {
23
+ const platforms = {};
24
+ for (const entry of fs.readdirSync(platformsDir)) {
25
+ if (!entry.endsWith(".toml")) {
26
+ continue;
27
+ }
28
+ const filePath = path.join(platformsDir, entry);
29
+ const raw = fs.readFileSync(filePath, "utf8");
30
+ const parsed = TOML.parse(raw);
31
+ if (!parsed.id) {
32
+ throw new Error(`Platform file missing id: ${filePath}`);
33
+ }
34
+ if (parsed.id !== path.basename(entry, ".toml")) {
35
+ throw new Error(`Platform id '${parsed.id}' must match filename '${path.basename(entry, ".toml")}': ${filePath}`);
36
+ }
37
+ platforms[parsed.id] = {
38
+ ...parsed,
39
+ __file__: filePath,
40
+ };
41
+ }
42
+ if (Object.keys(platforms).length === 0) {
43
+ throw new Error(`No platform definitions found in ${platformsDir}`);
44
+ }
45
+ return platforms;
46
+ }
47
+ export function selectPlatforms(platforms, selectedIds, capability) {
48
+ const orderedIds = selectedIds && selectedIds.length > 0 ? selectedIds : Object.keys(platforms);
49
+ const missing = orderedIds.filter((platformId) => !platforms[platformId]);
50
+ if (missing.length > 0) {
51
+ throw new Error(`Unknown platform(s): ${missing.join(", ")}`);
52
+ }
53
+ return orderedIds
54
+ .map((platformId) => platforms[platformId])
55
+ .filter((platform) => {
56
+ if (!capability) {
57
+ return true;
58
+ }
59
+ return Boolean(platform[capability]?.supported);
60
+ });
61
+ }
62
+ export function resolveInstallPath(spec, context) {
63
+ if (spec.install_path_env && process.env[spec.install_path_env]) {
64
+ return path.resolve(expandPath(process.env[spec.install_path_env], context));
65
+ }
66
+ if (spec.install_root_env || spec.install_root_default) {
67
+ const rootValue = spec.install_root_env ? process.env[spec.install_root_env] || spec.install_root_default : spec.install_root_default;
68
+ if (!rootValue) {
69
+ return null;
70
+ }
71
+ const rootPath = path.resolve(expandPath(rootValue, context));
72
+ return path.join(rootPath, formatTemplate(spec.install_path_suffix ?? "", context));
73
+ }
74
+ if (spec.install_path_default) {
75
+ if (!context.repo_path && spec.install_path_default.includes("{repo_path}")) {
76
+ return null;
77
+ }
78
+ return path.resolve(expandPath(spec.install_path_default, context));
79
+ }
80
+ return null;
81
+ }
82
+ export function authInstructions(platform, context) {
83
+ if (platform.auth?.mode !== "interactive_handoff") {
84
+ return null;
85
+ }
86
+ return (platform.auth.instructions ?? []).map((step) => formatTemplate(step, context));
87
+ }
88
+ //# sourceMappingURL=platforms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforms.js","sourceRoot":"","sources":["../../src/core/platforms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA8BjE,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAA+B;IAC9E,OAAO,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;QAC7D,IAAI,CAAC,CAAC,GAAG,IAAI,OAAO,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,eAAe,QAAQ,EAAE,CAAC,CAAC;QAC9E,CAA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AAO,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACzF,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import path from "node:path";
3
+ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
4
+ export const PACKAGE_ROOT = path.resolve(moduleDir, "..", "..");
5
+ export const DEFAULT_SKILL_NAME = process.env.SKILL_NAME ?? "decision-ops";
6
+ export const DEFAULT_SOURCE_DIR = process.env.SOURCE_DIR ?? path.join(PACKAGE_ROOT, "skills", DEFAULT_SKILL_NAME);
7
+ export const DEFAULT_OUTPUT_DIR = process.env.OUTPUT_DIR ?? process.env.BUILD_DIR ?? path.join(PACKAGE_ROOT, "build");
8
+ export const DEFAULT_PLATFORMS_DIR = path.join(PACKAGE_ROOT, "platforms");
9
+ export const DEFAULT_PLATFORM_CATALOG_PATH = path.join(PACKAGE_ROOT, "dist", "platform-catalog.json");
10
+ export const DEFAULT_MCP_SERVER_NAME = process.env.MCP_SERVER_NAME ?? "decision-ops-mcp";
11
+ export const DEFAULT_MCP_SERVER_URL = process.env.MCP_SERVER_URL ?? "https://api.aidecisionops.com/mcp";
12
+ export const PLACEHOLDER_ORG_ID = "org_123";
13
+ export const PLACEHOLDER_PROJECT_ID = "proj_456";
14
+ export const PLACEHOLDER_REPO_REF = "owner/repo";
15
+ export function expandHome(input) {
16
+ if (!input.startsWith("~")) {
17
+ return input;
18
+ }
19
+ const home = process.env.HOME ?? process.env.USERPROFILE;
20
+ if (!home) {
21
+ return input;
22
+ }
23
+ if (input === "~") {
24
+ return home;
25
+ }
26
+ if (input.startsWith("~/") || input.startsWith("~\\")) {
27
+ return path.join(home, input.slice(2));
28
+ }
29
+ return input;
30
+ }
31
+ export function decisionopsHome() {
32
+ return expandHome(process.env.DECISIONOPS_HOME ?? "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AAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { writePlatformCatalog } from "./core/platformCatalog.js";
2
+ import { DEFAULT_PLATFORM_CATALOG_PATH, DEFAULT_PLATFORMS_DIR } from "./core/runtime.js";
3
+ function main() {
4
+ const outputPath = process.argv[2] ?? DEFAULT_PLATFORM_CATALOG_PATH;
5
+ const platformsDir = process.argv[3] ?? DEFAULT_PLATFORMS_DIR;
6
+ const writtenPath = writePlatformCatalog(outputPath, platformsDir);
7
+ console.log(`Wrote platform catalog: ${writtenPath}`);
8
+ }
9
+ main();
10
+ //# sourceMappingURL=generate-platform-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-platform-catalog.js","sourceRoot":"","sources":["../src/generate-platform-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEzF,SAAS,IAAI;IACX,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,6BAA6B,CAAC;IACpE,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,qBAAqB,CAAC;IAC9D,MAAM,WAAW,GAAG,oBAAoB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,2BAA2B,WAAW,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,145 @@
1
+ {
2
+ "version": 1,
3
+ "defaults": {
4
+ "skill_name": "decision-ops",
5
+ "mcp_server_name": "decision-ops-mcp",
6
+ "mcp_server_url": "https://api.aidecisionops.com/mcp"
7
+ },
8
+ "platforms": [
9
+ {
10
+ "id": "antigravity",
11
+ "display_name": "Antigravity",
12
+ "platform_definition": "platforms/antigravity.toml",
13
+ "skill": {
14
+ "supported": true
15
+ },
16
+ "mcp": {
17
+ "supported": true,
18
+ "scope": "user",
19
+ "config_path_template": "{ANTIGRAVITY_MCP_CONFIG_PATH}",
20
+ "config_path_env": "ANTIGRAVITY_MCP_CONFIG_PATH"
21
+ },
22
+ "auth": {
23
+ "mode": "interactive_handoff",
24
+ "instructions": [
25
+ "Open Antigravity MCP settings and verify server 'decision-ops-mcp' exists at 'https://api.aidecisionops.com/mcp'.",
26
+ "Invoke any Decision Ops MCP tool to trigger interactive login/consent.",
27
+ "Complete the prompted authentication flow, then retry the same MCP tool call."
28
+ ]
29
+ },
30
+ "default_server": {
31
+ "name": "decision-ops-mcp",
32
+ "url": "https://api.aidecisionops.com/mcp"
33
+ },
34
+ "cli_install_template": "npx --yes @aidecisionops/decisionops@latest install --platform antigravity --repo-path {repo_path} --org-id {org_id} --project-id {project_id} --repo-ref {repo_ref}"
35
+ },
36
+ {
37
+ "id": "claude-code",
38
+ "display_name": "Claude Code",
39
+ "platform_definition": "platforms/claude-code.toml",
40
+ "skill": {
41
+ "supported": true
42
+ },
43
+ "mcp": {
44
+ "supported": true,
45
+ "scope": "project",
46
+ "config_path_template": "{repo_path}/.mcp.json",
47
+ "config_path_env": "CLAUDE_MCP_CONFIG_PATH"
48
+ },
49
+ "auth": {
50
+ "mode": "interactive_handoff",
51
+ "instructions": [
52
+ "Open Claude Code MCP settings and verify server 'decision-ops-mcp' exists at 'https://api.aidecisionops.com/mcp'.",
53
+ "Invoke any Decision Ops MCP tool to trigger interactive login/consent.",
54
+ "Complete the prompted authentication flow, then retry the same MCP tool call."
55
+ ]
56
+ },
57
+ "default_server": {
58
+ "name": "decision-ops-mcp",
59
+ "url": "https://api.aidecisionops.com/mcp"
60
+ },
61
+ "cli_install_template": "npx --yes @aidecisionops/decisionops@latest install --platform claude-code --repo-path {repo_path} --org-id {org_id} --project-id {project_id} --repo-ref {repo_ref}"
62
+ },
63
+ {
64
+ "id": "codex",
65
+ "display_name": "Codex",
66
+ "platform_definition": "platforms/codex.toml",
67
+ "skill": {
68
+ "supported": true
69
+ },
70
+ "mcp": {
71
+ "supported": true,
72
+ "scope": "user",
73
+ "config_path_template": "~/.codex/config.toml",
74
+ "config_path_env": "CODEX_CONFIG_PATH"
75
+ },
76
+ "auth": {
77
+ "mode": "interactive_handoff",
78
+ "instructions": [
79
+ "Open Codex MCP settings and verify server 'decision-ops-mcp' exists at 'https://api.aidecisionops.com/mcp'.",
80
+ "Invoke any Decision Ops MCP tool to trigger interactive login/consent.",
81
+ "Complete the prompted authentication flow, then retry the same MCP tool call."
82
+ ]
83
+ },
84
+ "default_server": {
85
+ "name": "decision-ops-mcp",
86
+ "url": "https://api.aidecisionops.com/mcp"
87
+ },
88
+ "cli_install_template": "npx --yes @aidecisionops/decisionops@latest install --platform codex --repo-path {repo_path} --org-id {org_id} --project-id {project_id} --repo-ref {repo_ref}"
89
+ },
90
+ {
91
+ "id": "cursor",
92
+ "display_name": "Cursor",
93
+ "platform_definition": "platforms/cursor.toml",
94
+ "skill": {
95
+ "supported": true
96
+ },
97
+ "mcp": {
98
+ "supported": true,
99
+ "scope": "project",
100
+ "config_path_template": "{repo_path}/.cursor/mcp.json",
101
+ "config_path_env": "CURSOR_MCP_CONFIG_PATH"
102
+ },
103
+ "auth": {
104
+ "mode": "interactive_handoff",
105
+ "instructions": [
106
+ "Open Cursor MCP settings and verify server 'decision-ops-mcp' exists at 'https://api.aidecisionops.com/mcp'.",
107
+ "Invoke any Decision Ops MCP tool to trigger interactive login/consent.",
108
+ "Complete the prompted authentication flow, then retry the same MCP tool call."
109
+ ]
110
+ },
111
+ "default_server": {
112
+ "name": "decision-ops-mcp",
113
+ "url": "https://api.aidecisionops.com/mcp"
114
+ },
115
+ "cli_install_template": "npx --yes @aidecisionops/decisionops@latest install --platform cursor --repo-path {repo_path} --org-id {org_id} --project-id {project_id} --repo-ref {repo_ref}"
116
+ },
117
+ {
118
+ "id": "vscode",
119
+ "display_name": "VS Code",
120
+ "platform_definition": "platforms/vscode.toml",
121
+ "skill": {
122
+ "supported": false
123
+ },
124
+ "mcp": {
125
+ "supported": true,
126
+ "scope": "project",
127
+ "config_path_template": "{repo_path}/.vscode/mcp.json",
128
+ "config_path_env": "VSCODE_MCP_CONFIG_PATH"
129
+ },
130
+ "auth": {
131
+ "mode": "interactive_handoff",
132
+ "instructions": [
133
+ "Open VS Code MCP settings and verify server 'decision-ops-mcp' exists at 'https://api.aidecisionops.com/mcp'.",
134
+ "Invoke any Decision Ops MCP tool to trigger interactive login/consent.",
135
+ "Complete the prompted authentication flow, then retry the same MCP tool call."
136
+ ]
137
+ },
138
+ "default_server": {
139
+ "name": "decision-ops-mcp",
140
+ "url": "https://api.aidecisionops.com/mcp"
141
+ },
142
+ "cli_install_template": "npx --yes @aidecisionops/decisionops@latest install --platform vscode --repo-path {repo_path} --org-id {org_id} --project-id {project_id} --repo-ref {repo_ref}"
143
+ }
144
+ ]
145
+ }
@@ -0,0 +1,138 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useState } from "react";
3
+ import { Box, render, Text, useInput } from "ink";
4
+ function Keycap(props) {
5
+ return (_jsx(Box, { borderStyle: "round", borderColor: "gray", paddingX: 1, marginRight: 1, children: _jsx(Text, { color: "white", children: props.children }) }));
6
+ }
7
+ function KeyboardHints(props) {
8
+ return (_jsx(Box, { marginTop: 1, flexWrap: "wrap", children: props.items.map((item) => (_jsx(Keycap, { children: item }, item))) }));
9
+ }
10
+ function BrandHeader(props) {
11
+ return (_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Box, { children: [_jsx(Text, { color: "cyanBright", bold: true, children: "DecisionOps" }), _jsx(Text, { color: "gray", children: " CLI" })] }), props.eyebrow ? (_jsx(Box, { borderStyle: "round", borderColor: "cyan", paddingX: 1, children: _jsx(Text, { color: "cyan", children: props.eyebrow }) })) : null] }));
12
+ }
13
+ function Frame(props) {
14
+ return (_jsxs(Box, { flexDirection: "column", width: 76, children: [_jsx(BrandHeader, { eyebrow: props.chrome?.eyebrow }), _jsxs(Box, { marginTop: 1, borderStyle: "round", borderColor: "cyan", flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsx(Text, { color: "white", bold: true, children: props.title }), props.chrome?.description ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: props.chrome.description }) })) : null, _jsx(Box, { marginTop: 1, flexDirection: "column", children: props.children }), props.chrome?.footer ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: props.chrome.footer }) })) : null] }), _jsx(KeyboardHints, { items: props.hintKeys })] }));
15
+ }
16
+ function OptionRow(props) {
17
+ return (_jsxs(Box, { borderStyle: "round", borderColor: props.selected ? "cyan" : "gray", paddingX: 1, marginBottom: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: props.selected ? "cyanBright" : "gray", children: props.selected ? "●" : "○" }), _jsxs(Text, { color: props.selected ? "white" : undefined, bold: props.selected, children: [" ", props.label] })] }), props.description ? (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "gray", children: props.description }) })) : null] }));
18
+ }
19
+ function FrameInput(props) {
20
+ return (_jsxs(Box, { borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Text, { color: "cyanBright", children: ">" }), _jsx(Text, { children: " " }), props.children] }));
21
+ }
22
+ function SelectPrompt(props) {
23
+ const [index, setIndex] = useState(0);
24
+ const selected = props.options[index];
25
+ useInput((_, key) => {
26
+ if (key.upArrow) {
27
+ setIndex((current) => (current === 0 ? props.options.length - 1 : current - 1));
28
+ return;
29
+ }
30
+ if (key.downArrow) {
31
+ setIndex((current) => (current === props.options.length - 1 ? 0 : current + 1));
32
+ return;
33
+ }
34
+ if (key.return) {
35
+ props.onSubmit(selected.value);
36
+ }
37
+ });
38
+ return (_jsx(Frame, { title: props.title, chrome: props.chrome, hintKeys: ["↑ ↓", "enter"], children: props.options.map((option, optionIndex) => (_jsx(OptionRow, { selected: optionIndex === index, label: option.label, description: option.description }, option.label))) }));
39
+ }
40
+ function ConfirmPrompt(props) {
41
+ const defaultValue = props.defaultValue ?? true;
42
+ const [value, setValue] = useState(defaultValue);
43
+ useInput((input, key) => {
44
+ if (key.leftArrow || key.downArrow) {
45
+ setValue(false);
46
+ return;
47
+ }
48
+ if (key.rightArrow || key.upArrow) {
49
+ setValue(true);
50
+ return;
51
+ }
52
+ if (input.toLowerCase() === "y") {
53
+ props.onSubmit(true);
54
+ return;
55
+ }
56
+ if (input.toLowerCase() === "n") {
57
+ props.onSubmit(false);
58
+ return;
59
+ }
60
+ if (key.return) {
61
+ props.onSubmit(value);
62
+ }
63
+ });
64
+ return (_jsxs(Frame, { title: props.title, chrome: props.chrome, hintKeys: ["← →", "Y / N", "enter"], children: [_jsx(OptionRow, { selected: value, label: "Yes" }), _jsx(OptionRow, { selected: !value, label: "No" })] }));
65
+ }
66
+ function TextPrompt(props) {
67
+ const [value, setValue] = useState(props.defaultValue ?? "");
68
+ const [error, setError] = useState(null);
69
+ const displayValue = useMemo(() => {
70
+ if (props.secret) {
71
+ return "*".repeat(value.length);
72
+ }
73
+ return value;
74
+ }, [props.secret, value]);
75
+ useInput((input, key) => {
76
+ if (key.return) {
77
+ const normalized = value.trim();
78
+ const next = normalized.length > 0 ? normalized : (props.defaultValue ?? "").trim();
79
+ const validationError = props.validate ? props.validate(next) : null;
80
+ if (validationError) {
81
+ setError(validationError);
82
+ return;
83
+ }
84
+ props.onSubmit(next);
85
+ return;
86
+ }
87
+ if (key.backspace || key.delete) {
88
+ setValue((current) => current.slice(0, -1));
89
+ setError(null);
90
+ return;
91
+ }
92
+ if (key.ctrl || key.meta || key.tab || key.escape) {
93
+ return;
94
+ }
95
+ if (input) {
96
+ setValue((current) => current + input);
97
+ setError(null);
98
+ }
99
+ });
100
+ return (_jsxs(Frame, { title: props.title, chrome: props.chrome, hintKeys: ["type", "enter", "backspace"], children: [_jsx(FrameInput, { children: displayValue || _jsx(Text, { color: "gray", children: props.placeholder ?? "" }) }), error ? (_jsx(Box, { marginTop: 1, borderStyle: "round", borderColor: "red", paddingX: 1, children: _jsx(Text, { color: "red", children: error }) })) : null] }));
101
+ }
102
+ export async function promptSelect(title, options, chrome) {
103
+ let submitted;
104
+ const instance = render(_jsx(SelectPrompt, { title: title, chrome: chrome, options: options, onSubmit: (value) => {
105
+ submitted = value;
106
+ instance.unmount();
107
+ } }));
108
+ await instance.waitUntilExit();
109
+ if (submitted === undefined) {
110
+ throw new Error("Prompt cancelled before a value was selected.");
111
+ }
112
+ return submitted;
113
+ }
114
+ export async function promptConfirm(title, defaultValue = true, chrome) {
115
+ let submitted;
116
+ const instance = render(_jsx(ConfirmPrompt, { title: title, chrome: chrome, defaultValue: defaultValue, onSubmit: (value) => {
117
+ submitted = value;
118
+ instance.unmount();
119
+ } }));
120
+ await instance.waitUntilExit();
121
+ if (submitted === undefined) {
122
+ throw new Error("Prompt cancelled before confirmation.");
123
+ }
124
+ return submitted;
125
+ }
126
+ export async function promptText(options) {
127
+ let submitted;
128
+ const instance = render(_jsx(TextPrompt, { ...options, onSubmit: (value) => {
129
+ submitted = value;
130
+ instance.unmount();
131
+ } }));
132
+ await instance.waitUntilExit();
133
+ if (submitted === undefined) {
134
+ throw new Error("Prompt cancelled before text entry completed.");
135
+ }
136
+ return submitted;
137
+ }
138
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/ui/prompts.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAclD,SAAS,MAAM,CAAC,KAAoC;IAClD,OAAO,CACL,KAAC,GAAG,IAAC,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,YACrE,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,KAAK,CAAC,QAAQ,GAAQ,GACvC,CACP,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAA0B;IAC/C,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAC,MAAM,YAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,KAAC,MAAM,cAAa,IAAI,IAAX,IAAI,CAAiB,CACnC,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAA2B;IAC9C,OAA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AS,GAAG,KAAK,CAAC;YAClB,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,GAAI,CAAC,CAAC;IACP,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IAC/B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@aidecisionops/decisionops",
3
+ "version": "0.1.0",
4
+ "description": "CLI and install tooling for the Decision Ops skill",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/decisionops/decision-ops-skill.git"
10
+ },
11
+ "homepage": "https://github.com/decisionops/decision-ops-skill#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/decisionops/decision-ops-skill/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "keywords": [
19
+ "decisionops",
20
+ "mcp",
21
+ "skill",
22
+ "cli",
23
+ "codex",
24
+ "cursor",
25
+ "claude-code"
26
+ ],
27
+ "bin": {
28
+ "decisionops": "./dist/cli.js"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "platforms",
33
+ "skills",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc -p tsconfig.json && npm run generate:platform-catalog",
39
+ "clean": "rm -rf dist",
40
+ "dev": "tsx src/cli.ts",
41
+ "generate:platform-catalog": "node dist/generate-platform-catalog.js",
42
+ "validate:skill": "python3 ./scripts/validate_skill_bundle.py",
43
+ "typecheck": "tsc --noEmit -p tsconfig.json",
44
+ "test:unit": "tsx --test tests/*.test.ts",
45
+ "smoke:cli": "./scripts/test-cli-smoke.sh",
46
+ "smoke:legacy": "./scripts/test-platform-builds.sh",
47
+ "test": "npm run validate:skill && npm run typecheck && npm run test:unit && npm run smoke:cli && npm run smoke:legacy",
48
+ "prepare": "npm run build",
49
+ "prepack": "npm run clean && npm run build"
50
+ },
51
+ "engines": {
52
+ "node": ">=20"
53
+ },
54
+ "dependencies": {
55
+ "@iarna/toml": "^2.2.5",
56
+ "commander": "^14.0.1",
57
+ "ink": "^5.2.1",
58
+ "react": "^18.3.1",
59
+ "zod": "^3.25.76"
60
+ },
61
+ "devDependencies": {
62
+ "@types/node": "^24.5.2",
63
+ "@types/react": "^18.3.24",
64
+ "tsx": "^4.20.5",
65
+ "typescript": "^5.9.2"
66
+ }
67
+ }
@@ -0,0 +1,133 @@
1
+ # Platform Targets
2
+
3
+ Each platform integration lives in its own file under `platforms/<id>.toml`.
4
+
5
+ For end-user installation walkthroughs, use the public guides under `docs/platforms/`. This file is the contributor reference for how platform registry entries are modeled.
6
+
7
+ This is the extension point for adding Decision Ops support to another IDE or agent runtime. Contributors should not edit build logic just to add a normal platform target. Add a new TOML file first; only touch installer code when the new platform needs a genuinely new config format or install behavior.
8
+
9
+ The registry is consumed by the TypeScript CLI in `src/cli.ts` and the installer core under `src/core/`. The Python path in `scripts/platform_targets.py` is retained for parity checks, not as the preferred end-user workflow.
10
+
11
+ ## Generated catalog
12
+
13
+ Builds also emit `dist/platform-catalog.json` from this registry plus runtime defaults.
14
+
15
+ This artifact is intended for application integration UIs that need one canonical payload with:
16
+
17
+ - platform ids and display names
18
+ - skill support
19
+ - MCP scope and config path template
20
+ - auth instructions
21
+ - default server name and URL
22
+ - CLI install command template
23
+
24
+ Regenerate it with:
25
+
26
+ ```bash
27
+ npm run build
28
+ ```
29
+
30
+ ## User-facing entry points
31
+
32
+ For normal installs, use the CLI:
33
+
34
+ ```bash
35
+ node dist/cli.js install
36
+ node dist/cli.js login
37
+ node dist/cli.js init --repo-path /path/to/repo --org-id org_123 --project-id proj_456 --repo-ref owner/repo
38
+ node dist/cli.js platform install --platform codex --repo-path /path/to/repo --org-id org_123 --project-id proj_456 --repo-ref owner/repo
39
+ ```
40
+
41
+ Use the Python entry point only when you need parity checks against the legacy installer:
42
+
43
+ ```bash
44
+ python3 ./scripts/platform_targets.py install --platform codex --repo-path /path/to/repo --org-id org_123 --project-id proj_456 --repo-ref owner/repo
45
+ python3 ./scripts/platform_targets.py install-skill --platform codex
46
+ ```
47
+
48
+ ## Install flow
49
+
50
+ `install-skill`
51
+ - Builds the requested platform bundle into `build/<platform>/`.
52
+ - Copies only the skill bundle into the platform skill directory.
53
+ - Does not write a manifest or install MCP config.
54
+
55
+ `install`
56
+ - Builds the requested platform bundle into `build/<platform>/`.
57
+ - Installs the skill bundle when the platform supports local skills.
58
+ - Installs MCP config when the platform supports MCP.
59
+ - Writes `.decisionops/manifest.toml` unless `--skip-manifest` is set.
60
+ - Writes `.decisionops/auth-handoff.toml` when auth instructions exist for the selected platform.
61
+ - Fails closed when manifest values are missing unless `--allow-placeholders` is set.
62
+ - Defaults MCP registration to `https://api.aidecisionops.com/mcp`; override `--server-url` or `MCP_SERVER_URL` for local/dev targets.
63
+
64
+ ## Default install paths
65
+
66
+ `codex`
67
+ - Skill: `~/.codex/skills/{skill_name}`
68
+ - MCP: `~/.codex/config.toml`
69
+
70
+ `claude-code`
71
+ - Skill: `~/.claude/skills/{skill_name}`
72
+ - MCP: `{repo_path}/.mcp.json`
73
+
74
+ `cursor`
75
+ - Skill: `~/.cursor/skills/{skill_name}`
76
+ - MCP: `{repo_path}/.cursor/mcp.json`
77
+
78
+ `antigravity`
79
+ - Skill: `~/.antigravity/skills/{skill_name}`
80
+ - MCP: `ANTIGRAVITY_MCP_CONFIG_PATH` only
81
+
82
+ `vscode`
83
+ - Skill: not supported
84
+ - MCP: `{repo_path}/.vscode/mcp.json`
85
+
86
+ ## Registry fields
87
+
88
+ Required top-level fields:
89
+
90
+ - `id`: stable platform id that must match the filename stem
91
+ - `display_name`: human-readable platform name
92
+
93
+ `skill` section:
94
+
95
+ - `supported = true|false`
96
+ - `build_path`
97
+ - `install_path_env`
98
+ - `install_path_default`
99
+ - `install_root_env`
100
+ - `install_root_default`
101
+ - `install_path_suffix`
102
+
103
+ `mcp` section:
104
+
105
+ - `supported = true|false`
106
+ - `scope = "user" | "project"`
107
+ - `format = "codex_toml" | "json_map"`
108
+ - `root_key` for `json_map`
109
+ - `build_path`
110
+ - `install_path_env`
111
+ - `install_path_default`
112
+ - `install_root_env`
113
+ - `install_root_default`
114
+ - `install_path_suffix`
115
+
116
+ `auth` section:
117
+
118
+ - `mode = "interactive_handoff"`
119
+ - `instructions` as an array of strings
120
+
121
+ `manifest` section:
122
+
123
+ - `supported = true|false`
124
+ - `build_path`
125
+
126
+ ## Validation
127
+
128
+ ```bash
129
+ npm test
130
+ npm pack --dry-run
131
+ node dist/cli.js platform list
132
+ python3 scripts/platform_targets.py list
133
+ ```