@rippling/rippling-sdk 0.2.0-alpha.79 → 0.2.0-alpha.80

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 (78) hide show
  1. package/client.d.mts +2 -2
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +2 -2
  4. package/client.d.ts.map +1 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs.map +1 -1
  7. package/examples/manifest/custom-skill/custom-skill.ts +45 -0
  8. package/lib/manifest/agent.d.mts +60 -0
  9. package/lib/manifest/agent.d.mts.map +1 -0
  10. package/lib/manifest/agent.d.ts +60 -0
  11. package/lib/manifest/agent.d.ts.map +1 -0
  12. package/lib/manifest/agent.js +94 -0
  13. package/lib/manifest/agent.js.map +1 -0
  14. package/lib/manifest/agent.mjs +90 -0
  15. package/lib/manifest/agent.mjs.map +1 -0
  16. package/lib/manifest/custom-skill.d.mts +115 -0
  17. package/lib/manifest/custom-skill.d.mts.map +1 -0
  18. package/lib/manifest/custom-skill.d.ts +115 -0
  19. package/lib/manifest/custom-skill.d.ts.map +1 -0
  20. package/lib/manifest/custom-skill.js +127 -0
  21. package/lib/manifest/custom-skill.js.map +1 -0
  22. package/lib/manifest/custom-skill.mjs +123 -0
  23. package/lib/manifest/custom-skill.mjs.map +1 -0
  24. package/lib/manifest/existing-manifest-context.d.mts +7 -0
  25. package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
  26. package/lib/manifest/existing-manifest-context.d.ts +7 -0
  27. package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
  28. package/lib/manifest/existing-manifest-context.js +34 -0
  29. package/lib/manifest/existing-manifest-context.js.map +1 -1
  30. package/lib/manifest/existing-manifest-context.mjs +34 -0
  31. package/lib/manifest/existing-manifest-context.mjs.map +1 -1
  32. package/lib/manifest/index.d.mts +2 -0
  33. package/lib/manifest/index.d.mts.map +1 -1
  34. package/lib/manifest/index.d.ts +2 -0
  35. package/lib/manifest/index.d.ts.map +1 -1
  36. package/lib/manifest/index.js +5 -1
  37. package/lib/manifest/index.js.map +1 -1
  38. package/lib/manifest/index.mjs +2 -0
  39. package/lib/manifest/index.mjs.map +1 -1
  40. package/lib/manifest/manifest-builder.d.mts +1 -1
  41. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  42. package/lib/manifest/manifest-builder.d.ts +1 -1
  43. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  44. package/lib/manifest/manifest-builder.js.map +1 -1
  45. package/lib/manifest/manifest-builder.mjs.map +1 -1
  46. package/package.json +1 -1
  47. package/resources/index.d.mts +1 -1
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +1 -1
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js.map +1 -1
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/leave-program-evaluations.d.mts +32 -2
  54. package/resources/leave-program-evaluations.d.mts.map +1 -1
  55. package/resources/leave-program-evaluations.d.ts +32 -2
  56. package/resources/leave-program-evaluations.d.ts.map +1 -1
  57. package/resources/teams.d.mts +33 -1
  58. package/resources/teams.d.mts.map +1 -1
  59. package/resources/teams.d.ts +33 -1
  60. package/resources/teams.d.ts.map +1 -1
  61. package/resources/teams.js +22 -0
  62. package/resources/teams.js.map +1 -1
  63. package/resources/teams.mjs +22 -0
  64. package/resources/teams.mjs.map +1 -1
  65. package/src/client.ts +4 -0
  66. package/src/lib/manifest/agent.ts +141 -0
  67. package/src/lib/manifest/custom-skill.ts +205 -0
  68. package/src/lib/manifest/existing-manifest-context.ts +61 -0
  69. package/src/lib/manifest/index.ts +9 -0
  70. package/src/lib/manifest/manifest-builder.ts +2 -0
  71. package/src/resources/index.ts +2 -0
  72. package/src/resources/leave-program-evaluations.ts +38 -2
  73. package/src/resources/teams.ts +55 -0
  74. package/src/version.ts +1 -1
  75. package/version.d.mts +1 -1
  76. package/version.d.ts +1 -1
  77. package/version.js +1 -1
  78. package/version.mjs +1 -1
@@ -0,0 +1,115 @@
1
+ import { type ExistingManifestContextOptions } from "./existing-manifest-context.js";
2
+ import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js";
3
+ export type CustomSkillStatus = 'active' | 'inactive';
4
+ export type CustomSkillSourceType = 'user' | 'company';
5
+ /**
6
+ * Initialization properties for {@link CustomSkill}.
7
+ */
8
+ export interface CustomSkillProps {
9
+ /**
10
+ * Source-side identifier for this Custom Skill.
11
+ *
12
+ * For a new skill, omit this field and the SDK generates a temporary handle
13
+ * that Composer maps to the skill's generated database UUID during deploy.
14
+ *
15
+ * For an existing skill, use the `source_skill_id` loaded from component
16
+ * search/extraction.
17
+ *
18
+ * Optional. Auto-generated when omitted. @default generateId('skill')
19
+ */
20
+ sourceSkillId?: string;
21
+ /**
22
+ * Display name shown in Rippling AI.
23
+ *
24
+ * Required.
25
+ */
26
+ name: string;
27
+ /**
28
+ * Description used to explain when the skill applies.
29
+ *
30
+ * Required. Use `null` to clear this field when updating an existing skill.
31
+ */
32
+ description: string | null;
33
+ /**
34
+ * Markdown instruction content for the skill.
35
+ *
36
+ * Required.
37
+ */
38
+ content: string;
39
+ /**
40
+ * Optional folder path for organizing skills. Use `null` to clear this field
41
+ * when updating an existing skill.
42
+ */
43
+ path?: string | null;
44
+ /**
45
+ * Whether the skill is active or inactive.
46
+ *
47
+ * Required.
48
+ */
49
+ status: CustomSkillStatus;
50
+ /**
51
+ * Skill visibility. `user` creates a personal skill; `company` creates a
52
+ * company skill.
53
+ *
54
+ * Optional create-time visibility. Do not set when updating an existing
55
+ * skill; use `CustomSkill.loadFromExisting(...)` so the extracted value can
56
+ * round-trip unchanged.
57
+ */
58
+ sourceType?: CustomSkillSourceType;
59
+ }
60
+ /**
61
+ * Defines a Rippling AI Custom Skill and registers it with the manifest.
62
+ */
63
+ export declare class CustomSkill {
64
+ static readonly componentType: "CUSTOM_SKILL";
65
+ static toDeletionIdentifier(sourceSkillId: string): ManifestComponentDeletion;
66
+ private readonly _sourceSkillId;
67
+ private _name;
68
+ private _description;
69
+ private _content;
70
+ private _path;
71
+ private _status;
72
+ private _sourceType;
73
+ /**
74
+ * @param scope - The manifest to register this skill with.
75
+ * @param props - Initialization properties.
76
+ */
77
+ constructor(scope: ManifestScope, props: CustomSkillProps);
78
+ /**
79
+ * Loads this skill from the active existing-manifest JSON context.
80
+ */
81
+ static loadFromExisting(sourceSkillId: string, options?: ExistingManifestContextOptions): CustomSkill;
82
+ /** @internal Hydrates a custom skill from existing manifest wire JSON. */
83
+ static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): CustomSkill;
84
+ /**
85
+ * Returns this skill's source-side manifest identifier. New skills use a
86
+ * generated temporary handle; extracted skills use their database UUID.
87
+ */
88
+ getSourceSkillId(): string;
89
+ /**
90
+ * Replaces the display name for this skill.
91
+ */
92
+ setName(name: string): this;
93
+ /**
94
+ * Replaces the description for this skill. Pass `null` to clear it.
95
+ */
96
+ setDescription(description: string | null): this;
97
+ /**
98
+ * Replaces the plaintext markdown instruction content for this skill.
99
+ */
100
+ setContent(content: string): this;
101
+ /**
102
+ * Replaces the optional folder path for this skill. Pass `null` to clear it,
103
+ * or `undefined` to omit it from the serialized manifest.
104
+ */
105
+ setPath(path: string | null | undefined): this;
106
+ /**
107
+ * Replaces whether this skill is active or inactive.
108
+ */
109
+ setStatus(status: CustomSkillStatus): this;
110
+ /**
111
+ * Serializes this skill to the wire format consumed by the manifest install endpoint.
112
+ */
113
+ toDict(): Record<string, any>;
114
+ }
115
+ //# sourceMappingURL=custom-skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-skill.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/custom-skill.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,8BAA8B,EAAE,uCAAoC;AAC9G,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,8BAA2B;AAGnF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAAG,MAAM,G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EG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKhD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAK9C;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAK1C;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAa9B"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomSkill = void 0;
4
+ const _helpers_1 = require("./_helpers.js");
5
+ const existing_manifest_context_1 = require("./existing-manifest-context.js");
6
+ const _existing_component_fields_1 = require("./_existing-component-fields.js");
7
+ /**
8
+ * Defines a Rippling AI Custom Skill and registers it with the manifest.
9
+ */
10
+ class CustomSkill {
11
+ static toDeletionIdentifier(sourceSkillId) {
12
+ return {
13
+ type: CustomSkill.componentType,
14
+ source_skill_id: sourceSkillId,
15
+ };
16
+ }
17
+ /**
18
+ * @param scope - The manifest to register this skill with.
19
+ * @param props - Initialization properties.
20
+ */
21
+ constructor(scope, props) {
22
+ if (props.sourceSkillId != null && props.sourceType != null) {
23
+ throw new Error('CustomSkill sourceType is create-time only. Omit sourceType when constructing an existing skill; ' +
24
+ 'use CustomSkill.loadFromExisting(...) to update extracted skills.');
25
+ }
26
+ this._sourceSkillId = props.sourceSkillId ?? (0, _helpers_1.generateId)('skill');
27
+ this._name = props.name;
28
+ this._description = props.description;
29
+ this._content = props.content;
30
+ this._path = props.path;
31
+ this._status = props.status;
32
+ this._sourceType = props.sourceType;
33
+ scope._register(this);
34
+ }
35
+ /**
36
+ * Loads this skill from the active existing-manifest JSON context.
37
+ */
38
+ static loadFromExisting(sourceSkillId, options = {}) {
39
+ return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadCustomSkill(sourceSkillId);
40
+ }
41
+ /** @internal Hydrates a custom skill from existing manifest wire JSON. */
42
+ static _fromExistingComponent(scope, component) {
43
+ const props = {
44
+ sourceSkillId: (0, _existing_component_fields_1.requireStringComponentField)(component, 'source_skill_id', CustomSkill.componentType),
45
+ name: (0, _existing_component_fields_1.requireStringComponentField)(component, 'name', CustomSkill.componentType),
46
+ description: component['description'] == null ?
47
+ null
48
+ : (0, _existing_component_fields_1.requireStringComponentField)(component, 'description', CustomSkill.componentType),
49
+ content: (0, _existing_component_fields_1.requireStringComponentField)(component, 'content', CustomSkill.componentType),
50
+ status: (0, _existing_component_fields_1.requireStringComponentField)(component, 'status', CustomSkill.componentType),
51
+ };
52
+ if (typeof component['path'] === 'string')
53
+ props.path = component['path'];
54
+ if (typeof component['source_type'] === 'string') {
55
+ props.sourceType = component['source_type'];
56
+ }
57
+ const { sourceType, ...loadProps } = props;
58
+ const skill = new CustomSkill(scope, loadProps);
59
+ skill._sourceType = sourceType;
60
+ return skill;
61
+ }
62
+ /**
63
+ * Returns this skill's source-side manifest identifier. New skills use a
64
+ * generated temporary handle; extracted skills use their database UUID.
65
+ */
66
+ getSourceSkillId() {
67
+ return this._sourceSkillId;
68
+ }
69
+ /**
70
+ * Replaces the display name for this skill.
71
+ */
72
+ setName(name) {
73
+ this._name = name;
74
+ return this;
75
+ }
76
+ /**
77
+ * Replaces the description for this skill. Pass `null` to clear it.
78
+ */
79
+ setDescription(description) {
80
+ this._description = description;
81
+ return this;
82
+ }
83
+ /**
84
+ * Replaces the plaintext markdown instruction content for this skill.
85
+ */
86
+ setContent(content) {
87
+ this._content = content;
88
+ return this;
89
+ }
90
+ /**
91
+ * Replaces the optional folder path for this skill. Pass `null` to clear it,
92
+ * or `undefined` to omit it from the serialized manifest.
93
+ */
94
+ setPath(path) {
95
+ this._path = path;
96
+ return this;
97
+ }
98
+ /**
99
+ * Replaces whether this skill is active or inactive.
100
+ */
101
+ setStatus(status) {
102
+ this._status = status;
103
+ return this;
104
+ }
105
+ /**
106
+ * Serializes this skill to the wire format consumed by the manifest install endpoint.
107
+ */
108
+ toDict() {
109
+ const component = {
110
+ type: CustomSkill.componentType,
111
+ source_skill_id: this._sourceSkillId,
112
+ name: this._name,
113
+ content: this._content,
114
+ status: this._status,
115
+ };
116
+ if (this._description !== undefined)
117
+ component['description'] = this._description;
118
+ if (this._path !== undefined)
119
+ component['path'] = this._path;
120
+ if (this._sourceType != null)
121
+ component['source_type'] = this._sourceType;
122
+ return component;
123
+ }
124
+ }
125
+ exports.CustomSkill = CustomSkill;
126
+ CustomSkill.componentType = 'CUSTOM_SKILL';
127
+ //# sourceMappingURL=custom-skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-skill.js","sourceRoot":"","sources":["../../src/lib/manifest/custom-skill.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;AACxC,8EAA8G;AAE9G,gFAA2E;AA6D3E;;GAEG;AACH,MAAa,WAAW;IAGtB,MAAM,CAAC,oBAAoB,CAAC,aAAqB;QAC/C,OAAO;YACL,IAAI,EAAE,WAAW,CAAC,aAAa;YAC/B,eAAe,EAAE,aAAa;SAC/B,CAAC;IACJ,CAAC;IAUD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAuB;QACvD,IAAI,KAAK,CAAC,aAAa,IAAI,IAAI,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CACb,mGAAmG;gBACjG,mEAAmE,CACtE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,IAAI,IAAA,qBAAU,EAAC,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAA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,KAAK,SAAS;YAAE,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7D,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1E,OAAO,SAAS,CAAC;IACnB,CAAC;;AAxIH,kCAyIC;AAxIiB,yBAAa,GAAG,cAAuB,CAAC"}
@@ -0,0 +1,123 @@
1
+ import { generateId } from "./_helpers.mjs";
2
+ import { getExistingManifestContext } from "./existing-manifest-context.mjs";
3
+ import { requireStringComponentField } from "./_existing-component-fields.mjs";
4
+ /**
5
+ * Defines a Rippling AI Custom Skill and registers it with the manifest.
6
+ */
7
+ export class CustomSkill {
8
+ static toDeletionIdentifier(sourceSkillId) {
9
+ return {
10
+ type: CustomSkill.componentType,
11
+ source_skill_id: sourceSkillId,
12
+ };
13
+ }
14
+ /**
15
+ * @param scope - The manifest to register this skill with.
16
+ * @param props - Initialization properties.
17
+ */
18
+ constructor(scope, props) {
19
+ if (props.sourceSkillId != null && props.sourceType != null) {
20
+ throw new Error('CustomSkill sourceType is create-time only. Omit sourceType when constructing an existing skill; ' +
21
+ 'use CustomSkill.loadFromExisting(...) to update extracted skills.');
22
+ }
23
+ this._sourceSkillId = props.sourceSkillId ?? generateId('skill');
24
+ this._name = props.name;
25
+ this._description = props.description;
26
+ this._content = props.content;
27
+ this._path = props.path;
28
+ this._status = props.status;
29
+ this._sourceType = props.sourceType;
30
+ scope._register(this);
31
+ }
32
+ /**
33
+ * Loads this skill from the active existing-manifest JSON context.
34
+ */
35
+ static loadFromExisting(sourceSkillId, options = {}) {
36
+ return getExistingManifestContext(options).loadCustomSkill(sourceSkillId);
37
+ }
38
+ /** @internal Hydrates a custom skill from existing manifest wire JSON. */
39
+ static _fromExistingComponent(scope, component) {
40
+ const props = {
41
+ sourceSkillId: requireStringComponentField(component, 'source_skill_id', CustomSkill.componentType),
42
+ name: requireStringComponentField(component, 'name', CustomSkill.componentType),
43
+ description: component['description'] == null ?
44
+ null
45
+ : requireStringComponentField(component, 'description', CustomSkill.componentType),
46
+ content: requireStringComponentField(component, 'content', CustomSkill.componentType),
47
+ status: requireStringComponentField(component, 'status', CustomSkill.componentType),
48
+ };
49
+ if (typeof component['path'] === 'string')
50
+ props.path = component['path'];
51
+ if (typeof component['source_type'] === 'string') {
52
+ props.sourceType = component['source_type'];
53
+ }
54
+ const { sourceType, ...loadProps } = props;
55
+ const skill = new CustomSkill(scope, loadProps);
56
+ skill._sourceType = sourceType;
57
+ return skill;
58
+ }
59
+ /**
60
+ * Returns this skill's source-side manifest identifier. New skills use a
61
+ * generated temporary handle; extracted skills use their database UUID.
62
+ */
63
+ getSourceSkillId() {
64
+ return this._sourceSkillId;
65
+ }
66
+ /**
67
+ * Replaces the display name for this skill.
68
+ */
69
+ setName(name) {
70
+ this._name = name;
71
+ return this;
72
+ }
73
+ /**
74
+ * Replaces the description for this skill. Pass `null` to clear it.
75
+ */
76
+ setDescription(description) {
77
+ this._description = description;
78
+ return this;
79
+ }
80
+ /**
81
+ * Replaces the plaintext markdown instruction content for this skill.
82
+ */
83
+ setContent(content) {
84
+ this._content = content;
85
+ return this;
86
+ }
87
+ /**
88
+ * Replaces the optional folder path for this skill. Pass `null` to clear it,
89
+ * or `undefined` to omit it from the serialized manifest.
90
+ */
91
+ setPath(path) {
92
+ this._path = path;
93
+ return this;
94
+ }
95
+ /**
96
+ * Replaces whether this skill is active or inactive.
97
+ */
98
+ setStatus(status) {
99
+ this._status = status;
100
+ return this;
101
+ }
102
+ /**
103
+ * Serializes this skill to the wire format consumed by the manifest install endpoint.
104
+ */
105
+ toDict() {
106
+ const component = {
107
+ type: CustomSkill.componentType,
108
+ source_skill_id: this._sourceSkillId,
109
+ name: this._name,
110
+ content: this._content,
111
+ status: this._status,
112
+ };
113
+ if (this._description !== undefined)
114
+ component['description'] = this._description;
115
+ if (this._path !== undefined)
116
+ component['path'] = this._path;
117
+ if (this._sourceType != null)
118
+ component['source_type'] = this._sourceType;
119
+ return component;
120
+ }
121
+ }
122
+ CustomSkill.componentType = 'CUSTOM_SKILL';
123
+ //# sourceMappingURL=custom-skill.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-skill.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,uBAAmB;AACxC,OAAO,EAAE,0BAA0B,EAAuC,wCAAoC;AAE9G,OAAO,EAAE,2BAA2B,EAAE,yCAAqC;AA6D3E;;GAEG;AACH,MAAM,OAAO,WAAW;IAGtB,MAAM,CAAC,oBAAoB,CAAC,aAAqB;QAC/C,OAAO;YACL,IAAI,EAAE,WAAW,CAAC,aAAa;YAC/B,eAAe,EAAE,aAAa;SAC/B,CAAC;IACJ,CAAC;IAUD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAuB;QACvD,IAAI,KAAK,CAAC,aAAa,IAAI,IAAI,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CACb,mGAAmG;gBACjG,mEAAmE,CACtE,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC;QACpC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,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-1,4 +1,5 @@
1
1
  import { App } from "./app.mjs";
