my-frontend-observer 0.5.0 → 0.6.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 - 2026-08-19
4
+
5
+ Bounded Agent Context and Native my-dev-kit Ecosystem Integration.
6
+
7
+ - Bounded runtime projection (`src/domain/boundedAgentContext.ts`,
8
+ `boundedAgentContextProjection.ts#projectBoundedAgentContext`): a
9
+ task-relevant, bounded view of page/viewport identity, stable targets,
10
+ geometry, runtime behavior, relationships, before/after differences,
11
+ contract results, requested/expected-dependent/protected/preserved scope
12
+ (reusing the existing v0.5 `frontendContracts.ts` types directly), and
13
+ screenshot/artifact references - never a raw evidence dump.
14
+ - Explicit adequacy reporting (`adequate`/`partial`/`inadequate` with
15
+ structured reason codes) and omission/truncation records, distinguishing
16
+ required from optional loss.
17
+ - Explicit runtime/static correlation
18
+ (`boundedAgentContextCorrelation.ts#deriveRuntimeStaticCorrelations`/
19
+ `attachRuntimeStaticCorrelations`): `correlated`/`ambiguous`/`unavailable`
20
+ outcomes only - a stable runtime target identity never silently becomes a
21
+ source-ownership claim, and competing candidates remain visible.
22
+ - Deterministic logical identity (`boundedAgentContextIdentity.ts`) distinct
23
+ from fresh per-execution instance identity.
24
+ - Public export/correlation boundary only: `src/index.ts` exports the full
25
+ bounded-agent-context and correlation type/function surface as a
26
+ programmatic library contract (bounded-agent-context schema `1.0.0`) - no
27
+ new CLI command, no disk artifact writer/reader, no `my-dev-kit` runtime
28
+ dependency, no orchestrator/lab code in this repository.
29
+ - Observation schema remains `1.2.0`, comparison schema `1.0.0`, frontend
30
+ contract schema `1.0.0`, evaluation artifact schema `1.0.0` - no existing
31
+ schema was bumped.
32
+ - Cross-platform packed-candidate validation: one hash-verified npm
33
+ candidate tarball (`acd067247c447294a611f37f52eab301b6038ab1c6d493ae65e81c2f1279bfd7`)
34
+ proven on Windows, Linux, and macOS, including an installed-package smoke
35
+ of the new bounded-agent-context projection and runtime/static
36
+ correlation exports alongside every pre-existing v0.1-v0.5 packed
37
+ behavior.
38
+
3
39
  ## 0.5.0 - 2026-08-13
4
40
 
5
41
  Executable Frontend Contracts and Explicit Change Scope.
package/README.md CHANGED
@@ -6,8 +6,9 @@ in [docs/PROJECT_DESCRIPTION.md](docs/PROJECT_DESCRIPTION.md).
6
6
 
7
7
  ## Current status
8
8
 
9
- `v0.5.0`, Executable Frontend Contracts and Explicit Change Scope, is the
10
- current published release: `my-frontend-observer observe` launches a real,
9
+ `v0.6.0`, Bounded Agent Context and Native my-dev-kit Ecosystem Integration,
10
+ is the current published release. It builds on `v0.5.0`, Executable Frontend
11
+ Contracts and Explicit Change Scope: `my-frontend-observer observe` launches a real,
11
12
  sandboxed Chromium browser, enforces a loopback-only safety policy, captures
12
13
  a viewport screenshot plus bounded page/target evidence, and persists it as
