{"_id":"services-as-software","_rev":"7-f4f3bb60d127d0aa27a2568f0b74d5d1","name":"services-as-software","dist-tags":{"next":"0.1.0","latest":"2.4.0"},"versions":{"0.1.0":{"name":"services-as-software","version":"0.1.0","keywords":["services","business","pricing","objectives","key results","agentic"],"author":{"name":"Drivly"},"license":"MIT","_id":"services-as-software@0.1.0","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"homepage":"https://mdx.org.ai","bugs":{"url":"https://github.com/drivly/ai/issues"},"dist":{"shasum":"5d50bdbfe7beecd223c239280dfc948d310bd5c6","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-0.1.0.tgz","fileCount":4,"integrity":"sha512-ixMhl97VgwnW5qJwf5mGqnS5CpQC7CBmbuRJidcZ7wPXzIZfzKtuelFA13x341LeETaz2WFW+4NuQBZiLuShpg==","signatures":[{"sig":"MEYCIQC82FFFKyPbX0YkwJ3C8hJiQktlJH8URfNld2oAZ/iw+AIhAIyn5Di3XHfPEdP1HnoMbiHS5xq3GbYwMKOqMr1dzjD5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19868},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"822e779bc2ae46c6b2f2e9f9f8a8e6204147ba90","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","lint":"eslint src --ext ts","test":"vitest run","build":"tsup src/index.ts --format esm --dts","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"repository":{"url":"git+https://github.com/drivly/ai.git","type":"git","directory":"pkgs/services-as-software"},"_npmVersion":"10.9.2","description":"Define services with objectives, key results, and various pricing models","directories":{},"_nodeVersion":"22.15.0","dependencies":{"apis.do":"0.1.0","services.do":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^0.34.6","typescript":"^5.2.2","business-as-code":"0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/services-as-software_0.1.0_1746092386138_0.8214666683868248","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"services-as-software","version":"2.0.1","keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.0.1","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"dist":{"shasum":"9d7f5bfc4c72766bb8172d4e818fa449d98821ac","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.0.1.tgz","fileCount":78,"integrity":"sha512-1ZOv8pniFCnEVTqNEjZRVYZmzsd+hn4jmT6bYhLw3TFVIyRb+Fe4x0QtNWU3WAL+QCYSdKivnrWlhzvOFzRBQQ==","signatures":[{"sig":"MEUCIQCdPhBGYjwRM6vlHTqCmjAyefIadJmEQkMrzwzuU608MgIgVtqmFXCsKBVzpav+mXaYoIzWREba/j2LRtsDaVy5Yo4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":529242},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ac8efb4f619d42d0e969e231ab56ad6c41c497e8","scripts":{"dev":"tsc --watch","lint":"eslint .","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"_npmVersion":"10.9.3","description":"Primitives for building AI-powered services that operate as software","directories":{},"_nodeVersion":"22.20.0","dependencies":{"rpc.do":"^0.1.0","ai-database":"workspace:*","ai-functions":"workspace:*","digital-workers":"workspace:*"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/services-as-software_2.0.1_1766457130987_0.37525333574079167","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"services-as-software","version":"2.0.2","keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.0.2","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"dist":{"shasum":"714f33046e26fa4f65abcaff6ac4c44444293003","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.0.2.tgz","fileCount":78,"integrity":"sha512-X104Bn93bIqNRKxiK5ZKjxQHd9ynQBIH1YLWdHJZxZY+ZdRLl/4nWCz2Nz5n46q3sUdMZP2Hg641Vn1KrNuotQ==","signatures":[{"sig":"MEUCIDEuXkaiycwZCp9/yij+Obq9rIZ296WGvPiUuUzw5BQZAiEAitUXREbPBiUaZ9voGdTECGIarIO6e6QdXF5dflM7Jvw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":529348},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ac8efb4f619d42d0e969e231ab56ad6c41c497e8","scripts":{"dev":"tsc --watch","lint":"eslint .","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"_npmVersion":"10.9.3","description":"Primitives for building AI-powered services that operate as software","directories":{},"_nodeVersion":"22.20.0","dependencies":{"rpc.do":"^0.1.0","ai-database":"2.0.2","ai-functions":"2.0.2","digital-workers":"2.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/services-as-software_2.0.2_1766457427433_0.16695483120300225","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"services-as-software","version":"2.1.1","keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.1.1","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"dist":{"shasum":"c9f9a06532e1b0971f74c3ae71985984578094ac","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.1.1.tgz","fileCount":95,"integrity":"sha512-I1iHISbBOo4VRUKylUz+4pFC0xwvK1m+V53MYYON4bzFjXdkUlCaSVbDMrNt7ejag5i4t4Y9oXn5n60yY/o/0Q==","signatures":[{"sig":"MEQCIEZW35yDGwYZ6K2zGCd7IQuCeRxI/9eLdVCbcvMm+L2iAiBIUDVhVeNYHCI5aGlXJlbQRu6R1HmG2ZHvggZsxgqL7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":714375},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"21af7dde2cd0e696b2669f4df4ac495a522d069f","scripts":{"dev":"tsc --watch","lint":"eslint .","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"_npmVersion":"10.9.4","description":"Primitives for building AI-powered services that operate as software","directories":{},"_nodeVersion":"22.21.1","dependencies":{"ai-database":"2.1.1","ai-functions":"2.1.1","digital-workers":"2.1.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/services-as-software_2.1.1_1767964954907_0.004060981657318274","host":"s3://npm-registry-packages-npm-production"}},"2.1.3":{"name":"services-as-software","version":"2.1.3","keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.1.3","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"dist":{"shasum":"7f7985c2940a2a53fd02ba1fcbfd3ecc73a7ed70","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.1.3.tgz","fileCount":103,"integrity":"sha512-mMdHqEtQ4jvO65y6Al1RMB7EyRmTPfYq4n6i70yU/+LyX6fqdc77DRda6kiqRS0MMXMHqKs14OANZBu/3az/kQ==","signatures":[{"sig":"MEUCIHosp4byJ+oLNjh+d1Y7vPHykO80xv4i3mUDisBVw8mvAiEA3afplyNQ8ZNZATadKVz79rvkU8WJ71dSkdurffOIXBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":787137},"main":"dist/index.js","type":"module","_from":"file:services-as-software-2.1.3.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"eslint .","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"_resolved":"/private/var/folders/6_/2ksld9sd0zn2kvsnl7qrjz400000gn/T/cfc36a21c0ad8e95aaec81e548924ca3/services-as-software-2.1.3.tgz","_integrity":"sha512-mMdHqEtQ4jvO65y6Al1RMB7EyRmTPfYq4n6i70yU/+LyX6fqdc77DRda6kiqRS0MMXMHqKs14OANZBu/3az/kQ==","_npmVersion":"10.9.4","description":"Primitives for building AI-powered services that operate as software","directories":{},"_nodeVersion":"22.21.1","dependencies":{"ai-database":"2.1.3","ai-functions":"2.1.3","digital-workers":"2.1.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/services-as-software_2.1.3_1768242372562_0.9668111722741628","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"services-as-software","version":"2.3.0","keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.3.0","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"dist":{"shasum":"92a689bfed8181639d603e03bddc1582f683beca","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.3.0.tgz","fileCount":94,"integrity":"sha512-6Tzk0UXTrQrhHhUvXXlJVsh9F9Ivb4bMNqUBNemv/T0JFWdMtdycYuRfhw2T+Tb15xi4ZRjazeBcGn4phP2NzA==","signatures":[{"sig":"MEUCIQCwvQolYntbnC1HIjTRwPxubYHRHTKNnDINbKvvU1Yj+AIgIsKKUabO9jTdiKT6TGddldpOAoO54N77aB6/T0r7qwE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":882450},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./v3":{"types":"./dist/v3/index.d.ts","import":"./dist/v3/index.js"}},"gitHead":"78b420b1b63c647743df94a16a2ebe2e4c1e0223","scripts":{"dev":"tsc --watch","lint":"eslint .","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"_npmVersion":"10.9.4","description":"Primitives for building AI-powered services that operate as software","directories":{},"_nodeVersion":"22.21.1","dependencies":{"zod":"^3.23.0","ai-database":"2.3.0","ai-functions":"2.3.0","digital-tools":"2.3.0","digital-objects":"1.1.0","digital-workers":"2.3.0","language-models":"2.3.0","autonomous-finance":"0.0.1","@standard-schema/spec":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/services-as-software_2.3.0_1779796857849_0.6907155034628234","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"services-as-software","version":"2.4.0","description":"Primitives for building AI-powered services that operate as software","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./v3":{"import":"./dist/v3/index.js","types":"./dist/v3/index.d.ts"}},"scripts":{"build":"tsc","dev":"tsc --watch","test":"vitest run","typecheck":"tsc --noEmit","lint":"eslint .","clean":"rm -rf dist"},"dependencies":{"@standard-schema/spec":"^1.0.0","ai-database":"2.4.0","ai-functions":"2.4.0","business-as-code":"2.4.0","digital-objects":"1.1.0","digital-tools":"2.4.0","digital-workers":"2.4.0","language-models":"2.4.0","zod":"^3.23.0"},"keywords":["services","software","ai","primitives"],"license":"MIT","_id":"services-as-software@2.4.0","gitHead":"e937c4231877ed215c704393b2f9f6a1996edd06","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-bV9oGPK+A0dcIUMXmUnpoqY0ifY2tly5x9gbFsXqQZgjotMwzg7XYH0IooKJ4TcbbI4Rdne6rIkTMmDo8tvCKw==","shasum":"da24c7d53ac3df4446e4dfe1a166a5a6f311952c","tarball":"https://registry.npmjs.org/services-as-software/-/services-as-software-2.4.0.tgz","fileCount":375,"unpackedSize":2062799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBhliMYNuwQTz+26W0rfTVYNLjJiw/qhZr4VpQJ+vbjbAiEAxObbaPLzD4adqUaX7vRvKm1o69nb0+TtA0jF/vFZNI8="}]},"_npmUser":{"name":"nathanclevenger","email":"nateclev@gmail.com"},"directories":{},"maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/services-as-software_2.4.0_1779806837853_0.3430061028310014"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-01T09:39:46.081Z","modified":"2026-05-26T14:47:18.158Z","0.1.0":"2025-05-01T09:39:46.337Z","2.0.1":"2025-12-23T02:32:11.161Z","2.0.2":"2025-12-23T02:37:07.570Z","2.1.1":"2026-01-09T13:22:35.080Z","2.1.3":"2026-01-12T18:26:12.728Z","2.3.0":"2026-05-26T12:00:57.991Z","2.4.0":"2026-05-26T14:47:18.033Z"},"license":"MIT","keywords":["services","software","ai","primitives"],"description":"Primitives for building AI-powered services that operate as software","maintainers":[{"name":"nathanclevenger","email":"nateclev@gmail.com"}],"readme":"# services-as-software\n\n![Stability: Experimental](https://img.shields.io/badge/stability-experimental-red)\n\nPrimitives for building AI-powered services that operate as software. Services are a superset of digital-workers with a payment/business overlay, capable of crossing company/business boundaries.\n\n## Installation\n\n```bash\npnpm add services-as-software\n```\n\n## Quick Start\n\n```typescript\nimport { Service, POST, GET } from 'services-as-software'\n\n// Define a service\nconst translationService = Service({\n  name: 'translation-service',\n  version: '1.0.0',\n  description: 'AI-powered translation service',\n\n  // Pricing configuration\n  pricing: {\n    model: 'per-use',\n    pricePerUnit: 0.01,\n    currency: 'USD',\n  },\n\n  // Service endpoints\n  endpoints: [\n    POST({\n      name: 'translate',\n      path: '/translate',\n      handler: async (input) => {\n        return {\n          translatedText: `Translated: ${input.text}`,\n          confidence: 0.95,\n        }\n      },\n    }),\n  ],\n})\n\n// Use the service\nconst result = await translationService.call('translate', {\n  text: 'Hello, world!',\n  to: 'es',\n})\n```\n\n## Core Primitives\n\n### Service Creation\n\n- **`Service(definition)`** - Define a service with endpoints, pricing, and business logic\n- **`Endpoint(config)`** - Create a service endpoint\n- **`POST()`, `GET()`, `PUT()`, `DELETE()`, `PATCH()`** - HTTP method helpers\n\n### Client & Providers\n\n- **`Client(config)`** - Connect to a remote service\n- **`Provider(config)`** - Manage multiple services\n- **`providers.aws()`, `providers.gcp()`, `providers.azure()`** - Pre-configured cloud providers\n\n### Service Operations\n\n- **`ask()`** - Ask a question helper\n- **`deliver()`** - Deliver results helper\n- **`do()`** - Execute a task helper\n- **`every()`** - Scheduled recurring tasks helper\n- **`generate()`** - Generate content helper\n- **`is()`** - Type checking/validation helper\n- **`notify()`** - Send notifications helper\n- **`on()`** - Event handlers helper\n- **`order()`** - Place an order helper\n- **`queue()`** - Queue management helper\n- **`quote()`** - Request a quote helper\n- **`subscribe()`** - Subscription management helper\n\n### Business Metrics\n\n- **`entitlements()`** - Access entitlements helper\n- **`kpis()`** - Key performance indicators helper\n- **`okrs()`** - Objectives and key results helper\n- **`Plan()`** - Create subscription plans\n- **`KPI()`** - Define KPIs\n- **`OKR()`** - Define OKRs\n\n## Examples\n\n### Creating a Service\n\n```typescript\nimport { Service, Endpoint, POST } from 'services-as-software'\n\nconst service = Service({\n  name: 'my-service',\n  version: '1.0.0',\n\n  // Pricing\n  pricing: {\n    model: 'subscription',\n    basePrice: 49.99,\n    currency: 'USD',\n    interval: 'monthly',\n  },\n\n  // Endpoints\n  endpoints: [\n    POST({\n      name: 'process',\n      handler: async (input, context) => {\n        // Your logic here\n        return { processed: true }\n      },\n    }),\n  ],\n\n  // Subscription plans\n  plans: [\n    {\n      id: 'pro',\n      name: 'Pro Plan',\n      pricing: { model: 'subscription', basePrice: 49.99, currency: 'USD', interval: 'monthly' },\n      entitlements: ['api-access', 'priority-support'],\n      features: ['Unlimited API calls', '24/7 support'],\n    },\n  ],\n\n  // KPIs\n  kpis: [\n    {\n      id: 'daily-requests',\n      name: 'Daily Requests',\n      calculate: async () => 1000,\n      target: 1500,\n    },\n  ],\n})\n```\n\n### Using a Client\n\n```typescript\nimport { Client } from 'services-as-software'\n\nconst client = Client({\n  url: 'https://api.example.com/service',\n  auth: {\n    type: 'api-key',\n    credentials: { apiKey: 'your-key' },\n  },\n})\n\nconst result = await client.do('translate', { text: 'Hello', to: 'es' })\n```\n\n### Using Providers\n\n```typescript\nimport { providers } from 'services-as-software'\n\nconst aws = providers.aws({\n  accessKeyId: 'key',\n  secretAccessKey: 'secret',\n  region: 'us-east-1',\n})\n\nconst translate = aws.service('translate')\nconst result = await translate.do('translate', { text: 'Hello', to: 'es' })\n```\n\n## Features\n\n- **Type-safe** - Full TypeScript support with comprehensive types\n- **Pricing Models** - Support for free, fixed, per-use, subscription, tiered, and custom pricing\n- **Authentication** - Built-in support for API keys, OAuth, JWT, and Basic auth\n- **Rate Limiting** - Endpoint-level rate limiting configuration\n- **Usage Tracking** - Track service usage for billing and analytics\n- **Subscription Management** - Built-in subscription and entitlement support\n- **Business Metrics** - KPIs and OKRs for monitoring service health\n- **Event System** - Register event handlers for service events\n- **Scheduled Tasks** - Cron-based recurring task support\n- **Multi-Provider** - Connect to AWS, GCP, Azure, and custom providers\n\n## Entity Definitions (Nouns)\n\nThis package provides comprehensive entity definitions for AI-delivered productized services, following the Noun pattern from `ai-database`. Each entity includes properties, relationships, actions, and events.\n\n### Entity Categories\n\n| Category | Entities |\n|----------|----------|\n| **Services** | ProductizedService, ServiceOffering, ServicePlan, ServiceInstance, ServiceExecution |\n| **Delivery** | AgentDelivery, AutonomyLevel, EscalationRule, ConfidenceThreshold, HumanHandoff, QualityGate |\n| **Billing** | ServiceQuote, ServiceOrder, ServiceSubscription, Usage, Invoice, Payment |\n| **Operations** | SLA, SLO, ServiceIncident, SupportTicket, ServiceFeedback, ServiceMetric |\n| **Customers** | ServiceCustomer, ServiceEntitlement, CustomerUsage, CustomerSegment |\n| **Orchestration** | ServiceWorkflow, WorkflowStep, ServiceTask, ServiceQueue, ServiceWorker |\n\n### Using Entity Definitions\n\n```typescript\nimport {\n  ProductizedService,\n  AgentDelivery,\n  EscalationRule,\n  ServiceEntities,\n  DeliveryEntities,\n} from 'services-as-software'\n\n// Access individual entities\nconsole.log(ProductizedService.singular)  // 'productized-service'\nconsole.log(ProductizedService.actions)   // ['create', 'update', 'publish', 'execute', ...]\n\n// Access entity collections\nconst allServices = ServiceEntities\nconst allDelivery = DeliveryEntities\n```\n\n### AI Delivery Entities\n\nThe delivery entities capture the key semantics of AI-delivered services:\n\n```typescript\nconst AgentDelivery: Noun = {\n  singular: 'agent-delivery',\n  plural: 'agent-deliveries',\n  description: 'AI agent configuration for autonomous service delivery',\n\n  properties: {\n    name: { type: 'string', description: 'Agent name' },\n    model: { type: 'string', description: 'AI model identifier' },\n    autonomyLevel: {\n      type: 'string',\n      examples: ['full', 'supervised', 'assisted', 'advisory']\n    },\n    confidenceThreshold: {\n      type: 'number',\n      description: 'Min confidence for autonomous action (0-1)'\n    },\n    escalationTriggers: {\n      type: 'string',\n      array: true,\n      description: 'Conditions that trigger escalation'\n    },\n    // ... more properties\n  },\n\n  relationships: {\n    service: { type: 'ProductizedService', description: 'Parent service' },\n    escalationRules: { type: 'EscalationRule[]', description: 'Escalation rules' },\n    qualityGates: { type: 'QualityGate[]', description: 'Quality gates' },\n  },\n\n  actions: ['create', 'update', 'activate', 'pause', 'train', 'evaluate', 'escalate'],\n  events: ['created', 'updated', 'activated', 'paused', 'trained', 'evaluated', 'escalated'],\n}\n```\n\n### Productized Service Entity\n\n```typescript\nconst ProductizedService: Noun = {\n  singular: 'productized-service',\n  plural: 'productized-services',\n  description: 'A service packaged and delivered as software',\n\n  properties: {\n    name: { type: 'string', description: 'Service name' },\n    deliveryModel: {\n      type: 'string',\n      examples: ['autonomous', 'assisted', 'supervised', 'manual']\n    },\n    autonomyLevel: { type: 'number', description: 'AI autonomy level (1-5)' },\n    confidenceThreshold: {\n      type: 'number',\n      description: 'Min confidence for auto-completion'\n    },\n    escalationPolicy: {\n      type: 'string',\n      examples: ['immediate', 'queue', 'scheduled', 'manual']\n    },\n    // ... more properties\n  },\n\n  relationships: {\n    plans: { type: 'ServicePlan[]', description: 'Pricing plans' },\n    agent: { type: 'AgentDelivery', description: 'AI agent for delivery' },\n    sla: { type: 'SLA', description: 'Service level agreement' },\n    workflows: { type: 'ServiceWorkflow[]', description: 'Service workflows' },\n  },\n\n  actions: ['create', 'update', 'publish', 'execute', 'escalate', 'complete'],\n  events: ['created', 'updated', 'published', 'executed', 'escalated', 'completed'],\n}\n```\n\n## Architecture\n\nServices-as-software provides a complete framework for building and consuming services:\n\n```\nService Definition → Service Instance → Client Access\n     ↓                    ↓                  ↓\n  Endpoints          Event Handlers      HTTP/RPC\n  Pricing            Scheduled Tasks     Authentication\n  Plans              KPIs/OKRs           Rate Limiting\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}