mdkg 0.1.10 → 0.2.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/CHANGELOG.md +26 -0
- package/README.md +14 -11
- package/dist/cli.js +147 -6
- package/dist/commands/db.js +185 -1
- package/dist/core/project_db_migrations.js +24 -0
- package/dist/core/project_db_queue.js +186 -0
- package/dist/core/project_db_snapshot.js +28 -3
- package/dist/init/AGENT_START.md +10 -8
- package/dist/init/CLI_COMMAND_MATRIX.md +10 -5
- package/dist/init/README.md +11 -9
- package/dist/init/init-manifest.json +60 -5
- package/dist/init/skills/default/verify-close-and-checkpoint/SKILL.md +8 -7
- package/dist/init/templates/skills/base.SKILL.md +66 -0
- package/dist/init/templates/specs/agent.SPEC.md +39 -0
- package/dist/init/templates/specs/api.SPEC.md +32 -0
- package/dist/init/templates/specs/base.SPEC.md +87 -0
- package/dist/init/templates/specs/capability.SPEC.md +32 -0
- package/dist/init/templates/specs/integration.SPEC.md +24 -0
- package/dist/init/templates/specs/model.SPEC.md +20 -0
- package/dist/init/templates/specs/omniruntime-agent.SPEC.md +39 -0
- package/dist/init/templates/specs/project.SPEC.md +26 -0
- package/dist/init/templates/specs/runtime-image.SPEC.md +20 -0
- package/dist/init/templates/specs/tool.SPEC.md +24 -0
- package/package.json +3 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: {{spec_id}}
|
|
3
|
+
type: spec
|
|
4
|
+
title: {{title}}
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
role: subagent
|
|
7
|
+
runtime_mode: room_orchestrated
|
|
8
|
+
work_contracts: []
|
|
9
|
+
requested_capabilities: []
|
|
10
|
+
skill_refs: []
|
|
11
|
+
tool_refs: []
|
|
12
|
+
model_refs: []
|
|
13
|
+
wasm_component_refs: []
|
|
14
|
+
runtime_image_refs: []
|
|
15
|
+
subagent_refs: []
|
|
16
|
+
resource_profile: builder
|
|
17
|
+
update_policy: manual
|
|
18
|
+
tags: [spec]
|
|
19
|
+
owners: []
|
|
20
|
+
links: []
|
|
21
|
+
artifacts: []
|
|
22
|
+
relates: []
|
|
23
|
+
refs: []
|
|
24
|
+
aliases: []
|
|
25
|
+
created: {{created}}
|
|
26
|
+
updated: {{updated}}
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Identity
|
|
30
|
+
|
|
31
|
+
Name, stable id, owner, status, and source mdkg nodes.
|
|
32
|
+
|
|
33
|
+
# Purpose
|
|
34
|
+
|
|
35
|
+
What durable capability or contract this SPEC defines.
|
|
36
|
+
|
|
37
|
+
# Scope
|
|
38
|
+
|
|
39
|
+
Included behavior and resources.
|
|
40
|
+
|
|
41
|
+
# Non-goals
|
|
42
|
+
|
|
43
|
+
What this SPEC explicitly does not define.
|
|
44
|
+
|
|
45
|
+
# Resource URIs
|
|
46
|
+
|
|
47
|
+
- Optional draft URI: `omni://resource/...`
|
|
48
|
+
|
|
49
|
+
# Capabilities
|
|
50
|
+
|
|
51
|
+
- Capability id and optional draft URI: `omni://capability/...`
|
|
52
|
+
|
|
53
|
+
# Inputs
|
|
54
|
+
|
|
55
|
+
- Required input contract.
|
|
56
|
+
|
|
57
|
+
# Outputs
|
|
58
|
+
|
|
59
|
+
- Required output or receipt contract.
|
|
60
|
+
|
|
61
|
+
# Dependencies
|
|
62
|
+
|
|
63
|
+
- Other specs, skills, tools, models, services, or runtime images.
|
|
64
|
+
|
|
65
|
+
# Security Boundaries
|
|
66
|
+
|
|
67
|
+
- Authority, secret, data, and mutation boundaries.
|
|
68
|
+
|
|
69
|
+
# Validation Checks
|
|
70
|
+
|
|
71
|
+
- Commands or review checks.
|
|
72
|
+
|
|
73
|
+
# Closeout Evidence
|
|
74
|
+
|
|
75
|
+
- Evidence required to accept this SPEC or implementation.
|
|
76
|
+
|
|
77
|
+
# Projection Targets
|
|
78
|
+
|
|
79
|
+
- `.codex/agents`, runtime manifest, package, API, or protocol projection.
|
|
80
|
+
|
|
81
|
+
# Versioning
|
|
82
|
+
|
|
83
|
+
- Compatibility and change policy.
|
|
84
|
+
|
|
85
|
+
# Open Questions
|
|
86
|
+
|
|
87
|
+
- Decision needed before implementation.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: capability
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Capability Name
|
|
7
|
+
|
|
8
|
+
Stable mdkg capability id.
|
|
9
|
+
|
|
10
|
+
# Draft Omni URI
|
|
11
|
+
|
|
12
|
+
Optional: `omni://capability/...`
|
|
13
|
+
|
|
14
|
+
# Resource Types
|
|
15
|
+
|
|
16
|
+
- Optional draft resource URI: `omni://resource/...`
|
|
17
|
+
|
|
18
|
+
# Allowed Principals
|
|
19
|
+
|
|
20
|
+
- Roles or agents allowed to use this capability.
|
|
21
|
+
|
|
22
|
+
# Delegation Rules
|
|
23
|
+
|
|
24
|
+
- Whether and how the capability can be delegated.
|
|
25
|
+
|
|
26
|
+
# Revocation Rules
|
|
27
|
+
|
|
28
|
+
- Conditions that revoke or disable the capability.
|
|
29
|
+
|
|
30
|
+
# Audit Events
|
|
31
|
+
|
|
32
|
+
- Receipts, summaries, or metrics created by use.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: integration
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Integration Boundary
|
|
7
|
+
|
|
8
|
+
Systems, repos, protocols, and ownership split.
|
|
9
|
+
|
|
10
|
+
# Data Flow
|
|
11
|
+
|
|
12
|
+
- Inputs, outputs, transformations, and receipts.
|
|
13
|
+
|
|
14
|
+
# Failure And Retry
|
|
15
|
+
|
|
16
|
+
- Retry, idempotency, dead-letter, and cleanup policy.
|
|
17
|
+
|
|
18
|
+
# Security
|
|
19
|
+
|
|
20
|
+
- Auth, secret refs, network, and data minimization.
|
|
21
|
+
|
|
22
|
+
# Conformance
|
|
23
|
+
|
|
24
|
+
- Contract tests and fixture expectations.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: model
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Model Identity
|
|
7
|
+
|
|
8
|
+
Provider, model id, version, and intended use.
|
|
9
|
+
|
|
10
|
+
# Capabilities
|
|
11
|
+
|
|
12
|
+
- Reasoning, coding, browsing, vision, tool-use, or structured-output needs.
|
|
13
|
+
|
|
14
|
+
# Policy Context
|
|
15
|
+
|
|
16
|
+
- Data classes, retention, privacy, and allowed prompts.
|
|
17
|
+
|
|
18
|
+
# Evaluation Checks
|
|
19
|
+
|
|
20
|
+
- Task families, quality gates, and regression criteria.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: agent.SPEC.md
|
|
3
|
+
template_kind: omniruntime_agent
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Queue Ownership
|
|
7
|
+
|
|
8
|
+
- Orchestrator queue and per-agent queue responsibilities.
|
|
9
|
+
|
|
10
|
+
# Trigger Kinds
|
|
11
|
+
|
|
12
|
+
- User message, scheduled job, API event, mdkg queue event, or internal retry.
|
|
13
|
+
|
|
14
|
+
# Sandbox Requirements
|
|
15
|
+
|
|
16
|
+
- Lease refs, workspace bounds, cleanup, and metering requirements.
|
|
17
|
+
|
|
18
|
+
# SecretGrant Requirements
|
|
19
|
+
|
|
20
|
+
- Opaque refs and allowed consumers only.
|
|
21
|
+
|
|
22
|
+
# Single-Writer Keys
|
|
23
|
+
|
|
24
|
+
- Repo, graph, branch, or room keys that serialize writes.
|
|
25
|
+
|
|
26
|
+
# Receipts
|
|
27
|
+
|
|
28
|
+
- AttemptReceipt contract.
|
|
29
|
+
- ValidationReceipt contract.
|
|
30
|
+
- FinalReceipt contract.
|
|
31
|
+
|
|
32
|
+
# Cancellation And Retry
|
|
33
|
+
|
|
34
|
+
- Cancellation, retry, backoff, dead-letter, and finalization policy.
|
|
35
|
+
|
|
36
|
+
# Telemetry Policy
|
|
37
|
+
|
|
38
|
+
- Aggregate-safe stats and improvement proposals only unless a runtime spec says
|
|
39
|
+
otherwise.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project Role
|
|
7
|
+
|
|
8
|
+
Describe the repo/service responsibility and non-authorities.
|
|
9
|
+
|
|
10
|
+
# Canonical Repo
|
|
11
|
+
|
|
12
|
+
- Local path:
|
|
13
|
+
- Remote:
|
|
14
|
+
- Default branch:
|
|
15
|
+
|
|
16
|
+
# Owned Capabilities
|
|
17
|
+
|
|
18
|
+
- Capability ids and optional draft Omni URIs.
|
|
19
|
+
|
|
20
|
+
# Integration Boundaries
|
|
21
|
+
|
|
22
|
+
- Upstream/downstream repos and APIs.
|
|
23
|
+
|
|
24
|
+
# Validation Checks
|
|
25
|
+
|
|
26
|
+
- Build, test, mdkg, security, and release gates.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: runtime_image
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Runtime Image
|
|
7
|
+
|
|
8
|
+
Image name, digest policy, base image, and supported commands.
|
|
9
|
+
|
|
10
|
+
# Resource Profile
|
|
11
|
+
|
|
12
|
+
- CPU, memory, storage, network, and sandbox assumptions.
|
|
13
|
+
|
|
14
|
+
# Secrets And Mounts
|
|
15
|
+
|
|
16
|
+
- Opaque refs only; no raw secret values.
|
|
17
|
+
|
|
18
|
+
# Conformance Checks
|
|
19
|
+
|
|
20
|
+
- Build, scan, smoke, and cleanup proof.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: base.SPEC.md
|
|
3
|
+
template_kind: tool
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tool Identity
|
|
7
|
+
|
|
8
|
+
Name, command/API surface, and owner.
|
|
9
|
+
|
|
10
|
+
# Allowed Operations
|
|
11
|
+
|
|
12
|
+
- Operations and parameters.
|
|
13
|
+
|
|
14
|
+
# Required Policy Context
|
|
15
|
+
|
|
16
|
+
- Auth, sandbox, path, network, and secret boundaries.
|
|
17
|
+
|
|
18
|
+
# Failure Modes
|
|
19
|
+
|
|
20
|
+
- Expected errors and retry behavior.
|
|
21
|
+
|
|
22
|
+
# Audit Events
|
|
23
|
+
|
|
24
|
+
- Events or receipts emitted by tool use.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdkg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Markdown Knowledge Graph",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"smoke:capabilities": "npm run build && node scripts/smoke-capabilities.js",
|
|
19
19
|
"smoke:db": "npm run build && node scripts/smoke-db.js",
|
|
20
20
|
"smoke:db-queue": "npm run build && node scripts/smoke-db-queue.js",
|
|
21
|
+
"smoke:db-queue-cli": "npm run build && node scripts/smoke-db-queue-cli.js",
|
|
21
22
|
"smoke:db-events": "npm run build && node scripts/smoke-db-events.js",
|
|
22
23
|
"smoke:db-materializer": "npm run build && node scripts/smoke-db-materializer.js",
|
|
23
24
|
"smoke:db-snapshot": "npm run build && node scripts/smoke-db-snapshot.js",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"cli:snapshot": "npm run build && node scripts/cli_help_snapshot.js",
|
|
32
33
|
"cli:check": "npm run build && node scripts/cli_help_snapshot.js --check",
|
|
33
34
|
"prepack": "npm run build && node scripts/assert-publish-ready.js",
|
|
34
|
-
"prepublishOnly": "npm run test && npm run cli:check && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:bundle && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
|
|
35
|
+
"prepublishOnly": "npm run test && npm run cli:check && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:bundle && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
|
|
35
36
|
"postinstall": "node scripts/postinstall.js",
|
|
36
37
|
"smoke:subgraph": "npm run build && node scripts/smoke-subgraph.js"
|
|
37
38
|
},
|