@qaick/runtime 0.1.0-alpha.1 → 0.1.0-alpha.3

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/README.md CHANGED
@@ -12,6 +12,6 @@ const run = await runtime.execute(request);
12
12
  const result = await run.result;
13
13
  ```
14
14
 
15
- The package requires Node 20 or newer and `@qaick/executor` as a peer dependency.
15
+ The package requires Node 20 or newer and includes `@qaick/executor` as its execution dependency. Hosts may inject a compatible Executor implementation through `createRuntime({ executor })`.
16
16
 
17
17
  For local development, run `npm run typecheck`, `npm test`, and `npm run build`. Use `npm pack --dry-run` to inspect the publication contents.
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './runtime.js';
2
+ export { InMemoryActionExecutor } from '@qaick/executor';
3
+ export type { ActionExecutionContext, ActionExecutionResult, ActionExecutor, ControlCommand, ExecutionControlState, ExecutorEvent, ExecutorRequest, ExecutorResult, ExecutorRun, } from '@qaick/executor';
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from './runtime.js';
2
+ export { InMemoryActionExecutor } from '@qaick/executor';
package/dist/runtime.d.ts CHANGED
@@ -2,7 +2,16 @@ import type { ActionExecutor, ControlCommand, ExecutionControlState, Executor, E
2
2
  export interface RuntimeConfiguration extends ExecutorConfiguration {
3
3
  executor?: Executor;
4
4
  }
5
+ export declare const RUNTIME_VERSION: "0.1.0-alpha.2";
6
+ export type RuntimeCapability = 'execution' | 'controls' | 'events' | 'results' | 'retries' | 'run-from-here' | 'action-executors';
7
+ export interface RuntimeInfo {
8
+ name: '@qaick/runtime';
9
+ version: typeof RUNTIME_VERSION;
10
+ capabilities: readonly RuntimeCapability[];
11
+ }
5
12
  export interface QaickRuntime {
13
+ /** Optional for compatibility with Executor implementations used as local adapters. */
14
+ info?(): RuntimeInfo;
6
15
  execute(request: ExecutorRequest): Promise<ExecutorRun>;
7
16
  cancel(requestId: string): Promise<void>;
8
17
  control(requestId: string, command: ControlCommand): Promise<void>;
package/dist/runtime.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { createMigratedExecutor } from '@qaick/executor';
2
+ export const RUNTIME_VERSION = '0.1.0-alpha.2';
3
+ const EXECUTION_ID_RUNTIME_VALUE = '__qaick_execution_id';
2
4
  export function createRuntime(configuration = {}) {
3
5
  return new ComposedQaickRuntime(configuration.executor ?? createMigratedExecutor(configuration));
4
6
  }
@@ -7,7 +9,19 @@ class ComposedQaickRuntime {
7
9
  constructor(executor) {
8
10
  this.executor = executor;
9
11
  }
10
- execute(request) { return this.executor.execute(request); }
12
+ info() {
13
+ return {
14
+ name: '@qaick/runtime',
15
+ version: RUNTIME_VERSION,
16
+ capabilities: ['execution', 'controls', 'events', 'results', 'retries', 'run-from-here', 'action-executors'],
17
+ };
18
+ }
19
+ execute(request) {
20
+ return this.executor.execute({
21
+ ...request,
22
+ runtimeValues: { ...(request.runtimeValues ?? {}), [EXECUTION_ID_RUNTIME_VALUE]: request.requestId },
23
+ });
24
+ }
11
25
  cancel(requestId) { return this.executor.cancel(requestId); }
12
26
  control(requestId, command) { return this.executor.control(requestId, command); }
13
27
  controlState(requestId) { return this.executor.controlState(requestId); }
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@qaick/runtime",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Host-neutral composition layer for QAick execution.",
5
5
  "type": "module",
6
- "files": ["dist", "README.md"],
7
- "engines": { "node": ">=20" },
8
- "publishConfig": { "access": "public", "tag": "alpha" },
6
+ "files": [
7
+ "dist",
8
+ "README.md"
9
+ ],
10
+ "engines": {
11
+ "node": ">=20"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "tag": "alpha"
16
+ },
9
17
  "repository": {
10
18
  "type": "git",
11
19
  "url": "git+https://github.com/vladmus/QAICK_Runtime.git"
@@ -24,11 +32,11 @@
24
32
  "test": "vitest run",
25
33
  "prepublishOnly": "npm run typecheck && npm test && npm run build"
26
34
  },
27
- "peerDependencies": {
28
- "@qaick/executor": ">=0.1.0-alpha.1 <0.2.0"
35
+ "dependencies": {
36
+ "@qaick/executor": "^0.1.0-alpha.1"
29
37
  },
30
38
  "devDependencies": {
31
- "@qaick/executor": "file:../QAICK_Executor",
39
+ "@qaick/http-executor": "0.1.0-alpha.3",
32
40
  "typescript": "~6.0.2",
33
41
  "vitest": "^5.0.0"
34
42
  }