@xandreed/core 0.3.0 → 0.4.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @xandreed/core
2
2
 
3
- Efferent composable agent framework, 0.3.0. Bun on Linux.
3
+ Efferent composable agent framework, 0.4.0. Bun on Linux.
4
4
 
5
5
  Documentation: https://github.com/xandreeddev/efferent
@@ -0,0 +1,31 @@
1
+ import { Schema } from "effect";
2
+ export declare const DecisionId: Schema.brand<typeof Schema.NonEmptyTrimmedString, "DecisionId">;
3
+ export declare const DecisionRecord: Schema.Struct<{
4
+ version: Schema.Literal<[1]>;
5
+ id: Schema.brand<typeof Schema.NonEmptyTrimmedString, "DecisionId">;
6
+ family: typeof Schema.NonEmptyString;
7
+ contextHash: typeof Schema.String;
8
+ candidateHash: typeof Schema.String;
9
+ policyVersion: typeof Schema.String;
10
+ candidates: Schema.Array$<Schema.Struct<{
11
+ id: typeof Schema.String;
12
+ description: typeof Schema.String;
13
+ }>>;
14
+ attempts: Schema.Array$<typeof Schema.String>;
15
+ selection: Schema.OptionFromNullOr<typeof Schema.String>;
16
+ validation: Schema.Literal<["accepted", "rejected", "abstained", "failed", "cancelled", "bypassed"]>;
17
+ fallback: Schema.OptionFromNullOr<typeof Schema.String>;
18
+ applied: Schema.OptionFromNullOr<typeof Schema.String>;
19
+ probabilities: Schema.OptionFromNullOr<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.Number>>>;
20
+ }>;
21
+ export type DecisionRecord = typeof DecisionRecord.Type;
22
+ export declare const DecisionOutcome: Schema.Struct<{
23
+ version: Schema.Literal<[1]>;
24
+ decisionId: Schema.brand<typeof Schema.NonEmptyTrimmedString, "DecisionId">;
25
+ runId: typeof Schema.String;
26
+ status: Schema.Literal<["completed", "failed", "cancelled", "incomplete"]>;
27
+ toolInvocations: Schema.Array$<typeof Schema.String>;
28
+ modelAttempts: Schema.Array$<typeof Schema.String>;
29
+ deliveredSequences: Schema.Array$<typeof Schema.Int>;
30
+ }>;
31
+ export type DecisionOutcome = typeof DecisionOutcome.Type;
@@ -0,0 +1,24 @@
1
+ import { Schema } from "effect";
2
+ export const DecisionId = Schema.NonEmptyTrimmedString.pipe(Schema.brand("DecisionId")), DecisionRecord = Schema.Struct({
3
+ version: Schema.Literal(1),
4
+ id: DecisionId,
5
+ family: Schema.NonEmptyString,
6
+ contextHash: Schema.String,
7
+ candidateHash: Schema.String,
8
+ policyVersion: Schema.String,
9
+ candidates: Schema.Array(Schema.Struct({ id: Schema.String, description: Schema.String })),
10
+ attempts: Schema.Array(Schema.String),
11
+ selection: Schema.OptionFromNullOr(Schema.String),
12
+ validation: Schema.Literal("accepted", "rejected", "abstained", "failed", "cancelled", "bypassed"),
13
+ fallback: Schema.OptionFromNullOr(Schema.String),
14
+ applied: Schema.OptionFromNullOr(Schema.String),
15
+ probabilities: Schema.OptionFromNullOr(Schema.Record({ key: Schema.String, value: Schema.Number.pipe(Schema.between(0, 1)) }))
16
+ }), DecisionOutcome = Schema.Struct({
17
+ version: Schema.Literal(1),
18
+ decisionId: DecisionId,
19
+ runId: Schema.String,
20
+ status: Schema.Literal("completed", "failed", "cancelled", "incomplete"),
21
+ toolInvocations: Schema.Array(Schema.String),
22
+ modelAttempts: Schema.Array(Schema.String),
23
+ deliveredSequences: Schema.Array(Schema.Int)
24
+ });
package/dist/index.d.ts CHANGED
@@ -49,3 +49,4 @@ export * from "./ports/capability.port.js";
49
49
  export * from "./domain/prompt-provenance.entity.js";
50
50
  export * from "./loop/promptProvenance.js";
51
51
  export { CurrentAgentStep } from "./loop/stepContext.js";
52
+ export * from "./decision-record.entity.js";
package/dist/index.js CHANGED
@@ -97,3 +97,4 @@ export * from "./ports/capability.port.js";
97
97
  export * from "./domain/prompt-provenance.entity.js";
98
98
  export * from "./loop/promptProvenance.js";
99
99
  export { CurrentAgentStep } from "./loop/stepContext.js";
100
+ export * from "./decision-record.entity.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xandreed/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The agent kernel of the new line: entities, ports, the provider-agnostic agent loop, and the session chassis — pure Effect, no IO, no provider SDKs.",