@bicon/mcp-composer 0.3.6 → 0.4.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.
Files changed (3) hide show
  1. package/README.md +73 -11
  2. package/dist/index.mjs +522 -67
  3. package/package.json +8 -2
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
12
12
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
13
13
 
14
14
  // src/version.ts
15
- var COMPOSER_VERSION = true ? "0.3.6" : readPackageVersion();
15
+ var COMPOSER_VERSION = true ? "0.4.0" : readPackageVersion();
16
16
 
17
17
  // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
18
18
  var external_exports = {};
@@ -4102,12 +4102,75 @@ var UpdateSkillResponse = objectType({
4102
4102
  var DeleteSkillParams = objectType({
4103
4103
  "id": coerce.string().uuid()
4104
4104
  });
4105
+ var listCapabilitiesResponseNameMax = 200;
4106
+ var listCapabilitiesResponseCurrentMaturityMax = 5;
4107
+ var listCapabilitiesResponseTargetMaturityMax = 5;
4108
+ var listCapabilitiesResponseOwnerMax = 200;
4109
+ var ListCapabilitiesResponseItem = objectType({
4110
+ "id": stringType().uuid(),
4111
+ "name": stringType().max(listCapabilitiesResponseNameMax),
4112
+ "parentId": stringType().uuid().nullable(),
4113
+ "currentMaturity": numberType().min(1).max(listCapabilitiesResponseCurrentMaturityMax),
4114
+ "targetMaturity": numberType().min(1).max(listCapabilitiesResponseTargetMaturityMax),
4115
+ "importance": enumType(["differentiating", "core", "supporting"]),
4116
+ "owner": stringType().max(listCapabilitiesResponseOwnerMax).optional(),
4117
+ "sortOrder": numberType()
4118
+ }).describe("One node of the organisation's capability map: a domain (parentId null) or a capability under a domain. Maturity (1\u20135) and importance are meaningful on capabilities; a domain carries the defaults.");
4119
+ var ListCapabilitiesResponse = arrayType(ListCapabilitiesResponseItem);
4120
+ var createCapabilityBodyNameMax = 200;
4121
+ var createCapabilityBodyCurrentMaturityMax = 5;
4122
+ var createCapabilityBodyTargetMaturityMax = 5;
4123
+ var createCapabilityBodyOwnerMax = 200;
4124
+ var CreateCapabilityBody = objectType({
4125
+ "id": stringType().uuid().optional().describe("Optional client-supplied id \u2014 see SkillInput's id field."),
4126
+ "name": stringType().max(createCapabilityBodyNameMax),
4127
+ "parentId": stringType().uuid().nullish().describe("The domain this capability belongs to; null (or absent) for a domain."),
4128
+ "currentMaturity": numberType().min(1).max(createCapabilityBodyCurrentMaturityMax),
4129
+ "targetMaturity": numberType().min(1).max(createCapabilityBodyTargetMaturityMax),
4130
+ "importance": enumType(["differentiating", "core", "supporting"]),
4131
+ "owner": stringType().max(createCapabilityBodyOwnerMax).optional(),
4132
+ "sortOrder": numberType()
4133
+ });
4134
+ var UpdateCapabilityParams = objectType({
4135
+ "id": coerce.string().uuid()
4136
+ });
4137
+ var updateCapabilityBodyNameMax = 200;
4138
+ var updateCapabilityBodyCurrentMaturityMax = 5;
4139
+ var updateCapabilityBodyTargetMaturityMax = 5;
4140
+ var updateCapabilityBodyOwnerMax = 200;
4141
+ var UpdateCapabilityBody = objectType({
4142
+ "id": stringType().uuid().optional().describe("Optional client-supplied id \u2014 see SkillInput's id field."),
4143
+ "name": stringType().max(updateCapabilityBodyNameMax),
4144
+ "parentId": stringType().uuid().nullish().describe("The domain this capability belongs to; null (or absent) for a domain."),
4145
+ "currentMaturity": numberType().min(1).max(updateCapabilityBodyCurrentMaturityMax),
4146
+ "targetMaturity": numberType().min(1).max(updateCapabilityBodyTargetMaturityMax),
4147
+ "importance": enumType(["differentiating", "core", "supporting"]),
4148
+ "owner": stringType().max(updateCapabilityBodyOwnerMax).optional(),
4149
+ "sortOrder": numberType()
4150
+ });
4151
+ var updateCapabilityResponseNameMax = 200;
4152
+ var updateCapabilityResponseCurrentMaturityMax = 5;
4153
+ var updateCapabilityResponseTargetMaturityMax = 5;
4154
+ var updateCapabilityResponseOwnerMax = 200;
4155
+ var UpdateCapabilityResponse = objectType({
4156
+ "id": stringType().uuid(),
4157
+ "name": stringType().max(updateCapabilityResponseNameMax),
4158
+ "parentId": stringType().uuid().nullable(),
4159
+ "currentMaturity": numberType().min(1).max(updateCapabilityResponseCurrentMaturityMax),
4160
+ "targetMaturity": numberType().min(1).max(updateCapabilityResponseTargetMaturityMax),
4161
+ "importance": enumType(["differentiating", "core", "supporting"]),
4162
+ "owner": stringType().max(updateCapabilityResponseOwnerMax).optional(),
4163
+ "sortOrder": numberType()
4164
+ }).describe("One node of the organisation's capability map: a domain (parentId null) or a capability under a domain. Maturity (1\u20135) and importance are meaningful on capabilities; a domain carries the defaults.");
4165
+ var DeleteCapabilityParams = objectType({
4166
+ "id": coerce.string().uuid()
4167
+ });
4105
4168
  var ListOrganizationMembersResponseItem = objectType({
4106
4169
  "userId": stringType().uuid(),
4107
4170
  "email": stringType(),
4108
4171
  "displayName": stringType().nullable(),
4109
4172
  "role": enumType(["admin", "member", "viewer"]),
4110
- "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation.")
4173
+ "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation, manage_capabilities, manage_capability_impact.")
4111
4174
  });
4112
4175
  var ListOrganizationMembersResponse = arrayType(ListOrganizationMembersResponseItem);
4113
4176
  var SyncOrganizationMembersResponse = objectType({
@@ -4117,17 +4180,18 @@ var SyncOrganizationMembersResponse = objectType({
4117
4180
  var GetMyOrganizationAccessResponse = objectType({
4118
4181
  "userId": stringType().describe(`The caller's own local user id (matches AuthorRef.userId on initiatives), so the client can tell its own changes apart from a teammate's \u2014 e.g. to suppress the "updated by X" collaboration banner when an edit echoing back is the caller's own save.`),
4119
4182
  "role": enumType(["admin", "member", "viewer"]),
4120
- "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation.")
4183
+ "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation, manage_capabilities, manage_capability_impact."),
4184
+ "initiativeLimit": numberType().describe("The most initiatives this organisation may hold, archived ones included. Creating one more answers 507 with code initiative_limit_reached, so the client blocks New, Duplicate and Import up front.")
4121
4185
  });
4122
4186
  var UpdateOrganizationMemberPermissionsParams = objectType({
4123
4187
  "userId": coerce.string().uuid()
4124
4188
  });
4125
4189
  var UpdateOrganizationMemberPermissionsBody = objectType({
4126
- "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation.")
4190
+ "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation, manage_capabilities, manage_capability_impact.")
4127
4191
  });
4128
4192
  var UpdateOrganizationMemberPermissionsResponse = objectType({
4129
4193
  "userId": stringType().uuid(),
4130
- "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation.")
4194
+ "permissions": arrayType(stringType()).describe("App-managed permission overrides on top of the fixed role (free-form strings, not a closed enum). Known keys: manage_skills, manage_ai_act, manage_metadata, manage_stage_gate, manage_economics, manage_decision_log, manage_dependencies, manage_required_skills, manage_scoring, manage_status_report, manage_prioritisation, manage_capabilities, manage_capability_impact.")
4131
4195
  });
