@forge/manifest 12.6.0-next.1 → 12.6.0-next.2

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 (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/out/builder/processor-builder.d.ts.map +1 -1
  3. package/out/builder/processor-builder.js +2 -0
  4. package/out/mapping/agent-product-context-to-scope-mapping.json +14 -0
  5. package/out/processor/agent-product-context-validation-processor.d.ts +6 -0
  6. package/out/processor/agent-product-context-validation-processor.d.ts.map +1 -0
  7. package/out/processor/agent-product-context-validation-processor.js +19 -0
  8. package/out/processor/index.d.ts +1 -0
  9. package/out/processor/index.d.ts.map +1 -1
  10. package/out/processor/index.js +1 -0
  11. package/out/schema/manifest-schema.json +13 -0
  12. package/out/schema/manifest.d.ts +8 -0
  13. package/out/scopes/shipyard-scopes.json +1 -0
  14. package/out/text/errors.d.ts +2 -2
  15. package/out/text/errors.d.ts.map +1 -1
  16. package/out/text/errors.js +4 -4
  17. package/out/types/validation-types.d.ts +1 -0
  18. package/out/types/validation-types.d.ts.map +1 -1
  19. package/out/types/validation-types.js +1 -0
  20. package/out/validators/agent-product-context-scopes-validator.d.ts +21 -0
  21. package/out/validators/agent-product-context-scopes-validator.d.ts.map +1 -0
  22. package/out/validators/agent-product-context-scopes-validator.js +62 -0
  23. package/out/validators/index.d.ts +1 -0
  24. package/out/validators/index.d.ts.map +1 -1
  25. package/out/validators/index.js +1 -0
  26. package/out/validators/modules-validator.js +1 -1
  27. package/out/validators/modules-validators/global/validate-global-ui.d.ts +2 -2
  28. package/out/validators/modules-validators/global/validate-global-ui.d.ts.map +1 -1
  29. package/out/validators/modules-validators/global/validate-global-ui.js +12 -1
  30. package/out/validators/modules-validators/jira/validate-action-validator.d.ts.map +1 -1
  31. package/out/validators/modules-validators/jira/validate-action-validator.js +1 -43
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 12.6.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 955c1ab: Add agent product context scope validation for rovo:agentConnector modules
8
+
9
+ ### Patch Changes
10
+
11
+ - 8b7704f: Added validation that apps using the global:ui module must set app.installationTarget to 'unit'
12
+ - 4964a50: Fetch Agent Product Context to Required Scope Mapping file from Shipyard in daily job
13
+ - 911bef1: Remove compatible modules and module count limitations for jira:actionValidator
14
+ - 53b24df: Update manifest definitions
15
+
3
16
  ## 12.6.0-next.1
4
17
 
5
18
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"processor-builder.d.ts","sourceRoot":"","sources":["../../src/builder/processor-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAGL,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,qBAAa,gBAAiB,YAAW,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC,CAAC;IACjH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAoF;IAExG,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,WAAW,CAAmB;IAEtC,OAAO;IAIP,MAAM,CAAC,QAAQ,IAAI,gBAAgB;IAInC,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB;IAKvD,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB;IAKnD,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,cAAc;IAItB,KAAK,IAAI,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC;CAWlE"}
1
+ {"version":3,"file":"processor-builder.d.ts","sourceRoot":"","sources":["../../src/builder/processor-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAIL,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,qBAAa,gBAAiB,YAAW,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC,CAAC;IACjH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAoF;IAExG,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,WAAW,CAAmB;IAEtC,OAAO;IAIP,MAAM,CAAC,QAAQ,IAAI,gBAAgB;IAInC,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB;IAKvD,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB;IAKnD,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,cAAc;IAItB,KAAK,IAAI,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC;CAWlE"}
@@ -34,6 +34,8 @@ class ProcessorBuilder {
34
34
  return new remote_compute_validation_processor_1.RemoteComputeValidationProcessor();
35
35
  case types_1.ValidationTypes.PRODUCT_TRIGGER:
36
36
  return new processor_1.ProductTriggerValidationProcessor();
37
+ case types_1.ValidationTypes.AGENT_PRODUCT_CONTEXT:
38
+ return new processor_1.AgentProductContextValidationProcessor();
37
39
  case types_1.ValidationTypes.DEPRECATED_CSP_METHOD:
38
40
  return new deprecated_csp_method_validation_processor_1.DeprecatedCspMethodValidationProcessor();
39
41
  case types_1.ValidationTypes.DEPRECATED_EGRESS_PERMISSIONS:
@@ -0,0 +1,14 @@
1
+ {
2
+ "_warning": "DO NOT EDIT: This file is auto-generated from Shipyard. See src/mapping/README.md",
3
+ "_source": "ari:cloud:platform-services::agent-product-context-to-scope-mapping/v1/prod",
4
+ "mapping": [
5
+ {
6
+ "productContext": "jira",
7
+ "oAuthScopes": {
8
+ "current": [
9
+ "read:jira-work"
10
+ ]
11
+ }
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,6 @@
1
+ import { AbstractValidationProcessor } from './abstract-validation-processor';
2
+ import { ManifestSchema } from '../schema/manifest';
3
+ export declare class AgentProductContextValidationProcessor extends AbstractValidationProcessor<ManifestSchema> {
4
+ constructor();
5
+ }
6
+ //# sourceMappingURL=agent-product-context-validation-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-product-context-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/agent-product-context-validation-processor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOpD,qBAAa,sCAAuC,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAStG"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentProductContextValidationProcessor = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const validators_1 = require("../validators");
6
+ const abstract_validation_processor_1 = require("./abstract-validation-processor");
7
+ const AGENT_CONTEXT_SCOPE_MAPPING = tslib_1.__importStar(require("../mapping/agent-product-context-to-scope-mapping.json"));
8
+ const FULL_SCHEMA = tslib_1.__importStar(require("../schema/manifest-schema.json"));
9
+ class AgentProductContextValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
10
+ constructor() {
11
+ super([
12
+ new validators_1.FileValidator(),
13
+ new validators_1.YamlValidator(),
14
+ new validators_1.SchemaValidator(FULL_SCHEMA),
15
+ new validators_1.AgentProductContextScopesValidator(AGENT_CONTEXT_SCOPE_MAPPING)
16
+ ]);
17
+ }
18
+ }
19
+ exports.AgentProductContextValidationProcessor = AgentProductContextValidationProcessor;
@@ -1,4 +1,5 @@
1
1
  export * from './abstract-validation-processor';
2
+ export * from './agent-product-context-validation-processor';
2
3
  export * from './basic-validation-processor';
3
4
  export * from './full-validation-processor';
4
5
  export * from './processor-interface';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/processor/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/processor/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./abstract-validation-processor"), exports);
5
+ tslib_1.__exportStar(require("./agent-product-context-validation-processor"), exports);
5
6
  tslib_1.__exportStar(require("./basic-validation-processor"), exports);
6
7
  tslib_1.__exportStar(require("./full-validation-processor"), exports);
7
8
  tslib_1.__exportStar(require("./processor-interface"), exports);
@@ -29748,6 +29748,7 @@
29748
29748
  "required": [
29749
29749
  "name",
29750
29750
  "protocols",
29751
+ "productContexts",
29751
29752
  "key"
29752
29753
  ],
29753
29754
  "properties": {
@@ -29805,6 +29806,18 @@
29805
29806
  }
29806
29807
  }
29807
29808
  },
29809
+ "productContexts": {
29810
+ "type": "array",
29811
+ "description": "Declares which Atlassian products the agent is designed to operate within.",
29812
+ "minItems": 1,
29813
+ "uniqueItems": true,
29814
+ "items": {
29815
+ "type": "string",
29816
+ "enum": [
29817
+ "jira"
29818
+ ]
29819
+ }
29820
+ },
29808
29821
  "protocols": {
29809
29822
  "description": "Defines how your agent communicates with other agents and systems. It specifies the protocols and transport mechanisms available for interactions with your remote agent.",
29810
29823
  "type": "object",
@@ -24661,6 +24661,10 @@ export interface Modules {
24661
24661
  [k: string]: unknown;
24662
24662
  };
24663
24663
  }[];
24664
+ /**
24665
+ * Declares which Atlassian products the agent is designed to operate within.
24666
+ */
24667
+ productContexts: ['jira', ...'jira'[]];
24664
24668
  /**
24665
24669
  * Defines how your agent communicates with other agents and systems. It specifies the protocols and transport mechanisms available for interactions with your remote agent.
24666
24670
  */
@@ -24704,6 +24708,10 @@ export interface Modules {
24704
24708
  [k: string]: unknown;
24705
24709
  };
24706
24710
  }[];
24711
+ /**
24712
+ * Declares which Atlassian products the agent is designed to operate within.
24713
+ */
24714
+ productContexts: ['jira', ...'jira'[]];
24707
24715
  /**
24708
24716
  * Defines how your agent communicates with other agents and systems. It specifies the protocols and transport mechanisms available for interactions with your remote agent.
24709
24717
  */
@@ -134,6 +134,7 @@
134
134
  "read:analytics.content:confluence",
135
135
  "read:app-data:confluence",
136
136
  "read:app-data:jira",
137
+ "read:app-global-channel:realtime",
137
138
  "read:app-notification:confluence",
138
139
  "read:app-notification:jira",
139
140
  "read:app-system-token",
@@ -20,6 +20,7 @@ export declare const errors: {
20
20
  permissions: {
21
21
  invalidPermission: (element: string, value: string) => string;
22
22
  missingPermissionFromScope: (scope: string, event: string) => string;
23
+ missingPermissionFromAgentProductContext: (scope: string, agentKey: string, productContexts: string[]) => string;
23
24
  missingEndpointPermissionFromScope: (scope: string, key: string) => string;
24
25
  missingRemotePermissionFromScope: (scope: string, key: string) => string;
25
26
  deprecatedPermission: (element: string, value: string[]) => string;
@@ -98,8 +99,6 @@ export declare const errors: {
98
99
  };
99
100
  jiraActionValidator: {
100
101
  limitPerActionType: (actionType: string, limit: number) => string;
101
- incompatibleModules: (otherModules: string[]) => string;
102
- tooManyModules: (totalModules: number, limit: number) => string;
103
102
  };
104
103
  jiraFullPageModule: {
105
104
  invalidRouteRegex: (pattern: string, keyName: string, index: number) => string;
@@ -172,6 +171,7 @@ export declare const errors: {
172
171
  globalUi: {
173
172
  invalidIcon: (icon: string, keyName: string, index: number) => string;
174
173
  renderMustBeNative: (keyName: string, index: number) => string;
174
+ installationTargetRequired: () => string;
175
175
  };
176
176
  };
177
177
  resources: {
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,eAAO,MAAM,MAAM;8BACS,MAAM,KAAG,MAAM;+BACd,MAAM,EAAE,KAAG,MAAM;2BAIvB,MAAM;yBAEN,MAAM,GAAG,SAAS,QAAQ,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,KAAG,MAAM;;uBAO3E,MAAM,EAAE,EAAE,GAAG,SAAS,KAAG,MAAM;4BAI1B,MAAM,EAAE,KAAG,MAAM;mCACV,MAAM,SAAS,MAAM,mBAAmB,MAAM,KAAG,MAAM;mDAIvC,MAAM,KAAG,MAAM;4BAEtC,MAAM,EAAE,GAAG,SAAS,KAAG,MAAM;+CAIV,MAAM;6CACR,MAAM,gBAAgB,MAAM;qCAEpC,MAAM;2CACA,MAAM;6CACJ,MAAM;;;qCAGd,MAAM,SAAS,MAAM,KAAG,MAAM;4CAEvB,MAAM,SAAS,MAAM,KAAG,MAAM;oDAEtB,MAAM,OAAO,MAAM,KAAG,MAAM;kDAE9B,MAAM,OAAO,MAAM,KAAG,MAAM;wCAEtC,MAAM,SAAS,MAAM,EAAE,KAAG,MAAM;0CAI9B,MAAM;2CAEL,MAAM,KAAG,MAAM;0CAEhB,MAAM,SAAS,MAAM,KAAG,MAAM;+CAEzB,MAAM,KAAG,MAAM;wCAEtB,MAAM,KAAG,MAAM;gCAEvB,MAAM,KAAG,MAAM;;;uCAIR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KAAG,MAAM;yCAEvD,MAAM,SAAS,MAAM,KAAG,MAAM;4CAE3B,MAAM,SAAS,MAAM,KAAG,MAAM;gDAE1B,MAAM,aAAa,MAAM,KAAG,MAAM;4CAEtC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;gCAM1C,MAAM;;;;;;;;;;0DAawB,wBAAwB,KAAG,MAAM;sDAErC,wBAAwB,KAAG,MAAM;kDAErC,wBAAwB,QAAQ,MAAM,KAAG,MAAM;mDAE9C,wBAAwB,KAAG,MAAM;mCAEjD,MAAM,KAAG,MAAM;;oDAEE,MAAM,aAAa,MAAM,KAAG,MAAM;4CAE1C,MAAM,sBAAsB,wBAAwB,YAAY,MAAM;;;;mCAKjF,MAAM;;;CAQlC,CAAC;AAEF,oBAAY,UAAU;IACpB,eAAe,2BAA2B;IAC1C,eAAe,wBAAwB;IACvC,WAAW,4BAA4B;IACvC,WAAW,+BAA+B;IAC1C,aAAa,8BAA8B;IAC3C,OAAO,0BAA0B;IACjC,cAAc,kCAAkC;IAChD,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
@@ -34,6 +34,7 @@ exports.errors = {
34
34
  permissions: {
35
35
  invalidPermission: (element, value) => `Invalid '${element}' permission in the manifest.yml file - '${value}'. Learn more about permissions at: https://go.atlassian.com/forge-permissions.`,
36
36
  missingPermissionFromScope: (scope, event) => `Trigger event: '${event}' requires '${scope}' scope`,
37
+ missingPermissionFromAgentProductContext: (scope, agentKey, productContexts) => `rovo:agentConnector '${agentKey}' declares productContexts: [${productContexts.join(', ')}] but is missing required scope '${scope}'`,
37
38
  missingEndpointPermissionFromScope: (scope, key) => `Endpoint module: '${key}' requires '${scope}' scope.`,
38
39
  missingRemotePermissionFromScope: (scope, key) => `Remote: '${key}' requires '${scope}' scope.`,
39
40
  deprecatedPermission: (element, value) => `There are deprecated scopes '${element}' in the manifest.yml file: '${value.join(', ')}'. You need to update this app to use new scopes and remove the deprecated scopes. Learn more at: https://go.atlassian.com/forge-permissions.`,
@@ -111,9 +112,7 @@ exports.errors = {
111
112
  duplicateFunctionNames: (names) => `JQL function names must be unique. Found duplicates: ${names.join(', ')}.`
112
113
  },
113
114
  jiraActionValidator: {
114
- limitPerActionType: (actionType, limit) => `Only ${limit} ${types_1.AllModuleTypes.JiraActionValidator} module is allowed per action type. Found multiple modules for action type: ${actionType}.`,
115
- incompatibleModules: (otherModules) => `${types_1.AllModuleTypes.JiraActionValidator} modules can only be declared with page modules and core functions. Found incompatible modules: ${otherModules.join(', ')}.`,
116
- tooManyModules: (totalModules, limit) => `Apps with ${types_1.AllModuleTypes.JiraActionValidator} modules can declare up to ${limit} additional modules. Found ${totalModules} total modules.`
115
+ limitPerActionType: (actionType, limit) => `Only ${limit} ${types_1.AllModuleTypes.JiraActionValidator} module is allowed per action type. Found multiple modules for action type: ${actionType}.`
117
116
  },
118
117
  jiraFullPageModule: {
119
118
  invalidRouteRegex: (pattern, keyName, index) => `The routePrefix '${pattern}' at index '${index}' for key '${keyName}' needs to be in a valid URL route between 1-255 characters and contain only URL safe characters such as: a-z, 0-9 and '\' and '-'.`,
@@ -185,7 +184,8 @@ exports.errors = {
185
184
  },
186
185
  globalUi: {
187
186
  invalidIcon: (icon, keyName, index) => `The icon '${icon}' at index '${index}' for key '${keyName}' needs to be a defined resource of file type svg.`,
188
- renderMustBeNative: (keyName, index) => `The render property at index '${index}' for key '${keyName}' must be set to 'native' for global:ui modules.`
187
+ renderMustBeNative: (keyName, index) => `The render property at index '${index}' for key '${keyName}' must be set to 'native' for global:ui modules.`,
188
+ installationTargetRequired: () => `Apps using the global:ui module must set app.installationTarget to 'unit'.`
189
189
  }
190
190
  },
191
191
  resources: {
@@ -3,6 +3,7 @@ export declare enum ValidationTypes {
3
3
  BASIC = "basic",
4
4
  FULL = "full",
5
5
  PRODUCT_TRIGGER = "product-trigger",
6
+ AGENT_PRODUCT_CONTEXT = "agent-product-context",
6
7
  DEPRECATED_CSP_METHOD = "deprecated-csp-method",
7
8
  FORGE_REMOTE_COMPUTE = "forge-remote-compute",
8
9
  DEPRECATED_EGRESS_PERMISSIONS = "deprecated-egress-permissions"
@@ -1 +1 @@
1
- {"version":3,"file":"validation-types.d.ts","sourceRoot":"","sources":["../../src/types/validation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,oBAAoB,yBAAyB;IAC7C,6BAA6B,kCAAkC;CAChE;AAKD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC"}
1
+ {"version":3,"file":"validation-types.d.ts","sourceRoot":"","sources":["../../src/types/validation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,qBAAqB,0BAA0B;IAC/C,oBAAoB,yBAAyB;IAC7C,6BAA6B,kCAAkC;CAChE;AAKD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC"}
@@ -6,6 +6,7 @@ var ValidationTypes;
6
6
  ValidationTypes["BASIC"] = "basic";
7
7
  ValidationTypes["FULL"] = "full";
8
8
  ValidationTypes["PRODUCT_TRIGGER"] = "product-trigger";
9
+ ValidationTypes["AGENT_PRODUCT_CONTEXT"] = "agent-product-context";
9
10
  ValidationTypes["DEPRECATED_CSP_METHOD"] = "deprecated-csp-method";
10
11
  ValidationTypes["FORGE_REMOTE_COMPUTE"] = "forge-remote-compute";
11
12
  ValidationTypes["DEPRECATED_EGRESS_PERMISSIONS"] = "deprecated-egress-permissions";
@@ -0,0 +1,21 @@
1
+ import { ManifestObject, ManifestValidationResult } from '../types';
2
+ import { ValidatorInterface } from './validator-interface';
3
+ import { ManifestSchema, Scopes } from '../schema/manifest';
4
+ import { RequiredScopes } from '../scopes';
5
+ export interface AgentProductContextMappingEntry {
6
+ productContext: string;
7
+ oAuthScopes: RequiredScopes;
8
+ }
9
+ export interface AgentProductContextMappingConfig {
10
+ mapping: AgentProductContextMappingEntry[];
11
+ }
12
+ export declare function validateAgentProductContextScopes(productContext: string, scopes: Scopes | undefined, config: AgentProductContextMappingConfig): Promise<{
13
+ requiredScopes: RequiredScopes;
14
+ missingScopes: string[];
15
+ }>;
16
+ export declare class AgentProductContextScopesValidator<T> implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
17
+ private readonly config;
18
+ constructor(config: AgentProductContextMappingConfig);
19
+ validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
20
+ }
21
+ //# sourceMappingURL=agent-product-context-scopes-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-product-context-scopes-validator.d.ts","sourceRoot":"","sources":["../../src/validators/agent-product-context-scopes-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5D,OAAO,EAAoB,cAAc,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,WAAW,+BAA+B;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,+BAA+B,EAAE,CAAC;CAC5C;AAUD,wBAAsB,iCAAiC,CACrD,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,gCAAgC,GACvC,OAAO,CAAC;IAAE,cAAc,EAAE,cAAc,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAQtE;AAED,qBAAa,kCAAkC,CAAC,CAAC,CAC/C,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAE7E,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,gCAAgC;IAE/D,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAgDrD"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentProductContextScopesValidator = exports.validateAgentProductContextScopes = void 0;
4
+ const types_1 = require("../types");
5
+ const text_1 = require("../text");
6
+ const utils_1 = require("../utils");
7
+ const scopes_1 = require("../scopes");
8
+ async function validateAgentProductContextScopes(productContext, scopes, config) {
9
+ const emptyRequiredScopes = { current: [] };
10
+ const requiredScopes = config.mapping.find((entry) => entry.productContext === productContext)?.oAuthScopes || emptyRequiredScopes;
11
+ const missingScopes = await (0, scopes_1.getMissingScopes)(scopes, requiredScopes);
12
+ return { requiredScopes, missingScopes };
13
+ }
14
+ exports.validateAgentProductContextScopes = validateAgentProductContextScopes;
15
+ class AgentProductContextScopesValidator {
16
+ config;
17
+ constructor(config) {
18
+ this.config = config;
19
+ }
20
+ async validate(manifest) {
21
+ if (!manifest || !manifest.typedContent) {
22
+ return {
23
+ success: false,
24
+ manifestObject: manifest
25
+ };
26
+ }
27
+ const validationErrors = [];
28
+ const addValidationError = (scope, agentKey, productContexts) => {
29
+ validationErrors.push({
30
+ message: text_1.errors.permissions.missingPermissionFromAgentProductContext(scope, agentKey, productContexts),
31
+ reference: text_1.References.MissingScopes,
32
+ level: 'error',
33
+ metadata: {
34
+ missingPermission: scope
35
+ },
36
+ ...(0, utils_1.findPosition)('scopes', manifest.yamlContentByLine)
37
+ });
38
+ };
39
+ const rovoAgents = manifest.typedContent.modules?.[types_1.AllModuleTypes.RovoAgentConnector];
40
+ if (!rovoAgents || !rovoAgents.length) {
41
+ return {
42
+ success: true,
43
+ manifestObject: manifest
44
+ };
45
+ }
46
+ const manifestScopes = manifest.typedContent.permissions?.scopes || [];
47
+ for (const agent of rovoAgents) {
48
+ if (!agent.productContexts || !agent.productContexts.length)
49
+ continue;
50
+ for (const productContext of agent.productContexts) {
51
+ const { missingScopes } = await validateAgentProductContextScopes(productContext, manifestScopes, this.config);
52
+ missingScopes.forEach((scope) => addValidationError(scope, agent.key, agent.productContexts));
53
+ }
54
+ }
55
+ return {
56
+ success: validationErrors.length === 0,
57
+ manifestObject: manifest,
58
+ errors: validationErrors
59
+ };
60
+ }
61
+ }
62
+ exports.AgentProductContextScopesValidator = AgentProductContextScopesValidator;
@@ -8,6 +8,7 @@ export * from './resources-validator';
8
8
  export * from './display-conditions-validator';
9
9
  export * from './product-trigger-scopes-validator';
10
10
  export * from './simple-trigger-scope-validator';
11
+ export * from './agent-product-context-scopes-validator';
11
12
  export * from './providers-validator';
12
13
  export * from './permissions-validator';
13
14
  export * from './connect-remote-validator';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
@@ -11,6 +11,7 @@ tslib_1.__exportStar(require("./resources-validator"), exports);
11
11
  tslib_1.__exportStar(require("./display-conditions-validator"), exports);
12
12
  tslib_1.__exportStar(require("./product-trigger-scopes-validator"), exports);
13
13
  tslib_1.__exportStar(require("./simple-trigger-scope-validator"), exports);
14
+ tslib_1.__exportStar(require("./agent-product-context-scopes-validator"), exports);
14
15
  tslib_1.__exportStar(require("./providers-validator"), exports);
15
16
  tslib_1.__exportStar(require("./permissions-validator"), exports);
16
17
  tslib_1.__exportStar(require("./connect-remote-validator"), exports);
@@ -38,7 +38,7 @@ class ModulesValidator {
38
38
  let validationErrors = [...this.connectModuleValidation(manifest)];
39
39
  if (manifest.typedContent.modules) {
40
40
  const { typedContent: { modules, connectModules, remotes, permissions, services, providers }, yamlContentByLine, filePath } = manifest;
41
- validationErrors = validationErrors.concat(this.checkUnsupportedModules(manifest.typedContent.modules, yamlContentByLine), this.functionKeyLength(modules, yamlContentByLine), this.minimumModuleCountValidation(modules, yamlContentByLine), this.functionKeyDefinedValidation(modules, yamlContentByLine), this.endpointValidations(modules, yamlContentByLine, remotes, permissions?.scopes || [], services), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath), (0, validate_workflow_1.validateJiraWorkflowValidator)(modules, yamlContentByLine), (0, validate_workflow_1.validateJiraWorkflowCondition)(modules, yamlContentByLine), (0, ui_modifications_1.validateUiModificationsModule)(modules, yamlContentByLine), (0, validate_full_admin_page_1.validateJiraFullAdminPage)(modules, yamlContentByLine), (0, validate_full_page_1.validateJiraFullPage)(modules, yamlContentByLine), (0, validate_full_page_module_1.validateJiraFullPageModule)(modules, yamlContentByLine), (0, validate_custom_field_1.validateJiraCustomField)(modules, yamlContentByLine), (0, confluence_1.validateConfluenceModules)(modules, yamlContentByLine), (0, bitbucket_1.validateBitbucketModules)(modules, yamlContentByLine), (0, validate_trigger_1.validateJiraTriggers)(modules, yamlContentByLine), (0, remote_1.validateRemoteModules)(modules, yamlContentByLine), (0, dataResidency_1.validateMigrationDataResidencyModule)(modules, remotes, yamlContentByLine), (0, validateModuleScopes_1.validateModuleScopes)(modules, yamlContentByLine, permissions), (0, rovo_1.validateRovoModules)(modules, yamlContentByLine), (0, automation_1.validateAutomationModules)(modules, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine), (0, validate_command_1.validateJiraCommandModule)(modules, yamlContentByLine), (0, validate_action_validator_1.validateJiraActionValidator)(modules, yamlContentByLine), (0, validate_global_background_script_1.validateJiraGlobalBackgroundScript)(modules, yamlContentByLine), (0, graph_1.validateGraphModules)(modules, providers, yamlContentByLine), (0, validate_global_ui_1.validateGlobalUi)(modules, yamlContentByLine));
41
+ validationErrors = validationErrors.concat(this.checkUnsupportedModules(manifest.typedContent.modules, yamlContentByLine), this.functionKeyLength(modules, yamlContentByLine), this.minimumModuleCountValidation(modules, yamlContentByLine), this.functionKeyDefinedValidation(modules, yamlContentByLine), this.endpointValidations(modules, yamlContentByLine, remotes, permissions?.scopes || [], services), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath), (0, validate_workflow_1.validateJiraWorkflowValidator)(modules, yamlContentByLine), (0, validate_workflow_1.validateJiraWorkflowCondition)(modules, yamlContentByLine), (0, ui_modifications_1.validateUiModificationsModule)(modules, yamlContentByLine), (0, validate_full_admin_page_1.validateJiraFullAdminPage)(modules, yamlContentByLine), (0, validate_full_page_1.validateJiraFullPage)(modules, yamlContentByLine), (0, validate_full_page_module_1.validateJiraFullPageModule)(modules, yamlContentByLine), (0, validate_custom_field_1.validateJiraCustomField)(modules, yamlContentByLine), (0, confluence_1.validateConfluenceModules)(modules, yamlContentByLine), (0, bitbucket_1.validateBitbucketModules)(modules, yamlContentByLine), (0, validate_trigger_1.validateJiraTriggers)(modules, yamlContentByLine), (0, remote_1.validateRemoteModules)(modules, yamlContentByLine), (0, dataResidency_1.validateMigrationDataResidencyModule)(modules, remotes, yamlContentByLine), (0, validateModuleScopes_1.validateModuleScopes)(modules, yamlContentByLine, permissions), (0, rovo_1.validateRovoModules)(modules, yamlContentByLine), (0, automation_1.validateAutomationModules)(modules, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine), (0, validate_command_1.validateJiraCommandModule)(modules, yamlContentByLine), (0, validate_action_validator_1.validateJiraActionValidator)(modules, yamlContentByLine), (0, validate_global_background_script_1.validateJiraGlobalBackgroundScript)(modules, yamlContentByLine), (0, graph_1.validateGraphModules)(modules, providers, yamlContentByLine), (0, validate_global_ui_1.validateGlobalUi)(modules, manifest.typedContent.app, yamlContentByLine));
42
42
  }
43
43
  else {
44
44
  const { typedContent: { connectModules }, yamlContentByLine } = manifest;
@@ -1,4 +1,4 @@
1
- import { Modules } from '../../../schema/manifest';
1
+ import { App, Modules } from '../../../schema/manifest';
2
2
  import { ValidationError } from '../../../types';
3
- export declare const validateGlobalUi: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
3
+ export declare const validateGlobalUi: (modules: Modules, app: App, yamlContentByLine?: string[]) => ValidationError[];
4
4
  //# sourceMappingURL=validate-global-ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-global-ui.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/global/validate-global-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA0BjE,eAAO,MAAM,gBAAgB,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EA6ChG,CAAC"}
1
+ {"version":3,"file":"validate-global-ui.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/global/validate-global-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA6BjE,eAAO,MAAM,gBAAgB,YAAa,OAAO,OAAO,GAAG,sBAAsB,MAAM,EAAE,KAAG,eAAe,EA4D1G,CAAC"}
@@ -6,10 +6,21 @@ const types_1 = require("../../../types");
6
6
  const utils_1 = require("../../../utils");
7
7
  const validateGlobalModules_1 = require("../../../utils/global/validateGlobalModules");
8
8
  const errorMessages = text_1.errors.modules.globalUi;
9
- const validateGlobalUi = (modules, yamlContentByLine) => {
9
+ const validateGlobalUi = (modules, app, yamlContentByLine) => {
10
10
  const validationErrors = [];
11
11
  const moduleType = types_1.AllModuleTypes.GlobalUi;
12
12
  const globalUiModules = modules[moduleType] || [];
13
+ if (globalUiModules.length === 0) {
14
+ return validationErrors;
15
+ }
16
+ if (app.installationTarget !== 'unit') {
17
+ validationErrors.push({
18
+ message: errorMessages.installationTargetRequired(),
19
+ reference: text_1.References.Modules,
20
+ level: 'error',
21
+ ...(0, utils_1.findPosition)(app.installationTarget ? 'installationTarget' : 'app', yamlContentByLine)
22
+ });
23
+ }
13
24
  if (globalUiModules.length > 1) {
14
25
  validationErrors.push({
15
26
  message: text_1.errors.modules.singleEntryOfTheModule(moduleType),
@@ -1 +1 @@
1
- {"version":3,"file":"validate-action-validator.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-action-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AA8BnD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,GACtC,eAAe,EAAE,CAYnB"}
1
+ {"version":3,"file":"validate-action-validator.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-action-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAkBnD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,GACtC,eAAe,EAAE,CAQnB"}
@@ -4,25 +4,13 @@ exports.validateJiraActionValidator = void 0;
4
4
  const text_1 = require("../../../text");
5
5
  const utils_1 = require("../../../utils");
6
6
  const module_types_1 = require("../../../types/module-types");
7
- const PAGE_MODULE_TYPES = [
8
- module_types_1.AllModuleTypes.JiraAdminPage,
9
- module_types_1.AllModuleTypes.JiraProjectPage,
10
- module_types_1.AllModuleTypes.JiraProjectSettingsPage,
11
- module_types_1.AllModuleTypes.JiraGlobalPage,
12
- module_types_1.AllModuleTypes.JiraPersonalSettingsPage
13
- ];
14
7
  const MAX_JIRA_ACTION_VALIDATORS = 1;
15
- const MAX_ALLOWED_MODULES = MAX_JIRA_ACTION_VALIDATORS + 1;
16
8
  function validateJiraActionValidator(modules, yamlContentByLine) {
17
9
  const actionValidatorModules = getActionValidatorModules(modules);
18
10
  if (actionValidatorModules.length === 0) {
19
11
  return [];
20
12
  }
21
- return [
22
- ...validateUniqueActionTypes(actionValidatorModules, yamlContentByLine),
23
- ...validateCompatibleModules(modules, actionValidatorModules, yamlContentByLine),
24
- ...validateModuleLimit(modules, actionValidatorModules, yamlContentByLine)
25
- ];
13
+ return [...validateUniqueActionTypes(actionValidatorModules, yamlContentByLine)];
26
14
  }
27
15
  exports.validateJiraActionValidator = validateJiraActionValidator;
28
16
  function getActionValidatorModules(modules) {
@@ -52,33 +40,3 @@ function validateUniqueActionTypes(actionValidatorModules, yamlContentByLine) {
52
40
  .filter(([, modules]) => modules.length > MAX_JIRA_ACTION_VALIDATORS)
53
41
  .flatMap(([actionType, modules]) => modules.map((module) => createValidationError(text_1.errors.modules.jiraActionValidator.limitPerActionType(actionType, MAX_JIRA_ACTION_VALIDATORS), module.key, yamlContentByLine)));
54
42
  }
55
- function validateCompatibleModules(modules, actionValidatorModules, yamlContentByLine) {
56
- const incompatibleModules = getIncompatibleModules(modules);
57
- if (incompatibleModules.length === 0) {
58
- return [];
59
- }
60
- return actionValidatorModules.map((module) => createValidationError(text_1.errors.modules.jiraActionValidator.incompatibleModules(incompatibleModules), module.key, yamlContentByLine));
61
- }
62
- function getIncompatibleModules(modules) {
63
- const moduleTypes = Object.keys(modules);
64
- const otherModules = moduleTypes.filter((type) => type !== module_types_1.AllModuleTypes.JiraActionValidator);
65
- return otherModules.filter((moduleType) => {
66
- const isPageModule = PAGE_MODULE_TYPES.includes(moduleType);
67
- const isCoreFunction = moduleType === module_types_1.AllModuleTypes.CoreFunction;
68
- return !isPageModule && !isCoreFunction;
69
- });
70
- }
71
- function validateModuleLimit(modules, actionValidatorModules, yamlContentByLine) {
72
- const nonCoreModuleCount = getNonCoreModuleCount(modules);
73
- if (nonCoreModuleCount <= MAX_ALLOWED_MODULES) {
74
- return [];
75
- }
76
- return actionValidatorModules.map((module) => createValidationError(text_1.errors.modules.jiraActionValidator.tooManyModules(nonCoreModuleCount, MAX_JIRA_ACTION_VALIDATORS), module.key, yamlContentByLine));
77
- }
78
- function getNonCoreModuleCount(modules) {
79
- return Object.entries(modules)
80
- .filter(([moduleType]) => !moduleType.startsWith('core:'))
81
- .reduce((total, [, moduleArray]) => {
82
- return total + (Array.isArray(moduleArray) ? moduleArray.length : 0);
83
- }, 0);
84
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "12.6.0-next.1",
3
+ "version": "12.6.0-next.2",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {