@you-agent-factory/client 0.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Port
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # `@you-agent-factory/client`
2
+
3
+ Framework-neutral TypeScript contracts for You Agent Factory consumers.
4
+
5
+ The package exports the generated OpenAPI `components`, `paths`, and
6
+ `operations` namespaces together with stable `FactoryEvent`,
7
+ `FactoryEventType`, `FactoryDefinition`, and `FactoryRecording` aliases.
8
+ Generated symbols remain available through `@you-agent-factory/client/generated/openapi`.
9
+
10
+ `parseFactoryRecording` validates unknown input against the canonical recording
11
+ schema and replay-safe cross-event invariants, returning the original typed
12
+ recording on success. It throws `FactoryRecordingValidationError` with
13
+ structured issues on failure. `safeParseFactoryRecording` performs the same
14
+ validation without throwing and returns a discriminated success or failure
15
+ result.
16
+
17
+ The chapter-free example recording is published as raw JSON at
18
+ `@you-agent-factory/client/recordings/example`. It contains one Factory Session,
19
+ the required topology bootstrap, and canonically ordered Factory Events.
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@you-agent-factory/client",
3
+ "version": "0.0.0",
4
+ "description": "Framework-neutral Factory contracts and recording validation for you-agent-factory consumers.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/portpowered/you-agent-factory.git"
9
+ },
10
+ "type": "module",
11
+ "files": [
12
+ "README.md",
13
+ "LICENSE.md",
14
+ "recordings",
15
+ "src"
16
+ ],
17
+ "types": "./src/index.ts",
18
+ "dependencies": {
19
+ "ajv": "^8.20.0",
20
+ "ajv-formats": "^3.0.1"
21
+ },
22
+ "exports": {
23
+ ".": {
24
+ "types": "./src/index.ts",
25
+ "import": "./src/index.js"
26
+ },
27
+ "./generated/openapi": {
28
+ "types": "./src/generated/openapi.ts"
29
+ },
30
+ "./recordings/example": "./recordings/factory-recording.json"
31
+ }
32
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "schemaVersion": "agent-factory.recording.v1",
3
+ "sessionId": "example-session",
4
+ "events": [
5
+ {
6
+ "schemaVersion": "agent-factory.event.v1",
7
+ "id": "example-event-1",
8
+ "type": "INITIAL_STRUCTURE_REQUEST",
9
+ "context": {
10
+ "sequence": 0,
11
+ "tick": 0,
12
+ "eventTime": "2026-07-18T00:00:00Z",
13
+ "sessionId": "example-session"
14
+ },
15
+ "payload": {
16
+ "factory": {
17
+ "name": "packaged-recording-example"
18
+ }
19
+ }
20
+ },
21
+ {
22
+ "schemaVersion": "agent-factory.event.v1",
23
+ "id": "example-event-2",
24
+ "type": "SESSION_STARTED",
25
+ "context": {
26
+ "sequence": 1,
27
+ "tick": 1,
28
+ "eventTime": "2026-07-18T00:00:01Z",
29
+ "sessionId": "example-session"
30
+ },
31
+ "payload": {
32
+ "startedAt": "2026-07-18T00:00:01Z"
33
+ }
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,13 @@
1
+ import type { components } from "./generated/openapi.js";
2
+
3
+ /** A canonical event emitted by the Factory runtime. */
4
+ export type FactoryEvent = components["schemas"]["FactoryEvent"];
5
+
6
+ /** The customer-visible canonical Factory event vocabulary. */
7
+ export type FactoryEventType = components["schemas"]["FactoryEventType"];
8
+
9
+ /** A complete authored Factory definition. */
10
+ export type FactoryDefinition = components["schemas"]["Factory"];
11
+
12
+ /** A chapter-free, ordered event recording for one Factory Session. */
13
+ export type FactoryRecording = components["schemas"]["FactoryRecording"];