trackops 1.0.1 → 1.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 (57) hide show
  1. package/README.md +326 -270
  2. package/bin/trackops.js +102 -70
  3. package/lib/config.js +260 -35
  4. package/lib/control.js +517 -475
  5. package/lib/env.js +227 -0
  6. package/lib/i18n.js +61 -53
  7. package/lib/init.js +135 -46
  8. package/lib/locale.js +63 -0
  9. package/lib/opera-bootstrap.js +523 -0
  10. package/lib/opera.js +319 -170
  11. package/lib/registry.js +27 -13
  12. package/lib/release.js +56 -0
  13. package/lib/resources.js +42 -0
  14. package/lib/server.js +907 -554
  15. package/lib/skills.js +148 -124
  16. package/lib/workspace.js +260 -0
  17. package/locales/en.json +331 -139
  18. package/locales/es.json +331 -139
  19. package/package.json +7 -9
  20. package/scripts/skills-marketplace-smoke.js +124 -0
  21. package/scripts/smoke-tests.js +445 -0
  22. package/scripts/sync-skill-version.js +21 -0
  23. package/scripts/validate-skill.js +88 -0
  24. package/skills/trackops/SKILL.md +64 -0
  25. package/skills/trackops/agents/openai.yaml +3 -0
  26. package/skills/trackops/references/activation.md +39 -0
  27. package/skills/trackops/references/troubleshooting.md +34 -0
  28. package/skills/trackops/references/workflow.md +20 -0
  29. package/skills/trackops/scripts/bootstrap-trackops.js +201 -0
  30. package/skills/trackops/skill.json +29 -0
  31. package/templates/opera/en/agent.md +26 -0
  32. package/templates/opera/en/genesis.md +79 -0
  33. package/templates/opera/en/references/autonomy-and-recovery.md +23 -0
  34. package/templates/opera/en/references/opera-cycle.md +62 -0
  35. package/templates/opera/en/registry.md +28 -0
  36. package/templates/opera/en/router.md +39 -0
  37. package/templates/opera/genesis.md +79 -94
  38. package/templates/skills/changelog-updater/locales/en/SKILL.md +11 -0
  39. package/templates/skills/commiter/locales/en/SKILL.md +11 -0
  40. package/templates/skills/project-starter-skill/locales/en/SKILL.md +24 -0
  41. package/ui/css/panels.css +956 -953
  42. package/ui/index.html +1 -1
  43. package/ui/js/api.js +211 -194
  44. package/ui/js/app.js +200 -199
  45. package/ui/js/i18n.js +14 -0
  46. package/ui/js/onboarding.js +439 -437
  47. package/ui/js/state.js +130 -129
  48. package/ui/js/utils.js +175 -172
  49. package/ui/js/views/board.js +255 -254
  50. package/ui/js/views/execution.js +256 -256
  51. package/ui/js/views/insights.js +340 -339
  52. package/ui/js/views/overview.js +365 -364
  53. package/ui/js/views/settings.js +340 -202
  54. package/ui/js/views/sidebar.js +131 -132
  55. package/ui/js/views/skills.js +163 -162
  56. package/ui/js/views/tasks.js +406 -405
  57. package/ui/js/views/topbar.js +239 -183
package/lib/release.js ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("child_process");
4
+ const config = require("./config");
5
+
6
+ function git(args, cwd) {
7
+ return spawnSync("git", args, { cwd, encoding: "utf8" });
8
+ }
9
+
10
+ function runGit(args, cwd, errorMessage) {
11
+ const result = git(args, cwd);
12
+ if (result.status !== 0) {
13
+ throw new Error(result.stderr || result.stdout || errorMessage);
14
+ }
15
+ return result.stdout.trim();
16
+ }
17
+
18
+ function parseArgs(args = []) {
19
+ return {
20
+ push: args.includes("--push"),
21
+ };
22
+ }
23
+
24
+ function cmdRelease(root, args = []) {
25
+ const context = config.ensureContext(root);
26
+ if (context.layout !== "split") {
27
+ throw new Error("trackops release requires a split workspace.");
28
+ }
29
+
30
+ const options = parseArgs(args);
31
+ const status = runGit(["status", "--porcelain"], context.workspaceRoot, "git status failed");
32
+ if (context.publish.requireCleanWorktree && status.trim()) {
33
+ throw new Error("trackops release requires a clean git worktree.");
34
+ }
35
+
36
+ const currentBranch = runGit(["branch", "--show-current"], context.workspaceRoot, "git branch failed");
37
+ if (currentBranch !== context.branches.development) {
38
+ throw new Error(`trackops release must run from '${context.branches.development}'.`);
39
+ }
40
+
41
+ const splitCommit = runGit(
42
+ ["subtree", "split", "--prefix", context.publish.sourceDir, context.branches.development],
43
+ context.workspaceRoot,
44
+ "git subtree split failed",
45
+ );
46
+
47
+ runGit(["branch", "-f", context.branches.publish, splitCommit], context.workspaceRoot, "git branch update failed");
48
+
49
+ if (options.push) {
50
+ runGit(["push", "origin", context.branches.publish, "--force-with-lease"], context.workspaceRoot, "git push failed");
51
+ }
52
+
53
+ console.log(`Release branch '${context.branches.publish}' updated from '${context.branches.development}'.`);
54
+ }
55
+
56
+ module.exports = { cmdRelease };
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+
6
+ const { normalizeLocale } = require("./locale");
7
+
8
+ function existing(filePath) {
9
+ return filePath && fs.existsSync(filePath) ? filePath : null;
10
+ }
11
+
12
+ function resolveLocalizedFile(baseDir, locale, relativePath) {
13
+ const normalized = normalizeLocale(locale) || "es";
14
+ return (
15
+ existing(path.join(baseDir, "locales", normalized, relativePath)) ||
16
+ existing(path.join(baseDir, normalized, relativePath)) ||
17
+ existing(path.join(baseDir, relativePath)) ||
18
+ existing(path.join(baseDir, "locales", "es", relativePath)) ||
19
+ existing(path.join(baseDir, "es", relativePath))
20
+ );
21
+ }
22
+
23
+ function resolveLocalizedDir(baseDir, locale, relativePath = "") {
24
+ const normalized = normalizeLocale(locale) || "es";
25
+ return (
26
+ existing(path.join(baseDir, "locales", normalized, relativePath)) ||
27
+ existing(path.join(baseDir, normalized, relativePath)) ||
28
+ existing(path.join(baseDir, relativePath)) ||
29
+ existing(path.join(baseDir, "locales", "es", relativePath)) ||
30
+ existing(path.join(baseDir, "es", relativePath))
31
+ );
32
+ }
33
+
34
+ function resolveSkillFile(templatesDir, skillName, locale) {
35
+ return resolveLocalizedFile(path.join(templatesDir, skillName), locale, "SKILL.md");
36
+ }
37
+
38
+ module.exports = {
39
+ resolveLocalizedFile,
40
+ resolveLocalizedDir,
41
+ resolveSkillFile,
42
+ };