@lssm/example.lifecycle-cli 0.0.0-canary-20251217083314 → 0.0.0-canary-20251219202229
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/.turbo/turbo-build$colon$bundle.log +111 -203
- package/.turbo/turbo-build.log +112 -18
- package/CHANGELOG.md +6 -6
- package/LICENSE +21 -0
- package/dist/_virtual/rolldown_runtime.js +8 -0
- package/dist/bundles/lifecycle-managed/dist/index.js +32538 -4
- package/dist/bundles/lifecycle-managed/dist/index.js.map +1 -0
- package/dist/demo.d.ts +2 -1
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +4 -5
- package/dist/demo.js.map +1 -0
- package/dist/docs/lifecycle-cli.docblock.js +2 -1
- package/dist/docs/lifecycle-cli.docblock.js.map +1 -0
- package/dist/example.d.ts +2 -1
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +2 -1
- package/dist/example.js.map +1 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/index.js +2 -6
- package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +2 -1
- package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +2 -1
- package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/libs/lifecycle/dist/types/axes.js +2 -1
- package/dist/libs/lifecycle/dist/types/axes.js.map +1 -0
- package/dist/libs/lifecycle/dist/types/stages.js +2 -1
- package/dist/libs/lifecycle/dist/types/stages.js.map +1 -0
- package/dist/libs/logger/dist/context.node.js +2 -1
- package/dist/libs/logger/dist/context.node.js.map +1 -0
- package/dist/libs/logger/dist/formatters.js +2 -1
- package/dist/libs/logger/dist/formatters.js.map +1 -0
- package/dist/libs/logger/dist/logger.node.js +2 -1
- package/dist/libs/logger/dist/logger.node.js.map +1 -0
- package/dist/libs/logger/dist/timer.js +2 -1
- package/dist/libs/logger/dist/timer.js.map +1 -0
- package/dist/libs/logger/dist/tracer.node.js +2 -1
- package/dist/libs/logger/dist/tracer.node.js.map +1 -0
- package/dist/libs/logger/dist/types.js +2 -1
- package/dist/libs/logger/dist/types.js.map +1 -0
- package/package.json +11 -10
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/bundles/lifecycle-managed/dist/agents/lifecycle-advisor-agent.js +0 -70
- package/dist/bundles/lifecycle-managed/dist/api/rest-handlers.js +0 -22
- package/dist/bundles/lifecycle-managed/dist/events/lifecycle-events.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/agent-factory.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/contract-spec-agent.js +0 -14
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/index.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/approval/index.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/approval/workflow.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/index.js +0 -14
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/index.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/json-schema-to-zod.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/schema-output.js +0 -3
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/spec/spec.js +0 -23
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/knowledge-tool.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/mcp-client.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/mcp-server.js +0 -3
- package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/tool-adapter.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/churn/index.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/churn/predictor.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/cohort/index.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/cohort/tracker.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/axes.js +0 -28
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/milestones.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/signals.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/stages.js +0 -15
- package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/utils/formatters.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/index.js +0 -7
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/intent/detector.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/milestones.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/signals.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/stages.js +0 -143
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/utils/formatters.js +0 -7
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/logging/index.js +0 -38
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/metrics/index.js +0 -20
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/pipeline/evolution-pipeline.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/pipeline/lifecycle-pipeline.js +0 -73
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/tracing/index.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/tracing/middleware.js +0 -2
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/ceremony/ceremony-designer.js +0 -17
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/data/library-stage-map.js +0 -90
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/data/stage-playbooks.js +0 -240
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/index.js +0 -3
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/milestones.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/signals.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/stages.js +0 -143
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/utils/formatters.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/recommendations/library-recommender.js +0 -19
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/recommendations/recommendation-engine.js +0 -46
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/collectors/signal-collector.js +0 -65
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/data/milestones-catalog.js +0 -73
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/data/stage-weights.js +0 -169
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/index.js +0 -3
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/index.js +0 -4
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/axes.js +0 -28
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/milestones.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/signals.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/stages.js +0 -143
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/utils/formatters.js +0 -1
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js +0 -53
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/planning/milestone-planner.js +0 -16
- package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/scoring/stage-scorer.js +0 -64
- package/dist/bundles/lifecycle-managed/dist/services/assessment-service.js +0 -72
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/workspaces.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/workspaces.docblock.ts\nconst tech_studio_workspaces_DocBlocks = [{\n\tid: \"docs.tech.studio.workspaces\",\n\ttitle: \"Studio projects, teams, environments\",\n\tsummary: \"Organization-first Studio: projects live under an organization; teams refine access; projects deploy to multiple environments.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/tech/studio/workspaces\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"projects\",\n\t\t\"teams\",\n\t\t\"rbac\",\n\t\t\"environments\"\n\t],\n\tbody: `## Concepts\n\n- **Organization**: the primary grouping boundary for Studio projects.\n- **Project**: one application (specs, overlays, deployments, integrations, evolution, learning).\n- **Team**: refines who can see/edit a project within an organization.\n- **Environment**: deployment target (Development / Staging / Production).\n\n## Project access (teams + admin override)\n\nStudio uses multi-team sharing to refine access:\n\n- **Admins/owners** can access all projects.\n- If a project is shared with **no teams**, it is **org-wide** (all org members).\n- If a project is shared with **one or more teams**, it is visible to:\n - admins/owners, and\n - members of any linked team.\n\n## Current persistence (DB + GraphQL)\n\n- DB (Prisma): \\`StudioProject\\`, \\`Team\\`, \\`TeamMember\\`, \\`StudioProjectTeam\\`\n- GraphQL:\n - \\`myStudioProjects\\`\n - \\`createStudioProject(input.teamIds?)\\`\n - \\`myTeams\\`\n - \\`projectTeams(projectId)\\`\n - \\`setProjectTeams(projectId, teamIds)\\`\n\n## UI shell behavior\n\nStudio and Sandbox both use a shared shell:\n\n- Project selector → Module navigation → Environment selector\n- Always-on Assistant button (floating)\n- Learning journey progress (Studio persists learning events; Sandbox stays local-only)\n\n## Routing\n\n- \\`/studio/projects\\`: create/select/delete projects (organization-first).\n- \\`/studio/{projectSlug}/*\\`: project modules (canvas/specs/deploy/integrations/evolution/learning).\n- \\`/studio/learning\\`: learning hub without selecting a project.\n`\n}];\nregisterDocBlocks(tech_studio_workspaces_DocBlocks);\n\n//#endregion\nexport { tech_studio_workspaces_DocBlocks };\n//# sourceMappingURL=workspaces.docblock.js.map"],"mappings":";;;AAGA,MAAM,mCAAmC,CAAC;CACzC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCN,CAAC;AACF,kBAAkB,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-ingest.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/telemetry-ingest.docblock.ts\nconst tech_telemetry_ingest_DocBlocks = [{\n\tid: \"docs.tech.telemetry.ingest\",\n\ttitle: \"Telemetry Ingest Endpoint\",\n\tsummary: \"Server-side telemetry ingestion for ContractSpec clients (VS Code extension, CLI, etc.).\",\n\tkind: \"reference\",\n\tvisibility: \"internal\",\n\troute: \"/docs/tech/telemetry/ingest\",\n\ttags: [\n\t\t\"telemetry\",\n\t\t\"api\",\n\t\t\"posthog\",\n\t\t\"analytics\"\n\t],\n\tbody: `# Telemetry Ingest Endpoint\n\nThe ContractSpec API provides a telemetry ingest endpoint for clients to send product analytics events.\n\n## Endpoint\n\n\\`\\`\\`\nPOST /api/telemetry/ingest\n\\`\\`\\`\n\n## Request\n\n\\`\\`\\`json\n{\n \"event\": \"contractspec.vscode.command_run\",\n \"distinct_id\": \"client-uuid\",\n \"properties\": {\n \"command\": \"validate\"\n },\n \"timestamp\": \"2024-01-15T10:30:00.000Z\"\n}\n\\`\\`\\`\n\n### Headers\n\n| Header | Description |\n|--------|-------------|\n| \\`x-contractspec-client-id\\` | Optional client identifier (used as fallback for distinct_id) |\n| \\`Content-Type\\` | Must be \\`application/json\\` |\n\n### Body\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| \\`event\\` | string | Yes | Event name (e.g., \\`contractspec.vscode.activated\\`) |\n| \\`distinct_id\\` | string | Yes | Anonymous client identifier |\n| \\`properties\\` | object | No | Event properties |\n| \\`timestamp\\` | string | No | ISO 8601 timestamp |\n\n## Response\n\n\\`\\`\\`json\n{\n \"success\": true\n}\n\\`\\`\\`\n\n## Configuration\n\nThe endpoint requires \\`POSTHOG_PROJECT_KEY\\` environment variable to be set. If not configured, events are accepted but not forwarded.\n\n| Environment Variable | Description | Default |\n|---------------------|-------------|---------|\n| \\`POSTHOG_HOST\\` | PostHog host URL | \\`https://eu.posthog.com\\` |\n| \\`POSTHOG_PROJECT_KEY\\` | PostHog project API key | (required) |\n\n## Privacy\n\n- No PII is collected or stored\n- \\`distinct_id\\` is an anonymous client-generated UUID\n- File paths and source code are never included in events\n- Respects VS Code telemetry settings on the client side\n\n## Events\n\n### Extension Events\n\n| Event | Description | Properties |\n|-------|-------------|------------|\n| \\`contractspec.vscode.activated\\` | Extension activated | \\`version\\` |\n| \\`contractspec.vscode.command_run\\` | Command executed | \\`command\\` |\n| \\`contractspec.vscode.mcp_call\\` | MCP call made | \\`endpoint\\`, \\`tool\\` |\n\n### API Events\n\n| Event | Description | Properties |\n|-------|-------------|------------|\n| \\`contractspec.api.mcp_request\\` | MCP request processed | \\`endpoint\\`, \\`method\\`, \\`success\\`, \\`duration_ms\\` |\n`\n}, {\n\tid: \"docs.tech.telemetry.hybrid\",\n\ttitle: \"Hybrid Telemetry Model\",\n\tsummary: \"How ContractSpec clients choose between direct PostHog and API-routed telemetry.\",\n\tkind: \"usage\",\n\tvisibility: \"internal\",\n\troute: \"/docs/tech/telemetry/hybrid\",\n\ttags: [\n\t\t\"telemetry\",\n\t\t\"architecture\",\n\t\t\"posthog\"\n\t],\n\tbody: `# Hybrid Telemetry Model\n\nContractSpec uses a hybrid telemetry model where clients can send events either directly to PostHog or via the API server.\n\n## Decision Flow\n\n\\`\\`\\`\nIs contractspec.api.baseUrl configured?\n├── Yes → Send via /api/telemetry/ingest\n└── No → Is posthogProjectKey configured?\n ├── Yes → Send directly to PostHog\n └── No → Telemetry disabled\n\\`\\`\\`\n\n## Benefits\n\n### Direct PostHog\n- No server dependency\n- Works offline (with batching)\n- Lower latency\n\n### Via API\n- Centralized key management (no client-side keys)\n- Server-side enrichment and validation\n- Rate limiting and abuse prevention\n- Easier migration to other providers\n\n## Recommendation\n\n- **Development**: Use direct PostHog with a dev project key\n- **Production**: Route via API for better governance\n\n## Future: OpenTelemetry\n\nThe current PostHog implementation is behind a simple interface that can be swapped for OpenTelemetry:\n\n\\`\\`\\`typescript\ninterface TelemetryClient {\n send(event: TelemetryEvent): Promise<void>;\n}\n\\`\\`\\`\n\nThis allows future migration without changing client code.\n`\n}];\nregisterDocBlocks(tech_telemetry_ingest_DocBlocks);\n\n//#endregion\nexport { tech_telemetry_ingest_DocBlocks };\n//# sourceMappingURL=telemetry-ingest.docblock.js.map"],"mappings":";;;AAGA,MAAM,kCAAkC,CAAC;CACxC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EN,EAAE;CACF,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CN,CAAC;AACF,kBAAkB,gCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/templates/runtime.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/templates/runtime.docblock.ts\nconst tech_templates_runtime_DocBlocks = [{\n\tid: \"docs.tech.templates.runtime\",\n\ttitle: \"ContractSpec Template Runtime (Phase 9)\",\n\tsummary: \"Phase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/templates/runtime\",\n\ttags: [\n\t\t\"tech\",\n\t\t\"templates\",\n\t\t\"runtime\"\n\t],\n\tbody: \"## ContractSpec Template Runtime (Phase 9)\\n\\nPhase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\\n\\n### Building Blocks\\n\\n- **Local database** – `@lssm/lib.runtime-local` wraps `sql.js` (SQLite WASM) and `IndexedDB` so we can seed demo data, run migrations, and persist state between sessions. Tests point the runtime to `node_modules/sql.js/dist` so CI doesn’t need a browser.\\n- **Local GraphQL** – `LocalGraphQLClient` wires Apollo Client + SchemaLink to resolvers for tasks, messaging, and i18n recipes. All `/templates`, `/studio`, and `/sandbox` previews use those resolvers so we never call remote APIs during demos.\\n- **Template registry + installer** – `.../templates/registry.ts` stores the catalog (todos, messaging, recipes). `TemplateInstaller` can seed the runtime (`install`) or export a base64 snapshot via the new `saveTemplateToStudio` mutation.\\n- **TemplateShell** – Shared UI wrapper that creates a `TemplateRuntimeProvider`, shows `LocalDataIndicator`, and (optionally) surfaces the new `SaveToStudioButton`.\\n\\n### Runtime Flows\\n\\n1. `/templates` now opens a modal that renders `TemplateShell` for each template. Users can explore without leaving the marketing site.\\n2. `/studio` switches to a tabbed mini-app (Projects, Canvas, Specs, Deploy) to showcase Studio surfaces with mock data. Visitors see a **preview** shell, while authenticated users (Better Auth via Sigil) unlock full persistence, versioning, and deployment controls.\\n3. `/sandbox` lets visitors pick a template and mode (Playground, Spec Editor, Visual Builder). The console at the bottom streams runtime events for transparency.\\n\\n### GraphQL Mutations\\n\\n- `saveTemplateToStudio(input: SaveTemplateInput!): SaveTemplateResult!` writes a placeholder project + spec so that templates installed from the sandbox appear in Studio. The mutation is intentionally simple right now: it records which template was imported, stores metadata, and returns `{ projectId, status: 'QUEUED' }` for the UI.\\n- `saveCanvasDraft(input: SaveCanvasDraftInput!): CanvasVersion!` snapshots the current Visual Builder nodes to a draft version tied to a canvas overlay. Inputs include `canvasId`, arbitrary `nodes` JSON, and an optional `label`. The resolver enforces org/org access before calling `CanvasVersionManager`.\\n- `deployCanvasVersion(input: DeployCanvasVersionInput!): CanvasVersion!` promotes a previously saved draft (`versionId`) to the deployed state. The returned object includes `status`, `nodes`, `createdAt`, and `createdBy` for UI timelines.\\n- `undoCanvasVersion(input: UndoCanvasInput!): CanvasVersion` rewinds the visual builder to the prior snapshot (returns `null` when history is empty) so Studio’s toolbar can surface “Undo” without shelling out to local storage.\\n\\n### Studio GraphQL endpoint\\n\\n- The landing app exposes the Studio schema at `/api/studio/graphql` via Yoga so React Query hooks (`useStudioProjects`, `useCreateStudioProject`, `useDeployStudioProject`, etc.) can talk to the bundle without spinning up a separate server.\\n\\n### Spec Editor typing\\n\\n- Studio’s spec editor now preloads Monaco with ambient declarations for `@lssm/lib.contracts` and `zod`, so snippets receive autocomplete and inline errors even before the spec ships to the backend. The helper lives in `presentation/components/studio/organisms/monaco-spec-types.ts` and registers the extra libs once per browser session via `monaco.languages.typescript.typescriptDefaults.addExtraLib`.\\n- Compiler options are aligned with our frontend toolchain (ES2020 + React JSX) which means drafts written in the editor behave like the compiled artifacts that flow through Studio pipelines.\\n\\n### Spec templates\\n\\n- Selecting a spec type now injects a ready-to-edit scaffold (capability, workflow, policy, dataview, component) so authors start from a canonical layout instead of a blank file. Templates live alongside `SpecEditor.tsx`, and we only overwrite the content when the previous value is empty or when the author explicitly switches types via the dropdown.\\n\\n### Spec preview\\n\\n- The validation side panel now embeds a `SpecPreview` widget that shows validation errors alongside transport artifacts (GraphQL schema, REST endpoints, component summaries) once a preview run completes. Tabs let authors toggle between “Validation” and “Artifacts,” mirroring the UX described in the Studio plan.\\n\\n### Testing\\n\\n- `src/templates/__tests__/runtime.test.ts` covers todos CRUD, messaging delivery, and recipe locale switching through the local GraphQL API.\\n- Studio infrastructure tests live in `src/__tests__/e2e/project-lifecycle.test.ts` and continue to exercise project creation + deploy flows.\\n\\n### Next Steps\\n\\nFuture templates can register their React components via `registerTemplateComponents(templateId, components)` so TemplateShell can render them automatically. When new templates are added, remember to:\\n\\n1. Update the registry entry (schema + tags).\\n2. Register components inside `presentation/components/templates`.\\n3. Document the template under `docs/templates/`.\\n\\n\\n\\n\\n\\n\"\n}];\nregisterDocBlocks(tech_templates_runtime_DocBlocks);\n\n//#endregion\nexport { tech_templates_runtime_DocBlocks };\n//# sourceMappingURL=runtime.docblock.js.map"],"mappings":";;;AAGA,MAAM,mCAAmC,CAAC;CACzC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;CACN,CAAC;AACF,kBAAkB,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vscode-extension.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/vscode-extension.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/vscode-extension.docblock.ts\nconst tech_vscode_extension_DocBlocks = [{\n\tid: \"docs.tech.vscode.extension\",\n\ttitle: \"ContractSpec VS Code Extension\",\n\tsummary: \"VS Code extension for spec-first development with validation, scaffolding, and MCP integration.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/vscode/extension\",\n\ttags: [\n\t\t\"vscode\",\n\t\t\"extension\",\n\t\t\"tooling\",\n\t\t\"dx\"\n\t],\n\tbody: `# ContractSpec VS Code Extension\n\nThe ContractSpec VS Code extension provides spec-first development tooling directly in your editor.\n\n## Features\n\n- **Real-time Validation**: Get instant feedback on spec errors and warnings as you save files\n- **Build/Scaffold**: Generate handler and component skeletons from specs (no AI required)\n- **Spec Explorer**: List and navigate all specs in your workspace\n- **Dependency Analysis**: Visualize spec dependencies and detect cycles\n- **MCP Integration**: Search ContractSpec documentation via Model Context Protocol\n- **Snippets**: Code snippets for common ContractSpec patterns\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| \\`ContractSpec: Validate Current Spec\\` | Validate the currently open spec file |\n| \\`ContractSpec: Validate All Specs\\` | Validate all spec files in the workspace |\n| \\`ContractSpec: Build/Scaffold\\` | Generate handler/component from the current spec |\n| \\`ContractSpec: List All Specs\\` | Show all specs in the workspace |\n| \\`ContractSpec: Analyze Dependencies\\` | Analyze and visualize spec dependencies |\n| \\`ContractSpec: Search Docs (MCP)\\` | Search documentation via MCP |\n\n## Configuration\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| \\`contractspec.api.baseUrl\\` | Base URL for ContractSpec API (enables MCP + remote telemetry) | \\`\"\"\\` |\n| \\`contractspec.telemetry.posthogHost\\` | PostHog host URL for direct telemetry | \\`\"https://eu.posthog.com\"\\` |\n| \\`contractspec.telemetry.posthogProjectKey\\` | PostHog project key for direct telemetry | \\`\"\"\\` |\n| \\`contractspec.validation.onSave\\` | Run validation on save | \\`true\\` |\n| \\`contractspec.validation.onOpen\\` | Run validation on open | \\`true\\` |\n\n## Architecture\n\nThe extension uses:\n- \\`@lssm/module.contractspec-workspace\\` for pure analysis + templates\n- \\`@lssm/bundle.contractspec-workspace\\` for workspace services + adapters\n\nThis allows the extension to work without requiring the CLI to be installed.\n\n## Telemetry\n\nThe extension uses a hybrid telemetry approach:\n1. If \\`contractspec.api.baseUrl\\` is configured → send to API \\`/api/telemetry/ingest\\`\n2. Otherwise → send directly to PostHog (if project key configured)\n\nTelemetry respects VS Code's telemetry settings. No file paths, source code, or PII is collected.\n`\n}, {\n\tid: \"docs.tech.vscode.snippets\",\n\ttitle: \"ContractSpec Snippets\",\n\tsummary: \"Code snippets for common ContractSpec patterns in VS Code.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/vscode/snippets\",\n\ttags: [\n\t\t\"vscode\",\n\t\t\"snippets\",\n\t\t\"dx\"\n\t],\n\tbody: `# ContractSpec Snippets\n\nThe VS Code extension includes snippets for common ContractSpec patterns.\n\n## Available Snippets\n\n| Prefix | Description |\n|--------|-------------|\n| \\`contractspec-command\\` | Create a new command (write operation) |\n| \\`contractspec-query\\` | Create a new query (read-only operation) |\n| \\`contractspec-event\\` | Create a new event |\n| \\`contractspec-docblock\\` | Create a new DocBlock |\n| \\`contractspec-telemetry\\` | Create a new TelemetrySpec |\n| \\`contractspec-presentation\\` | Create a new Presentation |\n\n## Usage\n\nType the prefix in a TypeScript file and press Tab to expand the snippet. Tab through the placeholders to fill in your values.\n`\n}];\nregisterDocBlocks(tech_vscode_extension_DocBlocks);\n\n//#endregion\nexport { tech_vscode_extension_DocBlocks };\n//# sourceMappingURL=vscode-extension.docblock.js.map"],"mappings":";;;AAGA,MAAM,kCAAkC,CAAC;CACxC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDN,EAAE;CACF,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;CAmBN,CAAC;AACF,kBAAkB,gCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/workflows/overview.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/workflows/overview.docblock.ts\nconst tech_workflows_overview_DocBlocks = [{\n\tid: \"docs.tech.workflows.overview\",\n\ttitle: \"WorkflowSpec Overview\",\n\tsummary: \"WorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/workflows/overview\",\n\ttags: [\n\t\t\"tech\",\n\t\t\"workflows\",\n\t\t\"overview\"\n\t],\n\tbody: \"# WorkflowSpec Overview\\n\\n## Purpose\\n\\nWorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\\n\\n## Core Types\\n\\n- `WorkflowMeta`: ownership metadata (`title`, `domain`, `owners`, `tags`, `stability`) plus `name` and `version`.\\n- `WorkflowDefinition`:\\n - `entryStepId?`: optional explicit entry point (defaults to first step).\\n - `steps[]`: ordered list of `Step` descriptors.\\n - `transitions[]`: directed edges between steps with optional expressions.\\n - `sla?`: aggregated timing hints for the overall flow or per-step budgets.\\n - `compensation?`: fallback operations executed when a workflow is rolled back or fails.\\n- `Step`:\\n - `type`: `human`, `automation`, or `decision`.\\n - `action`: references either a `ContractSpec` (`operation`) or `FormSpec` (`form`).\\n - Optional `guard`, `timeoutMs`, and retry policy (`maxAttempts`, `backoff`, `delayMs`, `maxDelayMs?`).\\n - `requiredIntegrations?`: integration slot ids that must be bound before the step may execute.\\n - `requiredCapabilities?`: `CapabilityRef[]` that must be enabled in the resolved app config.\\n- `Transition`: `from` → `to` with optional `condition` string (simple data expressions).\\n\\n## Registry & Validation\\n\\n- `WorkflowRegistry` (`src/workflow/spec.ts`) stores specs by key `<name>.v<version>` and exposes `register`, `list`, and `get`.\\n- `validateWorkflowSpec()` (`src/workflow/validation.ts`) checks:\\n - Duplicate step IDs.\\n - Unknown `from`/`to` transitions.\\n - Empty guards/conditions.\\n - Reachability from the entry step.\\n - Cycles in the graph.\\n - Operation/Form references against provided registries.\\n- `assertWorkflowSpecValid()` wraps validation and throws `WorkflowValidationError` when errors remain.\\n\\n## Runtime\\n\\n- `WorkflowRunner` (`src/workflow/runner.ts`) executes workflows and coordinates steps.\\n - `start(name, version?, initialData?)` returns a `workflowId`.\\n - `executeStep(workflowId, input?)` runs the current step (automation or human).\\n - `getState(workflowId)` retrieves the latest state snapshot.\\n - `cancel(workflowId)` marks the workflow as cancelled.\\n - `preFlightCheck(name, version?, resolvedConfig?)` evaluates integration/capability requirements before the workflow starts.\\n - Throws `WorkflowPreFlightError` if required integration slots are unbound or required capabilities are disabled.\\n- `StateStore` (`src/workflow/state.ts`) abstracts persistence. V1 ships with:\\n - `InMemoryStateStore` (`src/workflow/adapters/memory-store.ts`) for tests/dev.\\n - Placeholder factories for file/database adapters (`adapters/file-adapter.ts`, `adapters/db-adapter.ts`).\\n- Guard evaluation: expression guards run through `evaluateExpression()` (`src/workflow/expression.ts`); custom policy guards can be provided via `guardEvaluator`.\\n- Events: the runner emits `workflow.started`, `workflow.step_completed`, `workflow.step_failed`, and `workflow.cancelled` through the optional `eventEmitter`.\\n- React bindings (`@lssm/lib.presentation-runtime-react`):\\n - `useWorkflow` hook (polls state, exposes `executeStep`, `cancel`, `refresh`).\\n - `WorkflowStepper` progress indicator using design-system Stepper.\\n - `WorkflowStepRenderer` helper to render human/automation/decision steps with sensible fallbacks.\\n\\n## Authoring Checklist\\n\\n1. Reuse existing operations/forms; create new specs when missing.\\n2. Prefer explicit `entryStepId` for clarity (especially with decision branches).\\n3. Give automation steps an `operation` and human steps a `form` (warnings surface otherwise).\\n4. Use short, meaningful step IDs (`submit`, `review`, `finalize`) to simplify analytics.\\n5. Keep guard expressions deterministic; complex policy logic should move to PolicySpec (Phase 2).\\n\\n## Testing\\n\\n- Add unit tests for new workflows via `assertWorkflowSpecValid`.\\n- Use the new Vitest suites (`validation.test.ts`, `expression.test.ts`, `runner.test.ts`) as examples.\\n- CLI support will arrive in Phase 1 PR 3 (`contractspec create --type workflow`).\\n\\n## Tooling\\n\\n- `contractspec create --type workflow` scaffolds a WorkflowSpec with interactive prompts.\\n- `contractspec build <spec.workflow.ts>` generates a runner scaffold (`.runner.ts`) wired to `WorkflowRunner` and the in-memory store.\\n- `contractspec validate` understands `.workflow.ts` files and checks core structure (meta, steps, transitions).\\n\\n## Next Steps (Non-MVP)\\n\\n- Persistence adapters (database/file) for workflow state (Phase 2).\\n- React bindings (`useWorkflow`, `WorkflowStepper`) and presentation-runtime integration (PR 3).\\n- Policy engine integration (`guard.type === 'policy'` validated against PolicySpec).\\n- Telemetry hooks for step execution metrics.\\n\\n\"\n}];\nregisterDocBlocks(tech_workflows_overview_DocBlocks);\n\n//#endregion\nexport { tech_workflows_overview_DocBlocks };\n//# sourceMappingURL=overview.docblock.js.map"],"mappings":";;;AAGA,MAAM,oCAAoC,CAAC;CAC1C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;CACN,CAAC;AACF,kBAAkB,kCAAkC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { registerDocBlocks } from "./registry.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../libs/contracts/dist/docs/tech-contracts.docs.js
|
|
4
|
+
const techContractsDocs = [{
|
|
5
|
+
id: "docs.tech.contracts.presentations-v2",
|
|
6
|
+
title: "Presentations V2 — Unified Descriptor & Transform Engine",
|
|
7
|
+
summary: "How PresentationDescriptorV2 and TransformEngine keep docs/renderers consistent.",
|
|
8
|
+
visibility: "public",
|
|
9
|
+
route: "/docs/tech/contracts/presentations-v2",
|
|
10
|
+
kind: "reference",
|
|
11
|
+
tags: [
|
|
12
|
+
"presentations",
|
|
13
|
+
"docs",
|
|
14
|
+
"mcp"
|
|
15
|
+
],
|
|
16
|
+
body: `## Presentations V2 — Unified Descriptor & Transform Engine
|
|
17
|
+
|
|
18
|
+
### Purpose
|
|
19
|
+
|
|
20
|
+
Unify presentations into one descriptor (\`PresentationDescriptorV2\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \`TransformEngine\` renders any target and applies PII redaction.
|
|
21
|
+
|
|
22
|
+
### Types
|
|
23
|
+
|
|
24
|
+
\`\`\`ts
|
|
25
|
+
type PresentationTarget =
|
|
26
|
+
| 'react'
|
|
27
|
+
| 'markdown'
|
|
28
|
+
| 'application/json'
|
|
29
|
+
| 'application/xml';
|
|
30
|
+
|
|
31
|
+
type PresentationSource =
|
|
32
|
+
| {
|
|
33
|
+
type: 'component';
|
|
34
|
+
framework: 'react';
|
|
35
|
+
componentKey: string;
|
|
36
|
+
props?: AnySchemaModel;
|
|
37
|
+
}
|
|
38
|
+
| { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };
|
|
39
|
+
|
|
40
|
+
interface PresentationDescriptorV2 {
|
|
41
|
+
meta: PresentationV2Meta; // includes partial OwnerShipMeta + description
|
|
42
|
+
policy?: { flags?: string[]; pii?: string[] };
|
|
43
|
+
source: PresentationSource;
|
|
44
|
+
targets: PresentationTarget[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Shared ownership schema (source of truth in @lssm/lib.contracts/src/ownership.ts)
|
|
48
|
+
interface OwnerShipMeta {
|
|
49
|
+
title: string;
|
|
50
|
+
description: string;
|
|
51
|
+
domain: string;
|
|
52
|
+
owners: Owner[];
|
|
53
|
+
tags: Tag[];
|
|
54
|
+
stability: Stability;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
58
|
+
type Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')
|
|
59
|
+
type Tag = string; // curated list available in code (e.g., 'auth', 'spots')
|
|
60
|
+
|
|
61
|
+
// For V2 presentations, meta is a Partial<OwnerShipMeta> plus description, name, version
|
|
62
|
+
interface PresentationV2Meta extends Partial<OwnerShipMeta> {
|
|
63
|
+
name: string;
|
|
64
|
+
version: number;
|
|
65
|
+
description?: string;
|
|
66
|
+
}
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
### Engine
|
|
70
|
+
|
|
71
|
+
Use \`createDefaultTransformEngine()\` and register custom renderers as needed (e.g., high-fidelity BlockNote → Markdown). The default engine supports markdown/json/xml; a React renderer returns a serializable descriptor the host app renders via a \`componentMap\` or a BlockNote renderer. The canonical source type string is \`blocknotejs\` (not \`blocknote\`).
|
|
72
|
+
|
|
73
|
+
PII paths (JSON-like) are redacted from rendered outputs.
|
|
74
|
+
|
|
75
|
+
### MCP Integration
|
|
76
|
+
|
|
77
|
+
\`createMcpServer\` accepts \`presentationsV2\`. Each descriptor is exposed under \`presentation://<name>/v<version>\` and negotiated variants (\`.md/.json/.xml\`) are rendered by the engine.
|
|
78
|
+
|
|
79
|
+
### Migration
|
|
80
|
+
|
|
81
|
+
- V1 \`PresentationSpec\` remains supported; a back-compat helper converts V1 → V2 when convenient.
|
|
82
|
+
- Prefer V2 for new work.
|
|
83
|
+
|
|
84
|
+
### Examples (Sigil)
|
|
85
|
+
|
|
86
|
+
- \`sigil.auth.webauth_tabs_v2\`: component source (\`componentKey: 'sigil.webauth.tabs'\`), targets \`react/json/xml\`.
|
|
87
|
+
- \`sigil.signup.guide_v2\`: BlockNote doc source, targets \`react/markdown/json/xml\`.
|
|
88
|
+
|
|
89
|
+
### React Rendering
|
|
90
|
+
|
|
91
|
+
Host apps use a \`componentMap\` (e.g., \`'sigil.webauth.tabs' → WebAuthTabs\`) and a BlockNote renderer to turn the React render descriptor into elements.`
|
|
92
|
+
}];
|
|
93
|
+
registerDocBlocks(techContractsDocs);
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
export { techContractsDocs };
|
|
97
|
+
//# sourceMappingURL=tech-contracts.docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tech-contracts.docs.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/tech-contracts.docs.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region src/docs/tech-contracts.docs.ts\nconst techContractsDocs = [{\n\tid: \"docs.tech.contracts.presentations-v2\",\n\ttitle: \"Presentations V2 — Unified Descriptor & Transform Engine\",\n\tsummary: \"How PresentationDescriptorV2 and TransformEngine keep docs/renderers consistent.\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/contracts/presentations-v2\",\n\tkind: \"reference\",\n\ttags: [\n\t\t\"presentations\",\n\t\t\"docs\",\n\t\t\"mcp\"\n\t],\n\tbody: `## Presentations V2 — Unified Descriptor & Transform Engine\n\n### Purpose\n\nUnify presentations into one descriptor (\\`PresentationDescriptorV2\\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \\`TransformEngine\\` renders any target and applies PII redaction.\n\n### Types\n\n\\`\\`\\`ts\ntype PresentationTarget =\n | 'react'\n | 'markdown'\n | 'application/json'\n | 'application/xml';\n\ntype PresentationSource =\n | {\n type: 'component';\n framework: 'react';\n componentKey: string;\n props?: AnySchemaModel;\n }\n | { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };\n\ninterface PresentationDescriptorV2 {\n meta: PresentationV2Meta; // includes partial OwnerShipMeta + description\n policy?: { flags?: string[]; pii?: string[] };\n source: PresentationSource;\n targets: PresentationTarget[];\n}\n\n// Shared ownership schema (source of truth in @lssm/lib.contracts/src/ownership.ts)\ninterface OwnerShipMeta {\n title: string;\n description: string;\n domain: string;\n owners: Owner[];\n tags: Tag[];\n stability: Stability;\n}\n\ntype Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';\ntype Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')\ntype Tag = string; // curated list available in code (e.g., 'auth', 'spots')\n\n// For V2 presentations, meta is a Partial<OwnerShipMeta> plus description, name, version\ninterface PresentationV2Meta extends Partial<OwnerShipMeta> {\n name: string;\n version: number;\n description?: string;\n}\n\\`\\`\\`\n\n### Engine\n\nUse \\`createDefaultTransformEngine()\\` and register custom renderers as needed (e.g., high-fidelity BlockNote → Markdown). The default engine supports markdown/json/xml; a React renderer returns a serializable descriptor the host app renders via a \\`componentMap\\` or a BlockNote renderer. The canonical source type string is \\`blocknotejs\\` (not \\`blocknote\\`).\n\nPII paths (JSON-like) are redacted from rendered outputs.\n\n### MCP Integration\n\n\\`createMcpServer\\` accepts \\`presentationsV2\\`. Each descriptor is exposed under \\`presentation://<name>/v<version>\\` and negotiated variants (\\`.md/.json/.xml\\`) are rendered by the engine.\n\n### Migration\n\n- V1 \\`PresentationSpec\\` remains supported; a back-compat helper converts V1 → V2 when convenient.\n- Prefer V2 for new work.\n\n### Examples (Sigil)\n\n- \\`sigil.auth.webauth_tabs_v2\\`: component source (\\`componentKey: 'sigil.webauth.tabs'\\`), targets \\`react/json/xml\\`.\n- \\`sigil.signup.guide_v2\\`: BlockNote doc source, targets \\`react/markdown/json/xml\\`.\n\n### React Rendering\n\nHost apps use a \\`componentMap\\` (e.g., \\`'sigil.webauth.tabs' → WebAuthTabs\\`) and a BlockNote renderer to turn the React render descriptor into elements.`\n}];\nregisterDocBlocks(techContractsDocs);\n\n//#endregion\nexport { techContractsDocs };\n//# sourceMappingURL=tech-contracts.docs.js.map"],"mappings":";;;AAGA,MAAM,oBAAoB,CAAC;CAC1B,IAAI;CACJ,OAAO;CACP,SAAS;CACT,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EN,CAAC;AACF,kBAAkB,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axes.js","names":[],"sources":["../../../../../../../libs/lifecycle/dist/types/axes.js"],"sourcesContent":["//#region src/types/axes.ts\nlet ProductPhase = /* @__PURE__ */ function(ProductPhase$1) {\n\tProductPhase$1[\"Sketch\"] = \"Sketch\";\n\tProductPhase$1[\"Prototype\"] = \"Prototype\";\n\tProductPhase$1[\"Mvp\"] = \"MVP\";\n\tProductPhase$1[\"V1\"] = \"V1\";\n\tProductPhase$1[\"Ecosystem\"] = \"Ecosystem\";\n\treturn ProductPhase$1;\n}({});\nlet CompanyPhase = /* @__PURE__ */ function(CompanyPhase$1) {\n\tCompanyPhase$1[\"Solo\"] = \"Solo\";\n\tCompanyPhase$1[\"TinyTeam\"] = \"TinyTeam\";\n\tCompanyPhase$1[\"FunctionalOrg\"] = \"FunctionalOrg\";\n\tCompanyPhase$1[\"MultiTeam\"] = \"MultiTeam\";\n\tCompanyPhase$1[\"Bureaucratic\"] = \"Bureaucratic\";\n\treturn CompanyPhase$1;\n}({});\nlet CapitalPhase = /* @__PURE__ */ function(CapitalPhase$1) {\n\tCapitalPhase$1[\"Bootstrapped\"] = \"Bootstrapped\";\n\tCapitalPhase$1[\"PreSeed\"] = \"PreSeed\";\n\tCapitalPhase$1[\"Seed\"] = \"Seed\";\n\tCapitalPhase$1[\"SeriesAorB\"] = \"SeriesAorB\";\n\tCapitalPhase$1[\"LateStage\"] = \"LateStage\";\n\treturn CapitalPhase$1;\n}({});\n\n//#endregion\nexport { CapitalPhase, CompanyPhase, ProductPhase };\n//# sourceMappingURL=axes.js.map"],"mappings":";AACA,IAAI,eAA+B,yBAAS,gBAAgB;AAC3D,gBAAe,YAAY;AAC3B,gBAAe,eAAe;AAC9B,gBAAe,SAAS;AACxB,gBAAe,QAAQ;AACvB,gBAAe,eAAe;AAC9B,QAAO;EACN,EAAE,CAAC;AACL,IAAI,eAA+B,yBAAS,gBAAgB;AAC3D,gBAAe,UAAU;AACzB,gBAAe,cAAc;AAC7B,gBAAe,mBAAmB;AAClC,gBAAe,eAAe;AAC9B,gBAAe,kBAAkB;AACjC,QAAO;EACN,EAAE,CAAC;AACL,IAAI,eAA+B,yBAAS,gBAAgB;AAC3D,gBAAe,kBAAkB;AACjC,gBAAe,aAAa;AAC5B,gBAAe,UAAU;AACzB,gBAAe,gBAAgB;AAC/B,gBAAe,eAAe;AAC9B,QAAO;EACN,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stages.js","names":[],"sources":["../../../../../../../libs/lifecycle/dist/types/stages.js"],"sourcesContent":["//#region src/types/stages.ts\nlet LifecycleStage = /* @__PURE__ */ function(LifecycleStage$1) {\n\tLifecycleStage$1[LifecycleStage$1[\"Exploration\"] = 0] = \"Exploration\";\n\tLifecycleStage$1[LifecycleStage$1[\"ProblemSolutionFit\"] = 1] = \"ProblemSolutionFit\";\n\tLifecycleStage$1[LifecycleStage$1[\"MvpEarlyTraction\"] = 2] = \"MvpEarlyTraction\";\n\tLifecycleStage$1[LifecycleStage$1[\"ProductMarketFit\"] = 3] = \"ProductMarketFit\";\n\tLifecycleStage$1[LifecycleStage$1[\"GrowthScaleUp\"] = 4] = \"GrowthScaleUp\";\n\tLifecycleStage$1[LifecycleStage$1[\"ExpansionPlatform\"] = 5] = \"ExpansionPlatform\";\n\tLifecycleStage$1[LifecycleStage$1[\"MaturityRenewal\"] = 6] = \"MaturityRenewal\";\n\treturn LifecycleStage$1;\n}({});\nconst LIFECYCLE_STAGE_ORDER = [\n\tLifecycleStage.Exploration,\n\tLifecycleStage.ProblemSolutionFit,\n\tLifecycleStage.MvpEarlyTraction,\n\tLifecycleStage.ProductMarketFit,\n\tLifecycleStage.GrowthScaleUp,\n\tLifecycleStage.ExpansionPlatform,\n\tLifecycleStage.MaturityRenewal\n];\nconst LIFECYCLE_STAGE_META = {\n\t[LifecycleStage.Exploration]: {\n\t\tid: LifecycleStage.Exploration,\n\t\torder: 0,\n\t\tslug: \"exploration\",\n\t\tname: \"Exploration / Ideation\",\n\t\tquestion: \"Is there a problem worth my time?\",\n\t\tsignals: [\n\t\t\t\"20+ discovery interviews\",\n\t\t\t\"Clear problem statement\",\n\t\t\t\"Named ICP\"\n\t\t],\n\t\ttraps: [\"Branding before discovery\", \"Premature tooling decisions\"],\n\t\tfocusAreas: [\n\t\t\t\"Customer discovery\",\n\t\t\t\"Problem definition\",\n\t\t\t\"Segment clarity\"\n\t\t]\n\t},\n\t[LifecycleStage.ProblemSolutionFit]: {\n\t\tid: LifecycleStage.ProblemSolutionFit,\n\t\torder: 1,\n\t\tslug: \"problem-solution-fit\",\n\t\tname: \"Problem–Solution Fit\",\n\t\tquestion: \"Do people care enough about this solution?\",\n\t\tsignals: [\n\t\t\t\"Prototype reuse\",\n\t\t\t\"Referral energy\",\n\t\t\t\"Pre-pay interest\"\n\t\t],\n\t\ttraps: [\"“Market is huge” without users\", \"Skipping qualitative loops\"],\n\t\tfocusAreas: [\n\t\t\t\"Solution hypothesis\",\n\t\t\t\"Value messaging\",\n\t\t\t\"Feedback capture\"\n\t\t]\n\t},\n\t[LifecycleStage.MvpEarlyTraction]: {\n\t\tid: LifecycleStage.MvpEarlyTraction,\n\t\torder: 2,\n\t\tslug: \"mvp-early-traction\",\n\t\tname: \"MVP & Early Traction\",\n\t\tquestion: \"Can we get real usage and learn fast?\",\n\t\tsignals: [\n\t\t\t\"20–50 named active users\",\n\t\t\t\"Weekly releases\",\n\t\t\t\"Noisy feedback\"\n\t\t],\n\t\ttraps: [\"Overbuilt infra for 10 users\", \"Undefined retention metric\"],\n\t\tfocusAreas: [\n\t\t\t\"Activation\",\n\t\t\t\"Cohort tracking\",\n\t\t\t\"Feedback rituals\"\n\t\t]\n\t},\n\t[LifecycleStage.ProductMarketFit]: {\n\t\tid: LifecycleStage.ProductMarketFit,\n\t\torder: 3,\n\t\tslug: \"product-market-fit\",\n\t\tname: \"Product–Market Fit\",\n\t\tquestion: \"Is this pulling us forward?\",\n\t\tsignals: [\n\t\t\t\"Retention without heroics\",\n\t\t\t\"Organic word-of-mouth\",\n\t\t\t\"Value stories\"\n\t\t],\n\t\ttraps: [\"Hero growth that does not scale\", \"Ignoring churn signals\"],\n\t\tfocusAreas: [\n\t\t\t\"Retention\",\n\t\t\t\"Reliability\",\n\t\t\t\"ICP clarity\"\n\t\t]\n\t},\n\t[LifecycleStage.GrowthScaleUp]: {\n\t\tid: LifecycleStage.GrowthScaleUp,\n\t\torder: 4,\n\t\tslug: \"growth-scale-up\",\n\t\tname: \"Growth / Scale-up\",\n\t\tquestion: \"Can we grow this repeatably?\",\n\t\tsignals: [\n\t\t\t\"Predictable channels\",\n\t\t\t\"Specialized hires\",\n\t\t\t\"Unit economics on track\"\n\t\t],\n\t\ttraps: [\"Paid spend masking retention gaps\", \"Infra debt blocking launches\"],\n\t\tfocusAreas: [\n\t\t\t\"Ops systems\",\n\t\t\t\"Growth loops\",\n\t\t\t\"Reliability engineering\"\n\t\t]\n\t},\n\t[LifecycleStage.ExpansionPlatform]: {\n\t\tid: LifecycleStage.ExpansionPlatform,\n\t\torder: 5,\n\t\tslug: \"expansion-platform\",\n\t\tname: \"Expansion / Platform\",\n\t\tquestion: \"What is the next growth curve?\",\n\t\tsignals: [\n\t\t\t\"Stable core metrics\",\n\t\t\t\"Partner/API demand\",\n\t\t\t\"Ecosystem pull\"\n\t\t],\n\t\ttraps: [\"Platform theater before wedge is solid\"],\n\t\tfocusAreas: [\n\t\t\t\"Partnerships\",\n\t\t\t\"APIs\",\n\t\t\t\"New market validation\"\n\t\t]\n\t},\n\t[LifecycleStage.MaturityRenewal]: {\n\t\tid: LifecycleStage.MaturityRenewal,\n\t\torder: 6,\n\t\tslug: \"maturity-renewal\",\n\t\tname: \"Maturity / Renewal\",\n\t\tquestion: \"Optimize, reinvent, or sunset?\",\n\t\tsignals: [\n\t\t\t\"Margin focus\",\n\t\t\t\"Portfolio bets\",\n\t\t\t\"Narrative refresh\"\n\t\t],\n\t\ttraps: [\"Assuming past success is enough\"],\n\t\tfocusAreas: [\n\t\t\t\"Cost optimization\",\n\t\t\t\"Reinvention bets\",\n\t\t\t\"Sunset planning\"\n\t\t]\n\t}\n};\nconst getLifecycleStageBySlug = (slug) => {\n\tconst entry = Object.values(LIFECYCLE_STAGE_META).find((meta) => meta.slug === slug);\n\tif (!entry) throw new Error(`Unknown lifecycle stage slug: ${slug}`);\n\treturn entry.id;\n};\n\n//#endregion\nexport { LIFECYCLE_STAGE_META, LIFECYCLE_STAGE_ORDER, LifecycleStage, getLifecycleStageBySlug };\n//# sourceMappingURL=stages.js.map"],"mappings":";AACA,IAAI,iBAAiC,yBAAS,kBAAkB;AAC/D,kBAAiB,iBAAiB,iBAAiB,KAAK;AACxD,kBAAiB,iBAAiB,wBAAwB,KAAK;AAC/D,kBAAiB,iBAAiB,sBAAsB,KAAK;AAC7D,kBAAiB,iBAAiB,sBAAsB,KAAK;AAC7D,kBAA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MAAM;EACN,UAAU;EACV,SAAS;GACR;GACA;GACA;GACA;EACD,OAAO,CAAC,yCAAyC;EACjD,YAAY;GACX;GACA;GACA;GACA;EACD;EACA,eAAe,kBAAkB;EACjC,IAAI,eAAe;EACnB,OAAO;EACP,MAAM;EACN,MAAM;EACN,UAAU;EACV,SAAS;GACR;GACA;GACA;GACA;EACD,OAAO,CAAC,kCAAkC;EAC1C,YAAY;GACX;GACA;GACA;GACA;EACD;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.node.js","names":["LogContext"],"sources":["../../../../../../libs/logger/dist/context.node.mjs"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\n\n//#region src/context.node.ts\n/**\n* Node.js implementation of LogContext using AsyncLocalStorage.\n*/\nvar LogContext = class LogContext {\n\tstatic instance;\n\tstorage;\n\tconstructor() {\n\t\tthis.storage = new AsyncLocalStorage();\n\t}\n\tstatic getInstance() {\n\t\tif (!LogContext.instance) LogContext.instance = new LogContext();\n\t\treturn LogContext.instance;\n\t}\n\t/**\n\t* Run a function with a new context\n\t*/\n\trun(context, fn) {\n\t\tconst contextData = {\n\t\t\tcontext: { ...context },\n\t\t\ttrace: this.getCurrentTrace()\n\t\t};\n\t\treturn this.storage.run(contextData, fn);\n\t}\n\t/**\n\t* Run a function with an extended context (merges with current)\n\t*/\n\textend(additionalContext, fn) {\n\t\tconst mergedContext = {\n\t\t\t...this.getContext(),\n\t\t\t...additionalContext\n\t\t};\n\t\treturn this.run(mergedContext, fn);\n\t}\n\t/**\n\t* Set context data for the current execution context\n\t*/\n\tset(key, value) {\n\t\tconst current = this.storage.getStore();\n\t\tif (current) current.context[key] = value;\n\t}\n\t/**\n\t* Get a specific context value\n\t*/\n\tget(key) {\n\t\treturn this.storage.getStore()?.context?.[key];\n\t}\n\t/**\n\t* Get all context data\n\t*/\n\tgetContext() {\n\t\treturn this.storage.getStore()?.context || {};\n\t}\n\t/**\n\t* Set trace context\n\t*/\n\tsetTrace(trace) {\n\t\tconst current = this.storage.getStore();\n\t\tif (current) current.trace = trace;\n\t}\n\t/**\n\t* Get current trace context\n\t*/\n\tgetCurrentTrace() {\n\t\treturn this.storage.getStore()?.trace;\n\t}\n\t/**\n\t* Generate a unique ID for requests/operations\n\t*/\n\tgenerateId() {\n\t\treturn crypto.randomUUID();\n\t}\n};\n\n//#endregion\nexport { LogContext };\n//# sourceMappingURL=context.node.mjs.map"],"mappings":";;;;;;AAMA,IAAI,aAAa,MAAMA,aAAW;CACjC,OAAO;CACP;CACA,cAAc;AACb,OAAK,UAAU,IAAI,mBAAmB;;CAEvC,OAAO,cAAc;AACpB,MAAI,CAACA,aAAW,SAAU,cAAW,WAAW,IAAIA,cAAY;AAChE,SAAOA,aAAW;;;;;CAKnB,IAAI,SAAS,IAAI;EAChB,MAAM,cAAc;GACnB,SAAS,EAAE,GAAG,SAAS;GACvB,OAAO,KAAK,iBAAiB;GAC7B;AACD,SAAO,KAAK,QAAQ,IAAI,aAAa,GAAG;;;;;CAKzC,OAAO,mBAAmB,IAAI;EAC7B,MAAM,gBAAgB;GACrB,GAAG,KAAK,YAAY;GACpB,GAAG;GACH;AACD,SAAO,KAAK,IAAI,eAAe,GAAG;;;;;CAKnC,IAAI,KAAK,OAAO;EACf,MAAM,UAAU,KAAK,QAAQ,UAAU;AACvC,MAAI,QAAS,SAAQ,QAAQ,OAAO;;;;;CAKrC,IAAI,KAAK;AACR,SAAO,KAAK,QAAQ,UAAU,EAAE,UAAU;;;;;CAK3C,aAAa;AACZ,SAAO,KAAK,QAAQ,UAAU,EAAE,WAAW,EAAE;;;;;CAK9C,SAAS,OAAO;EACf,MAAM,UAAU,KAAK,QAAQ,UAAU;AACvC,MAAI,QAAS,SAAQ,QAAQ;;;;;CAK9B,kBAAkB;AACjB,SAAO,KAAK,QAAQ,UAAU,EAAE;;;;;CAKjC,aAAa;AACZ,SAAO,OAAO,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","names":[],"sources":["../../../../../../libs/logger/dist/formatters.mjs"],"sourcesContent":["import { LogLevel } from \"./types.mjs\";\n\n//#region src/formatters.ts\nconst colors = {\n\treset: \"\\x1B[0m\",\n\tbright: \"\\x1B[1m\",\n\tdim: \"\\x1B[2m\",\n\tred: \"\\x1B[31m\",\n\tgreen: \"\\x1B[32m\",\n\tyellow: \"\\x1B[33m\",\n\tblue: \"\\x1B[34m\",\n\tmagenta: \"\\x1B[35m\",\n\tcyan: \"\\x1B[36m\",\n\twhite: \"\\x1B[37m\",\n\tgray: \"\\x1B[90m\",\n\tbgRed: \"\\x1B[41m\",\n\tbgYellow: \"\\x1B[43m\"\n};\nconst levelConfig = {\n\t[LogLevel.TRACE]: {\n\t\tcolor: colors.gray,\n\t\tsymbol: \"○\",\n\t\tname: \"TRACE\"\n\t},\n\t[LogLevel.DEBUG]: {\n\t\tcolor: colors.blue,\n\t\tsymbol: \"●\",\n\t\tname: \"DEBUG\"\n\t},\n\t[LogLevel.INFO]: {\n\t\tcolor: colors.green,\n\t\tsymbol: \"●\",\n\t\tname: \"INFO \"\n\t},\n\t[LogLevel.WARN]: {\n\t\tcolor: colors.yellow,\n\t\tsymbol: \"▲\",\n\t\tname: \"WARN \"\n\t},\n\t[LogLevel.ERROR]: {\n\t\tcolor: colors.red,\n\t\tsymbol: \"✖\",\n\t\tname: \"ERROR\"\n\t},\n\t[LogLevel.FATAL]: {\n\t\tcolor: colors.bgRed + colors.white,\n\t\tsymbol: \"💀\",\n\t\tname: \"FATAL\"\n\t}\n};\nvar DevFormatter = class {\n\tenableColors;\n\tconstructor(enableColors = true) {\n\t\tthis.enableColors = enableColors;\n\t}\n\tformat(entry) {\n\t\tconst parts = [];\n\t\tconst config = levelConfig[entry.level];\n\t\tconst timestamp = this.formatTimestamp(entry.timestamp);\n\t\tparts.push(this.colorize(timestamp, colors.gray));\n\t\tconst levelText = `${config.symbol} ${config.name}`;\n\t\tparts.push(this.colorize(levelText, config.color));\n\t\tif (entry.traceId) {\n\t\t\tconst traceInfo = this.formatTraceInfo(entry);\n\t\t\tparts.push(this.colorize(traceInfo, colors.cyan));\n\t\t}\n\t\tparts.push(this.colorize(entry.message, colors.white));\n\t\tif (entry.duration !== void 0) {\n\t\t\tconst durationText = `(${this.formatDuration(entry.duration)})`;\n\t\t\tparts.push(this.colorize(durationText, colors.magenta));\n\t\t}\n\t\tlet output = parts.join(\" \");\n\t\tif (entry.context && Object.keys(entry.context).length > 0) output += \"\\n\" + this.formatContext(entry.context);\n\t\tif (entry.metadata && Object.keys(entry.metadata).length > 0) output += \"\\n\" + this.formatMetadata(entry.metadata);\n\t\tif (entry.error) output += \"\\n\" + this.formatError(entry.error);\n\t\tif (entry.tags && entry.tags.length > 0) {\n\t\t\tconst tagsText = entry.tags.map((tag) => `#${tag}`).join(\" \");\n\t\t\toutput += \"\\n\" + this.colorize(`Tags: ${tagsText}`, colors.blue);\n\t\t}\n\t\treturn output;\n\t}\n\tformatTimestamp(timestamp) {\n\t\treturn timestamp.toISOString().substring(11, 23);\n\t}\n\tformatTraceInfo(entry) {\n\t\tconst parts = [`trace:${entry.traceId?.substring(0, 8) || \"unknown\"}`];\n\t\tif (entry.spanId && entry.spanId.length >= 8) parts.push(`span:${entry.spanId.substring(0, 8)}`);\n\t\tif (entry.parentId && entry.parentId.length >= 8) parts.push(`parent:${entry.parentId.substring(0, 8)}`);\n\t\treturn `[${parts.join(\"|\")}]`;\n\t}\n\tformatDuration(duration) {\n\t\tif (duration < 1) return `${(duration * 1e3).toFixed(0)}μs`;\n\t\telse if (duration < 1e3) return `${duration.toFixed(2)}ms`;\n\t\telse return `${(duration / 1e3).toFixed(2)}s`;\n\t}\n\tformatContext(context) {\n\t\tconst formatted = this.formatObject(context, 2);\n\t\treturn this.colorize(`Context: ${formatted}`, colors.cyan);\n\t}\n\tformatMetadata(metadata) {\n\t\tconst formatted = this.formatObject(metadata, 2);\n\t\treturn this.colorize(`Metadata: ${formatted}`, colors.blue);\n\t}\n\tformatError(error) {\n\t\tlet output = this.colorize(`Error: ${error.name}: ${error.message}`, colors.red);\n\t\tif (error.stack) {\n\t\t\tconst indentedStack = error.stack.split(\"\\n\").slice(1, 6).map((line) => ` ${line}`).join(\"\\n\");\n\t\t\toutput += \"\\n\" + this.colorize(indentedStack, colors.gray);\n\t\t}\n\t\treturn output;\n\t}\n\tformatObject(obj, indent = 0) {\n\t\tconst spaces = \" \".repeat(indent);\n\t\tconst entries = Object.entries(obj);\n\t\tif (entries.length === 0) return \"{}\";\n\t\tif (entries[0] && typeof entries[0][1] !== \"object\") return `{ ${entries[0][0]}: ${this.formatValue(entries[0][1])} }`;\n\t\treturn `{\\n${entries.map(([key, value]) => {\n\t\t\treturn `${spaces} ${key}: ${this.formatValue(value, indent + 2)}`;\n\t\t}).join(\"\\n\")}\\n${spaces}}`;\n\t}\n\tformatValue(value, indent = 0) {\n\t\tif (value === null) return \"null\";\n\t\tif (value === void 0) return \"undefined\";\n\t\tif (typeof value === \"string\") return `\"${value}\"`;\n\t\tif (typeof value === \"boolean\" || typeof value === \"number\") return String(value);\n\t\tif (value instanceof Date) return value.toISOString();\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0) return \"[]\";\n\t\t\treturn `[${value.map((v) => this.formatValue(v)).join(\", \")}]`;\n\t\t}\n\t\tif (typeof value === \"object\") return this.formatObject(value, indent);\n\t\treturn String(value);\n\t}\n\tcolorize(text, color) {\n\t\tif (!this.enableColors) return text;\n\t\treturn `${color}${text}${colors.reset}`;\n\t}\n};\nvar ProductionFormatter = class {\n\tformat(entry) {\n\t\tconst logObject = {\n\t\t\ttimestamp: entry.timestamp,\n\t\t\tlevel: entry.level,\n\t\t\tmessage: entry.message\n\t\t};\n\t\tif (entry.traceId) logObject.traceId = entry.traceId;\n\t\tif (entry.spanId) logObject.spanId = entry.spanId;\n\t\tif (entry.parentId) logObject.parentId = entry.parentId;\n\t\tif (entry.duration !== void 0) logObject.duration = entry.duration;\n\t\tif (entry.context && Object.keys(entry.context).length > 0) logObject.context = entry.context;\n\t\tif (entry.metadata && Object.keys(entry.metadata).length > 0) logObject.metadata = entry.metadata;\n\t\tif (entry.error) logObject.error = {\n\t\t\tname: entry.error.name,\n\t\t\tmessage: entry.error.message,\n\t\t\tstack: entry.error.stack\n\t\t};\n\t\tif (entry.tags && entry.tags.length > 0) logObject.tags = entry.tags;\n\t\treturn JSON.stringify(logObject);\n\t}\n};\nvar CustomFormatter = class {\n\ttemplate;\n\tdateFormat;\n\tconstructor(template = \"{timestamp} [{level}] {message}\", dateFormat) {\n\t\tthis.template = template;\n\t\tthis.dateFormat = dateFormat || ((date) => date.toISOString());\n\t}\n\tformat(entry) {\n\t\tconst levelName = LogLevel[entry.level];\n\t\tconst timestamp = this.dateFormat(entry.timestamp);\n\t\tlet formatted = this.template.replace(\"{timestamp}\", timestamp).replace(\"{level}\", levelName).replace(\"{message}\", entry.message).replace(\"{traceId}\", entry.traceId || \"\").replace(\"{spanId}\", entry.spanId || \"\").replace(\"{duration}\", entry.duration?.toString() || \"\");\n\t\tif (entry.context) formatted = formatted.replace(\"{context}\", JSON.stringify(entry.context));\n\t\tif (entry.metadata) formatted = formatted.replace(\"{metadata}\", JSON.stringify(entry.metadata));\n\t\treturn formatted;\n\t}\n};\n\n//#endregion\nexport { CustomFormatter, DevFormatter, ProductionFormatter };\n//# sourceMappingURL=formatters.mjs.map"],"mappings":";;;AAGA,MAAM,SAAS;CACd,OAAO;CACP,QAAQ;CACR,KAAK;CACL,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CACN,SAAS;CACT,MAAM;CACN,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV;AACD,MAAM,cAAc;EAClB,SAAS,QAAQ;EACjB,OAAO,OAAO;EACd,QAAQ;EACR,MAAM;EACN;EACA,SAAS,QAAQ;EACjB,OAAO,OAAO;EACd,QAAQ;EACR,MAAM;EACN;EACA,SAAS,OAAO;EAChB,OAAO,OAAO;EACd,QAAQ;E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GACf;AACD,MAAI,MAAM,QAAS,WAAU,UAAU,MAAM;AAC7C,MAAI,MAAM,OAAQ,WAAU,SAAS,MAAM;AAC3C,MAAI,MAAM,SAAU,WAAU,WAAW,MAAM;AAC/C,MAAI,MAAM,aAAa,KAAK,EAAG,WAAU,WAAW,MAAM;AAC1D,MAAI,MAAM,WAAW,OAAO,KAAK,MAAM,QAAQ,CAAC,SAAS,EAAG,WAAU,UAAU,MAAM;AACtF,MAAI,MAAM,YAAY,OAAO,KAAK,MAAM,SAAS,CAAC,SAAS,EAAG,WAAU,WAAW,MAAM;AACzF,MAAI,MAAM,MAAO,WAAU,QAAQ;GAClC,MAAM,MAAM,MAAM;GAClB,SAAS,MAAM,MAAM;GACrB,OAAO,MAAM,MAAM;GACnB;AACD,MAAI,MAAM,QAAQ,MAAM,KAAK,SAAS,EAAG,WAAU,OAAO,MAAM;AAChE,SAAO,KAAK,UAAU,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.node.js","names":["Logger"],"sources":["../../../../../../libs/logger/dist/logger.node.mjs"],"sourcesContent":["import { LogContext } from \"./context.node.mjs\";\nimport { LogLevel } from \"./types.mjs\";\nimport { TimerManager } from \"./timer.mjs\";\nimport { Tracer } from \"./tracer.node.mjs\";\nimport { DevFormatter, ProductionFormatter } from \"./formatters.mjs\";\n\n//#region src/logger.node.ts\nvar Logger = class Logger {\n\tconfig;\n\tformatter;\n\tcontext;\n\ttracer;\n\ttimerManager;\n\tconstructor(config) {\n\t\tthis.config = {\n\t\t\tlevel: LogLevel.INFO,\n\t\t\tenvironment: process.env.NODE_ENV || \"development\",\n\t\t\tenableTracing: true,\n\t\t\tenableTiming: true,\n\t\t\tenableContext: true,\n\t\t\tenableColors: true,\n\t\t\tmaxContextDepth: 10,\n\t\t\ttimestampFormat: \"iso\",\n\t\t\t...config\n\t\t};\n\t\tthis.context = LogContext.getInstance();\n\t\tthis.tracer = new Tracer();\n\t\tthis.timerManager = new TimerManager();\n\t\tthis.formatter = this.config.environment === \"production\" ? new ProductionFormatter() : new DevFormatter(this.config.enableColors);\n\t}\n\ttraceLog(message, metadata) {\n\t\tthis.log(LogLevel.TRACE, message, metadata);\n\t}\n\tdebug(message, metadata) {\n\t\tthis.log(LogLevel.DEBUG, message, metadata);\n\t}\n\tinfo(message, metadata) {\n\t\tthis.log(LogLevel.INFO, message, metadata);\n\t}\n\twarn(message, metadata) {\n\t\tthis.log(LogLevel.WARN, message, metadata);\n\t}\n\terror(message, metadata, error) {\n\t\tthis.log(LogLevel.ERROR, message, metadata, error);\n\t}\n\tfatal(message, metadata, error) {\n\t\tthis.log(LogLevel.FATAL, message, metadata, error);\n\t}\n\twithContext(context, fn) {\n\t\treturn this.context.run(context, fn);\n\t}\n\textendContext(additionalContext, fn) {\n\t\treturn this.context.extend(additionalContext, fn);\n\t}\n\tsetContext(key, value) {\n\t\tthis.context.set(key, value);\n\t}\n\tgetContext() {\n\t\treturn this.context.getContext();\n\t}\n\ttrace = async (options, fn) => {\n\t\tif (!this.config.enableTracing) return await fn();\n\t\treturn this.tracer.trace(options, fn);\n\t};\n\tgetTraceId() {\n\t\treturn this.tracer.getCurrentTrace()?.traceId;\n\t}\n\tstartSpan(options) {\n\t\tif (!this.config.enableTracing) return null;\n\t\treturn this.tracer.startSpan(options);\n\t}\n\tfinishSpan(spanId) {\n\t\tif (!this.config.enableTracing) return;\n\t\treturn this.tracer.finishSpan(spanId);\n\t}\n\taddTraceMetadata(key, value) {\n\t\tif (this.config.enableTracing) this.tracer.addMetadata(key, value);\n\t}\n\taddTraceTags(...tags) {\n\t\tif (this.config.enableTracing) this.tracer.addTags(...tags);\n\t}\n\tstartTimer(id) {\n\t\tif (!this.config.enableTiming) return null;\n\t\treturn this.timerManager.start(id);\n\t}\n\tstopTimer(id) {\n\t\tif (!this.config.enableTiming) return;\n\t\treturn this.timerManager.stop(id);\n\t}\n\tgetTimer(id) {\n\t\treturn this.timerManager.get(id);\n\t}\n\tchild(context) {\n\t\tconst childLogger = new Logger(this.config);\n\t\tObject.entries(context).forEach(([key, value]) => {\n\t\t\tchildLogger.setContext(key, value);\n\t\t});\n\t\treturn childLogger;\n\t}\n\tsetLevel(level) {\n\t\tthis.config.level = level;\n\t}\n\tsetFormatter(formatter) {\n\t\tthis.formatter = formatter;\n\t}\n\tasync profile(operationName, fn, options) {\n\t\tconst timer = this.startTimer(`profile-${operationName}`);\n\t\tconst startTime = performance.now();\n\t\ttry {\n\t\t\tconst result = await this.tracer.trace({\n\t\t\t\toperationType: \"custom\",\n\t\t\t\toperationName: `profile:${operationName}`,\n\t\t\t\tautoTiming: true\n\t\t\t}, fn);\n\t\t\tconst duration = performance.now() - startTime;\n\t\t\ttimer?.stop();\n\t\t\tconst logLevel = options?.logLevel || LogLevel.DEBUG;\n\t\t\tthis.log(logLevel, `Profile: ${operationName} completed`, {\n\t\t\t\toperation: operationName,\n\t\t\t\tduration: `${duration.toFixed(2)}ms`,\n\t\t\t\tresult: options?.logResult ? result : \"[result hidden]\"\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tconst duration = performance.now() - startTime;\n\t\t\ttimer?.stop();\n\t\t\tthis.error(`Profile: ${operationName} failed`, {\n\t\t\t\toperation: operationName,\n\t\t\t\tduration: `${duration.toFixed(2)}ms`,\n\t\t\t\terror: error.message\n\t\t\t}, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tlogRequest(method, url, statusCode, duration) {\n\t\tconst level = this.getHttpLogLevel(statusCode);\n\t\tconst message = `${method.toUpperCase()} ${url}${statusCode ? ` ${statusCode}` : \"\"}`;\n\t\tthis.log(level, message, {\n\t\t\tmethod,\n\t\t\turl,\n\t\t\tstatusCode,\n\t\t\tduration: duration ? `${duration.toFixed(2)}ms` : void 0,\n\t\t\ttype: \"http_request\"\n\t\t});\n\t}\n\tasync flush() {\n\t\tthis.timerManager.clear();\n\t}\n\tgetStats() {\n\t\treturn {\n\t\t\tactiveTimers: this.timerManager.getActive().length,\n\t\t\tactiveSpans: this.tracer.getActiveSpans().length,\n\t\t\tconfig: { ...this.config }\n\t\t};\n\t}\n\toutput(message, level) {\n\t\tif (level >= LogLevel.ERROR) console.error(message);\n\t\telse console.log(message);\n\t}\n\tlog(level, message, metadata, error) {\n\t\tif (level < this.config.level) return;\n\t\tconst currentTrace = this.config.enableTracing ? this.tracer.getCurrentTrace() : void 0;\n\t\tconst contextData = this.config.enableContext ? this.context.getContext() : void 0;\n\t\tconst entry = {\n\t\t\tlevel,\n\t\t\tmessage,\n\t\t\ttimestamp: /* @__PURE__ */ new Date(),\n\t\t\ttraceId: currentTrace?.traceId,\n\t\t\tparentId: currentTrace?.parentId,\n\t\t\tspanId: currentTrace?.spanId,\n\t\t\tcontext: contextData,\n\t\t\tmetadata,\n\t\t\terror,\n\t\t\ttags: currentTrace?.tags\n\t\t};\n\t\tif (currentTrace?.metadata?.duration) entry.duration = currentTrace.metadata.duration;\n\t\tconst formatted = this.formatter.format(entry);\n\t\tthis.output(formatted, level);\n\t}\n\tgetHttpLogLevel(statusCode) {\n\t\tif (!statusCode) return LogLevel.INFO;\n\t\tif (statusCode >= 500) return LogLevel.ERROR;\n\t\tif (statusCode >= 400) return LogLevel.WARN;\n\t\treturn LogLevel.INFO;\n\t}\n};\n\n//#endregion\nexport { Logger };\n//# sourceMappingURL=logger.node.mjs.map"],"mappings":";;;;;;;AAOA,IAAI,SAAS,MAAMA,SAAO;CACzB;CACA;CACA;CACA;CACA;CACA,YAAY,QAAQ;AACnB,OAAK,SAAS;GACb,OAAO,SAAS;GAChB,aAAa,QAAQ,IAAI,YAAY;GACrC,eAAe;GACf,cAAc;GACd,eAAe;GACf,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,GAAG;GACH;AACD,OAAK,UAAU,WAAW,aAAa;AACvC,OAAK,SAAS,IAAI,QAAQ;AAC1B,OAAK,eAAe,IAAI,cAAc;AACtC,OAAK,YAAY,KAAK,OAAO,gBAAgB,eAAe,IAAI,qBAAqB,G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
1
|
+
{"version":3,"file":"timer.js","names":[],"sources":["../../../../../../libs/logger/dist/timer.mjs"],"sourcesContent":["//#region src/timer.ts\nvar Timer = class {\n\tid;\n\tstartTime;\n\tlaps = [];\n\tstopped = false;\n\tstopTime;\n\tconstructor(id) {\n\t\tthis.id = id || crypto.randomUUID();\n\t\tthis.startTime = performance.now();\n\t}\n\t/**\n\t* Stop the timer and return elapsed time in milliseconds\n\t*/\n\tstop() {\n\t\tif (this.stopped) return this.getElapsed();\n\t\tthis.stopTime = performance.now();\n\t\tthis.stopped = true;\n\t\tconst elapsed = this.stopTime - this.startTime;\n\t\tthis.laps.push({\n\t\t\tlabel: \"stop\",\n\t\t\ttime: this.stopTime,\n\t\t\telapsed\n\t\t});\n\t\treturn elapsed;\n\t}\n\t/**\n\t* Record a lap time and return elapsed time since start\n\t*/\n\tlap(label) {\n\t\tif (this.stopped) return this.getElapsed();\n\t\tconst now = performance.now();\n\t\tconst elapsed = now - this.startTime;\n\t\tthis.laps.push({\n\t\t\tlabel: label || `lap-${this.laps.length + 1}`,\n\t\t\ttime: now,\n\t\t\telapsed\n\t\t});\n\t\treturn elapsed;\n\t}\n\t/**\n\t* Get elapsed time without stopping the timer\n\t*/\n\tgetElapsed() {\n\t\tif (this.stopped && this.stopTime) return this.stopTime - this.startTime;\n\t\treturn performance.now() - this.startTime;\n\t}\n\t/**\n\t* Get all recorded laps\n\t*/\n\tgetLaps() {\n\t\treturn [...this.laps];\n\t}\n\t/**\n\t* Get timer summary with total time and laps\n\t*/\n\tgetSummary() {\n\t\treturn {\n\t\t\tid: this.id,\n\t\t\ttotalTime: this.getElapsed(),\n\t\t\tisRunning: !this.stopped,\n\t\t\tlaps: this.getLaps()\n\t\t};\n\t}\n\t/**\n\t* Reset the timer (starts a new timing session)\n\t*/\n\treset() {\n\t\tthis.startTime = performance.now();\n\t\tthis.laps = [];\n\t\tthis.stopped = false;\n\t\tthis.stopTime = void 0;\n\t}\n};\n/**\n* Utility class for managing multiple timers\n*/\nvar TimerManager = class {\n\ttimers = /* @__PURE__ */ new Map();\n\t/**\n\t* Start a new timer\n\t*/\n\tstart(id) {\n\t\tconst timer = new Timer(id);\n\t\tthis.timers.set(timer.id, timer);\n\t\treturn timer;\n\t}\n\t/**\n\t* Get an existing timer\n\t*/\n\tget(id) {\n\t\treturn this.timers.get(id);\n\t}\n\t/**\n\t* Stop and remove a timer\n\t*/\n\tstop(id) {\n\t\tconst timer = this.timers.get(id);\n\t\tif (timer) {\n\t\t\tconst elapsed = timer.stop();\n\t\t\tthis.timers.delete(id);\n\t\t\treturn elapsed;\n\t\t}\n\t}\n\t/**\n\t* Get all active timers\n\t*/\n\tgetActive() {\n\t\treturn Array.from(this.timers.values()).filter((timer) => !timer.getSummary().isRunning === false);\n\t}\n\t/**\n\t* Clear all timers\n\t*/\n\tclear() {\n\t\tthis.timers.clear();\n\t}\n\t/**\n\t* Get summary of all timers\n\t*/\n\tgetSummary() {\n\t\treturn Array.from(this.timers.values()).map((timer) => timer.getSummary());\n\t}\n};\n/**\n* Decorator/wrapper function to time async operations\n*/\nasync function timed(operation, options) {\n\tconst timer = new Timer(options?.id);\n\ttry {\n\t\tconst result = await operation();\n\t\tconst elapsed = timer.stop();\n\t\toptions?.onComplete?.(elapsed);\n\t\treturn {\n\t\t\tresult,\n\t\t\telapsed,\n\t\t\ttimer\n\t\t};\n\t} catch (error) {\n\t\ttimer.stop();\n\t\tthrow error;\n\t}\n}\n/**\n* Decorator/wrapper function to time synchronous operations\n*/\nfunction timedSync(operation, options) {\n\tconst timer = new Timer(options?.id);\n\ttry {\n\t\tconst result = operation();\n\t\tconst elapsed = timer.stop();\n\t\toptions?.onComplete?.(elapsed);\n\t\treturn {\n\t\t\tresult,\n\t\t\telapsed,\n\t\t\ttimer\n\t\t};\n\t} catch (error) {\n\t\ttimer.stop();\n\t\tthrow error;\n\t}\n}\n\n//#endregion\nexport { Timer, TimerManager, timed, timedSync };\n//# sourceMappingURL=timer.mjs.map"],"mappings":";AACA,I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;;CAK3B,KAAK,IAAI;EACR,MAAM,QAAQ,KAAK,OAAO,IAAI,GAAG;AACjC,MAAI,OAAO;GACV,MAAM,UAAU,MAAM,MAAM;AAC5B,QAAK,OAAO,OAAO,GAAG;AACtB,UAAO;;;;;;CAMT,YAAY;AACX,SAAO,MAAM,KAAK,KAAK,OAAO,QAAQ,CAAC,CAAC,QAAQ,UAAU,CAAC,MAAM,YAAY,CAAC,cAAc,MAAM;;;;;CAKnG,QAAQ;AACP,OAAK,OAAO,OAAO;;;;;CAKpB,aAAa;AACZ,SAAO,MAAM,KAAK,KAAK,OAAO,QAAQ,CAAC,CAAC,KAAK,UAAU,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.node.js","names":[],"sources":["../../../../../../libs/logger/dist/tracer.node.mjs"],"sourcesContent":["import { LogContext } from \"./context.node.mjs\";\nimport { Timer } from \"./timer.mjs\";\n\n//#region src/tracer.node.ts\nvar Tracer = class {\n\tcontext;\n\tactiveSpans = /* @__PURE__ */ new Map();\n\tconstructor() {\n\t\tthis.context = LogContext.getInstance();\n\t}\n\t/**\n\t* Start a new trace span\n\t*/\n\tstartSpan(options) {\n\t\tconst parentTrace = this.context.getCurrentTrace();\n\t\tconst span = {\n\t\t\ttraceId: parentTrace?.traceId || this.generateTraceId(),\n\t\t\tparentId: parentTrace?.spanId,\n\t\t\tspanId: this.generateSpanId(),\n\t\t\toperationType: options.operationType,\n\t\t\toperationName: options.operationName,\n\t\t\tstartTime: performance.now(),\n\t\t\tmetadata: { ...options.metadata },\n\t\t\ttags: [...options.tags || []]\n\t\t};\n\t\tthis.activeSpans.set(span.spanId, span);\n\t\tthis.context.setTrace(span);\n\t\treturn span;\n\t}\n\t/**\n\t* Finish a trace span\n\t*/\n\tfinishSpan(spanId) {\n\t\tconst span = this.activeSpans.get(spanId);\n\t\tif (!span) return;\n\t\tconst duration = performance.now() - span.startTime;\n\t\tthis.activeSpans.delete(spanId);\n\t\tif (this.context.getCurrentTrace()?.spanId === spanId && span.parentId) {\n\t\t\tconst parentSpan = this.findSpanById(span.parentId);\n\t\t\tif (parentSpan) this.context.setTrace(parentSpan);\n\t\t}\n\t\treturn duration;\n\t}\n\t/**\n\t* Execute a function within a trace span\n\t*/\n\tasync trace(options, fn) {\n\t\tconst span = this.startSpan(options);\n\t\tconst timer = options.autoTiming !== false ? new Timer(`trace-${span.spanId}`) : void 0;\n\t\ttry {\n\t\t\tconst result = await fn();\n\t\t\tconst duration = this.finishSpan(span.spanId);\n\t\t\tif (timer) timer.stop();\n\t\t\tif (duration !== void 0) span.metadata.duration = duration;\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tspan.metadata.error = {\n\t\t\t\tname: error.name || \"Unknown\",\n\t\t\t\tmessage: error.message || \"Unknown error\",\n\t\t\t\tstack: error.stack\n\t\t\t};\n\t\t\tconst duration = this.finishSpan(span.spanId);\n\t\t\tspan.metadata.duration = duration;\n\t\t\tif (timer) timer.stop();\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Add metadata to current span\n\t*/\n\taddMetadata(key, value) {\n\t\tconst currentTrace = this.context.getCurrentTrace();\n\t\tif (currentTrace) currentTrace.metadata[key] = value;\n\t}\n\t/**\n\t* Add tags to current span\n\t*/\n\taddTags(...tags) {\n\t\tconst currentTrace = this.context.getCurrentTrace();\n\t\tif (currentTrace) currentTrace.tags.push(...tags);\n\t}\n\t/**\n\t* Get current trace context\n\t*/\n\tgetCurrentTrace() {\n\t\treturn this.context.getCurrentTrace();\n\t}\n\t/**\n\t* Get all active spans\n\t*/\n\tgetActiveSpans() {\n\t\treturn Array.from(this.activeSpans.values());\n\t}\n\t/**\n\t* Find a span by ID\n\t*/\n\tfindSpanById(spanId) {\n\t\treturn this.activeSpans.get(spanId);\n\t}\n\t/**\n\t* Generate a unique trace ID\n\t*/\n\tgenerateTraceId() {\n\t\treturn crypto.randomUUID().replace(/-/g, \"\");\n\t}\n\t/**\n\t* Generate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AAI,MAAO,OAAM,MAAM;AACvB,OAAI,aAAa,KAAK,EAAG,MAAK,SAAS,WAAW;AAClD,UAAO;WACC,OAAO;AACf,QAAK,SAAS,QAAQ;IACrB,MAAM,MAAM,QAAQ;IACpB,SAAS,MAAM,WAAW;IAC1B,OAAO,MAAM;IACb;GACD,MAAM,WAAW,KAAK,WAAW,KAAK,OAAO;AAC7C,QAAK,SAAS,WAAW;AACzB,OAAI,MAAO,OAAM,MAAM;AACvB,SAAM;;;;;;CAMR,YAAY,KAAK,OAAO;EACvB,MAAM,eAAe,KAAK,QAAQ,iBAAiB;AACnD,MAAI,aAAc,cAAa,SAAS,OAAO;;;;;CAKhD,QAAQ,GAAG,MAAM;EAChB,MAAM,eAAe,KAAK,QAAQ,iBAAiB;AACnD,MAAI,aAAc,cAAa,KAAK,KAAK,GAAG,KAAK;;;;;CAKlD,kBAAkB;AACjB,SAAO,KAAK,QAAQ,iBAAiB;;;;;CAKtC,iBAAiB;AAChB,SAAO,MAAM,KAAK,KAAK,YAAY,QAAQ,CAAC;;;;;CAK7C,aAAa,QAAQ;AACpB,SAAO,KAAK,YAAY,IAAI,OAAO;;;;;CAKpC,kBAAkB;AACjB,SAAO,OAAO,YAAY,CAAC,QAAQ,MAAM,GAAG;;;;;CAK7C,iBAAiB;AAChB,SAAO,OAAO,YAAY,CAAC,QAAQ,MAAM,GAAG,CAAC,UAAU,GAAG,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../../libs/logger/dist/types.mjs"],"sourcesContent":["//#region src/types.ts\nlet LogLevel = /* @__PURE__ */ function(LogLevel$1) {\n\tLogLevel$1[LogLevel$1[\"TRACE\"] = 0] = \"TRACE\";\n\tLogLevel$1[LogLevel$1[\"DEBUG\"] = 1] = \"DEBUG\";\n\tLogLevel$1[LogLevel$1[\"INFO\"] = 2] = \"INFO\";\n\tLogLevel$1[LogLevel$1[\"WARN\"] = 3] = \"WARN\";\n\tLogLevel$1[LogLevel$1[\"ERROR\"] = 4] = \"ERROR\";\n\tLogLevel$1[LogLevel$1[\"FATAL\"] = 5] = \"FATAL\";\n\treturn LogLevel$1;\n}({});\n\n//#endregion\nexport { LogLevel };\n//# sourceMappingURL=types.mjs.map"],"mappings":";AACA,IAAI,WAA2B,yBAAS,YAAY;AACnD,YAAW,WAAW,WAAW,KAAK;AACtC,YAAW,WAAW,WAAW,KAAK;AACtC,YAAW,WAAW,UAAU,KAAK;AACrC,YAAW,WAAW,UAAU,KAAK;AACrC,YAAW,WAAW,WAAW,KAAK;AACtC,YAAW,WAAW,WAAW,KAAK;AACtC,QAAO;EACN,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.lifecycle-cli",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251219202229",
|
|
4
4
|
"description": "Lifecycle CLI demo (example): run lifecycle assessment without an HTTP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"test": "bun test"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@lssm/bundle.lifecycle-managed": "0.0.0-canary-
|
|
31
|
-
"@lssm/lib.lifecycle": "0.0.0-canary-
|
|
32
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
33
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
34
|
-
"@lssm/lib.logger": "0.0.0-canary-
|
|
30
|
+
"@lssm/bundle.lifecycle-managed": "0.0.0-canary-20251219202229",
|
|
31
|
+
"@lssm/lib.lifecycle": "0.0.0-canary-20251219202229",
|
|
32
|
+
"@lssm/lib.schema": "0.0.0-canary-20251219202229",
|
|
33
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251219202229",
|
|
34
|
+
"@lssm/lib.logger": "0.0.0-canary-20251219202229"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
38
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
39
|
-
"tsdown": "^0.
|
|
37
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251219202229",
|
|
38
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251219202229",
|
|
39
|
+
"tsdown": "^0.18.1",
|
|
40
40
|
"typescript": "^5.9.3"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
@@ -50,5 +50,6 @@
|
|
|
50
50
|
"./*": "./*"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"module": "./dist/index.js"
|
|
53
|
+
"module": "./dist/index.js",
|
|
54
|
+
"license": "MIT"
|
|
54
55
|
}
|