@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217083314 → 1.41.1
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/dist/_virtual/rolldown_runtime.js +1 -22
- package/dist/adapters/ai.js +1 -82
- package/dist/adapters/factory.js +1 -36
- package/dist/adapters/fs.js +1 -118
- package/dist/adapters/git.js +1 -54
- package/dist/adapters/index.js +1 -7
- package/dist/adapters/logger.js +1 -80
- package/dist/adapters/watcher.js +1 -69
- package/dist/adapters/workspace.js +2 -190
- package/dist/ai/agents/claude-code-agent.js +9 -146
- package/dist/ai/agents/cursor-agent.js +17 -286
- package/dist/ai/agents/index.js +1 -5
- package/dist/ai/agents/openai-codex-agent.js +8 -140
- package/dist/ai/agents/orchestrator.js +1 -142
- package/dist/ai/agents/simple-agent.js +4 -80
- package/dist/ai/client.js +1 -162
- package/dist/ai/index.js +1 -27
- package/dist/ai/prompts/code-generation.js +13 -55
- package/dist/ai/prompts/index.js +1 -12
- package/dist/ai/prompts/spec-creation.js +20 -61
- package/dist/ai/providers.js +1 -40
- package/dist/formatters/index.js +1 -18
- package/dist/formatters/json.js +1 -71
- package/dist/formatters/sarif.js +1 -163
- package/dist/formatters/text.js +2 -208
- package/dist/index.js +1 -81
- package/dist/services/agent-guide/adapters/claude-code.js +3 -144
- package/dist/services/agent-guide/adapters/cursor-cli.js +3 -135
- package/dist/services/agent-guide/adapters/generic-mcp.js +3 -159
- package/dist/services/agent-guide/adapters/index.js +1 -30
- package/dist/services/agent-guide/agent-guide-service.js +1 -148
- package/dist/services/agent-guide/index.js +1 -5
- package/dist/services/build.js +1 -140
- package/dist/services/ci-check/ci-check-service.js +1 -393
- package/dist/services/ci-check/index.js +1 -2
- package/dist/services/ci-check/types.js +1 -28
- package/dist/services/clean.js +1 -71
- package/dist/services/config.js +1 -76
- package/dist/services/deps.js +1 -62
- package/dist/services/diff.js +1 -33
- package/dist/services/doctor/checks/ai.js +2 -118
- package/dist/services/doctor/checks/cli.js +1 -146
- package/dist/services/doctor/checks/config.js +1 -170
- package/dist/services/doctor/checks/deps.js +1 -180
- package/dist/services/doctor/checks/index.js +1 -6
- package/dist/services/doctor/checks/mcp.js +1 -144
- package/dist/services/doctor/checks/workspace.js +1 -243
- package/dist/services/doctor/doctor-service.js +2 -115
- package/dist/services/doctor/index.js +1 -2
- package/dist/services/doctor/types.js +1 -26
- package/dist/services/implementation/discovery.js +2 -143
- package/dist/services/implementation/index.js +1 -2
- package/dist/services/implementation/resolver.js +1 -223
- package/dist/services/index.js +1 -53
- package/dist/services/integrity-diagram.js +6 -274
- package/dist/services/integrity.js +1 -272
- package/dist/services/list.js +1 -35
- package/dist/services/openapi/export-service.js +2 -51
- package/dist/services/openapi/import-service.js +1 -75
- package/dist/services/openapi/index.js +1 -4
- package/dist/services/openapi/sync-service.js +1 -121
- package/dist/services/openapi/validate-service.js +1 -130
- package/dist/services/regenerator.js +1 -23
- package/dist/services/registry.js +1 -73
- package/dist/services/setup/config-generators.js +26 -113
- package/dist/services/setup/file-merger.js +2 -60
- package/dist/services/setup/index.js +1 -4
- package/dist/services/setup/setup-service.js +1 -95
- package/dist/services/setup/targets/agents-md.js +1 -46
- package/dist/services/setup/targets/cli-config.js +1 -59
- package/dist/services/setup/targets/cursor-rules.js +1 -47
- package/dist/services/setup/targets/mcp-claude.js +1 -59
- package/dist/services/setup/targets/mcp-cursor.js +1 -58
- package/dist/services/setup/targets/vscode-settings.js +1 -62
- package/dist/services/setup/types.js +1 -26
- package/dist/services/sync.js +1 -62
- package/dist/services/test.js +1 -30
- package/dist/services/validate-implementation.js +1 -69
- package/dist/services/validate.js +1 -47
- package/dist/services/verification-cache/adapters/filesystem.js +1 -121
- package/dist/services/verification-cache/adapters/in-memory.js +1 -45
- package/dist/services/verification-cache/adapters/index.js +1 -3
- package/dist/services/verification-cache/adapters/workspace-state.js +1 -90
- package/dist/services/verification-cache/cache-service.js +1 -255
- package/dist/services/verification-cache/index.js +1 -6
- package/dist/services/verification-cache/types.js +1 -15
- package/dist/services/verify/ai-verifier.js +9 -336
- package/dist/services/verify/behavior-verifier.js +1 -185
- package/dist/services/verify/index.js +1 -4
- package/dist/services/verify/structure-verifier.js +2 -195
- package/dist/services/verify/verify-service.js +3 -203
- package/dist/services/watch.js +1 -31
- package/dist/services/workspace-info.js +2 -102
- package/dist/templates/app-config.template.js +28 -101
- package/dist/templates/data-view.template.js +27 -42
- package/dist/templates/event.template.js +14 -29
- package/dist/templates/experiment.template.js +51 -77
- package/dist/templates/handler.template.js +17 -53
- package/dist/templates/index.js +1 -36
- package/dist/templates/integration.template.js +50 -134
- package/dist/templates/knowledge.template.js +21 -62
- package/dist/templates/migration.template.js +26 -50
- package/dist/templates/operation.template.js +28 -44
- package/dist/templates/presentation.template.js +20 -46
- package/dist/templates/telemetry.template.js +53 -74
- package/dist/templates/workflow-runner.template.js +6 -12
- package/dist/templates/workflow.template.js +24 -51
- package/package.json +10 -15
- package/dist/adapters/ai.d.ts +0 -11
- package/dist/adapters/factory.d.ts +0 -28
- package/dist/adapters/fs.d.ts +0 -10
- package/dist/adapters/git.d.ts +0 -10
- package/dist/adapters/logger.d.ts +0 -17
- package/dist/adapters/watcher.d.ts +0 -10
- package/dist/adapters/workspace.d.ts +0 -93
- package/dist/ai/agents/claude-code-agent.d.ts +0 -21
- package/dist/ai/agents/cursor-agent.d.ts +0 -67
- package/dist/ai/agents/openai-codex-agent.d.ts +0 -21
- package/dist/ai/agents/orchestrator.d.ts +0 -49
- package/dist/ai/agents/simple-agent.d.ts +0 -16
- package/dist/ai/agents/types.d.ts +0 -35
- package/dist/ai/client.d.ts +0 -82
- package/dist/ai/index.d.ts +0 -16
- package/dist/ai/prompts/code-generation.d.ts +0 -25
- package/dist/ai/prompts/index.d.ts +0 -9
- package/dist/ai/prompts/spec-creation.d.ts +0 -28
- package/dist/ai/providers.d.ts +0 -28
- package/dist/formatters/index.d.ts +0 -10
- package/dist/formatters/json.d.ts +0 -88
- package/dist/formatters/sarif.d.ts +0 -100
- package/dist/formatters/text.d.ts +0 -34
- package/dist/index.d.ts +0 -66
- package/dist/libs/ai-providers/dist/factory.js +0 -154
- package/dist/libs/ai-providers/dist/index.js +0 -4
- package/dist/libs/ai-providers/dist/legacy.js +0 -72
- package/dist/libs/ai-providers/dist/models.js +0 -287
- package/dist/libs/ai-providers/dist/validation.js +0 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
- package/dist/libs/contracts/dist/client/index.js +0 -5
- package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
- package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
- package/dist/libs/contracts/dist/client/react/index.js +0 -4
- package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/index.js +0 -29
- package/dist/libs/contracts/dist/docs/presentations.js +0 -71
- package/dist/libs/contracts/dist/docs/registry.js +0 -44
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/libs/contracts/dist/events.js +0 -8
- package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/libs/contracts/dist/index.js +0 -72
- package/dist/libs/contracts/dist/install.js +0 -2
- package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
- package/dist/libs/contracts/dist/integrations/index.js +0 -18
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
- package/dist/libs/contracts/dist/jsonschema.js +0 -24
- package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
- package/dist/libs/contracts/dist/knowledge/index.js +0 -7
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
- package/dist/libs/contracts/dist/llm/exporters.js +0 -352
- package/dist/libs/contracts/dist/llm/index.js +0 -2
- package/dist/libs/contracts/dist/llm/prompts.js +0 -211
- package/dist/libs/contracts/dist/onboarding-base.js +0 -196
- package/dist/libs/contracts/dist/openapi.js +0 -75
- package/dist/libs/contracts/dist/ownership.js +0 -21
- package/dist/libs/contracts/dist/presentations.js +0 -1
- package/dist/libs/contracts/dist/presentations.v2.js +0 -11
- package/dist/libs/contracts/dist/prompt.js +0 -1
- package/dist/libs/contracts/dist/promptRegistry.js +0 -1
- package/dist/libs/contracts/dist/regenerator/index.js +0 -2
- package/dist/libs/contracts/dist/regenerator/service.js +0 -92
- package/dist/libs/contracts/dist/regenerator/utils.js +0 -51
- package/dist/libs/contracts/dist/registry.js +0 -208
- package/dist/libs/contracts/dist/resources.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
- package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
- package/dist/libs/contracts/dist/server/index.js +0 -8
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/libs/contracts/dist/server/rest-express.js +0 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/libs/contracts/dist/spec.js +0 -35
- package/dist/libs/contracts/dist/telemetry/index.js +0 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/libs/contracts/dist/tests/index.js +0 -1
- package/dist/libs/contracts/dist/tests/runner.js +0 -150
- package/dist/libs/contracts/dist/workflow/index.js +0 -1
- package/dist/libs/contracts/dist/workflow/runner.js +0 -1
- package/dist/libs/contracts-transformers/dist/common/utils.js +0 -47
- package/dist/libs/contracts-transformers/dist/openapi/exporter.js +0 -1
- package/dist/libs/contracts-transformers/dist/openapi/importer.js +0 -255
- package/dist/libs/contracts-transformers/dist/openapi/index.js +0 -4
- package/dist/libs/contracts-transformers/dist/openapi/parser.js +0 -231
- package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +0 -201
- package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +0 -137
- package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +0 -101
- package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +0 -84
- package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +0 -30
- package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +0 -96
- package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +0 -151
- package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +0 -344
- package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +0 -122
- package/dist/modules/contractspec-workspace/dist/templates/app-config.js +0 -105
- package/dist/modules/contractspec-workspace/dist/templates/data-view.js +0 -68
- package/dist/modules/contractspec-workspace/dist/templates/event.js +0 -38
- package/dist/modules/contractspec-workspace/dist/templates/experiment.js +0 -87
- package/dist/modules/contractspec-workspace/dist/templates/handler.js +0 -95
- package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +0 -104
- package/dist/modules/contractspec-workspace/dist/templates/integration.js +0 -62
- package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +0 -68
- package/dist/modules/contractspec-workspace/dist/templates/migration.js +0 -60
- package/dist/modules/contractspec-workspace/dist/templates/operation.js +0 -100
- package/dist/modules/contractspec-workspace/dist/templates/presentation.js +0 -78
- package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +0 -89
- package/dist/modules/contractspec-workspace/dist/templates/utils.js +0 -38
- package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +0 -48
- package/dist/modules/contractspec-workspace/dist/templates/workflow.js +0 -67
- package/dist/modules/contractspec-workspace/dist/types/generation-types.js +0 -20
- package/dist/ports/ai.d.ts +0 -58
- package/dist/ports/fs.d.ts +0 -80
- package/dist/ports/git.d.ts +0 -32
- package/dist/ports/logger.d.ts +0 -87
- package/dist/ports/watcher.d.ts +0 -51
- package/dist/services/agent-guide/adapters/claude-code.d.ts +0 -34
- package/dist/services/agent-guide/adapters/cursor-cli.d.ts +0 -38
- package/dist/services/agent-guide/adapters/generic-mcp.d.ts +0 -52
- package/dist/services/agent-guide/adapters/index.d.ts +0 -22
- package/dist/services/agent-guide/agent-guide-service.d.ts +0 -55
- package/dist/services/agent-guide/types.d.ts +0 -57
- package/dist/services/build.d.ts +0 -58
- package/dist/services/ci-check/ci-check-service.d.ts +0 -15
- package/dist/services/ci-check/types.d.ts +0 -142
- package/dist/services/clean.d.ts +0 -40
- package/dist/services/config.d.ts +0 -25
- package/dist/services/deps.d.ts +0 -52
- package/dist/services/diff.d.ts +0 -33
- package/dist/services/doctor/doctor-service.d.ts +0 -23
- package/dist/services/doctor/types.d.ts +0 -117
- package/dist/services/implementation/discovery.d.ts +0 -29
- package/dist/services/implementation/resolver.d.ts +0 -43
- package/dist/services/implementation/types.d.ts +0 -78
- package/dist/services/integrity-diagram.d.ts +0 -35
- package/dist/services/integrity.d.ts +0 -133
- package/dist/services/list.d.ts +0 -30
- package/dist/services/openapi/export-service.d.ts +0 -52
- package/dist/services/openapi/import-service.d.ts +0 -15
- package/dist/services/openapi/sync-service.d.ts +0 -18
- package/dist/services/openapi/types.d.ts +0 -184
- package/dist/services/openapi/validate-service.d.ts +0 -15
- package/dist/services/regenerator.d.ts +0 -17
- package/dist/services/registry.d.ts +0 -52
- package/dist/services/setup/config-generators.d.ts +0 -41
- package/dist/services/setup/file-merger.d.ts +0 -26
- package/dist/services/setup/setup-service.d.ts +0 -11
- package/dist/services/setup/types.d.ts +0 -84
- package/dist/services/sync.d.ts +0 -40
- package/dist/services/test.d.ts +0 -14
- package/dist/services/validate-implementation.d.ts +0 -31
- package/dist/services/validate.d.ts +0 -40
- package/dist/services/verification-cache/adapters/filesystem.d.ts +0 -45
- package/dist/services/verification-cache/adapters/in-memory.d.ts +0 -26
- package/dist/services/verification-cache/adapters/workspace-state.d.ts +0 -48
- package/dist/services/verification-cache/cache-service.d.ts +0 -69
- package/dist/services/verification-cache/types.d.ts +0 -123
- package/dist/services/verify/ai-verifier.d.ts +0 -24
- package/dist/services/verify/behavior-verifier.d.ts +0 -11
- package/dist/services/verify/structure-verifier.d.ts +0 -11
- package/dist/services/verify/types.d.ts +0 -136
- package/dist/services/verify/verify-service.d.ts +0 -59
- package/dist/services/watch.d.ts +0 -24
- package/dist/services/workspace-info.d.ts +0 -61
- package/dist/templates/app-config.template.d.ts +0 -6
- package/dist/templates/data-view.template.d.ts +0 -6
- package/dist/templates/event.template.d.ts +0 -10
- package/dist/templates/experiment.template.d.ts +0 -6
- package/dist/templates/handler.template.d.ts +0 -15
- package/dist/templates/index.d.ts +0 -20
- package/dist/templates/integration.template.d.ts +0 -6
- package/dist/templates/knowledge.template.d.ts +0 -6
- package/dist/templates/migration.template.d.ts +0 -6
- package/dist/templates/operation.template.d.ts +0 -10
- package/dist/templates/presentation.template.d.ts +0 -10
- package/dist/templates/telemetry.template.d.ts +0 -6
- package/dist/templates/workflow-runner.template.d.ts +0 -15
- package/dist/templates/workflow.template.d.ts +0 -6
- package/dist/types/config.d.ts +0 -33
- package/dist/types.d.ts +0 -323
|
@@ -1,90 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
${prop.redact ? "redact: true," : ""}
|
|
16
|
-
${prop.description ? `description: '${escapeString(prop.description)}',` : ""}
|
|
17
|
-
}`).join(",\n");
|
|
18
|
-
const anomalyRules = event.anomalyRules?.length ? ` anomalyDetection: {
|
|
1
|
+
function e(e){let i=t(e.name.split(`.`).pop()??`Telemetry`)+`Telemetry`,a=e.providers?.length?`providers: [
|
|
2
|
+
${e.providers.map(e=>` {
|
|
3
|
+
type: '${e.type}',
|
|
4
|
+
config: ${r(e.config)},
|
|
5
|
+
}`).join(`,
|
|
6
|
+
`)}
|
|
7
|
+
],`:``,o=e.events.map(e=>{let t=e.properties.map(e=>` '${e.name}': {
|
|
8
|
+
type: '${e.type}',
|
|
9
|
+
${e.required?`required: true,`:``}
|
|
10
|
+
${e.pii?`pii: true,`:``}
|
|
11
|
+
${e.redact?`redact: true,`:``}
|
|
12
|
+
${e.description?`description: '${n(e.description)}',`:``}
|
|
13
|
+
}`).join(`,
|
|
14
|
+
`),r=e.anomalyRules?.length?` anomalyDetection: {
|
|
19
15
|
enabled: true,
|
|
20
|
-
${typeof
|
|
16
|
+
${typeof e.anomalyMinimumSample==`number`?`minimumSample: ${e.anomalyMinimumSample},`:``}
|
|
21
17
|
thresholds: [
|
|
22
|
-
${
|
|
23
|
-
metric: '${
|
|
24
|
-
${typeof
|
|
25
|
-
${typeof
|
|
26
|
-
}`).join(
|
|
18
|
+
${e.anomalyRules.map(e=>` {
|
|
19
|
+
metric: '${n(e.metric)}',
|
|
20
|
+
${typeof e.min==`number`?`min: ${e.min},`:``}
|
|
21
|
+
${typeof e.max==`number`?`max: ${e.max},`:``}
|
|
22
|
+
}`).join(`,
|
|
23
|
+
`)}
|
|
27
24
|
],
|
|
28
|
-
actions: [${(
|
|
29
|
-
}
|
|
25
|
+
actions: [${(e.anomalyActions??[]).map(e=>`'${e}'`).join(`, `)}],
|
|
26
|
+
},`:e.anomalyEnabled?` anomalyDetection: {
|
|
30
27
|
enabled: true,
|
|
31
|
-
${typeof
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
version: ${event.version},
|
|
28
|
+
${typeof e.anomalyMinimumSample==`number`?`minimumSample: ${e.anomalyMinimumSample},`:``}
|
|
29
|
+
},`:``;return` {
|
|
30
|
+
name: '${n(e.name)}',
|
|
31
|
+
version: ${e.version},
|
|
36
32
|
semantics: {
|
|
37
|
-
what: '${
|
|
38
|
-
${
|
|
39
|
-
${
|
|
33
|
+
what: '${n(e.what)}',
|
|
34
|
+
${e.who?`who: '${n(e.who)}',`:``}
|
|
35
|
+
${e.why?`why: '${n(e.why)}',`:``}
|
|
40
36
|
},
|
|
41
|
-
privacy: '${
|
|
37
|
+
privacy: '${e.privacy}',
|
|
42
38
|
properties: {
|
|
43
|
-
${
|
|
39
|
+
${t}
|
|
44
40
|
},
|
|
45
|
-
${typeof
|
|
46
|
-
${typeof
|
|
47
|
-
${
|
|
48
|
-
${
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return `import type { TelemetrySpec } from '@lssm/lib.contracts/telemetry';
|
|
41
|
+
${typeof e.retentionDays==`number`?`retention: { days: ${e.retentionDays}, ${e.retentionPolicy?`policy: '${e.retentionPolicy}'`:``} },`:``}
|
|
42
|
+
${typeof e.samplingRate==`number`?`sampling: { rate: ${e.samplingRate}${e.samplingConditions?`, conditions: ['${n(e.samplingConditions)}']`:``} },`:``}
|
|
43
|
+
${r}
|
|
44
|
+
${e.tags?.length?`tags: [${e.tags.map(e=>`'${n(e)}'`).join(`, `)}],`:``}
|
|
45
|
+
}`}).join(`,
|
|
46
|
+
`);return`import type { TelemetrySpec } from '@lssm/lib.contracts/telemetry';
|
|
52
47
|
|
|
53
|
-
export const ${
|
|
48
|
+
export const ${i}: TelemetrySpec = {
|
|
54
49
|
meta: {
|
|
55
|
-
name: '${
|
|
56
|
-
version: ${
|
|
57
|
-
title: '${
|
|
58
|
-
description: '${
|
|
59
|
-
domain: '${
|
|
60
|
-
owners: [${
|
|
61
|
-
tags: [${
|
|
62
|
-
stability: '${
|
|
50
|
+
name: '${n(e.name)}',
|
|
51
|
+
version: ${e.version},
|
|
52
|
+
title: '${n(e.name)} telemetry',
|
|
53
|
+
description: '${n(e.description||`Describe the purpose of this telemetry spec.`)}',
|
|
54
|
+
domain: '${n(e.domain)}',
|
|
55
|
+
owners: [${e.owners.map(e=>`'${n(e)}'`).join(`, `)}],
|
|
56
|
+
tags: [${e.tags.map(e=>`'${n(e)}'`).join(`, `)}],
|
|
57
|
+
stability: '${e.stability}',
|
|
63
58
|
},
|
|
64
59
|
config: {
|
|
65
|
-
${typeof
|
|
66
|
-
${typeof
|
|
67
|
-
${
|
|
68
|
-
${
|
|
60
|
+
${typeof e.defaultRetentionDays==`number`?`defaultRetentionDays: ${e.defaultRetentionDays},`:``}
|
|
61
|
+
${typeof e.defaultSamplingRate==`number`?`defaultSamplingRate: ${e.defaultSamplingRate},`:``}
|
|
62
|
+
${e.anomalyEnabled?`anomalyDetection: { enabled: true${typeof e.anomalyCheckIntervalMs==`number`?`, checkIntervalMs: ${e.anomalyCheckIntervalMs}`:``} },`:``}
|
|
63
|
+
${a}
|
|
69
64
|
},
|
|
70
65
|
events: [
|
|
71
|
-
${
|
|
66
|
+
${o}
|
|
72
67
|
],
|
|
73
68
|
};
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
function toPascalCase(value) {
|
|
77
|
-
return value.split(/[-_.]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
78
|
-
}
|
|
79
|
-
function escapeString(value) {
|
|
80
|
-
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
81
|
-
}
|
|
82
|
-
function formatConfigValue(value) {
|
|
83
|
-
const trimmed = value.trim();
|
|
84
|
-
if (!trimmed) return "{}";
|
|
85
|
-
if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) return trimmed;
|
|
86
|
-
return `'${escapeString(trimmed)}'`;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
//#endregion
|
|
90
|
-
export { generateTelemetrySpec };
|
|
69
|
+
`}function t(e){return e.split(/[-_.]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function n(e){return e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}function r(e){let t=e.trim();return t?t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`)?t:`'${n(t)}'`:`{}`}export{e as generateTelemetrySpec};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
function generateWorkflowRunnerTemplate({ exportName, specImportPath, runnerName, workflowName }) {
|
|
3
|
-
return `import {
|
|
1
|
+
function e({exportName:e,specImportPath:t,runnerName:n,workflowName:r}){return`import {
|
|
4
2
|
InMemoryStateStore,
|
|
5
3
|
WorkflowRegistry,
|
|
6
4
|
WorkflowRunner,
|
|
7
5
|
} from '@lssm/lib.contracts/workflow';
|
|
8
|
-
import { ${
|
|
6
|
+
import { ${e} } from '${t}';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
|
-
* Runner wiring for ${
|
|
9
|
+
* Runner wiring for ${r}.
|
|
12
10
|
*
|
|
13
11
|
* TODO:
|
|
14
12
|
* - Replace the in-memory state store with a persistent adapter if needed.
|
|
@@ -16,11 +14,11 @@ import { ${exportName} } from '${specImportPath}';
|
|
|
16
14
|
* - Wire eventEmitter to analytics/telemetry sinks.
|
|
17
15
|
*/
|
|
18
16
|
const registry = new WorkflowRegistry();
|
|
19
|
-
registry.register(${
|
|
17
|
+
registry.register(${e});
|
|
20
18
|
|
|
21
19
|
const stateStore = new InMemoryStateStore();
|
|
22
20
|
|
|
23
|
-
export const ${
|
|
21
|
+
export const ${n} = new WorkflowRunner({
|
|
24
22
|
registry,
|
|
25
23
|
stateStore,
|
|
26
24
|
opExecutor: async (operation, input, ctx) => {
|
|
@@ -42,8 +40,4 @@ export const ${runnerName} = new WorkflowRunner({
|
|
|
42
40
|
// console.log(event, payload);
|
|
43
41
|
},
|
|
44
42
|
});
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
export { generateWorkflowRunnerTemplate };
|
|
43
|
+
`}export{e as generateWorkflowRunnerTemplate};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
${transition.condition ? ` condition: '${escapeString(transition.condition)}',` : ""}
|
|
9
|
-
}`).join(",\n");
|
|
10
|
-
return `import type { WorkflowSpec } from '@lssm/lib.contracts/workflow';
|
|
1
|
+
function e(e){let i=n(e.name.split(`.`).pop()??`Workflow`)+`Workflow`,a=e.steps.map(e=>t(e)).join(`,
|
|
2
|
+
`),o=e.transitions.map(e=>` {
|
|
3
|
+
from: '${e.from}',
|
|
4
|
+
to: '${e.to}',
|
|
5
|
+
${e.condition?` condition: '${r(e.condition)}',`:``}
|
|
6
|
+
}`).join(`,
|
|
7
|
+
`);return`import type { WorkflowSpec } from '@lssm/lib.contracts/workflow';
|
|
11
8
|
|
|
12
9
|
/**
|
|
13
10
|
* Workflow generated via contractspec CLI.
|
|
@@ -17,52 +14,28 @@ ${transition.condition ? ` condition: '${escapeString(transition.condition)
|
|
|
17
14
|
* - Provide form renderers for human steps.
|
|
18
15
|
* - Add guards/conditions as needed.
|
|
19
16
|
*/
|
|
20
|
-
export const ${
|
|
17
|
+
export const ${i}: WorkflowSpec = {
|
|
21
18
|
meta: {
|
|
22
|
-
name: '${
|
|
23
|
-
version: ${
|
|
24
|
-
title: '${
|
|
25
|
-
description: '${
|
|
26
|
-
domain: '${
|
|
27
|
-
stability: '${
|
|
28
|
-
owners: [${
|
|
29
|
-
tags: [${
|
|
19
|
+
name: '${e.name}',
|
|
20
|
+
version: ${e.version},
|
|
21
|
+
title: '${r(e.title)}',
|
|
22
|
+
description: '${r(e.description)}',
|
|
23
|
+
domain: '${r(e.domain)}',
|
|
24
|
+
stability: '${e.stability}',
|
|
25
|
+
owners: [${e.owners.map(e=>`'${e}'`).join(`, `)}],
|
|
26
|
+
tags: [${e.tags.map(e=>`'${e}'`).join(`, `)}],
|
|
30
27
|
},
|
|
31
28
|
definition: {
|
|
32
|
-
${
|
|
33
|
-
${
|
|
29
|
+
${e.entryStepId?` entryStepId: '${e.entryStepId}',\n`:``} steps: [
|
|
30
|
+
${a}
|
|
34
31
|
],
|
|
35
32
|
transitions: [
|
|
36
|
-
${
|
|
33
|
+
${o}
|
|
37
34
|
],
|
|
38
35
|
},
|
|
39
|
-
${
|
|
40
|
-
flags: [${
|
|
41
|
-
}
|
|
36
|
+
${e.policyFlags.length>0?`policy: {
|
|
37
|
+
flags: [${e.policyFlags.map(e=>`'${e}'`).join(`, `)}],
|
|
38
|
+
},`:`// policy: { flags: [] },`}
|
|
42
39
|
};
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
function formatStep(step) {
|
|
46
|
-
const lines = [
|
|
47
|
-
` {`,
|
|
48
|
-
` id: '${step.id}',`,
|
|
49
|
-
` type: '${step.type}',`,
|
|
50
|
-
` label: '${escapeString(step.label)}',`
|
|
51
|
-
];
|
|
52
|
-
if (step.description) lines.push(` description: '${escapeString(step.description)}',`);
|
|
53
|
-
const actionLines = [];
|
|
54
|
-
if (step.operation) actionLines.push(`operation: { name: '${step.operation.name}', version: ${step.operation.version} }`);
|
|
55
|
-
if (step.form) actionLines.push(`form: { key: '${step.form.key}', version: ${step.form.version} }`);
|
|
56
|
-
if (actionLines.length) lines.push(` action: { ${actionLines.join(", ")} },`);
|
|
57
|
-
lines.push(` }`);
|
|
58
|
-
return lines.join("\n");
|
|
59
|
-
}
|
|
60
|
-
function toPascalCase(value) {
|
|
61
|
-
return value.split(/[-_.]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
62
|
-
}
|
|
63
|
-
function escapeString(value) {
|
|
64
|
-
return value.replace(/'/g, "\\'");
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
export { generateWorkflowSpec };
|
|
40
|
+
`}function t(e){let t=[` {`,` id: '${e.id}',`,` type: '${e.type}',`,` label: '${r(e.label)}',`];e.description&&t.push(` description: '${r(e.description)}',`);let n=[];return e.operation&&n.push(`operation: { name: '${e.operation.name}', version: ${e.operation.version} }`),e.form&&n.push(`form: { key: '${e.form.key}', version: ${e.form.version} }`),n.length&&t.push(` action: { ${n.join(`, `)} },`),t.push(` }`),t.join(`
|
|
41
|
+
`)}function n(e){return e.split(/[-_.]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function r(e){return e.replace(/'/g,`\\'`)}export{e as generateWorkflowSpec};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/bundle.contractspec-workspace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,31 +23,26 @@
|
|
|
23
23
|
"test": "bun run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@ai-
|
|
30
|
-
"
|
|
31
|
-
"@lssm/
|
|
32
|
-
"@lssm/lib.contracts": "0.0.0-canary-20251217083314",
|
|
33
|
-
"@lssm/lib.contracts-transformers": "0.0.0-canary-20251217083314",
|
|
34
|
-
"@lssm/lib.ai-providers": "0.0.0-canary-20251217083314",
|
|
35
|
-
"@lssm/lib.schema": "0.0.0-canary-20251217083314",
|
|
36
|
-
"@lssm/lib.testing": "0.0.0-canary-20251217083314",
|
|
26
|
+
"@lssm/module.contractspec-workspace": "1.41.1",
|
|
27
|
+
"@lssm/lib.contracts": "1.41.1",
|
|
28
|
+
"@lssm/lib.contracts-transformers": "1.41.1",
|
|
29
|
+
"@lssm/lib.ai-providers": "1.41.1",
|
|
30
|
+
"@lssm/lib.schema": "1.41.1",
|
|
31
|
+
"@lssm/lib.testing": "1.41.1",
|
|
37
32
|
"ai": "beta",
|
|
38
33
|
"zod": "^4.1.13",
|
|
39
34
|
"glob": "^13.0.0",
|
|
40
35
|
"chokidar": "^4.0.1"
|
|
41
36
|
},
|
|
42
37
|
"devDependencies": {
|
|
43
|
-
"@lssm/tool.tsdown": "
|
|
44
|
-
"@lssm/tool.typescript": "
|
|
38
|
+
"@lssm/tool.tsdown": "1.41.1",
|
|
39
|
+
"@lssm/tool.typescript": "1.41.1",
|
|
45
40
|
"@types/node": "^22.10.2",
|
|
46
41
|
"tsdown": "^0.17.4",
|
|
47
42
|
"typescript": "^5.9.3"
|
|
48
43
|
},
|
|
49
44
|
"exports": {
|
|
50
|
-
".": "./
|
|
45
|
+
".": "./src/index.ts",
|
|
51
46
|
"./*": "./*"
|
|
52
47
|
},
|
|
53
48
|
"publishConfig": {
|
package/dist/adapters/ai.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AiAdapter } from "../ports/ai.js";
|
|
2
|
-
import { WorkspaceConfig } from "@lssm/module.contractspec-workspace";
|
|
3
|
-
|
|
4
|
-
//#region src/adapters/ai.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Create a Node.js AI adapter using Vercel AI SDK.
|
|
8
|
-
*/
|
|
9
|
-
declare function createNodeAiAdapter(config: WorkspaceConfig): AiAdapter;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { createNodeAiAdapter };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { WorkspaceAdapters } from "../ports/logger.js";
|
|
2
|
-
import { WorkspaceConfig } from "@lssm/module.contractspec-workspace";
|
|
3
|
-
|
|
4
|
-
//#region src/adapters/factory.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Options for creating adapters.
|
|
8
|
-
*/
|
|
9
|
-
interface CreateAdaptersOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Working directory for file operations.
|
|
12
|
-
*/
|
|
13
|
-
cwd?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Workspace configuration for AI.
|
|
16
|
-
*/
|
|
17
|
-
config?: WorkspaceConfig;
|
|
18
|
-
/**
|
|
19
|
-
* Use no-op logger (for testing).
|
|
20
|
-
*/
|
|
21
|
-
silent?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Create all Node.js adapters with default configuration.
|
|
25
|
-
*/
|
|
26
|
-
declare function createNodeAdapters(options?: CreateAdaptersOptions): WorkspaceAdapters;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { CreateAdaptersOptions, createNodeAdapters };
|
package/dist/adapters/fs.d.ts
DELETED
package/dist/adapters/git.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LoggerAdapter } from "../ports/logger.js";
|
|
2
|
-
|
|
3
|
-
//#region src/adapters/logger.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create a console-based logger adapter.
|
|
7
|
-
* This is a basic implementation - CLI apps should inject their own
|
|
8
|
-
* logger with chalk/ora for better terminal output.
|
|
9
|
-
*/
|
|
10
|
-
declare function createConsoleLoggerAdapter(): LoggerAdapter;
|
|
11
|
-
/**
|
|
12
|
-
* Create a no-op logger adapter.
|
|
13
|
-
* Useful for testing or when logging is not desired.
|
|
14
|
-
*/
|
|
15
|
-
declare function createNoopLoggerAdapter(): LoggerAdapter;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { createConsoleLoggerAdapter, createNoopLoggerAdapter };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WatcherAdapter } from "../ports/watcher.js";
|
|
2
|
-
|
|
3
|
-
//#region src/adapters/watcher.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create a Node.js file watcher adapter using chokidar.
|
|
7
|
-
*/
|
|
8
|
-
declare function createNodeWatcherAdapter(cwd?: string): WatcherAdapter;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createNodeWatcherAdapter };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
//#region src/adapters/workspace.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Workspace and monorepo detection utilities.
|
|
4
|
-
*
|
|
5
|
-
* Provides utilities for detecting workspace roots, package managers,
|
|
6
|
-
* and monorepo configurations across Bun, pnpm, Yarn, and npm.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Supported package managers.
|
|
10
|
-
*/
|
|
11
|
-
type PackageManager = 'bun' | 'pnpm' | 'yarn' | 'npm';
|
|
12
|
-
/**
|
|
13
|
-
* Workspace detection result.
|
|
14
|
-
*/
|
|
15
|
-
interface WorkspaceInfo {
|
|
16
|
-
/**
|
|
17
|
-
* The detected package manager.
|
|
18
|
-
*/
|
|
19
|
-
packageManager: PackageManager;
|
|
20
|
-
/**
|
|
21
|
-
* Root of the workspace (monorepo root or single package root).
|
|
22
|
-
*/
|
|
23
|
-
workspaceRoot: string;
|
|
24
|
-
/**
|
|
25
|
-
* Root of the current package (may differ from workspaceRoot in monorepos).
|
|
26
|
-
*/
|
|
27
|
-
packageRoot: string;
|
|
28
|
-
/**
|
|
29
|
-
* Whether this is a monorepo.
|
|
30
|
-
*/
|
|
31
|
-
isMonorepo: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* List of package paths in monorepo (relative to workspaceRoot).
|
|
34
|
-
*/
|
|
35
|
-
packages?: string[];
|
|
36
|
-
/**
|
|
37
|
-
* Name of the current package (from package.json).
|
|
38
|
-
*/
|
|
39
|
-
packageName?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Find the nearest directory containing a package.json.
|
|
43
|
-
*/
|
|
44
|
-
declare function findPackageRoot(startDir?: string): string;
|
|
45
|
-
/**
|
|
46
|
-
* Find the workspace root (monorepo root or single package root).
|
|
47
|
-
*
|
|
48
|
-
* Walks up the directory tree looking for:
|
|
49
|
-
* 1. pnpm-workspace.yaml (pnpm monorepo)
|
|
50
|
-
* 2. package.json with "workspaces" field (yarn/npm/bun monorepo)
|
|
51
|
-
* 3. Lock files (bun.lockb, pnpm-lock.yaml, yarn.lock, package-lock.json)
|
|
52
|
-
*/
|
|
53
|
-
declare function findWorkspaceRoot(startDir?: string): string;
|
|
54
|
-
/**
|
|
55
|
-
* Detect the package manager in use.
|
|
56
|
-
*
|
|
57
|
-
* Priority:
|
|
58
|
-
* 1. Lock file presence (most reliable)
|
|
59
|
-
* 2. packageManager field in package.json
|
|
60
|
-
* 3. COREPACK_ROOT environment variable
|
|
61
|
-
* 4. Default to npm
|
|
62
|
-
*/
|
|
63
|
-
declare function detectPackageManager(workspaceRoot?: string): PackageManager;
|
|
64
|
-
/**
|
|
65
|
-
* Check if the workspace is a monorepo.
|
|
66
|
-
*/
|
|
67
|
-
declare function isMonorepo(workspaceRoot?: string): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Get workspace package patterns from package.json or pnpm-workspace.yaml.
|
|
70
|
-
*/
|
|
71
|
-
declare function getWorkspacePackages(workspaceRoot: string): string[] | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Get package name from package.json.
|
|
74
|
-
*/
|
|
75
|
-
declare function getPackageName(packageRoot: string): string | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Get complete workspace information.
|
|
78
|
-
*/
|
|
79
|
-
declare function getWorkspaceInfo(startDir?: string): WorkspaceInfo;
|
|
80
|
-
/**
|
|
81
|
-
* Get the run command for the detected package manager.
|
|
82
|
-
*/
|
|
83
|
-
declare function getRunCommand(packageManager: PackageManager, script: string): string;
|
|
84
|
-
/**
|
|
85
|
-
* Get the exec command for the detected package manager.
|
|
86
|
-
*/
|
|
87
|
-
declare function getExecCommand(packageManager: PackageManager, command: string): string;
|
|
88
|
-
/**
|
|
89
|
-
* Get the install command for the detected package manager.
|
|
90
|
-
*/
|
|
91
|
-
declare function getInstallCommand(packageManager: PackageManager, isDev?: boolean): string;
|
|
92
|
-
//#endregion
|
|
93
|
-
export { PackageManager, WorkspaceInfo, detectPackageManager, findPackageRoot, findWorkspaceRoot, getExecCommand, getInstallCommand, getPackageName, getRunCommand, getWorkspaceInfo, getWorkspacePackages, isMonorepo };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AgentProvider, AgentResult, AgentTask } from "./types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/ai/agents/claude-code-agent.d.ts
|
|
4
|
-
|
|
5
|
-
declare class ClaudeCodeAgent implements AgentProvider {
|
|
6
|
-
name: "claude-code";
|
|
7
|
-
private apiKey;
|
|
8
|
-
constructor();
|
|
9
|
-
canHandle(task: AgentTask): boolean;
|
|
10
|
-
generate(task: AgentTask): Promise<AgentResult>;
|
|
11
|
-
validate(task: AgentTask): Promise<AgentResult>;
|
|
12
|
-
private buildSystemPrompt;
|
|
13
|
-
private buildUserPrompt;
|
|
14
|
-
private extractCode;
|
|
15
|
-
private detectIssues;
|
|
16
|
-
private extractErrors;
|
|
17
|
-
private extractWarnings;
|
|
18
|
-
private extractSuggestions;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { ClaudeCodeAgent };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { AgentProvider, AgentResult, AgentTask } from "./types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/ai/agents/cursor-agent.d.ts
|
|
4
|
-
|
|
5
|
-
declare class CursorAgent implements AgentProvider {
|
|
6
|
-
name: "cursor";
|
|
7
|
-
private cursorPath;
|
|
8
|
-
private isWindsurf;
|
|
9
|
-
private composerPort;
|
|
10
|
-
constructor();
|
|
11
|
-
canHandle(task: AgentTask): boolean;
|
|
12
|
-
generate(task: AgentTask): Promise<AgentResult>;
|
|
13
|
-
validate(task: AgentTask): Promise<AgentResult>;
|
|
14
|
-
/**
|
|
15
|
-
* Detect if running in Cursor/Windsurf environment
|
|
16
|
-
*/
|
|
17
|
-
private detectEnvironment;
|
|
18
|
-
/**
|
|
19
|
-
* Execute task using the best available method
|
|
20
|
-
*/
|
|
21
|
-
private executeWithBestMethod;
|
|
22
|
-
/**
|
|
23
|
-
* Use Windsurf's native API
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Use Cursor Composer API
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* Use Cursor CLI directly
|
|
30
|
-
*/
|
|
31
|
-
private useCursorCLI;
|
|
32
|
-
/**
|
|
33
|
-
* File-based approach - create workspace and instructions for manual completion
|
|
34
|
-
*/
|
|
35
|
-
private useFileBasedApproach;
|
|
36
|
-
/**
|
|
37
|
-
* Setup workspace for validation
|
|
38
|
-
*/
|
|
39
|
-
private setupValidationWorkspace;
|
|
40
|
-
/**
|
|
41
|
-
* Prepare files for API submission
|
|
42
|
-
*/
|
|
43
|
-
private prepareFilesForAPI;
|
|
44
|
-
/**
|
|
45
|
-
* Build detailed prompt for cursor
|
|
46
|
-
*/
|
|
47
|
-
private buildDetailedPrompt;
|
|
48
|
-
/**
|
|
49
|
-
* Build validation-specific prompt
|
|
50
|
-
*/
|
|
51
|
-
private buildValidationPrompt;
|
|
52
|
-
/**
|
|
53
|
-
* Generate basic template for task
|
|
54
|
-
*/
|
|
55
|
-
private generateTemplate;
|
|
56
|
-
/**
|
|
57
|
-
* Cleanup temporary work directory
|
|
58
|
-
*/
|
|
59
|
-
private cleanupWorkDir;
|
|
60
|
-
private isCursorAvailable;
|
|
61
|
-
/**
|
|
62
|
-
* Check if Cursor Composer API might be available
|
|
63
|
-
*/
|
|
64
|
-
private hasComposerAPI;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
export { CursorAgent };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AgentProvider, AgentResult, AgentTask } from "./types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/ai/agents/openai-codex-agent.d.ts
|
|
4
|
-
|
|
5
|
-
declare class OpenAICodexAgent implements AgentProvider {
|
|
6
|
-
name: "openai-codex";
|
|
7
|
-
private apiKey;
|
|
8
|
-
constructor();
|
|
9
|
-
canHandle(task: AgentTask): boolean;
|
|
10
|
-
generate(task: AgentTask): Promise<AgentResult>;
|
|
11
|
-
validate(task: AgentTask): Promise<AgentResult>;
|
|
12
|
-
private isComplexTask;
|
|
13
|
-
private buildSystemPrompt;
|
|
14
|
-
private buildUserPrompt;
|
|
15
|
-
private extractCode;
|
|
16
|
-
private detectIssues;
|
|
17
|
-
private extractErrors;
|
|
18
|
-
private extractWarnings;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { OpenAICodexAgent };
|