okstra 0.102.4 → 0.104.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,57 @@
1
+ import { runPythonModule } from "../lib/python-helper.mjs";
2
+ import { resolvePaths } from "../lib/paths.mjs";
3
+
4
+ const USAGE = `okstra manager — manage cross-project okstra tasks
5
+
6
+ Usage:
7
+ okstra manager init --manager-id <id>
8
+ okstra manager discover-projects
9
+ okstra manager new project --manager-id <id> --project-id <id> --project-root <path> [--role <role>] [--tag <tag>]
10
+ okstra manager new task-group --manager-id <id> --task-group <task-group>
11
+ okstra manager new task --manager-id <id> --task-group <task-group> --task-id <task-id> [--task <project-id:task-group:task-id>]
12
+ okstra manager task status --manager-id <id> --task-group <task-group> --task-id <task-id>
13
+ okstra manager task sync --manager-id <id> --task-group <task-group> --task-id <task-id>
14
+ okstra manager task assign --manager-id <id> --task-group <task-group> --task-id <task-id> --project-id <project-id>
15
+ okstra manager task note --manager-id <id> --task-group <task-group> --task-id <task-id> --scope <shared|project> --body <text>
16
+ okstra manager task run --manager-id <id> --project-id <project-id> --task-group <task-group> --task-id <task-id>
17
+
18
+ --workspace-root is owned by this command.
19
+ `;
20
+
21
+ const OWNED_FLAGS = new Set(["--workspace-root"]);
22
+
23
+ function isOwnedFlag(arg) {
24
+ if (OWNED_FLAGS.has(arg)) return true;
25
+ return [...OWNED_FLAGS].some((flag) => arg.startsWith(`${flag}=`));
26
+ }
27
+
28
+ export function buildManagerArgs(args, paths) {
29
+ return ["--workspace-root", paths.workspace, ...args];
30
+ }
31
+
32
+ export async function run(args) {
33
+ const forbidden = args.find(isOwnedFlag);
34
+ if (forbidden) {
35
+ process.stderr.write(
36
+ `error: ${forbidden} is set by 'okstra manager' itself — remove it from your args\n`,
37
+ );
38
+ return 2;
39
+ }
40
+
41
+ if (args.includes("--help") || args.includes("-h")) {
42
+ process.stdout.write(USAGE);
43
+ return 0;
44
+ }
45
+ if (args.length === 0) {
46
+ process.stdout.write(USAGE);
47
+ return 2;
48
+ }
49
+
50
+ const paths = await resolvePaths();
51
+ const result = await runPythonModule({
52
+ module: "okstra_ctl.manager_cli",
53
+ args: buildManagerArgs(args, paths),
54
+ stdio: "inherit-stdout",
55
+ });
56
+ return result.code;
57
+ }
@@ -8,6 +8,7 @@ export const USER_SKILL_NAMES = Object.freeze([
8
8
  "okstra-setup",
9
9
  "okstra-brief",
10
10
  "okstra-run",
11
+ "okstra-manager",
11
12
  "okstra-memory",
12
13
  "okstra-inspect",
13
14
  "okstra-schedule",