@elevasis/core 0.34.0 → 0.34.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/core",
3
- "version": "0.34.0",
3
+ "version": "0.34.2",
4
4
  "license": "MIT",
5
5
  "description": "Minimal shared constants across Elevasis monorepo",
6
6
  "sideEffects": false,
@@ -409,10 +409,10 @@ describe('validateResourceGovernance', () => {
409
409
  ...extras
410
410
  })
411
411
 
412
- it('passes when code resources are descriptor-backed and match active OM Resources and Systems', () => {
413
- const result = validateResourceGovernance(
414
- 'test-org',
415
- {
412
+ it('passes when code resources are descriptor-backed and match active OM Resources and Systems', () => {
413
+ const result = validateResourceGovernance(
414
+ 'test-org',
415
+ {
416
416
  version: '1.0.0',
417
417
  workflows: [createGovernedWorkflow()]
418
418
  },
@@ -420,13 +420,38 @@ describe('validateResourceGovernance', () => {
420
420
  { mode: 'strict' }
421
421
  )
422
422
 
423
- expect(result.valid).toBe(true)
424
- expect(result.issues).toEqual([])
425
- })
426
-
427
- it('throws in strict mode when an active OM resource has no code-side resource', () => {
428
- expect(() =>
429
- validateResourceGovernance(
423
+ expect(result.valid).toBe(true)
424
+ expect(result.issues).toEqual([])
425
+ })
426
+
427
+ it('allows active platform agents to be registered outside the SDK deployment bundle', () => {
428
+ const platformAgentResource: ResourceEntry = {
429
+ id: 'command-center-assistant',
430
+ kind: 'agent',
431
+ systemPath: 'sys.lead-gen',
432
+ status: 'active',
433
+ agentKind: 'platform',
434
+ sessionCapable: true,
435
+ order: 20
436
+ }
437
+
438
+ const result = validateResourceGovernance(
439
+ 'test-org',
440
+ {
441
+ version: '1.0.0',
442
+ workflows: [createGovernedWorkflow()]
443
+ },
444
+ createModel([workflowResource, platformAgentResource]),
445
+ { mode: 'strict' }
446
+ )
447
+
448
+ expect(result.valid).toBe(true)
449
+ expect(result.issues).toEqual([])
450
+ })
451
+
452
+ it('throws in strict mode when an active OM resource has no code-side resource', () => {
453
+ expect(() =>
454
+ validateResourceGovernance(
430
455
  'test-org',
431
456
  {
432
457
  version: '1.0.0',
@@ -150,6 +150,10 @@ function getRuntimeResources(resources: DeploymentSpec): Array<{
150
150
  ]
151
151
  }
152
152
 
153
+ function isStaticPlatformAgentResource(resource: ResourceEntry): boolean {
154
+ return resource.kind === 'agent' && resource.agentKind === 'platform'
155
+ }
156
+
153
157
  function hasOntologySources(organizationModel: ResourceGovernanceModel): boolean {
154
158
  return (
155
159
  organizationModel.ontology !== undefined ||
@@ -376,6 +380,10 @@ export function validateResourceGovernance(
376
380
 
377
381
  const runtimeResource = runtimeResourcesById.get(resource.id)
378
382
  if (!runtimeResource) {
383
+ if (isStaticPlatformAgentResource(resource)) {
384
+ continue
385
+ }
386
+
379
387
  addGovernanceIssue(
380
388
  issues,
381
389
  'missing-code-resource',