@contractspec/module.ai-chat 1.44.1 → 1.45.0

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.
@@ -6,7 +6,7 @@
6
6
  const AiChatFeature = {
7
7
  meta: {
8
8
  key: "ai-chat",
9
- version: 1,
9
+ version: "1.0.0",
10
10
  title: "AI Vibe Coding Chat",
11
11
  description: "AI-powered conversational coding assistant with full workspace context",
12
12
  domain: "platform",
@@ -23,53 +23,53 @@ const AiChatFeature = {
23
23
  operations: [
24
24
  {
25
25
  key: "ai-chat.send",
26
- version: 1
26
+ version: "1.0.0"
27
27
  },
28
28
  {
29
29
  key: "ai-chat.stream",
30
- version: 1
30
+ version: "1.0.0"
31
31
  },
32
32
  {
33
33
  key: "ai-chat.conversations.list",
34
- version: 1
34
+ version: "1.0.0"
35
35
  },
36
36
  {
37
37
  key: "ai-chat.conversations.get",
38
- version: 1
38
+ version: "1.0.0"
39
39
  },
40
40
  {
41
41
  key: "ai-chat.conversations.delete",
42
- version: 1
42
+ version: "1.0.0"
43
43
  },
44
44
  {
45
45
  key: "ai-chat.providers.list",
46
- version: 1
46
+ version: "1.0.0"
47
47
  },
48
48
  {
49
49
  key: "ai-chat.context.scan",
50
- version: 1
50
+ version: "1.0.0"
51
51
  }
52
52
  ],
53
53
  events: [
54
54
  {
55
55
  key: "ai-chat.message.sent",
56
- version: 1
56
+ version: "1.0.0"
57
57
  },
58
58
  {
59
59
  key: "ai-chat.message.received",
60
- version: 1
60
+ version: "1.0.0"
61
61
  },
62
62
  {
63
63
  key: "ai-chat.conversation.created",
64
- version: 1
64
+ version: "1.0.0"
65
65
  },
66
66
  {
67
67
  key: "ai-chat.conversation.deleted",
68
- version: 1
68
+ version: "1.0.0"
69
69
  },
70
70
  {
71
71
  key: "ai-chat.error",
72
- version: 1
72
+ version: "1.0.0"
73
73
  }
74
74
  ],
75
75
  presentations: [],
@@ -78,14 +78,14 @@ const AiChatFeature = {
78
78
  capabilities: {
79
79
  provides: [{
80
80
  key: "ai-chat",
81
- version: 1
81
+ version: "1.0.0"
82
82
  }],
83
83
  requires: [{
84
84
  key: "identity",
85
- version: 1
85
+ version: "1.0.0"
86
86
  }, {
87
87
  key: "metering",
88
- version: 1
88
+ version: "1.0.0"
89
89
  }]
90
90
  }
91
91
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ai-chat.feature.js","names":["AiChatFeature: FeatureModuleSpec"],"sources":["../src/ai-chat.feature.ts"],"sourcesContent":["/**\n * AI Chat Feature Module Specification\n *\n * Defines the feature module for AI-powered vibe coding chat.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * AI Chat feature module that bundles conversational AI assistance\n * for ContractSpec development across CLI, VSCode, and Studio.\n */\nexport const AiChatFeature: FeatureModuleSpec = {\n meta: {\n key: 'ai-chat',\n version: 1,\n title: 'AI Vibe Coding Chat',\n description:\n 'AI-powered conversational coding assistant with full workspace context',\n domain: 'platform',\n owners: ['@platform.ai'],\n tags: ['ai', 'chat', 'llm', 'vibe-coding', 'assistant'],\n stability: 'experimental',\n },\n\n // Contract operations for chat functionality\n operations: [\n { key: 'ai-chat.send', version: 1 },\n { key: 'ai-chat.stream', version: 1 },\n { key: 'ai-chat.conversations.list', version: 1 },\n { key: 'ai-chat.conversations.get', version: 1 },\n { key: 'ai-chat.conversations.delete', version: 1 },\n { key: 'ai-chat.providers.list', version: 1 },\n { key: 'ai-chat.context.scan', version: 1 },\n ],\n\n // Events emitted by the chat system\n events: [\n { key: 'ai-chat.message.sent', version: 1 },\n { key: 'ai-chat.message.received', version: 1 },\n { key: 'ai-chat.conversation.created', version: 1 },\n { key: 'ai-chat.conversation.deleted', version: 1 },\n { key: 'ai-chat.error', version: 1 },\n ],\n\n // No presentations for core module\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [{ key: 'ai-chat', version: 1 }],\n requires: [\n { key: 'identity', version: 1 },\n { key: 'metering', version: 1 },\n ],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,gBAAmC;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,eAAe;EACxB,MAAM;GAAC;GAAM;GAAQ;GAAO;GAAe;GAAY;EACvD,WAAW;EACZ;CAGD,YAAY;EACV;GAAE,KAAK;GAAgB,SAAS;GAAG;EACnC;GAAE,KAAK;GAAkB,SAAS;GAAG;EACrC;GAAE,KAAK;GAA8B,SAAS;GAAG;EACjD;GAAE,KAAK;GAA6B,SAAS;GAAG;EAChD;GAAE,KAAK;GAAgC,SAAS;GAAG;EACnD;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC5C;CAGD,QAAQ;EACN;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAA4B,SAAS;GAAG;EAC/C;GAAE,KAAK;GAAgC,SAAS;GAAG;EACnD;GAAE,KAAK;GAAgC,SAAS;GAAG;EACnD;GAAE,KAAK;GAAiB,SAAS;GAAG;EACrC;CAGD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CAGxB,cAAc;EACZ,UAAU,CAAC;GAAE,KAAK;GAAW,SAAS;GAAG,CAAC;EAC1C,UAAU,CACR;GAAE,KAAK;GAAY,SAAS;GAAG,EAC/B;GAAE,KAAK;GAAY,SAAS;GAAG,CAChC;EACF;CACF"}
1
+ {"version":3,"file":"ai-chat.feature.js","names":["AiChatFeature: FeatureModuleSpec"],"sources":["../src/ai-chat.feature.ts"],"sourcesContent":["/**\n * AI Chat Feature Module Specification\n *\n * Defines the feature module for AI-powered vibe coding chat.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * AI Chat feature module that bundles conversational AI assistance\n * for ContractSpec development across CLI, VSCode, and Studio.\n */\nexport const AiChatFeature: FeatureModuleSpec = {\n meta: {\n key: 'ai-chat',\n version: '1.0.0',\n title: 'AI Vibe Coding Chat',\n description:\n 'AI-powered conversational coding assistant with full workspace context',\n domain: 'platform',\n owners: ['@platform.ai'],\n tags: ['ai', 'chat', 'llm', 'vibe-coding', 'assistant'],\n stability: 'experimental',\n },\n\n // Contract operations for chat functionality\n operations: [\n { key: 'ai-chat.send', version: '1.0.0' },\n { key: 'ai-chat.stream', version: '1.0.0' },\n { key: 'ai-chat.conversations.list', version: '1.0.0' },\n { key: 'ai-chat.conversations.get', version: '1.0.0' },\n { key: 'ai-chat.conversations.delete', version: '1.0.0' },\n { key: 'ai-chat.providers.list', version: '1.0.0' },\n { key: 'ai-chat.context.scan', version: '1.0.0' },\n ],\n\n // Events emitted by the chat system\n events: [\n { key: 'ai-chat.message.sent', version: '1.0.0' },\n { key: 'ai-chat.message.received', version: '1.0.0' },\n { key: 'ai-chat.conversation.created', version: '1.0.0' },\n { key: 'ai-chat.conversation.deleted', version: '1.0.0' },\n { key: 'ai-chat.error', version: '1.0.0' },\n ],\n\n // No presentations for core module\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [{ key: 'ai-chat', version: '1.0.0' }],\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'metering', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,gBAAmC;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,eAAe;EACxB,MAAM;GAAC;GAAM;GAAQ;GAAO;GAAe;GAAY;EACvD,WAAW;EACZ;CAGD,YAAY;EACV;GAAE,KAAK;GAAgB,SAAS;GAAS;EACzC;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAAwB,SAAS;GAAS;EAClD;CAGD,QAAQ;EACN;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C;CAGD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CAGxB,cAAc;EACZ,UAAU,CAAC;GAAE,KAAK;GAAW,SAAS;GAAS,CAAC;EAChD,UAAU,CACR;GAAE,KAAK;GAAY,SAAS;GAAS,EACrC;GAAE,KAAK;GAAY,SAAS;GAAS,CACtC;EACF;CACF"}
@@ -8,7 +8,7 @@ import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
8
8
  const SendMessageContract = defineCommand({
9
9
  meta: {
10
10
  key: "ai-chat.send",
11
- version: 1,
11
+ version: "1.0.0",
12
12
  owners: ["@ai-team"],
13
13
  stability: "experimental",
14
14
  description: "Send a message to the AI chat.",
@@ -32,7 +32,7 @@ const StreamMessageOutputModel = defineSchemaModel({
32
32
  const StreamMessageContract = defineCommand({
33
33
  meta: {
34
34
  key: "ai-chat.stream",
35
- version: 1,
35
+ version: "1.0.0",
36
36
  owners: ["@ai-team"],
37
37
  stability: "experimental",
38
38
  description: "Stream a message response from the AI chat.",
@@ -49,7 +49,7 @@ const StreamMessageContract = defineCommand({
49
49
  const ListConversationsContract = defineQuery({
50
50
  meta: {
51
51
  key: "ai-chat.conversations.list",
52
- version: 1,
52
+ version: "1.0.0",
53
53
  owners: ["@ai-team"],
54
54
  stability: "experimental",
55
55
  description: "List user conversations.",
@@ -69,7 +69,7 @@ const ListConversationsContract = defineQuery({
69
69
  const GetConversationContract = defineQuery({
70
70
  meta: {
71
71
  key: "ai-chat.conversations.get",
72
- version: 1,
72
+ version: "1.0.0",
73
73
  owners: ["@ai-team"],
74
74
  stability: "experimental",
75
75
  description: "Get a specific conversation.",
@@ -92,7 +92,7 @@ const GetConversationContract = defineQuery({
92
92
  const DeleteConversationContract = defineCommand({
93
93
  meta: {
94
94
  key: "ai-chat.conversations.delete",
95
- version: 1,
95
+ version: "1.0.0",
96
96
  owners: ["@ai-team"],
97
97
  stability: "experimental",
98
98
  description: "Delete a conversation.",
@@ -118,7 +118,7 @@ const DeleteConversationContract = defineCommand({
118
118
  const ListProvidersContract = defineQuery({
119
119
  meta: {
120
120
  key: "ai-chat.providers.list",
121
- version: 1,
121
+ version: "1.0.0",
122
122
  owners: ["@ai-team"],
123
123
  stability: "experimental",
124
124
  description: "List available AI providers.",
@@ -145,7 +145,7 @@ const ListProvidersContract = defineQuery({
145
145
  const ScanContextContract = defineCommand({
146
146
  meta: {
147
147
  key: "ai-chat.context.scan",
148
- version: 1,
148
+ version: "1.0.0",
149
149
  owners: ["@ai-team"],
150
150
  stability: "experimental",
151
151
  description: "Scan workspace context.",
@@ -1 +1 @@
1
- {"version":3,"file":"ai-chat.operations.js","names":[],"sources":["../src/ai-chat.operations.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport {\n ChatConversationModel,\n ListConversationsOutputModel,\n SendMessageInputModel,\n SendMessageOutputModel,\n} from './schema';\n\nexport const SendMessageContract = defineCommand({\n meta: {\n key: 'ai-chat.send',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Send a message to the AI chat.',\n tags: ['chat', 'send'],\n goal: 'Send message',\n context: 'Chat UI',\n },\n io: { input: SendMessageInputModel, output: SendMessageOutputModel },\n policy: { auth: 'user' },\n});\n\nconst StreamMessageOutputModel = defineSchemaModel({\n name: 'StreamMessageOutput',\n fields: {\n stream: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Placeholder for stream content\n },\n});\n\nexport const StreamMessageContract = defineCommand({\n meta: {\n key: 'ai-chat.stream',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Stream a message response from the AI chat.',\n tags: ['chat', 'stream'],\n goal: 'Stream response',\n context: 'Chat UI',\n },\n io: { input: SendMessageInputModel, output: StreamMessageOutputModel },\n policy: { auth: 'user' },\n});\n\nexport const ListConversationsContract = defineQuery({\n meta: {\n key: 'ai-chat.conversations.list',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'List user conversations.',\n tags: ['chat', 'list'],\n goal: 'List conversations',\n context: 'Chat History',\n },\n io: {\n input: defineSchemaModel({ name: 'VoidInput', fields: {} }),\n output: ListConversationsOutputModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const GetConversationContract = defineQuery({\n meta: {\n key: 'ai-chat.conversations.get',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Get a specific conversation.',\n tags: ['chat', 'get'],\n goal: 'Get conversation',\n context: 'Chat UI',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetConversationInput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: ChatConversationModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const DeleteConversationContract = defineCommand({\n meta: {\n key: 'ai-chat.conversations.delete',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Delete a conversation.',\n tags: ['chat', 'delete'],\n goal: 'Delete conversation',\n context: 'Chat History',\n },\n io: {\n input: defineSchemaModel({\n name: 'DeleteConversationInput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({ name: 'VoidOutput', fields: {} }),\n },\n policy: { auth: 'user' },\n});\n\nexport const ListProvidersContract = defineQuery({\n meta: {\n key: 'ai-chat.providers.list',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'List available AI providers.',\n tags: ['chat', 'providers'],\n goal: 'List providers',\n context: 'Settings',\n },\n io: {\n input: defineSchemaModel({ name: 'VoidInput2', fields: {} }),\n output: defineSchemaModel({\n name: 'ProviderList',\n fields: {\n providers: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\nexport const ScanContextContract = defineCommand({\n meta: {\n key: 'ai-chat.context.scan',\n version: 1,\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Scan workspace context.',\n tags: ['chat', 'context'],\n goal: 'Scan context',\n context: 'Background',\n },\n io: {\n input: defineSchemaModel({\n name: 'ScanContextInput',\n fields: {\n path: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({ name: 'VoidOutput2', fields: {} }),\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;;;AASA,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,OAAO;EACtB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAwB;CACpE,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,QAAQ,EACN,QAAQ;EAAE,MAAM,eAAe,iBAAiB;EAAE,YAAY;EAAO,EACtE;CACF,CAAC;AAEF,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,SAAS;EACxB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAA0B;CACtE,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,4BAA4B,YAAY;CACnD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;E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,QAAQ,EACN,WAAW;IACT,MAAM,eAAe,iBAAiB;IACtC,SAAS;IACT,YAAY;IACb,EACF;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,UAAU;EACzB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ,EACN,MAAM;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO,EACpE;GACF,CAAC;EACF,QAAQ,kBAAkB;GAAE,MAAM;GAAe,QAAQ,EAAE;GAAE,CAAC;EAC/D;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
1
+ {"version":3,"file":"ai-chat.operations.js","names":[],"sources":["../src/ai-chat.operations.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport {\n ChatConversationModel,\n ListConversationsOutputModel,\n SendMessageInputModel,\n SendMessageOutputModel,\n} from './schema';\n\nexport const SendMessageContract = defineCommand({\n meta: {\n key: 'ai-chat.send',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Send a message to the AI chat.',\n tags: ['chat', 'send'],\n goal: 'Send message',\n context: 'Chat UI',\n },\n io: { input: SendMessageInputModel, output: SendMessageOutputModel },\n policy: { auth: 'user' },\n});\n\nconst StreamMessageOutputModel = defineSchemaModel({\n name: 'StreamMessageOutput',\n fields: {\n stream: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Placeholder for stream content\n },\n});\n\nexport const StreamMessageContract = defineCommand({\n meta: {\n key: 'ai-chat.stream',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Stream a message response from the AI chat.',\n tags: ['chat', 'stream'],\n goal: 'Stream response',\n context: 'Chat UI',\n },\n io: { input: SendMessageInputModel, output: StreamMessageOutputModel },\n policy: { auth: 'user' },\n});\n\nexport const ListConversationsContract = defineQuery({\n meta: {\n key: 'ai-chat.conversations.list',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'List user conversations.',\n tags: ['chat', 'list'],\n goal: 'List conversations',\n context: 'Chat History',\n },\n io: {\n input: defineSchemaModel({ name: 'VoidInput', fields: {} }),\n output: ListConversationsOutputModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const GetConversationContract = defineQuery({\n meta: {\n key: 'ai-chat.conversations.get',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Get a specific conversation.',\n tags: ['chat', 'get'],\n goal: 'Get conversation',\n context: 'Chat UI',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetConversationInput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: ChatConversationModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const DeleteConversationContract = defineCommand({\n meta: {\n key: 'ai-chat.conversations.delete',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Delete a conversation.',\n tags: ['chat', 'delete'],\n goal: 'Delete conversation',\n context: 'Chat History',\n },\n io: {\n input: defineSchemaModel({\n name: 'DeleteConversationInput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({ name: 'VoidOutput', fields: {} }),\n },\n policy: { auth: 'user' },\n});\n\nexport const ListProvidersContract = defineQuery({\n meta: {\n key: 'ai-chat.providers.list',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'List available AI providers.',\n tags: ['chat', 'providers'],\n goal: 'List providers',\n context: 'Settings',\n },\n io: {\n input: defineSchemaModel({ name: 'VoidInput2', fields: {} }),\n output: defineSchemaModel({\n name: 'ProviderList',\n fields: {\n providers: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\nexport const ScanContextContract = defineCommand({\n meta: {\n key: 'ai-chat.context.scan',\n version: '1.0.0',\n owners: ['@ai-team'],\n stability: 'experimental',\n description: 'Scan workspace context.',\n tags: ['chat', 'context'],\n goal: 'Scan context',\n context: 'Background',\n },\n io: {\n input: defineSchemaModel({\n name: 'ScanContextInput',\n fields: {\n path: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({ name: 'VoidOutput2', fields: {} }),\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;;;AASA,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,OAAO;EACtB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAwB;CACpE,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,QAAQ,EACN,QAAQ;EAAE,MAAM,eAAe,iBAAiB;EAAE,YAAY;EAAO,EACtE;CACF,CAAC;AAEF,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,SAAS;EACxB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAA0B;CACtE,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,4BAA4B,YAAY;CACnD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,OAAO;EACtB,MAAM;EACN,SAA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,SAAS;IACT,YAAY;IACb,EACF;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,QAAQ,CAAC,WAAW;EACpB,WAAW;EACX,aAAa;EACb,MAAM,CAAC,QAAQ,UAAU;EACzB,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ,EACN,MAAM;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO,EACpE;GACF,CAAC;EACF,QAAQ,kBAAkB;GAAE,MAAM;GAAe,QAAQ,EAAE;GAAE,CAAC;EAC/D;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
@@ -10,7 +10,7 @@
10
10
  */
11
11
  interface SpecInfo {
12
12
  name: string;
13
- version: number;
13
+ version: string;
14
14
  type: 'command' | 'query' | 'event' | 'presentation';
15
15
  path: string;
16
16
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-context.js","names":["parts: string[]"],"sources":["../../src/context/workspace-context.ts"],"sourcesContent":["/**\n * Workspace context management\n *\n * Provides access to specs, files, and codebase information\n * for context-aware AI chat assistance.\n */\n\n/**\n * Spec information for context\n */\nexport interface SpecInfo {\n name: string;\n version: number;\n type: 'command' | 'query' | 'event' | 'presentation';\n path: string;\n description?: string;\n tags?: string[];\n}\n\n/**\n * File information for context\n */\nexport interface FileInfo {\n path: string;\n relativePath: string;\n name: string;\n extension: string;\n size: number;\n isSpec: boolean;\n}\n\n/**\n * Workspace summary for context\n */\nexport interface WorkspaceSummary {\n name: string;\n path: string;\n specs: {\n total: number;\n commands: number;\n queries: number;\n events: number;\n presentations: number;\n };\n files: {\n total: number;\n typescript: number;\n specFiles: number;\n };\n}\n\n/**\n * Configuration for workspace context\n */\nexport interface WorkspaceContextConfig {\n /** Root path of the workspace */\n workspacePath: string;\n /** File patterns to include */\n includePatterns?: string[];\n /** File patterns to exclude */\n excludePatterns?: string[];\n /** Maximum file size to read (bytes) */\n maxFileSize?: number;\n /** Whether to enable file writes */\n allowWrites?: boolean;\n}\n\n/**\n * Workspace context for AI chat\n */\nexport class WorkspaceContext {\n readonly workspacePath: string;\n readonly allowWrites: boolean;\n\n private specs: SpecInfo[] = [];\n private files: FileInfo[] = [];\n private initialized = false;\n\n constructor(config: WorkspaceContextConfig) {\n this.workspacePath = config.workspacePath;\n this.allowWrites = config.allowWrites ?? false;\n }\n\n /**\n * Initialize the workspace context by scanning files\n */\n async initialize(): Promise<void> {\n if (this.initialized) return;\n\n // This would scan the workspace for specs and files\n // For now, we just mark as initialized\n this.initialized = true;\n }\n\n /**\n * Get all discovered specs\n */\n getSpecs(): SpecInfo[] {\n return this.specs;\n }\n\n /**\n * Get all discovered files\n */\n getFiles(): FileInfo[] {\n return this.files;\n }\n\n /**\n * Add specs to the context\n */\n addSpecs(specs: SpecInfo[]): void {\n this.specs.push(...specs);\n }\n\n /**\n * Add files to the context\n */\n addFiles(files: FileInfo[]): void {\n this.files.push(...files);\n }\n\n /**\n * Get a summary of the workspace for context\n */\n getSummary(): WorkspaceSummary {\n const commands = this.specs.filter((s) => s.type === 'command').length;\n const queries = this.specs.filter((s) => s.type === 'query').length;\n const events = this.specs.filter((s) => s.type === 'event').length;\n const presentations = this.specs.filter(\n (s) => s.type === 'presentation'\n ).length;\n\n const tsFiles = this.files.filter((f) => f.extension === '.ts').length;\n const specFiles = this.files.filter((f) => f.isSpec).length;\n\n return {\n name: this.workspacePath.split('/').pop() ?? 'workspace',\n path: this.workspacePath,\n specs: {\n total: this.specs.length,\n commands,\n queries,\n events,\n presentations,\n },\n files: {\n total: this.files.length,\n typescript: tsFiles,\n specFiles,\n },\n };\n }\n\n /**\n * Get a context summary for LLM prompts\n */\n getContextSummary(): string {\n const summary = this.getSummary();\n\n const parts: string[] = [\n `Workspace: ${summary.name}`,\n `Path: ${summary.path}`,\n '',\n '### Specs',\n `- Commands: ${summary.specs.commands}`,\n `- Queries: ${summary.specs.queries}`,\n `- Events: ${summary.specs.events}`,\n `- Presentations: ${summary.specs.presentations}`,\n ];\n\n if (this.specs.length > 0) {\n parts.push('', '### Available Specs');\n for (const spec of this.specs.slice(0, 20)) {\n parts.push(`- ${spec.name} (${spec.type})`);\n }\n if (this.specs.length > 20) {\n parts.push(`- ... and ${this.specs.length - 20} more`);\n }\n }\n\n return parts.join('\\n');\n }\n\n /**\n * Find specs matching a query\n */\n findSpecs(query: string): SpecInfo[] {\n const lowerQuery = query.toLowerCase();\n return this.specs.filter(\n (s) =>\n s.name.toLowerCase().includes(lowerQuery) ||\n s.description?.toLowerCase().includes(lowerQuery) ||\n s.tags?.some((t) => t.toLowerCase().includes(lowerQuery))\n );\n }\n\n /**\n * Find files matching a query\n */\n findFiles(query: string): FileInfo[] {\n const lowerQuery = query.toLowerCase();\n return this.files.filter(\n (f) =>\n f.path.toLowerCase().includes(lowerQuery) ||\n f.name.toLowerCase().includes(lowerQuery)\n );\n }\n}\n\n/**\n * Create a workspace context from a path\n */\nexport async function createWorkspaceContext(\n path: string,\n options?: Partial<WorkspaceContextConfig>\n): Promise<WorkspaceContext> {\n const context = new WorkspaceContext({\n workspacePath: path,\n ...options,\n });\n await context.initialize();\n return context;\n}\n"],"mappings":";;;;AAsEA,IAAa,mBAAb,MAA8B;CAC5B,AAAS;CACT,AAAS;CAET,AAAQ,QAAoB,EAAE;CAC9B,AAAQ,QAAoB,EAAE;CAC9B,AAAQ,cAAc;CAEtB,YAAY,QAAgC;AAC1C,OAAK,gBAAgB,OAAO;AAC5B,OAAK,cAAc,OAAO,eAAe;;;;;CAM3C,MAAM,aAA4B;AAChC,MAAI,KAAK,YAAa;AAItB,OAAK,cAAc;;;;;CAMrB,WAAuB;AACrB,SAAO,KAAK;;;;;CAMd,WAAuB;AACrB,SAAO,KAAK;;;;;CAMd,SAAS,OAAyB;AAChC,OAAK,MAAM,KAAK,GAAG,MAAM;;;;;CAM3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U,OAA2B;EACnC,MAAM,aAAa,MAAM,aAAa;AACtC,SAAO,KAAK,MAAM,QACf,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,WAAW,IACzC,EAAE,aAAa,aAAa,CAAC,SAAS,WAAW,IACjD,EAAE,MAAM,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,WAAW,CAAC,CAC5D;;;;;CAMH,UAAU,OAA2B;EACnC,MAAM,aAAa,MAAM,aAAa;AACtC,SAAO,KAAK,MAAM,QACf,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,WAAW,IACzC,EAAE,KAAK,aAAa,CAAC,SAAS,WAAW,CAC5C;;;;;;AAOL,eAAsB,uBACpB,MACA,SAC2B;CAC3B,MAAM,UAAU,IAAI,iBAAiB;EACnC,eAAe;EACf,GAAG;EACJ,CAAC;AACF,OAAM,QAAQ,YAAY;AAC1B,QAAO"}
1
+ {"version":3,"file":"workspace-context.js","names":["parts: string[]"],"sources":["../../src/context/workspace-context.ts"],"sourcesContent":["/**\n * Workspace context management\n *\n * Provides access to specs, files, and codebase information\n * for context-aware AI chat assistance.\n */\n\n/**\n * Spec information for context\n */\nexport interface SpecInfo {\n name: string;\n version: string;\n type: 'command' | 'query' | 'event' | 'presentation';\n path: string;\n description?: string;\n tags?: string[];\n}\n\n/**\n * File information for context\n */\nexport interface FileInfo {\n path: string;\n relativePath: string;\n name: string;\n extension: string;\n size: number;\n isSpec: boolean;\n}\n\n/**\n * Workspace summary for context\n */\nexport interface WorkspaceSummary {\n name: string;\n path: string;\n specs: {\n total: number;\n commands: number;\n queries: number;\n events: number;\n presentations: number;\n };\n files: {\n total: number;\n typescript: number;\n specFiles: number;\n };\n}\n\n/**\n * Configuration for workspace context\n */\nexport interface WorkspaceContextConfig {\n /** Root path of the workspace */\n workspacePath: string;\n /** File patterns to include */\n includePatterns?: string[];\n /** File patterns to exclude */\n excludePatterns?: string[];\n /** Maximum file size to read (bytes) */\n maxFileSize?: number;\n /** Whether to enable file writes */\n allowWrites?: boolean;\n}\n\n/**\n * Workspace context for AI chat\n */\nexport class WorkspaceContext {\n readonly workspacePath: string;\n readonly allowWrites: boolean;\n\n private specs: SpecInfo[] = [];\n private files: FileInfo[] = [];\n private initialized = false;\n\n constructor(config: WorkspaceContextConfig) {\n this.workspacePath = config.workspacePath;\n this.allowWrites = config.allowWrites ?? false;\n }\n\n /**\n * Initialize the workspace context by scanning files\n */\n async initialize(): Promise<void> {\n if (this.initialized) return;\n\n // This would scan the workspace for specs and files\n // For now, we just mark as initialized\n this.initialized = true;\n }\n\n /**\n * Get all discovered specs\n */\n getSpecs(): SpecInfo[] {\n return this.specs;\n }\n\n /**\n * Get all discovered files\n */\n getFiles(): FileInfo[] {\n return this.files;\n }\n\n /**\n * Add specs to the context\n */\n addSpecs(specs: SpecInfo[]): void {\n this.specs.push(...specs);\n }\n\n /**\n * Add files to the context\n */\n addFiles(files: FileInfo[]): void {\n this.files.push(...files);\n }\n\n /**\n * Get a summary of the workspace for context\n */\n getSummary(): WorkspaceSummary {\n const commands = this.specs.filter((s) => s.type === 'command').length;\n const queries = this.specs.filter((s) => s.type === 'query').length;\n const events = this.specs.filter((s) => s.type === 'event').length;\n const presentations = this.specs.filter(\n (s) => s.type === 'presentation'\n ).length;\n\n const tsFiles = this.files.filter((f) => f.extension === '.ts').length;\n const specFiles = this.files.filter((f) => f.isSpec).length;\n\n return {\n name: this.workspacePath.split('/').pop() ?? 'workspace',\n path: this.workspacePath,\n specs: {\n total: this.specs.length,\n commands,\n queries,\n events,\n presentations,\n },\n files: {\n total: this.files.length,\n typescript: tsFiles,\n specFiles,\n },\n };\n }\n\n /**\n * Get a context summary for LLM prompts\n */\n getContextSummary(): string {\n const summary = this.getSummary();\n\n const parts: string[] = [\n `Workspace: ${summary.name}`,\n `Path: ${summary.path}`,\n '',\n '### Specs',\n `- Commands: ${summary.specs.commands}`,\n `- Queries: ${summary.specs.queries}`,\n `- Events: ${summary.specs.events}`,\n `- Presentations: ${summary.specs.presentations}`,\n ];\n\n if (this.specs.length > 0) {\n parts.push('', '### Available Specs');\n for (const spec of this.specs.slice(0, 20)) {\n parts.push(`- ${spec.name} (${spec.type})`);\n }\n if (this.specs.length > 20) {\n parts.push(`- ... and ${this.specs.length - 20} more`);\n }\n }\n\n return parts.join('\\n');\n }\n\n /**\n * Find specs matching a query\n */\n findSpecs(query: string): SpecInfo[] {\n const lowerQuery = query.toLowerCase();\n return this.specs.filter(\n (s) =>\n s.name.toLowerCase().includes(lowerQuery) ||\n s.description?.toLowerCase().includes(lowerQuery) ||\n s.tags?.some((t) => t.toLowerCase().includes(lowerQuery))\n );\n }\n\n /**\n * Find files matching a query\n */\n findFiles(query: string): FileInfo[] {\n const lowerQuery = query.toLowerCase();\n return this.files.filter(\n (f) =>\n f.path.toLowerCase().includes(lowerQuery) ||\n f.name.toLowerCase().includes(lowerQuery)\n );\n }\n}\n\n/**\n * Create a workspace context from a path\n */\nexport async function createWorkspaceContext(\n path: string,\n options?: Partial<WorkspaceContextConfig>\n): Promise<WorkspaceContext> {\n const context = new WorkspaceContext({\n workspacePath: path,\n ...options,\n });\n await context.initialize();\n return context;\n}\n"],"mappings":";;;;AAsEA,IAAa,mBAAb,MAA8B;CAC5B,AAAS;CACT,AAAS;CAET,AAAQ,QAAoB,EAAE;CAC9B,AAAQ,QAAoB,EAAE;CAC9B,AAAQ,cAAc;CAEtB,YAAY,QAAgC;AAC1C,OAAK,gBAAgB,OAAO;AAC5B,OAAK,cAAc,OAAO,eAAe;;;;;CAM3C,MAAM,aAA4B;AAChC,MAAI,KAAK,YAAa;AAItB,OAAK,cAAc;;;;;CAMrB,WAAuB;AACrB,SAAO,KAAK;;;;;CAMd,WAAuB;AACrB,SAAO,KAAK;;;;;CAMd,SAAS,OAAyB;AAChC,OAAK,MAAM,KAAK,GAAG,MAAM;;;;;CAM3B,SAAS,OAAyB;AAChC,OAAK,MAAM,KAAK,GAAG,MAAM;;;;;CAM3B,aAA+B;EAC7B,MAAM,WAAW,KAAK,MAAM,Q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WAAW,IACzC,EAAE,aAAa,aAAa,CAAC,SAAS,WAAW,IACjD,EAAE,MAAM,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,WAAW,CAAC,CAC5D;;;;;CAMH,UAAU,OAA2B;EACnC,MAAM,aAAa,MAAM,aAAa;AACtC,SAAO,KAAK,MAAM,QACf,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,WAAW,IACzC,EAAE,KAAK,aAAa,CAAC,SAAS,WAAW,CAC5C;;;;;;AAOL,eAAsB,uBACpB,MACA,SAC2B;CAC3B,MAAM,UAAU,IAAI,iBAAiB;EACnC,eAAe;EACf,GAAG;EACJ,CAAC;AACF,OAAM,QAAQ,YAAY;AAC1B,QAAO"}
package/dist/events.js CHANGED
@@ -8,7 +8,7 @@ import { defineEvent } from "@contractspec/lib.contracts";
8
8
  const MessageSentEvent = defineEvent({
9
9
  meta: {
10
10
  key: "ai-chat.message.sent",
11
- version: 1,
11
+ version: "1.0.0",
12
12
  description: "Message sent by user",
13
13
  stability: "stable",
14
14
  owners: ["@ai-chat"],
@@ -23,7 +23,7 @@ const MessageSentEvent = defineEvent({
23
23
  const MessageReceivedEvent = defineEvent({
24
24
  meta: {
25
25
  key: "ai-chat.message.received",
26
- version: 1,
26
+ version: "1.0.0",
27
27
  description: "Message received from AI",
28
28
  stability: "stable",
29
29
  owners: ["@ai-chat"],
@@ -38,7 +38,7 @@ const MessageReceivedEvent = defineEvent({
38
38
  const ConversationCreatedEvent = defineEvent({
39
39
  meta: {
40
40
  key: "ai-chat.conversation.created",
41
- version: 1,
41
+ version: "1.0.0",
42
42
  description: "New conversation created",
43
43
  stability: "stable",
44
44
  owners: ["@ai-chat"],
@@ -53,7 +53,7 @@ const ConversationCreatedEvent = defineEvent({
53
53
  const ConversationDeletedEvent = defineEvent({
54
54
  meta: {
55
55
  key: "ai-chat.conversation.deleted",
56
- version: 1,
56
+ version: "1.0.0",
57
57
  description: "Conversation deleted",
58
58
  stability: "stable",
59
59
  owners: ["@ai-chat"],
@@ -74,7 +74,7 @@ const ConversationDeletedEvent = defineEvent({
74
74
  const ChatErrorEvent = defineEvent({
75
75
  meta: {
76
76
  key: "ai-chat.error",
77
- version: 1,
77
+ version: "1.0.0",
78
78
  description: "Chat error occurred",
79
79
  stability: "stable",
80
80
  owners: ["@ai-chat"],
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { defineEvent } from '@contractspec/lib.contracts';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { ChatMessageModel, ChatConversationModel } from './schema';\n\nexport const MessageSentEvent = defineEvent({\n meta: {\n key: 'ai-chat.message.sent',\n version: 1,\n description: 'Message sent by user',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'message', 'sent'],\n },\n payload: ChatMessageModel,\n});\n\nexport const MessageReceivedEvent = defineEvent({\n meta: {\n key: 'ai-chat.message.received',\n version: 1,\n description: 'Message received from AI',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'message', 'received'],\n },\n payload: ChatMessageModel,\n});\n\nexport const ConversationCreatedEvent = defineEvent({\n meta: {\n key: 'ai-chat.conversation.created',\n version: 1,\n description: 'New conversation created',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'conversation', 'created'],\n },\n payload: ChatConversationModel,\n});\n\nexport const ConversationDeletedEvent = defineEvent({\n meta: {\n key: 'ai-chat.conversation.deleted',\n version: 1,\n description: 'Conversation deleted',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'conversation', 'deleted'],\n },\n payload: defineSchemaModel({\n name: 'ConversationDeletedPayload',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n});\n\nexport const ChatErrorEvent = defineEvent({\n meta: {\n key: 'ai-chat.error',\n version: 1,\n description: 'Chat error occurred',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'error'],\n },\n payload: defineSchemaModel({\n name: 'ChatErrorPayload',\n fields: {\n code: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n message: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n});\n"],"mappings":";;;;;;;AAIA,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAW;GAAO;EACrC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAW;GAAW;EACzC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAgB;GAAU;EAC7C;CACD,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAgB;GAAU;EAC7C;CACD,SAAS,kBAAkB;EACzB,MAAM;EACN,QAAQ,EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO,EAClE;EACF,CAAC;CACH,CAAC;AAEF,MAAa,iBAAiB,YAAY;CACxC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM,CAAC,WAAW,QAAQ;EAC3B;CACD,SAAS,kBAAkB;EACzB,MAAM;EACN,QAAQ;GACN,MAAM;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACnE,SAAS;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACvE;EACF,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { defineEvent } from '@contractspec/lib.contracts';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { ChatMessageModel, ChatConversationModel } from './schema';\n\nexport const MessageSentEvent = defineEvent({\n meta: {\n key: 'ai-chat.message.sent',\n version: '1.0.0',\n description: 'Message sent by user',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'message', 'sent'],\n },\n payload: ChatMessageModel,\n});\n\nexport const MessageReceivedEvent = defineEvent({\n meta: {\n key: 'ai-chat.message.received',\n version: '1.0.0',\n description: 'Message received from AI',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'message', 'received'],\n },\n payload: ChatMessageModel,\n});\n\nexport const ConversationCreatedEvent = defineEvent({\n meta: {\n key: 'ai-chat.conversation.created',\n version: '1.0.0',\n description: 'New conversation created',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'conversation', 'created'],\n },\n payload: ChatConversationModel,\n});\n\nexport const ConversationDeletedEvent = defineEvent({\n meta: {\n key: 'ai-chat.conversation.deleted',\n version: '1.0.0',\n description: 'Conversation deleted',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'conversation', 'deleted'],\n },\n payload: defineSchemaModel({\n name: 'ConversationDeletedPayload',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n});\n\nexport const ChatErrorEvent = defineEvent({\n meta: {\n key: 'ai-chat.error',\n version: '1.0.0',\n description: 'Chat error occurred',\n stability: 'stable',\n owners: ['@ai-chat'],\n tags: ['ai-chat', 'error'],\n },\n payload: defineSchemaModel({\n name: 'ChatErrorPayload',\n fields: {\n code: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n message: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n});\n"],"mappings":";;;;;;;AAIA,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAW;GAAO;EACrC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAW;GAAW;EACzC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAgB;GAAU;EAC7C;CACD,SAAS;CACV,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAW;GAAgB;GAAU;EAC7C;CACD,SAAS,kBAAkB;EACzB,MAAM;EACN,QAAQ,EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO,EAClE;EACF,CAAC;CACH,CAAC;AAEF,MAAa,iBAAiB,YAAY;CACxC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM,CAAC,WAAW,QAAQ;EAC3B;CACD,SAAS,kBAAkB;EACzB,MAAM;EACN,QAAQ;GACN,MAAM;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACnE,SAAS;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACvE;EACF,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/module.ai-chat",
3
- "version": "1.44.1",
3
+ "version": "1.45.0",
4
4
  "description": "AI chat interface module",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -31,13 +31,13 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@contractspec/lib.ai-agent": "1.44.1",
35
- "@contractspec/lib.ai-providers": "1.44.1",
36
- "@contractspec/lib.contracts": "1.44.1",
37
- "@contractspec/lib.metering": "1.44.1",
38
- "@contractspec/lib.cost-tracking": "1.44.1",
39
- "@contractspec/lib.design-system": "1.44.1",
40
- "@contractspec/lib.ui-kit-web": "1.44.1",
34
+ "@contractspec/lib.ai-agent": "1.45.0",
35
+ "@contractspec/lib.ai-providers": "1.45.0",
36
+ "@contractspec/lib.contracts": "1.45.0",
37
+ "@contractspec/lib.metering": "1.45.0",
38
+ "@contractspec/lib.cost-tracking": "1.45.0",
39
+ "@contractspec/lib.design-system": "1.45.0",
40
+ "@contractspec/lib.ui-kit-web": "1.45.0",
41
41
  "@ai-sdk/react": "3.0.3",
42
42
  "ai": "6.0.3",
43
43
  "lucide-react": "^0.562.0",
@@ -45,8 +45,8 @@
45
45
  "zod": "^4.1.13"
46
46
  },
47
47
  "devDependencies": {
48
- "@contractspec/tool.tsdown": "1.44.1",
49
- "@contractspec/tool.typescript": "1.44.1",
48
+ "@contractspec/tool.tsdown": "1.45.0",
49
+ "@contractspec/tool.typescript": "1.45.0",
50
50
  "@types/react": "^19.0.14",
51
51
  "tsdown": "^0.18.3",
52
52
  "typescript": "^5.9.3"