@tachu/host-defaults 1.0.0-rc.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.
- package/CHANGELOG.md +52 -0
- package/LICENSE +201 -0
- package/README.md +200 -0
- package/README_ZH.md +201 -0
- package/dist/build-host-engine-dependencies.d.ts +51 -0
- package/dist/build-host-engine-dependencies.d.ts.map +1 -0
- package/dist/build-host-engine-dependencies.js +70 -0
- package/dist/build-host-engine-dependencies.js.map +1 -0
- package/dist/capabilities.d.ts +10 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +26 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/providers.d.ts +10 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +104 -0
- package/dist/providers.js.map +1 -0
- package/dist/resolve-embedding-runtime.d.ts +11 -0
- package/dist/resolve-embedding-runtime.d.ts.map +1 -0
- package/dist/resolve-embedding-runtime.js +26 -0
- package/dist/resolve-embedding-runtime.js.map +1 -0
- package/dist/resolve-projection-stack.d.ts +59 -0
- package/dist/resolve-projection-stack.d.ts.map +1 -0
- package/dist/resolve-projection-stack.js +146 -0
- package/dist/resolve-projection-stack.js.map +1 -0
- package/dist/resolve-semantic-judge.d.ts +3 -0
- package/dist/resolve-semantic-judge.d.ts.map +1 -0
- package/dist/resolve-semantic-judge.js +18 -0
- package/dist/resolve-semantic-judge.js.map +1 -0
- package/dist/semantic-retrieval.d.ts +9 -0
- package/dist/semantic-retrieval.d.ts.map +1 -0
- package/dist/semantic-retrieval.js +44 -0
- package/dist/semantic-retrieval.js.map +1 -0
- package/package.json +59 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0-rc.0] - 2026-06-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### `@tachu/core`
|
|
13
|
+
|
|
14
|
+
- 9-phase execution pipeline with session management, minimum safety, intent analysis, planning, graph validation, sub-task execution, candidate-answer synthesis, result validation, and output normalization.
|
|
15
|
+
- Built-in `direct-answer` and `tool-use` sub-flows, including tool-loop execution, streaming deltas, cancellation propagation, and turn retry bookkeeping.
|
|
16
|
+
- Descriptor Registry for Rules, Skills, Tools, and Agents, including version-aware descriptor lookup and deterministic activation gates.
|
|
17
|
+
- Prompt assembly with token accounting, context budgeting hooks, multimodal resource placeholders, and provider-bound reference materialization.
|
|
18
|
+
- Result Validation contracts: `EvidenceEntry`, `ClaimEntry`, `CandidateAnswer`, `ValidationOutcome`, deterministic validation rules, optional semantic judge adapter, and degrade / handoff / retry outcomes.
|
|
19
|
+
- Turn Policy support for tool include/exclude, skill pin/exclude, explicit skill priority, final-answer skill inheritance, and visualization metadata passthrough.
|
|
20
|
+
- Resource Reference Pool, token-level Resource Demand routing, multimodal memory fidelity for new sessions, and provider image carrier support.
|
|
21
|
+
|
|
22
|
+
#### `@tachu/extensions`
|
|
23
|
+
|
|
24
|
+
- OpenAI, Anthropic, Qwen, Gemini, and Mock provider adapters with streaming, tool calling, configurable base URLs, timeouts, and embedding support where implemented.
|
|
25
|
+
- Built-in tools for file, terminal, search, web, git, task tracking, and typecheck/test execution workflows.
|
|
26
|
+
- MCP stdio and SSE adapters, OpenTelemetry / JSONL emitters, Qdrant and local vector index adapters, and file-backed memory with projection outbox support.
|
|
27
|
+
|
|
28
|
+
#### `@tachu/host-defaults`
|
|
29
|
+
|
|
30
|
+
- Shared host wiring for CLI and embedded hosts: provider inference, capability checks, semantic retrieval facade setup, semantic judge resolution, and memory projection stack helpers.
|
|
31
|
+
|
|
32
|
+
#### `@tachu/cli`
|
|
33
|
+
|
|
34
|
+
- `tachu init`, `tachu run`, `tachu chat`, and approval-management commands.
|
|
35
|
+
- Interactive session persistence, streaming renderer, terminal Markdown rendering, configuration loading, provider setup, and opt-in real-provider end-to-end test path.
|
|
36
|
+
|
|
37
|
+
#### `@tachu/web-fetch-server`
|
|
38
|
+
|
|
39
|
+
- Private optional sidecar for browser-backed `web-fetch` and `web-search` workflows, with Playwright-based rendering and Docker runtime alignment.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Workspace packages now publish in lockstep as `1.0.0-rc.0`.
|
|
44
|
+
- Public package publish order is `@tachu/core` β `@tachu/extensions` β `@tachu/host-defaults` β `@tachu/cli`.
|
|
45
|
+
- Release artifact validation checks public package metadata, mirrored package docs, executable bins, built artifacts, private sidecar exclusion, and Web Fetch Docker / Playwright runtime alignment.
|
|
46
|
+
- Package descriptions and install guidance now use release-candidate terminology.
|
|
47
|
+
|
|
48
|
+
### Known Limitations
|
|
49
|
+
|
|
50
|
+
- Runtime provider fallback after `ProviderError` is not implemented in this release candidate.
|
|
51
|
+
- Semantic judge support is available but not production-complete.
|
|
52
|
+
- The Web Fetch sidecar remains private and is not published to npm.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Tachu Contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Tachu
|
|
2
|
+
|
|
3
|
+
**An agentic engine under active development β the *Harness* that aims to turn any LLM into a reliable, observable Agent.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@tachu/core)
|
|
6
|
+
[](#project-status)
|
|
7
|
+
[](#license)
|
|
8
|
+
[](https://bun.sh)
|
|
9
|
+
[](https://www.typescriptlang.org)
|
|
10
|
+
|
|
11
|
+
> **Project Status β Release Candidate.** The 9-phase pipeline, registry, prompt assembler, CLI, OpenAI / Anthropic / Qwen / Gemini adapters, MCP adapters, vector stores and observability emitters are wired up and tested. Phase 3 (Intent Analysis) is a real LLM call, Phase 5 routes complex tool-capable requests to the built-in `tool-use` loop, and Phase 8 runs deterministic validation rules with optional semantic judge. Runtime provider fallback and semantic judge production hardening remain post-rc work. Install via the `@rc` dist-tag.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What is Tachu?
|
|
16
|
+
|
|
17
|
+
Tachu aims to be an **agentic engine you can build a real product on** β not a toy demo, not a thin wrapper. It is the *Harness* in the equation **Agent = Model + Harness**: it provides the structural skeleton (protocol, lifecycle, safety, memory, orchestration) so that any LLM becomes a reliable, observable Agent.
|
|
18
|
+
|
|
19
|
+
The engine is intentionally **domain-agnostic**: it knows nothing about your business logic, your users, or your domain vocabulary. Instead, it defines a small set of core abstractions (Rules, Skills, Tools, Agents) through which your business fills in all the intelligence. Tachu is designed to handle the hard parts β 9-phase execution pipeline, dual-plane semantic matching, context window management, token-precise prompt assembly, structured retry/fallback, cancellation propagation, and end-to-end observability.
|
|
20
|
+
|
|
21
|
+
Tachu ships as a Bun-native TypeScript monorepo with three published packages β the zero-dependency engine core (`@tachu/core`), an official extensions library (`@tachu/extensions`), and a fully-featured CLI program (`@tachu/cli`) that doubles as the reference implementation β plus `@tachu/host-defaults` for shared CLI/embedded host wiring, and an optional private sidecar package (`@tachu/web-fetch-server`) for remote browser-backed web tools.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Project Status
|
|
26
|
+
|
|
27
|
+
**Current release:** `1.0.0-rc.0` on the `rc` dist-tag.
|
|
28
|
+
|
|
29
|
+
**Version terminology:** The product line is **Tachu v1**. Release candidates are stabilization builds for `1.0.0`, not a separate framework generation. HTTP paths like `/v1/extract` are API versions only. See [detailed-design Β§ version glossary](docs/detailed-design.md#ηζ¬δΈεεΈζ―θ―εΏ
θ―»).
|
|
30
|
+
|
|
31
|
+
This is the **first release candidate**. The table below is a readability index only; runtime behavior, defaults, and edge cases are authoritative in the cited source files and tests.
|
|
32
|
+
|
|
33
|
+
| Capability | Status | Notes |
|
|
34
|
+
|-----------|--------|-------|
|
|
35
|
+
| 9-phase pipeline skeleton (types, orchestrator, state machine, hooks) | β
Implemented | `packages/core/src/engine` |
|
|
36
|
+
| Descriptor Registry (Rules / Skills / Tools / Agents) | β
Implemented | Markdown + YAML frontmatter loader, semantic indexing, startup validation |
|
|
37
|
+
| Prompt assembler (tiktoken, KV-cache-friendly ordering) | β
Implemented | `packages/core/src/prompt` |
|
|
38
|
+
| Task scheduler, DAG validator, turn/task retry bookkeeping | β
Implemented | `packages/core/src/engine/scheduler.ts`; **runtime provider fallback on LLM errors is not wired** (see [Providers guide](./docs/guides/providers-and-integrations.md)) |
|
|
39
|
+
| Session / Memory / Runtime-state / Safety / Model-router / Provider / Observability / Hooks modules | β
Implemented | `packages/core/src/modules` |
|
|
40
|
+
| OpenAI / Anthropic / Qwen / Mock Provider adapters | β
Implemented | CLI auto-wires via `@tachu/host-defaults`; streaming, function calling, tool schemas |
|
|
41
|
+
| Gemini Provider adapter | β
Implemented (manual wiring) | `GeminiProviderAdapter` in `@tachu/extensions` with unit tests; **not** registered by default CLI / `buildProviderAdapter` β inject via `createEngine(..., { providers: [new GeminiProviderAdapter(...)] })` (see [Providers guide](./docs/guides/providers-and-integrations.md)) |
|
|
42
|
+
| `apiKey` / `baseURL` / `organization` / `timeoutMs` configuration (env var / `tachu.config.ts` / CLI flags) | β
Implemented | Azure OpenAI / LiteLLM / OpenRouter / self-hosted gateways supported |
|
|
43
|
+
| 22 built-in tools + Terminal / File / Web backends | β
Implemented | `packages/extensions/src/tools/index.ts` |
|
|
44
|
+
| MCP stdio + SSE adapters | β
Implemented | `packages/extensions/src/mcp` |
|
|
45
|
+
| `LocalFsVectorIndexAdapter` (file-backed) + `QdrantVectorIndexAdapter` (REST) | β
Implemented | |
|
|
46
|
+
| OTel / JSONL emitters | β
Implemented | |
|
|
47
|
+
| `tachu init` / `tachu run` / `tachu chat` CLI surface, streaming renderer, session persistence, Ctrl+C semantics | β
Implemented | |
|
|
48
|
+
| **CLI terminal Markdown rendering** | β
**Implemented** | `marked` + `marked-terminal` + `cli-highlight` stack. Applied to the final assistant reply in `tachu chat` / `tachu run --output text` when stdout is a TTY; automatically disables under `NO_COLOR` / non-TTY / `--no-color`. Explicit control via `--markdown` / `--no-markdown` on `tachu run`. Dedicated `renderMarkdownToAnsi` wrapper (`packages/cli/src/renderer/markdown.ts`) with 12 unit tests in `markdown.test.ts`. |
|
|
49
|
+
| **Phase 3 β Intent Analysis (LLM call, pure classification)** | β
**Implemented** | Pure classification only (`IntentResult`); final user reply is Phase 7 `direct-answer`. **Implementation:** `packages/core/src/engine/phases/intent.ts` (`INTENT_SYSTEM_PROMPT_BASE`, fast paths, JSON parse, heuristic fallback); tests: `intent.test.ts`. Hosts may **`config.intent.systemPromptBase`** to replace the base wholesale; optional extra few-shots: `config.intent.fewShotExamples` (Agent Context / explicit selections still appended by core). |
|
|
50
|
+
| **Phase 5 β Task Planning (planning router)** | β
**Implemented** | Enforces `plans[0].tasks.length >= 1`. Rules: (1) `simple` intent β single `direct-answer` sub-flow task; (2) `complex` + visible tools β single `tool-use` sub-flow task; (3) `complex` + no visible tool β single `direct-answer` sub-flow task with `warn: true`; (4) defensive post-guard catches upstream regressions that leave `tasks` empty. Multi-step behavior lives inside `tool-use`; optional plan preview / human review may still evolve, but there is no separate default LLM pre-planner on the main path. |
|
|
51
|
+
| **`direct-answer` built-in Sub-flow (Phase 7)** | β
**Implemented** | `packages/core/src/engine/subflows/direct-answer.ts`. Resolves `capabilityMapping.intent` (fallback to `fast-cheap`), composes system + β€10 memory-history entries + user prompt, calls `ProviderAdapter.chat()` with a 60 s per-call timeout merged with the phase abort signal. System prompt mandates **natural-language Markdown**, forbids JSON wrappers / `"ε·²θ―ε«θ―·ζ±οΌβ¦"` templates / 4-space indented code blocks, and supports a `warn: true` flag for honest tool-missing disclaimers. Emits `llm_call_start` / `llm_call_end` observability events under `phase: "direct-answer"`. Non-overridable: `DescriptorRegistry` registers `direct-answer` as a reserved name and rejects business registration / unregistration with `RegistryError.reservedName`. |
|
|
52
|
+
| **Phase 8 β Result Validation Outcome** | π‘ **Partially wired** | `ValidationOutcome` union + `ValidationRuleRegistry` with **5 deterministic rules** via `buildDefaultValidationRuleRegistry()` (`packages/core/src/engine/phases/validation/index.ts`). Optional `ProviderSemanticJudgeAdapter` / `BudgetedSemanticJudgeAdapter`. Engine consumes `retry` (turn loop via `decideTurnRetry`), `degrade` / `handoff` (exit to Output). Gaps: no standalone `ExecutionPolicy` type; runtime provider fallback is not implemented and semantic judge is not production-complete. |
|
|
53
|
+
| **Phase 9 β Output Assembly** | β
**Implemented** | Content selector: `taskResults['task-direct-answer']` β `{intent, taskResults}` structured JSON (tool-chain success path; semantic polish still depends on real Phase 8) β honest-fallback plain-language message with recognized intent + internal diagnosis + *"rephrase as simple"* suggestion (validation failed). Internal state JSON is never leaked to end users. Covered by `output.test.ts`. |
|
|
54
|
+
| Real-world smoke tests against OpenAI / Anthropic / Azure | π‘ **Manually verified; opt-in automated** | Mock unit tests cover adapters in CI. Maintainers have **hand-run** real LLM paths (custom gateways included). An **opt-in** scripted e2e exists β set `TACHU_REAL_E2E=1` plus `TACHU_E2E_API_KEY` / `TACHU_E2E_API_BASE` / `TACHU_E2E_PROVIDER` (see [Contributing](./CONTRIBUTING.md)) β but default CI does not publish signed recordings. |
|
|
55
|
+
| Production hardening (SLO, error budgets, failure injection, signed provenance) | π΄ Not yet | Target for `1.0.0` (Tachu v1). |
|
|
56
|
+
|
|
57
|
+
Legend: β
implemented and tested Β· π‘ stub / placeholder present, real implementation in progress Β· π΄ not yet started.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Key Features
|
|
62
|
+
|
|
63
|
+
- **9-Phase Execution Pipeline** β session management β safety β intent analysis (pure classification) β pre-check β planning router β DAG validation β execution β result validation outcome β output normalization; each phase is a typed, hookable stage, and every request β simple or complex β flows through all nine phases with uniform Rules / Hooks / Observability / budget accounting
|
|
64
|
+
- **Task Planning + Tool-use Loop** β Phase 5 does not precompute a ranked multi-step plan. It routes `simple` requests to `direct-answer`, routes `complex + visible tools` into the built-in `tool-use` Agentic Loop, and lets that loop perform iterative LLM tool selection β gated tool execution β tool-result feedback β final answer.
|
|
65
|
+
- **`direct-answer` built-in Sub-flow** β answers to simple requests (and to complex requests with no matching tool) are produced by a first-class engine-internal Sub-flow running in Phase 7, not baked into the intent prompt.
|
|
66
|
+
- **Dual-Plane Matching** β semantic discovery (vector similarity) + deterministic execution gate (scopes, whitelist, approval) for every Rule, Skill, Tool, and Agent
|
|
67
|
+
- **Four Core Abstractions** β declare Rules, Skills, Tools, and Agents as Markdown + YAML frontmatter descriptors; the engine resolves, activates, and orchestrates them automatically
|
|
68
|
+
- **OpenAI & Anthropic Adapters** β streaming, function calling, configurable `baseURL` / `organization` / `timeoutMs`; works with Azure OpenAI, LiteLLM, OpenRouter, or any self-hosted gateway
|
|
69
|
+
- **MCP Integration** β connect any MCP server (stdio or SSE) via `McpToolAdapter`; MCP tools become first-class engine Tools
|
|
70
|
+
- **Token-Precise Prompt Assembly** β tiktoken-based exact token counting; KV-cache-friendly prompt layout; automatic context compression (Head-Middle-Tail strategy)
|
|
71
|
+
- **Structured Memory** β session context window with configurable limits; archive-before-summarize guarantee; vector recall for long-term memory
|
|
72
|
+
- **OpenTelemetry Observability** β every phase entry/exit, LLM call, tool call, retry, and fallback emits a structured `EngineEvent`; OTel and JSONL emitters included
|
|
73
|
+
- **Interactive CLI** β `tachu chat` / `tachu run` / `tachu init` with full parameter sets, streaming render, session persistence, and Ctrl+C cancellation
|
|
74
|
+
- **Terminal Markdown rendering** β final assistant replies are rendered via `marked` + `marked-terminal` + `cli-highlight`; headings, bold / italic, lists, block quotes, links, tables and fenced code blocks (with syntax highlighting) are all supported. Automatically disabled under `NO_COLOR` / non-TTY / `--no-color`; explicitly controllable with `--markdown` / `--no-markdown` on `tachu run`.
|
|
75
|
+
- **Fail-Closed Safety Baseline** β loop protection, budget circuit-breaker, and basic input validation are hardwired into the engine and cannot be disabled
|
|
76
|
+
- **Qdrant & LocalFs Vector Stores** β plug in Qdrant for multi-process deployments or use the file-backed store for local/single-process setups
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Vision
|
|
81
|
+
|
|
82
|
+
> *ε€ͺεζιοΌδΈη©δΉε§γδ»₯ε£°ζεΌζ述符ει Agent δΈη©γ*
|
|
83
|
+
> *In the beginning was the Tao β all things arise from it. With declarative descriptors, conjure Agent capability from nothing.*
|
|
84
|
+
|
|
85
|
+
The long-term vision of Tachu is a universal Agent framework where **the engine provides the skeleton and business provides the blood**: any organization can build production-grade agentic systems on top of a stable, observable, auditable foundation without re-solving the hard problems of safety, context management, retry logic, and multi-provider orchestration every time.
|
|
86
|
+
|
|
87
|
+
Tachu is built around three convictions:
|
|
88
|
+
|
|
89
|
+
1. **The Harness is the hard part.** Model intelligence is commoditized; reliable orchestration is not. Tachu invests deeply in the engine infrastructure so application developers can focus on domain logic.
|
|
90
|
+
2. **Declaration over implementation.** Rules, Skills, Tools, and Agents are declared as plain Markdown files. The engine resolves them. No framework-specific boilerplate.
|
|
91
|
+
3. **Observable by default.** Every internal event is structured and emittable. Production systems need complete traces β Tachu provides them without opt-in instrumentation.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Core Abstractions
|
|
96
|
+
|
|
97
|
+
Rules, Skills, Tools, and Agents are Markdown + YAML descriptors. Semantic discovery proposes candidates; deterministic gates authorize execution (especially Tools).
|
|
98
|
+
|
|
99
|
+
Details: [Overview Β· abstractions](./docs/overview-design.md#δΈεε€§ζ ΈεΏζ½θ±‘) Β· [Dual-plane matching](./docs/overview-design.md#ε
±δΊ«ηΉζ§).
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Architecture (summary)
|
|
104
|
+
|
|
105
|
+
Requests flow through a **9-phase pipeline**. Complex tool work enters the built-in `tool-use` loop in Phase 7.
|
|
106
|
+
|
|
107
|
+
Details: [Pipeline phases](./docs/architecture/pipeline-phases.md) Β· [Overview design](./docs/overview-design.md).
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Installation
|
|
112
|
+
|
|
113
|
+
Tachu requires [Bun](https://bun.sh) as the runtime.
|
|
114
|
+
|
|
115
|
+
> **Install via the `@rc` dist-tag** (or an exact version) until Tachu reaches stable.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Install the engine core
|
|
119
|
+
bun add @tachu/core@rc
|
|
120
|
+
|
|
121
|
+
# Install the extensions library (providers, tools, backends, vector stores)
|
|
122
|
+
bun add @tachu/extensions@rc
|
|
123
|
+
|
|
124
|
+
# Install and use the CLI globally
|
|
125
|
+
bun add -g @tachu/cli@rc
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
After global installation, verify with:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
tachu --version # expect 1.0.0-rc.0 or newer
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Quick Start
|
|
137
|
+
|
|
138
|
+
### CLI
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 1. Initialize a new project workspace
|
|
142
|
+
tachu init --template minimal --provider openai
|
|
143
|
+
|
|
144
|
+
# 2. Set your API key (used by the OpenAI provider adapter)
|
|
145
|
+
export OPENAI_API_KEY=sk-...
|
|
146
|
+
|
|
147
|
+
# 3. Run a single prompt
|
|
148
|
+
tachu run "Summarize the last 5 git commits in this repository"
|
|
149
|
+
|
|
150
|
+
# 4. Start an interactive chat session
|
|
151
|
+
tachu chat
|
|
152
|
+
|
|
153
|
+
# Resume the most recent session
|
|
154
|
+
tachu chat --resume
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Programmatic embedding: see [Configuration](./docs/guides/configuration.md) and `@tachu/host-defaults`.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Documentation
|
|
163
|
+
|
|
164
|
+
| Document | Description |
|
|
165
|
+
|----------|-------------|
|
|
166
|
+
| [Overview Design](./docs/overview-design.md) | Vision, layers, abstractions, pipeline concepts |
|
|
167
|
+
| [Detailed Design](./docs/detailed-design.md) | Types, modules, configuration schema |
|
|
168
|
+
| [Technical Design](./docs/technical-design.md) | Engineering structure and implementation guide |
|
|
169
|
+
| [Pipeline phases](./docs/architecture/pipeline-phases.md) | 9-phase pipeline and tool-use loop |
|
|
170
|
+
| [Package layout](./docs/architecture/package-layout.md) | Monorepo packages and dependencies |
|
|
171
|
+
| [Design principles](./docs/architecture/design-principles.md) | Core engineering principles |
|
|
172
|
+
| [CLI reference](./docs/guides/cli.md) | All commands and flags |
|
|
173
|
+
| [Configuration](./docs/guides/configuration.md) | `tachu.config.ts` / `EngineConfig` |
|
|
174
|
+
| [Providers & integrations](./docs/guides/providers-and-integrations.md) | LLM, MCP, vector stores |
|
|
175
|
+
| [Extension guide](./docs/guides/extension-guide.md) | Rules, Skills, Tools, Agents |
|
|
176
|
+
| [Observability & safety](./docs/guides/observability-and-safety.md) | OTel, events, safety |
|
|
177
|
+
| [CONTEXT.md](./CONTEXT.md) | Product vocabulary |
|
|
178
|
+
| [CONTRIBUTING.md](./CONTRIBUTING.md) | Development workflow |
|
|
179
|
+
| [Web Fetch Server](./packages/web-fetch-server/README.md) | Optional browser sidecar |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Web Fetch Server (optional)
|
|
184
|
+
|
|
185
|
+
For browser-backed `web-fetch` / `web-search`, run the private sidecar β see [packages/web-fetch-server/README.md](./packages/web-fetch-server/README.md).
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
bun run dev:server:install-browser
|
|
189
|
+
bun run dev:server
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
[Apache License 2.0](./LICENSE) Β© 2026 Tachu Contributors
|
|
197
|
+
|
|
198
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. A copy of the License is included in the [LICENSE](./LICENSE) file or may be obtained at <http://www.apache.org/licenses/LICENSE-2.0>.
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|