@pipelex/sdk 0.72.0 → 0.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/errors.js CHANGED
@@ -481,12 +481,14 @@ export class ScopeUnavailableError extends ArtifactOperationError {
481
481
  * `auth.forbidden` for a reference outside the caller's scope), then the fetch boundary's —
482
482
  * `unsupported_url`, `plain_http_refused`, `redirect_refused`, `store_refused`
483
483
  * (a 401/403 from the object store), `not_found` (404/410), `store_error`
484
- * (any other non-2xx), `too_large`, `timeout`, `network`, and `unknown` for a failure the SDK
485
- * cannot place. `status` is the store's HTTP status when one was received, and `requirement` the
484
+ * (any other non-2xx), `too_large`, `timeout`, `network`, `unreadable` for a result artifact
485
+ * handed back by reference whose file is not the artifact's JSON (`RUN_ARTIFACT_UNREADABLE`, its
486
+ * `uri` then `artifact_links.<name>`), and `unknown` for a failure the SDK cannot place. `status` is the store's HTTP status when one was received, and `requirement` the
486
487
  * `requirement` the resolve route's refusal of the reference names in its `params`, when it names
487
488
  * one: it is what tells a self-hosted runner's scope refusal (`read_scope_under_caller`) from any
488
- * other `auth.forbidden`, whose problem keeps no `requirement`. `downloadArtifacts` never lets this
489
- * escape: it becomes the item's `error`.
489
+ * other `auth.forbidden`, whose problem keeps no `requirement`. `downloadArtifacts` lets it escape
490
+ * only for an artifact of the results handed back by reference that it could not fetch; a
491
+ * reference it walks becomes the item's `error`.
490
492
  *
491
493
  * Its problem is `options.problem` when given, else follows `reason`, `status` and
