@cleocode/adapters 2026.5.125 → 2026.5.127
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/index.js +554 -3
- package/dist/index.js.map +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3908,7 +3908,7 @@ var init_operations_registry = __esm({
|
|
|
3908
3908
|
}
|
|
3909
3909
|
]
|
|
3910
3910
|
},
|
|
3911
|
-
// === saga sub-domain (ADR-
|
|
3911
|
+
// === saga sub-domain (ADR-088 PM-Core V2 — canonical containment tier) ===
|
|
3912
3912
|
{
|
|
3913
3913
|
gateway: "mutate",
|
|
3914
3914
|
domain: "tasks",
|
|
@@ -4057,8 +4057,10 @@ var init_operations_registry = __esm({
|
|
|
4057
4057
|
]
|
|
4058
4058
|
},
|
|
4059
4059
|
{
|
|
4060
|
-
// T10117
|
|
4060
|
+
// [LEGACY T10117] Detach I5-violating parentId and re-attach via task_relations
|
|
4061
4061
|
// type=groups (ADR-073 §1.2 invariant I5). Idempotent.
|
|
4062
|
+
// PM-Core V2 (ADR-088): parent_id is canonical containment; this repair
|
|
4063
|
+
// direction is the inverse of the canonical model.
|
|
4062
4064
|
gateway: "mutate",
|
|
4063
4065
|
domain: "tasks",
|
|
4064
4066
|
operation: "saga.repair",
|
|
@@ -4107,7 +4109,11 @@ var init_operations_registry = __esm({
|
|
|
4107
4109
|
]
|
|
4108
4110
|
},
|
|
4109
4111
|
{
|
|
4110
|
-
// T10637
|
|
4112
|
+
// [LEGACY T10637] Pre-ADR-088 migration: convert parent_id-based Saga
|
|
4113
|
+
// membership to groups relations. PM-Core V2 (ADR-088) canonicalizes
|
|
4114
|
+
// parent_id as the sole containment edge. This operation is retained
|
|
4115
|
+
// for historical reference; its migration direction is the opposite
|
|
4116
|
+
// of the PM-Core V2 canonical model.
|
|
4111
4117
|
// Converts Epics whose parent_id points to a type='saga' task into proper
|
|
4112
4118
|
// groups relations. Non-Epic tasks are documented as conflicts.
|
|
4113
4119
|
gateway: "mutate",
|
|
@@ -8286,6 +8292,45 @@ var init_operations_registry = __esm({
|
|
|
8286
8292
|
}
|
|
8287
8293
|
]
|
|
8288
8294
|
},
|
|
8295
|
+
// ── docs.llm-output (T11137) — unified LLM output surface ──────────────────
|
|
8296
|
+
{
|
|
8297
|
+
gateway: "query",
|
|
8298
|
+
domain: "docs",
|
|
8299
|
+
operation: "llm-output",
|
|
8300
|
+
description: "docs.llm-output (query) \u2014 unified LLM output: task export (rich Markdown) or attachment-bundle (llms.txt). Replaces `docs export` and `docs generate`.",
|
|
8301
|
+
tier: 1,
|
|
8302
|
+
idempotent: true,
|
|
8303
|
+
sessionRequired: false,
|
|
8304
|
+
requiredParams: ["for"],
|
|
8305
|
+
params: [
|
|
8306
|
+
{ name: "for", type: "string", required: true, description: "Target entity ID" },
|
|
8307
|
+
{
|
|
8308
|
+
name: "mode",
|
|
8309
|
+
type: "string",
|
|
8310
|
+
required: false,
|
|
8311
|
+
description: "Output mode: task-export|attachment-bundle (auto-detected)"
|
|
8312
|
+
},
|
|
8313
|
+
{ name: "out", type: "string", required: false, description: "Output file path" },
|
|
8314
|
+
{
|
|
8315
|
+
name: "includeAttachments",
|
|
8316
|
+
type: "boolean",
|
|
8317
|
+
required: false,
|
|
8318
|
+
description: "Include attachment manifest (task-export)"
|
|
8319
|
+
},
|
|
8320
|
+
{
|
|
8321
|
+
name: "includeMemoryRefs",
|
|
8322
|
+
type: "boolean",
|
|
8323
|
+
required: false,
|
|
8324
|
+
description: "Include memory refs (task-export)"
|
|
8325
|
+
},
|
|
8326
|
+
{
|
|
8327
|
+
name: "attach",
|
|
8328
|
+
type: "boolean",
|
|
8329
|
+
required: false,
|
|
8330
|
+
description: "Save as llms-txt attachment (attachment-bundle)"
|
|
8331
|
+
}
|
|
8332
|
+
]
|
|
8333
|
+
},
|
|
8289
8334
|
// ── docs.update (T10161 — Epic T10157 / Saga T9855) ──────────────────────
|
|
8290
8335
|
{
|
|
8291
8336
|
gateway: "mutate",
|
|
@@ -11687,6 +11732,511 @@ var init_tasks2 = __esm({
|
|
|
11687
11732
|
}
|
|
11688
11733
|
});
|
|
11689
11734
|
|
|
11735
|
+
// packages/contracts/src/taxonomy.ts
|
|
11736
|
+
var BUILTIN_TAXONOMY_TAGS, CANONICAL_TAG_VALUES, _TAG_BY_ID, ADHOC_TO_CANONICAL, TAGS_BY_AXIS, CANONICAL_TYPE_TAGS, CANONICAL_DOMAIN_TAGS, CANONICAL_DOC_KIND_TAGS, TaxonomyError, TaxonomyRegistry;
|
|
11737
|
+
var init_taxonomy = __esm({
|
|
11738
|
+
"packages/contracts/src/taxonomy.ts"() {
|
|
11739
|
+
"use strict";
|
|
11740
|
+
BUILTIN_TAXONOMY_TAGS = [
|
|
11741
|
+
// ─── Domain tags ───────────────────────────────────────────────
|
|
11742
|
+
{
|
|
11743
|
+
tag: "architecture",
|
|
11744
|
+
label: "Architecture",
|
|
11745
|
+
description: "Cross-cutting architectural decisions, patterns, and subsystem-level concerns",
|
|
11746
|
+
axes: ["domain", "type"],
|
|
11747
|
+
adhocAliases: ["architecture"]
|
|
11748
|
+
},
|
|
11749
|
+
{
|
|
11750
|
+
tag: "cli",
|
|
11751
|
+
label: "CLI",
|
|
11752
|
+
description: "Command-line interface, dispatch, and command infrastructure",
|
|
11753
|
+
axes: ["domain"],
|
|
11754
|
+
adhocAliases: ["cli"]
|
|
11755
|
+
},
|
|
11756
|
+
{
|
|
11757
|
+
tag: "core",
|
|
11758
|
+
label: "Core",
|
|
11759
|
+
description: "Core engine, shared utilities, and foundational modules",
|
|
11760
|
+
axes: ["domain"],
|
|
11761
|
+
adhocAliases: ["core", "pm-core-v2", "foundation"]
|
|
11762
|
+
},
|
|
11763
|
+
{
|
|
11764
|
+
tag: "contracts",
|
|
11765
|
+
label: "Contracts",
|
|
11766
|
+
description: "Type contracts, schemas, and public API surface definitions",
|
|
11767
|
+
axes: ["domain"],
|
|
11768
|
+
adhocAliases: ["contracts", "schema"]
|
|
11769
|
+
},
|
|
11770
|
+
{
|
|
11771
|
+
tag: "caamp",
|
|
11772
|
+
label: "CAAMP",
|
|
11773
|
+
description: "Cross-Agent Adaptive Messaging Protocol \u2014 hooks, adapters, providers",
|
|
11774
|
+
axes: ["domain"],
|
|
11775
|
+
adhocAliases: ["caamp", "cant", "pi", "cant-dsl"]
|
|
11776
|
+
},
|
|
11777
|
+
{
|
|
11778
|
+
tag: "skills",
|
|
11779
|
+
label: "Skills",
|
|
11780
|
+
description: "Agent skill definitions, injection, dispatch, and guard patterns",
|
|
11781
|
+
axes: ["domain"],
|
|
11782
|
+
adhocAliases: ["skills"]
|
|
11783
|
+
},
|
|
11784
|
+
{
|
|
11785
|
+
tag: "brain",
|
|
11786
|
+
label: "BRAIN",
|
|
11787
|
+
description: "Cognitive memory system \u2014 decisions, patterns, observations, learnings",
|
|
11788
|
+
axes: ["domain"],
|
|
11789
|
+
adhocAliases: ["brain"]
|
|
11790
|
+
},
|
|
11791
|
+
{
|
|
11792
|
+
tag: "nexus",
|
|
11793
|
+
label: "Nexus",
|
|
11794
|
+
description: "Code intelligence surface \u2014 project indexing, impact analysis, cross-repo",
|
|
11795
|
+
axes: ["domain"],
|
|
11796
|
+
adhocAliases: ["nexus"]
|
|
11797
|
+
},
|
|
11798
|
+
{
|
|
11799
|
+
tag: "orchestration",
|
|
11800
|
+
label: "Orchestration",
|
|
11801
|
+
description: "Multi-agent orchestration, playbooks, LOOM lifecycle, spawn dispatch",
|
|
11802
|
+
axes: ["domain"],
|
|
11803
|
+
adhocAliases: ["orchestration", "orchestrate"]
|
|
11804
|
+
},
|
|
11805
|
+
{
|
|
11806
|
+
tag: "sessions",
|
|
11807
|
+
label: "Sessions",
|
|
11808
|
+
description: "Session lifecycle \u2014 handoff, debrief, briefing, snapshot, state",
|
|
11809
|
+
axes: ["domain"],
|
|
11810
|
+
adhocAliases: ["sessions"]
|
|
11811
|
+
},
|
|
11812
|
+
{
|
|
11813
|
+
tag: "tasks",
|
|
11814
|
+
label: "Tasks",
|
|
11815
|
+
description: "Task management \u2014 CRUD, gates, evidence, acceptance criteria, lifecycle",
|
|
11816
|
+
axes: ["domain"],
|
|
11817
|
+
adhocAliases: ["tasks"]
|
|
11818
|
+
},
|
|
11819
|
+
{
|
|
11820
|
+
tag: "docs",
|
|
11821
|
+
label: "Documents",
|
|
11822
|
+
description: "Document storage, retrieval, taxonomy, publish, and provenance",
|
|
11823
|
+
axes: ["domain"],
|
|
11824
|
+
adhocAliases: ["docs", "documentation"]
|
|
11825
|
+
},
|
|
11826
|
+
{
|
|
11827
|
+
tag: "cleoos",
|
|
11828
|
+
label: "CleoOS",
|
|
11829
|
+
description: "CleoOS runtime \u2014 gateway, daemon, injection facade, agents",
|
|
11830
|
+
axes: ["domain"],
|
|
11831
|
+
adhocAliases: ["cleoos", "facade", "sentient"]
|
|
11832
|
+
},
|
|
11833
|
+
{
|
|
11834
|
+
tag: "worktrunk",
|
|
11835
|
+
label: "Worktrunk",
|
|
11836
|
+
description: "Git worktree management \u2014 spawn, adopt, prune, lifecycle",
|
|
11837
|
+
axes: ["domain"],
|
|
11838
|
+
adhocAliases: ["worktrunk", "worktrunk-ssot"]
|
|
11839
|
+
},
|
|
11840
|
+
{
|
|
11841
|
+
tag: "agents",
|
|
11842
|
+
label: "Agents",
|
|
11843
|
+
description: "Agent profiles, execution learning, registry, dispatch",
|
|
11844
|
+
axes: ["domain"],
|
|
11845
|
+
adhocAliases: ["agents"]
|
|
11846
|
+
},
|
|
11847
|
+
{
|
|
11848
|
+
tag: "routing",
|
|
11849
|
+
label: "Routing",
|
|
11850
|
+
description: "Operation routing, capability matrix, dispatch path resolution",
|
|
11851
|
+
axes: ["domain"],
|
|
11852
|
+
adhocAliases: ["routing"]
|
|
11853
|
+
},
|
|
11854
|
+
{
|
|
11855
|
+
tag: "studio",
|
|
11856
|
+
label: "Studio",
|
|
11857
|
+
description: "Web UI, dashboard, and visual interfaces",
|
|
11858
|
+
axes: ["domain"],
|
|
11859
|
+
adhocAliases: ["studio"]
|
|
11860
|
+
},
|
|
11861
|
+
// ─── Type tags ─────────────────────────────────────────────────
|
|
11862
|
+
{
|
|
11863
|
+
tag: "architectural",
|
|
11864
|
+
label: "Architectural Decision",
|
|
11865
|
+
description: "Cross-cutting architectural decision with durable rationale",
|
|
11866
|
+
axes: ["type"],
|
|
11867
|
+
adhocAliases: ["architectural"]
|
|
11868
|
+
},
|
|
11869
|
+
{
|
|
11870
|
+
tag: "technical",
|
|
11871
|
+
label: "Technical Decision",
|
|
11872
|
+
description: "Implementation-scoped technical decision (library, pattern, algorithm)",
|
|
11873
|
+
axes: ["type"],
|
|
11874
|
+
adhocAliases: ["technical"]
|
|
11875
|
+
},
|
|
11876
|
+
{
|
|
11877
|
+
tag: "process",
|
|
11878
|
+
label: "Process Decision",
|
|
11879
|
+
description: "Workflow, methodology, or operational process decision",
|
|
11880
|
+
axes: ["type"],
|
|
11881
|
+
adhocAliases: ["process"]
|
|
11882
|
+
},
|
|
11883
|
+
{
|
|
11884
|
+
tag: "strategic",
|
|
11885
|
+
label: "Strategic Decision",
|
|
11886
|
+
description: "Long-horizon direction-setting decision spanning multiple epics",
|
|
11887
|
+
axes: ["type"],
|
|
11888
|
+
adhocAliases: ["strategic"]
|
|
11889
|
+
},
|
|
11890
|
+
{
|
|
11891
|
+
tag: "tactical",
|
|
11892
|
+
label: "Tactical Decision",
|
|
11893
|
+
description: "Short-horizon execution-level decision (AGT-* dispatch, within-sprint)",
|
|
11894
|
+
axes: ["type"],
|
|
11895
|
+
adhocAliases: ["tactical"]
|
|
11896
|
+
},
|
|
11897
|
+
{
|
|
11898
|
+
tag: "operational",
|
|
11899
|
+
label: "Operational Decision",
|
|
11900
|
+
description: "Infrastructure, deployment, or runtime configuration decision",
|
|
11901
|
+
axes: ["type"],
|
|
11902
|
+
adhocAliases: ["operational"]
|
|
11903
|
+
},
|
|
11904
|
+
{
|
|
11905
|
+
tag: "bugfix",
|
|
11906
|
+
label: "Bug Fix",
|
|
11907
|
+
description: "Defect correction or regression fix",
|
|
11908
|
+
axes: ["type"],
|
|
11909
|
+
adhocAliases: ["bugfix", "bug-fix", "hygiene"]
|
|
11910
|
+
},
|
|
11911
|
+
{
|
|
11912
|
+
tag: "refactor",
|
|
11913
|
+
label: "Refactor",
|
|
11914
|
+
description: "Internal restructuring without functional change",
|
|
11915
|
+
axes: ["type"],
|
|
11916
|
+
adhocAliases: ["refactor"]
|
|
11917
|
+
},
|
|
11918
|
+
{
|
|
11919
|
+
tag: "feature",
|
|
11920
|
+
label: "Feature",
|
|
11921
|
+
description: "New capability or user-facing enhancement",
|
|
11922
|
+
axes: ["type"],
|
|
11923
|
+
adhocAliases: ["feature"]
|
|
11924
|
+
},
|
|
11925
|
+
{
|
|
11926
|
+
tag: "discovery",
|
|
11927
|
+
label: "Discovery",
|
|
11928
|
+
description: "Exploratory research, investigation, or spike outcome",
|
|
11929
|
+
axes: ["type"],
|
|
11930
|
+
adhocAliases: ["discovery", "exploration", "research-type"]
|
|
11931
|
+
},
|
|
11932
|
+
{
|
|
11933
|
+
tag: "migration",
|
|
11934
|
+
label: "Migration",
|
|
11935
|
+
description: "Data or schema migration, backfill, or upgrade path",
|
|
11936
|
+
axes: ["type"],
|
|
11937
|
+
adhocAliases: ["migration", "migrations"]
|
|
11938
|
+
},
|
|
11939
|
+
{
|
|
11940
|
+
tag: "unification",
|
|
11941
|
+
label: "Unification",
|
|
11942
|
+
description: "Consolidation of fragmented systems into a single SSoT",
|
|
11943
|
+
axes: ["type"],
|
|
11944
|
+
adhocAliases: ["unification"]
|
|
11945
|
+
},
|
|
11946
|
+
{
|
|
11947
|
+
tag: "bootstrap",
|
|
11948
|
+
label: "Bootstrap",
|
|
11949
|
+
description: "Initial setup, scaffolding, or seed infrastructure",
|
|
11950
|
+
axes: ["type"],
|
|
11951
|
+
adhocAliases: ["bootstrap"]
|
|
11952
|
+
},
|
|
11953
|
+
// ─── Lifecycle tags ────────────────────────────────────────────
|
|
11954
|
+
{
|
|
11955
|
+
tag: "research",
|
|
11956
|
+
label: "Research",
|
|
11957
|
+
description: "LOOM stage 1: information gathering and domain understanding",
|
|
11958
|
+
axes: ["lifecycle"],
|
|
11959
|
+
adhocAliases: ["research", "wave-0"]
|
|
11960
|
+
},
|
|
11961
|
+
{
|
|
11962
|
+
tag: "consensus",
|
|
11963
|
+
label: "Consensus",
|
|
11964
|
+
description: "LOOM stage 2: multi-agent consensus and validation of findings",
|
|
11965
|
+
axes: ["lifecycle"],
|
|
11966
|
+
adhocAliases: ["consensus"]
|
|
11967
|
+
},
|
|
11968
|
+
{
|
|
11969
|
+
tag: "design",
|
|
11970
|
+
label: "Architecture Decision",
|
|
11971
|
+
description: "LOOM stage 3: architecture decision recording and validation",
|
|
11972
|
+
axes: ["lifecycle"],
|
|
11973
|
+
adhocAliases: ["design", "architecture_decision"]
|
|
11974
|
+
},
|
|
11975
|
+
{
|
|
11976
|
+
tag: "specification",
|
|
11977
|
+
label: "Specification",
|
|
11978
|
+
description: "LOOM stage 4: technical specification authoring",
|
|
11979
|
+
axes: ["lifecycle"],
|
|
11980
|
+
adhocAliases: ["specification", "rfc"]
|
|
11981
|
+
},
|
|
11982
|
+
{
|
|
11983
|
+
tag: "decomposition",
|
|
11984
|
+
label: "Decomposition",
|
|
11985
|
+
description: "LOOM stage 5: task decomposition and dependency modeling",
|
|
11986
|
+
axes: ["lifecycle"],
|
|
11987
|
+
adhocAliases: ["decomposition"]
|
|
11988
|
+
},
|
|
11989
|
+
{
|
|
11990
|
+
tag: "implementation",
|
|
11991
|
+
label: "Implementation",
|
|
11992
|
+
description: "LOOM stage 6: code authoring and unit-level verification",
|
|
11993
|
+
axes: ["lifecycle"],
|
|
11994
|
+
adhocAliases: [
|
|
11995
|
+
"implementation",
|
|
11996
|
+
"wave-1",
|
|
11997
|
+
"wave-2",
|
|
11998
|
+
"wave-3",
|
|
11999
|
+
"wave-4",
|
|
12000
|
+
"wave-5",
|
|
12001
|
+
"wave.1",
|
|
12002
|
+
"wave.2",
|
|
12003
|
+
"wave.3"
|
|
12004
|
+
]
|
|
12005
|
+
},
|
|
12006
|
+
{
|
|
12007
|
+
tag: "validation",
|
|
12008
|
+
label: "Validation",
|
|
12009
|
+
description: "LOOM stage 7: integration testing and gate verification",
|
|
12010
|
+
axes: ["lifecycle"],
|
|
12011
|
+
adhocAliases: ["validation", "testing"]
|
|
12012
|
+
},
|
|
12013
|
+
{
|
|
12014
|
+
tag: "release",
|
|
12015
|
+
label: "Release",
|
|
12016
|
+
description: "LOOM stage 9: versioning, changelog, npm publish, tag push",
|
|
12017
|
+
axes: ["lifecycle", "type"],
|
|
12018
|
+
adhocAliases: ["release"]
|
|
12019
|
+
},
|
|
12020
|
+
// ─── Priority tags ─────────────────────────────────────────────
|
|
12021
|
+
{
|
|
12022
|
+
tag: "p0",
|
|
12023
|
+
label: "P0 \u2014 Critical",
|
|
12024
|
+
description: "Drop-everything critical: blocks release, data loss, security incident",
|
|
12025
|
+
axes: ["priority"],
|
|
12026
|
+
adhocAliases: ["p0", "critical", "prime-tier1"]
|
|
12027
|
+
},
|
|
12028
|
+
{
|
|
12029
|
+
tag: "p1",
|
|
12030
|
+
label: "P1 \u2014 High",
|
|
12031
|
+
description: "High priority: blocks dependent work, user-visible degradation",
|
|
12032
|
+
axes: ["priority"],
|
|
12033
|
+
adhocAliases: ["p1"]
|
|
12034
|
+
},
|
|
12035
|
+
{
|
|
12036
|
+
tag: "p2",
|
|
12037
|
+
label: "P2 \u2014 Medium",
|
|
12038
|
+
description: "Medium priority: should fix, not blocking current wave",
|
|
12039
|
+
axes: ["priority"],
|
|
12040
|
+
adhocAliases: ["p2"]
|
|
12041
|
+
},
|
|
12042
|
+
{
|
|
12043
|
+
tag: "p3",
|
|
12044
|
+
label: "P3 \u2014 Low",
|
|
12045
|
+
description: "Low priority: nice-to-have, cleanup, future consideration",
|
|
12046
|
+
axes: ["priority"],
|
|
12047
|
+
adhocAliases: ["p3"]
|
|
12048
|
+
},
|
|
12049
|
+
// ─── Doc-kind tags (absorb docs-taxonomy) ──────────────────────
|
|
12050
|
+
{
|
|
12051
|
+
tag: "adr",
|
|
12052
|
+
label: "Architecture Decision Record",
|
|
12053
|
+
description: "Formal architecture decision record with rationale and alternatives",
|
|
12054
|
+
axes: ["doc_kind"],
|
|
12055
|
+
adhocAliases: ["adr"]
|
|
12056
|
+
},
|
|
12057
|
+
{
|
|
12058
|
+
tag: "spec",
|
|
12059
|
+
label: "Specification",
|
|
12060
|
+
description: "Technical specification for a feature, protocol, or subsystem",
|
|
12061
|
+
axes: ["doc_kind"],
|
|
12062
|
+
adhocAliases: ["spec"]
|
|
12063
|
+
},
|
|
12064
|
+
{
|
|
12065
|
+
tag: "research",
|
|
12066
|
+
label: "Research Note",
|
|
12067
|
+
description: "Investigation findings, surveys, and domain analysis",
|
|
12068
|
+
axes: ["doc_kind"],
|
|
12069
|
+
adhocAliases: ["research"]
|
|
12070
|
+
},
|
|
12071
|
+
{
|
|
12072
|
+
tag: "handoff",
|
|
12073
|
+
label: "Handoff Note",
|
|
12074
|
+
description: "Cross-session handoff with state, blockers, and next actions",
|
|
12075
|
+
axes: ["doc_kind"],
|
|
12076
|
+
adhocAliases: ["handoff"]
|
|
12077
|
+
},
|
|
12078
|
+
{
|
|
12079
|
+
tag: "note",
|
|
12080
|
+
label: "Note",
|
|
12081
|
+
description: "General-purpose note, observation, or free-form documentation",
|
|
12082
|
+
axes: ["doc_kind"],
|
|
12083
|
+
adhocAliases: ["note"]
|
|
12084
|
+
},
|
|
12085
|
+
{
|
|
12086
|
+
tag: "llmreadme",
|
|
12087
|
+
label: "LLM README",
|
|
12088
|
+
description: "Agent-consumable project overview, conventions, and context",
|
|
12089
|
+
axes: ["doc_kind"],
|
|
12090
|
+
adhocAliases: ["llmreadme", "llm-readme"]
|
|
12091
|
+
},
|
|
12092
|
+
{
|
|
12093
|
+
tag: "designmd",
|
|
12094
|
+
label: "Design Doc",
|
|
12095
|
+
description: "Google DESIGN.md token spec for agent interface contracts",
|
|
12096
|
+
axes: ["doc_kind"],
|
|
12097
|
+
adhocAliases: ["designmd", "design-md"]
|
|
12098
|
+
},
|
|
12099
|
+
{
|
|
12100
|
+
tag: "changeset",
|
|
12101
|
+
label: "Changeset",
|
|
12102
|
+
description: "User-facing changelog entry for a single change",
|
|
12103
|
+
axes: ["doc_kind"],
|
|
12104
|
+
adhocAliases: ["changeset"]
|
|
12105
|
+
},
|
|
12106
|
+
{
|
|
12107
|
+
tag: "changelog",
|
|
12108
|
+
label: "Changelog",
|
|
12109
|
+
description: "Aggregated release changelog for a version",
|
|
12110
|
+
axes: ["doc_kind"],
|
|
12111
|
+
adhocAliases: ["changelog"]
|
|
12112
|
+
}
|
|
12113
|
+
];
|
|
12114
|
+
CANONICAL_TAG_VALUES = BUILTIN_TAXONOMY_TAGS.map((t) => t.tag);
|
|
12115
|
+
_TAG_BY_ID = new Map(
|
|
12116
|
+
BUILTIN_TAXONOMY_TAGS.map((t) => [t.tag, t])
|
|
12117
|
+
);
|
|
12118
|
+
ADHOC_TO_CANONICAL = /* @__PURE__ */ new Map();
|
|
12119
|
+
for (const tag of BUILTIN_TAXONOMY_TAGS) {
|
|
12120
|
+
for (const alias of tag.adhocAliases) {
|
|
12121
|
+
ADHOC_TO_CANONICAL.set(alias, tag.tag);
|
|
12122
|
+
}
|
|
12123
|
+
}
|
|
12124
|
+
TAGS_BY_AXIS = /* @__PURE__ */ new Map();
|
|
12125
|
+
for (const axis of ["domain", "type", "lifecycle", "priority", "doc_kind"]) {
|
|
12126
|
+
TAGS_BY_AXIS.set(
|
|
12127
|
+
axis,
|
|
12128
|
+
BUILTIN_TAXONOMY_TAGS.filter((t) => t.axes.includes(axis))
|
|
12129
|
+
);
|
|
12130
|
+
}
|
|
12131
|
+
CANONICAL_TYPE_TAGS = TAGS_BY_AXIS.get("type").map(
|
|
12132
|
+
(t) => t.tag
|
|
12133
|
+
);
|
|
12134
|
+
CANONICAL_DOMAIN_TAGS = TAGS_BY_AXIS.get("domain").map(
|
|
12135
|
+
(t) => t.tag
|
|
12136
|
+
);
|
|
12137
|
+
CANONICAL_DOC_KIND_TAGS = TAGS_BY_AXIS.get("doc_kind").map(
|
|
12138
|
+
(t) => t.tag
|
|
12139
|
+
);
|
|
12140
|
+
TaxonomyError = class extends Error {
|
|
12141
|
+
constructor(message, invalidTags) {
|
|
12142
|
+
super(message);
|
|
12143
|
+
this.invalidTags = invalidTags;
|
|
12144
|
+
this.name = "TaxonomyError";
|
|
12145
|
+
}
|
|
12146
|
+
invalidTags;
|
|
12147
|
+
};
|
|
12148
|
+
TaxonomyRegistry = class _TaxonomyRegistry {
|
|
12149
|
+
byId;
|
|
12150
|
+
adhocMap;
|
|
12151
|
+
constructor(tags) {
|
|
12152
|
+
this.byId = new Map(tags.map((t) => [t.tag, t]));
|
|
12153
|
+
this.adhocMap = /* @__PURE__ */ new Map();
|
|
12154
|
+
for (const tag of tags) {
|
|
12155
|
+
for (const alias of tag.adhocAliases) {
|
|
12156
|
+
const existingTarget = this.adhocMap.get(alias);
|
|
12157
|
+
if (existingTarget !== void 0 && existingTarget !== tag.tag) {
|
|
12158
|
+
throw new TaxonomyError(
|
|
12159
|
+
`Ad-hoc alias '${alias}' maps to both '${existingTarget}' and '${tag.tag}' \u2014 aliases must be unique across targets`,
|
|
12160
|
+
[alias]
|
|
12161
|
+
);
|
|
12162
|
+
}
|
|
12163
|
+
this.adhocMap.set(alias, tag.tag);
|
|
12164
|
+
}
|
|
12165
|
+
}
|
|
12166
|
+
}
|
|
12167
|
+
/** Default built-in registry singleton. */
|
|
12168
|
+
static default = new _TaxonomyRegistry(BUILTIN_TAXONOMY_TAGS);
|
|
12169
|
+
/** True when `tag` is a canonical tag. */
|
|
12170
|
+
isCanonical(tag) {
|
|
12171
|
+
return this.byId.has(tag);
|
|
12172
|
+
}
|
|
12173
|
+
/** Look up metadata for a canonical tag. */
|
|
12174
|
+
get(tag) {
|
|
12175
|
+
return this.byId.get(tag);
|
|
12176
|
+
}
|
|
12177
|
+
/** List all canonical tags. */
|
|
12178
|
+
list() {
|
|
12179
|
+
return [...this.byId.values()];
|
|
12180
|
+
}
|
|
12181
|
+
/** List tags for a specific axis. */
|
|
12182
|
+
listByAxis(axis) {
|
|
12183
|
+
return this.list().filter((t) => t.axes.includes(axis));
|
|
12184
|
+
}
|
|
12185
|
+
/**
|
|
12186
|
+
* Normalize an ad-hoc label to its canonical form.
|
|
12187
|
+
*
|
|
12188
|
+
* Returns the canonical tag id, or `undefined` if the label has no
|
|
12189
|
+
* known canonical mapping.
|
|
12190
|
+
*/
|
|
12191
|
+
normalize(adhoc) {
|
|
12192
|
+
return this.adhocMap.get(adhoc);
|
|
12193
|
+
}
|
|
12194
|
+
/**
|
|
12195
|
+
* Validate that every tag in `tags` is canonical.
|
|
12196
|
+
*
|
|
12197
|
+
* @param tags - Tags to validate.
|
|
12198
|
+
* @returns An array of invalid tags. Empty array = all valid.
|
|
12199
|
+
*/
|
|
12200
|
+
validate(tags) {
|
|
12201
|
+
return tags.filter((t) => !this.byId.has(t));
|
|
12202
|
+
}
|
|
12203
|
+
/**
|
|
12204
|
+
* Validate tags and throw on failure.
|
|
12205
|
+
*
|
|
12206
|
+
* @param tags - Tags to validate.
|
|
12207
|
+
* @param context - Human-readable context for the error message.
|
|
12208
|
+
* @throws TaxonomyError when any tag is not canonical.
|
|
12209
|
+
*/
|
|
12210
|
+
validateOrThrow(tags, context) {
|
|
12211
|
+
const invalid = this.validate(tags);
|
|
12212
|
+
if (invalid.length > 0) {
|
|
12213
|
+
throw new TaxonomyError(
|
|
12214
|
+
`${context}: unknown tags [${invalid.join(", ")}]. Use canonical tags. Run 'cleo taxonomy list' to see all valid tags.`,
|
|
12215
|
+
invalid
|
|
12216
|
+
);
|
|
12217
|
+
}
|
|
12218
|
+
}
|
|
12219
|
+
/**
|
|
12220
|
+
* Normalize a set of ad-hoc labels to canonical form.
|
|
12221
|
+
*
|
|
12222
|
+
* Unknown labels are passed through unchanged (they may be
|
|
12223
|
+
* project-specific extensions or task-id references).
|
|
12224
|
+
*
|
|
12225
|
+
* @param labels - Ad-hoc labels to normalize.
|
|
12226
|
+
* @returns Normalized label set (deduplicated).
|
|
12227
|
+
*/
|
|
12228
|
+
normalizeSet(labels) {
|
|
12229
|
+
const result = /* @__PURE__ */ new Set();
|
|
12230
|
+
for (const label of labels) {
|
|
12231
|
+
const canonical = this.normalize(label);
|
|
12232
|
+
result.add(canonical ?? label);
|
|
12233
|
+
}
|
|
12234
|
+
return [...result];
|
|
12235
|
+
}
|
|
12236
|
+
};
|
|
12237
|
+
}
|
|
12238
|
+
});
|
|
12239
|
+
|
|
11690
12240
|
// packages/contracts/src/templates/manifest.ts
|
|
11691
12241
|
import { z as z15 } from "zod";
|
|
11692
12242
|
var TEMPLATE_KINDS, TEMPLATE_SUBSTITUTIONS, TEMPLATE_UPDATE_STRATEGIES, PLACEHOLDER_SOURCES, PlaceholderSpecSchema, TemplateManifestEntrySchema;
|
|
@@ -11839,6 +12389,7 @@ var init_src = __esm({
|
|
|
11839
12389
|
init_task_evidence();
|
|
11840
12390
|
init_archive();
|
|
11841
12391
|
init_tasks2();
|
|
12392
|
+
init_taxonomy();
|
|
11842
12393
|
init_manifest2();
|
|
11843
12394
|
init_validator();
|
|
11844
12395
|
init_workgraph();
|