@ai-matrx/api 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -1
- package/dist/account.d.cts +2 -2
- package/dist/account.d.ts +2 -2
- package/dist/agents.cjs +11 -11
- package/dist/agents.d.cts +2 -2
- package/dist/agents.d.ts +2 -2
- package/dist/agents.js +1 -1
- package/dist/ai.cjs +2 -2
- package/dist/ai.d.cts +2 -2
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +1 -1
- package/dist/apps.cjs +5 -5
- package/dist/apps.d.cts +2 -2
- package/dist/apps.d.ts +2 -2
- package/dist/apps.js +1 -1
- package/dist/architecture.cjs +24 -12
- package/dist/architecture.d.cts +43 -3
- package/dist/architecture.d.ts +43 -3
- package/dist/architecture.js +12 -2
- package/dist/audio.cjs +39 -39
- package/dist/audio.d.cts +2 -2
- package/dist/audio.d.ts +2 -2
- package/dist/audio.js +2 -2
- package/dist/chat.cjs +11 -11
- package/dist/chat.d.cts +4 -2
- package/dist/chat.d.ts +4 -2
- package/dist/chat.js +1 -1
- package/dist/{chunk-OVQM6CSX.cjs → chunk-BI6C3CD7.cjs} +3 -3
- package/dist/{chunk-MFZXWYK6.js → chunk-BIHYNQOU.js} +1 -1
- package/dist/{chunk-BHSHMV22.cjs → chunk-G3OJBGCU.cjs} +1 -1
- package/dist/{chunk-6GYZDL2H.js → chunk-IAB7JCVA.js} +1 -1
- package/dist/{chunk-MKN4EXSQ.cjs → chunk-Q6BD7FVP.cjs} +37 -37
- package/dist/{chunk-OWI6FDHV.js → chunk-QCDALTHR.js} +1 -1
- package/dist/{chunk-76S6F7O3.cjs → chunk-VGXUUEFE.cjs} +4 -4
- package/dist/{chunk-G6FXF44G.js → chunk-Z2UOMPC4.js} +1 -1
- package/dist/code.cjs +6 -6
- package/dist/code.d.cts +2 -2
- package/dist/code.d.ts +2 -2
- package/dist/code.js +1 -1
- package/dist/commerce.d.cts +2 -2
- package/dist/commerce.d.ts +2 -2
- package/dist/communications.cjs +4 -4
- package/dist/communications.d.cts +2 -2
- package/dist/communications.d.ts +2 -2
- package/dist/communications.js +1 -1
- package/dist/computer.cjs +4 -4
- package/dist/computer.d.cts +2 -2
- package/dist/computer.d.ts +2 -2
- package/dist/computer.js +1 -1
- package/dist/content.cjs +4 -4
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +1 -1
- package/dist/crm.cjs +2 -2
- package/dist/crm.d.cts +2 -2
- package/dist/crm.d.ts +2 -2
- package/dist/crm.js +1 -1
- package/dist/data.cjs +10 -4
- package/dist/data.d.cts +49 -3
- package/dist/data.d.ts +49 -3
- package/dist/data.js +7 -2
- package/dist/education.cjs +4 -4
- package/dist/education.d.cts +2 -2
- package/dist/education.d.ts +2 -2
- package/dist/education.js +1 -1
- package/dist/files.cjs +228 -228
- package/dist/files.d.cts +2 -2
- package/dist/files.d.ts +2 -2
- package/dist/files.js +2 -2
- package/dist/human-resources.d.cts +2 -2
- package/dist/human-resources.d.ts +2 -2
- package/dist/{index-DseWSnYe.d.cts → index-DyDNKgdB.d.cts} +2 -2
- package/dist/{index-DseWSnYe.d.ts → index-DyDNKgdB.d.ts} +2 -2
- package/dist/index.cjs +58 -58
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/integrations.cjs +5 -5
- package/dist/integrations.d.cts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.js +1 -1
- package/dist/intelligence.cjs +6 -6
- package/dist/intelligence.d.cts +2 -2
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +1 -1
- package/dist/knowledge.cjs +42 -42
- package/dist/knowledge.d.cts +2 -2
- package/dist/knowledge.d.ts +2 -2
- package/dist/knowledge.js +1 -1
- package/dist/legal.cjs +6 -6
- package/dist/legal.d.cts +2 -2
- package/dist/legal.d.ts +2 -2
- package/dist/legal.js +1 -1
- package/dist/marketing.cjs +78 -78
- package/dist/marketing.d.cts +2 -2
- package/dist/marketing.d.ts +2 -2
- package/dist/marketing.js +1 -1
- package/dist/masterwork.cjs +32 -32
- package/dist/masterwork.d.cts +2 -2
- package/dist/masterwork.d.ts +2 -2
- package/dist/masterwork.js +1 -1
- package/dist/media.cjs +11 -11
- package/dist/media.d.cts +2 -2
- package/dist/media.d.ts +2 -2
- package/dist/media.js +1 -1
- package/dist/platform.cjs +27 -27
- package/dist/platform.d.cts +2 -2
- package/dist/platform.d.ts +2 -2
- package/dist/platform.js +2 -2
- package/dist/publish.cjs +7 -7
- package/dist/publish.d.cts +2 -2
- package/dist/publish.d.ts +2 -2
- package/dist/publish.js +1 -1
- package/dist/recording.cjs +17 -17
- package/dist/recording.js +4 -4
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/stream.cjs +10 -10
- package/dist/stream.d.cts +1 -1
- package/dist/stream.d.ts +1 -1
- package/dist/stream.js +1 -1
- package/dist/types.d.cts +107 -5
- package/dist/types.d.ts +107 -5
- package/dist/web.cjs +26 -26
- package/dist/web.d.cts +2 -2
- package/dist/web.d.ts +2 -2
- package/dist/web.js +1 -1
- package/dist/workflows.cjs +19 -13
- package/dist/workflows.d.cts +33 -3
- package/dist/workflows.d.ts +33 -3
- package/dist/workflows.js +7 -2
- package/knob-declaration.json +12 -0
- package/package.json +4 -3
package/dist/recording.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkBI6C3CD7_cjs = require('./chunk-BI6C3CD7.cjs');
|
|
4
|
+
var chunkQ6BD7FVP_cjs = require('./chunk-Q6BD7FVP.cjs');
|
|
5
|
+
var chunkVGXUUEFE_cjs = require('./chunk-VGXUUEFE.cjs');
|
|
6
|
+
var chunkG3OJBGCU_cjs = require('./chunk-G3OJBGCU.cjs');
|
|
7
7
|
require('./chunk-2SXAAKGV.cjs');
|
|
8
8
|
|
|
9
9
|
// src/recording.ts
|
|
@@ -22,7 +22,7 @@ var MatrxAudioClient = class {
|
|
|
22
22
|
this.#getOrganizationId = options.getOrganizationId;
|
|
23
23
|
this.#requestTimeoutMs = options.requestTimeoutMs ?? 3e4;
|
|
24
24
|
this.#journalFolder = options.journalFolder ?? "Transcripts/Browser Audio";
|
|
25
|
-
this.#api =
|
|
25
|
+
this.#api = chunkG3OJBGCU_cjs.createApi({
|
|
26
26
|
credentials: async () => {
|
|
27
27
|
const accessToken = await this.#getAccessToken();
|
|
28
28
|
return accessToken ? { kind: "user", accessToken } : null;
|
|
@@ -44,7 +44,7 @@ var MatrxAudioClient = class {
|
|
|
44
44
|
if (this.#organizationToken !== token || !this.#organizationPromise) {
|
|
45
45
|
this.#organizationToken = token;
|
|
46
46
|
const organizationPromise = (async () => {
|
|
47
|
-
const identity = await
|
|
47
|
+
const identity = await chunkBI6C3CD7_cjs.whoami(this.#api);
|
|
48
48
|
if (!identity.authenticated || !identity.organization_id) {
|
|
49
49
|
throw new Error(
|
|
50
50
|
"Audio recovery requires an authenticated organization scope."
|
|
@@ -72,7 +72,7 @@ var MatrxAudioClient = class {
|
|
|
72
72
|
async transcribe(file, signal) {
|
|
73
73
|
const form = new FormData();
|
|
74
74
|
form.append("file", file);
|
|
75
|
-
const result = await
|
|
75
|
+
const result = await chunkVGXUUEFE_cjs.transcribeUpload(
|
|
76
76
|
this.#api,
|
|
77
77
|
{ body: form },
|
|
78
78
|
await this.#call(signal)
|
|
@@ -92,7 +92,7 @@ var MatrxAudioClient = class {
|
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
this.#fullAudioUploads.set(recordingId, uploaded);
|
|
95
|
-
const result = await
|
|
95
|
+
const result = await chunkVGXUUEFE_cjs.transcribeFile(
|
|
96
96
|
this.#api,
|
|
97
97
|
{ body: { file_id: uploaded.file_id } },
|
|
98
98
|
await this.#call(options?.signal)
|
|
@@ -107,7 +107,7 @@ var MatrxAudioClient = class {
|
|
|
107
107
|
form.append("shown_to", "only_me");
|
|
108
108
|
form.append("visibility", "personal");
|
|
109
109
|
form.append("metadata_json", JSON.stringify({ origin: "transcripts", ...metadata }));
|
|
110
|
-
return
|
|
110
|
+
return chunkQ6BD7FVP_cjs.uploadFile(this.#api, { body: form }, await this.#call());
|
|
111
111
|
}
|
|
112
112
|
async journalChunk(input) {
|
|
113
113
|
const index = String(input.chunkIndex).padStart(4, "0");
|
|
@@ -123,7 +123,7 @@ var MatrxAudioClient = class {
|
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
try {
|
|
126
|
-
const journal = await
|
|
126
|
+
const journal = await chunkVGXUUEFE_cjs.createRecordingJournalChunk(
|
|
127
127
|
this.#api,
|
|
128
128
|
{
|
|
129
129
|
body: {
|
|
@@ -156,7 +156,7 @@ var MatrxAudioClient = class {
|
|
|
156
156
|
ephemeral: false
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
|
-
const completion = await
|
|
159
|
+
const completion = await chunkVGXUUEFE_cjs.completeRecordingJournal(
|
|
160
160
|
this.#api,
|
|
161
161
|
{
|
|
162
162
|
path: { recording_id: input.recordingId },
|
|
@@ -196,7 +196,7 @@ var MatrxAudioClient = class {
|
|
|
196
196
|
}
|
|
197
197
|
async listRecoverable() {
|
|
198
198
|
if (!await this.#getAccessToken()) return [];
|
|
199
|
-
const recordings = await
|
|
199
|
+
const recordings = await chunkVGXUUEFE_cjs.getRecordingJournals(
|
|
200
200
|
this.#api,
|
|
201
201
|
void 0,
|
|
202
202
|
await this.#call()
|
|
@@ -207,7 +207,7 @@ var MatrxAudioClient = class {
|
|
|
207
207
|
}));
|
|
208
208
|
}
|
|
209
209
|
async loadRecoverable(recordingId) {
|
|
210
|
-
const journal = await
|
|
210
|
+
const journal = await chunkVGXUUEFE_cjs.getRecordingJournal(
|
|
211
211
|
this.#api,
|
|
212
212
|
{ path: { recording_id: recordingId } },
|
|
213
213
|
await this.#call()
|
|
@@ -225,14 +225,14 @@ var MatrxAudioClient = class {
|
|
|
225
225
|
for (const chunk of chunks) {
|
|
226
226
|
let blob;
|
|
227
227
|
try {
|
|
228
|
-
const response = await
|
|
228
|
+
const response = await chunkQ6BD7FVP_cjs.downloadFile(
|
|
229
229
|
this.#api,
|
|
230
230
|
{ path: { file_id: chunk.file_id }, query: { inline: true } },
|
|
231
231
|
await this.#call()
|
|
232
232
|
);
|
|
233
233
|
blob = await response.blob();
|
|
234
234
|
} catch (error) {
|
|
235
|
-
if (!(error instanceof
|
|
235
|
+
if (!(error instanceof chunkG3OJBGCU_cjs.MatrxApiError)) throw error;
|
|
236
236
|
missingChunkIndices.push(chunk.chunk_index);
|
|
237
237
|
continue;
|
|
238
238
|
}
|
|
@@ -249,7 +249,7 @@ var MatrxAudioClient = class {
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
async discard(recordingId) {
|
|
252
|
-
const result = await
|
|
252
|
+
const result = await chunkVGXUUEFE_cjs.deleteRecordingJournal(
|
|
253
253
|
this.#api,
|
|
254
254
|
{ path: { recording_id: recordingId } },
|
|
255
255
|
await this.#call()
|
|
@@ -261,7 +261,7 @@ var MatrxAudioClient = class {
|
|
|
261
261
|
/** Best-effort cleanup of an orphaned file; a failed delete never masks the real outcome. */
|
|
262
262
|
async #deleteFile(fileId) {
|
|
263
263
|
try {
|
|
264
|
-
await
|
|
264
|
+
await chunkQ6BD7FVP_cjs.filesDeleteFile(
|
|
265
265
|
this.#api,
|
|
266
266
|
{ path: { file_id: fileId } },
|
|
267
267
|
await this.#call()
|
package/dist/recording.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { whoami } from './chunk-
|
|
2
|
-
import { uploadFile, downloadFile, filesDeleteFile } from './chunk-
|
|
3
|
-
import { transcribeUpload, transcribeFile, createRecordingJournalChunk, completeRecordingJournal, getRecordingJournals, getRecordingJournal, deleteRecordingJournal } from './chunk-
|
|
4
|
-
import { createApi, MatrxApiError } from './chunk-
|
|
1
|
+
import { whoami } from './chunk-Z2UOMPC4.js';
|
|
2
|
+
import { uploadFile, downloadFile, filesDeleteFile } from './chunk-QCDALTHR.js';
|
|
3
|
+
import { transcribeUpload, transcribeFile, createRecordingJournalChunk, completeRecordingJournal, getRecordingJournals, getRecordingJournal, deleteRecordingJournal } from './chunk-IAB7JCVA.js';
|
|
4
|
+
import { createApi, MatrxApiError } from './chunk-BIHYNQOU.js';
|
|
5
5
|
import './chunk-KIEAFMKB.js';
|
|
6
6
|
|
|
7
7
|
// src/recording.ts
|
package/dist/schemas.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED by @ai-matrx/api scripts/generate.mjs from aidream/api-contract — never edit by hand.
|
|
3
|
-
* CONTRACT_SHA256
|
|
3
|
+
* CONTRACT_SHA256 2e22230d01e754f5ae210e0932290279956cc04757022cfee77b6d128f1c667c
|
|
4
4
|
*/
|
|
5
5
|
/** Every schema reached from more than one domain (119). Types only — importing this costs nothing at runtime. */
|
|
6
6
|
/** ActionNeeded */
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED by @ai-matrx/api scripts/generate.mjs from aidream/api-contract — never edit by hand.
|
|
3
|
-
* CONTRACT_SHA256
|
|
3
|
+
* CONTRACT_SHA256 2e22230d01e754f5ae210e0932290279956cc04757022cfee77b6d128f1c667c
|
|
4
4
|
*/
|
|
5
5
|
/** Every schema reached from more than one domain (119). Types only — importing this costs nothing at runtime. */
|
|
6
6
|
/** ActionNeeded */
|
package/dist/stream.cjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkG3OJBGCU_cjs = require('./chunk-G3OJBGCU.cjs');
|
|
4
4
|
require('./chunk-2SXAAKGV.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "DEFAULT_MATRX_NDJSON_READ_AHEAD", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkG3OJBGCU_cjs.DEFAULT_MATRX_NDJSON_READ_AHEAD; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "createMatrxNdjsonFramer", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkG3OJBGCU_cjs.createMatrxNdjsonFramer; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "createMatrxSseFramer", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkG3OJBGCU_cjs.createMatrxSseFramer; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "normalizeMatrxStreamEnvelope", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkG3OJBGCU_cjs.normalizeMatrxStreamEnvelope; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "openJsonOrStream", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkG3OJBGCU_cjs.openJsonOrStream; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "openStream", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkG3OJBGCU_cjs.openStream; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "parseMatrxSseFrame", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkG3OJBGCU_cjs.parseMatrxSseFrame; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "readMatrxNdjsonStream", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkG3OJBGCU_cjs.readMatrxNdjsonStream; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "readMatrxSseStream", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkG3OJBGCU_cjs.readMatrxSseStream; }
|
|
43
43
|
});
|
package/dist/stream.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as ApiStream, r as DEFAULT_MATRX_NDJSON_READ_AHEAD, J as JsonOrStream, s as MatrxNdjsonFramer, t as MatrxNdjsonFramerOptions, b as MatrxNdjsonIssue, d as MatrxSseFrame, u as MatrxSseFramer, M as MatrxStreamEnvelope, c as MatrxStreamEnvelopeObservation, N as NdjsonEvent, R as ReadMatrxNdjsonOptions, v as ReadMatrxSseOptions, S as SseEvent, w as createMatrxNdjsonFramer, x as createMatrxSseFramer, y as normalizeMatrxStreamEnvelope, p as openJsonOrStream, q as openStream, z as parseMatrxSseFrame, B as readMatrxNdjsonStream, F as readMatrxSseStream } from './index-
|
|
1
|
+
export { a as ApiStream, r as DEFAULT_MATRX_NDJSON_READ_AHEAD, J as JsonOrStream, s as MatrxNdjsonFramer, t as MatrxNdjsonFramerOptions, b as MatrxNdjsonIssue, d as MatrxSseFrame, u as MatrxSseFramer, M as MatrxStreamEnvelope, c as MatrxStreamEnvelopeObservation, N as NdjsonEvent, R as ReadMatrxNdjsonOptions, v as ReadMatrxSseOptions, S as SseEvent, w as createMatrxNdjsonFramer, x as createMatrxSseFramer, y as normalizeMatrxStreamEnvelope, p as openJsonOrStream, q as openStream, z as parseMatrxSseFrame, B as readMatrxNdjsonStream, F as readMatrxSseStream } from './index-DyDNKgdB.cjs';
|
|
2
2
|
import '@ai-matrx/auth/credentials';
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as ApiStream, r as DEFAULT_MATRX_NDJSON_READ_AHEAD, J as JsonOrStream, s as MatrxNdjsonFramer, t as MatrxNdjsonFramerOptions, b as MatrxNdjsonIssue, d as MatrxSseFrame, u as MatrxSseFramer, M as MatrxStreamEnvelope, c as MatrxStreamEnvelopeObservation, N as NdjsonEvent, R as ReadMatrxNdjsonOptions, v as ReadMatrxSseOptions, S as SseEvent, w as createMatrxNdjsonFramer, x as createMatrxSseFramer, y as normalizeMatrxStreamEnvelope, p as openJsonOrStream, q as openStream, z as parseMatrxSseFrame, B as readMatrxNdjsonStream, F as readMatrxSseStream } from './index-
|
|
1
|
+
export { a as ApiStream, r as DEFAULT_MATRX_NDJSON_READ_AHEAD, J as JsonOrStream, s as MatrxNdjsonFramer, t as MatrxNdjsonFramerOptions, b as MatrxNdjsonIssue, d as MatrxSseFrame, u as MatrxSseFramer, M as MatrxStreamEnvelope, c as MatrxStreamEnvelopeObservation, N as NdjsonEvent, R as ReadMatrxNdjsonOptions, v as ReadMatrxSseOptions, S as SseEvent, w as createMatrxNdjsonFramer, x as createMatrxSseFramer, y as normalizeMatrxStreamEnvelope, p as openJsonOrStream, q as openStream, z as parseMatrxSseFrame, B as readMatrxNdjsonStream, F as readMatrxSseStream } from './index-DyDNKgdB.js';
|
|
2
2
|
import '@ai-matrx/auth/credentials';
|
package/dist/stream.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DEFAULT_MATRX_NDJSON_READ_AHEAD, createMatrxNdjsonFramer, createMatrxSseFramer, normalizeMatrxStreamEnvelope, openJsonOrStream, openStream, parseMatrxSseFrame, readMatrxNdjsonStream, readMatrxSseStream } from './chunk-
|
|
1
|
+
export { DEFAULT_MATRX_NDJSON_READ_AHEAD, createMatrxNdjsonFramer, createMatrxSseFramer, normalizeMatrxStreamEnvelope, openJsonOrStream, openStream, parseMatrxSseFrame, readMatrxNdjsonStream, readMatrxSseStream } from './chunk-BIHYNQOU.js';
|
|
2
2
|
import './chunk-KIEAFMKB.js';
|