@adobe/data 0.9.29 → 0.9.31
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/dist/service/agentic-service/create.d.ts +26 -21
- package/dist/service/agentic-service/create.js +33 -20
- package/dist/service/agentic-service/create.js.map +1 -1
- package/dist/service/agentic-service/create.test.js +80 -106
- package/dist/service/agentic-service/create.test.js.map +1 -1
- package/dist/service/agentic-service/create.type-test.js +21 -26
- package/dist/service/agentic-service/create.type-test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,24 +5,30 @@ import { Observe } from "../../observe/index.js";
|
|
|
5
5
|
import { create, } from "./create.js";
|
|
6
6
|
const iface = {
|
|
7
7
|
health: {
|
|
8
|
-
type: "
|
|
8
|
+
type: "state",
|
|
9
|
+
schema: { type: "number" },
|
|
9
10
|
description: "Current health points",
|
|
10
11
|
},
|
|
11
12
|
stats: {
|
|
12
|
-
type: "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
type: "state",
|
|
14
|
+
schema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
hp: { type: "number" },
|
|
18
|
+
label: { type: "string" },
|
|
19
|
+
},
|
|
20
|
+
required: ["hp"],
|
|
21
|
+
additionalProperties: false,
|
|
17
22
|
},
|
|
18
|
-
|
|
19
|
-
additionalProperties: false,
|
|
23
|
+
description: "Current player stats",
|
|
20
24
|
},
|
|
21
25
|
heal: {
|
|
26
|
+
type: "action",
|
|
22
27
|
description: "Increase health by amount",
|
|
23
28
|
input: { type: "number" },
|
|
24
29
|
},
|
|
25
30
|
configure: {
|
|
31
|
+
type: "action",
|
|
26
32
|
description: "Configure stats",
|
|
27
33
|
input: {
|
|
28
34
|
type: "object",
|
|
@@ -35,11 +41,11 @@ const iface = {
|
|
|
35
41
|
},
|
|
36
42
|
},
|
|
37
43
|
reset: {
|
|
44
|
+
type: "action",
|
|
38
45
|
description: "Reset values",
|
|
39
46
|
},
|
|
40
47
|
};
|
|
41
48
|
create({
|
|
42
|
-
description: "Player health and actions for agentic access",
|
|
43
49
|
interface: iface,
|
|
44
50
|
implementation: {
|
|
45
51
|
health: Observe.fromConstant(42),
|
|
@@ -56,7 +62,6 @@ create({
|
|
|
56
62
|
},
|
|
57
63
|
});
|
|
58
64
|
create({
|
|
59
|
-
description: "Player health and actions for agentic access",
|
|
60
65
|
interface: iface,
|
|
61
66
|
implementation: {
|
|
62
67
|
// @ts-expect-error - health state requires Observe<number>
|
|
@@ -68,7 +73,6 @@ create({
|
|
|
68
73
|
},
|
|
69
74
|
});
|
|
70
75
|
create({
|
|
71
|
-
description: "Player health and actions for agentic access",
|
|
72
76
|
interface: iface,
|
|
73
77
|
implementation: {
|
|
74
78
|
health: Observe.fromConstant(100),
|
|
@@ -80,19 +84,16 @@ create({
|
|
|
80
84
|
},
|
|
81
85
|
});
|
|
82
86
|
create({
|
|
83
|
-
description: "Player health and actions for agentic access",
|
|
84
87
|
interface: iface,
|
|
85
88
|
implementation: {
|
|
86
89
|
health: Observe.fromConstant(100),
|
|
87
90
|
stats: Observe.fromConstant({ hp: 100 }),
|
|
88
91
|
heal: (input) => { },
|
|
89
92
|
configure: (input) => { },
|
|
90
|
-
|
|
91
|
-
reset: (input) => { },
|
|
93
|
+
reset: () => { },
|
|
92
94
|
},
|
|
93
95
|
});
|
|
94
96
|
create({
|
|
95
|
-
description: "Player health and actions for agentic access",
|
|
96
97
|
interface: iface,
|
|
97
98
|
// @ts-expect-error - implementation must include every definition key
|
|
98
99
|
implementation: {
|
|
@@ -103,7 +104,6 @@ create({
|
|
|
103
104
|
},
|
|
104
105
|
});
|
|
105
106
|
create({
|
|
106
|
-
description: "Player health and actions for agentic access",
|
|
107
107
|
interface: iface,
|
|
108
108
|
implementation: {
|
|
109
109
|
health: Observe.fromConstant(100),
|
|
@@ -118,22 +118,17 @@ create({
|
|
|
118
118
|
heal: Observe.fromConstant(1),
|
|
119
119
|
},
|
|
120
120
|
});
|
|
121
|
-
// Links:
|
|
121
|
+
// Links: declared in interface, supplied in implementation
|
|
122
122
|
const linkTarget = create({
|
|
123
|
-
description: "Link target",
|
|
124
123
|
interface: {},
|
|
125
124
|
implementation: {},
|
|
126
125
|
});
|
|
127
126
|
create({
|
|
128
|
-
description: "
|
|
129
|
-
|
|
130
|
-
implementation: {},
|
|
131
|
-
links: { other: linkTarget },
|
|
127
|
+
interface: { other: { type: "link", description: "Other service" } },
|
|
128
|
+
implementation: { other: linkTarget },
|
|
132
129
|
});
|
|
133
130
|
create({
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
implementation: {},
|
|
137
|
-
links: Observe.fromConstant({ other: linkTarget }),
|
|
131
|
+
interface: { other: { type: "link" } },
|
|
132
|
+
implementation: { other: Observe.fromConstant(linkTarget) },
|
|
138
133
|
});
|
|
139
134
|
//# sourceMappingURL=create.type-test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.type-test.js","sourceRoot":"","sources":["../../../src/service/agentic-service/create.type-test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,2CAA2C;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EACH,MAAM,GAET,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"create.type-test.js","sourceRoot":"","sources":["../../../src/service/agentic-service/create.type-test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,2CAA2C;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EACH,MAAM,GAET,MAAM,aAAa,CAAC;AAkBrB,MAAM,KAAK,GAAG;IACV,MAAM,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,WAAW,EAAE,uBAAuB;KACvC;IACD,KAAK,EAAE;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