@copado/agentia-cli 0.89.0-alpha.0 → 0.91.0-alpha.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.
- package/README.md +241 -197
- package/dist/commands/cicd/work/commit.d.ts +1 -0
- package/dist/commands/cicd/work/commit.js +7 -2
- package/dist/commands/cicd/work/commit.js.map +1 -1
- package/dist/commands/cicd/work/done.d.ts +3 -0
- package/dist/commands/cicd/work/done.js +33 -6
- package/dist/commands/cicd/work/done.js.map +1 -1
- package/dist/commands/cicd/work/push.d.ts +5 -0
- package/dist/commands/cicd/work/push.js +26 -3
- package/dist/commands/cicd/work/push.js.map +1 -1
- package/dist/commands/cicd/work/submit.d.ts +1 -0
- package/dist/commands/cicd/work/submit.js +24 -4
- package/dist/commands/cicd/work/submit.js.map +1 -1
- package/dist/lib/defaults-store.d.ts +4 -0
- package/dist/lib/defaults-store.js +18 -3
- package/dist/lib/defaults-store.js.map +1 -1
- package/dist/lib/deployment-step-types.d.ts +3 -0
- package/dist/lib/deployment-step-types.js +10 -0
- package/dist/lib/deployment-step-types.js.map +1 -1
- package/dist/lib/git-worktree.d.ts +6 -0
- package/dist/lib/git-worktree.js +31 -4
- package/dist/lib/git-worktree.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +10 -2
- package/dist/lib/mcp/work-tools.d.ts +12 -2
- package/dist/lib/mcp/work-tools.js +40 -13
- package/dist/lib/mcp/work-tools.js.map +1 -1
- package/dist/lib/nested-metadata-changes.d.ts +50 -0
- package/dist/lib/nested-metadata-changes.js +166 -0
- package/dist/lib/nested-metadata-changes.js.map +1 -0
- package/dist/lib/nested-metadata-registry.d.ts +24 -0
- package/dist/lib/nested-metadata-registry.js +201 -0
- package/dist/lib/nested-metadata-registry.js.map +1 -0
- package/dist/lib/setup-templates.d.ts +1 -1
- package/dist/lib/setup-templates.js +3 -3
- package/dist/lib/work-local-commit.d.ts +2 -0
- package/dist/lib/work-local-commit.js +4 -0
- package/dist/lib/work-local-commit.js.map +1 -1
- package/dist/lib/work-push.d.ts +48 -0
- package/dist/lib/work-push.js +195 -14
- package/dist/lib/work-push.js.map +1 -1
- package/dist/lib/work-types.d.ts +30 -1
- package/dist/lib/work-types.js.map +1 -1
- package/oclif.manifest.json +145 -101
- package/package.json +2 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
|
|
2
|
+
import { isPermissionNestedParentType, NESTED_METADATA_REGISTRY, nestedRulesForType, } from './nested-metadata-registry.js';
|
|
3
|
+
import { resolveSalesforcePath } from './sdr-path-resolver.js';
|
|
4
|
+
const ELEMENT_NODE = 1;
|
|
5
|
+
function selectionKey(selection) {
|
|
6
|
+
return `${selection.type}:${selection.name}`;
|
|
7
|
+
}
|
|
8
|
+
function compareSelections(left, right) {
|
|
9
|
+
return left.type.localeCompare(right.type) || left.name.localeCompare(right.name);
|
|
10
|
+
}
|
|
11
|
+
export function formatNestedMetadataSelection(selection) {
|
|
12
|
+
return selectionKey(selection);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Changed files whose metadata type aggregates nested children, paired with the rules that describe
|
|
16
|
+
* the nested XML blocks to diff. Paths that do not resolve to Salesforce metadata are dropped.
|
|
17
|
+
*/
|
|
18
|
+
export function listNestedParentCandidates(filePaths, registry = NESTED_METADATA_REGISTRY) {
|
|
19
|
+
const candidates = new Map();
|
|
20
|
+
for (const filePath of filePaths) {
|
|
21
|
+
const resolved = resolveSalesforcePath(filePath);
|
|
22
|
+
if (!resolved) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const rules = nestedRulesForType(resolved.type, registry);
|
|
26
|
+
if (!rules) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
candidates.set(filePath, { ...resolved, filePath, rules });
|
|
30
|
+
}
|
|
31
|
+
return [...candidates.values()];
|
|
32
|
+
}
|
|
33
|
+
function localName(node) {
|
|
34
|
+
return (node.localName ?? node.nodeName ?? '').replace(/^.*:/, '');
|
|
35
|
+
}
|
|
36
|
+
function childElements(parent) {
|
|
37
|
+
const elements = [];
|
|
38
|
+
for (let index = 0; index < parent.childNodes.length; index++) {
|
|
39
|
+
const child = parent.childNodes.item(index);
|
|
40
|
+
if (child?.nodeType === ELEMENT_NODE) {
|
|
41
|
+
elements.push(child);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return elements;
|
|
45
|
+
}
|
|
46
|
+
function textOfField(element, field) {
|
|
47
|
+
for (const child of childElements(element)) {
|
|
48
|
+
if (localName(child) === field) {
|
|
49
|
+
return child.textContent?.trim() ?? '';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return '';
|
|
53
|
+
}
|
|
54
|
+
/** Composite key Copado uses for layout assignments: `<layout base>--<recordType>`. */
|
|
55
|
+
export function layoutRecordTypeKey(layout, recordType) {
|
|
56
|
+
const base = layout.includes('-') ? layout.split('-')[0] : layout;
|
|
57
|
+
return recordType ? `${base}--${recordType}` : base;
|
|
58
|
+
}
|
|
59
|
+
export function nestedChildName(element, rule) {
|
|
60
|
+
if (rule.keyStyle === 'layoutRecordType') {
|
|
61
|
+
const layout = textOfField(element, rule.nameFields[0] ?? 'layout');
|
|
62
|
+
if (!layout) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return layoutRecordTypeKey(layout, textOfField(element, rule.nameFields[1] ?? 'recordType'));
|
|
66
|
+
}
|
|
67
|
+
const parts = rule.nameFields.map((field) => textOfField(element, field)).filter(Boolean);
|
|
68
|
+
return parts.length === 0 ? undefined : parts.join('.');
|
|
69
|
+
}
|
|
70
|
+
function parseXml(xml) {
|
|
71
|
+
if (xml.trim().length === 0) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
// Malformed or unexpected input must never reach stdout; `--json` output would be corrupted.
|
|
76
|
+
const document = new DOMParser({
|
|
77
|
+
onError() { },
|
|
78
|
+
}).parseFromString(xml, 'text/xml');
|
|
79
|
+
return document.documentElement ?? undefined;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** Whitespace-insensitive snapshot of a nested block, so reformatting alone is not a change. */
|
|
86
|
+
function normalizeBlock(serialized) {
|
|
87
|
+
return serialized.replaceAll(/>\s+</g, '><').replaceAll(/\s+/g, ' ').trim();
|
|
88
|
+
}
|
|
89
|
+
function collectNestedBlocks(root, rule) {
|
|
90
|
+
const blocks = new Map();
|
|
91
|
+
if (!root) {
|
|
92
|
+
return blocks;
|
|
93
|
+
}
|
|
94
|
+
const serializer = new XMLSerializer();
|
|
95
|
+
for (const element of childElements(root)) {
|
|
96
|
+
if (localName(element) !== rule.xmlElement) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const name = nestedChildName(element, rule);
|
|
100
|
+
if (name === undefined) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
blocks.set(name, normalizeBlock(serializer.serializeToString(element)));
|
|
104
|
+
}
|
|
105
|
+
return blocks;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Nested children whose XML block was added, removed, or edited between the two parent revisions.
|
|
109
|
+
*/
|
|
110
|
+
export function diffNestedChildren(baseXml, headXml, rules) {
|
|
111
|
+
const baseRoot = parseXml(baseXml);
|
|
112
|
+
const headRoot = parseXml(headXml);
|
|
113
|
+
const changes = new Map();
|
|
114
|
+
for (const rule of rules) {
|
|
115
|
+
const baseBlocks = collectNestedBlocks(baseRoot, rule);
|
|
116
|
+
const headBlocks = collectNestedBlocks(headRoot, rule);
|
|
117
|
+
for (const name of new Set([...baseBlocks.keys(), ...headBlocks.keys()])) {
|
|
118
|
+
if (baseBlocks.get(name) === headBlocks.get(name)) {
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const selection = { name, type: rule.childType };
|
|
122
|
+
changes.set(selectionKey(selection), selection);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return [...changes.values()];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Translates changed nested-parent files into the parents to ignore and the nested children that
|
|
129
|
+
* represent the actual change. A parent is only ignored when at least one of its nested blocks
|
|
130
|
+
* changed; parents whose top-level fields alone changed still need to be deployed as a whole.
|
|
131
|
+
*/
|
|
132
|
+
export async function detectNestedMetadataChanges(options) {
|
|
133
|
+
const { filePaths, readBase, readHead } = options;
|
|
134
|
+
const candidates = listNestedParentCandidates(filePaths, options.registry);
|
|
135
|
+
const ignoredParents = new Map();
|
|
136
|
+
const nestedChildren = new Map();
|
|
137
|
+
const permissionNestedChildren = new Map();
|
|
138
|
+
for (const candidate of candidates) {
|
|
139
|
+
// eslint-disable-next-line no-await-in-loop -- git reads are cheap and kept sequential on purpose
|
|
140
|
+
const [baseXml, headXml] = await Promise.all([
|
|
141
|
+
readBase(candidate.filePath),
|
|
142
|
+
readHead(candidate.filePath),
|
|
143
|
+
]);
|
|
144
|
+
if (baseXml.length === 0 && headXml.length === 0) {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
const children = diffNestedChildren(baseXml, headXml, candidate.rules);
|
|
148
|
+
if (children.length === 0) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const parent = { name: candidate.name, type: candidate.type };
|
|
152
|
+
ignoredParents.set(selectionKey(parent), parent);
|
|
153
|
+
for (const child of children) {
|
|
154
|
+
nestedChildren.set(selectionKey(child), child);
|
|
155
|
+
if (isPermissionNestedParentType(candidate.type)) {
|
|
156
|
+
permissionNestedChildren.set(selectionKey(child), child);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
ignoredParents: [...ignoredParents.values()].sort(compareSelections),
|
|
162
|
+
nestedChildren: [...nestedChildren.values()].sort(compareSelections),
|
|
163
|
+
permissionNestedChildren: [...permissionNestedChildren.values()].sort(compareSelections),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=nested-metadata-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nested-metadata-changes.js","sourceRoot":"","sources":["../../src/lib/nested-metadata-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAA2B,aAAa,EAAC,MAAM,gBAAgB,CAAA;AAEhF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EAGxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,qBAAqB,EAAC,MAAM,wBAAwB,CAAA;AAE5D,MAAM,YAAY,GAAG,CAAC,CAAA;AA8BtB,SAAS,YAAY,CAAC,SAAkC;IACtD,OAAO,GAAG,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,CAAA;AAC9C,CAAC;AAED,SAAS,iBAAiB,CAAC,IAA6B,EAAE,KAA8B;IACtF,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACnF,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,SAAkC;IAC9E,OAAO,YAAY,CAAC,SAAS,CAAC,CAAA;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAA4B,EAC5B,WAA2B,wBAAwB;IAEnD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAiC,CAAA;IAE3D,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAA;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,SAAQ;QACV,CAAC;QAED,MAAM,KAAK,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACzD,IAAI,CAAC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-0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nested (a.k.a. decomposed) Salesforce metadata: parent types whose XML aggregates members that
|
|
3
|
+
* Copado tracks as standalone components. Each rule maps a repeated top-level XML element of the
|
|
4
|
+
* parent file to the child metadata type it represents.
|
|
5
|
+
*/
|
|
6
|
+
export type NestedRule = {
|
|
7
|
+
childType: string;
|
|
8
|
+
/**
|
|
9
|
+
* `layoutRecordType` reproduces Copado's `layout--recordType` composite key; every other rule
|
|
10
|
+
* joins the resolved `nameFields` with dots.
|
|
11
|
+
*/
|
|
12
|
+
keyStyle?: 'default' | 'layoutRecordType';
|
|
13
|
+
nameFields: string[];
|
|
14
|
+
xmlElement: string;
|
|
15
|
+
};
|
|
16
|
+
export type NestedRegistry = Readonly<Record<string, readonly NestedRule[]>>;
|
|
17
|
+
/**
|
|
18
|
+
* Parents whose nested children are permissions rather than deployable components on their own.
|
|
19
|
+
* Their changed children are pushed as `retrieveOnly`, the same way `lastPermissionSelected` is.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PERMISSION_NESTED_PARENT_TYPES: ReadonlySet<string>;
|
|
22
|
+
export declare function isPermissionNestedParentType(type: string): boolean;
|
|
23
|
+
export declare const NESTED_METADATA_REGISTRY: NestedRegistry;
|
|
24
|
+
export declare function nestedRulesForType(type: string, registry?: NestedRegistry): readonly NestedRule[] | undefined;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parents whose nested children are permissions rather than deployable components on their own.
|
|
3
|
+
* Their changed children are pushed as `retrieveOnly`, the same way `lastPermissionSelected` is.
|
|
4
|
+
*/
|
|
5
|
+
export const PERMISSION_NESTED_PARENT_TYPES = new Set(['PermissionSet', 'Profile']);
|
|
6
|
+
export function isPermissionNestedParentType(type) {
|
|
7
|
+
return PERMISSION_NESTED_PARENT_TYPES.has(type);
|
|
8
|
+
}
|
|
9
|
+
export const NESTED_METADATA_REGISTRY = {
|
|
10
|
+
AssignmentRules: [{ childType: 'AssignmentRule', nameFields: ['fullName'], xmlElement: 'assignmentRule' }],
|
|
11
|
+
AutoResponseRules: [
|
|
12
|
+
{ childType: 'AutoResponseRule', nameFields: ['fullName'], xmlElement: 'autoResponseRule' },
|
|
13
|
+
],
|
|
14
|
+
CustomLabels: [{ childType: 'CustomLabel', nameFields: ['fullName'], xmlElement: 'labels' }],
|
|
15
|
+
CustomObject: [
|
|
16
|
+
{ childType: 'SharingRecalculation', nameFields: ['className'], xmlElement: 'sharingRecalculations' },
|
|
17
|
+
],
|
|
18
|
+
CustomObjectTranslation: [
|
|
19
|
+
{ childType: 'FieldSet', nameFields: ['name'], xmlElement: 'fieldSets' },
|
|
20
|
+
{ childType: 'CustomField', nameFields: ['name'], xmlElement: 'fields' },
|
|
21
|
+
{
|
|
22
|
+
childType: 'Layout',
|
|
23
|
+
keyStyle: 'layoutRecordType',
|
|
24
|
+
nameFields: ['layout', 'layoutType'],
|
|
25
|
+
xmlElement: 'layouts',
|
|
26
|
+
},
|
|
27
|
+
{ childType: 'QuickAction', nameFields: ['name'], xmlElement: 'quickActions' },
|
|
28
|
+
{ childType: 'RecordType', nameFields: ['name'], xmlElement: 'recordTypes' },
|
|
29
|
+
{ childType: 'SharingReason', nameFields: ['name'], xmlElement: 'sharingReasons' },
|
|
30
|
+
{ childType: 'StandardFieldTranslation', nameFields: ['name'], xmlElement: 'standardFields' },
|
|
31
|
+
{ childType: 'ValidationRule', nameFields: ['name'], xmlElement: 'validationRules' },
|
|
32
|
+
{ childType: 'WebLink', nameFields: ['name'], xmlElement: 'webLinks' },
|
|
33
|
+
{ childType: 'WorkflowTask', nameFields: ['name'], xmlElement: 'workflowTasks' },
|
|
34
|
+
],
|
|
35
|
+
EscalationRules: [{ childType: 'EscalationRule', nameFields: ['fullName'], xmlElement: 'escalationRule' }],
|
|
36
|
+
MatchingRules: [{ childType: 'MatchingRule', nameFields: ['fullName'], xmlElement: 'matchingRules' }],
|
|
37
|
+
MutingPermissionSet: [
|
|
38
|
+
{ childType: 'CustomApplication', nameFields: ['application'], xmlElement: 'applicationVisibilities' },
|
|
39
|
+
{ childType: 'CustomField', nameFields: ['field'], xmlElement: 'fieldPermissions' },
|
|
40
|
+
{ childType: 'CustomObject', nameFields: ['object'], xmlElement: 'objectPermissions' },
|
|
41
|
+
{ childType: 'CustomTab', nameFields: ['tab'], xmlElement: 'tabSettings' },
|
|
42
|
+
{ childType: 'ApexClass', nameFields: ['apexClass'], xmlElement: 'classAccesses' },
|
|
43
|
+
{ childType: 'ApexPage', nameFields: ['apexPage'], xmlElement: 'pageAccesses' },
|
|
44
|
+
{ childType: 'RecordType', nameFields: ['recordType'], xmlElement: 'recordTypeVisibilities' },
|
|
45
|
+
{ childType: 'CustomPermission', nameFields: ['name'], xmlElement: 'customPermissions' },
|
|
46
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customMetadataTypeAccesses' },
|
|
47
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customSettingAccesses' },
|
|
48
|
+
{ childType: 'Flow', nameFields: ['flow'], xmlElement: 'flowAccesses' },
|
|
49
|
+
{ childType: 'EmailRoutingAddress', nameFields: ['name'], xmlElement: 'emailRoutingAddressAccesses' },
|
|
50
|
+
{
|
|
51
|
+
childType: 'ServicePresenceStatus',
|
|
52
|
+
nameFields: ['servicePresenceStatus'],
|
|
53
|
+
xmlElement: 'servicePresenceStatusAccesses',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
childType: 'ExternalCredential',
|
|
57
|
+
nameFields: ['externalCredentialPrincipal'],
|
|
58
|
+
xmlElement: 'externalCredentialPrincipalAccesses',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
PermissionSet: [
|
|
62
|
+
{ childType: 'CustomApplication', nameFields: ['application'], xmlElement: 'applicationVisibilities' },
|
|
63
|
+
{ childType: 'CustomField', nameFields: ['field'], xmlElement: 'fieldPermissions' },
|
|
64
|
+
{ childType: 'CustomObject', nameFields: ['object'], xmlElement: 'objectPermissions' },
|
|
65
|
+
{ childType: 'CustomTab', nameFields: ['tab'], xmlElement: 'tabSettings' },
|
|
66
|
+
{ childType: 'ApexClass', nameFields: ['apexClass'], xmlElement: 'classAccesses' },
|
|
67
|
+
{ childType: 'ApexPage', nameFields: ['apexPage'], xmlElement: 'pageAccesses' },
|
|
68
|
+
{ childType: 'RecordType', nameFields: ['recordType'], xmlElement: 'recordTypeVisibilities' },
|
|
69
|
+
{ childType: 'CustomPermission', nameFields: ['name'], xmlElement: 'customPermissions' },
|
|
70
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customMetadataTypeAccesses' },
|
|
71
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customSettingAccesses' },
|
|
72
|
+
{ childType: 'Flow', nameFields: ['flow'], xmlElement: 'flowAccesses' },
|
|
73
|
+
{
|
|
74
|
+
childType: 'ExternalDataSource',
|
|
75
|
+
nameFields: ['externalDataSource'],
|
|
76
|
+
xmlElement: 'externalDataSourceAccesses',
|
|
77
|
+
},
|
|
78
|
+
{ childType: 'EmailRoutingAddress', nameFields: ['name'], xmlElement: 'emailRoutingAddressAccesses' },
|
|
79
|
+
{
|
|
80
|
+
childType: 'ServicePresenceStatus',
|
|
81
|
+
nameFields: ['servicePresenceStatus'],
|
|
82
|
+
xmlElement: 'servicePresenceStatusAccesses',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
childType: 'GenComputingSummaryDefAccess',
|
|
86
|
+
nameFields: ['configName'],
|
|
87
|
+
xmlElement: 'genComputingSummaryDefAccesses',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
childType: 'ExternalCredential',
|
|
91
|
+
nameFields: ['externalCredentialPrincipal'],
|
|
92
|
+
xmlElement: 'externalCredentialPrincipalAccesses',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
Profile: [
|
|
96
|
+
{ childType: 'CustomApplication', nameFields: ['application'], xmlElement: 'applicationVisibilities' },
|
|
97
|
+
{ childType: 'CustomField', nameFields: ['field'], xmlElement: 'fieldPermissions' },
|
|
98
|
+
{ childType: 'CustomObject', nameFields: ['object'], xmlElement: 'objectPermissions' },
|
|
99
|
+
{ childType: 'CustomTab', nameFields: ['tab'], xmlElement: 'tabVisibilities' },
|
|
100
|
+
{ childType: 'ApexClass', nameFields: ['apexClass'], xmlElement: 'classAccesses' },
|
|
101
|
+
{ childType: 'ApexPage', nameFields: ['apexPage'], xmlElement: 'pageAccesses' },
|
|
102
|
+
{ childType: 'RecordType', nameFields: ['recordType'], xmlElement: 'recordTypeVisibilities' },
|
|
103
|
+
{ childType: 'CustomPermission', nameFields: ['name'], xmlElement: 'customPermissions' },
|
|
104
|
+
{
|
|
105
|
+
childType: 'Layout',
|
|
106
|
+
keyStyle: 'layoutRecordType',
|
|
107
|
+
nameFields: ['layout', 'recordType'],
|
|
108
|
+
xmlElement: 'layoutAssignments',
|
|
109
|
+
},
|
|
110
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customMetadataTypeAccesses' },
|
|
111
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'customSettingAccesses' },
|
|
112
|
+
{ childType: 'AgentAccess', nameFields: ['agentName'], xmlElement: 'agentAccesses' },
|
|
113
|
+
{
|
|
114
|
+
childType: 'ServicePresenceStatus',
|
|
115
|
+
nameFields: ['servicePresenceStatus'],
|
|
116
|
+
xmlElement: 'servicePresenceStatusAccesses',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
childType: 'GenComputingSummaryDefAccess',
|
|
120
|
+
nameFields: ['configName'],
|
|
121
|
+
xmlElement: 'genComputingSummaryDefAccesses',
|
|
122
|
+
},
|
|
123
|
+
{ childType: 'Flow', nameFields: ['flow'], xmlElement: 'flowAccesses' },
|
|
124
|
+
],
|
|
125
|
+
RecordType: [{ childType: 'CustomField', nameFields: ['picklist'], xmlElement: 'picklistValues' }],
|
|
126
|
+
SharingRules: [
|
|
127
|
+
{ childType: 'SharingCriteriaRule', nameFields: ['fullName'], xmlElement: 'sharingCriteriaRules' },
|
|
128
|
+
{ childType: 'SharingOwnerRule', nameFields: ['fullName'], xmlElement: 'sharingOwnerRules' },
|
|
129
|
+
{ childType: 'SharingTerritoryRule', nameFields: ['fullName'], xmlElement: 'sharingTerritoryRules' },
|
|
130
|
+
{ childType: 'SharingGuestRule', nameFields: ['fullName'], xmlElement: 'sharingGuestRules' },
|
|
131
|
+
],
|
|
132
|
+
Translations: [
|
|
133
|
+
{ childType: 'CustomApplication', nameFields: ['name'], xmlElement: 'customApplications' },
|
|
134
|
+
{ childType: 'CustomLabel', nameFields: ['name'], xmlElement: 'customLabels' },
|
|
135
|
+
{ childType: 'CustomPageWebLinkTranslation', nameFields: ['name'], xmlElement: 'customPageWebLinks' },
|
|
136
|
+
{ childType: 'CustomTab', nameFields: ['name'], xmlElement: 'customTabs' },
|
|
137
|
+
{ childType: 'FlowDefinition', nameFields: ['fullName'], xmlElement: 'flowDefinitions' },
|
|
138
|
+
{ childType: 'QuickAction', nameFields: ['name'], xmlElement: 'quickActions' },
|
|
139
|
+
{ childType: 'ReportType', nameFields: ['name'], xmlElement: 'reportTypes' },
|
|
140
|
+
{ childType: 'CustomObject', nameFields: ['name'], xmlElement: 'scontrols' },
|
|
141
|
+
{
|
|
142
|
+
childType: 'CustomDataTypeTranslation',
|
|
143
|
+
nameFields: ['customDataTypeName'],
|
|
144
|
+
xmlElement: 'customDataTypes',
|
|
145
|
+
},
|
|
146
|
+
{ childType: 'PipelineInspMetricConfig', nameFields: ['name'], xmlElement: 'pipelineInspMetricConfigs' },
|
|
147
|
+
{ childType: 'DataConnector', nameFields: ['name'], xmlElement: 'dataConnectors' },
|
|
148
|
+
{
|
|
149
|
+
childType: 'ConversationMessageDefinition',
|
|
150
|
+
nameFields: ['name'],
|
|
151
|
+
xmlElement: 'conversationMessageDefinitions',
|
|
152
|
+
},
|
|
153
|
+
{ childType: 'BotTemplate', nameFields: ['fullName'], xmlElement: 'botTemplates' },
|
|
154
|
+
{ childType: 'BotBlock', nameFields: ['fullName'], xmlElement: 'botBlocks' },
|
|
155
|
+
{ childType: 'Bot', nameFields: ['fullName'], xmlElement: 'bots' },
|
|
156
|
+
{
|
|
157
|
+
childType: 'ConversationMessageDefinitionTranslation',
|
|
158
|
+
nameFields: ['name'],
|
|
159
|
+
xmlElement: 'aiCoachAgentScnrDefs',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
childType: 'IdentityVerificationCustomFieldLabel',
|
|
163
|
+
nameFields: ['name'],
|
|
164
|
+
xmlElement: 'identityVerificationFields',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
childType: 'ServiceProcessAttributeTranslation',
|
|
168
|
+
nameFields: ['name'],
|
|
169
|
+
xmlElement: 'serviceProcessAttributes',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
childType: 'ServiceProcessItemGroupTranslation',
|
|
173
|
+
nameFields: ['name'],
|
|
174
|
+
xmlElement: 'serviceProcessItemGroups',
|
|
175
|
+
},
|
|
176
|
+
{ childType: 'ProductSpecificationType', nameFields: ['name'], xmlElement: 'productSpecificationTypes' },
|
|
177
|
+
{ childType: 'RecordAlertCategory', nameFields: ['name'], xmlElement: 'recordAlertCategories' },
|
|
178
|
+
{ childType: 'RecordAlertTemplate', nameFields: ['name'], xmlElement: 'recordAlertTemplates' },
|
|
179
|
+
{ childType: 'TimelineObjectDefinition', nameFields: ['name'], xmlElement: 'timelineObjectDefinitions' },
|
|
180
|
+
{ childType: 'ContextDefinition', nameFields: ['name'], xmlElement: 'contextDefinitions' },
|
|
181
|
+
{ childType: 'DashboardComponent', nameFields: ['name'], xmlElement: 'dashboardComponents' },
|
|
182
|
+
{ childType: 'Dashboard', nameFields: ['name'], xmlElement: 'dashboards' },
|
|
183
|
+
{ childType: 'Report', nameFields: ['name'], xmlElement: 'reports' },
|
|
184
|
+
],
|
|
185
|
+
Workflow: [
|
|
186
|
+
{ childType: 'WorkflowRule', nameFields: ['fullName'], xmlElement: 'rules' },
|
|
187
|
+
{ childType: 'WorkflowFlowAction', nameFields: ['fullName'], xmlElement: 'flowActions' },
|
|
188
|
+
{ childType: 'WorkflowFieldUpdate', nameFields: ['fullName'], xmlElement: 'fieldUpdates' },
|
|
189
|
+
{ childType: 'WorkflowTask', nameFields: ['fullName'], xmlElement: 'tasks' },
|
|
190
|
+
{ childType: 'WorkflowAlert', nameFields: ['fullName'], xmlElement: 'alerts' },
|
|
191
|
+
{ childType: 'WorkflowOutboundMessage', nameFields: ['fullName'], xmlElement: 'outboundMessages' },
|
|
192
|
+
{ childType: 'WorkflowKnowledgePublish', nameFields: ['fullName'], xmlElement: 'knowledgePublishes' },
|
|
193
|
+
{ childType: 'WorkflowSend', nameFields: ['fullName'], xmlElement: 'send' },
|
|
194
|
+
{ childType: 'WorkflowFlowAutomation', nameFields: ['fullName'], xmlElement: 'flowAutomations' },
|
|
195
|
+
],
|
|
196
|
+
};
|
|
197
|
+
export function nestedRulesForType(type, registry = NESTED_METADATA_REGISTRY) {
|
|
198
|
+
const rules = registry[type];
|
|
199
|
+
return rules === undefined || rules.length === 0 ? undefined : rules;
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=nested-metadata-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nested-metadata-registry.js","sourceRoot":"","sources":["../../src/lib/nested-metadata-registry.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAwB,IAAI,GAAG,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAA;AAExG,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACvD,OAAO,8BAA8B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACjD,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAmB;IACtD,eAAe,EAAE,CAAC,EAAC,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE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ACxF,EAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAC;QAC1E,EAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAC;QAC5E,EAAC,SAAS,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAC;QAChG,EAAC,SAAS,EAAE,0BAA0B,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAC;QACnG,EAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,MAAM,EAAC;QACzE,EAAC,SAAS,EAAE,wBAAwB,EAAE,UAAU,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAC;KAC/F;CACF,CAAA;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,WAA2B,wBAAwB;IAClG,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAA;AACtE,CAAC"}
|
|
@@ -9,5 +9,5 @@ export declare const AGENTIA_DIR_GITIGNORE_ENTRIES: readonly [".agentia", ".agen
|
|
|
9
9
|
export declare const SAMPLE_QUALITY_GATES_UNIX = "#!/usr/bin/env bash\nset -euo pipefail\n\n# Local Agentia quality gates (macOS / Linux).\n# Edit this script to match your project. Agentia runs it from the repo root during\n# `agentia cicd work test --local` and `agentia cicd work submit` (unless --skip-local-tests).\n# The script must exit non-zero if any check fails.\n\necho \"## Running Code Analyzer\"\nsf code-analyzer run\n\nif [[ -n \"${AGENTIA_APEX_TEST_CLASSES:-}\" ]]; then\n # Normalize commas to spaces so --class-names gets discrete values\n # shellcheck disable=SC2206\n class_names=(${AGENTIA_APEX_TEST_CLASSES//,/ })\n if [[ ${#class_names[@]} -gt 0 ]]; then\n echo \"## Running Apex tests: ${class_names[@]}\"\n sf apex run test --class-names \"${class_names[@]}\" --result-format human --wait 10\n fi\nfi\n\necho \"## Running LWC tests\"\nnpx sfdx-lwc-jest -- # --passWithNoTests\n";
|
|
10
10
|
export declare const SAMPLE_QUALITY_GATES_WINDOWS = "@echo off\nsetlocal EnableExtensions EnableDelayedExpansion\nREM Local Agentia quality gates (Windows).\nREM Edit this script to match your project. Agentia runs it from the repo root during\nREM `agentia cicd work test --local` and `agentia cicd work submit` (unless --skip-local-tests).\nREM The script must exit non-zero if any check fails.\n\necho ## Running Code Analyzer\nsf code-analyzer run\nif errorlevel 1 exit /b %errorlevel%\n\nif defined AGENTIA_APEX_TEST_CLASSES (\n set \"CLASS_NAMES=!AGENTIA_APEX_TEST_CLASSES:,= !\"\n if not \"!CLASS_NAMES!\"==\"\" (\n echo ## Running Apex tests: !CLASS_NAMES!\n sf apex run test --class-names !CLASS_NAMES! --result-format human --wait 10\n if errorlevel 1 exit /b %errorlevel%\n )\n)\n\necho ## Running LWC tests\nnpx sfdx-lwc-jest --\nif errorlevel 1 exit /b %errorlevel%\n";
|
|
11
11
|
/** Bundled AGENTS.md template (mirrors docs/AGENTS.sample.md). Used when DEFAULT_AGENTS_MD_URL is unset or download fails. */
|
|
12
|
-
export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_commit`, `agentia_work_push`, `agentia_work_submit`, and `agentia_work_done` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit or cloud commit) \u2192 push \u2192 submit \u2192 done\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia cicd work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia cicd work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia cicd work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* or `agentia_work_commit` | *(your edits + `git commit`)* or `agentia cicd work commit --cloud --json` | Implement the story or create a Copado cloud metadata commit |\n| 5 | `agentia_work_push` | `agentia cicd work push --json` | Push local Git commits and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia cicd work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_done` | `agentia cicd work done --json` | Promote and deploy to the next stage |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia cicd work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia cicd work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia cicd work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia cicd work get --json\nagentia cicd work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia cicd work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia cicd work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia cicd work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia cicd work push`\n\nPush committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work push --json\n```\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia cicd work commit --cloud`\n\nCreate a Copado cloud commit job for selected metadata:\n\n```sh\nagentia cicd work commit --cloud --message \"Commit AccountService\" --metadata-name AccountService --metadata-type ApexClass --metadata-category SFDX --json\nagentia cicd work commit a0SKC000000CmZ2AU --cloud --file commit-request.json --json\n```\n\nUse this when the metadata commit should be performed by Copado rather than by local Git. The command preflights the user story, submits the commit request, and waits for the job by default. For bundled metadata with `SelectiveCommit`, include `--selection` values for the files inside the bundle. MCP uses camelCase fields such as `metadataName`, `metadataType`, `metadataCategory`, `selection`, and `wait`. For Salesforce metadata, always set `--metadata-category SFDX` or MCP `metadataCategory: \"SFDX\"` (maps to change field `c`). Without `c:SFDX`, Copado SFDX deploy logs \"Salesforce changes not found.\" and skips the deploy.\n\n### `agentia cicd work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia cicd work test --local --json\nagentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`).\n\n### `agentia cicd work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia cicd work submit --json\nagentia cicd work submit --apex-test-classes=MyTest,OtherTest --json\nagentia cicd work submit --skip-local-tests --json\n```\n\nSame branch/clean-tree rules as `work push`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure (same local gates as `work test --local`). Use `--apex-test-classes=class1,class2` to pass Apex test classes to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Use `--skip-local-tests` to skip local gates.
|
|
12
|
+
export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_commit`, `agentia_work_push`, `agentia_work_submit`, and `agentia_work_done` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit or cloud commit) \u2192 push \u2192 submit \u2192 done\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia cicd work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia cicd work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia cicd work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* or `agentia_work_commit` | *(your edits + `git commit`)* or `agentia cicd work commit --cloud --json` | Implement the story or create a Copado cloud metadata commit |\n| 5 | `agentia_work_push` | `agentia cicd work push --json` | Push local Git commits and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia cicd work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_done` | `agentia cicd work done --json` | Promote and deploy to the next stage |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia cicd work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia cicd work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia cicd work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia cicd work get --json\nagentia cicd work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia cicd work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia cicd work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia cicd work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia cicd work push`\n\nPush committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work push --json\n```\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia cicd work commit --cloud`\n\nCreate a Copado cloud commit job for selected metadata:\n\n```sh\nagentia cicd work commit --cloud --message \"Commit AccountService\" --metadata-name AccountService --metadata-type ApexClass --metadata-category SFDX --json\nagentia cicd work commit a0SKC000000CmZ2AU --cloud --file commit-request.json --json\n```\n\nUse this when the metadata commit should be performed by Copado rather than by local Git. The command preflights the user story, submits the commit request, and waits for the job by default. For bundled metadata with `SelectiveCommit`, include `--selection` values for the files inside the bundle. MCP uses camelCase fields such as `metadataName`, `metadataType`, `metadataCategory`, `selection`, and `wait`. For Salesforce metadata, always set `--metadata-category SFDX` or MCP `metadataCategory: \"SFDX\"` (maps to change field `c`). Without `c:SFDX`, Copado SFDX deploy logs \"Salesforce changes not found.\" and skips the deploy.\n\n### `agentia cicd work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia cicd work test --local --json\nagentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`).\n\n### `agentia cicd work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia cicd work submit --json\nagentia cicd work submit --apex-test-classes=MyTest,OtherTest --json\nagentia cicd work submit --skip-local-tests --json\n```\n\nSame branch/clean-tree rules as `work push`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure (same local gates as `work test --local`). Use `--apex-test-classes=class1,class2` to pass Apex test classes to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Use `--skip-local-tests` to skip local gates. After that, submit counts commits since `lastBaseBranch` before checking origin. No commits is an error unless the Story has a `Data Set - Salesforce` or `Data Template - Salesforce` deployment step. When commits exist, unpushed work is still pushed even if those data steps are present, then submit continues.\n\n### `agentia cicd work done`\n\nPromote and deploy the user story to the next pipeline stage:\n\n```sh\nagentia cicd work done --json\n```\n\nSame branch/clean-tree rules as `work submit`. Uses the same commit-then-unpushed order (including the Data Set / Data Template empty-history exception), then promotes without the validate-only path used by submit.\n\nOnly run this when the story is approved and ready to move to the next environment.\n\n---\n\n## Agent rules\n\n1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running `agentia` in the shell.\n2. **Discover before acting.** List assigned stories, then `get` the chosen ID, then `set` before editing files.\n3. **One story, one feature branch.** Do not mix unrelated commits on the same `feature/US-XXXX` branch.\n4. **Choose the right commit path.** Use normal `git add` / `git commit` followed by `agentia_work_push` for local Git work. Use `agentia_work_commit` / `agentia cicd work commit --cloud` for Copado cloud metadata commits.\n5. **Keep the tree clean** before `set`, `push`, `submit`, and `done`. Those steps fail if tracked changes are pending.\n6. **Prefer structured results.** MCP returns JSON; for CLI, use `--json` and do not scrape human table output.\n7. **Order matters.** `set` \u2192 local commit or cloud commit \u2192 `push` when local Git commits exist \u2192 `submit` \u2192 `done`. `submit` and `done` count commits since `lastBaseBranch` before checking origin; they auto-push only when that range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not push validation when commits exist. `set` is still required first.\n8. **Confirm intent for `done`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
|
|
13
13
|
export declare function qualityGatesExplanation(bin?: string): string;
|
|
@@ -181,7 +181,7 @@ agentia cicd work submit --apex-test-classes=MyTest,OtherTest --json
|
|
|
181
181
|
agentia cicd work submit --skip-local-tests --json
|
|
182
182
|
\`\`\`
|
|
183
183
|
|
|
184
|
-
Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). Use \`--apex-test-classes=class1,class2\` to pass Apex test classes to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`). Use \`--skip-local-tests\` to skip local gates.
|
|
184
|
+
Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). Use \`--apex-test-classes=class1,class2\` to pass Apex test classes to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`). Use \`--skip-local-tests\` to skip local gates. After that, submit counts commits since \`lastBaseBranch\` before checking origin. No commits is an error unless the Story has a \`Data Set - Salesforce\` or \`Data Template - Salesforce\` deployment step. When commits exist, unpushed work is still pushed even if those data steps are present, then submit continues.
|
|
185
185
|
|
|
186
186
|
### \`agentia cicd work done\`
|
|
187
187
|
|
|
@@ -191,7 +191,7 @@ Promote and deploy the user story to the next pipeline stage:
|
|
|
191
191
|
agentia cicd work done --json
|
|
192
192
|
\`\`\`
|
|
193
193
|
|
|
194
|
-
Same branch/clean-tree rules as \`work submit\`.
|
|
194
|
+
Same branch/clean-tree rules as \`work submit\`. Uses the same commit-then-unpushed order (including the Data Set / Data Template empty-history exception), then promotes without the validate-only path used by submit.
|
|
195
195
|
|
|
196
196
|
Only run this when the story is approved and ready to move to the next environment.
|
|
197
197
|
|
|
@@ -205,7 +205,7 @@ Only run this when the story is approved and ready to move to the next environme
|
|
|
205
205
|
4. **Choose the right commit path.** Use normal \`git add\` / \`git commit\` followed by \`agentia_work_push\` for local Git work. Use \`agentia_work_commit\` / \`agentia cicd work commit --cloud\` for Copado cloud metadata commits.
|
|
206
206
|
5. **Keep the tree clean** before \`set\`, \`push\`, \`submit\`, and \`done\`. Those steps fail if tracked changes are pending.
|
|
207
207
|
6. **Prefer structured results.** MCP returns JSON; for CLI, use \`--json\` and do not scrape human table output.
|
|
208
|
-
7. **Order matters.** \`set\` → local commit or cloud commit → \`push\` when local Git commits exist → \`submit\` → \`done\`. \`submit\` and \`done\`
|
|
208
|
+
7. **Order matters.** \`set\` → local commit or cloud commit → \`push\` when local Git commits exist → \`submit\` → \`done\`. \`submit\` and \`done\` count commits since \`lastBaseBranch\` before checking origin; they auto-push only when that range is non-empty and origin is behind. A Data Set or Data Template deployment step can waive the empty-history error, but not push validation when commits exist. \`set\` is still required first.
|
|
209
209
|
8. **Confirm intent for \`done\`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.
|
|
210
210
|
`;
|
|
211
211
|
export function qualityGatesExplanation(bin = 'agentia') {
|
|
@@ -4,6 +4,8 @@ export type WorkLocalCommitInput = {
|
|
|
4
4
|
all: boolean;
|
|
5
5
|
/** Raw comma-separated list; empty string clears the stored selection. */
|
|
6
6
|
apexTestClasses?: string;
|
|
7
|
+
/** Raw comma-separated list; empty string clears the stored selection. */
|
|
8
|
+
fullMetadata?: string;
|
|
7
9
|
message?: string;
|
|
8
10
|
/** Raw comma-separated list; empty string clears the stored selection. */
|
|
9
11
|
permissions?: string;
|
|
@@ -86,6 +86,7 @@ export async function performWorkLocalCommit(input) {
|
|
|
86
86
|
const [branch, commitId] = await Promise.all([getCurrentBranch(), getHeadCommitId()]);
|
|
87
87
|
const selections = await writeLastCommitSelections({
|
|
88
88
|
...(input.apexTestClasses === undefined ? {} : { apexTestClasses: normalizeSelection(input.apexTestClasses) }),
|
|
89
|
+
...(input.fullMetadata === undefined ? {} : { fullMetadata: normalizeSelection(input.fullMetadata) }),
|
|
89
90
|
...(input.permissions === undefined ? {} : { permissions: normalizeSelection(input.permissions) }),
|
|
90
91
|
});
|
|
91
92
|
return {
|
|
@@ -110,6 +111,9 @@ export function formatWorkLocalCommitResult(result) {
|
|
|
110
111
|
if (result.lastPermissionSelected !== undefined) {
|
|
111
112
|
lines.push(`Permissions: ${result.lastPermissionSelected}`);
|
|
112
113
|
}
|
|
114
|
+
if (result.lastFullMetadataSelected !== undefined) {
|
|
115
|
+
lines.push(`Full metadata: ${result.lastFullMetadataSelected}`);
|
|
116
|
+
}
|
|
113
117
|
if (result.lastApexTestClassesSelected !== undefined) {
|
|
114
118
|
lines.push(`Apex test classes: ${result.lastApexTestClassesSelected}`);
|
|
115
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-local-commit.js","sourceRoot":"","sources":["../../src/lib/work-local-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"work-local-commit.js","sourceRoot":"","sources":["../../src/lib/work-local-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;AAwB1B,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACvC,IAAI,CAAQ;IACZ,WAAW,CAAW;IAEtC,YAAmB,OAAe,EAAE,UAAmD,EAAE;QACvF,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAA;QAC5C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,CAAA;QAC7B,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;QACxC,CAAC;IACH,CAAC;CACF;AAED,qFAAqF;AACrF,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,KAAK,EAA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