492
494
  * `options.requirement`, the `requirement` the route's refusal names in its `params`
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpG,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,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D,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -26,6 +26,8 @@ export type { DescribeUploadOptions, GrantedUpload, UploadDescription, UploadWit
26
26
  export type { InputFormFault, PrepareInputsBase, PrepareInputsClosure, PrepareInputsRequest, PreparedInputs, } from "./prepare-inputs.js";
27
27
  export { inputFormFault } from "./prepare-inputs.js";
28
28
  export { locateArtifacts, collectArtifacts, locateStoredReferences, artifactFilename, PIPELEX_STORAGE_SCHEME, BULK_RESOLVE_MAX_URIS, DEFAULT_ARTIFACT_MAX_BYTES, DEFAULT_ARTIFACT_TIMEOUT_MS, DEFAULT_DOWNLOAD_MAX_TOTAL_BYTES, DEFAULT_DOWNLOAD_CONCURRENCY, loadStoredTexts, lacksStoredTextConcepts, DEFAULT_STORED_TEXT_MAX_BYTES, DEFAULT_STORED_TEXT_MAX_TOTAL_BYTES, DEFAULT_STORED_TEXT_CONCURRENCY, STORED_TEXT_CONCEPTS_MISSING, } from "./artifacts.js";
29
+ export { parseRunArtifact, fetchRunArtifact, followArtifactLinks, RUN_ARTIFACT_UNREADABLE, } from "./run-artifact-links.js";
30
+ export type { FollowArtifactLinksOptions } from "./run-artifact-links.js";
29
31
  export { STORED_TEXT_CONCEPT_REFS, isStoredTextConcept, storedTextKindOf, storedTextKindOfNode, mainStuffNode, workingMemoryNode, } from "./stored-texts.js";
30
32
  export type { StoredTextKind } from "./stored-texts.js";
31
33
  export type { ArtifactItemError, ArtifactLocation, ArtifactScope, BulkResolveStorageUrlsInput, BulkResolvedStorageUrls, DownloadArtifactsOptions, DownloadArtifactsRequest, DownloadArtifactsResult, DownloadedArtifact, DownloadedKind, FetchArtifactOptions, LoadStoredTextsOptions, ResolvedArtifact, StoredReferences, StoredTextLocation, } from "./artifacts.js";
@@ -34,9 +36,9 @@ export type { LayoutProvenance, LayoutProvenanceInput, MethodLayout, MethodLayou
34
36
  export type { MethodShowcaseDetail, MethodShowcaseDocument, MethodShowcaseFile, MethodShowcaseFreezeOutcome, MethodShowcaseFreezeResult, MethodShowcaseFrozen, MethodShowcaseInput, MethodShowcaseList, MethodShowcaseRefusalReason, MethodShowcaseRefused, MethodShowcaseSummary, MethodShowcaseUnchanged, } from "./method-showcases.js";
35
37
  export { runCodegenCheck, isStampableArtifactPath, STAMPABLE_ARTIFACT_SUFFIXES, CodegenLockError, } from "./codegen-check.js";
36
38
  export type { CodegenCheckInput, CodegenCheckReport, CodegenDrift, CodegenDriftCategory, CodegenTreeFile, } from "./codegen-check.js";
37
- export type { UserProfile, BundleStorageReference, ListMethodExamplesQuery, ListMethodsQuery, ListMethodTemplatesQuery, ListMethodVersionsQuery, MethodCategory, MethodCategoryList, MethodCopied, MethodCopiedFrom, MethodCopyInput, MethodCopyLimit, MethodCopyOutcome, MethodCopyRefusalReason, MethodCopyRefused, MethodCopyResult, MethodData, MethodDeletionAccepted, MethodDeletionState, MethodDetail, MethodDraftInput, MethodExample, MethodExampleAssistantCreated, MethodExampleAssistantKept, MethodExampleAssistantSaveInput, MethodExampleAssistantSaveOutcome, MethodExampleAssistantSaveResult, MethodExampleCreateInput, MethodExampleLatestRunInput, MethodExampleLatestRunOutcome, MethodExampleLatestRunRecorded, MethodExampleLatestRunResult, MethodExampleLatestRunStale, MethodExamplePage, MethodExampleUpdateInput, MethodPage, MethodPublished, MethodPublishInput, MethodPublishOutcome, MethodPublishRefusalReason, MethodPublishRefused, MethodPublishResult, MethodPublishUnchanged, MethodRenameInput, MethodSummary, MethodTemplate, MethodTemplatePage, MethodTemplateThumbnail, MethodThumbnail, MethodTreeInput, MethodVersion, MethodVersionPage, MethodVersionSummary, MethodVisibility, MethodWriteInput, PublicMethodDetail, SavedMethodFile, Membership, MembershipsResponse, OrgRole, BrandingColors, BrandingColorsUpdate, LogoDescriptor, OrganizationBranding, OrganizationBrandingUpdate, SubscriptionResponse, PlanView, InvoiceView, CheckoutResponse, ChangePlanResponse, BillingPortalResponse, PipelexApiKey, PipelexApiKeyCreated, PipelexApiKeyList, OnboardingRole, OnboardingCurrentTool, OnboardingInputType, OnboardingHeardFrom, OnboardingSubmission, DraftFileAdded, DraftFileBlob, DraftFileFromFileInput, DraftFileFromFileResult, FileArchive, FileArchiveFailure, FileArchiveFailureCode, FileArchiveLimit, FileArchiveRequest, FileArchiveSource, FileArchiveState, FileDetail, FileKind, FileLink, FileLinkError, FileLinksResult, FileLinkTarget, FileOrigin, FilePage, FilePreview, FilePreviewFailure, FilePreviewFailureCode, FilePreviewState, FileRecord, FileRecordList, FileRenameInput, FileRole, FileState, FileSummary, FileUse, FileUseHolderType, FileUsePage, GetFileQuery, GetFilesByUriOptions, ListFilesQuery, ListRunFilesQuery, RunFileEntry, RunFileMark, RunFilesPage, RunFilesState, RunInputLink, ResolvedStorageUrl, UploadInput, UploadedFile, UploadGrantInput, UploadGrant, UploadKind, ListRunsQuery, PipelineRun, RunDetail, RunHistoryItem, RunPage, UpdateRunInput, } from "./product-models.js";
39
+ export type { UserProfile, BundleStorageReference, ListMethodExamplesQuery, ListMethodsQuery, ListMethodTemplatesQuery, ListMethodVersionsQuery, MethodCategory, MethodCategoryList, MethodCopied, MethodCopiedFrom, MethodCopyInput, MethodCopyLimit, MethodCopyOutcome, MethodCopyRefusalReason, MethodCopyRefused, MethodCopyResult, MethodData, MethodDeletionAccepted, MethodDeletionState, MethodDetail, MethodDraftInput, MethodExample, MethodExampleAssistantCreated, MethodExampleAssistantKept, MethodExampleAssistantSaveInput, MethodExampleAssistantSaveOutcome, MethodExampleAssistantSaveResult, MethodExampleCreateInput, MethodExampleLatestRunInput, MethodExampleLatestRunOutcome, MethodExampleLatestRunRecorded, MethodExampleLatestRunResult, MethodExampleLatestRunStale, MethodExamplePage, MethodExampleUpdateInput, MethodPage, MethodPublished, MethodPublishInput, MethodPublishOutcome, MethodPublishRefusalReason, MethodPublishRefused, MethodPublishResult, MethodPublishUnchanged, MethodRenameInput, MethodSummary, MethodTemplate, MethodTemplatePage, MethodTemplateThumbnail, MethodThumbnail, MethodTreeInput, MethodVersion, MethodVersionPage, MethodVersionSummary, MethodVisibility, MethodWriteInput, PublicMethodDetail, SavedMethodFile, Membership, MembershipsResponse, OrgRole, BrandingColors, BrandingColorsUpdate, BrandingDesignSystem, LogoDescriptor, OrganizationBranding, OrganizationBrandingUpdate, SubscriptionResponse, PlanView, InvoiceView, CheckoutResponse, ChangePlanResponse, BillingPortalResponse, PipelexApiKey, PipelexApiKeyCreated, PipelexApiKeyList, OnboardingRole, OnboardingCurrentTool, OnboardingInputType, OnboardingHeardFrom, OnboardingSubmission, DraftFileAdded, DraftFileBlob, DraftFileFromFileInput, DraftFileFromFileResult, FileArchive, FileArchiveFailure, FileArchiveFailureCode, FileArchiveLimit, FileArchiveRequest, FileArchiveSource, FileArchiveState, FileDetail, FileKind, FileLink, FileLinkError, FileLinksResult, FileLinkTarget, FileOrigin, FilePage, FilePreview, FilePreviewFailure, FilePreviewFailureCode, FilePreviewState, FileRecord, FileRecordList, FileRenameInput, FileRole, FileState, FileSummary, FileUse, FileUseHolderType, FileUsePage, GetFileQuery, GetFilesByUriOptions, ListFilesQuery, ListRunFilesQuery, RunFileEntry, RunFileMark, RunFilesPage, RunFilesState, RunInputLink, ResolvedStorageUrl, UploadInput, UploadedFile, UploadGrantInput, UploadGrant, UploadKind, ListRunsQuery, PipelineRun, RunDetail, RunHistoryItem, RunPage, UpdateRunInput, } from "./product-models.js";
38
40
  export { isFresherRunProgress, isTerminalRunStatus, isSuccessRunStatus, RUN_RESULT_ARTIFACTS, } from "./runs.js";
39
- export type { DegradationReason, GetRunResultOptions, ProgressAttempt, ProgressBatch, ProgressCondition, ProgressFailure, ProgressInvocation, ProgressInvocationStatus, RunDegradation, RunProgress, RunProgressStatus, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, StartAndWaitForResultOptions, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
41
+ export type { DegradationReason, GetRunResultOptions, ProgressAttempt, ProgressBatch, ProgressCondition, ProgressFailure, ProgressInvocation, ProgressInvocationStatus, RunDegradation, RunProgress, RunProgressStatus, RunArtifactLink, RunArtifactLinks, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, StartAndWaitForResultOptions, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
40
42
  export { verifyWebhook, isRunFinishedEvent, RUN_FINISHED_EVENT_TYPE, WEBHOOK_TIMESTAMP_TOLERANCE_SECONDS, WebhookVerificationError, WebhookEventUnreadableError, } from "./webhooks.js";
41
43
  export type { RunFinishedEvent, RunFinishedEventData, RunFinishedStatus, UnknownWebhookEvent, VerifyWebhookOptions, WebhookAttemptFailure, WebhookDeliveryAttempt, WebhookDeliveryDetail, WebhookDeliveryList, WebhookDeliveryState, WebhookDeliverySummary, WebhookEvent, WebhookHeaders, WebhookRefusal, WebhookReplayAccepted, WebhookReplayOptions, WebhookSecret, WebhookSecretRotateOptions, } from "./webhooks.js";
42
44
  export { summarizeUsage } from "./usage.js";
package/dist/index.js CHANGED
@@ -47,6 +47,9 @@ export { inputFormFault } from "./prepare-inputs.js";
47
47
  // the network operations (`resolveArtifacts` / `fetchArtifact` / `downloadArtifacts`) are
48
48
  // client methods, and only their public types and bounds travel with the barrel.
49
49
  export { locateArtifacts, collectArtifacts, locateStoredReferences, artifactFilename, PIPELEX_STORAGE_SCHEME, BULK_RESOLVE_MAX_URIS, DEFAULT_ARTIFACT_MAX_BYTES, DEFAULT_ARTIFACT_TIMEOUT_MS, DEFAULT_DOWNLOAD_MAX_TOTAL_BYTES, DEFAULT_DOWNLOAD_CONCURRENCY, loadStoredTexts, lacksStoredTextConcepts, DEFAULT_STORED_TEXT_MAX_BYTES, DEFAULT_STORED_TEXT_MAX_TOTAL_BYTES, DEFAULT_STORED_TEXT_CONCURRENCY, STORED_TEXT_CONCEPTS_MISSING, } from "./artifacts.js";
50
+ // Result artifacts handed back by reference (`RunResults.artifact_links`): the pure parse of one
51
+ // stored file, for a browser that fetched the link itself, and the fetches the result readers make.
52
+ export { parseRunArtifact, fetchRunArtifact, followArtifactLinks, RUN_ARTIFACT_UNREADABLE, } from "./run-artifact-links.js";
50
53
  // Stored texts — which values of a run the runtime holds by reference, told by concept.
51
54
  export { STORED_TEXT_CONCEPT_REFS, isStoredTextConcept, storedTextKindOf, storedTextKindOfNode, mainStuffNode, workingMemoryNode, } from "./stored-texts.js";
52
55
  // ── Offline codegen drift check (pure — no filesystem, no network, no key) ──
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6FAA6F;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,oFAAoF;AACpF,kFAAkF;AAClF,mFAAmF;AACnF,wBAAwB;AACxB,cAAc,gBAAgB,CAAC;AAE/B,wEAAwE;AACxE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACtF,sFAAsF;AACtF,yFAAyF;AACzF,2EAA2E;AAC3E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAoBzF,oFAAoF;AACpF,6FAA6F;AAC7F,+FAA+F;AAC/F,kDAAkD;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,+FAA+F;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,+FAA+F;AAC/F,6FAA6F;AAC7F,iGAAiG;AACjG,8FAA8F;AAC9F,iEAAiE;AACjE,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEhG,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAQ/E,6FAA6F;AAC7F,6FAA6F;AAC7F,4CAA4C;AAC5C,OAAO,EAAE,cAAc,EAAE,eAAe,EA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,MAAM,eAAe,CAAC;AAsBvB,oFAAoF;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAS5C,+FAA+F;AAC/F,2FAA2F;AAC3F,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAcrB,mFAAmF;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -974,18 +974,32 @@ export interface LogoDescriptor {
974
974
  width: number;
975
975
  height: number;
976
976
  }
977
+ /**
978
+ * An organization's design system: a DTCG token document (the Design Tokens Community Group
979
+ * format) holding the palette in both themes, typography, shape, depth, spacing, motion and the
980
+ * component treatments. The application that writes it owns its format; the platform stores it as
981
+ * it was written and checks only its shape: a JSON object of at most 64 KiB of compact JSON, nested
982
+ * at most 32 objects deep, in which every member whose name does not start with `$` is a token or
983
+ * a group, so an object; an object holding `$value` is a token and holds no token or group of its
984
+ * own; a name holds no `{`, `}` or `.`; and `$type` and `$description` are strings and
985
+ * `$extensions` an object wherever they appear.
986
+ */
987
+ export type BrandingDesignSystem = Record<string, unknown>;
977
988
  /**
978
989
  * An organization's branding — what `getBranding` and `updateOrganizationBranding` answer.
979
990
  *
980
991
  * `colors` is the light set and `dark_colors` the dark one, used in dark mode only: a dark colour
981
992
  * that is `null` falls back to the light colour of the same role, and a light one that is `null`
982
- * to Pipelex's own palette. A logo is `null` when its slot is empty. A personal workspace, or a
983
- * team that set nothing, answers every colour and logo `null`, no style and no typeface.
993
+ * to Pipelex's own palette. A logo is `null` when its slot is empty, and a dark logo that is
994
+ * `null` falls back to the light logo of its slot. A personal workspace, or a team that set
995
+ * nothing, answers every colour and logo `null`, no preset, shell or typeface, and no design
996
+ * system.
984
997
  *
985
- * `style` and `typeface` are ids the platform holds to a shape and never to a list, so a client
986
- * reads an id it does not know as unset. The client reads both as `null`, and `white_label` as
987
- * `false`, when the answer leaves them out, as a platform that predates them does, or sends a
988
- * value of another type.
998
+ * `preset`, `shell` and `typeface` are ids the platform holds to a shape and never to a list, so a
999
+ * client reads an id it does not know as unset. The client reads each as `null`, the dark logos and
1000
+ * `design_system` as `null`, and `white_label` as `false`, when the answer leaves them out, as a
1001
+ * platform that predates them does; it reads the three ids and `design_system` the same way when
1002
+ * the answer sends a value of another type, and `white_label` as `false` unless it is `true`.
989
1003
  */
990
1004
  export interface OrganizationBranding {
991
1005
  org_id: string;
@@ -997,14 +1011,24 @@ export interface OrganizationBranding {
997
1011
  square_logo: LogoDescriptor | null;
998
1012
  /** The wide logo, at least one and a half times as wide as it is tall, for an app's header. */
999
1013
  wide_logo: LogoDescriptor | null;
1014
+ /** The square logo for dark mode; `null` falls back to `square_logo`. */
1015
+ dark_square_logo: LogoDescriptor | null;
1016
+ /** The wide logo for dark mode; `null` falls back to `wide_logo`. */
1017
+ dark_wide_logo: LogoDescriptor | null;
1018
+ /**
1019
+ * The id of the preset the team started its design system from, such as `corporate`; `null`
1020
+ * when not set. Both themes share it, and it does not count towards whether an app is branded.
1021
+ */
1022
+ preset: string | null;
1000
1023
  /**
1001
- * The id of the app style the team chose for its method apps, such as `editorial`: how their
1002
- * headings, panels, corners and spacing look. `null` when not set. Both themes share it, and a
1003
- * client applies it whenever one is set; it does not count towards whether an app is branded.
1024
+ * The id of the page shell the team's method apps wear, such as `masthead`; `null` when not set.
1025
+ * Both themes share it, and it does not count towards whether an app is branded.
1004
1026
  */
1005
- style: string | null;
1027
+ shell: string | null;
1006
1028
  /** The id of the typeface the team sets its apps' text in, such as `manrope`; `null` when not set. */
1007
1029
  typeface: string | null;
1030
+ /** The team's design system, a DTCG token document; `null` when there is none. */
1031
+ design_system: BrandingDesignSystem | null;
1008
1032
  /**
1009
1033
  * Whether the organization holds the white-label entitlement: its method apps show no Pipelex
1010
1034
  * mark anywhere a runner looks, branded or not. `false` for every other organization, a personal
@@ -1031,30 +1055,39 @@ export interface BrandingColorsUpdate {
1031
1055
  *
1032
1056
  * - `colors` and `dark_colors` take a `BrandingColorsUpdate`, or `null` to clear all three
1033
1057
  * colours of that set.
1034
- * - `square_logo` and `wide_logo` take the `pipelex-storage://` URI of a file the organization
1035
- * uploaded on its own (`requestUploadGrant` or `upload`) to set a new logo, the `uri` the
1036
- * branding answers for that slot to keep it, or `null` to remove it. Any other URI, a run's or
1037
- * a method's file, a stale `branding/` copy or the other slot's logo, is refused as
1058
+ * - `square_logo`, `wide_logo`, `dark_square_logo` and `dark_wide_logo` take the
1059
+ * `pipelex-storage://` URI of a file the organization uploaded on its own (`requestUploadGrant`
1060
+ * or `upload`) to set a new logo, the `uri` the branding answers for that slot to keep it, or
1061
+ * `null` to remove it; a dark logo is held to its slot's rules, as the light one is. Any other
1062
+ * URI, a run's or a method's file, a stale `branding/` copy or another slot's logo, is refused as
1038
1063
  * `logo_not_an_upload`, so a logo cannot move between slots by its URI. The platform reads and
1039
1064
  * measures an upload before it accepts it, keeps its own copy under `branding/`, whose URI it
1040
1065
  * answers, and erases the copy a write replaces or clears; the upload is left as it is.
1041
- * - `style` and `typeface` take an id of one to 32 lower-case letters, digits and hyphens
1042
- * (`^[a-z0-9-]{1,32}$`), stored as it is whether or not such a style or typeface exists, or
1043
- * `null` to clear it. Writing one leaves the colours, the logos and the other as they are.
1066
+ * - `preset`, `shell` and `typeface` take an id of one to 32 lower-case letters, digits and
1067
+ * hyphens (`^[a-z0-9-]{1,32}$`), stored as it is whether or not such a preset, shell or typeface
1068
+ * exists, or `null` to clear it. Writing one leaves the colours, the logos and the others as they
1069
+ * are.
1070
+ * - `design_system` takes a DTCG token document (`BrandingDesignSystem`), which replaces the stored
1071
+ * one whole, or `null` to remove it. One the platform refuses for its shape writes nothing at all.
1044
1072
  *
1045
1073
  * A field the platform refuses is named in `location.field`: a colour by its dotted key, such as
1046
- * `colors.action`, a style or a typeface by its key. When it refuses one field alone, the problem
1047
- * itself names it, in `params.field` too; when it refuses several, each item of its `errors` names
1048
- * one. There is no `white_label` key: the entitlement is Pipelex staff's to grant, and the
1049
- * platform refuses a body naming it as it refuses any key it does not know.
1074
+ * `colors.action`, a preset, a shell, a typeface or the design system by its key. When it refuses
1075
+ * one field alone, the problem itself names it, in `params.field` too; when it refuses several,
1076
+ * each item of its `errors` names one. There is no `white_label` key: the entitlement is Pipelex
1077
+ * staff's to grant, and the platform refuses a body naming it as it refuses any key it does not
1078
+ * know, `style`, the retired app style, included.
1050
1079
  */
1051
1080
  export interface OrganizationBrandingUpdate {
1052
1081
  colors?: BrandingColorsUpdate | null;
1053
1082
  dark_colors?: BrandingColorsUpdate | null;
1054
1083
  square_logo?: string | null;
1055
1084
  wide_logo?: string | null;
1056
- style?: string | null;
1085
+ dark_square_logo?: string | null;
1086
+ dark_wide_logo?: string | null;
1087
+ preset?: string | null;
1088
+ shell?: string | null;
1057
1089
  typeface?: string | null;
1090
+ design_system?: BrandingDesignSystem | null;
1058
1091
  }
1059
1092
  export interface SubscriptionResponse {
1060
1093
  plan: string | null;
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Result artifacts handed back by reference — `RunResults.artifact_links`.
3
+ *
4
+ * The platform measures a completed run's results before answering, and when inline they would
5
+ * take the body past the API Gateway's limit it hands its largest artifacts back as links: each
6
+ * such artifact's field reads `null` and `artifact_links` maps its name to `{ url, expires_at }`,
7
+ * a GET of its stored file signed for about fifteen minutes. This module reads those files:
8
+ *
9
+ * - {@link parseRunArtifact} — pure: the text of one such file as the result fields it fills, read
10
+ * exactly (`parseExactJson`), the usage envelope unpacked. No network, no key, so a browser that
11
+ * fetched the link itself reads the file with it.
12
+ * - {@link fetchRunArtifact} — one link fetched under `fetchArtifact`'s bounds, then parsed.
13
+ * - {@link followArtifactLinks} — a result with every link (or the named ones) followed into its
14
+ * fields, the followed entries dropped from `artifact_links`. The result readers call it by
15
+ * default.
16
+ *
17
+ * The file is the one the runner wrote, so the links inside it are as stored, never re-signed: a
18
+ * produced file's `public_url` inside a followed artifact may have expired, and its
19
+ * `pipelex-storage://` reference is what to resolve (`docs/run-results.md`).
20
+ */
21
+ import type { ArtifactCapableClient, FetchArtifactOptions } from "./artifacts.js";
22
+ import type { RunArtifactLink, RunResultArtifact, RunResults } from "./runs.js";
23
+ /** The reason an `ArtifactFetchError` gives for a referenced file that is not the artifact's JSON. */
24
+ export declare const RUN_ARTIFACT_UNREADABLE = "unreadable";
25
+ /** `followArtifactLinks`'s options: the bounds of each fetch, and which links to follow. */
26
+ export interface FollowArtifactLinksOptions extends FetchArtifactOptions {
27
+ /**
28
+ * Follow only these artifacts' links; the others stay in `artifact_links`, their fields `null`.
29
+ * Omitted, every link is followed.
30
+ */
31
+ artifacts?: readonly RunResultArtifact[];
32
+ }
33
+ /**
34
+ * The result fields one artifact's stored file fills, read from the file's text: `{ graph_spec }`,
35
+ * `{ main_stuff }` and so on, and `{ tokens_usages, usage_assembly_error }` for `tokens_usages`,
36
+ * whose file is the envelope holding both. The text is read with `parseExactJson`, as an inline
37
+ * result is, so an integer past `Number.MAX_SAFE_INTEGER` is a `bigint` holding its exact digits.
38
+ * Pure — no network, no key — for a caller that fetched the link itself, such as a browser handed
39
+ * the link by its server.
40
+ *
41
+ * Throws `RequestArgumentError` for a name outside `RUN_RESULT_ARTIFACTS`, and `ArtifactFetchError`
42
+ * with the reason `unreadable` ({@link RUN_ARTIFACT_UNREADABLE}) for a text that is not JSON, or a
43
+ * usage file that is not the envelope object.
44
+ */
45
+ export declare function parseRunArtifact(artifact: RunResultArtifact, text: string): Partial<RunResults>;
46
+ /**
47
+ * Fetch one artifact the platform handed back by reference and read it as the result fields it
48
+ * fills ({@link parseRunArtifact}). The link is fetched under `fetchArtifact`'s bounds — redirects
49
+ * refused, no credential of ours sent, `maxBytes` (1 GiB by default) enforced before and while the
50
+ * body arrives, `timeoutMs` (120 s by default) over the whole exchange, a plain `http:` link
51
+ * refused unless it is on the client's own origin or `allowHttp` is set — and decoded as UTF-8.
52
+ *
53
+ * A link lasts about fifteen minutes from the read that handed it back; past that the store
54
+ * refuses it, an `ArtifactFetchError`, and reading the results again hands back a fresh one. Every
55
+ * failure is an `ArtifactFetchError` naming the link as `artifact_links.<name>`, never the signed
56
+ * link itself; the caller's abort is thrown as is.
57
+ */
58
+ export declare function fetchRunArtifact(client: Pick<ArtifactCapableClient, "originUrl">, artifact: RunResultArtifact, link: RunArtifactLink, options?: FetchArtifactOptions): Promise<Partial<RunResults>>;
59
+ /**
60
+ * A result with the artifacts it handed back by reference fetched into their fields — every one,
61
+ * or those `options.artifacts` names — and each followed entry dropped from `artifact_links`, the
62
+ * key itself dropped once none is left, so a followed result reads as one answered inline. The
63
+ * links are fetched at once, and the first that fails stops the others and is thrown
64
+ * ({@link fetchRunArtifact}). The result passed in is never changed: a new one is returned, or the
65
+ * same one when it holds no link to follow.
66
+ *
67
+ * The result readers (`getRunResult`, `waitForResult`, `startAndWaitForResult`) call it by
68
+ * default; a caller that read with `followArtifactLinks: false`, to pass the links on rather than
69
+ * pull the files through itself, calls it where the content is wanted after all.
70
+ */
71
+ export declare function followArtifactLinks(client: Pick<ArtifactCapableClient, "originUrl">, results: RunResults, options?: FollowArtifactLinksOptions): Promise<RunResults>;
72
+ /** Whether `results` holds a link for any of `artifacts`. */
73
+ export declare function holdsArtifactLinks(results: Pick<RunResults, "artifact_links">, artifacts: readonly RunResultArtifact[]): boolean;
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Result artifacts handed back by reference — `RunResults.artifact_links`.
3
+ *
4
+ * The platform measures a completed run's results before answering, and when inline they would
5
+ * take the body past the API Gateway's limit it hands its largest artifacts back as links: each
6
+ * such artifact's field reads `null` and `artifact_links` maps its name to `{ url, expires_at }`,
7
+ * a GET of its stored file signed for about fifteen minutes. This module reads those files:
8
+ *
9
+ * - {@link parseRunArtifact} — pure: the text of one such file as the result fields it fills, read
10
+ * exactly (`parseExactJson`), the usage envelope unpacked. No network, no key, so a browser that
11
+ * fetched the link itself reads the file with it.
12
+ * - {@link fetchRunArtifact} — one link fetched under `fetchArtifact`'s bounds, then parsed.
13
+ * - {@link followArtifactLinks} — a result with every link (or the named ones) followed into its
14
+ * fields, the followed entries dropped from `artifact_links`. The result readers call it by
15
+ * default.
16
+ *
17
+ * The file is the one the runner wrote, so the links inside it are as stored, never re-signed: a
18
+ * produced file's `public_url` inside a followed artifact may have expired, and its
19
+ * `pipelex-storage://` reference is what to resolve (`docs/run-results.md`).
20
+ */
21
+ import { parseJsonBody } from "mthds/protocol";
22
+ import { ArtifactFetchError, responseUnreadableProblem } from "./errors.js";
23
+ import { ExactJsonUnsupportedError, parseExactJson } from "./exact-json.js";
24
+ import { readSignedUrl } from "./artifacts.js";
25
+ import { RUN_RESULT_ARTIFACTS, assertArtifactSelection } from "./runs.js";
26
+ import { eitherSignal } from "./signals.js";
27
+ /** The reason an `ArtifactFetchError` gives for a referenced file that is not the artifact's JSON. */
28
+ export const RUN_ARTIFACT_UNREADABLE = "unreadable";
29
+ /** The label that stands for an artifact's link in an error: the signed link itself is never written there. */
30
+ function linkLabel(artifact) {
31
+ return `artifact_links.${artifact}`;
32
+ }
33
+ function unreadable(artifact, detail, status, cause) {
34
+ return new ArtifactFetchError(`The ${artifact} artifact handed back by reference could not be read: ${detail}.`, linkLabel(artifact), RUN_ARTIFACT_UNREADABLE, status, { cause, problem: responseUnreadableProblem(status) });
35
+ }
36
+ /**
37
+ * The result fields one artifact's stored file fills, read from the file's text: `{ graph_spec }`,
38
+ * `{ main_stuff }` and so on, and `{ tokens_usages, usage_assembly_error }` for `tokens_usages`,
39
+ * whose file is the envelope holding both. The text is read with `parseExactJson`, as an inline
40
+ * result is, so an integer past `Number.MAX_SAFE_INTEGER` is a `bigint` holding its exact digits.
41
+ * Pure — no network, no key — for a caller that fetched the link itself, such as a browser handed
42
+ * the link by its server.
43
+ *
44
+ * Throws `RequestArgumentError` for a name outside `RUN_RESULT_ARTIFACTS`, and `ArtifactFetchError`
45
+ * with the reason `unreadable` ({@link RUN_ARTIFACT_UNREADABLE}) for a text that is not JSON, or a
46
+ * usage file that is not the envelope object.
47
+ */
48
+ export function parseRunArtifact(artifact, text) {
49
+ return parseArtifactText(artifact, text, 200);
50
+ }
51
+ function parseArtifactText(artifact, text, status) {
52
+ assertArtifactSelection([artifact]);
53
+ // Held to the rules an inline answer is read by first: a number `JSON.parse` would read as
54
+ // `Infinity`, or nesting past the protocol's depth, is no JSON the SDK reads.
55
+ if (!parseJsonBody(text).ok)
56
+ throw unreadable(artifact, "it is not JSON", status);
57
+ let value;
58
+ try {
59
+ value = parseExactJson(text);
60
+ }
61
+ catch (error) {
62
+ if (error instanceof ExactJsonUnsupportedError) {
63
+ throw unreadable(artifact, "it holds a number past Number.MAX_SAFE_INTEGER, which this runtime cannot read exactly", status, error);
64
+ }
65
+ if (error instanceof SyntaxError)
66
+ throw unreadable(artifact, "it is not JSON", status, error);
67
+ throw error;
68
+ }
69
+ if (artifact !== "tokens_usages")
70
+ return { [artifact]: value };
71
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
72
+ throw unreadable(artifact, "it is not the usage envelope object", status);
73
+ }
74
+ const envelope = value;
75
+ return {
76
+ tokens_usages: (envelope["tokens_usages"] ?? null),
77
+ usage_assembly_error: (envelope["usage_assembly_error"] ?? null),
78
+ };
79
+ }
80
+ /**
81
+ * Fetch one artifact the platform handed back by reference and read it as the result fields it
82
+ * fills ({@link parseRunArtifact}). The link is fetched under `fetchArtifact`'s bounds — redirects
83
+ * refused, no credential of ours sent, `maxBytes` (1 GiB by default) enforced before and while the
84
+ * body arrives, `timeoutMs` (120 s by default) over the whole exchange, a plain `http:` link
85
+ * refused unless it is on the client's own origin or `allowHttp` is set — and decoded as UTF-8.
86
+ *
87
+ * A link lasts about fifteen minutes from the read that handed it back; past that the store
88
+ * refuses it, an `ArtifactFetchError`, and reading the results again hands back a fresh one. Every
89
+ * failure is an `ArtifactFetchError` naming the link as `artifact_links.<name>`, never the signed
90
+ * link itself; the caller's abort is thrown as is.
91
+ */
92
+ export async function fetchRunArtifact(client, artifact, link, options = {}) {
93
+ assertArtifactSelection([artifact]);
94
+ const { bytes, status } = await readSignedUrl(client, linkLabel(artifact), link.url, options);
95
+ let text;
96
+ try {
97
+ text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
98
+ }
99
+ catch (error) {
100
+ throw unreadable(artifact, "it is not UTF-8 text", status, error);
101
+ }
102
+ return parseArtifactText(artifact, text, status);
103
+ }
104
+ /**
105
+ * A result with the artifacts it handed back by reference fetched into their fields — every one,
106
+ * or those `options.artifacts` names — and each followed entry dropped from `artifact_links`, the
107
+ * key itself dropped once none is left, so a followed result reads as one answered inline. The
108
+ * links are fetched at once, and the first that fails stops the others and is thrown
109
+ * ({@link fetchRunArtifact}). The result passed in is never changed: a new one is returned, or the
110
+ * same one when it holds no link to follow.
111
+ *
112
+ * The result readers (`getRunResult`, `waitForResult`, `startAndWaitForResult`) call it by
113
+ * default; a caller that read with `followArtifactLinks: false`, to pass the links on rather than
114
+ * pull the files through itself, calls it where the content is wanted after all.
115
+ */
116
+ export async function followArtifactLinks(client, results, options = {}) {
117
+ const { artifacts: only, ...fetchOptions } = options;
118
+ if (only !== undefined)
119
+ assertArtifactSelection(only);
120
+ const links = results.artifact_links ?? {};
121
+ // A link under a name this version does not know is left in place, never refused.
122
+ const known = RUN_RESULT_ARTIFACTS;
123
+ const followed = Object.keys(links).filter((artifact) => known.includes(artifact) &&
124
+ links[artifact] != null &&
125
+ (only === undefined || only.includes(artifact)));
126
+ if (followed.length === 0)
127
+ return results;
128
+ // The first failure stops the fetches still in flight, as the caller's own abort does.
129
+ const stop = new AbortController();
130
+ const linked = eitherSignal(stop.signal, fetchOptions.signal);
131
+ let filled;
132
+ try {
133
+ filled = await Promise.all(followed.map((artifact) => fetchRunArtifact(client, artifact, links[artifact], {
134
+ ...fetchOptions,
135
+ signal: linked.signal,
136
+ }).catch((error) => {
137
+ if (!stop.signal.aborted)
138
+ stop.abort(error);
139
+ throw error;
140
+ })));
141
+ }
142
+ catch (error) {
143
+ // The caller's abort is thrown as is, never the fetch that saw it first.
144
+ if (fetchOptions.signal?.aborted === true)
145
+ throw fetchOptions.signal.reason;
146
+ throw stop.signal.aborted ? stop.signal.reason : error;
147
+ }
148
+ finally {
149
+ linked.dispose();
150
+ }
151
+ const remaining = { ...links };
152
+ for (const artifact of followed)
153
+ delete remaining[artifact];
154
+ const next = { ...results };
155
+ for (const fields of filled)
156
+ Object.assign(next, fields);
157
+ if (Object.keys(remaining).length === 0)
158
+ delete next.artifact_links;
159
+ else
160
+ next.artifact_links = remaining;
161
+ return next;
162
+ }
163
+ /** Whether `results` holds a link for any of `artifacts`. */
164
+ export function holdsArtifactLinks(results, artifacts) {
165
+ return artifacts.some((artifact) => results.artifact_links?.[artifact] != null);
166
+ }
167
+ //# sourceMappingURL=run-artifact-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-artifact-links.js","sourceRoot":"","sources":["../src/run-artifact-links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAA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