@quolu/lattice 0.52.4 → 0.53.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.
Files changed (59) hide show
  1. package/LICENSE +147 -147
  2. package/README.ja.md +355 -355
  3. package/README.md +258 -258
  4. package/bin/lattice-bridge.mjs +25 -0
  5. package/bin/lattice-hub.mjs +67 -0
  6. package/bin/lattice-mcp.mjs +0 -0
  7. package/bin/lattice-scripted-adapter.mjs +0 -0
  8. package/bin/lattice-scripted-worker.mjs +0 -0
  9. package/bin/lattice-work-order-adapter.mjs +0 -0
  10. package/bin/lattice.mjs +0 -0
  11. package/docs/bridge-setup.md +132 -132
  12. package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
  13. package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
  14. package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
  15. package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
  16. package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
  17. package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
  18. package/docs/schemas/lattice.plan_create_input.v4.schema.json +85 -85
  19. package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
  20. package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
  21. package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
  22. package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
  23. package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
  24. package/docs/schemas/lattice.todo_extraction.v3.schema.json +146 -146
  25. package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
  26. package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
  27. package/package.json +103 -103
  28. package/sensor/LICENSE +21 -21
  29. package/sensor/NOTICE +19 -19
  30. package/sensor/dist/bin/lattice-sensor.js +9 -9
  31. package/sensor/dist/db/index.js +24 -24
  32. package/sensor/dist/db/migrations.js +41 -41
  33. package/sensor/dist/db/queries.js +164 -164
  34. package/sensor/dist/db/schema.sql +205 -205
  35. package/sensor/dist/directory.js +5 -5
  36. package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  37. package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  38. package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  39. package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  40. package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  41. package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  42. package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  43. package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  44. package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  45. package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  46. package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  47. package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  48. package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  49. package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  50. package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  51. package/sensor/dist/mcp/liveness-watchdog.js +53 -53
  52. package/sensor/dist/mcp/server-instructions.js +95 -95
  53. package/sensor/package.json +56 -56
  54. package/src/bridge-cli.mjs +11 -5
  55. package/src/bridge-config.mjs +41 -5
  56. package/src/bridge-hub-heartbeat.mjs +170 -0
  57. package/src/bridge-hub-server.mjs +544 -0
  58. package/src/cli-help.mjs +4 -4
  59. package/src/todo-store.mjs +1 -1
