openmeld 0.3.83 → 0.3.85
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/dist/{add-me-membership-B9LeL4Ud.js → add-me-membership-CsoQDzyh.js} +2 -2
- package/dist/{add-me-membership-B9LeL4Ud.js.map → add-me-membership-CsoQDzyh.js.map} +1 -1
- package/dist/{api-client-foundation-Chryr5BZ.js → api-client-foundation-9MJAKRpy.js} +3 -3
- package/dist/{api-client-foundation-Chryr5BZ.js.map → api-client-foundation-9MJAKRpy.js.map} +1 -1
- package/dist/{auth-session-BJZuJ2bM.js → auth-session-vFtLpWjB.js} +2 -2
- package/dist/{auth-session-BJZuJ2bM.js.map → auth-session-vFtLpWjB.js.map} +1 -1
- package/dist/{command-22-KBBsD.js → command-BjGlkb0g.js} +158 -110
- package/dist/{command-22-KBBsD.js.map → command-BjGlkb0g.js.map} +1 -1
- package/dist/{dist-Cm4BbP8Y.js → dist-CJnq8AgJ.js} +263 -11
- package/dist/dist-CJnq8AgJ.js.map +1 -0
- package/dist/openmeld.js +794 -20
- package/dist/openmeld.js.map +1 -1
- package/dist/{runtime-transport-DI97Fndy.js → runtime-transport-DEj52An9.js} +225 -40
- package/dist/runtime-transport-DEj52An9.js.map +1 -0
- package/package.json +1 -1
- package/skills/openmeld-cli/SKILL.md +21 -0
- package/skills/openmeld-cli/references/commands.md +17 -0
- package/dist/dist-Cm4BbP8Y.js.map +0 -1
- package/dist/runtime-transport-DI97Fndy.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { _n as __exportAll, cn as agentControllerRefSchema, gn as resolveBuiltinAgentControllerConversationCapability, hn as agentControllerConversationCapabilitySchema, pn as normalizeKnownBuiltinAgentControllerId, tn as runtimeTransportModeSchema } from "./base-url-Cv9x5Es9.js";
|
|
4
|
-
import { $ as agentTaskTerminalOutcomeSchema, $
|
|
4
|
+
import { $ as agentTaskTerminalOutcomeSchema, $n as SPACE_PASSWORD_RATE_LIMITED_ERROR_CODE, At as centerAgentInteractionSourceSchema, Bn as localComponentUpdateProjectionSchema, Bt as restoreSpaceFileRevisionResponseSchema, Cn as spaceAgentStreamDeltaFrameSchema, Cr as finiteIntegerNumber, Ct as spaceAttachmentFileNameSchema, Dn as spaceAgentStreamTerminalFrameSchema, Dr as MAX_TEXT_LENGTH$1, Dt as spaceMessageAttachmentsSchema, En as spaceAgentStreamSnapshotSchema, Er as trimmedStringFromUnknown, Et as spaceMessageAttachmentSchema, F as openMeldDaemonProviderAccessEvidenceProviderSchema, Fr as openMeldWebUrlSchema, Gn as clientMessageIdSchema$1, Gt as updateSpaceFileEntryResponseSchema, It as listSpaceFileRevisionsResponseSchema, J as localFolderPathSchema, Jn as runtimeCoordinatorExecutionEventSchema, K as localFolderPickerRequestSchema, Kt as uploadSpaceFileResponseSchema, Lt as listSpaceFilesResponseSchema, Mn as agentInteractionResponseSchema, N as runtimeTransportRuntimeCoordinatorRespondInteractionResponseSchema, Nr as computerSetupModeSchema, Nt as createSpaceFolderResponseSchema, Ot as conversationCompactionMarkerSchema, Pr as openMeldNavigationTargetSchema, Pt as getSpaceFileResponseSchema, Q as agentTaskHandleSchema, Qn as spaceTraceExecutionIdentityProjectionSchema, Sn as agentStreamToolPartSchema, Sr as uuidProfileIdSchema, St as spaceAttachmentDimensionSchema, Tn as spaceAgentStreamPresenceSchema, Tr as optionalBooleanQuerySchema, Tt as spaceAttachmentSizeBytesSchema, Un as postSpaceWakeStopBodySchema, Ut as spaceMessageFileReferencesSchema, Vn as localComponentUpdateStatusSchema, Vt as spaceFileMimeTypeSchema, Wn as postSpaceWakeStopResponseSchema, Wt as trashSpaceFileEntryResponseSchema, X as agentTaskCompletionConditionSchema, Xt as openMeldDaemonSyncRouteCatalogPayloadSchema, Y as agentDelegationSnapshotSchema, Yn as runtimeCoordinatorExecutionRecordSchema, Z as agentTaskCompletionObservationSchema, _r as openMeldRuntimeProfileIdSchema, _t as signalStatusDataSchema, ar as spaceMentionLabelSourceSchema, br as profileWorkingDirectorySchema, bt as signalTextSchema, cn as spaceAllowedActionsSchema, cr as updateOrganizationInformationProtectionPolicyBodySchema, dn as workingLanguageGuidanceSchema, dr as inspectExecutionRecoveryResponseSchema, en as dispatchExecutionSchema, er as normalizeSpacePasswordText, et as areAgentTaskTerminalOutcomesEqual, fn as workingLanguageTagSchema, hr as agentProfileIdSchema, ht as centerAgentTaskReferenceSchema, in as spaceThreadSignalPlacementSchema, ir as spaceMentionLabelSchema, jt as SPACE_FILE_ERROR_CODES, kn as agentInteractionPendingSummarySchema, ln as spacePublicationModeSchema, lr as executeExecutionRecoveryBodySchema, n as daemonExecutionCompatibilitySchema, nn as spaceThreadEventSchema, nt as controllerAgentTaskHandleSchema, or as organizationInformationProtectionPolicyResponseSchema, pn as targetWakeLifecycleIdentitySchema, pr as openMeldRequestContextSchema, q as localFolderPickerResultSchema, qn as runtimeCoordinatorExecutionCreationDiagnosticSchema, qt as localAgentInstallationOptionSchema, rn as spaceThreadSchema, rt as spaceWakeAgentTaskHandleSchema, sn as resultArchivePolicySchema, sr as organizationProtectedInformationSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, tn as spaceThreadContextSchema, tr as spacePasswordSchema, tt as buildAgentTaskKey, un as spaceDispatchPolicySchema, ur as executeExecutionRecoveryResponseSchema, vn as messageEnvelopeSchema, vr as profileKindSchema, vt as signalSystemNoticeDataSchema, wn as spaceAgentStreamPartFrameSchema, wr as nonEmptyTrimmedStringFromUnknown, wt as spaceAttachmentMimeTypeSchema, xn as AGENT_STREAM_SNAPSHOT_MAX_CHARS, xr as profileWorkspaceModeSchema, xt as spaceAttachmentDescriptorSchema, yr as profileSchema, yt as signalTextDataSchema, z as openMeldDaemonTaskResultProjectFailureContextSchema, zn as localComponentUpdatePolicySchema, zt as restoreSpaceFileEntryResponseSchema } from "./runtime-transport-DEj52An9.js";
|
|
5
5
|
import { r as daemonServiceLaneSchema } from "./service-contract-DZWQdPz5.js";
|
|
6
6
|
import { z } from "zod/v4";
|
|
7
7
|
//#region ../../packages/schemas/dist/agent-execution-readiness-impact-taxonomy.js
|
|
@@ -4873,6 +4873,7 @@ const spaceLiveInvalidationFrameSchema = z.strictObject({
|
|
|
4873
4873
|
type: z.enum([
|
|
4874
4874
|
"space.members.changed",
|
|
4875
4875
|
"space.meta.changed",
|
|
4876
|
+
"space.files.changed",
|
|
4876
4877
|
"agent.readiness.invalidated"
|
|
4877
4878
|
]),
|
|
4878
4879
|
spaceId: nonEmptyTrimmedStringFromUnknown,
|
|
@@ -4902,6 +4903,7 @@ z.enum([
|
|
|
4902
4903
|
const postNormalMessageBodySchema = z.strictObject({
|
|
4903
4904
|
text: signalTextRequestDataSchema.shape.text,
|
|
4904
4905
|
attachments: signalTextRequestDataSchema.shape.attachments.optional(),
|
|
4906
|
+
files: signalTextRequestDataSchema.shape.files.optional(),
|
|
4905
4907
|
messageEnvelope: signalTextRequestDataSchema.shape.messageEnvelope.optional(),
|
|
4906
4908
|
replyTo: signalTextRequestDataSchema.shape.replyTo.optional(),
|
|
4907
4909
|
meta: signalTextRequestDataSchema.shape.meta.optional()
|
|
@@ -6011,6 +6013,7 @@ const gatewayErrorCodeSchema = z.enum([
|
|
|
6011
6013
|
"space.access_mode.password_not_configured",
|
|
6012
6014
|
"space.publication_mode.owner_required",
|
|
6013
6015
|
"space.publication_mode.password_not_configured",
|
|
6016
|
+
...SPACE_FILE_ERROR_CODES,
|
|
6014
6017
|
"attachment_too_large",
|
|
6015
6018
|
"attachment_type_unsupported",
|
|
6016
6019
|
"attachment_content_mismatch",
|
|
@@ -7566,12 +7569,14 @@ const listSpaceThreadSignalsResponseSchema = z.strictObject({
|
|
|
7566
7569
|
placements: z.array(spaceThreadSignalPlacementSchema)
|
|
7567
7570
|
});
|
|
7568
7571
|
const postSpaceThreadSignalBodySchema = z.strictObject({
|
|
7569
|
-
text:
|
|
7572
|
+
text: signalTextSchema.shape.data.shape.text,
|
|
7573
|
+
files: signalTextSchema.shape.data.shape.files.optional(),
|
|
7570
7574
|
messageEnvelope: messageEnvelopeSchema.optional(),
|
|
7571
7575
|
clientMessageId: clientMessageIdSchema
|
|
7572
7576
|
}).superRefine((value, ctx) => {
|
|
7573
7577
|
const parsed = signalTextSchema.shape.data.safeParse({
|
|
7574
7578
|
text: value.text,
|
|
7579
|
+
...value.files ? { files: value.files } : {},
|
|
7575
7580
|
...value.messageEnvelope ? { messageEnvelope: value.messageEnvelope } : {},
|
|
7576
7581
|
meta: { clientMessageId: value.clientMessageId }
|
|
7577
7582
|
});
|
|
@@ -7870,7 +7875,14 @@ const remoteAgentWorkerAdmissionRejectedResponseSchema = z.strictObject({
|
|
|
7870
7875
|
v: z.literal(1)
|
|
7871
7876
|
});
|
|
7872
7877
|
z.union([remoteAgentWorkerSubmitMessagesResultSchema, remoteAgentWorkerAdmissionRejectedResponseSchema]);
|
|
7873
|
-
const remoteAgentWorkerInputAttachmentSchema = spaceMessageAttachmentSchema.extend({
|
|
7878
|
+
const remoteAgentWorkerInputAttachmentSchema = spaceMessageAttachmentSchema.extend({
|
|
7879
|
+
/**
|
|
7880
|
+
* Core-resolved immutable object key for a canonical Space File revision.
|
|
7881
|
+
* Legacy message attachments omit this field and retain their derived key.
|
|
7882
|
+
*/
|
|
7883
|
+
objectKey: nonEmptyStringSchema.max(4096).optional(),
|
|
7884
|
+
removeAfterAdmission: z.literal(true).optional()
|
|
7885
|
+
});
|
|
7874
7886
|
const remoteAgentWorkerInputAttachmentsSchema = z.array(remoteAgentWorkerInputAttachmentSchema).max(4);
|
|
7875
7887
|
const remoteAgentWorkerTurnMessageSchema = z.strictObject({
|
|
7876
7888
|
role: z.enum(["user"]),
|
|
@@ -8228,7 +8240,8 @@ const remoteAgentCoreCallbackBodySchema = z.union([z.strictObject({
|
|
|
8228
8240
|
navigationTarget: openMeldNavigationTargetSchema.optional(),
|
|
8229
8241
|
status: z.literal("completed").optional(),
|
|
8230
8242
|
text: nonEmptyStringSchema.max(MAX_TEXT_LENGTH$1),
|
|
8231
|
-
attachments: spaceMessageAttachmentsSchema.optional()
|
|
8243
|
+
attachments: spaceMessageAttachmentsSchema.optional(),
|
|
8244
|
+
files: spaceMessageFileReferencesSchema.optional()
|
|
8232
8245
|
}), z.strictObject({
|
|
8233
8246
|
...remoteAgentCoreCallbackIdentitySchema,
|
|
8234
8247
|
status: z.literal("failed"),
|
|
@@ -8250,7 +8263,8 @@ z.strictObject({
|
|
|
8250
8263
|
navigationTarget: openMeldNavigationTargetSchema.optional(),
|
|
8251
8264
|
status: z.literal("completed"),
|
|
8252
8265
|
text: nonEmptyStringSchema.max(MAX_TEXT_LENGTH$1),
|
|
8253
|
-
attachments: spaceMessageAttachmentsSchema.optional()
|
|
8266
|
+
attachments: spaceMessageAttachmentsSchema.optional(),
|
|
8267
|
+
files: spaceMessageFileReferencesSchema.optional()
|
|
8254
8268
|
});
|
|
8255
8269
|
z.strictObject({
|
|
8256
8270
|
...remoteAgentCoreCallbackIdentitySchema,
|
|
@@ -10280,6 +10294,7 @@ z.strictObject({
|
|
|
10280
10294
|
targetProfileId: trimmedNonEmptyStringSchema$2.optional()
|
|
10281
10295
|
});
|
|
10282
10296
|
z.strictObject({
|
|
10297
|
+
files: spaceMessageFileReferencesSchema.optional(),
|
|
10283
10298
|
onBehalfOf: centerAgentOnBehalfOfInputSchema.optional(),
|
|
10284
10299
|
referenceProfileIds: z.array(openMeldRuntimeProfileIdSchema).max(25).optional(),
|
|
10285
10300
|
spaceId: trimmedNonEmptyStringSchema$2,
|
|
@@ -12965,15 +12980,24 @@ var dist_exports = /* @__PURE__ */ __exportAll({
|
|
|
12965
12980
|
createRoutinesApi: () => createRoutinesApi,
|
|
12966
12981
|
createRuntimeReportingApi: () => createRuntimeReportingApi,
|
|
12967
12982
|
createSpaceApi: () => createSpaceApi,
|
|
12983
|
+
createSpaceFolder: () => createSpaceFolder,
|
|
12984
|
+
downloadSpaceFileContent: () => downloadSpaceFileContent,
|
|
12968
12985
|
getModelCatalog: () => getModelCatalog,
|
|
12986
|
+
getSpaceFile: () => getSpaceFile,
|
|
12987
|
+
listSpaceFileRevisions: () => listSpaceFileRevisions,
|
|
12988
|
+
listSpaceFiles: () => listSpaceFiles,
|
|
12969
12989
|
normalizeApiBaseUrl: () => normalizeApiBaseUrl,
|
|
12970
12990
|
publicSpaceUrls: () => publicSpaceUrls,
|
|
12971
12991
|
resolveAccountSpaceIndexGatewayHost: () => resolveAccountSpaceIndexGatewayHost,
|
|
12972
12992
|
resolveProfileSpaceHistoryGatewayHost: () => resolveProfileSpaceHistoryGatewayHost,
|
|
12973
12993
|
setSpaceAccessMode: () => setSpaceAccessMode,
|
|
12974
12994
|
toStructuredApiClientFailure: () => toStructuredApiClientFailure,
|
|
12995
|
+
trashSpaceFileEntry: () => trashSpaceFileEntry,
|
|
12996
|
+
updateSpaceFileContent: () => updateSpaceFileContent,
|
|
12997
|
+
updateSpaceFileEntry: () => updateSpaceFileEntry,
|
|
12975
12998
|
updateSpaceMeta: () => updateSpaceMeta,
|
|
12976
|
-
uploadSpaceAttachment: () => uploadSpaceAttachment
|
|
12999
|
+
uploadSpaceAttachment: () => uploadSpaceAttachment,
|
|
13000
|
+
uploadSpaceFile: () => uploadSpaceFile
|
|
12977
13001
|
});
|
|
12978
13002
|
const TRAILING_SLASHES_REGEX = /\/+$/;
|
|
12979
13003
|
const ROOT_PATH_REGEX = /^\/+$/;
|
|
@@ -16436,6 +16460,46 @@ function buildSpaceSignalsPath(spaceId) {
|
|
|
16436
16460
|
function buildSpaceAttachmentsPath(spaceId) {
|
|
16437
16461
|
return buildSpaceRoutePath(spaceId, "attachments");
|
|
16438
16462
|
}
|
|
16463
|
+
function buildSpaceFilesPath(spaceId, query) {
|
|
16464
|
+
const path = buildSpaceRoutePath(spaceId, "files");
|
|
16465
|
+
const searchParams = new URLSearchParams();
|
|
16466
|
+
if (query?.parentId) searchParams.set("parentId", query.parentId);
|
|
16467
|
+
if (query?.view && query.view !== "active") searchParams.set("view", query.view);
|
|
16468
|
+
const queryString = searchParams.toString();
|
|
16469
|
+
return queryString ? `${path}?${queryString}` : path;
|
|
16470
|
+
}
|
|
16471
|
+
function buildSpaceFileFoldersPath(spaceId) {
|
|
16472
|
+
return `${buildSpaceFilesPath(spaceId)}/folders`;
|
|
16473
|
+
}
|
|
16474
|
+
function buildSpaceFileEntryPath(spaceId, entryId) {
|
|
16475
|
+
return `${buildSpaceFilesPath(spaceId)}/${encodeURIComponent(entryId)}`;
|
|
16476
|
+
}
|
|
16477
|
+
function buildSpaceFileRevisionsPath(spaceId, fileId) {
|
|
16478
|
+
return `${buildSpaceFileEntryPath(spaceId, fileId)}/revisions`;
|
|
16479
|
+
}
|
|
16480
|
+
function buildSpaceFileRestorePath(spaceId, entryId) {
|
|
16481
|
+
return `${buildSpaceFileEntryPath(spaceId, entryId)}/restore`;
|
|
16482
|
+
}
|
|
16483
|
+
function buildSpaceFileRevisionRestorePath(spaceId, fileId, revision) {
|
|
16484
|
+
return `${buildSpaceFileRevisionsPath(spaceId, fileId)}/${revision}/restore`;
|
|
16485
|
+
}
|
|
16486
|
+
function buildSpaceFileContentPath(spaceId, fileId, query) {
|
|
16487
|
+
const path = `${buildSpaceFileEntryPath(spaceId, fileId)}/content`;
|
|
16488
|
+
const searchParams = new URLSearchParams();
|
|
16489
|
+
if (query?.revision !== void 0) searchParams.set("revision", String(query.revision));
|
|
16490
|
+
if (query?.baseRevision !== void 0) searchParams.set("baseRevision", String(query.baseRevision));
|
|
16491
|
+
if (query?.clientMutationId !== void 0) searchParams.set("clientMutationId", query.clientMutationId);
|
|
16492
|
+
const queryString = searchParams.toString();
|
|
16493
|
+
return queryString ? `${path}?${queryString}` : path;
|
|
16494
|
+
}
|
|
16495
|
+
function buildSpaceFileUploadPath(input) {
|
|
16496
|
+
const searchParams = new URLSearchParams({
|
|
16497
|
+
clientMutationId: input.clientMutationId,
|
|
16498
|
+
name: input.name
|
|
16499
|
+
});
|
|
16500
|
+
if (input.parentId) searchParams.set("parentId", input.parentId);
|
|
16501
|
+
return `${buildSpaceFilesPath(input.spaceId)}?${searchParams.toString()}`;
|
|
16502
|
+
}
|
|
16439
16503
|
function buildSpaceAttachmentUploadPath(spaceId, query) {
|
|
16440
16504
|
const path = buildSpaceAttachmentsPath(spaceId);
|
|
16441
16505
|
const searchParams = new URLSearchParams();
|
|
@@ -16546,8 +16610,8 @@ async function addSpaceMembers(client, input) {
|
|
|
16546
16610
|
});
|
|
16547
16611
|
}
|
|
16548
16612
|
async function uploadSpaceAttachment(client, input) {
|
|
16549
|
-
const mimeType = parseMimeType(input.mimeType);
|
|
16550
|
-
const body = toRequestBody(input.bytes);
|
|
16613
|
+
const mimeType = parseMimeType$1(input.mimeType);
|
|
16614
|
+
const body = toRequestBody$1(input.bytes);
|
|
16551
16615
|
validateAttachmentSize(readRequestBodySize(body));
|
|
16552
16616
|
const query = parseUploadQuery(input);
|
|
16553
16617
|
return (await client.requestJson({
|
|
@@ -16567,7 +16631,7 @@ async function uploadSpaceAttachment(client, input) {
|
|
|
16567
16631
|
function buildSpaceAttachmentDownloadPath(spaceId, attachmentId) {
|
|
16568
16632
|
return `${buildSpaceAttachmentsPath(spaceId)}/${encodeURIComponent(attachmentId)}`;
|
|
16569
16633
|
}
|
|
16570
|
-
function parseMimeType(value) {
|
|
16634
|
+
function parseMimeType$1(value) {
|
|
16571
16635
|
const parsed = spaceAttachmentMimeTypeSchema.safeParse(value);
|
|
16572
16636
|
if (!parsed.success) throw new Error("invalid Space attachment MIME type");
|
|
16573
16637
|
return parsed.data;
|
|
@@ -16584,7 +16648,7 @@ function parseUploadQuery(input) {
|
|
|
16584
16648
|
if (!parsed.success) throw new Error("invalid Space attachment upload metadata");
|
|
16585
16649
|
return parsed.data;
|
|
16586
16650
|
}
|
|
16587
|
-
function toRequestBody(bytes) {
|
|
16651
|
+
function toRequestBody$1(bytes) {
|
|
16588
16652
|
if (bytes instanceof Blob || bytes instanceof ArrayBuffer) return bytes;
|
|
16589
16653
|
const copy = new Uint8Array(bytes.byteLength);
|
|
16590
16654
|
copy.set(bytes);
|
|
@@ -16804,6 +16868,182 @@ async function executeSpaceExecutionRecovery(client, input) {
|
|
|
16804
16868
|
url: buildSpaceExecutionRecoveryPath(input.spaceId, input.dispatchId)
|
|
16805
16869
|
});
|
|
16806
16870
|
}
|
|
16871
|
+
async function listSpaceFiles(client, input) {
|
|
16872
|
+
const response = await client.requestJson({
|
|
16873
|
+
...requestFields(input),
|
|
16874
|
+
url: buildSpaceFilesPath(input.spaceId, input.query),
|
|
16875
|
+
operation: "space.files.list",
|
|
16876
|
+
schema: listSpaceFilesResponseSchema,
|
|
16877
|
+
invalidMessage: "invalid Space Files list response"
|
|
16878
|
+
});
|
|
16879
|
+
const requestedView = input.query?.view ?? "active";
|
|
16880
|
+
if (response.view !== requestedView) throw new OpenMeldApiClientInvalidResponseError({
|
|
16881
|
+
message: `Space Files returned the ${response.view} view while the ${requestedView} view was requested.`,
|
|
16882
|
+
operation: "space.files.list",
|
|
16883
|
+
status: 200,
|
|
16884
|
+
rawBody: JSON.stringify(response),
|
|
16885
|
+
schemaIssue: {
|
|
16886
|
+
message: "The response view did not match the requested view.",
|
|
16887
|
+
path: ["view"]
|
|
16888
|
+
}
|
|
16889
|
+
});
|
|
16890
|
+
return response;
|
|
16891
|
+
}
|
|
16892
|
+
async function getSpaceFile(client, input) {
|
|
16893
|
+
return await client.requestJson({
|
|
16894
|
+
...requestFields(input),
|
|
16895
|
+
url: buildSpaceFileEntryPath(input.spaceId, input.fileId),
|
|
16896
|
+
operation: "space.files.get",
|
|
16897
|
+
schema: getSpaceFileResponseSchema,
|
|
16898
|
+
invalidMessage: "invalid Space file response"
|
|
16899
|
+
});
|
|
16900
|
+
}
|
|
16901
|
+
async function listSpaceFileRevisions(client, input) {
|
|
16902
|
+
return await client.requestJson({
|
|
16903
|
+
...requestFields(input),
|
|
16904
|
+
url: buildSpaceFileRevisionsPath(input.spaceId, input.fileId),
|
|
16905
|
+
operation: "space.files.revisions.list",
|
|
16906
|
+
schema: listSpaceFileRevisionsResponseSchema,
|
|
16907
|
+
invalidMessage: "invalid Space file revisions response"
|
|
16908
|
+
});
|
|
16909
|
+
}
|
|
16910
|
+
async function createSpaceFolder(client, input) {
|
|
16911
|
+
return await client.requestJson({
|
|
16912
|
+
...requestFields(input),
|
|
16913
|
+
url: buildSpaceFileFoldersPath(input.spaceId),
|
|
16914
|
+
operation: "space.files.folder.create",
|
|
16915
|
+
method: "POST",
|
|
16916
|
+
headers: { "content-type": "application/json" },
|
|
16917
|
+
body: JSON.stringify(input.body),
|
|
16918
|
+
schema: createSpaceFolderResponseSchema,
|
|
16919
|
+
invalidMessage: "invalid Space folder create response"
|
|
16920
|
+
});
|
|
16921
|
+
}
|
|
16922
|
+
async function updateSpaceFileEntry(client, input) {
|
|
16923
|
+
return (await client.requestJson({
|
|
16924
|
+
...requestFields(input),
|
|
16925
|
+
url: buildSpaceFileEntryPath(input.spaceId, input.entryId),
|
|
16926
|
+
operation: "space.files.entry.update",
|
|
16927
|
+
method: "PATCH",
|
|
16928
|
+
headers: { "content-type": "application/json" },
|
|
16929
|
+
body: JSON.stringify(input.body),
|
|
16930
|
+
schema: updateSpaceFileEntryResponseSchema,
|
|
16931
|
+
invalidMessage: "invalid Space file update response"
|
|
16932
|
+
})).entry;
|
|
16933
|
+
}
|
|
16934
|
+
async function trashSpaceFileEntry(client, input) {
|
|
16935
|
+
return await client.requestJson({
|
|
16936
|
+
...requestFields(input),
|
|
16937
|
+
url: buildSpaceFileEntryPath(input.spaceId, input.entryId),
|
|
16938
|
+
operation: "space.files.entry.trash",
|
|
16939
|
+
method: "DELETE",
|
|
16940
|
+
headers: { "content-type": "application/json" },
|
|
16941
|
+
body: JSON.stringify({ clientMutationId: input.clientMutationId }),
|
|
16942
|
+
schema: trashSpaceFileEntryResponseSchema,
|
|
16943
|
+
invalidMessage: "invalid Space file trash response"
|
|
16944
|
+
});
|
|
16945
|
+
}
|
|
16946
|
+
async function restoreSpaceFileEntry(client, input) {
|
|
16947
|
+
return (await client.requestJson({
|
|
16948
|
+
...requestFields(input),
|
|
16949
|
+
url: buildSpaceFileRestorePath(input.spaceId, input.entryId),
|
|
16950
|
+
operation: "space.files.entry.restore",
|
|
16951
|
+
method: "POST",
|
|
16952
|
+
headers: { "content-type": "application/json" },
|
|
16953
|
+
body: JSON.stringify({ clientMutationId: input.clientMutationId }),
|
|
16954
|
+
schema: restoreSpaceFileEntryResponseSchema,
|
|
16955
|
+
invalidMessage: "invalid Space file restore response"
|
|
16956
|
+
})).entry;
|
|
16957
|
+
}
|
|
16958
|
+
async function restoreSpaceFileRevision(client, input) {
|
|
16959
|
+
return (await client.requestJson({
|
|
16960
|
+
...requestFields(input),
|
|
16961
|
+
url: buildSpaceFileRevisionRestorePath(input.spaceId, input.fileId, input.revision),
|
|
16962
|
+
operation: "space.files.revision.restore",
|
|
16963
|
+
method: "POST",
|
|
16964
|
+
headers: { "content-type": "application/json" },
|
|
16965
|
+
body: JSON.stringify({
|
|
16966
|
+
baseRevision: input.baseRevision,
|
|
16967
|
+
clientMutationId: input.clientMutationId
|
|
16968
|
+
}),
|
|
16969
|
+
schema: restoreSpaceFileRevisionResponseSchema,
|
|
16970
|
+
invalidMessage: "invalid Space file revision restore response"
|
|
16971
|
+
})).file;
|
|
16972
|
+
}
|
|
16973
|
+
async function uploadSpaceFile(client, input) {
|
|
16974
|
+
const body = toRequestBody(input.bytes);
|
|
16975
|
+
validateSize(body);
|
|
16976
|
+
const mimeType = parseMimeType(input.mimeType);
|
|
16977
|
+
return (await client.requestJson({
|
|
16978
|
+
...requestFields(input),
|
|
16979
|
+
url: buildSpaceFileUploadPath(input),
|
|
16980
|
+
operation: "space.files.upload",
|
|
16981
|
+
method: "POST",
|
|
16982
|
+
headers: { "content-type": mimeType },
|
|
16983
|
+
body,
|
|
16984
|
+
schema: uploadSpaceFileResponseSchema,
|
|
16985
|
+
invalidMessage: "invalid Space file upload response"
|
|
16986
|
+
})).file;
|
|
16987
|
+
}
|
|
16988
|
+
async function updateSpaceFileContent(client, input) {
|
|
16989
|
+
const body = toRequestBody(input.bytes);
|
|
16990
|
+
validateSize(body);
|
|
16991
|
+
const mimeType = parseMimeType(input.mimeType);
|
|
16992
|
+
return (await client.requestJson({
|
|
16993
|
+
...requestFields(input),
|
|
16994
|
+
url: buildSpaceFileContentPath(input.spaceId, input.fileId, {
|
|
16995
|
+
baseRevision: input.baseRevision,
|
|
16996
|
+
clientMutationId: input.clientMutationId
|
|
16997
|
+
}),
|
|
16998
|
+
operation: "space.files.content.update",
|
|
16999
|
+
method: "PUT",
|
|
17000
|
+
headers: { "content-type": mimeType },
|
|
17001
|
+
body,
|
|
17002
|
+
schema: uploadSpaceFileResponseSchema,
|
|
17003
|
+
invalidMessage: "invalid Space file content update response"
|
|
17004
|
+
})).file;
|
|
17005
|
+
}
|
|
17006
|
+
async function downloadSpaceFileContent(client, input) {
|
|
17007
|
+
const response = await client.requestResponse({
|
|
17008
|
+
...requestFields(input),
|
|
17009
|
+
url: buildSpaceFileContentPath(input.spaceId, input.fileId, { revision: input.revision }),
|
|
17010
|
+
operation: "space.files.content.download"
|
|
17011
|
+
});
|
|
17012
|
+
if (!response.ok) {
|
|
17013
|
+
await readApiClientTextResponse({ response });
|
|
17014
|
+
throw new Error("Space file download failed.");
|
|
17015
|
+
}
|
|
17016
|
+
const mimeType = parseMimeType(response.headers.get("content-type") ?? "application/octet-stream");
|
|
17017
|
+
const revision = Number(response.headers.get("x-openmeld-file-revision"));
|
|
17018
|
+
if (!(Number.isInteger(revision) && revision > 0)) throw new Error("invalid Space file revision response header");
|
|
17019
|
+
return {
|
|
17020
|
+
bytes: await response.arrayBuffer(),
|
|
17021
|
+
mimeType,
|
|
17022
|
+
revision
|
|
17023
|
+
};
|
|
17024
|
+
}
|
|
17025
|
+
function requestFields(input) {
|
|
17026
|
+
return {
|
|
17027
|
+
requestContext: input.requestContext,
|
|
17028
|
+
signal: input.signal,
|
|
17029
|
+
timeoutMs: input.timeoutMs,
|
|
17030
|
+
...input.spacePassword === void 0 ? {} : { spacePassword: input.spacePassword }
|
|
17031
|
+
};
|
|
17032
|
+
}
|
|
17033
|
+
function parseMimeType(value) {
|
|
17034
|
+
const parsed = spaceFileMimeTypeSchema.safeParse(value);
|
|
17035
|
+
if (!parsed.success) throw new Error("invalid Space file MIME type");
|
|
17036
|
+
return parsed.data;
|
|
17037
|
+
}
|
|
17038
|
+
function toRequestBody(bytes) {
|
|
17039
|
+
if (bytes instanceof Blob || bytes instanceof ArrayBuffer) return bytes;
|
|
17040
|
+
const copy = new Uint8Array(bytes.byteLength);
|
|
17041
|
+
copy.set(bytes);
|
|
17042
|
+
return copy.buffer;
|
|
17043
|
+
}
|
|
17044
|
+
function validateSize(body) {
|
|
17045
|
+
if ((body instanceof Blob ? body.size : body.byteLength) > 10485760) throw new Error("Space files must be 10 MiB or smaller");
|
|
17046
|
+
}
|
|
16807
17047
|
async function leaveSpace(client, input) {
|
|
16808
17048
|
return await client.requestJson({
|
|
16809
17049
|
url: buildSpaceLeavePath(input.spaceId),
|
|
@@ -16977,6 +17217,7 @@ function buildPostNormalMessageBody(input) {
|
|
|
16977
17217
|
return {
|
|
16978
17218
|
text: input.text,
|
|
16979
17219
|
...input.attachments ? { attachments: input.attachments } : {},
|
|
17220
|
+
...input.files ? { files: input.files } : {},
|
|
16980
17221
|
...input.messageEnvelope ? { messageEnvelope: input.messageEnvelope } : {},
|
|
16981
17222
|
...input.replyTo ? { replyTo: input.replyTo } : {},
|
|
16982
17223
|
...input.meta ? { meta: input.meta } : {}
|
|
@@ -17219,6 +17460,17 @@ const createSpaceApi = (client) => {
|
|
|
17219
17460
|
addCenterAgentToSpace: async (input) => await addCenterAgentToSpace(client, input),
|
|
17220
17461
|
addOrganizationDirectoryProfilesToSpace: async (input) => await addOrganizationDirectoryProfilesToSpace(client, input),
|
|
17221
17462
|
uploadAttachment: async (input) => await uploadSpaceAttachment(client, input),
|
|
17463
|
+
listFiles: async (input) => await listSpaceFiles(client, input),
|
|
17464
|
+
getFile: async (input) => await getSpaceFile(client, input),
|
|
17465
|
+
listFileRevisions: async (input) => await listSpaceFileRevisions(client, input),
|
|
17466
|
+
createFolder: async (input) => await createSpaceFolder(client, input),
|
|
17467
|
+
updateFileEntry: async (input) => await updateSpaceFileEntry(client, input),
|
|
17468
|
+
trashFileEntry: async (input) => await trashSpaceFileEntry(client, input),
|
|
17469
|
+
restoreFileEntry: async (input) => await restoreSpaceFileEntry(client, input),
|
|
17470
|
+
restoreFileRevision: async (input) => await restoreSpaceFileRevision(client, input),
|
|
17471
|
+
uploadFile: async (input) => await uploadSpaceFile(client, input),
|
|
17472
|
+
updateFileContent: async (input) => await updateSpaceFileContent(client, input),
|
|
17473
|
+
downloadFileContent: async (input) => await downloadSpaceFileContent(client, input),
|
|
17222
17474
|
removeMembers: async (input) => await removeSpaceMembers(client, input),
|
|
17223
17475
|
setAccessMode: async (input) => await setSpaceAccessMode(client, input),
|
|
17224
17476
|
updateMeta: async (input) => await updateSpaceMeta(client, input),
|
|
@@ -17351,4 +17603,4 @@ function composeAbortSignals(parent, timeout) {
|
|
|
17351
17603
|
//#endregion
|
|
17352
17604
|
export { ownerComputerDiagnosticsSchema as $, agentActivityInventorySessionStatusSchema as $t, MAX_TEXT_LENGTH as A, createCenterAgentRoutineResponseSchema as At, sleep as B, agentActivityProviderSchema as Bt, createSpaceApi as C, authProfileKindSchema as Ct, toStructuredApiClientFailure as D, organizationComputersResponseSchema as Dt, resolveProfileSpaceHistoryGatewayHost as E, profileErrorResponseSchema as Et, OPENMELD_HEADER_PROFILE_ID as F, resumeCenterAgentRoutineResponseSchema as Ft, projectSpaceDispatchTraceFinalVisibleOutcome as G, localProjectControlDaemonFrameSchema as Gt, getSpaceUpdatesResponseSchema as H, agentActivitySnapshotQuerySchema as Ht, OPENMELD_HEADER_REQUESTED_ORGANIZATION_ID as I, updateCenterAgentRoutineResponseSchema as It, spaceDispatchTraceDispatchStatusSchema as J, postSpaceMembersResponseSchema as Jt, resolveSpaceDispatchTraceRootCause as K, localProjectControlDiscoverProjectsResponseSchema as Kt, OPENMELD_HEADER_REQUEST_ID as L, AGENT_ACTIVITY_EVENT_MAX_BYTES as Lt, parseIncoming as M, listCenterAgentRoutineRunsResponseSchema as Mt, parseServerErrorFrame as N, listCenterAgentRoutinesResponseSchema as Nt, DAEMON_STREAM_KEEPALIVE_PING as O, submitFeedbackIssueRequestSchema as Ot, resolveCustomMentionAliasOverride as P, pauseCenterAgentRoutineResponseSchema as Pt, submitAgentControllerTaskLifecycleEventItemSchema as Q, agentActivityInventorySessionOriginSchema as Qt, buildOpenMeldRequestContextHeaders as R, AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS as Rt, createRuntimeReportingApi as S, ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE as St, resolveAccountSpaceIndexGatewayHost as T, profileCapabilitiesResponseSchema as Tt, SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS as U, agentActivitySnapshotResponseSchema as Ut, toErrorMessage$3 as V, agentActivitySessionStatusSchema as Vt, SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER as W, localProjectControlConnectionSchema as Wt, observabilityWakeTraceSelectorSchema as X, spaceMemberDirectoryEntrySchema as Xt, spaceDispatchTraceResponseSchema as Y, removeSpaceMembersResponseSchema as Yt, projectObservabilityWakeCorrelation as Z, spaceMemberDirectorySchema as Zt, createOrganizationSkillsApi as _, agentControllerPermissionModeSchema as _n, organizationSkillReleaseSummarySchema as _t, buildSpaceAttachmentDownloadPath as a, createProjectResponseSchema as an, COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY as at, createProjectsApi as b, organizationDirectoryResponseSchema as bt, createAgentProfileBindingApi as c, updateProjectResponseSchema as cn, computerFileAccessPolicyInputSchema as ct, createCurrentDeviceApi as d, START_BOUNDED_ID_SCHEMA as dn, organizationSpaceDirectoryWithMemberCountsResponseSchema as dt, agentActivitySessionInventoryQuerySchema as en, projectOwnerComputerLocalRuntimes as et, createFeedbackApi as f, START_BOUNDED_VERSION_SCHEMA as fn, spaceCreatorSchema as ft, createOrganizationApi as g, localAgentCatalogSchema as gn, organizationSkillBundleSchema as gt, createOpenMeldApiClient as h, startReplyReadinessSummarySchema as hn, listOrganizationSkillsResponseSchema as ht, buildProfileSpaceHistoryUpsertPath as i, archiveProjectResponseSchema as in, gatewayErrorEnvelopeSchema as it, parseEnvelope as j, deleteCenterAgentRoutineResponseSchema as jt, DAEMON_STREAM_KEEPALIVE_PONG as k, submitFeedbackIssueResponseSchema as kt, createCenterAgentApi as l, centerAgentToolSpeakerSchema as ln, computerFileAccessPolicySchema as lt, createLocalRuntimeExpectedRoutesApi as m, START_TRIMMED_NON_EMPTY_STRING_SCHEMA as mn, getOrganizationSkillResponseSchema as mt, OpenMeldApiClientInvalidResponseError as n, localAgentSessionProviderSchema as nn, DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION as nt, createAccountSpaceIndexApi as o, listProjectsResponseSchema as on, OPENMELD_RUNTIME_CAPABILITIES_HEADER as ot, createFetchTransport as p, START_ISO_DATE_TIME_SCHEMA as pn, spaceMetaSchema as pt, spaceDispatchTraceAttemptStatusSchema as q, leaveSpaceResponseSchema as qt, buildProfileSpaceHistoryStatusPath as r, observedLocalAgentSessionSchema as rn, agentProfileCreationConfigurationSchema as rt, createAgentActivityApi as s, projectSchema as sn, computerFileAccessDaemonFrameSchema as st, OpenMeldApiClientHttpError as t, agentActivitySessionInventoryResponseSchema as tn, summarizeComputerFileAccessPolicy as tt, createComputerFileAccessApi as u, openCodePermissionConfigSchema as un, modelCatalogSchema as ut, createPrepareReadinessApi as v, agentControllerCollaborationModeSchema as vn, organizationSkillSummarySchema as vt, dist_exports as w, authProfileManagedRoleSchema as wt, createRoutinesApi as x, ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE as xt, createProfileSpaceHistoryApi as y, toLegacySpaceAddressingWireValue as yn, stringifyOrganizationSkillBundleCanonicalJson as yt, toErrorMessage$2 as z, agentActivityEventSchema as zt };
|
|
17353
17605
|
|
|
17354
|
-
//# sourceMappingURL=dist-
|
|
17606
|
+
//# sourceMappingURL=dist-CJnq8AgJ.js.map
|