@framers/agentos 0.1.52 → 0.1.53

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 (98) hide show
  1. package/dist/api/AgentOS.d.ts +10 -10
  2. package/dist/api/AgentOS.d.ts.map +1 -1
  3. package/dist/channels/index.d.ts +2 -1
  4. package/dist/channels/index.d.ts.map +1 -1
  5. package/dist/channels/index.js +2 -1
  6. package/dist/channels/index.js.map +1 -1
  7. package/dist/core/agency/index.d.ts +1 -2
  8. package/dist/core/agency/index.d.ts.map +1 -1
  9. package/dist/core/agency/index.js +1 -2
  10. package/dist/core/agency/index.js.map +1 -1
  11. package/dist/core/agents/AgentCore.d.ts +8 -19
  12. package/dist/core/agents/AgentCore.d.ts.map +1 -1
  13. package/dist/core/agents/AgentCore.js +7 -15
  14. package/dist/core/agents/AgentCore.js.map +1 -1
  15. package/dist/core/agents/AgentFactory.d.ts +9 -13
  16. package/dist/core/agents/AgentFactory.d.ts.map +1 -1
  17. package/dist/core/agents/AgentFactory.js +9 -13
  18. package/dist/core/agents/AgentFactory.js.map +1 -1
  19. package/dist/core/audio/SilenceDetector.d.ts +5 -5
  20. package/dist/core/audio/SilenceDetector.js +5 -5
  21. package/dist/core/evaluation/index.d.ts +2 -2
  22. package/dist/core/evaluation/index.js +2 -2
  23. package/dist/core/hitl/index.d.ts +1 -2
  24. package/dist/core/hitl/index.d.ts.map +1 -1
  25. package/dist/core/hitl/index.js +1 -2
  26. package/dist/core/hitl/index.js.map +1 -1
  27. package/dist/core/index.d.ts +1 -1
  28. package/dist/core/index.js +1 -1
  29. package/dist/core/llm/IPromptEngine.d.ts +13 -8
  30. package/dist/core/llm/IPromptEngine.d.ts.map +1 -1
  31. package/dist/core/llm/IPromptEngine.js.map +1 -1
  32. package/dist/core/marketplace/index.d.ts +2 -2
  33. package/dist/core/marketplace/index.js +2 -2
  34. package/dist/core/observability/index.d.ts +2 -2
  35. package/dist/core/observability/index.js +2 -2
  36. package/dist/core/planning/index.d.ts +1 -2
  37. package/dist/core/planning/index.d.ts.map +1 -1
  38. package/dist/core/planning/index.js +1 -2
  39. package/dist/core/planning/index.js.map +1 -1
  40. package/dist/core/provenance/index.d.ts +2 -2
  41. package/dist/core/provenance/index.js +2 -2
  42. package/dist/core/safety/index.d.ts +3 -2
  43. package/dist/core/safety/index.d.ts.map +1 -1
  44. package/dist/core/safety/index.js +3 -2
  45. package/dist/core/safety/index.js.map +1 -1
  46. package/dist/core/sandbox/index.d.ts +2 -2
  47. package/dist/core/sandbox/index.js +2 -2
  48. package/dist/core/structured/index.d.ts +1 -2
  49. package/dist/core/structured/index.d.ts.map +1 -1
  50. package/dist/core/structured/index.js +1 -2
  51. package/dist/core/structured/index.js.map +1 -1
  52. package/dist/core/tools/index.d.ts +2 -1
  53. package/dist/core/tools/index.d.ts.map +1 -1
  54. package/dist/core/tools/index.js +2 -1
  55. package/dist/core/tools/index.js.map +1 -1
  56. package/dist/discovery/index.d.ts +2 -1
  57. package/dist/discovery/index.d.ts.map +1 -1
  58. package/dist/discovery/index.js +2 -1
  59. package/dist/discovery/index.js.map +1 -1
  60. package/dist/memory/index.d.ts +2 -1
  61. package/dist/memory/index.d.ts.map +1 -1
  62. package/dist/memory/index.js +2 -1
  63. package/dist/memory/index.js.map +1 -1
  64. package/dist/rag/audit/index.d.ts +5 -2
  65. package/dist/rag/audit/index.d.ts.map +1 -1
  66. package/dist/rag/audit/index.js +5 -2
  67. package/dist/rag/audit/index.js.map +1 -1
  68. package/dist/rag/implementations/vector_stores/InMemoryVectorStore.d.ts +1 -2
  69. package/dist/rag/implementations/vector_stores/InMemoryVectorStore.d.ts.map +1 -1
  70. package/dist/rag/implementations/vector_stores/InMemoryVectorStore.js +1 -2
  71. package/dist/rag/implementations/vector_stores/InMemoryVectorStore.js.map +1 -1
  72. package/dist/rag/reranking/index.d.ts +2 -2
  73. package/dist/rag/reranking/index.js +2 -2
  74. package/dist/rag/reranking/providers/index.d.ts +3 -2
  75. package/dist/rag/reranking/providers/index.d.ts.map +1 -1
  76. package/dist/rag/reranking/providers/index.js +3 -2
  77. package/dist/rag/reranking/providers/index.js.map +1 -1
  78. package/dist/social-posting/ContentAdaptationEngine.d.ts +148 -0
  79. package/dist/social-posting/ContentAdaptationEngine.d.ts.map +1 -0
  80. package/dist/social-posting/ContentAdaptationEngine.js +445 -0
  81. package/dist/social-posting/ContentAdaptationEngine.js.map +1 -0
  82. package/dist/social-posting/SocialAbstractService.d.ts +52 -0
  83. package/dist/social-posting/SocialAbstractService.d.ts.map +1 -0
  84. package/dist/social-posting/SocialAbstractService.js +127 -0
  85. package/dist/social-posting/SocialAbstractService.js.map +1 -0
  86. package/dist/social-posting/SocialPostManager.d.ts +252 -0
  87. package/dist/social-posting/SocialPostManager.d.ts.map +1 -0
  88. package/dist/social-posting/SocialPostManager.js +344 -0
  89. package/dist/social-posting/SocialPostManager.js.map +1 -0
  90. package/dist/social-posting/index.d.ts +12 -0
  91. package/dist/social-posting/index.d.ts.map +1 -0
  92. package/dist/social-posting/index.js +15 -0
  93. package/dist/social-posting/index.js.map +1 -0
  94. package/dist/voice/index.d.ts +2 -1
  95. package/dist/voice/index.d.ts.map +1 -1
  96. package/dist/voice/index.js +2 -1
  97. package/dist/voice/index.js.map +1 -1
  98. package/package.json +6 -3
