@nzkbuild/toche 1.0.10 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/NOTICE +18 -18
- package/README.md +421 -367
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,201 +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 reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and 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 Toche 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.
|
|
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 reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and 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 Toche 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/NOTICE
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
Toche
|
|
2
|
-
Copyright 2026 Toche Contributors
|
|
3
|
-
|
|
4
|
-
This product includes software developed by:
|
|
5
|
-
|
|
6
|
-
- rtk-ai (https://github.com/rtk-ai/rtk) — Apache-2.0
|
|
7
|
-
Copyright 2024 rtk-ai and rtk-ai Labs
|
|
8
|
-
|
|
9
|
-
- ryoppippi (https://github.com/ccusage/ccusage) — MIT
|
|
10
|
-
Copyright (c) 2025 ryoppippi
|
|
11
|
-
|
|
12
|
-
- Safi Shamsi (https://github.com/Graphify-Labs/graphify) — MIT
|
|
13
|
-
Copyright (c) 2026 Safi Shamsi
|
|
14
|
-
|
|
15
|
-
- Julius Brussee (https://github.com/juliusbrussee/caveman) — MIT
|
|
16
|
-
Copyright (c) 2026 Julius Brussee
|
|
17
|
-
|
|
18
|
-
- multica-ai (https://github.com/multica-ai/andrej-karpathy-skills) — MIT
|
|
1
|
+
Toche
|
|
2
|
+
Copyright 2026 Toche Contributors
|
|
3
|
+
|
|
4
|
+
This product includes software developed by:
|
|
5
|
+
|
|
6
|
+
- rtk-ai (https://github.com/rtk-ai/rtk) — Apache-2.0
|
|
7
|
+
Copyright 2024 rtk-ai and rtk-ai Labs
|
|
8
|
+
|
|
9
|
+
- ryoppippi (https://github.com/ccusage/ccusage) — MIT
|
|
10
|
+
Copyright (c) 2025 ryoppippi
|
|
11
|
+
|
|
12
|
+
- Safi Shamsi (https://github.com/Graphify-Labs/graphify) — MIT
|
|
13
|
+
Copyright (c) 2026 Safi Shamsi
|
|
14
|
+
|
|
15
|
+
- Julius Brussee (https://github.com/juliusbrussee/caveman) — MIT
|
|
16
|
+
Copyright (c) 2026 Julius Brussee
|
|
17
|
+
|
|
18
|
+
- multica-ai (https://github.com/multica-ai/andrej-karpathy-skills) — MIT
|
package/README.md
CHANGED
|
@@ -1,367 +1,421 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="assets/branding/toche-wordmark.png" alt="Toche" width="620">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<strong>
|
|
7
|
-
</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
Toche is a local gateway
|
|
11
|
-
It removes avoidable work
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<a href="#what-
|
|
21
|
-
<a href="#
|
|
22
|
-
<a href="#
|
|
23
|
-
<a href="#
|
|
24
|
-
<a href="#
|
|
25
|
-
<a href="#
|
|
26
|
-
</
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
|
|
42
|
-
- **
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
| `
|
|
214
|
-
| `
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
| `
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
|
243
|
-
|
|
244
|
-
| `toche
|
|
245
|
-
| `toche
|
|
246
|
-
| `toche
|
|
247
|
-
| `toche
|
|
248
|
-
| `toche
|
|
249
|
-
| `toche
|
|
250
|
-
| `toche
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/branding/toche-wordmark.png" alt="Toche" width="620">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>One local runtime. Multiple AI clients. Every request leaves a receipt.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
Toche is a local multi-client gateway that sits between your AI coding tools and
|
|
11
|
+
their upstream API endpoints. It removes avoidable work, isolates trust boundaries,
|
|
12
|
+
and keeps every optimization visible and reversible.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="assets/branding/toche-status.svg" alt="Toche 1.1.0: Multi-client runtime, Claude Code and Codex, 65 filters, duplicate requests coalesced from many to one, zero hosted accounts" width="820">
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="#what-toche-is">What Toche is</a> ·
|
|
21
|
+
<a href="#what-toche-is-not">What it is not</a> ·
|
|
22
|
+
<a href="#install">Install</a> ·
|
|
23
|
+
<a href="#how-it-works">How it works</a> ·
|
|
24
|
+
<a href="#supported-clients">Supported clients</a> ·
|
|
25
|
+
<a href="#command-reference">Commands</a> ·
|
|
26
|
+
<a href="#trust-and-isolation">Trust and isolation</a> ·
|
|
27
|
+
<a href="#documentation">Docs</a>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
## What Toche is
|
|
31
|
+
|
|
32
|
+
Toche is a local runtime that accepts connections from multiple AI coding clients
|
|
33
|
+
simultaneously and routes their requests to your configured upstream API endpoints.
|
|
34
|
+
While a request passes through, Toche can:
|
|
35
|
+
|
|
36
|
+
- **Coalesce identical in-flight requests** so N clients sharing the same upstream
|
|
37
|
+
and trust domain make one upstream call instead of N.
|
|
38
|
+
- **Replay eligible responses** from a persistent cross-session cache when the
|
|
39
|
+
workspace fingerprint matches.
|
|
40
|
+
- **Reduce known tool-output noise** with 65 built-in TOML-defined filters
|
|
41
|
+
while keeping the original content recoverable with `toche expand`.
|
|
42
|
+
- **Inject provider prompt-cache breakpoints** to maximize Anthropic cache hits.
|
|
43
|
+
- **Record every request** in a local SQLite ledger so `toche stats` can explain
|
|
44
|
+
what happened.
|
|
45
|
+
|
|
46
|
+
Toche does not host an account, send telemetry, or require a cloud service.
|
|
47
|
+
|
|
48
|
+
## What Toche is not
|
|
49
|
+
|
|
50
|
+
Toche is not a provider account manager, a model load balancer, a protocol
|
|
51
|
+
translator, or a hosted API gateway. It does not select providers automatically
|
|
52
|
+
or fall back between them. It does not translate between Anthropic and OpenAI
|
|
53
|
+
protocols. These are explicit non-goals for the 1.1.0 release.
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
### Prerequisites
|
|
58
|
+
|
|
59
|
+
- Node.js 18 or newer for the npm installer.
|
|
60
|
+
- At least one supported AI coding client already installed and working.
|
|
61
|
+
- Windows x64, Linux x64, macOS Intel, or macOS Apple silicon.
|
|
62
|
+
|
|
63
|
+
Rust is not required when installing from npm.
|
|
64
|
+
|
|
65
|
+
### One-time setup
|
|
66
|
+
|
|
67
|
+
```shell
|
|
68
|
+
npm install -g @nzkbuild/toche
|
|
69
|
+
toche setup
|
|
70
|
+
toche
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Then, in other terminals, run your clients normally:
|
|
74
|
+
|
|
75
|
+
```shell
|
|
76
|
+
claude
|
|
77
|
+
codex
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`toche setup` detects your existing client configurations, imports your current
|
|
81
|
+
upstreams, and writes a local `config.toml`. It never silently sends a paid model
|
|
82
|
+
request. You can run it again later to review or modify your configuration.
|
|
83
|
+
|
|
84
|
+
### Managed mode (optional convenience)
|
|
85
|
+
|
|
86
|
+
Instead of starting the runtime separately, you can launch a client through Toche
|
|
87
|
+
in one step:
|
|
88
|
+
|
|
89
|
+
```shell
|
|
90
|
+
toche run claude -- --dangerously-skip-permissions
|
|
91
|
+
toche run codex
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Managed mode uses the same runtime, configuration, protocol handling, trust
|
|
95
|
+
isolation, ledger, and optimization pipeline as persistent mode.
|
|
96
|
+
|
|
97
|
+
### Normal daily use
|
|
98
|
+
|
|
99
|
+
After setup, the routine is:
|
|
100
|
+
|
|
101
|
+
1. Run `toche` and leave it open.
|
|
102
|
+
2. Run your clients in other terminals.
|
|
103
|
+
|
|
104
|
+
### Clean uninstall
|
|
105
|
+
|
|
106
|
+
```shell
|
|
107
|
+
toche disconnect claude
|
|
108
|
+
toche disconnect codex
|
|
109
|
+
npm uninstall -g @nzkbuild/toche
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
<details>
|
|
113
|
+
<summary><strong>Build from source instead of npm</strong></summary>
|
|
114
|
+
|
|
115
|
+
You need Rust 1.86 or newer.
|
|
116
|
+
|
|
117
|
+
```shell
|
|
118
|
+
git clone https://github.com/nzkbuild/toche.git
|
|
119
|
+
cd toche
|
|
120
|
+
cargo build --release
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The binary is `target/release/toche` (`.exe` on Windows).
|
|
124
|
+
|
|
125
|
+
</details>
|
|
126
|
+
|
|
127
|
+
## How it works
|
|
128
|
+
|
|
129
|
+
```mermaid
|
|
130
|
+
flowchart LR
|
|
131
|
+
subgraph Clients
|
|
132
|
+
A[Claude Code]
|
|
133
|
+
B[Codex CLI]
|
|
134
|
+
end
|
|
135
|
+
A --> C[Toche on 127.0.0.1:8743]
|
|
136
|
+
B --> C
|
|
137
|
+
C --> D{Protocol router}
|
|
138
|
+
D --> E[Anthropic Messages pipeline]
|
|
139
|
+
D --> F[OpenAI Responses pipeline]
|
|
140
|
+
E --> G[Shield coalescing]
|
|
141
|
+
F --> G
|
|
142
|
+
G --> H[Safe cache]
|
|
143
|
+
H --> I[Output reduction]
|
|
144
|
+
I --> J[Efficiency injection]
|
|
145
|
+
J --> K[Prompt cache injection]
|
|
146
|
+
K --> L[Configured upstream APIs]
|
|
147
|
+
L --> C
|
|
148
|
+
C --> M[Local ledger and CAS]
|
|
149
|
+
C --> A
|
|
150
|
+
C --> B
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
In plain language, your AI clients send their normal API requests to Toche on
|
|
154
|
+
`127.0.0.1:8743`. Toche then:
|
|
155
|
+
|
|
156
|
+
1. Routes the request through the correct protocol driver (Anthropic Messages
|
|
157
|
+
or OpenAI Responses).
|
|
158
|
+
2. Gives the request a stable fingerprint.
|
|
159
|
+
3. Shares an already-running identical request (within the same trust domain)
|
|
160
|
+
or checks for an eligible local replay.
|
|
161
|
+
4. Shortens supported tool output and keeps the original locally recoverable.
|
|
162
|
+
5. Applies the selected efficiency and provider prompt-cache policy.
|
|
163
|
+
6. Forwards any remaining work to your configured upstream API endpoint.
|
|
164
|
+
7. Records the outcome locally so `toche stats` can explain it.
|
|
165
|
+
|
|
166
|
+
The internal pipeline order is:
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
protocol dispatch → fingerprint → shield → safe cache → reduce → efficiency → cache → forward → ledger
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Supported clients
|
|
173
|
+
|
|
174
|
+
| Client | Protocol | Persistent mode | Managed mode | Setup |
|
|
175
|
+
|--------|----------|-----------------|--------------|-------|
|
|
176
|
+
| Claude Code | Anthropic Messages | `toche` + `claude` | `toche run claude` | `toche setup` |
|
|
177
|
+
| Codex CLI | OpenAI Responses | `toche` + `codex` | `toche run codex` | `toche setup` |
|
|
178
|
+
|
|
179
|
+
Multiple instances of the same client are supported. Claude Code and Codex can
|
|
180
|
+
run simultaneously through the same Toche runtime.
|
|
181
|
+
|
|
182
|
+
### Persistent vs. managed mode
|
|
183
|
+
|
|
184
|
+
**Persistent mode** (`toche` in one terminal, client in another) is the primary
|
|
185
|
+
workflow. Start Toche once and launch as many clients as you need.
|
|
186
|
+
|
|
187
|
+
**Managed mode** (`toche run <client>`) is a convenience that starts Toche and
|
|
188
|
+
the client together. It uses the exact same pipeline as persistent mode.
|
|
189
|
+
|
|
190
|
+
## Trust and isolation
|
|
191
|
+
|
|
192
|
+
Different credential references never share cache entries or in-flight request
|
|
193
|
+
coalescing. If you configure a personal Anthropic API key and a work OpenAI key,
|
|
194
|
+
their traffic is isolated by trust domain — even if they happen to target the
|
|
195
|
+
same upstream URL.
|
|
196
|
+
|
|
197
|
+
Trust domains are derived from the combination of integration identity, upstream
|
|
198
|
+
identity, and credential reference. Raw credential values are never placed in
|
|
199
|
+
logs, IDs, hashes, database diagnostics, or receipts.
|
|
200
|
+
|
|
201
|
+
Attribution confidence is recorded honestly: Toche distinguishes between exact
|
|
202
|
+
process identity, client-reported identity, workspace-level identity, inference,
|
|
203
|
+
and unknown identity. It does not fabricate identity where it cannot be observed.
|
|
204
|
+
|
|
205
|
+
## Data storage
|
|
206
|
+
|
|
207
|
+
Everything lives in `~/.toche/` (overridable with `TOCHE_CONFIG_DIR`):
|
|
208
|
+
|
|
209
|
+
| Path | Purpose |
|
|
210
|
+
|------|---------|
|
|
211
|
+
| `config.toml` | Runtime configuration, integrations, upstreams, policies |
|
|
212
|
+
| `ledger.db` | SQLite ledger of every routed request |
|
|
213
|
+
| `cas/` | Content-addressed storage for reduced originals and cached responses |
|
|
214
|
+
| `runtime_id` | Persistent UUIDv7 runtime identity |
|
|
215
|
+
|
|
216
|
+
Toche never sends your data to a cloud account.
|
|
217
|
+
|
|
218
|
+
## Measurement confidence
|
|
219
|
+
|
|
220
|
+
Every value reported by `toche stats` is classified by how it was obtained:
|
|
221
|
+
|
|
222
|
+
| Confidence | Meaning |
|
|
223
|
+
|------------|---------|
|
|
224
|
+
| `measured` | Toche observed it directly |
|
|
225
|
+
| `provider-reported` | The upstream API reported it |
|
|
226
|
+
| `estimated` | Derived from available data (e.g. list-price estimate) |
|
|
227
|
+
| `configured` | Comes from your configuration |
|
|
228
|
+
| `unknown` | Could not be determined |
|
|
229
|
+
|
|
230
|
+
Missing prices do not become zero. Missing usage does not become fabricated
|
|
231
|
+
usage. Cost estimates are labelled as equivalent public list-price estimates,
|
|
232
|
+
not your actual billed cost.
|
|
233
|
+
|
|
234
|
+
## Command reference
|
|
235
|
+
|
|
236
|
+
### Primary commands
|
|
237
|
+
|
|
238
|
+
| Command | What it does |
|
|
239
|
+
|---------|-------------|
|
|
240
|
+
| `toche` | Start the runtime on `127.0.0.1:8743` |
|
|
241
|
+
| `toche setup` | Guided, rerunnable configuration |
|
|
242
|
+
| `toche setup --dry-run` | Preview changes without writing |
|
|
243
|
+
| `toche setup --force` | Regenerate configuration (backup created) |
|
|
244
|
+
| `toche connect [client]` | Route a client through Toche |
|
|
245
|
+
| `toche disconnect [client]` | Restore direct upstream routing |
|
|
246
|
+
| `toche run <client>` | Run a client in managed mode |
|
|
247
|
+
| `toche doctor` | Verify installation and configuration |
|
|
248
|
+
| `toche status` | Show runtime status, active flights, protocol counts |
|
|
249
|
+
| `toche status --json` | Machine-readable status |
|
|
250
|
+
| `toche stats` | Show usage, tokens, and cost estimates |
|
|
251
|
+
| `toche stats --json` | Machine-readable statistics |
|
|
252
|
+
| `toche stats --protocol anthropic` | Filter by protocol |
|
|
253
|
+
| `toche stats --integration <name>` | Filter by integration |
|
|
254
|
+
| `toche expand <hash>` | Restore original tool output from a reduction hash |
|
|
255
|
+
|
|
256
|
+
### Advanced commands
|
|
257
|
+
|
|
258
|
+
| Command | What it does |
|
|
259
|
+
|---------|-------------|
|
|
260
|
+
| `toche cache inspect` | List persistent safe-cache entries |
|
|
261
|
+
| `toche cache clear` | Clear entries for the current project |
|
|
262
|
+
| `toche cache clear --all` | Clear all persistent cache entries |
|
|
263
|
+
| `toche cache why <fingerprint>` | Explain the cache decision for a fingerprint |
|
|
264
|
+
| `toche checkpoint save` | Save a session checkpoint |
|
|
265
|
+
| `toche checkpoint list` | List saved checkpoints |
|
|
266
|
+
| `toche checkpoint show` | Show the latest checkpoint |
|
|
267
|
+
| `toche checkpoint delete <id>` | Delete a checkpoint |
|
|
268
|
+
| `toche graph query <question>` | Query the optional knowledge graph |
|
|
269
|
+
| `toche graph status` | Show graph node and edge counts |
|
|
270
|
+
| `toche graph extract` | Rebuild the knowledge graph |
|
|
271
|
+
|
|
272
|
+
### Per-request bypass headers
|
|
273
|
+
|
|
274
|
+
Set a header to `true` (case-insensitive) to skip a stage for one request.
|
|
275
|
+
The umbrella bypass takes precedence over individual bypasses.
|
|
276
|
+
|
|
277
|
+
| Header | Skips |
|
|
278
|
+
|--------|-------|
|
|
279
|
+
| `x-toche-bypass` | The complete optimization pipeline |
|
|
280
|
+
| `x-toche-bypass-shield` | Request coalescing |
|
|
281
|
+
| `x-toche-bypass-safe-cache` | Persistent cache lookup and storage |
|
|
282
|
+
| `x-toche-bypass-reduce` | Tool-output reduction |
|
|
283
|
+
| `x-toche-bypass-efficiency` | Efficiency instruction injection |
|
|
284
|
+
| `x-toche-bypass-cache` | Provider prompt-cache injection |
|
|
285
|
+
|
|
286
|
+
## Configuration
|
|
287
|
+
|
|
288
|
+
Toche stores its configuration in `~/.toche/config.toml`. Running `toche setup`
|
|
289
|
+
generates it from your existing client configurations.
|
|
290
|
+
|
|
291
|
+
<details>
|
|
292
|
+
<summary><strong>Example config.toml</strong></summary>
|
|
293
|
+
|
|
294
|
+
```toml
|
|
295
|
+
schema_version = 2
|
|
296
|
+
|
|
297
|
+
[runtime]
|
|
298
|
+
port = 8743
|
|
299
|
+
listen_address = "127.0.0.1"
|
|
300
|
+
request_timeout_ms = 300000
|
|
301
|
+
|
|
302
|
+
[defaults]
|
|
303
|
+
integration = "abc12345"
|
|
304
|
+
|
|
305
|
+
[[integrations]]
|
|
306
|
+
id = "abc12345"
|
|
307
|
+
name = "default"
|
|
308
|
+
upstream = "def67890"
|
|
309
|
+
policy = "pol11111"
|
|
310
|
+
|
|
311
|
+
[[upstreams]]
|
|
312
|
+
id = "def67890"
|
|
313
|
+
name = "Anthropic"
|
|
314
|
+
url = "https://api.anthropic.com"
|
|
315
|
+
|
|
316
|
+
[upstreams.auth]
|
|
317
|
+
secret_ref = { type = "environment", key = "ANTHROPIC_API_KEY" }
|
|
318
|
+
header_name = "x-api-key"
|
|
319
|
+
|
|
320
|
+
[upstreams.headers]
|
|
321
|
+
anthropic-version = "2023-06-01"
|
|
322
|
+
|
|
323
|
+
[[policies]]
|
|
324
|
+
id = "pol11111"
|
|
325
|
+
name = "default"
|
|
326
|
+
|
|
327
|
+
[policies.cache]
|
|
328
|
+
enabled = true
|
|
329
|
+
mode = "auto"
|
|
330
|
+
breakpoint = "standard"
|
|
331
|
+
|
|
332
|
+
[policies.reduce]
|
|
333
|
+
enabled = true
|
|
334
|
+
|
|
335
|
+
[policies.efficiency]
|
|
336
|
+
mode = "concise"
|
|
337
|
+
|
|
338
|
+
[policies.safe_cache]
|
|
339
|
+
enabled = true
|
|
340
|
+
ttl_days = 30
|
|
341
|
+
max_entry_bytes = 1048576
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
</details>
|
|
345
|
+
|
|
346
|
+
## Troubleshooting
|
|
347
|
+
|
|
348
|
+
<details>
|
|
349
|
+
<summary><strong>The runtime will not start</strong></summary>
|
|
350
|
+
|
|
351
|
+
- Check that nothing else is listening on port 8743.
|
|
352
|
+
- Run `toche doctor` to verify that `config.toml` exists and is valid.
|
|
353
|
+
- Enable debug logging with `RUST_LOG=toche=debug toche`.
|
|
354
|
+
|
|
355
|
+
</details>
|
|
356
|
+
|
|
357
|
+
<details>
|
|
358
|
+
<summary><strong>A client cannot connect</strong></summary>
|
|
359
|
+
|
|
360
|
+
- Start the runtime before running `toche connect`.
|
|
361
|
+
- Run `toche doctor` in a second terminal after connecting.
|
|
362
|
+
- Check that `toche status` shows the expected integrations.
|
|
363
|
+
|
|
364
|
+
</details>
|
|
365
|
+
|
|
366
|
+
<details>
|
|
367
|
+
<summary><strong>Stats or cache entries are empty</strong></summary>
|
|
368
|
+
|
|
369
|
+
- The ledger records only requests routed through the runtime.
|
|
370
|
+
- The persistent cache stores only eligible text-only responses without `tool_use` blocks.
|
|
371
|
+
- Use `toche cache why <fingerprint>` to inspect a cache rejection.
|
|
372
|
+
|
|
373
|
+
</details>
|
|
374
|
+
|
|
375
|
+
<details>
|
|
376
|
+
<summary><strong>Routing still points to Toche after disconnecting</strong></summary>
|
|
377
|
+
|
|
378
|
+
Run `toche doctor`. If environment variables or settings still reference Toche
|
|
379
|
+
while the runtime is stopped, run `toche disconnect` for each affected client.
|
|
380
|
+
|
|
381
|
+
</details>
|
|
382
|
+
|
|
383
|
+
## Upgrading from 1.0.x
|
|
384
|
+
|
|
385
|
+
Toche 1.1.0 migrates your existing `profiles.toml` to the new `config.toml`
|
|
386
|
+
format automatically on first load. The migration:
|
|
387
|
+
|
|
388
|
+
- Converts each profile into separate Integration, Upstream, and Policy entries.
|
|
389
|
+
- Backs up `profiles.toml` to `profiles.toml.v1.bak`.
|
|
390
|
+
- Preserves your ledger, safe-cache metadata, CAS, checkpoints, and Graphify data.
|
|
391
|
+
- Is idempotent — running it again is a no-op.
|
|
392
|
+
- Fails safely on malformed configuration without modifying anything.
|
|
393
|
+
|
|
394
|
+
An older binary encountering a newer schema version will refuse to modify it.
|
|
395
|
+
|
|
396
|
+
## Requirements
|
|
397
|
+
|
|
398
|
+
- Rust 1.86 or newer (edition 2024) when building from source
|
|
399
|
+
- At least one supported AI coding client
|
|
400
|
+
- No hosted Toche service
|
|
401
|
+
- SQLite is bundled through `rusqlite`
|
|
402
|
+
|
|
403
|
+
## Documentation
|
|
404
|
+
|
|
405
|
+
- [Architecture](docs/ARCHITECTURE.md): system design, crate map, data flow, decision records
|
|
406
|
+
- [Changelog](CHANGELOG.md): release history from 1.0.0 through 1.1.0
|
|
407
|
+
- [Contributing](CONTRIBUTING.md): setup, conventions, and PR workflow
|
|
408
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md): Contributor Covenant
|
|
409
|
+
- [Bug tracker](docs/BUG_TRACKER.md): issues found and fixed during dogfooding
|
|
410
|
+
- [npm publishing](docs/NPM_PUBLISHING.md): maintainer checklist for npm releases
|
|
411
|
+
- [Third-party notices](THIRD_PARTY_NOTICES.md): reused ideas, integration decisions, and attribution
|
|
412
|
+
|
|
413
|
+
## Built from good work
|
|
414
|
+
|
|
415
|
+
Toche's Rust implementation was informed by ideas and patterns from ccusage, RTK,
|
|
416
|
+
Graphify, andrej-karpathy-skills, and caveman-claude. Their licenses and attribution
|
|
417
|
+
are preserved in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
418
|
+
|
|
419
|
+
## License
|
|
420
|
+
|
|
421
|
+
Licensed under the [Apache License 2.0](LICENSE).
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -11,7 +11,7 @@ copyright notices, project links, and integration decisions are preserved here.
|
|
|
11
11
|
| Project | License | Clone commit | Integration | Purpose |
|
|
12
12
|
|---------|---------|-------------|-------------|---------|
|
|
13
13
|
| [ccusage](https://github.com/ccusage/ccusage) | MIT | `ba99c0d` | Reference: adapt pricing/reporting patterns | Usage ledger concepts, pricing models, reporting |
|
|
14
|
-
| [RTK](https://github.com/rtk-ai/rtk) | Apache-2.0 | `
|
|
14
|
+
| [RTK](https://github.com/rtk-ai/rtk) | Apache-2.0 | `5d32d0736f686b69d1e8b9dc45c007d4eb77a0a2` | Reference: adapt filter and hook architecture | Command/tool-output reduction, Claude Code hook integration |
|
|
15
15
|
| [Graphify](https://github.com/Graphify-Labs/graphify) | MIT | `43b2aff` | External CLI/MCP adapter | Local project graph and query service |
|
|
16
16
|
| [andrej-karpathy-skills](https://github.com/multica-ai/andrej-karpathy-skills) | MIT | `2c60614` | Reference: adapt policy rules | Careful-work policy profile (Section 0.6.0) |
|
|
17
17
|
| [caveman-claude](https://github.com/juliusbrussee/caveman) | MIT | `0d95a81` | Reference: adapt concision patterns | Concise response profile, token reduction strategies |
|