@flydocs/cli 0.6.0-alpha.3 → 0.6.0-alpha.4

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/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
15
15
  var init_constants = __esm({
16
16
  "src/lib/constants.ts"() {
17
17
  "use strict";
18
- CLI_VERSION = "0.6.0-alpha.3";
18
+ CLI_VERSION = "0.6.0-alpha.4";
19
19
  CLI_NAME = "flydocs";
20
20
  PACKAGE_NAME = "@flydocs/cli";
21
21
  POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flydocs/cli",
3
- "version": "0.6.0-alpha.3",
3
+ "version": "0.6.0-alpha.4",
4
4
  "type": "module",
5
5
  "description": "FlyDocs AI CLI — install, setup, and manage FlyDocs projects",
6
6
  "bin": {
@@ -409,7 +409,49 @@ python3 .claude/skills/flydocs-cloud/scripts/set_labels.py \
409
409
  If the relay returns `LABELS_NOT_FOUND`, show the invalid names and ask the
410
410
  user to correct them.
411
411
 
412
- **Step 6: Configure product identity.**
412
+ **Step 6: Configure status mapping.**
413
+
414
+ Map provider workflow states to FlyDocs statuses. Run auto-mapping first:
415
+
416
+ ```bash
417
+ python3 .claude/skills/flydocs-cloud/scripts/set_status_mapping.py --auto
418
+ ```
419
+
420
+ The relay auto-maps by case-insensitive name matching (e.g., "In Progress"
421
+ maps to `IMPLEMENTING`, "Done" maps to `COMPLETE`, "Backlog" maps to
422
+ `BACKLOG`).
423
+
424
+ **Review the result:** The response includes which FlyDocs statuses were
425
+ mapped and which were not. Show the user:
426
+
427
+ ```
428
+ Status mapping:
429
+ BACKLOG -> Backlog
430
+ READY -> Ready
431
+ IMPLEMENTING -> In Progress
432
+ REVIEW -> In Review
433
+ COMPLETE -> Done
434
+ CANCELED -> Canceled
435
+ (unmapped) -> BLOCKED, TESTING
436
+ ```
437
+
438
+ If some statuses are unmapped, **warn but don't block** — transitions for
439
+ unmapped statuses will fall back to provider name matching. If the user
440
+ wants to fix unmapped statuses, fetch available provider states and let
441
+ them map manually:
442
+
443
+ ```bash
444
+ python3 .claude/skills/flydocs-cloud/scripts/list_statuses.py
445
+ ```
446
+
447
+ Then store the corrected mapping:
448
+
449
+ ```bash
450
+ python3 .claude/skills/flydocs-cloud/scripts/set_status_mapping.py \
451
+ --mapping '{"BACKLOG":"Backlog","IMPLEMENTING":"In Progress","BLOCKED":"On Hold",...}'
452
+ ```
453
+
454
+ **Step 7: Configure product identity.**
413
455
 
414
456
  Ask about product metadata:
415
457
 
@@ -417,7 +459,7 @@ Ask about product metadata:
417
459
  from project.md)
418
460
  - **Icon and color** — optional, ask if they have preferences
419
461
 
420
- **Step 7: Save to config.**
462
+ **Step 8: Save to config.**
421
463
 
422
464
  Update `.flydocs/config.json`:
423
465
 
@@ -425,6 +467,7 @@ Update `.flydocs/config.json`:
425
467
  - `provider.teamId` — selected team ID (set by `set_team.py`)
426
468
  - `labels.defaults` — default label names (set by `set_labels.py`)
427
469
  - `labels.typeMap` — type-to-label mapping (set by `set_labels.py`)
470
+ - `statusMapping` — FlyDocs-to-provider status mapping (set by `set_status_mapping.py`)
428
471
  - `workspace.activeProjects` — add the project ID
429
472
  - `workspace.product.name` — product name
430
473
 
@@ -58,15 +58,17 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
58
58
 
59
59
  ### Workspace Scripts
60
60
 
61
- | Script | Usage | Output |
62
- | ------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
63
- | `list_providers.py` | (no args) | `[{type, name, connected}]` |
64
- | `set_provider.py` | `<provider_type>` (`linear` or `jira`) | `{success}` — updates relay routing and local config `provider.type` |
65
- | `list_teams.py` | (no args) | `[{id, name, key}]` |
66
- | `create_team.py` | `--name "..." [--key KEY] [--description "..."] [--parent <team_id>]` | `{id, name, key}` — `--parent` creates a sub-team |
67
- | `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config `provider.teamId` |
68
- | `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
69
- | `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
61
+ | Script | Usage | Output |
62
+ | ----------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
63
+ | `list_providers.py` | (no args) | `[{type, name, connected}]` |
64
+ | `set_provider.py` | `<provider_type>` (`linear` or `jira`) | `{success}` — updates relay routing and local config `provider.type` |
65
+ | `list_teams.py` | (no args) | `[{id, name, key}]` |
66
+ | `create_team.py` | `--name "..." [--key KEY] [--description "..."] [--parent <team_id>]` | `{id, name, key}` — `--parent` creates a sub-team |
67
+ | `set_team.py` | `<team_id>` | `{success}` — updates relay preference and local config `provider.teamId` |
68
+ | `list_labels.py` | (no args) | `[{id, name, color}]` — requires team to be set first |
69
+ | `set_labels.py` | `--defaults '["a"]' --type-map '{"feature":["F"],...}' \| stdin` | `{success, validated, defaults, typeMap}` — stores label config on relay |
70
+ | `list_statuses.py` | (no args) | `[{name, type, color}]` — provider workflow states for manual mapping |
71
+ | `set_status_mapping.py` | `--auto \| --mapping '{"BACKLOG":"Backlog",...}' \| stdin` | `{success, mapping, unmapped[]}` — stores status mapping on relay |
70
72
 
71
73
  ### Script Notes
72
74
 
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env python3
2
+ """List provider workflow states via the FlyDocs Relay API."""
3
+
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ sys.path.insert(0, str(Path(__file__).parent))
8
+ from flydocs_api import get_client, output_json
9
+
10
+
11
+ def main():
12
+ client = get_client()
13
+ result = client.get("/auth/statuses")
14
+
15
+ output_json(result)
16
+
17
+
18
+ if __name__ == "__main__":
19
+ main()
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env python3
2
+ """Set status mapping on the relay API key.
3
+
4
+ Maps provider workflow states to FlyDocs statuses. Pass "auto" for
5
+ case-insensitive auto-mapping, or provide a manual mapping object.
6
+
7
+ Usage:
8
+ set_status_mapping.py --auto
9
+ set_status_mapping.py --mapping '{"BACKLOG":"Backlog","IMPLEMENTING":"In Progress",...}'
10
+ echo '{"mapping":"auto"}' | set_status_mapping.py
11
+ """
12
+
13
+ import argparse
14
+ import json
15
+ import sys
16
+ from pathlib import Path
17
+
18
+ sys.path.insert(0, str(Path(__file__).parent))
19
+ from flydocs_api import get_client, output_json, fail
20
+
21
+
22
+ def main():
23
+ parser = argparse.ArgumentParser(description="Set status mapping on relay")
24
+ parser.add_argument(
25
+ "--auto",
26
+ action="store_true",
27
+ help="Auto-map provider states to FlyDocs statuses by name",
28
+ )
29
+ parser.add_argument(
30
+ "--mapping",
31
+ default=None,
32
+ help="JSON object mapping FlyDocs statuses to provider state names",
33
+ )
34
+ args = parser.parse_args()
35
+
36
+ if args.auto:
37
+ body: dict = {"mapping": "auto"}
38
+ elif args.mapping is not None:
39
+ try:
40
+ body = {"mapping": json.loads(args.mapping)}
41
+ except json.JSONDecodeError:
42
+ fail("Invalid JSON for --mapping")
43
+ elif not sys.stdin.isatty():
44
+ try:
45
+ body = json.loads(sys.stdin.read().strip())
46
+ except json.JSONDecodeError:
47
+ fail("Invalid JSON on stdin")
48
+ else:
49
+ fail("Provide --auto, --mapping '{...}', or pipe JSON via stdin")
50
+
51
+ client = get_client()
52
+ result = client.post("/auth/statuses", body)
53
+
54
+ # Store status mapping in local config as reference
55
+ config_path = client.config_path
56
+ if config_path.exists():
57
+ with open(config_path, "r") as f:
58
+ config = json.load(f)
59
+ if isinstance(result.get("mapping"), dict):
60
+ config["statusMapping"] = result["mapping"]
61
+ with open(config_path, "w") as f:
62
+ json.dump(config, f, indent=2)
63
+ f.write("\n")
64
+
65
+ output_json(result)
66
+
67
+
68
+ if __name__ == "__main__":
69
+ main()
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.3",
2
+ "version": "0.6.0-alpha.4",
3
3
  "sourceRepo": "github.com/plastrlab/flydocs-core",
4
4
  "tier": "local",
5
5
  "setupComplete": false,
@@ -1 +1 @@
1
- 0.6.0-alpha.3
1
+ 0.6.0-alpha.4
@@ -7,6 +7,16 @@ Versioning: [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.6.0-alpha.4] — 2026-03-13
11
+
12
+ ### Added
13
+
14
+ - **Status mapping** — new `list_statuses.py` and `set_status_mapping.py`
15
+ scripts. Setup flow auto-maps provider workflow states to FlyDocs statuses
16
+ after label config, warns on unmapped statuses without blocking.
17
+
18
+ ---
19
+
10
20
  ## [0.6.0-alpha.3] — 2026-03-13
11
21
 
12
22
  ### Added
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.0-alpha.3",
2
+ "version": "0.6.0-alpha.4",
3
3
  "description": "FlyDocs Core - Manifest of all managed files",
4
4
  "repository": "github.com/plastrlab/flydocs-core",
5
5