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,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt Template Engine
|
|
3
|
-
*
|
|
4
|
-
* Simple template engine with Handlebars-like syntax for rendering prompts.
|
|
5
|
-
* Supports variable substitution, conditionals, and loops.
|
|
6
|
-
*
|
|
7
|
-
* @module services/prompt-template-engine
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* PromptTemplateEngine - Render templates with context variables
|
|
11
|
-
*
|
|
12
|
-
* Template Syntax:
|
|
13
|
-
* - Variables: {{variable}} or {{object.nested.path}}
|
|
14
|
-
* - Conditionals: {{#if variable}}content{{/if}}
|
|
15
|
-
* - Loops: {{#each array}}content{{/each}}
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const engine = new PromptTemplateEngine();
|
|
20
|
-
* const result = engine.render(
|
|
21
|
-
* 'Hello {{name}}!',
|
|
22
|
-
* { name: 'World' }
|
|
23
|
-
* );
|
|
24
|
-
* // Result: 'Hello World!'
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare class PromptTemplateEngine {
|
|
28
|
-
/**
|
|
29
|
-
* Render template with context variables
|
|
30
|
-
*
|
|
31
|
-
* @param template - Template string with {{variable}} syntax
|
|
32
|
-
* @param context - Object containing variable values
|
|
33
|
-
* @returns Rendered template string
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const template = `
|
|
38
|
-
* Issue: {{issue.title}}
|
|
39
|
-
* {{#if issue.description}}
|
|
40
|
-
* Description: {{issue.description}}
|
|
41
|
-
* {{/if}}
|
|
42
|
-
* {{#each specs}}
|
|
43
|
-
* - [[{{id}}]]: {{title}}
|
|
44
|
-
* {{/each}}
|
|
45
|
-
* `;
|
|
46
|
-
*
|
|
47
|
-
* const context = {
|
|
48
|
-
* issue: { title: 'Bug fix', description: 'Fix auth' },
|
|
49
|
-
* specs: [{ id: 'SPEC-001', title: 'Auth' }]
|
|
50
|
-
* };
|
|
51
|
-
*
|
|
52
|
-
* engine.render(template, context);
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
render(template: string, context: Record<string, any>): string;
|
|
56
|
-
/**
|
|
57
|
-
* Replace one {{#each}} loop with balanced tags
|
|
58
|
-
* Processes innermost loop first
|
|
59
|
-
*/
|
|
60
|
-
private replaceLoop;
|
|
61
|
-
/**
|
|
62
|
-
* Replace one {{#if}} conditional with balanced tags
|
|
63
|
-
*/
|
|
64
|
-
private replaceConditional;
|
|
65
|
-
/**
|
|
66
|
-
* Find a balanced {{#tagName}} ... {{/tagName}} pair
|
|
67
|
-
* Returns the FIRST match (outermost, will be processed recursively)
|
|
68
|
-
*/
|
|
69
|
-
private findBalancedTag;
|
|
70
|
-
/**
|
|
71
|
-
* Get nested value from context using dot notation
|
|
72
|
-
*
|
|
73
|
-
* @param context - Context object
|
|
74
|
-
* @param path - Dot-separated path (e.g., 'user.name')
|
|
75
|
-
* @returns Value at path or undefined
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```typescript
|
|
79
|
-
* getValue({ user: { name: 'Alice' } }, 'user.name')
|
|
80
|
-
* // Returns: 'Alice'
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
private getValue;
|
|
84
|
-
/**
|
|
85
|
-
* Validate template syntax
|
|
86
|
-
*
|
|
87
|
-
* Checks for:
|
|
88
|
-
* - Balanced {{#if}} / {{/if}} tags
|
|
89
|
-
* - Balanced {{#each}} / {{/each}} tags
|
|
90
|
-
*
|
|
91
|
-
* @param template - Template string to validate
|
|
92
|
-
* @returns Validation result with errors if any
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* engine.validate('{{#if x}}content{{/if}}')
|
|
97
|
-
* // Returns: { valid: true, errors: [] }
|
|
98
|
-
*
|
|
99
|
-
* engine.validate('{{#if x}}content')
|
|
100
|
-
* // Returns: { valid: false, errors: ['Unbalanced {{#if}} tags'] }
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
validate(template: string): {
|
|
104
|
-
valid: boolean;
|
|
105
|
-
errors: string[];
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=prompt-template-engine.d.ts.map
|
package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-template-engine.d.ts","sourceRoot":"","sources":["../../src/services/prompt-template-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,oBAAoB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IA8B9D;;;OAGG;IACH,OAAO,CAAC,WAAW;IAkBnB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;;OAGG;IACH,OAAO,CAAC,eAAe;IA8CvB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,QAAQ;IAYhB;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CAwBjE"}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt Template Engine
|
|
3
|
-
*
|
|
4
|
-
* Simple template engine with Handlebars-like syntax for rendering prompts.
|
|
5
|
-
* Supports variable substitution, conditionals, and loops.
|
|
6
|
-
*
|
|
7
|
-
* @module services/prompt-template-engine
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* PromptTemplateEngine - Render templates with context variables
|
|
11
|
-
*
|
|
12
|
-
* Template Syntax:
|
|
13
|
-
* - Variables: {{variable}} or {{object.nested.path}}
|
|
14
|
-
* - Conditionals: {{#if variable}}content{{/if}}
|
|
15
|
-
* - Loops: {{#each array}}content{{/each}}
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const engine = new PromptTemplateEngine();
|
|
20
|
-
* const result = engine.render(
|
|
21
|
-
* 'Hello {{name}}!',
|
|
22
|
-
* { name: 'World' }
|
|
23
|
-
* );
|
|
24
|
-
* // Result: 'Hello World!'
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export class PromptTemplateEngine {
|
|
28
|
-
/**
|
|
29
|
-
* Render template with context variables
|
|
30
|
-
*
|
|
31
|
-
* @param template - Template string with {{variable}} syntax
|
|
32
|
-
* @param context - Object containing variable values
|
|
33
|
-
* @returns Rendered template string
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const template = `
|
|
38
|
-
* Issue: {{issue.title}}
|
|
39
|
-
* {{#if issue.description}}
|
|
40
|
-
* Description: {{issue.description}}
|
|
41
|
-
* {{/if}}
|
|
42
|
-
* {{#each specs}}
|
|
43
|
-
* - [[{{id}}]]: {{title}}
|
|
44
|
-
* {{/each}}
|
|
45
|
-
* `;
|
|
46
|
-
*
|
|
47
|
-
* const context = {
|
|
48
|
-
* issue: { title: 'Bug fix', description: 'Fix auth' },
|
|
49
|
-
* specs: [{ id: 'SPEC-001', title: 'Auth' }]
|
|
50
|
-
* };
|
|
51
|
-
*
|
|
52
|
-
* engine.render(template, context);
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
render(template, context) {
|
|
56
|
-
let result = template;
|
|
57
|
-
// Process in order: loops, conditionals, then variables
|
|
58
|
-
// Use a while loop to handle nested structures by processing innermost first
|
|
59
|
-
// 1. Handle loops: {{#each array}}...{{/each}}
|
|
60
|
-
// Process innermost loops first by finding balanced tags
|
|
61
|
-
let previousResult = '';
|
|
62
|
-
while (result !== previousResult) {
|
|
63
|
-
previousResult = result;
|
|
64
|
-
result = this.replaceLoop(result, context);
|
|
65
|
-
}
|
|
66
|
-
// 2. Handle conditionals: {{#if variable}}...{{/if}}
|
|
67
|
-
previousResult = '';
|
|
68
|
-
while (result !== previousResult) {
|
|
69
|
-
previousResult = result;
|
|
70
|
-
result = this.replaceConditional(result, context);
|
|
71
|
-
}
|
|
72
|
-
// 3. Replace simple variables: {{variable}}
|
|
73
|
-
result = result.replace(/\{\{([^}#/]+)\}\}/g, (match, key) => {
|
|
74
|
-
const value = this.getValue(context, key.trim());
|
|
75
|
-
return value !== undefined ? String(value) : match;
|
|
76
|
-
});
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Replace one {{#each}} loop with balanced tags
|
|
81
|
-
* Processes innermost loop first
|
|
82
|
-
*/
|
|
83
|
-
replaceLoop(template, context) {
|
|
84
|
-
const match = this.findBalancedTag(template, 'each');
|
|
85
|
-
if (!match)
|
|
86
|
-
return template;
|
|
87
|
-
const { key, content, fullMatch } = match;
|
|
88
|
-
const array = this.getValue(context, key.trim());
|
|
89
|
-
if (!Array.isArray(array)) {
|
|
90
|
-
return template.replace(fullMatch, '');
|
|
91
|
-
}
|
|
92
|
-
const replacement = array
|
|
93
|
-
.map((item) => this.render(content, item))
|
|
94
|
-
.join('');
|
|
95
|
-
return template.replace(fullMatch, replacement);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Replace one {{#if}} conditional with balanced tags
|
|
99
|
-
*/
|
|
100
|
-
replaceConditional(template, context) {
|
|
101
|
-
const match = this.findBalancedTag(template, 'if');
|
|
102
|
-
if (!match)
|
|
103
|
-
return template;
|
|
104
|
-
const { key, content, fullMatch } = match;
|
|
105
|
-
const value = this.getValue(context, key.trim());
|
|
106
|
-
const replacement = value ? content : '';
|
|
107
|
-
return template.replace(fullMatch, replacement);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Find a balanced {{#tagName}} ... {{/tagName}} pair
|
|
111
|
-
* Returns the FIRST match (outermost, will be processed recursively)
|
|
112
|
-
*/
|
|
113
|
-
findBalancedTag(template, tagName) {
|
|
114
|
-
const openPattern = `\\{\\{#${tagName}\\s+([^}]+)\\}\\}`;
|
|
115
|
-
const closePattern = `\\{\\{\\/${tagName}\\}\\}`;
|
|
116
|
-
const openRegex = new RegExp(openPattern);
|
|
117
|
-
const match = openRegex.exec(template);
|
|
118
|
-
if (!match)
|
|
119
|
-
return null;
|
|
120
|
-
const openIndex = match.index;
|
|
121
|
-
const key = match[1];
|
|
122
|
-
let depth = 1;
|
|
123
|
-
let i = openIndex + match[0].length;
|
|
124
|
-
const contentStart = i;
|
|
125
|
-
// Find the matching closing tag by counting depth
|
|
126
|
-
while (i < template.length && depth > 0) {
|
|
127
|
-
// Check for nested opening tags
|
|
128
|
-
const nestedOpen = template.slice(i).match(new RegExp(`^${openPattern}`));
|
|
129
|
-
if (nestedOpen) {
|
|
130
|
-
depth++;
|
|
131
|
-
i += nestedOpen[0].length;
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
// Check for closing tags
|
|
135
|
-
const close = template.slice(i).match(new RegExp(`^${closePattern}`));
|
|
136
|
-
if (close) {
|
|
137
|
-
depth--;
|
|
138
|
-
if (depth === 0) {
|
|
139
|
-
const content = template.slice(contentStart, i);
|
|
140
|
-
const fullMatch = template.slice(openIndex, i + close[0].length);
|
|
141
|
-
return { key, content, fullMatch };
|
|
142
|
-
}
|
|
143
|
-
i += close[0].length;
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
i++;
|
|
147
|
-
}
|
|
148
|
-
return null;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Get nested value from context using dot notation
|
|
152
|
-
*
|
|
153
|
-
* @param context - Context object
|
|
154
|
-
* @param path - Dot-separated path (e.g., 'user.name')
|
|
155
|
-
* @returns Value at path or undefined
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* ```typescript
|
|
159
|
-
* getValue({ user: { name: 'Alice' } }, 'user.name')
|
|
160
|
-
* // Returns: 'Alice'
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
163
|
-
getValue(context, path) {
|
|
164
|
-
const keys = path.split('.');
|
|
165
|
-
let value = context;
|
|
166
|
-
for (const key of keys) {
|
|
167
|
-
if (value === null || value === undefined)
|
|
168
|
-
return undefined;
|
|
169
|
-
value = value[key];
|
|
170
|
-
}
|
|
171
|
-
return value;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Validate template syntax
|
|
175
|
-
*
|
|
176
|
-
* Checks for:
|
|
177
|
-
* - Balanced {{#if}} / {{/if}} tags
|
|
178
|
-
* - Balanced {{#each}} / {{/each}} tags
|
|
179
|
-
*
|
|
180
|
-
* @param template - Template string to validate
|
|
181
|
-
* @returns Validation result with errors if any
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* engine.validate('{{#if x}}content{{/if}}')
|
|
186
|
-
* // Returns: { valid: true, errors: [] }
|
|
187
|
-
*
|
|
188
|
-
* engine.validate('{{#if x}}content')
|
|
189
|
-
* // Returns: { valid: false, errors: ['Unbalanced {{#if}} tags'] }
|
|
190
|
-
* ```
|
|
191
|
-
*/
|
|
192
|
-
validate(template) {
|
|
193
|
-
const errors = [];
|
|
194
|
-
// Check for balanced {{#if}} tags
|
|
195
|
-
const ifCount = (template.match(/\{\{#if/g) || []).length;
|
|
196
|
-
const endIfCount = (template.match(/\{\{\/if\}\}/g) || []).length;
|
|
197
|
-
if (ifCount !== endIfCount) {
|
|
198
|
-
errors.push(`Unbalanced {{#if}} tags (${ifCount} vs ${endIfCount})`);
|
|
199
|
-
}
|
|
200
|
-
// Check for balanced {{#each}} tags
|
|
201
|
-
const eachCount = (template.match(/\{\{#each/g) || []).length;
|
|
202
|
-
const endEachCount = (template.match(/\{\{\/each\}\}/g) || []).length;
|
|
203
|
-
if (eachCount !== endEachCount) {
|
|
204
|
-
errors.push(`Unbalanced {{#each}} tags (${eachCount} vs ${endEachCount})`);
|
|
205
|
-
}
|
|
206
|
-
return {
|
|
207
|
-
valid: errors.length === 0,
|
|
208
|
-
errors,
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
//# sourceMappingURL=prompt-template-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-template-engine.js","sourceRoot":"","sources":["../../src/services/prompt-template-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,QAAgB,EA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YAAY,GAAG,CAC9D,CAAC;QACJ,CAAC;QAED,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,MAAM;SACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt Templates Service
|
|
3
|
-
*
|
|
4
|
-
* Manages prompt templates in the database, including:
|
|
5
|
-
* - Seeding default templates
|
|
6
|
-
* - Loading templates by ID or type
|
|
7
|
-
* - Validating template syntax
|
|
8
|
-
*
|
|
9
|
-
* @module services/prompt-templates
|
|
10
|
-
*/
|
|
11
|
-
import type Database from 'better-sqlite3';
|
|
12
|
-
/**
|
|
13
|
-
* Prompt template record from database
|
|
14
|
-
*/
|
|
15
|
-
export interface PromptTemplate {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
description: string | null;
|
|
19
|
-
type: 'issue' | 'spec' | 'custom';
|
|
20
|
-
template: string;
|
|
21
|
-
variables: string;
|
|
22
|
-
is_default: number;
|
|
23
|
-
created_at: number;
|
|
24
|
-
updated_at: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Initialize default prompt templates in the database
|
|
28
|
-
*
|
|
29
|
-
* This function is idempotent - it will only insert templates if they don't exist.
|
|
30
|
-
* Should be called during database initialization.
|
|
31
|
-
*
|
|
32
|
-
* @param db - Database instance
|
|
33
|
-
*/
|
|
34
|
-
export declare function initializeDefaultTemplates(db: Database.Database): void;
|
|
35
|
-
/**
|
|
36
|
-
* Get default template for a specific type
|
|
37
|
-
*
|
|
38
|
-
* @param db - Database instance
|
|
39
|
-
* @param type - Template type (issue, spec, custom)
|
|
40
|
-
* @returns Default template or null if not found
|
|
41
|
-
*/
|
|
42
|
-
export declare function getDefaultTemplate(db: Database.Database, type: 'issue' | 'spec' | 'custom'): PromptTemplate | null;
|
|
43
|
-
/**
|
|
44
|
-
* Get template by ID
|
|
45
|
-
*
|
|
46
|
-
* @param db - Database instance
|
|
47
|
-
* @param templateId - Template ID
|
|
48
|
-
* @returns Template or null if not found
|
|
49
|
-
*/
|
|
50
|
-
export declare function getTemplateById(db: Database.Database, templateId: string): PromptTemplate | null;
|
|
51
|
-
/**
|
|
52
|
-
* List all templates, optionally filtered by type
|
|
53
|
-
*
|
|
54
|
-
* @param db - Database instance
|
|
55
|
-
* @param type - Optional type filter
|
|
56
|
-
* @returns Array of templates
|
|
57
|
-
*/
|
|
58
|
-
export declare function listTemplates(db: Database.Database, type?: 'issue' | 'spec' | 'custom'): PromptTemplate[];
|
|
59
|
-
/**
|
|
60
|
-
* Create a new custom template
|
|
61
|
-
*
|
|
62
|
-
* @param db - Database instance
|
|
63
|
-
* @param params - Template parameters
|
|
64
|
-
* @returns Created template
|
|
65
|
-
*/
|
|
66
|
-
export declare function createTemplate(db: Database.Database, params: {
|
|
67
|
-
name: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
type: 'issue' | 'spec' | 'custom';
|
|
70
|
-
template: string;
|
|
71
|
-
variables: string[];
|
|
72
|
-
isDefault?: boolean;
|
|
73
|
-
}): PromptTemplate;
|
|
74
|
-
/**
|
|
75
|
-
* Update an existing template
|
|
76
|
-
*
|
|
77
|
-
* @param db - Database instance
|
|
78
|
-
* @param templateId - Template ID
|
|
79
|
-
* @param updates - Fields to update
|
|
80
|
-
* @returns Updated template or null if not found
|
|
81
|
-
*/
|
|
82
|
-
export declare function updateTemplate(db: Database.Database, templateId: string, updates: {
|
|
83
|
-
name?: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
template?: string;
|
|
86
|
-
variables?: string[];
|
|
87
|
-
isDefault?: boolean;
|
|
88
|
-
}): PromptTemplate | null;
|
|
89
|
-
/**
|
|
90
|
-
* Delete a template
|
|
91
|
-
*
|
|
92
|
-
* @param db - Database instance
|
|
93
|
-
* @param templateId - Template ID
|
|
94
|
-
* @returns True if deleted, false if not found
|
|
95
|
-
*/
|
|
96
|
-
export declare function deleteTemplate(db: Database.Database, templateId: string): boolean;
|
|
97
|
-
//# sourceMappingURL=prompt-templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-templates.d.ts","sourceRoot":"","sources":["../../src/services/prompt-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAoCD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAsDtE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAChC,cAAc,GAAG,IAAI,CAYvB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,UAAU,EAAE,MAAM,GACjB,cAAc,GAAG,IAAI,CAMvB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GACjC,cAAc,EAAE,CAqBlB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GACA,cAAc,CA+BhB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GACA,cAAc,GAAG,IAAI,CA0DvB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAMT"}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt Templates Service
|
|
3
|
-
*
|
|
4
|
-
* Manages prompt templates in the database, including:
|
|
5
|
-
* - Seeding default templates
|
|
6
|
-
* - Loading templates by ID or type
|
|
7
|
-
* - Validating template syntax
|
|
8
|
-
*
|
|
9
|
-
* @module services/prompt-templates
|
|
10
|
-
*/
|
|
11
|
-
import { randomUUID } from 'crypto';
|
|
12
|
-
import { PromptTemplateEngine } from './prompt-template-engine.js';
|
|
13
|
-
/**
|
|
14
|
-
* Default issue template
|
|
15
|
-
*
|
|
16
|
-
* Renders an issue into an executable prompt with:
|
|
17
|
-
* - Issue title and description
|
|
18
|
-
* - Related specifications
|
|
19
|
-
* - Feedback from previous execution attempts
|
|
20
|
-
*/
|
|
21
|
-
const DEFAULT_ISSUE_TEMPLATE = `Fix issue {{issueId}}: {{title}}
|
|
22
|
-
|
|
23
|
-
## Description
|
|
24
|
-
{{description}}
|
|
25
|
-
|
|
26
|
-
{{#if relatedSpecs}}
|
|
27
|
-
## Related Specifications
|
|
28
|
-
{{#each relatedSpecs}}
|
|
29
|
-
- [[{{id}}]]: {{title}}
|
|
30
|
-
{{/each}}
|
|
31
|
-
{{/if}}
|
|
32
|
-
|
|
33
|
-
{{#if feedback}}
|
|
34
|
-
## Feedback from Previous Attempts
|
|
35
|
-
{{#each feedback}}
|
|
36
|
-
- {{content}} (from {{issueId}})
|
|
37
|
-
{{/each}}
|
|
38
|
-
{{/if}}
|
|
39
|
-
|
|
40
|
-
Please implement a solution for this issue. Make sure to:
|
|
41
|
-
1. Read and understand the issue requirements
|
|
42
|
-
2. Check related specifications for context
|
|
43
|
-
3. Write clean, well-tested code
|
|
44
|
-
4. Update documentation if needed
|
|
45
|
-
`;
|
|
46
|
-
/**
|
|
47
|
-
* Initialize default prompt templates in the database
|
|
48
|
-
*
|
|
49
|
-
* This function is idempotent - it will only insert templates if they don't exist.
|
|
50
|
-
* Should be called during database initialization.
|
|
51
|
-
*
|
|
52
|
-
* @param db - Database instance
|
|
53
|
-
*/
|
|
54
|
-
export function initializeDefaultTemplates(db) {
|
|
55
|
-
const engine = new PromptTemplateEngine();
|
|
56
|
-
// Validate default template
|
|
57
|
-
const validation = engine.validate(DEFAULT_ISSUE_TEMPLATE);
|
|
58
|
-
if (!validation.valid) {
|
|
59
|
-
throw new Error(`Default issue template has invalid syntax: ${validation.errors.join(', ')}`);
|
|
60
|
-
}
|
|
61
|
-
// Check if default issue template already exists
|
|
62
|
-
const existing = db
|
|
63
|
-
.prepare(`
|
|
64
|
-
SELECT id FROM prompt_templates
|
|
65
|
-
WHERE type = 'issue' AND is_default = 1
|
|
66
|
-
`)
|
|
67
|
-
.get();
|
|
68
|
-
if (existing) {
|
|
69
|
-
// Default template already exists, skip initialization
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
// Insert default issue template
|
|
73
|
-
const templateId = randomUUID();
|
|
74
|
-
const variables = JSON.stringify([
|
|
75
|
-
'issueId',
|
|
76
|
-
'title',
|
|
77
|
-
'description',
|
|
78
|
-
'relatedSpecs',
|
|
79
|
-
'feedback',
|
|
80
|
-
]);
|
|
81
|
-
db.prepare(`
|
|
82
|
-
INSERT INTO prompt_templates (
|
|
83
|
-
id, name, description, type, template, variables, is_default,
|
|
84
|
-
created_at, updated_at
|
|
85
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
86
|
-
`).run(templateId, 'Default Issue Template', 'Renders an issue into an executable prompt with related specs and feedback', 'issue', DEFAULT_ISSUE_TEMPLATE, variables, 1, // is_default
|
|
87
|
-
new Date().toISOString(), new Date().toISOString());
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get default template for a specific type
|
|
91
|
-
*
|
|
92
|
-
* @param db - Database instance
|
|
93
|
-
* @param type - Template type (issue, spec, custom)
|
|
94
|
-
* @returns Default template or null if not found
|
|
95
|
-
*/
|
|
96
|
-
export function getDefaultTemplate(db, type) {
|
|
97
|
-
const template = db
|
|
98
|
-
.prepare(`
|
|
99
|
-
SELECT * FROM prompt_templates
|
|
100
|
-
WHERE type = ? AND is_default = 1
|
|
101
|
-
LIMIT 1
|
|
102
|
-
`)
|
|
103
|
-
.get(type);
|
|
104
|
-
return template || null;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Get template by ID
|
|
108
|
-
*
|
|
109
|
-
* @param db - Database instance
|
|
110
|
-
* @param templateId - Template ID
|
|
111
|
-
* @returns Template or null if not found
|
|
112
|
-
*/
|
|
113
|
-
export function getTemplateById(db, templateId) {
|
|
114
|
-
const template = db
|
|
115
|
-
.prepare('SELECT * FROM prompt_templates WHERE id = ?')
|
|
116
|
-
.get(templateId);
|
|
117
|
-
return template || null;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* List all templates, optionally filtered by type
|
|
121
|
-
*
|
|
122
|
-
* @param db - Database instance
|
|
123
|
-
* @param type - Optional type filter
|
|
124
|
-
* @returns Array of templates
|
|
125
|
-
*/
|
|
126
|
-
export function listTemplates(db, type) {
|
|
127
|
-
if (type) {
|
|
128
|
-
return db
|
|
129
|
-
.prepare(`
|
|
130
|
-
SELECT * FROM prompt_templates
|
|
131
|
-
WHERE type = ?
|
|
132
|
-
ORDER BY is_default DESC, name ASC
|
|
133
|
-
`)
|
|
134
|
-
.all(type);
|
|
135
|
-
}
|
|
136
|
-
return db
|
|
137
|
-
.prepare(`
|
|
138
|
-
SELECT * FROM prompt_templates
|
|
139
|
-
ORDER BY is_default DESC, name ASC
|
|
140
|
-
`)
|
|
141
|
-
.all();
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Create a new custom template
|
|
145
|
-
*
|
|
146
|
-
* @param db - Database instance
|
|
147
|
-
* @param params - Template parameters
|
|
148
|
-
* @returns Created template
|
|
149
|
-
*/
|
|
150
|
-
export function createTemplate(db, params) {
|
|
151
|
-
// Validate template syntax
|
|
152
|
-
const engine = new PromptTemplateEngine();
|
|
153
|
-
const validation = engine.validate(params.template);
|
|
154
|
-
if (!validation.valid) {
|
|
155
|
-
throw new Error(`Invalid template syntax: ${validation.errors.join(', ')}`);
|
|
156
|
-
}
|
|
157
|
-
const templateId = randomUUID();
|
|
158
|
-
const now = new Date().toISOString();
|
|
159
|
-
db.prepare(`
|
|
160
|
-
INSERT INTO prompt_templates (
|
|
161
|
-
id, name, description, type, template, variables, is_default,
|
|
162
|
-
created_at, updated_at
|
|
163
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
164
|
-
`).run(templateId, params.name, params.description || null, params.type, params.template, JSON.stringify(params.variables), params.isDefault ? 1 : 0, now, now);
|
|
165
|
-
return getTemplateById(db, templateId);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Update an existing template
|
|
169
|
-
*
|
|
170
|
-
* @param db - Database instance
|
|
171
|
-
* @param templateId - Template ID
|
|
172
|
-
* @param updates - Fields to update
|
|
173
|
-
* @returns Updated template or null if not found
|
|
174
|
-
*/
|
|
175
|
-
export function updateTemplate(db, templateId, updates) {
|
|
176
|
-
const existing = getTemplateById(db, templateId);
|
|
177
|
-
if (!existing) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
// Validate template syntax if template is being updated
|
|
181
|
-
if (updates.template) {
|
|
182
|
-
const engine = new PromptTemplateEngine();
|
|
183
|
-
const validation = engine.validate(updates.template);
|
|
184
|
-
if (!validation.valid) {
|
|
185
|
-
throw new Error(`Invalid template syntax: ${validation.errors.join(', ')}`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
const fields = [];
|
|
189
|
-
const values = [];
|
|
190
|
-
if (updates.name !== undefined) {
|
|
191
|
-
fields.push('name = ?');
|
|
192
|
-
values.push(updates.name);
|
|
193
|
-
}
|
|
194
|
-
if (updates.description !== undefined) {
|
|
195
|
-
fields.push('description = ?');
|
|
196
|
-
values.push(updates.description);
|
|
197
|
-
}
|
|
198
|
-
if (updates.template !== undefined) {
|
|
199
|
-
fields.push('template = ?');
|
|
200
|
-
values.push(updates.template);
|
|
201
|
-
}
|
|
202
|
-
if (updates.variables !== undefined) {
|
|
203
|
-
fields.push('variables = ?');
|
|
204
|
-
values.push(JSON.stringify(updates.variables));
|
|
205
|
-
}
|
|
206
|
-
if (updates.isDefault !== undefined) {
|
|
207
|
-
fields.push('is_default = ?');
|
|
208
|
-
values.push(updates.isDefault ? 1 : 0);
|
|
209
|
-
}
|
|
210
|
-
if (fields.length === 0) {
|
|
211
|
-
return existing;
|
|
212
|
-
}
|
|
213
|
-
fields.push('updated_at = ?');
|
|
214
|
-
values.push(new Date().toISOString());
|
|
215
|
-
values.push(templateId);
|
|
216
|
-
db.prepare(`
|
|
217
|
-
UPDATE prompt_templates
|
|
218
|
-
SET ${fields.join(', ')}
|
|
219
|
-
WHERE id = ?
|
|
220
|
-
`).run(...values);
|
|
221
|
-
return getTemplateById(db, templateId);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Delete a template
|
|
225
|
-
*
|
|
226
|
-
* @param db - Database instance
|
|
227
|
-
* @param templateId - Template ID
|
|
228
|
-
* @returns True if deleted, false if not found
|
|
229
|
-
*/
|
|
230
|
-
export function deleteTemplate(db, templateId) {
|
|
231
|
-
const result = db
|
|
232
|
-
.prepare('DELETE FROM prompt_templates WHERE id = ?')
|
|
233
|
-
.run(templateId);
|
|
234
|
-
return result.changes > 0;
|
|
235
|
-
}
|
|
236
|
-
//# sourceMappingURL=prompt-templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-templates.js","sourceRoot":"","sources":["../../src/services/prompt-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAiBnE;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB9B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAqB;IAC9D,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE1C,4BAA4B;IAC5B,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAC3D,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,8CAA8C,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC7E,CAAC;IACJ,CAAC;IAED,iDAAiD;IACjD,MAAM,QAAQ,GAAG,EAAE;SAChB,OAAO,CACN;;;KAGD,CACA;SACA,GAAG,EAAgC,CAAC;IAEvC,IAAI,QAAQ,EAAE,CAAC;QACb,uDAAuD;QACvD,OAA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