@nylorun/core 0.0.0-bootstrap → 0.1.1-beta
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/CHANGELOG.md +15 -0
- package/LICENSE +192 -0
- package/README.md +16 -0
- package/dist/compatibility.d.ts +3 -0
- package/dist/compatibility.js +3 -0
- package/dist/contracts.d.ts +246 -0
- package/dist/contracts.js +204 -0
- package/dist/define.d.ts +31 -0
- package/dist/define.js +15 -0
- package/dist/definition/assemble.d.ts +26 -0
- package/dist/definition/assemble.js +50 -0
- package/dist/definition/bind-agent.d.ts +8 -0
- package/dist/definition/bind-agent.js +61 -0
- package/dist/definition/bind-tool.d.ts +4 -0
- package/dist/definition/bind-tool.js +25 -0
- package/dist/definition/binding.d.ts +15 -0
- package/dist/definition/binding.js +9 -0
- package/dist/definition/bound.d.ts +20 -0
- package/dist/definition/bound.js +1 -0
- package/dist/definition/builder.d.ts +63 -0
- package/dist/definition/builder.js +215 -0
- package/dist/definition/declaration.d.ts +10 -0
- package/dist/definition/declaration.js +70 -0
- package/dist/definition/from.d.ts +6 -0
- package/dist/definition/from.js +135 -0
- package/dist/definition/helpers.d.ts +21 -0
- package/dist/definition/helpers.js +29 -0
- package/dist/definition/implementations.d.ts +16 -0
- package/dist/definition/implementations.js +3 -0
- package/dist/definition/manifest.d.ts +9 -0
- package/dist/definition/manifest.js +57 -0
- package/dist/definition/output-contract.d.ts +6 -0
- package/dist/definition/output-contract.js +12 -0
- package/dist/definition/schema-json.d.ts +3 -0
- package/dist/definition/schema-json.js +22 -0
- package/dist/definition/schema.d.ts +16 -0
- package/dist/definition/schema.js +281 -0
- package/dist/definition/tool-error.d.ts +9 -0
- package/dist/definition/tool-error.js +20 -0
- package/dist/errors.d.ts +17 -0
- package/dist/errors.js +22 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -0
- package/dist/types/agent.d.ts +12 -0
- package/dist/types/agent.js +1 -0
- package/dist/types/dynamics.d.ts +53 -0
- package/dist/types/dynamics.js +1 -0
- package/dist/types/manifest.d.ts +34 -0
- package/dist/types/manifest.js +1 -0
- package/dist/types/middleware.d.ts +74 -0
- package/dist/types/middleware.js +1 -0
- package/dist/types/model.d.ts +184 -0
- package/dist/types/model.js +1 -0
- package/dist/types/observe.d.ts +180 -0
- package/dist/types/observe.js +1 -0
- package/dist/types/shared.d.ts +25 -0
- package/dist/types/shared.js +1 -0
- package/dist/types/tool.d.ts +187 -0
- package/dist/types/tool.js +1 -0
- package/dist/types/transcript.d.ts +65 -0
- package/dist/types/transcript.js +1 -0
- package/dist/utils/canonical.d.ts +1 -0
- package/dist/utils/canonical.js +10 -0
- package/dist/utils/hash.d.ts +3 -0
- package/dist/utils/hash.js +7 -0
- package/dist/utils/immutable.d.ts +6 -0
- package/dist/utils/immutable.js +76 -0
- package/package.json +57 -7
- package/index.js +0 -1
- package/publish.out +0 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { ZodType } from "zod";
|
|
2
|
+
import type { DeferredOutcome, JsonObject, JsonValue } from "./shared.js";
|
|
3
|
+
import type { ModelAdapter } from "./model.js";
|
|
4
|
+
export interface SchemaIssue {
|
|
5
|
+
readonly path: readonly (string | number)[];
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly message: string;
|
|
8
|
+
}
|
|
9
|
+
export type SchemaValidation<T> = {
|
|
10
|
+
readonly ok: true;
|
|
11
|
+
readonly value: T;
|
|
12
|
+
} | {
|
|
13
|
+
readonly ok: false;
|
|
14
|
+
readonly issues: readonly SchemaIssue[];
|
|
15
|
+
};
|
|
16
|
+
/** The portable, locally-enforced schema contract accepted by a Harness tool. */
|
|
17
|
+
export interface ToolSchema<T> {
|
|
18
|
+
readonly jsonSchema: JsonObject;
|
|
19
|
+
validate(value: unknown): SchemaValidation<T>;
|
|
20
|
+
}
|
|
21
|
+
/** The synchronous Standard Schema subset required to project and validate a tool contract. */
|
|
22
|
+
export interface StandardToolSchema<Input = unknown, Output = unknown> {
|
|
23
|
+
readonly "~standard": {
|
|
24
|
+
readonly validate: (value: Input) => {
|
|
25
|
+
readonly value: Output;
|
|
26
|
+
readonly issues?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
readonly issues: readonly StandardSchemaIssue[];
|
|
29
|
+
readonly value?: undefined;
|
|
30
|
+
} | Promise<unknown>;
|
|
31
|
+
readonly jsonSchema: {
|
|
32
|
+
readonly input: () => unknown;
|
|
33
|
+
readonly output: () => unknown;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface StandardSchemaIssue {
|
|
38
|
+
readonly message?: string;
|
|
39
|
+
readonly path?: readonly (string | number | symbol)[];
|
|
40
|
+
readonly code?: string;
|
|
41
|
+
}
|
|
42
|
+
export type ToolSchemaSource<T = unknown> = ZodType<T> | StandardToolSchema<any, T> | ToolSchema<T>;
|
|
43
|
+
export type SchemaOutput<Schema> = Schema extends ZodType<infer Value> ? Value : Schema extends StandardToolSchema<any, infer Value> ? Value : Schema extends ToolSchema<infer Value> ? Value : never;
|
|
44
|
+
export type ToolInputSchema = ToolSchemaSource;
|
|
45
|
+
export type ToolOutputSchema = ToolSchemaSource;
|
|
46
|
+
type OutputFor<Schema> = Schema extends ToolSchemaSource ? SchemaOutput<Schema> : ToolContent;
|
|
47
|
+
/** Side-effect class for crash / redelivery semantics (code-only; never in the manifest). */
|
|
48
|
+
export type ToolEffects = "read" | "idempotent" | "write";
|
|
49
|
+
/**
|
|
50
|
+
* Declarative approval gate. Return a prompt string (or `true`) to pause;
|
|
51
|
+
* return `false` / `undefined` / empty string to proceed.
|
|
52
|
+
*/
|
|
53
|
+
export type ToolApproval<InputSchema extends ToolInputSchema> = (args: SchemaOutput<InputSchema>) => string | boolean | undefined | Promise<string | boolean | undefined>;
|
|
54
|
+
export interface SessionStateBag {
|
|
55
|
+
get(key: string): JsonValue | undefined;
|
|
56
|
+
set(key: string, value: JsonValue): void;
|
|
57
|
+
entries(): Readonly<Record<string, JsonValue>>;
|
|
58
|
+
}
|
|
59
|
+
export interface ToolDefinition<InputSchema extends ToolInputSchema = ToolInputSchema, Info = unknown, OutputSchema extends ToolOutputSchema | undefined = undefined> {
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly description?: string;
|
|
62
|
+
/** Preferred alias for `inputSchema`. */
|
|
63
|
+
readonly input?: InputSchema;
|
|
64
|
+
readonly inputSchema?: InputSchema;
|
|
65
|
+
/** Preferred alias for `outputSchema`. */
|
|
66
|
+
readonly output?: OutputSchema;
|
|
67
|
+
readonly outputSchema?: OutputSchema;
|
|
68
|
+
/** Preferred alias for `execute`. */
|
|
69
|
+
run?(args: SchemaOutput<InputSchema>, context: ToolExecutionContext<Info>): Promise<ToolRunResult<OutputFor<OutputSchema>>>;
|
|
70
|
+
execute?(args: SchemaOutput<InputSchema>, context: ToolExecutionContext<Info>): Promise<ToolRunResult<OutputFor<OutputSchema>>>;
|
|
71
|
+
/** Code-only metadata — never serialized into the manifest. */
|
|
72
|
+
readonly approval?: ToolApproval<InputSchema>;
|
|
73
|
+
/** Code-only metadata — never serialized into the manifest. */
|
|
74
|
+
readonly effects?: ToolEffects;
|
|
75
|
+
}
|
|
76
|
+
/** A plain return value is treated as `{ kind: "completed", output }`. Legacy tagged outcomes remain valid. */
|
|
77
|
+
export type ToolRunResult<Output = ToolContent> = Output | ToolOutcome<Output>;
|
|
78
|
+
export interface ToolOwner {
|
|
79
|
+
readonly middlewareId: string;
|
|
80
|
+
readonly slot: string;
|
|
81
|
+
}
|
|
82
|
+
export interface Interaction {
|
|
83
|
+
readonly id?: string;
|
|
84
|
+
readonly kind: "approval" | "response";
|
|
85
|
+
readonly prompt: string;
|
|
86
|
+
readonly metadata?: JsonObject;
|
|
87
|
+
}
|
|
88
|
+
export interface RequiredInteraction extends Interaction {
|
|
89
|
+
readonly id: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ToolExecutionResume {
|
|
92
|
+
readonly interactionId: string;
|
|
93
|
+
readonly kind: "approval" | "response";
|
|
94
|
+
readonly approved?: boolean;
|
|
95
|
+
readonly value?: JsonValue;
|
|
96
|
+
readonly token?: JsonValue;
|
|
97
|
+
}
|
|
98
|
+
interface ToolExecutionContextBase {
|
|
99
|
+
readonly executionId: string;
|
|
100
|
+
readonly turnId: string;
|
|
101
|
+
readonly stepId: string;
|
|
102
|
+
readonly callId: string;
|
|
103
|
+
readonly invocationId: string;
|
|
104
|
+
readonly signal: AbortSignal;
|
|
105
|
+
/** The invocation's model callable, for tools that explicitly run a child agent. */
|
|
106
|
+
readonly onModelCall?: ModelAdapter;
|
|
107
|
+
readonly resume?: ToolExecutionResume;
|
|
108
|
+
/** Stable per invocation across crash and replay. */
|
|
109
|
+
readonly idempotencyKey: string;
|
|
110
|
+
/** True when this invocation is being offered again after an interrupted active call. */
|
|
111
|
+
readonly redelivery?: boolean;
|
|
112
|
+
/** Durable session memory (tools write; beforeModelCall reads). */
|
|
113
|
+
readonly state: SessionStateBag;
|
|
114
|
+
/** Session identity stub — Runtime fills this later. */
|
|
115
|
+
readonly session: {
|
|
116
|
+
readonly id: string;
|
|
117
|
+
};
|
|
118
|
+
/** Live progress stub — emits an observation when a listener is present. */
|
|
119
|
+
progress(message: string, data?: JsonObject): void;
|
|
120
|
+
/** Durable wait: park for a human/app response. */
|
|
121
|
+
ask(prompt: string, opts?: JsonObject): Promise<JsonValue>;
|
|
122
|
+
/** Durable wait: park for approval. */
|
|
123
|
+
approve(prompt: string): Promise<boolean>;
|
|
124
|
+
/** Durable wait: park until a timer fires (host settles). */
|
|
125
|
+
sleep(duration: string | number): Promise<void>;
|
|
126
|
+
/** Durable wait: park until a named event arrives. */
|
|
127
|
+
waitFor(event: string, opts?: {
|
|
128
|
+
readonly match?: JsonValue;
|
|
129
|
+
readonly timeout?: string | number;
|
|
130
|
+
}): Promise<JsonValue>;
|
|
131
|
+
/** Memoized sub-step so effects before a wait are not re-run on resume. */
|
|
132
|
+
step<T>(name: string, fn: () => Promise<T> | T): Promise<T>;
|
|
133
|
+
}
|
|
134
|
+
export type ToolExecutionContext<Info = unknown> = ToolExecutionContextBase & {
|
|
135
|
+
readonly info?: Info;
|
|
136
|
+
};
|
|
137
|
+
export type ToolContent = JsonValue;
|
|
138
|
+
export type ToolOutcome<Output = ToolContent> = {
|
|
139
|
+
readonly kind: "completed";
|
|
140
|
+
readonly output: Output;
|
|
141
|
+
} | {
|
|
142
|
+
readonly kind: "denied";
|
|
143
|
+
readonly reason: string;
|
|
144
|
+
} | {
|
|
145
|
+
readonly kind: "failed";
|
|
146
|
+
readonly code: string;
|
|
147
|
+
readonly message: string;
|
|
148
|
+
} | {
|
|
149
|
+
readonly kind: "interaction-required";
|
|
150
|
+
readonly interaction: Interaction;
|
|
151
|
+
readonly token?: JsonValue;
|
|
152
|
+
} | DeferredOutcome;
|
|
153
|
+
export interface ToolValidationFailureDetails {
|
|
154
|
+
readonly phase: "input" | "output";
|
|
155
|
+
readonly issues: readonly SchemaIssue[];
|
|
156
|
+
}
|
|
157
|
+
export type ToolResult = {
|
|
158
|
+
readonly callId: string;
|
|
159
|
+
readonly toolName: string;
|
|
160
|
+
readonly kind: "completed";
|
|
161
|
+
readonly output: ToolContent;
|
|
162
|
+
} | {
|
|
163
|
+
readonly callId: string;
|
|
164
|
+
readonly toolName: string;
|
|
165
|
+
readonly kind: "denied";
|
|
166
|
+
readonly reason: string;
|
|
167
|
+
} | {
|
|
168
|
+
readonly callId: string;
|
|
169
|
+
readonly toolName: string;
|
|
170
|
+
readonly kind: "failed";
|
|
171
|
+
readonly code: string;
|
|
172
|
+
readonly message: string;
|
|
173
|
+
readonly details?: ToolValidationFailureDetails;
|
|
174
|
+
};
|
|
175
|
+
/** Immutable tool metadata supplied to model adapters and observers. */
|
|
176
|
+
export interface ToolDescriptor {
|
|
177
|
+
readonly name: string;
|
|
178
|
+
readonly description?: string;
|
|
179
|
+
readonly owner: ToolOwner;
|
|
180
|
+
readonly inputSchema: {
|
|
181
|
+
readonly jsonSchema: JsonObject;
|
|
182
|
+
};
|
|
183
|
+
readonly outputSchema?: {
|
|
184
|
+
readonly jsonSchema: JsonObject;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ModelCandidate } from "./model.js";
|
|
2
|
+
import type { JsonObject, JsonValue } from "./shared.js";
|
|
3
|
+
import type { ToolResult } from "./tool.js";
|
|
4
|
+
export type InputEvent = {
|
|
5
|
+
readonly kind: "user-message" | "interrupt";
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly metadata?: JsonObject;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "user-message" | "interrupt";
|
|
10
|
+
readonly content: readonly UserContentPart[];
|
|
11
|
+
/** Undefined for content-bearing events; retained for text-event narrowing compatibility. */
|
|
12
|
+
readonly text?: undefined;
|
|
13
|
+
readonly metadata?: JsonObject;
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: "approve";
|
|
16
|
+
readonly interactionId: string;
|
|
17
|
+
readonly approved: boolean;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: "respond";
|
|
20
|
+
readonly interactionId: string;
|
|
21
|
+
readonly value: JsonValue;
|
|
22
|
+
};
|
|
23
|
+
/** Ordered, model-visible user content. Media references stay host-owned JSON values. */
|
|
24
|
+
export type UserContentPart = {
|
|
25
|
+
readonly type: "text";
|
|
26
|
+
readonly text: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly type: "media";
|
|
29
|
+
readonly mediaType: string;
|
|
30
|
+
readonly reference: JsonValue;
|
|
31
|
+
};
|
|
32
|
+
export type MessageInput = string | {
|
|
33
|
+
readonly text: string;
|
|
34
|
+
readonly metadata?: JsonObject;
|
|
35
|
+
} | {
|
|
36
|
+
readonly content: readonly UserContentPart[];
|
|
37
|
+
readonly metadata?: JsonObject;
|
|
38
|
+
};
|
|
39
|
+
export type InteractionReply = Extract<InputEvent, {
|
|
40
|
+
kind: "approve" | "respond";
|
|
41
|
+
}>;
|
|
42
|
+
export interface TranscriptInputEntry {
|
|
43
|
+
readonly kind: "input";
|
|
44
|
+
readonly turnId: string;
|
|
45
|
+
readonly event: InputEvent;
|
|
46
|
+
}
|
|
47
|
+
export interface TranscriptCandidateEntry {
|
|
48
|
+
readonly kind: "candidate";
|
|
49
|
+
readonly turnId: string;
|
|
50
|
+
readonly stepId: string;
|
|
51
|
+
readonly candidate: ModelCandidate;
|
|
52
|
+
}
|
|
53
|
+
export interface TranscriptToolsEntry {
|
|
54
|
+
readonly kind: "tool-results";
|
|
55
|
+
readonly turnId: string;
|
|
56
|
+
readonly stepId: string;
|
|
57
|
+
readonly results: readonly ToolResult[];
|
|
58
|
+
}
|
|
59
|
+
export interface TranscriptFinalEntry {
|
|
60
|
+
readonly kind: "final";
|
|
61
|
+
readonly turnId: string;
|
|
62
|
+
readonly stepId: string;
|
|
63
|
+
readonly output: JsonValue;
|
|
64
|
+
}
|
|
65
|
+
export type TranscriptEntry = TranscriptInputEntry | TranscriptCandidateEntry | TranscriptToolsEntry | TranscriptFinalEntry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function canonical(value: unknown): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function canonical(value) {
|
|
2
|
+
if (Array.isArray(value))
|
|
3
|
+
return `[${value.map(canonical).join(",")}]`;
|
|
4
|
+
if (value && typeof value === "object")
|
|
5
|
+
return `{${Object.entries(value)
|
|
6
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
7
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`)
|
|
8
|
+
.join(",")}}`;
|
|
9
|
+
return JSON.stringify(value);
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { sha256 } from "@noble/hashes/sha256";
|
|
2
|
+
import { bytesToHex } from "@noble/hashes/utils";
|
|
3
|
+
import { canonical } from "./canonical.js";
|
|
4
|
+
/** Canonical SHA-256 hex digest of a manifest (agent identity). */
|
|
5
|
+
export function hashManifest(manifest) {
|
|
6
|
+
return bytesToHex(sha256(canonical(manifest)));
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../types/shared.js";
|
|
2
|
+
export declare function assertJson(value: unknown, path?: string): asserts value is JsonValue;
|
|
3
|
+
export declare function copyJson<T>(value: T): T;
|
|
4
|
+
export declare function copyJsonObject(value: unknown, path: string): JsonObject;
|
|
5
|
+
export declare function deepFreeze<T>(value: T): T;
|
|
6
|
+
export declare function freezeGraph<T>(value: T, seen?: WeakSet<object>): T;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { HarnessError } from "../errors.js";
|
|
2
|
+
export function assertJson(value, path = "value") {
|
|
3
|
+
assertJsonValue(value, path, new WeakSet());
|
|
4
|
+
}
|
|
5
|
+
function assertJsonValue(value, path, ancestors) {
|
|
6
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
7
|
+
return;
|
|
8
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
9
|
+
return;
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
enterJsonContainer(value, path, ancestors);
|
|
12
|
+
value.forEach((item, index) => assertJsonValue(item, `${path}[${index}]`, ancestors));
|
|
13
|
+
ancestors.delete(value);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (typeof value === "object") {
|
|
17
|
+
const prototype = Object.getPrototypeOf(value);
|
|
18
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
19
|
+
throw new HarnessError("json.invalid-data", `${path} must be plain JSON data`, {
|
|
20
|
+
details: { path },
|
|
21
|
+
});
|
|
22
|
+
enterJsonContainer(value, path, ancestors);
|
|
23
|
+
for (const [key, item] of Object.entries(value)) {
|
|
24
|
+
if (item === undefined)
|
|
25
|
+
throw new HarnessError("json.invalid-data", `${path}.${key} cannot be undefined`, {
|
|
26
|
+
details: { path: `${path}.${key}` },
|
|
27
|
+
});
|
|
28
|
+
assertJsonValue(item, `${path}.${key}`, ancestors);
|
|
29
|
+
}
|
|
30
|
+
ancestors.delete(value);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
throw new HarnessError("json.invalid-data", `${path} must be JSON-serializable`, {
|
|
34
|
+
details: { path },
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function enterJsonContainer(value, path, ancestors) {
|
|
38
|
+
if (ancestors.has(value))
|
|
39
|
+
throw new HarnessError("json.invalid-data", `${path} cannot contain a cycle`, {
|
|
40
|
+
details: { path },
|
|
41
|
+
});
|
|
42
|
+
ancestors.add(value);
|
|
43
|
+
}
|
|
44
|
+
export function copyJson(value) {
|
|
45
|
+
assertJson(value);
|
|
46
|
+
if (Array.isArray(value))
|
|
47
|
+
return Object.freeze(value.map((item) => copyJson(item)));
|
|
48
|
+
if (value !== null && typeof value === "object") {
|
|
49
|
+
return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [key, copyJson(item)])));
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
export function copyJsonObject(value, path) {
|
|
54
|
+
assertJson(value, path);
|
|
55
|
+
if (value === null || Array.isArray(value) || typeof value !== "object")
|
|
56
|
+
throw new HarnessError("json.invalid-object", `${path} must be a JSON object`, {
|
|
57
|
+
details: { path },
|
|
58
|
+
});
|
|
59
|
+
return copyJson(value);
|
|
60
|
+
}
|
|
61
|
+
export function deepFreeze(value) {
|
|
62
|
+
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
63
|
+
Object.freeze(value);
|
|
64
|
+
for (const item of Object.values(value))
|
|
65
|
+
deepFreeze(item);
|
|
66
|
+
}
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
export function freezeGraph(value, seen = new WeakSet()) {
|
|
70
|
+
if (!value || typeof value !== "object" || seen.has(value))
|
|
71
|
+
return value;
|
|
72
|
+
seen.add(value);
|
|
73
|
+
for (const item of Object.values(value))
|
|
74
|
+
freezeGraph(item, seen);
|
|
75
|
+
return Object.freeze(value);
|
|
76
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1-beta",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"description": "Shared agent definitions and wire contracts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/nylorun/harness.git",
|
|
10
|
+
"directory": "core"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public",
|
|
20
|
+
"provenance": true
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": "^22.14.0 || ^24.0.0 || >=26.0.0"
|
|
24
|
+
},
|
|
6
25
|
"scripts": {
|
|
7
|
-
"
|
|
26
|
+
"build": "npm run clean && node ../scripts/check-typescript-version.mjs && tsc -p tsconfig.json",
|
|
27
|
+
"clean": "node -e \"import('node:fs').then(({rmSync})=>rmSync('dist',{recursive:true,force:true}))\"",
|
|
28
|
+
"check": "npm run build && npm test && node scripts/check-package.mjs",
|
|
29
|
+
"test": "vitest run --passWithNoTests",
|
|
30
|
+
"prepack": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@noble/hashes": "^1.8.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
37
|
+
"@types/node": "^26.5.0",
|
|
38
|
+
"vitest": "^5.0.0"
|
|
39
|
+
},
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"import": "./dist/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./define": {
|
|
46
|
+
"types": "./dist/define.d.ts",
|
|
47
|
+
"import": "./dist/define.js"
|
|
48
|
+
},
|
|
49
|
+
"./contracts": {
|
|
50
|
+
"types": "./dist/contracts.d.ts",
|
|
51
|
+
"import": "./dist/contracts.js"
|
|
52
|
+
},
|
|
53
|
+
"./compatibility": {
|
|
54
|
+
"types": "./dist/compatibility.d.ts",
|
|
55
|
+
"import": "./dist/compatibility.js"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"zod": "^4.5.4"
|
|
8
60
|
},
|
|
9
|
-
"
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "MIT"
|
|
61
|
+
"sideEffects": false
|
|
12
62
|
}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {}
|
package/publish.out
DELETED
|
File without changes
|