@inixiative/foundry-core 0.5.12 → 0.5.13
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/package.json +3 -3
- package/src/index.ts +2 -0
- package/src/thread.ts +23 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inixiative/foundry-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"bun": ">=1.4.4"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@inixiative/archive": "^0.
|
|
36
|
+
"@inixiative/archive": "^0.34.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@inixiative/archive": {
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@inixiative/archive": "^0.
|
|
44
|
+
"@inixiative/archive": "^0.34.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/index.ts
CHANGED
package/src/thread.ts
CHANGED
|
@@ -68,7 +68,7 @@ export interface ThreadPlanItem {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* The thread's plan, written by its agent through Foundry's `set_plan` tool. Outcomes are what the
|
|
71
|
-
* person gets (`you`: waits on the person); pains what hurts today; strategy how the work goes;
|
|
71
|
+
* person gets (`you`: waits on the person, shown in Plan, never Attention); pains what hurts today; strategy how the work goes;
|
|
72
72
|
* reasons why this way. Each technical row names, per concern (auth, permissions, db access,
|
|
73
73
|
* requests, locks, jobs, events, errors…), the existing system it uses and where, or why none fits.
|
|
74
74
|
*/
|
|
@@ -95,6 +95,26 @@ export interface ThreadPlan {
|
|
|
95
95
|
readonly updatedAt: number;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/** How an artifact renders: Markdown, a Mermaid diagram, an HTML page (scripts run sandboxed) or code. */
|
|
99
|
+
export type ThreadArtifactKind = 'markdown' | 'mermaid' | 'html' | 'code';
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* One artifact the thread's agent made with `set_artifact`, as the thread lists it: what it is and
|
|
103
|
+
* its versions. The content of each version is a journal row (`artifact` phase), read on demand.
|
|
104
|
+
*/
|
|
105
|
+
export interface ThreadArtifact {
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly title: string;
|
|
108
|
+
readonly kind: ThreadArtifactKind;
|
|
109
|
+
readonly versions: readonly {
|
|
110
|
+
readonly version: number;
|
|
111
|
+
/** The turn that wrote it, when one was running: the conversation shows its card there. */
|
|
112
|
+
readonly turnId: string | null;
|
|
113
|
+
readonly at: number;
|
|
114
|
+
}[];
|
|
115
|
+
readonly updatedAt: number;
|
|
116
|
+
}
|
|
117
|
+
|
|
98
118
|
/** One round of a thread's loop: how it went and what it found. */
|
|
99
119
|
export interface ThreadLoopRound {
|
|
100
120
|
readonly round: number;
|
|
@@ -241,6 +261,8 @@ export interface ThreadMeta {
|
|
|
241
261
|
plan?: ThreadPlan;
|
|
242
262
|
/** The process the agent repeats to reach the plan (`set_loop`, the Loop view). */
|
|
243
263
|
loop?: ThreadLoop;
|
|
264
|
+
/** What the agent made to show the person (`set_artifact`, the Artifacts view), newest last. */
|
|
265
|
+
artifacts?: ThreadArtifact[];
|
|
244
266
|
/** Where the agent says it stands: waiting on the person or blocked (`set_status`). */
|
|
245
267
|
agentStatus?: ThreadAgentStatus;
|
|
246
268
|
/** The machine (Foundry device identity, `~/.foundry/device.json`) the thread runs on. */
|