toolang 0.2.2__tar.gz → 0.2.4__tar.gz
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.
- {toolang-0.2.2 → toolang-0.2.4}/PKG-INFO +1 -1
- {toolang-0.2.2 → toolang-0.2.4}/docs/api.md +66 -33
- {toolang-0.2.2 → toolang-0.2.4}/docs/chat.md +27 -3
- {toolang-0.2.2 → toolang-0.2.4}/docs/execution.md +9 -3
- {toolang-0.2.2 → toolang-0.2.4}/docs/ids.md +2 -3
- {toolang-0.2.2 → toolang-0.2.4}/docs/layout.md +7 -5
- toolang-0.2.4/docs/tasks.md +373 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/webui-jobs.md +89 -114
- {toolang-0.2.2 → toolang-0.2.4}/pyproject.toml +1 -1
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/agents.py +0 -6
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/caps.py +3 -1
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/caps/commands.py +4 -4
- toolang-0.2.4/src/toolang/cli/logo.py +95 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/toolang/app.py +886 -60
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/utils.py +19 -46
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/chat.py +39 -6
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/_shared.py +204 -147
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/execution.py +143 -50
- toolang-0.2.4/src/toolang/components/router/manage/jobs.py +298 -0
- toolang-0.2.4/src/toolang/components/trigger/pulse.py +184 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/context.py +0 -4
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/db.py +231 -8
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/detail.py +24 -1
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/model_call.py +0 -3
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/prompts/instruct.default.md +3 -7
- toolang-0.2.4/src/toolang/jobs.py +635 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/state/durable.py +3 -3
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/state/prepared.py +2 -2
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/agent_state.py +2 -18
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/work.py +295 -373
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_agent_state_tool.py +2 -6
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_cli.py +678 -64
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_run_queue_runner.py +199 -225
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_work.py +47 -23
- {toolang-0.2.2 → toolang-0.2.4}/uv.lock +1 -1
- toolang-0.2.2/docs/tasks.md +0 -350
- toolang-0.2.2/src/toolang/cli/logo.py +0 -61
- toolang-0.2.2/src/toolang/components/router/manage/jobs.py +0 -133
- toolang-0.2.2/src/toolang/components/trigger/pulse.py +0 -367
- toolang-0.2.2/src/toolang/state/pulse.py +0 -46
- {toolang-0.2.2 → toolang-0.2.4}/.github/workflows/publish-pypi.yml +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/.gitignore +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/AGENTS.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/LICENSE +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/README.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/caps.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/concepts.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/index.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/models.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/plugins.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/prepared-lock.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/program.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/selectors.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/docs/tools.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/alice.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke-playground.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke.fixed-model.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke.openrouter-smoke.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke.priority.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke.simulated-history.memory.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/examples/invoke.simulated-history.none.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/reference/README.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/reference/build.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/reference/config.toml +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/reference/templates/index.html.jinja2 +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/reference/templates/module.html.jinja2 +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/error.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/examples/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/examples/tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/channel.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/loop.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/model.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/sandbox.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/protocols/tool.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/channel.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/message.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/model.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/run.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/sandbox.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/types/tool.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/utils/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/utils/channels.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/utils/function_tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/utils/tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/base/utils/typer_tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/channels/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/channels/telegram.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/__main__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/caps/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/caps/__main__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/caps/app.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/invoke.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/progress.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/toolang/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/toolang/__main__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/toolang/caps.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/cli/toolang/fmt.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/common/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/common/ids.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/common/progress.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/common/template.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/registry.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/_streaming.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/agent.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/caps.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/jobs.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/inspect/router.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/manage/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/manage/caps.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/router/manage/router.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/runner/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/trigger/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/trigger/poll.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/components/trigger/watch.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/env.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/log.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/log_spec.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/plugins.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/config/web.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/assembly.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/binding.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/effective.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/events.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/execute.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/input.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/model.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/prompts/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/prompts/context.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/records.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/response.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/runner.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/execution/stream.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/loops/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/loops/basic.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/adapters/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/adapters/chat_completions.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/adapters/responses.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/config.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/discovery.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/errors.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/custom.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/deepseek.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/google.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/ollama.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/openai.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/providers/openrouter.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/resolution.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/models/views.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/plugin.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/program.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/program_format.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/sandboxes/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/sandboxes/docker.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/sandboxes/none.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/selectors.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/state/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/state/live.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/state/program.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/agent.default.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/chore.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/prompt.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/psyche.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/service.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/service.stdio.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/skill.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/templates/task.default.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/__init__.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/agent_chat.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/filesystem.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/registry.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/service_use.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/shell.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/views.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/tools/web_search.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/src/toolang/up.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/syntax.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/remote-prompt/rewrite.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/remote-psyche/reviewer.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/remote-service/github.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/remote-skill/pdf-processing/SKILL.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/remote-skill/pdf-processing/assets/template.md +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/sample.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/fixtures/source_only.too +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_channels.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_execution_template.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_ids.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_log_config.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_models.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_plugin_tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_prepared.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_program.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_program_format.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_sandboxes.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_selectors.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_tools.py +0 -0
- {toolang-0.2.2 → toolang-0.2.4}/tests/test_typer_tools.py +0 -0
|
@@ -18,8 +18,14 @@ Top-level commands are:
|
|
|
18
18
|
- `remove`
|
|
19
19
|
- `list`
|
|
20
20
|
- `info`
|
|
21
|
+
- `chat`
|
|
22
|
+
- `steer`
|
|
23
|
+
- `cancel`
|
|
24
|
+
- `rewind`
|
|
25
|
+
- `fork`
|
|
26
|
+
- `threads`
|
|
27
|
+
- `runs`
|
|
21
28
|
- `model`
|
|
22
|
-
- `plugin`
|
|
23
29
|
- `run`
|
|
24
30
|
- `start`
|
|
25
31
|
- `stop`
|
|
@@ -83,8 +89,16 @@ toolang clone brice/alice
|
|
|
83
89
|
toolang start alice
|
|
84
90
|
toolang stop alice
|
|
85
91
|
toolang info alice
|
|
92
|
+
toolang alice chat "What changed today?"
|
|
93
|
+
toolang alice chat --thread tui_3nprht9x "Continue"
|
|
94
|
+
toolang alice chat --thread tui_3nprht9x --tui
|
|
95
|
+
toolang alice threads
|
|
96
|
+
toolang alice runs --thread tui_3nprht9x
|
|
97
|
+
toolang alice steer run_ppkp9e94 "Use the smaller patch"
|
|
98
|
+
toolang alice cancel tui_3nprht9x
|
|
99
|
+
toolang alice rewind run_ppkp9e94 "Try again from here"
|
|
100
|
+
toolang alice fork run_ppkp9e94 "Explore a different approach"
|
|
86
101
|
toolang model list
|
|
87
|
-
toolang plugin list
|
|
88
102
|
```
|
|
89
103
|
|
|
90
104
|
|
|
@@ -409,6 +423,12 @@ For multipart payload details:
|
|
|
409
423
|
`POST /api/v1/chat/stream` returns one SSE stream that follows an AI SDK UI
|
|
410
424
|
message stream subset.
|
|
411
425
|
|
|
426
|
+
The CLI command for chat-style input is `toolang <agent> chat [message]`.
|
|
427
|
+
Without `--thread`, the CLI creates a terminal chat thread. With `--thread`, it
|
|
428
|
+
continues or opens that thread. Job thread ids are inspectable and controllable
|
|
429
|
+
through thread and run commands, but `chat` does not implicitly reopen tasks or
|
|
430
|
+
create manual chore runs.
|
|
431
|
+
|
|
412
432
|
|
|
413
433
|
## Job Endpoints
|
|
414
434
|
|
|
@@ -417,23 +437,30 @@ message stream subset.
|
|
|
417
437
|
- `PATCH /api/v1/jobs/{job_id}`
|
|
418
438
|
- `GET /api/v1/jobs/archived`
|
|
419
439
|
- `GET /api/v1/jobs/archived/{job_id}`
|
|
420
|
-
- `PATCH /api/v1/jobs/archived/{job_id}`
|
|
421
440
|
- `DELETE /api/v1/jobs/archived/{job_id}`
|
|
422
441
|
- `GET /api/v1/tasks`
|
|
423
442
|
- `POST /api/v1/tasks`
|
|
424
443
|
- `GET /api/v1/tasks/{task_id}`
|
|
425
444
|
- `PATCH /api/v1/tasks/{task_id}`
|
|
445
|
+
- `POST /api/v1/tasks/{task_id}/draft`
|
|
446
|
+
- `POST /api/v1/tasks/{task_id}/ready`
|
|
447
|
+
- `POST /api/v1/tasks/{task_id}/archive`
|
|
448
|
+
- `POST /api/v1/tasks/{task_id}/reopen`
|
|
449
|
+
- `POST /api/v1/tasks/{task_id}/cancel`
|
|
426
450
|
- `GET /api/v1/tasks/archived`
|
|
427
451
|
- `GET /api/v1/tasks/archived/{task_id}`
|
|
428
|
-
- `PATCH /api/v1/tasks/archived/{task_id}`
|
|
429
452
|
- `DELETE /api/v1/tasks/archived/{task_id}`
|
|
430
453
|
- `GET /api/v1/chores`
|
|
431
454
|
- `POST /api/v1/chores`
|
|
432
455
|
- `GET /api/v1/chores/{chore_id}`
|
|
433
456
|
- `PATCH /api/v1/chores/{chore_id}`
|
|
457
|
+
- `POST /api/v1/chores/{chore_id}/draft`
|
|
458
|
+
- `POST /api/v1/chores/{chore_id}/ready`
|
|
459
|
+
- `POST /api/v1/chores/{chore_id}/archive`
|
|
460
|
+
- `POST /api/v1/chores/{chore_id}/run`
|
|
461
|
+
- `POST /api/v1/chores/{chore_id}/cancel`
|
|
434
462
|
- `GET /api/v1/chores/archived`
|
|
435
463
|
- `GET /api/v1/chores/archived/{chore_id}`
|
|
436
|
-
- `PATCH /api/v1/chores/archived/{chore_id}`
|
|
437
464
|
- `DELETE /api/v1/chores/archived/{chore_id}`
|
|
438
465
|
- `GET /api/v1/will`
|
|
439
466
|
|
|
@@ -442,14 +469,14 @@ message stream subset.
|
|
|
442
469
|
`GET /api/v1/chores` return the same projections split by kind.
|
|
443
470
|
|
|
444
471
|
List endpoints return authored job fields at the top level and runtime-derived
|
|
445
|
-
|
|
472
|
+
status under `runtime`.
|
|
446
473
|
|
|
447
474
|
Task items include:
|
|
448
475
|
|
|
449
476
|
- `id`
|
|
450
477
|
- `kind`
|
|
451
|
-
- `
|
|
452
|
-
- `
|
|
478
|
+
- `lifecycle`
|
|
479
|
+
- `status`
|
|
453
480
|
- `title`
|
|
454
481
|
- `path`
|
|
455
482
|
- `updated_at`
|
|
@@ -459,38 +486,45 @@ Chore items include:
|
|
|
459
486
|
|
|
460
487
|
- `id`
|
|
461
488
|
- `kind`
|
|
462
|
-
- `
|
|
489
|
+
- `lifecycle`
|
|
490
|
+
- `status`
|
|
463
491
|
- `schedule`
|
|
464
492
|
- `title`
|
|
465
493
|
- `path`
|
|
466
494
|
- `updated_at`
|
|
467
495
|
- `runtime`
|
|
468
496
|
|
|
469
|
-
`
|
|
497
|
+
`lifecycle` values are:
|
|
470
498
|
|
|
471
|
-
- `
|
|
472
|
-
- `
|
|
499
|
+
- `ready`
|
|
500
|
+
- `draft`
|
|
473
501
|
- `archived`
|
|
474
502
|
|
|
475
|
-
Task
|
|
503
|
+
Task status values are:
|
|
476
504
|
|
|
477
505
|
- `todo`
|
|
478
506
|
- `running`
|
|
479
507
|
- `done`
|
|
480
508
|
- `failed`
|
|
509
|
+
- `canceled`
|
|
510
|
+
|
|
511
|
+
Chore status values are:
|
|
512
|
+
|
|
513
|
+
- `todo`
|
|
514
|
+
- `running`
|
|
515
|
+
- `done`
|
|
481
516
|
|
|
482
517
|
`runtime` contains:
|
|
483
518
|
|
|
484
519
|
- `thread_id`
|
|
485
|
-
- `active_run`
|
|
486
520
|
- `last_run`
|
|
487
521
|
- `next_run`
|
|
488
522
|
|
|
489
|
-
`
|
|
490
|
-
|
|
491
|
-
|
|
523
|
+
`last_run` is the latest run object or `null`. If `last_run.status` is
|
|
524
|
+
`running`, that run is the active run. `next_run` is the next scheduled chore
|
|
525
|
+
run or `null`.
|
|
492
526
|
|
|
493
|
-
Default job list endpoints return
|
|
527
|
+
Default job list endpoints return ready jobs. Draft and archived jobs are
|
|
494
528
|
available only through explicit `/archived` routes.
|
|
495
529
|
|
|
496
530
|
Detail endpoints return the same item shape plus `body`.
|
|
@@ -500,17 +534,13 @@ Task create requests accept:
|
|
|
500
534
|
```json
|
|
501
535
|
{
|
|
502
536
|
"title": "Review API changes",
|
|
503
|
-
"body": "Review the API changes and summarize risks."
|
|
504
|
-
"state": "active",
|
|
505
|
-
"stage": "todo"
|
|
537
|
+
"body": "Review the API changes and summarize risks."
|
|
506
538
|
}
|
|
507
539
|
```
|
|
508
540
|
|
|
509
|
-
Task patch requests accept any subset of `title
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
on the normal route to archive a task. Patch `state: "active"` or
|
|
513
|
-
`state: "inactive"` on the archived route to unarchive it.
|
|
541
|
+
Task patch requests accept any subset of `title` and `body`. Lifecycle actions
|
|
542
|
+
use the task `draft`, `ready`, and `archive` endpoints. `task reopen` sets a
|
|
543
|
+
completed, failed, or canceled task back to scheduler status `todo`.
|
|
514
544
|
Delete is destructive and is available only through archived routes.
|
|
515
545
|
|
|
516
546
|
Chore create requests accept:
|
|
@@ -519,16 +549,13 @@ Chore create requests accept:
|
|
|
519
549
|
{
|
|
520
550
|
"title": "Check stale PRs",
|
|
521
551
|
"body": "Check stale pull requests and summarize blockers.",
|
|
522
|
-
"state": "active",
|
|
523
552
|
"schedule": "FREQ=HOURLY;INTERVAL=6"
|
|
524
553
|
}
|
|
525
554
|
```
|
|
526
555
|
|
|
527
|
-
Chore patch requests accept any subset of `title`, `body`, `
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
`state: "archived"` on the normal route to archive a chore. Patch
|
|
531
|
-
`state: "active"` or `state: "inactive"` on the archived route to unarchive it.
|
|
556
|
+
Chore patch requests accept any subset of `title`, `body`, and `schedule`.
|
|
557
|
+
Lifecycle actions use the chore `draft`, `ready`, and `archive` endpoints.
|
|
558
|
+
`chore run` starts one manual occurrence without changing the schedule.
|
|
532
559
|
Delete is destructive and is available only through archived routes.
|
|
533
560
|
|
|
534
561
|
|
|
@@ -537,7 +564,9 @@ Delete is destructive and is available only through archived routes.
|
|
|
537
564
|
- `GET /api/v1/runs`
|
|
538
565
|
- `GET /api/v1/runs/{run_id}`
|
|
539
566
|
- `POST /api/v1/runs/{run_id}/steer`
|
|
540
|
-
- `POST /api/v1/runs/{run_id}/
|
|
567
|
+
- `POST /api/v1/runs/{run_id}/cancel`
|
|
568
|
+
- `POST /api/v1/runs/{run_id}/rewind`
|
|
569
|
+
- `POST /api/v1/runs/{run_id}/fork`
|
|
541
570
|
- `GET /api/v1/instruct/{hash}`
|
|
542
571
|
- `GET /api/v1/context/{hash}`
|
|
543
572
|
- `GET /api/v1/threads`
|
|
@@ -547,6 +576,10 @@ Delete is destructive and is available only through archived routes.
|
|
|
547
576
|
|
|
548
577
|
`/api/v1/runs/{run_id}` is the main trace-detail endpoint.
|
|
549
578
|
|
|
579
|
+
`steer` and `cancel` operate on running runs. `rewind` and `fork` operate on
|
|
580
|
+
branchable chat threads by taking a run id as the anchor; task and chore threads
|
|
581
|
+
cannot be rewound or forked because their thread ids are derived from job ids.
|
|
582
|
+
|
|
550
583
|
|
|
551
584
|
## Hook Endpoints
|
|
552
585
|
|
|
@@ -25,9 +25,8 @@ Thread ids use one underscore-delimited normalized form:
|
|
|
25
25
|
|
|
26
26
|
Examples:
|
|
27
27
|
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `chat_ab12cd34`
|
|
28
|
+
- `tsk_3nprht9x`
|
|
29
|
+
- `chr_xy1234ab`
|
|
31
30
|
- `web_def456gh`
|
|
32
31
|
- `tui_jk789mnp`
|
|
33
32
|
- `tg_123456789`
|
|
@@ -112,6 +111,10 @@ To build a full transcript, flatten:
|
|
|
112
111
|
1. each run input
|
|
113
112
|
2. each step message in run order
|
|
114
113
|
|
|
114
|
+
Forked chat threads store their source thread and anchor run in `parent`.
|
|
115
|
+
Inherited transcript context includes visible source-thread runs before the
|
|
116
|
+
anchor run.
|
|
117
|
+
|
|
115
118
|
|
|
116
119
|
## Run API
|
|
117
120
|
|
|
@@ -124,6 +127,27 @@ Run detail returns:
|
|
|
124
127
|
`output.steps` contains the projected step detail for the run. This is the
|
|
125
128
|
source used by trace and chat inspection pages.
|
|
126
129
|
|
|
130
|
+
Run control endpoints are:
|
|
131
|
+
|
|
132
|
+
- `POST /api/v1/runs/{run_id}/steer`
|
|
133
|
+
- `POST /api/v1/runs/{run_id}/cancel`
|
|
134
|
+
- `POST /api/v1/runs/{run_id}/rewind`
|
|
135
|
+
- `POST /api/v1/runs/{run_id}/fork`
|
|
136
|
+
|
|
137
|
+
`steer` and `cancel` require a running run. They can target chat, task, and
|
|
138
|
+
chore runs.
|
|
139
|
+
|
|
140
|
+
`rewind` replaces the visible suffix of a branchable chat thread from the
|
|
141
|
+
anchor run onward and starts a replacement run in the same thread. Superseded
|
|
142
|
+
runs remain inspectable by id but are hidden from normal thread projections.
|
|
143
|
+
|
|
144
|
+
`fork` creates a new chat thread from the context before the anchor run and
|
|
145
|
+
starts one run in the new thread.
|
|
146
|
+
|
|
147
|
+
Task and chore thread ids are derived from job ids, so job threads cannot be
|
|
148
|
+
rewound or forked. Job execution commands expose explicit job semantics such as
|
|
149
|
+
`task reopen <id>` and `chore run <id>` instead.
|
|
150
|
+
|
|
127
151
|
|
|
128
152
|
## Chat API
|
|
129
153
|
|
|
@@ -18,15 +18,20 @@ One run is bound to one prepared snapshot for its full lifetime.
|
|
|
18
18
|
|
|
19
19
|
## Durable Store
|
|
20
20
|
|
|
21
|
-
`runs.db` is the durable store for
|
|
21
|
+
`runs.db` is the durable store for thread and run truth.
|
|
22
22
|
|
|
23
23
|
It stores:
|
|
24
24
|
|
|
25
|
+
- threads
|
|
25
26
|
- runs
|
|
26
27
|
- steps
|
|
27
28
|
- agent-local updates
|
|
28
29
|
- deduplicated prompt bodies
|
|
29
30
|
|
|
31
|
+
`.runtime/jobs.db` stores the scheduler projection for ready task and chore
|
|
32
|
+
documents. It is used for atomic job claims and completion bookkeeping; it is
|
|
33
|
+
not the transcript or run-history store.
|
|
34
|
+
|
|
30
35
|
|
|
31
36
|
## Durable Records
|
|
32
37
|
|
|
@@ -47,8 +52,8 @@ It stores:
|
|
|
47
52
|
`input` is the canonical initial `Message` for the run.
|
|
48
53
|
|
|
49
54
|
Toolang-owned run ids use `run_<id>`, where `<id>` is encoded with the `run`
|
|
50
|
-
id family. Thread ids use `<kind>_<id>`, such as `
|
|
51
|
-
`
|
|
55
|
+
id family. Thread ids use `<kind>_<id>`, such as `tsk_3nprht9x`,
|
|
56
|
+
`chr_xy1234ab`, or `web_def456gh`.
|
|
52
57
|
|
|
53
58
|
### StepRecord
|
|
54
59
|
|
|
@@ -87,6 +92,7 @@ Run input is stored as an ordered `inputs` stream. Each input has:
|
|
|
87
92
|
|
|
88
93
|
`index = 0` is the `start` input that created the run. Later `steer`
|
|
89
94
|
inputs belong to the same running run and can be referenced by later steps.
|
|
95
|
+
Cancel operations append a `stop` input and then finish the run as canceled.
|
|
90
96
|
|
|
91
97
|
Step input is an ordered mix of:
|
|
92
98
|
|
|
@@ -69,11 +69,10 @@ For the `run` family:
|
|
|
69
69
|
|
|
70
70
|
The proposed full identities are:
|
|
71
71
|
|
|
72
|
-
- task thread: `
|
|
73
|
-
- chore thread: `
|
|
72
|
+
- task thread: `tsk_<id>`
|
|
73
|
+
- chore thread: `chr_<id>`
|
|
74
74
|
- web chat thread: `web_<id>`
|
|
75
75
|
- TUI chat thread: `tui_<id>`
|
|
76
|
-
- agent chat thread: `chat_<id>`
|
|
77
76
|
- Telegram thread: `tg_<external_id>`
|
|
78
77
|
- run id: `run_<id>`
|
|
79
78
|
|
|
@@ -68,8 +68,9 @@ Key paths:
|
|
|
68
68
|
| `agent.too` | Agent program |
|
|
69
69
|
| `config.toml` | Agent-local configuration |
|
|
70
70
|
| `psyches/`, `skills/`, `services/`, `prompts/` | Agent-local cap definitions |
|
|
71
|
-
| `tasks/` |
|
|
72
|
-
| `chores/` |
|
|
71
|
+
| `tasks/` | Ready task documents |
|
|
72
|
+
| `chores/` | Ready chore documents |
|
|
73
|
+
| `drafts/` | Draft task and chore documents |
|
|
73
74
|
| `archive/` | Retired task and chore documents |
|
|
74
75
|
| `.caps/` | Prepared runtime artifacts |
|
|
75
76
|
| `.runtime/` | Live runtime state |
|
|
@@ -88,9 +89,9 @@ Key paths:
|
|
|
88
89
|
| `status.json` | Runtime status, endpoint, sandbox summary, and enabled features |
|
|
89
90
|
| `agent.log` | Runtime log |
|
|
90
91
|
| `logs/<thunk>/<run_id>.log` | Per-run script invoke logs when `PY_LOG` is set |
|
|
91
|
-
| `
|
|
92
|
+
| `jobs.db` | Scheduler job projection and atomic job claims |
|
|
93
|
+
| `runs.db` | Threads, runs, steps, updates, and prompt blobs |
|
|
92
94
|
| `ids.json` | Local id allocator state |
|
|
93
|
-
| `pulse.json` | Pulse loop state |
|
|
94
95
|
| `tools/` | Per-tool plugin working directories |
|
|
95
96
|
| `channels/` | Per-channel plugin working directories |
|
|
96
97
|
|
|
@@ -122,7 +123,8 @@ Durable authored state lives in:
|
|
|
122
123
|
- agent cap directories
|
|
123
124
|
- agent `tasks/`
|
|
124
125
|
- agent `chores/`
|
|
126
|
+
- agent `drafts/`
|
|
125
127
|
- agent `archive/`
|
|
126
128
|
|
|
127
129
|
Durable execution state does not live in authored files. It lives in
|
|
128
|
-
`runs.db`.
|
|
130
|
+
`jobs.db` and `runs.db`.
|