@opencxh/domain 1.274.0 → 1.275.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/dist/entities/ai-account/capabilities.d.ts +4 -0
- package/dist/entities/ai-account/index.d.ts +3 -0
- package/dist/entities/ai-account/modality.d.ts +26 -0
- package/dist/entities/ai-account/modality.test.d.ts +1 -0
- package/dist/entities/ai-account/routing.d.ts +71 -0
- package/dist/entities/ai-account/routing.test.d.ts +1 -0
- package/dist/entities/ai-account/system-one.d.ts +109 -0
- package/dist/entities/ai-account/system-one.test.d.ts +1 -0
- package/dist/entities/ai-account/types.d.ts +12 -5
- package/dist/entities/ai-message/types.d.ts +7 -0
- package/dist/entities/ai-settings/types.d.ts +9 -0
- package/dist/entities/eval/index.d.ts +2 -0
- package/dist/entities/eval/runner.d.ts +14 -0
- package/dist/entities/eval/runner.test.d.ts +1 -0
- package/dist/entities/eval/types.d.ts +46 -0
- package/dist/entities/inbox/types.d.ts +4 -4
- package/dist/entities/interaction/attention.d.ts +12 -13
- package/dist/entities/kb/index.d.ts +1 -0
- package/dist/entities/kb/keys.d.ts +2 -0
- package/dist/entities/rule/bind.d.ts +8 -0
- package/dist/entities/rule/bind.test.d.ts +1 -0
- package/dist/entities/rule/cron.d.ts +40 -0
- package/dist/entities/rule/cron.test.d.ts +1 -0
- package/dist/entities/rule/eval.d.ts +31 -0
- package/dist/entities/rule/index.d.ts +4 -0
- package/dist/entities/rule/match.d.ts +8 -0
- package/dist/entities/rule/outcome.d.ts +42 -0
- package/dist/entities/rule/outcome.test.d.ts +1 -0
- package/dist/entities/rule/types.d.ts +44 -0
- package/dist/index.cjs +20 -20
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1990 -1736
- package/dist/platform/resource-source.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OwnerScope } from '../scope/types';
|
|
2
|
+
import { OutcomePrior, RunOutcome } from './outcome';
|
|
2
3
|
/**
|
|
3
4
|
* When something starts. One vocabulary for every executor.
|
|
4
5
|
*
|
|
@@ -101,3 +102,46 @@ export interface RuleEvent {
|
|
|
101
102
|
/** How many rule hops produced this event. Absent = zero, a genuine first cause. */
|
|
102
103
|
depth?: number;
|
|
103
104
|
}
|
|
105
|
+
/** One line of a rule run log. `ok: false` is a step that did not land, not a rule that did not fire. */
|
|
106
|
+
export interface RuleTraceEntry {
|
|
107
|
+
ruleId: string;
|
|
108
|
+
action?: string;
|
|
109
|
+
ok: boolean;
|
|
110
|
+
note: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* What one action changed, captured when it ran — the params it was called with, which of those
|
|
114
|
+
* were content (a field the subject owns) rather than addressing, and those fields as they were.
|
|
115
|
+
* A key missing from `before` held nothing.
|
|
116
|
+
*/
|
|
117
|
+
export interface ActionPrior extends OutcomePrior {
|
|
118
|
+
/** The rule that ran this action. Empty for an undo replay. */
|
|
119
|
+
ruleId?: string;
|
|
120
|
+
before: Record<string, unknown>;
|
|
121
|
+
}
|
|
122
|
+
/** What an owning app's write path posts after a rule acted: one rule, one event. */
|
|
123
|
+
export interface RuleRunRecord {
|
|
124
|
+
ruleId: string;
|
|
125
|
+
ruleName?: string;
|
|
126
|
+
eventName: string;
|
|
127
|
+
eventId: string;
|
|
128
|
+
subjectKind?: string;
|
|
129
|
+
subjectId?: string;
|
|
130
|
+
applied: number;
|
|
131
|
+
trace: RuleTraceEntry[];
|
|
132
|
+
priors: ActionPrior[];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* One thing a rule did, once, as the run log stores it. Written only when something happened.
|
|
136
|
+
*
|
|
137
|
+
* `outcome` is stamped an hour after the fact; empty means "not judged yet", and `unknown` is
|
|
138
|
+
* deliberately not `kept` — "nobody objected" and "we could not look" are different facts.
|
|
139
|
+
*/
|
|
140
|
+
export interface RuleRun extends RuleRunRecord {
|
|
141
|
+
id: string;
|
|
142
|
+
undoneAt?: number;
|
|
143
|
+
undoneBy?: string;
|
|
144
|
+
outcome?: RunOutcome | "";
|
|
145
|
+
outcomeAt?: number;
|
|
146
|
+
createdAt?: number;
|
|
147
|
+
}
|