mdld-parse 0.9.1 → 0.9.3
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 +34 -1
- package/dist/.nojekyll +0 -0
- package/dist/CNAME +1 -0
- package/dist/README.md +425 -0
- package/dist/docs/API.md +397 -0
- package/dist/docs/Architecture.md +190 -0
- package/dist/docs/Guide.md +322 -0
- package/dist/docs/LLM-MDLD-Inducer.md +550 -0
- package/dist/docs/Parser.md +654 -0
- package/dist/docs/Performance.md +238 -0
- package/dist/docs/Spec-render.md +1439 -0
- package/dist/docs/Subject.md +180 -0
- package/dist/docs/Syntax.md +463 -0
- package/dist/docs/TodoList.md +215 -0
- package/dist/docs/Use-Cases.md +354 -0
- package/dist/docs/index.html +108 -0
- package/dist/docs/index.md +56 -0
- package/dist/docs/origin.md +459 -0
- package/dist/docs/polarity.md +586 -0
- package/dist/docs/primary-subject.md +199 -0
- package/dist/docs/statements.md +226 -0
- package/dist/docs/tokenization-performance-report.md +164 -0
- package/dist/examples/Cookbook.md +32 -0
- package/dist/examples/Status-SHACL.md +33 -0
- package/dist/examples/demo/index.md +35 -0
- package/dist/examples/demo/journal.md +18 -0
- package/dist/examples/demo/minimal.md +11 -0
- package/dist/examples/demo/project.md +15 -0
- package/dist/examples/demo/recipe.md +31 -0
- package/dist/examples/demo/research.md +46 -0
- package/dist/examples/demo/space-mission.md +48 -0
- package/dist/examples/dogfood.md +288 -0
- package/dist/examples/few-shot.md +309 -0
- package/dist/examples/graph/rdf-graph.html +473 -0
- package/dist/examples/graph/rdf_force_graph_web_component.html +506 -0
- package/dist/examples/index.md +45 -0
- package/dist/examples/llm-time-workflow.md +173 -0
- package/dist/examples/prov-o.md +2367 -0
- package/dist/examples/rdf.md +827 -0
- package/dist/examples/shacl.md +3399 -0
- package/dist/examples/statements.md +43 -0
- package/dist/examples/workflow.md +150 -0
- package/dist/index.html +2827 -0
- package/dist/index.js +1548 -0
- package/dist/logo.svg +7 -0
- package/dist/spec/Spec-compact.md +363 -0
- package/dist/spec/Spec-ultra.md +221 -0
- package/dist/spec/Spec.md +1068 -0
- package/dist/spec/index.md +46 -0
- package/package.json +13 -8
- package/src/constants.js +0 -31
- package/src/generate.js +0 -245
- package/src/index.js +0 -13
- package/src/locate.js +0 -23
- package/src/merge.js +0 -157
- package/src/parse.js +0 -765
- package/src/render.js +0 -576
- package/src/shared.js +0 -577
- package/src/utils.js +0 -430
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
[llm] <tag:llm.time-query.example,2026:>
|
|
2
|
+
|
|
3
|
+
# LLM Time Query Workflow {=llm:workflow .prov:Entity}
|
|
4
|
+
|
|
5
|
+
This workflow demonstrates a complete provenance record of an LLM agent
|
|
6
|
+
responding to a user's request for the current time.
|
|
7
|
+
|
|
8
|
+
The workflow shows: user query → plan creation → time tool execution → response generation
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# User and Agent {=llm:participants .prov:Collection}
|
|
13
|
+
|
|
14
|
+
## User {=nih:sha-256-128;8eeae17830e7c428288a5d68ceb09bf4;8 .prov:Agent label}
|
|
15
|
+
|
|
16
|
+
`npub1m52n4487kek65nm530varud0welv8wp5tk32wwcqltret6k8qhxqz0uxwy` {prov:value}
|
|
17
|
+
|
|
18
|
+
[user] <nih:sha-256-128;8eeae17830e7c428288a5d68ceb09bf4;8>
|
|
19
|
+
|
|
20
|
+
[alice@example.com] {llm:email}
|
|
21
|
+
[End user requesting time information] {llm:role}
|
|
22
|
+
|
|
23
|
+
## LLM Agent {=llm:agent .prov:SoftwareAgent label}
|
|
24
|
+
|
|
25
|
+
[1.0.0] {llm:version}
|
|
26
|
+
[Time query processing and response generation] {llm:purpose}
|
|
27
|
+
|
|
28
|
+
## Time Tool {=llm:timeTool .prov:SoftwareAgent label}
|
|
29
|
+
|
|
30
|
+
[2.1.0] {llm:version}
|
|
31
|
+
[System time retrieval service] {llm:purpose}
|
|
32
|
+
|
|
33
|
+
Session started at [2026-03-10T14:51:00Z] {prov:generatedAtTime ^^xsd:dateTime}.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# User Request {=nih:sha-256-128;cd61bf0cc67fc2233111c91167e2abb3;a .prov:Entity label}
|
|
38
|
+
|
|
39
|
+
Received at [2026-03-10T14:51:05Z] {prov:generatedAtTime ^^xsd:dateTime} from [User] {+user: ?prov:wasAttributedTo}.
|
|
40
|
+
|
|
41
|
+
~~~~~~ {prov:value}
|
|
42
|
+
What time is it?
|
|
43
|
+
~~~~~~
|
|
44
|
+
|
|
45
|
+
This is a signed value by a [qualified attribution] {=nih:sha-256-128;d04bcf7aef37ef6e9dbe6a0fd67b40e4;4 ?prov:qualifiedAttribution}
|
|
46
|
+
`sig1zcmlnyrjah6498nsa2hk5tal0nuxt83kn2f4yjnmnme7ef3pef9z0uv3zha69f4f5h47p0hzzrz84nvfq95dkurqdduzg94639ledqqzu5u5g` {prov:value} by **User** {+user: ?prov:agent}
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# Time Query Plan {=nih:sha-256-128;22d992f16fe33976d65a6d83acdc95d1;3 .prov:Plan label}
|
|
51
|
+
|
|
52
|
+
Created at [2026-03-10T14:51:05Z] {prov:generatedAtTime ^^xsd:dateTime} by [LLM Agent] {+llm:agent ?prov:wasAttributedTo}.
|
|
53
|
+
|
|
54
|
+
Influenced by [user request] {+nih:sha-256-128;cd61bf0cc67fc2233111c91167e2abb3;a ?prov:wasInfluencedBy} and [LLM response guidelines] {+llm:responseGuidelines ?prov:wasInfluencedBy}.
|
|
55
|
+
|
|
56
|
+
~~~~~~ {prov:value}
|
|
57
|
+
Plan: Respond to user time query
|
|
58
|
+
|
|
59
|
+
Steps:
|
|
60
|
+
1. Parse user request for current time
|
|
61
|
+
2. Use time tool to get accurate system time
|
|
62
|
+
3. Format time response in user-friendly format
|
|
63
|
+
4. Generate plain text response
|
|
64
|
+
|
|
65
|
+
Requirements:
|
|
66
|
+
- Use accurate time source
|
|
67
|
+
- Provide clear, readable response
|
|
68
|
+
- Include timezone information
|
|
69
|
+
- Keep response concise
|
|
70
|
+
~~~~~~
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# Time Tool Execution Activity {=llm:timeExecution .prov:Activity}
|
|
75
|
+
|
|
76
|
+
Started at [2026-03-10T14:51:10Z] {prov:startedAtTime ^^xsd:dateTime} and completed at [2026-03-10T14:51:12Z] {prov:endedAtTime ^^xsd:dateTime}.
|
|
77
|
+
|
|
78
|
+
This activity retrieves the current system time using the time tool.
|
|
79
|
+
|
|
80
|
+
Uses plan
|
|
81
|
+
[time query plan] {+nih:sha-256-128;22d992f16fe33976d65a6d83acdc95d1;3 ?prov:hadPlan}.
|
|
82
|
+
|
|
83
|
+
Used [time tool] {+llm:timeTool ?prov:used} for time retrieval.
|
|
84
|
+
|
|
85
|
+
Led by [LLM Agent] {+llm:agent ?prov:wasAssociatedWith}.
|
|
86
|
+
|
|
87
|
+
Generated time data:
|
|
88
|
+
|
|
89
|
+
## System Time Data {=nih:sha-256-128;be55c034f00897633e7205ec7a8d69aa;4 .prov:Entity ?prov:generated label}
|
|
90
|
+
|
|
91
|
+
Generated at [2026-03-10T14:51:12Z] {prov:generatedAtTime ^^xsd:dateTime}.
|
|
92
|
+
|
|
93
|
+
~~~~~~ {prov:value}
|
|
94
|
+
{
|
|
95
|
+
"timestamp": "2026-03-10T14:51:12.345Z",
|
|
96
|
+
"timezone": "UTC",
|
|
97
|
+
"formatted": "2:51 PM UTC on March 10, 2026",
|
|
98
|
+
"unix_timestamp": 1741632672
|
|
99
|
+
}
|
|
100
|
+
~~~~~~
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
# Response Generation Activity {=llm:responseGeneration .prov:Activity}
|
|
105
|
+
|
|
106
|
+
Started at [2026-03-10T14:51:12Z] {prov:startedAtTime ^^xsd:dateTime} and completed at [2026-03-10T14:51:15Z] {prov:endedAtTime ^^xsd:dateTime}.
|
|
107
|
+
|
|
108
|
+
This activity generates the final plain text response to the user.
|
|
109
|
+
|
|
110
|
+
Uses plan
|
|
111
|
+
[time query plan] {+nih:sha-256-128;22d992f16fe33976d65a6d83acdc95d1;3 ?prov:hadPlan}.
|
|
112
|
+
|
|
113
|
+
Uses time data
|
|
114
|
+
[system time data] {+nih:sha-256-128;be55c034f00897633e7205ec7a8d69aa;4 ?prov:used}.
|
|
115
|
+
|
|
116
|
+
This activity was informed by the time execution step.
|
|
117
|
+
|
|
118
|
+
[time execution] {+llm:timeExecution ?prov:wasInformedBy}.
|
|
119
|
+
|
|
120
|
+
Led by [LLM Agent] {+llm:agent ?prov:wasAssociatedWith} acting on behalf of [User] {+user: ?prov:actedOnBehalfOf}.
|
|
121
|
+
|
|
122
|
+
Generated final response:
|
|
123
|
+
|
|
124
|
+
## Time Response {=nih:sha-256-128;53d967b34a93ab694be5f9d3840f0fd8;6 .prov:Entity ?prov:generated label}
|
|
125
|
+
|
|
126
|
+
Generated at [2026-03-10T14:51:15Z] {prov:generatedAtTime ^^xsd:dateTime}.
|
|
127
|
+
|
|
128
|
+
Derived from [system time data] {+nih:sha-256-128;be55c034f00897633e7205ec7a8d69aa;4 ?prov:wasDerivedFrom}.
|
|
129
|
+
|
|
130
|
+
Attributed to [LLM Agent] {+llm:agent ?prov:wasAttributedTo}.
|
|
131
|
+
|
|
132
|
+
~~~~~~ {prov:value}
|
|
133
|
+
The current time is 2:51 PM UTC on March 10, 2026.
|
|
134
|
+
~~~~~~
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
# Workflow Artifacts {=llm:artifacts .prov:Collection}
|
|
139
|
+
|
|
140
|
+
Contains all workflow outputs: {?prov:hadMember}
|
|
141
|
+
|
|
142
|
+
- User Request {+nih:sha-256-128;cd61bf0cc67fc2233111c91167e2abb3;a}
|
|
143
|
+
- Time Query Plan {+nih:sha-256-128;22d992f16fe33976d65a6d83acdc95d1;3}
|
|
144
|
+
- System Time Data {+nih:sha-256-128;be55c034f00897633e7205ec7a8d69aa;4}
|
|
145
|
+
- Time Response {+nih:sha-256-128;53d967b34a93ab694be5f9d3840f0fd8;6}
|
|
146
|
+
|
|
147
|
+
Collection created at [2026-03-10T14:51:20Z] {prov:generatedAtTime ^^xsd:dateTime} by [LLM Agent] {+llm:agent ?prov:wasAttributedTo}.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
# Provenance Summary
|
|
152
|
+
|
|
153
|
+
**Temporal Flow:**
|
|
154
|
+
- User request: 2026-03-10T14:51:05Z
|
|
155
|
+
- Plan creation: 2026-03-10T14:51:05Z
|
|
156
|
+
- Time execution: 2026-03-10T14:51:10Z → 2026-03-10T14:51:12Z
|
|
157
|
+
- Response generation: 2026-03-10T14:51:12Z → 2026-03-10T14:51:15Z
|
|
158
|
+
- Collection: 2026-03-10T14:51:20Z
|
|
159
|
+
|
|
160
|
+
**Agent Roles:**
|
|
161
|
+
- User: Request initiator
|
|
162
|
+
- LLM Agent: Plan creator, tool operator, response generator
|
|
163
|
+
- Time Tool: System time provider
|
|
164
|
+
|
|
165
|
+
**Entity Relationships:**
|
|
166
|
+
- Plan influenced by user request
|
|
167
|
+
- Time data derived from tool execution
|
|
168
|
+
- Final response derived from time data
|
|
169
|
+
- All artifacts organized in workflow collection
|
|
170
|
+
|
|
171
|
+
This workflow provides a complete provenance record of the LLM agent's
|
|
172
|
+
time query response process, demonstrating full traceability from user
|
|
173
|
+
request to final response.
|