@structured-vibe-coding/core 0.17.2 → 0.18.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 (31) hide show
  1. package/defaults/prices.yaml +9 -0
  2. package/defaults/search.yaml +18 -0
  3. package/dist/{agents-RWYBLZQE.js → agents-AKSUXQHN.js} +18 -7
  4. package/dist/{change-context-W4HDO2IK.js → change-context-REE7UKU7.js} +2 -4
  5. package/dist/chunk-44LQ5BKZ.js +2628 -0
  6. package/dist/{chunk-KYWETNFU.js → chunk-4BRO7BOJ.js} +2 -4
  7. package/dist/chunk-4PIRWYRA.js +1125 -0
  8. package/dist/{chunk-7JLDL2OK.js → chunk-LHSR7JG2.js} +569 -39
  9. package/dist/{chunk-EPFURATC.js → chunk-O5SP6X5R.js} +89 -0
  10. package/dist/{chunk-74OGSVJZ.js → chunk-QGP43XCN.js} +2 -2
  11. package/dist/{chunk-A752UVPF.js → chunk-QHV5KZKX.js} +193 -28
  12. package/dist/{gather-BZDW4EN4.js → gather-ZNV2NAUN.js} +3 -4
  13. package/dist/{greenfield-Z425JOMP.js → greenfield-I5S5OS2D.js} +5 -6
  14. package/dist/index.d.ts +1034 -40
  15. package/dist/index.js +2927 -988
  16. package/dist/{sources-PF45EUH2.js → sources-3TXUPU6V.js} +2 -3
  17. package/package.json +11 -3
  18. package/vendor/tree-sitter/NOTICE +29 -0
  19. package/vendor/tree-sitter/tree-sitter-javascript.wasm +0 -0
  20. package/vendor/tree-sitter/tree-sitter-python.wasm +0 -0
  21. package/vendor/tree-sitter/tree-sitter-rust.wasm +0 -0
  22. package/vendor/tree-sitter/tree-sitter-tsx.wasm +0 -0
  23. package/vendor/tree-sitter/tree-sitter-typescript.wasm +0 -0
  24. package/dist/chunk-67AUAGNV.js +0 -150
  25. package/dist/chunk-7MJYPJMR.js +0 -51
  26. package/dist/chunk-P3N67UEZ.js +0 -538
  27. package/dist/chunk-R5WQN4HA.js +0 -139
  28. package/dist/chunk-WHDG6OTG.js +0 -46
  29. package/dist/config-X5VDBVR4.js +0 -16
  30. package/dist/fs-J6DIV6CX.js +0 -28
  31. package/dist/paths-64GA32IZ.js +0 -28
