@foss.global/interfaces 0.11.1 → 0.13.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,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-09-05 - 0.13.0
4
+
5
+ ### Features
6
+
7
+ - add issue observation contract (forgeinventory)
8
+ - Add IForgeInventoryIssue for provider issue identity, repository-local numbers, metadata, author identity and timestamps.
9
+ - Document issue inventory semantics and add type-level round-trip contract coverage.
10
+
11
+ ## 2026-09-04 - 0.12.0
12
+
13
+ ### Features
14
+
15
+ - add forge inventory DTO contracts (forgeinventory)
16
+ - Introduce typed forge inventory instances, identities, scopes, pages, collections, reports, namespaces, and repositories.
17
+ - Export the new forge inventory contracts through the data module.
18
+ - Document inventory semantics and add fixtures for identity precision, visibility, pagination, incomplete scans, and collection coverage.
19
+
20
+ ### Fixes
21
+
22
+ - update development tooling dependencies (deps)
23
+ - Bump @git.zone/tsrun to ^2.0.6, @git.zone/tstest to ^4.0.0, and @types/node to ^26.4.1.
24
+ - Update pnpm package manager version to 11.25.0.
25
+
3
26
  ## 2026-08-31 - 0.11.1
4
27
 
5
28
  ### Fixes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.11.1',
