This commit is contained in:
seb
2026-10-17 02:59:35 +02:00
parent fd21cb7319
commit c61df92d63
13 changed files with 3214 additions and 2198 deletions

View File

@@ -0,0 +1,36 @@
# `DELETE /subagentschedule/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete subagent schedule
Deletes a subagent schedule for the selected company.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Schedule ID |
## Signals
On success, emits SSE signal: `subagentschedule` (see [`GET /events`](../events.md)).
## Response `204`
Schedule deleted successfully
_No content_
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Subagent schedule not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,47 @@
# `GET /subagentschedule/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get subagent schedule by ID
Retrieves a single subagent schedule for the selected company.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Schedule ID |
## Response `200`
Subagent schedule details
```json
{
"schedule": {
"id": 1,
"company_id": 1,
"desc": "…",
"prompt": "…",
"skills": "…",
"lastagentnote": "…",
"max_itr": 1,
"cron": "…",
"created_at": "…",
"lastrun_at": "…"
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Subagent schedule not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,75 @@
# `PUT /subagentschedule/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update subagent schedule
Updates an existing subagent schedule for the selected company.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Schedule ID |
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `prompt` | no | string | |
| `cron` | no | string | |
| `desc` | no | string | |
| `skills` | no | string | |
| `lastagentnote` | no | string | |
| `max_itr` | no | integer | |
| `lastrun_at` | no | string | |
```json
{
"prompt": "…",
"cron": "…",
"desc": "…",
"skills": "…",
"lastagentnote": "…",
"max_itr": 1,
"lastrun_at": "…"
}
```
## Signals
On success, emits SSE signal: `subagentschedule` (see [`GET /events`](../events.md)).
## Response `200`
Updated subagent schedule
```json
{
"schedule": {
"id": 1,
"company_id": 1,
"desc": "…",
"prompt": "…",
"skills": "…",
"lastagentnote": "…",
"max_itr": 1,
"cron": "…",
"created_at": "…",
"lastrun_at": "…"
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid input or invalid cron expression — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Subagent schedule not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._