@maiaos/client-core 0.1.0-canary.55 → 0.1.0-canary.56
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
|
@@ -5,9 +5,10 @@ a client's renderer and
|
|
|
5
5
|
[`@maiaos/sdk`](https://github.com/vllnt/maia/blob/main/packages/sdk/README.md),
|
|
6
6
|
so every client reads Maia Node state and sends requests the same way.
|
|
7
7
|
|
|
8
|
-
> **Pre-release.**
|
|
9
|
-
>
|
|
10
|
-
>
|
|
8
|
+
> **Pre-release.** Maia publishes `canary` builds to npm only, and `latest` follows the newest
|
|
9
|
+
> one (earlier nightly builds are historical). They are not release-qualified,
|
|
10
|
+
> and Maia has no stable release
|
|
11
|
+
> ([D-202](https://github.com/vllnt/maia/blob/main/docs/decisions.md#d-202)).
|
|
11
12
|
> Nothing in this package is a stability promise: entry points, names and
|
|
12
13
|
> shapes can change in any build.
|
|
13
14
|
|
|
@@ -26,7 +27,7 @@ installs with this package.
|
|
|
26
27
|
## Install
|
|
27
28
|
|
|
28
29
|
```sh
|
|
29
|
-
pnpm add @maiaos/client-core@
|
|
30
|
+
pnpm add @maiaos/client-core@canary # or an exact version
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
## Usage
|
|
@@ -261,7 +261,9 @@ const requestPreview = (client, item, workspaceId) => Effect.flatMap(nextCompact
|
|
|
261
261
|
executor: item.executor,
|
|
262
262
|
nativeId: item.nativeId,
|
|
263
263
|
workspaceId,
|
|
264
|
-
}, options)))
|
|
264
|
+
}, options))).pipe(Effect.flatMap((outcome) => "alreadyAdopted" in outcome
|
|
265
|
+
? Effect.fail(refusal("session.adopt.preview", `Maia Session ${outcome.alreadyAdopted.sessionId} already adopted this session.`))
|
|
266
|
+
: Effect.succeed(outcome)));
|
|
265
267
|
const previewOne = (client, ref, { item, projectId }) => adoptionWorkspace(client, projectId).pipe(Effect.flatMap((workspaceId) => requestPreview(client, item, workspaceId)), Effect.matchEffect({
|
|
266
268
|
onFailure: (error) => refuseAdoption(ref, item, error),
|
|
267
269
|
onSuccess: (preview) => setAdoption(ref, { ...item, preview, stage: "previewed" }),
|
|
@@ -83,7 +83,19 @@ export declare const makePortfolioService: (client: PortfolioClient) => {
|
|
|
83
83
|
readonly latestTurnId?: string | undefined;
|
|
84
84
|
readonly latestTurnState?: "completed" | "dispatching" | "failed" | "interrupted" | "outcome-unknown" | "queued" | "running" | undefined;
|
|
85
85
|
readonly permission?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "never" | "on-request" | "plan" | "untrusted" | undefined;
|
|
86
|
+
readonly prompt?: {
|
|
87
|
+
readonly approvalId: string;
|
|
88
|
+
readonly expiresAt: string;
|
|
89
|
+
readonly kind: "command" | "file_change" | "question" | "tool";
|
|
90
|
+
readonly options?: readonly {
|
|
91
|
+
readonly label: string;
|
|
92
|
+
readonly optionId: string;
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
readonly summary?: string | undefined;
|
|
95
|
+
} | undefined;
|
|
86
96
|
readonly schemaVersion: 4;
|
|
97
|
+
readonly settledReason?: "failed" | "idle" | "stopped" | undefined;
|
|
98
|
+
readonly status?: "approval" | "done" | "ended" | "error" | "idle" | "question" | "starting" | "unknown" | "working" | undefined;
|
|
87
99
|
readonly title?: string | undefined;
|
|
88
100
|
readonly worktree?: {
|
|
89
101
|
readonly baseRef: string;
|
|
@@ -135,7 +147,19 @@ export declare const makePortfolioService: (client: PortfolioClient) => {
|
|
|
135
147
|
readonly latestTurnId?: string | undefined;
|
|
136
148
|
readonly latestTurnState?: "completed" | "dispatching" | "failed" | "interrupted" | "outcome-unknown" | "queued" | "running" | undefined;
|
|
137
149
|
readonly permission?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "never" | "on-request" | "plan" | "untrusted" | undefined;
|
|
150
|
+
readonly prompt?: {
|
|
151
|
+
readonly approvalId: string;
|
|
152
|
+
readonly expiresAt: string;
|
|
153
|
+
readonly kind: "command" | "file_change" | "question" | "tool";
|
|
154
|
+
readonly options?: readonly {
|
|
155
|
+
readonly label: string;
|
|
156
|
+
readonly optionId: string;
|
|
157
|
+
}[] | undefined;
|
|
158
|
+
readonly summary?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
138
160
|
readonly schemaVersion: 4;
|
|
161
|
+
readonly settledReason?: "failed" | "idle" | "stopped" | undefined;
|
|
162
|
+
readonly status?: "approval" | "done" | "ended" | "error" | "idle" | "question" | "starting" | "unknown" | "working" | undefined;
|
|
139
163
|
readonly title?: string | undefined;
|
|
140
164
|
readonly worktree?: {
|
|
141
165
|
readonly baseRef: string;
|
|
@@ -114,7 +114,19 @@ export declare const watchSessionList: (view: import("./collection-view.js").Col
|
|
|
114
114
|
readonly latestTurnId?: string | undefined;
|
|
115
115
|
readonly latestTurnState?: "completed" | "dispatching" | "failed" | "interrupted" | "outcome-unknown" | "queued" | "running" | undefined;
|
|
116
116
|
readonly permission?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "never" | "on-request" | "plan" | "untrusted" | undefined;
|
|
117
|
+
readonly prompt?: {
|
|
118
|
+
readonly approvalId: string;
|
|
119
|
+
readonly expiresAt: string;
|
|
120
|
+
readonly kind: "command" | "file_change" | "question" | "tool";
|
|
121
|
+
readonly options?: readonly {
|
|
122
|
+
readonly label: string;
|
|
123
|
+
readonly optionId: string;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
readonly summary?: string | undefined;
|
|
126
|
+
} | undefined;
|
|
117
127
|
readonly schemaVersion: 4;
|
|
128
|
+
readonly settledReason?: "failed" | "idle" | "stopped" | undefined;
|
|
129
|
+
readonly status?: "approval" | "done" | "ended" | "error" | "idle" | "question" | "starting" | "unknown" | "working" | undefined;
|
|
118
130
|
readonly title?: string | undefined;
|
|
119
131
|
readonly worktree?: {
|
|
120
132
|
readonly baseRef: string;
|
|
@@ -98,7 +98,19 @@ export declare const makeSessionListView: (target: PortfolioProject, emit: (stat
|
|
|
98
98
|
readonly latestTurnId?: string | undefined;
|
|
99
99
|
readonly latestTurnState?: "completed" | "dispatching" | "failed" | "interrupted" | "outcome-unknown" | "queued" | "running" | undefined;
|
|
100
100
|
readonly permission?: "acceptEdits" | "bypassPermissions" | "default" | "dontAsk" | "never" | "on-request" | "plan" | "untrusted" | undefined;
|
|
101
|
+
readonly prompt?: {
|
|
102
|
+
readonly approvalId: string;
|
|
103
|
+
readonly expiresAt: string;
|
|
104
|
+
readonly kind: "command" | "file_change" | "question" | "tool";
|
|
105
|
+
readonly options?: readonly {
|
|
106
|
+
readonly label: string;
|
|
107
|
+
readonly optionId: string;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
readonly summary?: string | undefined;
|
|
110
|
+
} | undefined;
|
|
101
111
|
readonly schemaVersion: 4;
|
|
112
|
+
readonly settledReason?: "failed" | "idle" | "stopped" | undefined;
|
|
113
|
+
readonly status?: "approval" | "done" | "ended" | "error" | "idle" | "question" | "starting" | "unknown" | "working" | undefined;
|
|
102
114
|
readonly title?: string | undefined;
|
|
103
115
|
readonly worktree?: {
|
|
104
116
|
readonly baseRef: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maiaos/client-core",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.56",
|
|
4
4
|
"description": "Platform-neutral client use cases for Maia OS: Effect services between a client's renderer and the SDK, so every client reads Maia Node state and sends requests the same way.",
|
|
5
5
|
"homepage": "https://github.com/vllnt/maia/tree/main/packages/client-core#readme",
|
|
6
6
|
"bugs": "https://github.com/vllnt/maia/issues",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"node": "24.22.1"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
97
|
+
"@maiaos/sdk": "0.1.0-canary.56",
|
|
98
98
|
"effect": "4.0.0"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|