6
+ version: '0.13.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
@@ -0,0 +1,197 @@
1
+ /** Provider identity for inventory observations, not a replication authority. */
2
+ export type TForgeKind = 'gitea' | 'gitlab' | 'native';
3
+ export interface IForgeInventoryInstance {
4
+ /** Operator-assigned identity retained when the instance URL changes. */
5
+ instanceId: string;
6
+ kind: TForgeKind;
7
+ /** Observed server version, or null when it could not be established. */
8
+ version: string | null;
9
+ }
10
+ /**
11
+ * Identity namespaces describe the source identifier, for example
12
+ * gitea.repository.id, gitlab.project.id, or gitlab.group.id. They must not
13
+ * silently change between adapter versions. IDs are opaque strings; paths,
14
+ * display names, and issue numbers must not replace provider row IDs.
15
+ */
16
+ export interface IForgeInventoryObjectRef {
17
+ instanceId: string;
18
+ idNamespace: string;
19
+ objectId: string;
20
+ /** Stable parent ID when identifiers are parent-scoped; otherwise null. */
21
+ parentObjectId: string | null;
22
+ }
23
+ /** A missing stable identifier must block automatic correspondence. */
24
+ export type TForgeInventoryIdentity = {
25
+ status: 'identified';
26
+ ref: IForgeInventoryObjectRef;
27
+ } | {
28
+ status: 'unresolved';
29
+ reason: string;
30
+ };
31
+ /** Mutable location observed separately from identity. URLs never contain credentials. */
32
+ export interface IForgeInventoryLocation {
33
+ /** Decoded namespace/repository segments, without splitting literal hyphens. */
34
+ pathSegments: string[];
35
+ webUrl: string | null;
36
+ }
37
+ export type TForgeInventoryScope = {
38
+ kind: 'instance';
39
+ } | {
40
+ kind: 'namespace';
41
+ identity: TForgeInventoryIdentity;
42
+ location: IForgeInventoryLocation;
43
+ includeDescendants: boolean;
44
+ } | {
45
+ kind: 'repository';
46
+ identity: TForgeInventoryIdentity;
47
+ location: IForgeInventoryLocation;
48
+ };
49
+ /** Internal visibility must never be silently normalized to public. */
50
+ export type TForgeInventoryVisibility = 'public' | 'internal' | 'private';
51
+ /** Values are canonical nonnegative decimal integers, retaining JSON precision. */
52
+ export type TForgeInventoryQuantity = {
53
+ status: 'measured';
54
+ value: string;
55
+ accuracy: 'exact' | 'estimate' | 'lowerBound';
56
+ } | {
57
+ status: 'unknown';
58
+ reason: string;
59
+ };
60
+ export interface IForgeInventoryNamespace {
61
+ identity: TForgeInventoryIdentity;
62
+ location: IForgeInventoryLocation;
63
+ kind: 'organization' | 'group' | 'user';
64
+ /** null means no parent; an unknown parent is explicitly unresolved. */
65
+ parent: TForgeInventoryIdentity | null;
66
+ visibility: TForgeInventoryVisibility | null;
67
+ }
68
+ export interface IForgeInventoryRepository {
69
+ identity: TForgeInventoryIdentity;
70
+ namespace: TForgeInventoryIdentity;
71
+ location: IForgeInventoryLocation;
72
+ description: string | null;
73
+ visibility: TForgeInventoryVisibility | null;
74
+ archived: boolean | null;
75
+ /** null means no observed default branch, not proof of an empty repository. */
76
+ defaultBranch: string | null;
77
+ httpCloneUrl: string | null;
78
+ sshCloneUrl: string | null;
79
+ /** Git storage bytes only; never an admission estimate for an outgoing push. */
80
+ gitSizeBytes: TForgeInventoryQuantity;
81
+ }
82
+ /** Issue metadata observed from a provider, never a complete historical import payload. */
83
+ export interface IForgeInventoryIssue {
84
+ /** Provider row identity; an issue's displayed number is a separate locator. */
85
+ identity: TForgeInventoryIdentity;
86
+ repository: TForgeInventoryIdentity;
87
+ location: IForgeInventoryLocation;
88
+ /** Canonical positive decimal repository-local number (GitLab iid). */
89
+ number: string;
90
+ title: string;
91
+ /** Provider text verbatim, including empty text; null means not exposed. */
92
+ body: string | null;
93
+ state: 'open' | 'closed' | null;
94
+ /** Provider issue classification, such as GitLab issue/incident/task; null if unknown. */
95
+ providerType: string | null;
96
+ /** null means unknown or unsupported, never implicit public visibility. */
97
+ confidential: boolean | null;
98
+ /** Reported provider author identity; does not establish an imported original author. */
99
+ author: TForgeInventoryIdentity;
100
+ /** ISO 8601 provider content times, distinct from inventory observation times. */
101
+ createdAt: string | null;
102
+ updatedAt: string | null;
103
+ /** null means no observed close time; state determines whether the issue is open. */
104
+ closedAt: string | null;
105
+ }
106
+ export type TForgeInventoryEntityClass = 'namespaces' | 'users' | 'teams' | 'memberships' | 'repositories' | 'gitRefs' | 'gitObjects' | 'protectedRefs' | 'publicSshKeys' | 'deployKeys' | 'issues' | 'issueComments' | 'pullRequests' | 'reviews' | 'reviewComments' | 'labels' | 'milestones' | 'assignees' | 'reactions' | 'releases' | 'releaseAssets' | 'lfsObjects' | 'packages' | 'packageVersions' | 'packageBlobs' | 'webhooks' | 'webhookDeliveries' | 'ciWorkflows' | 'ciRuns' | 'ciArtifacts' | 'wikis' | 'projects';
107
+ /** Availability of an inventory read, never a claim of write/import fidelity. */
108
+ export type TForgeInventoryCapability = {
109
+ status: 'available';
110
+ limitations: string[];
111
+ } | {
112
+ status: 'unavailable' | 'unverified';
113
+ reason: string;
114
+ };
115
+ /** Whether the observation includes entities hidden from an ordinary caller. */
116
+ export type TForgeInventoryAccess = 'publicOnly' | 'callerVisible' | 'entireScope';
117
+ /** Live pagination is not a point-in-time export, even after its last page. */
118
+ export type TForgeInventoryConsistency = {
119
+ status: 'live';
120
+ } | {
121
+ status: 'frozen';
122
+ checkpointId: string;
123
+ };
124
+ export interface IForgeInventoryObservation {
125
+ /** ISO 8601 UTC start and end of this observation, not provider content times. */
126
+ startedAt: string;
127
+ finishedAt: string;
128
+ access: TForgeInventoryAccess;
129
+ consistency: TForgeInventoryConsistency;
130
+ }
131
+ /**
132
+ * Transport cursors are opaque, credential-free, and bound to the exact
133
+ * instance, scope, query, adapter version, and page-size policy. They are not
134
+ * durable replication checkpoints and must not be followed as arbitrary URLs.
135
+ */
136
+ export type TForgeInventoryPagination = {
137
+ status: 'more';
138
+ cursor: string;
139
+ } | {
140
+ status: 'exhausted';
141
+ } | {
142
+ status: 'incomplete';
143
+ reason: string;
144
+ };
145
+ export interface IForgeInventoryPage<TItem> {
146
+ schemaVersion: 1;
147
+ instance: IForgeInventoryInstance;
148
+ scope: TForgeInventoryScope;
149
+ observation: IForgeInventoryObservation;
150
+ items: TItem[];
151
+ pagination: TForgeInventoryPagination;
152
+ }
153
+ /**
154
+ * Enumeration describes the observed scope only. Exhaustion does not prove
155
+ * global visibility, source quiescence, object integrity, or migration fidelity.
156
+ * An interrupted/denied/limited scan cannot return an enumerated result.
157
+ */
158
+ export type TForgeInventoryCollectionResult = {
159
+ status: 'enumerated';
160
+ observation: IForgeInventoryObservation;
161
+ /** Exact distinct entities observed, not a point-in-time total for live scans. */
162
+ count: string;
163
+ sizeBytes: TForgeInventoryQuantity;
164
+ } | {
165
+ status: 'incomplete';
166
+ observation: IForgeInventoryObservation;
167
+ /** Distinct observed entities only; provider estimates are not lower bounds. */
168
+ observedCount: string;
169
+ reason: string;
170
+ } | {
171
+ status: 'notInspected' | 'unavailable';
172
+ reason: string;
173
+ };
174
+ export interface IForgeInventoryCollection {
175
+ capability: TForgeInventoryCapability;
176
+ result: TForgeInventoryCollectionResult;
177
+ }
178
+ /** Unknown provider features must remain visible rather than silently disappearing. */
179
+ export interface IForgeInventoryAdditionalCollection extends IForgeInventoryCollection {
180
+ /** Provider-qualified feature key, distinct from the canonical collection keys. */
181
+ name: string;
182
+ }
183
+ /**
184
+ * Operator-facing inventory data shared by adapters and the website. This is
185
+ * not a public anonymous DTO, a persisted model, or a sealed migration manifest.
186
+ * Every canonical class is present, including unavailable and uninspected ones.
187
+ * Reasons and limitations are sanitized diagnostics, never raw response bodies,
188
+ * credentials, private keys, or secret bindings. Validate these types at runtime
189
+ * in the owning adapter/API; TypeScript alone does not validate network input.
190
+ */
191
+ export interface IForgeInventoryReport {
192
+ schemaVersion: 1;
193
+ instance: IForgeInventoryInstance;
194
+ scope: TForgeInventoryScope;
195
+ collections: Record<TForgeInventoryEntityClass, IForgeInventoryCollection>;
196
+ additionalCollections: IForgeInventoryAdditionalCollection[];
197
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9yZ2VpbnZlbnRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2ZvcmdlaW52ZW50b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
@@ -1,4 +1,5 @@
1
1
  export * from './codefeed.js';
2
+ export * from './forgeinventory.js';
2
3
  export * from './gitmanager.js';
3
4
  export * from './public.js';
4
5
  export * from './runner.js';
@@ -1,5 +1,6 @@
1
1
  export * from './codefeed.js';
2
+ export * from './forgeinventory.js';
2
3
  export * from './gitmanager.js';
3
4
  export * from './public.js';
4
5
  export * from './runner.js';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxhQUFhLENBQUMifQ==
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGFBQWEsQ0FBQyJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foss.global/interfaces",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.",
6
6
  "exports": {
@@ -15,9 +15,9 @@
15
15
  "devDependencies": {
16
16
  "@git.zone/tsbuild": "^4.4.2",
17
17
  "@git.zone/tsdoc": "^2.1.1",
18
- "@git.zone/tsrun": "^2.0.5",
19
- "@git.zone/tstest": "^3.6.6",
20
- "@types/node": "^26.1.1"
18
+ "@git.zone/tsrun": "^2.0.6",
19
+ "@git.zone/tstest": "^4.0.0",
20
+ "@types/node": "^26.4.1"
21
21
  },
22
22
  "files": [
23
23
  "ts/**/*",
package/readme.md CHANGED
@@ -95,6 +95,42 @@ The runner lifecycle contracts cover registration, sessions, runner and job hear
95
95
 
96
96
  Protocol v1 describes OCI execution with Docker or Podman and `tar.gz` source archives. Artifacts, caches, and service containers are explicitly unsupported in the v1 capability shape. Supported job network modes are `none` and `bridge`; the execution service remains responsible for enforcing the advertised capability.
97
97
 
98
+ ### Forge inventory contracts
99
+
100
+ `IForgeInventoryReport`, `IForgeInventoryPage<TItem>`, `IForgeInventoryNamespace`,
101
+ `IForgeInventoryRepository` and `IForgeInventoryIssue` describe operator inventory observations. They
102
+ are exported from both the package root and `data`. This package supplies types;
103
+ it does not scan a forge or validate network responses.
104
+
105
+ Stable provider identifiers are opaque strings qualified by instance and ID
106
+ namespace. Mutable paths remain separate segment arrays, preserving GitLab
107
+ subgroups and literal hyphens. A source without a stable identifier reports an
108
+ unresolved identity. URLs must be credential-free, and inventory responses need
109
+ operator authorization rather than anonymous public exposure.
110
+
111
+ Issue observations separate the provider row ID from its repository-local
112
+ `number` (GitLab `iid`) and retain the repository identity. They preserve empty
113
+ body text, unknown metadata, open/closed state, provider issue classification,
114
+ confidentiality, reported author identity and provider content timestamps.
115
+ The reported author does not prove original attribution for previously imported
116
+ issues. Comments, labels, milestones, assignees, attachments and history require
117
+ their own inventory and preservation work; this metadata DTO does not claim
118
+ that those collections or external writes are implemented.
119
+
120
+ Every canonical entity class has an explicit capability and collection result,
121
+ including classes not inspected or unavailable. Additional provider features
122
+ have their own entries. `enumerated` means the selected collection was exhausted
123
+ for its recorded visibility scope; a public or caller-visible live scan does
124
+ not establish a complete frozen migration inventory. Page continuation,
125
+ exhaustion, and interrupted enumeration have distinct discriminated shapes.
126
+
127
+ Counts and byte quantities use nonnegative decimal strings to avoid JSON integer
128
+ precision loss. Unknown size differs from zero, and estimated repository storage
129
+ size is not the size of a future Git push. Runtime adapters must validate values,
130
+ scope consistency, capability/result agreement, cursor binding, diagnostics, and
131
+ authorization. These DTOs do not establish replication authority, historical
132
+ import fidelity, checksummed manifests, or durable recovery checkpoints.
133
+
98
134
  ## Exports
99
135
 
100
136
  - `data`: public DTOs for users, organizations, repositories, contents, commits, diffs, releases, issues, activity, news, stats, codefeed commit results, GitManager repository/read API results, and runner/CI contracts.
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.11.1',
6
+ version: '0.13.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  }
@@ -0,0 +1,230 @@
1
+ /** Provider identity for inventory observations, not a replication authority. */
2
+ export type TForgeKind = 'gitea' | 'gitlab' | 'native';
3
+
4
+ export interface IForgeInventoryInstance {
5
+ /** Operator-assigned identity retained when the instance URL changes. */
6
+ instanceId: string;
7
+ kind: TForgeKind;
8
+ /** Observed server version, or null when it could not be established. */
9
+ version: string | null;
10
+ }
11
+
12
+ /**
13
+ * Identity namespaces describe the source identifier, for example
14
+ * gitea.repository.id, gitlab.project.id, or gitlab.group.id. They must not
15
+ * silently change between adapter versions. IDs are opaque strings; paths,
16
+ * display names, and issue numbers must not replace provider row IDs.
17
+ */
18
+ export interface IForgeInventoryObjectRef {
19
+ instanceId: string;
20
+ idNamespace: string;
21
+ objectId: string;
22
+ /** Stable parent ID when identifiers are parent-scoped; otherwise null. */
23
+ parentObjectId: string | null;
24
+ }
25
+
26
+ /** A missing stable identifier must block automatic correspondence. */
27
+ export type TForgeInventoryIdentity =
28
+ | { status: 'identified'; ref: IForgeInventoryObjectRef }
29
+ | { status: 'unresolved'; reason: string };
30
+
31
+ /** Mutable location observed separately from identity. URLs never contain credentials. */
32
+ export interface IForgeInventoryLocation {
33
+ /** Decoded namespace/repository segments, without splitting literal hyphens. */
34
+ pathSegments: string[];
35
+ webUrl: string | null;
36
+ }
37
+
38
+ export type TForgeInventoryScope =
39
+ | { kind: 'instance' }
40
+ | {
41
+ kind: 'namespace';
42
+ identity: TForgeInventoryIdentity;
43
+ location: IForgeInventoryLocation;
44
+ includeDescendants: boolean;
45
+ }
46
+ | {
47
+ kind: 'repository';
48
+ identity: TForgeInventoryIdentity;
49
+ location: IForgeInventoryLocation;
50
+ };
51
+
52
+ /** Internal visibility must never be silently normalized to public. */
53
+ export type TForgeInventoryVisibility = 'public' | 'internal' | 'private';
54
+
55
+ /** Values are canonical nonnegative decimal integers, retaining JSON precision. */
56
+ export type TForgeInventoryQuantity =
57
+ | { status: 'measured'; value: string; accuracy: 'exact' | 'estimate' | 'lowerBound' }
58
+ | { status: 'unknown'; reason: string };
59
+
60
+ export interface IForgeInventoryNamespace {
61
+ identity: TForgeInventoryIdentity;
62
+ location: IForgeInventoryLocation;
63
+ kind: 'organization' | 'group' | 'user';
64
+ /** null means no parent; an unknown parent is explicitly unresolved. */
65
+ parent: TForgeInventoryIdentity | null;
66
+ visibility: TForgeInventoryVisibility | null;
67
+ }
68
+
69
+ export interface IForgeInventoryRepository {
70
+ identity: TForgeInventoryIdentity;
71
+ namespace: TForgeInventoryIdentity;
72
+ location: IForgeInventoryLocation;
73
+ description: string | null;
74
+ visibility: TForgeInventoryVisibility | null;
75
+ archived: boolean | null;
76
+ /** null means no observed default branch, not proof of an empty repository. */
77
+ defaultBranch: string | null;
78
+ httpCloneUrl: string | null;
79
+ sshCloneUrl: string | null;
80
+ /** Git storage bytes only; never an admission estimate for an outgoing push. */
81
+ gitSizeBytes: TForgeInventoryQuantity;
82
+ }
83
+
84
+ /** Issue metadata observed from a provider, never a complete historical import payload. */
85
+ export interface IForgeInventoryIssue {
86
+ /** Provider row identity; an issue's displayed number is a separate locator. */
87
+ identity: TForgeInventoryIdentity;
88
+ repository: TForgeInventoryIdentity;
89
+ location: IForgeInventoryLocation;
90
+ /** Canonical positive decimal repository-local number (GitLab iid). */
91
+ number: string;
92
+ title: string;
93
+ /** Provider text verbatim, including empty text; null means not exposed. */
94
+ body: string | null;
95
+ state: 'open' | 'closed' | null;
96
+ /** Provider issue classification, such as GitLab issue/incident/task; null if unknown. */
97
+ providerType: string | null;
98
+ /** null means unknown or unsupported, never implicit public visibility. */
99
+ confidential: boolean | null;
100
+ /** Reported provider author identity; does not establish an imported original author. */
101
+ author: TForgeInventoryIdentity;
102
+ /** ISO 8601 provider content times, distinct from inventory observation times. */
103
+ createdAt: string | null;
104
+ updatedAt: string | null;
105
+ /** null means no observed close time; state determines whether the issue is open. */
106
+ closedAt: string | null;
107
+ }
108
+
109
+ export type TForgeInventoryEntityClass =
110
+ | 'namespaces'
111
+ | 'users'
112
+ | 'teams'
113
+ | 'memberships'
114
+ | 'repositories'
115
+ | 'gitRefs'
116
+ | 'gitObjects'
117
+ | 'protectedRefs'
118
+ | 'publicSshKeys'
119
+ | 'deployKeys'
120
+ | 'issues'
121
+ | 'issueComments'
122
+ | 'pullRequests'
123
+ | 'reviews'
124
+ | 'reviewComments'
125
+ | 'labels'
126
+ | 'milestones'
127
+ | 'assignees'
128
+ | 'reactions'
129
+ | 'releases'
130
+ | 'releaseAssets'
131
+ | 'lfsObjects'
132
+ | 'packages'
133
+ | 'packageVersions'
134
+ | 'packageBlobs'
135
+ | 'webhooks'
136
+ | 'webhookDeliveries'
137
+ | 'ciWorkflows'
138
+ | 'ciRuns'
139
+ | 'ciArtifacts'
140
+ | 'wikis'
141
+ | 'projects';
142
+
143
+ /** Availability of an inventory read, never a claim of write/import fidelity. */
144
+ export type TForgeInventoryCapability =
145
+ | { status: 'available'; limitations: string[] }
146
+ | { status: 'unavailable' | 'unverified'; reason: string };
147
+
148
+ /** Whether the observation includes entities hidden from an ordinary caller. */
149
+ export type TForgeInventoryAccess = 'publicOnly' | 'callerVisible' | 'entireScope';
150
+
151
+ /** Live pagination is not a point-in-time export, even after its last page. */
152
+ export type TForgeInventoryConsistency =
153
+ | { status: 'live' }
154
+ | { status: 'frozen'; checkpointId: string };
155
+
156
+ export interface IForgeInventoryObservation {
157
+ /** ISO 8601 UTC start and end of this observation, not provider content times. */
158
+ startedAt: string;
159
+ finishedAt: string;
160
+ access: TForgeInventoryAccess;
161
+ consistency: TForgeInventoryConsistency;
162
+ }
163
+
164
+ /**
165
+ * Transport cursors are opaque, credential-free, and bound to the exact
166
+ * instance, scope, query, adapter version, and page-size policy. They are not
167
+ * durable replication checkpoints and must not be followed as arbitrary URLs.
168
+ */
169
+ export type TForgeInventoryPagination =
170
+ | { status: 'more'; cursor: string }
171
+ | { status: 'exhausted' }
172
+ | { status: 'incomplete'; reason: string };
173
+
174
+ export interface IForgeInventoryPage<TItem> {
175
+ schemaVersion: 1;
176
+ instance: IForgeInventoryInstance;
177
+ scope: TForgeInventoryScope;
178
+ observation: IForgeInventoryObservation;
179
+ items: TItem[];
180
+ pagination: TForgeInventoryPagination;
181
+ }
182
+
183
+ /**
184
+ * Enumeration describes the observed scope only. Exhaustion does not prove
185
+ * global visibility, source quiescence, object integrity, or migration fidelity.
186
+ * An interrupted/denied/limited scan cannot return an enumerated result.
187
+ */
188
+ export type TForgeInventoryCollectionResult =
189
+ | {
190
+ status: 'enumerated';
191
+ observation: IForgeInventoryObservation;
192
+ /** Exact distinct entities observed, not a point-in-time total for live scans. */
193
+ count: string;
194
+ sizeBytes: TForgeInventoryQuantity;
195
+ }
196
+ | {
197
+ status: 'incomplete';
198
+ observation: IForgeInventoryObservation;
199
+ /** Distinct observed entities only; provider estimates are not lower bounds. */
200
+ observedCount: string;
201
+ reason: string;
202
+ }
203
+ | { status: 'notInspected' | 'unavailable'; reason: string };
204
+
205
+ export interface IForgeInventoryCollection {
206
+ capability: TForgeInventoryCapability;
207
+ result: TForgeInventoryCollectionResult;
208
+ }
209
+
210
+ /** Unknown provider features must remain visible rather than silently disappearing. */
211
+ export interface IForgeInventoryAdditionalCollection extends IForgeInventoryCollection {
212
+ /** Provider-qualified feature key, distinct from the canonical collection keys. */
213
+ name: string;
214
+ }
215
+
216
+ /**
217
+ * Operator-facing inventory data shared by adapters and the website. This is
218
+ * not a public anonymous DTO, a persisted model, or a sealed migration manifest.
219
+ * Every canonical class is present, including unavailable and uninspected ones.
220
+ * Reasons and limitations are sanitized diagnostics, never raw response bodies,
221
+ * credentials, private keys, or secret bindings. Validate these types at runtime
222
+ * in the owning adapter/API; TypeScript alone does not validate network input.
223
+ */
224
+ export interface IForgeInventoryReport {
225
+ schemaVersion: 1;
226
+ instance: IForgeInventoryInstance;
227
+ scope: TForgeInventoryScope;
228
+ collections: Record<TForgeInventoryEntityClass, IForgeInventoryCollection>;
229
+ additionalCollections: IForgeInventoryAdditionalCollection[];
230
+ }
package/ts/data/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './codefeed.js';
2
+ export * from './forgeinventory.js';
2
3
  export * from './gitmanager.js';
3
4
  export * from './public.js';
4
5
  export * from './runner.js';