@agentshouse/mdruntime 0.1.0-alpha.2 → 0.1.0-alpha.21

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.
Files changed (110) hide show
  1. package/AGENTS.md +87 -0
  2. package/dist/adapter.d.ts +145 -28
  3. package/dist/adapter.d.ts.map +1 -1
  4. package/dist/adapter.js +2 -1
  5. package/dist/adapter.js.map +1 -1
  6. package/dist/bootstrap.d.ts +11 -13
  7. package/dist/bootstrap.d.ts.map +1 -1
  8. package/dist/bootstrap.js +25 -24
  9. package/dist/bootstrap.js.map +1 -1
  10. package/dist/change-set.d.ts +33 -0
  11. package/dist/change-set.d.ts.map +1 -0
  12. package/dist/change-set.js +74 -0
  13. package/dist/change-set.js.map +1 -0
  14. package/dist/change.d.ts +70 -0
  15. package/dist/change.d.ts.map +1 -0
  16. package/dist/change.js +12 -0
  17. package/dist/change.js.map +1 -0
  18. package/dist/client.d.ts +66 -0
  19. package/dist/client.d.ts.map +1 -0
  20. package/dist/client.js +229 -0
  21. package/dist/client.js.map +1 -0
  22. package/dist/collection.d.ts +25 -3
  23. package/dist/collection.d.ts.map +1 -1
  24. package/dist/collection.js +97 -25
  25. package/dist/collection.js.map +1 -1
  26. package/dist/connection.d.ts +87 -5
  27. package/dist/connection.d.ts.map +1 -1
  28. package/dist/connection.js +1653 -70
  29. package/dist/connection.js.map +1 -1
  30. package/dist/conversation.d.ts +57 -0
  31. package/dist/conversation.d.ts.map +1 -0
  32. package/dist/conversation.js +404 -0
  33. package/dist/conversation.js.map +1 -0
  34. package/dist/durability.d.ts +9 -0
  35. package/dist/durability.d.ts.map +1 -0
  36. package/dist/durability.js +11 -0
  37. package/dist/durability.js.map +1 -0
  38. package/dist/file.d.ts +20 -0
  39. package/dist/file.d.ts.map +1 -0
  40. package/dist/file.js +149 -0
  41. package/dist/file.js.map +1 -0
  42. package/dist/host.d.ts +13 -0
  43. package/dist/host.d.ts.map +1 -0
  44. package/dist/host.js +229 -0
  45. package/dist/host.js.map +1 -0
  46. package/dist/identity.d.ts +2 -0
  47. package/dist/identity.d.ts.map +1 -0
  48. package/dist/identity.js +16 -0
  49. package/dist/identity.js.map +1 -0
  50. package/dist/index.d.ts +13 -2
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +1 -0
  53. package/dist/index.js.map +1 -1
  54. package/dist/log.d.ts +5 -0
  55. package/dist/log.d.ts.map +1 -0
  56. package/dist/log.js +15 -0
  57. package/dist/log.js.map +1 -0
  58. package/dist/memory.d.ts +17 -2
  59. package/dist/memory.d.ts.map +1 -1
  60. package/dist/memory.js +264 -21
  61. package/dist/memory.js.map +1 -1
  62. package/dist/model.d.ts +70 -0
  63. package/dist/model.d.ts.map +1 -0
  64. package/dist/model.js +28 -0
  65. package/dist/model.js.map +1 -0
  66. package/dist/outcome.d.ts +37 -0
  67. package/dist/outcome.d.ts.map +1 -0
  68. package/dist/outcome.js +23 -0
  69. package/dist/outcome.js.map +1 -0
  70. package/dist/overlay.d.ts +10 -0
  71. package/dist/overlay.d.ts.map +1 -0
  72. package/dist/overlay.js +245 -0
  73. package/dist/overlay.js.map +1 -0
  74. package/dist/paths.d.ts +6 -0
  75. package/dist/paths.d.ts.map +1 -0
  76. package/dist/paths.js +47 -0
  77. package/dist/paths.js.map +1 -0
  78. package/dist/query.d.ts +13 -0
  79. package/dist/query.d.ts.map +1 -0
  80. package/dist/query.js +18 -0
  81. package/dist/query.js.map +1 -0
  82. package/dist/refresh.d.ts +14 -0
  83. package/dist/refresh.d.ts.map +1 -0
  84. package/dist/refresh.js +65 -0
  85. package/dist/refresh.js.map +1 -0
  86. package/dist/replica.d.ts +33 -0
  87. package/dist/replica.d.ts.map +1 -0
  88. package/dist/replica.js +134 -0
  89. package/dist/replica.js.map +1 -0
  90. package/dist/save.d.ts +35 -0
  91. package/dist/save.d.ts.map +1 -0
  92. package/dist/save.js +561 -0
  93. package/dist/save.js.map +1 -0
  94. package/dist/status.d.ts +25 -0
  95. package/dist/status.d.ts.map +1 -0
  96. package/dist/status.js +32 -0
  97. package/dist/status.js.map +1 -0
  98. package/dist/store.d.ts +86 -4
  99. package/dist/store.d.ts.map +1 -1
  100. package/dist/store.js +394 -9
  101. package/dist/store.js.map +1 -1
  102. package/dist/transfer.d.ts +5 -0
  103. package/dist/transfer.d.ts.map +1 -0
  104. package/dist/transfer.js +5 -0
  105. package/dist/transfer.js.map +1 -0
  106. package/dist/wire.d.ts +63 -0
  107. package/dist/wire.d.ts.map +1 -0
  108. package/dist/wire.js +142 -0
  109. package/dist/wire.js.map +1 -0
  110. package/package.json +13 -4
