@deployfoundation/foundation-deploy 0.2.36 → 0.2.38
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/bin/app.js +2 -2
- package/dist/bin/foundation-deploy.js +2 -2
- package/dist/bin/release-account.js +2 -2
- package/dist/{chunk-hps5vshg.js → chunk-2ra18dqx.js} +15 -2
- package/dist/{chunk-gmdzzrc4.js → chunk-8e2z4rhf.js} +1 -1
- package/dist/{chunk-zbw2awg7.js → chunk-j52g7bsc.js} +9 -2
- package/dist/src/index.js +2 -2
- package/package.json +1 -1
- package/src/stacks/api-stack.ts +14 -1
package/dist/bin/app.js
CHANGED
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
FoundationPages,
|
|
9
9
|
FoundationPipeline,
|
|
10
10
|
NewsletterStack
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-j52g7bsc.js";
|
|
12
12
|
import {
|
|
13
13
|
adminsFor,
|
|
14
14
|
instanceNames,
|
|
15
15
|
loadInstanceFile,
|
|
16
16
|
provisionsIntegration
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-2ra18dqx.js";
|
|
18
18
|
|
|
19
19
|
// bin/app.ts
|
|
20
20
|
import { execFileSync } from "node:child_process";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
stackExists,
|
|
31
31
|
stackOutput,
|
|
32
32
|
toolVersion
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-8e2z4rhf.js";
|
|
34
34
|
import {
|
|
35
35
|
BASE_SLACK_EVENTS,
|
|
36
36
|
CAPABILITY_IDS,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
skillsKey,
|
|
48
48
|
slackCommandPrefix,
|
|
49
49
|
versionedConfigKey
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-2ra18dqx.js";
|
|
51
51
|
|
|
52
52
|
// src/deploy/config-sync.ts
|
|
53
53
|
import { existsSync, mkdirSync, mkdtempSync, readdirSync } from "node:fs";
|
|
@@ -864,6 +864,12 @@ function requiredSlackCommandSuffixes(enabled) {
|
|
|
864
864
|
return [...suffixes].sort();
|
|
865
865
|
}
|
|
866
866
|
|
|
867
|
+
// ../core/src/proactive.ts
|
|
868
|
+
var PROACTIVE_CHANNEL_MODES = ["triage", "alerts"];
|
|
869
|
+
function encodeProactiveChannels(channels) {
|
|
870
|
+
return channels.map((channel) => channel.mode === "triage" ? channel.id : `${channel.id}:${channel.mode}`).join(",");
|
|
871
|
+
}
|
|
872
|
+
|
|
867
873
|
// ../core/src/instance.ts
|
|
868
874
|
var PENDING = "TBD";
|
|
869
875
|
var CUSTOMIZATION_ARTIFACT_NAME = "Customization";
|
|
@@ -915,8 +921,15 @@ var RawCustomization = z2.object({
|
|
|
915
921
|
path: z2.string().refine(normalizedRelativePosixPath, "customization.path must be a normalized relative POSIX path"),
|
|
916
922
|
required: z2.boolean().default(true)
|
|
917
923
|
}).strict();
|
|
924
|
+
var ProactiveChannelId = z2.string().regex(/^[CG][A-Z0-9]{8,}$/);
|
|
925
|
+
var RawProactiveChannel = z2.union([
|
|
926
|
+
ProactiveChannelId.transform((id) => ({ id, mode: "triage" })),
|
|
927
|
+
z2.object({ id: ProactiveChannelId, mode: z2.enum(PROACTIVE_CHANNEL_MODES).default("triage") }).strict()
|
|
928
|
+
]);
|
|
918
929
|
var RawProactive = z2.object({
|
|
919
|
-
channels: z2.array(
|
|
930
|
+
channels: z2.array(RawProactiveChannel).default([]).refine((channels) => new Set(channels.map((c) => c.id)).size === channels.length, {
|
|
931
|
+
message: "a channel may be listed only once"
|
|
932
|
+
}),
|
|
920
933
|
maxPerHour: z2.number().int().min(1).max(500).default(20)
|
|
921
934
|
}).strict().default({ channels: [] });
|
|
922
935
|
var RawRuntime = z2.object({
|
|
@@ -1886,4 +1899,4 @@ function ecrRepositoryArn(repositoryUri) {
|
|
|
1886
1899
|
return `arn:aws:ecr:${region}:${account}:repository/${name}`;
|
|
1887
1900
|
}
|
|
1888
1901
|
|
|
1889
|
-
export { parseSchedule, BASE_SLACK_EVENTS, CAPABILITY_IDS, requiredGithubPermissions, requiredSlackScopes, requiredSlackCommands, CUSTOMIZATION_ARTIFACT_NAME, newsletterManifestFor, FOUNDATION_VERSION_RE, versionedConfigKey, instanceNames, slackCommandPrefix, slackCommandPrefixes, isScheduledJob, isWebhookJob, webhookJobBindings, scheduledJobBindings, jobWebhookKey, capabilityScheduledJobs, crmOutreachConfigured, crmPolicyFingerprint, parseInstanceConfig, loadInstanceFile, configPathFor, capabilityEnabled, requiresAuthenticatedQueue, enabledIntegrations, provisionsIntegration, adminsFor, WEB_SEARCH_TARGET, WEB_SEARCH_CONNECTOR_VERSION, LIVE_ENDPOINT_NAME, RELEASE_VERSION_RE, parseManifest, manifestKey, lambdaKey, skillsKey, buildManifest, manifestSigningPayload, verifyManifest, lambdaBundleContext, BUN_VERSION, LAMBDA_ENTRY_POINTS, skipBundle, RELEASE_BUCKET_ENV, RELEASE_DIR_ENV, releaseCacheDir, releaseSource, lambdaCode, agentImage, agentImageTagRequired, releaseImageRepositoryArn, ecrRepositoryArn };
|
|
1902
|
+
export { parseSchedule, BASE_SLACK_EVENTS, CAPABILITY_IDS, requiredGithubPermissions, requiredSlackScopes, requiredSlackCommands, encodeProactiveChannels, CUSTOMIZATION_ARTIFACT_NAME, newsletterManifestFor, FOUNDATION_VERSION_RE, versionedConfigKey, instanceNames, slackCommandPrefix, slackCommandPrefixes, isScheduledJob, isWebhookJob, webhookJobBindings, scheduledJobBindings, jobWebhookKey, capabilityScheduledJobs, crmOutreachConfigured, crmPolicyFingerprint, parseInstanceConfig, loadInstanceFile, configPathFor, capabilityEnabled, requiresAuthenticatedQueue, enabledIntegrations, provisionsIntegration, adminsFor, WEB_SEARCH_TARGET, WEB_SEARCH_CONNECTOR_VERSION, LIVE_ENDPOINT_NAME, RELEASE_VERSION_RE, parseManifest, manifestKey, lambdaKey, skillsKey, buildManifest, manifestSigningPayload, verifyManifest, lambdaBundleContext, BUN_VERSION, LAMBDA_ENTRY_POINTS, skipBundle, RELEASE_BUCKET_ENV, RELEASE_DIR_ENV, releaseCacheDir, releaseSource, lambdaCode, agentImage, agentImageTagRequired, releaseImageRepositoryArn, ecrRepositoryArn };
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
capabilityScheduledJobs,
|
|
10
10
|
crmOutreachConfigured,
|
|
11
11
|
crmPolicyFingerprint,
|
|
12
|
+
encodeProactiveChannels,
|
|
12
13
|
instanceNames,
|
|
13
14
|
isScheduledJob,
|
|
14
15
|
lambdaCode,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
scheduledJobBindings,
|
|
23
24
|
slackCommandPrefixes,
|
|
24
25
|
webhookJobBindings
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2ra18dqx.js";
|
|
26
27
|
|
|
27
28
|
// src/stacks/agent-stack.ts
|
|
28
29
|
import * as cdk from "aws-cdk-lib";
|
|
@@ -1063,7 +1064,7 @@ class FoundationApi extends cdk2.Stack {
|
|
|
1063
1064
|
},
|
|
1064
1065
|
FOUNDATION_INSTANCE: props.instance.name,
|
|
1065
1066
|
FOUNDATION_COMMAND_PREFIXES: slackCommandPrefixes(props.instance).join(","),
|
|
1066
|
-
FOUNDATION_PROACTIVE_CHANNELS: props.instance.proactive.channels
|
|
1067
|
+
FOUNDATION_PROACTIVE_CHANNELS: encodeProactiveChannels(props.instance.proactive.channels),
|
|
1067
1068
|
FOUNDATION_PROACTIVE_MAX_PER_HOUR: String(props.instance.proactive.maxPerHour),
|
|
1068
1069
|
...jobsWebhookSecret === undefined ? {} : {
|
|
1069
1070
|
FOUNDATION_WEBHOOK_JOBS: JSON.stringify(webhookJobs),
|
|
@@ -1106,6 +1107,7 @@ class FoundationApi extends cdk2.Stack {
|
|
|
1106
1107
|
sid: "ReadRuntimeEndpointVersion",
|
|
1107
1108
|
actions: ["bedrock-agentcore:GetAgentRuntimeEndpoint"],
|
|
1108
1109
|
resources: [
|
|
1110
|
+
`arn:${this.partition}:bedrock-agentcore:${this.region}:${this.account}:runtime/${names.runtimeName}*`,
|
|
1109
1111
|
`arn:${this.partition}:bedrock-agentcore:${this.region}:${this.account}:runtime/${names.runtimeName}*/runtime-endpoint/*`
|
|
1110
1112
|
]
|
|
1111
1113
|
}));
|
|
@@ -1438,6 +1440,11 @@ class FoundationApi extends cdk2.Stack {
|
|
|
1438
1440
|
actions: ["dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:DeleteItem"],
|
|
1439
1441
|
resources: [upworkApprovalTable.tableArn]
|
|
1440
1442
|
}));
|
|
1443
|
+
upworkProxyRole.addToPolicy(new iam2.PolicyStatement({
|
|
1444
|
+
sid: "UpworkDraftDataKey",
|
|
1445
|
+
actions: ["kms:Decrypt", "kms:Encrypt", "kms:GenerateDataKey", "kms:DescribeKey"],
|
|
1446
|
+
resources: [props.dataKey.keyArn]
|
|
1447
|
+
}));
|
|
1441
1448
|
this.upworkProxyFunction = new lambda.Function(this, "UpworkProxyFunction", {
|
|
1442
1449
|
functionName: names.upworkProxyFunctionName,
|
|
1443
1450
|
runtime: lambda.Runtime.NODEJS_22_X,
|
package/dist/src/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
FoundationPipeline,
|
|
11
11
|
NewsletterStack,
|
|
12
12
|
deployStatements
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-j52g7bsc.js";
|
|
14
14
|
import {
|
|
15
15
|
BUN_VERSION,
|
|
16
16
|
LAMBDA_ENTRY_POINTS,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
skillsKey,
|
|
44
44
|
skipBundle,
|
|
45
45
|
verifyManifest
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-2ra18dqx.js";
|
|
47
47
|
export {
|
|
48
48
|
BUILD_TIMEOUT,
|
|
49
49
|
BUN_VERSION,
|
package/package.json
CHANGED
package/src/stacks/api-stack.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
capabilityScheduledJobs,
|
|
10
10
|
crmOutreachConfigured,
|
|
11
11
|
crmPolicyFingerprint,
|
|
12
|
+
encodeProactiveChannels,
|
|
12
13
|
isScheduledJob,
|
|
13
14
|
parseInstanceConfig,
|
|
14
15
|
scheduledJobBindings,
|
|
@@ -479,7 +480,7 @@ export class FoundationApi extends cdk.Stack {
|
|
|
479
480
|
}),
|
|
480
481
|
FOUNDATION_INSTANCE: props.instance.name,
|
|
481
482
|
FOUNDATION_COMMAND_PREFIXES: slackCommandPrefixes(props.instance).join(","),
|
|
482
|
-
FOUNDATION_PROACTIVE_CHANNELS: props.instance.proactive.channels
|
|
483
|
+
FOUNDATION_PROACTIVE_CHANNELS: encodeProactiveChannels(props.instance.proactive.channels),
|
|
483
484
|
FOUNDATION_PROACTIVE_MAX_PER_HOUR: String(props.instance.proactive.maxPerHour),
|
|
484
485
|
...(jobsWebhookSecret === undefined
|
|
485
486
|
? {}
|
|
@@ -534,7 +535,10 @@ export class FoundationApi extends cdk.Stack {
|
|
|
534
535
|
new iam.PolicyStatement({
|
|
535
536
|
sid: "ReadRuntimeEndpointVersion",
|
|
536
537
|
actions: ["bedrock-agentcore:GetAgentRuntimeEndpoint"],
|
|
538
|
+
// AgentCore authorizes this call against BOTH the runtime and the
|
|
539
|
+
// endpoint (CloudTrail, 2026-10-11): the endpoint alone is denied.
|
|
537
540
|
resources: [
|
|
541
|
+
`arn:${this.partition}:bedrock-agentcore:${this.region}:${this.account}:runtime/${names.runtimeName}*`,
|
|
538
542
|
`arn:${this.partition}:bedrock-agentcore:${this.region}:${this.account}:runtime/${names.runtimeName}*/runtime-endpoint/*`,
|
|
539
543
|
],
|
|
540
544
|
}),
|
|
@@ -1006,6 +1010,15 @@ export class FoundationApi extends cdk.Stack {
|
|
|
1006
1010
|
resources: [upworkApprovalTable.tableArn],
|
|
1007
1011
|
}),
|
|
1008
1012
|
);
|
|
1013
|
+
// The approval table is encrypted with the instance data key: without it
|
|
1014
|
+
// every draft write fails (Sky, 2026-10-11, prepare_proposal proxy_error).
|
|
1015
|
+
upworkProxyRole.addToPolicy(
|
|
1016
|
+
new iam.PolicyStatement({
|
|
1017
|
+
sid: "UpworkDraftDataKey",
|
|
1018
|
+
actions: ["kms:Decrypt", "kms:Encrypt", "kms:GenerateDataKey", "kms:DescribeKey"],
|
|
1019
|
+
resources: [props.dataKey.keyArn],
|
|
1020
|
+
}),
|
|
1021
|
+
);
|
|
1009
1022
|
this.upworkProxyFunction = new lambda.Function(this, "UpworkProxyFunction", {
|
|
1010
1023
|
functionName: names.upworkProxyFunctionName,
|
|
1011
1024
|
runtime: lambda.Runtime.NODEJS_22_X,
|