@enterpriseai/cli 3.20.2 → 3.20.4

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 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAsD5C,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAK3E;AAED,eAAO,MAAM,WAAW,SAsBpB,CAAC"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAuD5C,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAK3E;AAED,eAAO,MAAM,WAAW,SAuBpB,CAAC"}
@@ -10,6 +10,7 @@ import * as out from '../lib/output.js';
10
10
  import { isRecord } from '../lib/utils.js';
11
11
  import { ContentUnderstandingError } from '../lib/content-understanding-manifest.js';
12
12
  import { readContentUnderstandingResponse, requireWaitTimeout } from '../lib/content-understanding-client.js';
13
+ import { configureDocumentTypeCommand } from './document-type-config.js';
13
14
  function addUploadOptions(command) {
14
15
  return command
15
16
  .option('--tenant-id <id>', 'Use a specific workspace with the current user login')
@@ -35,7 +36,8 @@ Examples:
35
36
  $ eai docs upload ./reports/site-plan.pdf --storage-target resourceapi --planning-application-id <projectId>
36
37
 
37
38
  Typical workflow:
38
- 1. Configure and publish the app's document schemas and workflow classifier
39
+ 1. Configure the document type fields with docs configure-type, then publish
40
+ the app's document schemas and workflow classifier
39
41
  2. Run classify once to upload and queue analysis, or upload for full processing
40
42
  3. Poll the returned job ID and read the saved results; acceptance is not completion
41
43
  eai docs job <job-id> --tenant-id <workspace-id> --wait --format json
@@ -49,6 +51,7 @@ Use docs commands when the file is the subject of document processing or AI
49
51
  context. Use "eai resources file" when the file is an attachment to a typed
50
52
  resource object.
51
53
  `);
54
+ docsCommand.addCommand(configureDocumentTypeCommand);
52
55
  function readIdentifier(value, label) {
53
56
  if (!value || value === '.' || value === '..' || value.trim() !== value || value.length > 256 || /[\uD800-\uDFFF]/u.test(value) || [...value].some(character => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127)) {
54
57
  throw new ContentUnderstandingError('DOC_IDENTIFIER_INVALID', `${label} must be a nonempty bounded identifier.`);
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAA8B,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,gCAAgC,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAO9G,SAAS,gBAAgB,CAAC,OAAgB;IACxC,OAAO,OAAO;SACX,MAAM,CAAC,kBAAkB,EAAE,sDAAsD,CAAC;SAClF,MAAM,CAAC,2BAA2B,EAAE,+EAA+E,CAAC;SACpH,MAAM,CAAC,4BAA4B,EAAE,6CAA6C,CAAC;SACnF,MAAM,CAAC,gCAAgC,EAAE,0DAA0D,CAAC;SACpG,MAAM,CAAC,sBAAsB,EAAE,+CAA+C,CAAC;SAC/E,MA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,OAAO,CAAC,oBAAoB,CAAC;KAC7B,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;IAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,qBAAqB,EAAE,CAAC;IAEjD,MAAM,OAAO,GAAG,GAAG,CAAC,qBAAqB,UAAU,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;IAClE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,oBAAoB,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Command } from 'commander';
2
+ declare const KIND = "eai.document-type.configuration";
3
+ interface Field {
4
+ name: string;
5
+ description: string;
6
+ type: string;
7
+ method: string;
8
+ }
9
+ interface Manifest {
10
+ kind: typeof KIND;
11
+ schemaVersion: 1;
12
+ tenantId: string;
13
+ code: string;
14
+ name: string;
15
+ description: string;
16
+ fields: Field[];
17
+ }
18
+ export declare function parseDocumentTypeConfiguration(value: unknown): Manifest;
19
+ /** Match the Admin Portal's deterministic, bounded provider identifier. */
20
+ export declare function analyzerIdForDocumentType(tenantSlug: string, code: string): string;
21
+ /** PublicAPI hashes its safe readback with Python json.dumps(sort_keys=True, separators=(',', ':')). */
22
+ export declare function definitionDigestForReadback(definition: Record<string, unknown>): string;
23
+ export declare const configureDocumentTypeCommand: Command;
24
+ export {};
25
+ //# sourceMappingURL=document-type-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type-config.d.ts","sourceRoot":"","sources":["../../src/commands/document-type-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C,QAAA,MAAM,IAAI,oCAAoC,CAAC;AAS/C,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,aAAa,EAAE,CAAC,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AA0BD,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAuBvE;AAeD,2EAA2E;AAC3E,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKlF;AAQD,wGAAwG;AACxG,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAIvF;AAuCD,eAAO,MAAM,4BAA4B,SA0ErC,CAAC"}
@@ -0,0 +1,221 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { Command, Option } from 'commander';
4
+ import { resolveCommandContext } from '../lib/context.js';
5
+ import { requireManagedPublicApiUrl } from '../lib/managed-public-api.js';
6
+ import { errorCatalog } from '../lib/error-codes.js';
7
+ import { isRecord } from '../lib/utils.js';
8
+ import * as out from '../lib/output.js';
9
+ const KIND = 'eai.document-type.configuration';
10
+ const TENANT_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
11
+ // The Admin Portal maps punctuation to underscores in analyzer IDs. Allow only
12
+ // characters that survive that mapping so distinct codes cannot share one ID.
13
+ const CODE = /^[A-Za-z0-9][A-Za-z0-9_]{0,63}$/;
14
+ const FIELD_NAME = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
15
+ const FIELD_TYPES = new Set(['string', 'integer', 'number', 'boolean', 'date', 'time']);
16
+ const METHODS = new Set(['extract', 'generate']);
17
+ class ConfigurationError extends Error {
18
+ code;
19
+ phase;
20
+ status;
21
+ constructor(code, message, phase = 'validation', status) {
22
+ super(message);
23
+ this.code = code;
24
+ this.phase = phase;
25
+ this.status = status;
26
+ }
27
+ }
28
+ function exactKeys(value, allowed) {
29
+ return Object.keys(value).every(key => allowed.includes(key));
30
+ }
31
+ function responseTenantMatches(body, tenantId) {
32
+ return ['tenantId', 'tenant_id'].every(key => !Object.prototype.hasOwnProperty.call(body, key) || body[key] === tenantId);
33
+ }
34
+ function boundedText(value, max) {
35
+ return typeof value === 'string' && value.trim() === value && value.length > 0 && value.length <= max;
36
+ }
37
+ export function parseDocumentTypeConfiguration(value) {
38
+ if (!isRecord(value) || !exactKeys(value, ['kind', 'schemaVersion', 'tenantId', 'code', 'name', 'description', 'fields'])
39
+ || value.kind !== KIND || value.schemaVersion !== 1 || typeof value.tenantId !== 'string' || !TENANT_ID.test(value.tenantId)
40
+ || value.tenantId === '00000000-0000-0000-0000-000000000000'
41
+ || typeof value.code !== 'string' || !CODE.test(value.code)
42
+ || !boundedText(value.name, 128) || !boundedText(value.description, 1000)
43
+ || !Array.isArray(value.fields) || value.fields.length < 1 || value.fields.length > 32) {
44
+ throw new ConfigurationError('DOC_TYPE_CONFIGURATION_INVALID', 'Configuration requires a lowercase canonical workspace UUID, document code, name, description and 1–32 supported fields.');
45
+ }
46
+ const fields = [];
47
+ const names = new Set();
48
+ for (const field of value.fields) {
49
+ if (!isRecord(field) || !exactKeys(field, ['name', 'description', 'type', 'method'])
50
+ || typeof field.name !== 'string' || !FIELD_NAME.test(field.name)
51
+ || !boundedText(field.description, 500) || typeof field.type !== 'string' || !FIELD_TYPES.has(field.type)
52
+ || typeof field.method !== 'string' || !METHODS.has(field.method) || names.has(field.name.toLowerCase())) {
53
+ throw new ConfigurationError('DOC_TYPE_CONFIGURATION_INVALID', 'Each field needs a unique name, bounded description, supported scalar type and extract/generate method.');
54
+ }
55
+ names.add(field.name.toLowerCase());
56
+ fields.push({ name: field.name, description: field.description, type: field.type, method: field.method });
57
+ }
58
+ return { kind: KIND, schemaVersion: 1, tenantId: value.tenantId, code: value.code,
59
+ name: value.name, description: value.description, fields };
60
+ }
61
+ async function readManifest(path) {
62
+ let bytes;
63
+ try {
64
+ bytes = await readFile(path);
65
+ }
66
+ catch {
67
+ throw new ConfigurationError('DOC_TYPE_CONFIGURATION_INVALID', 'Configuration file could not be read.');
68
+ }
69
+ if (bytes.length > 65536)
70
+ throw new ConfigurationError('DOC_TYPE_CONFIGURATION_INVALID', 'Configuration file exceeds 64 KiB.');
71
+ try {
72
+ return parseDocumentTypeConfiguration(JSON.parse(new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(bytes)));
73
+ }
74
+ catch (error) {
75
+ if (error instanceof ConfigurationError)
76
+ throw error;
77
+ throw new ConfigurationError('DOC_TYPE_CONFIGURATION_INVALID', 'Configuration file must contain UTF-8 JSON.');
78
+ }
79
+ }
80
+ /** Match the Admin Portal's deterministic, bounded provider identifier. */
81
+ export function analyzerIdForDocumentType(tenantSlug, code) {
82
+ const normalized = `Analyser_${tenantSlug}_${code}`.replace(/[^A-Za-z0-9_]/g, '_');
83
+ if (normalized.length <= 64)
84
+ return normalized;
85
+ const digest = createHash('sha256').update(normalized).digest('hex').slice(0, 16);
86
+ return `${normalized.slice(0, 47)}_${digest}`;
87
+ }
88
+ function sortedJsonValue(value) {
89
+ if (Array.isArray(value))
90
+ return value.map(sortedJsonValue);
91
+ if (isRecord(value))
92
+ return Object.fromEntries(Object.keys(value).sort().map(key => [key, sortedJsonValue(value[key])]));
93
+ return value;
94
+ }
95
+ /** PublicAPI hashes its safe readback with Python json.dumps(sort_keys=True, separators=(',', ':')). */
96
+ export function definitionDigestForReadback(definition) {
97
+ const canonical = JSON.stringify(sortedJsonValue(definition)).replace(/[\u007f-\uffff]/g, character => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`);
98
+ return createHash('sha256').update(canonical).digest('hex');
99
+ }
100
+ async function jsonBody(response, phase) {
101
+ let value;
102
+ try {
103
+ value = await response.json();
104
+ }
105
+ catch {
106
+ throw new ConfigurationError('DOC_TYPE_RESPONSE_INVALID', 'Platform returned a non-JSON response.', phase, response.status);
107
+ }
108
+ if (!isRecord(value))
109
+ throw new ConfigurationError('DOC_TYPE_RESPONSE_INVALID', 'Platform returned an invalid response.', phase, response.status);
110
+ return value;
111
+ }
112
+ function requireProviderFields(body, tenantId, analyzerId, description, fields) {
113
+ const definition = body.definition;
114
+ const schema = isRecord(definition) ? definition.fieldSchema : undefined;
115
+ const observed = isRecord(schema) ? schema.fields : undefined;
116
+ const digest = body.definitionDigest;
117
+ if (!responseTenantMatches(body, tenantId) || body.analyzerId !== analyzerId
118
+ || !isRecord(schema) || Object.keys(schema).length !== 1 || !exactKeys(schema, ['fields'])
119
+ || !isRecord(observed) || Object.keys(observed).length !== fields.length
120
+ || typeof digest !== 'string' || !/^[a-f0-9]{64}$/i.test(digest)
121
+ || !isRecord(definition) || Object.keys(definition).length !== 4
122
+ || !exactKeys(definition, ['description', 'baseAnalyzerId', 'fieldSchema', 'figureOptions'])
123
+ || definition.description !== description || definition.baseAnalyzerId !== 'prebuilt-document'
124
+ || !isRecord(definition.figureOptions)
125
+ || Object.keys(definition.figureOptions).some(key => !['enableFigureAnalysis', 'enableFigureDescription', 'chartFormat'].includes(key))
126
+ || (definition.figureOptions.enableFigureAnalysis !== undefined && definition.figureOptions.enableFigureAnalysis !== false)
127
+ || (definition.figureOptions.enableFigureDescription !== undefined && definition.figureOptions.enableFigureDescription !== false)
128
+ || (definition.figureOptions.chartFormat !== undefined && definition.figureOptions.chartFormat !== 'chartjs')
129
+ || fields.some(field => {
130
+ const actual = observed[field.name];
131
+ return !isRecord(actual) || actual.type !== (field.type === 'integer' ? 'number' : field.type)
132
+ || actual.method !== field.method || actual.description !== field.description
133
+ || (actual.required !== undefined && actual.required !== false)
134
+ || Object.keys(actual).some(key => !['type', 'method', 'description', 'required'].includes(key));
135
+ }) || digest.toLowerCase() !== definitionDigestForReadback(definition)) {
136
+ throw new ConfigurationError('DOC_TYPE_ANALYZER_READBACK_MISMATCH', 'Analyzer readback does not match the requested fields. Runtime rules were not changed.', 'analyzer-readback');
137
+ }
138
+ return digest;
139
+ }
140
+ export const configureDocumentTypeCommand = new Command('configure-type')
141
+ .description('Configure bounded tenant-owned document fields for an existing classifier workflow')
142
+ .requiredOption('--file <path>', 'Document type configuration JSON')
143
+ .requiredOption('--tenant-id <id>', 'Exact owning workspace UUID, matching the file')
144
+ .addOption(new Option('--format <format>', 'Output format').choices(['text', 'json']).default('text'))
145
+ .addHelpText('after', `\nUse a JSON file with kind "${KIND}", schemaVersion 1, tenantId, code, name, description,
146
+ and 1–32 fields with name, description, scalar type and extract/generate method.
147
+ Codes use letters, numbers and underscores only; punctuation could collide in provider IDs.
148
+ Use a lowercase canonical workspace UUID in the file and --tenant-id.
149
+ Example:
150
+ {"kind":"${KIND}","schemaVersion":1,"tenantId":"<workspace-id>",
151
+ "code":"Quotation","name":"Quotation","description":"Supplier quotation",
152
+ "fields":[{"name":"supplierName","description":"Supplier organisation", "type":"string","method":"extract"},
153
+ {"name":"summary","description":"One-sentence summary", "type":"string","method":"generate"}]}
154
+ Run inside an initialized EAI project with an explicit --profile for the intended environment.
155
+ The command verifies the tenant-owned analyzer before syncing runtime rules.
156
+ It does not publish a classifier, bind an app/workflow, enable typed CU v2, or upload a document.
157
+ On partial failure, retain the same file and retry only after inspecting the reported phase.
158
+ `)
159
+ .action(async (options) => {
160
+ let phase = 'validation';
161
+ let analyzerId;
162
+ try {
163
+ const manifest = await readManifest(options.file);
164
+ if (options.tenantId !== manifest.tenantId)
165
+ throw new ConfigurationError('DOC_TYPE_TENANT_MISMATCH', '--tenant-id must match the configuration tenantId.');
166
+ phase = 'context';
167
+ const context = await resolveCommandContext({ tenantId: manifest.tenantId, interactive: false, forceRefresh: true,
168
+ validatePublicApiUrl: requireManagedPublicApiUrl, pinPublicApiUrl: true,
169
+ onError: (code, message) => { throw new ConfigurationError(code, message ?? errorCatalog[code].message, phase); } });
170
+ if (context.tenantId !== manifest.tenantId || !boundedText(context.tenantSlug, 128)) {
171
+ throw new ConfigurationError('DOC_TYPE_TENANT_MISMATCH', 'Resolved workspace does not match the requested configuration.');
172
+ }
173
+ analyzerId = analyzerIdForDocumentType(context.tenantSlug, manifest.code);
174
+ const analyzerPath = `/v4/data/documents/content-understanding/analyzers/${encodeURIComponent(analyzerId)}`;
175
+ phase = 'analyzer-upsert';
176
+ const upsert = await context.client.requestPublicApi(`${analyzerPath}/upsert`, { method: 'POST', body: {
177
+ tenantId: manifest.tenantId, description: manifest.description, schemaFields: manifest.fields,
178
+ } });
179
+ const upsertBody = await jsonBody(upsert, phase);
180
+ if (!upsert.ok || !responseTenantMatches(upsertBody, manifest.tenantId)
181
+ || upsertBody.analyzerId !== analyzerId || !['created', 'updated'].includes(String(upsertBody.status))) {
182
+ throw new ConfigurationError('DOC_TYPE_ANALYZER_UPSERT_FAILED', 'Analyzer creation or update did not complete. Runtime rules were not changed.', phase, upsert.status);
183
+ }
184
+ phase = 'analyzer-readback';
185
+ const readback = await context.client.requestPublicApi(analyzerPath, { method: 'GET', params: { tenant_id: manifest.tenantId } });
186
+ if (!readback.ok)
187
+ throw new ConfigurationError('DOC_TYPE_ANALYZER_READBACK_FAILED', 'Analyzer readback failed. Runtime rules were not changed.', phase, readback.status);
188
+ const definitionDigest = requireProviderFields(await jsonBody(readback, phase), manifest.tenantId, analyzerId, manifest.description, manifest.fields);
189
+ phase = 'runtime-sync';
190
+ const runtime = await context.client.requestPublicApi(`/v4/data/documents/runtime-document-types/${encodeURIComponent(manifest.code)}`, {
191
+ method: 'PUT', body: { tenantId: manifest.tenantId, name: manifest.name, code: manifest.code,
192
+ description: manifest.description, isActive: true,
193
+ rules: manifest.fields.map(field => ({ fieldName: field.name, fieldDescription: field.description,
194
+ type: field.type.toUpperCase(), method: field.method.toUpperCase(), isActive: true })) },
195
+ });
196
+ const runtimeBody = await jsonBody(runtime, phase);
197
+ const documentType = runtimeBody.documentType;
198
+ if (!runtime.ok || runtimeBody.success !== true || !responseTenantMatches(runtimeBody, manifest.tenantId)
199
+ || !isRecord(documentType) || !responseTenantMatches(documentType, manifest.tenantId)
200
+ || documentType.code !== manifest.code || documentType.name !== manifest.name) {
201
+ throw new ConfigurationError('DOC_TYPE_RUNTIME_SYNC_FAILED', 'Runtime document rules were not confirmed. The analyzer may exist; inspect and retry the same file.', phase, runtime.status);
202
+ }
203
+ const result = { ok: true, status: 'configured', tenantId: manifest.tenantId, code: manifest.code,
204
+ analyzerId, definitionDigest, fieldCount: manifest.fields.length };
205
+ if (options.format === 'json')
206
+ out.json(result);
207
+ else
208
+ out.success(`Document type ${manifest.code} configured with ${manifest.fields.length} fields.`);
209
+ }
210
+ catch (error) {
211
+ const known = error instanceof ConfigurationError ? error : new ConfigurationError('DOC_TYPE_CONFIGURATION_FAILED', 'Document type configuration did not complete. Inspect the current phase before retrying the same file.', phase);
212
+ const result = { ok: false, phase: known.phase, ...(known.status ? { status: known.status } : {}),
213
+ ...(analyzerId ? { analyzerId } : {}), error: { code: known.code, message: known.message } };
214
+ if (options.format === 'json')
215
+ out.json(result);
216
+ else
217
+ out.error(`${known.phase}: ${known.message}`);
218
+ process.exitCode = 1;
219
+ }
220
+ });
221
+ //# sourceMappingURL=document-type-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type-config.js","sourceRoot":"","sources":["../../src/commands/document-type-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAExC,MAAM,IAAI,GAAG,iCAAiC,CAAC;AAC/C,MAAM,SAAS,GAAG,gEAAgE,CAAC;AACnF,+EAA+E;AAC/E,8EAA8E;AAC9E,MAAM,IAAI,GAAG,iCAAiC,CAAC;AAC/C,MAAM,UAAU,GAAG,8BAA8B,CAAC;AAClD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACxF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAyBjD,MAAM,kBAAmB,SAAQ,KAAK;IACf;IAAwC;IAAuC;IAApG,YAAqB,IAAY,EAAE,OAAe,EAAW,QAAgB,YAAY,EAAW,MAAe;QACjH,KAAK,CAAC,OAAO,CAAC,CAAC;QADI,SAAI,GAAJ,IAAI,CAAQ;QAA4B,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,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACnD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-guide.d.ts","sourceRoot":"","sources":["../../src/lib/agent-guide.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,CAAC,CAAC;IACjB,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AA6MD,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
1
+ {"version":3,"file":"agent-guide.d.ts","sourceRoot":"","sources":["../../src/lib/agent-guide.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,CAAC,CAAC;IACjB,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAgND,wBAAgB,aAAa,IAAI,UAAU,CAE1C"}
@@ -2,7 +2,7 @@ const guide = {
2
2
  schemaVersion: 1,
3
3
  audience: 'ai-agents',
4
4
  purpose: 'Help an AI agent discover EAI CLI capabilities, prefer structured output, and recover from known errors without private platform knowledge.',
5
- capabilities: ['app-manifest-name-slug-negotiation-v1', 'content-understanding-manifest-v1', 'resource-mutation-response-scope-v1'],
5
+ capabilities: ['app-manifest-name-slug-negotiation-v1', 'content-understanding-manifest-v1', 'document-type-configuration-v1', 'resource-mutation-response-scope-v1'],
6
6
  firstCommands: [
7
7
  {
8
8
  command: 'eai --describe',
@@ -37,8 +37,9 @@ const guide = {
37
37
  'For normal workspace user/admin addition, use eai user invite --email <email> --workspace <workspace-id> --role <role>; use workspace bootstrap-admin only for first-admin repair on an immediate child workspace.',
38
38
  'If user invite fails with a 5xx or EXTERNAL_SERVICE_ERROR, run eai errors explain user_invite_external_service_existing_member --format json, check for an existing member with eai user list, and only then use eai user role set by member ID when approved.',
39
39
  'For files, use eai docs when the file is a document to process, classify, index, or expose to AI context. Use eai resources file only when the file is attached to a typed resource object file property.',
40
+ 'For launch-scope document fields, build a bounded eai.document-type.configuration JSON file from the person’s requested document type and scalar extract/generate fields, then use eai docs configure-type on its exact workspace. Publish and bind the matching workflow classifier before submitting a document. The separate typed CU v2 mode remains gated until qualified.',
40
41
  'Do not invent standalone PublicAPI v4 blob-upload flows. Ask whether the user needs a document workflow or a resource file property.',
41
- 'For document analyzer setup, author a bounded manifest with eai content-understanding schema, validate it locally, inspect selected-workspace capabilities, and save a ready plan before apply. The app/workflow binding must already exist; when configuring a classifier, prepare its matching tenant-owned draft with eai classifier save first. Installed manifest support does not mean the backend mode is enabled or qualified. The platform owns Azure credentials and model mappings; never call Azure directly or invent analyzer IDs. Graphs and segmentation are unavailable in this launch mode.',
42
+ 'For the separately gated typed CU v2 mode, author a bounded manifest with eai content-understanding schema, validate it locally, inspect selected-workspace capabilities, and save a ready plan before apply. The app/workflow binding must already exist; when configuring a classifier, prepare its matching tenant-owned draft with eai classifier save first. Installed manifest support does not mean the backend mode is enabled or qualified. The platform owns Azure credentials and model mappings; never call Azure directly or invent analyzer IDs. Graphs and segmentation are unavailable in this mode.',
42
43
  'Keep the unchanged Content Understanding manifest and saved plan. Apply acknowledgement can be unknown; never automatically repeat it or create a replacement plan. Deliberately repeating the original apply recovers its durable operation. Once acknowledged, use status or --operation-id with its exact nonzero canonical UUID to resume that operation. Ready typed mode requires features.typed_fields and features.flatClassifiers exactly true; advanced formula, figure and output-format settings require features.advancedDocumentConfig exactly true before initial apply and acknowledged continuation. A succeeded historical operation requires currentReady exactly true before its configuration can be treated as currently ready.',
43
44
  'Use eai workspace bootstrap-admin only for first-admin repair on an immediate child workspace.',
44
45
  'Query eai errors explain at most once for the original failure; reuse existing guidance across recovery steps. Never retry or explain a failed eai errors explain command.',
@@ -167,8 +168,10 @@ const guide = {
167
168
  {
168
169
  step: 5,
169
170
  title: 'Documents, files, and AI context',
170
- instruction: 'Choose the public v4 file model before writing code. Use document workflow commands for upload, classification, and RAG; use resource file commands for attachments to typed business records.',
171
+ instruction: 'Choose the public v4 file model before writing code. Configure bounded document fields and an existing published workflow classifier, then use document workflow commands for upload, classification, and readback. Use resource file commands for attachments to typed business records.',
171
172
  commands: [
173
+ { command: 'eai docs configure-type --help', mutates: false, purpose: 'Read the bounded launch configuration JSON shape before authoring a document type.' },
174
+ { command: 'eai docs configure-type --file document-type.json --tenant-id <workspace-id> --format json', mutates: true, purpose: 'Create and verify the tenant-owned leaf analyzer, then sync matching runtime rules. The file describes code, name, description and 1–32 scalar extract/generate fields; see command help. This does not publish or bind the workflow classifier.' },
172
175
  { command: 'eai docs upload <file>', mutates: true, purpose: 'Submit once for full processing with authorised app/workflow or project context; poll the returned job.' },
173
176
  { command: 'eai docs classify <file>', mutates: true, purpose: 'Submit once for classification with paired --vertical-key and --workflow-key or authorised project context; do not upload the file first.' },
174
177
  { command: 'eai docs index <document-id>', mutates: true, purpose: 'Index a document so AI/RAG workflows can answer from it.' },
@@ -1 +1 @@
1
- {"version":3,"file":"agent-guide.js","sourceRoot":"","sources":["../../src/lib/agent-guide.ts"],"names":[],"mappings":"AA0BA,MAAM,KAAK,GAAe;IACxB,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,6IAA6I;IACtJ,YAAY,EAAE,CAAC,uCAAuC,EAAE,mCAAmC,EAAE,qCAAqC,CAAC;IACnI,aAAa,EAAE;QACb;YACE,OAAO,EAAE,gBAAgB;YACzB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,qEAAqE;SAC/E;QACD;YACE,OAAO,EAAE,+BAA+B;YACxC,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,kDAAkD;SAC5D;QACD;YACE,OAAO,EAAE,oBAAoB;YAC7B,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,yFAAyF;SACnG;QACD;YACE,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,6EAA6E;SACvF;KACF;IACD,cAAc,EAAE;QACd,iFAAiF;QACjF,kDAAkD;QAClD,oYAAoY;QACpY,qpBAAqpB;QACrpB,+DAA+D;QAC/D,kPAAkP;QAClP,0DAA0D;QAC1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;CACF,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"agent-guide.js","sourceRoot":"","sources":["../../src/lib/agent-guide.ts"],"names":[],"mappings":"AA0BA,MAAM,KAAK,GAAe;IACxB,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,6IAA6I;IACtJ,YAAY,EAAE,CAAC,uCAAuC,EAAE,mCAAmC,EAAE,gCAAgC,EAAE,qCAAqC,CAAC;IACrK,aAAa,EAAE;QACb;YACE,OAAO,EAAE,gBAAgB;YACzB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,qEAAqE;SAC/E;QACD;YACE,OAAO,EAAE,+BAA+B;YACxC,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,kDAAkD;SAC5D;QACD;YACE,OAAO,EAAE,oBAAoB;YAC7B,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,yFAAyF;SACnG;QACD;YACE,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,6EAA6E;SACvF;KACF;IACD,cAAc,EAAE;QACd,iFAAiF;QACjF,kDAAkD;QAClD,oYAAoY;QACpY,qpBAAqpB;QACrpB,+DAA+D;QAC/D,kPAAkP;QAClP,0DAA0D;QAC1D,ucAAuc;QACvc,oNAAoN;QACpN,gQAAgQ;QAChQ,2MAA2M;QAC3M,iXAAiX;QACjX,sIAAsI;QACtI,slBAAslB;QACtlB,utBAAutB;QACvtB,gGAAgG;QAChG,4KAA4K;QAC5K,qFAAqF;QACrF,oiBAAoiB;QACpiB,gmBAAgmB;QAChmB,8NAA8N;QAC9N,4UAA4U;QAC5U,uJAAuJ;KACxJ;IACD,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,8GAA8G;SAC5H;QACD;YACE,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,mB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E,uFAAuF,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,gEAAgE,EAAE;gBAC/L,EAAE,OAAO,EAAE,yEAAyE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,6FAA6F,EAAE;gBAC9M,EAAE,OAAO,EAAE,iFAAiF,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,4EAA4E,EAAE;gBACrM,EAAE,OAAO,EAAE,gGAAgG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,wFAAwF,EAAE;gBAChO,EAAE,OAAO,EAAE,oHAAoH,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,+FAA+F,EAAE;gBAC1P,EAAE,OAAO,EAAE,yGAAyG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,8EAA8E,EAAE;gBAC/N,EAAE,OAAO,EAAE,oFAAoF,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,mEAAmE,EAAE;aAC/L;SACF;QACD;YACE,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,iJAAiJ;YAC9J,QAAQ,EAAE;gBACR,EAAE,OAAO,EAAE,mEAAmE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,kGAAkG,EAAE;gBAC5M,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,iFAAiF,EAAE;aACxI;SACF;KACF;IACD,cAAc,EAAE;QACd,2GAA2G;QAC3G,qHAAqH;QACrH,oFAAoF;QACpF,8FAA8F;QAC9F,sJAAsJ;KACvJ;CACF,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enterpriseai/cli",
3
- "version": "3.20.2",
3
+ "version": "3.20.4",
4
4
  "description": "EnterpriseAI CLI for app setup, validation, deployment readiness, and platform operations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@
13
13
  "lint": "eslint src/",
14
14
  "typecheck": "tsc --noEmit",
15
15
  "test": "vitest run",
16
- "test:eai-cli:ci": "node scripts/run-eai-cli-tests.cjs docs-site/scripts/build-site.test.mjs -- tests/unit/content-understanding-manifest.test.ts tests/integration/content-understanding.test.ts tests/unit/managed-profile-gateway.test.ts tests/unit/gofer-resource-override.test.ts tests/unit/init-app-binding.test.ts tests/unit/object-type-identifiers.test.ts tests/unit/release-terminology.test.ts tests/unit/ai-surfaces.test.ts tests/unit/eai-managed-deploy.test.ts tests/unit/eai-managed-deploy-write.test.ts tests/unit/eai-managed-source.test.ts tests/unit/eai-managed-source-race.test.ts tests/unit/eai-managed-source-client.test.ts tests/unit/customer-merged-commit.test.ts tests/integration/customer-merged-commit-command.test.ts tests/integration/object-type-documentation.test.ts tests/integration/login.test.ts tests/integration/whoami.test.ts tests/integration/tenant.test.ts tests/integration/init.test.ts tests/integration/create.test.ts tests/integration/splash.test.ts tests/integration/help.test.ts tests/integration/describe-contract.test.ts tests/integration/start.test.ts tests/integration/dev.test.ts tests/integration/update.test.ts tests/integration/output.test.ts tests/integration/error-guidance.test.ts tests/integration/resources-command.test.ts tests/integration/agent-guide.test.ts tests/integration/agent-discovery-eval.test.ts tests/integration/gofer.test.ts tests/integration/provision.test.ts tests/integration/types.test.ts tests/integration/user.test.ts tests/integration/publicapi.test.ts tests/integration/publicapi-v4-only.test.ts tests/integration/docs-classify.test.ts tests/integration/classifier.test.ts tests/integration/platform-api-client.test.ts tests/integration/eai-managed-deploy.test.ts tests/integration/vertical.test.ts tests/integration/dedicated-tenant-lifecycle.test.ts tests/integration/runtime-contract.test.ts tests/integration/inquirer-prompt-types.test.ts tests/integration/full-e2e-smoke.test.ts tests/integration/release-metadata.test.ts tests/integration/support.test.ts tests/integration/support-context.test.ts tests/unit/support-report.test.ts tests/unit/retired-support-phrases.test.ts tests/integration/verify-exit-status.test.ts tests/unit/cloud-env.test.ts tests/unit/env-command.test.ts tests/unit/profile-context.test.ts tests/unit/schema-builder.test.ts tests/unit/test-token-isolation.test.ts tests/unit/object-type-export.test.ts tests/unit/platform-diagnostics.test.ts tests/unit/cli-test-coverage.test.ts tests/unit/release-build.test.ts tests/integration/linked-sources.test.ts tests/integration/verify-calls.test.ts tests/unit/local-app-credential.test.ts tests/integration/chat-command.test.ts tests/integration/unsupported-command.test.ts tests/integration/cli-backend-audit.test.ts tests/integration/cli-qa-foundation.test.ts tests/integration/cli-permanent-cycles.test.ts tests/integration/cli-qa-authorization.test.ts tests/integration/cli-qa-build-receipt.test.ts --reporter=default --reporter=junit --outputFile=test-results/eai-cli-results.xml",
16
+ "test:eai-cli:ci": "node scripts/run-eai-cli-tests.cjs docs-site/scripts/build-site.test.mjs -- tests/unit/content-understanding-manifest.test.ts tests/integration/content-understanding.test.ts tests/unit/managed-profile-gateway.test.ts tests/unit/gofer-resource-override.test.ts tests/unit/init-app-binding.test.ts tests/unit/object-type-identifiers.test.ts tests/unit/release-terminology.test.ts tests/unit/ai-surfaces.test.ts tests/unit/eai-managed-deploy.test.ts tests/unit/eai-managed-deploy-write.test.ts tests/unit/eai-managed-source.test.ts tests/unit/eai-managed-source-race.test.ts tests/unit/eai-managed-source-client.test.ts tests/unit/customer-merged-commit.test.ts tests/integration/customer-merged-commit-command.test.ts tests/integration/object-type-documentation.test.ts tests/integration/login.test.ts tests/integration/whoami.test.ts tests/integration/tenant.test.ts tests/integration/init.test.ts tests/integration/create.test.ts tests/integration/splash.test.ts tests/integration/help.test.ts tests/integration/describe-contract.test.ts tests/integration/start.test.ts tests/integration/dev.test.ts tests/integration/update.test.ts tests/integration/output.test.ts tests/integration/error-guidance.test.ts tests/integration/resources-command.test.ts tests/integration/agent-guide.test.ts tests/integration/agent-discovery-eval.test.ts tests/integration/gofer.test.ts tests/integration/provision.test.ts tests/integration/types.test.ts tests/integration/user.test.ts tests/integration/publicapi.test.ts tests/integration/publicapi-v4-only.test.ts tests/integration/docs-classify.test.ts tests/integration/document-type-config.test.ts tests/integration/classifier.test.ts tests/integration/platform-api-client.test.ts tests/integration/eai-managed-deploy.test.ts tests/integration/vertical.test.ts tests/integration/dedicated-tenant-lifecycle.test.ts tests/integration/runtime-contract.test.ts tests/integration/inquirer-prompt-types.test.ts tests/integration/full-e2e-smoke.test.ts tests/integration/release-metadata.test.ts tests/integration/support.test.ts tests/integration/support-context.test.ts tests/unit/support-report.test.ts tests/unit/retired-support-phrases.test.ts tests/integration/verify-exit-status.test.ts tests/unit/cloud-env.test.ts tests/unit/env-command.test.ts tests/unit/profile-context.test.ts tests/unit/schema-builder.test.ts tests/unit/test-token-isolation.test.ts tests/unit/object-type-export.test.ts tests/unit/platform-diagnostics.test.ts tests/unit/cli-test-coverage.test.ts tests/unit/release-build.test.ts tests/integration/linked-sources.test.ts tests/integration/verify-calls.test.ts tests/unit/local-app-credential.test.ts tests/integration/chat-command.test.ts tests/integration/unsupported-command.test.ts tests/integration/cli-backend-audit.test.ts tests/integration/cli-qa-foundation.test.ts tests/integration/cli-permanent-cycles.test.ts tests/integration/cli-qa-authorization.test.ts tests/integration/cli-qa-build-receipt.test.ts --reporter=default --reporter=junit --outputFile=test-results/eai-cli-results.xml",
17
17
  "test:e2e-local": "bash scripts/test-local-dedicated-tenant-lifecycle.sh",
18
18
  "smoke:resourceapi-lifecycle": "bash scripts/smoke-resourceapi-schema-sync-lifecycle.sh",
19
19
  "smoke:eai-full:check": "node scripts/eai-full-e2e-smoke.cjs --check",
@@ -44,6 +44,12 @@ on:
44
44
  local_e2e_expires_at:
45
45
  description: Exact server-issued local dispatch expiry.
46
46
  required: false
47
+ local_e2e_template_commit_sha:
48
+ description: Exact server-pinned template SHA for a local CLI customer successor.
49
+ required: false
50
+ local_e2e_predecessor_operation_id:
51
+ description: Completed source operation recorded in the reviewed customer commit.
52
+ required: false
47
53
  publicapi_base_url:
48
54
  description: Deprecated alias for public_api_url; retained for compatibility.
49
55
  required: false
@@ -223,6 +229,8 @@ jobs:
223
229
  SOURCE_MODE: ${{ inputs.source_mode || 'source-unknown' }}
224
230
  LOCAL_E2E_TUNNEL: ${{ inputs.local_e2e_tunnel }}
225
231
  LOCAL_E2E_EXPIRES_AT: ${{ inputs.local_e2e_expires_at }}
232
+ LOCAL_E2E_TEMPLATE_COMMIT_SHA: ${{ inputs.local_e2e_template_commit_sha }}
233
+ LOCAL_E2E_PREDECESSOR_OPERATION_ID: ${{ inputs.local_e2e_predecessor_operation_id }}
226
234
  GITHUB_EVENT_NAME: ${{ github.event_name }}
227
235
  REUSABLE_CALL: ${{ inputs.eai_reusable_call }}
228
236
  REPOSITORY_ID: ${{ github.repository_id }}
@@ -244,6 +252,8 @@ jobs:
244
252
  --legacy-public-api-url "$LEGACY_PUBLIC_API_URL" \
245
253
  --local-e2e-tunnel "$LOCAL_E2E_TUNNEL" \
246
254
  --local-e2e-expires-at "$LOCAL_E2E_EXPIRES_AT" \
255
+ --local-e2e-template-commit-sha "$LOCAL_E2E_TEMPLATE_COMMIT_SHA" \
256
+ --local-e2e-predecessor-operation-id "$LOCAL_E2E_PREDECESSOR_OPERATION_ID" \
247
257
  --github-event-name "$GITHUB_EVENT_NAME" \
248
258
  --reusable-call "$REUSABLE_CALL" \
249
259
  --repository-id "$REPOSITORY_ID" \
@@ -351,6 +361,8 @@ jobs:
351
361
  EAI_BOUND_PUBLIC_API_URL: ${{ inputs.public_api_url || inputs.publicapi_base_url }}
352
362
  LOCAL_E2E_TUNNEL: ${{ inputs.local_e2e_tunnel }}
353
363
  LOCAL_E2E_EXPIRES_AT: ${{ inputs.local_e2e_expires_at }}
364
+ LOCAL_E2E_TEMPLATE_COMMIT_SHA: ${{ inputs.local_e2e_template_commit_sha }}
365
+ LOCAL_E2E_PREDECESSOR_OPERATION_ID: ${{ inputs.local_e2e_predecessor_operation_id }}
354
366
  GITHUB_EVENT_NAME: ${{ github.event_name }}
355
367
  REUSABLE_CALL: ${{ inputs.eai_reusable_call }}
356
368
  REPOSITORY_ID: ${{ github.repository_id }}
@@ -364,6 +376,8 @@ jobs:
364
376
  --public-api-url "$EAI_BOUND_PUBLIC_API_URL" \
365
377
  --local-e2e-tunnel "$LOCAL_E2E_TUNNEL" \
366
378
  --local-e2e-expires-at "$LOCAL_E2E_EXPIRES_AT" \
379
+ --local-e2e-template-commit-sha "$LOCAL_E2E_TEMPLATE_COMMIT_SHA" \
380
+ --local-e2e-predecessor-operation-id "$LOCAL_E2E_PREDECESSOR_OPERATION_ID" \
367
381
  --github-event-name "$GITHUB_EVENT_NAME" \
368
382
  --reusable-call "$REUSABLE_CALL" \
369
383
  --repository-id "$REPOSITORY_ID" \
@@ -437,6 +451,8 @@ jobs:
437
451
  SOURCE_MODE: ${{ inputs.source_mode || 'source-unknown' }}
438
452
  LOCAL_E2E_TUNNEL: ${{ inputs.local_e2e_tunnel }}
439
453
  LOCAL_E2E_EXPIRES_AT: ${{ inputs.local_e2e_expires_at }}
454
+ LOCAL_E2E_TEMPLATE_COMMIT_SHA: ${{ inputs.local_e2e_template_commit_sha }}
455
+ LOCAL_E2E_PREDECESSOR_OPERATION_ID: ${{ inputs.local_e2e_predecessor_operation_id }}
440
456
  GITHUB_EVENT_NAME: ${{ github.event_name }}
441
457
  REUSABLE_CALL: ${{ inputs.eai_reusable_call }}
442
458
  GITHUB_TOKEN: ${{ github.token }}
@@ -454,9 +470,13 @@ jobs:
454
470
  [[ ( "$SOURCE_MODE" == eai-cli-generated || "$SOURCE_MODE" == source-unknown ) && "$GITHUB_EVENT_NAME" == workflow_dispatch && "$REUSABLE_CALL" != true ]]
455
471
  [[ "$DEPLOY_ENVIRONMENT" == dev || "$DEPLOY_ENVIRONMENT" == preview ]]
456
472
  [[ "$EAI_BOUND_PUBLIC_API_URL" =~ ^https://[a-z0-9-]+-8000\.[a-z0-9-]+\.devtunnels\.ms$ ]]
473
+ if [[ -n "$LOCAL_E2E_PREDECESSOR_OPERATION_ID" ]]; then
474
+ [[ "$SOURCE_MODE" == eai-cli-generated && -n "$LOCAL_E2E_TEMPLATE_COMMIT_SHA" ]]
475
+ fi
457
476
  else
458
477
  [[ "$LOCAL_E2E_TUNNEL" == false || -z "$LOCAL_E2E_TUNNEL" ]]
459
478
  [[ -z "$LOCAL_E2E_EXPIRES_AT" ]]
479
+ [[ -z "$LOCAL_E2E_TEMPLATE_COMMIT_SHA" && -z "$LOCAL_E2E_PREDECESSOR_OPERATION_ID" ]]
460
480
  [[ "$EAI_BOUND_PUBLIC_API_URL" =~ ^https://(dev-api\.au|(test-api|api)\.(au|ca|eu))\.myenterprise\.ai/public/?$ ]]
461
481
  fi
462
482
  [[ "$APP_KEY" =~ ^[a-z][a-z0-9-]{1,62}$ ]]
@@ -813,6 +833,12 @@ jobs:
813
833
  if (!sourceUnknownLocal && !/^[a-f0-9]{40}$/.test(local.templateCommitSha)) {
814
834
  throw new Error('Build evidence local template binding changed.');
815
835
  }
836
+ if (sourceUnknownLocal
837
+ ? (process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA || process.env.LOCAL_E2E_PREDECESSOR_OPERATION_ID)
838
+ : (process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA &&
839
+ local.templateCommitSha !== process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA)) {
840
+ throw new Error('Build evidence local successor binding changed.');
841
+ }
816
842
  const tuple = sourceUnknownLocal
817
843
  ? ['eai.source-unknown-local-e2e-aud.v1', local.origin, process.env.TENANT_ID,
818
844
  process.env.TARGET_TENANT_ID || process.env.TENANT_ID, process.env.APP_KEY, evidence.operationId,
@@ -1014,7 +1040,37 @@ jobs:
1014
1040
  });
1015
1041
  NODE
1016
1042
 
1043
+ - name: Check GitHub attestation availability
1044
+ id: attestation-availability
1045
+ env:
1046
+ EXPECTED_REPOSITORY: ${{ github.repository }}
1047
+ EXPECTED_REPOSITORY_ID: ${{ github.repository_id }}
1048
+ EXPECTED_OWNER_ID: ${{ github.repository_owner_id }}
1049
+ shell: bash
1050
+ run: |
1051
+ node - <<'NODE'
1052
+ const { appendFileSync, readFileSync } = require('node:fs');
1053
+ const event = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'));
1054
+ const repository = event.repository;
1055
+ const owner = repository?.owner;
1056
+ if (!repository || !owner ||
1057
+ !Number.isSafeInteger(repository.id) || repository.id < 1 ||
1058
+ String(repository.id) !== process.env.EXPECTED_REPOSITORY_ID ||
1059
+ repository.full_name !== process.env.EXPECTED_REPOSITORY ||
1060
+ typeof repository.private !== 'boolean' ||
1061
+ !Number.isSafeInteger(owner.id) || owner.id < 1 ||
1062
+ String(owner.id) !== process.env.EXPECTED_OWNER_ID ||
1063
+ !['User', 'Organization'].includes(owner.type) ||
1064
+ owner.login !== process.env.EXPECTED_REPOSITORY.split('/')[0]) {
1065
+ throw new Error('GitHub attestation availability requires exact provider repository metadata.');
1066
+ }
1067
+ // SECURITY: GitHub rejects attestations for personal-account private repositories; OIDC-bound artifact verification remains mandatory.
1068
+ const available = !(repository.private && owner.type === 'User');
1069
+ appendFileSync(process.env.GITHUB_OUTPUT, `available=${available}\n`);
1070
+ NODE
1071
+
1017
1072
  - name: Attest immutable image archive provenance
1073
+ if: ${{ steps.attestation-availability.outputs.available == 'true' }}
1018
1074
  uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
1019
1075
  with:
1020
1076
  subject-path: .eai-build/eai-generated-app-image.tar
@@ -1028,6 +1084,8 @@ jobs:
1028
1084
  SOURCE_MODE: ${{ inputs.source_mode || 'source-unknown' }}
1029
1085
  LOCAL_E2E_TUNNEL: ${{ inputs.local_e2e_tunnel }}
1030
1086
  LOCAL_E2E_EXPIRES_AT: ${{ inputs.local_e2e_expires_at }}
1087
+ LOCAL_E2E_TEMPLATE_COMMIT_SHA: ${{ inputs.local_e2e_template_commit_sha }}
1088
+ LOCAL_E2E_PREDECESSOR_OPERATION_ID: ${{ inputs.local_e2e_predecessor_operation_id }}
1031
1089
  DEPLOY_ENVIRONMENT: ${{ needs.build.outputs.deployment_environment }}
1032
1090
  GITHUB_EVENT_NAME: ${{ github.event_name }}
1033
1091
  REUSABLE_CALL: ${{ inputs.eai_reusable_call }}
@@ -1053,6 +1111,10 @@ jobs:
1053
1111
  const repoId = process.env.GITHUB_REPOSITORY_ID;
1054
1112
  const expiry = process.env.LOCAL_E2E_EXPIRES_AT;
1055
1113
  const sourceUnknownLocal = process.env.SOURCE_MODE === 'source-unknown';
1114
+ if (sourceUnknownLocal
1115
+ ? (process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA || process.env.LOCAL_E2E_PREDECESSOR_OPERATION_ID)
1116
+ : (process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA &&
1117
+ local?.templateCommitSha !== process.env.LOCAL_E2E_TEMPLATE_COMMIT_SHA)) process.exit(1);
1056
1118
  const expectedKeys = sourceUnknownLocal
1057
1119
  ? 'audience,expiresAt,mode,nonceDigest,origin'
1058
1120
  : 'audience,expiresAt,mode,origin,templateCommitSha';
@@ -2,28 +2,28 @@
2
2
  "schemaVersion": "eai.managed-deploy-producer-pin.v1",
3
3
  "repository": "eai-support/eai-app-template",
4
4
  "candidate": {
5
- "commit": "c8a8aed26c4d159a4fa2598d9b5e8a495203dd8b",
5
+ "commit": "3162df8dffd36465ef2cec474eee4f8e6285ec3c",
6
6
  "workflow": {
7
7
  "path": ".github/workflows/eai-app.yml",
8
- "sha256": "sha256:bce4e34fe5c47377e6a679966a37257d944cd00ccf3c15b4ba437f144ed559ed"
8
+ "sha256": "sha256:74ede3c4e1de12fa5f63135349e61365bd845443dbb4dbe51573d8c490baa1d5"
9
9
  },
10
10
  "collector": {
11
11
  "path": "scripts/source-unknown-deployment-evidence.mjs",
12
- "sha256": "sha256:06e7f33bf1db1d7adbebb75a76d2756e46371318f36d2518c5cfbb58ad4f5e1c"
12
+ "sha256": "sha256:f20a4291b03b6f877ebaa9bdba9c2c2a839225d181c23b8be19a617a25536dc6"
13
13
  },
14
14
  "evidenceTest": {
15
15
  "path": "tests/source-unknown-deployment-evidence.test.mjs",
16
- "sha256": "sha256:fe5f8381d882ac39656b67b30e1e18193cb676a8aba26a6776a88880a3bb5827"
16
+ "sha256": "sha256:75140ba332d49d364f1f2792267aabcc9c50ed7a38a76e6e1702955ebd4e99f7"
17
17
  }
18
18
  },
19
19
  "releaseGate": {
20
20
  "status": "released",
21
- "tag": "v1.0.14",
22
- "commit": "c8a8aed26c4d159a4fa2598d9b5e8a495203dd8b"
21
+ "tag": "v1.0.17",
22
+ "commit": "3162df8dffd36465ef2cec474eee4f8e6285ec3c"
23
23
  },
24
24
  "githubProducerIdentity": {
25
25
  "profile": "github-environment-v1",
26
- "templateCommitSha": "c8a8aed26c4d159a4fa2598d9b5e8a495203dd8b",
27
- "workflowSha256": "sha256:bce4e34fe5c47377e6a679966a37257d944cd00ccf3c15b4ba437f144ed559ed"
26
+ "templateCommitSha": "3162df8dffd36465ef2cec474eee4f8e6285ec3c",
27
+ "workflowSha256": "sha256:74ede3c4e1de12fa5f63135349e61365bd845443dbb4dbe51573d8c490baa1d5"
28
28
  }
29
29
  }
@@ -173,7 +173,10 @@ function validateDeploymentBinding(options, mode) {
173
173
  function localE2eBinding(options, mode, environment, root) {
174
174
  const flag = option(options, 'localE2eTunnel');
175
175
  const expiresAt = option(options, 'localE2eExpiresAt');
176
- if (!['', 'false', 'true'].includes(flag) || (flag !== 'true' && expiresAt)) {
176
+ const serverTemplateCommitSha = option(options, 'localE2eTemplateCommitSha');
177
+ const predecessorOperationId = option(options, 'localE2ePredecessorOperationId');
178
+ if (!['', 'false', 'true'].includes(flag) ||
179
+ (flag !== 'true' && (expiresAt || serverTemplateCommitSha || predecessorOperationId))) {
177
180
  throw new Error('Local deployment inputs conflict.');
178
181
  }
179
182
  if (flag !== 'true') return null;
@@ -181,6 +184,7 @@ function localE2eBinding(options, mode, environment, root) {
181
184
  const operationId = option(options, 'operationId');
182
185
  const repositoryId = option(options, 'repositoryId');
183
186
  if (
187
+ (mode !== 'eai-cli-generated' && (serverTemplateCommitSha || predecessorOperationId)) ||
184
188
  !['eai-cli-generated', 'source-unknown'].includes(mode) ||
185
189
  !['preview', 'dev'].includes(environment) ||
186
190
  option(options, 'githubEventName') !== 'workflow_dispatch' ||
@@ -224,21 +228,39 @@ function localE2eBinding(options, mode, environment, root) {
224
228
  if (!/^cli-managed-[a-f0-9]{32}$/.test(operationId)) {
225
229
  throw new Error('Local CLI operation binding is invalid.');
226
230
  }
231
+ if ((serverTemplateCommitSha && !/^[a-f0-9]{40}$/.test(serverTemplateCommitSha)) ||
232
+ (predecessorOperationId && (!/^cli-managed-[a-f0-9]{32}$/.test(predecessorOperationId) ||
233
+ predecessorOperationId === operationId || !serverTemplateCommitSha))) {
234
+ throw new Error('Local CLI successor binding is invalid.');
235
+ }
227
236
  const binding = JSON.parse(readRegularFileNoFollow(root, '.eai/cli-managed-source-operation.json').toString('utf8'));
228
237
  if (
229
238
  binding.schemaVersion !== 'eai.cli_managed_source_operation.v1' ||
230
239
  binding.sourceMode !== mode ||
231
- binding.operationId !== operationId ||
240
+ (predecessorOperationId
241
+ ? (binding.predecessor?.operationId !== predecessorOperationId ||
242
+ !/^cli-managed-[a-f0-9]{32}$/.test(binding.operationId || '') ||
243
+ binding.operationId === operationId)
244
+ : binding.operationId !== operationId) ||
245
+ binding.tenantId !== option(options, 'tenantId') ||
246
+ binding.appKey !== option(options, 'appKey') ||
247
+ binding.targetTenantId !== option(options, 'targetTenantId') ||
232
248
  binding.environment !== environment ||
233
249
  binding.templateCommitSha?.match(/^[a-f0-9]{40}$/) === null ||
234
- !/^[a-f0-9]{40}$/.test(binding.templateCommitSha || '')
250
+ !/^[a-f0-9]{40}$/.test(binding.templateCommitSha || '') ||
251
+ (predecessorOperationId && binding.repositoryAuthority !== 'customer-owned') ||
252
+ (!predecessorOperationId && binding.repositoryAuthority === 'customer-owned') ||
253
+ (!predecessorOperationId && serverTemplateCommitSha &&
254
+ binding.templateCommitSha !== serverTemplateCommitSha)
235
255
  ) {
236
256
  throw new Error('Local deployment original source binding is invalid.');
237
257
  }
238
- const tuple = ['eai.cli-managed-local-e2e-aud.v1', origin, operationId, repositoryId, binding.templateCommitSha, expiresAt];
258
+ // SECURITY: the committed marker is historical for customer successors; the server pins the current template in its OIDC audience.
259
+ const templateCommitSha = serverTemplateCommitSha || binding.templateCommitSha;
260
+ const tuple = ['eai.cli-managed-local-e2e-aud.v1', origin, operationId, repositoryId, templateCommitSha, expiresAt];
239
261
  return {
240
262
  mode: 'local-tunnel-v1', origin, expiresAt,
241
- templateCommitSha: binding.templateCommitSha,
263
+ templateCommitSha,
242
264
  audience: LOCAL_E2E_AUDIENCE_PREFIX + createHash('sha256').update(JSON.stringify(tuple)).digest('hex'),
243
265
  };
244
266
  }
@@ -32,6 +32,8 @@ const canonicalWorkflowRelativePath = '.github/workflows/eai-app.yml';
32
32
  const fixtureDirectory = 'tests/fixtures/source-unknown';
33
33
  const canonicalDigest =
34
34
  'bce4e34fe5c47377e6a679966a37257d944cd00ccf3c15b4ba437f144ed559ed';
35
+ const currentWorkflowDigest =
36
+ '74ede3c4e1de12fa5f63135349e61365bd845443dbb4dbe51573d8c490baa1d5';
35
37
  const generatedDigest =
36
38
  '77d4951b3e6852ead73cef8b9e8901e3de774f9aca70f71cc0c932c13903ff32';
37
39
  const digest = (bytes) => createHash('sha256').update(bytes).digest('hex');
@@ -749,7 +751,7 @@ function resolveDeploymentWorkflowContext(
749
751
  if (!existsSync(manifestPath)) {
750
752
  assert.equal(
751
753
  digest(actual),
752
- canonicalDigest,
754
+ currentWorkflowDigest,
753
755
  'Template workflow must retain the pinned canonical digest.',
754
756
  );
755
757
  return {
@@ -762,7 +764,7 @@ function resolveDeploymentWorkflowContext(
762
764
  validateCliManifest(manifest);
763
765
  assert.equal(
764
766
  digest(actual),
765
- canonicalDigest,
767
+ currentWorkflowDigest,
766
768
  'CLI workflow must retain the pinned canonical digest.',
767
769
  );
768
770
  return {
@@ -1616,6 +1618,77 @@ test('workflow sends OIDC evidence directly to the canonical PublicAPI route', (
1616
1618
  }
1617
1619
  });
1618
1620
 
1621
+ test('GitHub attestation availability is exact and leaves signed handoff required', () => {
1622
+ const workflow = readFileSync(workflowPath, 'utf8');
1623
+ const decision = workflow.match(
1624
+ /- name: Check GitHub attestation availability[\s\S]*?run: \|\n node - <<'NODE'\n([\s\S]*?)\n NODE/,
1625
+ );
1626
+ assert.ok(decision);
1627
+ const script = decision[1].replace(/^ {10}/gm, '');
1628
+ assert.match(
1629
+ workflow,
1630
+ /- name: Attest immutable image archive provenance\n if: \$\{\{ steps\.attestation-availability\.outputs\.available == 'true' \}\}/,
1631
+ );
1632
+ assert.match(
1633
+ workflow,
1634
+ /- name: Request GitHub OIDC token and submit workflow evidence\n env:/,
1635
+ );
1636
+ const directory = mkdtempSync(join(tmpdir(), 'eai-attestation-availability-'));
1637
+ const eventPath = join(directory, 'event.json');
1638
+ const outputPath = join(directory, 'output');
1639
+ const repository = {
1640
+ id: 1414837259,
1641
+ full_name: 'customer/app',
1642
+ private: true,
1643
+ owner: { id: 332652381, login: 'customer', type: 'User' },
1644
+ };
1645
+ const check = (candidate) => {
1646
+ writeFileSync(eventPath, JSON.stringify({ repository: candidate }));
1647
+ writeFileSync(outputPath, '');
1648
+ const result = spawnSync(process.execPath, ['-'], {
1649
+ input: script,
1650
+ encoding: 'utf8',
1651
+ env: {
1652
+ ...process.env,
1653
+ GITHUB_EVENT_PATH: eventPath,
1654
+ GITHUB_OUTPUT: outputPath,
1655
+ EXPECTED_REPOSITORY: 'customer/app',
1656
+ EXPECTED_REPOSITORY_ID: '1414837259',
1657
+ EXPECTED_OWNER_ID: '332652381',
1658
+ },
1659
+ });
1660
+ return { result, output: readFileSync(outputPath, 'utf8') };
1661
+ };
1662
+ try {
1663
+ const personalPrivate = check(repository);
1664
+ assert.equal(personalPrivate.result.status, 0, personalPrivate.result.stderr);
1665
+ assert.equal(personalPrivate.output, 'available=false\n');
1666
+ for (const supported of [
1667
+ { ...repository, private: false },
1668
+ { ...repository, owner: { ...repository.owner, type: 'Organization' } },
1669
+ ]) {
1670
+ const outcome = check(supported);
1671
+ assert.equal(outcome.result.status, 0, outcome.result.stderr);
1672
+ assert.equal(outcome.output, 'available=true\n');
1673
+ }
1674
+ for (const invalid of [
1675
+ { ...repository, private: undefined },
1676
+ { ...repository, private: 'true' },
1677
+ { ...repository, id: 3 },
1678
+ { ...repository, full_name: 'other/app' },
1679
+ { ...repository, owner: { ...repository.owner, type: undefined } },
1680
+ { ...repository, owner: { ...repository.owner, id: 3 } },
1681
+ { ...repository, owner: { ...repository.owner, login: 'other' } },
1682
+ ]) {
1683
+ const outcome = check(invalid);
1684
+ assert.notEqual(outcome.result.status, 0);
1685
+ assert.equal(outcome.output, '');
1686
+ }
1687
+ } finally {
1688
+ rmSync(directory, { recursive: true, force: true });
1689
+ }
1690
+ });
1691
+
1619
1692
  test('reusable workflow compatibility keeps manual same-repository OIDC authority', () => {
1620
1693
  const workflow = readFileSync(workflowPath, 'utf8');
1621
1694
  const readme = readFileSync(readmePath, 'utf8');
@@ -1703,6 +1776,8 @@ test('local CLI dispatch binds direct DEV tunnel, original template and numeric
1703
1776
  writeFileSync(join(root, '.eai/cli-managed-source-operation.json'), JSON.stringify({
1704
1777
  schemaVersion: 'eai.cli_managed_source_operation.v1',
1705
1778
  sourceMode: 'eai-cli-generated', operationId, environment: 'dev',
1779
+ tenantId: 'tenant-parent', targetTenantId: 'hosting-tenant', appKey: 'rates-review',
1780
+ repositoryAuthority: 'eai-managed',
1706
1781
  templateCommitSha: 'b'.repeat(40),
1707
1782
  }));
1708
1783
  execFileSync('git', ['init', '-q'], { cwd: root });
@@ -1720,6 +1795,68 @@ test('local CLI dispatch binds direct DEV tunnel, original template and numeric
1720
1795
  '--local-e2e-expires-at', expiry, '--github-event-name', 'workflow_dispatch',
1721
1796
  '--reusable-call', 'false', '--repository-id', '12345'];
1722
1797
  runEvidenceScript(args);
1798
+ writeFileSync(join(root, '.eai/cli-managed-source-operation.json'), JSON.stringify({
1799
+ schemaVersion: 'eai.cli_managed_source_operation.v1', sourceMode: 'eai-cli-generated',
1800
+ operationId, environment: 'dev', tenantId: 'tenant-parent', targetTenantId: 'hosting-tenant',
1801
+ appKey: 'rates-review', repositoryAuthority: 'customer-owned', templateCommitSha: 'b'.repeat(40),
1802
+ }));
1803
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...args], { encoding: 'utf8' }).status, 1);
1804
+ writeFileSync(join(root, '.eai/cli-managed-source-operation.json'), JSON.stringify({
1805
+ schemaVersion: 'eai.cli_managed_source_operation.v1', sourceMode: 'eai-cli-generated',
1806
+ operationId, environment: 'dev', tenantId: 'tenant-parent', targetTenantId: 'hosting-tenant',
1807
+ appKey: 'rates-review', repositoryAuthority: 'eai-managed', templateCommitSha: 'b'.repeat(40),
1808
+ }));
1809
+ const sameTemplate = [...args, '--local-e2e-template-commit-sha', 'b'.repeat(40)];
1810
+ runEvidenceScript(sameTemplate);
1811
+ const wrongInitialTemplate = [...args, '--local-e2e-template-commit-sha', 'd'.repeat(40)];
1812
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...wrongInitialTemplate], { encoding: 'utf8' }).status, 1);
1813
+ const predecessorOperationId = `cli-managed-${'e'.repeat(32)}`;
1814
+ const historicalOperationId = `cli-managed-${'9'.repeat(32)}`;
1815
+ const successorMarker = {
1816
+ schemaVersion: 'eai.cli_managed_source_operation.v1',
1817
+ sourceMode: 'eai-cli-generated', operationId: historicalOperationId, environment: 'dev',
1818
+ tenantId: 'tenant-parent', targetTenantId: 'hosting-tenant', appKey: 'rates-review',
1819
+ repositoryAuthority: 'customer-owned', templateCommitSha: 'b'.repeat(40),
1820
+ predecessor: { operationId: predecessorOperationId },
1821
+ };
1822
+ const markerPath = join(root, '.eai/cli-managed-source-operation.json');
1823
+ writeFileSync(markerPath, JSON.stringify(successorMarker));
1824
+ const successor = [...args,
1825
+ '--local-e2e-template-commit-sha', 'd'.repeat(40),
1826
+ '--local-e2e-predecessor-operation-id', predecessorOperationId];
1827
+ runEvidenceScript(successor);
1828
+ runEvidenceScript(['collect', ...successor.slice(1),
1829
+ '--repo', 'customer/rates-review', '--workflow', '.github/workflows/eai-app.yml',
1830
+ '--ref', 'refs/heads/main', '--branch', 'main', '--workflow-run-id', '123456789',
1831
+ '--workflow-run-attempt', '1', '--artifact-id', '987654321',
1832
+ '--artifact-digest', `sha256:${'d'.repeat(64)}`, '--image-digest', `sha256:${'c'.repeat(64)}`]);
1833
+ const collected = JSON.parse(readFileSync(join(root,
1834
+ '.eai-build/evidence/source-unknown-deployment-evidence.json'), 'utf8'));
1835
+ const successorTuple = ['eai.cli-managed-local-e2e-aud.v1',
1836
+ 'https://careful-8000.eai.devtunnels.ms', operationId, '12345', 'd'.repeat(40), expiry];
1837
+ assert.equal(collected.localE2e.templateCommitSha, 'd'.repeat(40));
1838
+ assert.equal(collected.localE2e.audience,
1839
+ 'api://enterprise-ai-publicapi/eai-cli-generated/local-v1/' + digest(JSON.stringify(successorTuple)));
1840
+ writeFileSync(markerPath, JSON.stringify({ ...successorMarker,
1841
+ predecessor: { operationId: `cli-managed-${'f'.repeat(32)}` } }));
1842
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...successor], { encoding: 'utf8' }).status, 1);
1843
+ writeFileSync(markerPath, JSON.stringify({ ...successorMarker, repositoryAuthority: 'eai-managed' }));
1844
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...successor], { encoding: 'utf8' }).status, 1);
1845
+ writeFileSync(markerPath, JSON.stringify(successorMarker));
1846
+ for (const mutated of [
1847
+ [...args],
1848
+ [...successor.slice(0, -1), `cli-managed-${'f'.repeat(32)}`],
1849
+ [...args, '--local-e2e-predecessor-operation-id', predecessorOperationId],
1850
+ [...successor.slice(0, -3), 'not-a-sha', ...successor.slice(-2)],
1851
+ ]) {
1852
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...mutated], { encoding: 'utf8' }).status, 1);
1853
+ }
1854
+ const wrongScope = [...successor];
1855
+ wrongScope[wrongScope.indexOf('--tenant-id') + 1] = 'another-tenant';
1856
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...wrongScope], { encoding: 'utf8' }).status, 1);
1857
+ const wrongRepository = [...successor];
1858
+ wrongRepository[wrongRepository.indexOf('--repository-id') + 1] = '0';
1859
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...wrongRepository], { encoding: 'utf8' }).status, 1);
1723
1860
  for (const [key, value] of [
1724
1861
  ['--public-api-url', 'https://attacker.example'],
1725
1862
  ['--environment', 'test'],
@@ -1742,12 +1879,44 @@ test('local CLI dispatch binds direct DEV tunnel, original template and numeric
1742
1879
  const reusableInputs = workflow.slice(workflow.indexOf(' workflow_call:'), workflow.indexOf('\npermissions:'));
1743
1880
  assert.match(directInputs, /local_e2e_tunnel:/);
1744
1881
  assert.match(directInputs, /local_e2e_expires_at:/);
1745
- assert.doesNotMatch(reusableInputs, /local_e2e_tunnel:|local_e2e_expires_at:/);
1882
+ assert.match(directInputs, /local_e2e_template_commit_sha:/);
1883
+ assert.match(directInputs, /local_e2e_predecessor_operation_id:/);
1884
+ assert.doesNotMatch(reusableInputs, /local_e2e_tunnel:|local_e2e_expires_at:|local_e2e_template_commit_sha:|local_e2e_predecessor_operation_id:/);
1746
1885
  } finally {
1747
1886
  rmSync(root, { recursive: true, force: true });
1748
1887
  }
1749
1888
  });
1750
1889
 
1890
+ test('build and OIDC workflow stages enforce the same server-pinned successor template', () => {
1891
+ const workflow = readFileSync(workflowPath, 'utf8');
1892
+ const buildError = workflow.indexOf("throw new Error('Build evidence local successor binding changed.');");
1893
+ const buildStart = workflow.lastIndexOf('if (sourceUnknownLocal', buildError);
1894
+ const buildEnd = workflow.indexOf('\n const tuple =', buildError);
1895
+ const oidcStep = workflow.indexOf('name: Request GitHub OIDC token and submit workflow evidence');
1896
+ const oidcStart = workflow.indexOf('if (sourceUnknownLocal\n', oidcStep);
1897
+ const oidcEnd = workflow.indexOf('\n const expectedKeys', oidcStart);
1898
+ assert.ok(buildError > 0 && buildStart > 0 && buildEnd > buildError);
1899
+ assert.ok(oidcStep > 0 && oidcStart > oidcStep && oidcEnd > oidcStart);
1900
+ for (const guard of [workflow.slice(buildStart, buildEnd), workflow.slice(oidcStart, oidcEnd)]) {
1901
+ const runGuard = (sourceUnknownLocal, localSha, serverSha, predecessorId = '') => runInNewContext(guard, {
1902
+ sourceUnknownLocal,
1903
+ local: { templateCommitSha: localSha },
1904
+ process: {
1905
+ env: {
1906
+ LOCAL_E2E_TEMPLATE_COMMIT_SHA: serverSha,
1907
+ LOCAL_E2E_PREDECESSOR_OPERATION_ID: predecessorId,
1908
+ },
1909
+ exit(code) { throw new Error(`exit ${code}`); },
1910
+ },
1911
+ });
1912
+ assert.doesNotThrow(() => runGuard(false, 'a'.repeat(40), 'a'.repeat(40), `cli-managed-${'b'.repeat(32)}`));
1913
+ assert.throws(() => runGuard(false, 'a'.repeat(40), 'c'.repeat(40), `cli-managed-${'b'.repeat(32)}`));
1914
+ assert.doesNotThrow(() => runGuard(false, 'a'.repeat(40), ''));
1915
+ assert.throws(() => runGuard(true, 'a'.repeat(40), 'c'.repeat(40)));
1916
+ assert.throws(() => runGuard(true, 'a'.repeat(40), '', `cli-managed-${'b'.repeat(32)}`));
1917
+ }
1918
+ });
1919
+
1751
1920
  test('local customer-owned source uses its own exact direct-operation audience', () => {
1752
1921
  const root = mkdtempSync(join(tmpdir(), 'eai-source-unknown-local-dispatch-'));
1753
1922
  try {
@@ -1768,6 +1937,12 @@ test('local customer-owned source uses its own exact direct-operation audience',
1768
1937
  '--github-event-name', 'workflow_dispatch', '--reusable-call', 'false',
1769
1938
  '--repository-id', '12345'];
1770
1939
  runEvidenceScript(args);
1940
+ for (const extra of [
1941
+ ['--local-e2e-template-commit-sha', 'd'.repeat(40)],
1942
+ ['--local-e2e-predecessor-operation-id', `cli-managed-${'e'.repeat(32)}`],
1943
+ ]) {
1944
+ assert.equal(spawnSync(process.execPath, [evidenceScript, ...args, ...extra], { encoding: 'utf8' }).status, 1);
1945
+ }
1771
1946
  const withoutTarget = [...args];
1772
1947
  withoutTarget.splice(withoutTarget.indexOf('--target-tenant-id'), 2);
1773
1948
  runEvidenceScript(withoutTarget);
@@ -5583,6 +5758,9 @@ syncBuiltinESMExports();
5583
5758
  const root = repoRoot;
5584
5759
  const fixtures = join(root, 'tests/fixtures/source-unknown');
5585
5760
  const canonical = regularBytes(workflowPath);
5761
+ const legacyCanonical = existsSync(join(fixtures, 'eai-app.yml'))
5762
+ ? regularBytes(join(fixtures, 'eai-app.yml'))
5763
+ : canonical;
5586
5764
  // INVARIANT: synthetic controlled input stays inline so legacy four-file repairs execute every control without new fixture dependencies.
5587
5765
  const generated = gunzipSync(
5588
5766
  Buffer.from(
@@ -5654,7 +5832,7 @@ function contextFixture(t, manifest, workflow = canonical, operation) {
5654
5832
  mkdirSync(join(directory, '.github/workflows'), { recursive: true });
5655
5833
  mkdirSync(join(directory, 'tests/fixtures'), { recursive: true });
5656
5834
  mkdirSync(join(directory, fixtureDirectory), { recursive: true });
5657
- writeFileSync(join(directory, fixtureDirectory, 'eai-app.yml'), canonical);
5835
+ writeFileSync(join(directory, fixtureDirectory, 'eai-app.yml'), legacyCanonical);
5658
5836
  writeFileSync(
5659
5837
  join(directory, fixtureDirectory, 'generated-eai-app.yml'),
5660
5838
  generated,
@@ -6007,7 +6185,7 @@ test('generated contract fixture drift fails before comparison', () => {
6007
6185
  test('inline synthetic generated input retains repository and actual normalized export parity', () => {
6008
6186
  assert.equal(digest(generated), generatedDigest);
6009
6187
  if (existsSync(fixtures)) {
6010
- assert.ok(regularBytes(join(fixtures, 'eai-app.yml')).equals(canonical));
6188
+ assert.equal(digest(regularBytes(join(fixtures, 'eai-app.yml'))), canonicalDigest);
6011
6189
  assert.ok(
6012
6190
  regularBytes(join(fixtures, 'generated-eai-app.yml')).equals(generated),
6013
6191
  );
@@ -6023,7 +6201,7 @@ test('inline synthetic generated input retains repository and actual normalized
6023
6201
  );
6024
6202
  assert.equal(
6025
6203
  digest(regularBytes(join(root, canonicalWorkflowRelativePath))),
6026
- canonicalDigest,
6204
+ currentWorkflowDigest,
6027
6205
  );
6028
6206
  }
6029
6207
  });
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "appTemplate": {
9
9
  "repo": "https://github.com/eai-support/eai-app-template.git",
10
- "version": "v1.0.14",
11
- "commit": "c8a8aed26c4d159a4fa2598d9b5e8a495203dd8b",
10
+ "version": "v1.0.17",
11
+ "commit": "3162df8dffd36465ef2cec474eee4f8e6285ec3c",
12
12
  "packageLockSha256": "5b04e0be44ef93a817e4dc5076914d0f0684712b41155ee2934ce42f184df415",
13
13
  "enterpriseRegistry": "https://enterpriseaigroup.github.io/enterpriseai-packages/registry",
14
14
  "enterprisePackageFingerprint": "3286fdf91d6a25a55a4d84de21bf5c592bcf11abffb96dc2be90e93414eeb646",