busabase-sdk 0.54.0 → 0.60.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/airapp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BusabaseClient } from "./client-
|
|
1
|
+
import { t as BusabaseClient } from "./client-SAiQFoug.js";
|
|
2
2
|
//#region src/airapp.d.ts
|
|
3
3
|
type NodeChangeRequestInput = Parameters<BusabaseClient["nodes"]["createChangeRequest"]>[0];
|
|
4
4
|
type NodeOperationInput = NodeChangeRequestInput["operations"][number];
|
|
@@ -490,6 +490,7 @@ declare const cloudContract: {
|
|
|
490
490
|
}>>>;
|
|
491
491
|
updatedAfter: z.ZodOptional<z.ZodString>;
|
|
492
492
|
updatedBefore: z.ZodOptional<z.ZodString>;
|
|
493
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
493
494
|
inNodeId: z.ZodOptional<z.ZodString>;
|
|
494
495
|
}, z.core.$strip>, z.ZodObject<{
|
|
495
496
|
query: z.ZodString;
|
|
@@ -510,6 +511,7 @@ declare const cloudContract: {
|
|
|
510
511
|
eyebrow: z.ZodString;
|
|
511
512
|
href: z.ZodString;
|
|
512
513
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
514
|
+
createdBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
513
515
|
}, z.core.$strip>>;
|
|
514
516
|
contentTruncated: z.ZodDefault<z.ZodBoolean>;
|
|
515
517
|
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
@@ -25707,6 +25709,8 @@ interface SearchResultVO {
|
|
|
25707
25709
|
eyebrow: string;
|
|
25708
25710
|
href: string;
|
|
25709
25711
|
updatedAt: string | null;
|
|
25712
|
+
/** Creating actor, or null when the source cannot say. Never render null as a person. */
|
|
25713
|
+
createdBy: string | null;
|
|
25710
25714
|
}
|
|
25711
25715
|
interface SearchResponseVO {
|
|
25712
25716
|
query: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AssetTextStatus, A as NodeVO, At as GalleryCardSize, B as UpdatePreviewFileCredentialDTO, Bt as ViewSortVO, C as CommentVO, Ct as ListFormsDTO, D as MentionInboxItemVO, Dt as AssetAttachmentRef, E as LookupRollup, Et as UpdateFormDTO, F as SearchResponseVO, Ft as VIEW_FIELD_MAX_WIDTH, G as VaultItemKind, Gt as cloudContract, H as VaultAccessPolicy, Ht as ViewVO, I as SearchResultKind, It as VIEW_FIELD_MIN_WIDTH, J as VaultScopeType, Jt as CREATABLE_NODE_TYPES, K as VaultItemVO, Kt as NodeIcon, L as SearchResultVO, Lt as ViewConfigVO, M as OperationVO, Mt as GanttScale, N as ReviewVO, Nt as RecordLinkVO, O as MentionInboxPageVO, Ot as BaseFieldVO, P as ReviewVerdict, Pt as RecordVO, Q as AssetDetailVO, R as SourceAttributionVO, Rt as ViewFilterOperator, S as CommentSubjectType, St as FormVO, T as FieldType, Tt as SubmitFormDTO, U as VaultEnvironment, Ut as AttachmentRef, V as UpdateVaultSettingsDTO, Vt as ViewType, W as VaultItemInput, Wt as CloudContract, X as FileNodeMetadata, Xt as NodeType, Y as VaultSettingsVO, Yt as CreatableNodeType, Z as FileNodeVO, Zt as OperationKind, _ as ChangeRequestVO, _t as FormFieldBindingVO, a as createBusabaseClient, at as FilePreviewConfigurationStatus, b as CommentMentionTargetType, bt as FormSubmitResultVO, c as AuditAction, ct as FilePreviewUnavailableReason, d as ChangeRequestBatchFailureVO, dt as FileTreeNodeVO, et as AssetUsageVO, f as ChangeRequestCountsVO, ft as FileTreeReadFileVO, g as ChangeRequestTargetType, gt as FormBoundFieldVO, h as ChangeRequestStatus, ht as CreateFormDTO, i as ResolvedConfig, it as FilePreviewConfigVO, j as OperationStatus, jt as GalleryCoverFit, k as NodeSearchResultVO, kt as BaseVO, l as AuditEventVO, lt as FilePreviewVO, m as ChangeRequestReviewBatchResultVO, mt as ActivityItemVO, n as BusabaseConfig, nt as GrepInputDTO, o as resolveConfig, ot as FilePreviewCredentialSource, p as ChangeRequestMergeBatchResultVO, pt as NodeDetailVO, q as VaultRuntimeEnv, qt as NodeIconSchema, r as DEFAULT_BASE_URL, rt as GrepResultVO, s as AgentTaskVO, st as FilePreviewProvider, t as BusabaseClient, tt as AssetVO, u as BusabaseSourceChannel, ut as FileTreeFileVO, v as CommentMentionDispatchStatus, vt as FormPageSourceVO, w as CommitVO, wt as ListFormsVO, x as CommentMentionVO, xt as FormThemeVO, y as CommentMentionInputDTO, yt as FormShareVO, z as UserRefVO, zt as ViewFilterVO } from "./client-
|
|
1
|
+
import { $ as AssetTextStatus, A as NodeVO, At as GalleryCardSize, B as UpdatePreviewFileCredentialDTO, Bt as ViewSortVO, C as CommentVO, Ct as ListFormsDTO, D as MentionInboxItemVO, Dt as AssetAttachmentRef, E as LookupRollup, Et as UpdateFormDTO, F as SearchResponseVO, Ft as VIEW_FIELD_MAX_WIDTH, G as VaultItemKind, Gt as cloudContract, H as VaultAccessPolicy, Ht as ViewVO, I as SearchResultKind, It as VIEW_FIELD_MIN_WIDTH, J as VaultScopeType, Jt as CREATABLE_NODE_TYPES, K as VaultItemVO, Kt as NodeIcon, L as SearchResultVO, Lt as ViewConfigVO, M as OperationVO, Mt as GanttScale, N as ReviewVO, Nt as RecordLinkVO, O as MentionInboxPageVO, Ot as BaseFieldVO, P as ReviewVerdict, Pt as RecordVO, Q as AssetDetailVO, R as SourceAttributionVO, Rt as ViewFilterOperator, S as CommentSubjectType, St as FormVO, T as FieldType, Tt as SubmitFormDTO, U as VaultEnvironment, Ut as AttachmentRef, V as UpdateVaultSettingsDTO, Vt as ViewType, W as VaultItemInput, Wt as CloudContract, X as FileNodeMetadata, Xt as NodeType, Y as VaultSettingsVO, Yt as CreatableNodeType, Z as FileNodeVO, Zt as OperationKind, _ as ChangeRequestVO, _t as FormFieldBindingVO, a as createBusabaseClient, at as FilePreviewConfigurationStatus, b as CommentMentionTargetType, bt as FormSubmitResultVO, c as AuditAction, ct as FilePreviewUnavailableReason, d as ChangeRequestBatchFailureVO, dt as FileTreeNodeVO, et as AssetUsageVO, f as ChangeRequestCountsVO, ft as FileTreeReadFileVO, g as ChangeRequestTargetType, gt as FormBoundFieldVO, h as ChangeRequestStatus, ht as CreateFormDTO, i as ResolvedConfig, it as FilePreviewConfigVO, j as OperationStatus, jt as GalleryCoverFit, k as NodeSearchResultVO, kt as BaseVO, l as AuditEventVO, lt as FilePreviewVO, m as ChangeRequestReviewBatchResultVO, mt as ActivityItemVO, n as BusabaseConfig, nt as GrepInputDTO, o as resolveConfig, ot as FilePreviewCredentialSource, p as ChangeRequestMergeBatchResultVO, pt as NodeDetailVO, q as VaultRuntimeEnv, qt as NodeIconSchema, r as DEFAULT_BASE_URL, rt as GrepResultVO, s as AgentTaskVO, st as FilePreviewProvider, t as BusabaseClient, tt as AssetVO, u as BusabaseSourceChannel, ut as FileTreeFileVO, v as CommentMentionDispatchStatus, vt as FormPageSourceVO, w as CommitVO, wt as ListFormsVO, x as CommentMentionVO, xt as FormThemeVO, y as CommentMentionInputDTO, yt as FormShareVO, z as UserRefVO, zt as ViewFilterVO } from "./client-SAiQFoug.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/url.d.ts
|
|
4
4
|
/**
|
|
@@ -323,6 +323,7 @@ declare class Busabase {
|
|
|
323
323
|
eyebrow: string;
|
|
324
324
|
href: string;
|
|
325
325
|
updatedAt: string | null;
|
|
326
|
+
createdBy: string | null;
|
|
326
327
|
}[];
|
|
327
328
|
contentTruncated: boolean;
|
|
328
329
|
}, Error>;
|
package/dist/index.js
CHANGED
|
@@ -1179,17 +1179,17 @@ const NodeIconSchema = z.discriminatedUnion("type", [z.object({
|
|
|
1179
1179
|
//#endregion
|
|
1180
1180
|
//#region ../../packages/busabase-contract/src/contract/node-agent-prompt-schemas.ts
|
|
1181
1181
|
/**
|
|
1182
|
-
* Per-node custom scenario prompts (`node.
|
|
1182
|
+
* Per-node custom scenario prompts (`node.agentPrompts`) — the single
|
|
1183
1183
|
* schema shared by BOTH write and read paths, per the node-agent-prompts
|
|
1184
1184
|
* design (v2) §7.3:
|
|
1185
1185
|
*
|
|
1186
1186
|
* - Write: `busabase-cli nodes set-agent-prompts` validates a file against this
|
|
1187
|
-
* schema client-side, before calling `nodes.
|
|
1188
|
-
* never reaches the network.
|
|
1187
|
+
* schema client-side, before calling `nodes.updateAgentPrompts` — a malformed
|
|
1188
|
+
* file never reaches the network.
|
|
1189
1189
|
* - Read: `buildNodeAgentPrompts` (`packages/busabase-core/.../node-agent-prompts.ts`)
|
|
1190
|
-
* `.safeParse`s whatever is stored in `
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1190
|
+
* `.safeParse`s whatever is stored in the node's `agentPrompts` column and
|
|
1191
|
+
* ignores invalid custom entries, so a bad write (or a manual jsonb edit) can
|
|
1192
|
+
* never crash the Agent Prompts dialog or hide its built-in scenarios.
|
|
1193
1193
|
*
|
|
1194
1194
|
* One schema, one place to edit the limits — do not duplicate this validation on
|
|
1195
1195
|
* either side.
|
|
@@ -1239,7 +1239,7 @@ const customPromptDefSchema = z.object({
|
|
|
1239
1239
|
body: customPromptBodySchema
|
|
1240
1240
|
});
|
|
1241
1241
|
/**
|
|
1242
|
-
* The full `
|
|
1242
|
+
* The full `agentPrompts` array. `.max` bounds the list; the
|
|
1243
1243
|
* `superRefine` catches duplicate keys with an issue path pointing at the
|
|
1244
1244
|
* offending entry, so a CLI/server validation error names which entry and
|
|
1245
1245
|
* which key collided instead of a bare "keys must be unique".
|
|
@@ -1677,7 +1677,16 @@ const searchResultSchema = z.object({
|
|
|
1677
1677
|
body: z.string(),
|
|
1678
1678
|
eyebrow: z.string(),
|
|
1679
1679
|
href: z.string(),
|
|
1680
|
-
updatedAt: z.string().nullable()
|
|
1680
|
+
updatedAt: z.string().nullable(),
|
|
1681
|
+
/**
|
|
1682
|
+
* The actor that created this, or null when the source cannot say.
|
|
1683
|
+
*
|
|
1684
|
+
* Present so a result can SHOW its author and so the author filter can be
|
|
1685
|
+
* driven by clicking one — you can only filter by a creator you can actually
|
|
1686
|
+
* see, which beats a free-text box you have to guess the spelling of. Null is
|
|
1687
|
+
* rendered as "unknown", never as a person.
|
|
1688
|
+
*/
|
|
1689
|
+
createdBy: z.string().nullable().default(null)
|
|
1681
1690
|
});
|
|
1682
1691
|
const searchResponseSchema = z.object({
|
|
1683
1692
|
query: z.string(),
|
|
@@ -1950,6 +1959,23 @@ const searchInputSchema = z.object({
|
|
|
1950
1959
|
updatedAfter: z.string().datetime({ offset: true }).optional().describe("Inclusive lower bound, ISO 8601. A UTC `Z` or an explicit offset; not a bare local time."),
|
|
1951
1960
|
updatedBefore: z.string().datetime({ offset: true }).optional().describe("Inclusive upper bound, ISO 8601. A UTC `Z` or an explicit offset; not a bare local time."),
|
|
1952
1961
|
/**
|
|
1962
|
+
* Restrict to what one actor created.
|
|
1963
|
+
*
|
|
1964
|
+
* Every source answers from a real column, which is what made this filter
|
|
1965
|
+
* shippable: records and assets carry their own `created_by`, node CONTENT
|
|
1966
|
+
* reads `busabase_nodes.created_by` (added with this change, backfilled from
|
|
1967
|
+
* each node's `node_create` commit), and Bases resolve through the owning
|
|
1968
|
+
* node the Base query already joins for its dates and sort.
|
|
1969
|
+
*
|
|
1970
|
+
* A free-form actor id, not a user id — agents and API keys create things
|
|
1971
|
+
* too, and filtering by "user" would silently drop everything an agent made.
|
|
1972
|
+
*
|
|
1973
|
+
* Nodes whose creating commit is gone have a NULL `created_by` and match no
|
|
1974
|
+
* author. That is deliberate: "this row cannot tell" must not render as
|
|
1975
|
+
* "nobody made it".
|
|
1976
|
+
*/
|
|
1977
|
+
createdBy: z.string().optional().describe("Restrict to one creator. Matches the actor id, which may be an agent or API key."),
|
|
1978
|
+
/**
|
|
1953
1979
|
* Restrict to a subtree: this node and everything beneath it.
|
|
1954
1980
|
*
|
|
1955
1981
|
* Resolved by walking the tree in application code (`collectSubtreeIds`),
|
|
@@ -5274,14 +5300,14 @@ const busabaseContractRoutes = {
|
|
|
5274
5300
|
path: "/nodes/{nodeId}/agent-prompts",
|
|
5275
5301
|
tags: ["Nodes"],
|
|
5276
5302
|
summary: "Get node custom agent prompts",
|
|
5277
|
-
successDescription: "This node's custom scenario prompts, which
|
|
5303
|
+
successDescription: "This node's custom scenario prompts, which appear alongside the node type's built-in prompts in the Ask-agent dialog. `null` means the node has never had any set, which is not the same as an empty list. Read separately from the node itself because the list is large enough (50 prompts x 8 KiB per locale) that carrying it on every node listing would be its own problem. Requires read access on the node."
|
|
5278
5304
|
}).input(getNodeAgentPromptsInputSchema).output(nodeAgentPromptsSchema),
|
|
5279
5305
|
updateAgentPrompts: oc.route({
|
|
5280
5306
|
method: "PUT",
|
|
5281
5307
|
path: "/nodes/{nodeId}/agent-prompts",
|
|
5282
5308
|
tags: ["Nodes"],
|
|
5283
5309
|
summary: "Replace node custom agent prompts",
|
|
5284
|
-
successDescription: "Replaced this node's custom scenario prompts — the whole list, not a merge. Send `null` to clear
|
|
5310
|
+
successDescription: "Replaced this node's custom scenario prompts — the whole custom list, not a merge. Send `null` to clear custom prompts; built-in prompts are always retained. Requires write access on the node."
|
|
5285
5311
|
}).input(updateNodeAgentPromptsInputSchema).output(nodeAgentPromptsSchema),
|
|
5286
5312
|
updateContent: oc.route({
|
|
5287
5313
|
method: "PUT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "busabase-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Typed TypeScript/JavaScript SDK for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server` (or Busabase Cloud).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-sdk",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"typescript": "^7.0.2",
|
|
69
69
|
"vitest": "^4.1.11",
|
|
70
70
|
"open-domains": "0.0.2",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
71
|
+
"busabase-contract": "0.60.0",
|
|
72
|
+
"openlib": "0.1.1"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=24.18.0"
|