@objectstack/core 1.0.12 → 2.0.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.
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * API Registry Example
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * ObjectKernel Features Example
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * Phase 2 Integration Example
3
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/core",
3
- "version": "1.0.12",
3
+ "version": "2.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Microkernel Core for ObjectStack",
6
6
  "type": "module",
@@ -22,7 +22,7 @@
22
22
  "pino": "^10.3.0",
23
23
  "pino-pretty": "^13.1.3",
24
24
  "zod": "^3.24.1",
25
- "@objectstack/spec": "1.0.12"
25
+ "@objectstack/spec": "2.0.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "pino": "^8.0.0"
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type { Plugin, PluginContext } from './types.js';
2
4
  import { ApiRegistry } from './api-registry.js';
3
5
  import type { ConflictResolutionStrategy } from '@objectstack/spec/api';
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  ApiRegistry as ApiRegistryType,
3
5
  ApiRegistryEntry,
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import {
2
4
  DataEngineQueryOptions,
3
5
  DataEngineInsertOptions,
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * IHttpServer - Standard HTTP Server Interface
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * Logger Contract
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  SemanticVersion,
3
5
  VersionConstraint,
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  PluginHealthStatus,
3
5
  PluginHealthCheck,
package/src/hot-reload.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  HotReloadConfig,
3
5
  PluginStateSnapshot
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * @objectstack/core
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type { Plugin, PluginContext } from './types.js';
2
4
  import type { Logger } from '@objectstack/spec/contracts';
3
5
  import type { IServiceRegistry } from '@objectstack/spec/contracts';
package/src/kernel.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { Plugin, PluginContext } from './types.js';
2
4
  import { createLogger, ObjectLogger } from './logger.js';
3
5
  import type { LoggerConfig } from '@objectstack/spec/system';
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { Plugin } from './types.js';
2
4
  import { createLogger, ObjectLogger } from './logger.js';
3
5
  import type { LoggerConfig } from '@objectstack/spec/system';
package/src/logger.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type { LoggerConfig, LogLevel } from '@objectstack/spec/system';
2
4
  import type { Logger } from '@objectstack/spec/contracts';
3
5
  import { isNode } from './utils/env.js';
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { Plugin, PluginContext } from './types.js';
2
4
  import type { Logger } from '@objectstack/spec/contracts';
3
5
  import { z } from 'zod';
package/src/qa/adapter.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { QA } from '@objectstack/spec';
2
4
 
3
5
  /**
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { QA } from '@objectstack/spec';
2
4
  import { TestExecutionAdapter } from './adapter.js';
3
5
 
package/src/qa/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  export * from './adapter.js';
2
4
  export * from './runner.js';
3
5
  export * from './http-adapter.js';
package/src/qa/runner.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { QA } from '@objectstack/spec';
2
4
  import { TestExecutionAdapter } from './adapter.js';
3
5
 
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * Security Module
3
5
  *
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  Permission,
3
5
  PermissionSet,
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { z } from 'zod';
2
4
  import type { Logger } from '@objectstack/spec/contracts';
3
5
  import type { PluginMetadata } from '../plugin-loader.js';
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type { Logger } from '@objectstack/spec/contracts';
2
4
  import type { PluginCapability } from '@objectstack/spec/kernel';
3
5
  import type { PluginContext } from '../types.js';
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type { Logger } from '@objectstack/spec/contracts';
2
4
  import type { PluginMetadata } from '../plugin-loader.js';
3
5
 
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
4
  SandboxConfig
3
5
  } from '@objectstack/spec/kernel';
@@ -1,6 +1,8 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import type {
2
- SecurityVulnerability,
3
- SecurityScanResult
4
+ KernelSecurityVulnerability,
5
+ KernelSecurityScanResult
4
6
  } from '@objectstack/spec/kernel';
5
7
  import type { ObjectLogger } from '../logger.js';
6
8
 
@@ -42,10 +44,10 @@ export class PluginSecurityScanner {
42
44
  private logger: ObjectLogger;
43
45
 
44
46
  // Known vulnerabilities database (CVE cache)
45
- private vulnerabilityDb = new Map<string, SecurityVulnerability>();
47
+ private vulnerabilityDb = new Map<string, KernelSecurityVulnerability>();
46
48
 
47
49
  // Scan results cache
48
- private scanResults = new Map<string, SecurityScanResult>();
50
+ private scanResults = new Map<string, KernelSecurityScanResult>();
49
51
 
50
52
  private passThreshold: number = 70;
51
53
 
@@ -59,7 +61,7 @@ export class PluginSecurityScanner {
59
61
  /**
60
62
  * Perform a comprehensive security scan on a plugin
61
63
  */
62
- async scan(target: ScanTarget): Promise<SecurityScanResult> {
64
+ async scan(target: ScanTarget): Promise<KernelSecurityScanResult> {
63
65
  this.logger.info('Starting security scan', {
64
66
  pluginId: target.pluginId,
65
67
  version: target.version
@@ -91,7 +93,7 @@ export class PluginSecurityScanner {
91
93
  // Calculate security score (0-100, higher is better)
92
94
  const score = this.calculateSecurityScore(issues);
93
95
 
94
- const result: SecurityScanResult = {
96
+ const result: KernelSecurityScanResult = {
95
97
  timestamp: new Date().toISOString(),
96
98
  scanner: { name: 'ObjectStack Security Scanner', version: '1.0.0' },
97
99
  status: score >= this.passThreshold ? 'passed' : 'failed',
@@ -309,7 +311,7 @@ export class PluginSecurityScanner {
309
311
  addVulnerability(
310
312
  packageName: string,
311
313
  version: string,
312
- vulnerability: SecurityVulnerability
314
+ vulnerability: KernelSecurityVulnerability
313
315
  ): void {
314
316
  const key = `${packageName}@${version}`;
315
317
  this.vulnerabilityDb.set(key, vulnerability);
@@ -324,7 +326,7 @@ export class PluginSecurityScanner {
324
326
  /**
325
327
  * Get scan result from cache
326
328
  */
327
- getScanResult(pluginId: string, version: string): SecurityScanResult | undefined {
329
+ getScanResult(pluginId: string, version: string): KernelSecurityScanResult | undefined {
328
330
  return this.scanResults.get(`${pluginId}:${version}`);
329
331
  }
330
332
 
package/src/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { ObjectKernel } from './kernel.js';
2
4
  import type { Logger } from '@objectstack/spec/contracts';
3
5
 
package/src/utils/env.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  /**
2
4
  * Environment utilities for universal (Node/Browser) compatibility.
3
5
  */
package/vitest.config.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+
1
3
  import { defineConfig } from 'vitest/config';
2
4
 
3
5
  export default defineConfig({