@nylorun/core 0.1.1-beta → 0.2.0-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.
@@ -1,6 +1,14 @@
1
1
  import type { ContextMutationOptions, ModelCandidate, ModelDirective, ModelToolCall, ModelConfigurationMutationOptions } from "./model.js";
2
2
  import type { InputEvent, TranscriptEntry } from "./transcript.js";
3
- import type { ContextItem, Tripwire } from "./shared.js";
3
+ import type { McpServerManifest, SkillManifest } from "./manifest.js";
4
+ /** Skill files held on the developer binding. Not a manifest field. */
5
+ export interface SkillRecord {
6
+ readonly name: string;
7
+ readonly description: string;
8
+ readonly instructions: string;
9
+ readonly resources?: Readonly<Record<string, string>>;
10
+ }
11
+ import type { ContextItem, JsonObject, Tripwire } from "./shared.js";
4
12
  import type { AfterModelCallFn, BeforeModelCallFn } from "./dynamics.js";
5
13
  import type { Interaction, ToolDefinition, ToolResult } from "./tool.js";
6
14
  interface StepRequestBase {
@@ -51,8 +59,18 @@ export type CapabilityItems<Item> = readonly Item[] | Readonly<{
51
59
  }>;
52
60
  export interface CapabilityDeclaration<Info = unknown> {
53
61
  readonly id: string;
62
+ readonly type?: "agent" | "agent-plugin";
63
+ readonly name?: string;
64
+ readonly description?: string;
65
+ readonly metadata?: JsonObject;
54
66
  readonly tools?: CapabilityItems<ToolDefinition<any, Info, any>>;
55
67
  readonly instructions?: CapabilityItems<string>;
68
+ readonly skills?: Readonly<Record<string, SkillManifest>>;
69
+ /** File contents for load_skill. Omitted from the manifest. */
70
+ readonly skillRecords?: Readonly<Record<string, SkillRecord>>;
71
+ readonly mcpServers?: Readonly<Record<string, McpServerManifest>>;
72
+ /** Resolved package directory. Not projected into the manifest. */
73
+ readonly pluginRoot?: string;
56
74
  /**
57
75
  * @deprecated Model resolution is Runtime-owned. Not projected into the harness manifest.
58
76
  * Kept for local middleware composition through 1.0.
@@ -1,6 +1,13 @@
1
- import type { ZodType } from "zod";
1
+ import type { z } from "zod";
2
2
  import type { DeferredOutcome, JsonObject, JsonValue } from "./shared.js";
3
3
  import type { ModelAdapter } from "./model.js";
4
+ /**
5
+ * Zod classic schemas accepted as tool contracts.
6
+ * Use core `$ZodType` so concrete schemas (e.g. ZodObject) stay assignable on
7
+ * zod 4.6+, where ZodType gained validate/validateAsync methods that break
8
+ * ZodObject → ZodType assignability in some TypeScript configurations.
9
+ */
10
+ type ZodToolSchema<T = unknown> = z.core.$ZodType<T, unknown>;
4
11
  export interface SchemaIssue {
5
12
  readonly path: readonly (string | number)[];
6
13
  readonly code: string;
@@ -39,8 +46,8 @@ export interface StandardSchemaIssue {
39
46
  readonly path?: readonly (string | number | symbol)[];
40
47
  readonly code?: string;
41
48
  }
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;
49
+ export type ToolSchemaSource<T = unknown> = ZodToolSchema<T> | StandardToolSchema<any, T> | ToolSchema<T>;
50
+ export type SchemaOutput<Schema> = Schema extends z.core.$ZodType<infer Value, any> ? Value : Schema extends StandardToolSchema<any, infer Value> ? Value : Schema extends ToolSchema<infer Value> ? Value : never;
44
51
  export type ToolInputSchema = ToolSchemaSource;
45
52
  export type ToolOutputSchema = ToolSchemaSource;
46
53
  type OutputFor<Schema> = Schema extends ToolSchemaSource ? SchemaOutput<Schema> : ToolContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/core",
3
- "version": "0.1.1-beta",
3
+ "version": "0.2.0-beta",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Shared agent definitions and wire contracts",
@@ -33,9 +33,9 @@
33
33
  "@noble/hashes": "^1.8.0"
34
34
  },
35
35
  "devDependencies": {
36
- "typescript": "npm:@typescript/typescript6@^6.0.2",
37
36
  "@types/node": "^26.5.0",
38
- "vitest": "^5.0.0"
37
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
38
+ "vitest": "^5.0.1"
39
39
  },
40
40
  "exports": {
41
41
  ".": {
@@ -56,7 +56,7 @@
56
56
  }
57
57
  },
58
58
  "peerDependencies": {
59
- "zod": "^4.5.4"
59
+ "zod": "^4.6.5"
60
60
  },
61
61
  "sideEffects": false
62
62
  }