2
+ import { Agent } from "./agent.mjs";
2
3
  import { Category } from "./category.mjs";
3
4
  import { CustomField } from "./custom-field.mjs";
4
5
  import { CustomFieldSection } from "./custom-field-section.mjs";
@@ -6,6 +7,7 @@ import { CustomObject } from "./custom-object.mjs";
6
7
  import { CustomObjectAction } from "./custom-object-action.mjs";
7
8
  import { CustomObjectFieldSection } from "./custom-object-field-section.mjs";
8
9
  import { CustomObjectPageLayout } from "./custom-object-page-layout.mjs";
10
+ import { CustomSkill } from "./custom-skill.mjs";
9
11
  import { Field } from "./field.mjs";
10
12
  import { ListViewDef } from "./list-view.mjs";
11
13
  import { ManifestBuilder } from "./manifest-builder.mjs";
@@ -53,8 +55,10 @@ export declare class ExistingManifestContext {
53
55
  loadValidation(ruleId: string, options?: ExistingManifestObjectOptions): Validation;
54
56
  loadRule(flowId: string, options?: ExistingManifestObjectOptions): Rule;
55
57
  loadFunction(apiName: string): ManifestFunction;
58
+ loadCustomSkill(sourceSkillId: string): CustomSkill;
56
59
  loadSduiPage(sduiPageId: string): SduiPage;
57
60
  loadApp(apiName: string): App;
61
+ loadAgent(apiName: string): Agent;
58
62
  private loadComponent;
59
63
  private loadCategoryComponent;
60
64
  private loadCustomObjectComponent;
@@ -68,8 +72,10 @@ export declare class ExistingManifestContext {
68
72
  private loadValidationComponent;
69
73
  private loadRuleComponent;
70
74
  private loadFunctionComponent;
75
+ private loadCustomSkillComponent;
71
76
  private loadSduiPageComponent;
72
77
  private loadAppComponent;
78
+ private loadAgentComponent;
73
79
  private loadRawComponent;
74
80
  private loadFieldByObjectAndApi;
75
81
  private findFieldComponent;
@@ -77,6 +83,7 @@ export declare class ExistingManifestContext {
77
83
  private loadFieldReferenceComponent;
78
84
  private loadRequiredCategoryForCustomObject;
79
85
  private loadRequiredFunctionForSduiPage;
86
+ private loadRequiredCustomSkillForAgent;
80
87
  private loadSyntheticFieldReference;
81
88
  private loadFieldRelationshipDependencies;
82
89
  private loadSummaryFieldDependency;
@@ -1 +1 @@
1
- {"version":3,"file":"existing-manifest-context.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/existing-manifest-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,WAAW,EAAE,2BAAuB;AAC7C,OAAO,EAAE,kBAAkB,EAAE,mCAA+B;AAC5D,OAAO,EAAE,YAAY,EAAE,4BAAwB;AAC/C,OAAO,EAAE,kBAAkB,EAAE,mCAA+B;AAC5D,OAAO,EAAE,wBAAwB,EAAE,0CAAsC;AACzE,OAAO,EAAE,sBAAsB,EAAE,wCAAoC;AACrE,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,WAAW,EAAE,wBAAoB;AAC1C,OAAO,EAAE,eAAe,EAA0B,+BAA2B;AAC7E,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AACvD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EAAE,QAAQ,EAAE,wBAAoB;AACvC,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAO1C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACnC;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;AAEvF,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC;AAED,UAAU,6BAA6B;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AA2DD,wBAAgB,0BAA0B,CACxC,OAAO,CAAC,EAAE,8BAA8B,GACvC,uBAAuB,CAKzB;AAED,qBAAa,uBAA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OAAO,CAAC,+BAA+B;IAkBvC,OAAO,CAAC,+BAA+B;IAcvC,OAAO,CAAC,2BAA2B;IAKnC,OAAO,CAAC,iCAAiC;IA0BzC,OAAO,CAAC,0BAA0B;IAMlC,OAAO,CAAC,0BAA0B;IAKlC,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,6BAA6B;IAqBrC,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,SAAS;CAelB"}
@@ -1,4 +1,5 @@
1
1
  import { App } from "./app.js";
2
+ import { Agent } from "./agent.js";
2
3
  import { Category } from "./category.js";
3
4
  import { CustomField } from "./custom-field.js";
4
5
  import { CustomFieldSection } from "./custom-field-section.js";
@@ -6,6 +7,7 @@ import { CustomObject } from "./custom-object.js";
6
7
  import { CustomObjectAction } from "./custom-object-action.js";
7
8
  import { CustomObjectFieldSection } from "./custom-object-field-section.js";
8
9
  import { CustomObjectPageLayout } from "./custom-object-page-layout.js";
10
+ import { CustomSkill } from "./custom-skill.js";
9
11
  import { Field } from "./field.js";
10
12
  import { ListViewDef } from "./list-view.js";
11
13
  import { ManifestBuilder } from "./manifest-builder.js";
@@ -53,8 +55,10 @@ export declare class ExistingManifestContext {
53
55
  loadValidation(ruleId: string, options?: ExistingManifestObjectOptions): Validation;
54
56
  loadRule(flowId: string, options?: ExistingManifestObjectOptions): Rule;
55
57
  loadFunction(apiName: string): ManifestFunction;
58
+ loadCustomSkill(sourceSkillId: string): CustomSkill;
56
59
  loadSduiPage(sduiPageId: string): SduiPage;
57
60
  loadApp(apiName: string): App;
61
+ loadAgent(apiName: string): Agent;
58
62
  private loadComponent;
59
63
  private loadCategoryComponent;
60
64
  private loadCustomObjectComponent;
@@ -68,8 +72,10 @@ export declare class ExistingManifestContext {
68
72
  private loadValidationComponent;
69
73
  private loadRuleComponent;
70
74
  private loadFunctionComponent;
75
+ private loadCustomSkillComponent;
71
76
  private loadSduiPageComponent;
72
77
  private loadAppComponent;
78
+ private loadAgentComponent;
73
79
  private loadRawComponent;
74
80
  private loadFieldByObjectAndApi;
75
81
  private findFieldComponent;
@@ -77,6 +83,7 @@ export declare class ExistingManifestContext {
77
83
  private loadFieldReferenceComponent;
78
84
  private loadRequiredCategoryForCustomObject;
79
85
  private loadRequiredFunctionForSduiPage;
86
+ private loadRequiredCustomSkillForAgent;
80
87
  private loadSyntheticFieldReference;
81
88
  private loadFieldRelationshipDependencies;
82
89
  private loadSummaryFieldDependency;
@@ -1 +1 @@
1
- {"version":3,"file":"existing-manifest-context.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/existing-manifest-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,iBAAc;AAC5B,OAAO,EAAE,QAAQ,EAAE,sBAAmB;AACtC,OAAO,EAAE,WAAW,EAAE,0BAAuB;AAC7C,OAAO,EAAE,kBAAkB,EAAE,kCAA+B;AAC5D,OAAO,EAAE,YAAY,EAAE,2BAAwB;AAC/C,OAAO,EAAE,kBAAkB,EAAE,kCAA+B;AAC5D,OAAO,EAAE,wBAAwB,EAAE,yCAAsC;AACzE,OAAO,EAAE,sBAAsB,EAAE,uCAAoC;AACrE,OAAO,EAAE,KAAK,EAAE,mBAAgB;AAChC,OAAO,EAAE,WAAW,EAAE,uBAAoB;AAC1C,OAAO,EAAE,eAAe,EAA0B,8BAA2B;AAC7E,OAAO,EAAE,gBAAgB,EAAE,+BAA4B;AACvD,OAAO,EAAE,IAAI,EAAE,kBAAe;AAC9B,OAAO,EAAE,QAAQ,EAAE,uBAAoB;AACvC,OAAO,EAAE,UAAU,EAAE,wBAAqB;AAO1C,MAAM,WAA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BAAyB;IAkBjC,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,+BAA+B;IAevC,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,mCAAmC;IAiB3C,OAAO,CAAC,+BAA+B;IAkBvC,OAAO,CAAC,+BAA+B;IAcvC,OAAO,CAAC,2BAA2B;IAKnC,OAAO,CAAC,iCAAiC;IA0BzC,OAAO,CAAC,0BAA0B;IAMlC,OAAO,CAAC,0BAA0B;IAKlC,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,6BAA6B;IAqBrC,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,SAAS;CAelB"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExistingManifestContext = void 0;
4
4
  exports.getExistingManifestContext = getExistingManifestContext;
5
5
  const app_1 = require("./app.js");
6
+ const agent_1 = require("./agent.js");
6
7
  const category_1 = require("./category.js");
7
8
  const custom_field_1 = require("./custom-field.js");
8
9
  const custom_field_section_1 = require("./custom-field-section.js");
@@ -10,6 +11,7 @@ const custom_object_1 = require("./custom-object.js");
10
11
  const custom_object_action_1 = require("./custom-object-action.js");
11
12
  const custom_object_field_section_1 = require("./custom-object-field-section.js");
12
13
  const custom_object_page_layout_1 = require("./custom-object-page-layout.js");
14
+ const custom_skill_1 = require("./custom-skill.js");
13
15
  const field_1 = require("./field.js");
14
16
  const list_view_1 = require("./list-view.js");
15
17
  const manifest_builder_1 = require("./manifest-builder.js");
@@ -69,6 +71,7 @@ function componentLabel(component) {
69
71
  component['rule_id'] ??
70
72
  component['flow_id'] ??
71
73
  component['sdui_page_id'] ??
74
+ component['source_skill_id'] ??
72
75
  component['field_api_name'] ??
73
76
  component['section_id'] ??
74
77
  'unknown';
@@ -203,6 +206,10 @@ class ExistingManifestContext {
203
206
  const component = this.findUnique('FUNCTION', (candidate) => candidate['api_name'] === apiName, `FUNCTION ${apiName}`);
204
207
  return this.loadFunctionComponent(component);
205
208
  }
209
+ loadCustomSkill(sourceSkillId) {
210
+ const component = this.findUnique('CUSTOM_SKILL', (candidate) => candidate['source_skill_id'] === sourceSkillId, `CUSTOM_SKILL ${sourceSkillId}`);
211
+ return this.loadCustomSkillComponent(component);
212
+ }
206
213
  loadSduiPage(sduiPageId) {
207
214
  const component = this.findUnique('SDUI_PAGE', (candidate) => candidate['sdui_page_id'] === sduiPageId, `SDUI_PAGE ${sduiPageId}`);
208
215
  return this.loadSduiPageComponent(component);
@@ -211,8 +218,14 @@ class ExistingManifestContext {
211
218
  const component = this.findUnique('CUSTOM_APP', (candidate) => candidate['api_name'] === apiName, `CUSTOM_APP ${apiName}`);
212
219
  return this.loadAppComponent(component);
213
220
  }
221
+ loadAgent(apiName) {
222
+ const component = this.findUnique('AGENT', (candidate) => candidate['api_name'] === apiName, `AGENT ${apiName}`);
223
+ return this.loadAgentComponent(component);
224
+ }
214
225
  loadComponent(component) {
215
226
  switch (component['type']) {
227
+ case 'AGENT':
228
+ return this.loadAgentComponent(component);
216
229
  case 'CUSTOM_CATEGORY':
217
230
  return this.loadCategoryComponent(component);
218
231
  case 'CUSTOM_OBJECT':
@@ -235,6 +248,8 @@ class ExistingManifestContext {
235
248
  return this.loadValidationComponent(component);
236
249
  case 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW':
237
250
  return this.loadRuleComponent(component);
251
+ case 'CUSTOM_SKILL':
252
+ return this.loadCustomSkillComponent(component);
238
253
  case 'FUNCTION':
239
254
  return this.loadFunctionComponent(component);
240
255
  case 'SDUI_PAGE':
@@ -348,6 +363,11 @@ class ExistingManifestContext {
348
363
  const cacheKey = this.cacheKey('FUNCTION', apiName);
349
364
  return this.getOrLoad(cacheKey, () => manifest_function_1.ManifestFunction._fromExistingComponent(this.getManifestBuilder(), component));
350
365
  }
366
+ loadCustomSkillComponent(component) {
367
+ const sourceSkillId = (0, _existing_component_fields_1.requireStringComponentField)(component, 'source_skill_id', custom_skill_1.CustomSkill.componentType);
368
+ const cacheKey = this.cacheKey('CUSTOM_SKILL', sourceSkillId);
369
+ return this.getOrLoad(cacheKey, () => custom_skill_1.CustomSkill._fromExistingComponent(this.getManifestBuilder(), component));
370
+ }
351
371
  loadSduiPageComponent(component) {
352
372
  const sduiPageId = (0, _existing_component_fields_1.requireStringComponentField)(component, 'sdui_page_id', sdui_page_1.SduiPage.componentType);
353
373
  const cacheKey = this.cacheKey('SDUI_PAGE', sduiPageId);
@@ -363,6 +383,11 @@ class ExistingManifestContext {
363
383
  return app_1.App._fromExistingComponent(this.getManifestBuilder(), component);
364
384
  });
365
385
  }
386
+ loadAgentComponent(component) {
387
+ const apiName = (0, _existing_component_fields_1.requireStringComponentField)(component, 'api_name', agent_1.Agent.componentType);
388
+ const cacheKey = this.cacheKey('AGENT', apiName);
389
+ return this.getOrLoad(cacheKey, () => agent_1.Agent._fromExistingComponent(this.getManifestBuilder(), component, (sourceSkillId) => this.loadRequiredCustomSkillForAgent(sourceSkillId, apiName)));
390
+ }
366
391
  loadRawComponent(component) {
367
392
  const index = this.componentIndexes.get(component) ?? -1;
368
393
  const cacheKey = this.cacheKey('RAW', `${index}:${componentLabel(component)}`);
@@ -422,6 +447,15 @@ class ExistingManifestContext {
422
447
  }
423
448
  return this.loadFunctionComponent(functionComponent);
424
449
  }
450
+ loadRequiredCustomSkillForAgent(sourceSkillId, agentApiName) {
451
+ const skillComponent = this.ofType('CUSTOM_SKILL').find((candidate) => candidate['source_skill_id'] === sourceSkillId);
452
+ if (skillComponent == null) {
453
+ throw new Error(`AGENT ${agentApiName} references CUSTOM_SKILL ${sourceSkillId}, ` +
454
+ 'but that custom skill component is not present. Pass the full existing component extraction ' +
455
+ 'to ManifestBuilder.loadFromExistingJson(...).');
456
+ }
457
+ return this.loadCustomSkillComponent(skillComponent);
458
+ }
425
459
  loadSyntheticFieldReference(customObjectApiName, fieldApiName) {
426
460
  const cacheKey = this.cacheKey('CUSTOM_OBJECT_FIELD_REF', `${customObjectApiName}.${fieldApiName}`);
427
461
  return this.getOrLoad(cacheKey, () => field_1.Field._syntheticReference(customObjectApiName, fieldApiName));