archctx-contracts 0.14.0 → 0.15.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "archcontext.capabilities/v1",
3
- "package": { "name": "archctx", "version": "0.14.0" },
3
+ "package": { "name": "archctx", "version": "0.15.0" },
4
4
  "protocols": {
5
5
  "projectionRequest": "archcontext.projection-request/v1",
6
6
  "projectionResult": "archcontext.projection-result/v3",
@@ -2,35 +2,35 @@
2
2
  "schemaVersion": "archcontext.product-version-manifest/v1",
3
3
  "product": {
4
4
  "name": "archctx",
5
- "version": "0.14.0",
5
+ "version": "0.15.0",
6
6
  "distribution": "one-package"
7
7
  },
8
- "packageManager": "bun@1.4.3",
8
+ "packageManager": "bun@1.4.4",
9
9
  "engines": {
10
10
  "node": ">=22.22 <26"
11
11
  },
12
12
  "surfaces": {
13
13
  "cli": {
14
14
  "packageName": "@archcontext/surfaces",
15
- "version": "0.14.0",
15
+ "version": "0.15.0",
16
16
  "entrypoint": "archctx"
17
17
  },
18
18
  "daemon": {
19
19
  "packageName": "@archcontext/local-runtime",
20
- "version": "0.14.0",
20
+ "version": "0.15.0",
21
21
  "entrypoint": "archctx daemon start",
22
22
  "rpcSchemaVersion": "archcontext.runtime-rpc/v2"
23
23
  },
24
24
  "mcp": {
25
25
  "packageName": "@archcontext/surfaces",
26
- "version": "0.14.0",
26
+ "version": "0.15.0",
27
27
  "entrypoint": "archctx mcp",
28
28
  "transport": "stdio"
29
29
  }
30
30
  },
31
31
  "schemas": {
32
32
  "schemaSetVersion": "2026-06-25.al0-ledger",
33
- "contractsPackageVersion": "0.14.0"
33
+ "contractsPackageVersion": "0.15.0"
34
34
  },
35
35
  "runtime": {
36
36
  "localRpc": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archctx-contracts",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/src/failure.ts CHANGED
@@ -34,21 +34,16 @@ export interface FailureEnvelope<C extends FailureCode = FailureCode> {
34
34
  type Policy = { code: FailureCode; message: string; fields?: readonly string[]; action?: string; facts?: Readonly<Record<string, string>>; native?: boolean; recovery?: boolean; journalRecovery?: boolean; retryable?: boolean };
35
35
  /** Closed repository diagnostics. Messages contain no process output or filesystem paths. */
36
36
  export const CODE_FACTS_ISSUE_MESSAGES = Object.freeze({
37
- "not-initialized": "CodeGraph repository status is not initialized",
38
37
  "version-mismatch": "CodeGraph repository status version mismatch",
39
38
  "project-path-mismatch": "CodeGraph repository project path mismatch",
40
39
  "index-incomplete": "CodeGraph repository index is not complete and compatible",
41
40
  "extraction-version-mismatch": "CodeGraph repository extraction version mismatch",
42
- "worktree-mismatch": "CodeGraph repository worktree mismatch",
43
41
  "pending-source-changes": "CodeGraph repository index has pending or unreported source changes"
44
42
  });
45
43
  /** Each reason has a closed fact vocabulary. No source text or recovery binding is a summary fact. */
46
44
  const policies: Record<string, Policy> = {
47
45
  "history-shallow-repository": { code: "AC_PRECONDITION_FAILED", message: "Architecture history requires a complete Git repository.", action: "unshallow-repository", facts: { historyReadReason: "optional:historyReadReason" } },
48
46
  "code-facts-read-not-ready": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "The existing CodeGraph index does not attest to the current source population.", facts: { issues: "codeFactsIssues" }, action: "codegraph-sync", retryable: false },
49
- "code-facts-snapshot-changed": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "Source or index inputs changed while reading the private snapshot.", action: "retry-read", retryable: true, facts: {} },
50
- "code-facts-snapshot-limit-exceeded": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "The private CodeGraph snapshot copy exceeds its 512 MiB or 100000 entry limit.", action: "reduce-snapshot-size", retryable: false, facts: { limit: "snapshotLimit", maxBytes: "uint", maxEntries: "uint", sourceBytes: "uint", sourceEntries: "uint", gitBytes: "uint", gitEntries: "uint", gitObjectEntries: "uint", indexBytes: "uint", indexEntries: "uint" } },
51
- "code-facts-snapshot-layout-unsupported": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "The repository layout cannot be safely isolated for a zero-write CodeGraph read.", action: "inspect-repository-layout", retryable: false, facts: {} },
52
47
  "daemon-root-missing": { code: "AC_RUNTIME_UNAVAILABLE", message: "The daemon start worktree no longer exists. Stop this daemon using its workspace state directory.", action: "stop-targeted-daemon", retryable: false, facts: {} },
