@rse/ase 2.0.2 → 2.0.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/dst/ase-agent-definition-core.js +111 -87
- package/dst/ase-agent-fleet.js +1 -1
- package/dst/ase-agent-runtime-claim.js +5 -3
- package/dst/ase-agent-runtime-engine.js +1 -1
- package/dst/ase-agent-runtime-phase.js +1 -1
- package/dst/ase-agent-runtime-request.js +1 -1
- package/dst/ase-agent-runtime.js +3 -5
- package/dst/ase-artifact.js +3 -3
- package/dst/ase-config-core.js +2 -16
- package/dst/ase-config-schema.js +1 -3
- package/dst/ase-config.js +2 -0
- package/dst/ase-hook.js +13 -13
- package/dst/ase-lib-daemon-cli.js +117 -4
- package/dst/ase-lib-server-cli.js +4 -5
- package/dst/ase-lib-version.js +14 -5
- package/dst/ase-man-catalog.js +229 -0
- package/dst/ase-man-render.js +278 -0
- package/dst/ase-man-tui.js +636 -0
- package/dst/ase-man.js +33 -27
- package/dst/ase-mcp.js +4 -4
- package/dst/ase-service-getopt.js +2 -2
- package/dst/ase-service-otel.js +4 -4
- package/dst/ase-service-skills.js +5 -15
- package/dst/ase-service.js +87 -210
- package/dst/ase-setup-common.js +1 -2
- package/dst/ase-setup-settings.js +6 -9
- package/dst/ase-setup.js +4 -5
- package/dst/ase-spec.js +103 -20
- package/dst/ase-statusline.js +170 -170
- package/dst/ase-task-board-filter.js +5 -4
- package/dst/ase-task-board-flow.js +7 -6
- package/dst/ase-task-board-graph.js +5 -4
- package/dst/ase-task-board-tui-control.js +41 -35
- package/dst/ase-task-board-tui-model.js +185 -167
- package/dst/ase-task-board-tui-popup.js +2 -3
- package/dst/ase-task-board-tui-view.js +74 -70
- package/dst/ase-task-board-web-client.js +27 -27
- package/dst/ase-task-board-web-server.js +2 -2
- package/dst/ase-task-board.js +1 -1
- package/dst/ase-task-format.js +1 -1
- package/dst/ase-task-store-client.js +17 -5
- package/dst/ase-task-store-core.js +5 -7
- package/dst/ase-task-store-issues.js +16 -1
- package/dst/ase-task-store-plugin-ase.js +7 -3
- package/dst/ase-task-store-plugin-gitea.js +9 -32
- package/dst/ase-task-store-plugin-github.js +3 -12
- package/dst/ase-task-store-plugin-gitlab.js +2 -18
- package/dst/ase-task.js +51 -23
- package/dst/ase-util-compat.js +1 -1
- package/dst/ase-util-diagram.js +13 -37
- package/dst/ase.js +5 -5
- package/dst/man/ase-agent-adhoc.md +1165 -0
- package/dst/man/ase-agent-condenser.md +383 -0
- package/dst/man/ase-agent-editor.md +441 -0
- package/dst/man/ase-agent-estimator.md +477 -0
- package/dst/man/ase-agent-fleet.md +358 -0
- package/dst/man/ase-agent-implementer.md +521 -0
- package/dst/man/ase-agent-integrator.md +449 -0
- package/dst/man/ase-agent-qualifier.md +426 -0
- package/dst/man/ase-agent-rebooter.md +384 -0
- package/dst/man/ase-agent-relay.md +262 -0
- package/dst/man/ase-agent-researcher.md +478 -0
- package/dst/man/ase-agent.md +628 -0
- package/dst/man/ase-artifact-list.md +57 -0
- package/dst/man/ase-artifact-name.md +56 -0
- package/dst/man/ase-artifact.md +92 -0
- package/dst/man/ase-config-delete.md +74 -0
- package/dst/man/ase-config-edit.md +83 -0
- package/dst/man/ase-config-get.md +70 -0
- package/dst/man/ase-config-init.md +110 -0
- package/dst/man/ase-config-list.md +68 -0
- package/dst/man/ase-config-set.md +92 -0
- package/dst/man/ase-config.md +426 -0
- package/dst/man/ase-hook-permission-request.md +61 -0
- package/dst/man/ase-hook-pre-tool-use.md +96 -0
- package/dst/man/ase-hook-session-end.md +71 -0
- package/dst/man/ase-hook-session-persona.md +65 -0
- package/dst/man/ase-hook-session-start.md +184 -0
- package/dst/man/ase-hook-stop.md +52 -0
- package/dst/man/ase-hook-user-prompt-submit.md +54 -0
- package/dst/man/ase-hook.md +93 -0
- package/dst/man/ase-man.md +195 -0
- package/dst/man/ase-mcp.md +102 -0
- package/dst/man/ase-service-log.md +59 -0
- package/dst/man/ase-service-send.md +60 -0
- package/dst/man/ase-service-start.md +93 -0
- package/dst/man/ase-service-status.md +58 -0
- package/dst/man/ase-service-stop.md +52 -0
- package/dst/man/ase-service.md +124 -0
- package/dst/man/ase-setup-disable.md +67 -0
- package/dst/man/ase-setup-enable.md +66 -0
- package/dst/man/ase-setup-install.md +116 -0
- package/dst/man/ase-setup-mcp.md +213 -0
- package/dst/man/ase-setup-status.md +101 -0
- package/dst/man/ase-setup-statusline.md +162 -0
- package/dst/man/ase-setup-telemetry.md +166 -0
- package/dst/man/ase-setup-uninstall.md +85 -0
- package/dst/man/ase-setup-update.md +117 -0
- package/dst/man/ase-setup.md +156 -0
- package/dst/man/ase-spec-export.md +99 -0
- package/dst/man/ase-spec-init.md +57 -0
- package/dst/man/ase-spec-lint.md +74 -0
- package/dst/man/ase-spec-preview.md +57 -0
- package/dst/man/ase-spec.md +85 -0
- package/dst/man/ase-statusline.md +330 -0
- package/dst/man/ase-task-assign.md +138 -0
- package/dst/man/ase-task-board.md +651 -0
- package/dst/man/ase-task-delete.md +46 -0
- package/dst/man/ase-task-edit.md +73 -0
- package/dst/man/ase-task-idscheme.md +92 -0
- package/dst/man/ase-task-lifecycle.md +92 -0
- package/dst/man/ase-task-list.md +86 -0
- package/dst/man/ase-task-load.md +48 -0
- package/dst/man/ase-task-newid.md +100 -0
- package/dst/man/ase-task-purge.md +49 -0
- package/dst/man/ase-task-rename.md +69 -0
- package/dst/man/ase-task-request.md +108 -0
- package/dst/man/ase-task-save.md +78 -0
- package/dst/man/ase-task-status.md +79 -0
- package/dst/man/ase-task-store.md +377 -0
- package/dst/man/ase-task-view.md +50 -0
- package/dst/man/ase-task.md +335 -0
- package/dst/man/ase-util-compat.md +38 -0
- package/dst/man/ase-util-diagram.md +140 -0
- package/dst/man/ase-util-meta.md +68 -0
- package/dst/man/ase-util-metric.md +74 -0
- package/dst/man/ase-util-mint.md +85 -0
- package/dst/man/ase-util-worktree.md +109 -0
- package/dst/man/ase-util.md +81 -0
- package/dst/man/ase.md +228 -0
- package/package.json +12 -17
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-code-lint.md +3 -3
- package/plugin/agents/ase-docs-proofread.md +3 -3
- package/plugin/agents/ase-docs-refine.md +3 -3
- package/plugin/agents/ase-spec-lint.md +338 -0
- package/plugin/meta/ase-skill.md +7 -0
- package/plugin/mods/ase-mods.ts +10 -7
- package/plugin/mods/claude-code.d.ts +26 -3
- package/plugin/skills/ase-code-analyze/SKILL.md +18 -10
- package/plugin/skills/ase-code-analyze/help.md +11 -6
- package/plugin/skills/ase-code-lint/SKILL.md +37 -23
- package/plugin/skills/ase-code-lint/help.md +10 -5
- package/plugin/skills/ase-help-intent/data.md +204 -13
- package/plugin/skills/ase-help-skill/catalog.md +1 -0
- package/plugin/skills/ase-meta-workflow/workflow.txt +2 -0
- package/plugin/skills/ase-repo-commit/SKILL.md +1 -0
- package/plugin/skills/ase-repo-merge/SKILL.md +1 -0
- package/plugin/skills/ase-repo-review/SKILL.md +5 -3
- package/plugin/skills/ase-repo-review/help.md +3 -1
- package/plugin/skills/ase-spec-edit/SKILL.md +3 -3
- package/plugin/skills/ase-spec-edit/help.md +1 -1
- package/plugin/skills/ase-spec-lint/SKILL.md +695 -0
- package/plugin/skills/ase-spec-lint/help.md +171 -0
- package/plugin/skills/ase-task-implement/SKILL.md +24 -6
- package/plugin/skills/ase-task-implement/help.md +11 -1
- package/dst/man/ase-agent-adhoc.1 +0 -515
- package/dst/man/ase-agent-condenser.1 +0 -193
- package/dst/man/ase-agent-editor.1 +0 -212
- package/dst/man/ase-agent-estimator.1 +0 -214
- package/dst/man/ase-agent-fleet.1 +0 -185
- package/dst/man/ase-agent-implementer.1 +0 -233
- package/dst/man/ase-agent-integrator.1 +0 -213
- package/dst/man/ase-agent-qualifier.1 +0 -214
- package/dst/man/ase-agent-rebooter.1 +0 -193
- package/dst/man/ase-agent-relay.1 +0 -128
- package/dst/man/ase-agent-researcher.1 +0 -217
- package/dst/man/ase-agent.1 +0 -264
- package/dst/man/ase-artifact-list.1 +0 -38
- package/dst/man/ase-artifact-name.1 +0 -39
- package/dst/man/ase-artifact.1 +0 -56
- package/dst/man/ase-config-delete.1 +0 -45
- package/dst/man/ase-config-edit.1 +0 -48
- package/dst/man/ase-config-get.1 +0 -46
- package/dst/man/ase-config-init.1 +0 -60
- package/dst/man/ase-config-list.1 +0 -42
- package/dst/man/ase-config-set.1 +0 -52
- package/dst/man/ase-config.1 +0 -231
- package/dst/man/ase-hook-permission-request.1 +0 -36
- package/dst/man/ase-hook-pre-tool-use.1 +0 -59
- package/dst/man/ase-hook-session-end.1 +0 -47
- package/dst/man/ase-hook-session-persona.1 +0 -37
- package/dst/man/ase-hook-session-start.1 +0 -81
- package/dst/man/ase-hook-stop.1 +0 -34
- package/dst/man/ase-hook-user-prompt-submit.1 +0 -34
- package/dst/man/ase-hook.1 +0 -51
- package/dst/man/ase-man.1 +0 -67
- package/dst/man/ase-mcp.1 +0 -61
- package/dst/man/ase-service-log.1 +0 -43
- package/dst/man/ase-service-send.1 +0 -47
- package/dst/man/ase-service-start.1 +0 -54
- package/dst/man/ase-service-status.1 +0 -46
- package/dst/man/ase-service-stop.1 +0 -37
- package/dst/man/ase-service.1 +0 -85
- package/dst/man/ase-setup-disable.1 +0 -44
- package/dst/man/ase-setup-enable.1 +0 -45
- package/dst/man/ase-setup-install.1 +0 -73
- package/dst/man/ase-setup-mcp.1 +0 -124
- package/dst/man/ase-setup-status.1 +0 -60
- package/dst/man/ase-setup-statusline.1 +0 -92
- package/dst/man/ase-setup-telemetry.1 +0 -92
- package/dst/man/ase-setup-uninstall.1 +0 -59
- package/dst/man/ase-setup-update.1 +0 -64
- package/dst/man/ase-setup.1 +0 -93
- package/dst/man/ase-spec-export.1 +0 -62
- package/dst/man/ase-spec-lint.1 +0 -40
- package/dst/man/ase-spec-preview.1 +0 -40
- package/dst/man/ase-spec.1 +0 -46
- package/dst/man/ase-statusline.1 +0 -189
- package/dst/man/ase-task-assign.1 +0 -71
- package/dst/man/ase-task-board.1 +0 -384
- package/dst/man/ase-task-delete.1 +0 -35
- package/dst/man/ase-task-edit.1 +0 -46
- package/dst/man/ase-task-idscheme.1 +0 -65
- package/dst/man/ase-task-lifecycle.1 +0 -57
- package/dst/man/ase-task-list.1 +0 -47
- package/dst/man/ase-task-load.1 +0 -36
- package/dst/man/ase-task-newid.1 +0 -61
- package/dst/man/ase-task-purge.1 +0 -37
- package/dst/man/ase-task-rename.1 +0 -44
- package/dst/man/ase-task-request.1 +0 -61
- package/dst/man/ase-task-save.1 +0 -48
- package/dst/man/ase-task-status.1 +0 -55
- package/dst/man/ase-task-store.1 +0 -194
- package/dst/man/ase-task-view.1 +0 -40
- package/dst/man/ase-task.1 +0 -160
- package/dst/man/ase-util-compat.1 +0 -25
- package/dst/man/ase-util-diagram.1 +0 -76
- package/dst/man/ase-util-meta.1 +0 -45
- package/dst/man/ase-util-metric.1 +0 -54
- package/dst/man/ase-util-mint.1 +0 -59
- package/dst/man/ase-util-worktree.1 +0 -72
- package/dst/man/ase-util.1 +0 -50
- package/dst/man/ase.1 +0 -124
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# ase-agent-rebooter(1) -- Plan Rebooting Agent
|
|
2
|
+
|
|
3
|
+
## SYNOPSIS
|
|
4
|
+
|
|
5
|
+
`ase agent rebooter start`
|
|
6
|
+
\[`-n`|`--name` *name*\]
|
|
7
|
+
\[`-t`|`--tool` `claude`|`copilot`|`codex`\]
|
|
8
|
+
\[`-p`|`--parallel` *num*\]
|
|
9
|
+
\[`-T`|`--timeout` *duration*\]
|
|
10
|
+
\[`-o`|`--one-shot`\]
|
|
11
|
+
\[`--agent-relay` *url*\]
|
|
12
|
+
\[`--`*group*`-`*item* *value* \[...\]\]
|
|
13
|
+
\[`-f`|`--foreground`\]
|
|
14
|
+
|
|
15
|
+
`ase agent rebooter status`
|
|
16
|
+
\[`-n`|`--name` *name*\]
|
|
17
|
+
|
|
18
|
+
`ase agent rebooter log`
|
|
19
|
+
\[`-f`|`--follow`\]
|
|
20
|
+
\[`-n`|`--lines` *n*\]
|
|
21
|
+
\[`--name` *name*\]
|
|
22
|
+
|
|
23
|
+
`ase agent rebooter stop`
|
|
24
|
+
\[`-n`|`--name` *name*\]
|
|
25
|
+
|
|
26
|
+
## DESCRIPTION
|
|
27
|
+
|
|
28
|
+
**ase agent rebooter** re-creates the plans of tasks in the `Planning`
|
|
29
|
+
phase of the `enterprise` task lifecycle model (refused for any other
|
|
30
|
+
model) from scratch.
|
|
31
|
+
|
|
32
|
+
As a plan is re-created only on the explicit request of a human, the
|
|
33
|
+
rebooter claims only the tasks in the state `DRAFTED` whose `Assignee:`
|
|
34
|
+
frontmatter key already is its agent name (default: `rebooter`), i.e.,
|
|
35
|
+
which a human assigned to the rebooter. Such a task is claimed
|
|
36
|
+
immediately, without waiting for its `After:` predecessors (and, for an
|
|
37
|
+
explicit epic, its group members), except for a predecessor still being
|
|
38
|
+
processed by a rebooter or a cancelled `After:` predecessor.
|
|
39
|
+
|
|
40
|
+
The rebooter moves each claimed task into `PLANNING`, tags it with
|
|
41
|
+
`ase-agent-rebooter:active`, and reboots its plan via the skill
|
|
42
|
+
invocation `ase-task-reboot --next DONE` *id*. The skill itself resets a
|
|
43
|
+
successfully rebooted plan into `DRAFTED` (the processing succeeds only
|
|
44
|
+
then). Afterwards, on success as well as on failure, the rebooter puts
|
|
45
|
+
the task back into `DRAFTED` (for its review and its promotion into
|
|
46
|
+
`PLANNED` by a human), removes its tag, and unassigns it. As the task is
|
|
47
|
+
no longer assigned to the rebooter, it is not claimed again, while
|
|
48
|
+
assigning it to the rebooter again requests another reboot.
|
|
49
|
+
|
|
50
|
+
On an interrupt, a task being processed is put back, untagged and with
|
|
51
|
+
its previous assignee (i.e., still assigned to the rebooter), into
|
|
52
|
+
`DRAFTED`. The rebooter works in the project root only, so it
|
|
53
|
+
neither requires a Git working copy nor `git`, and it accepts no
|
|
54
|
+
`--repo` and `--tempdir`. See `ase-agent`(1) for the common mechanics of
|
|
55
|
+
all agents.
|
|
56
|
+
|
|
57
|
+
## OPTIONS
|
|
58
|
+
|
|
59
|
+
- \[`-h`|`--help`\]: Show usage information of `ase agent rebooter` (or
|
|
60
|
+
of the given sub-command) only.
|
|
61
|
+
|
|
62
|
+
All other options belong to the sub-commands (see **COMMANDS**).
|
|
63
|
+
|
|
64
|
+
## COMMANDS
|
|
65
|
+
|
|
66
|
+
- `ase agent rebooter start` \[*options*\]: Start the rebooter agent in
|
|
67
|
+
the background, logging into `.ase/agent/`*name*`.log`. The agent is
|
|
68
|
+
validated and initialized (e.g., its agent tool is looked up and the
|
|
69
|
+
task lifecycle model is checked) before the command returns (waiting
|
|
70
|
+
up to 30 seconds), so a failing agent is reported together with the
|
|
71
|
+
tail of its log. An agent of the same name already running is left
|
|
72
|
+
alone. The options are:
|
|
73
|
+
|
|
74
|
+
- \[`-n`|`--name` *name*\]: The name of the agent (default:
|
|
75
|
+
`rebooter`): up to 64 letters, digits, underscores, and dashes,
|
|
76
|
+
starting with a letter or digit, other than the name of another
|
|
77
|
+
agent kind, `relay`, or `fleet`.
|
|
78
|
+
|
|
79
|
+
It names the agent in its log lines (also in the shared processing
|
|
80
|
+
log attachment `agent`), the `Assignee:` of the tasks it
|
|
81
|
+
processes, and its process files `.ase/agent/`*name*`.yaml` and
|
|
82
|
+
`.ase/agent/`*name*`.log`. Agents of the kind `rebooter` under
|
|
83
|
+
different names form a pool, competing for the same tasks, but each
|
|
84
|
+
claims only the tasks explicitly assigned to its own name.
|
|
85
|
+
|
|
86
|
+
- \[`-t`|`--tool` *tool*\]: The headless agent tool processing the
|
|
87
|
+
tasks: `claude` (*Anthropic Claude Code CLI*), `copilot` (*GitHub
|
|
88
|
+
Copilot CLI*), or `codex` (*OpenAI Codex CLI*) (default:
|
|
89
|
+
`$ASE_TOOL`, else `claude`). Its command has to be found in
|
|
90
|
+
`$PATH`.
|
|
91
|
+
|
|
92
|
+
- \[`-p`|`--parallel` *num*\]: The maximum number of tasks processed
|
|
93
|
+
in parallel by this agent (default: `1`), a positive integer.
|
|
94
|
+
|
|
95
|
+
- \[`-T`|`--timeout` *duration*\]: The maximum duration of
|
|
96
|
+
processing a task (the run of the agent tool), as *number* *unit*
|
|
97
|
+
(without a space) with *unit* `s` (seconds), `m` (minutes), or `h`
|
|
98
|
+
(hours) (default: `60m`). A processing exceeding it is aborted and
|
|
99
|
+
counts as failed.
|
|
100
|
+
|
|
101
|
+
- \[`-o`|`--one-shot`\]: Terminate the agent, instead of observing
|
|
102
|
+
for further tasks, once a check of the task store finds no
|
|
103
|
+
dispatchable task while the agent processes no task anymore --
|
|
104
|
+
intended for CI contexts like GitHub Actions, and not allowed in a
|
|
105
|
+
fleet. A task still waiting for its predecessors at that time is
|
|
106
|
+
left for a later run. A check of the task store failing three
|
|
107
|
+
times in a row then terminates the agent with a non-zero exit
|
|
108
|
+
status (instead of being retried endlessly after a growing delay).
|
|
109
|
+
|
|
110
|
+
- \[`--agent-relay` *url*\]: The agent relay to pass the live
|
|
111
|
+
presence of the agent to, as `ase://`*addr*`:`*port*\[`/`*token*\]
|
|
112
|
+
resp. `ases://`*addr*`:`*port*\[`/`*token*\]\[`?insecure`\] for
|
|
113
|
+
HTTPS (default: the configured `project.relay.url`, else none).
|
|
114
|
+
See **AGENT RELAY** in `ase-agent`(1).
|
|
115
|
+
|
|
116
|
+
- \[`--title` *text*\]: The one-line title of the operation of the
|
|
117
|
+
agent (at most 80 characters), shown on the task boards. Built-in:
|
|
118
|
+
`Reboot the plans of assigned tasks`.
|
|
119
|
+
|
|
120
|
+
- \[`--description` *text*\]: The brief description of the operation
|
|
121
|
+
of the agent (about 3-6 lines, at most 600 characters, with its
|
|
122
|
+
whitespace collapsed), shown on the task boards. Built-in: a
|
|
123
|
+
description of the operation.
|
|
124
|
+
|
|
125
|
+
- \[`--type` `phase`|`request`\]: The processing type: `phase`
|
|
126
|
+
claims the tasks by their lifecycle status, `request` processes
|
|
127
|
+
the prompt requests attached to the tasks. Generic default:
|
|
128
|
+
`phase`. Built-in: `phase`.
|
|
129
|
+
|
|
130
|
+
- \[`--workdir` *kind*\]: The working directory of the agent tool:
|
|
131
|
+
`project`, `source`, `changeset`, `changeset-read`, or `target`.
|
|
132
|
+
Generic default: `project`. Built-in: `project`.
|
|
133
|
+
|
|
134
|
+
- \[`--lifecycle` *model*\]: A supported task lifecycle model
|
|
135
|
+
(`solo`, `team`, or `enterprise`, repeatable). Generic default:
|
|
136
|
+
every model containing all given states, resp. all models for
|
|
137
|
+
`request` and with `--unclaimed`. Built-in: `enterprise`.
|
|
138
|
+
|
|
139
|
+
- \[`--serial`\]: Process the tasks serially only, ignoring
|
|
140
|
+
`--parallel`. Built-in: not set.
|
|
141
|
+
|
|
142
|
+
- \[`--unclaimed`\]: Process the tasks of the incoming states
|
|
143
|
+
without claiming them, independent of their assignee and
|
|
144
|
+
predecessors, and without ever changing their status and assignee
|
|
145
|
+
(`phase` only). Built-in: not set. Not allowed, as the rebooter
|
|
146
|
+
claims the tasks into its activity state.
|
|
147
|
+
|
|
148
|
+
- \[`--params` *name*`=`*value*\]: The value of a parameter
|
|
149
|
+
declared by the definition (repeatable). Built-in: none declared.
|
|
150
|
+
|
|
151
|
+
- \[`--state-incoming` *state*\]: A state of the tasks to claim
|
|
152
|
+
(mandatory for `phase`, repeatable with `--unclaimed` or
|
|
153
|
+
`--state-activity` only). Built-in: `DRAFTED`.
|
|
154
|
+
|
|
155
|
+
- \[`--state-activity` *state*\]: The state of a task during its
|
|
156
|
+
processing. Generic default: the incoming state. Built-in:
|
|
157
|
+
`PLANNING`.
|
|
158
|
+
|
|
159
|
+
- \[`--state-success` *state*\]: The target state on success, or
|
|
160
|
+
`previous` for the incoming state of the claim. Generic default:
|
|
161
|
+
the incoming state. Built-in: `DRAFTED`.
|
|
162
|
+
|
|
163
|
+
- \[`--state-failure` *state*\]: The target state on failure, or
|
|
164
|
+
`previous` for the incoming state of the claim. Generic default:
|
|
165
|
+
the incoming state. Built-in: `DRAFTED`.
|
|
166
|
+
|
|
167
|
+
- \[`--state-phase` *state*\]: The phase success state, into which
|
|
168
|
+
the skill itself can move a task. Generic default: the success
|
|
169
|
+
state, resp. the activity state for a `previous` success state.
|
|
170
|
+
Built-in: not set (hence `DRAFTED`, the default state, into which
|
|
171
|
+
the skill resets a rebooted plan).
|
|
172
|
+
|
|
173
|
+
- \[`--state-passed` *state*\]: The first state from which on a task
|
|
174
|
+
has passed the phase for its `After:` successors. Generic default:
|
|
175
|
+
the phase success state. Built-in: not set (hence `DRAFTED`, the
|
|
176
|
+
first state, so the predecessors impose no gate).
|
|
177
|
+
|
|
178
|
+
- \[`--state-verdict` *VERDICT*`=`*state*\]: The target state per
|
|
179
|
+
verdict (repeatable). Built-in: not set.
|
|
180
|
+
|
|
181
|
+
- \[`--tag-name` *tag*\]: The tag of the processed tasks
|
|
182
|
+
(`ase-agent-`*word*). Generic default: `ase-agent-`*name*, resp.
|
|
183
|
+
for `request` always `ase-agent-`*request-name*. Built-in: not set.
|
|
184
|
+
|
|
185
|
+
- \[`--tag-success` *tag*\]: The tag on success: *tag-name*,
|
|
186
|
+
*tag-name*`:`*value*, or `none` (`phase` only). Generic default:
|
|
187
|
+
*tag-name*. Built-in: `none`.
|
|
188
|
+
|
|
189
|
+
- \[`--tag-failure` *tag*\]: The tag on failure: *tag-name*,
|
|
190
|
+
*tag-name*`:`*value*, or `none` (`phase` only). Generic default:
|
|
191
|
+
*tag-name*. Built-in: `none`.
|
|
192
|
+
|
|
193
|
+
- \[`--tag-require` *tag*\]: A tag a claimable task has to carry
|
|
194
|
+
(repeatable). Built-in: not set.
|
|
195
|
+
|
|
196
|
+
- \[`--tag-exclude` *tag*\]: A tag a claimable task must not carry
|
|
197
|
+
(repeatable). Built-in: not set.
|
|
198
|
+
|
|
199
|
+
- \[`--tag-retry`\]: A shorthand for `--tag-failure none`, so a
|
|
200
|
+
failed task is claimed again after a growing delay (`phase` only).
|
|
201
|
+
Built-in: not set.
|
|
202
|
+
|
|
203
|
+
- \[`--assign-name` *who*\]: The assignee under which the tasks are
|
|
204
|
+
claimed, held, recognized, and released, and which names the
|
|
205
|
+
agent-owned worktrees. Generic default: the agent name. Built-in:
|
|
206
|
+
not set.
|
|
207
|
+
|
|
208
|
+
- \[`--assign-required`\]: Claim only the tasks explicitly assigned
|
|
209
|
+
to *who* of `--assign-name` (`phase` only). Built-in: enabled.
|
|
210
|
+
|
|
211
|
+
- \[`--assign-success` *who*\]: The assignee of a task after its
|
|
212
|
+
successful processing: a name, `none`, or `previous`. Generic
|
|
213
|
+
default: `none` for `phase`, `previous` for `request`. Built-in:
|
|
214
|
+
not set.
|
|
215
|
+
|
|
216
|
+
- \[`--assign-failure` *who*\]: The assignee of a task after its
|
|
217
|
+
failed processing: a name, `none`, or `previous`. Generic default:
|
|
218
|
+
`none` for `phase`, `previous` for `request`. Built-in: not set.
|
|
219
|
+
|
|
220
|
+
- \[`--request-name` *name*\]: The name of the processed requests
|
|
221
|
+
(`request` only). Generic default: the agent name. Built-in: not
|
|
222
|
+
set. Not allowed, as the rebooter is of type `phase`.
|
|
223
|
+
|
|
224
|
+
- \[`--request-done` *word*\]: The word naming a processed task in
|
|
225
|
+
the log lines (`request` only). Generic default: `processed`.
|
|
226
|
+
Built-in: not set. Not allowed, as the rebooter is of type `phase`.
|
|
227
|
+
|
|
228
|
+
- \[`--prompt-skill` *name*\]: The skill to invoke (mutually
|
|
229
|
+
exclusive with `--prompt-text` and `--prompt-file`). Built-in:
|
|
230
|
+
`ase-task-reboot`.
|
|
231
|
+
|
|
232
|
+
- \[`--prompt-args` *template*\]: The argument template of the
|
|
233
|
+
skill. Generic default: `{id}` for `phase`, `{id}: {prompt}` for
|
|
234
|
+
`request`. Built-in: `--next DONE {id}`.
|
|
235
|
+
|
|
236
|
+
- \[`--prompt-text` *template*\]: The prompt text template to invoke
|
|
237
|
+
instead of a skill. Built-in: not set.
|
|
238
|
+
|
|
239
|
+
- \[`--prompt-file` *file*\]: The file with the prompt text template
|
|
240
|
+
to invoke instead of a skill. Built-in: not set.
|
|
241
|
+
|
|
242
|
+
- \[`--prepare-run` *cmd*\]: A shell command run in the working
|
|
243
|
+
directory before the prompt (repeatable). Built-in: not set.
|
|
244
|
+
|
|
245
|
+
- \[`--success-criterion` *criterion*\]: A success criterion:
|
|
246
|
+
`exit`, `clean`, `changed`, `verdict`, `attachment`, or `status`
|
|
247
|
+
(repeatable). Generic default: `exit` and `clean` for `phase`,
|
|
248
|
+
`clean` and `changed` for `request`. Built-in: `status`.
|
|
249
|
+
|
|
250
|
+
- \[`--success-match` *regex*\]: A regular expression an output line
|
|
251
|
+
has to match (repeatable). Built-in: not set.
|
|
252
|
+
|
|
253
|
+
- \[`--verdict-label` *label*\]: The label after which the verdict
|
|
254
|
+
is given in the output. Built-in: not set.
|
|
255
|
+
|
|
256
|
+
- \[`--verdict-allow` *VERDICT*\]: An accepted verdict (repeatable).
|
|
257
|
+
Generic default: the verdicts of `--state-verdict`, else any.
|
|
258
|
+
Built-in: not set.
|
|
259
|
+
|
|
260
|
+
- \[`--attach-output` *kind*\]: The kind of the attachment storing
|
|
261
|
+
the output lines of the prompt. Built-in: not set.
|
|
262
|
+
|
|
263
|
+
- \[`--attach-expect` *spec*\]: The attachment
|
|
264
|
+
\[*mime-type*`;`\]*kind* to be created or changed by the
|
|
265
|
+
processing for the success criterion `attachment`. Built-in: not
|
|
266
|
+
set.
|
|
267
|
+
|
|
268
|
+
- \[`--attach-skip` *spec*\]: The attachment
|
|
269
|
+
\[*mime-type*`;`\]*kind* leaving a task unclaimed (`phase` only).
|
|
270
|
+
Built-in: not set.
|
|
271
|
+
|
|
272
|
+
- \[`--attach-changeset` *kind*\]: The kind of the attachment
|
|
273
|
+
`text/x-diff;`*kind* storing the change set snapshot of the task
|
|
274
|
+
(with `--workdir changeset` or `target` only). Built-in: not set.
|
|
275
|
+
|
|
276
|
+
- \[`--finish-commit`\]: Commit the work onto a `branch:` changeset
|
|
277
|
+
and publish it (with `--workdir changeset` only). Built-in: not
|
|
278
|
+
set. Not allowed, as the rebooter works in the project root.
|
|
279
|
+
|
|
280
|
+
- \[`--finish-success` *cmd*\]: A shell command run in the working
|
|
281
|
+
directory after a successful processing. Built-in: not set.
|
|
282
|
+
|
|
283
|
+
- \[`--finish-failure` *cmd*\]: A shell command run in the working
|
|
284
|
+
directory after a failed processing. Built-in: not set.
|
|
285
|
+
|
|
286
|
+
- \[`-f`|`--foreground`\]: Run the agent in the current process
|
|
287
|
+
instead, logging to the terminal, until it is interrupted (e.g.,
|
|
288
|
+
via `CTRL+C`) or stopped, where an agent of the same name already
|
|
289
|
+
running is an error.
|
|
290
|
+
|
|
291
|
+
- \[`-h`|`--help`\]: Show the usage information of the sub-command
|
|
292
|
+
only.
|
|
293
|
+
|
|
294
|
+
The options `--`*group*`-`*item* above override the built-in
|
|
295
|
+
definition of the agent (where an option also replaces its mutually
|
|
296
|
+
exclusive alternatives, e.g., `--prompt-text` replaces the skill of
|
|
297
|
+
`--prompt-skill`), while the agent keeps the identity of its kind (its
|
|
298
|
+
runs, its presence, and its agent-owned worktrees are named after
|
|
299
|
+
`rebooter`). See `ase-agent-adhoc`(1) for their full semantics.
|
|
300
|
+
|
|
301
|
+
- `ase agent rebooter status` \[`-n`|`--name` *name*\]: Report whether
|
|
302
|
+
the rebooter agent of the name *name* (default: `rebooter`) is
|
|
303
|
+
running, as `agent` *name*`: running (pid` *pid*`)` resp. `agent`
|
|
304
|
+
*name*`: not running` (exit status 1).
|
|
305
|
+
|
|
306
|
+
- `ase agent rebooter log` \[`-f`|`--follow`\] \[`-n`|`--lines` *n*\]
|
|
307
|
+
\[`--name` *name*\]: Show the log `.ase/agent/`*name*`.log` of the
|
|
308
|
+
rebooter agent of the name *name* (default: `rebooter`) run in the
|
|
309
|
+
background, where an agent of a fleet logs into the log of the fleet
|
|
310
|
+
instead (see `ase-agent-fleet`(1)). Without a log file, an
|
|
311
|
+
informational message is shown only. The options are:
|
|
312
|
+
|
|
313
|
+
- \[`-f`|`--follow`\]: Show the last *n* lines (default: 10) and
|
|
314
|
+
then follow all newly appended lines, in the style of `tail -f`,
|
|
315
|
+
until interrupted.
|
|
316
|
+
|
|
317
|
+
- \[`-n`|`--lines` *n*\]: Show the last *n* lines only (default:
|
|
318
|
+
all, or 10 with `--follow`).
|
|
319
|
+
|
|
320
|
+
- \[`--name` *name*\]: The name of the agent (default: `rebooter`),
|
|
321
|
+
given in its long form only, as `-n` is the short form of
|
|
322
|
+
`--lines`.
|
|
323
|
+
|
|
324
|
+
- `ase agent rebooter stop` \[`-n`|`--name` *name*\]: Stop the rebooter
|
|
325
|
+
agent of the name *name* (default: `rebooter`) by `SIGTERM`, waiting
|
|
326
|
+
(up to 5 minutes) until it aborted its running processings and put
|
|
327
|
+
their tasks back. An agent not running is reported informationally
|
|
328
|
+
only.
|
|
329
|
+
|
|
330
|
+
## ENVIRONMENT
|
|
331
|
+
|
|
332
|
+
- `ASE_TOOL`: The default agent tool of `--tool` (default: `claude`).
|
|
333
|
+
|
|
334
|
+
- `ASE_AGENT_RELAY_TOKEN`: The bearer token of the agent relay, if not
|
|
335
|
+
embedded in the URL of `--agent-relay` resp. `project.relay.url`.
|
|
336
|
+
|
|
337
|
+
- `ASE_HEADLESS`: Set to `true` for the agent tool processes spawned by
|
|
338
|
+
the agent.
|
|
339
|
+
|
|
340
|
+
## FILES
|
|
341
|
+
|
|
342
|
+
- `.ase/agent/`*name*`.yaml`: The process state (kind, process id, and
|
|
343
|
+
process start time) of the agent, existing while it runs.
|
|
344
|
+
|
|
345
|
+
- `.ase/agent/`*name*`.log`: The log of the agent run in the background.
|
|
346
|
+
|
|
347
|
+
- *per-user state
|
|
348
|
+
directory*`/agent-rebooter/`*store-hash*`/`*run-id*`.lock` and `.json`:
|
|
349
|
+
The run lock and the run record of each rebooter agent process, used
|
|
350
|
+
to recover the tasks of terminated agent processes (see **INTERRUPTS
|
|
351
|
+
AND RECOVERY** in `ase-agent`(1)).
|
|
352
|
+
|
|
353
|
+
## EXIT STATUS
|
|
354
|
+
|
|
355
|
+
`ase agent rebooter start` exits with status `0` once the agent started
|
|
356
|
+
(or was already running), resp. once a foreground agent terminated
|
|
357
|
+
regularly, and with status `1` on any error (e.g., an invalid option, a
|
|
358
|
+
task lifecycle model other than `enterprise`, or a missing agent tool).
|
|
359
|
+
`ase agent rebooter status` exits with status `1` if the agent is not
|
|
360
|
+
running.
|
|
361
|
+
|
|
362
|
+
## EXAMPLES
|
|
363
|
+
|
|
364
|
+
```sh
|
|
365
|
+
# start the rebooter, rebooting the plans of the tasks assigned to it
|
|
366
|
+
$ ase agent rebooter start
|
|
367
|
+
|
|
368
|
+
# request the reboot of a drafted task by assigning it to the rebooter
|
|
369
|
+
$ ase task assign FOO-42 rebooter
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## SEE ALSO
|
|
373
|
+
|
|
374
|
+
`ase`(1), `ase-agent`(1), `ase-agent-condenser`(1),
|
|
375
|
+
`ase-agent-researcher`(1), `ase-agent-implementer`(1),
|
|
376
|
+
`ase-agent-qualifier`(1), `ase-agent-integrator`(1),
|
|
377
|
+
`ase-agent-editor`(1), `ase-agent-estimator`(1), `ase-agent-adhoc`(1),
|
|
378
|
+
`ase-agent-fleet`(1), `ase-agent-relay`(1), `ase-task`(1),
|
|
379
|
+
`ase-task-board`(1).
|
|
380
|
+
|
|
381
|
+
## AUTHOR
|
|
382
|
+
|
|
383
|
+
Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
384
|
+
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# ase-agent-relay(1) -- Manage the Agent Relay Server
|
|
2
|
+
|
|
3
|
+
## SYNOPSIS
|
|
4
|
+
|
|
5
|
+
`ase agent relay start`
|
|
6
|
+
\[`-a`|`--address` *host*\]
|
|
7
|
+
\[`-p`|`--port` *port*\]
|
|
8
|
+
\[`-t`|`--token` *token*\]
|
|
9
|
+
\[`-c`|`--cors` *origin*\]
|
|
10
|
+
\[`--tls-cert` *file* `--tls-key` *file*\]
|
|
11
|
+
\[`-f`|`--foreground`\]
|
|
12
|
+
|
|
13
|
+
`ase agent relay status`
|
|
14
|
+
|
|
15
|
+
`ase agent relay log`
|
|
16
|
+
\[`-f`|`--follow`\]
|
|
17
|
+
\[`-n`|`--lines` *n*\]
|
|
18
|
+
|
|
19
|
+
`ase agent relay stop`
|
|
20
|
+
|
|
21
|
+
## DESCRIPTION
|
|
22
|
+
|
|
23
|
+
`ase agent relay` manages the per-user *agent relay* server, which
|
|
24
|
+
passes the live presence of the agents (see `ase-agent`(1)) to the
|
|
25
|
+
task boards (see `ase-task-board`(1)) without any external
|
|
26
|
+
infrastructure. It can run locally or on a central host, as long as
|
|
27
|
+
both the agents and the task boards reach it, and serves any number of
|
|
28
|
+
projects (by their `project.id`).
|
|
29
|
+
|
|
30
|
+
The agent relay holds the presence of the agents in memory only: per
|
|
31
|
+
agent its kind, name, mode, the title and description of its operation
|
|
32
|
+
(for the agent logs view of `ase-task-board`(1)), request name, the lifecycle states it
|
|
33
|
+
operates on (of a phase agent: its incoming, activity, written, and
|
|
34
|
+
gate states, for the agent graph of `ase-task-board`(1)), host,
|
|
35
|
+
process id, current working directory, user name and user id, start time, state (`waiting` or `busy`), the ids of the
|
|
36
|
+
tasks it is busy with, its usage of the agent tool (in total and by its
|
|
37
|
+
last job), the time since which it is in its state, the time of its
|
|
38
|
+
latest announcement (its heartbeat), and its most recent 100
|
|
39
|
+
processing log lines (each message truncated to 500 characters).
|
|
40
|
+
|
|
41
|
+
An agent without heartbeat for 30 seconds is removed (checked every 5
|
|
42
|
+
seconds), and a project exists only while it has agents.
|
|
43
|
+
|
|
44
|
+
The agents announce their presence (see `--agent-relay` of
|
|
45
|
+
`ase-agent`(1)) on every change of their state, after each finished
|
|
46
|
+
job, with their new processing log lines, and as a heartbeat every 10
|
|
47
|
+
seconds, and remove it on their termination. The task boards subscribe
|
|
48
|
+
to the agents of their project.
|
|
49
|
+
|
|
50
|
+
Alternatively, `ase task store start --with-agent-relay` (see
|
|
51
|
+
`ase-task-store`(1)) co-hosts the agent relay in the task store server
|
|
52
|
+
under the same address, port, and token, so a central host needs a
|
|
53
|
+
single server process only. A fleet with the section `relay` owns the
|
|
54
|
+
agent relay instead (see `ase-agent-fleet`(1)).
|
|
55
|
+
|
|
56
|
+
The agent relay is selected by the agents and task boards via the
|
|
57
|
+
configuration `project.relay.url` (or their option `--agent-relay`),
|
|
58
|
+
as `ase://`*addr*`:`*port*\[`/`*token*\] for HTTP, resp.
|
|
59
|
+
`ases://`*addr*`:`*port*\[`/`*token*\]\[`?insecure`\] for HTTPS
|
|
60
|
+
(verifying the server certificate against the Node.js CA store,
|
|
61
|
+
extendable via `$NODE_EXTRA_CA_CERTS`, or, with `?insecure`, without
|
|
62
|
+
certificate verification). The relay requires an
|
|
63
|
+
explicit `project.id`.
|
|
64
|
+
|
|
65
|
+
The bearer token of a client is the one embedded in the URL (warned about
|
|
66
|
+
if configured on the `project` or a `task` scope, as it might be
|
|
67
|
+
committed), else `$ASE_AGENT_RELAY_TOKEN`, else `project.relay.token`
|
|
68
|
+
(intended for the `user` scope, and warned about on any other scope),
|
|
69
|
+
else the token of the locally started agent relay (resp. of the locally
|
|
70
|
+
started task store co-hosting it), but only if the URL addresses exactly
|
|
71
|
+
this server. Sending a token to a non-loopback host selected by a
|
|
72
|
+
repository-supplied scope is warned about.
|
|
73
|
+
|
|
74
|
+
## COMMANDS
|
|
75
|
+
|
|
76
|
+
- `ase agent relay start` \[*options*\]:
|
|
77
|
+
Start the agent relay server in the background (spawning a detached
|
|
78
|
+
process logging into `relay.log`) and wait until it responds (up to
|
|
79
|
+
10 seconds), or with `--foreground` run it in the current process.
|
|
80
|
+
|
|
81
|
+
The configuration of the server is resolved from the options, the
|
|
82
|
+
environment, and the per-user `relay.yaml`, and its effective values
|
|
83
|
+
(address, port, token, CORS origins, TLS certificate and key, and
|
|
84
|
+
process id) are persisted in `relay.yaml` (readable by the current
|
|
85
|
+
user only). The start is idempotent: an already running server is left
|
|
86
|
+
alone, unless an explicitly given option (`--address`, `--port`,
|
|
87
|
+
`--token`, `--cors`, `--tls-cert`, or `--tls-key`) deviates from its
|
|
88
|
+
configuration, in which case the server is restarted to apply it.
|
|
89
|
+
|
|
90
|
+
With `--foreground`, an already running server with an unchanged
|
|
91
|
+
configuration is an error. A configured port held by a foreign service
|
|
92
|
+
is re-allocated (with a warning). Binding to a non-loopback address
|
|
93
|
+
without TLS is warned about, as the bearer token then travels
|
|
94
|
+
unencrypted. All options are described under **OPTIONS** below.
|
|
95
|
+
|
|
96
|
+
- `ase agent relay status`:
|
|
97
|
+
Report whether the agent relay server is running, as `relay: running
|
|
98
|
+
on` *url* `(pid` *pid*`)`, after probing it on its configured address
|
|
99
|
+
and port with its configured token. Exits with status 1 if it is not
|
|
100
|
+
running (no port configured, the port not responding, or the port in
|
|
101
|
+
use by a foreign service), or if it rejects the configured token.
|
|
102
|
+
|
|
103
|
+
- `ase agent relay log` \[`-f`|`--follow`\] \[`-n`|`--lines` *n*\]:
|
|
104
|
+
Show the log `relay.log` of the agent relay server run in the
|
|
105
|
+
background. With `-n`|`--lines` *n*, only the last *n* lines are shown
|
|
106
|
+
(default: all). With `-f`|`--follow`, the last *n* lines (default:
|
|
107
|
+
10) are shown and then, in the style of `tail -f`, all newly appended
|
|
108
|
+
lines are followed until interrupted. If no log file exists, this is
|
|
109
|
+
just reported (at log level `info`). The server logs its requests at
|
|
110
|
+
log level `debug` only, as the agents announce frequently.
|
|
111
|
+
|
|
112
|
+
- `ase agent relay stop`:
|
|
113
|
+
Stop the agent relay server by sending it `SIGTERM` and waiting (up
|
|
114
|
+
to 5 seconds) until it is gone, closing all subscriptions of the task
|
|
115
|
+
boards. A not running server is reported as such, without an error.
|
|
116
|
+
|
|
117
|
+
## OPTIONS
|
|
118
|
+
|
|
119
|
+
The following options exist for `ase agent relay start`:
|
|
120
|
+
|
|
121
|
+
- \[`-a`|`--address` *host*\]:
|
|
122
|
+
The address to bind to (default: the configured `address` of
|
|
123
|
+
`relay.yaml`, else `127.0.0.1`), e.g., `0.0.0.0` for all IPv4
|
|
124
|
+
interfaces of a central host.
|
|
125
|
+
|
|
126
|
+
- \[`-p`|`--port` *port*\]:
|
|
127
|
+
The TCP port to bind to, `1`..`65535` (default: the configured `port`
|
|
128
|
+
of `relay.yaml`, else a randomly allocated free port in the range
|
|
129
|
+
`42000`..`44000`).
|
|
130
|
+
|
|
131
|
+
- \[`-t`|`--token` *token*\]:
|
|
132
|
+
The bearer token to expect from all clients (default:
|
|
133
|
+
`$ASE_AGENT_RELAY_TOKEN`, else the configured `token` of
|
|
134
|
+
`relay.yaml`, else a generated random token).
|
|
135
|
+
|
|
136
|
+
- \[`-c`|`--cors` *origin*\]:
|
|
137
|
+
(repeatable) Allow cross-origin browser requests from *origin*, or
|
|
138
|
+
from any origin with `*` (default: the configured `cors` origins of
|
|
139
|
+
`relay.yaml`, else none).
|
|
140
|
+
|
|
141
|
+
- \[`--tls-cert` *file*\]:
|
|
142
|
+
Serve HTTPS with the PEM certificate (chain) in *file*, which
|
|
143
|
+
requires `--tls-key`, too (default: the configured `project.relay.crt`
|
|
144
|
+
(unless `project.relay.url` selects HTTP via `ase://` on this host),
|
|
145
|
+
else the configured `tls.cert` of `relay.yaml`, else plain HTTP). A
|
|
146
|
+
relative path of a configuration is relative to its configuration
|
|
147
|
+
file.
|
|
148
|
+
|
|
149
|
+
- \[`--tls-key` *file*\]:
|
|
150
|
+
Serve HTTPS with the PEM private key in *file*, which requires
|
|
151
|
+
`--tls-cert`, too (default: the configured `project.relay.key`
|
|
152
|
+
(unless `project.relay.url` selects HTTP via `ase://` on this host),
|
|
153
|
+
else the configured `tls.key` of `relay.yaml`).
|
|
154
|
+
|
|
155
|
+
- \[`-f`|`--foreground`\]:
|
|
156
|
+
Run the server in the current process, logging to the terminal
|
|
157
|
+
instead of `relay.log`, until it is interrupted (e.g., via `CTRL+C`)
|
|
158
|
+
or stopped via `ase agent relay stop`.
|
|
159
|
+
|
|
160
|
+
- \[`-h`|`--help`\]:
|
|
161
|
+
Show the usage information of the command and exit.
|
|
162
|
+
|
|
163
|
+
## PROTOCOL
|
|
164
|
+
|
|
165
|
+
All requests have to carry the bearer token in the `Authorization:
|
|
166
|
+
Bearer` *token* header (the WebSocket handshake alternatively in the
|
|
167
|
+
query parameter `token`), else they are rejected with status 401 and
|
|
168
|
+
an `application/problem+json` problem details response. The REST
|
|
169
|
+
endpoints are:
|
|
170
|
+
|
|
171
|
+
- `GET /agents`:
|
|
172
|
+
The projects with agents, as `{ "projects": [ { "id":` *id*`,
|
|
173
|
+
"agents":` *count* `} ] }`.
|
|
174
|
+
|
|
175
|
+
- `GET /projects/`*id*`/agents`:
|
|
176
|
+
All agents of the project *id*, as `{ "agents": [` ... `] }`.
|
|
177
|
+
|
|
178
|
+
- `PUT /projects/`*id*`/agents/`*agent*:
|
|
179
|
+
The announcement of the agent *agent* (also its heartbeat), as a JSON
|
|
180
|
+
payload with its presence and only its processing log lines added
|
|
181
|
+
since its previous announcement (at most 100), answered with status
|
|
182
|
+
204.
|
|
183
|
+
|
|
184
|
+
- `DELETE /projects/`*id*`/agents/`*agent*:
|
|
185
|
+
The removal of the agent *agent* (on its termination), answered with
|
|
186
|
+
status 204.
|
|
187
|
+
|
|
188
|
+
The WebSocket event endpoint `/projects/`*id*`/agents/events` first
|
|
189
|
+
sends a snapshot frame of all agents of the project (with `reset:
|
|
190
|
+
true`) and then a frame on each change (the added or updated agents,
|
|
191
|
+
and the removed ones), where the processing log lines of an agent are
|
|
192
|
+
always to be appended to the already received ones.
|
|
193
|
+
|
|
194
|
+
Subscribers are pinged every 15 seconds and terminated if they did not
|
|
195
|
+
answer the previous ping, resp. if they cannot keep up (more than 1 MB
|
|
196
|
+
of not yet transmitted data). A plain HTTP request onto the event
|
|
197
|
+
endpoint is answered with status 426.
|
|
198
|
+
|
|
199
|
+
The project ids have to match `[A-Za-z0-9_-]+` and the agent ids
|
|
200
|
+
`[A-Za-z0-9][A-Za-z0-9_.-]*` (at most 128 characters), else the request
|
|
201
|
+
is rejected with status 422. To bound its memory, the relay holds at
|
|
202
|
+
most 128 projects with agents, 64 agents per project, and 1024 agents
|
|
203
|
+
in total, and accepts at most 64 subscribers per project and 1024
|
|
204
|
+
subscribers in total, where a request beyond these limits is rejected
|
|
205
|
+
with status 429.
|
|
206
|
+
|
|
207
|
+
## ENVIRONMENT
|
|
208
|
+
|
|
209
|
+
- `ASE_AGENT_RELAY_TOKEN`:
|
|
210
|
+
The default of `--token` of `ase agent relay start`, and the bearer
|
|
211
|
+
token of the agents and task boards connecting to the relay (if not
|
|
212
|
+
embedded in its URL).
|
|
213
|
+
|
|
214
|
+
## FILES
|
|
215
|
+
|
|
216
|
+
- *per-user configuration directory*`/relay.yaml`:
|
|
217
|
+
The configuration and runtime state of the agent relay server: the
|
|
218
|
+
keys `address`, `port`, `token`, `cors` (a list of origins),
|
|
219
|
+
`tls.cert`, `tls.key`, and `pid` (of the running server). It is
|
|
220
|
+
written by `ase agent relay start` (readable by the current user
|
|
221
|
+
only), and can be edited by hand to configure the defaults.
|
|
222
|
+
|
|
223
|
+
- *per-user configuration directory*`/relay.log`:
|
|
224
|
+
The log of the agent relay server run in the background.
|
|
225
|
+
|
|
226
|
+
The *per-user configuration directory* is `~/Library/Application
|
|
227
|
+
Support/ase` on macOS, `%APPDATA%\ase` on Windows, and
|
|
228
|
+
`$XDG_CONFIG_HOME/ase` (falling back to `~/.config/ase`) on Linux and
|
|
229
|
+
other Unix systems.
|
|
230
|
+
|
|
231
|
+
## EXIT STATUS
|
|
232
|
+
|
|
233
|
+
`start` and `stop` exit with status 0 on success (also for a server
|
|
234
|
+
already running resp. not running) and 1 on any error. `status` exits
|
|
235
|
+
with status 1 if the server is not running or rejects the configured
|
|
236
|
+
token. `log` exits with status 0.
|
|
237
|
+
|
|
238
|
+
## EXAMPLES
|
|
239
|
+
|
|
240
|
+
```sh
|
|
241
|
+
# start the agent relay locally and let the agents and task boards follow it
|
|
242
|
+
$ ase agent relay start -p 4711
|
|
243
|
+
$ ase config --scope project set project.id myproject
|
|
244
|
+
$ ase config --scope project set project.relay.url ase://127.0.0.1:4711
|
|
245
|
+
|
|
246
|
+
# start the agent relay on a central host via HTTPS
|
|
247
|
+
$ ase agent relay start -a 0.0.0.0 -p 4711 --tls-cert relay.crt --tls-key relay.key
|
|
248
|
+
$ ase config --scope user set project.relay.token <token>
|
|
249
|
+
|
|
250
|
+
# check and follow the agent relay
|
|
251
|
+
$ ase agent relay status
|
|
252
|
+
$ ase agent relay log -f
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## SEE ALSO
|
|
256
|
+
|
|
257
|
+
`ase`(1), `ase-agent`(1), `ase-agent-fleet`(1), `ase-task-board`(1),
|
|
258
|
+
`ase-task-store`(1), `ase-config`(1).
|
|
259
|
+
|
|
260
|
+
## AUTHOR
|
|
261
|
+
|
|
262
|
+
Dr. Ralf S. Engelschall <rse@engelschall.com>
|