create-principles-disciple 1.147.14 → 1.147.17
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/_release/product-identity.json +2 -2
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/models/ActivationsConsoleModel.js +9 -3
- package/console/dist/server/models/ApprovalsConsoleModel.js +35 -6
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +42 -2
- package/console/dist/shared/prompt-injection-contract.d.ts +31 -4
- package/console/dist/web/assets/app.css +4 -0
- package/console/dist/web/assets/app.js +25 -25
- package/core/dist/runtime/activation/index.d.ts +1 -1
- package/core/dist/runtime/activation/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/index.js +4 -1
- package/core/dist/runtime/activation/index.js.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +20 -0
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js +86 -27
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-contract.js +6 -1
- package/core/dist/runtime/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js +0 -8
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/core/dist/runtime/index.d.ts +3 -3
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +4 -2
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/types/event-types.d.ts +62 -3
- package/core/dist/runtime/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime/types/event-types.js +43 -0
- package/core/dist/runtime/types/event-types.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/mvp-config.d.ts +4 -0
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +4 -0
- package/dist/mvp-config.js.map +1 -1
- package/host-runtime/dist/active-principle-prompt.d.ts +111 -2
- package/host-runtime/dist/active-principle-prompt.js +168 -41
- package/host-runtime/dist/adaptive-principle-revalidation.js +1 -1
- package/host-runtime/dist/index.d.ts +10 -0
- package/host-runtime/dist/index.js +31 -13
- package/host-runtime/dist/product-telemetry/consent-store.d.ts +112 -14
- package/host-runtime/dist/product-telemetry/consent-store.js +343 -132
- package/host-runtime/dist/product-telemetry/control-state-lock.d.ts +99 -0
- package/host-runtime/dist/product-telemetry/control-state-lock.js +320 -0
- package/host-runtime/dist/product-telemetry/service.d.ts +26 -9
- package/host-runtime/dist/product-telemetry/service.js +90 -150
- package/host-runtime/dist/prompt-activation-deliverability.d.ts +25 -15
- package/host-runtime/dist/prompt-activation-deliverability.js +60 -30
- package/host-runtime/dist/prompt-injection-projection.d.ts +105 -48
- package/host-runtime/dist/prompt-injection-projection.js +190 -212
- package/host-runtime/dist/prompt-injection-status.js +16 -7
- package/host-runtime/dist/signal-stage2-cycle.js +8 -1
- package/host-runtime/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +4 -0
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/telemetry.d.ts.map +1 -1
- package/pd-cli/dist/commands/telemetry.js +3 -1
- package/pd-cli/dist/commands/telemetry.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +487 -490
- package/plugin/dist/core/event-log.d.ts +8 -1
- package/plugin/dist/core/signal-collector-host.d.ts +27 -7
- package/plugin/dist/governance-audit.js +2 -2
- package/plugin/dist/hooks/llm-input-presence.d.ts +42 -0
- package/plugin/dist/hooks/prompt-presence-expectations.d.ts +74 -0
- package/plugin/dist/hooks/prompt-presence-lite.d.ts +53 -0
- package/plugin/dist/hooks/prompt-presence-measure.d.mts +1 -0
- package/plugin/dist/hooks/prompt-presence-registry.d.ts +150 -0
- package/plugin/dist/hooks/prompt.d.ts +40 -0
- package/plugin/dist/host-runtime/openclaw-host-runtime.d.ts +24 -1
- package/plugin/dist/index.d.ts +16 -9
- package/plugin/dist/openclaw-sdk.d.ts +33 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/types/event-types.d.ts +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/dist/mvp-config.js +4 -0
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/codex-adapter",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SqliteConnection, SqliteActivationStateStore, SqlitePIArtifactStore, extractPrincipleId, extractEvidenceRefs, PromotionReadinessReader, RuleHostWriter, createProductionGateDeps, SqliteActivationSafetyStore, isFeatureEnabled, RuleCodeOwnerDecisionService, collectOpenClawPromotionChecks, summarizeRuleCodeShadowEvents, buildPromotionEvidenceSnapshot, createRuntimeStateHandle, PrincipleTreeLedgerAdapter, previewApprovedRuleRevision, reviseApprovedRuleOnce, } from '@principles/core/runtime';
|
|
2
|
-
import { resolvePromotionHostLiveness, resolveWorkspaceHostToolSemantics, readPromptActivationInjectionStatuses, operatorDeclaredBudgetResolution, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, RUNTIME_EVENT_LOG_CANDIDATE_DIRS } from '@principles/host-runtime';
|
|
2
|
+
import { resolvePromotionHostLiveness, resolveWorkspaceHostToolSemantics, readPromptActivationInjectionStatuses, operatorDeclaredBudgetResolution, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, productionRouteRotationState, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, RUNTIME_EVENT_LOG_CANDIDATE_DIRS } from '@principles/host-runtime';
|
|
3
3
|
import { PROMPT_BUDGET_HOST_KINDS } from '@principles/core/runtime';
|
|
4
4
|
import { loadPdConfig, computeFlagsFromLoadResult } from '../config/pd-config-store.js';
|
|
5
5
|
import { errorMessage } from '../utils/response.js';
|
|
@@ -399,7 +399,14 @@ export class ActivationsConsoleModel {
|
|
|
399
399
|
status: report.route.status,
|
|
400
400
|
...(report.route.hostKind !== undefined ? { hostKind: report.route.hostKind } : {}),
|
|
401
401
|
...(report.route.route !== undefined ? { route: report.route.route } : {}),
|
|
402
|
-
|
|
402
|
+
// PRI-1137: rotation truth of the ONE shared route is a route
|
|
403
|
+
// fact, not a per-row re-derivation. Final review P1-1: three
|
|
404
|
+
// states — an unbound multi-host workspace stays `unknown`, it is
|
|
405
|
+
// never flattened into "all hosts are FIFO".
|
|
406
|
+
productionRotation: productionRouteRotationState({
|
|
407
|
+
workspaceDir: this.workspaceDir,
|
|
408
|
+
...(targetHost !== undefined ? { targetHost } : {}),
|
|
409
|
+
}).state,
|
|
403
410
|
...(report.route.unconfirmedReason !== undefined ? { unconfirmedReason: report.route.unconfirmedReason } : {}),
|
|
404
411
|
...(report.route.nextAction !== undefined ? { nextAction: report.route.nextAction } : {}),
|
|
405
412
|
...(report.globalReason !== undefined ? { globalReason: report.globalReason } : {}),
|
|
@@ -434,7 +441,6 @@ export class ActivationsConsoleModel {
|
|
|
434
441
|
const message = errorMessage(err);
|
|
435
442
|
promptInjectionRoute = {
|
|
436
443
|
status: 'unconfirmed',
|
|
437
|
-
flagEnabled: false,
|
|
438
444
|
unconfirmedReason: `injection_status_reader_failed: ${message}`,
|
|
439
445
|
nextAction: 'check workspace .pd/state.db readability and the host declarations',
|
|
440
446
|
};
|
|
@@ -336,6 +336,11 @@ export class ApprovalsConsoleModel {
|
|
|
336
336
|
workspaceDir: this.workspaceDir,
|
|
337
337
|
artifactId,
|
|
338
338
|
targetHost,
|
|
339
|
+
// PRI-1137 final review P2: this precheck measures the artifact THIS
|
|
340
|
+
// owner decision is about to stamp `authority="owner"` on — billing
|
|
341
|
+
// the pre-approval default (system_policy) overstated the entry by
|
|
342
|
+
// the attribute delta and could refuse a borderline-fitting entry.
|
|
343
|
+
authority: 'owner',
|
|
339
344
|
});
|
|
340
345
|
}
|
|
341
346
|
catch (error) {
|
|
@@ -478,23 +483,47 @@ export class ApprovalsConsoleModel {
|
|
|
478
483
|
// PR-1894: fair rotation is the live plugin-local policy (PRI-904). An
|
|
479
484
|
// activation that SOME round does inject is rotated out of the current
|
|
480
485
|
// window, not starved — report that bounded fact instead of the old FIFO
|
|
481
|
-
// starvation claim.
|
|
482
|
-
//
|
|
483
|
-
|
|
486
|
+
// starvation claim. Final review P1-1: the decision branches on the
|
|
487
|
+
// THREE-STATE production rotation — an unbound multi-host workspace is
|
|
488
|
+
// 'unknown', which must never be read as "all hosts are FIFO" (P1-4).
|
|
489
|
+
const rotation = projection.productionRotation;
|
|
490
|
+
if (rotation.state === 'rotates' && projection.eventuallyInjectedActivationIds.includes(activationId)) {
|
|
484
491
|
const window = projection.eligibleCount;
|
|
485
|
-
return `injection_budget_queued: the activation is committed but sits outside the CURRENT prompt injection window (${projection.budget}c; ${projection.injectedActivationIds.length} of ${window} eligible activations injected this round; production selection policy fair_rotation_v1).${budgetBasisNote} Fair rotation advances the window by one position per
|
|
492
|
+
return `injection_budget_queued: the activation is committed but sits outside the CURRENT prompt injection window (${projection.budget}c; ${projection.injectedActivationIds.length} of ${window} eligible activations injected this round; production selection policy fair_rotation_v1).${budgetBasisNote} Fair rotation advances the window by one position per RECORDED user turn, so while the session's user-turn records keep succeeding this principle will enter agent behavior within at most ${window} consecutive user turns — a round that degrades to FIFO (missing sessionId / failed user_turns write / unreadable ordinal) does not advance the window, and deactivating older principles is NOT required. nextAction=none; verify presence via the activations page or the prompt injection telemetry`;
|
|
493
|
+
}
|
|
494
|
+
if (rotation.state === 'unknown') {
|
|
495
|
+
// Final review P1-4: no single host is bound, so NO single
|
|
496
|
+
// queue-vs-starved conclusion exists. Report the per-host judgments
|
|
497
|
+
// (each entry ran under ITS OWN budget basis) instead of a blended
|
|
498
|
+
// permanent-queue claim. The entry format avoids "word: " after "; "
|
|
499
|
+
// so the UI warning splitter never cuts mid-message.
|
|
500
|
+
const perHostNotes = (resolution.perHost ?? []).map((entry) => {
|
|
501
|
+
const p = entry.projection;
|
|
502
|
+
const reach = p.productionRotation.state === 'rotates'
|
|
503
|
+
? (p.eventuallyInjectedActivationIds.includes(activationId)
|
|
504
|
+
? `queued behind fair_rotation_v1 and enters within at most ${p.eligibleCount} recorded user turns`
|
|
505
|
+
: 'not reachable in any rotation round (its own entry exceeds the budget)')
|
|
506
|
+
: p.productionRotation.state === 'does_not_rotate'
|
|
507
|
+
? 'FIFO by activated_at — stays out until capacity frees up'
|
|
508
|
+
: 'rotation not attributable';
|
|
509
|
+
return `${entry.hostKind}=${reach} (${p.usedChars}c/${p.budget}c ${describeBudgetBasis(entry.hostKind, budgetFacts, declaredBudgetByHost.get(entry.hostKind))})`;
|
|
510
|
+
}).join('; ');
|
|
511
|
+
const unknownCause = rotation.reason === 'host_facts_unreadable'
|
|
512
|
+
? 'workspace host facts are unreadable'
|
|
513
|
+
: 'this workspace binds no single host';
|
|
514
|
+
return `injection_budget_rotation_unknown: the activation is committed but the prompt injection budget (${projection.budget}c) is full and ${unknownCause}, so a single queue-vs-starved conclusion cannot be drawn for the whole workspace. per-host judgment: ${perHostNotes}. nextAction=pass an explicit target host (openclaw|codex|workbuddy) for a binding verdict, or review the per-host capacity details on the focus page`;
|
|
486
515
|
}
|
|
487
516
|
// PR-1894: report the PRODUCTION policy, not the policy this forecast
|
|
488
517
|
// happened to run. The console holds no session round key, so its own
|
|
489
518
|
// projection is always `legacy_fifo_prefix_v1` even on a route where
|
|
490
519
|
// production rotates — labelling that value "the current production
|
|
491
520
|
// selection policy" would reintroduce exactly the lie this fix removes.
|
|
492
|
-
const policyNote =
|
|
521
|
+
const policyNote = rotation.state === 'rotates'
|
|
493
522
|
? 'production selection policy fair_rotation_v1'
|
|
494
523
|
: 'production selection policy legacy_fifo_prefix_v1 (FIFO by activated_at)';
|
|
495
524
|
// On a rotating route the only unreachable entries are oversized ones, so
|
|
496
525
|
// say WHY rather than implying a positional problem that rotation solves.
|
|
497
|
-
const unreachableNote =
|
|
526
|
+
const unreachableNote = rotation.state === 'rotates'
|
|
498
527
|
? ' (this forecast ran without a round key, so the window shown is the legacy FIFO prefix; the entry is unreachable because it exceeds the budget on its own, not because of its position)'
|
|
499
528
|
: '';
|
|
500
529
|
return `injection_budget_excluded: the activation is committed but the prompt injection budget (${projection.budget}c) is full and this activation is not reachable under the ${policyNote}; ${projection.injectedActivationIds.length}/${projection.eligibleCount} eligible injected${unreachableNote}.${budgetBasisNote} This principle will NOT enter agent behavior until capacity frees up. nextAction=review the activations page and deactivate superseded principles`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SqliteConnection, SqliteApprovalQueueStore, SqlitePIArtifactStore, ApprovalQueue, RUNTIME_PRINCIPLE_BUDGET, detectPromptReplacementTarget, computeArtifactDigest, SqliteActivationStateStore, } from '@principles/core/runtime';
|
|
2
|
-
import { checkPromptArtifactDeliverability, operatorDeclaredBudgetResolution, resolveLivePromptInjectionProjection, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, } from '@principles/host-runtime';
|
|
2
|
+
import { checkPromptArtifactDeliverability, hostRotationCapability, operatorDeclaredBudgetResolution, resolveLivePromptInjectionProjection, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, } from '@principles/host-runtime';
|
|
3
3
|
import { PROMPT_BUDGET_HOST_KINDS } from '@principles/core/runtime';
|
|
4
4
|
import { loadLedger } from '@principles/core/principle-tree-ledger';
|
|
5
5
|
import { loadPdConfig } from '../config/pd-config-store.js';
|
|
@@ -458,6 +458,10 @@ export class ApprovalsGroupedConsoleModel {
|
|
|
458
458
|
usedChars: entry.projection.usedChars,
|
|
459
459
|
truncated: entry.projection.truncated,
|
|
460
460
|
budget: entry.projection.budget,
|
|
461
|
+
// Final review P1-3: THIS host's own rotation state (static
|
|
462
|
+
// host capability) — an unbound workspace shows per-host
|
|
463
|
+
// behavior instead of one blended aggregate.
|
|
464
|
+
rotation: hostRotationCapability(entry.hostKind).state,
|
|
461
465
|
...(entry.projection.budgetCapacitySource !== undefined ? { budgetCapacitySource: entry.projection.budgetCapacitySource } : {}),
|
|
462
466
|
...(entry.projection.budgetCapacityStatus !== undefined ? { budgetCapacityStatus: entry.projection.budgetCapacityStatus } : {}),
|
|
463
467
|
...(observation !== undefined ? { budgetObservedAt: observation.observedAt } : {}),
|
|
@@ -488,7 +492,9 @@ export class ApprovalsGroupedConsoleModel {
|
|
|
488
492
|
truncated: projection.truncated,
|
|
489
493
|
// PR-1894: the badge must describe what the PRODUCTION route will do,
|
|
490
494
|
// not which policy this session-less forecast happened to run.
|
|
491
|
-
|
|
495
|
+
// Final review P1-1: three-state — unbound workspaces carry
|
|
496
|
+
// 'unknown', never a flattened "all hosts are FIFO".
|
|
497
|
+
productionRotation: projection.productionRotation.state,
|
|
492
498
|
eligibleCount: projection.eligibleCount,
|
|
493
499
|
capacityStatus: 'confirmed',
|
|
494
500
|
...(resolution.decision.hostKind !== undefined ? { hostKind: resolution.decision.hostKind } : {}),
|
|
@@ -511,6 +517,40 @@ export class ApprovalsGroupedConsoleModel {
|
|
|
511
517
|
// runtime's last budget was not used.
|
|
512
518
|
...(staleObservation !== undefined ? { budgetFallbackReason: RUNTIME_BUDGET_OBSERVATION_STALE_REASON } : {}),
|
|
513
519
|
...(usedObservation !== undefined ? { budgetObservedAt: usedObservation.observedAt } : {}),
|
|
520
|
+
// PRI-1137: with ONE shared route, a workspace binding no single
|
|
521
|
+
// host still carries per-host budget facts. The headline is the
|
|
522
|
+
// route-confirmed reference view; each host keeps its OWN basis
|
|
523
|
+
// (observation / declaration / honest fallback) so attribution
|
|
524
|
+
// survives the route unification.
|
|
525
|
+
...(resolution.perHost !== undefined
|
|
526
|
+
? {
|
|
527
|
+
perHost: resolution.perHost.map((entry) => {
|
|
528
|
+
const observation = facts.perHost.get(entry.hostKind);
|
|
529
|
+
const declaredUsed = observation === undefined && declaredHosts.has(entry.hostKind);
|
|
530
|
+
const stale = observation === undefined && !declaredUsed
|
|
531
|
+
? facts.stalePerHost.get(entry.hostKind)
|
|
532
|
+
: undefined;
|
|
533
|
+
return {
|
|
534
|
+
hostKind: entry.hostKind,
|
|
535
|
+
route: entry.projection.route,
|
|
536
|
+
usedChars: entry.projection.usedChars,
|
|
537
|
+
truncated: entry.projection.truncated,
|
|
538
|
+
budget: entry.projection.budget,
|
|
539
|
+
// Final review P1-3: per-host rotation state, same meaning
|
|
540
|
+
// as the unconfirmed branch — a static host capability.
|
|
541
|
+
rotation: hostRotationCapability(entry.hostKind).state,
|
|
542
|
+
...(entry.projection.budgetCapacitySource !== undefined ? { budgetCapacitySource: entry.projection.budgetCapacitySource } : {}),
|
|
543
|
+
...(entry.projection.budgetCapacityStatus !== undefined ? { budgetCapacityStatus: entry.projection.budgetCapacityStatus } : {}),
|
|
544
|
+
...(observation !== undefined ? { budgetObservedAt: observation.observedAt } : {}),
|
|
545
|
+
...(stale !== undefined
|
|
546
|
+
? { budgetFallbackReason: RUNTIME_BUDGET_OBSERVATION_STALE_REASON }
|
|
547
|
+
: entry.projection.budgetFallbackReason !== undefined
|
|
548
|
+
? { budgetFallbackReason: entry.projection.budgetFallbackReason }
|
|
549
|
+
: {}),
|
|
550
|
+
};
|
|
551
|
+
}),
|
|
552
|
+
}
|
|
553
|
+
: {}),
|
|
514
554
|
},
|
|
515
555
|
};
|
|
516
556
|
}
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
export type PromptInjectionTargetHostName = 'openclaw' | 'codex' | 'workbuddy';
|
|
16
16
|
export type PromptInjectionRouteName = 'legacy_trim' | 'shared_render';
|
|
17
17
|
export type PromptInjectionBudgetScopeName = 'selected_lines' | 'full_directive_context';
|
|
18
|
+
/**
|
|
19
|
+
* PRI-1137 final review (P1-1): THREE-STATE rotation truth of the ONE shared
|
|
20
|
+
* production route. `'rotates'` = a bound OpenClaw (trusted round authority);
|
|
21
|
+
* `'does_not_rotate'` = a bound FIFO host (Codex/WorkBuddy inject by their own
|
|
22
|
+
* FIFO policy); `'unknown'` = no single host is bound (multi-host or
|
|
23
|
+
* never-operated workspace), so rotation cannot be attributed. Absent behaves
|
|
24
|
+
* as `'unknown'` — NEVER as FIFO: the pre-fix boolean flattened the unknown
|
|
25
|
+
* case into "all hosts are FIFO" and produced wrong permanent-queue warnings.
|
|
26
|
+
*/
|
|
27
|
+
export type PromptProductionRotationName = 'rotates' | 'does_not_rotate' | 'unknown';
|
|
18
28
|
export type PromptBudgetCapacitySourceWire = 'operator_declared' | 'host_effective_window' | 'pi_catalog_exact' | 'pi_catalog_model_id' | 'legacy_fallback';
|
|
19
29
|
export type PromptBudgetCapacityStatusWire = 'confirmed' | 'unknown';
|
|
20
30
|
/**
|
|
@@ -52,6 +62,14 @@ export interface PromptInjectionPerHostForecast {
|
|
|
52
62
|
* missing capacity is never attributed to another host.
|
|
53
63
|
*/
|
|
54
64
|
budgetFallbackReason?: PromptBudgetFallbackReasonWire;
|
|
65
|
+
/**
|
|
66
|
+
* PRI-1137 final review (P1-3): THIS host's own rotation state — a static
|
|
67
|
+
* host capability (OpenClaw rotates via its round authority; Codex/
|
|
68
|
+
* WorkBuddy are FIFO). Per-host so an unbound workspace can show each
|
|
69
|
+
* host's behavior instead of one blended (wrong) aggregate. Absent behaves
|
|
70
|
+
* as `'unknown'`.
|
|
71
|
+
*/
|
|
72
|
+
rotation?: Exclude<PromptProductionRotationName, 'unknown'>;
|
|
55
73
|
}
|
|
56
74
|
/**
|
|
57
75
|
* PD_PROMPT_CAPACITY_V1 R-A3: per-live-prompt-activation injection status on
|
|
@@ -87,7 +105,7 @@ export interface PromptInjectionRouteSummaryWire {
|
|
|
87
105
|
status: 'confirmed' | 'unconfirmed';
|
|
88
106
|
hostKind?: PromptInjectionTargetHostName;
|
|
89
107
|
route?: PromptInjectionRouteName;
|
|
90
|
-
|
|
108
|
+
/** PRI-1137: no flag participates in route selection — the field is retired. */
|
|
91
109
|
unconfirmedReason?: string;
|
|
92
110
|
nextAction?: string;
|
|
93
111
|
/** Present when no status could be computed at all (fail-loud degradation). */
|
|
@@ -105,6 +123,13 @@ export interface PromptInjectionRouteSummaryWire {
|
|
|
105
123
|
budgetContextWindowTokens?: number;
|
|
106
124
|
/** Present only when the rows were measured under the fixed fallback. */
|
|
107
125
|
budgetFallbackReason?: PromptBudgetFallbackReasonWire;
|
|
126
|
+
/**
|
|
127
|
+
* PRI-1137: rotation truth of the ONE shared production route for this
|
|
128
|
+
* workspace. Final review P1-1: three-state (`PromptProductionRotationName`)
|
|
129
|
+
* — only a BOUND host resolves it; an unbound multi-host workspace stays
|
|
130
|
+
* `'unknown'`. Console copy must use this instead of a per-route/flag check.
|
|
131
|
+
*/
|
|
132
|
+
productionRotation?: PromptProductionRotationName;
|
|
108
133
|
}
|
|
109
134
|
export interface PromptInjectionBudgetStatus {
|
|
110
135
|
/** Hard char cap of the prompt injection surface (e.g. 2000). */
|
|
@@ -122,10 +147,12 @@ export interface PromptInjectionBudgetStatus {
|
|
|
122
147
|
* PR-1894: whether the PRODUCTION route rotates. This — not the forecast's
|
|
123
148
|
* own selection policy — decides whether an out-of-window approval is queued
|
|
124
149
|
* behind rotation or genuinely starved, and therefore which badge copy is
|
|
125
|
-
* truthful.
|
|
126
|
-
*
|
|
150
|
+
* truthful. Final review P1-1: three-state — an unbound multi-host
|
|
151
|
+
* workspace is `'unknown'`, never flattened into FIFO. Optional so a
|
|
152
|
+
* pre-P1-1 payload still validates; absent behaves as `'unknown'` (the
|
|
153
|
+
* conservative no-single-conclusion reading).
|
|
127
154
|
*/
|
|
128
|
-
|
|
155
|
+
productionRotation?: PromptProductionRotationName;
|
|
129
156
|
/** PR-1894: eligible activations that reached the selector. */
|
|
130
157
|
eligibleCount?: number;
|
|
131
158
|
/**
|
|
@@ -2374,6 +2374,10 @@
|
|
|
2374
2374
|
.italic {
|
|
2375
2375
|
font-style: italic;
|
|
2376
2376
|
}
|
|
2377
|
+
.ordinal {
|
|
2378
|
+
--tw-ordinal: ordinal;
|
|
2379
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
2380
|
+
}
|
|
2377
2381
|
.tabular-nums {
|
|
2378
2382
|
--tw-numeric-spacing: tabular-nums;
|
|
2379
2383
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|