agentic-workflow-manager 9.19.0 → 9.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/commands/change/index.js +492 -0
- package/dist/src/commands/changes/index.js +84 -0
- package/dist/src/commands/sensors/index.js +9 -0
- package/dist/src/commands/sensors/run.js +1 -0
- package/dist/src/core/changes/command.js +38 -0
- package/dist/src/core/changes/derive.js +120 -0
- package/dist/src/core/changes/fs-safe.js +47 -0
- package/dist/src/core/changes/git-env.js +68 -0
- package/dist/src/core/changes/git.js +216 -0
- package/dist/src/core/changes/list-parse.js +67 -0
- package/dist/src/core/changes/list.js +408 -0
- package/dist/src/core/changes/parse.js +72 -0
- package/dist/src/core/changes/range.js +53 -0
- package/dist/src/core/changes/receipt.js +274 -0
- package/dist/src/core/changes/record-io.js +149 -0
- package/dist/src/core/changes/render-list.js +109 -0
- package/dist/src/core/changes/render.js +178 -0
- package/dist/src/core/changes/text-safety.js +116 -0
- package/dist/src/core/changes/trailers.js +76 -0
- package/dist/src/core/changes/types.js +26 -0
- package/dist/src/core/changes/validate-shape.js +219 -0
- package/dist/src/core/changes/worktree.js +53 -0
- package/dist/src/core/process/model.js +153 -10
- package/dist/src/index.js +4 -0
- package/dist/src/release/orchestrator.js +3 -1
- package/dist/tests/commands/change/new.test.js +1126 -0
- package/dist/tests/commands/change/validate.test.js +1145 -0
- package/dist/tests/commands/changes/list.test.js +423 -0
- package/dist/tests/commands/process.test.js +4 -0
- package/dist/tests/commands/sensors/index.test.js +1 -1
- package/dist/tests/core/changes/derive.test.js +455 -0
- package/dist/tests/core/changes/fs-safe.test.js +82 -0
- package/dist/tests/core/changes/git-env.test.js +143 -0
- package/dist/tests/core/changes/git.test.js +442 -0
- package/dist/tests/core/changes/helpers.js +269 -0
- package/dist/tests/core/changes/list-fixtures.js +122 -0
- package/dist/tests/core/changes/list-long-history.test.js +52 -0
- package/dist/tests/core/changes/list-paging.test.js +511 -0
- package/dist/tests/core/changes/list-parse.test.js +120 -0
- package/dist/tests/core/changes/list-tree.test.js +44 -0
- package/dist/tests/core/changes/list.test.js +821 -0
- package/dist/tests/core/changes/parse.test.js +142 -0
- package/dist/tests/core/changes/predicates.test.js +83 -0
- package/dist/tests/core/changes/range.test.js +92 -0
- package/dist/tests/core/changes/receipt.test.js +947 -0
- package/dist/tests/core/changes/record-io.test.js +307 -0
- package/dist/tests/core/changes/record.test.js +549 -0
- package/dist/tests/core/changes/render-list.test.js +212 -0
- package/dist/tests/core/changes/render.test.js +202 -0
- package/dist/tests/core/changes/text-safety.test.js +226 -0
- package/dist/tests/core/changes/trailers.test.js +181 -0
- package/dist/tests/core/changes/worktree.test.js +259 -0
- package/dist/tests/core/dashboard/write-html.test.js +2 -3
- package/dist/tests/core/evidence/store.test.js +2 -3
- package/dist/tests/core/ledger/store.test.js +3 -9
- package/dist/tests/core/process/discover.test.js +21 -0
- package/dist/tests/core/process/model.test.js +338 -0
- package/dist/tests/helpers/platform.js +27 -0
- package/dist/tests/release/orchestrator-trailer.test.js +72 -0
- package/dist/tests/release/orchestrator.test.js +1 -0
- package/dist/tests/structural/change-commands-are-registered.test.js +29 -0
- package/dist/tests/structural/change-record-git-and-platform-conventions.test.js +78 -0
- package/dist/tests/structural/process-model-description-contract.test.js +34 -0
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/secure_fs.node +0 -0
- package/prebuilds/darwin-x64/secure_fs.node +0 -0
- package/prebuilds/win32-arm64/secure_fs.node +0 -0
- package/prebuilds/win32-x64/secure_fs.node +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.REASON_GIT_FAILED = exports.REASON_NOT_REPO = exports.RUNTIME_STATE_EXCLUDES = void 0;
|
|
7
|
+
exports.gitState = gitState;
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const git_env_1 = require("./git-env");
|
|
10
|
+
const text_safety_1 = require("./text-safety");
|
|
11
|
+
/** Local runtime state that never counts as a working-tree change. Everything else under `.awm/` (e.g. `.awm/sensors.json`) does. */
|
|
12
|
+
exports.RUNTIME_STATE_EXCLUDES = ['.awm/sensors/runs', '.awm/journal', '.awm/ledger', '.awm/evidence', '.awm/track.json'];
|
|
13
|
+
exports.REASON_NOT_REPO = 'not inside a git repository with a commit';
|
|
14
|
+
exports.REASON_GIT_FAILED = 'git command failed or timed out';
|
|
15
|
+
const MAX_EXTRA_EXCLUDES = 64;
|
|
16
|
+
const MAX_GIT_OUTPUT = 64 * 1024 * 1024;
|
|
17
|
+
/** A git that ran and exited non-zero (no repo, no commit) is `not-repo`; one that could not run, timed out or overflowed is `failed`. */
|
|
18
|
+
function gitFailure(error) {
|
|
19
|
+
return typeof error.status === 'number' ? { kind: 'not-repo' } : { kind: 'failed' };
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Repository root, HEAD and whether the tree differs from it, excluding RUNTIME_STATE_EXCLUDES.
|
|
23
|
+
* `untracked` selects the pre-run measure (untracked files count, forced past any `status.showUntrackedFiles` config)
|
|
24
|
+
* or the post-run recheck (tracked changes only). `extraExcludes` (default none) are repo-relative paths ignored in addition
|
|
25
|
+
* to RUNTIME_STATE_EXCLUDES; any that is not a safe relative path makes the result `failed`. The root is returned with native
|
|
26
|
+
* separators: git prints forward slashes on Windows. Never throws.
|
|
27
|
+
*/
|
|
28
|
+
function gitState(cwd, untracked, extraExcludes = []) {
|
|
29
|
+
if (typeof cwd !== 'string' || cwd.length === 0)
|
|
30
|
+
return { kind: 'failed' };
|
|
31
|
+
if (!Array.isArray(extraExcludes) || extraExcludes.length > MAX_EXTRA_EXCLUDES || !extraExcludes.every(text_safety_1.isSafeRelativePath))
|
|
32
|
+
return { kind: 'failed' };
|
|
33
|
+
let root;
|
|
34
|
+
let commit;
|
|
35
|
+
try {
|
|
36
|
+
root = path_1.default.resolve((0, git_env_1.execGit)(cwd, ['rev-parse', '--show-toplevel'], { stderr: 'ignore' }).trim());
|
|
37
|
+
commit = (0, git_env_1.execGit)(root, ['rev-parse', 'HEAD'], { stderr: 'ignore' }).trim();
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
return gitFailure(error);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
// Submodules are never hidden by config (`.gitmodules` ignore=all, diff.ignoreSubmodules). The pre-run measure counts everything
|
|
44
|
+
// (`none`); the post-run recheck is about tracked files only, so it also ignores untracked content inside a submodule
|
|
45
|
+
// (sensor build/coverage output) while still seeing a moved checkout or modified tracked content (`untracked`).
|
|
46
|
+
const args = ['status', '--porcelain', untracked ? '--untracked-files=normal' : '--untracked-files=no', untracked ? '--ignore-submodules=none' : '--ignore-submodules=untracked', '--', '.', ...exports.RUNTIME_STATE_EXCLUDES.map((p) => `:(exclude)${p}`), ...extraExcludes.map((p) => `:(exclude,literal)${p}`)];
|
|
47
|
+
const status = (0, git_env_1.execGit)(root, args, { stderr: 'ignore', maxBuffer: MAX_GIT_OUTPUT });
|
|
48
|
+
return { kind: 'ok', root, commit, dirty: status.trim().length > 0 };
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return { kind: 'failed' };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.PROCESS_NAME = void 0;
|
|
4
7
|
exports.parseProcessFrontmatter = parseProcessFrontmatter;
|
|
@@ -7,40 +10,155 @@ exports.parseProcessFrontmatter = parseProcessFrontmatter;
|
|
|
7
10
|
// Disciplina heredada literal de core/orchestrators.ts: NUNCA lanza. Un modelo
|
|
8
11
|
// malformado se rechaza con diagnóstico y no invalida al registry que lo
|
|
9
12
|
// contiene ni a los demás (R7.1).
|
|
13
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
10
14
|
const frontmatter_1 = require("../frontmatter");
|
|
11
15
|
const types_1 = require("./types");
|
|
12
16
|
/** El discriminador es literal: ningún documento se reconoce como modelo por su
|
|
13
17
|
* cuerpo, sus headings ni su nombre de archivo (R1.2). */
|
|
14
18
|
const DISCRIMINATOR = 'process-model';
|
|
15
|
-
|
|
19
|
+
/** `description` es el único campo opcional: runtimes como Codex se niegan a
|
|
20
|
+
* cargar un `SKILL.md` sin él, y el modelo *es* el `SKILL.md` del skill. */
|
|
21
|
+
const ALLOWED_FIELDS = ['awm', 'schema', 'name', 'status', 'entry_point', 'terminates_to', 'created', 'updated', 'description'];
|
|
22
|
+
/** Límite de Agent Skills que imponen los runtimes que consumen el skill.
|
|
23
|
+
* Se cuenta en code points, no en unidades UTF-16. */
|
|
24
|
+
const DESCRIPTION_MAX = 1024;
|
|
25
|
+
/** Tope del bloque de frontmatter antes de entregarlo al parser YAML: acota el
|
|
26
|
+
* costo de parsear contenido no confiable de un registry. Por encima no se
|
|
27
|
+
* parsea (para `description`, se rechaza con el mensaje del límite de 1024). */
|
|
28
|
+
const FRONTMATTER_MAX = 65536;
|
|
29
|
+
/** Lo que un runtime mostraría mal o usaría para engañar: controles C0 (salvo
|
|
30
|
+
* tab), DEL, C1, separadores U+2028/U+2029, marcas LRM/RLM/ALM, overrides e
|
|
31
|
+
* isolates bidi, y surrogates sueltos (regex en vez de `isWellFormed`: el lib
|
|
32
|
+
* de TS es ES2022). */
|
|
33
|
+
const FORBIDDEN_CHAR = /[\u0000-\u0008\u000A-\u001F\u007F-\u009F\u061C\u200E\u200F\u2028\u2029\u202A-\u202E\u2066-\u2069]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/;
|
|
34
|
+
/** Discriminador indentado: un modelo cuyas claves quedaron con sangría se
|
|
35
|
+
* perdería en silencio como "no es un modelo". */
|
|
36
|
+
const INDENTED_DISCRIMINATOR = /^awm[ \t]*:[ \t]*process-model$/;
|
|
16
37
|
const STATUSES = ['draft', 'active'];
|
|
17
38
|
/** El slug es lo único del modelo que puede viajar dentro de un id del Dashboard
|
|
18
39
|
* (ver sanitize.ts). Por eso se valida acá y no en la frontera de render: si
|
|
19
40
|
* admitiera rutas, markup o `=`, el id dejaría de ser seguro por construcción. */
|
|
20
41
|
exports.PROCESS_NAME = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
|
|
21
42
|
const DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
43
|
+
/** Caracteres de ancho cero: un valor hecho solo de ellos se ve vacío. */
|
|
44
|
+
const ZERO_WIDTH = /[\u200B-\u200D\u2060\uFEFF]/g;
|
|
22
45
|
/** Lector de pares `clave: valor` de un frontmatter plano. El contrato no admite
|
|
23
|
-
* anidamiento ni block scalars
|
|
24
|
-
*
|
|
46
|
+
* anidamiento ni block scalars: cualquier línea que no sea `clave: valor` es un
|
|
47
|
+
* rechazo, no una interpretación. (El VALOR de `description` sí pasa por el
|
|
48
|
+
* parser YAML, más abajo.) */
|
|
25
49
|
function readPairs(block) {
|
|
26
50
|
const pairs = new Map();
|
|
27
51
|
const problems = [];
|
|
28
|
-
|
|
29
|
-
|
|
52
|
+
const continuations = [];
|
|
53
|
+
// Mismo criterio que YAML, no que JS: se parte en TODO salto de línea YAML
|
|
54
|
+
// (un CR suelto también; si no, `a\rclave: x` sería un par para acá y dos
|
|
55
|
+
// claves para un runtime) y solo se recorta espacio y tab (`\s`/`trim()`
|
|
56
|
+
// comerían NBSP o U+3000, que para YAML son contenido).
|
|
57
|
+
const lines = block.split(/\r\n|\r|\n/);
|
|
58
|
+
for (const [index, raw] of lines.entries()) {
|
|
59
|
+
const line = raw.replace(/^[ \t]+|[ \t]+$/g, '');
|
|
60
|
+
// NEL/LS/PS son saltos de línea para YAML 1.1 (PyYAML) y no para js-yaml:
|
|
61
|
+
// un comentario podría esconder una clave que solo un runtime ve. Se
|
|
62
|
+
// reporta en CUALQUIER línea, comentarios incluidos, y solo por posición.
|
|
63
|
+
if (/[\u0085\u2028\u2029]/.test(raw))
|
|
64
|
+
problems.push(`frontmatter line ${index + 1} contains a YAML 1.1 line break (NEL, LS or PS)`);
|
|
30
65
|
if (line === '' || line.startsWith('#'))
|
|
31
66
|
continue;
|
|
32
|
-
|
|
67
|
+
// El contrato es un mapa PLANO: una línea que empieza con espacio o tab
|
|
68
|
+
// es continuación de un valor multilínea, diga lo que diga. Si se
|
|
69
|
+
// recortara antes de mirar, ` KEY: x` pasaría por campo (y su nombre
|
|
70
|
+
// terminaría en un diagnóstico).
|
|
71
|
+
const indented = /^[ \t]/.test(raw);
|
|
72
|
+
if (indented)
|
|
73
|
+
continuations.push({ line: index + 1, text: line });
|
|
74
|
+
// `[\s\S]` y no `.`: un U+2028/U+2029 dentro del valor no lo vuelve
|
|
75
|
+
// "no-par" (la línea ya viene partida); lo rechaza el chequeo de controles.
|
|
76
|
+
const m = indented ? null : /^([A-Za-z_][A-Za-z0-9_]*)[ \t]*:[ \t]*([\s\S]*)$/.exec(line);
|
|
77
|
+
// Se reporta la POSICIÓN (1-based dentro del bloque), nunca el
|
|
78
|
+
// contenido: una línea suelta suele ser la continuación de un valor
|
|
79
|
+
// multilínea, y los diagnósticos no transportan valores de campos.
|
|
33
80
|
if (!m) {
|
|
34
|
-
problems.push(`line is not a "key: value" pair
|
|
81
|
+
problems.push(`frontmatter line ${index + 1} is not a "key: value" pair (multi-line values are not supported)`);
|
|
35
82
|
continue;
|
|
36
83
|
}
|
|
37
84
|
if (pairs.has(m[1])) {
|
|
38
85
|
problems.push(`duplicate field ${JSON.stringify(m[1])}`);
|
|
39
86
|
continue;
|
|
40
87
|
}
|
|
41
|
-
pairs.set(m[1], m[2]
|
|
88
|
+
pairs.set(m[1], m[2]);
|
|
42
89
|
}
|
|
43
|
-
return { pairs, problems };
|
|
90
|
+
return { pairs, problems, continuations };
|
|
91
|
+
}
|
|
92
|
+
/** Carga el bloque de frontmatter COMPLETO con js-yaml (schema por defecto),
|
|
93
|
+
* exactamente como lo lee un runtime. Por encima del tope no se parsea. NUNCA
|
|
94
|
+
* lanza: un error de js-yaml es `invalid`. */
|
|
95
|
+
function loadBlock(block) {
|
|
96
|
+
if (block.length > FRONTMATTER_MAX)
|
|
97
|
+
return { kind: 'too-long' };
|
|
98
|
+
try {
|
|
99
|
+
return { kind: 'loaded', doc: js_yaml_1.default.load(block) };
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return { kind: 'invalid' };
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function isPlainObject(doc) {
|
|
106
|
+
return doc !== null && typeof doc === 'object' && Object.getPrototypeOf(doc) === Object.prototype;
|
|
107
|
+
}
|
|
108
|
+
/** Valida `description` leyéndola del bloque entero con el parser YAML real, no
|
|
109
|
+
* de la salida de readPairs (ya recortada y partida en `:`, que difiere de lo
|
|
110
|
+
* que lee un runtime). Ni el valor ni el texto del error de js-yaml (que puede
|
|
111
|
+
* citar contenido) llegan al problema. */
|
|
112
|
+
/** ¿El valor crudo de la línea, cargado SOLO, da el mismo string que el bloque
|
|
113
|
+
* entero? Si no, YAML lo plegó con líneas siguientes (p. ej. una comilla que
|
|
114
|
+
* sigue abierta a través de una línea `# …`). NUNCA lanza. */
|
|
115
|
+
function readsSameAlone(raw, value) {
|
|
116
|
+
let alone;
|
|
117
|
+
try {
|
|
118
|
+
alone = js_yaml_1.default.load(`description: ${raw}`);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return isPlainObject(alone) && alone.description === value;
|
|
124
|
+
}
|
|
125
|
+
function checkDescription(raw, block, keys) {
|
|
126
|
+
const singleLine = { problem: '"description" must be a single-line string (block scalars are not supported in a process model)' };
|
|
127
|
+
// El prefijo alcanza: todo header de block scalar (bien o mal formado)
|
|
128
|
+
// empieza con `>` o `|`.
|
|
129
|
+
if (/^[>|]/.test(raw))
|
|
130
|
+
return singleLine;
|
|
131
|
+
const tooLong = { problem: `"description" must be at most ${DESCRIPTION_MAX} characters` };
|
|
132
|
+
const loaded = loadBlock(block);
|
|
133
|
+
if (loaded.kind === 'too-long')
|
|
134
|
+
return tooLong;
|
|
135
|
+
if (loaded.kind === 'invalid' || !isPlainObject(loaded.doc))
|
|
136
|
+
return { problem: '"description" cannot be read: the frontmatter is not valid YAML' };
|
|
137
|
+
const doc = loaded.doc;
|
|
138
|
+
// Si YAML lee otras claves de nivel superior que readPairs (un CR suelto,
|
|
139
|
+
// una comilla que se traga la línea siguiente), lo validado acá no es lo
|
|
140
|
+
// que verá un runtime. Ni claves ni valores van al problema.
|
|
141
|
+
const yamlKeys = Object.keys(doc);
|
|
142
|
+
if (yamlKeys.length !== keys.size || yamlKeys.some((k) => !keys.has(k))) {
|
|
143
|
+
return { problem: '"description" cannot be read: the frontmatter does not read the same as YAML (check quotes and line breaks)' };
|
|
144
|
+
}
|
|
145
|
+
const value = doc.description;
|
|
146
|
+
const empty = { problem: '"description" must not be empty' };
|
|
147
|
+
if (value === null || value === undefined)
|
|
148
|
+
return empty;
|
|
149
|
+
if (typeof value !== 'string') {
|
|
150
|
+
return { problem: '"description" must be a string (quote values YAML reads as a boolean, a number, a date or a collection)' };
|
|
151
|
+
}
|
|
152
|
+
if (value.replace(ZERO_WIDTH, '').trim() === '')
|
|
153
|
+
return empty;
|
|
154
|
+
if ([...value].length > DESCRIPTION_MAX)
|
|
155
|
+
return tooLong;
|
|
156
|
+
if (FORBIDDEN_CHAR.test(value))
|
|
157
|
+
return { problem: '"description" must not contain control, line-break or bidirectional-override characters' };
|
|
158
|
+
if (!readsSameAlone(raw, value))
|
|
159
|
+
return singleLine;
|
|
160
|
+
// Se guarda tal cual lo devuelve YAML: sin trim, con NBSP/BOM intactos.
|
|
161
|
+
return { value };
|
|
44
162
|
}
|
|
45
163
|
function parseProcessFrontmatter(source, file) {
|
|
46
164
|
let block;
|
|
@@ -52,7 +170,22 @@ function parseProcessFrontmatter(source, file) {
|
|
|
52
170
|
}
|
|
53
171
|
if (block === null)
|
|
54
172
|
return { diagnostics: [] };
|
|
55
|
-
const { pairs, problems } = readPairs(block);
|
|
173
|
+
const { pairs, problems, continuations } = readPairs(block);
|
|
174
|
+
// Un modelo con las claves indentadas no tiene `awm` de nivel superior y se
|
|
175
|
+
// perdería en silencio como "otro documento". Se nombra solo la línea.
|
|
176
|
+
// Dispara con el prefiltro barato y, además, si el bloque NO carga como YAML
|
|
177
|
+
// (sangría parcial o con tab; por encima del tope cuenta como no cargable)
|
|
178
|
+
// o carga con `awm: process-model` en su nivel superior. Si carga sin `awm`
|
|
179
|
+
// arriba (mención bajo `metadata:` o dentro de un block scalar), silencio.
|
|
180
|
+
if (!pairs.has('awm')) {
|
|
181
|
+
const indentedAwm = continuations.find((c) => INDENTED_DISCRIMINATOR.test(c.text));
|
|
182
|
+
const loaded = indentedAwm ? loadBlock(block) : undefined;
|
|
183
|
+
const fires = loaded !== undefined
|
|
184
|
+
&& (loaded.kind !== 'loaded' || (isPlainObject(loaded.doc) && loaded.doc.awm === DISCRIMINATOR));
|
|
185
|
+
if (indentedAwm && fires) {
|
|
186
|
+
return { diagnostics: [`${file}: invalid process model — frontmatter keys must not be indented (frontmatter line ${indentedAwm.line})`] };
|
|
187
|
+
}
|
|
188
|
+
}
|
|
56
189
|
// Sin discriminador NO es un modelo de proceso: no es un error, es otro
|
|
57
190
|
// documento. Devolver diagnóstico acá inundaría de ruido a todo registry
|
|
58
191
|
// (cada SKILL.md normal caería en esta rama).
|
|
@@ -96,6 +229,15 @@ function parseProcessFrontmatter(source, file) {
|
|
|
96
229
|
if (value !== '' && !DATE.test(value))
|
|
97
230
|
problems.push(`"${field}" must be YYYY-MM-DD`);
|
|
98
231
|
}
|
|
232
|
+
let description;
|
|
233
|
+
const rawDescription = pairs.get('description');
|
|
234
|
+
if (rawDescription !== undefined) {
|
|
235
|
+
const checked = checkDescription(rawDescription, block, new Set(pairs.keys()));
|
|
236
|
+
if ('problem' in checked)
|
|
237
|
+
problems.push(checked.problem);
|
|
238
|
+
else
|
|
239
|
+
description = checked.value;
|
|
240
|
+
}
|
|
99
241
|
if (problems.length > 0) {
|
|
100
242
|
return { diagnostics: [`${file}: invalid process model — ${problems.join('; ')}`] };
|
|
101
243
|
}
|
|
@@ -103,6 +245,7 @@ function parseProcessFrontmatter(source, file) {
|
|
|
103
245
|
model: {
|
|
104
246
|
schema, name, status: status, entryPoint: entryPointRaw === 'true',
|
|
105
247
|
terminatesTo, created: pairs.get('created'), updated: pairs.get('updated'),
|
|
248
|
+
...(description !== undefined ? { description } : {}),
|
|
106
249
|
},
|
|
107
250
|
diagnostics: [],
|
|
108
251
|
};
|
package/dist/src/index.js
CHANGED
|
@@ -45,6 +45,8 @@ const job_1 = require("./commands/job");
|
|
|
45
45
|
const watch_1 = require("./commands/watch");
|
|
46
46
|
const track_1 = require("./commands/track");
|
|
47
47
|
const evidence_1 = require("./commands/evidence");
|
|
48
|
+
const change_1 = require("./commands/change");
|
|
49
|
+
const changes_1 = require("./commands/changes");
|
|
48
50
|
const process_1 = require("./commands/process");
|
|
49
51
|
const context_1 = require("./commands/context");
|
|
50
52
|
const model_policy_1 = require("./commands/model-policy");
|
|
@@ -752,6 +754,8 @@ miroCmd.command('sync <storyMapPath>')
|
|
|
752
754
|
(0, watch_1.registerWatchCommand)(exports.program);
|
|
753
755
|
(0, track_1.registerTrackCommand)(exports.program);
|
|
754
756
|
(0, evidence_1.registerEvidenceCommand)(exports.program);
|
|
757
|
+
(0, change_1.registerChangeCommand)(exports.program);
|
|
758
|
+
(0, changes_1.registerChangesCommand)(exports.program);
|
|
755
759
|
(0, process_1.registerProcessCommand)(exports.program);
|
|
756
760
|
(0, context_1.registerContextCommand)(exports.program);
|
|
757
761
|
// Commander only waits for async action handlers through parseAsync(). The CLI has
|
|
@@ -69,7 +69,9 @@ function release(opts, io) {
|
|
|
69
69
|
const section = (0, core_1.renderChangelog)(version, io.today(), commits);
|
|
70
70
|
io.writeChangelog(section + '\n' + io.readChangelog());
|
|
71
71
|
io.run('git', ['add', 'cli/package.json', 'cli/package-lock.json', 'CHANGELOG.md']);
|
|
72
|
-
|
|
72
|
+
// R6.1 (#217): the bump commit carries the Change Record opt-out trailer so
|
|
73
|
+
// `awm changes list` reports it as `exempt`, never as `missing`.
|
|
74
|
+
io.run('git', ['commit', '-m', `chore(release): v${version} [skip ci]`, '-m', 'Change-Record: none']);
|
|
73
75
|
io.run('git', ['tag', '-a', `v${version}`, '-m', `v${version}`]);
|
|
74
76
|
// OIDC mode: GitHub inyecta ACTIONS_ID_TOKEN_REQUEST_URL con id-token:write
|
|
75
77
|
// o NODE_AUTH_TOKEN sin NPM_TOKEN (setup-node legacy con OIDC)
|