53
48
  "changeset-receipt-journal-unavailable": { code: "AC_PRECONDITION_FAILED", message: "No committed ChangeSet journal exists for this repository and journal id.", action: "select-committed-journal" },
54
49
  "changeset-receipt-transition-unavailable": { code: "AC_PRECONDITION_FAILED", message: "This journal has no recorded model transition; a complete receipt cannot be exported.", action: "inspect-journal-evidence" },
@@ -64,6 +59,7 @@ const policies: Record<string, Policy> = {
64
59
  "architecture-model-ignored": { code: "AC_PRECONDITION_FAILED", action: "commit-architecture-model", message: "Git ignore rules exclude architecture model paths, so the model cannot be committed and a manifest digest cannot rebuild it. Remove or narrow the rule, commit the model, then retry adoption. The diagnostic command prints each deciding rule.", facts: { pathCount: "uint", paths: "optional:diagnosticPaths", commands: "optional:diagnosticCommands", omittedPathCount: "uint" } },
65
60
  "projection-footprint-uncovered": { code: "AC_PRECONDITION_FAILED", message: "Declared source footprints lack a projection target." },
66
61
  "index-missing": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "Required code facts have no available index. Run codegraph init." },
62
+ "index-open-failed": { code: "AC_CODE_FACTS_UNAVAILABLE", message: "The CodeGraph index exists but could not be opened and read read-only. Run archctx doctor --json.", action: "inspect-diagnostics", retryable: false },
67
63
  "code-facts-not-ready": { code: "AC_CODE_FACTS_NOT_READY", message: "Repository code facts are not ready. Run archctx doctor --json and follow the reported action.", facts: { issues: "codeFactsIssues" } },
68
64
  "checkpoint-input-invalid": { code: "AC_SCHEMA_INVALID", message: "Checkpoint arguments violate the declared input schema.", fields: ["issueCount"], action: "correct-command-arguments" },
69
65
  "cli-input-invalid": { code: "AC_SCHEMA_INVALID", message: "Command arguments violate the declared input contract.", action: "correct-command-arguments" },