@@ -8,9 +8,8 @@ import {
8
8
  mcpConfigPath,
9
9
  removeMcpSource,
10
10
  saveMcpConfig
11
- } from "./chunk-KYWETNFU.js";
12
- import "./chunk-7MJYPJMR.js";
13
- import "./chunk-EPFURATC.js";
11
+ } from "./chunk-4BRO7BOJ.js";
12
+ import "./chunk-O5SP6X5R.js";
14
13
  export {
15
14
  addMcpSource,
16
15
  defaultMcpConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structured-vibe-coding/core",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
4
4
  "description": "Core engine for sdd — Spec-Driven Development workflows, change packs, greenfield, and AI agent handoff (used by the sdd CLI)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,20 +14,28 @@
14
14
  "files": [
15
15
  "dist",
16
16
  "defaults",
17
+ "vendor",
17
18
  "README.md"
18
19
  ],
19
20
  "dependencies": {
20
- "@modelcontextprotocol/sdk": "^1.30.0",
21
+ "@modelcontextprotocol/sdk": "^1.31.0",
22
+ "better-sqlite3": "12.8.0",
23
+ "fastembed": "3.0.0",
24
+ "gpt-tokenizer": "4.0.3",
25
+ "ignore": "7.0.12",
21
26
  "pathe": "^2.0.3",
27
+ "sqlite-vec": "0.1.9",
22
28
  "typescript": "^5.8.2",
29
+ "web-tree-sitter": "0.27.1",
23
30
  "yaml": "^2.7.0",
24
31
  "zod": "^3.24.2"
25
32
  },
26
33
  "devDependencies": {
34
+ "@types/better-sqlite3": "7.6.13",
27
35
  "@types/node": "^22.13.10",
28
36
  "tsup": "^8.4.0",
29
37
  "typescript": "^5.8.2",
30
- "vitest": "^3.0.8"
38
+ "vitest": "^4.1.11"
31
39
  },
32
40
  "engines": {
33
41
  "node": ">=24"
@@ -0,0 +1,29 @@
1
+ tree-sitter-javascript.wasm
2
+ package: tree-sitter-javascript
3
+ version: 0.25.0
4
+ spdx: MIT
5
+ upstream: https://github.com/tree-sitter/tree-sitter-javascript
6
+
7
+ tree-sitter-python.wasm
8
+ package: tree-sitter-python
9
+ version: 0.25.0
10
+ spdx: MIT
11
+ upstream: https://github.com/tree-sitter/tree-sitter-python
12
+
13
+ tree-sitter-rust.wasm
14
+ package: tree-sitter-rust
15
+ version: 0.24.0
16
+ spdx: MIT
17
+ upstream: https://github.com/tree-sitter/tree-sitter-rust
18
+
19
+ tree-sitter-typescript.wasm
20
+ package: tree-sitter-typescript
21
+ version: 0.23.2
22
+ spdx: MIT
23
+ upstream: https://github.com/tree-sitter/tree-sitter-typescript
24
+
25
+ tree-sitter-tsx.wasm
26
+ package: tree-sitter-typescript
27
+ version: 0.23.2
28
+ spdx: MIT
29
+ upstream: https://github.com/tree-sitter/tree-sitter-typescript
@@ -1,150 +0,0 @@
1
- // src/schemas.ts
2
- import { z } from "zod";
3
- var GateSchema = z.object({
4
- type: z.enum(["none", "soft", "hard"]).default("soft"),
5
- mode: z.enum(["none", "human_approval", "checklist"]).default("checklist"),
6
- checklist: z.array(z.string()).default([]),
7
- overridable: z.boolean().default(true)
8
- });
9
- var ArtifactDefSchema = z.object({
10
- id: z.string(),
11
- path: z.string(),
12
- template: z.string().optional(),
13
- required: z.boolean().default(true)
14
- });
15
- var VerifyCommandSchema = z.object({
16
- name: z.string(),
17
- run: z.string(),
18
- required: z.boolean().default(false)
19
- });
20
- var StageSchema = z.object({
21
- id: z.string(),
22
- title: z.string().optional(),
23
- summary: z.string().optional(),
24
- /**
25
- * standard — normal work stage
26
- * brainstorm — optional multi-approach exploration (before design)
27
- * clarify — optional Q&A before leaving a major stage
28
- */
29
- kind: z.enum(["standard", "brainstorm", "clarify"]).default("standard"),
30
- /** When true, stage is optional (skippable); agents may skip if not needed */
31
- optional: z.boolean().default(false),
32
- artifacts: z.array(ArtifactDefSchema).default([]),
33
- gate: GateSchema.default({}),
34
- skippable: z.boolean().default(true),
35
- skip_when: z.object({
36
- flags: z.array(z.string()).optional()
37
- }).optional(),
38
- verify: z.object({
39
- commands: z.array(VerifyCommandSchema).default([]),
40
- evidence_dir: z.string().optional()
41
- }).optional(),
42
- agent_context: z.object({
43
- include: z.array(z.string()).default([]),
44
- instructions: z.string().optional()
45
- }).optional()
46
- });
47
- var WorkflowSchema = z.object({
48
- name: z.string(),
49
- description: z.string().optional(),
50
- version: z.number().default(1),
51
- stages: z.array(StageSchema).min(1),
52
- recommendation: z.object({
53
- when: z.object({
54
- labels: z.array(z.string()).optional(),
55
- keywords: z.array(z.string()).optional(),
56
- max_complexity: z.enum(["low", "medium", "high"]).optional(),
57
- min_complexity: z.enum(["low", "medium", "high"]).optional()
58
- }).optional(),
59
- priority: z.number().default(0)
60
- }).optional(),
61
- on_complete: z.object({
62
- archive: z.boolean().default(false),
63
- domain_sync: z.enum(["never", "recommend", "require"]).default("never")
64
- }).optional()
65
- });
66
- var ConfigSchema = z.object({
67
- version: z.number().default(1),
68
- memory_path: z.string().default("memory"),
69
- changes_path: z.string().default("changes"),
70
- archive_path: z.string().default("archive"),
71
- domains_path: z.string().default("domains"),
72
- default_workflow: z.string().default("recommend"),
73
- allowed_workflows: z.array(z.string()).optional(),
74
- per_change: z.object({
75
- allow_skip: z.boolean().default(true),
76
- allow_gate_override: z.enum(["true", "false", "soft_only"]).default("soft_only"),
77
- allow_custom_stages: z.boolean().default(true),
78
- require_reason_on_skip: z.boolean().default(true)
79
- }).default({}),
80
- persistence: z.object({
81
- default: z.enum(["change_only", "domain_sync"]).default("change_only"),
82
- archive_on_complete: z.boolean().default(false),
83
- domain_sync: z.object({
84
- mode: z.enum(["never", "recommend", "require"]).default("never"),
85
- anchored_domains: z.array(z.string()).default([])
86
- }).default({})
87
- }).default({}),
88
- policy: z.object({
89
- gates: z.enum(["soft", "hard"]).default("soft")
90
- }).default({})
91
- });
92
- var ChangeMetaSchema = z.object({
93
- id: z.string(),
94
- title: z.string(),
95
- workflow: z.string(),
96
- created: z.string(),
97
- updated: z.string().optional(),
98
- status: z.enum(["in_progress", "blocked", "completed", "abandoned"]).default("in_progress"),
99
- stage: z.string(),
100
- branch: z.string().optional(),
101
- domain: z.string().optional(),
102
- flags: z.record(z.union([z.boolean(), z.string(), z.number()])).default({}),
103
- overrides: z.object({
104
- skip_stages: z.array(z.string()).default([]),
105
- gates: z.record(z.enum(["none", "soft", "hard"])).default({}),
106
- extra_stages: z.array(StageSchema).default([])
107
- }).default({}),
108
- skipped: z.array(
109
- z.object({
110
- stage: z.string(),
111
- reason: z.string(),
112
- at: z.string()
113
- })
114
- ).default([]),
115
- gates: z.record(
116
- z.object({
117
- status: z.enum(["pending", "approved", "failed", "waived"]),
118
- note: z.string().optional(),
119
- at: z.string().optional()
120
- })
121
- ).default({}),
122
- /** Results from `sdd verify` keyed by stage id */
123
- verify_results: z.record(
124
- z.object({
125
- ok: z.boolean(),
126
- at: z.string(),
127
- results: z.array(
128
- z.object({
129
- name: z.string(),
130
- exitCode: z.number().nullable()
131
- })
132
- ).default([])
133
- })
134
- ).default({}),
135
- pr: z.object({
136
- number: z.number().optional(),
137
- url: z.string().optional()
138
- }).optional(),
139
- completed_at: z.string().optional()
140
- });
141
-
142
- export {
143
- GateSchema,
144
- ArtifactDefSchema,
145
- VerifyCommandSchema,
146
- StageSchema,
147
- WorkflowSchema,
148
- ConfigSchema,
149
- ChangeMetaSchema
150
- };
@@ -1,51 +0,0 @@
1
- // src/paths.ts
2
- import { join } from "pathe";
3
- var SDD_DIR = ".sdd";
4
- function sddRoot(projectRoot) {
5
- return join(projectRoot, SDD_DIR);
6
- }
7
- function configPath(projectRoot) {
8
- return join(sddRoot(projectRoot), "config.yaml");
9
- }
10
- function workflowsDir(projectRoot) {
11
- return join(sddRoot(projectRoot), "workflows");
12
- }
13
- function templatesDir(projectRoot) {
14
- return join(sddRoot(projectRoot), "templates");
15
- }
16
- function memoryDir(projectRoot, config) {
17
- return join(projectRoot, config.memory_path);
18
- }
19
- function changesDir(projectRoot, config) {
20
- return join(projectRoot, config.changes_path);
21
- }
22
- function archiveDir(projectRoot, config) {
23
- return join(projectRoot, config.archive_path);
24
- }
25
- function domainsDir(projectRoot, config) {
26
- return join(projectRoot, config.domains_path);
27
- }
28
- function changePath(projectRoot, config, changeId) {
29
- return join(changesDir(projectRoot, config), changeId);
30
- }
31
- function changeMetaPath(projectRoot, config, changeId) {
32
- return join(changePath(projectRoot, config, changeId), "meta.yaml");
33
- }
34
- function activePointerPath(projectRoot, config) {
35
- return join(changesDir(projectRoot, config), ".active");
36
- }
37
-
38
- export {
39
- SDD_DIR,
40
- sddRoot,
41
- configPath,
42
- workflowsDir,
43
- templatesDir,
44
- memoryDir,
45
- changesDir,
46
- archiveDir,
47
- domainsDir,
48
- changePath,
49
- changeMetaPath,
50
- activePointerPath
51
- };