@agentteams/cli 0.1.22 → 0.1.23-dev.80

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @agentteams/cli
2
2
 
3
- [![GitHub](https://img.shields.io/badge/GitHub-rlarua%2FAgentTeams--cli-blue?logo=github)](https://github.com/rlarua/AgentTeams-cli)
4
- [![Issues](https://img.shields.io/github/issues/rlarua/AgentTeams-cli)](https://github.com/rlarua/AgentTeams-cli/issues)
3
+ [![GitHub](https://img.shields.io/badge/GitHub-AgentTeamsRun%2Fcli-blue?logo=github)](https://github.com/AgentTeamsRun/cli)
4
+ [![Issues](https://img.shields.io/github/issues/AgentTeamsRun/cli)](https://github.com/AgentTeamsRun/cli/issues)
5
5
 
6
6
  A CLI for working with the AgentTeams API from your terminal.
7
7
  It supports convention sync and plan/comment/report management.
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentteams/cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.23-dev.80",
4
4
  "description": "CLI tool for AgentTeams API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,10 +26,10 @@
26
26
  "license": "Apache-2.0",
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "https://github.com/rlarua/AgentTeams-cli.git"
29
+ "url": "https://github.com/AgentTeamsRun/cli.git"
30
30
  },
31
31
  "bugs": {
32
- "url": "https://github.com/rlarua/AgentTeams-cli/issues"
32
+ "url": "https://github.com/AgentTeamsRun/cli/issues"
33
33
  },
34
34
  "homepage": "https://agentteams.run",
35
35
  "engines": {
@@ -1,8 +0,0 @@
1
- {
2
- "teamId": "1939e8e3-706b-48f1-9dab-ff1b5399f804",
3
- "projectId": "b2949695-3284-4d19-b9a4-4d2a9e905fde",
4
- "agentName": "cli-agent",
5
- "apiKey": "key_eaf85b02-c8a2-40ec-98bf-ba9983c790ff_bdb34ca3-c68c-4265-b68b-a9d9394cbd42",
6
- "apiUrl": "https://api.agentteams.run",
7
- "repositoryId": "f9db0ce9-be0d-4938-91d9-98b903413260"
8
- }
@@ -1,100 +0,0 @@
1
- ---
2
- trigger: always_on
3
- description: -
4
- agentInstruction: |
5
- Always reference the items below.
6
- - (no always_on items)
7
- ---
8
-
9
- # AgentTeams Convention
10
-
11
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
12
-
13
- ## Entity References & ID Handling
14
-
15
- User messages from the AgentTeams web UI may contain entity references in `[label](type:id)` or `[label](type:id:path)` format.
16
-
17
- - **ID prefix stripping (IMPORTANT)**: The `id` part includes a type prefix (`plan_`, `cr_`, `ca_`, `conv_`, `pm_`). Always strip this prefix before passing the id to any CLI flag (`--id`, `--plan-id`, etc.).
18
- - Example: `[Safari pull-to-refresh](plan:plan_f62762fc-730a-4201-8586-e2541505ed1b)` → use `f62762fc-730a-4201-8586-e2541505ed1b`
19
- - Full prefix list: `plan_` · `cr_` · `ca_` · `conv_` · `pm_`
20
- - Resolution by type:
21
- - `convention:id:.agentteams/path` → Read the local file at the given path (e.g., `.agentteams/rules/context.md`)
22
- - `completionReport:id` → Download with `agentteams report download --id {id}` and read the local file
23
- - `postMortem:id` → Download with `agentteams postmortem download --id {id}` and read the local file
24
- - `coAction:id` → Download with `agentteams coaction download --id {id}` and read the local file
25
-
26
- ---
27
-
28
- > ⚠️ When creating, updating, or deleting platform documents (plans, conventions, reports, postmortems, co-actions), do not stop at writing local files — always register the result to the server via the CLI.
29
-
30
- Report status to AgentTeams **if you are working under a plan**.
31
-
32
- > If the CLI is unavailable, skip reporting and continue the task.
33
-
34
- ## Plan Lifecycle (Quick Reference)
35
-
36
- ```bash
37
- # Start
38
- agentteams plan start --id {planId}
39
-
40
- # Finish (with completion report)
41
- agentteams plan finish --id {planId} \
42
- --report-title "<what you did and why, in one sentence>" \
43
- --report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
44
- --quality-score <0-100> \
45
- --report-status <COMPLETED | PARTIAL | FAILED>
46
- ```
47
-
48
- For report file structure, quality score dimensions, and status rules, see `.agentteams/platform/completion-report-guide.md`.
49
-
50
- ## Completion Report Without a Plan
51
-
52
- 1. Ask the user: "No active plan found. Should I create a quick plan to record this work?"
53
- 2. If approved:
54
- ```bash
55
- agentteams plan quick --title "<brief work summary>" \
56
- --content "<TL;DR and actual tasks performed>" \
57
- --type <FEATURE | BUG_FIX | ISSUE | REFACTOR | CHORE>
58
- ```
59
- Then follow the report creation steps in `.agentteams/platform/completion-report-guide.md`.
60
- 3. If declined, create a standalone report (no plan link). See `.agentteams/platform/completion-report-guide.md`.
61
-
62
- ---
63
-
64
- ## Plan Workflow Rules
65
-
66
- ### Before starting work on a plan
67
-
68
- 1. Download the plan as a local runbook:
69
- ```bash
70
- agentteams plan download --id {planId}
71
- ```
72
- This saves to `.agentteams/cli/active-plan/{filename}.md`. Read this file at the start of your work.
73
-
74
- 2. Check for comments (especially `RISK` comments):
75
- ```bash
76
- agentteams comment list --plan-id {planId}
77
- ```
78
-
79
- 3. For detailed execution workflow (entity references, comments, cleanup), see `.agentteams/platform/plan-guide.md`.
80
-
81
- ### Guide checks before writing documents
82
-
83
- Before writing or updating **platform documents** (plans, reports, conventions, postmortems), read the matching guide:
84
-
85
- | Document type | Guide to read |
86
- |---|---|
87
- | Plan execution | `.agentteams/platform/plan-guide.md` |
88
- | New plan | `.agentteams/platform/plan-template.md` |
89
- | Completion report | `.agentteams/platform/completion-report-guide.md` |
90
- | Postmortem | `.agentteams/platform/post-mortem-guide.md` |
91
- | Convention (create) | `.agentteams/platform/convention-authoring-guide.md` |
92
- | Convention (update/delete) | `.agentteams/platform/convention-ud-guide.md` |
93
- | Co-action (handoff) | `.agentteams/platform/co-action-guide.md` |
94
-
95
-
96
- ---
97
-
98
- ## Project Convention Index
99
-
100
- No project conventions found. Use the web dashboard to create conventions.
@@ -1,144 +0,0 @@
1
- ---
2
- trigger: model_decision
3
- description: Reference when creating a co-action (handoff document).
4
- ---
5
- # Co-Action Guide (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- A co-action is a **handoff document** — it captures knowledge that cannot be inferred from code alone. Use it to transfer implicit knowledge between agents or between sessions.
10
-
11
- ## What a Co-Action Is
12
-
13
- - A co-action records **discoveries, decisions, and context** accumulated during a work session.
14
- - It is NOT a session context dump. Only include information that has lasting value for the next reader.
15
- - Co-actions link to related plans, completion reports, and post-mortems for full traceability.
16
- - Takeaways track the key insights and lessons learned from the work.
17
-
18
- ## When to Create a Co-Action
19
-
20
- - After completing a multi-session or multi-agent project
21
- - When handing off work to another agent or team member
22
- - When a body of implicit knowledge would be lost without documentation
23
- - Before a long pause in active development on a feature
24
-
25
- ## Content Structure
26
-
27
- Write the co-action content with these sections. Include only sections that have meaningful content — skip empty ones.
28
-
29
- ~~~markdown
30
- ## Key Discoveries
31
- - <findings that are not obvious from the code>
32
- - <workarounds, undocumented behaviors, environment quirks>
33
-
34
- ## Design Decisions
35
- - <decision>: <rationale — why this approach, what alternatives were rejected>
36
-
37
- ## Usage Scenarios
38
- - <how the feature/system is intended to be used>
39
- - <edge cases or non-obvious interaction patterns>
40
-
41
- ## Non-Goals
42
- - <what was intentionally excluded and why>
43
-
44
- ## Risks / Trade-offs
45
- - <known compromises and their potential impact>
46
- - <technical debt introduced and conditions for revisiting>
47
-
48
- ## Follow-up / Known Constraints
49
- - <what the next agent should continue or address>
50
- - <temporary workarounds that need permanent solutions>
51
- - <incomplete items with context on where they left off>
52
- ~~~
53
-
54
- ## Section Writing Tips
55
-
56
- ### Key Discoveries
57
- Focus on things the next reader cannot find by reading code. Examples: "Prisma 7 delegate requires wrapper pattern due to type inference bug", "Docker build caches COPY layer even when file content changes if mtime is unchanged".
58
-
59
- ### Design Decisions
60
- State the decision and the reason. Bad: "Used Redis". Good: "Chose Redis over in-memory cache because the service runs multi-instance and cache must be shared; accepted the ops overhead."
61
-
62
- ### Non-Goals
63
- Prevent scope creep by the next agent. Be explicit about what was considered and deliberately excluded.
64
-
65
- ### Follow-up / Known Constraints
66
- This is the most critical section for handoff. Be specific enough that the next agent can resume without re-investigating.
67
-
68
- ## Visibility
69
-
70
- - `PRIVATE` (default): only the creator can view/access
71
- - `PROJECT`: all project members can view; only the creator can change status, visibility, or delete
72
-
73
- ## Takeaways
74
-
75
- Takeaways capture **key insights** that emerged during the work — things the next agent should know but might not discover on their own.
76
-
77
- Use takeaways when:
78
- - You discovered a non-obvious constraint or behavior (e.g., "Fastify response schema silently strips undefined fields")
79
- - A design decision was made that isn't documented elsewhere
80
- - You found a workaround that future agents should reuse (or avoid)
81
- - The task revealed risks or follow-up items that don't belong in the main content
82
-
83
- Takeaways are separate from content. Content is the structured handoff document; takeaways are concise, standalone insights attached to it.
84
-
85
- ~~~bash
86
- agentteams coaction takeaway-create --id {coActionId} --content "<insight>"
87
- ~~~
88
-
89
- ## Useful Commands
90
-
91
- ~~~bash
92
- # Create
93
- agentteams coaction create \
94
- --title "<concise handoff title>" \
95
- --file .agentteams/cli/temp/{descriptive-name}-coaction.md \
96
- --visibility PRIVATE
97
-
98
- # Download for reference
99
- agentteams coaction download --id {coActionId}
100
-
101
- # Link related entities
102
- agentteams coaction link-plan --id {coActionId} --plan-id {planId}
103
- agentteams coaction link-completion-report --id {coActionId} --completion-report-id {crId}
104
- agentteams coaction link-post-mortem --id {coActionId} --post-mortem-id {pmId}
105
-
106
- # Takeaways
107
- agentteams coaction takeaway-create --id {coActionId} --content "<insight>"
108
- agentteams coaction takeaway-list --id {coActionId}
109
- agentteams coaction takeaway-update --id {coActionId} --takeaway-id {takeawayId} --content "<updated insight>"
110
- agentteams coaction takeaway-delete --id {coActionId} --takeaway-id {takeawayId}
111
- # Update content
112
- agentteams coaction update --id {coActionId} --file .agentteams/cli/temp/{name}-coaction.md
113
-
114
- # Change status
115
- agentteams coaction update --id {coActionId} --status CLOSED
116
- ~~~
117
-
118
- ## Output Behavior
119
-
120
- - `coaction create` and `coaction update` print post-action tips to **stderr**.
121
- - Structured command results (for `--format json`) remain on **stdout**.
122
- - This separation prevents JSON pipeline parsing failures when tips are shown.
123
-
124
- ~~~bash
125
- # Keep stdout clean for JSON consumers
126
- agentteams coaction create \
127
- --title "<title>" \
128
- --file .agentteams/cli/temp/{name}-coaction.md \
129
- --format json \
130
- 2>/tmp/coaction-tips.log
131
- ~~~
132
-
133
- ## Common Pitfalls
134
-
135
- - Dumping raw session logs instead of curated knowledge
136
- - Writing implementation details that belong in a completion report
137
- - Skipping the "Follow-up / Known Constraints" section — this is the most valuable part for handoff
138
- - Forgetting to link related plans and reports
139
- - Using PRIVATE visibility when the knowledge should be shared with the team
140
- - Assuming info tips are printed to stdout; they are intentionally sent to stderr
141
-
142
- ## References
143
-
144
- - Related guides: `plan-guide.md`, `completion-report-guide.md`, `post-mortem-guide.md`
@@ -1,146 +0,0 @@
1
- ---
2
- trigger: model_decision
3
- description: Reference when creating a completion report.
4
- ---
5
- # Completion Report Guide (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- Completion reports capture what changed, why it changed, how it was verified, and what remains.
10
-
11
- ## When to Create a Report
12
-
13
- - After finishing a plan
14
- - After shipping a user-visible change
15
- - After completing a risky refactor or bug fix
16
-
17
- ## What Makes a Good Report
18
-
19
- - Specific: names the feature/bug and the reason it mattered
20
- - Verifiable: includes the commands you ran (and results)
21
- - Scoped: states what was intentionally NOT changed
22
- - Actionable: calls out follow-ups if any remain
23
-
24
- ## What to Include
25
-
26
- - Purpose: why this work was needed
27
- - Scope: what areas/modules were touched
28
- - Verification: exact commands you ran and whether they passed
29
- - Risks: potential side effects or follow-up work
30
-
31
- ## Contract Note
32
-
33
- - `report create` and completion report payloads do **not** use `reportType` anymore.
34
- - Use `status` + metrics (commit and line/file stats) to describe report context.
35
-
36
- ## Report File Structure
37
-
38
- Write the report file with this structure:
39
-
40
- ~~~markdown
41
- ## Summary
42
- - <what changed and why — be specific, not generic>
43
-
44
- ## Verification
45
- - typecheck: <pass or fail, with the command you ran>
46
- - tests: <pass or fail, with the command you ran>
47
-
48
- ## Notes
49
- - <risks, follow-ups, or "none">
50
-
51
- ## Conventions Referenced
52
- - <list .agentteams/rules/*.md files you actually referenced — do not guess>
53
- ~~~
54
-
55
- ## Report File Naming
56
-
57
- Use `{first 8 characters of planId}-report.md`. Example: if planId is `57a51ec2-cf70-...`, the file name is `57a51ec2-report.md`.
58
-
59
- For standalone reports (no plan), use a descriptive name: `<feature-or-fix-name>-report.md`.
60
-
61
- > ⚠️ **Use either Path A or Path B, not both.** Running both simultaneously will create duplicate completion reports for the same plan.
62
- >
63
- ## Plan-Linked vs Non-Plan Reports
64
-
65
- You can attach report content directly while finishing a plan:
66
-
67
- ~~~bash
68
- agentteams plan finish --id {planId} \
69
- --report-title "<what you did and why, in one sentence>" \
70
- --report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
71
- --quality-score <0-100, see Quality Score section> \
72
- --report-status <COMPLETED | PARTIAL | FAILED>
73
-
74
- ~~~
75
-
76
- > Git metrics (`commitHash`, `branchName`, `filesModified`, `linesAdded`, `linesDeleted`) are auto-collected. Use `--no-git` to disable. Manual overrides: `--duration-seconds`, `--commit-start`, `--commit-end`, `--pull-request-id`.
77
-
78
- If you were working under a plan, link the report to the plan:
79
-
80
- ~~~bash
81
- agentteams report create \
82
- --plan-id {planId} \
83
- --title "<what you did and why, in one sentence>" \
84
- --file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
85
- --quality-score <0-100> \
86
- --status <COMPLETED | PARTIAL | FAILED>
87
- ~~~
88
-
89
- If you were not working under a plan, omit the plan id:
90
-
91
- ~~~bash
92
- agentteams report create \
93
- --title "<what you did and why, in one sentence>" \
94
- --file .agentteams/cli/temp/<feature-or-fix-name>-report.md \
95
- --quality-score <0-100> \
96
- --status <COMPLETED | PARTIAL | FAILED>
97
- ~~~
98
-
99
- Repository linkage note:
100
-
101
- - If .agentteams/config.json contains `repositoryId`, `report create` links the report to that repository automatically.
102
-
103
- ## Metrics (Auto + Manual)
104
-
105
- `report create` and `plan finish` can attach work metrics for insight workflows.
106
-
107
- - Auto-collected by default (git context required):
108
- - `commitHash`, `branchName`, `filesModified`, `linesAdded`, `linesDeleted`
109
- - Manual-only fields:
110
- - `durationSeconds`, `commitStart`, `commitEnd`, `pullRequestId`
111
- - `--no-git` disables auto collection.
112
- - Manual options override auto-collected values.
113
-
114
- ## Quality Score
115
-
116
- Work quality is self-assessed by the agent on a 0-100 scale. Use the four dimensions below to judge holistically.
117
-
118
- | Dimension | What to check |
119
- |---|---|
120
- | Verification | Did typecheck and tests pass? |
121
- | Completeness | Were all requirements addressed? |
122
- | Scope Adherence | Were changes limited to the requested scope? Were conventions followed? |
123
- | Side Effects | Did the change avoid unintended impact on existing behavior? |
124
-
125
- | Score | Meaning |
126
- |---|---|
127
- | 90-100 | All verification passed. All requirements met. Conventions followed. No side effects. |
128
- | 70-89 | Minor gaps: verification partially skipped, slight scope overage, or minor convention deviations. |
129
- | 0-69 | Verification failed, requirements unmet, significant scope violation, or side effects introduced. |
130
-
131
- > Convention violations (naming, logging, PR rules, etc.) count against Scope Adherence.
132
- > A score of 90+ requires conventions to be followed.
133
-
134
- ## Verification Examples
135
-
136
- ~~~bash
137
- cd api && npm run typecheck
138
- cd api && npm test
139
- cd cli && npm test
140
- ~~~
141
-
142
- ## Notes
143
-
144
- - Keep reports factual and reproducible.
145
- - Prefer describing *why* over listing every line-level change.
146
- - If verification was skipped, state the reason explicitly.
@@ -1,112 +0,0 @@
1
- ---
2
- trigger: -
3
- description: Reference when writing or editing project convention markdown files.
4
- ---
5
- # Convention Authoring Rules (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- This guide defines the baseline rules for authoring and editing convention files under `.agentteams/<category>/*.md`.
10
- For the convention body, follow the structures and elements supported by the **Web Convention Editor toolbar** so the content stays consistent across Web/CLI/AI workflows.
11
-
12
- ## 1) File structure
13
-
14
- - A convention file consists of **Frontmatter (optional)** + **Markdown body**.
15
- - Frontmatter uses YAML and must be placed at the very top of the file.
16
-
17
- Example:
18
-
19
- ~~~markdown
20
- ---
21
- trigger: always_on
22
- description: "..."
23
- agentInstruction: |
24
- ...
25
- ---
26
-
27
- # Title
28
-
29
- - Item
30
- ~~~
31
-
32
- ## 2) Recommended frontmatter fields
33
-
34
- - `trigger` (optional): a hint for auto-apply/reference triggers (e.g. `always_on`, `model_decision`, `-`)
35
- - `description` (optional): a short summary of purpose/scope
36
- - `agentInstruction` (optional): explicit instructions for agents (multi-line supported)
37
-
38
- Notes:
39
-
40
- - Frontmatter may be generated/normalized by the server, and some fields may be ignored or overwritten during updates.
41
-
42
- ## 3) Category / path rules
43
-
44
- - Use one of the following values for `<category>`:
45
- - `rules`, `skills`, `guides`, `references`
46
- - Use the path format `.agentteams/<category>/<fileName>.md`.
47
- - Prefer lowercase, hyphen-based file names (e.g. `api-routes.md`).
48
- - Avoid file name collisions within the same category; depending on policy, the server/CLI may reject conflicts.
49
-
50
- ## 4) Body authoring rules (Web editor toolbar baseline)
51
-
52
- ### Structure (Headings)
53
-
54
- - **H1**: top-level rule section title
55
- - **H2**: major subsections under H1
56
- - **H3**: detailed rules under H2
57
- - **H4**: only when further subdividing H3
58
- - **Horizontal rule (HR)**: separate unrelated sections/topics
59
-
60
- > Do **not** skip heading levels (e.g. H1 → H3 is not allowed).
61
-
62
- ### Blocks
63
-
64
- - **Blockquote**: warnings/constraints that must stand out
65
- - **Bullet list**: list rules by items
66
- - **Ordered list**: step-by-step procedures
67
- - **Task list**: execution/verification checklist
68
- - **Table**: summarize options/values/exceptions
69
- - **Code block**: runnable examples or command snippets (use language tags when possible)
70
-
71
- ### Inline
72
-
73
- - **Bold**: emphasize key conclusions/keywords
74
- - **Italic**: optional supplemental notes
75
- - **Inline code**: literal strings such as identifiers, file paths, commands
76
- - **Links**: connect to related references (use descriptive link text)
77
-
78
- ### Writing style
79
-
80
- - Prefer **imperative** phrasing for rules (e.g. "Do X", "Do not do Y").
81
- - Wrap examples in fenced code blocks and keep them executable when possible.
82
- - Prefer multiple smaller, focused conventions over one huge document.
83
-
84
- ### Markers (recommended prefixes)
85
-
86
- Use these prefixes consistently across documents (include a trailing space after the emoji):
87
-
88
- - `✅ `: correct example
89
- - `❌ `: incorrect example
90
- - `🚫 `: strictly forbidden (including policy/security violations)
91
- - `⚠️ `: warning/caution
92
- - `📌 `: key summary
93
- - `💡 `: tip/reference
94
- - `🎯 `: goal/intent
95
-
96
- ## 5) Useful Commands
97
-
98
- ~~~bash
99
- # Create a new convention
100
- agentteams convention create --file .agentteams/{category}/{convention-name}.md
101
-
102
- # Download all conventions (required before update/delete)
103
- agentteams convention download
104
-
105
- # Preview update (dry-run)
106
- agentteams convention update --file .agentteams/{category}/{convention-name}.md
107
-
108
- # Apply update to server
109
- agentteams convention update --file .agentteams/{category}/{convention-name}.md --apply
110
- ~~~
111
-
112
- > Place the file under `.agentteams/<category>/` before running `convention create`. The `<category>` must be one of: `rules`, `skills`, `guides`, `references`.
@@ -1,59 +0,0 @@
1
- ---
2
- trigger: -
3
- description: Reference when updating or deleting project conventions via the CLI.
4
- ---
5
- # Convention Update/Delete Guide (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- This guide explains how to update or delete **project convention files** using the `agentteams` CLI.
10
-
11
- ## Preconditions
12
-
13
- - Update/delete only works for files produced by:
14
-
15
- ~~~bash
16
- agentteams convention download
17
- ~~~
18
-
19
- - Uploading arbitrary local files is not supported.
20
-
21
- ## Recommended workflow
22
-
23
- 1) Download conventions (also creates a local manifest used for mapping)
24
-
25
- ~~~bash
26
- agentteams convention download
27
- ~~~
28
-
29
- 2) Edit the downloaded markdown files under `.agentteams/<category>/*.md`
30
-
31
- 3) Preview changes (default: dry-run)
32
-
33
- ~~~bash
34
- agentteams convention update --file .agentteams/rules/core-rules.md
35
- ~~~
36
-
37
- - This prints a diff and does **not** update the server.
38
-
39
- 4) Apply the update to the server
40
-
41
- ~~~bash
42
- agentteams convention update --file .agentteams/rules/core-rules.md --apply
43
- ~~~
44
-
45
- ## Concurrency/conflict handling
46
-
47
- - The CLI prints a local diff first (dry-run by default).
48
- - When applying an update, the CLI sends the server's `updatedAt` value along with the request.
49
- - The server is authoritative and rejects the update on conflict (HTTP 409). The default policy is to stop safely.
50
-
51
- ## Delete
52
-
53
- ~~~bash
54
- # dry-run (default)
55
- agentteams convention delete --file .agentteams/rules/core-rules.md
56
-
57
- # apply
58
- agentteams convention delete --file .agentteams/rules/core-rules.md --apply
59
- ~~~
@@ -1,180 +0,0 @@
1
- ---
2
- trigger: model_decision
3
- description: Reference when creating, executing, or completing a plan.
4
- ---
5
- # Plan Guide (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- This guide defines how to **write** a high-quality plan. For execution details (status transitions, CLI commands, comments), follow your project's workflow conventions and CLI help.
10
-
11
- ## What a Plan Is
12
-
13
- - A plan is a tracked unit of work with a type, status, and priority.
14
- - Use plans when the work spans multiple steps or requires review and verification.
15
- - Plans support comments, assignment, and status transitions.
16
- - Plans have a **type** that classifies the nature of the work:
17
- - `FEATURE` — New functionality or capability
18
- - `BUG_FIX` — Fix for a defect or unexpected behavior
19
- - `ISSUE` — Investigation or issue resolution
20
- - `REFACTOR` — Code restructuring without behavior change
21
- - `CHORE` — Maintenance, config, docs, or other housekeeping
22
-
23
- ## Plan Writing Workflow
24
-
25
- 1. **Clarify requirements** — explore the codebase, interview the requester if needed
26
- 2. **Write plan body** — follow Plan Tiers below to pick the right structure
27
- 3. **Gap analysis** — SHOULD run Metis review; use the self-check below if unavailable
28
- 4. **Register** — `agentteams plan create --file {path} --type {type} --priority {level}`
29
-
30
- Repository linkage note:
31
-
32
- - If .agentteams/config.json contains `repositoryId`, `plan create` links the new plan to that repository automatically.
33
-
34
- ## Execution Shortcuts
35
-
36
- For standard execution flows, use lifecycle shortcuts instead of manual multi-step status updates.
37
-
38
- ~~~bash
39
- # Start plan lifecycle
40
- agentteams plan start --id {planId}
41
-
42
- # Finish plan lifecycle
43
- agentteams plan finish --id {planId}
44
-
45
- # Finish and include completion report with metrics
46
- agentteams plan finish --id {planId} \
47
- --report-title "<what you did and why, in one sentence>" \
48
- --report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
49
- --quality-score <0-100, see Quality Score dimensions> \
50
- --report-status <COMPLETED | PARTIAL | FAILED>
51
-
52
- ~~~
53
-
54
- ## Plan Start → Execution Flow
55
-
56
- When a user explicitly says to start a plan (e.g. "start plan {id}", "let's start {id}"), treat it as an explicit execution approval. Follow this flow:
57
-
58
- ~~~bash
59
- # 1. Download runbook
60
- agentteams plan download --id {planId}
61
-
62
- # 2. Check for blocking comments
63
- agentteams comment list --plan-id {planId}
64
-
65
- # 3. Start lifecycle
66
- agentteams plan start --id {planId}
67
- ~~~
68
-
69
- **Decision after comment check:**
70
-
71
- | Comments found | Action |
72
- |---|---|
73
- | `RISK` or `MODIFICATION` present | Report to user and wait for confirmation before implementing |
74
- | None (or `GENERAL` only) | Proceed with implementation immediately |
75
-
76
- The phrase "start the plan" is an explicit approval signal — do not stop after the CLI status change. Implement unless a blocking comment requires human confirmation.
77
-
78
- ## Entity Reference Resolution
79
-
80
- Plans may contain entity references in `[label](type:id)` or `[label](type:id:path)` format. Resolve them as follows:
81
-
82
- 1. **ID prefix stripping (IMPORTANT)**: The `id` part may include a type prefix such as `plan_`, `cr_`, `ca_`, `conv_`, or `pm_`. Always strip this prefix before passing the id to any CLI flag (`--id`, `--plan-id`, etc.).
83
- - Example: `[My Plan](plan:plan_f62762fc-730a-4201-8586-e2541505ed1b)` → use `f62762fc-730a-4201-8586-e2541505ed1b`
84
- - Full prefix list: `plan_` · `cr_` · `ca_` · `conv_` · `pm_`
85
- 2. Resolution by type:
86
- - `convention:id:.agentteams/path` → Read the local file at the given path (e.g., `.agentteams/rules/context.md`)
87
- - `completionReport:id` → Download with `agentteams report download --id {id}` and read the local file
88
- - `postMortem:id` → Download with `agentteams postmortem download --id {id}` and read the local file
89
- - `coAction:id` → Download with `agentteams coaction download --id {id}` and read the local file
90
-
91
- ## During Plan Execution
92
-
93
- Post comments to track progress:
94
-
95
- - **Risk found**: `agentteams comment create --plan-id {planId} --type RISK --content "<risk description>" --affected-files "<paths>"`
96
- - **Scope changed**: `agentteams comment create --plan-id {planId} --type MODIFICATION --content "<what changed and why>" --affected-files "<paths>"`
97
- - **Status update**: `agentteams comment create --plan-id {planId} --type GENERAL --content "<current progress>"`
98
-
99
- ## After Completing or Cancelling a Plan
100
-
101
- Clean up the local runbook:
102
-
103
- ~~~bash
104
- agentteams plan cleanup --id {planId}
105
- ~~~
106
-
107
- ## Plan Tiers — Pick the Right Level
108
-
109
- Not every plan needs the same structure. Pick the tier that matches your task size.
110
-
111
- ### Minimal (1 task, 1–2 files, <30 min)
112
-
113
- - `## TL;DR` — 1–2 sentence summary, deliverables
114
- - `## TODOs` — What to do + Acceptance Criteria per task
115
-
116
- ### Standard (2–3 tasks, known scope)
117
-
118
- Everything in Minimal, plus:
119
-
120
- - `## Context` — Original Request / Research Findings
121
- - `## Work Objectives` — Deliverables / Definition of Done / Must Have / Must NOT Have
122
- - `## Verification Strategy` — QA tool mapping (API→typecheck+test, CLI→test, Web→build)
123
- - TODOs add: Must NOT do / References
124
-
125
- ### Full (4+ tasks, multi-wave, unfamiliar domain)
126
-
127
- Everything in Standard, plus:
128
-
129
- - Context adds: Interview Summary / Metis Review
130
- - `## Execution Strategy` — Parallel Waves / Dependency Matrix / Agent Dispatch
131
- - TODOs add: Agent Profile / Parallelization / QA Scenarios / Commit plan
132
-
133
- > When unsure, start with Standard. Upgrade to Full when tasks reach 4+.
134
- > `plan-template.md` provides a copyable Full-tier template. For Minimal/Standard, extract only the sections you need.
135
-
136
- ## Task Required Elements
137
-
138
- Full tier requires all items. Standard tier requires ★ items only.
139
-
140
- - ★ What to do / Must NOT do
141
- - Recommended Agent Profile (category + skills + reason)
142
- - Parallelization (Wave / Blocks / Blocked By)
143
- - ★ References (Pattern / API / External)
144
- - ★ Acceptance Criteria
145
- - QA Scenarios (Tool / Steps / Expected Result / Evidence)
146
- - Commit (message + files + pre-commit)
147
-
148
- ## Gap Analysis
149
-
150
- SHOULD: Ask the Metis agent to review the plan draft before registering.
151
-
152
- If Metis is unavailable, self-check:
153
-
154
- - [ ] All required sections for the chosen tier present?
155
- - [ ] Must NOT Have guardrails defined?
156
- - [ ] Each TODO has acceptance criteria?
157
- - [ ] Dependency graph correct (no circular blocks)?
158
- - [ ] File references verified to exist?
159
-
160
- ## Verification Expectations
161
-
162
- - If you touched API code: run API typecheck + tests.
163
- - If you touched CLI code: run CLI tests.
164
- - If you introduced a new endpoint: add at least one request-level test.
165
- - If you changed a template: update its tests to match.
166
-
167
- ## Common Pitfalls
168
-
169
- - Skipping tests because changes "look small"
170
- - Changing API contracts without updating schemas/tests
171
- - Writing files to project-specific directories when they should be platform-wide
172
- - Mixing platform content with project conventions (keep them separate)
173
- - Excessive comments that restate the code
174
- - Scope creep beyond task spec
175
- - Over-abstraction or premature generalization
176
- - Generic names (data, result, item) that obscure intent
177
-
178
- ## References
179
-
180
- - `plan-template.md` — copyable Full-tier plan template
@@ -1,201 +0,0 @@
1
- ---
2
- trigger: -
3
- description: Copyable full plan template. Use as starting point when writing a new plan.
4
- ---
5
- # Plan Template (Full Tier)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- > This template is for **Full tier** plans (4+ tasks, multi-wave, unfamiliar domain).
10
- > For Minimal or Standard plans, refer to the Plan Tiers section in `plan-guide.md` and extract only the sections you need.
11
-
12
- ## TL;DR
13
-
14
- > **Quick Summary**: <!-- 1-2 sentence summary of what this plan achieves -->
15
- >
16
- > **Deliverables**:
17
- >
18
- > - <!-- file/module 1 — what changes -->
19
- > - <!-- file/module 2 — what changes -->
20
- >
21
- > **Estimated Effort**: <!-- Short / Medium / Long -->
22
- > **Type**: <!-- FEATURE / BUG_FIX / ISSUE / REFACTOR / CHORE -->
23
- > **Parallel Execution**: <!-- YES / NO -->
24
- > **Critical Path**: <!-- Task X → Task Y → ... -->
25
-
26
- ---
27
-
28
- ## Context
29
-
30
- ### Original Request
31
-
32
- <!-- What the user/requester asked for and why -->
33
-
34
- ### Interview Summary
35
-
36
- <!-- Key decisions from Q&A with the requester (if applicable) -->
37
-
38
- ### Research Findings
39
-
40
- <!-- What you discovered from exploring the codebase, docs, or external sources -->
41
-
42
- ### Metis Review
43
-
44
- <!-- Gaps identified by Metis review (or self-check results) -->
45
-
46
- ---
47
-
48
- ## Work Objectives
49
-
50
- ### Core Objective
51
-
52
- <!-- One sentence: what success looks like -->
53
-
54
- ### Concrete Deliverables
55
-
56
- - <!-- file/module — description -->
57
-
58
- ### Definition of Done
59
-
60
- - <!-- Criterion 1 -->
61
- - <!-- Criterion 2 -->
62
-
63
- ### Must Have
64
-
65
- - <!-- Non-negotiable requirement -->
66
-
67
- ### Must NOT Have (Guardrails)
68
-
69
- - <!-- Explicitly forbidden action -->
70
-
71
- ---
72
-
73
- ## Verification Strategy
74
-
75
- > **ZERO HUMAN INTERVENTION** — ALL verification is agent-executed.
76
-
77
- ### QA Policy
78
-
79
- - <!-- Tool/command mapping: API→typecheck+test, CLI→test, Web→build+playwright -->
80
-
81
- ---
82
-
83
- ## Execution Strategy
84
-
85
- ### Parallel Execution Waves
86
-
87
- ~~~
88
- Wave 1:
89
- ├── Task 1: description [category]
90
- └── Task 2: description [category]
91
-
92
- Wave 2 (Wave 1 complete):
93
- └── Task 3: description [category]
94
- ~~~
95
-
96
- ---
97
-
98
- ## TODOs
99
-
100
- ---
101
-
102
- - 1. Task title
103
-
104
- **What to do**:
105
-
106
- <!-- Detailed steps -->
107
-
108
- **Must NOT do**:
109
-
110
- - <!-- Forbidden action -->
111
-
112
- **Recommended Agent Profile**:
113
-
114
- - **Category**: `<!-- category -->`
115
- - Reason: <!-- why this category -->
116
- - **Skills**: <!-- skill list or none -->
117
-
118
- **Parallelization**:
119
-
120
- - **Can Run In Parallel**: <!-- YES / NO -->
121
- - **Parallel Group**: <!-- Wave N -->
122
- - **Blocks**: <!-- Task N or none -->
123
- - **Blocked By**: <!-- Task N or none -->
124
-
125
- **References**:
126
-
127
- - <!-- file:lines — description -->
128
-
129
- **Acceptance Criteria**:
130
-
131
- - <!-- Verifiable criterion -->
132
-
133
- **QA Scenarios**:
134
-
135
- ~~~
136
- Scenario: description
137
- Tool: Bash
138
- Steps:
139
- 1. command
140
- Expected Result: what success looks like
141
- Failure Indicators: what failure looks like
142
- Evidence: .sisyphus/evidence/task-N-name.txt
143
- ~~~
144
-
145
- **Commit**: <!-- YES / NO -->
146
-
147
- - Message: `<!-- type(scope): description -->`
148
- - Files: <!-- file list -->
149
- - Pre-commit: `<!-- verification command -->`
150
-
151
- ---
152
-
153
- ## Final Verification Wave
154
-
155
- - F1. **Final check** — `quick`
156
-
157
- 1. <!-- verification command 1 -->
158
- 2. <!-- verification command 2 -->
159
-
160
- Output: `<!-- result format -->`
161
-
162
- ---
163
-
164
- ## Commit Strategy
165
-
166
- - **Task 1**: `<!-- commit message -->`
167
- - **Task 2**: `<!-- commit message -->`
168
-
169
- ## Success Criteria
170
-
171
- ~~~bash
172
- # <!-- description -->
173
- <!-- command -->
174
- # Expected: <!-- result -->
175
- ~~~
176
-
177
- ---
178
-
179
- ## QA Scenario Examples
180
-
181
- ### Good (specific, verifiable)
182
-
183
- ~~~
184
- Scenario: API returns 404 for non-existent plan
185
- Tool: Bash
186
- Steps:
187
- 1. curl -s -o /dev/null -w "%{http_code}" http://localhost:3001/api/plans/nonexistent-id
188
- Expected Result: 404
189
- Failure Indicators: 200 or 500
190
- Evidence: .sisyphus/evidence/plan-404.txt
191
- ~~~
192
-
193
- ### Bad (vague, unverifiable)
194
-
195
- ~~~
196
- Scenario: API works correctly
197
- Tool: Manual
198
- Steps:
199
- 1. Test the API
200
- Expected Result: It works
201
- ~~~
@@ -1,92 +0,0 @@
1
- ---
2
- trigger: model_decision
3
- description: Reference when writing a post mortem.
4
- ---
5
- # Post Mortem Guide (AgentTeams)
6
-
7
- > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
-
9
- A post mortem is a written analysis of an incident, focusing on root cause and prevention.
10
-
11
- ## Goals
12
-
13
- - Capture what happened and when
14
- - Identify the root cause (not symptoms)
15
- - Document the impact (users, revenue, SLA, operations)
16
- - Define concrete action items to prevent recurrence
17
-
18
- ## Before You Start
19
-
20
- - Collect logs, alerts, and key timestamps.
21
- - Identify the affected systems and user segments.
22
- - Confirm whether this was a one-off or part of a recurring pattern.
23
-
24
- ## Structure
25
-
26
- - Title: short incident identifier
27
- - Content: narrative of what happened and what was learned
28
- - Action items: specific tasks with owners and deadlines
29
- - Status: OPEN, IN_PROGRESS, or RESOLVED
30
-
31
- ## Root Cause Notes
32
-
33
- - Prefer a clear causal chain over vague labels.
34
- - Distinguish: trigger vs contributing factors vs detection failure.
35
- - Include "why it was not caught earlier".
36
-
37
- ## Tips
38
-
39
- - Use a clear timeline (timestamps if available)
40
- - Avoid blame; focus on systems and process
41
- - Include what detection/monitoring failed and how to improve it
42
-
43
- ## Action Items
44
-
45
- - Make action items concrete and testable.
46
- - Prefer small items with clear ownership.
47
- - Track them like normal plans if they require engineering work.
48
-
49
- ## Post Mortem Content Template
50
-
51
- Use this structure for the `--content` field or the `--file` content:
52
-
53
- ~~~markdown
54
- ## Summary
55
- <what happened — 1-2 sentences, be specific>
56
-
57
- ## Timeline
58
- - HH:MM - <event 1>
59
- - HH:MM - <event 2>
60
-
61
- ## Root Cause
62
- <specific cause, not symptoms — describe the causal chain>
63
-
64
- ## Impact
65
- <who/what was affected and for how long>
66
-
67
- ## What Went Wrong
68
- - <contributing factor 1>
69
- - <contributing factor 2>
70
-
71
- ## What Went Well
72
- - <what helped limit the damage or speed up recovery>
73
- ~~~
74
-
75
- ## Post Mortem File Naming
76
-
77
- Use `{first 8 characters of planId}-postmortem.md`. Example: if planId is `57a51ec2-cf70-...`, the file name is `57a51ec2-postmortem.md`.
78
-
79
- ## Useful Commands
80
-
81
- ~~~bash
82
- agentteams postmortem create \
83
- --plan-id {planId} \
84
- --title "<what broke — e.g., 'API 500 on plan finish after schema migration'>" \
85
- --file .agentteams/cli/temp/{planId-first-8-chars}-postmortem.md \
86
- --action-items "<specific preventive action 1>,<specific preventive action 2>" \
87
- --status OPEN
88
- ~~~
89
-
90
- Repository linkage note:
91
-
92
- - If .agentteams/config.json contains `repositoryId`, `postmortem create` links the postmortem to that repository automatically.
@@ -1,12 +0,0 @@
1
- export declare function reportStatus(apiUrl: string, projectId: string, headers: any, body: {
2
- agent: unknown;
3
- status: unknown;
4
- task: unknown;
5
- issues: string[];
6
- remaining: string[];
7
- }): Promise<any>;
8
- export declare function listStatuses(apiUrl: string, projectId: string, headers: any, params?: Record<string, number>): Promise<any>;
9
- export declare function getStatus(apiUrl: string, projectId: string, headers: any, id: string): Promise<any>;
10
- export declare function updateStatus(apiUrl: string, projectId: string, headers: any, id: string, body: Record<string, unknown>): Promise<any>;
11
- export declare function deleteStatus(apiUrl: string, projectId: string, headers: any, id: string): Promise<any>;
12
- //# sourceMappingURL=status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/api/status.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE;IACJ,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GACA,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,GAAG,CAAC,CAQd;AAED,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,GAAG,CAAC,CAMd"}
@@ -1,33 +0,0 @@
1
- import axios from 'axios';
2
- import { withoutJsonContentType } from '../utils/httpHeaders.js';
3
- export async function reportStatus(apiUrl, projectId, headers, body) {
4
- const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
5
- const response = await axios.post(baseUrl, body, { headers });
6
- return response.data;
7
- }
8
- export async function listStatuses(apiUrl, projectId, headers, params) {
9
- const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
10
- const requestConfig = params && Object.keys(params).length > 0
11
- ? { headers, params }
12
- : { headers };
13
- const response = await axios.get(baseUrl, requestConfig);
14
- return response.data;
15
- }
16
- export async function getStatus(apiUrl, projectId, headers, id) {
17
- const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
18
- const response = await axios.get(`${baseUrl}/${id}`, { headers });
19
- return response.data;
20
- }
21
- export async function updateStatus(apiUrl, projectId, headers, id, body) {
22
- const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
23
- const response = await axios.put(`${baseUrl}/${id}`, body, { headers });
24
- return response.data;
25
- }
26
- export async function deleteStatus(apiUrl, projectId, headers, id) {
27
- const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
28
- const response = await axios.delete(`${baseUrl}/${id}`, {
29
- headers: withoutJsonContentType(headers),
30
- });
31
- return response.data;
32
- }
33
- //# sourceMappingURL=status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/api/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,IAMC;IAED,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9D,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,MAA+B;IAE/B,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,aAAa,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;QAC5D,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE;QACrB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;IAEhB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACzD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,EAAU;IAEV,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAClE,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,EAAU,EACV,IAA6B;IAE7B,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACxE,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,EAAU;IAEV,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,EAAE;QACtD,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC;KACzC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function executeStatusCommand(apiUrl: string, projectId: string, headers: any, action: string, options: any): Promise<any>;
2
- //# sourceMappingURL=status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAGA,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,GACX,OAAO,CAAC,GAAG,CAAC,CA+Cd"}
@@ -1,60 +0,0 @@
1
- import { deleteStatus, getStatus, listStatuses, reportStatus, updateStatus } from '../api/status.js';
2
- import { splitCsv, toPositiveInteger } from '../utils/parsers.js';
3
- export async function executeStatusCommand(apiUrl, projectId, headers, action, options) {
4
- switch (action) {
5
- case 'report': {
6
- if (!options.status)
7
- throw new Error('--status is required for status report');
8
- if (!options.task)
9
- throw new Error('--task is required for status report');
10
- if (options.issues === undefined)
11
- throw new Error('--issues is required for status report');
12
- if (options.remaining === undefined)
13
- throw new Error('--remaining is required for status report');
14
- return reportStatus(apiUrl, projectId, headers, {
15
- agent: options.agent,
16
- status: options.status,
17
- task: options.task,
18
- issues: splitCsv(options.issues),
19
- remaining: splitCsv(options.remaining),
20
- });
21
- }
22
- case 'list': {
23
- const params = {};
24
- const page = toPositiveInteger(options.page);
25
- const pageSize = toPositiveInteger(options.pageSize);
26
- if (page !== undefined)
27
- params.page = page;
28
- if (pageSize !== undefined)
29
- params.pageSize = pageSize;
30
- return listStatuses(apiUrl, projectId, headers, params);
31
- }
32
- case 'get': {
33
- if (!options.id)
34
- throw new Error('--id is required for status get');
35
- return getStatus(apiUrl, projectId, headers, options.id);
36
- }
37
- case 'update': {
38
- if (!options.id)
39
- throw new Error('--id is required for status update');
40
- const body = {};
41
- if (options.status !== undefined)
42
- body.status = options.status;
43
- if (options.task !== undefined)
44
- body.task = options.task;
45
- if (options.issues !== undefined)
46
- body.issues = splitCsv(options.issues);
47
- if (options.remaining !== undefined)
48
- body.remaining = splitCsv(options.remaining);
49
- return updateStatus(apiUrl, projectId, headers, options.id, body);
50
- }
51
- case 'delete': {
52
- if (!options.id)
53
- throw new Error('--id is required for status delete');
54
- return deleteStatus(apiUrl, projectId, headers, options.id);
55
- }
56
- default:
57
- throw new Error(`Unknown action: ${action}`);
58
- }
59
- }
60
- //# sourceMappingURL=status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"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"}
@@ -1,7 +0,0 @@
1
- export declare function validateEnv(): void;
2
- export declare function normalizeUrl(url: string): string;
3
- export declare function getApiConfig(): {
4
- apiKey: string;
5
- apiUrl: string;
6
- };
7
- //# sourceMappingURL=env.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,YAAY;;;EAO3B"}
package/dist/utils/env.js DELETED
@@ -1,19 +0,0 @@
1
- export function validateEnv() {
2
- if (!process.env.AGENTTEAMS_API_KEY) {
3
- throw new Error('AGENTTEAMS_API_KEY environment variable is required');
4
- }
5
- if (!process.env.AGENTTEAMS_API_URL) {
6
- throw new Error('AGENTTEAMS_API_URL environment variable is required');
7
- }
8
- }
9
- export function normalizeUrl(url) {
10
- return url.endsWith('/') ? url.slice(0, -1) : url;
11
- }
12
- export function getApiConfig() {
13
- validateEnv();
14
- return {
15
- apiKey: process.env.AGENTTEAMS_API_KEY,
16
- apiUrl: normalizeUrl(process.env.AGENTTEAMS_API_URL),
17
- };
18
- }
19
- //# sourceMappingURL=env.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW;IACzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,WAAW,EAAE,CAAC;IAEd,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAmB;QACvC,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAmB,CAAC;KACtD,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function isCreatedByRequiredValidationError(error: unknown): boolean;
2
- export declare function resolveLegacyCreatedBy(options: any): string | undefined;
3
- //# sourceMappingURL=legacyCompat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyCompat.d.ts","sourceRoot":"","sources":["../../src/utils/legacyCompat.ts"],"names":[],"mappings":"AAGA,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAiB1E;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAIvE"}
@@ -1,20 +0,0 @@
1
- import axios from 'axios';
2
- import { toNonEmptyString } from './parsers.js';
3
- export function isCreatedByRequiredValidationError(error) {
4
- if (!axios.isAxiosError(error)) {
5
- return false;
6
- }
7
- const data = error.response?.data;
8
- const message = typeof data === 'string'
9
- ? data
10
- : [data?.message, data?.details, data?.error]
11
- .filter((value) => typeof value === 'string')
12
- .join(' ');
13
- return /required property ['"]createdBy['"]|body\.createdBy/i.test(message);
14
- }
15
- export function resolveLegacyCreatedBy(options) {
16
- return toNonEmptyString(options.createdBy)
17
- ?? toNonEmptyString(options.defaultCreatedBy)
18
- ?? undefined;
19
- }
20
- //# sourceMappingURL=legacyCompat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacyCompat.js","sourceRoot":"","sources":["../../src/utils/legacyCompat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,UAAU,kCAAkC,CAAC,KAAc;IAC/D,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAE,IAGhB,CAAC;IAEd,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ;QACtC,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC;aAC1C,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;aAC7D,IAAI,CAAC,GAAG,CAAC,CAAC;IAEf,OAAO,sDAAsD,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAY;IACjD,OAAO,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC;WACrC,gBAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC;WAC1C,SAAS,CAAC;AACjB,CAAC"}
Binary file