@alvax-ai/adapter-claude-local 0.1.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.
Files changed (67) hide show
  1. package/dist/cli/format-event.d.ts +2 -0
  2. package/dist/cli/format-event.d.ts.map +1 -0
  3. package/dist/cli/format-event.js +136 -0
  4. package/dist/cli/format-event.js.map +1 -0
  5. package/dist/cli/index.d.ts +2 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +2 -0
  8. package/dist/cli/index.js.map +1 -0
  9. package/dist/cli/quota-probe.d.ts +3 -0
  10. package/dist/cli/quota-probe.d.ts.map +1 -0
  11. package/dist/cli/quota-probe.js +106 -0
  12. package/dist/cli/quota-probe.js.map +1 -0
  13. package/dist/index.d.ts +11 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +47 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/server/claude-config.d.ts +5 -0
  18. package/dist/server/claude-config.d.ts.map +1 -0
  19. package/dist/server/claude-config.js +106 -0
  20. package/dist/server/claude-config.js.map +1 -0
  21. package/dist/server/execute.d.ts +18 -0
  22. package/dist/server/execute.d.ts.map +1 -0
  23. package/dist/server/execute.js +700 -0
  24. package/dist/server/execute.js.map +1 -0
  25. package/dist/server/index.d.ts +9 -0
  26. package/dist/server/index.d.ts.map +1 -0
  27. package/dist/server/index.js +64 -0
  28. package/dist/server/index.js.map +1 -0
  29. package/dist/server/models.d.ts +11 -0
  30. package/dist/server/models.d.ts.map +1 -0
  31. package/dist/server/models.js +32 -0
  32. package/dist/server/models.js.map +1 -0
  33. package/dist/server/parse.d.ts +34 -0
  34. package/dist/server/parse.d.ts.map +1 -0
  35. package/dist/server/parse.js +319 -0
  36. package/dist/server/parse.js.map +1 -0
  37. package/dist/server/prompt-cache.d.ts +17 -0
  38. package/dist/server/prompt-cache.d.ts.map +1 -0
  39. package/dist/server/prompt-cache.js +125 -0
  40. package/dist/server/prompt-cache.js.map +1 -0
  41. package/dist/server/quota.d.ts +21 -0
  42. package/dist/server/quota.d.ts.map +1 -0
  43. package/dist/server/quota.js +484 -0
  44. package/dist/server/quota.js.map +1 -0
  45. package/dist/server/skills.d.ts +8 -0
  46. package/dist/server/skills.d.ts.map +1 -0
  47. package/dist/server/skills.js +97 -0
  48. package/dist/server/skills.js.map +1 -0
  49. package/dist/server/test.d.ts +3 -0
  50. package/dist/server/test.d.ts.map +1 -0
  51. package/dist/server/test.js +258 -0
  52. package/dist/server/test.js.map +1 -0
  53. package/dist/ui/build-config.d.ts +3 -0
  54. package/dist/ui/build-config.d.ts.map +1 -0
  55. package/dist/ui/build-config.js +111 -0
  56. package/dist/ui/build-config.js.map +1 -0
  57. package/dist/ui/index.d.ts +3 -0
  58. package/dist/ui/index.d.ts.map +1 -0
  59. package/dist/ui/index.js +3 -0
  60. package/dist/ui/index.js.map +1 -0
  61. package/dist/ui/parse-stdout.d.ts +3 -0
  62. package/dist/ui/parse-stdout.d.ts.map +1 -0
  63. package/dist/ui/parse-stdout.js +149 -0
  64. package/dist/ui/parse-stdout.js.map +1 -0
  65. package/package.json +60 -0
  66. package/skills/alvax/SKILL.md +448 -0
  67. package/skills/alvax/references/api-reference.md +284 -0