@@ -0,0 +1,5 @@
1
+ export type Unconfirmed = {
2
+ kind: 'unconfirmed';
3
+ };
4
+ export declare const unconfirmed: Unconfirmed;
5
+ //# sourceMappingURL=transfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../src/transfer.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAElD,eAAO,MAAM,WAAW,EAAE,WAAqC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const unconfirmed = {
2
+ kind: 'unconfirmed'
3
+ };
4
+
5
+ //# sourceMappingURL=transfer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/workspace/packages/mdruntime/src/transfer.ts"],"sourcesContent":["export type Unconfirmed = { kind: 'unconfirmed' };\n\nexport const unconfirmed: Unconfirmed = { kind: 'unconfirmed' };\n"],"names":["unconfirmed","kind"],"mappings":"AAEA,OAAO,MAAMA,cAA2B;IAAEC,MAAM;AAAc,EAAE"}
package/dist/wire.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ import type { ConnectionRefusal } from './connection.js';
2
+ export declare const RUNTIME_WIRE_PROTOCOL = 2;
3
+ export declare const PROTOCOL_MISMATCH: ConnectionRefusal;
4
+ export type RuntimePort = {
5
+ postMessage(message: unknown): void;
6
+ addEventListener(type: 'message' | 'close', listener: (event: {
7
+ data?: unknown;
8
+ }) => void): void;
9
+ start(): void;
10
+ };
11
+ declare const MEMBERS: readonly ['rooms', 'slots', 'query', 'types', 'syncStatus', 'save', 'outcome', 'history', 'call', 'log', 'storageLoss', 'persistence', 'deploymentFacts', 'reauthorize', 'draft.list', 'draft.read', 'draft.replace', 'draft.discard', 'queue.discard', 'presentation.read', 'presentation.write', 'conversation.list', 'conversation.read', 'conversation.older', 'conversation.compose', 'conversation.discard', 'conversation.create', 'conversation.send', 'conversation.answer', 'conversation.interrupt', 'conversation.kill', 'conversation.cancel', 'conversation.delete'];
12
+ declare const TOPICS: readonly ['rooms', 'connection-refusal', 'storage-loss', 'deployment-facts', 'sync-status', 'query', 'queue', 'drafts', 'presentation', 'conversation'];
13
+ export type WireMember = (typeof MEMBERS)[number];
14
+ export type WireTopic = (typeof TOPICS)[number];
15
+ export type WireRequest = {
16
+ kind: 'hello';
17
+ } | {
18
+ kind: 'call';
19
+ id: number;
20
+ member: WireMember;
21
+ input: readonly unknown[];
22
+ } | {
23
+ kind: 'observe';
24
+ id: number;
25
+ topic: WireTopic;
26
+ input: readonly unknown[];
27
+ } | {
28
+ kind: 'stop';
29
+ id: number;
30
+ };
31
+ export type WireAnswer = {
32
+ kind: 'result';
33
+ id: number;
34
+ value: unknown;
35
+ } | {
36
+ kind: 'failure';
37
+ id: number;
38
+ message: string;
39
+ } | {
40
+ kind: 'event';
41
+ id: number;
42
+ value: unknown;
43
+ } | {
44
+ kind: 'refusal';
45
+ refusal: ConnectionRefusal;
46
+ } | {
47
+ kind: 'ended';
48
+ };
49
+ export declare const AUTHORIZATION_ENDED = "the host authorization ended";
50
+ export type WireEnvelope = {
51
+ mdRuntime: number;
52
+ message: WireRequest | WireAnswer;
53
+ };
54
+ export type Carried = {
55
+ matching: boolean;
56
+ message: unknown;
57
+ };
58
+ export declare function envelope(message: WireRequest | WireAnswer): WireEnvelope;
59
+ export declare function carried(data: unknown): Carried | null;
60
+ export declare function request(message: unknown): WireRequest | null;
61
+ export declare function answer(message: unknown): WireAnswer | null;
62
+ export {};
63
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,iBAAiB,EAAE,iBAI/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,GAAG,IAAI,CAAC;IACjG,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,OAAO,YACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,MAAM,EACN,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,CACb,CAAC;AAEX,QAAA,MAAM,MAAM,YACV,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,CACN,CAAC;AAEX,MAAM,MAA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AAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,GAAG,YAAY,CAExE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIrD;AAQD,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CAyB5D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAe1D"}
package/dist/wire.js ADDED
@@ -0,0 +1,142 @@
1
+ export const RUNTIME_WIRE_PROTOCOL = 2;
2
+ export const PROTOCOL_MISMATCH = {
3
+ reason: 'client-host-protocol-mismatch',
4
+ reauthorizationOffered: false,
5
+ refusal: null
6
+ };
7
+ const MEMBERS = [
8
+ 'rooms',
9
+ 'slots',
10
+ 'query',
11
+ 'types',
12
+ 'syncStatus',
13
+ 'save',
14
+ 'outcome',
15
+ 'history',
16
+ 'call',
17
+ 'log',
18
+ 'storageLoss',
19
+ 'persistence',
20
+ 'deploymentFacts',
21
+ 'reauthorize',
22
+ 'draft.list',
23
+ 'draft.read',
24
+ 'draft.replace',
25
+ 'draft.discard',
26
+ 'queue.discard',
27
+ 'presentation.read',
28
+ 'presentation.write',
29
+ 'conversation.list',
30
+ 'conversation.read',
31
+ 'conversation.older',
32
+ 'conversation.compose',
33
+ 'conversation.discard',
34
+ 'conversation.create',
35
+ 'conversation.send',
36
+ 'conversation.answer',
37
+ 'conversation.interrupt',
38
+ 'conversation.kill',
39
+ 'conversation.cancel',
40
+ 'conversation.delete'
41
+ ];
42
+ const TOPICS = [
43
+ 'rooms',
44
+ 'connection-refusal',
45
+ 'storage-loss',
46
+ 'deployment-facts',
47
+ 'sync-status',
48
+ 'query',
49
+ 'queue',
50
+ 'drafts',
51
+ 'presentation',
52
+ 'conversation'
53
+ ];
54
+ export const AUTHORIZATION_ENDED = 'the host authorization ended';
55
+ export function envelope(message) {
56
+ return {
57
+ mdRuntime: RUNTIME_WIRE_PROTOCOL,
58
+ message
59
+ };
60
+ }
61
+ export function carried(data) {
62
+ if (typeof data !== 'object' || data === null || !('mdRuntime' in data)) return null;
63
+ const record = data;
64
+ return {
65
+ matching: record.mdRuntime === RUNTIME_WIRE_PROTOCOL,
66
+ message: record.message
67
+ };
68
+ }
69
+ function body(message) {
70
+ if (typeof message !== 'object' || message === null) return null;
71
+ const record = message;
72
+ return {
73
+ kind: record.kind,
74
+ id: record.id
75
+ };
76
+ }
77
+ export function request(message) {
78
+ const shape = body(message);
79
+ if (shape === null) return null;
80
+ if (shape.kind === 'hello') return {
81
+ kind: 'hello'
82
+ };
83
+ if (typeof shape.id !== 'number') return null;
84
+ const record = message;
85
+ if (shape.kind === 'stop') return {
86
+ kind: 'stop',
87
+ id: shape.id
88
+ };
89
+ if (!Array.isArray(record.input)) return null;
90
+ if (shape.kind === 'call' && MEMBERS.includes(record.member)) {
91
+ return {
92
+ kind: 'call',
93
+ id: shape.id,
94
+ member: record.member,
95
+ input: record.input
96
+ };
97
+ }
98
+ if (shape.kind === 'observe' && TOPICS.includes(record.topic)) {
99
+ return {
100
+ kind: 'observe',
101
+ id: shape.id,
102
+ topic: record.topic,
103
+ input: record.input
104
+ };
105
+ }
106
+ return null;
107
+ }
108
+ export function answer(message) {
109
+ const shape = body(message);
110
+ if (shape === null) return null;
111
+ const record = message;
112
+ if (shape.kind === 'refusal') {
113
+ return {
114
+ kind: 'refusal',
115
+ refusal: record.refusal
116
+ };
117
+ }
118
+ if (shape.kind === 'ended') return {
119
+ kind: 'ended'
120
+ };
121
+ if (typeof shape.id !== 'number') return null;
122
+ if (shape.kind === 'result') return {
123
+ kind: 'result',
124
+ id: shape.id,
125
+ value: record.value
126
+ };
127
+ if (shape.kind === 'event') return {
128
+ kind: 'event',
129
+ id: shape.id,
130
+ value: record.value
131
+ };
132
+ if (shape.kind === 'failure' && typeof record.message === 'string') {
133
+ return {
134
+ kind: 'failure',
135
+ id: shape.id,
136
+ message: record.message
137
+ };
138
+ }
139
+ return null;
140
+ }
141
+
142
+ //# sourceMappingURL=wire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/workspace/packages/mdruntime/src/wire.ts"],"sourcesContent":["import type { ConnectionRefusal } from './connection.js';\n\nexport const RUNTIME_WIRE_PROTOCOL = 2;\n\nexport const PROTOCOL_MISMATCH: ConnectionRefusal = {\n reason: 'client-host-protocol-mismatch',\n reauthorizationOffered: false,\n refusal: null,\n};\n\nexport type RuntimePort = {\n postMessage(message: unknown): void;\n addEventListener(type: 'message' | 'close', listener: (event: { data?: unknown }) => void): void;\n start(): void;\n};\n\nconst MEMBERS = [\n 'rooms',\n 'slots',\n 'query',\n 'types',\n 'syncStatus',\n 'save',\n 'outcome',\n 'history',\n 'call',\n 'log',\n 'storageLoss',\n 'persistence',\n 'deploymentFacts',\n 'reauthorize',\n 'draft.list',\n 'draft.read',\n 'draft.replace',\n 'draft.discard',\n 'queue.discard',\n 'presentation.read',\n 'presentation.write',\n 'conversation.list',\n 'conversation.read',\n 'conversation.older',\n 'conversation.compose',\n 'conversation.discard',\n 'conversation.create',\n 'conversation.send',\n 'conversation.answer',\n 'conversation.interrupt',\n 'conversation.kill',\n 'conversation.cancel',\n 'conversation.delete',\n] as const;\n\nconst TOPICS = [\n 'rooms',\n 'connection-refusal',\n 'storage-loss',\n 'deployment-facts',\n 'sync-status',\n 'query',\n 'queue',\n 'drafts',\n 'presentation',\n 'conversation',\n] as const;\n\nexport type WireMember = (typeof MEMBERS)[number];\nexport type WireTopic = (typeof TOPICS)[number];\n\nexport type WireRequest =\n | { kind: 'hello' }\n | { kind: 'call'; id: number; member: WireMember; input: readonly unknown[] }\n | { kind: 'observe'; id: number; topic: WireTopic; input: readonly unknown[] }\n | { kind: 'stop'; id: number };\n\nexport type WireAnswer =\n | { kind: 'result'; id: number; value: unknown }\n | { kind: 'failure'; id: number; message: string }\n | { kind: 'event'; id: number; value: unknown }\n | { kind: 'refusal'; refusal: ConnectionRefusal }\n | { kind: 'ended' };\n\nexport const AUTHORIZATION_ENDED = 'the host authorization ended';\n\nexport type WireEnvelope = { mdRuntime: number; message: WireRequest | WireAnswer };\n\nexport type Carried = { matching: boolean; message: unknown };\n\nexport function envelope(message: WireRequest | WireAnswer): WireEnvelope {\n return { mdRuntime: RUNTIME_WIRE_PROTOCOL, message };\n}\n\nexport function carried(data: unknown): Carried | null {\n if (typeof data !== 'object' || data === null || !('mdRuntime' in data)) return null;\n const record = data as { mdRuntime: unknown; message?: unknown };\n return { matching: record.mdRuntime === RUNTIME_WIRE_PROTOCOL, message: record.message };\n}\n\nfunction body(message: unknown): { kind: unknown; id: unknown } | null {\n if (typeof message !== 'object' || message === null) return null;\n const record = message as { kind?: unknown; id?: unknown };\n return { kind: record.kind, id: record.id };\n}\n\nexport function request(message: unknown): WireRequest | null {\n const shape = body(message);\n if (shape === null) return null;\n if (shape.kind === 'hello') return { kind: 'hello' };\n if (typeof shape.id !== 'number') return null;\n const record = message as { input?: unknown; member?: unknown; topic?: unknown };\n if (shape.kind === 'stop') return { kind: 'stop', id: shape.id };\n if (!Array.isArray(record.input)) return null;\n if (shape.kind === 'call' && MEMBERS.includes(record.member as WireMember)) {\n return {\n kind: 'call',\n id: shape.id,\n member: record.member as WireMember,\n input: record.input as readonly unknown[],\n };\n }\n if (shape.kind === 'observe' && TOPICS.includes(record.topic as WireTopic)) {\n return {\n kind: 'observe',\n id: shape.id,\n topic: record.topic as WireTopic,\n input: record.input as readonly unknown[],\n };\n }\n return null;\n}\n\nexport function answer(message: unknown): WireAnswer | null {\n const shape = body(message);\n if (shape === null) return null;\n const record = message as { value?: unknown; message?: unknown; refusal?: unknown };\n if (shape.kind === 'refusal') {\n return { kind: 'refusal', refusal: record.refusal as ConnectionRefusal };\n }\n if (shape.kind === 'ended') return { kind: 'ended' };\n if (typeof shape.id !== 'number') return null;\n if (shape.kind === 'result') return { kind: 'result', id: shape.id, value: record.value };\n if (shape.kind === 'event') return { kind: 'event', id: shape.id, value: record.value };\n if (shape.kind === 'failure' && typeof record.message === 'string') {\n return { kind: 'failure', id: shape.id, message: record.message };\n }\n return null;\n}\n"],"names":["RUNTIME_WIRE_PROTOCOL","PROTOCOL_MISMATCH","reason","reauthorizationOffered","refusal","MEMBERS","TOPICS","AUTHORIZATION_ENDED","envelope","message","mdRuntime","carried","data","record","matching","body","kind","id","request","shape","Array","isArray","input","includes","member","topic","answer","value"],"mappings":"AAEA,OAAO,MAAMA,wBAAwB,EAAE;AAEvC,OAAO,MAAMC,oBAAuC;IAClDC,QAAQ;IACRC,wBAAwB;IACxBC,SAAS;AACX,EAAE;AAQF,MAAMC,UAAU;IACd;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAMC,SAAS;IACb;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAkBD,OAAO,MAAMC,sBAAsB,+BAA+B;AAMlE,OAAO,SAASC,SAASC,OAAiC;IACxD,OAAO;QAAEC,WAAWV;QAAuBS;IAAQ;AACrD;AAEA,OAAO,SAASE,QAAQC,IAAa;IACnC,IAAI,OAAOA,SAAS,YAAYA,SAAS,QAAQ,CAAE,CAAA,eAAeA,IAAG,GAAI,OAAO;IAChF,MAAMC,SAASD;IACf,OAAO;QAAEE,UAAUD,OAAOH,SAAS,KAAKV;QAAuBS,SAASI,OAAOJ,OAAO;IAAC;AACzF;AAEA,SAASM,KAAKN,OAAgB;IAC5B,IAAI,OAAOA,YAAY,YAAYA,YAAY,MAAM,OAAO;IAC5D,MAAMI,SAASJ;IACf,OAAO;QAAEO,MAAMH,OAAOG,IAAI;QAAEC,IAAIJ,OAAOI,EAAE;IAAC;AAC5C;AAEA,OAAO,SAASC,Q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C;IACxF,IAAIR,MAAMH,IAAI,KAAK,SAAS,OAAO;QAAEA,MAAM;QAASC,IAAIE,MAAMF,EAAE;QAAEU,OAAOd,OAAOc,KAAK;IAAC;IACtF,IAAIR,MAAMH,IAAI,KAAK,aAAa,OAAOH,OAAOJ,OAAO,KAAK,UAAU;QAClE,OAAO;YAAEO,MAAM;YAAWC,IAAIE,MAAMF,EAAE;YAAER,SAASI,OAAOJ,OAAO;QAAC;IAClE;IACA,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdruntime",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.21",
4
4
  "description": "The headless core of MD App",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,13 +9,21 @@
