tencil 0.10.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/index.d.mts +53 -1
- package/dist/index.mjs +1 -1
- package/dist/{server-C-Udis96.mjs → server-7jKlEaWk.mjs} +1095 -28
- package/package.json +5 -3
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)
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
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 {
|
|
@@ -183,6 +184,56 @@ export declare function projectRoot(folder: string): string;
|
|
|
183
184
|
/** The permission modes that work without anyone at a terminal to answer prompts. */
|
|
184
185
|
type PermissionMode = 'default' | 'acceptEdits' | 'auto' | 'bypassPermissions';
|
|
185
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
|
|
186
237
|
//#region ../provider-ensemble/src/auth.d.ts
|
|
187
238
|
/** The tokens Ensemble gave Tencil, per Ensemble URL, readable only by this user. */
|
|
188
239
|
declare class EnsembleCredentialStore {
|
|
@@ -246,7 +297,7 @@ interface T3CodeProviderOptions {
|
|
|
246
297
|
}
|
|
247
298
|
//#endregion
|
|
248
299
|
//#region src/daemon/agents.d.ts
|
|
249
|
-
declare const PROVIDERS: readonly ["t3code", "claude-code", "ensemble"];
|
|
300
|
+
declare const PROVIDERS: readonly ["t3code", "claude-code", "codex", "ensemble"];
|
|
250
301
|
type ProviderName = (typeof PROVIDERS)[number];
|
|
251
302
|
//#endregion
|
|
252
303
|
//#region src/service/self-update.d.ts
|
|
@@ -303,6 +354,7 @@ interface DaemonOptions {
|
|
|
303
354
|
model?: string;
|
|
304
355
|
permissionMode?: PermissionMode;
|
|
305
356
|
};
|
|
357
|
+
codex?: Pick<CodexProviderOptions, 'model' | 'permissions' | 'command' | 'spawn'>;
|
|
306
358
|
/** Ensemble's public local API. */
|
|
307
359
|
ensemble?: {
|
|
308
360
|
url?: string;
|
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 };
|