tencil 0.13.0 → 0.14.1

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/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 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-D1QuPhoI.mjs";
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-KTzrrMju.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";
@@ -1,4 +1,4 @@
1
- import "./index-CCzEXssj.mjs";
1
+ import "./index-2g3L9A16.mjs";
2
2
  //#region src/integrations/cloud.d.ts
3
3
  interface TencilCloudOptions {
4
4
  /** Project key from the Tencil Cloud dashboard. Defaults to TENCIL_CLOUD. */
@@ -81,9 +81,9 @@ declare const ThreadStatus: z.ZodEnum<{
81
81
  }>;
82
82
  type ThreadStatus = z.infer<typeof ThreadStatus>;
83
83
  declare const MessageRole: z.ZodEnum<{
84
+ system: "system";
84
85
  user: "user";
85
86
  assistant: "assistant";
86
- system: "system";
87
87
  }>;
88
88
  type MessageRole = z.infer<typeof MessageRole>;
89
89
  declare const Delivery: z.ZodObject<{
@@ -204,9 +204,9 @@ declare const Thread: z.ZodObject<{
204
204
  messages: z.ZodArray<z.ZodObject<{
205
205
  id: z.ZodString;
206
206
  role: z.ZodEnum<{
207
+ system: "system";
207
208
  user: "user";
208
209
  assistant: "assistant";
209
- system: "system";
210
210
  }>;
211
211
  text: z.ZodString;
212
212
  streaming: z.ZodDefault<z.ZodBoolean>;
@@ -340,9 +340,9 @@ interface UpdateStatus {
340
340
  */
341
341
  declare const Preferences: z.ZodObject<{
342
342
  theme: z.ZodOptional<z.ZodEnum<{
343
- system: "system";
344
343
  dark: "dark";
345
344
  light: "light";
345
+ system: "system";
346
346
  }>>;
347
347
  shortcuts: z.ZodOptional<z.ZodObject<{
348
348
  comment: z.ZodNullable<z.ZodObject<{
@@ -416,6 +416,8 @@ declare const ProjectSettings: z.ZodObject<{
416
416
  model: z.ZodOptional<z.ZodString>;
417
417
  batch: z.ZodBoolean;
418
418
  ruler: z.ZodBoolean;
419
+ context: z.ZodString;
420
+ globalContext: z.ZodOptional<z.ZodString>;
419
421
  }, z.core.$strip>;
420
422
  type ProjectSettings = z.infer<typeof ProjectSettings>;
421
423
  declare const ProjectSource: z.ZodObject<{
package/dist/index.d.mts CHANGED
@@ -1,5 +1,20 @@
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-CCzEXssj.mjs";
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-2g3L9A16.mjs";
2
+ import { z } from "zod";
2
3
  import { Readable, Writable } from "node:stream";
4
+ //#region ../bridge/src/global-context.d.ts
5
+ /**
6
+ * Instructions that go with every pin of every project. They're machine state
7
+ * (account state for Tencil Cloud), so the host keeps them and shares one store
8
+ * between all of its bridges.
9
+ */
10
+ interface GlobalContextStore {
11
+ /** The saved text, empty when there is none. Hosts load it before a bridge reads it. */
12
+ get(): string;
13
+ set(context: string): Promise<void>;
14
+ /** Fires after every change, so each bridge can tell its overlays. */
15
+ onChange(listener: () => void): () => void;
16
+ }
17
+ //#endregion
3
18
  //#region ../bridge/src/project-providers.d.ts
4
19
  /** What a project picked in the overlay's settings. */
5
20
  interface SavedProjectSettings {
@@ -11,6 +26,8 @@ interface SavedProjectSettings {
11
26
  batch?: boolean;
12
27
  /** Offer the ruler in the overlay's toolbar; on when unset. */
13
28
  ruler?: boolean;
29
+ /** Instructions that go with every pin of this project. */
30
+ context?: string;
14
31
  }
15
32
  /**
16
33
  * Where a project's settings live: a file next to its pins for the daemon,
@@ -59,7 +76,10 @@ declare class ProjectProviders {
59
76
  setBatch(on: boolean): Promise<void>;
60
77
  get ruler(): boolean;
61
78
  setRuler(on: boolean): Promise<void>;
62
- /** Fires when a picked model, batching or the ruler changes. */
79
+ /** The project's instructions for every pin, empty when there are none. */
80
+ get context(): string;
81
+ setContext(context: string): Promise<void>;
82
+ /** Fires when a picked model, batching, the ruler or the context changes. */
63
83
  onSettingsChange(listener: () => void): () => void;
64
84
  onDefaultChange(listener: () => void): () => void;
65
85
  dispose(): Promise<void>;
@@ -101,6 +121,11 @@ interface BridgeOptions {
101
121
  * handles `update.start` itself); Tencil Cloud doesn't.
102
122
  */
103
123
  update?: () => UpdateStatus;
124
+ /**
125
+ * Instructions for every pin of every project, shared by the host's bridges.
126
+ * Without it the overlay doesn't offer them.
127
+ */
128
+ globalContext?: GlobalContextStore;
104
129
  log?: (message: string) => void;
105
130
  }
106
131
  /**
@@ -116,6 +141,13 @@ export declare class Bridge {
116
141
  }
117
142
  //#endregion
118
143
  //#region ../bridge/src/prompt.d.ts
144
+ /** What the user wrote in Tencil's settings to go with every pin. */
145
+ interface PinInstructions {
146
+ /** For every project on this machine (or account). */
147
+ global?: string;
148
+ /** For this project only. */
149
+ project?: string;
150
+ }
119
151
  /**
120
152
  * Renders the text sent to the agent: the user's words first, then a fenced
121
153
  * block of element context. The block is stripped again before messages are
@@ -126,6 +158,7 @@ export declare function renderPrompt(input: {
126
158
  pageUrl: string;
127
159
  context: ElementContext;
128
160
  hasScreenshot: boolean;
161
+ instructions?: PinInstructions;
129
162
  }): string;
130
163
  export declare function stripContext(text: string): string;
131
164
  //#endregion
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
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-D1QuPhoI.mjs";
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-KTzrrMju.mjs";
2
2
  export { Bridge, DEFAULT_PORT, ProjectResolver, FileThreadStore as ThreadStore, defaultDataDir, probeDaemon, projectRoot, projectStorePath, renderPrompt, startDaemon, stripContext };
package/dist/next.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as TencilCloudOptions } from "./cloud-kfsssyEM.mjs";
1
+ import { t as TencilCloudOptions } from "./cloud-CblA1guP.mjs";
2
2
  //#region src/integrations/next.d.ts
3
3
  /**
4
4
  * Wrap `next.config` for Tencil Cloud preview builds: every element gets a