9
9
  "access": "public"
10
10
  },
11
11
  "engines": {
12
- "node": ">=24.20.0"
12
+ "node": ">=24.21.0"
13
13
  },
14
14
  "exports": {
15
15
  ".": {
16
16
  "types": "./dist/index.d.ts",
17
17
  "import": "./dist/index.js"
18
18
  },
19
+ "./host": {
20
+ "types": "./dist/host.d.ts",
21
+ "import": "./dist/host.js"
22
+ },
23
+ "./client": {
24
+ "types": "./dist/client.d.ts",
25
+ "import": "./dist/client.js"
26
+ },
19
27
  "./memory": {
20
28
  "types": "./dist/memory.d.ts",
21
29
  "import": "./dist/memory.js"
@@ -24,6 +32,7 @@
24
32
  },
25
33
  "files": [
26
34
  "dist",
35
+ "AGENTS.md",
27
36
  "LICENSE"
28
37
  ],
29
38
  "repository": {
@@ -36,7 +45,7 @@
36
45
  "url": "https://github.com/agentshouse/mdruntime/issues"
37
46
  },
38
47
  "dependencies": {
39
- "@agentshouse/mdmodel": "0.1.0-alpha.3",
40
- "@agentshouse/query": "0.1.0-alpha.1"
48
+ "@agentshouse/mdmodel": "0.1.0-alpha.13",
49
+ "@agentshouse/query": "0.1.0-alpha.11"
41
50
  }
42
51
  }