tencil 0.9.0 → 0.11.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/README.md +32 -7
- package/THIRD_PARTY_NOTICES.md +3 -0
- package/dist/cli.mjs +52 -6
- package/dist/{cloud-dXtv3DCr.d.mts → cloud-DKtU6lcZ.d.mts} +1 -1
- package/dist/{index-CexSk5_J.d.mts → index-BSKV-nDI.d.mts} +92 -1
- package/dist/index.d.mts +70 -8
- package/dist/index.mjs +1 -1
- package/dist/next.d.mts +1 -1
- package/dist/overlay.global.js +208 -62
- package/dist/react.d.mts +1 -1
- package/dist/{server-4YposP38.mjs → server-7jKlEaWk.mjs} +1371 -60
- package/dist/vite.d.mts +1 -1
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -22,16 +22,19 @@ Think Vercel Comments, except the reviewer on the other side is an agent.
|
|
|
22
22
|
└─────────────┘
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Tencil works with
|
|
25
|
+
Tencil works with four agents. With **T3 Code**, every pin is a real T3 Code thread
|
|
26
26
|
in the project that matches your dev site's folder, so you can continue any
|
|
27
27
|
conversation there. With **Claude Code**, the daemon runs Claude Code itself and
|
|
28
|
-
every pin is a Claude Code session you can resume in a terminal. With **
|
|
28
|
+
every pin is a Claude Code session you can resume in a terminal. With **Codex**, the
|
|
29
|
+
daemon runs your own Codex and every pin is a Codex thread you can resume in a terminal
|
|
30
|
+
or the desktop app. With **Ensemble**,
|
|
29
31
|
every pin is a chat on the Ensemble thread serving your page.
|
|
30
32
|
|
|
31
33
|
## Quick start
|
|
32
34
|
|
|
33
35
|
You need [T3 Code](https://github.com/pingdotgg/t3code) (the desktop app, running),
|
|
34
|
-
[Claude Code](https://docs.claude.com/en/docs/claude-code) (installed and logged in)
|
|
36
|
+
[Claude Code](https://docs.claude.com/en/docs/claude-code) (installed and logged in),
|
|
37
|
+
[Codex](https://github.com/openai/codex) (the CLI or desktop app, logged in) or
|
|
35
38
|
[Ensemble](https://tryensemble.co) (the desktop app, running).
|
|
36
39
|
|
|
37
40
|
```sh
|
|
@@ -123,6 +126,19 @@ repository root. Each pin is a Claude Code session you can also pick up in a
|
|
|
123
126
|
terminal with `claude --resume <id>`. The first time, Tencil installs the Claude
|
|
124
127
|
Agent SDK into its config folder (it brings Claude Code along, about 250 MB).
|
|
125
128
|
|
|
129
|
+
### Codex
|
|
130
|
+
|
|
131
|
+
With `--provider codex` (or Codex picked in a project's settings), the daemon runs the
|
|
132
|
+
Codex on your machine, under your own login and with no API key of its own: the `codex`
|
|
133
|
+
on your `PATH`, otherwise the copy in the desktop app. Setup picks it when it's the only
|
|
134
|
+
agent you have. Tencil doesn't install Codex, which is about 400 MB. If it's missing, setup
|
|
135
|
+
and the overlay say so: run `npm i -g @openai/codex`, then `codex login`, and Tencil
|
|
136
|
+
notices by itself.
|
|
137
|
+
|
|
138
|
+
Each pin is a Codex thread in the project's repository root, so you can pick it up with
|
|
139
|
+
`codex resume <id>` or in the desktop app, and threads you started there show up in the
|
|
140
|
+
overlay's inbox. The composer's model picker lists your Codex models.
|
|
141
|
+
|
|
126
142
|
### Ensemble
|
|
127
143
|
|
|
128
144
|
With `--provider ensemble` (or Ensemble picked in a project's settings), keep the
|
|
@@ -140,10 +156,17 @@ thread, and reopening the pin or replying to it brings it back. Threads you star
|
|
|
140
156
|
yourself stay open, and so does one you've added a chat to. If the folder isn't in Ensemble, the overlay names the repository to add.
|
|
141
157
|
|
|
142
158
|
Nobody is at a terminal to approve tool calls, so `--runtime-mode` decides up front:
|
|
143
|
-
`full-access` (the default) lets Claude Code run anything; with the stricter
|
|
144
|
-
tools that would need approval are refused and
|
|
159
|
+
`full-access` (the default) lets Claude Code and Codex run anything; with the stricter
|
|
160
|
+
modes, tools that would need approval are refused and the agent is told why. A turn that
|
|
145
161
|
is running when the daemon stops is lost; the pin turns red and you can follow up.
|
|
146
162
|
|
|
163
|
+
| `--runtime-mode` | Codex sandbox | What needs more than the sandbox allows |
|
|
164
|
+
| --- | --- | --- |
|
|
165
|
+
| `full-access` | `danger-full-access` | Nothing does |
|
|
166
|
+
| `auto` | `workspace-write` | Codex's own automatic review decides |
|
|
167
|
+
| `auto-accept-edits` | `workspace-write` | Refused |
|
|
168
|
+
| `approval-required` | `read-only` | Refused |
|
|
169
|
+
|
|
147
170
|
## Using it
|
|
148
171
|
|
|
149
172
|
| Action | How |
|
|
@@ -153,11 +176,12 @@ is running when the daemon stops is lost; the pin turns red and you can follow u
|
|
|
153
176
|
| Cancel | <kbd>Esc</kbd> |
|
|
154
177
|
| Follow up | Open a pin and reply; the same agent thread continues |
|
|
155
178
|
| Continue an existing thread | In the composer, switch **→ New thread** to any thread in the project; the element becomes its next message |
|
|
156
|
-
| Open any project thread | Inbox → the agent's tab (**T3 Code
|
|
179
|
+
| Open any project thread | Inbox → the agent's tab (**T3 Code**, **Claude Code** or **Codex**); the thread docks on the right so you can read, reply and stop while using the page |
|
|
157
180
|
| Stop the agent | **Stop** while a pin is working |
|
|
158
181
|
| All pins | Inbox button, filter by page or show resolved |
|
|
159
182
|
| Continue in T3 Code | External-link icon on a pin |
|
|
160
183
|
| Continue in Claude Code | `claude --resume <id>` in the project's folder |
|
|
184
|
+
| Continue in Codex | `codex resume <id>` in the project's folder, or the desktop app |
|
|
161
185
|
|
|
162
186
|
Pins show their state: spinning while the agent works, blue when done, amber when
|
|
163
187
|
the agent waits for approval, red on errors, grey once resolved.
|
|
@@ -177,10 +201,11 @@ tencil service uninstall Remove the login service
|
|
|
177
201
|
tencil connect [pairing-link] Pair with T3 Code (automatic for a local T3 Code)
|
|
178
202
|
|
|
179
203
|
--port <n> Port (default 4747, env TENCIL_PORT)
|
|
180
|
-
--provider <name> Agent for projects without their own: t3code (default) | claude-code | ensemble
|
|
204
|
+
--provider <name> Agent for projects without their own: t3code (default) | claude-code | codex | ensemble
|
|
181
205
|
--t3-url <url> T3 Code server (default: last paired, then http://127.0.0.1:3773)
|
|
182
206
|
--model <model> T3 Code: instance:model, e.g. claudeAgent:claude-fable-5-1
|
|
183
207
|
Claude Code: a model, e.g. claude-opus-5-5 (default: its default)
|
|
208
|
+
Codex: a model, e.g. gpt-6.1-sol (default: its default)
|
|
184
209
|
--runtime-mode <mode> approval-required | auto-accept-edits | auto | full-access
|
|
185
210
|
--listen <address> Also listen here, e.g. a Tailscale IP (repeatable)
|
|
186
211
|
--allow-origin <url> Allow a non-localhost page to connect (repeatable)
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -59,3 +59,6 @@ The [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-
|
|
|
59
59
|
is an optional peer dependency. Tencil neither bundles nor ships it: it is loaded
|
|
60
60
|
from next to Tencil, or installed into Tencil's config folder on first use of the
|
|
61
61
|
Claude Code provider, under Anthropic's own terms.
|
|
62
|
+
|
|
63
|
+
[Codex](https://github.com/openai/codex) is neither bundled nor installed by Tencil:
|
|
64
|
+
the Codex provider runs the copy already on your machine.
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as withoutNpmEnv, D as createLocalPairingCode, E as DEFAULT_T3_URL, F as EnsembleClient,
|
|
2
|
+
import { A as withoutNpmEnv, D as createLocalPairingCode, E as DEFAULT_T3_URL, F as EnsembleCredentialStore, I as EnsembleClient, M as loadAgentSdk, O as exchangePairingCredential, S as defaultDataDir, T as CredentialStore, _ as detectAgents, a as readPlan, b as savedProvider, c as runtimeDir, d as uninstallService, f as startInBackground, g as PROVIDERS, h as updateNotice, i as finishUpdate, j as codexProblem, k as parsePairingInput, l as isServiceInstalled, m as isNewerThanThis, n as probeDaemon, o as enableAutostart, p as stopDaemon, r as startDaemon, s as ensureDaemon, t as DEFAULT_PORT, u as stopService, v as providerLabel, w as VERSION, y as saveProvider } from "./server-7jKlEaWk.mjs";
|
|
3
3
|
import { t as DEFAULT_CLOUD_URL } from "./cloud-CiwIrP1h.mjs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { existsSync, rmSync } from "node:fs";
|
|
@@ -77,6 +77,7 @@ function listOf(ids) {
|
|
|
77
77
|
/** Get the agent ready now, so the first page load is ready to go. */
|
|
78
78
|
async function prepareProvider(provider, t3Url, log) {
|
|
79
79
|
if (provider === "claude-code") return prepareClaudeCode(log);
|
|
80
|
+
if (provider === "codex") return checkCodex(log);
|
|
80
81
|
if (provider === "ensemble") return checkEnsemble(log);
|
|
81
82
|
return pairWithLocalT3(t3Url, log);
|
|
82
83
|
}
|
|
@@ -112,6 +113,11 @@ async function prepareClaudeCode(log) {
|
|
|
112
113
|
log(` ${pc.yellow("!")} ${error instanceof Error ? error.message : String(error)}`);
|
|
113
114
|
}
|
|
114
115
|
}
|
|
116
|
+
/** Pins run from the user's own Codex install and login, so say what's missing, don't install it. */
|
|
117
|
+
async function checkCodex(log) {
|
|
118
|
+
const problem = await codexProblem();
|
|
119
|
+
log(problem ? ` ${pc.yellow("!")} ${problem.replace(/`([^`]+)`/g, (_, command) => pc.cyan(command))}` : ` ${pc.green("✓")} Codex is ready. Pins run in your Codex login.`);
|
|
120
|
+
}
|
|
115
121
|
/** Ask the user once to allow Tencil in Ensemble, unless Tencil's token still works. */
|
|
116
122
|
async function checkEnsemble(log) {
|
|
117
123
|
const client = new EnsembleClient();
|
|
@@ -643,6 +649,42 @@ const PERMISSION_MODES = {
|
|
|
643
649
|
function permissionModeFor(runtimeMode) {
|
|
644
650
|
return runtimeMode ? PERMISSION_MODES[runtimeMode] : void 0;
|
|
645
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* Tencil's runtime modes in Codex's terms. With `never` Codex has nobody to ask:
|
|
654
|
+
* what the sandbox blocks is refused and Codex is told so. In `auto` its own
|
|
655
|
+
* reviewer decides what may leave the sandbox, like Claude Code's auto mode.
|
|
656
|
+
*/
|
|
657
|
+
const CODEX_PERMISSIONS = {
|
|
658
|
+
"approval-required": {
|
|
659
|
+
sandbox: "read-only",
|
|
660
|
+
approvalPolicy: "never"
|
|
661
|
+
},
|
|
662
|
+
"auto-accept-edits": {
|
|
663
|
+
sandbox: "workspace-write",
|
|
664
|
+
approvalPolicy: "never"
|
|
665
|
+
},
|
|
666
|
+
auto: {
|
|
667
|
+
sandbox: "workspace-write",
|
|
668
|
+
approvalPolicy: "on-request",
|
|
669
|
+
approvalsReviewer: "auto_review"
|
|
670
|
+
},
|
|
671
|
+
"full-access": {
|
|
672
|
+
sandbox: "danger-full-access",
|
|
673
|
+
approvalPolicy: "never"
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
function codexPermissionsFor(runtimeMode) {
|
|
677
|
+
return runtimeMode ? CODEX_PERMISSIONS[runtimeMode] : void 0;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* `--model` is one flag for every agent, and the name says whose it is:
|
|
681
|
+
* `instance:model` is T3 Code's, an OpenAI model is Codex's, the rest Claude Code's.
|
|
682
|
+
*/
|
|
683
|
+
function modelFlagFor(value) {
|
|
684
|
+
if (!value) return {};
|
|
685
|
+
if (value.includes(":")) return { t3: parseModel(value) };
|
|
686
|
+
return /^(gpt-|o\d|codex)/i.test(value) ? { codex: value } : { claudeCode: value };
|
|
687
|
+
}
|
|
646
688
|
function parseModel(value) {
|
|
647
689
|
if (!value) return void 0;
|
|
648
690
|
const [instanceId, ...model] = value.split(":");
|
|
@@ -655,20 +697,23 @@ function parseModel(value) {
|
|
|
655
697
|
//#endregion
|
|
656
698
|
//#region src/cli/commands/daemon.ts
|
|
657
699
|
async function runDaemon(values, port, provider, t3Url, runtimeMode, cli) {
|
|
658
|
-
const model = values.model;
|
|
659
|
-
const t3Model = model?.includes(":") ? model : void 0;
|
|
700
|
+
const model = modelFlagFor(values.model);
|
|
660
701
|
const daemon = await startDaemon({
|
|
661
702
|
port,
|
|
662
703
|
listen: values.listen,
|
|
663
704
|
allowedOrigins: values["allow-origin"],
|
|
664
705
|
provider,
|
|
665
706
|
claudeCode: {
|
|
666
|
-
model:
|
|
707
|
+
model: model.claudeCode,
|
|
667
708
|
permissionMode: permissionModeFor(runtimeMode)
|
|
668
709
|
},
|
|
710
|
+
codex: {
|
|
711
|
+
model: model.codex,
|
|
712
|
+
permissions: codexPermissionsFor(runtimeMode)
|
|
713
|
+
},
|
|
669
714
|
t3: {
|
|
670
715
|
url: t3Url,
|
|
671
|
-
modelSelection:
|
|
716
|
+
modelSelection: model.t3,
|
|
672
717
|
runtimeMode,
|
|
673
718
|
createProjectIfMissing: !values["no-create-project"]
|
|
674
719
|
},
|
|
@@ -863,10 +908,11 @@ ${pc.dim("Usage")}
|
|
|
863
908
|
|
|
864
909
|
${pc.dim("Daemon options")}
|
|
865
910
|
--port <n> Port (default ${DEFAULT_PORT}, env TENCIL_PORT)
|
|
866
|
-
--provider <name> t3code | claude-code | ensemble: this machine's agent (setup asks when unset)
|
|
911
|
+
--provider <name> t3code | claude-code | codex | ensemble: this machine's agent (setup asks when unset)
|
|
867
912
|
--t3-url <url> T3 Code server (default ${DEFAULT_T3_URL}, env TENCIL_T3_URL)
|
|
868
913
|
--model <model> T3 Code: instance:model, e.g. claudeAgent:claude-fable-5-1
|
|
869
914
|
Claude Code: a model, e.g. claude-opus-5-5 (default: its default)
|
|
915
|
+
Codex: a model, e.g. gpt-6.1-sol (default: its default)
|
|
870
916
|
--runtime-mode <mode> approval-required | auto-accept-edits | auto | full-access
|
|
871
917
|
--listen <address> Also listen here, e.g. a Tailscale IP for a remote browser (repeatable)
|
|
872
918
|
--allow-origin <url> Allow a non-localhost page to connect (repeatable)
|
|
@@ -334,6 +334,58 @@ interface UpdateStatus {
|
|
|
334
334
|
/** `failed`: what went wrong. */
|
|
335
335
|
error?: string;
|
|
336
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* The person's own overlay settings, the same in every project on the machine.
|
|
339
|
+
* Saved by the local daemon; unset ones fall back to the overlay's defaults.
|
|
340
|
+
*/
|
|
341
|
+
declare const Preferences: z.ZodObject<{
|
|
342
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
system: "system";
|
|
344
|
+
dark: "dark";
|
|
345
|
+
light: "light";
|
|
346
|
+
}>>;
|
|
347
|
+
shortcuts: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
comment: z.ZodNullable<z.ZodObject<{
|
|
349
|
+
code: z.ZodString;
|
|
350
|
+
key: z.ZodString;
|
|
351
|
+
alt: z.ZodBoolean;
|
|
352
|
+
ctrl: z.ZodBoolean;
|
|
353
|
+
meta: z.ZodBoolean;
|
|
354
|
+
shift: z.ZodBoolean;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
ruler: z.ZodNullable<z.ZodObject<{
|
|
357
|
+
code: z.ZodString;
|
|
358
|
+
key: z.ZodString;
|
|
359
|
+
alt: z.ZodBoolean;
|
|
360
|
+
ctrl: z.ZodBoolean;
|
|
361
|
+
meta: z.ZodBoolean;
|
|
362
|
+
shift: z.ZodBoolean;
|
|
363
|
+
}, z.core.$strip>>;
|
|
364
|
+
hidePins: z.ZodNullable<z.ZodObject<{
|
|
365
|
+
code: z.ZodString;
|
|
366
|
+
key: z.ZodString;
|
|
367
|
+
alt: z.ZodBoolean;
|
|
368
|
+
ctrl: z.ZodBoolean;
|
|
369
|
+
meta: z.ZodBoolean;
|
|
370
|
+
shift: z.ZodBoolean;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
hideDock: z.ZodObject<{
|
|
373
|
+
code: z.ZodString;
|
|
374
|
+
key: z.ZodString;
|
|
375
|
+
alt: z.ZodBoolean;
|
|
376
|
+
ctrl: z.ZodBoolean;
|
|
377
|
+
meta: z.ZodBoolean;
|
|
378
|
+
shift: z.ZodBoolean;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
measure: z.ZodNullable<z.ZodEnum<{
|
|
381
|
+
Alt: "Alt";
|
|
382
|
+
Control: "Control";
|
|
383
|
+
Meta: "Meta";
|
|
384
|
+
Shift: "Shift";
|
|
385
|
+
}>>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
type Preferences = z.infer<typeof Preferences>;
|
|
337
389
|
declare const ProviderInfo: z.ZodObject<{
|
|
338
390
|
id: z.ZodString;
|
|
339
391
|
label: z.ZodString;
|
|
@@ -366,6 +418,27 @@ declare const ProjectSettings: z.ZodObject<{
|
|
|
366
418
|
ruler: z.ZodBoolean;
|
|
367
419
|
}, z.core.$strip>;
|
|
368
420
|
type ProjectSettings = z.infer<typeof ProjectSettings>;
|
|
421
|
+
declare const ProjectSource: z.ZodObject<{
|
|
422
|
+
via: z.ZodEnum<{
|
|
423
|
+
port: "port";
|
|
424
|
+
ensemble: "ensemble";
|
|
425
|
+
plugin: "plugin";
|
|
426
|
+
docker: "docker";
|
|
427
|
+
picked: "picked";
|
|
428
|
+
}>;
|
|
429
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
detected: z.ZodOptional<z.ZodObject<{
|
|
431
|
+
root: z.ZodString;
|
|
432
|
+
via: z.ZodEnum<{
|
|
433
|
+
port: "port";
|
|
434
|
+
ensemble: "ensemble";
|
|
435
|
+
plugin: "plugin";
|
|
436
|
+
docker: "docker";
|
|
437
|
+
}>;
|
|
438
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
439
|
+
}, z.core.$strip>>;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
type ProjectSource = z.infer<typeof ProjectSource>;
|
|
369
442
|
type ServerMessage = {
|
|
370
443
|
type: 'ready';
|
|
371
444
|
protocol: typeof PROTOCOL_VERSION;
|
|
@@ -388,6 +461,24 @@ type ServerMessage = {
|
|
|
388
461
|
type: 'update';
|
|
389
462
|
update: UpdateStatus;
|
|
390
463
|
} |
|
|
464
|
+
/** Local daemon only: the answer to `project.choices`. */
|
|
465
|
+
{
|
|
466
|
+
type: 'project.choices';
|
|
467
|
+
choices: Array<{
|
|
468
|
+
root: string;
|
|
469
|
+
title: string;
|
|
470
|
+
}>;
|
|
471
|
+
} |
|
|
472
|
+
/** Local daemon only: how this page's project was found, after it attaches. */
|
|
473
|
+
{
|
|
474
|
+
type: 'project.source';
|
|
475
|
+
source: ProjectSource;
|
|
476
|
+
} |
|
|
477
|
+
/** Local daemon only: the saved preferences, on connect and whenever they change. */
|
|
478
|
+
{
|
|
479
|
+
type: 'preferences';
|
|
480
|
+
preferences: Preferences;
|
|
481
|
+
} |
|
|
391
482
|
/** Tencil Cloud: sign in first (no token, or one it no longer accepts). */
|
|
392
483
|
{
|
|
393
484
|
type: 'auth.required';
|
|
@@ -516,4 +607,4 @@ interface ThreadSink {
|
|
|
516
607
|
step?(step: ThreadStep): void;
|
|
517
608
|
}
|
|
518
609
|
//#endregion
|
|
519
|
-
export {
|
|
610
|
+
export { UpdateStatus as a, ElementContext as c, ServerMessage as i, ProjectSource as n, Viewer as o, ProviderOption as r, Thread as s, Provider as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as UpdateStatus, c as ElementContext, i as ServerMessage, n as ProjectSource, o as Viewer, r as ProviderOption, s as Thread, t as Provider } from "./index-BSKV-nDI.mjs";
|
|
2
|
+
import { Readable, Writable } from "node:stream";
|
|
2
3
|
//#region ../bridge/src/project-providers.d.ts
|
|
3
4
|
/** What a project picked in the overlay's settings. */
|
|
4
5
|
interface SavedProjectSettings {
|
|
@@ -143,6 +144,11 @@ type EnsembleForPort = (port: number) => Promise<string | undefined>;
|
|
|
143
144
|
* only stands in for what can't be detected. Returns undefined when nothing works;
|
|
144
145
|
* the overlay then asks.
|
|
145
146
|
*/
|
|
147
|
+
/** A page's project, and how it was found. */
|
|
148
|
+
interface Detected {
|
|
149
|
+
root: string;
|
|
150
|
+
source: ProjectSource;
|
|
151
|
+
}
|
|
146
152
|
export declare class ProjectResolver {
|
|
147
153
|
#private;
|
|
148
154
|
constructor(options: {
|
|
@@ -152,6 +158,17 @@ export declare class ProjectResolver {
|
|
|
152
158
|
ensembleForPort?: EnsembleForPort;
|
|
153
159
|
});
|
|
154
160
|
resolve(pageUrl: string, claimedRoot?: string): Promise<string | undefined>;
|
|
161
|
+
/**
|
|
162
|
+
* The page's project and how it was found. A pick made over a detected
|
|
163
|
+
* project only holds while that same project is detected on the address:
|
|
164
|
+
* when another app takes the port, detection wins again.
|
|
165
|
+
*/
|
|
166
|
+
detect(pageUrl: string, claimedRoot?: string): Promise<Detected | undefined>;
|
|
167
|
+
/**
|
|
168
|
+
* Use `root` for this address while `detected` is what Tencil finds there
|
|
169
|
+
* (the overlay's Change). Picking the detected project itself undoes it.
|
|
170
|
+
*/
|
|
171
|
+
pick(pageUrl: string, detected: string, root: string): Promise<void>;
|
|
155
172
|
/** Remember the user's choice for an address (from the overlay's project picker). */
|
|
156
173
|
remember(pageUrl: string, root: string): Promise<void>;
|
|
157
174
|
/**
|
|
@@ -167,6 +184,56 @@ export declare function projectRoot(folder: string): string;
|
|
|
167
184
|
/** The permission modes that work without anyone at a terminal to answer prompts. */
|
|
168
185
|
type PermissionMode = 'default' | 'acceptEdits' | 'auto' | 'bypassPermissions';
|
|
169
186
|
//#endregion
|
|
187
|
+
//#region ../provider-codex/src/app-server.d.ts
|
|
188
|
+
/** A running `codex app-server`, or a fake of one in tests. */
|
|
189
|
+
interface AppServerProcess {
|
|
190
|
+
stdin: Writable;
|
|
191
|
+
stdout: Readable;
|
|
192
|
+
stderr?: Readable | null;
|
|
193
|
+
kill(): void;
|
|
194
|
+
once(event: 'exit' | 'close', listener: () => void): unknown;
|
|
195
|
+
once(event: 'error', listener: (error: Error) => void): unknown;
|
|
196
|
+
}
|
|
197
|
+
type SpawnAppServer = () => AppServerProcess;
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region ../provider-codex/src/protocol.d.ts
|
|
200
|
+
/**
|
|
201
|
+
* The parts of `codex app-server`'s JSON-RPC protocol Tencil uses;
|
|
202
|
+
* `codex app-server generate-ts` prints all of it. Codex still marks it
|
|
203
|
+
* experimental and adds to it often, so this only names what's read here.
|
|
204
|
+
* Other notifications and item types are ignored.
|
|
205
|
+
*/
|
|
206
|
+
type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';
|
|
207
|
+
type ApprovalPolicy = 'untrusted' | 'on-request' | 'never';
|
|
208
|
+
type ApprovalsReviewer = 'user' | 'auto_review';
|
|
209
|
+
/** What Codex may do by itself, and who decides when it asks for more. */
|
|
210
|
+
interface CodexPermissions {
|
|
211
|
+
sandbox: SandboxMode;
|
|
212
|
+
approvalPolicy: ApprovalPolicy;
|
|
213
|
+
approvalsReviewer?: ApprovalsReviewer;
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../provider-codex/src/codex-provider.d.ts
|
|
217
|
+
interface CodexProviderOptions {
|
|
218
|
+
/** Directory the dev site lives in; Codex runs in its repository root. */
|
|
219
|
+
projectRoot: string;
|
|
220
|
+
/** The Codex binary; defaults to the one on the PATH or in the desktop app. */
|
|
221
|
+
command?: string;
|
|
222
|
+
/** Defaults to Codex's own default model. */
|
|
223
|
+
model?: string;
|
|
224
|
+
/** Defaults to full access: nobody is at a terminal to approve anything. */
|
|
225
|
+
permissions?: CodexPermissions;
|
|
226
|
+
/** Tencil's version, which Codex records as its client. */
|
|
227
|
+
version?: string;
|
|
228
|
+
/** Close the Codex process after this long without anything running. Defaults to 10 minutes. */
|
|
229
|
+
idleCloseMs?: number;
|
|
230
|
+
/** How soon to look again while Codex is missing or signed out. Defaults to 15 seconds. */
|
|
231
|
+
recheckMs?: number;
|
|
232
|
+
/** Replaces starting `codex app-server` (tests). */
|
|
233
|
+
spawn?: SpawnAppServer;
|
|
234
|
+
log?: (message: string) => void;
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
170
237
|
//#region ../provider-ensemble/src/auth.d.ts
|
|
171
238
|
/** The tokens Ensemble gave Tencil, per Ensemble URL, readable only by this user. */
|
|
172
239
|
declare class EnsembleCredentialStore {
|
|
@@ -230,7 +297,7 @@ interface T3CodeProviderOptions {
|
|
|
230
297
|
}
|
|
231
298
|
//#endregion
|
|
232
299
|
//#region src/daemon/agents.d.ts
|
|
233
|
-
declare const PROVIDERS: readonly ["t3code", "claude-code", "ensemble"];
|
|
300
|
+
declare const PROVIDERS: readonly ["t3code", "claude-code", "codex", "ensemble"];
|
|
234
301
|
type ProviderName = (typeof PROVIDERS)[number];
|
|
235
302
|
//#endregion
|
|
236
303
|
//#region src/service/self-update.d.ts
|
|
@@ -287,6 +354,7 @@ interface DaemonOptions {
|
|
|
287
354
|
model?: string;
|
|
288
355
|
permissionMode?: PermissionMode;
|
|
289
356
|
};
|
|
357
|
+
codex?: Pick<CodexProviderOptions, 'model' | 'permissions' | 'command' | 'spawn'>;
|
|
290
358
|
/** Ensemble's public local API. */
|
|
291
359
|
ensemble?: {
|
|
292
360
|
url?: string;
|
|
@@ -329,12 +397,6 @@ interface Daemon {
|
|
|
329
397
|
checkForUpdates(): Promise<void>;
|
|
330
398
|
close(): Promise<void>;
|
|
331
399
|
}
|
|
332
|
-
/**
|
|
333
|
-
* One Tencil daemon per machine. Pages load `/tencil.js` from it; each
|
|
334
|
-
* page's WebSocket is attached to the project it belongs to (worked out from
|
|
335
|
-
* the dev server's port, or picked by the user), and every project gets its
|
|
336
|
-
* own bridge, provider connection and pin store, created on first use.
|
|
337
|
-
*/
|
|
338
400
|
export declare function startDaemon(options?: DaemonOptions): Promise<Daemon>;
|
|
339
401
|
/** Is a Tencil daemon answering on this port? Returns its health report. */
|
|
340
402
|
export declare function probeDaemon(port?: number, host?: string): Promise<{
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as projectStorePath,
|
|
1
|
+
import { C as projectStorePath, L as Bridge, N as ProjectResolver, P as projectRoot, R as renderPrompt, S as defaultDataDir, n as probeDaemon, r as startDaemon, t as DEFAULT_PORT, x as FileThreadStore, z as stripContext } from "./server-7jKlEaWk.mjs";
|
|
2
2
|
export { Bridge, DEFAULT_PORT, ProjectResolver, FileThreadStore as ThreadStore, defaultDataDir, probeDaemon, projectRoot, projectStorePath, renderPrompt, startDaemon, stripContext };
|
package/dist/next.d.mts
CHANGED