@flydocs/cli 0.6.0-alpha.2 → 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 +351 -225
- package/package.json +1 -1
- package/template/.claude/commands/flydocs-setup.md +79 -10
- package/template/.claude/commands/flydocs-upgrade.md +27 -15
- package/template/.claude/skills/flydocs-cloud/SKILL.md +20 -16
- package/template/.claude/skills/flydocs-cloud/scripts/create_issue.py +3 -0
- package/template/.claude/skills/flydocs-cloud/scripts/list_providers.py +19 -0
- package/template/.claude/skills/flydocs-cloud/scripts/list_statuses.py +19 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_provider.py +46 -0
- package/template/.claude/skills/flydocs-cloud/scripts/set_status_mapping.py +69 -0
- package/template/.flydocs/config.json +1 -1
- package/template/.flydocs/version +1 -1
- package/template/CHANGELOG.md +39 -0
- package/template/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -301,7 +301,32 @@ FLYDOCS_API_KEY is not set. Run `flydocs connect` first to set up your API key.
|
|
|
301
301
|
|
|
302
302
|
Do not proceed until the key is available.
|
|
303
303
|
|
|
304
|
-
**Step 2:
|
|
304
|
+
**Step 2: Detect or select provider.**
|
|
305
|
+
|
|
306
|
+
Query connected providers:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
python3 .claude/skills/flydocs-cloud/scripts/list_providers.py
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
This returns `[{type, name, connected}]`. Handle based on results:
|
|
313
|
+
|
|
314
|
+
- **One connected provider** — auto-select it and confirm with the user.
|
|
315
|
+
- **Multiple connected providers** — present a numbered list, let the user
|
|
316
|
+
choose which to use for this project.
|
|
317
|
+
- **No connected providers** — error: "No providers connected. Connect Linear
|
|
318
|
+
or Jira at app.flydocs.ai before running setup."
|
|
319
|
+
|
|
320
|
+
After selection, store the preference:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
python3 .claude/skills/flydocs-cloud/scripts/set_provider.py <provider_type>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
This stores the provider type on the relay (for routing) and updates
|
|
327
|
+
`provider.type` in local config.
|
|
328
|
+
|
|
329
|
+
**Step 3: Select or create team.**
|
|
305
330
|
|
|
306
331
|
If `provider.teamId` in config is null, discover available teams:
|
|
307
332
|
|
|
@@ -334,7 +359,7 @@ python3 .claude/skills/flydocs-cloud/scripts/set_team.py <team_id>
|
|
|
334
359
|
This stores the team preference server-side (the relay uses it for all
|
|
335
360
|
team-scoped operations) and updates `provider.teamId` in local config.
|
|
336
361
|
|
|
337
|
-
**Step
|
|
362
|
+
**Step 4: Get or create project.**
|
|
338
363
|
|
|
339
364
|
Query existing projects:
|
|
340
365
|
|
|
@@ -349,7 +374,7 @@ create a new project:
|
|
|
349
374
|
python3 .claude/skills/flydocs-cloud/scripts/create_project.py --name "Project Name"
|
|
350
375
|
```
|
|
351
376
|
|
|
352
|
-
**Step
|
|
377
|
+
**Step 5: Configure labels.**
|
|
353
378
|
|
|
354
379
|
Fetch available labels from the provider:
|
|
355
380
|
|
|
@@ -384,7 +409,49 @@ python3 .claude/skills/flydocs-cloud/scripts/set_labels.py \
|
|
|
384
409
|
If the relay returns `LABELS_NOT_FOUND`, show the invalid names and ask the
|
|
385
410
|
user to correct them.
|
|
386
411
|
|
|
387
|
-
**Step
|
|
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.**
|
|
388
455
|
|
|
389
456
|
Ask about product metadata:
|
|
390
457
|
|
|
@@ -392,14 +459,15 @@ Ask about product metadata:
|
|
|
392
459
|
from project.md)
|
|
393
460
|
- **Icon and color** — optional, ask if they have preferences
|
|
394
461
|
|
|
395
|
-
**Step
|
|
462
|
+
**Step 8: Save to config.**
|
|
396
463
|
|
|
397
464
|
Update `.flydocs/config.json`:
|
|
398
465
|
|
|
399
|
-
- `provider.type` —
|
|
466
|
+
- `provider.type` — set by `set_provider.py`
|
|
400
467
|
- `provider.teamId` — selected team ID (set by `set_team.py`)
|
|
401
468
|
- `labels.defaults` — default label names (set by `set_labels.py`)
|
|
402
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`)
|
|
403
471
|
- `workspace.activeProjects` — add the project ID
|
|
404
472
|
- `workspace.product.name` — product name
|
|
405
473
|
|
|
@@ -436,11 +504,11 @@ Let the user customize names, descriptions, and target dates.
|
|
|
436
504
|
|
|
437
505
|
**Step 4: Create milestones.**
|
|
438
506
|
|
|
439
|
-
For each approved milestone:
|
|
507
|
+
For each approved milestone, pass the project ID from Phase 2 Step 3:
|
|
440
508
|
|
|
441
509
|
```bash
|
|
442
510
|
python3 .claude/skills/flydocs-cloud/scripts/create_milestone.py \
|
|
443
|
-
--name "Phase 1: Foundation" --target-date YYYY-MM-DD
|
|
511
|
+
--name "Phase 1: Foundation" --project <project_id> --target-date YYYY-MM-DD
|
|
444
512
|
```
|
|
445
513
|
|
|
446
514
|
Record the milestone IDs for use in Phase 4.
|
|
@@ -468,10 +536,11 @@ For each work item, follow the capture procedure from
|
|
|
468
536
|
`.claude/skills/flydocs-workflow/stages/capture.md`:
|
|
469
537
|
|
|
470
538
|
- Determine type (feature, bug, chore, idea)
|
|
471
|
-
- Create via the mechanism script:
|
|
539
|
+
- Create via the mechanism script (cloud: pass `--project` from Phase 2):
|
|
472
540
|
```bash
|
|
473
541
|
python3 .claude/skills/flydocs-{tier}/scripts/create_issue.py \
|
|
474
|
-
--title "Issue title" --type feature --priority 3 --estimate 2
|
|
542
|
+
--title "Issue title" --type feature --priority 3 --estimate 2 \
|
|
543
|
+
--project <project_id>
|
|
475
544
|
```
|
|
476
545
|
- For quick ideas, use `--triage` flag
|
|
477
546
|
|
|
@@ -65,7 +65,7 @@ Count totals by status and type.
|
|
|
65
65
|
|
|
66
66
|
**Step 3: Check for API readiness.**
|
|
67
67
|
|
|
68
|
-
Check if `
|
|
68
|
+
Check if `FLYDOCS_API_KEY` is set in the environment (from `.env` or
|
|
69
69
|
`.env.local`). If not, warn the user they will need it for Phase 1.
|
|
70
70
|
|
|
71
71
|
**Step 4: Present migration summary.**
|
|
@@ -100,27 +100,39 @@ Confirm with the user before continuing.
|
|
|
100
100
|
## Phase 1: Connect to Cloud
|
|
101
101
|
|
|
102
102
|
Guide the user through connecting to the cloud provider. This swaps the
|
|
103
|
-
|
|
103
|
+
tier, stores the API key, and prepares the cloud mechanism skill.
|
|
104
104
|
|
|
105
|
-
**Step 1:
|
|
105
|
+
**Step 1: Get API key.**
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
Ask the user for their FlyDocs API key (`fdk_...`). If `FLYDOCS_API_KEY`
|
|
108
|
+
is already set in the environment, confirm they want to use the existing
|
|
109
|
+
key or enter a new one.
|
|
110
|
+
|
|
111
|
+
If no key is available, instruct the user:
|
|
109
112
|
|
|
110
113
|
```
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- Prompt for your relay API key (from flydocs.ai account)
|
|
116
|
-
- Update .flydocs/config.json to cloud tier
|
|
117
|
-
- Swap mechanism skills (local -> cloud)
|
|
118
|
-
- Verify the connection works
|
|
114
|
+
You'll need a FlyDocs API key (fdk_...) from your dashboard at app.flydocs.ai.
|
|
115
|
+
|
|
116
|
+
Option A: Run `flydocs connect --here` in your terminal (handles everything)
|
|
117
|
+
Option B: Add FLYDOCS_API_KEY=fdk_... to your .env or .env.local file
|
|
119
118
|
```
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
Wait for the user to confirm the key is set before proceeding.
|
|
121
|
+
|
|
122
|
+
**Step 2: Update config to cloud tier.**
|
|
123
|
+
|
|
124
|
+
Read `.flydocs/config.json`, update `tier` to `"cloud"`, and write it back.
|
|
125
|
+
Preserve all existing config values (detected stack, skills, etc.).
|
|
126
|
+
|
|
127
|
+
**Step 3: Swap mechanism skill.**
|
|
128
|
+
|
|
129
|
+
Instruct the user to run `flydocs connect --here` from their terminal if
|
|
130
|
+
they haven't already. This handles the mechanism skill swap (installs
|
|
131
|
+
`flydocs-cloud`, removes `flydocs-local`).
|
|
132
|
+
|
|
133
|
+
**Step 4: Verify connection.**
|
|
122
134
|
|
|
123
|
-
After the user confirms
|
|
135
|
+
After the user confirms the swap, verify:
|
|
124
136
|
|
|
125
137
|
1. Read `.flydocs/config.json` — `tier` should now be `cloud`
|
|
126
138
|
2. Check that `.claude/skills/flydocs-cloud/scripts/` exists
|
|
@@ -29,15 +29,15 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
|
|
|
29
29
|
|
|
30
30
|
### Shared Contract Scripts
|
|
31
31
|
|
|
32
|
-
| Script | Usage
|
|
33
|
-
| ----------------------- |
|
|
34
|
-
| `create_issue.py` | `--title "..." --type feature [--description "..."] [--description-file PATH] [--priority 0-4] [--estimate 1-5] [--assignee STR] [--labels "a,b"] [--triage] \| stdin` | `{id, identifier, title, url}` |
|
|
35
|
-
| `transition.py` | `<ref> <STATUS> "<comment>"`
|
|
36
|
-
| `comment.py` | `<ref> ["<comment>"] \| stdin`
|
|
37
|
-
| `list_issues.py` | `[--status STATUS[,STATUS]] [--active] [--project ID] [--milestone ID] [--assignee STR] [--mine] [--limit N]`
|
|
38
|
-
| `get_issue.py` | `<ref> [--fields basic\|full]`
|
|
39
|
-
| `assign.py` | `<ref> <assignee>`
|
|
40
|
-
| `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin`
|
|
32
|
+
| Script | Usage | Output |
|
|
33
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| `create_issue.py` | `--title "..." --type feature [--description "..."] [--description-file PATH] [--priority 0-4] [--estimate 1-5] [--assignee STR] [--project ID] [--labels "a,b"] [--triage] \| stdin` | `{id, identifier, title, url}` |
|
|
35
|
+
| `transition.py` | `<ref> <STATUS> "<comment>"` | `{success, issue, previousStatus, newStatus}` |
|
|
36
|
+
| `comment.py` | `<ref> ["<comment>"] \| stdin` | `{success, commentId}` |
|
|
37
|
+
| `list_issues.py` | `[--status STATUS[,STATUS]] [--active] [--project ID] [--milestone ID] [--assignee STR] [--mine] [--limit N]` | `[{id, identifier, title, status, assignee, priority, dueDate, milestone, milestoneId, milestoneSortOrder, project, projectId}]` |
|
|
38
|
+
| `get_issue.py` | `<ref> [--fields basic\|full]` | `{id, identifier, title, description, status, assignee, priority, estimate, dueDate, milestone, milestoneId, project, projectId, comments[]}` |
|
|
39
|
+
| `assign.py` | `<ref> <assignee>` | `{success, issue, assignee}` |
|
|
40
|
+
| `update_description.py` | `<ref> --text "..." \| --file PATH \| stdin` | `{success, issue}` |
|
|
41
41
|
|
|
42
42
|
### Extended Scripts
|
|
43
43
|
|
|
@@ -58,13 +58,17 @@ All scripts: `python3 .claude/skills/flydocs-cloud/scripts/<script>`
|
|
|
58
58
|
|
|
59
59
|
### Workspace Scripts
|
|
60
60
|
|
|
61
|
-
| Script
|
|
62
|
-
|
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
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 |
|
|
68
72
|
|
|
69
73
|
### Script Notes
|
|
70
74
|
|
|
@@ -18,6 +18,7 @@ def main():
|
|
|
18
18
|
parser.add_argument("--priority", type=int, default=3, choices=range(5))
|
|
19
19
|
parser.add_argument("--estimate", type=int, default=0, choices=[0, 1, 2, 3, 5])
|
|
20
20
|
parser.add_argument("--assignee", default=None)
|
|
21
|
+
parser.add_argument("--project", default=None, help="Project ID")
|
|
21
22
|
parser.add_argument("--labels", default=None, help="Comma-separated ad-hoc label names")
|
|
22
23
|
parser.add_argument("--triage", action="store_true")
|
|
23
24
|
args = parser.parse_args()
|
|
@@ -43,6 +44,8 @@ def main():
|
|
|
43
44
|
body["estimate"] = args.estimate
|
|
44
45
|
if args.assignee:
|
|
45
46
|
body["assignee"] = args.assignee
|
|
47
|
+
if args.project:
|
|
48
|
+
body["projectId"] = args.project
|
|
46
49
|
if args.labels:
|
|
47
50
|
body["labels"] = [l.strip() for l in args.labels.split(",") if l.strip()]
|
|
48
51
|
if args.triage:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""List available providers 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("/providers")
|
|
14
|
+
|
|
15
|
+
output_json(result)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
main()
|
|
@@ -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,46 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Set provider preference via the FlyDocs Relay API.
|
|
3
|
+
|
|
4
|
+
Stores the provider type on the relay (for server-side routing)
|
|
5
|
+
and updates the local config (for display/reference).
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import json
|
|
10
|
+
import sys
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
14
|
+
from flydocs_api import get_client, output_json, fail
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main():
|
|
18
|
+
parser = argparse.ArgumentParser(description="Set provider preference")
|
|
19
|
+
parser.add_argument(
|
|
20
|
+
"provider_type",
|
|
21
|
+
choices=["linear", "jira"],
|
|
22
|
+
help="Provider type",
|
|
23
|
+
)
|
|
24
|
+
args = parser.parse_args()
|
|
25
|
+
|
|
26
|
+
client = get_client()
|
|
27
|
+
result = client.post("/auth/provider", {"providerType": args.provider_type})
|
|
28
|
+
|
|
29
|
+
# Update local config with provider type
|
|
30
|
+
config_path = client.config_path
|
|
31
|
+
if config_path.exists():
|
|
32
|
+
with open(config_path, "r") as f:
|
|
33
|
+
config = json.load(f)
|
|
34
|
+
if "provider" not in config:
|
|
35
|
+
config["provider"] = {"type": args.provider_type, "teamId": None}
|
|
36
|
+
else:
|
|
37
|
+
config["provider"]["type"] = args.provider_type
|
|
38
|
+
with open(config_path, "w") as f:
|
|
39
|
+
json.dump(config, f, indent=2)
|
|
40
|
+
f.write("\n")
|
|
41
|
+
|
|
42
|
+
output_json(result)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
if __name__ == "__main__":
|
|
46
|
+
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 +1 @@
|
|
|
1
|
-
0.6.0-alpha.
|
|
1
|
+
0.6.0-alpha.4
|
package/template/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,45 @@ 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
|
+
|
|
20
|
+
## [0.6.0-alpha.3] — 2026-03-13
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Provider selection** — new `list_providers.py` and `set_provider.py`
|
|
25
|
+
scripts for multi-provider support (Linear + Jira). Setup flow detects
|
|
26
|
+
connected providers before team selection.
|
|
27
|
+
- **Inline API key prompt** — `flydocs install` now prompts for FlyDocs API
|
|
28
|
+
key when cloud tier is selected. No separate `flydocs connect` step needed.
|
|
29
|
+
- **Existing config detection** — install detects pre-existing `.claude/CLAUDE.md`,
|
|
30
|
+
`settings.json`, `hooks.json`, and `AGENTS.md`. Prompts user to overwrite
|
|
31
|
+
(with backup) or preserve.
|
|
32
|
+
- **`--project` flag** — `create_issue.py` accepts `--project <id>` to scope
|
|
33
|
+
issues to a specific project. Fixes milestone/project mismatch during setup.
|
|
34
|
+
- **Team creation** — `create_team.py` with `--parent` flag for sub-teams.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Setup flow restructured** — Phase 2 now starts with provider detection,
|
|
39
|
+
then team selection, project, labels. Milestones and issues pass `--project`.
|
|
40
|
+
- **Community skill output** — install shows one line per skill instead of
|
|
41
|
+
4-5 verbose lines. "No triggers" warning suppressed for community skills.
|
|
42
|
+
- **`/flydocs-upgrade` streamlined** — Phase 1 inlines API key handling
|
|
43
|
+
instead of requiring a separate terminal step.
|
|
44
|
+
- **API key helpers extracted** — shared `api-key.ts` module used by both
|
|
45
|
+
`install` and `connect` commands.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
10
49
|
## [0.6.0-alpha.1] — 2026-03-12
|
|
11
50
|
|
|
12
51
|
### Added
|
package/template/manifest.json
CHANGED