@assemble-dev/shared-types 0.1.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.
@@ -0,0 +1,53 @@
1
+ import {
2
+ AgentCompletedEventSchema,
3
+ AgentFailedEventSchema,
4
+ AgentStartedEventSchema,
5
+ ApprovalApprovedEventSchema,
6
+ ApprovalRejectedEventSchema,
7
+ ApprovalRequiredEventSchema,
8
+ EvalCompletedEventSchema,
9
+ EvalStartedEventSchema,
10
+ PolicyEvaluatedEventSchema,
11
+ ReplayCompletedEventSchema,
12
+ ReplayStartedEventSchema,
13
+ RouteSelectedEventSchema,
14
+ RunCompletedEventSchema,
15
+ RunFailedEventSchema,
16
+ RunStartedEventSchema,
17
+ ToolApprovedEventSchema,
18
+ ToolBlockedEventSchema,
19
+ ToolCompletedEventSchema,
20
+ ToolFailedEventSchema,
21
+ ToolRequestedEventSchema,
22
+ TraceEventErrorSchema,
23
+ TraceEventSchema,
24
+ traceEventTypes
25
+ } from "./chunk-PQRNSB4E.js";
26
+ import "./chunk-F5XOAPYA.js";
27
+ import "./chunk-WTIOTJHP.js";
28
+ import "./chunk-4FCV35HE.js";
29
+ export {
30
+ AgentCompletedEventSchema,
31
+ AgentFailedEventSchema,
32
+ AgentStartedEventSchema,
33
+ ApprovalApprovedEventSchema,
34
+ ApprovalRejectedEventSchema,
35
+ ApprovalRequiredEventSchema,
36
+ EvalCompletedEventSchema,
37
+ EvalStartedEventSchema,
38
+ PolicyEvaluatedEventSchema,
39
+ ReplayCompletedEventSchema,
40
+ ReplayStartedEventSchema,
41
+ RouteSelectedEventSchema,
42
+ RunCompletedEventSchema,
43
+ RunFailedEventSchema,
44
+ RunStartedEventSchema,
45
+ ToolApprovedEventSchema,
46
+ ToolBlockedEventSchema,
47
+ ToolCompletedEventSchema,
48
+ ToolFailedEventSchema,
49
+ ToolRequestedEventSchema,
50
+ TraceEventErrorSchema,
51
+ TraceEventSchema,
52
+ traceEventTypes
53
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/validation.ts
17
+ var validation_exports = {};
18
+ module.exports = __toCommonJS(validation_exports);
@@ -0,0 +1,24 @@
1
+ import { JsonValue } from './json.cjs';
2
+ import 'zod';
3
+
4
+ type SchemaValidationIssue = {
5
+ message: string;
6
+ path?: ReadonlyArray<PropertyKey>;
7
+ };
8
+ type SchemaValidationSuccess<TOutput> = {
9
+ success: true;
10
+ data: TOutput;
11
+ };
12
+ type SchemaValidationFailure = {
13
+ success: false;
14
+ error: {
15
+ message: string;
16
+ issues?: ReadonlyArray<SchemaValidationIssue>;
17
+ };
18
+ };
19
+ type SchemaValidationResult<TOutput> = SchemaValidationSuccess<TOutput> | SchemaValidationFailure;
20
+ type ValidationSchema<TOutput> = {
21
+ safeParse(input: JsonValue): SchemaValidationResult<TOutput>;
22
+ };
23
+
24
+ export type { SchemaValidationFailure, SchemaValidationIssue, SchemaValidationResult, SchemaValidationSuccess, ValidationSchema };
@@ -0,0 +1,24 @@
1
+ import { JsonValue } from './json.js';
2
+ import 'zod';
3
+
4
+ type SchemaValidationIssue = {
5
+ message: string;
6
+ path?: ReadonlyArray<PropertyKey>;
7
+ };
8
+ type SchemaValidationSuccess<TOutput> = {
9
+ success: true;
10
+ data: TOutput;
11
+ };
12
+ type SchemaValidationFailure = {
13
+ success: false;
14
+ error: {
15
+ message: string;
16
+ issues?: ReadonlyArray<SchemaValidationIssue>;
17
+ };
18
+ };
19
+ type SchemaValidationResult<TOutput> = SchemaValidationSuccess<TOutput> | SchemaValidationFailure;
20
+ type ValidationSchema<TOutput> = {
21
+ safeParse(input: JsonValue): SchemaValidationResult<TOutput>;
22
+ };
23
+
24
+ export type { SchemaValidationFailure, SchemaValidationIssue, SchemaValidationResult, SchemaValidationSuccess, ValidationSchema };
@@ -0,0 +1 @@
1
+ import "./chunk-MDGGODHM.js";
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@assemble-dev/shared-types",
3
+ "version": "0.1.0",
4
+ "license": "Elastic-2.0",
5
+ "description": "Shared TypeScript types and Zod schemas for Assemble",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/smundhra-git/assemble.git",
9
+ "directory": "packages/shared-types"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
15
+ "main": "./dist/index.cjs",
16
+ "module": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js",
22
+ "require": "./dist/index.cjs"
23
+ },
24
+ "./errors": {
25
+ "types": "./dist/errors.d.ts",
26
+ "import": "./dist/errors.js",
27
+ "require": "./dist/errors.cjs"
28
+ },
29
+ "./json": {
30
+ "types": "./dist/json.d.ts",
31
+ "import": "./dist/json.js",
32
+ "require": "./dist/json.cjs"
33
+ },
34
+ "./run-metadata": {
35
+ "types": "./dist/run-metadata.d.ts",
36
+ "import": "./dist/run-metadata.js",
37
+ "require": "./dist/run-metadata.cjs"
38
+ },
39
+ "./runs": {
40
+ "types": "./dist/runs.d.ts",
41
+ "import": "./dist/runs.js",
42
+ "require": "./dist/runs.cjs"
43
+ },
44
+ "./trace-events": {
45
+ "types": "./dist/trace-events.d.ts",
46
+ "import": "./dist/trace-events.js",
47
+ "require": "./dist/trace-events.cjs"
48
+ },
49
+ "./api-keys": {
50
+ "types": "./dist/api-keys.d.ts",
51
+ "import": "./dist/api-keys.js",
52
+ "require": "./dist/api-keys.cjs"
53
+ },
54
+ "./validation": {
55
+ "types": "./dist/validation.d.ts",
56
+ "import": "./dist/validation.js",
57
+ "require": "./dist/validation.cjs"
58
+ }
59
+ },
60
+ "files": [
61
+ "dist"
62
+ ],
63
+ "devDependencies": {
64
+ "eslint": "^9.30.0",
65
+ "tsup": "^8.5.0",
66
+ "typescript": "^5.8.3",
67
+ "vitest": "^3.2.4",
68
+ "@assemble-dev/config": "0.0.0"
69
+ },
70
+ "dependencies": {
71
+ "zod": "^4.1.13"
72
+ },
73
+ "scripts": {
74
+ "build": "tsup src/index.ts src/api-keys.ts src/errors.ts src/json.ts src/run-metadata.ts src/runs.ts src/trace-events.ts src/validation.ts --format esm,cjs --dts --clean",
75
+ "test": "vitest run",
76
+ "lint": "eslint src",
77
+ "typecheck": "tsc --noEmit"
78
+ }
79
+ }