@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217060433 → 0.0.0-canary-20251217062139
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/adapters/ai.js +1 -1
- package/dist/ai/agents/claude-code-agent.js +1 -1
- package/dist/ai/agents/openai-codex-agent.js +1 -1
- package/dist/ai/agents/orchestrator.js +1 -1
- package/dist/ai/providers.js +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -1
- package/dist/libs/ai-providers/dist/factory.js +1 -0
- package/dist/libs/ai-providers/dist/index.js +1 -0
- package/dist/libs/ai-providers/dist/legacy.js +1 -0
- package/dist/libs/ai-providers/dist/models.js +1 -0
- package/dist/libs/ai-providers/dist/validation.js +1 -0
- package/dist/libs/contracts/dist/capabilities/openbanking.js +1 -0
- package/dist/libs/contracts/dist/client/index.js +1 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +1 -0
- package/dist/libs/contracts/dist/client/react/form-render.js +1 -0
- package/dist/libs/contracts/dist/client/react/index.js +1 -0
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js +1 -0
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +76 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +350 -0
- package/dist/libs/contracts/dist/docs/index.js +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +58 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +38 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +213 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +289 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +262 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +57 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +63 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +36 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +65 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +41 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +122 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +68 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +1 -0
- package/dist/libs/contracts/dist/events.js +1 -0
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
- package/dist/libs/contracts/dist/index.js +1 -0
- package/dist/libs/contracts/dist/install.js +1 -0
- package/dist/libs/contracts/dist/integrations/contracts.js +1 -0
- package/dist/libs/contracts/dist/integrations/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/registry.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +1 -0
- package/dist/libs/contracts/dist/jsonschema.js +1 -0
- package/dist/libs/contracts/dist/knowledge/contracts.js +1 -0
- package/dist/libs/contracts/dist/knowledge/index.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +1 -0
- package/dist/libs/contracts/dist/llm/exporters.js +4 -0
- package/dist/libs/contracts/dist/llm/index.js +1 -0
- package/dist/libs/contracts/dist/llm/prompts.js +75 -0
- package/dist/libs/contracts/dist/onboarding-base.js +1 -0
- package/dist/libs/contracts/dist/openapi.js +1 -0
- package/dist/libs/contracts/dist/ownership.js +1 -0
- package/dist/libs/contracts/dist/presentations.js +1 -0
- package/dist/libs/contracts/dist/presentations.v2.js +1 -0
- package/dist/libs/contracts/dist/prompt.js +1 -0
- package/dist/libs/contracts/dist/promptRegistry.js +1 -0
- package/dist/libs/contracts/dist/regenerator/index.js +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +1 -0
- package/dist/libs/contracts/dist/regenerator/utils.js +1 -0
- package/dist/libs/contracts/dist/registry.js +1 -0
- package/dist/libs/contracts/dist/resources.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/index.js +1 -0
- package/dist/libs/contracts/dist/server/graphql-pothos.js +1 -0
- package/dist/libs/contracts/dist/server/index.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -0
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
- package/dist/libs/contracts/dist/server/rest-express.js +1 -0
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
- package/dist/libs/contracts/dist/spec.js +1 -0
- package/dist/libs/contracts/dist/telemetry/index.js +1 -0
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
- package/dist/libs/contracts/dist/tests/index.js +1 -0
- package/dist/libs/contracts/dist/tests/runner.js +1 -0
- package/dist/libs/contracts/dist/workflow/index.js +1 -0
- package/dist/libs/contracts/dist/workflow/runner.js +1 -0
- package/dist/libs/contracts-transformers/dist/common/utils.js +1 -0
- package/dist/libs/contracts-transformers/dist/openapi/exporter.js +1 -0
- package/dist/libs/contracts-transformers/dist/openapi/importer.js +2 -0
- package/dist/libs/contracts-transformers/dist/openapi/index.js +1 -0
- package/dist/libs/contracts-transformers/dist/openapi/parser.js +1 -0
- package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +4 -0
- package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +100 -0
- package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +69 -0
- package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +2 -0
- package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +1 -0
- package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +1 -0
- package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +1 -0
- package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +1 -0
- package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +1 -0
- package/dist/modules/contractspec-workspace/dist/templates/app-config.js +33 -0
- package/dist/modules/contractspec-workspace/dist/templates/data-view.js +54 -0
- package/dist/modules/contractspec-workspace/dist/templates/event.js +24 -0
- package/dist/modules/contractspec-workspace/dist/templates/experiment.js +62 -0
- package/dist/modules/contractspec-workspace/dist/templates/handler.js +63 -0
- package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +33 -0
- package/dist/modules/contractspec-workspace/dist/templates/integration.js +39 -0
- package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +28 -0
- package/dist/modules/contractspec-workspace/dist/templates/migration.js +37 -0
- package/dist/modules/contractspec-workspace/dist/templates/operation.js +88 -0
- package/dist/modules/contractspec-workspace/dist/templates/presentation.js +53 -0
- package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +69 -0
- package/dist/modules/contractspec-workspace/dist/templates/utils.js +1 -0
- package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +42 -0
- package/dist/modules/contractspec-workspace/dist/templates/workflow.js +41 -0
- package/dist/modules/contractspec-workspace/dist/types/generation-types.js +1 -0
- package/dist/services/agent-guide/adapters/claude-code.js +1 -1
- package/dist/services/agent-guide/adapters/cursor-cli.js +2 -2
- package/dist/services/agent-guide/adapters/generic-mcp.js +1 -1
- package/dist/services/agent-guide/agent-guide-service.js +1 -1
- package/dist/services/build.js +1 -1
- package/dist/services/ci-check/ci-check-service.js +1 -1
- package/dist/services/config.js +1 -1
- package/dist/services/deps.js +1 -1
- package/dist/services/diff.js +1 -1
- package/dist/services/implementation/resolver.js +1 -1
- package/dist/services/integrity.js +1 -1
- package/dist/services/list.js +1 -1
- package/dist/services/openapi/export-service.js +1 -1
- package/dist/services/openapi/import-service.js +1 -1
- package/dist/services/openapi/sync-service.js +1 -1
- package/dist/services/openapi/validate-service.js +1 -1
- package/dist/services/regenerator.js +1 -1
- package/dist/services/test.js +1 -1
- package/dist/services/validate-implementation.js +1 -1
- package/dist/services/validate.js +1 -1
- package/dist/services/verify/ai-verifier.js +6 -6
- package/dist/services/verify/behavior-verifier.js +1 -1
- package/dist/services/verify/structure-verifier.js +1 -1
- package/package.json +9 -9
- package/dist/adapters/index.d.ts +0 -7
- package/dist/ports/index.d.ts +0 -5
- package/dist/services/agent-guide/index.d.ts +0 -6
- package/dist/services/ci-check/index.d.ts +0 -2
- package/dist/services/doctor/index.d.ts +0 -2
- package/dist/services/implementation/index.d.ts +0 -3
- package/dist/services/index.d.ts +0 -56
- package/dist/services/openapi/index.d.ts +0 -5
- package/dist/services/verification-cache/adapters/index.d.ts +0 -3
- package/dist/services/verification-cache/index.d.ts +0 -6
- package/dist/services/verify/index.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"../../libs/contracts-transformers/dist/openapi/parser.js";import{f as t}from"../../libs/contracts-transformers/dist/openapi/importer.js";import"../../libs/contracts-transformers/dist/openapi/index.js";import{dirname as n,join as r}from"path";async function i(i,a){let{fs:o,logger:s}=a,{source:c,outputDir:l,prefix:u,tags:d,exclude:f,defaultStability:p,defaultOwners:m,defaultAuth:h,dryRun:g=!1}=i;s.info(`Importing from OpenAPI: ${c}`);let _=await e(c,{fetch:globalThis.fetch,readFile:e=>o.readFile(e)});if(_.warnings.length>0)for(let e of _.warnings)s.warn(`Parse warning: ${e}`);s.info(`Parsed ${_.operations.length} operations from ${_.info.title} v${_.info.version}`);let v=t(_,{prefix:u,tags:d,exclude:f,defaultStability:p,defaultOwners:m,defaultAuth:h});s.info(`Import result: ${v.summary.imported} imported, ${v.summary.skipped} skipped, ${v.summary.errors} errors`);let y=[],b=[],x=[];for(let e of v.specs){let t=r(l,e.fileName);if(g)s.info(`[DRY RUN] Would create: ${t}`);else{let r=n(t);await o.mkdir(r),await o.writeFile(t,e.code),s.info(`Created: ${t}`)}y.push({path:t,operationId:e.source.sourceId,specName:e.fileName.replace(`.ts`,``)})}for(let e of v.skipped)b.push({operationId:e.sourceId,reason:e.reason}),s.debug(`Skipped: ${e.sourceId} - ${e.reason}`);for(let e of v.errors)x.push({operationId:e.sourceId,error:e.error}),s.error(`Error: ${e.sourceId} - ${e.error}`);return{imported:v.summary.imported,skipped:v.summary.skipped,errors:v.summary.errors,files:y,skippedOperations:b,errorMessages:x}}export{i as importFromOpenApiService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"../../libs/contracts-transformers/dist/openapi/parser.js";import{f as t}from"../../libs/contracts-transformers/dist/openapi/importer.js";import"../../libs/contracts-transformers/dist/openapi/index.js";import{dirname as n,join as r}from"path";async function i(i,a,o){let{fs:s,logger:c}=o,{sources:l,sourceName:u,interactive:d,force:f,dryRun:p}=i,{sources:m,outputDir:h}=a,g=l??m??[];if(u&&(g=g.filter(e=>e.name===u),g.length===0))throw Error(`Source not found: ${u}`);if(g.length===0)return c.warn(`No OpenAPI sources configured. Add sources to .contractsrc.json`),{added:0,updated:0,unchanged:0,conflicts:0,changes:[]};let _={added:0,updated:0,unchanged:0,conflicts:0,changes:[]};for(let i of g){c.info(`Syncing with source: ${i.name}`);let a=i.url??i.file;if(!a){c.warn(`Source ${i.name} has no url or file configured`);continue}let o=await e(a,{fetch:globalThis.fetch,readFile:e=>s.readFile(e)});c.info(`Parsed ${o.operations.length} operations from ${i.name}`);let l=t(o,{prefix:i.prefix,tags:i.tags,exclude:i.exclude,defaultStability:i.defaultStability,defaultAuth:i.defaultAuth});for(let e of l.specs){let t=r(h,e.fileName);if(await s.exists(t))await s.readFile(t)===e.code?(_.unchanged++,_.changes.push({operationId:e.source.sourceId,action:`unchanged`,path:t})):f===`openapi`?(p||await s.writeFile(t,e.code),_.updated++,_.changes.push({operationId:e.source.sourceId,action:`updated`,path:t}),c.info(`Updated: ${e.source.sourceId}`)):f===`contractspec`?(_.unchanged++,_.changes.push({operationId:e.source.sourceId,action:`unchanged`,path:t}),c.info(`Kept: ${e.source.sourceId}`)):d?(_.conflicts++,_.changes.push({operationId:e.source.sourceId,action:`conflict`,path:t}),c.warn(`Conflict: ${e.source.sourceId} - needs resolution`)):(_.conflicts++,_.changes.push({operationId:e.source.sourceId,action:`conflict`,path:t}),c.warn(`Conflict: ${e.source.sourceId}`));else{if(!p){let r=n(t);await s.mkdir(r),await s.writeFile(t,e.code)}_.added++,_.changes.push({operationId:e.source.sourceId,action:`added`,path:t}),c.info(`Added: ${e.source.sourceId}`)}}}return c.info(`Sync complete: ${_.added} added, ${_.updated} updated, ${_.unchanged} unchanged, ${_.conflicts} conflicts`),_}export{i as syncWithOpenApiService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"../../libs/contracts-transformers/dist/openapi/parser.js";import"../../libs/contracts-transformers/dist/openapi/index.js";async function t(t,n){let{fs:r,logger:i}=n,{specPath:a,openApiSource:o,ignoreDescriptions:s,ignoreTags:c,ignoreTransport:l}=t;i.info(`Validating specs against OpenAPI: ${o}`);let u=await e(o,{fetch:globalThis.fetch,readFile:e=>r.readFile(e)});i.info(`Parsed ${u.operations.length} operations from ${u.info.title}`);let d=new Map;for(let e of u.operations)d.set(e.operationId,e);let f=[],p=0,m=0,h=await r.stat(a),g=[];if(h.isDirectory){let e=await r.glob({pattern:`**/*.ts`,cwd:a,ignore:[`node_modules/**`,`dist/**`,`*.test.ts`,`*.spec.ts`],absolute:!0});g.push(...e)}else g.push(a);i.info(`Found ${g.length} spec files to validate`);for(let e of g)try{let t=await r.readFile(e),n=t.match(/operationId:\s*['"]([^'"]+)['"]/)||t.match(/name:\s*['"]([^'"]+)['"]/)||t.match(/export\s+const\s+(\w+)Spec\s*=/);if(!n||!n[1]){i.debug(`Could not extract operationId from ${e}`);continue}let a=n[1];p++;let o;if(o=d.get(a),!o){let e=a.replace(/([A-Z])/g,`_$1`).toLowerCase();o=d.get(e)}if(!o){for(let[e,t]of d)if(e.toLowerCase().includes(a.toLowerCase())||a.toLowerCase().includes(e.toLowerCase())){o=t;break}}if(!o){f.push({specPath:e,valid:!1,diffs:[{path:``,type:`removed`,description:`No matching operation found in OpenAPI for spec: ${a}`}]}),m++;continue}let s=[];if(o.deprecated&&!t.includes(`deprecated`)&&s.push({path:`meta.stability`,type:`modified`,description:`OpenAPI operation is deprecated but spec does not indicate deprecation`}),!l){let e=t.match(/path:\s*['"]([^'"]+)['"]/);e&&e[1]!==o.path&&s.push({path:`transport.rest.path`,type:`modified`,description:`Path mismatch: spec has "${e[1]}", OpenAPI has "${o.path}"`})}if(!l){let e=t.match(/method:\s*['"]([^'"]+)['"]/);e?.[1]&&e[1].toLowerCase()!==o.method.toLowerCase()&&s.push({path:`transport.rest.method`,type:`modified`,description:`Method mismatch: spec has "${e[1]}", OpenAPI has "${o.method.toUpperCase()}"`})}let c=s.length===0;c||m++,f.push({specPath:e,operationId:o.operationId,valid:c,diffs:s})}catch(t){i.error(`Error validating ${e}: ${t}`),f.push({specPath:e,valid:!1,diffs:[{path:``,type:`modified`,description:`Error: ${t instanceof Error?t.message:String(t)}`}]}),m++}let _=m===0;return i.info(`Validation ${_?`passed`:`failed`}: ${p} specs checked, ${m} with differences`),{valid:_,specsValidated:p,specsWithDiffs:m,results:f}}export{t as validateAgainstOpenApiService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as e}from"../libs/contracts/dist/regenerator/service.js";import"../libs/contracts/dist/regenerator/index.js";function t(t){return new e({contexts:t.contexts,adapters:t.adapters??{},rules:t.rules,sink:t.sink,pollIntervalMs:t.pollIntervalMs,batchDurationMs:t.batchDurationMs})}export{t as createRegeneratorService};
|
package/dist/services/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"../libs/contracts/dist/tests/runner.js";import"../libs/contracts/dist/tests/index.js";async function t(t,n){let r=new e({registry:n}),i=[],a=0,o=0;for(let e of t){let t=await r.run(e);i.push(t),a+=t.passed,o+=t.failed}return{results:i,passed:a,failed:o}}export{t as runTests};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"../modules/contractspec-workspace/dist/analysis/spec-scan.js";function t(e){return e.replace(/\./g,`-`).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function n(e){return e.split(/[-_.]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}async function r(r,i,a,o={}){let{fs:s}=i,c=[],l=[];if(!await s.exists(r))return{valid:!1,errors:[`Spec file not found: ${r}`],warnings:[],expected:{}};let u=e(await s.readFile(r),r),d=u.name??s.basename(r).replace(/\.[jt]s$/,``),f=o.outputDir??a.outputDir??`./src`,p=t(d),m={};if(u.specType===`operation`&&(m.handlerPath=s.join(f,`handlers`,`${p}.handler.ts`),m.handlerTestPath=s.join(f,`handlers`,`${p}.handler.test.ts`)),u.specType===`presentation`&&(m.componentPath=s.join(f,`components`,`${p}.tsx`),m.componentTestPath=s.join(f,`components`,`${p}.test.tsx`)),u.specType===`form`&&(m.formPath=s.join(f,`forms`,`${p}.form.tsx`),m.formTestPath=s.join(f,`forms`,`${p}.form.test.tsx`)),o.checkHandlers&&m.handlerPath)if(!await s.exists(m.handlerPath))c.push(`Missing handler file: ${m.handlerPath}`);else{let e=await s.readFile(m.handlerPath),t=`${n(d.split(`.`).pop()??d)}Spec`,r=/ContractHandler<\s*typeof\s+\w+\s*>/.test(e),i=RegExp(`typeof\\s+${t}\\b`).test(e);r?i||l.push(`Handler ContractHandler typing does not reference expected spec var (${t}): ${m.handlerPath}`):l.push(`Handler does not appear to type itself as ContractHandler<typeof Spec>: ${m.handlerPath}`)}if(o.checkTests){let e=[m.handlerTestPath,m.componentTestPath,m.formTestPath].filter(e=>typeof e==`string`);for(let t of e)await s.exists(t)||c.push(`Missing test file: ${t}`)}return{valid:c.length===0,errors:c,warnings:l,expected:m}}export{r as validateImplementationFiles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e}from"../modules/contractspec-workspace/dist/analysis/validate/spec-structure.js";async function t(t,n,r={}){let{fs:i}=n;if(!await i.exists(t))return{valid:!1,errors:[`Spec file not found: ${t}`],warnings:[]};let a=await i.readFile(t),o=i.basename(t),s=[],c=[],l;return r.skipStructure||(l=e(a,o),s.push(...l.errors),c.push(...l.warnings)),{valid:s.length===0,structureResult:l,errors:s,warnings:c}}async function n(e,n,r={}){let i=new Map;for(let a of e){let e=await t(a,n,r);i.set(a,e)}return i}export{t as validateSpec,n as validateSpecs};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`),i=`info`;for(let e of r){let t=e.toLowerCase();t.includes(`error`)||t.includes(`critical`)?i=`error`:t.includes(`warning`)||t.includes(`should`)?i=`warning`:(t.includes(`info`)||t.includes(`note`))&&(i=`info`);let r=e.match(/^[-*•]\s*(.+)$/),a=e.match(/^\d+\.\s*(.+)$/);if(r||a){let e=r?.[1]??a?.[1]??``;e.length>10&&n.push({category:`semantic`,severity:i,message:e})}}let a=n.some(e=>e.severity===`error`);return{compliant:!a,confidence:a?.3:n.length===0?.9:.7,findings:n,rawResponse:e}}async function
|
|
1
|
+
import{o as e}from"../../libs/contracts/dist/llm/prompts.js";import"../../libs/contracts/dist/llm/index.js";function t(e){let t=e.match(/```json\n?([\s\S]*?)\n?```/);if(t?.[1])try{let n=JSON.parse(t[1]);return{compliant:n.passed??!1,confidence:(n.score??0)/100,findings:(n.issues??[]).map(e=>({category:String(e.category??`semantic`),severity:String(e.severity??`warning`),message:String(e.message??``),location:e.location?String(e.location):void 0,suggestion:e.suggestion?String(e.suggestion):void 0})),rawResponse:e}}catch{}let n=[],r=e.split(`
|
|
2
|
+
`),i=`info`;for(let e of r){let t=e.toLowerCase();t.includes(`error`)||t.includes(`critical`)?i=`error`:t.includes(`warning`)||t.includes(`should`)?i=`warning`:(t.includes(`info`)||t.includes(`note`))&&(i=`info`);let r=e.match(/^[-*•]\s*(.+)$/),a=e.match(/^\d+\.\s*(.+)$/);if(r||a){let e=r?.[1]??a?.[1]??``;e.length>10&&n.push({category:`semantic`,severity:i,message:e})}}let a=n.some(e=>e.severity===`error`);return{compliant:!a,confidence:a?.3:n.length===0?.9:.7,findings:n,rawResponse:e}}async function n(e,t){if(!t.aiApiKey)return`\`\`\`json
|
|
3
3
|
{
|
|
4
4
|
"passed": true,
|
|
5
5
|
"score": 50,
|
|
@@ -16,7 +16,7 @@ import{generateVerificationPrompt as e,specToFullMarkdown as t}from"@lssm/lib.co
|
|
|
16
16
|
],
|
|
17
17
|
"summary": "AI verification skipped - no API key configured. Structure and behavior checks have been performed."
|
|
18
18
|
}
|
|
19
|
-
\`\`\``;try{let n=t.aiProvider??`anthropic`;if(n===`anthropic`){let{anthropic:t}=await import(
|
|
19
|
+
\`\`\``;try{let n=t.aiProvider??`anthropic`;if(n===`anthropic`){let{anthropic:t}=await import(`@ai-sdk/anthropic`),{generateText:n}=await import(`ai`);return(await n({model:t(`claude-3-5-sonnet-20241022`),prompt:e,system:`You are an expert code reviewer analyzing implementation compliance with specifications. Respond with structured JSON.`})).text}else if(n===`openai`){let{openai:t}=await import(`@ai-sdk/openai`),{generateText:n}=await import(`ai`);return(await n({model:t(`gpt-4o`),prompt:e,system:`You are an expert code reviewer analyzing implementation compliance with specifications. Respond with structured JSON.`})).text}throw Error(`Unknown AI provider: ${n}`)}catch(e){return`\`\`\`json
|
|
20
20
|
{
|
|
21
21
|
"passed": false,
|
|
22
22
|
"score": 0,
|
|
@@ -25,7 +25,7 @@ import{generateVerificationPrompt as e,specToFullMarkdown as t}from"@lssm/lib.co
|
|
|
25
25
|
],
|
|
26
26
|
"summary": "AI verification encountered an error"
|
|
27
27
|
}
|
|
28
|
-
\`\`\``}}async function
|
|
28
|
+
\`\`\``}}async function r(r,i={}){let{spec:a,implementationCode:o,implementationPath:s}=r,c=Date.now(),l=t(await n(e(a,o).taskPrompt,i)),u=l.findings.map(e=>({severity:e.severity,category:`semantic`,message:e.message,location:e.location?{file:e.location}:s?{file:s}:void 0,suggestion:e.suggestion})),d=Math.round(l.confidence*100),f=l.compliant;return{tier:`ai_review`,passed:f,score:d,issues:u,suggestions:l.findings.filter(e=>e.suggestion).map(e=>e.suggestion),coverage:{scenarios:{total:0,covered:0},errors:{total:0,handled:0},fields:{total:1,implemented:f?1:0}},meta:{specName:a.meta.name,specVersion:a.meta.version,implementationPath:s??`unknown`,verifiedAt:new Date().toISOString(),duration:Date.now()-c}}}function i(e){let{spec:t,implementationCode:n,implementationPath:r}=e,i=Date.now(),a=[];n.includes(`console.log`)&&a.push({severity:`warning`,category:`semantic`,message:`Console.log statements found - consider using proper logging`,suggestion:`Use a structured logger instead of console.log`}),(n.includes(`// TODO`)||n.includes(`// FIXME`))&&a.push({severity:`info`,category:`semantic`,message:`TODO/FIXME comments found - implementation may be incomplete`,suggestion:`Address TODO items before finalizing implementation`}),t.policy.auth!==`anonymous`&&!n.includes(`auth`)&&a.push({severity:`warning`,category:`semantic`,message:`Spec requires ${t.policy.auth} auth but no auth check found`,suggestion:`Add authentication check at the handler entry point`});let o=a.filter(e=>e.severity===`error`).length===0?80:40,s=a.filter(e=>e.severity===`error`).length===0;return{tier:`ai_review`,passed:s,score:o,issues:a,suggestions:a.filter(e=>e.suggestion).map(e=>e.suggestion),coverage:{scenarios:{total:0,covered:0},errors:{total:0,handled:0},fields:{total:1,implemented:s?1:0}},meta:{specName:t.meta.name,specVersion:t.meta.version,implementationPath:r??`unknown`,verifiedAt:new Date().toISOString(),duration:Date.now()-i}}}function a(e,t){return`You are analyzing a code implementation against its specification.
|
|
29
29
|
|
|
30
30
|
## Spec Schema Fields
|
|
31
31
|
${e}
|
|
@@ -72,5 +72,5 @@ Match types:
|
|
|
72
72
|
- "compatible": Semantically similar (e.g., "email" vs "emailAddress")
|
|
73
73
|
- "mismatch": Different meaning despite similar naming
|
|
74
74
|
- "missing": Spec field not found in implementation
|
|
75
|
-
`}function
|
|
76
|
-
`)}function
|
|
75
|
+
`}function o(e){let t=[],n=(e,n)=>{try{let r=e?._def?.shape;if(r&&typeof r==`function`){let e=r();for(let[r,i]of Object.entries(e)){let e=i?._def?.typeName??`unknown`;t.push(`- ${r}: ${String(e).replace(`Zod`,``).toLowerCase()} (${n})`)}}}catch{t.push(`- [unable to extract ${n} fields]`)}};return e.io.input&&n(e.io.input,`input`),e.io.output&&!(`resourceRef`in e.io.output)&&n(e.io.output,`output`),t.length===0?`- [no schema fields could be extracted]`:t.join(`
|
|
76
|
+
`)}function s(e){let t=e.match(/```json\n?([\s\S]*?)\n?```/);if(t?.[1])try{let n=JSON.parse(t[1]);return{fieldMappings:(n.fieldMappings??[]).map(e=>({specField:String(e.specField??``),specType:String(e.specType??`unknown`),implementationField:e.implementationField?String(e.implementationField):void 0,implementationType:e.implementationType?String(e.implementationType):void 0,match:e.match??`missing`,aiConfidence:typeof e.aiConfidence==`number`?e.aiConfidence:.5,suggestion:e.suggestion?String(e.suggestion):void 0})),intentAlignment:{score:typeof n.intentAlignment?.score==`number`?n.intentAlignment.score:50,issues:Array.isArray(n.intentAlignment?.issues)?n.intentAlignment.issues:[],suggestions:Array.isArray(n.intentAlignment?.suggestions)?n.intentAlignment.suggestions:[]},semanticIssues:(n.semanticIssues??[]).map(e=>({category:String(e.category??`semantic`),severity:e.severity??`warning`,message:String(e.message??``),suggestion:e.suggestion?String(e.suggestion):void 0})),rawResponse:e}}catch{}return{fieldMappings:[],intentAlignment:{score:50,issues:[`Unable to parse AI response for semantic analysis`],suggestions:[]},semanticIssues:[],rawResponse:e}}async function c(e,t={}){let{spec:r,implementationCode:i}=e;return s(await n(a(o(r),i),t))}async function l(e,t={}){let{spec:n,implementationCode:i,implementationPath:a}=e,o=Date.now(),s=await r(e,t),l;if(t.aiApiKey)try{l=await c(e,t)}catch{}if(l){let e=[];for(let t of l.fieldMappings)t.match===`missing`?e.push({severity:`error`,category:`semantic`,message:`Missing field: '${t.specField}' (${t.specType}) not found in implementation`,suggestion:t.suggestion??`Add field '${t.specField}' to implementation`}):t.match===`mismatch`?e.push({severity:`warning`,category:`semantic`,message:`Field mismatch: '${t.specField}' has incorrect implementation as '${t.implementationField}'`,suggestion:t.suggestion}):t.match===`compatible`&&t.aiConfidence<.8&&e.push({severity:`info`,category:`semantic`,message:`Field naming: '${t.specField}' implemented as '${t.implementationField}' (compatible but not exact)`,suggestion:t.suggestion});for(let t of l.intentAlignment.issues)e.push({severity:`warning`,category:`semantic`,message:t});for(let t of l.semanticIssues)e.push({severity:t.severity,category:`semantic`,message:t.message,suggestion:t.suggestion});s.issues=[...s.issues,...e];let t=l.fieldMappings.length,n=l.fieldMappings.filter(e=>e.match===`exact`||e.match===`compatible`).length;if(t>0){let e=Math.round(n/t*100);s.score=Math.round((s.score+e)/2),s.coverage.fields={total:t,implemented:n}}e.some(e=>e.severity===`error`)&&(s.passed=!1),s.suggestions=[...s.suggestions,...l.intentAlignment.suggestions]}return s.meta={...s.meta,duration:Date.now()-o},s}export{i as createQuickAIReview,c as verifySemanticFields,r as verifyWithAI,l as verifyWithAIEnhanced};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e}from"../../libs/contracts/dist/spec.js";function t(e,t){let n=[...t.given,...t.when,...t.then].flatMap(e=>e.toLowerCase().split(/\s+/).filter(e=>e.length>3)),r=e.toLowerCase(),i=n.filter(e=>r.includes(e)),a=n.length>0?i.length/n.length:0,o=t.name.toLowerCase().replace(/\s+/g,``),s=r.includes(o)||r.includes(`test('${t.name.toLowerCase()}'`)||r.includes(`it('${t.name.toLowerCase()}'`)||r.includes(`describe('${t.name.toLowerCase()}'`),c=a>=.3||s;return{name:t.name,type:`scenario`,passed:c,expected:`Given: ${t.given.join(`; `)}; When: ${t.when.join(`; `)}; Then: ${t.then.join(`; `)}`,details:c?void 0:`Scenario keywords not found in implementation (${Math.round(a*100)}% coverage)`}}function n(e,t){let n=JSON.stringify(t.input),i=JSON.stringify(t.output),a=r(t.input),o=r(t.output),s=e.toLowerCase(),c=a.filter(e=>s.includes(e.toLowerCase())),l=o.filter(e=>s.includes(e.toLowerCase())),u=((a.length>0?c.length/a.length:1)+(o.length>0?l.length/o.length:1))/2,d=u>=.2;return{name:t.name,type:`example`,passed:d,expected:`Input: ${n.slice(0,100)}...; Output: ${i.slice(0,100)}...`,details:d?void 0:`Example values not found in implementation (${Math.round(u*100)}% coverage)`}}function r(e){let t=[];function n(e){typeof e==`string`&&e.length>2?t.push(e):Array.isArray(e)?e.forEach(n):e&&typeof e==`object`&&Object.values(e).forEach(n)}return n(e),t}function i(e,t,n){let r=e.includes(t),i=n.http?e.includes(String(n.http)):!0,a=n.when.toLowerCase().split(/\s+/).filter(e=>e.length>3),o=e.toLowerCase(),s=a.filter(e=>o.includes(e)),c=a.length>0?s.length/a.length:1,l=r&&(i||c>=.3);return{name:`Error: ${t}`,type:`error`,passed:l,expected:`When: ${n.when}; Return: ${t} (HTTP ${n.http??400})`,details:l?void 0:r?`Error condition not properly implemented`:`Error code '${t}' not found in implementation`}}function a(t,n){let r=n.sideEffects?.emits??[],i=[];for(let n of r){let r=e(n)?n.ref.name:n.name,a=n.when,o=a.toLowerCase().split(/\s+/).filter(e=>e.length>3),s=t.toLowerCase(),c=s.includes(r.toLowerCase()),l=o.filter(e=>s.includes(e)),u=o.length>0?l.length/o.length:1;i.push({name:`Event: ${r}`,type:`scenario`,passed:c&&u>=.3,expected:`Emit ${r} when: ${a}`,details:c?u<.3?`Event condition not properly implemented`:void 0:`Event '${r}' not found`})}return i}function o(e,t){if(t.policy.idempotent===void 0||!t.policy.idempotent)return null;let n=[`idempotency`,`idempotent`,`already exists`,`upsert`,`on conflict`,`if not exists`,`dedupe`,`duplicate`],r=e.toLowerCase(),i=n.some(e=>r.includes(e));return{name:`Idempotency`,type:`scenario`,passed:i,expected:`Operation should be idempotent (safe to retry)`,details:i?void 0:`No idempotency pattern found for idempotent operation`}}function s(e){let{spec:r,implementationCode:s,implementationPath:c}=e,l=Date.now(),u=[];for(let e of r.acceptance?.scenarios??[])u.push(t(s,e));for(let e of r.acceptance?.examples??[])u.push(n(s,e));for(let[e,t]of Object.entries(r.io.errors??{}))u.push(i(s,e,t));u.push(...a(s,r));let d=o(s,r);d&&u.push(d);let f=u.filter(e=>!e.passed).map(e=>({severity:e.type===`error`?`error`:`warning`,category:e.type===`scenario`||e.type===`example`?`scenario`:`error_handling`,message:e.details??`${e.type} not covered: ${e.name}`,location:c?{file:c}:void 0,suggestion:e.expected?`Expected: ${e.expected}`:void 0})),p=u.filter(e=>e.type===`scenario`),m=u.filter(e=>e.type===`error`),h=u.filter(e=>e.passed).length,g=u.length>0?Math.round(h/u.length*100):100;return{tier:`behavior`,passed:f.filter(e=>e.severity===`error`).length===0,score:g,issues:f,suggestions:u.filter(e=>!e.passed&&e.expected).map(e=>`${e.name}: ${e.expected}`),coverage:{scenarios:{total:p.length,covered:p.filter(e=>e.passed).length},errors:{total:m.length,handled:m.filter(e=>e.passed).length},fields:{total:u.length,implemented:h}},meta:{specName:r.meta.name,specVersion:r.meta.version,implementationPath:c??`unknown`,verifiedAt:new Date().toISOString(),duration:Date.now()-l}}}export{s as verifyBehavior};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e}from"../../libs/contracts/dist/spec.js";function t(e){let t=/export\s+(async\s+)?function\s+\w+/.test(e)||/export\s+const\s+\w+\s*=\s*(async\s*)?\(/.test(e)||/export\s+default\s+(async\s+)?function/.test(e)||/export\s+\{\s*\w+/.test(e);return{name:`handler_export`,passed:t,details:t?void 0:`No exported handler function found`,suggestion:`Export a function that handles the operation: export async function handle(...) { }`}}function n(e){let t=e.includes(`from '@lssm/lib.contracts'`)||e.includes(`from "@lssm/lib.contracts"`);return{name:`contracts_import`,passed:t,details:t?void 0:`Missing import from @lssm/lib.contracts`,suggestion:`Add: import { ... } from '@lssm/lib.contracts';`}}function r(e,t){if(!(t.io.input!==null||t.io.output!==null))return{name:`schema_import`,passed:!0};let n=e.includes(`from '@lssm/lib.schema'`)||e.includes(`from "@lssm/lib.schema"`);return{name:`schema_import`,passed:n,details:n?void 0:`Missing import from @lssm/lib.schema`,suggestion:`Add: import { ... } from '@lssm/lib.schema';`}}function i(e){let t=/:\s*any\b|as\s+any\b|<any>/,n=e.split(`
|
|
2
2
|
`),r=[];for(let e=0;e<n.length;e++){let i=n[e]??``;i.trim().startsWith(`//`)||i.trim().startsWith(`*`)||t.test(i)&&r.push(e+1)}return{name:`no_any_type`,passed:r.length===0,details:r.length>0?`Found 'any' type on lines: ${r.slice(0,5).join(`, `)}${r.length>5?`...`:``}`:void 0,suggestion:`Replace any with proper types from the spec schema`}}function a(e,t){let n=t.io.errors;if(!n||Object.keys(n).length===0)return{name:`error_handling`,passed:!0};let r=Object.keys(n),i=[];for(let t of r)e.includes(t)||i.push(t);return{name:`error_handling`,passed:i.length===0,details:i.length>0?`Missing error handling for: ${i.join(`, `)}`:void 0,suggestion:`Implement handlers for all error cases defined in the spec`}}function o(t,n){let r=n.sideEffects?.emits;if(!r||r.length===0)return{name:`event_emission`,passed:!0};let i=t.includes(`emit(`)||t.includes(`.emit(`)||t.includes(`publish(`)||t.includes(`.publish(`)||t.includes(`dispatchEvent`)||t.includes(`eventBus`),a=r.map(t=>e(t)?t.ref.name:t.name),o=a.filter(e=>t.includes(e));return{name:`event_emission`,passed:i&&o.length>0,details:i?o.length===0?`Events not referenced: ${a.join(`, `)}`:void 0:`No event emission pattern found`,suggestion:`Emit events as specified in sideEffects.emits`}}function s(e,t){if(!t.io.input)return{name:`input_validation`,passed:!0};let n=e.includes(`.parse(`)||e.includes(`.safeParse(`)||e.includes(`validate(`)||e.includes(`.validate(`)||e.includes(`schema.`)||e.includes(`zodSchema`)||e.includes(`.getZod()`);return{name:`input_validation`,passed:n,details:n?void 0:`No input validation pattern found`,suggestion:`Validate input using the schema: schema.parse(input) or schema.safeParse(input)`}}function c(e,t){let n=/export\s+(const\s+\w+\s*=\s*)?async/.test(e)||/async\s+function/.test(e);return t.meta.kind===`command`?{name:`async_patterns`,passed:n,details:n?void 0:`Handler should be async for command operations`,suggestion:`Make the handler function async: export async function handle(...)`}:{name:`async_patterns`,passed:!0}}function l(e){let{spec:l,implementationCode:u,implementationPath:d}=e,f=Date.now(),p=[t(u),n(u),r(u,l),i(u),a(u,l),o(u,l),s(u,l),c(u,l)],m=p.filter(e=>!e.passed).map(e=>({severity:e.name===`no_any_type`?`warning`:`error`,category:e.name.includes(`import`)?`import`:e.name.includes(`export`)?`export`:`type`,message:e.details??`Check failed: ${e.name}`,location:d?{file:d}:void 0,suggestion:e.suggestion})),h=p.filter(e=>e.passed).length,g=Math.round(h/p.length*100),_=m.filter(e=>e.severity===`error`).length===0,v=p.filter(e=>!e.passed&&e.suggestion).map(e=>e.suggestion),y=Object.keys(l.io.errors??{}).length;return{tier:`structure`,passed:_,score:g,issues:m,suggestions:v,coverage:{scenarios:{total:0,covered:0},errors:{total:y,handled:p.find(e=>e.name===`error_handling`)?.passed?y:0},fields:{total:p.length,implemented:h}},meta:{specName:l.meta.name,specVersion:l.meta.version,implementationPath:d??`unknown`,verifiedAt:new Date().toISOString(),duration:Date.now()-f}}}export{l as verifyStructure};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/bundle.contractspec-workspace",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217062139",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"test": "bun run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lssm/module.contractspec-workspace": "0.0.0-canary-
|
|
27
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
28
|
-
"@lssm/lib.contracts-transformers": "0.0.0-canary-
|
|
29
|
-
"@lssm/lib.ai-providers": "0.0.0-canary-
|
|
30
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
31
|
-
"@lssm/lib.testing": "0.0.0-canary-
|
|
26
|
+
"@lssm/module.contractspec-workspace": "0.0.0-canary-20251217062139",
|
|
27
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217062139",
|
|
28
|
+
"@lssm/lib.contracts-transformers": "0.0.0-canary-20251217062139",
|
|
29
|
+
"@lssm/lib.ai-providers": "0.0.0-canary-20251217062139",
|
|
30
|
+
"@lssm/lib.schema": "0.0.0-canary-20251217062139",
|
|
31
|
+
"@lssm/lib.testing": "0.0.0-canary-20251217062139",
|
|
32
32
|
"ai": "beta",
|
|
33
33
|
"zod": "^4.1.13",
|
|
34
34
|
"glob": "^13.0.0",
|
|
35
35
|
"chokidar": "^4.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
39
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
38
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217062139",
|
|
39
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217062139",
|
|
40
40
|
"@types/node": "^22.10.2",
|
|
41
41
|
"tsdown": "^0.17.4",
|
|
42
42
|
"typescript": "^5.9.3"
|
package/dist/adapters/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createNodeFsAdapter } from "./fs.js";
|
|
2
|
-
import { createNodeGitAdapter } from "./git.js";
|
|
3
|
-
import { createNodeWatcherAdapter } from "./watcher.js";
|
|
4
|
-
import { createNodeAiAdapter } from "./ai.js";
|
|
5
|
-
import { createConsoleLoggerAdapter, createNoopLoggerAdapter } from "./logger.js";
|
|
6
|
-
import { CreateAdaptersOptions, createNodeAdapters } from "./factory.js";
|
|
7
|
-
import { PackageManager, WorkspaceInfo, detectPackageManager, findPackageRoot, findWorkspaceRoot, getExecCommand, getInstallCommand, getPackageName, getRunCommand, getWorkspaceInfo, getWorkspacePackages, isMonorepo } from "./workspace.js";
|
package/dist/ports/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DiscoverOptions, FileStat, FsAdapter } from "./fs.js";
|
|
2
|
-
import { GitAdapter, GitCleanOptions } from "./git.js";
|
|
3
|
-
import { WatchEvent, WatchEventHandler, WatchEventType, WatchOptions, Watcher, WatcherAdapter } from "./watcher.js";
|
|
4
|
-
import { AiAdapter, AiGenerateOptions, AiGenerateResult, AiGenerateStructuredOptions, AiValidationResult } from "./ai.js";
|
|
5
|
-
import { LogLevel, LoggerAdapter, ProgressReporter, ProgressUpdate, WorkspaceAdapters } from "./logger.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AgentAdapter, AgentGuideConfig, FormatOptions, GuideOptions, GuideResult } from "./types.js";
|
|
2
|
-
import { AgentGuideService, agentGuideService, createAgentGuideService } from "./agent-guide-service.js";
|
|
3
|
-
import { ClaudeCodeAdapter, claudeCodeAdapter } from "./adapters/claude-code.js";
|
|
4
|
-
import { CursorCLIAdapter, cursorCLIAdapter } from "./adapters/cursor-cli.js";
|
|
5
|
-
import { GenericMCPAdapter, genericMCPAdapter } from "./adapters/generic-mcp.js";
|
|
6
|
-
import { agentAdapters, getAgentAdapter, listAgentTypes } from "./adapters/index.js";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { ALL_CHECK_CATEGORIES, CHECK_CATEGORY_LABELS, CheckCategory, CheckContext, CheckResult, CheckStatus, DoctorOptions, DoctorPromptCallbacks, DoctorResult, FixAction, FixResult } from "./types.js";
|
|
2
|
-
import { formatCheckResult, formatDoctorSummary, runDoctor } from "./doctor-service.js";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DiscoveryOptions, ImplementationSource, ImplementationStatus, ResolvedImplementation, SpecImplementationResult, SpecReferenceMatch } from "./types.js";
|
|
2
|
-
import { discoverAllImplementations, discoverImplementationsForSpec, extractSpecReferences, inferImplementationType } from "./discovery.js";
|
|
3
|
-
import { ResolverOptions, getImplementationSummary, resolveAllImplementations, resolveImplementations } from "./resolver.js";
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { PackageManager, WorkspaceInfo, detectPackageManager, findPackageRoot, findWorkspaceRoot, getWorkspaceInfo } from "../adapters/workspace.js";
|
|
2
|
-
import { ValidateSpecOptions, ValidateSpecResult, validateSpec, validateSpecs } from "./validate.js";
|
|
3
|
-
import { ValidateImplementationOptions, ValidateImplementationResult, validateImplementationFiles } from "./validate-implementation.js";
|
|
4
|
-
import { CompareSpecsOptions, CompareSpecsResult, compareSpecs } from "./diff.js";
|
|
5
|
-
import { AnalyzeDepsOptions, AnalyzeDepsResult, analyzeDeps, exportGraphAsDot, getContractNode, getGraphStats } from "./deps.js";
|
|
6
|
-
import { ListSpecsOptions, groupSpecsByType, listSpecs } from "./list.js";
|
|
7
|
-
import { getApiKey, loadWorkspaceConfig, mergeWorkspaceConfig } from "./config.js";
|
|
8
|
-
import { BuildSpecOptions, BuildSpecResult, BuildTarget, BuildTargetResult, buildSpec } from "./build.js";
|
|
9
|
-
import { OpenApiExportServiceOptions, OpenApiExportServiceResult, OpenApiImportServiceOptions, OpenApiImportServiceResult, OpenApiSourceConfig, OpenApiSyncServiceOptions, OpenApiSyncServiceResult, OpenApiValidateServiceOptions, OpenApiValidateServiceResult } from "./openapi/types.js";
|
|
10
|
-
import { importFromOpenApiService } from "./openapi/import-service.js";
|
|
11
|
-
import { syncWithOpenApiService } from "./openapi/sync-service.js";
|
|
12
|
-
import { validateAgainstOpenApiService } from "./openapi/validate-service.js";
|
|
13
|
-
import { OpenApiExportOptions, OpenApiExportResult, exportOpenApi } from "./openapi/export-service.js";
|
|
14
|
-
import "./openapi/index.js";
|
|
15
|
-
import { RegistryClient, RegistryClientOptions, addToRegistry, listFromRegistry, resolveRegistryUrl, searchRegistry } from "./registry.js";
|
|
16
|
-
import { SyncBuildFn, SyncSpecsOptions, SyncSpecsResult, SyncSpecsRunResult, SyncValidateFn, syncSpecs } from "./sync.js";
|
|
17
|
-
import { WatchBuildFn, WatchSpecsOptions, WatchValidateFn, watchSpecs } from "./watch.js";
|
|
18
|
-
import { CleanOptions, CleanResult, cleanArtifacts } from "./clean.js";
|
|
19
|
-
import { RunTestsResult, TestRunResult, runTests } from "./test.js";
|
|
20
|
-
import { CreateRegeneratorOptions, createRegeneratorService } from "./regenerator.js";
|
|
21
|
-
import { ExtendedWorkspaceInfo, MonorepoConfig, findAllConfigFiles, formatWorkspaceInfo, getExtendedWorkspaceInfo, mergeMonorepoConfigs } from "./workspace-info.js";
|
|
22
|
-
import { CoverageByType, IntegrityAnalysisOptions, IntegrityAnalysisResult, IntegrityIssue, SpecInventory, SpecLocation, analyzeIntegrity, filterIssuesBySeverity, filterIssuesByType, getAllSpecs } from "./integrity.js";
|
|
23
|
-
import { DiagramOptions, DiagramType, generateMermaidDiagram } from "./integrity-diagram.js";
|
|
24
|
-
import { ALL_SETUP_TARGETS, SETUP_TARGET_LABELS, SetupFileResult, SetupOptions, SetupPromptCallbacks, SetupResult, SetupScope, SetupTarget } from "./setup/types.js";
|
|
25
|
-
import { runSetup } from "./setup/setup-service.js";
|
|
26
|
-
import { generateAgentsMd, generateClaudeMcpConfig, generateContractsrcConfig, generateCursorMcpConfig, generateCursorRules, generateVscodeSettings, getClaudeDesktopConfigPath } from "./setup/config-generators.js";
|
|
27
|
-
import { deepMergeOverwrite, deepMergePreserve, formatJson, safeParseJson } from "./setup/file-merger.js";
|
|
28
|
-
import { ALL_CHECK_CATEGORIES, CHECK_CATEGORY_LABELS, CheckCategory, CheckContext, CheckResult, CheckStatus, DoctorOptions, DoctorPromptCallbacks, DoctorResult, FixAction, FixResult } from "./doctor/types.js";
|
|
29
|
-
import { formatCheckResult, formatDoctorSummary, runDoctor } from "./doctor/doctor-service.js";
|
|
30
|
-
import "./doctor/index.js";
|
|
31
|
-
import { ALL_CI_CHECK_CATEGORIES, CICheckCategory, CICheckCategorySummary, CICheckOptions, CICheckResult, CIFormatOptions, CIIssue, CIIssueSeverity, CIOutputFormat, CI_CHECK_CATEGORY_LABELS } from "./ci-check/types.js";
|
|
32
|
-
import { runCIChecks } from "./ci-check/ci-check-service.js";
|
|
33
|
-
import "./ci-check/index.js";
|
|
34
|
-
import { AgentAdapter, AgentGuideConfig, FormatOptions, GuideOptions, GuideResult } from "./agent-guide/types.js";
|
|
35
|
-
import { AgentGuideService, agentGuideService, createAgentGuideService } from "./agent-guide/agent-guide-service.js";
|
|
36
|
-
import { ClaudeCodeAdapter, claudeCodeAdapter } from "./agent-guide/adapters/claude-code.js";
|
|
37
|
-
import { CursorCLIAdapter, cursorCLIAdapter } from "./agent-guide/adapters/cursor-cli.js";
|
|
38
|
-
import { GenericMCPAdapter, genericMCPAdapter } from "./agent-guide/adapters/generic-mcp.js";
|
|
39
|
-
import { agentAdapters, getAgentAdapter, listAgentTypes } from "./agent-guide/adapters/index.js";
|
|
40
|
-
import "./agent-guide/index.js";
|
|
41
|
-
import { AIReviewResult, BehaviorCheck, FieldMapping, FieldMatchType, IntentAlignment, SemanticVerificationResult, StructureCheck, VerifyConfig, VerifyInput, VerifyOptions, VerifyResult } from "./verify/types.js";
|
|
42
|
-
import { VerifyService, createVerifyService, verifyService } from "./verify/verify-service.js";
|
|
43
|
-
import { verifyStructure } from "./verify/structure-verifier.js";
|
|
44
|
-
import { verifyBehavior } from "./verify/behavior-verifier.js";
|
|
45
|
-
import { createQuickAIReview, verifySemanticFields, verifyWithAI, verifyWithAIEnhanced } from "./verify/ai-verifier.js";
|
|
46
|
-
import "./verify/index.js";
|
|
47
|
-
import { DiscoveryOptions, ImplementationSource, ImplementationStatus, ResolvedImplementation, SpecImplementationResult, SpecReferenceMatch } from "./implementation/types.js";
|
|
48
|
-
import { discoverAllImplementations, discoverImplementationsForSpec, extractSpecReferences, inferImplementationType } from "./implementation/discovery.js";
|
|
49
|
-
import { ResolverOptions, getImplementationSummary, resolveAllImplementations, resolveImplementations } from "./implementation/resolver.js";
|
|
50
|
-
import "./implementation/index.js";
|
|
51
|
-
import { CacheEntryMeta, CacheKeyString, CacheLookupResult, CacheMissReason, CacheStats, CacheStorageAdapter, DEFAULT_CACHE_CONFIG, VerificationCacheConfig, VerificationCacheEntry, VerificationCacheKey } from "./verification-cache/types.js";
|
|
52
|
-
import { VerificationCacheService, cacheKeyToString, computeContentHash, createVerificationCacheService, stringToCacheKey } from "./verification-cache/cache-service.js";
|
|
53
|
-
import { InMemoryCacheStorage, createInMemoryCacheStorage } from "./verification-cache/adapters/in-memory.js";
|
|
54
|
-
import { FileSystemCacheStorage, createFileSystemCacheStorage } from "./verification-cache/adapters/filesystem.js";
|
|
55
|
-
import { KeyValueStore, WorkspaceStateCacheStorage, createWorkspaceStateCacheStorage } from "./verification-cache/adapters/workspace-state.js";
|
|
56
|
-
import "./verification-cache/index.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { OpenApiExportServiceOptions, OpenApiExportServiceResult, OpenApiImportServiceOptions, OpenApiImportServiceResult, OpenApiSourceConfig, OpenApiSyncServiceOptions, OpenApiSyncServiceResult, OpenApiValidateServiceOptions, OpenApiValidateServiceResult } from "./types.js";
|
|
2
|
-
import { importFromOpenApiService } from "./import-service.js";
|
|
3
|
-
import { syncWithOpenApiService } from "./sync-service.js";
|
|
4
|
-
import { validateAgainstOpenApiService } from "./validate-service.js";
|
|
5
|
-
import { OpenApiExportOptions, OpenApiExportResult, exportOpenApi } from "./export-service.js";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InMemoryCacheStorage, createInMemoryCacheStorage } from "./in-memory.js";
|
|
2
|
-
import { FileSystemCacheStorage, createFileSystemCacheStorage } from "./filesystem.js";
|
|
3
|
-
import { KeyValueStore, WorkspaceStateCacheStorage, createWorkspaceStateCacheStorage } from "./workspace-state.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CacheEntryMeta, CacheKeyString, CacheLookupResult, CacheMissReason, CacheStats, CacheStorageAdapter, DEFAULT_CACHE_CONFIG, VerificationCacheConfig, VerificationCacheEntry, VerificationCacheKey } from "./types.js";
|
|
2
|
-
import { VerificationCacheService, cacheKeyToString, computeContentHash, createVerificationCacheService, stringToCacheKey } from "./cache-service.js";
|
|
3
|
-
import { InMemoryCacheStorage, createInMemoryCacheStorage } from "./adapters/in-memory.js";
|
|
4
|
-
import { FileSystemCacheStorage, createFileSystemCacheStorage } from "./adapters/filesystem.js";
|
|
5
|
-
import { KeyValueStore, WorkspaceStateCacheStorage, createWorkspaceStateCacheStorage } from "./adapters/workspace-state.js";
|
|
6
|
-
import "./adapters/index.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AIReviewResult, BehaviorCheck, FieldMapping, FieldMatchType, IntentAlignment, SemanticVerificationResult, StructureCheck, VerifyConfig, VerifyInput, VerifyOptions, VerifyResult } from "./types.js";
|
|
2
|
-
import { VerifyService, createVerifyService, verifyService } from "./verify-service.js";
|
|
3
|
-
import { verifyStructure } from "./structure-verifier.js";
|
|
4
|
-
import { verifyBehavior } from "./behavior-verifier.js";
|
|
5
|
-
import { createQuickAIReview, verifySemanticFields, verifyWithAI, verifyWithAIEnhanced } from "./ai-verifier.js";
|