@usine/config 0.2.0 → 0.2.1

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/agent.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Agent } from "@usine/core/agent";
1
2
  import { Schema } from "effect";
2
3
  import { ConfigFileError } from "./file.ts";
3
4
  declare const AgentFile_base: Schema.Class<AgentFile, Schema.Struct<{
@@ -11,6 +12,8 @@ declare const AgentFile_base: Schema.Class<AgentFile, Schema.Struct<{
11
12
  }>, {}>;
12
13
  /** An Agent's authored brain, parent overrides, and standing instructions, named by its Markdown filename. */
13
14
  export declare class AgentFile extends AgentFile_base {
15
+ /** The roster member represented by this file, including persona and parent overrides. */
16
+ get agent(): Agent;
14
17
  }
15
18
  declare const InvalidAgent_base: Schema.Class<InvalidAgent, Schema.Struct<{
16
19
  readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,eAAe,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;AAE1D,8GAA8G;AAC9G,qBAAa,SAAU,SAAQ,cAQ7B;CAAG;;;;;AAEL,6EAA6E;AAC7E,qBAAa,YAAa,SAAQ,iBAGhC;CAAG"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA2B,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,eAAe,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;AAE1D,8GAA8G;AAC9G,qBAAa,SAAU,SAAQ,cAQ7B;IACA,0FAA0F;IAC1F,IAAI,KAAK,IAAI,KAAK,CAQjB;CACF;;;;;AAED,6EAA6E;AAC7E,qBAAa,YAAa,SAAQ,iBAGhC;CAAG"}
package/dist/agent.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AgentPersona, AgentName } from "@usine/core/agent";
2
- import { Effort, Harness, ModelId } from "@usine/core/agent/brain";
1
+ import { Agent, AgentPersona, AgentName } from "@usine/core/agent";
2
+ import { BrainSpec, Effort, Harness, ModelId } from "@usine/core/agent/brain";
3
3
  import { Schema } from "effect";
4
4
  import { InstancePath, ConfigFileError } from "./file.js";
5
5
  /** An Agent's authored brain, parent overrides, and standing instructions, named by its Markdown filename. */
@@ -12,6 +12,16 @@ export class AgentFile extends Schema.Class("@usine/config/AgentFile")({
12
12
  parentEffort: Schema.Option(Effort),
13
13
  persona: AgentPersona,
14
14
  }) {
15
+ /** The roster member represented by this file, including persona and parent overrides. */
16
+ get agent() {
17
+ return new Agent({
18
+ name: this.name,
19
+ persona: this.persona,
20
+ brain: new BrainSpec({ harness: this.harness, model: this.model, effort: this.effort }),
21
+ parentModel: this.parentModel,
22
+ parentEffort: this.parentEffort,
23
+ });
24
+ }
15
25
  }
16
26
  /** An Agent file excluded from the roster because it could not be loaded. */
17
27
  export class InvalidAgent extends Schema.Class("@usine/config/InvalidAgent")({
package/dist/agent.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE1D,8GAA8G;AAC9G,MAAM,OAAO,SAAU,SAAQ,MAAM,CAAC,KAAK,CAAY,yBAAyB,CAAC,CAAC;IAChF,IAAI,EAAE,SAAS;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AI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;YACvF,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,KAAK,CAAe,4BAA4B,CAAC,CAAC;IACzF,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,eAAe;CACvB,CAAC;CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/config",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Config file machinery for usine: parse, validate, and surgically rewrite the instance repo's files — usine.yaml, loop files, agent files.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "yaml": "2.8.1",
75
- "@usine/core": "0.2.0",
75
+ "@usine/core": "0.3.0",
76
76
  "@usine/expression": "0.2.0"
77
77
  },
78
78
  "devDependencies": {