@objectstack/platform-objects 7.2.0 → 7.3.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.
@@ -8,9 +8,13 @@ var SETUP_APP = {
8
8
  icon: "settings",
9
9
  active: true,
10
10
  isDefault: false,
11
- // ADR-0010 — core admin UI must not be overlay-edited or deleted.
12
- _lock: "full",
13
- _lockReason: "Core admin UI shipped by @objectstack/platform-objects \u2014 see ADR-0010.",
11
+ // ADR-0010 §3.7 author-facing protection block. Loader translates
12
+ // this into the `_lock` envelope at registration time.
13
+ protection: {
14
+ lock: "full",
15
+ reason: "Core admin UI shipped by @objectstack/platform-objects \u2014 see ADR-0010.",
16
+ docsUrl: "https://docs.objectstack.ai/adr/0010-metadata-protection"
17
+ },
14
18
  branding: {
15
19
  primaryColor: "#475569"
16
20
  // Slate-600 — neutral admin palette
@@ -237,11 +241,41 @@ var STUDIO_APP = {
237
241
  icon: "hammer",
238
242
  active: true,
239
243
  isDefault: false,
244
+ // Studio is the metadata-authoring host, so its ambient copilot is
245
+ // pinned to the schema-architect agent. Resolved by the ambient chat
246
+ // endpoint via `app.defaultAgent` — no UI-side `?agent=` override
247
+ // needed. Every other app falls back to the data-query agent.
248
+ defaultAgent: "metadata_assistant",
240
249
  branding: {
241
250
  primaryColor: "#6366f1"
242
251
  // Indigo-500 — distinct from Setup's slate
243
252
  },
244
253
  requiredPermissions: ["studio.access"],
254
+ contextSelectors: [
255
+ {
256
+ // Package scope — pinned to the sidebar header. Selecting a package
257
+ // injects `{active_package}` into every `metadata:resource` nav
258
+ // item below, so the whole workbench filters to that package in
259
+ // one click. Options come from the installed-packages REST surface,
260
+ // narrowed to project-scoped packages: this dropdown exists so
261
+ // third-party developers can scope to *their* custom package, so we
262
+ // deliberately hide the platform's own system/cloud kernel packages
263
+ // (auth, security, audit, queue, …) which are not user-authored.
264
+ id: "active_package",
265
+ label: "Package",
266
+ icon: "package",
267
+ optionsSource: {
268
+ endpoint: "/api/v1/packages",
269
+ valueKey: "manifest.id",
270
+ labelKey: "manifest.name",
271
+ filter: [{ key: "manifest.scope", op: "nin", value: ["system", "cloud"] }]
272
+ },
273
+ includeAll: true,
274
+ allValue: "",
275
+ persist: "query",
276
+ placement: "sidebar_header"
277
+ }
278
+ ],
245
279
  navigation: [
246
280
  {
247
281
  id: "group_overview",
@@ -255,6 +289,13 @@ var STUDIO_APP = {
255
289
  label: "All Metadata Types",
256
290
  componentRef: "metadata:directory",
257
291
  icon: "layers"
292
+ },
293
+ {
294
+ id: "nav_packages",
295
+ type: "component",
296
+ label: "Packages",
297
+ componentRef: "developer:packages",
298
+ icon: "package"
258
299
  }
259
300
  ]
260
301
  },
@@ -272,7 +313,7 @@ var STUDIO_APP = {
272
313
  type: "component",
273
314
  label: "Objects",
274
315
  componentRef: "metadata:resource",
275
- params: { type: "object" },
316
+ params: { type: "object", package: "{active_package}" },
276
317
  icon: "box"
277
318
  },
278
319
  {
@@ -280,7 +321,7 @@ var STUDIO_APP = {
280
321
  type: "component",
281
322
  label: "Validations",
282
323
  componentRef: "metadata:resource",
283
- params: { type: "validation" },
324
+ params: { type: "validation", package: "{active_package}" },
284
325
  icon: "check-square"
285
326
  }
286
327
  ]
@@ -297,7 +338,7 @@ var STUDIO_APP = {
297
338
  type: "component",
298
339
  label: "Apps",
299
340
  componentRef: "metadata:resource",
300
- params: { type: "app" },
341
+ params: { type: "app", package: "{active_package}" },
301
342
  icon: "app-window"
302
343
  },
303
344
  {
@@ -305,7 +346,7 @@ var STUDIO_APP = {
305
346
  type: "component",
306
347
  label: "Views",
307
348
  componentRef: "metadata:resource",
308
- params: { type: "view" },
349
+ params: { type: "view", package: "{active_package}" },
309
350
  icon: "table"
310
351
  },
311
352
  {
@@ -313,7 +354,7 @@ var STUDIO_APP = {
313
354
  type: "component",
314
355
  label: "Pages",
315
356
  componentRef: "metadata:resource",
316
- params: { type: "page" },
357
+ params: { type: "page", package: "{active_package}" },
317
358
  icon: "file-text"
318
359
  },
319
360
  {
@@ -321,7 +362,7 @@ var STUDIO_APP = {
321
362
  type: "component",
322
363
  label: "Dashboards",
323
364
  componentRef: "metadata:resource",
324
- params: { type: "dashboard" },
365
+ params: { type: "dashboard", package: "{active_package}" },
325
366
  icon: "layout-dashboard"
326
367
  },
327
368
  {
@@ -329,7 +370,7 @@ var STUDIO_APP = {
329
370
  type: "component",
330
371
  label: "Reports",
331
372
  componentRef: "metadata:resource",
332
- params: { type: "report" },
373
+ params: { type: "report", package: "{active_package}" },
333
374
  icon: "bar-chart-3"
334
375
  }
335
376
  ]
@@ -346,7 +387,7 @@ var STUDIO_APP = {
346
387
  type: "component",
347
388
  label: "Actions",
348
389
  componentRef: "metadata:resource",
349
- params: { type: "action" },
390
+ params: { type: "action", package: "{active_package}" },
350
391
  icon: "mouse-pointer-click"
351
392
  },
352
393
  {
@@ -354,7 +395,7 @@ var STUDIO_APP = {
354
395
  type: "component",
355
396
  label: "Hooks",
356
397
  componentRef: "metadata:resource",
357
- params: { type: "hook" },
398
+ params: { type: "hook", package: "{active_package}" },
358
399
  icon: "webhook"
359
400
  }
360
401
  ]
@@ -371,7 +412,7 @@ var STUDIO_APP = {
371
412
  type: "component",
372
413
  label: "Flows",
373
414
  componentRef: "metadata:resource",
374
- params: { type: "flow" },
415
+ params: { type: "flow", package: "{active_package}" },
375
416
  icon: "git-branch"
376
417
  },
377
418
  {
@@ -379,7 +420,7 @@ var STUDIO_APP = {
379
420
  type: "component",
380
421
  label: "Workflow Rules",
381
422
  componentRef: "metadata:resource",
382
- params: { type: "workflow" },
423
+ params: { type: "workflow", package: "{active_package}" },
383
424
  icon: "zap"
384
425
  },
385
426
  {
@@ -387,7 +428,7 @@ var STUDIO_APP = {
387
428
  type: "component",
388
429
  label: "Approval Processes",
389
430
  componentRef: "metadata:resource",
390
- params: { type: "approval" },
431
+ params: { type: "approval", package: "{active_package}" },
391
432
  icon: "check-circle"
392
433
  }
393
434
  ]
@@ -406,7 +447,7 @@ var STUDIO_APP = {
406
447
  type: "component",
407
448
  label: "Agents",
408
449
  componentRef: "metadata:resource",
409
- params: { type: "agent" },
450
+ params: { type: "agent", package: "{active_package}" },
410
451
  icon: "bot"
411
452
  },
412
453
  {
@@ -414,7 +455,7 @@ var STUDIO_APP = {
414
455
  type: "component",
415
456
  label: "Tools",
416
457
  componentRef: "metadata:resource",
417
- params: { type: "tool" },
458
+ params: { type: "tool", package: "{active_package}" },
418
459
  icon: "wrench"
419
460
  },
420
461
  {
@@ -422,7 +463,7 @@ var STUDIO_APP = {
422
463
  type: "component",
423
464
  label: "Skills",
424
465
  componentRef: "metadata:resource",
425
- params: { type: "skill" },
466
+ params: { type: "skill", package: "{active_package}" },
426
467
  icon: "brain"
427
468
  }
428
469
  ]
@@ -475,7 +516,7 @@ var STUDIO_APP = {
475
516
  type: "component",
476
517
  label: "Email Templates",
477
518
  componentRef: "metadata:resource",
478
- params: { type: "email_template" },
519
+ params: { type: "email_template", package: "{active_package}" },
479
520
  icon: "mail"
480
521
  }
481
522
  ]