@@ -0,0 +1,344 @@
1
+ /**
2
+ * @fileoverview Social Post Manager — post lifecycle engine.
3
+ * @module @framers/agentos/social-posting/SocialPostManager
4
+ *
5
+ * Manages the full lifecycle of social media posts through a state machine:
6
+ *
7
+ * DRAFT --> SCHEDULED --> PUBLISHING --> PUBLISHED
8
+ * |
9
+ * ERROR --> RETRY --> PUBLISHING
10
+ *
11
+ * Storage is in-memory (Map<string, SocialPost>). The backend module will
12
+ * layer on DB persistence via IStorageAdapter when this is wired into
13
+ * the NestJS service layer.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import { SocialPostManager } from '../social-posting/index.js';
18
+ *
19
+ * const manager = new SocialPostManager();
20
+ *
21
+ * const post = manager.createDraft({
22
+ * seedId: 'agent-alpha',
23
+ * content: 'Hello world!',
24
+ * platforms: ['twitter', 'bluesky'],
25
+ * });
26
+ *
27
+ * manager.schedulePost(post.id, '2026-03-05T12:00:00Z');
28
+ * ```
29
+ */
30
+ import { generateUUID } from '../utils/uuid.js';
31
+ // ============================================================================
32
+ // Constants
33
+ // ============================================================================
34
+ /** Default maximum number of retry attempts before a post is permanently failed. */
35
+ const DEFAULT_MAX_RETRIES = 3;
36
+ // ============================================================================
37
+ // Valid State Transitions
38
+ // ============================================================================
39
+ /**
40
+ * Allowed state transitions for the post lifecycle state machine.
41
+ * Each key maps to the set of states it may transition to.
42
+ */
43
+ const VALID_TRANSITIONS = {
44
+ draft: ['scheduled', 'publishing'],
45
+ scheduled: ['publishing'],
46
+ publishing: ['published', 'error'],
47
+ published: [],
48
+ error: ['retry'],
49
+ retry: ['publishing'],
50
+ };
51
+ // ============================================================================
52
+ // SocialPostManager
53
+ // ============================================================================
54
+ /**
55
+ * Manages the lifecycle of social media posts.
56
+ *
57
+ * Provides create, schedule, publish, retry, and query operations over an
58
+ * in-memory store. Platform-specific publishing is delegated to callers
59
+ * (typically the ToolExecutor / skill layer) via the {@link publishNow}
60
+ * callback mechanism.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * const manager = new SocialPostManager();
65
+ * const draft = manager.createDraft({
66
+ * seedId: 'my-agent',
67
+ * content: 'Big announcement!',
68
+ * platforms: ['twitter', 'linkedin'],
69
+ * });
70
+ *
71
+ * // Schedule for later
72
+ * manager.schedulePost(draft.id, '2026-03-10T15:00:00Z');
73
+ *
74
+ * // Or publish immediately
75
+ * await manager.publishNow(draft.id);
76
+ * ```
77
+ */
78
+ export class SocialPostManager {
79
+ constructor() {
80
+ /** In-memory post store keyed by post ID. */
81
+ this.posts = new Map();
82
+ }
83
+ // --------------------------------------------------------------------------
84
+ // Configuration
85
+ // --------------------------------------------------------------------------
86
+ /**
87
+ * Register a platform publish handler.
88
+ *
89
+ * The handler receives the full post and a single platform string and must
90
+ * return a {@link SocialPostPlatformResult}. It is called once per platform
91
+ * during {@link publishNow}.
92
+ *
93
+ * @param handler - Async function that publishes content to a platform
94
+ */
95
+ setPublishHandler(handler) {
96
+ this.publishHandler = handler;
97
+ }
98
+ // --------------------------------------------------------------------------
99
+ // Lifecycle Operations
100
+ // --------------------------------------------------------------------------
101
+ /**
102
+ * Create a new draft post.
103
+ *
104
+ * If `input.schedule` is provided, the post is automatically transitioned
105
+ * to 'scheduled' status.
106
+ *
107
+ * @param input - Draft creation parameters
108
+ * @returns The newly created SocialPost in 'draft' (or 'scheduled') status
109
+ */
110
+ createDraft(input) {
111
+ const now = new Date().toISOString();
112
+ const post = {
113
+ id: generateUUID(),
114
+ seedId: input.seedId,
115
+ baseContent: input.content,
116
+ adaptations: input.adaptations ?? {},
117
+ platforms: [...input.platforms],
118
+ mediaUrls: input.mediaUrls ? [...input.mediaUrls] : undefined,
119
+ scheduledAt: input.schedule,
120
+ status: input.schedule ? 'scheduled' : 'draft',
121
+ results: this.initPlatformResults(input.platforms),
122
+ retryCount: 0,
123
+ maxRetries: DEFAULT_MAX_RETRIES,
124
+ createdAt: now,
125
+ updatedAt: now,
126
+ };
127
+ this.posts.set(post.id, post);
128
+ return { ...post };
129
+ }
130
+ /**
131
+ * Schedule a draft post for future publishing.
132
+ *
133
+ * @param postId - ID of the post to schedule
134
+ * @param timestamp - ISO 8601 timestamp for desired publish time
135
+ * @returns The updated SocialPost in 'scheduled' status
136
+ * @throws {Error} If the post is not found or the transition is invalid
137
+ */
138
+ schedulePost(postId, timestamp) {
139
+ const post = this.requirePost(postId);
140
+ this.assertTransition(post.status, 'scheduled');
141
+ post.scheduledAt = timestamp;
142
+ post.status = 'scheduled';
143
+ post.updatedAt = new Date().toISOString();
144
+ return { ...post };
145
+ }
146
+ /**
147
+ * Publish a post immediately.
148
+ *
149
+ * Transitions the post to 'publishing' and, if a publish handler is
150
+ * registered, invokes it for each target platform. After all platform
151
+ * results are collected, the post is transitioned to either 'published'
152
+ * (all succeeded) or 'error' (any failure).
153
+ *
154
+ * If no publish handler is registered, the post remains in 'publishing'
155
+ * status with all platform results set to 'pending'.
156
+ *
157
+ * @param postId - ID of the post to publish
158
+ * @returns The updated SocialPost after publish attempts
159
+ * @throws {Error} If the post is not found or the transition is invalid
160
+ */
161
+ async publishNow(postId) {
162
+ const post = this.requirePost(postId);
163
+ this.assertTransition(post.status, 'publishing');
164
+ post.status = 'publishing';
165
+ post.updatedAt = new Date().toISOString();
166
+ if (!this.publishHandler) {
167
+ return { ...post };
168
+ }
169
+ // Publish to each platform concurrently
170
+ const platformResults = await Promise.allSettled(post.platforms.map(async (platform) => {
171
+ try {
172
+ const result = await this.publishHandler(post, platform);
173
+ post.results[platform] = result;
174
+ return result;
175
+ }
176
+ catch (err) {
177
+ const errorResult = {
178
+ platform,
179
+ status: 'error',
180
+ error: err instanceof Error ? err.message : String(err),
181
+ };
182
+ post.results[platform] = errorResult;
183
+ return errorResult;
184
+ }
185
+ }));
186
+ // Determine aggregate status
187
+ const allResults = Object.values(post.results);
188
+ const hasError = allResults.some((r) => r.status === 'error');
189
+ const allSuccess = allResults.every((r) => r.status === 'success');
190
+ if (allSuccess) {
191
+ post.status = 'published';
192
+ }
193
+ else if (hasError) {
194
+ post.status = 'error';
195
+ }
196
+ post.updatedAt = new Date().toISOString();
197
+ return { ...post };
198
+ }
199
+ /**
200
+ * Record a platform-specific publish result.
201
+ *
202
+ * Used by external publish handlers to report results asynchronously
203
+ * (e.g. webhook callbacks).
204
+ *
205
+ * @param postId - ID of the post
206
+ * @param platform - Platform identifier
207
+ * @param result - The platform result to record
208
+ * @returns The updated SocialPost
209
+ * @throws {Error} If the post is not found
210
+ */
211
+ markPlatformResult(postId, platform, result) {
212
+ const post = this.requirePost(postId);
213
+ post.results[platform] = result;
214
+ // Auto-transition based on aggregate results
215
+ const allResults = Object.values(post.results);
216
+ const allSuccess = allResults.every((r) => r.status === 'success');
217
+ const hasError = allResults.some((r) => r.status === 'error');
218
+ const hasPending = allResults.some((r) => r.status === 'pending');
219
+ if (allSuccess && !hasPending) {
220
+ post.status = 'published';
221
+ }
222
+ else if (hasError && !hasPending) {
223
+ post.status = 'error';
224
+ }
225
+ post.updatedAt = new Date().toISOString();
226
+ return { ...post };
227
+ }
228
+ /**
229
+ * Retry a failed post.
230
+ *
231
+ * Transitions the post from 'error' to 'retry', increments the retry
232
+ * counter, and resets failed platform results to 'pending'.
233
+ *
234
+ * @param postId - ID of the post to retry
235
+ * @returns The updated SocialPost in 'retry' status
236
+ * @throws {Error} If the post is not found, the transition is invalid,
237
+ * or the maximum retry count has been reached
238
+ */
239
+ retryFailed(postId) {
240
+ const post = this.requirePost(postId);
241
+ this.assertTransition(post.status, 'retry');
242
+ if (post.retryCount >= post.maxRetries) {
243
+ throw new Error(`Post ${postId} has exceeded maximum retries (${post.maxRetries})`);
244
+ }
245
+ post.status = 'retry';
246
+ post.retryCount += 1;
247
+ post.updatedAt = new Date().toISOString();
248
+ // Reset failed platform results to pending for re-attempt
249
+ for (const platform of post.platforms) {
250
+ if (post.results[platform]?.status === 'error') {
251
+ post.results[platform] = {
252
+ platform,
253
+ status: 'pending',
254
+ };
255
+ }
256
+ }
257
+ return { ...post };
258
+ }
259
+ // --------------------------------------------------------------------------
260
+ // Query Operations
261
+ // --------------------------------------------------------------------------
262
+ /**
263
+ * Retrieve a post by ID.
264
+ *
265
+ * @param postId - ID of the post to retrieve
266
+ * @returns The SocialPost if found, otherwise undefined
267
+ */
268
+ getPost(postId) {
269
+ const post = this.posts.get(postId);
270
+ return post ? { ...post } : undefined;
271
+ }
272
+ /**
273
+ * List posts with optional filtering by seed ID and/or status.
274
+ *
275
+ * @param seedId - Optional seed ID filter
276
+ * @param status - Optional status filter
277
+ * @returns Array of matching SocialPost objects
278
+ */
279
+ listPosts(seedId, status) {
280
+ const results = [];
281
+ for (const post of this.posts.values()) {
282
+ if (seedId && post.seedId !== seedId)
283
+ continue;
284
+ if (status && post.status !== status)
285
+ continue;
286
+ results.push({ ...post });
287
+ }
288
+ return results;
289
+ }
290
+ /**
291
+ * Get all scheduled posts whose scheduledAt timestamp has passed.
292
+ *
293
+ * Used by a polling loop or scheduler to find posts that are due for
294
+ * publishing.
295
+ *
296
+ * @returns Array of SocialPost objects that are due for publishing
297
+ */
298
+ getDuePosts() {
299
+ const now = new Date();
300
+ const results = [];
301
+ for (const post of this.posts.values()) {
302
+ if (post.status === 'scheduled' &&
303
+ post.scheduledAt &&
304
+ new Date(post.scheduledAt) <= now) {
305
+ results.push({ ...post });
306
+ }
307
+ }
308
+ return results;
309
+ }
310
+ // --------------------------------------------------------------------------
311
+ // Internal Helpers
312
+ // --------------------------------------------------------------------------
313
+ /**
314
+ * Retrieve a post or throw if not found.
315
+ */
316
+ requirePost(postId) {
317
+ const post = this.posts.get(postId);
318
+ if (!post) {
319
+ throw new Error(`Social post not found: ${postId}`);
320
+ }
321
+ return post;
322
+ }
323
+ /**
324
+ * Assert that a state transition is valid.
325
+ */
326
+ assertTransition(current, target) {
327
+ const allowed = VALID_TRANSITIONS[current];
328
+ if (!allowed || !allowed.includes(target)) {
329
+ throw new Error(`Invalid state transition: '${current}' --> '${target}'. ` +
330
+ `Allowed transitions from '${current}': [${(allowed ?? []).join(', ')}]`);
331
+ }
332
+ }
333
+ /**
334
+ * Initialize platform results with 'pending' status for each platform.
335
+ */
336
+ initPlatformResults(platforms) {
337
+ const results = {};
338
+ for (const platform of platforms) {
339
+ results[platform] = { platform, status: 'pending' };
340
+ }
341
+ return results;
342
+ }
343
+ }
344
+ //# sourceMappingURL=SocialPostManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocialPostManager.js","sourceRoot":"","sources":["../../src/social-posting/SocialPostManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA+F7C,+EAA+E;AAC/E,YAA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D,6BAA6B,OAAO,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACK,mBAAmB,CACzB,SAAmB;QAEnB,MAAM,OAAO,GAA6C,EAAE,CAAC;QAC7D,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACtD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Social Posting module barrel exports.
3
+ *
4
+ * @module @framers/agentos/social-posting
5
+ *
6
+ * Provides the post lifecycle engine ({@link SocialPostManager}) and
7
+ * platform-aware content adaptation ({@link ContentAdaptationEngine}).
8
+ */
9
+ export { SocialPostManager, type SocialPost, type SocialPostStatus, type SocialPostPlatformResult, type CreateDraftInput, } from './SocialPostManager';
10
+ export { ContentAdaptationEngine, type PlatformConstraints, type AdaptedContent, } from './ContentAdaptationEngine';
11
+ export { SocialAbstractService, type SocialRequestOptions, type SocialServiceConfig, } from './SocialAbstractService';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/social-posting/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Social Posting module barrel exports.
3
+ *
4
+ * @module @framers/agentos/social-posting
5
+ *
6
+ * Provides the post lifecycle engine ({@link SocialPostManager}) and
7
+ * platform-aware content adaptation ({@link ContentAdaptationEngine}).
8
+ */
9
+ // Post lifecycle state machine
10
+ export { SocialPostManager, } from './SocialPostManager.js';
11
+ // Platform-specific content adaptation
12
+ export { ContentAdaptationEngine, } from './ContentAdaptationEngine.js';
13
+ // Shared HTTP base class for channel service implementations
14
+ export { SocialAbstractService, } from './SocialAbstractService.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/social-posting/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+BAA+B;AAC/B,OAAO,EACL,iBAAiB,GAKlB,MAAM,qBAAqB,CAAC;AAE7B,uCAAuC;AACvC,OAAO,EACL,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC;AAEnC,6DAA6D;AAC7D,OAAO,EACL,qBAAqB,GAGtB,MAAM,yBAAyB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * @fileoverview Barrel exports for the AgentOS Voice Call System.
2
+ * Barrel exports for the AgentOS voice call system.
3
+ *
3
4
  * @module @framers/agentos/voice
