trackops 1.0.1 → 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.
Files changed (83) hide show
  1. package/README.md +292 -272
  2. package/bin/trackops.js +108 -50
  3. package/lib/config.js +267 -38
  4. package/lib/control.js +534 -480
  5. package/lib/env.js +244 -0
  6. package/lib/i18n.js +61 -53
  7. package/lib/init.js +170 -47
  8. package/lib/locale.js +63 -0
  9. package/lib/opera-bootstrap.js +1075 -0
  10. package/lib/opera.js +524 -125
  11. package/lib/preferences.js +74 -0
  12. package/lib/registry.js +27 -13
  13. package/lib/release.js +56 -0
  14. package/lib/resources.js +42 -0
  15. package/lib/runtime-state.js +144 -0
  16. package/lib/server.js +1004 -521
  17. package/lib/skills.js +148 -124
  18. package/lib/workspace.js +260 -0
  19. package/locales/en.json +418 -132
  20. package/locales/es.json +418 -132
  21. package/package.json +8 -9
  22. package/scripts/postinstall-locale.js +21 -0
  23. package/scripts/skills-marketplace-smoke.js +124 -0
  24. package/scripts/smoke-tests.js +570 -0
  25. package/scripts/sync-skill-version.js +21 -0
  26. package/scripts/validate-skill.js +89 -0
  27. package/skills/trackops/SKILL.md +89 -0
  28. package/skills/trackops/agents/openai.yaml +3 -0
  29. package/skills/trackops/references/activation.md +73 -0
  30. package/skills/trackops/references/troubleshooting.md +49 -0
  31. package/skills/trackops/references/workflow.md +26 -0
  32. package/skills/trackops/scripts/bootstrap-trackops.js +203 -0
  33. package/skills/trackops/skill.json +29 -0
  34. package/templates/opera/agent.md +10 -9
  35. package/templates/opera/architecture/dependency-graph.md +24 -0
  36. package/templates/opera/architecture/runtime-automation.md +24 -0
  37. package/templates/opera/architecture/runtime-operations.md +34 -0
  38. package/templates/opera/en/agent.md +27 -0
  39. package/templates/opera/en/architecture/dependency-graph.md +24 -0
  40. package/templates/opera/en/architecture/runtime-automation.md +24 -0
  41. package/templates/opera/en/architecture/runtime-operations.md +34 -0
  42. package/templates/opera/en/genesis.md +79 -0
  43. package/templates/opera/en/references/autonomy-and-recovery.md +23 -0
  44. package/templates/opera/en/references/opera-cycle.md +62 -0
  45. package/templates/opera/en/registry.md +28 -0
  46. package/templates/opera/en/reviews/delivery-audit.md +18 -0
  47. package/templates/opera/en/reviews/integration-audit.md +18 -0
  48. package/templates/opera/en/router.md +49 -0
  49. package/templates/opera/genesis.md +79 -94
  50. package/templates/opera/reviews/delivery-audit.md +18 -0
  51. package/templates/opera/reviews/integration-audit.md +18 -0
  52. package/templates/opera/router.md +15 -5
  53. package/templates/skills/changelog-updater/locales/en/SKILL.md +11 -0
  54. package/templates/skills/commiter/locales/en/SKILL.md +11 -0
  55. package/templates/skills/opera-contract-auditor/SKILL.md +38 -0
  56. package/templates/skills/opera-contract-auditor/locales/en/SKILL.md +38 -0
  57. package/templates/skills/opera-policy-guard/SKILL.md +26 -0
  58. package/templates/skills/opera-policy-guard/locales/en/SKILL.md +26 -0
  59. package/templates/skills/project-starter-skill/SKILL.md +89 -164
  60. package/templates/skills/project-starter-skill/locales/en/SKILL.md +104 -0
  61. package/ui/css/panels.css +956 -953
  62. package/ui/index.html +1 -1
  63. package/ui/js/api.js +211 -194
  64. package/ui/js/app.js +200 -199
  65. package/ui/js/i18n.js +14 -0
  66. package/ui/js/onboarding.js +439 -437
  67. package/ui/js/state.js +130 -129
  68. package/ui/js/utils.js +175 -172
  69. package/ui/js/views/board.js +255 -254
  70. package/ui/js/views/execution.js +256 -256
  71. package/ui/js/views/insights.js +340 -339
  72. package/ui/js/views/overview.js +366 -361
  73. package/ui/js/views/settings.js +340 -202
  74. package/ui/js/views/sidebar.js +131 -132
  75. package/ui/js/views/skills.js +163 -162
  76. package/ui/js/views/tasks.js +406 -405
  77. package/ui/js/views/topbar.js +239 -183
  78. package/templates/etapa/agent.md +0 -26
  79. package/templates/etapa/genesis.md +0 -94
  80. package/templates/etapa/references/autonomy-and-recovery.md +0 -117
  81. package/templates/etapa/references/etapa-cycle.md +0 -193
  82. package/templates/etapa/registry.md +0 -28
  83. package/templates/etapa/router.md +0 -39
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+
3
+ const assert = require("assert");
4
+ const fs = require("fs");
5
+ const os = require("os");
6
+ const path = require("path");
7
+ const { spawnSync } = require("child_process");
8
+
9
+ const ROOT = path.resolve(__dirname, "..");
10
+ const SKILL_DIR = path.join(ROOT, "skills", "trackops");
11
+ const SKILL_CONFIG = JSON.parse(fs.readFileSync(path.join(SKILL_DIR, "skill.json"), "utf8"));
12
+
13
+ function run(command, args, cwd, envOverrides = {}) {
14
+ const shell = process.platform === "win32" && /\.(cmd|bat)$/i.test(command);
15
+ return spawnSync(command, args, {
16
+ cwd,
17
+ encoding: "utf8",
18
+ env: { ...process.env, ...envOverrides },
19
+ shell,
20
+ });
21
+ }
22
+
23
+ function getNpxCommand() {
24
+ return process.platform === "win32" ? "npx.cmd" : "npx";
25
+ }
26
+
27
+ function ensureOk(result, context) {
28
+ const output = `${result.stdout || ""}\n${result.stderr || ""}`.trim();
29
+ assert.strictEqual(result.status, 0, output || context);
30
+ return output;
31
+ }
32
+
33
+ function initGitRepo(repo) {
34
+ ensureOk(run("git", ["init"], repo), "git init failed");
35
+ ensureOk(run("git", ["config", "user.email", "skills-smoke@example.com"], repo), "git config email failed");
36
+ ensureOk(run("git", ["config", "user.name", "Skills Smoke"], repo), "git config name failed");
37
+ ensureOk(run("git", ["add", "."], repo), "git add failed");
38
+ ensureOk(run("git", ["commit", "-m", "skills smoke fixture"], repo), "git commit failed");
39
+ }
40
+
41
+ function buildIsolatedEnv(homeRoot) {
42
+ const env = {
43
+ HOME: homeRoot,
44
+ USERPROFILE: homeRoot,
45
+ APPDATA: path.join(homeRoot, "AppData", "Roaming"),
46
+ LOCALAPPDATA: path.join(homeRoot, "AppData", "Local"),
47
+ XDG_CONFIG_HOME: path.join(homeRoot, ".config"),
48
+ };
49
+ for (const value of Object.values(env)) {
50
+ fs.mkdirSync(value, { recursive: true });
51
+ }
52
+ return env;
53
+ }
54
+
55
+ function findInstalledSkill(rootDir, skillName) {
56
+ const matches = [];
57
+
58
+ function walk(dir) {
59
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
60
+ for (const entry of entries) {
61
+ const fullPath = path.join(dir, entry.name);
62
+ if (entry.isDirectory()) {
63
+ walk(fullPath);
64
+ continue;
65
+ }
66
+ if (entry.isFile() && entry.name === "SKILL.md" && path.basename(path.dirname(fullPath)) === skillName) {
67
+ matches.push(path.dirname(fullPath));
68
+ }
69
+ }
70
+ }
71
+
72
+ walk(rootDir);
73
+ return matches;
74
+ }
75
+
76
+ function main() {
77
+ const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), "trackops-skills-smoke-"));
78
+ const sourceRepo = path.join(tempRoot, "source");
79
+ const sourceSkillDir = path.join(sourceRepo, "skills", "trackops");
80
+ const homeRoot = path.join(tempRoot, "home");
81
+
82
+ fs.mkdirSync(path.dirname(sourceSkillDir), { recursive: true });
83
+ fs.cpSync(SKILL_DIR, sourceSkillDir, { recursive: true });
84
+ initGitRepo(sourceRepo);
85
+
86
+ const env = buildIsolatedEnv(homeRoot);
87
+ const distribution = SKILL_CONFIG.distribution || {};
88
+ const skillName = distribution.skill || SKILL_CONFIG.name;
89
+
90
+ const listResult = run(
91
+ getNpxCommand(),
92
+ ["--yes", "skills", "add", sourceRepo, "--list", "--skill", skillName, "--full-depth", "-y"],
93
+ ROOT,
94
+ env,
95
+ );
96
+ const listOutput = ensureOk(listResult, "skills list failed");
97
+ assert.match(listOutput, /\btrackops\b/i, listOutput);
98
+
99
+ const installResult = run(
100
+ getNpxCommand(),
101
+ ["--yes", "skills", "add", sourceRepo, "--skill", skillName, "--full-depth", "--global", "--agent", "codex", "--copy", "-y"],
102
+ ROOT,
103
+ env,
104
+ );
105
+ ensureOk(installResult, "skills install failed");
106
+
107
+ const installed = findInstalledSkill(homeRoot, skillName);
108
+ assert.ok(installed.length >= 1, `trackops skill was not installed under ${homeRoot}`);
109
+
110
+ const installedSkillDir = installed[0];
111
+ assert.ok(fs.existsSync(path.join(installedSkillDir, "scripts", "bootstrap-trackops.js")));
112
+ assert.ok(fs.existsSync(path.join(installedSkillDir, "references", "activation.md")));
113
+ assert.ok(fs.existsSync(path.join(installedSkillDir, "skill.json")));
114
+
115
+ fs.rmSync(tempRoot, { recursive: true, force: true });
116
+ console.log("skills marketplace smoke OK");
117
+ }
118
+
119
+ try {
120
+ main();
121
+ } catch (error) {
122
+ console.error(error.message);
123
+ process.exit(1);
124
+ }