@go-to-k/cdkd 0.260.13 → 0.260.14

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/cli.js CHANGED
@@ -1901,7 +1901,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1901
1901
  const FLUSH_EVENT_THRESHOLD = 50;
1902
1902
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1903
1903
  function getCdkdVersion() {
1904
- return "0.260.13";
1904
+ return "0.260.14";
1905
1905
  }
1906
1906
  /**
1907
1907
  * Generate a time-sortable unique run id, e.g.
@@ -20896,11 +20896,7 @@ var AgentCoreRuntimeProvider = class {
20896
20896
  this.logger.debug(`Created BedrockAgentCore Runtime: ${agentRuntimeId} (${agentRuntimeArn})`);
20897
20897
  return {
20898
20898
  physicalId: agentRuntimeId,
20899
- attributes: {
20900
- Arn: agentRuntimeArn,
20901
- AgentRuntimeId: agentRuntimeId,
20902
- AgentRuntimeName: agentRuntimeName
20903
- }
20899
+ attributes: this.buildAttributes(response, agentRuntimeName)
20904
20900
  };
20905
20901
  } catch (error) {
20906
20902
  const cause = error instanceof Error ? error : void 0;
@@ -20932,17 +20928,12 @@ var AgentCoreRuntimeProvider = class {
20932
20928
  if (properties["EnvironmentVariables"] !== void 0) input["environmentVariables"] = properties["EnvironmentVariables"];
20933
20929
  if (properties["ClientToken"] !== void 0) input["clientToken"] = properties["ClientToken"];
20934
20930
  const response = await this.client.send(new UpdateAgentRuntimeCommand(input));
20935
- const agentRuntimeArn = response.agentRuntimeArn;
20936
20931
  const agentRuntimeId = response.agentRuntimeId;
20937
20932
  this.logger.debug(`Successfully updated BedrockAgentCore Runtime ${logicalId}`);
20938
20933
  return {
20939
20934
  physicalId: agentRuntimeId,
20940
20935
  wasReplaced: false,
20941
- attributes: {
20942
- Arn: agentRuntimeArn,
20943
- AgentRuntimeId: agentRuntimeId,
20944
- AgentRuntimeName: properties["AgentRuntimeName"]
20945
- }
20936
+ attributes: this.buildAttributes(response, properties["AgentRuntimeName"])
20946
20937
  };
20947
20938
  } catch (error) {
20948
20939
  const cause = error instanceof Error ? error : void 0;
@@ -20968,13 +20959,58 @@ var AgentCoreRuntimeProvider = class {
20968
20959
  }
20969
20960
  }
20970
20961
  /**
20971
- * Get resource attribute (for Fn::GetAtt resolution)
20962
+ * Build the CFn read-only attribute map recorded in cdkd state for
20963
+ * `Fn::GetAtt` resolution.
20964
+ *
20965
+ * CloudFormation exposes `AWS::BedrockAgentCore::Runtime`'s read-only
20966
+ * attributes under the names `AgentRuntimeArn` / `AgentRuntimeId` /
20967
+ * `AgentRuntimeVersion` / `Status` / `CreatedAt` /
20968
+ * `WorkloadIdentityDetails` (the type's registry-schema
20969
+ * `readOnlyProperties`). The stored `attributes` map is looked up BY CFn
20970
+ * attribute name during output / cross-resource `Fn::GetAtt` resolution
20971
+ * (`IntrinsicFunctionResolver.constructAttribute` never calls
20972
+ * `getAttribute`), so the keys MUST match those CFn names. The previous
20973
+ * `Arn` key meant `Fn::GetAtt [Runtime, AgentRuntimeArn]` missed the
20974
+ * cached attribute, fell through to the unknown-attribute guard, and hard
20975
+ * -failed because the physical id (the runtime name) is not ARN-shaped
20976
+ * (issue #1179).
20977
+ */
20978
+ buildAttributes(response, agentRuntimeName) {
20979
+ const attributes = {
20980
+ AgentRuntimeArn: response.agentRuntimeArn,
20981
+ AgentRuntimeId: response.agentRuntimeId,
20982
+ AgentRuntimeName: agentRuntimeName
20983
+ };
20984
+ if (response.agentRuntimeVersion !== void 0) attributes["AgentRuntimeVersion"] = response.agentRuntimeVersion;
20985
+ if (response.status !== void 0) attributes["Status"] = response.status;
20986
+ if (response.createdAt !== void 0) attributes["CreatedAt"] = response.createdAt.toISOString();
20987
+ if (response.workloadIdentityDetails !== void 0) attributes["WorkloadIdentityDetails"] = camelToPascalCaseKeys(response.workloadIdentityDetails);
20988
+ return attributes;
20989
+ }
20990
+ /**
20991
+ * Get resource attribute (for a live `Fn::GetAtt` fetch, e.g. `cdkd
20992
+ * orphan`). Output / cross-resource resolution reads the cached
20993
+ * `attributes` map written by {@link buildAttributes}; this live path
20994
+ * covers callers that bypass that cache.
20995
+ *
20996
+ * `WorkloadIdentityDetails` is NOT resolvable here because
20997
+ * `GetAgentRuntime` does not return it (it is a create/update-time
20998
+ * response field only); it stays available via the cached attributes.
20972
20999
  */
20973
21000
  async getAttribute(physicalId, _resourceType, attributeName) {
20974
- if (attributeName === "Arn" || attributeName === "AgentRuntimeArn") return (await this.client.send(new GetAgentRuntimeCommand({ agentRuntimeId: physicalId }))).agentRuntimeArn;
20975
21001
  if (attributeName === "AgentRuntimeId") return physicalId;
20976
- if (attributeName === "AgentRuntimeName") return (await this.client.send(new GetAgentRuntimeCommand({ agentRuntimeId: physicalId }))).agentRuntimeName;
20977
- throw new Error(`Unsupported attribute: ${attributeName} for AWS::BedrockAgentCore::Runtime`);
21002
+ const response = await this.client.send(new GetAgentRuntimeCommand({ agentRuntimeId: physicalId }));
21003
+ switch (attributeName) {
21004
+ case "Arn":
21005
+ case "AgentRuntimeArn": return response.agentRuntimeArn;
21006
+ case "AgentRuntimeName": return response.agentRuntimeName;
21007
+ case "AgentRuntimeVersion": return response.agentRuntimeVersion;
21008
+ case "Status": return response.status;
21009
+ case "CreatedAt": return response.createdAt?.toISOString();
21010
+ case "LastUpdatedAt": return response.lastUpdatedAt?.toISOString();
21011
+ case "FailureReason": return response.failureReason;
21012
+ default: throw new Error(`Unsupported attribute: ${attributeName} for AWS::BedrockAgentCore::Runtime`);
21013
+ }
20978
21014
  }
20979
21015
  /**
20980
21016
  * Read the AWS-current BedrockAgentCore Runtime configuration in
@@ -62018,7 +62054,7 @@ function createMigrateCommand() {
62018
62054
  */
62019
62055
  function buildProgram() {
62020
62056
  const program = new Command();
62021
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.260.13");
62057
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.260.14");
62022
62058
  program.addCommand(createBootstrapCommand());
62023
62059
  program.addCommand(createSynthCommand());
62024
62060
  program.addCommand(createListCommand());