dsh-github-copilot 0.4.1 → 0.4.2-alpha.3

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/lib/client.js CHANGED
@@ -444,7 +444,7 @@ window.__ModuleLoader__.load({
444
444
  [data-copilot-native-ui] summary {
445
445
  width: fit-content; max-width: 100%; padding: 2px 4px; margin-left: -4px;
446
446
  border-radius: var(--dsw-radius-sm, 8px); cursor: pointer;
447
- font-size: 12px; line-height: 18px; font-weight: 500;
447
+ font: inherit; font-weight: 500;
448
448
  color: var(--dsw-alias-label-secondary, GrayText); list-style: none;
449
449
  }
450
450
  [data-copilot-native-ui] summary::-webkit-details-marker { display: none; }
@@ -1811,7 +1811,7 @@ window.__ModuleLoader__.load({
1811
1811
  };
1812
1812
  //#endregion
1813
1813
  //#region node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1814
- const version$2 = {
1814
+ const version$3 = {
1815
1815
  major: 4,
1816
1816
  minor: 6,
1817
1817
  patch: 5
@@ -1823,7 +1823,7 @@ window.__ModuleLoader__.load({
1823
1823
  inst ?? (inst = {});
1824
1824
  inst._zod.def = def;
1825
1825
  inst._zod.bag = inst._zod.bag || {};
1826
- inst._zod.version = version$2;
1826
+ inst._zod.version = version$3;
1827
1827
  const defChecks = inst._zod.def.checks;
1828
1828
  const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
1829
1829
  for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
@@ -6521,6 +6521,81 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6521
6521
  }))
6522
6522
  };
6523
6523
  //#endregion
6524
+ //#region lib/types/auto-allocation-diagnostics.js
6525
+ const AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS = 1024;
6526
+ const dayMs = 864e5;
6527
+ const integer$1 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
6528
+ const version$2 = string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
6529
+ const allocationRow = object({
6530
+ day: integer$1.multipleOf(dayMs),
6531
+ version: version$2,
6532
+ policyVersion: string().min(1).max(64),
6533
+ modelId: string().min(1).max(512),
6534
+ targetCategory: _enum([
6535
+ "powerful",
6536
+ "versatile",
6537
+ "lightweight"
6538
+ ]),
6539
+ category: _enum([
6540
+ "powerful",
6541
+ "versatile",
6542
+ "lightweight",
6543
+ "unknown"
6544
+ ]),
6545
+ demand: _enum([
6546
+ "simple",
6547
+ "routine",
6548
+ "complex",
6549
+ "unknown"
6550
+ ]),
6551
+ assessmentSource: _enum(["local", "semantic"]),
6552
+ method: _enum(["weighted-distribution", "only-candidate"]),
6553
+ fallback: boolean(),
6554
+ highCost: boolean(),
6555
+ previous: boolean(),
6556
+ weight: number().positive().max(1.5),
6557
+ opportunities: integer$1.min(1),
6558
+ expectedSelections: number().finite().nonnegative().max(Number.MAX_SAFE_INTEGER),
6559
+ selections: integer$1
6560
+ }).strict();
6561
+ const noFitRow = object({
6562
+ day: integer$1.multipleOf(dayMs),
6563
+ version: version$2,
6564
+ policyVersion: string().min(1).max(64),
6565
+ targetCategory: _enum([
6566
+ "powerful",
6567
+ "versatile",
6568
+ "lightweight"
6569
+ ]),
6570
+ category: _enum([
6571
+ "powerful",
6572
+ "versatile",
6573
+ "lightweight",
6574
+ "unknown"
6575
+ ]),
6576
+ demand: _enum([
6577
+ "simple",
6578
+ "routine",
6579
+ "complex",
6580
+ "unknown"
6581
+ ]),
6582
+ assessmentSource: _enum(["local", "semantic"]),
6583
+ decisions: integer$1.min(1)
6584
+ }).strict();
6585
+ const AutoAllocationDiagnosticsSchema = object({
6586
+ status: _enum(["observed", "not-collected"]),
6587
+ rows: array(allocationRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
6588
+ noFitRows: array(noFitRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
6589
+ observationStart: integer$1.nullable(),
6590
+ observationEnd: integer$1.nullable(),
6591
+ completeHistory: literal(false),
6592
+ rowsTruncated: boolean(),
6593
+ dropped: integer$1,
6594
+ expired: integer$1,
6595
+ saturated: integer$1,
6596
+ restarts: integer$1
6597
+ }).strict().refine((value) => JSON.stringify(value).length <= 15e5, "Auto allocation diagnostic capacity exceeded").refine((value) => value.rows.length + value.noFitRows.length <= AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS, "Auto allocation row capacity exceeded").refine(({ observationStart, observationEnd }) => observationStart === null ? observationEnd === null : observationEnd !== null && observationEnd >= observationStart, "Auto allocation observation window is inconsistent");
6598
+ //#endregion
6524
6599
  //#region lib/types/diagnostics-types.js
6525
6600
  const DIAGNOSTICS_OPERATIONS = [
6526
6601
  "account-global-switch",
@@ -6627,6 +6702,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6627
6702
  epoch: integer,
6628
6703
  updatedAt: integer,
6629
6704
  rows: array(DiagnosticsRowSchema).max(DIAGNOSTICS_MAX_ROWS),
6705
+ autoAllocation: AutoAllocationDiagnosticsSchema.optional(),
6630
6706
  pending: array(DiagnosticsPendingSchema).max(128),
6631
6707
  dropped: integer,
6632
6708
  clientDropped: integer,
@@ -6637,6 +6713,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6637
6713
  }).strict().refine((value) => value.pending.reduce((sum, row) => sum + row.count, 0) <= 128, "Diagnostics pending capacity exceeded").refine((value) => JSON.stringify(value).length <= DIAGNOSTICS_MAX_BYTES, "Diagnostics capacity exceeded");
6638
6714
  const DiagnosticsViewSchema = object({
6639
6715
  enabled: boolean(),
6716
+ autoAllocationEnabled: boolean(),
6640
6717
  state: _enum([
6641
6718
  "loading",
6642
6719
  "ready",
@@ -6728,6 +6805,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6728
6805
  codec: strictRemoteCodec("dsh-github-copilot#DiagnosticsEnabled", boolean())
6729
6806
  }]
6730
6807
  },
6808
+ {
6809
+ method: "setAutoAllocationEnabled",
6810
+ parameters: [{
6811
+ name: "enabled",
6812
+ wire: "enabled",
6813
+ source: "json",
6814
+ codec: strictRemoteCodec("dsh-github-copilot#AutoAllocationDiagnosticsEnabled", boolean())
6815
+ }]
6816
+ },
6731
6817
  {
6732
6818
  method: "recordClient",
6733
6819
  parameters: [{
@@ -6988,7 +7074,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6988
7074
  };
6989
7075
  //#endregion
6990
7076
  //#region package.json
6991
- var version = "0.4.1";
7077
+ var version = "0.4.2-alpha.3";
6992
7078
  //#endregion
6993
7079
  //#region lib/types/diagnostics-client.js
6994
7080
  let owner;
@@ -7217,6 +7303,54 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7217
7303
  };
7218
7304
  }, [remote]);
7219
7305
  const rows = view?.snapshot.rows ?? [];
7306
+ const auto = view?.snapshot.autoAllocation;
7307
+ const autoOpportunities = auto?.rows.reduce((sum, row) => sum + row.opportunities, 0) ?? 0;
7308
+ const autoExpected = auto?.rows.reduce((sum, row) => sum + row.expectedSelections, 0) ?? 0;
7309
+ const autoSelections = auto?.rows.reduce((sum, row) => sum + row.selections, 0) ?? 0;
7310
+ const autoNoFit = auto?.noFitRows.reduce((sum, row) => sum + row.decisions, 0) ?? 0;
7311
+ const autoWindow = auto === void 0 || auto.observationStart === null || auto.observationEnd === null ? "No retained observation window" : `${new Date(auto.observationStart).toISOString().slice(0, 10)} – ${new Date(auto.observationEnd).toISOString().slice(0, 10)} UTC`;
7312
+ const autoRows = auto ? [...auto.rows.map((row) => ({
7313
+ key: JSON.stringify([
7314
+ row.day,
7315
+ row.version,
7316
+ row.policyVersion,
7317
+ row.modelId,
7318
+ row.targetCategory,
7319
+ row.category,
7320
+ row.demand,
7321
+ row.assessmentSource,
7322
+ row.method,
7323
+ row.fallback,
7324
+ row.highCost,
7325
+ row.previous
7326
+ ]),
7327
+ day: row.day,
7328
+ policy: row.policyVersion,
7329
+ model: row.modelId,
7330
+ cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · ${row.method}` + (row.fallback ? " · fallback" : "") + (row.highCost ? " · high-cost" : "") + (row.previous ? " · continuity" : ""),
7331
+ opportunities: row.opportunities,
7332
+ expected: row.expectedSelections,
7333
+ selected: row.selections,
7334
+ noFit: null
7335
+ })), ...auto.noFitRows.map((row) => ({
7336
+ key: JSON.stringify([
7337
+ row.day,
7338
+ row.version,
7339
+ row.policyVersion,
7340
+ row.targetCategory,
7341
+ row.category,
7342
+ row.demand,
7343
+ row.assessmentSource
7344
+ ]),
7345
+ day: row.day,
7346
+ policy: row.policyVersion,
7347
+ model: "—",
7348
+ cohort: `${row.targetCategory} → ${row.category} · ${row.demand} · ${row.assessmentSource} · no fit`,
7349
+ opportunities: null,
7350
+ expected: null,
7351
+ selected: null,
7352
+ noFit: row.decisions
7353
+ }))].sort((left, right) => right.day - left.day || left.policy.localeCompare(right.policy) || left.model.localeCompare(right.model)) : [];
7220
7354
  const populations = [...new Set(rows.filter((row) => row.operation !== "collection").map((row) => `${row.layer}/${row.operation}`))];
7221
7355
  const count = (metrics, population) => rows.filter((row) => metrics.includes(row.metric) && `${row.layer}/${row.operation}` === population).reduce((sum, row) => sum + row.count, 0);
7222
7356
  const control = (label, action, disabled = false) => (0, react.createElement)("button", {
@@ -7229,44 +7363,83 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7229
7363
  "aria-label": "Local diagnostics",
7230
7364
  "data-copilot-native-ui": true,
7231
7365
  style: section
7232
- }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("p", { style: {
7233
- margin: 0,
7234
- lineHeight: 1.5,
7235
- maxWidth: "70ch"
7236
- } }, "Account, Checking and compaction counts stay in this profile. No identities, conversation content or raw errors. No upload, scheduled analysis or automatic repair."), (0, react.createElement)("p", {
7366
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("div", { style: {
7367
+ display: "grid",
7368
+ gap: 8,
7369
+ minWidth: 0
7370
+ } }, (0, react.createElement)("h4", { style: nativeHeadingStyle }, "Auto allocation observations"), (0, react.createElement)("p", {
7237
7371
  role: "status",
7238
7372
  style: { margin: 0 }
7239
- }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Collection enabled" : "Collection configured on; not collecting" : "Collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), failed ? (0, react.createElement)("p", {
7240
- role: "alert",
7241
- style: { margin: 0 }
7242
- }, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
7243
- role: "alert",
7244
- style: { margin: 0 }
7245
- }, "Some Client observations could not be confirmed. Client counts are incomplete; Host counts are separate.") : null, (0, react.createElement)("div", { style: {
7246
- display: "flex",
7247
- flexWrap: "wrap",
7248
- gap: 8
7249
- } }, control("Read status", () => {
7250
- run((value) => value.get());
7251
- }, !remote), control(view?.enabled ? "Pause collection" : "Enable local collection", () => {
7252
- run((value) => value.setEnabled(!view?.enabled));
7253
- }, !remote || !view || !view.enabled && view.state !== "ready"), control("Clear local aggregates", () => setConfirmClear(true), !remote || !view || view.state !== "ready")), confirmClear ? (0, react.createElement)("div", {
7254
- role: "group",
7255
- "aria-label": "Confirm clearing local diagnostics"
7256
- }, (0, react.createElement)("p", null, "Delete collected aggregates only? Collection keeps its current enabled/paused setting. This does not clear account settings or conversation history."), control("Confirm clear", () => {
7257
- setConfirmClear(false);
7258
- run((value) => value.clear());
7259
- }), control("Cancel", () => setConfirmClear(false))) : null, view && populations.length ? (0, react.createElement)("div", { style: {
7373
+ }, !view ? busy ? "Reading observation status…" : "Observation status is unknown." : `${view.autoAllocationEnabled ? view.state === "ready" ? "Enabled" : "Enabled · storage unavailable" : "Paused"} · ${auto === void 0 ? "Auto observations unavailable in this snapshot" : auto.status === "observed" ? "Data observed" : view.state === "ready" ? "No observations collected" : "Observation status unavailable"}` + (view.dirty ? " · Latest changes not fully persisted" : "")), auto ? (0, react.createElement)("p", { style: { margin: 0 } }, `${autoWindow} · ${auto.rows.length + auto.noFitRows.length} retained strata · ${auto.rowsTruncated ? "row limit reached" : "row limit not reached"}` + (auto.dropped ? ` · ${auto.dropped} dropped` : "") + (auto.expired ? ` · ${auto.expired} expired` : "") + (auto.restarts ? ` · ${auto.restarts} restarts observed` : "") + (auto.saturated ? ` · ${auto.saturated} counters saturated` : "")) : null, autoRows.length ? (0, react.createElement)("div", { style: {
7260
7374
  overflowX: "auto",
7261
7375
  minWidth: 0
7262
7376
  } }, (0, react.createElement)("table", { style: {
7263
7377
  width: "100%",
7264
7378
  borderCollapse: "collapse",
7265
- textAlign: "left"
7379
+ textAlign: "left",
7380
+ font: "inherit"
7381
+ } }, (0, react.createElement)("caption", { style: {
7382
+ ...nativeCaptionStyle,
7383
+ textAlign: "left",
7384
+ marginBottom: 8
7385
+ } }, "Daily aggregates by matching policy, model and decision cohort"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
7386
+ "Date (UTC)",
7387
+ "Policy",
7388
+ "Model",
7389
+ "Cohort",
7390
+ "Opportunities",
7391
+ "Expected",
7392
+ "Selected",
7393
+ "No-fit"
7394
+ ].map((label) => (0, react.createElement)("th", {
7395
+ key: label,
7396
+ scope: "col",
7397
+ style: {
7398
+ padding: 6,
7399
+ font: "inherit",
7400
+ fontWeight: 500,
7401
+ textAlign: label === "Cohort" || label === "Model" ? "left" : "right"
7402
+ }
7403
+ }, label)))), (0, react.createElement)("tbody", null, ...autoRows.map((row) => (0, react.createElement)("tr", { key: row.key }, (0, react.createElement)("td", { style: {
7404
+ padding: 6,
7405
+ whiteSpace: "nowrap"
7406
+ } }, new Date(row.day).toISOString().slice(0, 10)), (0, react.createElement)("td", { style: {
7407
+ padding: 6,
7408
+ overflowWrap: "anywhere"
7409
+ } }, row.policy), (0, react.createElement)("td", { style: {
7410
+ padding: 6,
7411
+ overflowWrap: "anywhere"
7412
+ } }, row.model), (0, react.createElement)("td", { style: {
7413
+ padding: 6,
7414
+ minWidth: 220
7415
+ } }, row.cohort), (0, react.createElement)("td", { style: {
7416
+ padding: 6,
7417
+ textAlign: "right"
7418
+ } }, row.opportunities ?? "—"), (0, react.createElement)("td", { style: {
7419
+ padding: 6,
7420
+ textAlign: "right"
7421
+ } }, row.expected === null ? "—" : row.expected.toFixed(3)), (0, react.createElement)("td", { style: {
7422
+ padding: 6,
7423
+ textAlign: "right"
7424
+ } }, row.selected ?? "—"), (0, react.createElement)("td", { style: {
7425
+ padding: 6,
7426
+ textAlign: "right"
7427
+ } }, row.noFit ?? "—")))))) : null, auto?.status === "observed" && autoRows.length === 0 ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained strata in this snapshot; this does not mean there were no decisions.") : !auto ? (0, react.createElement)("p", { style: { margin: 0 } }, "Auto allocation aggregates are unavailable in this snapshot.") : view && auto.status !== "observed" && view.state !== "ready" ? (0, react.createElement)("p", { style: { margin: 0 } }, "Storage is not ready; retained Auto observation status is unknown.") : view && auto.status !== "observed" ? (0, react.createElement)("p", { style: { margin: 0 } }, "No retained observations yet.") : null, autoRows.length ? (0, react.createElement)("p", { style: {
7428
+ ...nativeCaptionStyle,
7429
+ margin: 0
7430
+ } }, `${autoOpportunities} candidate opportunities · ${autoExpected.toFixed(3)} expected selections · ${autoSelections} actual selections · ${autoNoFit} no-fit decisions. Compare expected and selected counts only within matching cohorts; these are not execution, quality or billing evidence.`) : null), view && populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("div", { style: {
7431
+ overflowX: "auto",
7432
+ minWidth: 0
7433
+ } }, (0, react.createElement)("table", { style: {
7434
+ width: "100%",
7435
+ borderCollapse: "collapse",
7436
+ textAlign: "left",
7437
+ font: "inherit"
7266
7438
  } }, (0, react.createElement)("caption", { style: {
7439
+ ...nativeCaptionStyle,
7267
7440
  textAlign: "left",
7268
7441
  marginBottom: 8
7269
- } }, "Retained observations · independent Client and Host populations"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
7442
+ } }, "Independent Client and Host populations"), (0, react.createElement)("thead", null, (0, react.createElement)("tr", null, ...[
7270
7443
  "Population",
7271
7444
  "Started",
7272
7445
  "Success",
@@ -7277,10 +7450,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7277
7450
  ].map((label) => (0, react.createElement)("th", {
7278
7451
  key: label,
7279
7452
  scope: "col",
7280
- style: { padding: 6 }
7453
+ style: {
7454
+ padding: 6,
7455
+ font: "inherit",
7456
+ fontWeight: 500
7457
+ }
7281
7458
  }, label)))), (0, react.createElement)("tbody", null, ...populations.map((population) => (0, react.createElement)("tr", { key: population }, (0, react.createElement)("th", {
7282
7459
  scope: "row",
7283
- style: { padding: 6 }
7460
+ style: {
7461
+ padding: 6,
7462
+ font: "inherit",
7463
+ fontWeight: 500
7464
+ }
7284
7465
  }, population), ...[
7285
7466
  "started",
7286
7467
  "success",
@@ -7296,11 +7477,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7296
7477
  "revoked",
7297
7478
  "environment-fault",
7298
7479
  "unknown"
7299
- ], population))))))) : null, view && !populations.length ? (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.") : null, view ? (0, react.createElement)("p", { style: {
7300
- margin: 0,
7301
- fontSize: 12,
7302
- lineHeight: "18px"
7303
- } }, `Host pending: ${view.snapshot.pending.reduce((sum, row) => sum + row.count, 0)}. Host dropped: ${view.snapshot.dropped}; Client dropped: ${view.snapshot.clientDropped}; Client unconfirmed: ${view.snapshot.clientUnconfirmed}; evicted/expired: ${view.snapshot.evicted}; saturated: ${view.snapshot.saturated}. Retention: 14 days, at most 4,096 aggregate rows and 2 MiB. Client pending samples are periodic observations, not a live outstanding count. Other settled includes policy rejection, revocation, environment faults and unknown/no-checkpoint results; JSON preserves each category. Stock/custom-engine physical summaries, native recovery opt-out, OAuth, quota and unwrapped RPCs are not covered.`) : null, view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Review aggregate-only JSON"), (0, react.createElement)("p", null, "Review before sharing. This includes build versions, hour windows and fixed diagnostic counts, never account or Session identifiers."), control("Prepare current JSON", () => setExported(true)), exported ? (0, react.createElement)("textarea", {
7480
+ ], population)))))))) : null, view && !populations.length ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Account and compaction observations"), (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.")) : null, (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Collection controls"), (0, react.createElement)("p", {
7481
+ role: "status",
7482
+ style: { margin: 0 }
7483
+ }, !remote ? "Diagnostics controls are unavailable in this connection." : !view ? busy ? "Reading local collection status…" : "Collection status is unknown." : `${view.enabled ? view.state === "ready" ? "Local collection enabled" : "Local collection configured on; storage not ready" : "Local collection paused"} · Storage ${view.state}` + (view.diagnostic === "none" ? "" : ` · ${view.diagnostic}`) + (view.dirty ? " · Not all observations are persisted yet" : "")), failed ? (0, react.createElement)("p", {
7484
+ role: "alert",
7485
+ style: { margin: 0 }
7486
+ }, "Could not confirm the operation. Read status before retrying; no write is automatically replayed.") : null, clientDiagnosticsReportingFailed() ? (0, react.createElement)("p", {
7487
+ role: "alert",
7488
+ style: { margin: 0 }
7489
+ }, "Some Client observations could not be confirmed. Client counts are incomplete; Host counts are separate.") : null, (0, react.createElement)("div", { style: {
7490
+ display: "flex",
7491
+ flexWrap: "wrap",
7492
+ gap: 8
7493
+ } }, control("Read status", () => {
7494
+ run((value) => value.get());
7495
+ }, !remote), control(view?.enabled ? "Pause collection" : "Enable local collection", () => {
7496
+ run((value) => value.setEnabled(!view?.enabled));
7497
+ }, !remote || !view || !view.enabled && view.state !== "ready"), control(view?.autoAllocationEnabled ? "Pause Auto allocation observation" : "Enable Auto allocation observation", () => {
7498
+ run((value) => value.setAutoAllocationEnabled(!view?.autoAllocationEnabled));
7499
+ }, !remote || !view || !view.autoAllocationEnabled && view.state !== "ready"), control("Clear local aggregates", () => setConfirmClear(true), !remote || !view || view.state !== "ready")), confirmClear ? (0, react.createElement)("div", {
7500
+ role: "group",
7501
+ "aria-label": "Confirm clearing local diagnostics"
7502
+ }, (0, react.createElement)("p", null, "Delete collected aggregates only? Both collection controls keep their current enabled/paused settings. This does not clear account settings or conversation history."), control("Confirm clear", () => {
7503
+ setConfirmClear(false);
7504
+ run((value) => value.clear());
7505
+ }), control("Cancel", () => setConfirmClear(false))) : null), view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Data scope, limits and JSON"), (0, react.createElement)("p", { style: { margin: 0 } }, "Observations stay in this profile for 14 days. Auto rows contain policy/model/cohort dimensions and aggregate counts only; no Session or turn IDs, conversation content, upload or automatic tuning. Expired counts are strata, not removed decisions."), (0, react.createElement)("p", { style: { margin: 0 } }, `Host pending: ${view.snapshot.pending.reduce((sum, row) => sum + row.count, 0)}. Host dropped: ${view.snapshot.dropped}; Client dropped: ${view.snapshot.clientDropped}; Client unconfirmed: ${view.snapshot.clientUnconfirmed}; evicted/expired: ${view.snapshot.evicted}; saturated: ${view.snapshot.saturated}. At most 4,096 aggregate rows and 2 MiB. Client pending samples are periodic observations, not a live outstanding count. Other settled includes policy rejection, revocation, environment faults and unknown/no-checkpoint results. Stock/custom-engine physical summaries, native recovery opt-out, OAuth, quota and unwrapped RPCs are not covered.`), (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Review aggregate-only JSON"), (0, react.createElement)("p", { style: { margin: 0 } }, "Review before sharing. This includes build versions, hour windows and fixed diagnostic counts, never account or Session identifiers."), control("Prepare current JSON", () => setExported(true)), exported ? (0, react.createElement)("textarea", {
7304
7506
  "aria-label": "Local diagnostics aggregate JSON",
7305
7507
  readOnly: true,
7306
7508
  value: JSON.stringify(view, null, 2),
@@ -7310,7 +7512,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7310
7512
  boxSizing: "border-box",
7311
7513
  font: "inherit"
7312
7514
  }
7313
- }) : null) : null);
7515
+ }) : null)) : null);
7314
7516
  }
7315
7517
  //#endregion
7316
7518
  //#region lib/types/reasoning-presentation.js