@xtrape/capsule-agent-node 0.2.0 → 0.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.
package/README.md CHANGED
@@ -6,10 +6,7 @@
6
6
  [![Status: Public Review](https://img.shields.io/badge/status-Public%20Review-orange.svg)](https://xtrape-com.github.io/xtrape-capsule-site/)
7
7
  [![Docs](https://img.shields.io/badge/docs-xtrape--capsule--site-blue.svg)](https://xtrape-com.github.io/xtrape-capsule-site/agents/node-embedded-agent)
8
8
 
9
- `@xtrape/capsule-agent-node` embeds an Opstage Agent inside a Node.js service.
10
- The Agent registers with Opstage CE, persists its Agent token, sends heartbeats,
11
- reports service metadata, exposes configs and health, and polls Commands for
12
- operator-triggered Actions.
9
+ `@xtrape/capsule-agent-node` supports the stable Node.js Embedded Agent SDK path for single Capsule Services. For multi-service OpHub functionality, use OpHub (Go runtime).
13
10
 
14
11
  > **Package status:** Xtrape Capsule is currently in **Public Review** before
15
12
  > the `v0.1.0 Public Preview` release. This package is published under the
@@ -26,6 +23,10 @@ pnpm add @xtrape/capsule-agent-node@public-review
26
23
 
27
24
  The current Public Review version may change before `v0.1.0`.
28
25
 
26
+ During v0.3 development, this repository may use a local workspace, GitHub
27
+ branch dependency, or `0.3.0-rc.x` package for
28
+ `@xtrape/capsule-contracts-node` until the final `0.3.0` package is published.
29
+
29
30
  For this repository itself:
30
31
 
31
32
  ```bash
package/dist/index.d.cts CHANGED
@@ -1,12 +1,5 @@
1
- import { HealthReportInput, ConfigItemInput, ActionDefinitionInput, ReportedService, RegisterAgentRequest, AgentHeartbeatRequest, ServiceReportRequest, ReportCommandResultRequest } from '@xtrape/capsule-contracts-node';
1
+ import { ActionPrepareResult, RuntimeKind, HealthReportInput, ConfigItemInput, ActionDefinitionInput, ReportedService, RegisterAgentRequest, AgentHeartbeatRequest, ServiceReportRequest, ReportCommandResultRequest } from '@xtrape/capsule-contracts-node';
2
2
 
3
- type RuntimeKind = "nodejs" | "java" | "python" | "go" | "other";
4
- type ActionPrepareResult = {
5
- action?: Record<string, unknown>;
6
- inputSchema?: Record<string, unknown>;
7
- initialPayload?: Record<string, unknown>;
8
- currentState?: Record<string, unknown>;
9
- };
10
3
  type AgentMode = "embedded";
11
4
  type ActionHandler = (payload: Record<string, unknown>) => Promise<{
12
5
  success?: boolean;
@@ -209,4 +202,4 @@ declare class AgentApiClient {
209
202
  reportResult(agentId: string, token: string, commandId: string, req: ReportCommandResultRequest): Promise<unknown>;
210
203
  }
211
204
 
212
- export { type ActionHandler, type ActionPrepareHandler, type ActionPrepareResult, AgentApiClient, AgentApiError, AgentAuthError, type AgentLogLevel, type AgentLogRecord, type AgentMode, CapsuleAgent, type CapsuleAgentOptions, type ConfigProvider, type ConsoleLogger, FileTokenStore, type HealthProvider, NetworkError, type RegisteredAction, RegistrationError, type RuntimeKind, type ServiceSnapshot, type StructuredLogger, type TokenStore };
205
+ export { type ActionHandler, type ActionPrepareHandler, AgentApiClient, AgentApiError, AgentAuthError, type AgentLogLevel, type AgentLogRecord, type AgentMode, CapsuleAgent, type CapsuleAgentOptions, type ConfigProvider, type ConsoleLogger, FileTokenStore, type HealthProvider, NetworkError, type RegisteredAction, RegistrationError, type ServiceSnapshot, type StructuredLogger, type TokenStore };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,5 @@
1
- import { HealthReportInput, ConfigItemInput, ActionDefinitionInput, ReportedService, RegisterAgentRequest, AgentHeartbeatRequest, ServiceReportRequest, ReportCommandResultRequest } from '@xtrape/capsule-contracts-node';
1
+ import { ActionPrepareResult, RuntimeKind, HealthReportInput, ConfigItemInput, ActionDefinitionInput, ReportedService, RegisterAgentRequest, AgentHeartbeatRequest, ServiceReportRequest, ReportCommandResultRequest } from '@xtrape/capsule-contracts-node';
2
2
 
3
- type RuntimeKind = "nodejs" | "java" | "python" | "go" | "other";
4
- type ActionPrepareResult = {
5
- action?: Record<string, unknown>;
6
- inputSchema?: Record<string, unknown>;
7
- initialPayload?: Record<string, unknown>;
8
- currentState?: Record<string, unknown>;
9
- };
10
3
  type AgentMode = "embedded";
11
4
  type ActionHandler = (payload: Record<string, unknown>) => Promise<{
12
5
  success?: boolean;
@@ -209,4 +202,4 @@ declare class AgentApiClient {
209
202
  reportResult(agentId: string, token: string, commandId: string, req: ReportCommandResultRequest): Promise<unknown>;
210
203
  }
211
204
 
212
- export { type ActionHandler, type ActionPrepareHandler, type ActionPrepareResult, AgentApiClient, AgentApiError, AgentAuthError, type AgentLogLevel, type AgentLogRecord, type AgentMode, CapsuleAgent, type CapsuleAgentOptions, type ConfigProvider, type ConsoleLogger, FileTokenStore, type HealthProvider, NetworkError, type RegisteredAction, RegistrationError, type RuntimeKind, type ServiceSnapshot, type StructuredLogger, type TokenStore };
205
+ export { type ActionHandler, type ActionPrepareHandler, AgentApiClient, AgentApiError, AgentAuthError, type AgentLogLevel, type AgentLogRecord, type AgentMode, CapsuleAgent, type CapsuleAgentOptions, type ConfigProvider, type ConsoleLogger, FileTokenStore, type HealthProvider, NetworkError, type RegisteredAction, RegistrationError, type ServiceSnapshot, type StructuredLogger, type TokenStore };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xtrape/capsule-agent-node",
3
- "version": "0.2.0",
4
- "description": "Node.js Agent SDK for embedding Capsule Services into the Opstage governance loop.",
3
+ "version": "0.3.0",
4
+ "description": "Node.js Embedded Agent SDK for embedding single Capsule Services into the Opstage governance loop. For multi-service OpHub functionality, use OpHub (Go runtime).",
5
5
  "keywords": [
6
6
  "xtrape",
7
7
  "capsule",
@@ -35,14 +35,21 @@
35
35
  "LICENSE",
36
36
  "NOTICE"
37
37
  ],
38
+ "scripts": {
39
+ "build": "tsup src/index.ts --format esm,cjs --dts",
40
+ "prepack": "pnpm build",
41
+ "test": "vitest run",
42
+ "typecheck": "tsc --noEmit",
43
+ "lint": "tsc --noEmit"
44
+ },
38
45
  "dependencies": {
39
- "@xtrape/capsule-contracts-node": "^0.2.0"
46
+ "@xtrape/capsule-contracts-node": "0.3.0"
40
47
  },
41
48
  "devDependencies": {
49
+ "@types/node": "^22.10.2",
42
50
  "tsup": "^8.3.5",
43
51
  "typescript": "^5.6.3",
44
- "vitest": "^2.1.9",
45
- "@types/node": "^22.10.2"
52
+ "vitest": "^2.1.9"
46
53
  },
47
54
  "engines": {
48
55
  "node": ">=20"
@@ -51,11 +58,5 @@
51
58
  "registry": "https://registry.npmjs.org/",
52
59
  "access": "public"
53
60
  },
54
- "license": "Apache-2.0",
55
- "scripts": {
56
- "build": "tsup src/index.ts --format esm,cjs --dts",
57
- "test": "vitest run",
58
- "typecheck": "tsc --noEmit",
59
- "lint": "tsc --noEmit"
60
- }
61
- }
61
+ "license": "Apache-2.0"
62
+ }