@agenticprimitives/ontology 1.0.0-alpha.22 → 1.0.0-alpha.23
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 +11 -0
- package/cbox/card-projection-shapes.shacl.ttl +216 -0
- package/cbox/controlled-vocabularies.ttl +172 -4
- package/cbox/naming-registry-shapes.shacl.ttl +272 -0
- package/cbox/org-team-shapes.shacl.ttl +184 -0
- package/cbox/registry-vocabulary.ttl +86 -0
- package/cbox/run-provenance-shapes.shacl.ttl +172 -0
- package/context.jsonld +7 -1
- package/dist/arg-types.d.ts +60 -0
- package/dist/arg-types.d.ts.map +1 -0
- package/dist/arg-types.js +143 -0
- package/dist/arg-types.js.map +1 -0
- package/dist/artifacts.d.ts +4 -2
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +22 -0
- package/dist/artifacts.js.map +1 -1
- package/dist/contact-fields.d.ts +28 -0
- package/dist/contact-fields.d.ts.map +1 -0
- package/dist/contact-fields.js +38 -0
- package/dist/contact-fields.js.map +1 -0
- package/dist/decisions.d.ts +69 -0
- package/dist/decisions.d.ts.map +1 -0
- package/dist/decisions.js +98 -0
- package/dist/decisions.js.map +1 -0
- package/dist/household.d.ts +19 -0
- package/dist/household.d.ts.map +1 -0
- package/dist/household.js +41 -0
- package/dist/household.js.map +1 -0
- package/dist/index.d.ts +230 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +275 -1
- package/dist/index.js.map +1 -1
- package/dist/party-roles.d.ts +106 -0
- package/dist/party-roles.d.ts.map +1 -0
- package/dist/party-roles.js +305 -0
- package/dist/party-roles.js.map +1 -0
- package/dist/plan-shapes.d.ts +18 -0
- package/dist/plan-shapes.d.ts.map +1 -0
- package/dist/plan-shapes.js +38 -0
- package/dist/plan-shapes.js.map +1 -0
- package/dist/relations.d.ts +44 -0
- package/dist/relations.d.ts.map +1 -0
- package/dist/relations.js +104 -0
- package/dist/relations.js.map +1 -0
- package/dist/run-provenance-context.d.ts +211 -0
- package/dist/run-provenance-context.d.ts.map +1 -0
- package/dist/run-provenance-context.js +219 -0
- package/dist/run-provenance-context.js.map +1 -0
- package/dist/vault-records.d.ts +74 -0
- package/dist/vault-records.d.ts.map +1 -0
- package/dist/vault-records.js +330 -0
- package/dist/vault-records.js.map +1 -0
- package/mappings/agent-discovery-standards.ttl +24 -3
- package/mappings/collaboration-crosswalk-organization.ttl +22 -0
- package/mappings/collaboration-crosswalk-skills.ttl +5 -0
- package/package.json +4 -2
- package/run-provenance.jsonld +106 -0
- package/tbox/actor-context.ttl +11 -0
- package/tbox/agent-resolution.ttl +6 -6
- package/tbox/card-projection.ttl +350 -0
- package/tbox/contact.ttl +61 -0
- package/tbox/context.ttl +114 -0
- package/tbox/coordination.ttl +17 -0
- package/tbox/core.ttl +232 -12
- package/tbox/execution.ttl +168 -0
- package/tbox/household.ttl +142 -0
- package/tbox/interaction.ttl +13 -0
- package/tbox/naming.ttl +114 -0
- package/tbox/org.ttl +188 -4
- package/tbox/profile.ttl +7 -0
- package/tbox/prov-imports.ttl +65 -0
- package/tbox/registry.ttl +159 -4
- package/tbox/skills.ttl +62 -0
- package/tbox/values.ttl +81 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// THE R-BOX, COMPILED — spec 363 W3.
|
|
2
|
+
//
|
|
3
|
+
// The T-box says what things ARE. The R-BOX says how relations COMPOSE: which one is the inverse of
|
|
4
|
+
// which, and which two links make a third. Those are ENTAILMENTS — always true, no exceptions — which is
|
|
5
|
+
// why they belong in OWL beside the terms, and why this file is a projection of them rather than a
|
|
6
|
+
// second opinion.
|
|
7
|
+
//
|
|
8
|
+
// WHY IT NEEDED COMPILING AT ALL. A resolver runs inside a request and cannot query a triple store
|
|
9
|
+
// (spec 355 §1), so the axioms are read here as a table — the same arrangement `party-roles` has, with
|
|
10
|
+
// the same gate keeping it honest. `check:ontology-bindings` refuses a relation whose IRI the T-box does
|
|
11
|
+
// not declare, refuses an inverse that is not declared as one, and refuses a `PARTY_ROLES.traverse`
|
|
12
|
+
// naming a relation this table does not know how to walk.
|
|
13
|
+
//
|
|
14
|
+
// WHAT IT REPLACES: thirty-five T-box files held SEVEN axioms, and every traversal a capability needed
|
|
15
|
+
// was hand-listed on its party role instead — so "follow the ownership link" was written once per
|
|
16
|
+
// capability, and adding a household meant editing tables rather than declaring one chain.
|
|
17
|
+
//
|
|
18
|
+
// IT COMPOSES PREFERENCES AND BELONGING, NEVER PERMISSION. `charteredUnder` is belonging (ADR-0010) and
|
|
19
|
+
// `primaryPayee` is a preference; a chain of the two says where money would LAND, never that anybody may
|
|
20
|
+
// send it. No verifier reads this file.
|
|
21
|
+
const AP = 'https://agenticprimitives.dev/ns/core#';
|
|
22
|
+
const AP_HH = 'https://agenticprimitives.dev/ns/household#';
|
|
23
|
+
const AP_ORG = 'https://agenticprimitives.dev/ns/org#';
|
|
24
|
+
/**
|
|
25
|
+
* Every relation a resolver may traverse.
|
|
26
|
+
*
|
|
27
|
+
* ONLY WHAT IS ACTUALLY WALKED. This is not a mirror of the ontology's properties — most of them are
|
|
28
|
+
* facts nobody follows at request time. A relation earns a row here when some capability's resolution
|
|
29
|
+
* depends on following it, which is also what makes the gate's demand reasonable.
|
|
30
|
+
*/
|
|
31
|
+
export const RELATION_AXIOMS = [
|
|
32
|
+
{
|
|
33
|
+
iri: `${AP}charteredUnder`, inverseOf: `${AP}charters`,
|
|
34
|
+
says: 'the agent this one was created under and belongs to — never authority over it',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
iri: `${AP}charters`, inverseOf: `${AP}charteredUnder`,
|
|
38
|
+
says: 'the agents created under this one — the direction "what does alice hold" traverses',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
iri: `${AP}primaryPayee`,
|
|
42
|
+
says: 'the account its owner wants paid into — a preference, and the reason a payer stops asking',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
iri: `${AP}primaryPayer`,
|
|
46
|
+
says: 'the account its owner usually pays from — the mirror, and deliberately not the same account',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
iri: `${AP_HH}memberOfHousehold`, inverseOf: `${AP_HH}householdMember`,
|
|
50
|
+
says: 'the households this agent belongs to, as a member recorded them — private tier, never published',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
iri: `${AP_HH}householdMember`, inverseOf: `${AP_HH}memberOfHousehold`,
|
|
54
|
+
says: 'the agents in this household — the direction "who do I live with" traverses',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
// THE CHAIN THAT PAYS FOR THE R-BOX. "Send my daughter her allowance" is two links: the household
|
|
58
|
+
// says who she is, her own mark says where her money goes. One axiom answers it; written in code,
|
|
59
|
+
// every capability that needs it grows a table and they drift.
|
|
60
|
+
iri: `${AP_HH}householdPayee`, chain: [`${AP_HH}householdMember`, `${AP}primaryPayee`],
|
|
61
|
+
says: "a household member's own chosen account — where money sent to them would land",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
iri: `${AP_ORG}memberAgent`,
|
|
65
|
+
says: 'the agent a membership is of — a Situation, never a delegation and never a directory row',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
export function relationAxiom(iri) {
|
|
69
|
+
return RELATION_AXIOMS.find((r) => r.iri === iri);
|
|
70
|
+
}
|
|
71
|
+
/** The inverse of a relation, or undefined — undefined means "one direction only", not "unknown". */
|
|
72
|
+
export function inverseOf(iri) {
|
|
73
|
+
return relationAxiom(iri)?.inverseOf;
|
|
74
|
+
}
|
|
75
|
+
/** The links a composed relation is, or null when it is primitive (which is most of them). */
|
|
76
|
+
export function chainOf(iri) {
|
|
77
|
+
const c = relationAxiom(iri)?.chain;
|
|
78
|
+
return c && c.length ? c : null;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Walk a declared chain from a subject, using a caller-supplied reader for each link.
|
|
82
|
+
*
|
|
83
|
+
* THE CALLER READS, THIS COMPOSES — the same split the decision plane uses. Only the caller knows where
|
|
84
|
+
* a link lives (a chain role, a vault record, a contract edge); only the axiom knows which links a
|
|
85
|
+
* relation is and in what order, and keeping that here is what stops a second capability writing its own
|
|
86
|
+
* two-step by hand.
|
|
87
|
+
*
|
|
88
|
+
* FAIL-CLOSED: a relation with no declared chain returns nothing rather than falling back to "just follow
|
|
89
|
+
* something" — an undeclared traversal is exactly the guess this table exists to remove.
|
|
90
|
+
*/
|
|
91
|
+
export async function walkChain(iri, subject, follow) {
|
|
92
|
+
const chain = chainOf(iri);
|
|
93
|
+
if (!chain)
|
|
94
|
+
return [];
|
|
95
|
+
let frontier = [subject];
|
|
96
|
+
for (const link of chain) {
|
|
97
|
+
const next = await Promise.all(frontier.map((f) => follow(link, f)));
|
|
98
|
+
frontier = [...new Set(next.flat().filter(Boolean))];
|
|
99
|
+
if (!frontier.length)
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
return frontier;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=relations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.js","sourceRoot":"","sources":["../src/relations.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,oGAAoG;AACpG,yGAAyG;AACzG,mGAAmG;AACnG,kBAAkB;AAClB,EAAE;AACF,mGAAmG;AACnG,uGAAuG;AACvG,yGAAyG;AACzG,oGAAoG;AACpG,0DAA0D;AAC1D,EAAE;AACF,uGAAuG;AACvG,kGAAkG;AAClG,2FAA2F;AAC3F,EAAE;AACF,wGAAwG;AACxG,yGAAyG;AACzG,wCAAwC;AAExC,MAAM,EAAE,GAAG,wCAAwC,CAAC;AACpD,MAAM,KAAK,GAAG,6CAA6C,CAAC;AAC5D,MAAM,MAAM,GAAG,uCAAuC,CAAC;AAsBvD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAA+B;IACzD;QACE,GAAG,EAAE,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG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AC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,GAAgB,EAChB,OAAe,EACf,MAAuE;IAEvE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,IAAI,QAAQ,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
export declare const RUN_PROVENANCE_CONTEXT: {
|
|
2
|
+
readonly "@context": {
|
|
3
|
+
readonly "@version": 1.1;
|
|
4
|
+
readonly "@base": "urn:ap:prov:";
|
|
5
|
+
readonly prov: "http://www.w3.org/ns/prov#";
|
|
6
|
+
readonly "p-plan": "http://purl.org/net/p-plan#";
|
|
7
|
+
readonly "ep-plan": "https://w3id.org/ep-plan#";
|
|
8
|
+
readonly xsd: "http://www.w3.org/2001/XMLSchema#";
|
|
9
|
+
readonly ap: "https://agenticprimitives.dev/ns/core#";
|
|
10
|
+
readonly apexec: "https://agenticprimitives.dev/ns/execution#";
|
|
11
|
+
readonly apactor: "https://agenticprimitives.dev/ns/actor#";
|
|
12
|
+
readonly apguide: "https://agenticprimitives.dev/ns/guidance#";
|
|
13
|
+
readonly apdel: "https://agenticprimitives.dev/ns/delegation#";
|
|
14
|
+
readonly apvr: "https://agenticprimitives.dev/ns/verification-receipt#";
|
|
15
|
+
readonly apcoord: "https://agenticprimitives.dev/ns/coordination#";
|
|
16
|
+
readonly apix: "https://agenticprimitives.dev/ns/interaction#";
|
|
17
|
+
readonly id: "@id";
|
|
18
|
+
readonly type: "@type";
|
|
19
|
+
readonly graph: "@graph";
|
|
20
|
+
readonly startedAtTime: {
|
|
21
|
+
readonly "@id": "prov:startedAtTime";
|
|
22
|
+
readonly "@type": "xsd:dateTime";
|
|
23
|
+
};
|
|
24
|
+
readonly endedAtTime: {
|
|
25
|
+
readonly "@id": "prov:endedAtTime";
|
|
26
|
+
readonly "@type": "xsd:dateTime";
|
|
27
|
+
};
|
|
28
|
+
readonly endedAt: {
|
|
29
|
+
readonly "@id": "apexec:endedAt";
|
|
30
|
+
readonly "@type": "xsd:dateTime";
|
|
31
|
+
};
|
|
32
|
+
readonly wasAssociatedWith: {
|
|
33
|
+
readonly "@id": "prov:wasAssociatedWith";
|
|
34
|
+
readonly "@type": "@id";
|
|
35
|
+
};
|
|
36
|
+
readonly actedOnBehalfOf: {
|
|
37
|
+
readonly "@id": "prov:actedOnBehalfOf";
|
|
38
|
+
readonly "@type": "@id";
|
|
39
|
+
};
|
|
40
|
+
readonly wasAttributedTo: {
|
|
41
|
+
readonly "@id": "prov:wasAttributedTo";
|
|
42
|
+
readonly "@type": "@id";
|
|
43
|
+
};
|
|
44
|
+
readonly used: {
|
|
45
|
+
readonly "@id": "prov:used";
|
|
46
|
+
readonly "@type": "@id";
|
|
47
|
+
readonly "@container": "@set";
|
|
48
|
+
};
|
|
49
|
+
readonly usedDelegation: {
|
|
50
|
+
readonly "@id": "apvr:usedDelegation";
|
|
51
|
+
readonly "@type": "@id";
|
|
52
|
+
};
|
|
53
|
+
readonly generated: {
|
|
54
|
+
readonly "@id": "prov:generated";
|
|
55
|
+
readonly "@type": "@id";
|
|
56
|
+
readonly "@container": "@set";
|
|
57
|
+
};
|
|
58
|
+
readonly wasGeneratedBy: {
|
|
59
|
+
readonly "@id": "prov:wasGeneratedBy";
|
|
60
|
+
readonly "@type": "@id";
|
|
61
|
+
};
|
|
62
|
+
readonly wasInformedBy: {
|
|
63
|
+
readonly "@id": "prov:wasInformedBy";
|
|
64
|
+
readonly "@type": "@id";
|
|
65
|
+
readonly "@container": "@set";
|
|
66
|
+
};
|
|
67
|
+
readonly wasDerivedFrom: {
|
|
68
|
+
readonly "@id": "prov:wasDerivedFrom";
|
|
69
|
+
readonly "@type": "@id";
|
|
70
|
+
readonly "@container": "@set";
|
|
71
|
+
};
|
|
72
|
+
readonly wasRevisionOf: {
|
|
73
|
+
readonly "@id": "prov:wasRevisionOf";
|
|
74
|
+
readonly "@type": "@id";
|
|
75
|
+
};
|
|
76
|
+
readonly qualifiedAssociation: {
|
|
77
|
+
readonly "@id": "prov:qualifiedAssociation";
|
|
78
|
+
readonly "@container": "@set";
|
|
79
|
+
};
|
|
80
|
+
readonly agent: {
|
|
81
|
+
readonly "@id": "prov:agent";
|
|
82
|
+
readonly "@type": "@id";
|
|
83
|
+
};
|
|
84
|
+
readonly hadPlan: {
|
|
85
|
+
readonly "@id": "prov:hadPlan";
|
|
86
|
+
readonly "@type": "@id";
|
|
87
|
+
};
|
|
88
|
+
readonly hadRole: {
|
|
89
|
+
readonly "@id": "prov:hadRole";
|
|
90
|
+
readonly "@type": "@id";
|
|
91
|
+
};
|
|
92
|
+
readonly hasTraceElement: {
|
|
93
|
+
readonly "@id": "ep-plan:hasTraceElement";
|
|
94
|
+
readonly "@type": "@id";
|
|
95
|
+
readonly "@container": "@set";
|
|
96
|
+
};
|
|
97
|
+
readonly isStepOfPlan: {
|
|
98
|
+
readonly "@id": "p-plan:isStepOfPlan";
|
|
99
|
+
readonly "@type": "@id";
|
|
100
|
+
};
|
|
101
|
+
readonly isPrecededBy: {
|
|
102
|
+
readonly "@id": "p-plan:isPrecededBy";
|
|
103
|
+
readonly "@type": "@id";
|
|
104
|
+
};
|
|
105
|
+
readonly correspondsToStep: {
|
|
106
|
+
readonly "@id": "p-plan:correspondsToStep";
|
|
107
|
+
readonly "@type": "@id";
|
|
108
|
+
};
|
|
109
|
+
readonly isDecomposedAsPlan: {
|
|
110
|
+
readonly "@id": "ep-plan:isDecomposedAsPlan";
|
|
111
|
+
readonly "@type": "@id";
|
|
112
|
+
};
|
|
113
|
+
readonly hasStep: {
|
|
114
|
+
readonly "@id": "apexec:hasStep";
|
|
115
|
+
readonly "@type": "@id";
|
|
116
|
+
readonly "@container": "@set";
|
|
117
|
+
};
|
|
118
|
+
readonly runRef: "apexec:runRef";
|
|
119
|
+
readonly intentDigest: "apexec:intentDigest";
|
|
120
|
+
readonly completionState: {
|
|
121
|
+
readonly "@id": "apexec:completionState";
|
|
122
|
+
readonly "@type": "@vocab";
|
|
123
|
+
};
|
|
124
|
+
readonly receiptDigest: "apexec:receiptDigest";
|
|
125
|
+
readonly usedPlanContentHash: "apexec:usedPlanContentHash";
|
|
126
|
+
readonly realizesCapability: {
|
|
127
|
+
readonly "@id": "apexec:realizesCapability";
|
|
128
|
+
readonly "@type": "@id";
|
|
129
|
+
};
|
|
130
|
+
readonly authorityDecision: "apexec:authorityDecision";
|
|
131
|
+
readonly afterApproval: {
|
|
132
|
+
readonly "@id": "apexec:afterApproval";
|
|
133
|
+
readonly "@type": "xsd:boolean";
|
|
134
|
+
};
|
|
135
|
+
readonly chainDigest: "apexec:chainDigest";
|
|
136
|
+
readonly accountabilityRoot: {
|
|
137
|
+
readonly "@id": "apexec:accountabilityRoot";
|
|
138
|
+
readonly "@type": "@id";
|
|
139
|
+
};
|
|
140
|
+
readonly actorContext: {
|
|
141
|
+
readonly "@id": "apexec:actorContext";
|
|
142
|
+
readonly "@type": "@id";
|
|
143
|
+
};
|
|
144
|
+
readonly delegatedToAgent: {
|
|
145
|
+
readonly "@id": "apexec:delegatedToAgent";
|
|
146
|
+
readonly "@type": "@id";
|
|
147
|
+
};
|
|
148
|
+
readonly errorClass: "apexec:errorClass";
|
|
149
|
+
readonly traceId: "apexec:traceId";
|
|
150
|
+
readonly spanId: "apexec:spanId";
|
|
151
|
+
readonly effectProduces: "apexec:effectProduces";
|
|
152
|
+
readonly effectSucceeded: {
|
|
153
|
+
readonly "@id": "apexec:effectSucceeded";
|
|
154
|
+
readonly "@type": "xsd:boolean";
|
|
155
|
+
};
|
|
156
|
+
readonly decisionPoint: "apexec:decisionPoint";
|
|
157
|
+
readonly decisionRule: "apexec:decisionRule";
|
|
158
|
+
readonly artifactBytes: {
|
|
159
|
+
readonly "@id": "apexec:artifactBytes";
|
|
160
|
+
readonly "@type": "xsd:integer";
|
|
161
|
+
};
|
|
162
|
+
readonly artifactDigest: "apexec:artifactDigest";
|
|
163
|
+
readonly actingAgent: {
|
|
164
|
+
readonly "@id": "apactor:actingAgent";
|
|
165
|
+
readonly "@type": "@id";
|
|
166
|
+
};
|
|
167
|
+
readonly originatingAgent: {
|
|
168
|
+
readonly "@id": "apactor:originatingAgent";
|
|
169
|
+
readonly "@type": "@id";
|
|
170
|
+
};
|
|
171
|
+
readonly rootPrincipal: {
|
|
172
|
+
readonly "@id": "apactor:rootPrincipal";
|
|
173
|
+
readonly "@type": "@id";
|
|
174
|
+
};
|
|
175
|
+
readonly Agent: "ap:Agent";
|
|
176
|
+
readonly SoftwareAgent: "prov:SoftwareAgent";
|
|
177
|
+
readonly Person: "prov:Person";
|
|
178
|
+
readonly Organization: "prov:Organization";
|
|
179
|
+
readonly AgentRuntime: "apexec:AgentRuntime";
|
|
180
|
+
readonly Activity: "prov:Activity";
|
|
181
|
+
readonly Entity: "prov:Entity";
|
|
182
|
+
readonly Plan: "p-plan:Plan";
|
|
183
|
+
readonly Step: "p-plan:Step";
|
|
184
|
+
readonly Bundle: "prov:Bundle";
|
|
185
|
+
readonly Association: "prov:Association";
|
|
186
|
+
readonly ExecutionTraceBundle: "ep-plan:ExecutionTraceBundle";
|
|
187
|
+
readonly FailedActivity: "ep-plan:FailedActivity";
|
|
188
|
+
readonly ServiceExecution: "apexec:ServiceExecution";
|
|
189
|
+
readonly SkillExecution: "apexec:SkillExecution";
|
|
190
|
+
readonly ExecutionPlan: "apexec:ExecutionPlan";
|
|
191
|
+
readonly AgentSkillPackage: "apguide:AgentSkillPackage";
|
|
192
|
+
readonly Delegation: "apdel:Delegation";
|
|
193
|
+
readonly StepReceipt: "apexec:StepReceipt";
|
|
194
|
+
readonly ChainTransaction: "apexec:ChainTransaction";
|
|
195
|
+
readonly Effect: "apexec:Effect";
|
|
196
|
+
readonly DecisionRecord: "apexec:DecisionRecord";
|
|
197
|
+
readonly RunArtifact: "apexec:RunArtifact";
|
|
198
|
+
readonly ActorContext: "apactor:ActorContext";
|
|
199
|
+
readonly CommunicationDelivery: "apix:CommunicationDelivery";
|
|
200
|
+
readonly IntentInvocation: "apix:IntentInvocation";
|
|
201
|
+
readonly OrchestratedTask: "apix:OrchestratedTask";
|
|
202
|
+
readonly CoordinationPlan: "apcoord:CoordinationPlan";
|
|
203
|
+
readonly PlanStep: "apcoord:PlanStep";
|
|
204
|
+
readonly Completed: "apexec:Completed";
|
|
205
|
+
readonly Failed: "apexec:Failed";
|
|
206
|
+
readonly Refused: "apexec:Refused";
|
|
207
|
+
readonly Skipped: "apexec:Skipped";
|
|
208
|
+
readonly Suspended: "apexec:Suspended";
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=run-provenance-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-provenance-context.d.ts","sourceRoot":"","sources":["../src/run-provenance-context.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiNzB,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
// THE RUN-PROVENANCE CONTEXT, AS A CONSTANT — spec 389. The published artifact is `run-provenance.jsonld`
|
|
2
|
+
// at the package root (a stock JSON-LD processor loads it); this is the same object for a Worker, which
|
|
3
|
+
// has no filesystem. `test/unit/run-provenance-graph.test.ts` asserts the two are byte-for-byte the same
|
|
4
|
+
// document, so there is one context, not a file and a copy that drift.
|
|
5
|
+
//
|
|
6
|
+
// Every term here maps to a T-box IRI (`tbox/execution.ttl`, `plan.ttl`, `actor-context.ttl`,
|
|
7
|
+
// `verification-receipt.ttl`, `guidance.ttl`), and the same test checks each against the T-box: a term
|
|
8
|
+
// the ontology does not declare cannot be a field of the record.
|
|
9
|
+
export const RUN_PROVENANCE_CONTEXT = {
|
|
10
|
+
"@context": {
|
|
11
|
+
"@version": 1.1,
|
|
12
|
+
"@base": "urn:ap:prov:",
|
|
13
|
+
"prov": "http://www.w3.org/ns/prov#",
|
|
14
|
+
"p-plan": "http://purl.org/net/p-plan#",
|
|
15
|
+
"ep-plan": "https://w3id.org/ep-plan#",
|
|
16
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
17
|
+
"ap": "https://agenticprimitives.dev/ns/core#",
|
|
18
|
+
"apexec": "https://agenticprimitives.dev/ns/execution#",
|
|
19
|
+
"apactor": "https://agenticprimitives.dev/ns/actor#",
|
|
20
|
+
"apguide": "https://agenticprimitives.dev/ns/guidance#",
|
|
21
|
+
"apdel": "https://agenticprimitives.dev/ns/delegation#",
|
|
22
|
+
"apvr": "https://agenticprimitives.dev/ns/verification-receipt#",
|
|
23
|
+
"apcoord": "https://agenticprimitives.dev/ns/coordination#",
|
|
24
|
+
"apix": "https://agenticprimitives.dev/ns/interaction#",
|
|
25
|
+
"id": "@id",
|
|
26
|
+
"type": "@type",
|
|
27
|
+
"graph": "@graph",
|
|
28
|
+
"startedAtTime": {
|
|
29
|
+
"@id": "prov:startedAtTime",
|
|
30
|
+
"@type": "xsd:dateTime"
|
|
31
|
+
},
|
|
32
|
+
"endedAtTime": {
|
|
33
|
+
"@id": "prov:endedAtTime",
|
|
34
|
+
"@type": "xsd:dateTime"
|
|
35
|
+
},
|
|
36
|
+
"endedAt": {
|
|
37
|
+
"@id": "apexec:endedAt",
|
|
38
|
+
"@type": "xsd:dateTime"
|
|
39
|
+
},
|
|
40
|
+
"wasAssociatedWith": {
|
|
41
|
+
"@id": "prov:wasAssociatedWith",
|
|
42
|
+
"@type": "@id"
|
|
43
|
+
},
|
|
44
|
+
"actedOnBehalfOf": {
|
|
45
|
+
"@id": "prov:actedOnBehalfOf",
|
|
46
|
+
"@type": "@id"
|
|
47
|
+
},
|
|
48
|
+
"wasAttributedTo": {
|
|
49
|
+
"@id": "prov:wasAttributedTo",
|
|
50
|
+
"@type": "@id"
|
|
51
|
+
},
|
|
52
|
+
"used": {
|
|
53
|
+
"@id": "prov:used",
|
|
54
|
+
"@type": "@id",
|
|
55
|
+
"@container": "@set"
|
|
56
|
+
},
|
|
57
|
+
"usedDelegation": {
|
|
58
|
+
"@id": "apvr:usedDelegation",
|
|
59
|
+
"@type": "@id"
|
|
60
|
+
},
|
|
61
|
+
"generated": {
|
|
62
|
+
"@id": "prov:generated",
|
|
63
|
+
"@type": "@id",
|
|
64
|
+
"@container": "@set"
|
|
65
|
+
},
|
|
66
|
+
"wasGeneratedBy": {
|
|
67
|
+
"@id": "prov:wasGeneratedBy",
|
|
68
|
+
"@type": "@id"
|
|
69
|
+
},
|
|
70
|
+
"wasInformedBy": {
|
|
71
|
+
"@id": "prov:wasInformedBy",
|
|
72
|
+
"@type": "@id",
|
|
73
|
+
"@container": "@set"
|
|
74
|
+
},
|
|
75
|
+
"wasDerivedFrom": {
|
|
76
|
+
"@id": "prov:wasDerivedFrom",
|
|
77
|
+
"@type": "@id",
|
|
78
|
+
"@container": "@set"
|
|
79
|
+
},
|
|
80
|
+
"wasRevisionOf": {
|
|
81
|
+
"@id": "prov:wasRevisionOf",
|
|
82
|
+
"@type": "@id"
|
|
83
|
+
},
|
|
84
|
+
"qualifiedAssociation": {
|
|
85
|
+
"@id": "prov:qualifiedAssociation",
|
|
86
|
+
"@container": "@set"
|
|
87
|
+
},
|
|
88
|
+
"agent": {
|
|
89
|
+
"@id": "prov:agent",
|
|
90
|
+
"@type": "@id"
|
|
91
|
+
},
|
|
92
|
+
"hadPlan": {
|
|
93
|
+
"@id": "prov:hadPlan",
|
|
94
|
+
"@type": "@id"
|
|
95
|
+
},
|
|
96
|
+
"hadRole": {
|
|
97
|
+
"@id": "prov:hadRole",
|
|
98
|
+
"@type": "@id"
|
|
99
|
+
},
|
|
100
|
+
"hasTraceElement": {
|
|
101
|
+
"@id": "ep-plan:hasTraceElement",
|
|
102
|
+
"@type": "@id",
|
|
103
|
+
"@container": "@set"
|
|
104
|
+
},
|
|
105
|
+
"isStepOfPlan": {
|
|
106
|
+
"@id": "p-plan:isStepOfPlan",
|
|
107
|
+
"@type": "@id"
|
|
108
|
+
},
|
|
109
|
+
"isPrecededBy": {
|
|
110
|
+
"@id": "p-plan:isPrecededBy",
|
|
111
|
+
"@type": "@id"
|
|
112
|
+
},
|
|
113
|
+
"correspondsToStep": {
|
|
114
|
+
"@id": "p-plan:correspondsToStep",
|
|
115
|
+
"@type": "@id"
|
|
116
|
+
},
|
|
117
|
+
"isDecomposedAsPlan": {
|
|
118
|
+
"@id": "ep-plan:isDecomposedAsPlan",
|
|
119
|
+
"@type": "@id"
|
|
120
|
+
},
|
|
121
|
+
"hasStep": {
|
|
122
|
+
"@id": "apexec:hasStep",
|
|
123
|
+
"@type": "@id",
|
|
124
|
+
"@container": "@set"
|
|
125
|
+
},
|
|
126
|
+
"runRef": "apexec:runRef",
|
|
127
|
+
"intentDigest": "apexec:intentDigest",
|
|
128
|
+
"completionState": {
|
|
129
|
+
"@id": "apexec:completionState",
|
|
130
|
+
"@type": "@vocab"
|
|
131
|
+
},
|
|
132
|
+
"receiptDigest": "apexec:receiptDigest",
|
|
133
|
+
"usedPlanContentHash": "apexec:usedPlanContentHash",
|
|
134
|
+
"realizesCapability": {
|
|
135
|
+
"@id": "apexec:realizesCapability",
|
|
136
|
+
"@type": "@id"
|
|
137
|
+
},
|
|
138
|
+
"authorityDecision": "apexec:authorityDecision",
|
|
139
|
+
"afterApproval": {
|
|
140
|
+
"@id": "apexec:afterApproval",
|
|
141
|
+
"@type": "xsd:boolean"
|
|
142
|
+
},
|
|
143
|
+
"chainDigest": "apexec:chainDigest",
|
|
144
|
+
"accountabilityRoot": {
|
|
145
|
+
"@id": "apexec:accountabilityRoot",
|
|
146
|
+
"@type": "@id"
|
|
147
|
+
},
|
|
148
|
+
"actorContext": {
|
|
149
|
+
"@id": "apexec:actorContext",
|
|
150
|
+
"@type": "@id"
|
|
151
|
+
},
|
|
152
|
+
"delegatedToAgent": {
|
|
153
|
+
"@id": "apexec:delegatedToAgent",
|
|
154
|
+
"@type": "@id"
|
|
155
|
+
},
|
|
156
|
+
"errorClass": "apexec:errorClass",
|
|
157
|
+
"traceId": "apexec:traceId",
|
|
158
|
+
"spanId": "apexec:spanId",
|
|
159
|
+
"effectProduces": "apexec:effectProduces",
|
|
160
|
+
"effectSucceeded": {
|
|
161
|
+
"@id": "apexec:effectSucceeded",
|
|
162
|
+
"@type": "xsd:boolean"
|
|
163
|
+
},
|
|
164
|
+
"decisionPoint": "apexec:decisionPoint",
|
|
165
|
+
"decisionRule": "apexec:decisionRule",
|
|
166
|
+
"artifactBytes": {
|
|
167
|
+
"@id": "apexec:artifactBytes",
|
|
168
|
+
"@type": "xsd:integer"
|
|
169
|
+
},
|
|
170
|
+
"artifactDigest": "apexec:artifactDigest",
|
|
171
|
+
"actingAgent": {
|
|
172
|
+
"@id": "apactor:actingAgent",
|
|
173
|
+
"@type": "@id"
|
|
174
|
+
},
|
|
175
|
+
"originatingAgent": {
|
|
176
|
+
"@id": "apactor:originatingAgent",
|
|
177
|
+
"@type": "@id"
|
|
178
|
+
},
|
|
179
|
+
"rootPrincipal": {
|
|
180
|
+
"@id": "apactor:rootPrincipal",
|
|
181
|
+
"@type": "@id"
|
|
182
|
+
},
|
|
183
|
+
"Agent": "ap:Agent",
|
|
184
|
+
"SoftwareAgent": "prov:SoftwareAgent",
|
|
185
|
+
"Person": "prov:Person",
|
|
186
|
+
"Organization": "prov:Organization",
|
|
187
|
+
"AgentRuntime": "apexec:AgentRuntime",
|
|
188
|
+
"Activity": "prov:Activity",
|
|
189
|
+
"Entity": "prov:Entity",
|
|
190
|
+
"Plan": "p-plan:Plan",
|
|
191
|
+
"Step": "p-plan:Step",
|
|
192
|
+
"Bundle": "prov:Bundle",
|
|
193
|
+
"Association": "prov:Association",
|
|
194
|
+
"ExecutionTraceBundle": "ep-plan:ExecutionTraceBundle",
|
|
195
|
+
"FailedActivity": "ep-plan:FailedActivity",
|
|
196
|
+
"ServiceExecution": "apexec:ServiceExecution",
|
|
197
|
+
"SkillExecution": "apexec:SkillExecution",
|
|
198
|
+
"ExecutionPlan": "apexec:ExecutionPlan",
|
|
199
|
+
"AgentSkillPackage": "apguide:AgentSkillPackage",
|
|
200
|
+
"Delegation": "apdel:Delegation",
|
|
201
|
+
"StepReceipt": "apexec:StepReceipt",
|
|
202
|
+
"ChainTransaction": "apexec:ChainTransaction",
|
|
203
|
+
"Effect": "apexec:Effect",
|
|
204
|
+
"DecisionRecord": "apexec:DecisionRecord",
|
|
205
|
+
"RunArtifact": "apexec:RunArtifact",
|
|
206
|
+
"ActorContext": "apactor:ActorContext",
|
|
207
|
+
"CommunicationDelivery": "apix:CommunicationDelivery",
|
|
208
|
+
"IntentInvocation": "apix:IntentInvocation",
|
|
209
|
+
"OrchestratedTask": "apix:OrchestratedTask",
|
|
210
|
+
"CoordinationPlan": "apcoord:CoordinationPlan",
|
|
211
|
+
"PlanStep": "apcoord:PlanStep",
|
|
212
|
+
"Completed": "apexec:Completed",
|
|
213
|
+
"Failed": "apexec:Failed",
|
|
214
|
+
"Refused": "apexec:Refused",
|
|
215
|
+
"Skipped": "apexec:Skipped",
|
|
216
|
+
"Suspended": "apexec:Suspended"
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=run-provenance-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-provenance-context.js","sourceRoot":"","sources":["../src/run-provenance-context.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,wGAAwG;AACxG,yGAAyG;AACzG,uEAAuE;AACvE,EAAE;AACF,8FAA8F;AAC9F,uGAAuG;AACvG,iEAAiE;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE;QACV,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,6BAA6B;QACvC,SAAS,EAAE,2BAA2B;QACtC,KAAK,EAAE,mCAAmC;QAC1C,IAAI,EAAE,wCAAwC;QAC9C,QAAQ,EAAE,6CAA6C;QACvD,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,4CAA4C;QACvD,OAAO,EAAE,8CAA8C;QACvD,MAAM,EAAE,wDAAwD;QAChE,SAAS,EAAE,gDAAgD;QAC3D,MAAM,EAAE,+CAA+C;QACvD,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,QAAQ;QACjB,eAAe,EAAE;YACf,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,cAAc;SACxB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE,cAAc;SACxB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,cAAc;SACxB;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,wBAAwB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|
|
|
1
|
+
/** Whose vault a record of this kind normally lives in. Narrows which subjects are worth READING for a
|
|
2
|
+
* question; never who may read them. */
|
|
3
|
+
export type VaultRecordOwner = 'person' | 'organization' | 'either';
|
|
4
|
+
/**
|
|
5
|
+
* WHAT A RECORD IS FOR — and the reason "unbound" needed to stop being one word for two things.
|
|
6
|
+
*
|
|
7
|
+
* `entity` — a THING the ontology describes. A question may reach it, because asking "what endeavors
|
|
8
|
+
* do I have" and reading `coordination.endeavor:*` are the same act.
|
|
9
|
+
* `index` — a PROJECTION over entities: an index, a cursor, a name map, an event log. Deliberately
|
|
10
|
+
* not askable. Binding one would let a question be answered from a cache rather than from
|
|
11
|
+
* the records, and the cache is exactly the thing that goes stale (ADR-0055).
|
|
12
|
+
*
|
|
13
|
+
* A record type that appears in neither list is UNCLASSIFIED, which is a gap rather than a decision —
|
|
14
|
+
* `scripts/vault-ontology-coverage.mts` prints those, and they are the work queue.
|
|
15
|
+
*/
|
|
16
|
+
export type VaultRecordRole = 'entity' | 'index';
|
|
17
|
+
export interface VaultRecordBinding {
|
|
18
|
+
/** The record-type key. `exact` for a singleton, `prefix` for a keyed family (`coordination.endeavor:`). */
|
|
19
|
+
match: {
|
|
20
|
+
exact?: string;
|
|
21
|
+
prefix?: string;
|
|
22
|
+
};
|
|
23
|
+
/** What a record of this kind IS — an `owl:Class` the T-box declares. Bound by IRI, checked at build. */
|
|
24
|
+
class: string;
|
|
25
|
+
/** The words a person would use for it. Rendered INTO a planner's grounding, never written there. */
|
|
26
|
+
label: string;
|
|
27
|
+
/** Plural, for the sentence an answer is made of ("3 endeavors"). */
|
|
28
|
+
plural: string;
|
|
29
|
+
ownedBy: VaultRecordOwner;
|
|
30
|
+
/** Default `entity`. An `index` is never offered as something a question can be answered from. */
|
|
31
|
+
role?: VaultRecordRole;
|
|
32
|
+
/**
|
|
33
|
+
* FIELD → T-BOX PROPERTY, for records this repo authors.
|
|
34
|
+
*
|
|
35
|
+
* The point of the whole exercise: a record should be readable BY the ontology rather than interpreted
|
|
36
|
+
* INTO it. When the field names ARE the property names, "who are the members" is a lookup; when they
|
|
37
|
+
* are not, something has to know that `orgAgent` here means the member and there means the org — and
|
|
38
|
+
* that something is a person reading code, or a model guessing.
|
|
39
|
+
*
|
|
40
|
+
* PATHS. `a.b` is a nested field; `[]` is the element of an array; `{}` is the KEY of a map — that last
|
|
41
|
+
* one matters, because `relationships.data` keys its entries BY the organization's address, and a
|
|
42
|
+
* reader that does not know the key is the org has to be told, somewhere, by someone.
|
|
43
|
+
*
|
|
44
|
+
* MAP ONLY WHAT GENUINELY CORRESPONDS. A field mapped to a property that means something slightly
|
|
45
|
+
* different is worse than an unmapped field: unmapped is honest, and a plausible wrong mapping is
|
|
46
|
+
* believed. Where a record's fields correspond to nothing the T-box declares, it carries no map and
|
|
47
|
+
* `scripts/vault-ontology-coverage.mts` counts it — that gap is the work queue, and closing it means
|
|
48
|
+
* either declaring the property or reshaping the record on its next write.
|
|
49
|
+
*
|
|
50
|
+
* `check:ontology-bindings` verifies every IRI exists in the T-box, so a mapping cannot invent a
|
|
51
|
+
* property any more than a binding can invent a class.
|
|
52
|
+
*/
|
|
53
|
+
properties?: Record<string, string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The record kinds this substrate stores, each bound to what it IS.
|
|
57
|
+
*
|
|
58
|
+
* Deliberately not exhaustive over every key a vault may hold: an unbound key is UNCLASSIFIED, which is an
|
|
59
|
+
* honest state and the one that keeps this table from becoming a place to invent meanings. A question over
|
|
60
|
+
* an unbound kind is refused by name (spec 356 §2.3), never answered from a guess.
|
|
61
|
+
*/
|
|
62
|
+
export declare const VAULT_RECORD_BINDINGS: readonly VaultRecordBinding[];
|
|
63
|
+
/** What this record key IS, or `undefined` when nothing binds it. Longest match first, so a family and the
|
|
64
|
+
* narrower family inside it (`…endeavor:` and `…endeavor:events:`) cannot be confused for one another. */
|
|
65
|
+
export declare function bindingForRecordType(recordType: string): VaultRecordBinding | undefined;
|
|
66
|
+
/** The kinds a question may be ASKED about — label → class. The askable set is this, never the model's. */
|
|
67
|
+
export declare function askableRecordKinds(): Array<{
|
|
68
|
+
label: string;
|
|
69
|
+
plural: string;
|
|
70
|
+
class: string;
|
|
71
|
+
}>;
|
|
72
|
+
/** Every record type bound to this class — what a query over a kind must actually read. */
|
|
73
|
+
export declare function recordTypesForClass(classIri: string): VaultRecordBinding[];
|
|
74
|
+
//# sourceMappingURL=vault-records.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-records.d.ts","sourceRoot":"","sources":["../src/vault-records.ts"],"names":[],"mappings":"AA0CA;yCACyC;AACzC,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,kBAAkB;IACjC,4GAA4G;IAC5G,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,gBAAgB,CAAC;IAC1B,kGAAkG;IAClG,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAwQ9D,CAAC;AAEF;2GAC2G;AAC3G,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAOvF;AAED,2GAA2G;AAC3G,wBAAgB,kBAAkB,IAAI,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAU5F;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAE1E"}
|