@tacuchi/agent-workflow-cli 21.0.0 → 21.1.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 +1 -0
- package/dist/application/capability/compose.js +161 -0
- package/dist/application/capability/compose.js.map +1 -0
- package/dist/application/capability/descriptor-loader.js +109 -0
- package/dist/application/capability/descriptor-loader.js.map +1 -0
- package/dist/application/capability/design-handler.js +299 -0
- package/dist/application/capability/design-handler.js.map +1 -0
- package/dist/application/capability/dispatcher.js +312 -0
- package/dist/application/capability/dispatcher.js.map +1 -0
- package/dist/application/capability/durable-effect.js +220 -0
- package/dist/application/capability/durable-effect.js.map +1 -0
- package/dist/application/capability/installed-inventory.js +168 -0
- package/dist/application/capability/installed-inventory.js.map +1 -0
- package/dist/application/capability/readiness.js +204 -0
- package/dist/application/capability/readiness.js.map +1 -0
- package/dist/application/capability/resolution.js +264 -0
- package/dist/application/capability/resolution.js.map +1 -0
- package/dist/application/capability/wrapper.js +187 -0
- package/dist/application/capability/wrapper.js.map +1 -0
- package/dist/application/context/manifest.js +11 -5
- package/dist/application/context/manifest.js.map +1 -1
- package/dist/application/context/measure.js +5 -2
- package/dist/application/context/measure.js.map +1 -1
- package/dist/application/context/plan-service.js +6 -6
- package/dist/application/context/plan-service.js.map +1 -1
- package/dist/application/design/design-bundle-service.js +148 -0
- package/dist/application/design/design-bundle-service.js.map +1 -0
- package/dist/application/design/design-proposal-service.js +69 -0
- package/dist/application/design/design-proposal-service.js.map +1 -0
- package/dist/application/design/design-publish-service.js +275 -7
- package/dist/application/design/design-publish-service.js.map +1 -1
- package/dist/application/design/design-record-service.js +100 -0
- package/dist/application/design/design-record-service.js.map +1 -0
- package/dist/application/flow/advance.js +533 -0
- package/dist/application/flow/advance.js.map +1 -0
- package/dist/application/flow/flow-service.js +65 -0
- package/dist/application/flow/flow-service.js.map +1 -0
- package/dist/application/flow/run-projection.js +80 -0
- package/dist/application/flow/run-projection.js.map +1 -0
- package/dist/application/flow/run-state-service.js +107 -0
- package/dist/application/flow/run-state-service.js.map +1 -0
- package/dist/application/flow/submit.js +423 -0
- package/dist/application/flow/submit.js.map +1 -0
- package/dist/application/resume-service.js +23 -10
- package/dist/application/resume-service.js.map +1 -1
- package/dist/application/self/install-skill.js +11 -0
- package/dist/application/self/install-skill.js.map +1 -1
- package/dist/application/self/uninstall.js +21 -0
- package/dist/application/self/uninstall.js.map +1 -1
- package/dist/application/skills-resolver-service.js +8 -2
- package/dist/application/skills-resolver-service.js.map +1 -1
- package/dist/application/status-service.js +4 -1
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/workspace-init-service.js +13 -1
- package/dist/application/workspace-init-service.js.map +1 -1
- package/dist/cli/commands/capability.js +182 -0
- package/dist/cli/commands/capability.js.map +1 -0
- package/dist/cli/commands/flow.js +71 -0
- package/dist/cli/commands/flow.js.map +1 -0
- package/dist/cli/commands/index.js +4 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/skills.js +55 -2
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/status.js +5 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/help-groups.js +6 -0
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/parser.js +6 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/tui/data/workflow-content.js +5 -0
- package/dist/cli/tui/data/workflow-content.js.map +1 -1
- package/dist/cli/tui/tabs/workflow-tab.js +5 -1
- package/dist/cli/tui/tabs/workflow-tab.js.map +1 -1
- package/dist/domain/capability/descriptor.js +553 -0
- package/dist/domain/capability/descriptor.js.map +1 -0
- package/dist/domain/capability/effects.js +90 -0
- package/dist/domain/capability/effects.js.map +1 -0
- package/dist/domain/capability/protocol.js +494 -0
- package/dist/domain/capability/protocol.js.map +1 -0
- package/dist/domain/contract-reader.js +84 -0
- package/dist/domain/contract-reader.js.map +1 -0
- package/dist/domain/design/adapter.js +161 -0
- package/dist/domain/design/adapter.js.map +1 -0
- package/dist/domain/design/artifact.js +148 -4
- package/dist/domain/design/artifact.js.map +1 -1
- package/dist/domain/design/capability.js +263 -4
- package/dist/domain/design/capability.js.map +1 -1
- package/dist/domain/design/direct.js +108 -0
- package/dist/domain/design/direct.js.map +1 -0
- package/dist/domain/design/external-send.js +65 -0
- package/dist/domain/design/external-send.js.map +1 -0
- package/dist/domain/design/maturity.js +71 -0
- package/dist/domain/design/maturity.js.map +1 -1
- package/dist/domain/design/offline.js +92 -0
- package/dist/domain/design/offline.js.map +1 -0
- package/dist/domain/design/profiles.js +212 -0
- package/dist/domain/design/profiles.js.map +1 -0
- package/dist/domain/design/proposal.js +234 -0
- package/dist/domain/design/proposal.js.map +1 -0
- package/dist/domain/design/render-bundle.js +0 -0
- package/dist/domain/design/render-bundle.js.map +1 -0
- package/dist/domain/design/rendition.js +472 -0
- package/dist/domain/design/rendition.js.map +1 -0
- package/dist/domain/design/sources.js +180 -0
- package/dist/domain/design/sources.js.map +1 -0
- package/dist/domain/design/validation.js +12 -68
- package/dist/domain/design/validation.js.map +1 -1
- package/dist/domain/design/visual-evidence.js +155 -0
- package/dist/domain/design/visual-evidence.js.map +1 -0
- package/dist/domain/flow/answer.js +459 -0
- package/dist/domain/flow/answer.js.map +1 -0
- package/dist/domain/flow/authority.js +2276 -0
- package/dist/domain/flow/authority.js.map +1 -0
- package/dist/domain/flow/authorization.js +62 -0
- package/dist/domain/flow/authorization.js.map +1 -0
- package/dist/domain/flow/directive.js +421 -0
- package/dist/domain/flow/directive.js.map +1 -0
- package/dist/domain/flow/rules.js +140 -0
- package/dist/domain/flow/rules.js.map +1 -0
- package/dist/domain/flow/run-state.js +317 -0
- package/dist/domain/flow/run-state.js.map +1 -0
- package/dist/domain/harnesses.js +21 -0
- package/dist/domain/harnesses.js.map +1 -1
- package/dist/domain/skills.js +13 -14
- package/dist/domain/skills.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +5 -5
- package/skills/w/context/MANIFEST.json +38 -1
- package/skills/w/harness/HARNESS.md +20 -0
- package/skills/w/loops/CHASSIS.md +11 -20
- package/skills/w/loops/CODE-POLICIES.md +9 -15
- package/skills/w/loops/plan-exec-loop/LOOP.md +11 -13
- package/skills/w/loops/plan-new-loop/LOOP.md +6 -4
- package/skills/w/loops/plan-refine-loop/LOOP.md +5 -3
- package/skills/w/loops/quick-loop/LOOP.md +18 -26
- package/skills/w/loops/spec-refine-loop/LOOP.md +14 -18
- package/skills/w/modules/COMPACTION.md +2 -6
- package/skills/w/modules/DB-SCRIPTS-ONLY.md +2 -0
- package/skills/w/modules/DESIGN-REFERENCES.md +15 -11
- package/skills/w/modules/IDEATION-GATE.md +3 -3
- package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +17 -36
- package/skills/w/modules/PLAN-INPUT.md +5 -3
- package/skills/w/modules/PLAN-REFINE-SPLIT.md +3 -1
- package/skills/w/modules/PLAN-SPLIT-GATE.md +7 -5
- package/skills/w/modules/PROMPT-CONTINUITY.md +3 -1
- package/skills/w/modules/SPEC-CHANGE-SHAPE.md +4 -4
- package/skills/w/roles/README.md +2 -0
- package/skills/w/roles/design/CONTRACT.md +80 -0
- package/skills/w/roles/design/ROLE.md +7 -0
- package/skills/w/schemas/capability-descriptor.schema.json +260 -0
- package/skills/w/schemas/design/design-render-bundle.v1.schema.json +191 -0
- package/skills/w/schemas/design/design-rendition.v1.schema.json +232 -0
- package/skills/w/schemas/design/ui-screen.v1.schema.json +29 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `design` accepts as a source, and what happens to each one.
|
|
3
|
+
*
|
|
4
|
+
* The envelope already carries WHICH inputs an invocation declared and where
|
|
5
|
+
* they came from — that is the capability contract's job, and it is not redone
|
|
6
|
+
* here. What this module owns is the design domain's half: which KINDS of
|
|
7
|
+
* source v1 can actually read, what a reading produced, and what it costs when
|
|
8
|
+
* one of them could not be read.
|
|
9
|
+
*
|
|
10
|
+
* The disposition vocabulary is five values because the four ways a source can
|
|
11
|
+
* fail to contribute are not the same problem for whoever has to fix it:
|
|
12
|
+
* `skipped` is a decision, `unsupported` is a format nobody promised,
|
|
13
|
+
* `unavailable` is something that should have been there and was not, and
|
|
14
|
+
* `redacted` is a deliberate withholding. Collapsing them into "not used" would
|
|
15
|
+
* make the receipt say four different things with one word.
|
|
16
|
+
*
|
|
17
|
+
* The consequence is fail-closed on purpose: a source that did not contribute
|
|
18
|
+
* blocks `handoff` unless someone states, in writing, why the design does not
|
|
19
|
+
* need it. A design that silently dropped a requirements document and still
|
|
20
|
+
* declared itself ready for implementation is precisely the failure the
|
|
21
|
+
* provenance exists to prevent.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* The v1 source catalog. Binary documents are read by the HOST's multimodal
|
|
25
|
+
* capability — the CLI ships no PDF, DOCX or PPTX parser — so what this list
|
|
26
|
+
* declares is what the domain KNOWS HOW TO ACCOUNT FOR, not what the CLI can
|
|
27
|
+
* decode by itself.
|
|
28
|
+
*/
|
|
29
|
+
export const DESIGN_SOURCE_KINDS = [
|
|
30
|
+
"markdown",
|
|
31
|
+
"image",
|
|
32
|
+
"pdf",
|
|
33
|
+
"docx",
|
|
34
|
+
"pptx",
|
|
35
|
+
/** Conversation or attachments the host exposed, passed in explicitly. */
|
|
36
|
+
"host_context",
|
|
37
|
+
/** An existing UI Design Package, by identity. */
|
|
38
|
+
"package",
|
|
39
|
+
/** A provider reference (`file_key`, `project_id`, an artifact id…). */
|
|
40
|
+
"provider_locator",
|
|
41
|
+
];
|
|
42
|
+
export const SOURCE_DISPOSITIONS = [
|
|
43
|
+
/** Read, and its content reached the design. */
|
|
44
|
+
"used",
|
|
45
|
+
/** Deliberately not read. A decision, and it carries its reason. */
|
|
46
|
+
"skipped",
|
|
47
|
+
/** A format v1 does not accept — including every retired UI format. */
|
|
48
|
+
"unsupported",
|
|
49
|
+
/** It should have been readable and was not: missing, corrupt, unreachable. */
|
|
50
|
+
"unavailable",
|
|
51
|
+
/** Withheld on purpose: sensitive, and the invocation did not authorize it. */
|
|
52
|
+
"redacted",
|
|
53
|
+
];
|
|
54
|
+
/** Extension → kind, for the locators that carry one. */
|
|
55
|
+
const BY_EXTENSION = new Map([
|
|
56
|
+
["md", "markdown"],
|
|
57
|
+
["markdown", "markdown"],
|
|
58
|
+
["txt", "markdown"],
|
|
59
|
+
["png", "image"],
|
|
60
|
+
["jpg", "image"],
|
|
61
|
+
["jpeg", "image"],
|
|
62
|
+
["webp", "image"],
|
|
63
|
+
["gif", "image"],
|
|
64
|
+
["svg", "image"],
|
|
65
|
+
["pdf", "pdf"],
|
|
66
|
+
["docx", "docx"],
|
|
67
|
+
["pptx", "pptx"],
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* Classify a locator by what it looks like. Returns null when nothing in the
|
|
71
|
+
* catalog matches — which the caller reports as `unsupported`, never as a guess.
|
|
72
|
+
*/
|
|
73
|
+
export function classifySource(locator) {
|
|
74
|
+
const trimmed = locator.trim();
|
|
75
|
+
if (trimmed.length === 0)
|
|
76
|
+
return null;
|
|
77
|
+
if (/^DES-(?:[0-9]{3}|[1-9][0-9]{3,})(?:@r[1-9][0-9]{0,5})?$/.test(trimmed))
|
|
78
|
+
return "package";
|
|
79
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//.test(trimmed))
|
|
80
|
+
return "provider_locator";
|
|
81
|
+
const extension = trimmed.split(".").pop()?.toLowerCase() ?? "";
|
|
82
|
+
return BY_EXTENSION.get(extension) ?? null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Judge a set of sources: shape first, then consequence.
|
|
86
|
+
*
|
|
87
|
+
* A malformed record is a failure of the caller, not of the design — a source
|
|
88
|
+
* that says it was skipped and does not say why cannot be reported at all, so
|
|
89
|
+
* it is refused here rather than reaching a receipt that would read as if
|
|
90
|
+
* nothing had been dropped.
|
|
91
|
+
*/
|
|
92
|
+
export function reportSources(sources, artifact) {
|
|
93
|
+
const failures = [];
|
|
94
|
+
for (const source of sources) {
|
|
95
|
+
if (source.disposition !== "used" && (source.reason ?? "").trim().length === 0) {
|
|
96
|
+
failures.push({
|
|
97
|
+
code: "DESIGN_SOURCE_WITHOUT_REASON",
|
|
98
|
+
artifact,
|
|
99
|
+
message: `la fuente '${source.name}' quedó '${source.disposition}' y no dice por qué`,
|
|
100
|
+
action: "declará la causa: una fuente descartada en silencio es una decisión invisible",
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (!source.essential && (source.reason ?? "").trim().length === 0) {
|
|
104
|
+
failures.push({
|
|
105
|
+
code: "DESIGN_SOURCE_OPTIONAL_WITHOUT_REASON",
|
|
106
|
+
artifact,
|
|
107
|
+
message: `la fuente '${source.name}' se declara no esencial sin justificarlo`,
|
|
108
|
+
action: "explicá por qué el diseño se sostiene sin ella, o dejala como esencial",
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const omitted = sources.filter((s) => s.disposition !== "used");
|
|
113
|
+
return {
|
|
114
|
+
sources: [...sources],
|
|
115
|
+
omitted,
|
|
116
|
+
blocksHandoff: omitted.some((s) => s.essential),
|
|
117
|
+
failures,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The gap an omission leaves behind.
|
|
122
|
+
*
|
|
123
|
+
* Actionable on purpose: it names the source, its disposition and its reason,
|
|
124
|
+
* so the person reading the receipt knows what to go get rather than that
|
|
125
|
+
* "something" was missing.
|
|
126
|
+
*/
|
|
127
|
+
export function handoffGapsFrom(report) {
|
|
128
|
+
return report.omitted
|
|
129
|
+
.filter((s) => s.essential)
|
|
130
|
+
.map((s) =>
|
|
131
|
+
// The LOCATOR, not just the input name: several sources arrive under one
|
|
132
|
+
// declared input, so "the essential source 'sources' is missing" tells
|
|
133
|
+
// nobody which file to go and get.
|
|
134
|
+
`la fuente esencial '${s.locator}' (${s.kind}, input '${s.name}') quedó '${s.disposition}': ${s.reason ?? "sin causa"} — conseguila o declarala no esencial con su razón`);
|
|
135
|
+
}
|
|
136
|
+
export function planOriginalCopy(sources, request, artifact) {
|
|
137
|
+
const byName = new Map(sources.map((s) => [s.name, s]));
|
|
138
|
+
const copy = [];
|
|
139
|
+
for (const name of request.approved) {
|
|
140
|
+
const source = byName.get(name);
|
|
141
|
+
if (source === undefined) {
|
|
142
|
+
return {
|
|
143
|
+
ok: false,
|
|
144
|
+
failure: {
|
|
145
|
+
code: "DESIGN_SOURCE_COPY_UNKNOWN",
|
|
146
|
+
artifact,
|
|
147
|
+
message: `se autorizó copiar '${name}' y no hay ninguna fuente con ese nombre`,
|
|
148
|
+
action: `nombrá una de: ${[...byName.keys()].join(", ") || "(ninguna)"}`,
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// Copying a source the run never managed to read would put a file in the
|
|
153
|
+
// package that nothing in the design derives from.
|
|
154
|
+
if (source.disposition !== "used") {
|
|
155
|
+
return {
|
|
156
|
+
ok: false,
|
|
157
|
+
failure: {
|
|
158
|
+
code: "DESIGN_SOURCE_COPY_UNUSED",
|
|
159
|
+
artifact,
|
|
160
|
+
message: `'${name}' quedó '${source.disposition}' y no se copia al package`,
|
|
161
|
+
action: "copiá solo fuentes que el diseño usó de verdad",
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (source.sensitivity === "sensitive") {
|
|
166
|
+
return {
|
|
167
|
+
ok: false,
|
|
168
|
+
failure: {
|
|
169
|
+
code: "DESIGN_SOURCE_COPY_SENSITIVE",
|
|
170
|
+
artifact,
|
|
171
|
+
message: `'${name}' está clasificada sensible: no entra al package`,
|
|
172
|
+
action: "desclasificala explícitamente o dejá solo su proveniencia",
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
copy.push(source);
|
|
177
|
+
}
|
|
178
|
+
return { ok: true, copy };
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../../src/domain/design/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,UAAU;IACV,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,0EAA0E;IAC1E,cAAc;IACd,kDAAkD;IAClD,SAAS;IACT,wEAAwE;IACxE,kBAAkB;CACV,CAAC;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,gDAAgD;IAChD,MAAM;IACN,oEAAoE;IACpE,SAAS;IACT,uEAAuE;IACvE,aAAa;IACb,+EAA+E;IAC/E,aAAa;IACb,+EAA+E;IAC/E,UAAU;CACF,CAAC;AA4BX,yDAAyD;AACzD,MAAM,YAAY,GAA0C,IAAI,GAAG,CAAC;IAClE,CAAC,IAAI,EAAE,UAAU,CAAC;IAClB,CAAC,UAAU,EAAE,UAAU,CAAC;IACxB,CAAC,KAAK,EAAE,UAAU,CAAC;IACnB,CAAC,KAAK,EAAE,OAAO,CAAC;IAChB,CAAC,KAAK,EAAE,OAAO,CAAC;IAChB,CAAC,MAAM,EAAE,OAAO,CAAC;IACjB,CAAC,MAAM,EAAE,OAAO,CAAC;IACjB,CAAC,KAAK,EAAE,OAAO,CAAC;IAChB,CAAC,KAAK,EAAE,OAAO,CAAC;IAChB,CAAC,KAAK,EAAE,KAAK,CAAC;IACd,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,yDAAyD,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,S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AAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAW,EAAE;iBACzE;aACF,CAAC;QACJ,CAAC;QACD,yEAAyE;QACzE,mDAAmD;QACnD,IAAI,MAAM,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;YAClC,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,OAAO,EAAE;oBACP,IAAI,EAAE,2BAA2B;oBACjC,QAAQ;oBACR,OAAO,EAAE,IAAI,IAAI,YAAY,MAAM,CAAC,WAAW,4BAA4B;oBAC3E,MAAM,EAAE,gDAAgD;iBACzD;aACF,CAAC;QACJ,CAAC;QACD,IAAI,MAAM,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;YACvC,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,OAAO,EAAE;oBACP,IAAI,EAAE,8BAA8B;oBACpC,QAAQ;oBACR,OAAO,EAAE,IAAI,IAAI,kDAAkD;oBACnE,MAAM,EAAE,2DAA2D;iBACpE;aACF,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -1,75 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The design side of the shared contract machinery.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* typo of a real one, never an extension.
|
|
12
|
-
* - **Coverage is measured, not promised.** Every property read is recorded, and
|
|
13
|
-
* the drift guard compares that set against the published schema. A property
|
|
14
|
-
* declared in the schema and forgotten in the validator cannot ship.
|
|
4
|
+
* The reader, the closed-object rule and the coverage tracking are generic and
|
|
5
|
+
* live in `../contract-reader.js`; what is design-specific is the failure CODE
|
|
6
|
+
* prefix every diagnostic carries (`DESIGN_FIELD_INVALID`, `DESIGN_KEY_UNKNOWN`).
|
|
7
|
+
* Binding it once here is what lets every design validator keep importing
|
|
8
|
+
* `Reader` from this module unchanged while the capability descriptor — which
|
|
9
|
+
* must not depend on `domain/design` — builds on the same machinery under its
|
|
10
|
+
* own prefix.
|
|
15
11
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
failures = [];
|
|
12
|
+
import { ContractReader } from "../contract-reader.js";
|
|
13
|
+
export { eachRecord, isNonEmptyString, isRecord } from "../contract-reader.js";
|
|
14
|
+
export class Reader extends ContractReader {
|
|
20
15
|
constructor(allowedKeys) {
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
/** Read `path`'s last segment off `node`, recording the property as covered. */
|
|
24
|
-
read(node, path) {
|
|
25
|
-
this.touched.add(path);
|
|
26
|
-
const segments = path.split(".");
|
|
27
|
-
const key = segments[segments.length - 1].replace("[]", "");
|
|
28
|
-
return node[key];
|
|
29
|
-
}
|
|
30
|
-
fail(code, artifact, message, action) {
|
|
31
|
-
this.failures.push({ code, artifact, message, action });
|
|
32
|
-
}
|
|
33
|
-
invalid(artifact, message, action) {
|
|
34
|
-
this.fail("DESIGN_FIELD_INVALID", artifact, message, action);
|
|
35
|
-
}
|
|
36
|
-
/** Reject anything the contract does not declare at `path` (closed objects). */
|
|
37
|
-
closed(node, path, artifact) {
|
|
38
|
-
const allowed = this.allowedKeys[path];
|
|
39
|
-
if (allowed === undefined)
|
|
40
|
-
return;
|
|
41
|
-
for (const key of Object.keys(node)) {
|
|
42
|
-
if (allowed.includes(key))
|
|
43
|
-
continue;
|
|
44
|
-
this.fail("DESIGN_KEY_UNKNOWN", artifact, `${path === "" ? "el documento" : `'${path}'`} no admite la clave '${key}'`, `quitala o corregí el nombre; las claves válidas son: ${allowed.join(", ")}`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Walk an array-of-objects field. Every list in the contract shares the same
|
|
50
|
-
* three failure modes — not an array, an item that is not an object, an item
|
|
51
|
-
* carrying a key the schema does not declare — so they are stated once here and
|
|
52
|
-
* each reader stays about ITS own fields.
|
|
53
|
-
*/
|
|
54
|
-
export function* eachRecord(r, node, path, artifact, emptyMeans = "") {
|
|
55
|
-
const list = r.read(node, path);
|
|
56
|
-
if (!Array.isArray(list)) {
|
|
57
|
-
r.invalid(artifact, `'${path}' debe ser un array${emptyMeans}`, `escribí '${path}': []`);
|
|
58
|
-
return;
|
|
16
|
+
super("DESIGN", allowedKeys);
|
|
59
17
|
}
|
|
60
|
-
for (const entry of list) {
|
|
61
|
-
if (!isRecord(entry)) {
|
|
62
|
-
r.invalid(artifact, `cada entrada de '${path}' debe ser un objeto`, `revisá el array '${path}'`);
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
r.closed(entry, `${path}[]`, artifact);
|
|
66
|
-
yield entry;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
export function isRecord(value) {
|
|
70
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
71
|
-
}
|
|
72
|
-
export function isNonEmptyString(value) {
|
|
73
|
-
return typeof value === "string" && value.trim().length > 0;
|
|
74
18
|
}
|
|
75
19
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/domain/design/validation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/domain/design/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIvD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI/E,MAAM,OAAO,MAAO,SAAQ,cAAc;IACxC,YAAY,WAAwB;QAClC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The other half of the elevated `handoff` gate: does the evidence a screen
|
|
3
|
+
* CITES actually show what the screen says it shows?
|
|
4
|
+
*
|
|
5
|
+
* `maturity.ts` judges the document alone — every criterion classified, the base
|
|
6
|
+
* state enumerated with a rendition. That is all one file can prove. But a
|
|
7
|
+
* reference to `DES-001/VIS-003@r1` is a claim about another document, and the
|
|
8
|
+
* whole point of requiring visual evidence is defeated if the reference is enough
|
|
9
|
+
* on its own: a screen could cite a rendition of a different screen, of an older
|
|
10
|
+
* revision, or one that covers nothing at all, and pass.
|
|
11
|
+
*
|
|
12
|
+
* So this crosses the two directions of the same matrix. The screen says *this
|
|
13
|
+
* criterion is shown here*; the rendition says *I cover these criteria and these
|
|
14
|
+
* states, and I came out of these revisions*. Both have to agree, and the
|
|
15
|
+
* rendition is the one that has to back the claim up.
|
|
16
|
+
*
|
|
17
|
+
* It lives in the domain and takes a reader, so the caller decides how documents
|
|
18
|
+
* are loaded — and it is called from the publication path, where a revision is
|
|
19
|
+
* about to be sealed and there is still time to refuse.
|
|
20
|
+
*/
|
|
21
|
+
/** Formats a person can open with no provider, no account and no network. */
|
|
22
|
+
const STATIC_PREVIEW_FORMATS = ["svg", "png", "jpeg", "webp", "pdf"];
|
|
23
|
+
/**
|
|
24
|
+
* Cross the screen's classification matrix against the renditions it cites.
|
|
25
|
+
*
|
|
26
|
+
* Only for a screen claiming `handoff`: an `outline` may cite a rendition that is
|
|
27
|
+
* still being drawn, and refusing that would make the early profile unusable.
|
|
28
|
+
*/
|
|
29
|
+
export function crossVisualEvidence(catalog, screen, file, readRendition) {
|
|
30
|
+
if (screen.maturity !== "handoff")
|
|
31
|
+
return [];
|
|
32
|
+
const failures = [];
|
|
33
|
+
const loaded = new Map();
|
|
34
|
+
let cited = 0;
|
|
35
|
+
for (const entry of screen.trace) {
|
|
36
|
+
if (entry.classification === null || entry.classification === "not_visual")
|
|
37
|
+
continue;
|
|
38
|
+
for (const ref of entry.renditions) {
|
|
39
|
+
cited += 1;
|
|
40
|
+
const rendition = resolve(catalog, ref, file, readRendition, loaded, failures);
|
|
41
|
+
if (rendition === null)
|
|
42
|
+
continue;
|
|
43
|
+
failures.push(...checkBacksClaim(screen, entry, ref, rendition, file));
|
|
44
|
+
}
|
|
45
|
+
if (entry.classification === "interaction") {
|
|
46
|
+
failures.push(...checkInteractionEvidence(entry, loaded, file));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Si NINGUNA cita se pudo cargar, la causa ya está dicha: agregar «no hay
|
|
50
|
+
// preview estática» sería un segundo diagnóstico del mismo problema, y el
|
|
51
|
+
// primero es el que se arregla.
|
|
52
|
+
if (cited > 0 && loaded.size === 0)
|
|
53
|
+
return failures;
|
|
54
|
+
failures.push(...checkStaticPreview(screen, loaded, file));
|
|
55
|
+
return failures;
|
|
56
|
+
}
|
|
57
|
+
/** Load a cited rendition once, reporting the two ways a citation can dangle. */
|
|
58
|
+
function resolve(catalog, ref, file, readRendition, loaded, failures) {
|
|
59
|
+
const cached = loaded.get(ref);
|
|
60
|
+
if (cached !== undefined)
|
|
61
|
+
return cached;
|
|
62
|
+
const [, tail] = ref.split("/");
|
|
63
|
+
const [id, revision] = (tail ?? "").split("@r");
|
|
64
|
+
const entry = catalog.find((e) => e.id === id && e.revision === Number(revision));
|
|
65
|
+
if (entry === undefined) {
|
|
66
|
+
failures.push({
|
|
67
|
+
code: "DESIGN_REFERENCE_MISSING",
|
|
68
|
+
artifact: file,
|
|
69
|
+
message: `cita ${ref} como evidencia y el catálogo no la contiene`,
|
|
70
|
+
action: "publicá esa rendition dentro del package, o citá una que exista",
|
|
71
|
+
});
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const rendition = readRendition(entry.path);
|
|
75
|
+
if (rendition === null) {
|
|
76
|
+
failures.push({
|
|
77
|
+
code: "DESIGN_REFERENCE_FILE_MISSING",
|
|
78
|
+
artifact: file,
|
|
79
|
+
message: `cita ${ref} y su '${entry.path}' no se pudo leer como una rendition válida`,
|
|
80
|
+
action: "reparalo: una evidencia que no se puede abrir no evidencia nada",
|
|
81
|
+
});
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
loaded.set(ref, rendition);
|
|
85
|
+
return rendition;
|
|
86
|
+
}
|
|
87
|
+
/** The three ways a cited rendition can fail to back the claim made about it. */
|
|
88
|
+
function checkBacksClaim(screen, entry, ref, rendition, file) {
|
|
89
|
+
const insufficient = (message, action) => ({
|
|
90
|
+
code: "DESIGN_VISUAL_EVIDENCE_REQUIRED",
|
|
91
|
+
artifact: file,
|
|
92
|
+
message: `trace['${entry.criterion}'] cita ${ref}, que ${message}`,
|
|
93
|
+
action,
|
|
94
|
+
});
|
|
95
|
+
const failures = [];
|
|
96
|
+
// Que salió de ESTA revisión, no de otra que se le parece: una preview de r1
|
|
97
|
+
// presentada como evidencia de r2 es precisamente el snapshot confundido con
|
|
98
|
+
// algo más reciente que AC-REN-07 nombra.
|
|
99
|
+
const mine = `${screen.id}@r${screen.revision}`;
|
|
100
|
+
if (!rendition.sources.some((s) => s.ref === mine || s.ref.startsWith(`${mine}#`))) {
|
|
101
|
+
failures.push(insufficient(`no salió de ${mine} (declara ${rendition.sources.map((s) => s.ref).join(", ")})`, "regenerá la rendition sobre esta revisión, o citá la que sí salió de ella"));
|
|
102
|
+
}
|
|
103
|
+
if (!rendition.coverage.criteria.includes(entry.criterion)) {
|
|
104
|
+
failures.push(insufficient(`no declara cubrir '${entry.criterion}'`, "agregá el criterio a 'coverage.criteria' de la rendition, o citá otra que lo muestre"));
|
|
105
|
+
}
|
|
106
|
+
const uncovered = entry.states.filter((s) => !rendition.coverage.states.includes(s));
|
|
107
|
+
if (uncovered.length > 0 && rendition.coverage.states.length > 0) {
|
|
108
|
+
failures.push(insufficient(`no cubre ${uncovered.join(", ")}`, "cubrí esos estados en la rendition, o citá una adicional para ellos"));
|
|
109
|
+
}
|
|
110
|
+
return failures;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* AC-REN-02, last clause: an `interaction` entry evidences trigger, transition
|
|
114
|
+
* and outcome. A picture of the end state is not that, so at least one of the
|
|
115
|
+
* renditions it cites has to be the prototype or storyboard that shows it.
|
|
116
|
+
*/
|
|
117
|
+
function checkInteractionEvidence(entry, loaded, file) {
|
|
118
|
+
const cited = entry.renditions.map((ref) => loaded.get(ref)).filter((r) => r !== undefined);
|
|
119
|
+
if (cited.length === 0)
|
|
120
|
+
return []; // ya reportado como cita colgante
|
|
121
|
+
if (cited.some((r) => r.interaction_evidence !== null))
|
|
122
|
+
return [];
|
|
123
|
+
return [
|
|
124
|
+
{
|
|
125
|
+
code: "DESIGN_VISUAL_EVIDENCE_REQUIRED",
|
|
126
|
+
artifact: file,
|
|
127
|
+
message: `trace['${entry.criterion}'] es 'interaction' y ninguna de sus renditions evidencia trigger, transición y outcome`,
|
|
128
|
+
action: "agregá un prototipo o un storyboard estático con 'interaction_evidence', o reclasificá el criterio como 'visual'",
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* AC-REN-01: the base state survives without the provider.
|
|
134
|
+
*
|
|
135
|
+
* The document-level gate already demanded that some criterion enumerate
|
|
136
|
+
* `default_state` with a rendition. What it could not check is whether that
|
|
137
|
+
* rendition is one a person can OPEN — an `interactive_html` behind a private
|
|
138
|
+
* Figma link is a citation, not a preview.
|
|
139
|
+
*/
|
|
140
|
+
function checkStaticPreview(screen, loaded, file) {
|
|
141
|
+
const covering = [...loaded.values()].filter((r) => r.coverage.states.includes(screen.default_state) &&
|
|
142
|
+
STATIC_PREVIEW_FORMATS.includes(r.format) &&
|
|
143
|
+
r.files.length > 0);
|
|
144
|
+
if (covering.length > 0)
|
|
145
|
+
return [];
|
|
146
|
+
return [
|
|
147
|
+
{
|
|
148
|
+
code: "DESIGN_VISUAL_EVIDENCE_REQUIRED",
|
|
149
|
+
artifact: file,
|
|
150
|
+
message: `ninguna rendition citada conserva una preview estática local de '${screen.default_state}'`,
|
|
151
|
+
action: `el gate 'handoff' pasó a exigir evidencia visual local: publicá una preview en ${STATIC_PREVIEW_FORMATS.join(", ")} que cubra el estado base y citala, o bajá la screen a 'outline'`,
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=visual-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-evidence.js","sourceRoot":"","sources":["../../../src/domain/design/visual-evidence.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,6EAA6E;AAC7E,MAAM,sBAAsB,GAA+B,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAKjG;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAgC,EAChC,MAAsB,EACtB,IAAY,EACZ,aAA8B;IAE9B,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAE7C,MAAM,QAAQ,GAAoB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,IAAI,GAAG,EAA2B,CAAC;IAClD,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjC,IAAI,KAAK,CAAC,cAAc,KAAK,IAAI,IAAI,KAAK,CAAC,cAAc,KAAK,YAAY;YAAE,SAAS;QACrF,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACnC,KAAK,IAAI,CAAC,CAAC;YACX,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC/E,IAAI,SAAS,KAAK,IAAI;gBAAE,SA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