@@ -1,85 +1,85 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/kitepon-rgb/Lattice/blob/main/docs/schemas/lattice.plan_create_input.v4.schema.json",
4
- "title": "lattice.plan_create_input.v4",
5
- "description": "Canonical initial authoring input for a phase-audited plan. Every task requires a design memo. あなたがこのToDoに対して、何も考えていないならば、設計メモに `NO_PLAN` と書いてください",
6
- "$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers and edges, unique ids, combined task/phase acyclicity, byte bounds, non-empty design_memo, and input_digest.",
7
- "type": "object",
8
- "additionalProperties": false,
9
- "required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "phase_accept_dependencies", "input_digest"],
10
- "properties": {
11
- "schema": { "const": "lattice.plan_create_input.v4" },
12
- "project_id": { "$ref": "#/$defs/identifier" },
13
- "plan_key": { "$ref": "#/$defs/identifier" },
14
- "plan_version": { "$ref": "#/$defs/identifier" },
15
- "actor": { "$ref": "#/$defs/actor" },
16
- "recorded_at": { "$ref": "#/$defs/strictTimestamp" },
17
- "tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
18
- "phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
19
- "hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
20
- "joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
21
- "phase_accept_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/phaseAcceptDependency" } },
22
- "input_digest": { "$ref": "#/$defs/digest" }
23
- },
24
- "$defs": {
25
- "identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
26
- "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
27
- "repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
28
- "strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
29
- "nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
30
- "nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
31
- "actor": {
32
- "type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
33
- "properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
34
- },
35
- "task": {
36
- "type": "object", "additionalProperties": false,
37
- "required": ["task_id", "title", "lane", "design_memo", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
38
- "properties": {
39
- "task_id": { "$ref": "#/$defs/identifier" },
40
- "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
41
- "lane": { "$ref": "#/$defs/identifier" },
42
- "design_memo": {
43
- "type": "string", "minLength": 1, "maxLength": 16384,
44
- "description": "Markdown design memo. あなたがこのToDoに対して、何も考えていないならば、設計メモに `NO_PLAN` と書いてください"
45
- },
46
- "narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
47
- "narrative_anchor": { "type": "null" },
48
- "compile_binding": { "type": "null" },
49
- "parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
50
- "phase_id": { "$ref": "#/$defs/identifier" }
51
- }
52
- },
53
- "phase": {
54
- "type": "object", "additionalProperties": false,
55
- "required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
56
- "properties": {
57
- "phase_id": { "$ref": "#/$defs/identifier" },
58
- "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
59
- "gate_policy": { "$ref": "#/$defs/identifier" },
60
- "predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
61
- "required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
62
- }
63
- },
64
- "nodeRef": {
65
- "type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
66
- "properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
67
- },
68
- "phaseRef": {
69
- "type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "phase_id"],
70
- "properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "phase_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
71
- },
72
- "edge": {
73
- "type": "object", "additionalProperties": false, "required": ["from", "to"],
74
- "properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
75
- },
76
- "phaseAcceptDependency": {
77
- "type": "object", "additionalProperties": false, "required": ["from", "to"],
78
- "properties": { "from": { "$ref": "#/$defs/phaseRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
79
- },
80
- "join": {
81
- "type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
82
- "properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
83
- }
84
- }
85
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/kitepon-rgb/Lattice/blob/main/docs/schemas/lattice.plan_create_input.v4.schema.json",
4
+ "title": "lattice.plan_create_input.v4",
5
+ "description": "Canonical initial authoring input for a phase-audited plan. Every task requires a design memo. あなたがこのToDoに対して、何も考えていないならば、設計メモに `NO_PLAN` と書いてください",
6
+ "$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers and edges, unique ids, combined task/phase acyclicity, byte bounds, non-empty design_memo, and input_digest.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "phase_accept_dependencies", "input_digest"],
10
+ "properties": {
11
+ "schema": { "const": "lattice.plan_create_input.v4" },
12
+ "project_id": { "$ref": "#/$defs/identifier" },
13
+ "plan_key": { "$ref": "#/$defs/identifier" },
14
+ "plan_version": { "$ref": "#/$defs/identifier" },
15
+ "actor": { "$ref": "#/$defs/actor" },
16
+ "recorded_at": { "$ref": "#/$defs/strictTimestamp" },
17
+ "tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
18
+ "phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
19
+ "hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
20
+ "joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
21
+ "phase_accept_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/phaseAcceptDependency" } },
22
+ "input_digest": { "$ref": "#/$defs/digest" }
23
+ },
24
+ "$defs": {
25
+ "identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
26
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
27
+ "repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
28
+ "strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
29
+ "nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
30
+ "nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
31
+ "actor": {
32
+ "type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
33
+ "properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
34
+ },
35
+ "task": {
36
+ "type": "object", "additionalProperties": false,
37
+ "required": ["task_id", "title", "lane", "design_memo", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
38
+ "properties": {
39
+ "task_id": { "$ref": "#/$defs/identifier" },
40
+ "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
41
+ "lane": { "$ref": "#/$defs/identifier" },
42
+ "design_memo": {
43
+ "type": "string", "minLength": 1, "maxLength": 16384,
44
+ "description": "Markdown design memo. あなたがこのToDoに対して、何も考えていないならば、設計メモに `NO_PLAN` と書いてください"
45
+ },
46
+ "narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
47
+ "narrative_anchor": { "type": "null" },
48
+ "compile_binding": { "type": "null" },
49
+ "parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
50
+ "phase_id": { "$ref": "#/$defs/identifier" }
51
+ }
52
+ },
53
+ "phase": {
54
+ "type": "object", "additionalProperties": false,
55
+ "required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
56
+ "properties": {
57
+ "phase_id": { "$ref": "#/$defs/identifier" },
58
+ "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
59
+ "gate_policy": { "$ref": "#/$defs/identifier" },
60
+ "predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
61
+ "required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
62
+ }
63
+ },
64
+ "nodeRef": {
65
+ "type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
66
+ "properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
67
+ },
68
+ "phaseRef": {
69
+ "type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "phase_id"],
70
+ "properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "phase_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
71
+ },
72
+ "edge": {
73
+ "type": "object", "additionalProperties": false, "required": ["from", "to"],
74
+ "properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
75
+ },
76
+ "phaseAcceptDependency": {
77
+ "type": "object", "additionalProperties": false, "required": ["from", "to"],
78
+ "properties": { "from": { "$ref": "#/$defs/phaseRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
79
+ },
80
+ "join": {
81
+ "type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
82
+ "properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
83
+ }
84
+ }
85
+ }