busa-cli 0.19.2 → 0.20.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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runCli } from "./run-ZDakuDNP.js";
2
+ import { n as runCli } from "./run-Cx9V5brn.js";
3
3
  //#region src/cli.ts
4
4
  process.exit(await runCli(process.argv.slice(2)));
5
5
  //#endregion
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as runCli, r as render, t as HELP } from "./run-ZDakuDNP.js";
1
+ import { n as runCli, r as render, t as HELP } from "./run-Cx9V5brn.js";
2
2
  import { DEFAULT_BASE_URL, createBusabaseClient, normalizeBaseUrl } from "busabase-sdk";
3
3
  export { DEFAULT_BASE_URL, HELP, createBusabaseClient, normalizeBaseUrl, render, runCli };
@@ -4992,6 +4992,23 @@ const userRefSchema = z.object({
4992
4992
  image: z.string().nullable(),
4993
4993
  role: z.string().nullable().optional()
4994
4994
  });
4995
+ const sourceChannelSchema = z.enum([
4996
+ "web_ui",
4997
+ "browser",
4998
+ "openapi",
4999
+ "sdk",
5000
+ "cli",
5001
+ "mcp",
5002
+ "skill",
5003
+ "webhook",
5004
+ "automation",
5005
+ "import"
5006
+ ]);
5007
+ const sourceAttributionSchema = z.object({
5008
+ displayName: z.string().nullable(),
5009
+ ownerName: z.string().nullable(),
5010
+ channel: sourceChannelSchema.nullable()
5011
+ });
4995
5012
  const commitSchema = z.object({
4996
5013
  id: z.string(),
4997
5014
  baseId: z.string().nullable(),
@@ -5083,6 +5100,7 @@ const changeRequestSchema = z.object({
5083
5100
  status: changeRequestStatusSchema,
5084
5101
  submittedBy: z.string(),
5085
5102
  submittedByUser: userRefSchema.nullable().optional().default(null),
5103
+ sourceAttribution: sourceAttributionSchema.nullable().optional(),
5086
5104
  sourceMeta: z.record(z.string(), z.unknown()),
5087
5105
  reviewPolicySnapshot: z.record(z.string(), z.unknown()),
5088
5106
  mergeSummary: z.record(z.string(), z.unknown()),
@@ -5171,6 +5189,7 @@ z.object({
5171
5189
  action: auditActionSchema,
5172
5190
  actorId: z.string(),
5173
5191
  actor: userRefSchema.nullable().optional().default(null),
5192
+ sourceAttribution: sourceAttributionSchema.nullable().optional(),
5174
5193
  baseId: z.string().nullable(),
5175
5194
  recordId: z.string().nullable(),
5176
5195
  changeRequestId: z.string().nullable(),
@@ -5286,21 +5305,30 @@ z.object({
5286
5305
  /** Opaque base64 cursor (`createdAt|id`) for keyset pagination. */
5287
5306
  cursor: z.string().optional(),
5288
5307
  status: z.array(changeRequestStatusSchema).optional(),
5289
- mine: z.boolean().optional()
5308
+ mine: z.boolean().optional(),
5309
+ affectsNodeId: z.string().min(1).optional()
5290
5310
  }).optional().default({ limit: 50 });
5291
5311
  z.object({
5292
5312
  changeRequests: z.array(changeRequestSchema),
5293
5313
  nextCursor: z.string().nullable()
5294
5314
  });
5295
- z.object({
5315
+ const changeRequestPageInputShape = {
5296
5316
  page: z.coerce.number().int().min(1).optional().default(1),
5297
5317
  pageSize: z.coerce.number().int().min(1).max(100).optional().default(50),
5298
5318
  status: z.array(changeRequestStatusSchema).optional(),
5299
5319
  mine: z.boolean().optional()
5320
+ };
5321
+ z.object({
5322
+ ...changeRequestPageInputShape,
5323
+ affectsNodeId: z.string().min(1).optional()
5300
5324
  }).optional().default({
5301
5325
  page: 1,
5302
5326
  pageSize: 50
5303
5327
  });
5328
+ z.object(changeRequestPageInputShape).optional().default({
5329
+ page: 1,
5330
+ pageSize: 50
5331
+ });
5304
5332
  const listChangeRequestsPageResponseSchema = z.object({
5305
5333
  changeRequests: z.array(changeRequestSchema),
5306
5334
  total: z.number().int().nonnegative(),
@@ -9318,6 +9346,7 @@ function resolveConfig(opts) {
9318
9346
  webUrl: process.env.BUSABASE_WEB_URL ?? file.BUSABASE_WEB_URL ?? baseUrl,
9319
9347
  apiKey: opts.apiKey ?? process.env.BUSABASE_API_KEY ?? file.BUSABASE_API_KEY,
9320
9348
  spaceId: opts.spaceId ?? process.env.BUSABASE_SPACE_ID ?? file.BUSABASE_SPACE_ID,
9349
+ sourceChannel: "cli",
9321
9350
  output: opts.output ?? configuredOutput() ?? "text",
9322
9351
  fetch: withRetry(fetch, { retries: opts.retries ?? DEFAULT_RETRIES })
9323
9352
  };
@@ -9464,7 +9493,8 @@ async function rawFetch(config, method, path, body) {
9464
9493
  headers: {
9465
9494
  ...body !== void 0 ? { "content-type": "application/json" } : {},
9466
9495
  ...config.apiKey ? { authorization: `Bearer ${config.apiKey}` } : {},
9467
- ...config.spaceId ? { "x-busabase-space": config.spaceId } : {}
9496
+ ...config.spaceId ? { "x-busabase-space": config.spaceId } : {},
9497
+ "x-busabase-channel": "cli"
9468
9498
  },
9469
9499
  body: body !== void 0 ? JSON.stringify(body) : void 0
9470
9500
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busa-cli",
3
- "version": "0.19.2",
3
+ "version": "0.20.0",
4
4
  "description": "Command-line client for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server`. Short-name alias for busabase-cli.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-cli",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@zip.js/zip.js": "^2.8.20",
35
35
  "busabase-package": "workspace:*",
36
- "busabase-sdk": "0.19.2",
36
+ "busabase-sdk": "0.20.0",
37
37
  "commander": "^14.0.0",
38
38
  "tar-stream": "^3.1.7",
39
39
  "yaml": "^2.9.0",