@@ -393,7 +389,6 @@ const localEnums: Readonly<Record<string, readonly string[]>> = {
393
389
  depsField: ["from", "into", "importNodeLimit", "edgeLimit"],
394
390
  depsIssue: ["unknown-node", "invalid-limit", "missing-value"],
395
391
  snapshotField: ["repositoryId", "workspaceId", "headSha", "worktreeDigest"],
396
- snapshotLimit: ["bytes", "entries"],
397
392
  jobsField: ["workerId"],
398
393
  observedDomain: ["observed"],
399
394
  inputAvailability: ["unavailable"],
package/src/ports.ts CHANGED
@@ -95,24 +95,12 @@ export interface NormalizedCodeContext {
95
95
  digest: string;
96
96
  }
97
97
 
98
- export interface NormalizedImpact {
99
- symbolId: string;
100
- callers: NormalizedEdge[];
101
- callees: NormalizedEdge[];
102
- affectedPaths: string[];
103
- }
104
-
105
98
  export interface SymbolQuery {
106
99
  query: string;
107
100
  kinds?: string[];
108
101
  limit?: number;
109
102
  }
110
103
 
111
- export interface ImpactQuery {
112
- symbolId: string;
113
- depth: number;
114
- }
115
-
116
104
  export interface SourceSelector {
117
105
  path: string;
118
106
  symbolId?: string;
@@ -127,9 +115,6 @@ export interface CodeFactsPort {
127
115
  sync(input: { workspace: WorkspaceRef; changedPaths?: string[] }): Promise<CodeFactsSnapshot>;
128
116
  buildTaskContext(input: { task: string; maxSymbols: number; includeSource: boolean; changedPaths?: string[] }): Promise<NormalizedCodeContext>;
129
117
  findSymbols(query: SymbolQuery): Promise<NormalizedSymbol[]>;
130
- getImpact(input: ImpactQuery): Promise<NormalizedImpact>;
131
- getCallers(symbolId: string): Promise<NormalizedEdge[]>;
132
- getCallees(symbolId: string): Promise<NormalizedEdge[]>;
133
118
  resolveEvidence(selectors: SourceSelector[]): Promise<ObservedEvidence[]>;
134
119
  }
135
120
 
@@ -1,6 +1,6 @@
1
1
  export const ARCHCONTEXT_PRODUCT_NAME = "archctx";
2
- export const ARCHCONTEXT_PRODUCT_VERSION = "0.14.0";
3
- export const ARCHCONTEXT_PACKAGE_MANAGER = "bun@1.4.3";
2
+ export const ARCHCONTEXT_PRODUCT_VERSION = "0.15.0";
3
+ export const ARCHCONTEXT_PACKAGE_MANAGER = "bun@1.4.4";
4
4
  export const ARCHCONTEXT_NODE_RANGE = ">=22.22 <26";
5
5
  export const LOCAL_RUNTIME_RPC_SCHEMA_VERSION = "archcontext.runtime-rpc/v2";
6
6
  export const ARCHCONTEXT_SCHEMA_SET_VERSION = "2026-07-11.explorer-view-v2";
@@ -496,7 +496,11 @@ function versionNumber(value: unknown, family: string): number | undefined {
496
496
  return Number.isSafeInteger(version) ? version : undefined;
497
497
  }
498
498
 
499
- /** Pure engine compatibility; absent floors retain the v3 behavior. Future formats never rebaseline. */
499
+ /**
500
+ * Pure engine compatibility; absent floors retain the v3 behavior. Future formats never rebaseline.
501
+ * Floors require a current or superseded declared schema. A superseded manifest's floors are
502
+ * evaluated against this engine, as v4 floors are; they only decide whether this engine may replace it.
503
+ */
500
504
  export function architectureDocsProjectionCompatibilityIssues(value: unknown, engine: { rendererVersion: string; protocolVersion: string } = {
501
505
  rendererVersion: ARCHITECTURE_DOCS_RENDERER_VERSION, protocolVersion: PROJECTION_REQUEST_SCHEMA_VERSION
502
506
  }): string[] {
@@ -504,7 +508,10 @@ export function architectureDocsProjectionCompatibilityIssues(value: unknown, en
504
508
  if (!manifest) return [];
505
509
  const issues: string[] = [];
506
510
  if (["minimumRendererVersion", "minimumProtocolVersion"].some(key => Object.hasOwn(manifest, key))
507
- && manifest.schemaVersion !== ARCHITECTURE_DOCS_PROJECTION_MANIFEST_SCHEMA_VERSION) issues.push("projection manifest floors require the current schema");
511
+ && manifest.schemaVersion !== ARCHITECTURE_DOCS_PROJECTION_MANIFEST_SCHEMA_VERSION
512
+ && !(typeof manifest.schemaVersion === "string" && isSupersededArchitectureDocsProjectionManifestSchemaVersion(manifest.schemaVersion))) {
513
+ issues.push("projection manifest floors require a current or superseded schema");
514
+ }
508
515
  if (typeof manifest.schemaVersion === "string" && manifest.schemaVersion !== ARCHITECTURE_DOCS_PROJECTION_MANIFEST_SCHEMA_VERSION
509
516
  && !isSupersededArchitectureDocsProjectionManifestSchemaVersion(manifest.schemaVersion)) issues.push("projection manifest schema is unsupported by this engine");
510
517
  for (const [key, family, current] of [