sudocode 1.1.1 → 1.1.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 +4 -3
- package/package.json +8 -38
- package/build.js +0 -75
- package/node_modules/@sudocode-ai/cli/README.md +0 -330
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts +0 -53
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js +0 -274
- package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts +0 -22
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js +0 -148
- package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts +0 -45
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js +0 -310
- package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts +0 -18
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js +0 -61
- package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts +0 -22
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js +0 -136
- package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts +0 -14
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js +0 -76
- package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts +0 -17
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js +0 -99
- package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts +0 -38
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js +0 -321
- package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts +0 -17
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js +0 -131
- package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts +0 -24
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js +0 -416
- package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts +0 -12
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js +0 -78
- package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli.d.ts +0 -6
- package/node_modules/@sudocode-ai/cli/dist/cli.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/cli.js +0 -426
- package/node_modules/@sudocode-ai/cli/dist/cli.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/db.d.ts +0 -21
- package/node_modules/@sudocode-ai/cli/dist/db.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/db.js +0 -54
- package/node_modules/@sudocode-ai/cli/dist/db.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/export.d.ts +0 -79
- package/node_modules/@sudocode-ai/cli/dist/export.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/export.js +0 -195
- package/node_modules/@sudocode-ai/cli/dist/export.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts +0 -30
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.js +0 -93
- package/node_modules/@sudocode-ai/cli/dist/filename-generator.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts +0 -26
- package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/id-generator.js +0 -123
- package/node_modules/@sudocode-ai/cli/dist/id-generator.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/import.d.ts +0 -118
- package/node_modules/@sudocode-ai/cli/dist/import.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/import.js +0 -608
- package/node_modules/@sudocode-ai/cli/dist/import.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/index.d.ts +0 -13
- package/node_modules/@sudocode-ai/cli/dist/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/index.js +0 -13
- package/node_modules/@sudocode-ai/cli/dist/index.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts +0 -69
- package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/jsonl.js +0 -333
- package/node_modules/@sudocode-ai/cli/dist/jsonl.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts +0 -146
- package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/markdown.js +0 -357
- package/node_modules/@sudocode-ai/cli/dist/markdown.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/migrations.d.ts +0 -23
- package/node_modules/@sudocode-ai/cli/dist/migrations.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/migrations.js +0 -57
- package/node_modules/@sudocode-ai/cli/dist/migrations.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts +0 -53
- package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/events.js +0 -108
- package/node_modules/@sudocode-ai/cli/dist/operations/events.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts +0 -92
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js +0 -444
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts +0 -76
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js +0 -234
- package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts +0 -10
- package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/index.js +0 -10
- package/node_modules/@sudocode-ai/cli/dist/operations/index.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts +0 -82
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.js +0 -411
- package/node_modules/@sudocode-ai/cli/dist/operations/issues.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts +0 -34
- package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/references.js +0 -117
- package/node_modules/@sudocode-ai/cli/dist/operations/references.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts +0 -57
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js +0 -236
- package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts +0 -64
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.js +0 -290
- package/node_modules/@sudocode-ai/cli/dist/operations/specs.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts +0 -42
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.js +0 -127
- package/node_modules/@sudocode-ai/cli/dist/operations/tags.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts +0 -41
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js +0 -111
- package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/sync.d.ts +0 -47
- package/node_modules/@sudocode-ai/cli/dist/sync.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/sync.js +0 -442
- package/node_modules/@sudocode-ai/cli/dist/sync.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts +0 -5
- package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/test-schema.js +0 -46
- package/node_modules/@sudocode-ai/cli/dist/test-schema.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/types.d.ts +0 -7
- package/node_modules/@sudocode-ai/cli/dist/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/types.js +0 -7
- package/node_modules/@sudocode-ai/cli/dist/types.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts +0 -24
- package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/update-checker.js +0 -151
- package/node_modules/@sudocode-ai/cli/dist/update-checker.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/version.d.ts +0 -12
- package/node_modules/@sudocode-ai/cli/dist/version.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/version.js +0 -23
- package/node_modules/@sudocode-ai/cli/dist/version.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts +0 -63
- package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/cli/dist/watcher.js +0 -438
- package/node_modules/@sudocode-ai/cli/dist/watcher.js.map +0 -1
- package/node_modules/@sudocode-ai/cli/package.json +0 -65
- package/node_modules/@sudocode-ai/local-server/README.md +0 -19
- package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/cli.js +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/cli.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/engine.d.ts +0 -103
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/engine.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/engine.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/engine.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/simple-engine.d.ts +0 -190
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/simple-engine.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/simple-engine.js +0 -611
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/simple-engine.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/types.d.ts +0 -116
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/types.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/engine/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.d.ts +0 -176
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.js +0 -438
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-adapter.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-integration.d.ts +0 -96
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-integration.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-integration.js +0 -96
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/ag-ui-integration.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-code-output-processor.d.ts +0 -321
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-code-output-processor.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-code-output-processor.js +0 -769
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/claude-code-output-processor.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts +0 -18
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js +0 -15
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts +0 -421
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js +0 -22
- package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts +0 -86
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js +0 -59
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/index.d.ts +0 -15
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/index.js +0 -15
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/manager.d.ts +0 -133
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/manager.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/manager.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/manager.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/simple-manager.d.ts +0 -102
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/simple-manager.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/simple-manager.js +0 -336
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/simple-manager.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/types.d.ts +0 -105
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/types.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/utils.d.ts +0 -53
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/utils.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/utils.js +0 -97
- package/node_modules/@sudocode-ai/local-server/dist/execution/process/utils.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/circuit-breaker.d.ts +0 -170
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/circuit-breaker.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/circuit-breaker.js +0 -291
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/circuit-breaker.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/executor.d.ts +0 -109
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/executor.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/executor.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/executor.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/index.d.ts +0 -14
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/index.js +0 -15
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/resilient-executor.d.ts +0 -86
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/resilient-executor.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/resilient-executor.js +0 -261
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/resilient-executor.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/retry.d.ts +0 -161
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/retry.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/retry.js +0 -234
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/retry.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/types.d.ts +0 -226
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/types.js +0 -30
- package/node_modules/@sudocode-ai/local-server/dist/execution/resilience/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.d.ts +0 -119
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.js +0 -208
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/event-buffer.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.d.ts +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.js +0 -10
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.d.ts +0 -146
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.js +0 -282
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/sse-transport.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.d.ts +0 -176
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.js +0 -231
- package/node_modules/@sudocode-ai/local-server/dist/execution/transport/transport-manager.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/index.d.ts +0 -13
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/index.js +0 -13
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/linear-orchestrator.d.ts +0 -216
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/linear-orchestrator.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/linear-orchestrator.js +0 -683
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/linear-orchestrator.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/memory-storage.d.ts +0 -54
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/memory-storage.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/memory-storage.js +0 -68
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/memory-storage.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/orchestrator.d.ts +0 -158
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/orchestrator.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/orchestrator.js +0 -9
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/orchestrator.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/types.d.ts +0 -172
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/types.js +0 -9
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/utils.d.ts +0 -89
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/utils.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/utils.js +0 -152
- package/node_modules/@sudocode-ai/local-server/dist/execution/workflow/utils.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts +0 -74
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js +0 -280
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts +0 -151
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js +0 -189
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts +0 -16
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js +0 -15
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts +0 -184
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js +0 -452
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts +0 -90
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js +0 -42
- package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/index.d.ts +0 -8
- package/node_modules/@sudocode-ai/local-server/dist/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/index.js +0 -356
- package/node_modules/@sudocode-ai/local-server/dist/index.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-C4SmlXoo.js +0 -568
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-C4SmlXoo.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-DE59j7ti.css +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-LX0UoTxg.js +0 -60
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-LX0UoTxg.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-_cxVHaqZ.js +0 -54
- package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-_cxVHaqZ.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/public/favicon.ico +0 -0
- package/node_modules/@sudocode-ai/local-server/dist/public/index.html +0 -16
- package/node_modules/@sudocode-ai/local-server/dist/public/logo.png +0 -0
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.d.ts +0 -24
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.js +0 -55
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions-stream.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts +0 -19
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js +0 -267
- package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js +0 -329
- package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js +0 -280
- package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js +0 -308
- package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts +0 -7
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js +0 -270
- package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts +0 -33
- package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/db.js +0 -85
- package/node_modules/@sudocode-ai/local-server/dist/services/db.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts +0 -108
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js +0 -286
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts +0 -185
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js +0 -676
- package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts +0 -59
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.js +0 -164
- package/node_modules/@sudocode-ai/local-server/dist/services/executions.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts +0 -24
- package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/export.js +0 -106
- package/node_modules/@sudocode-ai/local-server/dist/services/export.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts +0 -40
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js +0 -54
- package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts +0 -27
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.js +0 -35
- package/node_modules/@sudocode-ai/local-server/dist/services/issues.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts +0 -108
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js +0 -212
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts +0 -97
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js +0 -236
- package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts +0 -35
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js +0 -42
- package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts +0 -27
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.js +0 -35
- package/node_modules/@sudocode-ai/local-server/dist/services/specs.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts +0 -50
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js +0 -69
- package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts +0 -127
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js +0 -389
- package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts +0 -6
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js +0 -9
- package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js.map +0 -1
- package/node_modules/@sudocode-ai/local-server/package.json +0 -72
- package/node_modules/@sudocode-ai/mcp/LICENSE +0 -21
- package/node_modules/@sudocode-ai/mcp/README.md +0 -226
- package/node_modules/@sudocode-ai/mcp/dist/client.d.ts +0 -33
- package/node_modules/@sudocode-ai/mcp/dist/client.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/client.js +0 -159
- package/node_modules/@sudocode-ai/mcp/dist/client.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/index.d.ts +0 -6
- package/node_modules/@sudocode-ai/mcp/dist/index.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/index.js +0 -64
- package/node_modules/@sudocode-ai/mcp/dist/index.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/server.d.ts +0 -26
- package/node_modules/@sudocode-ai/mcp/dist/server.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/server.js +0 -575
- package/node_modules/@sudocode-ai/mcp/dist/server.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts +0 -41
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js +0 -21
- package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts +0 -19
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js +0 -24
- package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts +0 -17
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.js +0 -15
- package/node_modules/@sudocode-ai/mcp/dist/tools/init.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts +0 -44
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js +0 -106
- package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts +0 -21
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.js +0 -49
- package/node_modules/@sudocode-ai/mcp/dist/tools/references.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts +0 -15
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js +0 -18
- package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts +0 -35
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js +0 -85
- package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/types.d.ts +0 -35
- package/node_modules/@sudocode-ai/mcp/dist/types.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/mcp/dist/types.js +0 -21
- package/node_modules/@sudocode-ai/mcp/dist/types.js.map +0 -1
- package/node_modules/@sudocode-ai/mcp/package.json +0 -67
- package/node_modules/@sudocode-ai/types/README.md +0 -7
- package/node_modules/@sudocode-ai/types/dist/schema.d.ts +0 -45
- package/node_modules/@sudocode-ai/types/dist/schema.d.ts.map +0 -1
- package/node_modules/@sudocode-ai/types/dist/schema.js +0 -338
- package/node_modules/@sudocode-ai/types/dist/schema.js.map +0 -1
- package/node_modules/@sudocode-ai/types/package.json +0 -46
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSONL (JSON Lines) reader and writer
|
|
3
|
-
* Supports reading and writing .jsonl files for specs and issues
|
|
4
|
-
*/
|
|
5
|
-
import type { SpecJSONL, IssueJSONL } from "./types.js";
|
|
6
|
-
export type JSONLEntity = SpecJSONL | IssueJSONL | Record<string, any>;
|
|
7
|
-
export interface ReadJSONLOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Skip malformed lines instead of throwing
|
|
10
|
-
*/
|
|
11
|
-
skipErrors?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Custom error handler for malformed lines
|
|
14
|
-
*/
|
|
15
|
-
onError?: (lineNumber: number, line: string, error: Error) => void;
|
|
16
|
-
}
|
|
17
|
-
export interface WriteJSONLOptions {
|
|
18
|
-
/**
|
|
19
|
-
* Use atomic write (write to temp file, then rename)
|
|
20
|
-
*/
|
|
21
|
-
atomic?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Read a JSONL file and parse all lines
|
|
25
|
-
* Uses streaming for memory efficiency with large files
|
|
26
|
-
*/
|
|
27
|
-
export declare function readJSONL<T extends JSONLEntity = JSONLEntity>(filePath: string, options?: ReadJSONLOptions): Promise<T[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Read a JSONL file synchronously (for smaller files)
|
|
30
|
-
*/
|
|
31
|
-
export declare function readJSONLSync<T extends JSONLEntity = JSONLEntity>(filePath: string, options?: ReadJSONLOptions): T[];
|
|
32
|
-
/**
|
|
33
|
-
* Write entities to a JSONL file
|
|
34
|
-
* Each entity is written as a single line of JSON
|
|
35
|
-
* Entities are sorted by created_at date to minimize merge conflicts
|
|
36
|
-
*/
|
|
37
|
-
export declare function writeJSONL<T extends JSONLEntity = JSONLEntity>(filePath: string, entities: T[], options?: WriteJSONLOptions): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Write entities to a JSONL file synchronously
|
|
40
|
-
* Entities are sorted by created_at date to minimize merge conflicts
|
|
41
|
-
*/
|
|
42
|
-
export declare function writeJSONLSync<T extends JSONLEntity = JSONLEntity>(filePath: string, entities: T[], options?: WriteJSONLOptions): void;
|
|
43
|
-
/**
|
|
44
|
-
* Update a single line in a JSONL file by entity ID
|
|
45
|
-
* If the entity doesn't exist, append it
|
|
46
|
-
* If it exists, replace the line
|
|
47
|
-
*/
|
|
48
|
-
export declare function updateJSONLLine<T extends JSONLEntity = JSONLEntity>(filePath: string, entity: T, idField?: string): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Update a single line in a JSONL file synchronously
|
|
51
|
-
*/
|
|
52
|
-
export declare function updateJSONLLineSync<T extends JSONLEntity = JSONLEntity>(filePath: string, entity: T, idField?: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Delete an entity from a JSONL file by ID
|
|
55
|
-
*/
|
|
56
|
-
export declare function deleteJSONLLine<T extends JSONLEntity = JSONLEntity>(filePath: string, entityId: string, idField?: string): Promise<boolean>;
|
|
57
|
-
/**
|
|
58
|
-
* Delete an entity from a JSONL file synchronously
|
|
59
|
-
*/
|
|
60
|
-
export declare function deleteJSONLLineSync<T extends JSONLEntity = JSONLEntity>(filePath: string, entityId: string, idField?: string): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Get a single entity from a JSONL file by ID
|
|
63
|
-
*/
|
|
64
|
-
export declare function getJSONLEntity<T extends JSONLEntity = JSONLEntity>(filePath: string, entityId: string, idField?: string): Promise<T | null>;
|
|
65
|
-
/**
|
|
66
|
-
* Get a single entity from a JSONL file synchronously
|
|
67
|
-
*/
|
|
68
|
-
export declare function getJSONLEntitySync<T extends JSONLEntity = JSONLEntity>(filePath: string, entityId: string, idField?: string): T | null;
|
|
69
|
-
//# sourceMappingURL=jsonl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../src/jsonl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACpE;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,CAAC,SAAS,WAA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,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAa,GACrB,OAAO,CAeT;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACtE,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAa,GACrB,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAGnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACpE,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAa,GACrB,CAAC,GAAG,IAAI,CAGV"}
|
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSONL (JSON Lines) reader and writer
|
|
3
|
-
* Supports reading and writing .jsonl files for specs and issues
|
|
4
|
-
*/
|
|
5
|
-
import * as fs from "fs";
|
|
6
|
-
import * as readline from "readline";
|
|
7
|
-
import * as path from "path";
|
|
8
|
-
/**
|
|
9
|
-
* Read a JSONL file and parse all lines
|
|
10
|
-
* Uses streaming for memory efficiency with large files
|
|
11
|
-
*/
|
|
12
|
-
export async function readJSONL(filePath, options = {}) {
|
|
13
|
-
const { skipErrors = false, onError } = options;
|
|
14
|
-
// Check if file exists
|
|
15
|
-
if (!fs.existsSync(filePath)) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
const entities = [];
|
|
19
|
-
const fileStream = fs.createReadStream(filePath, { encoding: "utf8" });
|
|
20
|
-
const rl = readline.createInterface({
|
|
21
|
-
input: fileStream,
|
|
22
|
-
crlfDelay: Infinity,
|
|
23
|
-
});
|
|
24
|
-
let lineNumber = 0;
|
|
25
|
-
for await (const line of rl) {
|
|
26
|
-
lineNumber++;
|
|
27
|
-
// Skip empty lines
|
|
28
|
-
if (line.trim() === "") {
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
const entity = JSON.parse(line);
|
|
33
|
-
entities.push(entity);
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
const parseError = error;
|
|
37
|
-
if (onError) {
|
|
38
|
-
onError(lineNumber, line, parseError);
|
|
39
|
-
}
|
|
40
|
-
if (!skipErrors) {
|
|
41
|
-
throw new Error(`Failed to parse JSON at line ${lineNumber}: ${parseError.message}`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return entities;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Read a JSONL file synchronously (for smaller files)
|
|
49
|
-
*/
|
|
50
|
-
export function readJSONLSync(filePath, options = {}) {
|
|
51
|
-
const { skipErrors = false, onError } = options;
|
|
52
|
-
// Check if file exists
|
|
53
|
-
if (!fs.existsSync(filePath)) {
|
|
54
|
-
return [];
|
|
55
|
-
}
|
|
56
|
-
const entities = [];
|
|
57
|
-
const content = fs.readFileSync(filePath, "utf8");
|
|
58
|
-
const lines = content.split("\n");
|
|
59
|
-
for (let i = 0; i < lines.length; i++) {
|
|
60
|
-
const line = lines[i].trim();
|
|
61
|
-
const lineNumber = i + 1;
|
|
62
|
-
// Skip empty lines
|
|
63
|
-
if (line === "") {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
const entity = JSON.parse(line);
|
|
68
|
-
entities.push(entity);
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
const parseError = error;
|
|
72
|
-
if (onError) {
|
|
73
|
-
onError(lineNumber, line, parseError);
|
|
74
|
-
}
|
|
75
|
-
if (!skipErrors) {
|
|
76
|
-
throw new Error(`Failed to parse JSON at line ${lineNumber}: ${parseError.message}`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return entities;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Write entities to a JSONL file
|
|
84
|
-
* Each entity is written as a single line of JSON
|
|
85
|
-
* Entities are sorted by created_at date to minimize merge conflicts
|
|
86
|
-
*/
|
|
87
|
-
export async function writeJSONL(filePath, entities, options = {}) {
|
|
88
|
-
const { atomic = true } = options;
|
|
89
|
-
// Ensure directory exists
|
|
90
|
-
const dir = path.dirname(filePath);
|
|
91
|
-
if (!fs.existsSync(dir)) {
|
|
92
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
93
|
-
}
|
|
94
|
-
const targetPath = atomic ? `${filePath}.tmp` : filePath;
|
|
95
|
-
// Sort entities by created_at date to minimize merge conflicts
|
|
96
|
-
const sortedEntities = [...entities].sort((a, b) => {
|
|
97
|
-
const aDate = a.created_at;
|
|
98
|
-
const bDate = b.created_at;
|
|
99
|
-
// Handle missing created_at fields - put them at the end
|
|
100
|
-
if (!aDate && !bDate) {
|
|
101
|
-
// Both missing dates, sort by ID
|
|
102
|
-
const aId = a.id || "";
|
|
103
|
-
const bId = b.id || "";
|
|
104
|
-
return aId < bId ? -1 : aId > bId ? 1 : 0;
|
|
105
|
-
}
|
|
106
|
-
if (!aDate)
|
|
107
|
-
return 1;
|
|
108
|
-
if (!bDate)
|
|
109
|
-
return -1;
|
|
110
|
-
// Compare dates as strings (ISO 8601 format sorts lexicographically)
|
|
111
|
-
if (aDate < bDate)
|
|
112
|
-
return -1;
|
|
113
|
-
if (aDate > bDate)
|
|
114
|
-
return 1;
|
|
115
|
-
// If dates are equal, fall back to ID comparison
|
|
116
|
-
const aId = a.id || "";
|
|
117
|
-
const bId = b.id || "";
|
|
118
|
-
return aId < bId ? -1 : aId > bId ? 1 : 0;
|
|
119
|
-
});
|
|
120
|
-
// Write each entity as a line
|
|
121
|
-
const lines = sortedEntities.map((entity) => JSON.stringify(entity));
|
|
122
|
-
const content = lines.join("\n") + "\n";
|
|
123
|
-
// Check if content has actually changed before writing
|
|
124
|
-
// This prevents unnecessary file writes that trigger watcher events
|
|
125
|
-
if (fs.existsSync(filePath)) {
|
|
126
|
-
const existingContent = fs.readFileSync(filePath, "utf8");
|
|
127
|
-
if (existingContent === content) {
|
|
128
|
-
// Content unchanged, skip write
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
fs.writeFileSync(targetPath, content, "utf8");
|
|
133
|
-
// Atomic rename if requested
|
|
134
|
-
if (atomic) {
|
|
135
|
-
fs.renameSync(targetPath, filePath);
|
|
136
|
-
}
|
|
137
|
-
// Set file modification time to match the newest updated_at timestamp
|
|
138
|
-
// This ensures filesystem mtime reflects content timestamps for accurate sync direction detection
|
|
139
|
-
if (sortedEntities.length > 0) {
|
|
140
|
-
const timestamps = sortedEntities
|
|
141
|
-
.map((e) => e.updated_at)
|
|
142
|
-
.filter((t) => t != null)
|
|
143
|
-
.map((t) => {
|
|
144
|
-
// Append 'Z' if not present to force UTC interpretation
|
|
145
|
-
const timestamp = String(t);
|
|
146
|
-
const hasZone = timestamp.endsWith("Z") ||
|
|
147
|
-
timestamp.includes("+") ||
|
|
148
|
-
/[+-]\d{2}:\d{2}$/.test(timestamp);
|
|
149
|
-
const utcTimestamp = hasZone
|
|
150
|
-
? timestamp
|
|
151
|
-
: timestamp.replace(" ", "T") + "Z";
|
|
152
|
-
return new Date(utcTimestamp).getTime();
|
|
153
|
-
});
|
|
154
|
-
if (timestamps.length > 0) {
|
|
155
|
-
const newestTimestamp = Math.max(...timestamps);
|
|
156
|
-
const mtimeDate = new Date(newestTimestamp);
|
|
157
|
-
fs.utimesSync(filePath, mtimeDate, mtimeDate);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Write entities to a JSONL file synchronously
|
|
163
|
-
* Entities are sorted by created_at date to minimize merge conflicts
|
|
164
|
-
*/
|
|
165
|
-
export function writeJSONLSync(filePath, entities, options = {}) {
|
|
166
|
-
const { atomic = true } = options;
|
|
167
|
-
// Ensure directory exists
|
|
168
|
-
const dir = path.dirname(filePath);
|
|
169
|
-
if (!fs.existsSync(dir)) {
|
|
170
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
171
|
-
}
|
|
172
|
-
const targetPath = atomic ? `${filePath}.tmp` : filePath;
|
|
173
|
-
// Sort entities by created_at date to minimize merge conflicts
|
|
174
|
-
const sortedEntities = [...entities].sort((a, b) => {
|
|
175
|
-
const aDate = a.created_at;
|
|
176
|
-
const bDate = b.created_at;
|
|
177
|
-
// Handle missing created_at fields - put them at the end
|
|
178
|
-
if (!aDate && !bDate) {
|
|
179
|
-
// Both missing dates, sort by ID
|
|
180
|
-
const aId = a.id || "";
|
|
181
|
-
const bId = b.id || "";
|
|
182
|
-
return aId < bId ? -1 : aId > bId ? 1 : 0;
|
|
183
|
-
}
|
|
184
|
-
if (!aDate)
|
|
185
|
-
return 1;
|
|
186
|
-
if (!bDate)
|
|
187
|
-
return -1;
|
|
188
|
-
// Compare dates as strings (ISO 8601 format sorts lexicographically)
|
|
189
|
-
if (aDate < bDate)
|
|
190
|
-
return -1;
|
|
191
|
-
if (aDate > bDate)
|
|
192
|
-
return 1;
|
|
193
|
-
// If dates are equal, fall back to ID comparison
|
|
194
|
-
const aId = a.id || "";
|
|
195
|
-
const bId = b.id || "";
|
|
196
|
-
return aId < bId ? -1 : aId > bId ? 1 : 0;
|
|
197
|
-
});
|
|
198
|
-
// Write each entity as a line
|
|
199
|
-
const lines = sortedEntities.map((entity) => JSON.stringify(entity));
|
|
200
|
-
const content = lines.join("\n") + "\n";
|
|
201
|
-
// Check if content has actually changed before writing
|
|
202
|
-
// This prevents unnecessary file writes that trigger watcher events
|
|
203
|
-
if (fs.existsSync(filePath)) {
|
|
204
|
-
const existingContent = fs.readFileSync(filePath, "utf8");
|
|
205
|
-
if (existingContent === content) {
|
|
206
|
-
// Content unchanged, skip write
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
fs.writeFileSync(targetPath, content, "utf8");
|
|
211
|
-
// Atomic rename if requested
|
|
212
|
-
if (atomic) {
|
|
213
|
-
fs.renameSync(targetPath, filePath);
|
|
214
|
-
}
|
|
215
|
-
// Set file modification time to match the newest updated_at timestamp
|
|
216
|
-
// This ensures filesystem mtime reflects content timestamps for accurate sync direction detection
|
|
217
|
-
if (sortedEntities.length > 0) {
|
|
218
|
-
const timestamps = sortedEntities
|
|
219
|
-
.map((e) => e.updated_at)
|
|
220
|
-
.filter((t) => t != null)
|
|
221
|
-
.map((t) => {
|
|
222
|
-
// Append 'Z' if not present to force UTC interpretation
|
|
223
|
-
const timestamp = String(t);
|
|
224
|
-
const hasZone = timestamp.endsWith("Z") ||
|
|
225
|
-
timestamp.includes("+") ||
|
|
226
|
-
/[+-]\d{2}:\d{2}$/.test(timestamp);
|
|
227
|
-
const utcTimestamp = hasZone
|
|
228
|
-
? timestamp
|
|
229
|
-
: timestamp.replace(" ", "T") + "Z";
|
|
230
|
-
return new Date(utcTimestamp).getTime();
|
|
231
|
-
});
|
|
232
|
-
if (timestamps.length > 0) {
|
|
233
|
-
const newestTimestamp = Math.max(...timestamps);
|
|
234
|
-
const mtimeDate = new Date(newestTimestamp);
|
|
235
|
-
fs.utimesSync(filePath, mtimeDate, mtimeDate);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Update a single line in a JSONL file by entity ID
|
|
241
|
-
* If the entity doesn't exist, append it
|
|
242
|
-
* If it exists, replace the line
|
|
243
|
-
*/
|
|
244
|
-
export async function updateJSONLLine(filePath, entity, idField = "id") {
|
|
245
|
-
const entityId = entity[idField];
|
|
246
|
-
if (!entityId) {
|
|
247
|
-
throw new Error(`Entity missing ${idField} field`);
|
|
248
|
-
}
|
|
249
|
-
// Read existing entities
|
|
250
|
-
const entities = await readJSONL(filePath, { skipErrors: true });
|
|
251
|
-
// Find and update or append
|
|
252
|
-
const index = entities.findIndex((e) => e[idField] === entityId);
|
|
253
|
-
if (index >= 0) {
|
|
254
|
-
// Replace existing
|
|
255
|
-
entities[index] = entity;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
// Append new
|
|
259
|
-
entities.push(entity);
|
|
260
|
-
}
|
|
261
|
-
// Write back
|
|
262
|
-
await writeJSONL(filePath, entities);
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Update a single line in a JSONL file synchronously
|
|
266
|
-
*/
|
|
267
|
-
export function updateJSONLLineSync(filePath, entity, idField = "id") {
|
|
268
|
-
const entityId = entity[idField];
|
|
269
|
-
if (!entityId) {
|
|
270
|
-
throw new Error(`Entity missing ${idField} field`);
|
|
271
|
-
}
|
|
272
|
-
// Read existing entities
|
|
273
|
-
const entities = readJSONLSync(filePath, { skipErrors: true });
|
|
274
|
-
// Find and update or append
|
|
275
|
-
const index = entities.findIndex((e) => e[idField] === entityId);
|
|
276
|
-
if (index >= 0) {
|
|
277
|
-
// Replace existing
|
|
278
|
-
entities[index] = entity;
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
// Append new
|
|
282
|
-
entities.push(entity);
|
|
283
|
-
}
|
|
284
|
-
// Write back
|
|
285
|
-
writeJSONLSync(filePath, entities);
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Delete an entity from a JSONL file by ID
|
|
289
|
-
*/
|
|
290
|
-
export async function deleteJSONLLine(filePath, entityId, idField = "id") {
|
|
291
|
-
// Read existing entities
|
|
292
|
-
const entities = await readJSONL(filePath, { skipErrors: true });
|
|
293
|
-
// Filter out the entity
|
|
294
|
-
const initialLength = entities.length;
|
|
295
|
-
const filtered = entities.filter((e) => e[idField] !== entityId);
|
|
296
|
-
if (filtered.length === initialLength) {
|
|
297
|
-
return false; // Nothing deleted
|
|
298
|
-
}
|
|
299
|
-
// Write back
|
|
300
|
-
await writeJSONL(filePath, filtered);
|
|
301
|
-
return true;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Delete an entity from a JSONL file synchronously
|
|
305
|
-
*/
|
|
306
|
-
export function deleteJSONLLineSync(filePath, entityId, idField = "id") {
|
|
307
|
-
// Read existing entities
|
|
308
|
-
const entities = readJSONLSync(filePath, { skipErrors: true });
|
|
309
|
-
// Filter out the entity
|
|
310
|
-
const initialLength = entities.length;
|
|
311
|
-
const filtered = entities.filter((e) => e[idField] !== entityId);
|
|
312
|
-
if (filtered.length === initialLength) {
|
|
313
|
-
return false; // Nothing deleted
|
|
314
|
-
}
|
|
315
|
-
// Write back
|
|
316
|
-
writeJSONLSync(filePath, filtered);
|
|
317
|
-
return true;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Get a single entity from a JSONL file by ID
|
|
321
|
-
*/
|
|
322
|
-
export async function getJSONLEntity(filePath, entityId, idField = "id") {
|
|
323
|
-
const entities = await readJSONL(filePath, { skipErrors: true });
|
|
324
|
-
return entities.find((e) => e[idField] === entityId) ?? null;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Get a single entity from a JSONL file synchronously
|
|
328
|
-
*/
|
|
329
|
-
export function getJSONLEntitySync(filePath, entityId, idField = "id") {
|
|
330
|
-
const entities = readJSONLSync(filePath, { skipErrors: true });
|
|
331
|
-
return entities.find((e) => e[idField] === entityId) ?? null;
|
|
332
|
-
}
|
|
333
|
-
//# sourceMappingURL=jsonl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../src/jsonl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAuB7B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,QAAgB,EAChB,UAA4B,EAAE;IAE9B,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEhD,uBAAuB;IACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC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AAC,OAAO,CAAC,KAAK,QAAQ,CAAC,IAAI,IAAI,CAAC;AACpE,CAAC"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Markdown parser with frontmatter support
|
|
3
|
-
*/
|
|
4
|
-
import type Database from "better-sqlite3";
|
|
5
|
-
import type { LocationAnchor, Config } from "@sudocode-ai/types";
|
|
6
|
-
export interface ParsedMarkdown<T extends object = Record<string, any>> {
|
|
7
|
-
/**
|
|
8
|
-
* Parsed frontmatter data
|
|
9
|
-
*/
|
|
10
|
-
data: T;
|
|
11
|
-
/**
|
|
12
|
-
* Markdown content (without frontmatter)
|
|
13
|
-
*/
|
|
14
|
-
content: string;
|
|
15
|
-
/**
|
|
16
|
-
* Original raw content
|
|
17
|
-
*/
|
|
18
|
-
raw: string;
|
|
19
|
-
/**
|
|
20
|
-
* Cross-references found in content
|
|
21
|
-
*/
|
|
22
|
-
references: CrossReference[];
|
|
23
|
-
}
|
|
24
|
-
export interface CrossReference {
|
|
25
|
-
/**
|
|
26
|
-
* The full matched text (e.g., "[[spec-001]]" or "[[@issue-042]]")
|
|
27
|
-
*/
|
|
28
|
-
match: string;
|
|
29
|
-
/**
|
|
30
|
-
* The entity ID (e.g., "spec-001" or "issue-042")
|
|
31
|
-
*/
|
|
32
|
-
id: string;
|
|
33
|
-
/**
|
|
34
|
-
* Entity type (spec or issue)
|
|
35
|
-
*/
|
|
36
|
-
type: "spec" | "issue";
|
|
37
|
-
/**
|
|
38
|
-
* Position in content
|
|
39
|
-
*/
|
|
40
|
-
index: number;
|
|
41
|
-
/**
|
|
42
|
-
* Optional display text (e.g., "Authentication" from "[[spec-001|Authentication]]")
|
|
43
|
-
*/
|
|
44
|
-
displayText?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Optional relationship type (e.g., "blocks" from "[[spec-001]]{ blocks }")
|
|
47
|
-
* Defaults to "references" if not specified
|
|
48
|
-
*/
|
|
49
|
-
relationshipType?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Optional location anchor for spatial context of the reference
|
|
52
|
-
*/
|
|
53
|
-
anchor?: LocationAnchor;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Parse markdown file with YAML frontmatter
|
|
57
|
-
* @param content - Markdown content to parse
|
|
58
|
-
* @param db - Optional database for validating cross-references
|
|
59
|
-
* @param outputDir - Optional output directory for loading config metadata
|
|
60
|
-
*/
|
|
61
|
-
export declare function parseMarkdown<T extends object = Record<string, any>>(content: string, db?: Database.Database, outputDir?: string): ParsedMarkdown<T>;
|
|
62
|
-
/**
|
|
63
|
-
* Parse markdown file from disk
|
|
64
|
-
* @param filePath - Path to markdown file
|
|
65
|
-
* @param db - Optional database for validating cross-references
|
|
66
|
-
* @param outputDir - Optional output directory for loading config metadata
|
|
67
|
-
*/
|
|
68
|
-
export declare function parseMarkdownFile<T extends object = Record<string, any>>(filePath: string, db?: Database.Database, outputDir?: string): ParsedMarkdown<T>;
|
|
69
|
-
/**
|
|
70
|
-
* Extract cross-references from markdown content
|
|
71
|
-
* Supports formats:
|
|
72
|
-
* - [[entity-001]] - entity reference (type determined by database lookup)
|
|
73
|
-
* - [[@entity-042]] - entity reference with @ prefix (for clarity)
|
|
74
|
-
* - [[entity-001|Display Text]] - with custom display text
|
|
75
|
-
* - [[entity-001]]{ blocks } - with relationship type (shorthand)
|
|
76
|
-
* - [[entity-001]]{ type: blocks } - with relationship type (explicit)
|
|
77
|
-
* - [[entity-001|Display]]{ blocks } - combination of display text and type
|
|
78
|
-
*
|
|
79
|
-
* If db is provided, validates references against the database and determines entity type.
|
|
80
|
-
* Only returns references to entities that actually exist.
|
|
81
|
-
*
|
|
82
|
-
* If metadata is provided (but no db), uses configured ID prefixes for type detection.
|
|
83
|
-
*/
|
|
84
|
-
export declare function extractCrossReferences(content: string, db?: Database.Database, config?: Config): CrossReference[];
|
|
85
|
-
/**
|
|
86
|
-
* Stringify frontmatter and content back to markdown
|
|
87
|
-
*/
|
|
88
|
-
export declare function stringifyMarkdown<T extends object = Record<string, any>>(data: T, content: string): string;
|
|
89
|
-
/**
|
|
90
|
-
* Update frontmatter in an existing markdown file
|
|
91
|
-
* Preserves content unchanged
|
|
92
|
-
*/
|
|
93
|
-
export declare function updateFrontmatter<T extends object = Record<string, any>>(originalContent: string, updates: Partial<T>): string;
|
|
94
|
-
/**
|
|
95
|
-
* Update frontmatter in a file
|
|
96
|
-
*/
|
|
97
|
-
export declare function updateFrontmatterFile<T extends object = Record<string, any>>(filePath: string, updates: Partial<T>): void;
|
|
98
|
-
/**
|
|
99
|
-
* Check if a file has frontmatter
|
|
100
|
-
*/
|
|
101
|
-
export declare function hasFrontmatter(content: string): boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Create markdown with frontmatter
|
|
104
|
-
*/
|
|
105
|
-
export declare function createMarkdown<T extends object = Record<string, any>>(data: T, content: string): string;
|
|
106
|
-
/**
|
|
107
|
-
* Write markdown file with frontmatter
|
|
108
|
-
*/
|
|
109
|
-
export declare function writeMarkdownFile<T extends object = Record<string, any>>(filePath: string, data: T, content: string): void;
|
|
110
|
-
/**
|
|
111
|
-
* Remove frontmatter from markdown content
|
|
112
|
-
*/
|
|
113
|
-
export declare function removeFrontmatter(content: string): string;
|
|
114
|
-
/**
|
|
115
|
-
* Get only frontmatter data from markdown
|
|
116
|
-
*/
|
|
117
|
-
export declare function getFrontmatter<T extends object = Record<string, any>>(content: string): T;
|
|
118
|
-
export interface FeedbackMarkdownData {
|
|
119
|
-
id: string;
|
|
120
|
-
specId: string;
|
|
121
|
-
specTitle?: string;
|
|
122
|
-
type: string;
|
|
123
|
-
location: {
|
|
124
|
-
section?: string;
|
|
125
|
-
line?: number;
|
|
126
|
-
status: "valid" | "relocated" | "stale";
|
|
127
|
-
};
|
|
128
|
-
status: string;
|
|
129
|
-
content: string;
|
|
130
|
-
createdAt: string;
|
|
131
|
-
resolution?: string;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Parse feedback section from issue markdown content
|
|
135
|
-
* Looks for "## Spec Feedback Provided" section
|
|
136
|
-
*/
|
|
137
|
-
export declare function parseFeedbackSection(content: string): FeedbackMarkdownData[];
|
|
138
|
-
/**
|
|
139
|
-
* Format feedback data for inclusion in issue markdown
|
|
140
|
-
*/
|
|
141
|
-
export declare function formatFeedbackForIssue(feedback: FeedbackMarkdownData[]): string;
|
|
142
|
-
/**
|
|
143
|
-
* Append or update feedback section in issue markdown
|
|
144
|
-
*/
|
|
145
|
-
export declare function updateFeedbackInIssue(issueContent: string, feedback: FeedbackMarkdownData[]): string;
|
|
146
|
-
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACpE;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IACR;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,C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