4132
4196
  var ListPermissionProfilesResponseItem = objectType({
4133
4197
  "id": stringType().uuid(),
@@ -4219,6 +4283,8 @@ var listSnapshotsResponseInitiativesItemStatusReportsMax = 1e3;
4219
4283
  var listSnapshotsResponseInitiativesItemDependsOnMax = 1e3;
4220
4284
  var listSnapshotsResponseInitiativesItemRequiredSkillsItemRunFteMin = 0;
4221
4285
  var listSnapshotsResponseInitiativesItemRequiredSkillsMax = 1e3;
4286
+ var listSnapshotsResponseInitiativesItemCapabilityImpactsItemMaturityToMax = 5;
4287
+ var listSnapshotsResponseInitiativesItemCapabilityImpactsMax = 1e3;
4222
4288
  var listSnapshotsResponseInitiativesItemDpiaUrlMax = 2e3;
4223
4289
  var listSnapshotsResponseInitiativesItemModelCardUrlMax = 2e3;
4224
4290
  var listSnapshotsResponseInitiativesItemProhibitedOverrideMax = 2e3;
@@ -4268,7 +4334,12 @@ var ListSnapshotsResponseItem = objectType({
4268
4334
  "evaluation": objectType({
4269
4335
  "valueScale": objectType({
4270
4336
  "score": numberType(),
4271
- "confidence": enumType(["Low", "Medium", "High"])
4337
+ "confidence": enumType(["Low", "Medium", "High"]),
4338
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4339
+ "scoredBy": objectType({
4340
+ "userId": stringType().uuid(),
4341
+ "name": stringType()
4342
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4272
4343
  }).and(objectType({
4273
4344
  "subs": objectType({
4274
4345
  "frequencyOfProcess": numberType(),
@@ -4282,7 +4353,12 @@ var ListSnapshotsResponseItem = objectType({
4282
4353
  })),
4283
4354
  "feasibility": objectType({
4284
4355
  "score": numberType(),
4285
- "confidence": enumType(["Low", "Medium", "High"])
4356
+ "confidence": enumType(["Low", "Medium", "High"]),
4357
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4358
+ "scoredBy": objectType({
4359
+ "userId": stringType().uuid(),
4360
+ "name": stringType()
4361
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4286
4362
  }).and(objectType({
4287
4363
  "subs": objectType({
4288
4364
  "dataAvailability": numberType(),
@@ -4296,7 +4372,12 @@ var ListSnapshotsResponseItem = objectType({
4296
4372
  })),
4297
4373
  "governance": objectType({
4298
4374
  "score": numberType(),
4299
- "confidence": enumType(["Low", "Medium", "High"])
4375
+ "confidence": enumType(["Low", "Medium", "High"]),
4376
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4377
+ "scoredBy": objectType({
4378
+ "userId": stringType().uuid(),
4379
+ "name": stringType()
4380
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4300
4381
  }).and(objectType({
4301
4382
  "subs": objectType({
4302
4383
  "regulatoryExposure": numberType(),
@@ -4311,7 +4392,12 @@ var ListSnapshotsResponseItem = objectType({
4311
4392
  })),
4312
4393
  "strategic": objectType({
4313
4394
  "score": numberType(),
4314
- "confidence": enumType(["Low", "Medium", "High"])
4395
+ "confidence": enumType(["Low", "Medium", "High"]),
4396
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4397
+ "scoredBy": objectType({
4398
+ "userId": stringType().uuid(),
4399
+ "name": stringType()
4400
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4315
4401
  }).and(objectType({
4316
4402
  "subs": objectType({
4317
4403
  "strategicDifferentiation": numberType(),
@@ -4366,7 +4452,12 @@ var ListSnapshotsResponseItem = objectType({
4366
4452
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
4367
4453
  "owner": stringType().max(listSnapshotsResponseInitiativesItemDecisionLogItemOwnerMax).optional(),
4368
4454
  "rationale": stringType().max(listSnapshotsResponseInitiativesItemDecisionLogItemRationaleMax).optional(),
4369
- "createdAt": stringType().optional()
4455
+ "createdAt": stringType().optional(),
4456
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
4457
+ "recordedBy": objectType({
4458
+ "userId": stringType().uuid(),
4459
+ "name": stringType()
4460
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
4370
4461
  })).max(listSnapshotsResponseInitiativesItemDecisionLogMax).optional(),
4371
4462
  "statusReports": arrayType(objectType({
4372
4463
  "id": stringType(),
@@ -4396,6 +4487,11 @@ var ListSnapshotsResponseItem = objectType({
4396
4487
  "fte": numberType(),
4397
4488
  "runFte": numberType().min(listSnapshotsResponseInitiativesItemRequiredSkillsItemRunFteMin).optional()
4398
4489
  })).max(listSnapshotsResponseInitiativesItemRequiredSkillsMax).optional(),
4490
+ "capabilityImpacts": arrayType(objectType({
4491
+ "capabilityId": stringType(),
4492
+ "kind": enumType(["improve", "new", "replace", "retire"]),
4493
+ "maturityTo": numberType().min(1).max(listSnapshotsResponseInitiativesItemCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
4494
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(listSnapshotsResponseInitiativesItemCapabilityImpactsMax).optional(),
4399
4495
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
4400
4496
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
4401
4497
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -4406,7 +4502,12 @@ var ListSnapshotsResponseItem = objectType({
4406
4502
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
4407
4503
  "checked": booleanType(),
4408
4504
  "asOfDate": stringType().optional(),
4409
- "note": stringType().max(listSnapshotsResponseInitiativesItemGateEvidenceNoteMax).optional()
4505
+ "note": stringType().max(listSnapshotsResponseInitiativesItemGateEvidenceNoteMax).optional(),
4506
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
4507
+ "checkedBy": objectType({
4508
+ "userId": stringType().uuid(),
4509
+ "name": stringType()
4510
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
4410
4511
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
4411
4512
  "gateBypassed": booleanType().optional(),
4412
4513
  "aiAct": objectType({
@@ -4489,6 +4590,7 @@ var ListSnapshotsResponseItem = objectType({
4489
4590
  "userId": stringType().uuid(),
4490
4591
  "name": stringType()
4491
4592
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
4593
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
4492
4594
  "createdAt": stringType(),
4493
4595
  "updatedAt": stringType()
4494
4596
  })),
@@ -4519,6 +4621,8 @@ var createSnapshotBodyInitiativesItemStatusReportsMax = 1e3;
4519
4621
  var createSnapshotBodyInitiativesItemDependsOnMax = 1e3;
4520
4622
  var createSnapshotBodyInitiativesItemRequiredSkillsItemRunFteMin = 0;
4521
4623
  var createSnapshotBodyInitiativesItemRequiredSkillsMax = 1e3;
4624
+ var createSnapshotBodyInitiativesItemCapabilityImpactsItemMaturityToMax = 5;
4625
+ var createSnapshotBodyInitiativesItemCapabilityImpactsMax = 1e3;
4522
4626
  var createSnapshotBodyInitiativesItemDpiaUrlMax = 2e3;
4523
4627
  var createSnapshotBodyInitiativesItemModelCardUrlMax = 2e3;
4524
4628
  var createSnapshotBodyInitiativesItemProhibitedOverrideMax = 2e3;
@@ -4568,7 +4672,12 @@ var CreateSnapshotBody = objectType({
4568
4672
  "evaluation": objectType({
4569
4673
  "valueScale": objectType({
4570
4674
  "score": numberType(),
4571
- "confidence": enumType(["Low", "Medium", "High"])
4675
+ "confidence": enumType(["Low", "Medium", "High"]),
4676
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4677
+ "scoredBy": objectType({
4678
+ "userId": stringType().uuid(),
4679
+ "name": stringType()
4680
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4572
4681
  }).and(objectType({
4573
4682
  "subs": objectType({
4574
4683
  "frequencyOfProcess": numberType(),
@@ -4582,7 +4691,12 @@ var CreateSnapshotBody = objectType({
4582
4691
  })),
4583
4692
  "feasibility": objectType({
4584
4693
  "score": numberType(),
4585
- "confidence": enumType(["Low", "Medium", "High"])
4694
+ "confidence": enumType(["Low", "Medium", "High"]),
4695
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4696
+ "scoredBy": objectType({
4697
+ "userId": stringType().uuid(),
4698
+ "name": stringType()
4699
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4586
4700
  }).and(objectType({
4587
4701
  "subs": objectType({
4588
4702
  "dataAvailability": numberType(),
@@ -4596,7 +4710,12 @@ var CreateSnapshotBody = objectType({
4596
4710
  })),
4597
4711
  "governance": objectType({
4598
4712
  "score": numberType(),
4599
- "confidence": enumType(["Low", "Medium", "High"])
4713
+ "confidence": enumType(["Low", "Medium", "High"]),
4714
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4715
+ "scoredBy": objectType({
4716
+ "userId": stringType().uuid(),
4717
+ "name": stringType()
4718
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4600
4719
  }).and(objectType({
4601
4720
  "subs": objectType({
4602
4721
  "regulatoryExposure": numberType(),
@@ -4611,7 +4730,12 @@ var CreateSnapshotBody = objectType({
4611
4730
  })),
4612
4731
  "strategic": objectType({
4613
4732
  "score": numberType(),
4614
- "confidence": enumType(["Low", "Medium", "High"])
4733
+ "confidence": enumType(["Low", "Medium", "High"]),
4734
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
4735
+ "scoredBy": objectType({
4736
+ "userId": stringType().uuid(),
4737
+ "name": stringType()
4738
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4615
4739
  }).and(objectType({
4616
4740
  "subs": objectType({
4617
4741
  "strategicDifferentiation": numberType(),
@@ -4666,7 +4790,12 @@ var CreateSnapshotBody = objectType({
4666
4790
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
4667
4791
  "owner": stringType().max(createSnapshotBodyInitiativesItemDecisionLogItemOwnerMax).optional(),
4668
4792
  "rationale": stringType().max(createSnapshotBodyInitiativesItemDecisionLogItemRationaleMax).optional(),
4669
- "createdAt": stringType().optional()
4793
+ "createdAt": stringType().optional(),
4794
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
4795
+ "recordedBy": objectType({
4796
+ "userId": stringType().uuid(),
4797
+ "name": stringType()
4798
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
4670
4799
  })).max(createSnapshotBodyInitiativesItemDecisionLogMax).optional(),
4671
4800
  "statusReports": arrayType(objectType({
4672
4801
  "id": stringType(),
@@ -4696,6 +4825,11 @@ var CreateSnapshotBody = objectType({
4696
4825
  "fte": numberType(),
4697
4826
  "runFte": numberType().min(createSnapshotBodyInitiativesItemRequiredSkillsItemRunFteMin).optional()
4698
4827
  })).max(createSnapshotBodyInitiativesItemRequiredSkillsMax).optional(),
4828
+ "capabilityImpacts": arrayType(objectType({
4829
+ "capabilityId": stringType(),
4830
+ "kind": enumType(["improve", "new", "replace", "retire"]),
4831
+ "maturityTo": numberType().min(1).max(createSnapshotBodyInitiativesItemCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
4832
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(createSnapshotBodyInitiativesItemCapabilityImpactsMax).optional(),
4699
4833
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
4700
4834
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
4701
4835
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -4706,7 +4840,12 @@ var CreateSnapshotBody = objectType({
4706
4840
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
4707
4841
  "checked": booleanType(),
4708
4842
  "asOfDate": stringType().optional(),
4709
- "note": stringType().max(createSnapshotBodyInitiativesItemGateEvidenceNoteMax).optional()
4843
+ "note": stringType().max(createSnapshotBodyInitiativesItemGateEvidenceNoteMax).optional(),
4844
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
4845
+ "checkedBy": objectType({
4846
+ "userId": stringType().uuid(),
4847
+ "name": stringType()
4848
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
4710
4849
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
4711
4850
  "gateBypassed": booleanType().optional(),
4712
4851
  "aiAct": objectType({
@@ -4789,6 +4928,7 @@ var CreateSnapshotBody = objectType({
4789
4928
  "userId": stringType().uuid(),
4790
4929
  "name": stringType()
4791
4930
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
4931
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
4792
4932
  "createdAt": stringType(),
4793
4933
  "updatedAt": stringType()
4794
4934
  })),
@@ -4825,6 +4965,8 @@ var renameSnapshotResponseInitiativesItemStatusReportsMax = 1e3;
4825
4965
  var renameSnapshotResponseInitiativesItemDependsOnMax = 1e3;
4826
4966
  var renameSnapshotResponseInitiativesItemRequiredSkillsItemRunFteMin = 0;
4827
4967
  var renameSnapshotResponseInitiativesItemRequiredSkillsMax = 1e3;
4968
+ var renameSnapshotResponseInitiativesItemCapabilityImpactsItemMaturityToMax = 5;
4969
+ var renameSnapshotResponseInitiativesItemCapabilityImpactsMax = 1e3;
4828
4970
  var renameSnapshotResponseInitiativesItemDpiaUrlMax = 2e3;
4829
4971
  var renameSnapshotResponseInitiativesItemModelCardUrlMax = 2e3;
4830
4972
  var renameSnapshotResponseInitiativesItemProhibitedOverrideMax = 2e3;
@@ -4874,7 +5016,12 @@ var RenameSnapshotResponse = objectType({
4874
5016
  "evaluation": objectType({
4875
5017
  "valueScale": objectType({
4876
5018
  "score": numberType(),
4877
- "confidence": enumType(["Low", "Medium", "High"])
5019
+ "confidence": enumType(["Low", "Medium", "High"]),
5020
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5021
+ "scoredBy": objectType({
5022
+ "userId": stringType().uuid(),
5023
+ "name": stringType()
5024
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4878
5025
  }).and(objectType({
4879
5026
  "subs": objectType({
4880
5027
  "frequencyOfProcess": numberType(),
@@ -4888,7 +5035,12 @@ var RenameSnapshotResponse = objectType({
4888
5035
  })),
4889
5036
  "feasibility": objectType({
4890
5037
  "score": numberType(),
4891
- "confidence": enumType(["Low", "Medium", "High"])
5038
+ "confidence": enumType(["Low", "Medium", "High"]),
5039
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5040
+ "scoredBy": objectType({
5041
+ "userId": stringType().uuid(),
5042
+ "name": stringType()
5043
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4892
5044
  }).and(objectType({
4893
5045
  "subs": objectType({
4894
5046
  "dataAvailability": numberType(),
@@ -4902,7 +5054,12 @@ var RenameSnapshotResponse = objectType({
4902
5054
  })),
4903
5055
  "governance": objectType({
4904
5056
  "score": numberType(),
4905
- "confidence": enumType(["Low", "Medium", "High"])
5057
+ "confidence": enumType(["Low", "Medium", "High"]),
5058
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5059
+ "scoredBy": objectType({
5060
+ "userId": stringType().uuid(),
5061
+ "name": stringType()
5062
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4906
5063
  }).and(objectType({
4907
5064
  "subs": objectType({
4908
5065
  "regulatoryExposure": numberType(),
@@ -4917,7 +5074,12 @@ var RenameSnapshotResponse = objectType({
4917
5074
  })),
4918
5075
  "strategic": objectType({
4919
5076
  "score": numberType(),
4920
- "confidence": enumType(["Low", "Medium", "High"])
5077
+ "confidence": enumType(["Low", "Medium", "High"]),
5078
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5079
+ "scoredBy": objectType({
5080
+ "userId": stringType().uuid(),
5081
+ "name": stringType()
5082
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
4921
5083
  }).and(objectType({
4922
5084
  "subs": objectType({
4923
5085
  "strategicDifferentiation": numberType(),
@@ -4972,7 +5134,12 @@ var RenameSnapshotResponse = objectType({
4972
5134
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
4973
5135
  "owner": stringType().max(renameSnapshotResponseInitiativesItemDecisionLogItemOwnerMax).optional(),
4974
5136
  "rationale": stringType().max(renameSnapshotResponseInitiativesItemDecisionLogItemRationaleMax).optional(),
4975
- "createdAt": stringType().optional()
5137
+ "createdAt": stringType().optional(),
5138
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
5139
+ "recordedBy": objectType({
5140
+ "userId": stringType().uuid(),
5141
+ "name": stringType()
5142
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
4976
5143
  })).max(renameSnapshotResponseInitiativesItemDecisionLogMax).optional(),
4977
5144
  "statusReports": arrayType(objectType({
4978
5145
  "id": stringType(),
@@ -5002,6 +5169,11 @@ var RenameSnapshotResponse = objectType({
5002
5169
  "fte": numberType(),
5003
5170
  "runFte": numberType().min(renameSnapshotResponseInitiativesItemRequiredSkillsItemRunFteMin).optional()
5004
5171
  })).max(renameSnapshotResponseInitiativesItemRequiredSkillsMax).optional(),
5172
+ "capabilityImpacts": arrayType(objectType({
5173
+ "capabilityId": stringType(),
5174
+ "kind": enumType(["improve", "new", "replace", "retire"]),
5175
+ "maturityTo": numberType().min(1).max(renameSnapshotResponseInitiativesItemCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
5176
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(renameSnapshotResponseInitiativesItemCapabilityImpactsMax).optional(),
5005
5177
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
5006
5178
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
5007
5179
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -5012,7 +5184,12 @@ var RenameSnapshotResponse = objectType({
5012
5184
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
5013
5185
  "checked": booleanType(),
5014
5186
  "asOfDate": stringType().optional(),
5015
- "note": stringType().max(renameSnapshotResponseInitiativesItemGateEvidenceNoteMax).optional()
5187
+ "note": stringType().max(renameSnapshotResponseInitiativesItemGateEvidenceNoteMax).optional(),
5188
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
5189
+ "checkedBy": objectType({
5190
+ "userId": stringType().uuid(),
5191
+ "name": stringType()
5192
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
5016
5193
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
5017
5194
  "gateBypassed": booleanType().optional(),
5018
5195
  "aiAct": objectType({
@@ -5095,6 +5272,7 @@ var RenameSnapshotResponse = objectType({
5095
5272
  "userId": stringType().uuid(),
5096
5273
  "name": stringType()
5097
5274
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
5275
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
5098
5276
  "createdAt": stringType(),
5099
5277
  "updatedAt": stringType()
5100
5278
  })),
@@ -5126,6 +5304,8 @@ var listInitiativesResponseStatusReportsMax = 1e3;
5126
5304
  var listInitiativesResponseDependsOnMax = 1e3;
5127
5305
  var listInitiativesResponseRequiredSkillsItemRunFteMin = 0;
5128
5306
  var listInitiativesResponseRequiredSkillsMax = 1e3;
5307
+ var listInitiativesResponseCapabilityImpactsItemMaturityToMax = 5;
5308
+ var listInitiativesResponseCapabilityImpactsMax = 1e3;
5129
5309
  var listInitiativesResponseDpiaUrlMax = 2e3;
5130
5310
  var listInitiativesResponseModelCardUrlMax = 2e3;
5131
5311
  var listInitiativesResponseProhibitedOverrideMax = 2e3;
@@ -5169,7 +5349,12 @@ var ListInitiativesResponseItem = objectType({
5169
5349
  "evaluation": objectType({
5170
5350
  "valueScale": objectType({
5171
5351
  "score": numberType(),
5172
- "confidence": enumType(["Low", "Medium", "High"])
5352
+ "confidence": enumType(["Low", "Medium", "High"]),
5353
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5354
+ "scoredBy": objectType({
5355
+ "userId": stringType().uuid(),
5356
+ "name": stringType()
5357
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5173
5358
  }).and(objectType({
5174
5359
  "subs": objectType({
5175
5360
  "frequencyOfProcess": numberType(),
@@ -5183,7 +5368,12 @@ var ListInitiativesResponseItem = objectType({
5183
5368
  })),
5184
5369
  "feasibility": objectType({
5185
5370
  "score": numberType(),
5186
- "confidence": enumType(["Low", "Medium", "High"])
5371
+ "confidence": enumType(["Low", "Medium", "High"]),
5372
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5373
+ "scoredBy": objectType({
5374
+ "userId": stringType().uuid(),
5375
+ "name": stringType()
5376
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5187
5377
  }).and(objectType({
5188
5378
  "subs": objectType({
5189
5379
  "dataAvailability": numberType(),
@@ -5197,7 +5387,12 @@ var ListInitiativesResponseItem = objectType({
5197
5387
  })),
5198
5388
  "governance": objectType({
5199
5389
  "score": numberType(),
5200
- "confidence": enumType(["Low", "Medium", "High"])
5390
+ "confidence": enumType(["Low", "Medium", "High"]),
5391
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5392
+ "scoredBy": objectType({
5393
+ "userId": stringType().uuid(),
5394
+ "name": stringType()
5395
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5201
5396
  }).and(objectType({
5202
5397
  "subs": objectType({
5203
5398
  "regulatoryExposure": numberType(),
@@ -5212,7 +5407,12 @@ var ListInitiativesResponseItem = objectType({
5212
5407
  })),
5213
5408
  "strategic": objectType({
5214
5409
  "score": numberType(),
5215
- "confidence": enumType(["Low", "Medium", "High"])
5410
+ "confidence": enumType(["Low", "Medium", "High"]),
5411
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5412
+ "scoredBy": objectType({
5413
+ "userId": stringType().uuid(),
5414
+ "name": stringType()
5415
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5216
5416
  }).and(objectType({
5217
5417
  "subs": objectType({
5218
5418
  "strategicDifferentiation": numberType(),
@@ -5267,7 +5467,12 @@ var ListInitiativesResponseItem = objectType({
5267
5467
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
5268
5468
  "owner": stringType().max(listInitiativesResponseDecisionLogItemOwnerMax).optional(),
5269
5469
  "rationale": stringType().max(listInitiativesResponseDecisionLogItemRationaleMax).optional(),
5270
- "createdAt": stringType().optional()
5470
+ "createdAt": stringType().optional(),
5471
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
5472
+ "recordedBy": objectType({
5473
+ "userId": stringType().uuid(),
5474
+ "name": stringType()
5475
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
5271
5476
  })).max(listInitiativesResponseDecisionLogMax).optional(),
5272
5477
  "statusReports": arrayType(objectType({
5273
5478
  "id": stringType(),
@@ -5297,6 +5502,11 @@ var ListInitiativesResponseItem = objectType({
5297
5502
  "fte": numberType(),
5298
5503
  "runFte": numberType().min(listInitiativesResponseRequiredSkillsItemRunFteMin).optional()
5299
5504
  })).max(listInitiativesResponseRequiredSkillsMax).optional(),
5505
+ "capabilityImpacts": arrayType(objectType({
5506
+ "capabilityId": stringType(),
5507
+ "kind": enumType(["improve", "new", "replace", "retire"]),
5508
+ "maturityTo": numberType().min(1).max(listInitiativesResponseCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
5509
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(listInitiativesResponseCapabilityImpactsMax).optional(),
5300
5510
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
5301
5511
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
5302
5512
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -5307,7 +5517,12 @@ var ListInitiativesResponseItem = objectType({
5307
5517
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
5308
5518
  "checked": booleanType(),
5309
5519
  "asOfDate": stringType().optional(),
5310
- "note": stringType().max(listInitiativesResponseGateEvidenceNoteMax).optional()
5520
+ "note": stringType().max(listInitiativesResponseGateEvidenceNoteMax).optional(),
5521
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
5522
+ "checkedBy": objectType({
5523
+ "userId": stringType().uuid(),
5524
+ "name": stringType()
5525
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
5311
5526
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
5312
5527
  "gateBypassed": booleanType().optional(),
5313
5528
  "aiAct": objectType({
@@ -5390,6 +5605,7 @@ var ListInitiativesResponseItem = objectType({
5390
5605
  "userId": stringType().uuid(),
5391
5606
  "name": stringType()
5392
5607
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
5608
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
5393
5609
  "createdAt": stringType(),
5394
5610
  "updatedAt": stringType()
5395
5611
  });
@@ -5417,6 +5633,8 @@ var createInitiativeBodyOneStatusReportsMax = 1e3;
5417
5633
  var createInitiativeBodyOneDependsOnMax = 1e3;
5418
5634
  var createInitiativeBodyOneRequiredSkillsItemRunFteMin = 0;
5419
5635
  var createInitiativeBodyOneRequiredSkillsMax = 1e3;
5636
+ var createInitiativeBodyOneCapabilityImpactsItemMaturityToMax = 5;
5637
+ var createInitiativeBodyOneCapabilityImpactsMax = 1e3;
5420
5638
  var createInitiativeBodyOneDpiaUrlMax = 2e3;
5421
5639
  var createInitiativeBodyOneModelCardUrlMax = 2e3;
5422
5640
  var createInitiativeBodyOneProhibitedOverrideMax = 2e3;
@@ -5460,7 +5678,12 @@ var CreateInitiativeBody = objectType({
5460
5678
  "evaluation": objectType({
5461
5679
  "valueScale": objectType({
5462
5680
  "score": numberType(),
5463
- "confidence": enumType(["Low", "Medium", "High"])
5681
+ "confidence": enumType(["Low", "Medium", "High"]),
5682
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5683
+ "scoredBy": objectType({
5684
+ "userId": stringType().uuid(),
5685
+ "name": stringType()
5686
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5464
5687
  }).and(objectType({
5465
5688
  "subs": objectType({
5466
5689
  "frequencyOfProcess": numberType(),
@@ -5474,7 +5697,12 @@ var CreateInitiativeBody = objectType({
5474
5697
  })),
5475
5698
  "feasibility": objectType({
5476
5699
  "score": numberType(),
5477
- "confidence": enumType(["Low", "Medium", "High"])
5700
+ "confidence": enumType(["Low", "Medium", "High"]),
5701
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5702
+ "scoredBy": objectType({
5703
+ "userId": stringType().uuid(),
5704
+ "name": stringType()
5705
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5478
5706
  }).and(objectType({
5479
5707
  "subs": objectType({
5480
5708
  "dataAvailability": numberType(),
@@ -5488,7 +5716,12 @@ var CreateInitiativeBody = objectType({
5488
5716
  })),
5489
5717
  "governance": objectType({
5490
5718
  "score": numberType(),
5491
- "confidence": enumType(["Low", "Medium", "High"])
5719
+ "confidence": enumType(["Low", "Medium", "High"]),
5720
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5721
+ "scoredBy": objectType({
5722
+ "userId": stringType().uuid(),
5723
+ "name": stringType()
5724
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5492
5725
  }).and(objectType({
5493
5726
  "subs": objectType({
5494
5727
  "regulatoryExposure": numberType(),
@@ -5503,7 +5736,12 @@ var CreateInitiativeBody = objectType({
5503
5736
  })),
5504
5737
  "strategic": objectType({
5505
5738
  "score": numberType(),
5506
- "confidence": enumType(["Low", "Medium", "High"])
5739
+ "confidence": enumType(["Low", "Medium", "High"]),
5740
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
5741
+ "scoredBy": objectType({
5742
+ "userId": stringType().uuid(),
5743
+ "name": stringType()
5744
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5507
5745
  }).and(objectType({
5508
5746
  "subs": objectType({
5509
5747
  "strategicDifferentiation": numberType(),
@@ -5558,7 +5796,12 @@ var CreateInitiativeBody = objectType({
5558
5796
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
5559
5797
  "owner": stringType().max(createInitiativeBodyOneDecisionLogItemOwnerMax).optional(),
5560
5798
  "rationale": stringType().max(createInitiativeBodyOneDecisionLogItemRationaleMax).optional(),
5561
- "createdAt": stringType().optional()
5799
+ "createdAt": stringType().optional(),
5800
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
5801
+ "recordedBy": objectType({
5802
+ "userId": stringType().uuid(),
5803
+ "name": stringType()
5804
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
5562
5805
  })).max(createInitiativeBodyOneDecisionLogMax).optional(),
5563
5806
  "statusReports": arrayType(objectType({
5564
5807
  "id": stringType(),
@@ -5588,6 +5831,11 @@ var CreateInitiativeBody = objectType({
5588
5831
  "fte": numberType(),
5589
5832
  "runFte": numberType().min(createInitiativeBodyOneRequiredSkillsItemRunFteMin).optional()
5590
5833
  })).max(createInitiativeBodyOneRequiredSkillsMax).optional(),
5834
+ "capabilityImpacts": arrayType(objectType({
5835
+ "capabilityId": stringType(),
5836
+ "kind": enumType(["improve", "new", "replace", "retire"]),
5837
+ "maturityTo": numberType().min(1).max(createInitiativeBodyOneCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
5838
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(createInitiativeBodyOneCapabilityImpactsMax).optional(),
5591
5839
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
5592
5840
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
5593
5841
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -5598,7 +5846,12 @@ var CreateInitiativeBody = objectType({
5598
5846
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
5599
5847
  "checked": booleanType(),
5600
5848
  "asOfDate": stringType().optional(),
5601
- "note": stringType().max(createInitiativeBodyOneGateEvidenceNoteMax).optional()
5849
+ "note": stringType().max(createInitiativeBodyOneGateEvidenceNoteMax).optional(),
5850
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
5851
+ "checkedBy": objectType({
5852
+ "userId": stringType().uuid(),
5853
+ "name": stringType()
5854
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
5602
5855
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
5603
5856
  "gateBypassed": booleanType().optional(),
5604
5857
  "aiAct": objectType({
@@ -5681,6 +5934,7 @@ var CreateInitiativeBody = objectType({
5681
5934
  "userId": stringType().uuid(),
5682
5935
  "name": stringType()
5683
5936
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
5937
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
5684
5938
  "createdAt": stringType(),
5685
5939
  "updatedAt": stringType()
5686
5940
  }).and(objectType({
@@ -5688,7 +5942,9 @@ var CreateInitiativeBody = objectType({
5688
5942
  "createdBy": unknownType().optional(),
5689
5943
  "updatedBy": unknownType().optional(),
5690
5944
  "createdAt": unknownType().optional(),
5691
- "updatedAt": unknownType().optional()
5945
+ "updatedAt": unknownType().optional(),
5946
+ "version": unknownType().optional(),
5947
+ "baseVersion": numberType().min(1).optional().describe("PUT only: the version the edit is based on. When it differs from the stored version, someone else saved in between and the save is refused with 409 and the current copy. Omitted (clients that predate it), the save is not checked. A separate field, not `version`, because older clients echo every field they received, including `version`, without ever updating it.")
5692
5948
  })).describe("Same as Initiative, minus server-assigned fields.");
5693
5949
  var GetInitiativeParams = objectType({
5694
5950
  "id": coerce.string().uuid()
@@ -5716,6 +5972,8 @@ var getInitiativeResponseStatusReportsMax = 1e3;
5716
5972
  var getInitiativeResponseDependsOnMax = 1e3;
5717
5973
  var getInitiativeResponseRequiredSkillsItemRunFteMin = 0;
5718
5974
  var getInitiativeResponseRequiredSkillsMax = 1e3;
5975
+ var getInitiativeResponseCapabilityImpactsItemMaturityToMax = 5;
5976
+ var getInitiativeResponseCapabilityImpactsMax = 1e3;
5719
5977
  var getInitiativeResponseDpiaUrlMax = 2e3;
5720
5978
  var getInitiativeResponseModelCardUrlMax = 2e3;
5721
5979
  var getInitiativeResponseProhibitedOverrideMax = 2e3;
@@ -5759,7 +6017,12 @@ var GetInitiativeResponse = objectType({
5759
6017
  "evaluation": objectType({
5760
6018
  "valueScale": objectType({
5761
6019
  "score": numberType(),
5762
- "confidence": enumType(["Low", "Medium", "High"])
6020
+ "confidence": enumType(["Low", "Medium", "High"]),
6021
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6022
+ "scoredBy": objectType({
6023
+ "userId": stringType().uuid(),
6024
+ "name": stringType()
6025
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5763
6026
  }).and(objectType({
5764
6027
  "subs": objectType({
5765
6028
  "frequencyOfProcess": numberType(),
@@ -5773,7 +6036,12 @@ var GetInitiativeResponse = objectType({
5773
6036
  })),
5774
6037
  "feasibility": objectType({
5775
6038
  "score": numberType(),
5776
- "confidence": enumType(["Low", "Medium", "High"])
6039
+ "confidence": enumType(["Low", "Medium", "High"]),
6040
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6041
+ "scoredBy": objectType({
6042
+ "userId": stringType().uuid(),
6043
+ "name": stringType()
6044
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5777
6045
  }).and(objectType({
5778
6046
  "subs": objectType({
5779
6047
  "dataAvailability": numberType(),
@@ -5787,7 +6055,12 @@ var GetInitiativeResponse = objectType({
5787
6055
  })),
5788
6056
  "governance": objectType({
5789
6057
  "score": numberType(),
5790
- "confidence": enumType(["Low", "Medium", "High"])
6058
+ "confidence": enumType(["Low", "Medium", "High"]),
6059
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6060
+ "scoredBy": objectType({
6061
+ "userId": stringType().uuid(),
6062
+ "name": stringType()
6063
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5791
6064
  }).and(objectType({
5792
6065
  "subs": objectType({
5793
6066
  "regulatoryExposure": numberType(),
@@ -5802,7 +6075,12 @@ var GetInitiativeResponse = objectType({
5802
6075
  })),
5803
6076
  "strategic": objectType({
5804
6077
  "score": numberType(),
5805
- "confidence": enumType(["Low", "Medium", "High"])
6078
+ "confidence": enumType(["Low", "Medium", "High"]),
6079
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6080
+ "scoredBy": objectType({
6081
+ "userId": stringType().uuid(),
6082
+ "name": stringType()
6083
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
5806
6084
  }).and(objectType({
5807
6085
  "subs": objectType({
5808
6086
  "strategicDifferentiation": numberType(),
@@ -5857,7 +6135,12 @@ var GetInitiativeResponse = objectType({
5857
6135
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
5858
6136
  "owner": stringType().max(getInitiativeResponseDecisionLogItemOwnerMax).optional(),
5859
6137
  "rationale": stringType().max(getInitiativeResponseDecisionLogItemRationaleMax).optional(),
5860
- "createdAt": stringType().optional()
6138
+ "createdAt": stringType().optional(),
6139
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
6140
+ "recordedBy": objectType({
6141
+ "userId": stringType().uuid(),
6142
+ "name": stringType()
6143
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
5861
6144
  })).max(getInitiativeResponseDecisionLogMax).optional(),
5862
6145
  "statusReports": arrayType(objectType({
5863
6146
  "id": stringType(),
@@ -5887,6 +6170,11 @@ var GetInitiativeResponse = objectType({
5887
6170
  "fte": numberType(),
5888
6171
  "runFte": numberType().min(getInitiativeResponseRequiredSkillsItemRunFteMin).optional()
5889
6172
  })).max(getInitiativeResponseRequiredSkillsMax).optional(),
6173
+ "capabilityImpacts": arrayType(objectType({
6174
+ "capabilityId": stringType(),
6175
+ "kind": enumType(["improve", "new", "replace", "retire"]),
6176
+ "maturityTo": numberType().min(1).max(getInitiativeResponseCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
6177
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(getInitiativeResponseCapabilityImpactsMax).optional(),
5890
6178
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
5891
6179
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
5892
6180
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -5897,7 +6185,12 @@ var GetInitiativeResponse = objectType({
5897
6185
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
5898
6186
  "checked": booleanType(),
5899
6187
  "asOfDate": stringType().optional(),
5900
- "note": stringType().max(getInitiativeResponseGateEvidenceNoteMax).optional()
6188
+ "note": stringType().max(getInitiativeResponseGateEvidenceNoteMax).optional(),
6189
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
6190
+ "checkedBy": objectType({
6191
+ "userId": stringType().uuid(),
6192
+ "name": stringType()
6193
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
5901
6194
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
5902
6195
  "gateBypassed": booleanType().optional(),
5903
6196
  "aiAct": objectType({
@@ -5980,6 +6273,7 @@ var GetInitiativeResponse = objectType({
5980
6273
  "userId": stringType().uuid(),
5981
6274
  "name": stringType()
5982
6275
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
6276
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
5983
6277
  "createdAt": stringType(),
5984
6278
  "updatedAt": stringType()
5985
6279
  });
@@ -6009,6 +6303,8 @@ var updateInitiativeBodyOneStatusReportsMax = 1e3;
6009
6303
  var updateInitiativeBodyOneDependsOnMax = 1e3;
6010
6304
  var updateInitiativeBodyOneRequiredSkillsItemRunFteMin = 0;
6011
6305
  var updateInitiativeBodyOneRequiredSkillsMax = 1e3;
6306
+ var updateInitiativeBodyOneCapabilityImpactsItemMaturityToMax = 5;
6307
+ var updateInitiativeBodyOneCapabilityImpactsMax = 1e3;
6012
6308
  var updateInitiativeBodyOneDpiaUrlMax = 2e3;
6013
6309
  var updateInitiativeBodyOneModelCardUrlMax = 2e3;
6014
6310
  var updateInitiativeBodyOneProhibitedOverrideMax = 2e3;
@@ -6052,7 +6348,12 @@ var UpdateInitiativeBody = objectType({
6052
6348
  "evaluation": objectType({
6053
6349
  "valueScale": objectType({
6054
6350
  "score": numberType(),
6055
- "confidence": enumType(["Low", "Medium", "High"])
6351
+ "confidence": enumType(["Low", "Medium", "High"]),
6352
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6353
+ "scoredBy": objectType({
6354
+ "userId": stringType().uuid(),
6355
+ "name": stringType()
6356
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6056
6357
  }).and(objectType({
6057
6358
  "subs": objectType({
6058
6359
  "frequencyOfProcess": numberType(),
@@ -6066,7 +6367,12 @@ var UpdateInitiativeBody = objectType({
6066
6367
  })),
6067
6368
  "feasibility": objectType({
6068
6369
  "score": numberType(),
6069
- "confidence": enumType(["Low", "Medium", "High"])
6370
+ "confidence": enumType(["Low", "Medium", "High"]),
6371
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6372
+ "scoredBy": objectType({
6373
+ "userId": stringType().uuid(),
6374
+ "name": stringType()
6375
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6070
6376
  }).and(objectType({
6071
6377
  "subs": objectType({
6072
6378
  "dataAvailability": numberType(),
@@ -6080,7 +6386,12 @@ var UpdateInitiativeBody = objectType({
6080
6386
  })),
6081
6387
  "governance": objectType({
6082
6388
  "score": numberType(),
6083
- "confidence": enumType(["Low", "Medium", "High"])
6389
+ "confidence": enumType(["Low", "Medium", "High"]),
6390
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6391
+ "scoredBy": objectType({
6392
+ "userId": stringType().uuid(),
6393
+ "name": stringType()
6394
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6084
6395
  }).and(objectType({
6085
6396
  "subs": objectType({
6086
6397
  "regulatoryExposure": numberType(),
@@ -6095,7 +6406,12 @@ var UpdateInitiativeBody = objectType({
6095
6406
  })),
6096
6407
  "strategic": objectType({
6097
6408
  "score": numberType(),
6098
- "confidence": enumType(["Low", "Medium", "High"])
6409
+ "confidence": enumType(["Low", "Medium", "High"]),
6410
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6411
+ "scoredBy": objectType({
6412
+ "userId": stringType().uuid(),
6413
+ "name": stringType()
6414
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6099
6415
  }).and(objectType({
6100
6416
  "subs": objectType({
6101
6417
  "strategicDifferentiation": numberType(),
@@ -6150,7 +6466,12 @@ var UpdateInitiativeBody = objectType({
6150
6466
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
6151
6467
  "owner": stringType().max(updateInitiativeBodyOneDecisionLogItemOwnerMax).optional(),
6152
6468
  "rationale": stringType().max(updateInitiativeBodyOneDecisionLogItemRationaleMax).optional(),
6153
- "createdAt": stringType().optional()
6469
+ "createdAt": stringType().optional(),
6470
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
6471
+ "recordedBy": objectType({
6472
+ "userId": stringType().uuid(),
6473
+ "name": stringType()
6474
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
6154
6475
  })).max(updateInitiativeBodyOneDecisionLogMax).optional(),
6155
6476
  "statusReports": arrayType(objectType({
6156
6477
  "id": stringType(),
@@ -6180,6 +6501,11 @@ var UpdateInitiativeBody = objectType({
6180
6501
  "fte": numberType(),
6181
6502
  "runFte": numberType().min(updateInitiativeBodyOneRequiredSkillsItemRunFteMin).optional()
6182
6503
  })).max(updateInitiativeBodyOneRequiredSkillsMax).optional(),
6504
+ "capabilityImpacts": arrayType(objectType({
6505
+ "capabilityId": stringType(),
6506
+ "kind": enumType(["improve", "new", "replace", "retire"]),
6507
+ "maturityTo": numberType().min(1).max(updateInitiativeBodyOneCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
6508
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(updateInitiativeBodyOneCapabilityImpactsMax).optional(),
6183
6509
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
6184
6510
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
6185
6511
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -6190,7 +6516,12 @@ var UpdateInitiativeBody = objectType({
6190
6516
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
6191
6517
  "checked": booleanType(),
6192
6518
  "asOfDate": stringType().optional(),
6193
- "note": stringType().max(updateInitiativeBodyOneGateEvidenceNoteMax).optional()
6519
+ "note": stringType().max(updateInitiativeBodyOneGateEvidenceNoteMax).optional(),
6520
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
6521
+ "checkedBy": objectType({
6522
+ "userId": stringType().uuid(),
6523
+ "name": stringType()
6524
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
6194
6525
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
6195
6526
  "gateBypassed": booleanType().optional(),
6196
6527
  "aiAct": objectType({
@@ -6273,6 +6604,7 @@ var UpdateInitiativeBody = objectType({
6273
6604
  "userId": stringType().uuid(),
6274
6605
  "name": stringType()
6275
6606
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
6607
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
6276
6608
  "createdAt": stringType(),
6277
6609
  "updatedAt": stringType()
6278
6610
  }).and(objectType({
@@ -6280,7 +6612,9 @@ var UpdateInitiativeBody = objectType({
6280
6612
  "createdBy": unknownType().optional(),
6281
6613
  "updatedBy": unknownType().optional(),
6282
6614
  "createdAt": unknownType().optional(),
6283
- "updatedAt": unknownType().optional()
6615
+ "updatedAt": unknownType().optional(),
6616
+ "version": unknownType().optional(),
6617
+ "baseVersion": numberType().min(1).optional().describe("PUT only: the version the edit is based on. When it differs from the stored version, someone else saved in between and the save is refused with 409 and the current copy. Omitted (clients that predate it), the save is not checked. A separate field, not `version`, because older clients echo every field they received, including `version`, without ever updating it.")
6284
6618
  })).describe("Same as Initiative, minus server-assigned fields.");
6285
6619
  var updateInitiativeResponseNameMax = 200;
6286
6620
  var updateInitiativeResponseExternalIdMax = 200;
@@ -6305,6 +6639,8 @@ var updateInitiativeResponseStatusReportsMax = 1e3;
6305
6639
  var updateInitiativeResponseDependsOnMax = 1e3;
6306
6640
  var updateInitiativeResponseRequiredSkillsItemRunFteMin = 0;
6307
6641
  var updateInitiativeResponseRequiredSkillsMax = 1e3;
6642
+ var updateInitiativeResponseCapabilityImpactsItemMaturityToMax = 5;
6643
+ var updateInitiativeResponseCapabilityImpactsMax = 1e3;
6308
6644
  var updateInitiativeResponseDpiaUrlMax = 2e3;
6309
6645
  var updateInitiativeResponseModelCardUrlMax = 2e3;
6310
6646
  var updateInitiativeResponseProhibitedOverrideMax = 2e3;
@@ -6348,7 +6684,12 @@ var UpdateInitiativeResponse = objectType({
6348
6684
  "evaluation": objectType({
6349
6685
  "valueScale": objectType({
6350
6686
  "score": numberType(),
6351
- "confidence": enumType(["Low", "Medium", "High"])
6687
+ "confidence": enumType(["Low", "Medium", "High"]),
6688
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6689
+ "scoredBy": objectType({
6690
+ "userId": stringType().uuid(),
6691
+ "name": stringType()
6692
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6352
6693
  }).and(objectType({
6353
6694
  "subs": objectType({
6354
6695
  "frequencyOfProcess": numberType(),
@@ -6362,7 +6703,12 @@ var UpdateInitiativeResponse = objectType({
6362
6703
  })),
6363
6704
  "feasibility": objectType({
6364
6705
  "score": numberType(),
6365
- "confidence": enumType(["Low", "Medium", "High"])
6706
+ "confidence": enumType(["Low", "Medium", "High"]),
6707
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6708
+ "scoredBy": objectType({
6709
+ "userId": stringType().uuid(),
6710
+ "name": stringType()
6711
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6366
6712
  }).and(objectType({
6367
6713
  "subs": objectType({
6368
6714
  "dataAvailability": numberType(),
@@ -6376,7 +6722,12 @@ var UpdateInitiativeResponse = objectType({
6376
6722
  })),
6377
6723
  "governance": objectType({
6378
6724
  "score": numberType(),
6379
- "confidence": enumType(["Low", "Medium", "High"])
6725
+ "confidence": enumType(["Low", "Medium", "High"]),
6726
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6727
+ "scoredBy": objectType({
6728
+ "userId": stringType().uuid(),
6729
+ "name": stringType()
6730
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6380
6731
  }).and(objectType({
6381
6732
  "subs": objectType({
6382
6733
  "regulatoryExposure": numberType(),
@@ -6391,7 +6742,12 @@ var UpdateInitiativeResponse = objectType({
6391
6742
  })),
6392
6743
  "strategic": objectType({
6393
6744
  "score": numberType(),
6394
- "confidence": enumType(["Low", "Medium", "High"])
6745
+ "confidence": enumType(["Low", "Medium", "High"]),
6746
+ "scoredAt": stringType().optional().describe("Server stamp: when this dimension's confidence or a sub-score last changed. Absent until a save changes it. Ignored in requests."),
6747
+ "scoredBy": objectType({
6748
+ "userId": stringType().uuid(),
6749
+ "name": stringType()
6750
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who made that change. Ignored in requests.")
6395
6751
  }).and(objectType({
6396
6752
  "subs": objectType({
6397
6753
  "strategicDifferentiation": numberType(),
@@ -6446,7 +6802,12 @@ var UpdateInitiativeResponse = objectType({
6446
6802
  "kind": enumType(["go", "pause", "stop", "rescope", "rebudget", "other"]),
6447
6803
  "owner": stringType().max(updateInitiativeResponseDecisionLogItemOwnerMax).optional(),
6448
6804
  "rationale": stringType().max(updateInitiativeResponseDecisionLogItemRationaleMax).optional(),
6449
- "createdAt": stringType().optional()
6805
+ "createdAt": stringType().optional(),
6806
+ "recordedAt": stringType().optional().describe("Server stamp: when the entry was recorded or its content last changed (`date` is when the decision was taken). Absent on entries not saved since the stamps were introduced. Ignored in requests."),
6807
+ "recordedBy": objectType({
6808
+ "userId": stringType().uuid(),
6809
+ "name": stringType()
6810
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who recorded it. Ignored in requests.")
6450
6811
  })).max(updateInitiativeResponseDecisionLogMax).optional(),
6451
6812
  "statusReports": arrayType(objectType({
6452
6813
  "id": stringType(),
@@ -6476,6 +6837,11 @@ var UpdateInitiativeResponse = objectType({
6476
6837
  "fte": numberType(),
6477
6838
  "runFte": numberType().min(updateInitiativeResponseRequiredSkillsItemRunFteMin).optional()
6478
6839
  })).max(updateInitiativeResponseRequiredSkillsMax).optional(),
6840
+ "capabilityImpacts": arrayType(objectType({
6841
+ "capabilityId": stringType(),
6842
+ "kind": enumType(["improve", "new", "replace", "retire"]),
6843
+ "maturityTo": numberType().min(1).max(updateInitiativeResponseCapabilityImpactsItemMaturityToMax).optional().describe("The maturity level the initiative brings the capability to; absent for `retire`.")
6844
+ }).describe("What an initiative does to one capability of the organisation's map.")).max(updateInitiativeResponseCapabilityImpactsMax).optional(),
6479
6845
  "aiRiskTier": enumType(["Prohibited", "High-Risk", "Limited", "Minimal"]).optional(),
6480
6846
  "hitlPosture": enumType(["Unattended", "Supervised", "Human-Required"]).optional(),
6481
6847
  "dpiaStatus": enumType(["Not Required", "In Progress", "Completed"]).optional(),
@@ -6486,7 +6852,12 @@ var UpdateInitiativeResponse = objectType({
6486
6852
  "gateEvidence": recordType(stringType(), recordType(stringType(), objectType({
6487
6853
  "checked": booleanType(),
6488
6854
  "asOfDate": stringType().optional(),
6489
- "note": stringType().max(updateInitiativeResponseGateEvidenceNoteMax).optional()
6855
+ "note": stringType().max(updateInitiativeResponseGateEvidenceNoteMax).optional(),
6856
+ "checkedAt": stringType().optional().describe("Server stamp: when the item was ticked; absent while unchecked or ticked before the stamps were introduced. Ignored in requests."),
6857
+ "checkedBy": objectType({
6858
+ "userId": stringType().uuid(),
6859
+ "name": stringType()
6860
+ }).describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body.").optional().describe("Server stamp, who ticked it. Ignored in requests.")
6490
6861
  }))).optional().describe("Partial<Record<GateTransitionKey, Record<itemId, GateEvidenceItem>>>"),
6491
6862
  "gateBypassed": booleanType().optional(),
6492
6863
  "aiAct": objectType({
@@ -6569,6 +6940,7 @@ var UpdateInitiativeResponse = objectType({
6569
6940
  "userId": stringType().uuid(),
6570
6941
  "name": stringType()
6571
6942
  }).optional().describe("Display reference to the local user who created / last edited a record. Server-assigned from the authenticated session \u2014 never taken from the request body."),
6943
+ "version": numberType().min(1).optional().describe("Save counter, raised by the server on every save. A request names the version its edit is based on in InitiativeInput.baseVersion; this field is ignored in requests."),
6572
6944
  "createdAt": stringType(),
6573
6945
  "updatedAt": stringType()
6574
6946
  });
@@ -6605,7 +6977,7 @@ var ListAdminAuditLogQueryParams = objectType({
6605
6977
  });
6606
6978
  var ListAdminAuditLogResponseItem = objectType({
6607
6979
  "id": stringType().uuid(),
6608
- "action": enumType(["member.added", "member.role_changed", "member.permissions_changed", "member.removed", "settings.updated", "permission_profile.created", "permission_profile.updated", "permission_profile.deleted", "initiative.created", "initiative.deleted", "snapshot.created", "snapshot.renamed", "snapshot.deleted", "skill.created", "skill.updated", "skill.deleted", "organization.renamed", "user.erased"]),
6980
+ "action": enumType(["member.added", "member.role_changed", "member.permissions_changed", "member.removed", "settings.updated", "permission_profile.created", "permission_profile.updated", "permission_profile.deleted", "initiative.created", "initiative.deleted", "snapshot.created", "snapshot.renamed", "snapshot.deleted", "skill.created", "skill.updated", "skill.deleted", "capability.created", "capability.updated", "capability.deleted", "organization.renamed", "user.erased"]),
6609
6981
  "targetType": stringType(),
6610
6982
  "targetId": stringType().nullable(),
6611
6983
  "actorName": stringType().nullable(),
@@ -6711,6 +7083,9 @@ var GATE_TRANSITIONS = [
6711
7083
  { key: "scaling-production", from: "Scaling", to: "In Production" }
6712
7084
  ];
6713
7085
  var GATE_TRANSITION_KEYS = GATE_TRANSITIONS.map((t) => t.key);
7086
+ var CAPABILITY_IMPORTANCES = ["differentiating", "core", "supporting"];
7087
+ var CAPABILITY_MATURITY_MIN = 1;
7088
+ var CAPABILITY_MATURITY_MAX = 5;
6714
7089
  var ANNEX_III_CATEGORIES = [
6715
7090
  "Biometrics",
6716
7091
  "Critical Infrastructure",
@@ -6841,6 +7216,7 @@ var EN_DIGITAL = {
6841
7216
  "govLabel.Controlled Automation": "Controlled Operation",
6842
7217
  "govLabel.Human-in-the-Loop Required": "Supervised Operation Required",
6843
7218
  "govLabel.Restricted Deployment": "Restricted Rollout",
7219
+ "memo.governance.intro": "{count} initiatives sit in the Restricted Rollout band or above (governance \u2265 61/100) and require active board-level monitoring.",
6844
7220
  "subHelp.modelRobustness": "Stability of the solution under load, edge cases and unexpected inputs.",
6845
7221
  "subHelp.reproducibility": "Maturity of the underlying cloud / platform stack \u2014 proven and supported (managed services, mature regions, SLAs) vs experimental or self-hosted.",
6846
7222
  "subHelp.explainability": "How clearly the system's behaviour and outputs can be explained to operators and end-users.",
@@ -7057,6 +7433,7 @@ var DE_DIGITAL = {
7057
7433
  "govLabel.Controlled Automation": "Kontrollierter Betrieb",
7058
7434
  "govLabel.Human-in-the-Loop Required": "Beaufsichtigter Betrieb erforderlich",
7059
7435
  "govLabel.Restricted Deployment": "Eingeschr\xE4nkter Rollout",
7436
+ "memo.governance.intro": "{count} Initiativen liegen im Band \u201EEingeschr\xE4nkter Rollout\u201C oder dar\xFCber (Governance \u2265 61/100) und ben\xF6tigen aktive Vorstandsaufsicht.",
7060
7437
  "subHelp.modelRobustness": "Stabilit\xE4t der L\xF6sung unter Last, bei Edge-Cases und unerwarteten Eingaben.",
7061
7438
  "subHelp.reproducibility": "Reife des zugrundeliegenden Cloud-/Plattform-Stacks \u2014 bew\xE4hrt und supportet (Managed Services, etablierte Regionen, SLAs) vs. experimentell oder selbstgehostet.",
7062
7439
  "subHelp.explainability": "Wie klar Verhalten und Ergebnisse des Systems Betreibern und Endnutzern erkl\xE4rbar sind.",
@@ -7273,6 +7650,7 @@ var EN_INNOVATION = {
7273
7650
  "govLabel.Controlled Automation": "Monitored Trial",
7274
7651
  "govLabel.Human-in-the-Loop Required": "Active Stewardship Required",
7275
7652
  "govLabel.Restricted Deployment": "Bounded Pilot Only",
7653
+ "memo.governance.intro": "{count} initiatives sit in the Bounded Pilot Only band or above (governance \u2265 61/100) and require active board-level monitoring.",
7276
7654
  "govLabel.High Governance Sensitivity": "Board-Level Sponsorship Required",
7277
7655
  "subHelp.modelRobustness": "How well the core concept holds up under stress, edge cases and pessimistic assumptions.",
7278
7656
  "subHelp.reproducibility": "Likelihood that observed results would repeat under independent conditions.",
@@ -7538,6 +7916,7 @@ var DE_INNOVATION = {
7538
7916
  "govLabel.Controlled Automation": "\xDCberwachte Erprobung",
7539
7917
  "govLabel.Human-in-the-Loop Required": "Aktive Begleitung erforderlich",
7540
7918
  "govLabel.Restricted Deployment": "Nur eingegrenzter Pilot",
7919
+ "memo.governance.intro": "{count} Initiativen liegen im Band \u201ENur eingegrenzter Pilot\u201C oder dar\xFCber (Governance \u2265 61/100) und ben\xF6tigen aktive Vorstandsaufsicht.",
7541
7920
  "govLabel.High Governance Sensitivity": "Vorstandspatenschaft erforderlich",
7542
7921
  "subHelp.modelRobustness": "Wie gut das Kernkonzept Belastung, Edge-Cases und pessimistische Annahmen aush\xE4lt.",
7543
7922
  "subHelp.reproducibility": "Wahrscheinlichkeit, dass beobachtete Ergebnisse unter unabh\xE4ngigen Bedingungen wiederholbar sind.",
@@ -9055,6 +9434,13 @@ var OPTIONAL_SECTIONS = [
9055
9434
  { key: "economics", hint: { en: "Benefit/cost P10/P50/P90 ranges, ramp, confidence, discount rate", de: "Nutzen/Kosten P10/P50/P90, Ramp, Konfidenz, Diskontsatz" } },
9056
9435
  { key: "decisionLog", hint: { en: "Dated decisions (go/pause/stop/rescope/rebudget/other)", de: "Datierte Entscheidungen" } },
9057
9436
  { key: "statusReports", hint: { en: "Dated RAG reports (scope/timeline/budget/skills)", de: "Datierte RAG-Berichte" } },
9437
+ {
9438
+ key: "capabilityImpacts",
9439
+ hint: {
9440
+ en: "[{capabilityId, kind: improve|new|replace|retire, maturityTo?}] \u2014 what the initiative does to a capability of the organisation's map; maturityTo (1\u20135) is the level it brings the capability to (omit = the capability's target; never for retire). With the portfolio-context file, pick from read_portfolio_context \u2192 lists.capabilities (id, name, domain, current \u2192 target maturity); without it, leave empty and link capabilities in the app.",
9441
+ de: "[{capabilityId, kind: improve|new|replace|retire, maturityTo?}] \u2014 was die Initiative mit einer F\xE4higkeit der Landkarte macht; maturityTo (1\u20135) ist die Stufe, auf die sie die F\xE4higkeit bringt (fehlend = Ziel der F\xE4higkeit; nie bei retire). Mit der Portfolio-Kontext-Datei aus read_portfolio_context \u2192 lists.capabilities (ID, Name, Dom\xE4ne, Reife heute \u2192 Ziel) w\xE4hlen; ohne sie leer lassen und in der App verkn\xFCpfen."
9442
+ }
9443
+ },
9058
9444
  {
9059
9445
  key: "requiredSkills",
9060
9446
  hint: {
@@ -9139,7 +9525,7 @@ function buildSchemaDescriptor(sectionShapes) {
9139
9525
  },
9140
9526
  optionalSections: OPTIONAL_SECTIONS,
9141
9527
  // Exact shapes of the object/array sections (aiAct, economics, actuals,
9142
- // decisionLog, statusReports, requiredSkills). Keys ending in "?" are
9528
+ // decisionLog, statusReports, requiredSkills, capabilityImpacts). Keys ending in "?" are
9143
9529
  // optional; "enum[a|b]" lists the allowed values; "<key>" marks a map.
9144
9530
  // Pass these sections as JSON objects/arrays. Any key not listed is
9145
9531
  // rejected with its path.
@@ -9149,7 +9535,7 @@ function buildSchemaDescriptor(sectionShapes) {
9149
9535
  ...AI_ACT_VOCABULARIES,
9150
9536
  note: "prohibitedPractices/art50Flags: arrays of these ids. artifacts/obligations: maps keyed by these ids. annexIIICategory: one of these, or omit when no Annex III area applies (record the reasoning in classificationRationale; annexExceptionRationale is only for an Art. 6(3) exception claim). Empty is honest; invented values are rejected."
9151
9537
  },
9152
- portfolioContext: "Ask the user for the organisation's portfolio-context file first (in the app: Import/Export \u2192 'Download portfolio context'). Call read_portfolio_context on it: it returns the interview plan in the organisation's own wording, the sub-dimensions that are switched off, the slider step the ratings must follow, and the organisation's business units, categories, tags, skills and initiatives \u2014 with the file, business unit and category MUST be from those lists (no inventing) and skill / dependency ids are validated. Pass the same context to assemble_initiative and export_initiative_file. Without the file, interview with the wording below and treat business unit / category as free text.",
9538
+ portfolioContext: "Ask the user for the organisation's portfolio-context file first (in the app: Import/Export \u2192 'Download portfolio context'). Call read_portfolio_context on it: it returns the interview plan in the organisation's own wording, the sub-dimensions that are switched off, the slider step the ratings must follow, and the organisation's business units, categories, tags, skills, initiatives and capabilities \u2014 with the file, business unit and category MUST be from those lists (no inventing) and skill / dependency / capability ids are validated. Pass the same context to assemble_initiative and export_initiative_file. Without the file, interview with the wording below and treat business unit / category as free text.",
9153
9539
  handoff: "Call assemble_initiative with the compact spec (+ context), review derivedScores (and any warnings) with the user, then call export_initiative_file with the SAME spec (+ context) \u2192 save the JSON \u2192 in the app: Import/Export \u2192 Single initiative \u2192 drop the file \u2192 'Add as new' \u2192 Confirm. If the initiative carries EU-AI-Act data, the organisation's EU-AI-Act module must be switched on (Settings \u203A AI Act) when importing."
9154
9540
  };
9155
9541
  }
@@ -9191,12 +9577,14 @@ var keepDescription = (from, to) => from.description ? to.describe(from.descript
9191
9577
  var dateField = (what) => external_exports.preprocess(normaliseDateInput, external_exports.string().refine(isCalendarDate, { message: `${what} must be a real calendar date \u2014 dd/mm/yyyy or yyyy-mm-dd` })).describe("dd/mm/yyyy (or yyyy-mm-dd)");
9192
9578
  var DATE_LIKE_KEY = /^date$|Date$|At$/;
9193
9579
  var MINTED_KEYS = /* @__PURE__ */ new Set(["id", "createdAt", "updatedAt"]);
9580
+ var SERVER_STAMP_KEY = /^(recorded|scored|checked)(At|By)$/;
9194
9581
  var holdsString = (s) => s instanceof external_exports.ZodString || s instanceof external_exports.ZodOptional && s.unwrap() instanceof external_exports.ZodString || s instanceof external_exports.ZodNullable && s.unwrap() instanceof external_exports.ZodString;
9195
9582
  function deepStrict(schema) {
9196
9583
  const walk = (s, inArrayItem = false) => {
9197
9584
  if (s instanceof external_exports.ZodObject) {
9198
9585
  const next = {};
9199
9586
  for (const [k, v] of Object.entries(s.shape)) {
9587
+ if (SERVER_STAMP_KEY.test(k)) continue;
9200
9588
  let field = walk(v, false);
9201
9589
  if (inArrayItem && MINTED_KEYS.has(k) && !(field instanceof external_exports.ZodOptional)) field = field.optional();
9202
9590
  if (DATE_LIKE_KEY.test(k) && holdsString(field)) field = keepDescription(field, external_exports.preprocess(normaliseDateInput, field));
@@ -9233,7 +9621,7 @@ var parseIfString = (v) => typeof v === "string" ? tryParseJson(v) : v;
9233
9621
  function wireSection(inner, description) {
9234
9622
  return external_exports.preprocess(parseIfString, deepStrict(inner)).describe(description);
9235
9623
  }
9236
- var SECTION_KEYS = ["aiAct", "economics", "actuals", "decisionLog", "statusReports", "requiredSkills"];
9624
+ var SECTION_KEYS = ["aiAct", "economics", "actuals", "decisionLog", "statusReports", "requiredSkills", "capabilityImpacts"];
9237
9625
  var SECTION_SCHEMAS = Object.fromEntries(
9238
9626
  SECTION_KEYS.map((k) => [k, contractSection(k)])
9239
9627
  );
@@ -9243,6 +9631,7 @@ var SECTION_DESCRIPTIONS = {
9243
9631
  actuals: "Actuals block (In Production only) \u2014 see sectionShapes.actuals.",
9244
9632
  decisionLog: "Decision log entries \u2014 see sectionShapes.decisionLog. Entry ids are minted by the Composer \u2014 leave them out. Dates dd/mm/yyyy or yyyy-mm-dd.",
9245
9633
  statusReports: "Status reports \u2014 see sectionShapes.statusReports. Report ids are minted by the Composer \u2014 leave them out. Dates dd/mm/yyyy or yyyy-mm-dd.",
9634
+ capabilityImpacts: "Capability links [{capabilityId, kind: improve|new|replace|retire, maturityTo?}]. maturityTo 1\u20135 = level reached (omit = the capability's target; never for retire). capabilityId: a capability of the map, from read_portfolio_context \u2192 lists.capabilities; without the context leave the list empty.",
9246
9635
  requiredSkills: "Required skills [{skillId, fte, runFte?}] \u2014 fte is the build-phase demand, the optional runFte the run-team demand after the planned end (absent = build fte continues, 0 = no run demand). skillId must be the id of a skill that exists in the organisation. With the portfolio context the Composer validates it (read_portfolio_context \u2192 lists.skills gives id + name); without it, leave the list empty and link skills in the app."
9247
9636
  };
9248
9637
  var contextWire = () => external_exports.preprocess(parseIfString, external_exports.union([external_exports.string().regex(/^ctx_[0-9a-f]{16}$/, "a contextId looks like ctx_<16 hex>"), external_exports.object({}).passthrough()]));
@@ -9286,6 +9675,7 @@ var compactSpecSchema = external_exports.object({
9286
9675
  decisionLog: wireSection(SECTION_SCHEMAS.decisionLog, SECTION_DESCRIPTIONS.decisionLog).optional(),
9287
9676
  statusReports: wireSection(SECTION_SCHEMAS.statusReports, SECTION_DESCRIPTIONS.statusReports).optional(),
9288
9677
  requiredSkills: wireSection(SECTION_SCHEMAS.requiredSkills, SECTION_DESCRIPTIONS.requiredSkills).optional(),
9678
+ capabilityImpacts: wireSection(SECTION_SCHEMAS.capabilityImpacts, SECTION_DESCRIPTIONS.capabilityImpacts).optional(),
9289
9679
  aiRiskTier: external_exports.enum(AI_RISK_TIERS).optional(),
9290
9680
  hitlPosture: external_exports.enum(HITL_POSTURES).optional(),
9291
9681
  dpiaStatus: external_exports.enum(DPIA_STATUSES).optional(),
@@ -9295,7 +9685,7 @@ var compactSpecSchema = external_exports.object({
9295
9685
  prohibitedOverride: external_exports.string().optional(),
9296
9686
  aiAct: wireSection(SECTION_SCHEMAS.aiAct, SECTION_DESCRIPTIONS.aiAct).optional(),
9297
9687
  context: contextWire().optional().describe(
9298
- `OPTIONAL but strongly recommended: the organisation's portfolio context \u2014 the contextId returned by read_portfolio_context ("ctx_\u2026") or the file's JSON itself. With it, switched-off sub-dimensions are skipped in the score, business unit / category must be the organisation's own, and skill / dependency / update ids are validated.`
9688
+ `OPTIONAL but strongly recommended: the organisation's portfolio context \u2014 the contextId returned by read_portfolio_context ("ctx_\u2026") or the file's JSON itself. With it, switched-off sub-dimensions are skipped in the score, business unit / category must be the organisation's own, and skill / dependency / capability / update ids are validated.`
9299
9689
  )
9300
9690
  }).strict();
9301
9691
  var exportInputSchema = external_exports.object({
@@ -9340,7 +9730,7 @@ import { createHash } from "node:crypto";
9340
9730
 
9341
9731
  // ../../initiative-model/src/portfolio-context.ts
9342
9732
  var PORTFOLIO_CONTEXT_KIND = "portfolio-context";
9343
- var PORTFOLIO_CONTEXT_VERSION = 1;
9733
+ var PORTFOLIO_CONTEXT_VERSION = 2;
9344
9734
 
9345
9735
  // ../../initiative-model/src/ai-act-fields.ts
9346
9736
  var AI_ACT_FIELDS = [
@@ -9380,12 +9770,25 @@ var portfolioContextSchema = external_exports.object({
9380
9770
  suggestedTags: external_exports.array(external_exports.string()),
9381
9771
  skills: external_exports.array(external_exports.object({ id: external_exports.string().min(1), name: external_exports.string() }).passthrough()),
9382
9772
  initiatives: external_exports.array(external_exports.object({ id: external_exports.string().min(1), externalId: external_exports.string().trim().optional(), name: external_exports.string(), status: external_exports.enum(STATUS_VALUES) }).passthrough()),
9383
- sliders: external_exports.array(sliderSchema)
9773
+ sliders: external_exports.array(sliderSchema),
9774
+ /** Version 2 (2026-10-15): the capability map's leaves. Optional so a
9775
+ * version-1 file still parses — it then validates no capability links. */
9776
+ capabilities: external_exports.array(
9777
+ external_exports.object({
9778
+ id: external_exports.string().min(1),
9779
+ name: external_exports.string(),
9780
+ domain: external_exports.string(),
9781
+ importance: external_exports.enum(CAPABILITY_IMPORTANCES),
9782
+ currentMaturity: external_exports.number(),
9783
+ targetMaturity: external_exports.number()
9784
+ }).passthrough()
9785
+ ).optional()
9384
9786
  }).passthrough();
9385
9787
  var CONTEXT_SUPPORTED_VERSION = PORTFOLIO_CONTEXT_VERSION;
9386
9788
  function versionNotice(ctx) {
9387
9789
  return ctx.version > CONTEXT_SUPPORTED_VERSION ? `The portfolio-context file is version ${ctx.version}; this Composer understands version ${CONTEXT_SUPPORTED_VERSION}. Newer fields are ignored \u2014 update the Composer (Import/Export \u2192 download the extension again) to be safe.` : void 0;
9388
9790
  }
9791
+ var CAPABILITY_MATURITY_RANGE = `${CAPABILITY_MATURITY_MIN}\u2013${CAPABILITY_MATURITY_MAX}`;
9389
9792
  var CONTEXT_ID_PREFIX = "ctx_";
9390
9793
  var CACHE_MAX = 32;
9391
9794
  var cache = /* @__PURE__ */ new Map();
@@ -9481,6 +9884,31 @@ function checkAgainstContext(spec, ctx) {
9481
9884
  for (const [i, s] of (spec.requiredSkills ?? []).entries()) {
9482
9885
  if (!skillIds.has(s.skillId)) errors.push(`requiredSkills.${i}.skillId: "${s.skillId}" is not a skill of this organisation \u2014 pick from read_portfolio_context \u2192 lists.skills (id + name), or leave requiredSkills empty.`);
9483
9886
  }
9887
+ const impacts = spec.capabilityImpacts ?? [];
9888
+ if (impacts.length && ctx.capabilities === void 0) {
9889
+ errors.push(
9890
+ "capabilityImpacts: this portfolio-context file predates the capability map (version 1) \u2014 download it again from the app (Import/Export \u2192 Download portfolio context) so the Composer can check capability ids, or leave capabilityImpacts empty and link capabilities in the app."
9891
+ );
9892
+ } else {
9893
+ const caps = new Map((ctx.capabilities ?? []).map((c) => [c.id, c]));
9894
+ const seen = /* @__PURE__ */ new Set();
9895
+ for (const [i, link] of impacts.entries()) {
9896
+ if (seen.has(link.capabilityId)) continue;
9897
+ seen.add(link.capabilityId);
9898
+ const cap = caps.get(link.capabilityId);
9899
+ if (!cap) {
9900
+ errors.push(
9901
+ caps.size ? `capabilityImpacts.${i}.capabilityId: "${link.capabilityId}" is not a capability of this organisation's map \u2014 pick from read_portfolio_context \u2192 lists.capabilities (id + name + domain), or leave capabilityImpacts empty.` : `capabilityImpacts.${i}.capabilityId: this organisation has no capability map yet \u2014 it is built in the app's Settings \u203A Taxonomy; leave capabilityImpacts empty.`
9902
+ );
9903
+ continue;
9904
+ }
9905
+ if (link.maturityTo !== void 0 && link.kind !== "retire" && link.maturityTo < cap.currentMaturity) {
9906
+ warnings.push(
9907
+ `capabilityImpacts.${i}.maturityTo: ${link.maturityTo} is below the current maturity ${cap.currentMaturity} of "${cap.name}" \u2014 the app shows the capability as unchanged; the target is ${cap.targetMaturity}.`
9908
+ );
9909
+ }
9910
+ }
9911
+ }
9484
9912
  const aiFieldsSet = AI_ACT_FIELDS.filter((f) => spec[f] !== void 0);
9485
9913
  if (aiFieldsSet.length && !ctx.aiActEnabled) {
9486
9914
  warnings.push(
@@ -9523,6 +9951,7 @@ function buildInterviewPlan(ctx, contextId) {
9523
9951
  ...allOff.length ? [`Dimension(s) with EVERY sub-dimension switched off (${allOff.join(", ")}) still need an entry in evaluation: { subs: {}, confidence } \u2014 the score is 0 there; ask only for the confidence.`] : [],
9524
9952
  ctx.businessUnits.length && ctx.categories.length ? "businessUnit MUST be one of lists.businessUnits and aiCategory one of lists.categories (matched case-insensitively, normalised to the organisation's spelling) \u2014 the Composer rejects anything else; new ones are created in the app's Settings, not in the interview." : "This organisation has no business units and/or categories configured yet \u2014 they must be added in the app's Settings and the context downloaded again before an initiative can be assembled.",
9525
9953
  "dependsOn entries must be ids from lists.initiatives; requiredSkills[].skillId must be ids from lists.skills. Never invent an id; leave the list empty when unsure.",
9954
+ ctx.capabilities === void 0 ? "This file predates the capability map (version 1): capability links cannot be checked \u2014 leave capabilityImpacts empty, or ask the user to download the portfolio context again." : ctx.capabilities.length ? `capabilityImpacts[].capabilityId must be ids from lists.capabilities (${ctx.capabilities.length} capabilities; each lists its domain, importance and current \u2192 target maturity ${CAPABILITY_MATURITY_RANGE}). kind is improve | new | replace | retire; maturityTo (${CAPABILITY_MATURITY_RANGE}) is the level the initiative brings the capability to \u2014 omit it to mean the capability's target, and never send it for retire. Ask which capabilities the initiative changes and to what level.` : "This organisation has no capability map yet (built in the app's Settings \u203A Taxonomy): leave capabilityImpacts empty.",
9526
9955
  "To UPDATE an existing initiative instead of creating a new one, pass its id (from lists.initiatives) as `id` in the spec \u2014 the exported file then updates it in the app (Import/Export \u2192 Single initiative \u2192 'Update'). Omit id for a new initiative. Entries in lists.initiatives may carry externalId \u2014 the organisation's own reference (e.g. IC-26-118) \u2014 use it to recognise which initiative the user means. An update REPLACES the whole record: any field, section or row you omit is CLEARED \u2014 decision log, status reports and links included \u2014 so re-send everything that must survive. Exception: the organisation's externalId is carried over automatically when omitted.",
9527
9956
  ...ctx.sliderGranularity ? [`Ratings are in steps of ${ctx.sliderGranularity} (the organisation's slider step \u2014 Settings \u203A Slider granularity): ask for and send only multiples of ${ctx.sliderGranularity} between 0 and 100 (${gridExample(ctx.sliderGranularity)}); any other value is rejected.`] : [],
9528
9957
  "Dates: talk to the user in dd/mm/yyyy; you may send dates as dd/mm/yyyy, dd.mm.yyyy or yyyy-mm-dd \u2014 the Composer stores yyyy-mm-dd.",
@@ -9547,7 +9976,17 @@ function buildInterviewPlan(ctx, contextId) {
9547
9976
  categories: ctx.categories,
9548
9977
  suggestedTags: ctx.suggestedTags,
9549
9978
  skills: ctx.skills.map((s) => ({ id: s.id, name: s.name })),
9550
- initiatives: ctx.initiatives.map((i) => ({ id: i.id, ...i.externalId ? { externalId: i.externalId } : {}, name: i.name, status: i.status }))
9979
+ initiatives: ctx.initiatives.map((i) => ({ id: i.id, ...i.externalId ? { externalId: i.externalId } : {}, name: i.name, status: i.status })),
9980
+ ...ctx.capabilities ? {
9981
+ capabilities: ctx.capabilities.map((c) => ({
9982
+ id: c.id,
9983
+ name: c.name,
9984
+ domain: c.domain,
9985
+ importance: c.importance,
9986
+ currentMaturity: c.currentMaturity,
9987
+ targetMaturity: c.targetMaturity
9988
+ }))
9989
+ } : {}
9551
9990
  },
9552
9991
  interview: {
9553
9992
  dimensions,
@@ -9643,6 +10082,19 @@ function assembleInitiative(input, now = /* @__PURE__ */ new Date()) {
9643
10082
  }
9644
10083
  }
9645
10084
  if (spec.aiAct && typeof spec.aiAct === "object") checkAiActVocabularies(spec.aiAct, errors);
10085
+ const allImpacts = spec.capabilityImpacts ?? [];
10086
+ const seenCaps = /* @__PURE__ */ new Set();
10087
+ const impacts = [];
10088
+ for (const [i, link] of allImpacts.entries()) {
10089
+ if (seenCaps.has(link.capabilityId)) {
10090
+ errors.push(`capabilityImpacts.${i}.capabilityId: "${link.capabilityId}" is linked twice \u2014 one link per capability.`);
10091
+ continue;
10092
+ }
10093
+ seenCaps.add(link.capabilityId);
10094
+ impacts.push([i, link]);
10095
+ if (link.kind === "retire" && link.maturityTo !== void 0) errors.push(`capabilityImpacts.${i}.maturityTo: a retire link has no target level \u2014 omit maturityTo.`);
10096
+ else if (link.maturityTo !== void 0 && !Number.isInteger(link.maturityTo)) errors.push(`capabilityImpacts.${i}.maturityTo: must be a whole number 1\u20135 (got ${link.maturityTo}).`);
10097
+ }
9646
10098
  let businessUnit = spec.businessUnit;
9647
10099
  let aiCategory = spec.aiCategory;
9648
10100
  if (context) {
@@ -9656,6 +10108,9 @@ function assembleInitiative(input, now = /* @__PURE__ */ new Date()) {
9656
10108
  for (const [i, id] of (spec.dependsOn ?? []).entries()) {
9657
10109
  if (!isUuid(id)) errors.push(`dependsOn.${i}: "${id}" is not a UUID \u2014 without the organisation's portfolio context the Composer cannot verify ids; leave dependsOn empty and link dependencies in the app, or provide the context.`);
9658
10110
  }
10111
+ for (const [i, link] of impacts) {
10112
+ if (!isUuid(link.capabilityId)) errors.push(`capabilityImpacts.${i}.capabilityId: "${link.capabilityId}" is not a UUID \u2014 without the organisation's portfolio context the Composer cannot verify capability ids; leave capabilityImpacts empty and link capabilities in the app, or provide the context.`);
10113
+ }
9659
10114
  }
9660
10115
  if (spec.timelineStart && spec.timelineEnd && spec.timelineEnd < spec.timelineStart) {
9661
10116
  warnings.push("timelineEnd is before timelineStart");
@@ -9701,7 +10156,7 @@ function assembleInitiative(input, now = /* @__PURE__ */ new Date()) {
9701
10156
  }
9702
10157
 
9703
10158
  // ../../initiative-model/src/backup-version.ts
9704
- var BACKUP_VERSION = 10;
10159
+ var BACKUP_VERSION = 11;
9705
10160
 
9706
10161
  // src/envelope.ts
9707
10162
  var ENVELOPE_BRAND = "BICon Portfolio Steering";
@@ -9759,12 +10214,12 @@ function createServer() {
9759
10214
  async () => text({
9760
10215
  capabilities: [
9761
10216
  "strict typed schemas: unknown keys anywhere in the spec are rejected with their exact path (never silently dropped)",
9762
- "sections (aiAct/economics/actuals/decisionLog/statusReports/requiredSkills) accept a JSON object/array or the same JSON as a string; row ids are minted by the Composer",
10217
+ "sections (aiAct/economics/actuals/decisionLog/statusReports/requiredSkills/capabilityImpacts) accept a JSON object/array or the same JSON as a string; row ids are minted by the Composer",
9763
10218
  "dates accepted as dd/mm/yyyy, dd.mm.yyyy or yyyy-mm-dd (stored as yyyy-mm-dd)",
9764
10219
  "get_initiative_schema: sectionShapes, aiActVocabularies, portfolio-mode wording overlays",
9765
10220
  "AI-Act vocabulary and id-format enforcement with the allowed values in the error",
9766
10221
  "one pipeline: export_initiative_file takes the same spec as assemble_initiative \u2014 scores are always derived; pass `id` to update an existing initiative",
9767
- "portfolio context: read_portfolio_context turns the app's exported context file into an organisation-specific interview plan and a short contextId; with it, switched-off sub-dimensions are skipped in the score, business unit / category must be the organisation's own, and skill / dependency / update ids are validated"
10222
+ "portfolio context: read_portfolio_context turns the app's exported context file into an organisation-specific interview plan and a short contextId; with it, switched-off sub-dimensions are skipped in the score, business unit / category must be the organisation's own, and skill / dependency / capability / update ids are validated (capabilities from the version-2 context file)"
9768
10223
  ]
9769
10224
  })
9770
10225
  );
@@ -9780,7 +10235,7 @@ function createServer() {
9780
10235
  "read_portfolio_context",
9781
10236
  {
9782
10237
  title: "Read portfolio context",
9783
- description: "Turns the organisation's portfolio-context file (downloaded in the BICon Portfolio Steering app: Import/Export \u2192 'Download portfolio context') into the interview plan for THIS organisation: its own labels, help texts and rating notes for the sub-dimensions, which sub-dimensions are switched off (do not ask, not scored), its business units, categories, tags, skills (id + name) and initiatives (id + name), currency, discount rate and whether the EU-AI-Act module is on \u2014 plus a short contextId. Call it right after get_initiative_schema when the user provides the file, then pass `context: \"<contextId>\"` to assemble_initiative and export_initiative_file.",
10238
+ description: "Turns the organisation's portfolio-context file (downloaded in the BICon Portfolio Steering app: Import/Export \u2192 'Download portfolio context') into the interview plan for THIS organisation: its own labels, help texts and rating notes for the sub-dimensions, which sub-dimensions are switched off (do not ask, not scored), its business units, categories, tags, skills (id + name), initiatives (id + name) and the capability map's capabilities (id, name, domain, importance, current \u2192 target maturity), currency, discount rate and whether the EU-AI-Act module is on \u2014 plus a short contextId. Call it right after get_initiative_schema when the user provides the file, then pass `context: \"<contextId>\"` to assemble_initiative and export_initiative_file.",
9784
10239
  inputSchema: readContextInputSchema
9785
10240
  },
9786
10241
  async ({ context }) => {