trackops 2.0.3 → 2.0.5
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/LICENSE +21 -21
- package/README.md +695 -402
- package/bin/trackops.js +116 -116
- package/lib/config.js +326 -326
- package/lib/control.js +208 -208
- package/lib/env.js +244 -244
- package/lib/init.js +325 -325
- package/lib/locale.js +24 -0
- package/lib/opera-bootstrap.js +941 -874
- package/lib/opera.js +494 -477
- package/lib/preferences.js +74 -74
- package/lib/registry.js +214 -196
- package/lib/release.js +56 -56
- package/lib/runtime-state.js +144 -144
- package/lib/server.js +312 -207
- package/lib/skills.js +74 -57
- package/lib/workspace.js +260 -260
- package/locales/en.json +192 -166
- package/locales/es.json +192 -166
- package/package.json +61 -58
- package/scripts/postinstall-locale.js +21 -21
- package/scripts/skills-marketplace-smoke.js +124 -124
- package/scripts/smoke-tests.js +558 -554
- package/scripts/sync-skill-version.js +21 -21
- package/scripts/validate-skill.js +103 -103
- package/skills/trackops/SKILL.md +126 -122
- package/skills/trackops/agents/openai.yaml +7 -7
- package/skills/trackops/locales/en/SKILL.md +126 -122
- package/skills/trackops/locales/en/references/activation.md +94 -75
- package/skills/trackops/locales/en/references/troubleshooting.md +73 -55
- package/skills/trackops/locales/en/references/workflow.md +55 -32
- package/skills/trackops/references/activation.md +94 -75
- package/skills/trackops/references/troubleshooting.md +73 -55
- package/skills/trackops/references/workflow.md +55 -32
- package/skills/trackops/skill.json +29 -29
- package/templates/hooks/post-checkout +2 -2
- package/templates/hooks/post-commit +2 -2
- package/templates/hooks/post-merge +2 -2
- package/templates/opera/agent.md +28 -27
- package/templates/opera/architecture/dependency-graph.md +24 -24
- package/templates/opera/architecture/runtime-automation.md +24 -24
- package/templates/opera/architecture/runtime-operations.md +34 -34
- package/templates/opera/en/agent.md +22 -21
- package/templates/opera/en/architecture/dependency-graph.md +24 -24
- package/templates/opera/en/architecture/runtime-automation.md +24 -24
- package/templates/opera/en/architecture/runtime-operations.md +34 -34
- package/templates/opera/en/reviews/delivery-audit.md +18 -18
- package/templates/opera/en/reviews/integration-audit.md +18 -18
- package/templates/opera/en/router.md +24 -19
- package/templates/opera/references/autonomy-and-recovery.md +117 -117
- package/templates/opera/references/opera-cycle.md +193 -193
- package/templates/opera/registry.md +28 -28
- package/templates/opera/reviews/delivery-audit.md +18 -18
- package/templates/opera/reviews/integration-audit.md +18 -18
- package/templates/opera/router.md +54 -49
- package/templates/skills/changelog-updater/SKILL.md +69 -69
- package/templates/skills/commiter/SKILL.md +99 -99
- package/templates/skills/opera-contract-auditor/SKILL.md +38 -38
- package/templates/skills/opera-contract-auditor/locales/en/SKILL.md +38 -38
- package/templates/skills/opera-policy-guard/SKILL.md +26 -26
- package/templates/skills/opera-policy-guard/locales/en/SKILL.md +26 -26
- package/templates/skills/opera-skill/SKILL.md +279 -0
- package/templates/skills/opera-skill/locales/en/SKILL.md +279 -0
- package/templates/skills/opera-skill/locales/en/references/phase-dod.md +138 -0
- package/templates/skills/opera-skill/references/phase-dod.md +138 -0
- package/templates/skills/project-starter-skill/SKILL.md +150 -131
- package/templates/skills/project-starter-skill/locales/en/SKILL.md +143 -105
- package/templates/skills/project-starter-skill/references/opera-cycle.md +195 -193
- package/ui/css/base.css +284 -266
- package/ui/css/charts.css +425 -327
- package/ui/css/components.css +1107 -570
- package/ui/css/onboarding.css +133 -0
- package/ui/css/panels.css +345 -406
- package/ui/css/terminal.css +125 -0
- package/ui/css/timeline.css +58 -0
- package/ui/css/tokens.css +284 -227
- package/ui/favicon.svg +5 -5
- package/ui/index.html +99 -96
- package/ui/js/api.js +49 -13
- package/ui/js/app.js +28 -32
- package/ui/js/charts.js +526 -0
- package/ui/js/console-logger.js +172 -172
- package/ui/js/filters.js +247 -0
- package/ui/js/icons.js +129 -104
- package/ui/js/keyboard.js +229 -0
- package/ui/js/onboarding.js +33 -42
- package/ui/js/router.js +142 -125
- package/ui/js/theme.js +100 -100
- package/ui/js/time-tracker.js +248 -248
- package/ui/js/views/board.js +84 -114
- package/ui/js/views/dashboard.js +870 -0
- package/ui/js/views/flash.js +47 -47
- package/ui/js/views/projects.js +745 -0
- package/ui/js/views/scrum.js +476 -0
- package/ui/js/views/settings.js +153 -203
- package/ui/js/views/sidebar.js +37 -31
- package/ui/js/views/tasks.js +218 -101
- package/ui/js/views/timeline.js +265 -0
- package/ui/js/views/topbar.js +94 -107
- package/ui/app.js +0 -950
- package/ui/js/views/insights.js +0 -340
- package/ui/js/views/overview.js +0 -369
- package/ui/styles.css +0 -688
package/lib/runtime-state.js
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const os = require("os");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
|
|
7
|
-
const { detectSystemLocale, isInteractive, normalizeLocale, promptForLocale } = require("./locale");
|
|
8
|
-
|
|
9
|
-
function getRuntimeHome() {
|
|
10
|
-
return process.env.TRACKOPS_BOOTSTRAP_HOME || os.homedir();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function getRuntimeDir() {
|
|
14
|
-
return path.join(getRuntimeHome(), ".trackops");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function getRuntimeFile() {
|
|
18
|
-
return path.join(getRuntimeDir(), "runtime.json");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function defaultRuntimeState() {
|
|
22
|
-
return {
|
|
23
|
-
locale: null,
|
|
24
|
-
localeSource: null,
|
|
25
|
-
skill: null,
|
|
26
|
-
skillVersion: null,
|
|
27
|
-
runtimePackage: "trackops",
|
|
28
|
-
runtimeVersion: null,
|
|
29
|
-
bootstrapPolicy: null,
|
|
30
|
-
supportedAgentsV1: [],
|
|
31
|
-
verifiedAt: null,
|
|
32
|
-
verifiedWith: null,
|
|
33
|
-
executable: null,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function normalizeRuntimeState(state) {
|
|
38
|
-
const base = defaultRuntimeState();
|
|
39
|
-
const next = { ...base, ...(state || {}) };
|
|
40
|
-
next.locale = normalizeLocale(next.locale);
|
|
41
|
-
next.localeSource = next.localeSource || null;
|
|
42
|
-
next.supportedAgentsV1 = Array.isArray(next.supportedAgentsV1) ? next.supportedAgentsV1 : [];
|
|
43
|
-
return next;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function readRuntimeState() {
|
|
47
|
-
const file = getRuntimeFile();
|
|
48
|
-
if (!fs.existsSync(file)) return defaultRuntimeState();
|
|
49
|
-
try {
|
|
50
|
-
return normalizeRuntimeState(JSON.parse(fs.readFileSync(file, "utf8")));
|
|
51
|
-
} catch (_error) {
|
|
52
|
-
return defaultRuntimeState();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function writeRuntimeState(patch) {
|
|
57
|
-
const file = getRuntimeFile();
|
|
58
|
-
const state = normalizeRuntimeState({ ...readRuntimeState(), ...(patch || {}) });
|
|
59
|
-
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
60
|
-
fs.writeFileSync(file, `${JSON.stringify(state, null, 2)}\n`, "utf8");
|
|
61
|
-
return state;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function getGlobalLocale() {
|
|
65
|
-
return readRuntimeState().locale || null;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function resolveLocaleState(options = {}) {
|
|
69
|
-
const runtime = readRuntimeState();
|
|
70
|
-
const explicit = normalizeLocale(options.explicitLocale);
|
|
71
|
-
if (explicit) return { locale: explicit, source: "explicit", runtime };
|
|
72
|
-
|
|
73
|
-
const project = normalizeLocale(options.projectLocale);
|
|
74
|
-
if (project) return { locale: project, source: "project", runtime };
|
|
75
|
-
|
|
76
|
-
const global = normalizeLocale(runtime.locale);
|
|
77
|
-
if (global) return { locale: global, source: "global", runtime };
|
|
78
|
-
|
|
79
|
-
const envLocale = normalizeLocale(process.env.TRACKOPS_LOCALE);
|
|
80
|
-
if (envLocale) return { locale: envLocale, source: "env", runtime };
|
|
81
|
-
|
|
82
|
-
const system = detectSystemLocale();
|
|
83
|
-
return { locale: system || "es", source: "system", runtime };
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
async function ensureGlobalLocale(options = {}) {
|
|
87
|
-
const current = readRuntimeState();
|
|
88
|
-
const explicit = normalizeLocale(options.preferredLocale);
|
|
89
|
-
if (explicit) {
|
|
90
|
-
return {
|
|
91
|
-
locale: explicit,
|
|
92
|
-
source: "explicit",
|
|
93
|
-
runtime: writeRuntimeState({ locale: explicit, localeSource: "explicit" }),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (normalizeLocale(current.locale)) {
|
|
98
|
-
return { locale: current.locale, source: "global", runtime: current };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
let locale = null;
|
|
102
|
-
let source = null;
|
|
103
|
-
if (options.interactive !== false && isInteractive()) {
|
|
104
|
-
locale = await promptForLocale(detectSystemLocale());
|
|
105
|
-
source = "prompt";
|
|
106
|
-
} else {
|
|
107
|
-
locale = detectSystemLocale() || "es";
|
|
108
|
-
source = "system";
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
locale,
|
|
113
|
-
source,
|
|
114
|
-
runtime: writeRuntimeState({ locale, localeSource: source }),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function doctorLocale(projectLocale = null, explicitLocale = null) {
|
|
119
|
-
const resolved = resolveLocaleState({ explicitLocale, projectLocale });
|
|
120
|
-
const runtime = readRuntimeState();
|
|
121
|
-
return {
|
|
122
|
-
effectiveLocale: resolved.locale || "es",
|
|
123
|
-
source: resolved.source,
|
|
124
|
-
projectLocale: normalizeLocale(projectLocale),
|
|
125
|
-
globalLocale: normalizeLocale(runtime.locale),
|
|
126
|
-
envLocale: normalizeLocale(process.env.TRACKOPS_LOCALE),
|
|
127
|
-
systemLocale: detectSystemLocale() || "es",
|
|
128
|
-
runtimeFile: getRuntimeFile(),
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
module.exports = {
|
|
133
|
-
getRuntimeHome,
|
|
134
|
-
getRuntimeDir,
|
|
135
|
-
getRuntimeFile,
|
|
136
|
-
defaultRuntimeState,
|
|
137
|
-
normalizeRuntimeState,
|
|
138
|
-
readRuntimeState,
|
|
139
|
-
writeRuntimeState,
|
|
140
|
-
getGlobalLocale,
|
|
141
|
-
resolveLocaleState,
|
|
142
|
-
ensureGlobalLocale,
|
|
143
|
-
doctorLocale,
|
|
144
|
-
};
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
|
|
7
|
+
const { detectSystemLocale, isInteractive, normalizeLocale, promptForLocale } = require("./locale");
|
|
8
|
+
|
|
9
|
+
function getRuntimeHome() {
|
|
10
|
+
return process.env.TRACKOPS_BOOTSTRAP_HOME || os.homedir();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getRuntimeDir() {
|
|
14
|
+
return path.join(getRuntimeHome(), ".trackops");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getRuntimeFile() {
|
|
18
|
+
return path.join(getRuntimeDir(), "runtime.json");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function defaultRuntimeState() {
|
|
22
|
+
return {
|
|
23
|
+
locale: null,
|
|
24
|
+
localeSource: null,
|
|
25
|
+
skill: null,
|
|
26
|
+
skillVersion: null,
|
|
27
|
+
runtimePackage: "trackops",
|
|
28
|
+
runtimeVersion: null,
|
|
29
|
+
bootstrapPolicy: null,
|
|
30
|
+
supportedAgentsV1: [],
|
|
31
|
+
verifiedAt: null,
|
|
32
|
+
verifiedWith: null,
|
|
33
|
+
executable: null,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function normalizeRuntimeState(state) {
|
|
38
|
+
const base = defaultRuntimeState();
|
|
39
|
+
const next = { ...base, ...(state || {}) };
|
|
40
|
+
next.locale = normalizeLocale(next.locale);
|
|
41
|
+
next.localeSource = next.localeSource || null;
|
|
42
|
+
next.supportedAgentsV1 = Array.isArray(next.supportedAgentsV1) ? next.supportedAgentsV1 : [];
|
|
43
|
+
return next;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function readRuntimeState() {
|
|
47
|
+
const file = getRuntimeFile();
|
|
48
|
+
if (!fs.existsSync(file)) return defaultRuntimeState();
|
|
49
|
+
try {
|
|
50
|
+
return normalizeRuntimeState(JSON.parse(fs.readFileSync(file, "utf8")));
|
|
51
|
+
} catch (_error) {
|
|
52
|
+
return defaultRuntimeState();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function writeRuntimeState(patch) {
|
|
57
|
+
const file = getRuntimeFile();
|
|
58
|
+
const state = normalizeRuntimeState({ ...readRuntimeState(), ...(patch || {}) });
|
|
59
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
60
|
+
fs.writeFileSync(file, `${JSON.stringify(state, null, 2)}\n`, "utf8");
|
|
61
|
+
return state;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getGlobalLocale() {
|
|
65
|
+
return readRuntimeState().locale || null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function resolveLocaleState(options = {}) {
|
|
69
|
+
const runtime = readRuntimeState();
|
|
70
|
+
const explicit = normalizeLocale(options.explicitLocale);
|
|
71
|
+
if (explicit) return { locale: explicit, source: "explicit", runtime };
|
|
72
|
+
|
|
73
|
+
const project = normalizeLocale(options.projectLocale);
|
|
74
|
+
if (project) return { locale: project, source: "project", runtime };
|
|
75
|
+
|
|
76
|
+
const global = normalizeLocale(runtime.locale);
|
|
77
|
+
if (global) return { locale: global, source: "global", runtime };
|
|
78
|
+
|
|
79
|
+
const envLocale = normalizeLocale(process.env.TRACKOPS_LOCALE);
|
|
80
|
+
if (envLocale) return { locale: envLocale, source: "env", runtime };
|
|
81
|
+
|
|
82
|
+
const system = detectSystemLocale();
|
|
83
|
+
return { locale: system || "es", source: "system", runtime };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function ensureGlobalLocale(options = {}) {
|
|
87
|
+
const current = readRuntimeState();
|
|
88
|
+
const explicit = normalizeLocale(options.preferredLocale);
|
|
89
|
+
if (explicit) {
|
|
90
|
+
return {
|
|
91
|
+
locale: explicit,
|
|
92
|
+
source: "explicit",
|
|
93
|
+
runtime: writeRuntimeState({ locale: explicit, localeSource: "explicit" }),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (normalizeLocale(current.locale)) {
|
|
98
|
+
return { locale: current.locale, source: "global", runtime: current };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let locale = null;
|
|
102
|
+
let source = null;
|
|
103
|
+
if (options.interactive !== false && isInteractive()) {
|
|
104
|
+
locale = await promptForLocale(detectSystemLocale());
|
|
105
|
+
source = "prompt";
|
|
106
|
+
} else {
|
|
107
|
+
locale = detectSystemLocale() || "es";
|
|
108
|
+
source = "system";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
locale,
|
|
113
|
+
source,
|
|
114
|
+
runtime: writeRuntimeState({ locale, localeSource: source }),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function doctorLocale(projectLocale = null, explicitLocale = null) {
|
|
119
|
+
const resolved = resolveLocaleState({ explicitLocale, projectLocale });
|
|
120
|
+
const runtime = readRuntimeState();
|
|
121
|
+
return {
|
|
122
|
+
effectiveLocale: resolved.locale || "es",
|
|
123
|
+
source: resolved.source,
|
|
124
|
+
projectLocale: normalizeLocale(projectLocale),
|
|
125
|
+
globalLocale: normalizeLocale(runtime.locale),
|
|
126
|
+
envLocale: normalizeLocale(process.env.TRACKOPS_LOCALE),
|
|
127
|
+
systemLocale: detectSystemLocale() || "es",
|
|
128
|
+
runtimeFile: getRuntimeFile(),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
module.exports = {
|
|
133
|
+
getRuntimeHome,
|
|
134
|
+
getRuntimeDir,
|
|
135
|
+
getRuntimeFile,
|
|
136
|
+
defaultRuntimeState,
|
|
137
|
+
normalizeRuntimeState,
|
|
138
|
+
readRuntimeState,
|
|
139
|
+
writeRuntimeState,
|
|
140
|
+
getGlobalLocale,
|
|
141
|
+
resolveLocaleState,
|
|
142
|
+
ensureGlobalLocale,
|
|
143
|
+
doctorLocale,
|
|
144
|
+
};
|