4
5
  */
5
6
  export * from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/voice/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,YAAY,CAAC;AAC3B,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/voice/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAC3B,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,MAAM,sBAAsB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * @fileoverview Barrel exports for the AgentOS Voice Call System.
2
+ * Barrel exports for the AgentOS voice call system.
3
+ *
3
4
  * @module @framers/agentos/voice
4
5
  */
5
6
  export * from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/voice/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,YAAY,CAAC;AAU3B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/voice/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAU3B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,MAAM,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "Modular AgentOS orchestration library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -154,8 +154,11 @@
154
154
  "test": "vitest run",
155
155
  "dev:test": "vitest",
156
156
  "docs:clean": "rimraf docs/api ../../docs-generated/library ../../docs-generated/api",
157
- "docs": "npm run docs:clean && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json && pnpm --dir ../../ exec typedoc --options typedoc.json && pnpm --dir ../../ exec node scripts/generate-api-docs.js && pnpm --dir ../../ exec node apps/agentos.sh/scripts/copy-docs.js",
158
- "docs:watch": "npm run docs:clean && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json && pnpm --dir ../../ exec typedoc --options typedoc.json && pnpm --dir ../../ exec node scripts/generate-api-docs.js && concurrently \"pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json --watch\" \"pnpm --dir ../../ exec typedoc --options typedoc.json --watch\" \"pnpm --dir ../../ exec node apps/agentos.sh/scripts/copy-docs.js --watch\""
157
+ "docs:library": "npm run docs:clean && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.modules.json && node scripts/generate-doc-search-index.mjs && pnpm --dir ../../ exec node apps/agentos.sh/scripts/copy-docs.js",
158
+ "docs:site-api": "pnpm --dir ../../ exec typedoc --options typedoc.json && pnpm --dir ../../ exec node scripts/generate-api-docs.js",
159
+ "docs": "npm run docs:library",
160
+ "docs:full": "npm run docs:library && npm run docs:site-api",
161
+ "docs:watch": "npm run docs:clean && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json && pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.modules.json && node scripts/generate-doc-search-index.mjs && pnpm --dir ../../ exec node apps/agentos.sh/scripts/copy-docs.js && concurrently \"pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.json --watch\" \"pnpm --dir ../../ exec typedoc --options packages/agentos/typedoc.modules.json --watch\" \"node scripts/generate-doc-search-index.mjs --watch\" \"pnpm --dir ../../ exec node apps/agentos.sh/scripts/copy-docs.js --watch\""
159
162
  },
160
163
  "keywords": [
161
164
  "agentos",