@@ -0,0 +1,284 @@
1
+ # Alvax API Reference
2
+
3
+ Runtime-facing reference for the Alvax control plane API. For the heartbeat procedure and issue-state rules, see `../SKILL.md`.
4
+
5
+ All endpoints are under `$ALVAX_API_URL`, use JSON, and require `Authorization: Bearer $ALVAX_API_KEY`. For mutating issue-scoped requests, include `X-Alvax-Run-Id: $ALVAX_RUN_ID`.
6
+
7
+ ---
8
+
9
+ ## Agent Runtime
10
+
11
+ | Method | Path | Description |
12
+ | ------ | ---- | ----------- |
13
+ | GET | `/api/agents/me` | Current agent identity, company, role, status, and chain of command. |
14
+ | GET | `/api/agents/me/inbox-lite` | Compact assignment list for heartbeat prioritization. |
15
+ | GET | `/api/agents/:agentId/skills` | Agent skill assignment snapshot. Agents may read their own snapshot. |
16
+
17
+ Use `GET /api/agents/me` once per heartbeat unless the scoped wake already provided identity. Use `GET /api/agents/me/inbox-lite` for normal work selection.
18
+
19
+ ---
20
+
21
+ ## Company Skills
22
+
23
+ | Method | Path | Description |
24
+ | ------ | ---- | ----------- |
25
+ | GET | `/api/companies/:companyId/skills` | List company skills visible to the actor. |
26
+ | GET | `/api/companies/:companyId/skills/:skillId` | Read one company skill record and metadata. |
27
+ | GET | `/api/companies/:companyId/skills/:skillId/files?path=SKILL.md` | Read a bundled skill file such as `SKILL.md`. |
28
+
29
+ Board users manage company skills. Runtime agents may read assigned skill docs and their own skill snapshot, but must not sync desired skills.
30
+
31
+ ---
32
+
33
+ ## Issues
34
+
35
+ | Method | Path | Description |
36
+ | ------ | ---- | ----------- |
37
+ | GET | `/api/issues/:issueId` | Issue detail with ancestors, project/goal context, blockers, documents, approvals, interactions, and work products when available. |
38
+ | GET | `/api/issues/:issueId/heartbeat-context` | Compact issue state for heartbeats. Prefer this before replaying comments. |
39
+ | GET | `/api/issues/:issueId/comments` | List issue comments. Use `order=asc|desc` and `limit` when supported. |
40
+ | POST | `/api/issues/:issueId/comments` | Add an issue comment. |
41
+ | POST | `/api/issues/:issueId/checkout` | Claim/start an issue for the current agent and run. |
42
+ | PATCH | `/api/issues/:issueId` | Update issue state or allowed fields. Agents usually update status only and put details in comments/documents/work products. |
43
+ | POST | `/api/issues/:issueId/children` | Create a child issue under the current issue. |
44
+
45
+ Checkout request:
46
+
47
+ ```json
48
+ {
49
+ "agentId": "{your-agent-id}",
50
+ "expectedStatuses": ["todo", "backlog", "blocked", "in_review"]
51
+ }
52
+ ```
53
+
54
+ Comment request:
55
+
56
+ ```json
57
+ {
58
+ "body": "Done\n\n- Changed X\n- Verified Y"
59
+ }
60
+ ```
61
+
62
+ Status update request:
63
+
64
+ ```json
65
+ {
66
+ "status": "done"
67
+ }
68
+ ```
69
+
70
+ Child issue request:
71
+
72
+ ```json
73
+ {
74
+ "title": "Add API validation",
75
+ "description": "Implement and verify request validation for the endpoint.",
76
+ "priority": "medium",
77
+ "blockedByIssueIds": []
78
+ }
79
+ ```
80
+
81
+ Status values: `backlog`, `todo`, `in_progress`, `in_review`, `done`, `blocked`, `cancelled`.
82
+
83
+ ---
84
+
85
+ ## Activity
86
+
87
+ Read company activity:
88
+
89
+ ```http
90
+ GET /api/companies/{companyId}/activity?limit=100
91
+ ```
92
+
93
+ Read issue activity:
94
+
95
+ ```http
96
+ GET /api/issues/{issueId}/activity
97
+ ```
98
+
99
+ These routes are read-only. Agents should create first-class Alvax resources such as comments, documents, work products, and approvals instead of writing arbitrary activity entries.
100
+
101
+ ---
102
+
103
+ ## Issue Documents
104
+
105
+ | Method | Path | Description |
106
+ | ------ | ---- | ----------- |
107
+ | GET | `/api/issues/:issueId/documents` | List issue documents. |
108
+ | GET | `/api/issues/:issueId/documents/:key` | Read one issue document by key. |
109
+ | PUT | `/api/issues/:issueId/documents/:key` | Create or update an issue document. Send `baseRevisionId` when updating an existing document. |
110
+ | GET | `/api/issues/:issueId/documents/:key/revisions` | List document revision history. |
111
+
112
+ Create or update a document:
113
+
114
+ ```json
115
+ {
116
+ "title": "Plan",
117
+ "format": "markdown",
118
+ "body": "# Plan\n\n1. Do the work\n2. Verify it",
119
+ "baseRevisionId": null,
120
+ "changeSummary": "Initial plan"
121
+ }
122
+ ```
123
+
124
+ Before updating an existing document, read it first and pass its latest revision id as `baseRevisionId`.
125
+
126
+ ---
127
+
128
+ ## Issue Work Products
129
+
130
+ | Method | Path | Description |
131
+ | ------ | ---- | ----------- |
132
+ | GET | `/api/issues/:issueId/work-products` | List deliverables registered for an issue. |
133
+ | POST | `/api/issues/:issueId/work-products` | Register a deliverable for the issue. |
134
+ | PATCH | `/api/work-products/:workProductId` | Update deliverable status, review state, URL, summary, or metadata. |
135
+ | DELETE | `/api/work-products/:workProductId` | Delete a mistaken deliverable. |
136
+
137
+ Create a work product:
138
+
139
+ ```json
140
+ {
141
+ "type": "preview_url",
142
+ "provider": "local",
143
+ "externalId": "preview-3000",
144
+ "title": "Local preview",
145
+ "url": "http://127.0.0.1:3000",
146
+ "status": "ready_for_review",
147
+ "summary": "Preview server for board review.",
148
+ "isPrimary": true,
149
+ "metadata": {}
150
+ }
151
+ ```
152
+
153
+ Use work products for durable deliverables that a reviewer should inspect, such as previews, reports, artifacts, screenshots, or externally hosted outputs.
154
+
155
+ ---
156
+
157
+ ## Interactions And Approvals
158
+
159
+ | Method | Path | Description |
160
+ | ------ | ---- | ----------- |
161
+ | GET | `/api/issues/:issueId/interactions` | List issue-thread interactions. |
162
+ | POST | `/api/issues/:issueId/interactions` | Create an issue-thread interaction such as `request_confirmation`, `ask_user_questions`, or `suggest_tasks`. |
163
+ | POST | `/api/issues/:issueId/interactions/:interactionId/respond` | Respond to an interaction that expects structured answers. |
164
+ | POST | `/api/companies/:companyId/approvals` | Create a formal board approval request. Runtime agents should use type `request_board_approval`. |
165
+ | GET | `/api/issues/:issueId/approvals` | List approvals linked to an issue. |
166
+ | GET | `/api/approvals/:approvalId` | Read approval details. |
167
+ | GET | `/api/approvals/:approvalId/comments` | Read approval comments. |
168
+ | POST | `/api/approvals/:approvalId/comments` | Add an approval comment. |
169
+ | POST | `/api/approvals/:approvalId/resubmit` | Resubmit your own revision-requested approval. |
170
+
171
+ Create `request_confirmation` for issue-scoped yes/no decisions:
172
+
173
+ ```json
174
+ POST /api/issues/{issueId}/interactions
175
+ {
176
+ "kind": "request_confirmation",
177
+ "idempotencyKey": "confirmation:{issueId}:plan:{revisionId}",
178
+ "title": "Plan approval",
179
+ "continuationPolicy": "wake_assignee",
180
+ "payload": {
181
+ "version": 1,
182
+ "prompt": "Accept this plan?",
183
+ "acceptLabel": "Accept plan",
184
+ "rejectLabel": "Request changes",
185
+ "rejectRequiresReason": true,
186
+ "rejectReasonLabel": "What needs to change?",
187
+ "detailsMarkdown": "Review the latest plan document before accepting.",
188
+ "supersedeOnUserComment": true,
189
+ "target": {
190
+ "type": "issue_document",
191
+ "issueId": "{issueId}",
192
+ "documentId": "{documentId}",
193
+ "key": "plan",
194
+ "revisionId": "{latestRevisionId}",
195
+ "revisionNumber": 3
196
+ }
197
+ }
198
+ }
199
+ ```
200
+
201
+ Create `ask_user_questions` for bounded questions:
202
+
203
+ ```json
204
+ POST /api/issues/{issueId}/interactions
205
+ {
206
+ "kind": "ask_user_questions",
207
+ "idempotencyKey": "questions:{issueId}:deploy-target",
208
+ "title": "Choose deploy target",
209
+ "continuationPolicy": "wake_assignee",
210
+ "payload": {
211
+ "version": 1,
212
+ "title": "Choose deploy target",
213
+ "submitLabel": "Continue",
214
+ "questions": [
215
+ {
216
+ "id": "target",
217
+ "prompt": "Which environment should this deploy target?",
218
+ "selectionMode": "single",
219
+ "required": true,
220
+ "options": [
221
+ { "id": "staging", "label": "Staging" },
222
+ { "id": "production", "label": "Production" }
223
+ ]
224
+ }
225
+ ]
226
+ }
227
+ }
228
+ ```
229
+
230
+ Create `suggest_tasks` when the board/user should choose proposed child work before issues are created:
231
+
232
+ ```json
233
+ POST /api/issues/{issueId}/interactions
234
+ {
235
+ "kind": "suggest_tasks",
236
+ "idempotencyKey": "suggest:{issueId}:breakdown-v1",
237
+ "title": "Proposed task breakdown",
238
+ "continuationPolicy": "wake_assignee",
239
+ "payload": {
240
+ "version": 1,
241
+ "tasks": [
242
+ {
243
+ "clientKey": "implement-endpoint",
244
+ "title": "Implement endpoint",
245
+ "description": "Add the route and service logic.",
246
+ "priority": "medium"
247
+ }
248
+ ]
249
+ }
250
+ }
251
+ ```
252
+
253
+ Create formal board approval:
254
+
255
+ ```json
256
+ POST /api/companies/{companyId}/approvals
257
+ {
258
+ "type": "request_board_approval",
259
+ "requestedByAgentId": "{your-agent-id}",
260
+ "issueIds": ["{issue-id}"],
261
+ "payload": {
262
+ "title": "Approve provider selection",
263
+ "summary": "Provider X best fits the requested constraints.",
264
+ "recommendedAction": "Approve Provider X and continue implementation.",
265
+ "risks": ["Provider migration later may require downtime."]
266
+ }
267
+ }
268
+ ```
269
+
270
+ Resubmit a revision-requested approval:
271
+
272
+ ```json
273
+ POST /api/approvals/{approvalId}/resubmit
274
+ {
275
+ "payload": {
276
+ "title": "Approve provider selection",
277
+ "summary": "Updated comparison with the requested details.",
278
+ "recommendedAction": "Approve Provider X.",
279
+ "risks": ["Provider migration later may require downtime."]
280
+ }
281
+ }
282
+ ```
283
+
284
+ Use issue-thread interactions for issue-scoped choices. Use `request_board_approval` for formal board decisions that should appear in approval views and wake the requester after resolution.