nterminal 1.3.19 → 1.3.21
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 +1 -1
- package/dist/client/assets/MarkdownPreview-DjTTa99c.js +1 -0
- package/dist/client/assets/{TranscriptMarkdownBody-BwFMI5GZ.js → TranscriptMarkdownBody-CakGC8wZ.js} +1 -1
- package/dist/client/assets/{index-DoDjMjz2.css → index-BA_6Pzsw.css} +1 -1
- package/dist/client/assets/{index-B3ojUGo8.js → index-BKM5FMdU.js} +1 -1
- package/dist/client/assets/index-D1TNwFf3.js +59 -0
- package/dist/client/index.html +2 -2
- package/dist/server/accounts/accountService.d.ts +1 -0
- package/dist/server/accounts/accountService.js +70 -18
- package/dist/server/accounts/accountService.js.map +1 -1
- package/dist/shared/accountUsage.d.ts +2 -0
- package/dist/shared/accountUsage.js +16 -0
- package/dist/shared/accountUsage.js.map +1 -0
- package/dist/shared/protocol.d.ts +2 -0
- package/dist/shared/protocol.js.map +1 -1
- package/docs/features.md +4 -1
- package/package.json +1 -1
- package/dist/client/assets/MarkdownPreview-DN1hmlZg.js +0 -1
- package/dist/client/assets/index-qXAESSsY.js +0 -59
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Keep the provider's reset timestamp and checkedAt: a local rollover is not
|
|
2
|
+
// evidence of a new quota reading or of when the next window will start.
|
|
3
|
+
export function applyUsageResets(usage, now) {
|
|
4
|
+
if (usage.status !== 'available')
|
|
5
|
+
return usage;
|
|
6
|
+
let changed = false;
|
|
7
|
+
const windows = usage.windows.map((window) => {
|
|
8
|
+
const reset = Date.parse(window.resetsAt ?? '');
|
|
9
|
+
if (!Number.isFinite(reset) || reset > now || window.estimatedReset)
|
|
10
|
+
return window;
|
|
11
|
+
changed = true;
|
|
12
|
+
return { ...window, usedPercent: 0, estimatedReset: true };
|
|
13
|
+
});
|
|
14
|
+
return changed ? { ...usage, cached: true, windows } : usage;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=accountUsage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountUsage.js","sourceRoot":"","sources":["../../src/shared/accountUsage.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,yEAAyE;AACzE,MAAM,UAAU,gBAAgB,CAAC,KAAmB,EAAE,GAAW;IAC/D,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,GAAG,IAAI,MAAM,CAAC,cAAc;YAAE,OAAO,MAAM,CAAC;QACnF,OAAO,GAAG,IAAI,CAAC;QACf,OAAO,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;IAC7D,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/D,CAAC"}
|
|
@@ -238,10 +238,12 @@ export interface AccountUsage {
|
|
|
238
238
|
status: 'available' | 'unavailable' | 'reauth_required' | 'unsupported';
|
|
239
239
|
checkedAt: string;
|
|
240
240
|
code: string | null;
|
|
241
|
+
cached?: boolean;
|
|
241
242
|
windows: Array<{
|
|
242
243
|
kind: 'weekly' | 'session';
|
|
243
244
|
usedPercent: number;
|
|
244
245
|
resetsAt: string | null;
|
|
246
|
+
estimatedReset?: boolean;
|
|
245
247
|
}>;
|
|
246
248
|
}
|
|
247
249
|
export interface AccountUsageResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAo0BzC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AACnD,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE5D,MAAM,UAAU,0BAA0B,CAAC,GAAW;IACpD,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,MAUf,CAAC;QACF,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC3G,IACE,OAAO,CAAC,SAAS,KAAK,SAAS;gBAC/B,CACE,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ;oBACrC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;oBAC9B,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,+BAA+B,CAC3D,EACD,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,GAAG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C"}
|
package/docs/features.md
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
- Only links to the providers' sign-in pages (`auth.openai.com`, `claude.com`, `platform.claude.com`) are shown. Raw CLI output never leaves the server; a failed login shows a short message and a few redacted lines. A pasted code must match the `code#state` shape, and nothing else is written to the CLI. An unfinished sign-in stops after 15 minutes and restores the previous account, as **Cancel and restore previous** does.
|
|
46
46
|
- Account dialogs show access-token expiry, weekly usage remaining, reset time, and the last usage check. Quota checks are read-only, cached briefly, and never swap the active credential file.
|
|
47
47
|
- Saved accounts renew independently, including while another account is running or a new login is unfinished. Refresh outcomes include the last attempt, success, retry time, and a redacted provider error code.
|
|
48
|
+
- Codex automatic renewal waits until access-token expiry and rechecks the current credential before requesting a refresh. It does not guess expiry from the credential's age when no expiry is known. Explicit manual refresh remains available; Claude's renewal schedule is unchanged.
|
|
48
49
|
- NTerminal defers direct refresh of an active credential while a native CLI owns it. An idle conversation does not mean authentication activity has stopped; native-owner refresh delegation is not implemented yet.
|
|
49
50
|
- Expired access tokens and revoked refresh tokens are different states. A login the provider revoked, or whose refresh token has expired, shows **Re-login required** with the reason and a **Sign in again** button that reuses the add-account flow and keeps the saved name. The server card's provider icon shows a small marker, reported with the regular server stats poll.
|
|
50
51
|
- Optional [provider lifecycle hooks](provider-hooks.md) can be installed from each server's account dialog or `nterminal hooks`. They provide verified session/activity signals without replacing native CLI authentication.
|
|
@@ -126,7 +127,9 @@ Clicking a completion toast switches back to the server and pane that finished.
|
|
|
126
127
|
- Compose drawer keeps drafts per pane.
|
|
127
128
|
- Sending from compose writes carriage returns so multiline commands execute instead of only inserting visual newlines.
|
|
128
129
|
- Ctrl+C copies selected terminal text and falls through to SIGINT when nothing is selected.
|
|
129
|
-
- Ctrl+V
|
|
130
|
+
- Ctrl+V uses the browser's native paste event for text and images, without a separate asynchronous clipboard read. In Codex/Claude panes it can paste images as native CLI attachments without opening Compose or submitting the prompt. Mobile paste menus work when the browser supplies image files.
|
|
131
|
+
- Direct image paste uses the pane server's private attachment storage and configured limits. Consecutive image pastes upload in order, with a per-pane queue capped at 10 pending images and 100 MiB including the active upload; excess images are rejected with a visible message. Canceling or changing panes/sessions clears the active upload and the waiting queue.
|
|
132
|
+
- Text paste, including newlines and indentation, continues during image uploads. Enter/Tab submission is blocked until uploads finish; those keys are not queued or sent automatically afterward. If an upload fails, remaining image pastes are canceled with an error message.
|
|
130
133
|
|
|
131
134
|
## Mobile Controls
|
|
132
135
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./index-qXAESSsY.js";import{M as e,r as o}from"./index-B3ojUGo8.js";function s({content:r}){return a.jsx(e,{remarkPlugins:[o],children:r})}export{s as default};
|