codex-copilot-dx 1.3.12 → 1.3.13
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/docs/ARCHITECTURE.md +2 -0
- package/docs/REFERENCE.md +2 -2
- package/package.json +1 -1
- package/src/privacy-detection.mjs +2 -2
- package/src/privacy-model.mjs +3 -3
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1103,3 +1103,5 @@ Publication requires the explicit complete platform/Node/browser CI matrix on th
|
|
|
1103
1103
|
WebUI copy keeps its existing layout, controls, fonts and icons. Redundant branding and Codex-only tags are omitted in their existing contexts. Switches retain pending/error and saved-versus-effective distinctions; applicable scope, restart prerequisites and operation consequences remain visible. Local-masking sections use localized accessible names after the redundant category heading is removed. TUI/CLI commands retain explicit states and share the same control service.
|
|
1104
1104
|
|
|
1105
1105
|
Performance comparison is separate from runtime logic and reports paired timing without blocking publication. Each paired sample runs its JS detector and native helper in fresh processes, with copied model files at the same owned path. An exact binomial interval on paired medians retains uncertain and regressing observations. Classifier-result and reuse assertions remain blocking. The separate qualification workflow is manual only. Completely cached detection bypasses waiting machinery; uncached work retains its original bounded wait and physical acknowledgement.
|
|
1106
|
+
|
|
1107
|
+
The 1.3.13 native helper groups uncached short CPU sequences under the existing shared core budget. Groups retain at most 512 total tokens and 16 KiB text. The existing core budget is divided between sequence workers, including its remainder, instead of repeatedly creating a full-budget partition for every short field. Tokenization, position IDs, attention scope and dynamic quantization remain per sequence. Already-known windows and single uncached sequences retain their previous paths; long and accelerator-eligible windows use the existing reader. Cancellation waits for physical acknowledgement, completed windows remain reusable, and the complete check still precedes upstream calls. Status advertises cpu_short_batch and reports cpu_batch_groups/cpu_batch_windows without retaining values.
|
package/docs/REFERENCE.md
CHANGED
|
@@ -789,7 +789,7 @@ Rules and a local model replace detected values with stable placeholders. Replie
|
|
|
789
789
|
|
|
790
790
|
Tool data is interpreted in its own context: ordinary argument fields named `id`, `signature`, `data` or `type` are restored, while protocol identifiers and signed blocks remain unchanged. Streaming restoration retains SSE event metadata and restores Responses custom-tool text across fragments. Incomplete parameters are discarded when the upstream emits a failure rather than replacing that failure with a restoration error.
|
|
791
791
|
|
|
792
|
-
Each request pins its masking choice, including compatibility retries. Checks normally wait up to 15 seconds; a plan with at least one 16 KiB batch of uncached or in-flight text, or more than one pending native window, receives a bounded 60-second wait. A request still exceeding its wait is rejected before any upstream call. Submitted native batches finish and remain reusable; callers share in-flight work, and unused queued work stops. The 1.3.
|
|
792
|
+
Each request pins its masking choice, including compatibility retries. Checks normally wait up to 15 seconds; a plan with at least one 16 KiB batch of uncached or in-flight text, or more than one pending native window, receives a bounded 60-second wait. A request still exceeding its wait is rejected before any upstream call. Submitted native batches finish and remain reusable; callers share in-flight work, and unused queued work stops. The 1.3.13 component reuses exact natural token-window predictions. Independent short CPU sequences run in bounded groups, with at most 512 total tokens including sequence markers and 16 KiB text. Each sequence keeps its tokenization, positions, attention and quantization scale; fields are not joined into a shared context. A single uncached sequence and accelerator-eligible windows retain their previous execution path. CPU batch-group and computed-window counts are exposed in the existing status metadata. Sparse non-O labels and exact scores use a separate 4 MiB/5,000-entry memory cache; original tokenization, window overlaps and current-text byte offsets are unchanged. Up to two text batches run concurrently, toward 16 KiB or 64 entries, keeping a larger individual text whole. Exact completed texts retain hot aliases. When the last waiter leaves, supporting components finish current windows, cache them and acknowledge cancellation before releasing the native slot. A waiter joining during cancellation resumes after acknowledgement; older compatible components finish whole batches as before. No request uses an incomplete model check. A native job retains its five-minute deadline and the native eight-job/16 MiB limits; the detection queue adds a 16 MiB/8,192-entry bound. Cache metadata remains within 5,000 entries/4 MiB, without storing detection history on disk. Cold-check cost and recovery are measured separately from hot reuse. Fully cached checks do not create native-work wait timers or cancellation listeners; they still honor caller cancellation before returning. CPU intermediate matrices are reused only within one inference. CoreML reuses one C-owned input array/provider per model under its existing mutex and clears its buffers after every successful or failed prediction. Go input memory is not retained by CoreML; classification mathematics and thread budgets are unchanged.
|
|
793
793
|
|
|
794
794
|
Streaming restoration emits argument fragments incrementally with JSON string escaping, keeps protocol identities and signed state opaque, and validates completion against argument snapshots or incremental JSON syntax. Only unfinished placeholder tails and structural metadata are retained; raw argument bytes per channel remain capped at 8 MiB, retained tails/metadata/validator state at 32 MiB and active channels at 1,024. Added tail deltas preserve increasing Responses sequence numbers. An incomplete or failed upstream response does not manufacture a completed tool call. Successful frame bytes remain unchanged when restoration is unnecessary. A timeout or busy check reports that nothing was sent, with `Retry-After` for temporary waits. Model readiness, the latest check and the latest protected reply are separate. WebUI and `ccdx config privacy status` report pending detection and reply-restoration errors; the CLI retains explicit enabled/disabled values, while graphical switches omit duplicate normal-state labels; request details retain bounded error/event/channel codes and buffer quantities, never their values. A loaded model or HTTP 200 does not establish that a request or client tool completed.
|
|
795
795
|
|
|
@@ -801,6 +801,6 @@ Try locally sends sample text only to the local component. Request records show
|
|
|
801
801
|
|
|
802
802
|
Privacy failures have a separate local diagnostic origin. Response-restoration failures report that the response was stopped; request-check failures report that nothing was sent. When the latest Messages input explicitly contains failed tool results, request details show their count without retaining their content. HTTP success describes the model response, not proof that a client executed its tools successfully.
|
|
803
803
|
|
|
804
|
-
The optional component is pinned to v1.3.
|
|
804
|
+
The optional component is pinned to v1.3.13. Verified older components, including 1.3.10, retain their original whole-text behavior. ABI 1 is unchanged; window reuse, advisory window plans and acknowledged cancellation are advertised capabilities. Plans contain only text indices and window counts, never request text. Startup retains its previous inexpensive preflight; accelerator initialization remains lazy. Native CI checks both cold detection and startup-plus-cold cost. Verified 1.3.6 and 1.3.9 installations remain compatible. New component receipts bind their protocol ABI and model revision before older versioned components can be reused. On Intel Macs where CoreML selects CPU, windows below 128 tokens use the existing native int8 reader; longer windows, GPU, Neural Engine and ARM selection retain their prior policy. Its source and license notices are in `native/privacy-guard` and `src/privacy-notices.txt`. AstrLink Guard model files use their publisher's Apache-2.0 license.
|
|
805
805
|
|
|
806
806
|
Paired timing comparisons report cold, startup-plus-first-check, append and hot-check observations without blocking publication. Classifier correctness, byte verification and reuse assertions remain blocking. Real-use request records expose local-check duration and errors for observation after upgrading; fixed-machine results do not establish sustained real-use performance.
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ export function createPrivacyDetection(model, {
|
|
|
14
14
|
if (!Number.isSafeInteger(maxConcurrent) || maxConcurrent < 1 || maxConcurrent > 8) throw new Error("Invalid privacy concurrency budget");
|
|
15
15
|
const cache = new Map(), flights = new Map(), turns = [];
|
|
16
16
|
let cacheBytes = 0, pendingBytes = 0, running = 0, closed = false;
|
|
17
|
-
const stats = { submitted_batches: 0, submitted_bytes: 0, cache_hits: 0, shared_hits: 0, skipped_texts: 0, window_evaluations: 0, window_hits: 0, window_shared: 0 };
|
|
17
|
+
const stats = { submitted_batches: 0, submitted_bytes: 0, cache_hits: 0, shared_hits: 0, skipped_texts: 0, window_evaluations: 0, window_hits: 0, window_shared: 0, cpu_batch_groups: 0, cpu_batch_windows: 0 };
|
|
18
18
|
const copy = value => value.map(span => ({ ...span }));
|
|
19
19
|
function get(key) {
|
|
20
20
|
const entry = cache.get(key);if (!entry) return undefined;
|
|
@@ -53,7 +53,7 @@ export function createPrivacyDetection(model, {
|
|
|
53
53
|
const onSubmitted = () => { if (!submitted) { submitted = true;stats.submitted_batches++;stats.submitted_bytes += bytes; } };
|
|
54
54
|
const input = batch.map(entry => entry.text), result = await model.find(input, {
|
|
55
55
|
isNeeded: () => batch.some(entry => entry.waiters > 0), workSignal: lease.controller.signal, onSubmitted,
|
|
56
|
-
onWindowWork(work) { stats.window_evaluations += work.evaluated || 0;stats.window_hits += work.hits || 0;stats.window_shared += work.shared || 0; },
|
|
56
|
+
onWindowWork(work) { stats.window_evaluations += work.evaluated || 0;stats.window_hits += work.hits || 0;stats.window_shared += work.shared || 0;stats.cpu_batch_groups += work.cpu_batch_groups || 0;stats.cpu_batch_windows += work.cpu_batch_windows || 0; },
|
|
57
57
|
onPlan(plan) {
|
|
58
58
|
const entry = batch[plan.text_index];if (!entry || entry.done) return;
|
|
59
59
|
entry.nativePlan = { pending_windows: plan.pending_windows, total_windows: plan.total_windows };
|
package/src/privacy-model.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { promisify } from "node:util";
|
|
|
8
8
|
import { createNpmReleaseFetch, releaseBytes, releaseChecksum, RELEASE_BASE, stableVersion } from "./release-install.mjs";
|
|
9
9
|
|
|
10
10
|
export const PRIVACY_MODEL_REVISION = "7216b6a3b897ef903d4b1ba367ae6fb95b0fa5e4";
|
|
11
|
-
export const PRIVACY_COMPONENT_RELEASE = "1.3.
|
|
11
|
+
export const PRIVACY_COMPONENT_RELEASE = "1.3.13";
|
|
12
12
|
export const PRIVACY_COMPONENT_ABI = 1;
|
|
13
13
|
export const PRIVACY_MODEL_FILES = Object.freeze([
|
|
14
14
|
{ name: "model_int8.onnx", bytes: 330781, sha256: "0a070d3113615e33ba3b84d6bd486f663a377c04c4b056e7381732179f51832a" },
|
|
@@ -153,7 +153,7 @@ export function createPrivacyModel(options = {}) {
|
|
|
153
153
|
const part = line.slice(0, end);line = line.slice(end + 1);
|
|
154
154
|
try {
|
|
155
155
|
const value = JSON.parse(part);
|
|
156
|
-
if (value.ready === true) { clearTimeout(timer);set({ state: "ready", backend: value.backend === "CoreML" ? "CoreML" : "CPU", device: ["CPU", "GPU", "Neural Engine"].includes(value.device) ? value.device : null, window_cache: value.window_cache === true, window_plan: value.window_plan === true, cancel_between_windows: value.cancel_between_windows === true, window_cache_entries: Number.isSafeInteger(value.window_cache_entries) ? value.window_cache_entries : null, window_cache_bytes: Number.isSafeInteger(value.window_cache_bytes) ? value.window_cache_bytes : null });resolve();if (componentRelease !== PRIVACY_COMPONENT_RELEASE && !upgradeAttempted) { upgradeAttempted = true;void download({ background: true }).catch(() => {}); } }
|
|
156
|
+
if (value.ready === true) { clearTimeout(timer);set({ state: "ready", backend: value.backend === "CoreML" ? "CoreML" : "CPU", device: ["CPU", "GPU", "Neural Engine"].includes(value.device) ? value.device : null, window_cache: value.window_cache === true, window_plan: value.window_plan === true, cancel_between_windows: value.cancel_between_windows === true, cpu_short_batch: value.cpu_short_batch === true, window_cache_entries: Number.isSafeInteger(value.window_cache_entries) ? value.window_cache_entries : null, window_cache_bytes: Number.isSafeInteger(value.window_cache_bytes) ? value.window_cache_bytes : null });resolve();if (componentRelease !== PRIVACY_COMPONENT_RELEASE && !upgradeAttempted) { upgradeAttempted = true;void download({ background: true }).catch(() => {}); } }
|
|
157
157
|
else if (jobs.has(value.id)) {
|
|
158
158
|
const job = jobs.get(value.id);
|
|
159
159
|
if (value.phase === "plan") {
|
|
@@ -165,7 +165,7 @@ export function createPrivacyModel(options = {}) {
|
|
|
165
165
|
}
|
|
166
166
|
jobs.delete(value.id);clearTimeout(job.timer);
|
|
167
167
|
if (value.window_work && typeof value.window_work === "object") {
|
|
168
|
-
const work = Object.fromEntries(["evaluated", "hits", "shared", "total"].filter(key => Number.isSafeInteger(value.window_work[key]) && value.window_work[key] >= 0).map(key => [key, value.window_work[key]]));
|
|
168
|
+
const work = Object.fromEntries(["evaluated", "hits", "shared", "total", "cpu_batch_groups", "cpu_batch_windows"].filter(key => Number.isSafeInteger(value.window_work[key]) && value.window_work[key] >= 0).map(key => [key, value.window_work[key]]));
|
|
169
169
|
set({ last_window_work: work, window_cache_entries: Number.isSafeInteger(value.window_cache_entries) ? value.window_cache_entries : null,
|
|
170
170
|
window_cache_bytes: Number.isSafeInteger(value.window_cache_bytes) ? value.window_cache_bytes : null });
|
|
171
171
|
job.onWindowWork?.(work);
|