tencil 0.3.2 → 0.4.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 CHANGED
@@ -1,21 +1,202 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Pixel Perfect Agency
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ Tencil
2
+ Copyright 2026 Pixel Perfect Agency
package/README.md CHANGED
@@ -177,3 +177,8 @@ The bridge can make an agent edit your code, so it is locked down by default:
177
177
  held to `--allow-origin`, but a non-browser client can claim any Origin, so only
178
178
  listen on a network you trust (such as your tailnet).
179
179
  - Agent replies are rendered as text nodes (no `innerHTML`).
180
+
181
+ ## License
182
+
183
+ Apache-2.0. See [LICENSE](LICENSE), [NOTICE](NOTICE) and, for bundled third-party code,
184
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
@@ -1,16 +1,61 @@
1
1
  # Third-party notices
2
2
 
3
- The published `tencil` package bundles code from the projects below. Each is
4
- used under the license shown; full license texts are available in the linked
5
- repositories.
3
+ Tencil is licensed under the Apache License 2.0. The published `tencil` package
4
+ also contains code from the projects below, each used under the MIT License.
5
+
6
+ ## Bundled
7
+
8
+ Compiled into `dist/overlay.global.js` (the browser overlay):
9
+
10
+ | Project | Version | Copyright | Used for |
11
+ | --- | --- | --- | --- |
12
+ | [Preact](https://github.com/preactjs/preact) | 11 | Copyright (c) 2015-present Jason Miller | Overlay UI |
13
+ | [@preact/signals](https://github.com/preactjs/signals) | 2 | Copyright (c) 2022-present Preact Team | Overlay state |
14
+ | [@preact/signals-core](https://github.com/preactjs/signals) | 1 | Copyright (c) 2022-present Preact Team | Overlay state (used by @preact/signals) |
15
+ | [bippy](https://github.com/aidenybai/bippy) | 0.7 | Copyright 2024-present Aiden Bai | React component and source lookup |
16
+ | [modern-screenshot](https://github.com/qq15725/modern-screenshot) | 4 | Copyright (c) 2021-present wxm | Element screenshots |
17
+ | [T3 Code](https://github.com/pingdotgg/t3code) | n/a | Copyright (c) 2026 T3 Tools Inc. | Agent icons (T3 Code, Codex, Claude, Cursor) shown in the thread list, from `apps/web/src/components/Icons.tsx` and `T3Wordmark.tsx` |
18
+
19
+ The product names and logos shown by those icons belong to their owners.
20
+
21
+ Each of these projects is distributed under the following license, with the
22
+ copyright line from the table above:
23
+
24
+ ```
25
+ MIT License
26
+
27
+ Copyright (c) <year> <copyright holders>
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining a copy
30
+ of this software and associated documentation files (the "Software"), to deal
31
+ in the Software without restriction, including without limitation the rights
32
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
+ copies of the Software, and to permit persons to whom the Software is
34
+ furnished to do so, subject to the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be included in all
37
+ copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ SOFTWARE.
46
+ ```
47
+
48
+ ## Dependencies
49
+
50
+ Installed next to `tencil` by npm, not bundled; each ships its own license:
6
51
 
7
52
  | Project | License | Used for |
8
53
  | --- | --- | --- |
9
- | [Preact](https://github.com/preactjs/preact) | MIT | Overlay UI |
10
- | [@preact/signals](https://github.com/preactjs/signals) | MIT | Overlay state |
11
- | [bippy](https://github.com/aidenybai/bippy) | MIT | React component and source lookup |
12
- | [modern-screenshot](https://github.com/qq15725/modern-screenshot) | MIT | Element screenshots |
13
- | [T3 Code](https://github.com/pingdotgg/t3code) | MIT | Agent icons (Codex, Claude, Cursor) shown in the thread list |
14
- | [ws](https://github.com/websockets/ws) | MIT | Bridge WebSocket server (dependency) |
15
- | [zod](https://github.com/colinhacks/zod) | MIT | Message validation (dependency) |
16
- | [picocolors](https://github.com/alexeyraspopov/picocolors) | ISC | CLI colors (dependency) |
54
+ | [ws](https://github.com/websockets/ws) | MIT | Bridge WebSocket server |
55
+ | [zod](https://github.com/colinhacks/zod) | MIT | Message validation |
56
+ | [picocolors](https://github.com/alexeyraspopov/picocolors) | ISC | CLI colors |
57
+
58
+ The [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)
59
+ is an optional peer dependency. Tencil neither bundles nor ships it: it is loaded
60
+ from next to Tencil, or installed into Tencil's config folder on first use of the
61
+ Claude Code provider, under Anthropic's own terms.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { _ as parsePairingInput, a as detectAgents, c as savedProvider, f as VERSION, g as exchangePairingCredential, h as createLocalPairingCode, i as PROVIDERS, m as DEFAULT_T3_URL, n as probeDaemon, o as providerLabel, p as CredentialStore, r as startDaemon, s as saveProvider, t as DEFAULT_PORT, u as defaultDataDir, v as withoutNpmEnv, y as loadAgentSdk } from "./server-Bxj8yTb3.mjs";
2
+ import { _ as parsePairingInput, a as detectAgents, c as savedProvider, f as VERSION, g as exchangePairingCredential, h as createLocalPairingCode, i as PROVIDERS, m as DEFAULT_T3_URL, n as probeDaemon, o as providerLabel, p as CredentialStore, r as startDaemon, s as saveProvider, t as DEFAULT_PORT, u as defaultDataDir, v as withoutNpmEnv, y as loadAgentSdk } from "./server-9m0nvaLs.mjs";
3
3
  import { execFileSync, spawn, spawnSync } from "node:child_process";
4
4
  import { cpSync, existsSync, mkdirSync, openSync, readFileSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { readFile, readdir, writeFile } from "node:fs/promises";
package/dist/index.d.mts CHANGED
@@ -46,6 +46,7 @@ type ImageAttachment = z.infer<typeof ImageAttachment>;
46
46
  //#region ../protocol/src/thread.d.ts
47
47
  /**
48
48
  * Provider-agnostic run state.
49
+ * - `draft`: a comment queued in a batch, not sent to the agent yet
49
50
  * - `starting`: thread is being created on the provider
50
51
  * - `working`: the agent is producing a turn
51
52
  * - `waiting`: the agent needs approval/input inside the provider UI
@@ -53,6 +54,7 @@ type ImageAttachment = z.infer<typeof ImageAttachment>;
53
54
  * - `error`: last turn or the thread itself failed
54
55
  */
55
56
  declare const ThreadStatus: z.ZodEnum<{
57
+ draft: "draft";
56
58
  starting: "starting";
57
59
  working: "working";
58
60
  waiting: "waiting";
@@ -109,6 +111,7 @@ declare const Thread: z.ZodObject<{
109
111
  selection: z.ZodOptional<z.ZodString>;
110
112
  }, z.core.$strip>>;
111
113
  status: z.ZodEnum<{
114
+ draft: "draft";
112
115
  starting: "starting";
113
116
  working: "working";
114
117
  waiting: "waiting";
@@ -161,6 +164,14 @@ declare const ProviderThreadSummary: z.ZodObject<{
161
164
  agent: z.ZodOptional<z.ZodString>;
162
165
  }, z.core.$strip>;
163
166
  type ProviderThreadSummary = z.infer<typeof ProviderThreadSummary>;
167
+ /** A model a provider can start threads on, e.g. T3 Code's Claude Opus. */
168
+ declare const ProviderModel: z.ZodObject<{
169
+ id: z.ZodString;
170
+ label: z.ZodString;
171
+ group: z.ZodString;
172
+ agent: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>;
174
+ type ProviderModel = z.infer<typeof ProviderModel>;
164
175
  /** How the provider presents the project the threads belong to. */
165
176
  declare const ProviderProject: z.ZodObject<{
166
177
  name: z.ZodString;
@@ -198,6 +209,8 @@ declare const ProjectSettings: z.ZodObject<{
198
209
  id: z.ZodString;
199
210
  label: z.ZodString;
200
211
  }, z.core.$strip>>;
212
+ model: z.ZodOptional<z.ZodString>;
213
+ batch: z.ZodBoolean;
201
214
  }, z.core.$strip>;
202
215
  type ProjectSettings = z.infer<typeof ProjectSettings>;
203
216
  type ServerMessage = {
@@ -239,6 +252,12 @@ type ServerMessage = {
239
252
  type: 'provider.threads';
240
253
  project: ProviderProject;
241
254
  threads: ProviderThreadSummary[];
255
+ } | {
256
+ type: 'provider.models';
257
+ provider: string;
258
+ models: ProviderModel[];
259
+ /** What new threads run on when no model is picked. */
260
+ defaultModel?: string;
242
261
  } | {
243
262
  type: 'error';
244
263
  message: string;
@@ -268,6 +287,8 @@ interface Provider {
268
287
  project: ProviderProject;
269
288
  threads: ProviderThreadSummary[];
270
289
  }>;
290
+ /** Models new threads can run on, and the one they use by default. Optional. */
291
+ listModels?(): Promise<ProviderModels>;
271
292
  /** Deep link into the provider UI for a thread, when it has one. */
272
293
  threadUrl(providerThreadId: string): string | undefined;
273
294
  createThread(input: CreateThreadInput): Promise<CreatedThread>;
@@ -285,6 +306,13 @@ interface CreateThreadInput {
285
306
  title: string;
286
307
  text: string;
287
308
  attachments: ImageAttachment[];
309
+ /** A `ProviderModel.id` the user picked; the provider's default when absent or unknown. */
310
+ model?: string;
311
+ }
312
+ interface ProviderModels {
313
+ models: ProviderModel[];
314
+ /** `ProviderModel.id` new threads use when none is picked. */
315
+ defaultModel?: string;
288
316
  }
289
317
  interface CreatedThread {
290
318
  providerThreadId: string;
@@ -305,20 +333,39 @@ interface ProviderMessage {
305
333
  interface ThreadSink {
306
334
  /** Upsert by `id`; `text` is cumulative. */
307
335
  message(message: ProviderMessage): void;
308
- status(status: Exclude<ThreadStatus, 'starting'>, detail?: string): void;
336
+ status(status: Exclude<ThreadStatus, 'starting' | 'draft'>, detail?: string): void;
309
337
  /** Provider no longer has this thread (deleted/archived on its side). */
310
338
  gone(): void;
311
339
  }
312
340
  //#endregion
313
- //#region src/daemon/project-providers.d.ts
341
+ //#region ../bridge/src/project-providers.d.ts
342
+ /** What a project picked in the overlay's settings. */
343
+ interface SavedProjectSettings {
344
+ /** The provider new pins go to; unset means the host's fallback. */
345
+ provider?: string;
346
+ /** Model picked per provider for new threads; unset means the provider's default. */
347
+ models?: Record<string, string>;
348
+ /** Queue new comments and send them together; on when unset. */
349
+ batch?: boolean;
350
+ }
351
+ /**
352
+ * Where a project's settings live: a file next to its pins for the daemon,
353
+ * a database row for a hosted runner.
354
+ */
355
+ interface ProjectSettingsStore {
356
+ /** The saved settings, or undefined when the project has none yet. */
357
+ load(): Promise<SavedProjectSettings | undefined>;
358
+ save(settings: SavedProjectSettings): Promise<void>;
359
+ }
314
360
  interface ProjectProvidersOptions {
315
361
  /** Providers the project can pick from. */
316
362
  choices: ProviderOption[];
317
- /** Used until the project picks one: the daemon's `--provider`. */
363
+ /** Used until the project picks one, e.g. the daemon's `--provider`. */
318
364
  fallback: string;
365
+ /** Builds a choice's provider; called once per id, on first use. */
319
366
  create: (id: string) => Provider;
320
- /** Where the project's choice is saved; in memory only when absent. */
321
- settingsPath?: string;
367
+ /** Where the project's choices are saved; in memory only when absent. */
368
+ settings?: ProjectSettingsStore;
322
369
  }
323
370
  /**
324
371
  * The providers of one project. New pins go to the project's default, which
@@ -329,8 +376,11 @@ declare class ProjectProviders {
329
376
  #private;
330
377
  readonly choices: ProviderOption[];
331
378
  constructor(options: ProjectProvidersOptions);
332
- /** One fixed provider and no settings file (tests). */
333
- static of(provider: Provider): ProjectProviders;
379
+ /**
380
+ * Ready-made providers, the first being the default. Each is started
381
+ * here; `settings` keeps the project's picks (in memory when absent).
382
+ */
383
+ static of(providers: Provider | Provider[], settings?: ProjectSettingsStore): ProjectProviders;
334
384
  load(): Promise<void>;
335
385
  get defaultId(): string;
336
386
  default(): Provider;
@@ -338,37 +388,35 @@ declare class ProjectProviders {
338
388
  has(id: string): boolean;
339
389
  get(id: string): Provider;
340
390
  setDefault(id: string): Promise<void>;
391
+ /** The model picked for a provider's new threads, if any. */
392
+ modelFor(id: string): string | undefined;
393
+ setModel(id: string, model: string | null): Promise<void>;
394
+ get batch(): boolean;
395
+ setBatch(on: boolean): Promise<void>;
396
+ /** Fires when a picked model or batching changes. */
397
+ onSettingsChange(listener: () => void): () => void;
341
398
  onDefaultChange(listener: () => void): () => void;
342
399
  dispose(): Promise<void>;
343
400
  }
344
401
  //#endregion
345
- //#region src/daemon/thread-store.d.ts
346
- /** Where Tencil keeps per-machine state, shared by every project. */
347
- export declare function defaultDataDir(): string;
348
- /**
349
- * One file per project under the global data dir, named after the folder plus
350
- * a hash of its path: readable when browsing, unique per checkout, and never
351
- * shared between two bridges.
352
- */
353
- export declare function projectStorePath(projectRoot: string, dataDir?: string): string;
402
+ //#region ../bridge/src/thread-store.d.ts
354
403
  /**
355
- * Pins for one project, persisted outside the repo so they survive bridge
356
- * restarts without leaving files in the project. Writes are debounced and atomic.
404
+ * The pins of one project. The bridge reads and writes synchronously, so a
405
+ * store keeps the project's pins in memory (load them before handing the
406
+ * store to a bridge) and persists changes behind the scenes; `flush` waits
407
+ * until every change so far is saved.
357
408
  */
358
- export declare class ThreadStore {
359
- #private;
360
- readonly path: string;
361
- constructor(projectRoot: string, dataDir?: string);
362
- load(): Promise<void>;
409
+ interface ThreadStore {
410
+ /** Every pin, oldest first. */
363
411
  list(): Thread[];
364
412
  get(id: string): Thread | undefined;
365
- findByProviderThread(providerId: string, providerThreadId: string): Thread | undefined;
366
413
  upsert(thread: Thread): void;
414
+ /** False when there was no such pin. */
367
415
  delete(id: string): boolean;
368
416
  flush(): Promise<void>;
369
417
  }
370
418
  //#endregion
371
- //#region src/daemon/bridge.d.ts
419
+ //#region ../bridge/src/bridge.d.ts
372
420
  interface BridgeClient {
373
421
  send(message: ServerMessage): void;
374
422
  }
@@ -394,6 +442,20 @@ export declare class Bridge {
394
442
  dispose(): Promise<void>;
395
443
  }
396
444
  //#endregion
445
+ //#region ../bridge/src/prompt.d.ts
446
+ /**
447
+ * Renders the text sent to the agent: the user's words first, then a fenced
448
+ * block of element context. The block is stripped again before messages are
449
+ * shown in the overlay (`stripContext`).
450
+ */
451
+ export declare function renderPrompt(input: {
452
+ prompt: string;
453
+ pageUrl: string;
454
+ context: ElementContext;
455
+ hasScreenshot: boolean;
456
+ }): string;
457
+ export declare function stripContext(text: string): string;
458
+ //#endregion
397
459
  //#region src/daemon/project-resolver.d.ts
398
460
  /** Runs a command and returns stdout; injectable so tests don't depend on the OS. */
399
461
  type Exec = (command: string, args: string[]) => Promise<string>;
@@ -419,20 +481,6 @@ export declare class ProjectResolver {
419
481
  /** Closest folder with a package.json at or above `folder`, or `folder` itself. */
420
482
  export declare function projectRoot(folder: string): string;
421
483
  //#endregion
422
- //#region src/daemon/prompt.d.ts
423
- /**
424
- * Renders the text sent to the agent: the user's words first, then a fenced
425
- * block of element context. The block is stripped again before messages are
426
- * shown in the overlay (`stripContext`).
427
- */
428
- export declare function renderPrompt(input: {
429
- prompt: string;
430
- pageUrl: string;
431
- context: ElementContext;
432
- hasScreenshot: boolean;
433
- }): string;
434
- export declare function stripContext(text: string): string;
435
- //#endregion
436
484
  //#region ../provider-claude-code/src/claude-code-provider.d.ts
437
485
  /** The permission modes that work without anyone at a terminal to answer prompts. */
438
486
  type PermissionMode = 'default' | 'acceptEdits' | 'auto' | 'bypassPermissions';
@@ -458,6 +506,8 @@ type RuntimeMode = 'approval-required' | 'auto-accept-edits' | 'auto' | 'full-ac
458
506
  interface ModelSelection {
459
507
  instanceId: string;
460
508
  model: string;
509
+ /** Per-model options such as reasoning effort, passed through as T3 Code stored them. */
510
+ options?: unknown;
461
511
  }
462
512
  //#endregion
463
513
  //#region ../provider-t3code/src/t3code-provider.d.ts
@@ -558,4 +608,30 @@ export declare function probeDaemon(port?: number, host?: string): Promise<{
558
608
  projects: ProjectStatus[];
559
609
  } | undefined>;
560
610
  //#endregion
561
- export type { Daemon, DaemonOptions, ProjectStatus };
611
+ //#region src/daemon/thread-store.d.ts
612
+ /** Where Tencil keeps per-machine state, shared by every project. */
613
+ export declare function defaultDataDir(): string;
614
+ /**
615
+ * One file per project under the global data dir, named after the folder plus
616
+ * a hash of its path: readable when browsing, unique per checkout, and never
617
+ * shared between two bridges.
618
+ */
619
+ export declare function projectStorePath(projectRoot: string, dataDir?: string): string;
620
+ /**
621
+ * Pins for one project, persisted outside the repo so they survive bridge
622
+ * restarts without leaving files in the project. Writes are debounced and atomic.
623
+ */
624
+ declare class FileThreadStore implements ThreadStore {
625
+ #private;
626
+ readonly path: string;
627
+ constructor(projectRoot: string, dataDir?: string);
628
+ load(): Promise<void>;
629
+ list(): Thread[];
630
+ get(id: string): Thread | undefined;
631
+ findByProviderThread(providerId: string, providerThreadId: string): Thread | undefined;
632
+ upsert(thread: Thread): void;
633
+ delete(id: string): boolean;
634
+ flush(): Promise<void>;
635
+ }
636
+ //#endregion
637
+ export { type Daemon, type DaemonOptions, type ProjectStatus, FileThreadStore as ThreadStore };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { C as renderPrompt, S as Bridge, b as ProjectResolver, d as projectStorePath, l as ThreadStore, n as probeDaemon, r as startDaemon, t as DEFAULT_PORT, u as defaultDataDir, w as stripContext, x as projectRoot } from "./server-Bxj8yTb3.mjs";
2
- export { Bridge, DEFAULT_PORT, ProjectResolver, ThreadStore, defaultDataDir, probeDaemon, projectRoot, projectStorePath, renderPrompt, startDaemon, stripContext };
1
+ import { C as renderPrompt, S as Bridge, b as ProjectResolver, d as projectStorePath, l as FileThreadStore, n as probeDaemon, r as startDaemon, t as DEFAULT_PORT, u as defaultDataDir, w as stripContext, x as projectRoot } from "./server-9m0nvaLs.mjs";
2
+ export { Bridge, DEFAULT_PORT, ProjectResolver, FileThreadStore as ThreadStore, defaultDataDir, probeDaemon, projectRoot, projectStorePath, renderPrompt, startDaemon, stripContext };