@finalai/agent-definition 0.1.5 → 0.1.6

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.
@@ -7,7 +7,17 @@ import {
7
7
 
8
8
  // ../agent-provider/src/sandbox/types.ts
9
9
  var defineSandboxProvider = (definition) => ({
10
- definition,
10
+ // An implementation exists only once its options are given, so awaitRunning is
11
+ // checked as each environment is defined, before anything can start from it.
12
+ definition: {
13
+ ...definition,
14
+ environment: (options) => {
15
+ const implementation = definition.environment(options);
16
+ if (typeof implementation.awaitRunning !== "function")
17
+ throw new Error(`sandbox provider ${definition.name} does not implement awaitRunning`);
18
+ return implementation;
19
+ }
20
+ },
11
21
  name: definition.name,
12
22
  environment: (options) => ({
13
23
  providerName: definition.name,
@@ -15,7 +15,7 @@ import {
15
15
  defineSandbox,
16
16
  defineSandboxProvider,
17
17
  harnessHost
18
- } from "../../chunk-B5RJDCXZ.ts";
18
+ } from "../../chunk-OEXIS2VK.ts";
19
19
  import "../../chunk-4E5HECVD.ts";
20
20
  import {
21
21
  SandboxWire
@@ -3,7 +3,7 @@ import {
3
3
  defineSandbox,
4
4
  defineSandboxProvider,
5
5
  harnessHost
6
- } from "../../chunk-B5RJDCXZ.ts";
6
+ } from "../../chunk-OEXIS2VK.ts";
7
7
  import "../../chunk-4E5HECVD.ts";
8
8
  import {
9
9
  SandboxWire
@@ -28,7 +28,7 @@ import {
28
28
  defineSandbox,
29
29
  defineSandboxProvider,
30
30
  harnessHost
31
- } from "../chunk-B5RJDCXZ.ts";
31
+ } from "../chunk-OEXIS2VK.ts";
32
32
  import "../chunk-4E5HECVD.ts";
33
33
  import {
34
34
  SandboxWire
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finalai/agent-definition",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "description": "Provider-independent agent authoring, manifest schemas, directory compiler, and harness compatibility reports.",
6
6
  "license": "Apache-2.0",
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@finalai/agent-protocol": "0.1.4",
79
- "@finalai/agent-provider": "0.1.6",
79
+ "@finalai/agent-provider": "0.1.7",
80
80
  "ajv": "^8.20.0",
81
81
  "ajv-formats": "^3.0.1",
82
82
  "croner": "^10.0.1",