13
14
  one portable `manifest.json` + `screenshot.png` artifact (observation schema
@@ -119,6 +120,18 @@ verdict; the verdict itself, and its persisted evidence, are unaffected. See
119
120
  [docs/COMMANDS.md](docs/COMMANDS.md) for the full flag reference and
120
121
  [docs/WORKFLOWS.md](docs/WORKFLOWS.md) for the end-to-end flow.
121
122
 
123
+ ### Bounded agent context (v0.6.0)
124
+
125
+ `src/domain/boundedAgentContext.ts`, `boundedAgentContextProjection.ts`,
126
+ `boundedAgentContextCorrelation.ts`, and `boundedAgentContextIdentity.ts`
127
+ ship a programmatic (library-only, no CLI command) bounded runtime
128
+ projection and an explicit runtime/static correlation boundary
129
+ (`correlated`/`ambiguous`/`unavailable`, never inferred source ownership),
130
+ exported from `src/index.ts` (bounded-agent-context schema `1.0.0`). See
131
+ [docs/CONTRACTS.md](docs/CONTRACTS.md) for the exact contract and
132
+ [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for how it fits the existing
133
+ pipeline.
134
+
122
135
  Validation:
123
136
 
124
137
  ```powershell
@@ -136,8 +149,8 @@ Planning authorities:
136
149
  intent and responsibility boundaries.
137
150
  - [Project Milestones](docs/PROJECT_MILESTONES.md): complete ordered capability
138
151
  design and cross-milestone rules.
139
- - [ROADMAP](docs/ROADMAP.md): version-level requirements; v0.1-v0.5 are
140
- released, v0.6 is next.
152
+ - [ROADMAP](docs/ROADMAP.md): version-level requirements; v0.1-v0.6 are
153
+ released, v0.7+ remain future.
141
154
  - [Current State](docs/CURRENT_STATE.md): retained scaffold and release state.
142
155
 
143
156
  No sibling ecosystem repository is a runtime dependency of the retained
@@ -0,0 +1,174 @@
1
+ /**
2
+ * v0.6 Batch 1: frozen contract foundation for a bounded, deterministic,
3
+ * referenceable agent-context artifact plus optional runtime/static
4
+ * correlation evidence.
5
+ *
6
+ * Independent artifact family from observation (`1.2.0`), comparison
7
+ * (`1.0.0`), frontend-contract (`1.0.0`), and frontend-contract-evaluation
8
+ * (`1.0.0`) - never reuses their `ARTIFACT_KIND`/schema constants. Follows
9
+ * the same producer/provenance/source-reference/structural-validator shape
10
+ * as `frontendContractEvaluationArtifact.ts`.
11
+ *
12
+ * This module is pure contract foundation: types, constants, and structural
13
+ * validators only. It contains no runtime-projection derivation, no
14
+ * my-dev-kit invocation, and no correlation-matching logic - those are v0.6
15
+ * Batch 2+ concerns.
16
+ */
17
+ import { type EvidenceReference } from './relationships.js';
18
+ import { PRODUCER_NAME } from './schema.js';
19
+ import type { ArtifactReference, TargetGeometry, TargetVisibility, OverflowEvidence, ScrollOwnerInterpretation } from './schema.js';
20
+ export declare const BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND: "my-frontend-observer/bounded-agent-context";
21
+ export declare const BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION: "1.0.0";
22
+ /**
23
+ * Batch 1 freezes exactly one projection profile. A profile discriminator is
24
+ * kept (rather than omitted) because it is required to fail closed on future
25
+ * unsupported profiles; no plugin/registry framework is introduced.
26
+ */
27
+ export declare const PROJECTION_PROFILES: readonly ["frontend-change-review"];
28
+ export type ProjectionProfile = (typeof PROJECTION_PROFILES)[number];
29
+ export declare const MAX_RUNTIME_TARGETS = 25;
30
+ export declare const MAX_RELATIONSHIP_EVIDENCE_PER_TARGET = 10;
31
+ export declare const MAX_OMISSIONS = 50;
32
+ export declare const MAX_TRUNCATIONS = 50;
33
+ export declare const MAX_CORRELATION_RECORDS = 25;
34
+ export declare const MAX_STATIC_CANDIDATES_PER_TARGET = 5;
35
+ export declare const MAX_TEXT_SUMMARY_CHARS = 2000;
36
+ /** Bounds StaticCandidateReference.evidenceRefs and RuntimeStaticCorrelationRecord.runtimeEvidenceRefs - reuses MAX_RELATIONSHIP_EVIDENCE_PER_TARGET's value so no nested collection in this contract is unbounded. */
37
+ export declare const MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD = 10;
38
+ export declare const ADEQUACY_STATES: readonly ["adequate", "partial", "inadequate"];
39
+ export type AdequacyState = (typeof ADEQUACY_STATES)[number];
40
+ export declare const ADEQUACY_REASON_CODES: readonly ["required-runtime-target-unavailable", "required-runtime-property-unavailable", "required-contract-evidence-unavailable", "required-evidence-omitted-by-bound", "static-correlation-ambiguous", "static-evidence-unavailable", "required-source-evidence-truncated", "unsupported-evidence-version", "consumer-incompatibility"];
41
+ export type AdequacyReasonCode = (typeof ADEQUACY_REASON_CODES)[number];
42
+ export interface AdequacyReason {
43
+ code: AdequacyReasonCode;
44
+ detail?: string;
45
+ }
46
+ /** `state` is never implied by evidence merely existing - it is always an explicit field. Non-`adequate` states require at least one reason. */
47
+ export interface Adequacy {
48
+ state: AdequacyState;
49
+ reasons: AdequacyReason[];
50
+ }
51
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
52
+ export declare function isValidAdequacy(value: unknown): value is Adequacy;
53
+ export declare const OMISSION_REASONS: readonly ["not-observed", "unsupported-or-unavailable", "intentionally-irrelevant", "omitted-by-bound", "required-evidence-lost-by-bound"];
54
+ export type OmissionReason = (typeof OMISSION_REASONS)[number];
55
+ /** `required: true` with reason `required-evidence-lost-by-bound` is the frozen representation of required-evidence loss (distinct from optional truncation). */
56
+ export interface OmissionRecord {
57
+ subject: string;
58
+ reason: OmissionReason;
59
+ required: boolean;
60
+ detail?: string;
61
+ }
62
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
63
+ export declare function isValidOmissionRecord(value: unknown): value is OmissionRecord;
64
+ /** A bounded collection or text field that exceeded its frozen cap. `required: true` marks loss of evidence the task needed; `required: false` marks optional truncation. */
65
+ export interface TruncationRecord {
66
+ subject: string;
67
+ limit: number;
68
+ actualCount: number;
69
+ required: boolean;
70
+ }
71
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
72
+ export declare function isValidTruncationRecord(value: unknown): value is TruncationRecord;
73
+ /** References existing v0.1-v0.5 authoritative artifacts by identity only; never embeds their payloads. */
74
+ export interface BoundedAgentContextSourceReferences {
75
+ observationIds: string[];
76
+ comparisonId?: string;
77
+ comparisonRequestId?: string;
78
+ baselineContractId?: string;
79
+ changeContractId?: string;
80
+ evaluationId?: string;
81
+ evaluationRequestId?: string;
82
+ }
83
+ /** Task-relevant bounded subset of one stable observer runtime target's evidence. Every field is optional - absence means "not included in this bounded projection", never a fabricated value. */
84
+ export interface BoundedRuntimeTargetProjection {
85
+ targetId: string;
86
+ geometry?: TargetGeometry;
87
+ visibility?: TargetVisibility;
88
+ overflow?: OverflowEvidence;
89
+ scrollOwner?: ScrollOwnerInterpretation;
90
+ relationshipEvidence?: EvidenceReference[];
91
+ screenshotRef?: ArtifactReference;
92
+ }
93
+ export declare const CORRELATION_STATUSES: readonly ["correlated", "ambiguous", "unavailable"];
94
+ export type CorrelationStatus = (typeof CORRELATION_STATUSES)[number];
95
+ /** Kinds of my-dev-kit stable static identity a candidate reference may carry. Observer never invents a third kind. */
96
+ export declare const STATIC_CANDIDATE_KINDS: readonly ["file", "symbol"];
97
+ export type StaticCandidateKind = (typeof STATIC_CANDIDATE_KINDS)[number];
98
+ /** Enough my-dev-kit producer/index identity to reason about compatibility without duplicating its structural schemas. */
99
+ export interface StaticEvidenceProducerIdentity {
100
+ name: string;
101
+ version: string;
102
+ indexId: string;
103
+ }
104
+ /**
105
+ * v0.6 Batch 3: exported (was previously module-private) so
106
+ * `boundedAgentContextCorrelation.ts` can reuse this structural validator
107
+ * instead of duplicating it. No change to its logic, signature, or the
108
+ * frozen `StaticEvidenceProducerIdentity` contract itself.
109
+ */
110
+ export declare function isValidStaticEvidenceProducerIdentity(value: unknown): value is StaticEvidenceProducerIdentity;
111
+ /** The exact my-dev-kit node id string is preserved verbatim - never normalized/rewritten into an observer-owned id. */
112
+ export interface StaticCandidateReference {
113
+ candidateId: string;
114
+ kind: StaticCandidateKind;
115
+ evidenceRefs: EvidenceReference[];
116
+ }
117
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
118
+ export declare function isValidStaticCandidateReference(value: unknown): value is StaticCandidateReference;
119
+ /**
120
+ * Evidence connecting one observer runtime target to zero, one, or several
121
+ * my-dev-kit static candidates. Deliberately has no `owner`, `causedBy`, or
122
+ * similarly strong-claim field - correlation is evidence, never edit
123
+ * authorization or proof of source ownership.
124
+ */
125
+ export interface RuntimeStaticCorrelationRecord {
126
+ runtimeTargetId: string;
127
+ runtimeEvidenceRefs: EvidenceReference[];
128
+ staticProducer: StaticEvidenceProducerIdentity;
129
+ status: CorrelationStatus;
130
+ candidates: StaticCandidateReference[];
131
+ evidenceBasis?: string;
132
+ omissions?: OmissionRecord[];
133
+ truncations?: TruncationRecord[];
134
+ provenance: {
135
+ correlatedAt: string;
136
+ };
137
+ }
138
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
139
+ export declare function isValidRuntimeStaticCorrelationRecord(value: unknown): value is RuntimeStaticCorrelationRecord;
140
+ export interface BoundedAgentContextArtifact {
141
+ artifactKind: typeof BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND;
142
+ schemaVersion: typeof BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION;
143
+ contextId: string;
144
+ contextRequestId: string;
145
+ producer: {
146
+ name: typeof PRODUCER_NAME;
147
+ version: string;
148
+ };
149
+ provenance: {
150
+ generatedAt: string;
151
+ };
152
+ projectionProfile: ProjectionProfile;
153
+ sources: BoundedAgentContextSourceReferences;
154
+ targets: BoundedRuntimeTargetProjection[];
155
+ adequacy: Adequacy;
156
+ omissions: OmissionRecord[];
157
+ truncations: TruncationRecord[];
158
+ /**
159
+ * Absent or empty means static correlation was not included for this
160
+ * context - an explicit, distinguishable state, never conflated with
161
+ * "correlation attempted and unavailable" (which is represented per-target
162
+ * via a `RuntimeStaticCorrelationRecord` with `status: 'unavailable'`).
163
+ * The artifact remains fully valid and independently usable with this
164
+ * field absent.
165
+ */
166
+ correlations?: RuntimeStaticCorrelationRecord[];
167
+ }
168
+ export type BoundedAgentContextValidationResult = {
169
+ valid: true;
170
+ } | {
171
+ valid: false;
172
+ reason: string;
173
+ };
174
+ export declare function isValidBoundedAgentContextArtifact(value: unknown): BoundedAgentContextValidationResult;
@@ -0,0 +1,312 @@
1
+ /**
2
+ * v0.6 Batch 1: frozen contract foundation for a bounded, deterministic,
3
+ * referenceable agent-context artifact plus optional runtime/static
4
+ * correlation evidence.
5
+ *
6
+ * Independent artifact family from observation (`1.2.0`), comparison
7
+ * (`1.0.0`), frontend-contract (`1.0.0`), and frontend-contract-evaluation
8
+ * (`1.0.0`) - never reuses their `ARTIFACT_KIND`/schema constants. Follows
9
+ * the same producer/provenance/source-reference/structural-validator shape
10
+ * as `frontendContractEvaluationArtifact.ts`.
11
+ *
12
+ * This module is pure contract foundation: types, constants, and structural
13
+ * validators only. It contains no runtime-projection derivation, no
14
+ * my-dev-kit invocation, and no correlation-matching logic - those are v0.6
15
+ * Batch 2+ concerns.
16
+ */
17
+ import { isValidEvidenceReference } from './relationships.js';
18
+ import { PRODUCER_NAME } from './schema.js';
19
+ function isPlainObject(value) {
20
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
21
+ }
22
+ function isNonEmptyString(value) {
23
+ return typeof value === 'string' && value.length > 0;
24
+ }
25
+ function isEvidenceReferenceArray(value) {
26
+ return Array.isArray(value) && value.every((entry) => isValidEvidenceReference(entry));
27
+ }
28
+ function isValidArtifactReference(value) {
29
+ return isPlainObject(value) && isNonEmptyString(value.path) && isNonEmptyString(value.kind);
30
+ }
31
+ export const BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND = 'my-frontend-observer/bounded-agent-context';
32
+ export const BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION = '1.0.0';
33
+ /**
34
+ * Batch 1 freezes exactly one projection profile. A profile discriminator is
35
+ * kept (rather than omitted) because it is required to fail closed on future
36
+ * unsupported profiles; no plugin/registry framework is introduced.
37
+ */
38
+ export const PROJECTION_PROFILES = ['frontend-change-review'];
39
+ function isValidProjectionProfile(value) {
40
+ return typeof value === 'string' && PROJECTION_PROFILES.includes(value);
41
+ }
42
+ // ---------------------------------------------------------------------------
43
+ // Numeric bounds (frozen first-version caps, judgment calls grounded in the
44
+ // existing ~10-named-target example count in docs/PROJECT_MILESTONES.md and
45
+ // the MAX_CONFIGURED_TARGETS_FOR_RELATIONSHIPS=20 precedent in
46
+ // relationships.ts; no measured fixture corpus exists yet for this concept)
47
+ // ---------------------------------------------------------------------------
48
+ export const MAX_RUNTIME_TARGETS = 25;
49
+ export const MAX_RELATIONSHIP_EVIDENCE_PER_TARGET = 10;
50
+ export const MAX_OMISSIONS = 50;
51
+ export const MAX_TRUNCATIONS = 50;
52
+ export const MAX_CORRELATION_RECORDS = 25;
53
+ export const MAX_STATIC_CANDIDATES_PER_TARGET = 5;
54
+ export const MAX_TEXT_SUMMARY_CHARS = 2000;
55
+ /** Bounds StaticCandidateReference.evidenceRefs and RuntimeStaticCorrelationRecord.runtimeEvidenceRefs - reuses MAX_RELATIONSHIP_EVIDENCE_PER_TARGET's value so no nested collection in this contract is unbounded. */
56
+ export const MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD = MAX_RELATIONSHIP_EVIDENCE_PER_TARGET;
57
+ // ---------------------------------------------------------------------------
58
+ // Adequacy (explicit, non-boolean, structured reasons)
59
+ // ---------------------------------------------------------------------------
60
+ export const ADEQUACY_STATES = ['adequate', 'partial', 'inadequate'];
61
+ export const ADEQUACY_REASON_CODES = [
62
+ 'required-runtime-target-unavailable',
63
+ 'required-runtime-property-unavailable',
64
+ 'required-contract-evidence-unavailable',
65
+ 'required-evidence-omitted-by-bound',
66
+ 'static-correlation-ambiguous',
67
+ 'static-evidence-unavailable',
68
+ 'required-source-evidence-truncated',
69
+ 'unsupported-evidence-version',
70
+ 'consumer-incompatibility',
71
+ ];
72
+ function isValidAdequacyReason(value) {
73
+ if (!isPlainObject(value))
74
+ return false;
75
+ if (typeof value.code !== 'string' || !ADEQUACY_REASON_CODES.includes(value.code))
76
+ return false;
77
+ if (value.detail !== undefined && typeof value.detail !== 'string')
78
+ return false;
79
+ return true;
80
+ }
81
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
82
+ export function isValidAdequacy(value) {
83
+ if (!isPlainObject(value))
84
+ return false;
85
+ if (typeof value.state !== 'string' || !ADEQUACY_STATES.includes(value.state))
86
+ return false;
87
+ if (!Array.isArray(value.reasons) || !value.reasons.every(isValidAdequacyReason))
88
+ return false;
89
+ if (value.state !== 'adequate' && value.reasons.length === 0)
90
+ return false;
91
+ return true;
92
+ }
93
+ // ---------------------------------------------------------------------------
94
+ // Omission / truncation (kept distinct; required loss visible)
95
+ // ---------------------------------------------------------------------------
96
+ export const OMISSION_REASONS = [
97
+ 'not-observed',
98
+ 'unsupported-or-unavailable',
99
+ 'intentionally-irrelevant',
100
+ 'omitted-by-bound',
101
+ 'required-evidence-lost-by-bound',
102
+ ];
103
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
104
+ export function isValidOmissionRecord(value) {
105
+ if (!isPlainObject(value))
106
+ return false;
107
+ if (!isNonEmptyString(value.subject))
108
+ return false;
109
+ if (typeof value.reason !== 'string' || !OMISSION_REASONS.includes(value.reason))
110
+ return false;
111
+ if (typeof value.required !== 'boolean')
112
+ return false;
113
+ if (value.detail !== undefined && typeof value.detail !== 'string')
114
+ return false;
115
+ return true;
116
+ }
117
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
118
+ export function isValidTruncationRecord(value) {
119
+ if (!isPlainObject(value))
120
+ return false;
121
+ if (!isNonEmptyString(value.subject))
122
+ return false;
123
+ if (typeof value.limit !== 'number' || !Number.isInteger(value.limit) || value.limit < 0)
124
+ return false;
125
+ if (typeof value.actualCount !== 'number' || !Number.isInteger(value.actualCount) || value.actualCount < 0)
126
+ return false;
127
+ if (typeof value.required !== 'boolean')
128
+ return false;
129
+ return true;
130
+ }
131
+ function isValidSourceReferences(value) {
132
+ if (!isPlainObject(value))
133
+ return false;
134
+ if (!Array.isArray(value.observationIds) || value.observationIds.length === 0 || !value.observationIds.every(isNonEmptyString))
135
+ return false;
136
+ const optionalStringFields = ['comparisonId', 'comparisonRequestId', 'baselineContractId', 'changeContractId', 'evaluationId', 'evaluationRequestId'];
137
+ for (const field of optionalStringFields) {
138
+ if (value[field] !== undefined && !isNonEmptyString(value[field]))
139
+ return false;
140
+ }
141
+ return true;
142
+ }
143
+ // ---------------------------------------------------------------------------
144
+ // Bounded runtime target projection (reuses existing schema value objects -
145
+ // no second runtime truth model)
146
+ // ---------------------------------------------------------------------------
147
+ function isValidTargetGeometry(value) {
148
+ if (!isPlainObject(value))
149
+ return false;
150
+ return ['x', 'y', 'width', 'height', 'right', 'bottom'].every((key) => typeof value[key] === 'number');
151
+ }
152
+ function isValidTargetVisibility(value) {
153
+ return isPlainObject(value) && typeof value.visible === 'boolean';
154
+ }
155
+ function isValidOverflowEvidence(value) {
156
+ if (!isPlainObject(value))
157
+ return false;
158
+ if (typeof value.horizontalOverflow !== 'boolean' || typeof value.verticalOverflow !== 'boolean')
159
+ return false;
160
+ return typeof value.overflowX === 'string' && typeof value.overflowY === 'string';
161
+ }
162
+ function isValidScrollOwnerInterpretation(value) {
163
+ if (!isPlainObject(value) || typeof value.kind !== 'string')
164
+ return false;
165
+ if (value.kind === 'target')
166
+ return isNonEmptyString(value.target);
167
+ return value.kind === 'document' || value.kind === 'none' || value.kind === 'indeterminate';
168
+ }
169
+ function isValidBoundedRuntimeTargetProjection(value) {
170
+ if (!isPlainObject(value))
171
+ return false;
172
+ if (!isNonEmptyString(value.targetId))
173
+ return false;
174
+ if (value.geometry !== undefined && !isValidTargetGeometry(value.geometry))
175
+ return false;
176
+ if (value.visibility !== undefined && !isValidTargetVisibility(value.visibility))
177
+ return false;
178
+ if (value.overflow !== undefined && !isValidOverflowEvidence(value.overflow))
179
+ return false;
180
+ if (value.scrollOwner !== undefined && !isValidScrollOwnerInterpretation(value.scrollOwner))
181
+ return false;
182
+ if (value.relationshipEvidence !== undefined) {
183
+ if (!isEvidenceReferenceArray(value.relationshipEvidence))
184
+ return false;
185
+ if (value.relationshipEvidence.length > MAX_RELATIONSHIP_EVIDENCE_PER_TARGET)
186
+ return false;
187
+ }
188
+ if (value.screenshotRef !== undefined && !isValidArtifactReference(value.screenshotRef))
189
+ return false;
190
+ return true;
191
+ }
192
+ // ---------------------------------------------------------------------------
193
+ // Runtime/static correlation (evidence, not ownership or edit authorization)
194
+ // ---------------------------------------------------------------------------
195
+ export const CORRELATION_STATUSES = ['correlated', 'ambiguous', 'unavailable'];
196
+ /** Kinds of my-dev-kit stable static identity a candidate reference may carry. Observer never invents a third kind. */
197
+ export const STATIC_CANDIDATE_KINDS = ['file', 'symbol'];
198
+ /**
199
+ * v0.6 Batch 3: exported (was previously module-private) so
200
+ * `boundedAgentContextCorrelation.ts` can reuse this structural validator
201
+ * instead of duplicating it. No change to its logic, signature, or the
202
+ * frozen `StaticEvidenceProducerIdentity` contract itself.
203
+ */
204
+ export function isValidStaticEvidenceProducerIdentity(value) {
205
+ if (!isPlainObject(value))
206
+ return false;
207
+ return isNonEmptyString(value.name) && isNonEmptyString(value.version) && isNonEmptyString(value.indexId);
208
+ }
209
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
210
+ export function isValidStaticCandidateReference(value) {
211
+ if (!isPlainObject(value))
212
+ return false;
213
+ if (!isNonEmptyString(value.candidateId))
214
+ return false;
215
+ if (typeof value.kind !== 'string' || !STATIC_CANDIDATE_KINDS.includes(value.kind))
216
+ return false;
217
+ // Best-effort my-dev-kit node-id-prefix consistency check (full node-id grammar validation is my-dev-kit's own responsibility, not this observer's).
218
+ if (value.kind === 'file' && !value.candidateId.startsWith('file:'))
219
+ return false;
220
+ if (value.kind === 'symbol' && !value.candidateId.startsWith('symbol:'))
221
+ return false;
222
+ if (!isEvidenceReferenceArray(value.evidenceRefs))
223
+ return false;
224
+ return value.evidenceRefs.length <= MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD;
225
+ }
226
+ /** v0.6 Batch 3: exported for reuse by `boundedAgentContextCorrelation.ts` (see note on `isValidStaticEvidenceProducerIdentity`). No logic change. */
227
+ export function isValidRuntimeStaticCorrelationRecord(value) {
228
+ if (!isPlainObject(value))
229
+ return false;
230
+ if (!isNonEmptyString(value.runtimeTargetId))
231
+ return false;
232
+ if (!isEvidenceReferenceArray(value.runtimeEvidenceRefs))
233
+ return false;
234
+ if (value.runtimeEvidenceRefs.length > MAX_EVIDENCE_REFS_PER_CORRELATION_FIELD)
235
+ return false;
236
+ if (!isValidStaticEvidenceProducerIdentity(value.staticProducer))
237
+ return false;
238
+ if (typeof value.status !== 'string' || !CORRELATION_STATUSES.includes(value.status))
239
+ return false;
240
+ if (!Array.isArray(value.candidates) || !value.candidates.every(isValidStaticCandidateReference))
241
+ return false;
242
+ if (value.candidates.length > MAX_STATIC_CANDIDATES_PER_TARGET)
243
+ return false;
244
+ // Status/candidate-count invariants: correlated=>exactly one, ambiguous=>at least two, unavailable=>none fabricated.
245
+ if (value.status === 'correlated' && value.candidates.length !== 1)
246
+ return false;
247
+ if (value.status === 'ambiguous' && value.candidates.length < 2)
248
+ return false;
249
+ if (value.status === 'unavailable' && value.candidates.length !== 0)
250
+ return false;
251
+ if (value.evidenceBasis !== undefined) {
252
+ if (typeof value.evidenceBasis !== 'string' || value.evidenceBasis.length > MAX_TEXT_SUMMARY_CHARS)
253
+ return false;
254
+ }
255
+ if (value.omissions !== undefined && !(Array.isArray(value.omissions) && value.omissions.every(isValidOmissionRecord)))
256
+ return false;
257
+ if (value.truncations !== undefined && !(Array.isArray(value.truncations) && value.truncations.every(isValidTruncationRecord)))
258
+ return false;
259
+ if (!isPlainObject(value.provenance) || !isNonEmptyString(value.provenance.correlatedAt))
260
+ return false;
261
+ return true;
262
+ }
263
+ export function isValidBoundedAgentContextArtifact(value) {
264
+ if (!isPlainObject(value))
265
+ return { valid: false, reason: 'artifact must be an object' };
266
+ if (value.artifactKind !== BOUNDED_AGENT_CONTEXT_ARTIFACT_KIND)
267
+ return { valid: false, reason: 'artifactKind mismatch' };
268
+ if (value.schemaVersion !== BOUNDED_AGENT_CONTEXT_SCHEMA_VERSION)
269
+ return { valid: false, reason: 'schemaVersion mismatch' };
270
+ if (!isNonEmptyString(value.contextId))
271
+ return { valid: false, reason: 'contextId must be a non-empty string' };
272
+ if (!isNonEmptyString(value.contextRequestId))
273
+ return { valid: false, reason: 'contextRequestId must be a non-empty string' };
274
+ if (!isPlainObject(value.producer) || value.producer.name !== PRODUCER_NAME || !isNonEmptyString(value.producer.version)) {
275
+ return { valid: false, reason: 'producer must be { name: "my-frontend-observer", version: string }' };
276
+ }
277
+ if (!isPlainObject(value.provenance) || !isNonEmptyString(value.provenance.generatedAt)) {
278
+ return { valid: false, reason: 'provenance.generatedAt must be a non-empty string' };
279
+ }
280
+ if (!isValidProjectionProfile(value.projectionProfile)) {
281
+ return { valid: false, reason: `projectionProfile must be one of: ${PROJECTION_PROFILES.join(', ')}` };
282
+ }
283
+ if (!isValidSourceReferences(value.sources))
284
+ return { valid: false, reason: 'sources reference is invalid' };
285
+ if (!Array.isArray(value.targets) || !value.targets.every(isValidBoundedRuntimeTargetProjection)) {
286
+ return { valid: false, reason: 'targets must be an array of valid bounded runtime target projections' };
287
+ }
288
+ if (value.targets.length > MAX_RUNTIME_TARGETS)
289
+ return { valid: false, reason: `targets exceeds the frozen limit of ${MAX_RUNTIME_TARGETS}` };
290
+ if (!isValidAdequacy(value.adequacy))
291
+ return { valid: false, reason: 'adequacy is invalid' };
292
+ if (!Array.isArray(value.omissions) || !value.omissions.every(isValidOmissionRecord)) {
293
+ return { valid: false, reason: 'omissions must be an array of valid omission records' };
294
+ }
295
+ if (value.omissions.length > MAX_OMISSIONS)
296
+ return { valid: false, reason: `omissions exceeds the frozen limit of ${MAX_OMISSIONS}` };
297
+ if (!Array.isArray(value.truncations) || !value.truncations.every(isValidTruncationRecord)) {
298
+ return { valid: false, reason: 'truncations must be an array of valid truncation records' };
299
+ }
300
+ if (value.truncations.length > MAX_TRUNCATIONS)
301
+ return { valid: false, reason: `truncations exceeds the frozen limit of ${MAX_TRUNCATIONS}` };
302
+ if (value.correlations !== undefined) {
303
+ if (!Array.isArray(value.correlations) || !value.correlations.every(isValidRuntimeStaticCorrelationRecord)) {
304
+ return { valid: false, reason: 'correlations must be an array of valid runtime/static correlation records' };
305
+ }
306
+ if (value.correlations.length > MAX_CORRELATION_RECORDS) {
307
+ return { valid: false, reason: `correlations exceeds the frozen limit of ${MAX_CORRELATION_RECORDS}` };
308
+ }
309
+ }
310
+ return { valid: true };
311
+ }
312
+ //# sourceMappingURL=boundedAgentContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundedAgentContext.js","sourceRoot":"","sources":["../../src/domain/boundedAgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,wBAAwB,EAA0B,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,OAAO,aAAa,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,4CAAqD,CAAC;AACzG,MAAM,CAAC,MAAM,oCAAoC,GAAG,OAAgB,CAAC;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,wBAAwB,CAAU,CAAC;AAGvE,SAAS,wBAAwB,CAAC,KAAc;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,mBAAyC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACjG,CAAC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