@enterpriseai/cli 3.19.5 → 3.20.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/dist/commands/content-understanding.d.ts +15 -0
- package/dist/commands/content-understanding.d.ts.map +1 -0
- package/dist/commands/content-understanding.js +277 -0
- package/dist/commands/content-understanding.js.map +1 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +129 -1
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/eai-managed-deploy-output.d.ts.map +1 -1
- package/dist/commands/eai-managed-deploy-output.js +12 -2
- package/dist/commands/eai-managed-deploy-output.js.map +1 -1
- package/dist/commands/eai-managed-source-authorize-commit.d.ts +28 -0
- package/dist/commands/eai-managed-source-authorize-commit.d.ts.map +1 -0
- package/dist/commands/eai-managed-source-authorize-commit.js +200 -0
- package/dist/commands/eai-managed-source-authorize-commit.js.map +1 -0
- package/dist/commands/eai-managed-source-move.d.ts.map +1 -1
- package/dist/commands/eai-managed-source-move.js +3 -0
- package/dist/commands/eai-managed-source-move.js.map +1 -1
- package/dist/commands/resources.d.ts.map +1 -1
- package/dist/commands/resources.js +6 -6
- package/dist/commands/resources.js.map +1 -1
- package/dist/index.js +65 -11
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-guide.d.ts.map +1 -1
- package/dist/lib/agent-guide.js +12 -1
- package/dist/lib/agent-guide.js.map +1 -1
- package/dist/lib/api.d.ts +46 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +85 -2
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/cli-qa-transport.d.ts +7 -0
- package/dist/lib/cli-qa-transport.d.ts.map +1 -0
- package/dist/lib/cli-qa-transport.js +18 -0
- package/dist/lib/cli-qa-transport.js.map +1 -0
- package/dist/lib/content-understanding-client.d.ts +64 -0
- package/dist/lib/content-understanding-client.d.ts.map +1 -0
- package/dist/lib/content-understanding-client.js +105 -0
- package/dist/lib/content-understanding-client.js.map +1 -0
- package/dist/lib/content-understanding-manifest.d.ts +39 -0
- package/dist/lib/content-understanding-manifest.d.ts.map +1 -0
- package/dist/lib/content-understanding-manifest.js +265 -0
- package/dist/lib/content-understanding-manifest.js.map +1 -0
- package/dist/lib/context.d.ts +3 -0
- package/dist/lib/context.d.ts.map +1 -1
- package/dist/lib/context.js +12 -2
- package/dist/lib/context.js.map +1 -1
- package/dist/lib/eai-managed-source-client-types.d.ts +37 -1
- package/dist/lib/eai-managed-source-client-types.d.ts.map +1 -1
- package/dist/lib/eai-managed-source-operation-client.d.ts +3 -0
- package/dist/lib/eai-managed-source-operation-client.d.ts.map +1 -1
- package/dist/lib/eai-managed-source-operation-client.js +56 -1
- package/dist/lib/eai-managed-source-operation-client.js.map +1 -1
- package/dist/lib/eai-managed-source-publication-client.d.ts.map +1 -1
- package/dist/lib/eai-managed-source-publication-client.js +1 -0
- package/dist/lib/eai-managed-source-publication-client.js.map +1 -1
- package/dist/lib/error-codes.d.ts +1 -1
- package/dist/lib/error-codes.d.ts.map +1 -1
- package/dist/lib/error-codes.js +6 -3
- package/dist/lib/error-codes.js.map +1 -1
- package/dist/lib/tenant-context.d.ts +7 -0
- package/dist/lib/tenant-context.d.ts.map +1 -1
- package/dist/lib/tenant-context.js +17 -4
- package/dist/lib/tenant-context.js.map +1 -1
- package/package.json +2 -2
- package/resources/content-understanding/contract-golden.json +444 -0
- package/resources/content-understanding/manifest.schema.json +551 -0
- package/resources/content-understanding/procurement-example.json +135 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eai-managed-deploy-output.js","sourceRoot":"","sources":["../../src/commands/eai-managed-deploy-output.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,iCAAiC,GAGlC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,GAAG,MAAM,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CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;IACH,IAAI,8BAA8B,CAAC,SAAS,CAAC,KAAK,QAAQ;QACxD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type CliCustomerCommitRequest } from '../lib/api.js';
|
|
3
|
+
import type { CliManagedSourceScope } from '../lib/eai-managed-source-client-types.js';
|
|
4
|
+
interface CommitOptions {
|
|
5
|
+
tenantId: string;
|
|
6
|
+
targetTenantId: string;
|
|
7
|
+
environment: string;
|
|
8
|
+
githubLinkSession: string;
|
|
9
|
+
predecessorOperation: string;
|
|
10
|
+
predecessorIntegrity: string;
|
|
11
|
+
predecessorCommit: string;
|
|
12
|
+
pullRequest: string;
|
|
13
|
+
commit: string;
|
|
14
|
+
authorizeExactCommit?: boolean;
|
|
15
|
+
format: string;
|
|
16
|
+
}
|
|
17
|
+
/** The root profile hook must check consent before reading any private profile configuration. */
|
|
18
|
+
export declare function validateCustomerCommitPreAction(command: Command): void;
|
|
19
|
+
/** A current server-verified anchor exposes the exact predecessor without granting a new operation. */
|
|
20
|
+
export declare function validateCustomerCommitAnchor(value: unknown, scope: CliManagedSourceScope): Record<string, unknown>;
|
|
21
|
+
export declare function createCustomerCommitAnchorCommand(): Command;
|
|
22
|
+
/** Once consent was submitted, generic same-command retry guidance cannot preserve its one-shot body. */
|
|
23
|
+
export declare function customerCommitFailure(error: unknown, admissionIssued: boolean): unknown;
|
|
24
|
+
/** This explicit action authorizes already-merged bytes, never supplies a provider review claim. */
|
|
25
|
+
export declare function customerCommitRequest(options: CommitOptions, scope: CliManagedSourceScope): CliCustomerCommitRequest;
|
|
26
|
+
export declare function createCustomerCommitCommand(): Command;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=eai-managed-source-authorize-commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eai-managed-source-authorize-commit.d.ts","sourceRoot":"","sources":["../../src/commands/eai-managed-source-authorize-commit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAoD,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAOhH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAMvF,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IACzF,oBAAoB,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IACtF,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CACrF;AAED,iGAAiG;AACjG,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOtE;AAED,uGAAuG;AACvG,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2BlH;AAED,wBAAgB,iCAAiC,IAAI,OAAO,CAwB3D;AAED,yGAAyG;AACzG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,GAAG,OAAO,CAMvF;AAED,oGAAoG;AACpG,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB,GAAG,wBAAwB,CAwBpH;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CAqErD"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { PlatformAPIClient, readManagedPublicResponseText } from '../lib/api.js';
|
|
4
|
+
import { normalizeFormat, resolveCommandContext } from '../lib/context.js';
|
|
5
|
+
import { ManagedSourceError } from '../lib/eai-managed-source.js';
|
|
6
|
+
import { requireManagedPublicApiUrl } from '../lib/eai-managed-deploy.js';
|
|
7
|
+
import { CLI_MANAGED_SOURCE_OPERATION_ID, isManagedScopeIdentifier } from '../lib/eai-managed-identifiers.js';
|
|
8
|
+
import { validateCliGithubLinkSession } from '../lib/eai-managed-source-link-client.js';
|
|
9
|
+
import { cliManagedSourceIdempotencyKey, responseOperation, validateCliManagedSourceOperation } from '../lib/eai-managed-source-operation-client.js';
|
|
10
|
+
import * as out from '../lib/output.js';
|
|
11
|
+
import { fail, ManagedDeployFailure, MANAGED_DEPLOY_ENVIRONMENTS } from './eai-managed-deploy-contract.js';
|
|
12
|
+
import { printFailure, printManagedSourceOperation } from './eai-managed-deploy-output.js';
|
|
13
|
+
import { isRecord } from './eai-managed-deploy-contract.js';
|
|
14
|
+
/** The root profile hook must check consent before reading any private profile configuration. */
|
|
15
|
+
export function validateCustomerCommitPreAction(command) {
|
|
16
|
+
if (command.name() !== 'authorize-commit' || command.parent?.name() !== 'source'
|
|
17
|
+
|| command.parent.parent?.name() !== 'deploy')
|
|
18
|
+
return;
|
|
19
|
+
const options = command.optsWithGlobals();
|
|
20
|
+
if (!['text', 'json'].includes(normalizeFormat(options)))
|
|
21
|
+
throw new Error('Choose --format text or --format json.');
|
|
22
|
+
customerCommitRequest(options, { tenantId: options.tenantId, targetTenantId: options.targetTenantId,
|
|
23
|
+
appKey: command.processedArgs[0], environment: options.environment, actorId: '' });
|
|
24
|
+
}
|
|
25
|
+
/** A current server-verified anchor exposes the exact predecessor without granting a new operation. */
|
|
26
|
+
export function validateCustomerCommitAnchor(value, scope) {
|
|
27
|
+
if (!isRecord(value) || !isRecord(value.repository) || !isRecord(value.verifiedGithubUser)
|
|
28
|
+
|| value.schemaVersion !== 'eai.cli_managed_source_anchor.v1' || value.status !== 'completed'
|
|
29
|
+
|| value.sourceMode !== 'eai-cli-generated' || value.repositoryAuthority !== 'customer-owned'
|
|
30
|
+
|| value.actorId !== scope.actorId || value.verifiedGithubUser.actorId !== scope.actorId
|
|
31
|
+
|| value.tenantId !== scope.tenantId || value.targetTenantId !== scope.targetTenantId
|
|
32
|
+
|| value.appKey !== scope.appKey || value.environment !== scope.environment
|
|
33
|
+
|| typeof value.operationId !== 'string' || !CLI_MANAGED_SOURCE_OPERATION_ID.test(value.operationId)
|
|
34
|
+
|| typeof value.integrityHash !== 'string' || !/^sha256:[a-f0-9]{64}$/.test(value.integrityHash)
|
|
35
|
+
|| typeof value.mergedCommitSha !== 'string' || !/^[a-f0-9]{40}$/.test(value.mergedCommitSha)
|
|
36
|
+
|| typeof value.configHash !== 'string' || !/^sha256:[a-f0-9]{64}$/.test(value.configHash)
|
|
37
|
+
|| !Number.isSafeInteger(value.repository.id) || value.repository.id < 1
|
|
38
|
+
|| typeof value.repository.nodeId !== 'string' || !value.repository.nodeId
|
|
39
|
+
|| typeof value.repository.owner !== 'string' || !/^[a-z\d][a-z\d-]{0,38}$/i.test(value.repository.owner)
|
|
40
|
+
|| typeof value.repository.name !== 'string' || !/^[A-Za-z0-9_.-]+$/.test(value.repository.name)
|
|
41
|
+
|| typeof value.repository.defaultBranch !== 'string' || !value.repository.defaultBranch
|
|
42
|
+
|| value.repository.private !== true
|
|
43
|
+
|| typeof value.repository.installationId !== 'string' || !/^[1-9][0-9]*$/.test(value.repository.installationId)
|
|
44
|
+
|| !Number.isSafeInteger(value.verifiedGithubUser.id) || value.verifiedGithubUser.id < 1) {
|
|
45
|
+
fail('CUSTOMER_COMMIT_ANCHOR_MISMATCH', 'The current source anchor does not match this customer and exact app scope.', 'Inspect the current app source as the linked customer; do not infer a predecessor from another operation.');
|
|
46
|
+
}
|
|
47
|
+
return { schemaVersion: value.schemaVersion, status: value.status, sourceMode: value.sourceMode,
|
|
48
|
+
repositoryAuthority: value.repositoryAuthority, actorId: value.actorId, tenantId: value.tenantId,
|
|
49
|
+
targetTenantId: value.targetTenantId, appKey: value.appKey, environment: value.environment,
|
|
50
|
+
operationId: value.operationId, integrityHash: value.integrityHash, mergedCommitSha: value.mergedCommitSha,
|
|
51
|
+
configHash: value.configHash, repository: value.repository };
|
|
52
|
+
}
|
|
53
|
+
export function createCustomerCommitAnchorCommand() {
|
|
54
|
+
return new Command('anchor').description('Read the current customer-owned CLI source anchor without authorizing a commit')
|
|
55
|
+
.argument('<app-key>').requiredOption('--tenant-id <id>', 'Exact app-owning tenant')
|
|
56
|
+
.requiredOption('--target-tenant-id <id>', 'Exact runtime tenant')
|
|
57
|
+
.requiredOption('--environment <environment>', 'Exact environment')
|
|
58
|
+
.option('--format <format>', 'Output format (text|json)', 'text')
|
|
59
|
+
.action(async (appKey, options) => {
|
|
60
|
+
const format = normalizeFormat(options);
|
|
61
|
+
try {
|
|
62
|
+
if (!['text', 'json'].includes(format) || ![appKey, options.tenantId, options.targetTenantId].every(isManagedScopeIdentifier)
|
|
63
|
+
|| !MANAGED_DEPLOY_ENVIRONMENTS.has(options.environment))
|
|
64
|
+
throw new Error('Choose a canonical app scope and output format.');
|
|
65
|
+
const context = await resolveCommandContext({ tenantId: options.tenantId, interactive: false,
|
|
66
|
+
forceRefresh: true, validatePublicApiUrl: requireManagedPublicApiUrl });
|
|
67
|
+
if (context.tenantId !== options.tenantId || !context.tokens.oid)
|
|
68
|
+
throw new Error('The active customer does not match the app tenant.');
|
|
69
|
+
const scope = { tenantId: options.tenantId, targetTenantId: options.targetTenantId, appKey,
|
|
70
|
+
environment: options.environment, actorId: context.tokens.oid };
|
|
71
|
+
const client = new PlatformAPIClient(context.publicApiUrl, scope.tenantId);
|
|
72
|
+
const response = await client.getCliManagedSourceAnchor(scope.tenantId, appKey, scope.targetTenantId, scope.environment);
|
|
73
|
+
if (!response.ok)
|
|
74
|
+
throw new Error('The current source anchor is unavailable.');
|
|
75
|
+
const anchor = validateCustomerCommitAnchor(JSON.parse(await readManagedPublicResponseText(response)), scope);
|
|
76
|
+
if (format === 'json')
|
|
77
|
+
out.json(anchor);
|
|
78
|
+
else
|
|
79
|
+
out.info(JSON.stringify(anchor, null, 2));
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
printFailure(format, error);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** Once consent was submitted, generic same-command retry guidance cannot preserve its one-shot body. */
|
|
87
|
+
export function customerCommitFailure(error, admissionIssued) {
|
|
88
|
+
if (!admissionIssued)
|
|
89
|
+
return error;
|
|
90
|
+
const code = error instanceof ManagedDeployFailure || error instanceof ManagedSourceError
|
|
91
|
+
? error.code : 'EAI_MANAGED_DEPLOY_FAILED';
|
|
92
|
+
return new ManagedDeployFailure(code, error instanceof Error ? error.message : String(error), 'Observe the current operation/status read-only before another authorization. Do not repeat consent or change the idempotency key after an ambiguous response; an existing authorization remains immutable.');
|
|
93
|
+
}
|
|
94
|
+
/** This explicit action authorizes already-merged bytes, never supplies a provider review claim. */
|
|
95
|
+
export function customerCommitRequest(options, scope) {
|
|
96
|
+
const number = Number(options.pullRequest);
|
|
97
|
+
if (options.authorizeExactCommit !== true
|
|
98
|
+
|| typeof options.pullRequest !== 'string'
|
|
99
|
+
|| ![scope.tenantId, scope.targetTenantId, scope.appKey].every(isManagedScopeIdentifier)
|
|
100
|
+
|| !MANAGED_DEPLOY_ENVIRONMENTS.has(scope.environment)
|
|
101
|
+
|| !/^[1-9][0-9]*$/.test(options.pullRequest) || !Number.isSafeInteger(number)
|
|
102
|
+
|| !CLI_MANAGED_SOURCE_OPERATION_ID.test(options.predecessorOperation)
|
|
103
|
+
|| !/^sha256:[a-f0-9]{64}$/.test(options.predecessorIntegrity)
|
|
104
|
+
|| !/^[a-f0-9]{40}$/.test(options.predecessorCommit) || !/^[a-f0-9]{40}$/.test(options.commit)
|
|
105
|
+
|| options.commit === options.predecessorCommit
|
|
106
|
+
|| !/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(options.githubLinkSession)) {
|
|
107
|
+
fail('CUSTOMER_COMMIT_CONSENT_INVALID', 'Exact commit authorization requires explicit consent and canonical scope/PR/predecessor.', 'Read the current source anchor, verify the merged PR, then supply --authorize-exact-commit with its exact immutable fields.');
|
|
108
|
+
}
|
|
109
|
+
const predecessor = { operationId: options.predecessorOperation, integrityHash: options.predecessorIntegrity, mergedCommitSha: options.predecessorCommit };
|
|
110
|
+
const digest = createHash('sha256').update(JSON.stringify(['customer-exact-commit-v1', predecessor, number, options.commit])).digest('hex');
|
|
111
|
+
return {
|
|
112
|
+
schemaVersion: 'eai.cli_customer_commit_request.v1', targetTenantId: scope.targetTenantId,
|
|
113
|
+
environment: scope.environment, githubLinkSessionId: options.githubLinkSession,
|
|
114
|
+
idempotencyKey: cliManagedSourceIdempotencyKey(scope, digest), predecessor,
|
|
115
|
+
pullRequestNumber: number, expectedMergedCommitSha: options.commit,
|
|
116
|
+
customerAuthorization: { kind: 'authenticated-exact-commit', pullRequestNumber: number, mergedCommitSha: options.commit },
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export function createCustomerCommitCommand() {
|
|
120
|
+
return new Command('authorize-commit')
|
|
121
|
+
.description('Authorize one exact already-merged customer commit in the retained CLI repository')
|
|
122
|
+
.argument('<app-key>')
|
|
123
|
+
.requiredOption('--tenant-id <id>', 'Exact app-owning tenant')
|
|
124
|
+
.requiredOption('--target-tenant-id <id>', 'Exact runtime tenant')
|
|
125
|
+
.requiredOption('--environment <environment>', 'Exact environment')
|
|
126
|
+
.requiredOption('--github-link-session <id>', 'Fresh verified same-customer GitHub link session')
|
|
127
|
+
.requiredOption('--predecessor-operation <id>', 'Completed current source anchor operation')
|
|
128
|
+
.requiredOption('--predecessor-integrity <digest>', 'Signed current anchor integrity hash')
|
|
129
|
+
.requiredOption('--predecessor-commit <sha>', 'Current signed source anchor commit')
|
|
130
|
+
.requiredOption('--pull-request <number>', 'Exact merged customer PR')
|
|
131
|
+
.requiredOption('--commit <sha>', 'Exact merged commit that must still be current main')
|
|
132
|
+
.option('--authorize-exact-commit', 'Explicitly authorize these exact merged bytes; not a GitHub review approval')
|
|
133
|
+
.option('--format <format>', 'Output format (text|json)', 'text')
|
|
134
|
+
.action(async (appKey, options) => {
|
|
135
|
+
const format = normalizeFormat(options);
|
|
136
|
+
let admissionIssued = false;
|
|
137
|
+
try {
|
|
138
|
+
if (!['text', 'json'].includes(format))
|
|
139
|
+
throw new Error('Choose --format text or --format json.');
|
|
140
|
+
// Validate consent before credential/profile access or any provider/customer request.
|
|
141
|
+
const provisional = { tenantId: options.tenantId, targetTenantId: options.targetTenantId,
|
|
142
|
+
appKey, environment: options.environment, actorId: '' };
|
|
143
|
+
customerCommitRequest(options, provisional);
|
|
144
|
+
const context = await resolveCommandContext({ tenantId: options.tenantId, interactive: false,
|
|
145
|
+
forceRefresh: true, validatePublicApiUrl: requireManagedPublicApiUrl });
|
|
146
|
+
if (context.tenantId !== options.tenantId || !context.tokens.oid) {
|
|
147
|
+
fail('CUSTOMER_COMMIT_ACTOR_INVALID', 'The active customer does not match the exact app tenant.', 'Sign in as the linked app owner.');
|
|
148
|
+
}
|
|
149
|
+
const scope = { ...provisional, actorId: context.tokens.oid };
|
|
150
|
+
const request = customerCommitRequest(options, scope);
|
|
151
|
+
const client = new PlatformAPIClient(context.publicApiUrl, scope.tenantId);
|
|
152
|
+
const anchorResponse = await client.getCliManagedSourceAnchor(scope.tenantId, appKey, scope.targetTenantId, scope.environment);
|
|
153
|
+
if (!anchorResponse.ok)
|
|
154
|
+
throw new Error('The current source anchor is unavailable.');
|
|
155
|
+
const anchor = validateCustomerCommitAnchor(JSON.parse(await readManagedPublicResponseText(anchorResponse)), scope);
|
|
156
|
+
if (anchor.operationId !== request.predecessor.operationId || anchor.integrityHash !== request.predecessor.integrityHash
|
|
157
|
+
|| anchor.mergedCommitSha !== request.predecessor.mergedCommitSha) {
|
|
158
|
+
throw new Error('The current source anchor differs from the requested predecessor.');
|
|
159
|
+
}
|
|
160
|
+
const linkResponse = await client.getCliManagedGithubLinkSession(scope.tenantId, appKey, options.githubLinkSession, scope.targetTenantId, scope.environment);
|
|
161
|
+
if (!linkResponse.ok)
|
|
162
|
+
throw new Error('The exact GitHub link session is unavailable.');
|
|
163
|
+
const link = validateCliGithubLinkSession(JSON.parse(await readManagedPublicResponseText(linkResponse)), scope, options.githubLinkSession);
|
|
164
|
+
if (link.status !== 'verified')
|
|
165
|
+
throw new Error('A verified same-customer GitHub link is required.');
|
|
166
|
+
client.assertProfileAuthority();
|
|
167
|
+
admissionIssued = true;
|
|
168
|
+
const operation = validateCliManagedSourceOperation(await responseOperation(await client.authorizeCliCustomerCommit(scope.tenantId, appKey, request)), scope, { githubLinkSessionId: options.githubLinkSession, verifiedGithubUser: link.verifiedGithubUser });
|
|
169
|
+
if (operation.sourceProvenance?.commitSha !== options.commit
|
|
170
|
+
|| !['deploying', 'handoff_pending', 'completed', 'failed'].includes(operation.status)
|
|
171
|
+
|| operation.sourceProvenance.pullRequest.number !== request.pullRequestNumber
|
|
172
|
+
|| !['id', 'nodeId', 'owner', 'name', 'private', 'defaultBranch', 'installationId']
|
|
173
|
+
.every(key => operation.repository[key] === anchor.repository[key])
|
|
174
|
+
|| operation.predecessor?.operationId !== request.predecessor.operationId
|
|
175
|
+
|| operation.predecessor?.integrityHash !== request.predecessor.integrityHash
|
|
176
|
+
|| operation.predecessor?.mergedCommitSha !== request.predecessor.mergedCommitSha) {
|
|
177
|
+
throw new Error('Exact customer commit authorization response does not match the requested predecessor and commit.');
|
|
178
|
+
}
|
|
179
|
+
if (operation.status === 'failed') {
|
|
180
|
+
printManagedSourceOperation(format, operation);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const result = { status: 'customer-commit-authorized', operationId: operation.operationId,
|
|
184
|
+
commitSha: options.commit, pullRequestNumber: request.pullRequestNumber,
|
|
185
|
+
sourceProvenance: operation.sourceProvenance, customerAuthorization: operation.customerAuthorization,
|
|
186
|
+
githubApprovedReviewClaim: false, publicationStatus: operation.status,
|
|
187
|
+
nextAction: `Observe the exact operation with eai deploy app ${appKey} --target eai --tenant-id ${scope.tenantId} --target-tenant-id ${scope.targetTenantId} --environment ${scope.environment} --resume ${operation.operationId} --format json` };
|
|
188
|
+
if (format === 'json')
|
|
189
|
+
out.json(result);
|
|
190
|
+
else {
|
|
191
|
+
out.success('Exact merged customer commit authorized. Deployment completion is separate.');
|
|
192
|
+
out.info(result.nextAction);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
printFailure(format, customerCommitFailure(error, admissionIssued));
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=eai-managed-source-authorize-commit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eai-managed-source-authorize-commit.js","sourceRoot":"","sources":["../../src/commands/eai-managed-source-authorize-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAiC,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC9G,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAErJ,OAAO,KA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AAC,gBAAgB,EAAE,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;gBACpG,yBAAyB,EAAE,KAAK,EAAE,iBAAiB,EAAE,SAAS,CAAC,MAAM;gBACrE,UAAU,EAAE,mDAAmD,MAAM,6BAA6B,KAAK,CAAC,QAAQ,uBAAuB,KAAK,CAAC,cAAc,kBAAkB,KAAK,CAAC,WAAW,aAAa,SAAS,CAAC,WAAW,gBAAgB,EAAE,CAAC;YACrP,IAAI,MAAM,KAAK,MAAM;gBAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACnC,CAAC;gBAAC,GAAG,CAAC,OAAO,CAAC,6EAA6E,CAAC,CAAC;gBAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAAC,CAAC;QACnI,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,YAAY,CAAC,MAAM,EAAE,qBAAqB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;QAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eai-managed-source-move.d.ts","sourceRoot":"","sources":["../../src/commands/eai-managed-source-move.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"eai-managed-source-move.d.ts","sourceRoot":"","sources":["../../src/commands/eai-managed-source-move.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,mGAAmG;AACnG,eAAO,MAAM,uBAAuB,SACoB,CAAC"}
|
|
@@ -13,11 +13,14 @@ import { fail, MANAGED_DEPLOY_ENVIRONMENTS } from "./eai-managed-deploy-contract
|
|
|
13
13
|
import { readUnifiedExactOperation } from "./eai-managed-deploy-operation.js";
|
|
14
14
|
import { printFailure } from "./eai-managed-deploy-output.js";
|
|
15
15
|
import { createManagedSourceValidateCommand } from "./eai-managed-source-validate.js";
|
|
16
|
+
import { createCustomerCommitCommand, createCustomerCommitAnchorCommand } from "./eai-managed-source-authorize-commit.js";
|
|
16
17
|
const exec = promisify(execFile);
|
|
17
18
|
/** The CLI opens a bound Portal handoff; the Portal alone obtains the recipient App user token. */
|
|
18
19
|
export const eaiManagedSourceCommand = new Command("source")
|
|
19
20
|
.description("Manage the source of an EAI-hosted app");
|
|
20
21
|
eaiManagedSourceCommand.addCommand(createManagedSourceValidateCommand());
|
|
22
|
+
eaiManagedSourceCommand.addCommand(createCustomerCommitCommand());
|
|
23
|
+
eaiManagedSourceCommand.addCommand(createCustomerCommitAnchorCommand());
|
|
21
24
|
eaiManagedSourceCommand.command("move")
|
|
22
25
|
.description("Continue a completed EAI-managed source move in the browser")
|
|
23
26
|
.argument("<app-key>", "Existing EAI app key")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eai-managed-source-move.js","sourceRoot":"","sources":["../../src/commands/eai-managed-source-move.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC9G,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAErH,OA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GAAG,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1C,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,CAAC,8BAA8B,EAAE,+CAA+C,EAAE,QAAQ,GAAG,CAAC,IAAI,wCAAwC,CAAC,CAAC;YAClJ,CAAC;QACH,CAAC;QACD,MAAM,MAAM,GAAG;YACb,MAAM,EAAE,iBAAiB;YACzB,MAAM;YACN,iBAAiB,EAAE,MAAM,CAAC,WAAW;YACrC,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE;YAClC,SAAS,EAAE,GAAG,CAAC,IAAI;YACnB,UAAU,EAAE,+JAA+J;SAC5K,CAAC;QACF,IAAI,MAAM,KAAK,MAAM;YAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACnC,CAAC;YACJ,GAAG,CAAC,OAAO,CAAC,gEAAgE,CAAC,CAAC;YAC9E,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/commands/resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/commands/resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAA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AAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBjI;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAUlE;AAED,eAAO,MAAM,gBAAgB,SAC0B,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
|
-
import { RESOURCE_INDEX_APPLY_UNSUPPORTED_CODE, RESOURCE_INDEX_APPLY_UNSUPPORTED_MESSAGE, validateResourceIndexObjectTypes, } from '../lib/api.js';
|
|
6
|
+
import { RESOURCE_INDEX_APPLY_UNSUPPORTED_CODE, RESOURCE_INDEX_APPLY_UNSUPPORTED_MESSAGE, validateResourceIndexObjectTypes, withPublicRequestObservation, } from '../lib/api.js';
|
|
7
7
|
import { resolveCommandContext, normalizeFormat, makeSpinner } from '../lib/context.js';
|
|
8
8
|
import { isRecord, toObjectTypeSlug } from '../lib/utils.js';
|
|
9
9
|
import * as out from '../lib/output.js';
|
|
@@ -379,7 +379,7 @@ resourcesCommand
|
|
|
379
379
|
}
|
|
380
380
|
const data = await res.json();
|
|
381
381
|
if (options.format === 'json') {
|
|
382
|
-
out.json(data);
|
|
382
|
+
out.json(withPublicRequestObservation(data, res));
|
|
383
383
|
}
|
|
384
384
|
else {
|
|
385
385
|
succeedCommand(spinner, `Batch create complete (${data.succeeded} succeeded, ${data.failed} failed)`);
|
|
@@ -414,7 +414,7 @@ resourcesCommand
|
|
|
414
414
|
}
|
|
415
415
|
const data = await res.json();
|
|
416
416
|
if (options.format === 'json') {
|
|
417
|
-
out.json(data);
|
|
417
|
+
out.json(withPublicRequestObservation(data, res));
|
|
418
418
|
}
|
|
419
419
|
else {
|
|
420
420
|
const projection = data.projectionDeferred === true
|
|
@@ -486,7 +486,7 @@ resourcesCommand
|
|
|
486
486
|
}
|
|
487
487
|
const data = await res.json();
|
|
488
488
|
if (options.format === 'json') {
|
|
489
|
-
out.json(data);
|
|
489
|
+
out.json(withPublicRequestObservation(data, res));
|
|
490
490
|
}
|
|
491
491
|
else {
|
|
492
492
|
succeedCommand(spinner, `Batch delete complete (${data.succeeded} succeeded, ${data.failed} failed)`);
|
|
@@ -606,7 +606,7 @@ Examples:
|
|
|
606
606
|
const created = await res.json();
|
|
607
607
|
const output = buildCreateResourceOutput(type, data, created);
|
|
608
608
|
if (options.format === 'json') {
|
|
609
|
-
out.json(output);
|
|
609
|
+
out.json(withPublicRequestObservation(output, res));
|
|
610
610
|
}
|
|
611
611
|
else {
|
|
612
612
|
const createdId = typeof output.id === 'string' ? output.id : undefined;
|
|
@@ -702,7 +702,7 @@ resourcesCommand
|
|
|
702
702
|
process.exit(1);
|
|
703
703
|
}
|
|
704
704
|
if (options.format === 'json') {
|
|
705
|
-
out.json({ type, id, deleted: true });
|
|
705
|
+
out.json(withPublicRequestObservation({ type, id, deleted: true }, res));
|
|
706
706
|
}
|
|
707
707
|
else {
|
|
708
708
|
succeedCommand(spinner, `Deleted ${type} ${chalk.dim(id)}`);
|