@nyte-ai/core 0.0.18 → 0.0.21
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 +1 -1
- package/THIRD-PARTY-NOTICES.md +66 -0
- package/dist/chunks/{compose-yk3y0jap.js → compose-0m65m83c.js} +7 -7
- package/dist/chunks/{compose-r12cnkpc.js → compose-12jnd50a.js} +11 -11
- package/dist/chunks/{compose-q1n2dgrs.js → compose-1knxqqm1.js} +4 -4
- package/dist/chunks/{compose-xtkavyrw.js → compose-1r0wr5dc.js} +17 -9
- package/dist/chunks/{compose-9tqm6g18.js → compose-2rha31fc.js} +4 -4
- package/dist/chunks/{compose-0bpspysf.js → compose-4ppmas7g.js} +5 -5
- package/dist/chunks/compose-5rg7askh.js +52 -0
- package/dist/chunks/{compose-mryw0674.js → compose-5z835ej2.js} +6 -1
- package/dist/chunks/{compose-7k6nsmtq.js → compose-6gt28900.js} +11 -14
- package/dist/chunks/{compose-2eg8w67t.js → compose-6r5ymwyr.js} +15 -4
- package/dist/chunks/{compose-xd0kdp3t.js → compose-753gc057.js} +8 -8
- package/dist/chunks/{compose-q1ts0v6k.js → compose-767bb340.js} +1 -1
- package/dist/chunks/{compose-rpq9n0nz.js → compose-8mkfr84d.js} +89 -32
- package/dist/chunks/{compose-5w5bbakh.js → compose-8pp3vtv0.js} +5 -5
- package/dist/chunks/{compose-gaps3heh.js → compose-9hy3p236.js} +9 -9
- package/dist/chunks/{compose-pgeemk2b.js → compose-a7k9h27z.js} +6 -5
- package/dist/chunks/{compose-dc2ns6gd.js → compose-a8ddt55n.js} +10 -10
- package/dist/chunks/{compose-7b8ajk7a.js → compose-ad80nkkn.js} +8 -8
- package/dist/chunks/{compose-064y3n82.js → compose-ae5t6v5b.js} +5 -5
- package/dist/chunks/{compose-amr0k1m1.js → compose-b2bf1jvy.js} +122 -41
- package/dist/chunks/{compose-xpfr4wt3.js → compose-bbhk8vnr.js} +7 -4
- package/dist/chunks/compose-bd8c5n7k.js +32 -0
- package/dist/chunks/{compose-rehp8epe.js → compose-byse0eqj.js} +7 -7
- package/dist/chunks/{compose-ef936rsa.js → compose-bz70g01d.js} +27 -11
- package/dist/chunks/compose-c4238qkb.js +105 -0
- package/dist/chunks/{compose-q1b0tppc.js → compose-c9wxgbjp.js} +4 -4
- package/dist/chunks/{compose-h272znxk.js → compose-cdj05t7x.js} +7 -7
- package/dist/chunks/{compose-kb22bkpt.js → compose-cqpjcx2t.js} +12 -1
- package/dist/chunks/{compose-dbx6ftbm.js → compose-csh5vv2t.js} +42 -4
- package/dist/chunks/{compose-eqr5qwp1.js → compose-d1m94kzq.js} +62 -22
- package/dist/chunks/{compose-drdej9yt.js → compose-d95fwwvw.js} +4 -4
- package/dist/chunks/{compose-jc22rsz4.js → compose-dbsn3bsy.js} +2 -2
- package/dist/chunks/{compose-s2aew2c9.js → compose-e2fyz3xc.js} +5 -5
- package/dist/chunks/{compose-gg8b9b21.js → compose-e9f6nrwp.js} +23 -18
- package/dist/chunks/{compose-52afaf3v.js → compose-fnncnk81.js} +7 -7
- package/dist/chunks/{compose-bjx8s01m.js → compose-fqsqjbrf.js} +1 -1
- package/dist/chunks/{compose-1gd9vkye.js → compose-gj2ypr7q.js} +3 -3
- package/dist/chunks/compose-gvm49f4b.js +155 -0
- package/dist/chunks/{compose-1jz2j92f.js → compose-gxjc6vz9.js} +30 -2
- package/dist/chunks/{compose-cq1zx4gp.js → compose-h14pmqv3.js} +1 -1
- package/dist/chunks/{compose-d2s80zg2.js → compose-hfrjm4a1.js} +5 -5
- package/dist/chunks/{compose-kmzr06mw.js → compose-hfsn6pnt.js} +8 -5
- package/dist/chunks/{compose-jjchxce6.js → compose-j42p9wfs.js} +1 -1
- package/dist/chunks/{compose-4b1zf3p0.js → compose-jd4bsnqh.js} +63 -47
- package/dist/chunks/{compose-2g3enfv5.js → compose-jeemzja1.js} +4 -4
- package/dist/chunks/{compose-y478gv6x.js → compose-jmmyw9hd.js} +4 -4
- package/dist/chunks/{compose-5tkyrzr0.js → compose-jwy1gba9.js} +4 -4
- package/dist/chunks/{compose-k35b75k9.js → compose-kwkna3cg.js} +2 -4
- package/dist/chunks/{compose-t53j8yxv.js → compose-m01wspwf.js} +1 -1
- package/dist/chunks/{compose-n93897b0.js → compose-m91ffwss.js} +1 -1
- package/dist/chunks/{compose-madtxnp1.js → compose-matk94se.js} +7 -7
- package/dist/chunks/{compose-aa73dbe8.js → compose-mcz93154.js} +117 -58
- package/dist/chunks/{compose-r7dx7rpz.js → compose-mdwr0er9.js} +72 -15
- package/dist/chunks/{compose-j12n448k.js → compose-nj4nj5n9.js} +36 -3
- package/dist/chunks/{compose-yn2et568.js → compose-nkxwrphm.js} +141 -15
- package/dist/chunks/{compose-k8aghhv2.js → compose-pkprmn5b.js} +16 -16
- package/dist/chunks/{compose-1z7q169s.js → compose-q2zxbg41.js} +69 -41
- package/dist/chunks/{compose-b5xz0dj7.js → compose-qwbe95qs.js} +2 -2
- package/dist/chunks/{compose-vmhv4e00.js → compose-qxfq6dn9.js} +13 -12
- package/dist/chunks/{compose-wgphshsn.js → compose-r8tz1xfj.js} +8 -8
- package/dist/chunks/{compose-ffk8dnbh.js → compose-smsafpqe.js} +3 -3
- package/dist/chunks/{compose-djq2bt61.js → compose-sprfv38c.js} +6 -6
- package/dist/chunks/{compose-cdy4q5mv.js → compose-t9fcqtby.js} +17 -16
- package/dist/chunks/{compose-p3q14yt1.js → compose-tppkp915.js} +5 -5
- package/dist/chunks/{compose-dckpgtks.js → compose-ts08bth2.js} +3 -3
- package/dist/chunks/{compose-n10w4nkk.js → compose-vn7b7fdj.js} +12 -3
- package/dist/chunks/{compose-9m19b27b.js → compose-w6zb11k1.js} +7 -7
- package/dist/chunks/{compose-j3tkz0tb.js → compose-wvzzf8n2.js} +6 -6
- package/dist/chunks/{compose-6vf6dkk2.js → compose-xhtgytrh.js} +2 -2
- package/dist/chunks/{compose-4tb2vn84.js → compose-y6xgbg2h.js} +1 -1
- package/dist/chunks/compose-yfcb6w2h.js +58 -0
- package/dist/chunks/{compose-0rx7ygxq.js → compose-zaanjpb7.js} +1 -1
- package/dist/chunks/{compose-7pc3p5ex.js → compose-zjj072km.js} +8 -8
- package/dist/src/agent/compaction.js +41 -39
- package/dist/src/agent/images.d.ts +7 -0
- package/dist/src/agent/images.js +8 -0
- package/dist/src/agent/request.js +30 -30
- package/dist/src/agent/tool-runner.d.ts +3 -7
- package/dist/src/agent/tool-runner.js +34 -30
- package/dist/src/agent/transcript.d.ts +0 -1
- package/dist/src/agent/transcript.js +37 -35
- package/dist/src/agent/turn.js +46 -43
- package/dist/src/api/connection.js +60 -56
- package/dist/src/api/head.js +42 -41
- package/dist/src/api/part.js +22 -22
- package/dist/src/api/server.js +48 -44
- package/dist/src/api/session.js +48 -47
- package/dist/src/builtins/delegation.js +2 -2
- package/dist/src/builtins/environment.js +1 -2
- package/dist/src/compose.d.ts +6 -7
- package/dist/src/compose.js +72 -67
- package/dist/src/contract/fold.d.ts +1 -3
- package/dist/src/contract/host.d.ts +30 -1
- package/dist/src/contract/host.js +4 -2
- package/dist/src/contract/kernel.d.ts +6 -35
- package/dist/src/contract/parts.d.ts +4 -0
- package/dist/src/contract/parts.js +1 -1
- package/dist/src/contract/records.d.ts +69 -3
- package/dist/src/contract/records.js +5 -1
- package/dist/src/contract/session.d.ts +2 -1
- package/dist/src/contract/tools.d.ts +10 -1
- package/dist/src/contract/workspace.d.ts +7 -3
- package/dist/src/drive/execution.js +46 -42
- package/dist/src/drive/interruptions.d.ts +7 -0
- package/dist/src/drive/interruptions.js +17 -0
- package/dist/src/engine/admission.js +24 -24
- package/dist/src/engine/batches.js +22 -22
- package/dist/src/engine/branch-summary.js +21 -21
- package/dist/src/engine/durable.d.ts +0 -2
- package/dist/src/engine/durable.js +20 -20
- package/dist/src/engine/fence.js +20 -20
- package/dist/src/engine/jobs.d.ts +2 -0
- package/dist/src/engine/jobs.js +31 -27
- package/dist/src/engine/move.js +23 -23
- package/dist/src/engine/part-definitions.js +2 -2
- package/dist/src/engine/presence.d.ts +39 -0
- package/dist/src/engine/presence.js +16 -0
- package/dist/src/engine/principals.js +17 -17
- package/dist/src/engine/receipts.js +21 -21
- package/dist/src/engine/runs.d.ts +1 -1
- package/dist/src/engine/runs.js +25 -25
- package/dist/src/engine/start.js +36 -35
- package/dist/src/engine/surface.d.ts +4 -0
- package/dist/src/engine/surface.js +13 -0
- package/dist/src/engine/waits.d.ts +5 -15
- package/dist/src/engine/waits.js +23 -19
- package/dist/src/env/browser.js +27 -27
- package/dist/src/env/environment.js +29 -29
- package/dist/src/env/mcp.js +31 -31
- package/dist/src/env/session-changes.d.ts +10 -0
- package/dist/src/env/session-changes.js +15 -0
- package/dist/src/env/trust.js +30 -30
- package/dist/src/env/workspaces.js +34 -33
- package/dist/src/env/worktrees.js +35 -34
- package/dist/src/extend/activation.js +35 -34
- package/dist/src/extend/hooks.js +22 -22
- package/dist/src/extend/models.d.ts +2 -1
- package/dist/src/extend/models.js +32 -30
- package/dist/src/extend/plugin-api.js +18 -18
- package/dist/src/extend/plugin-runtime.js +42 -41
- package/dist/src/extend/registry.js +27 -27
- package/dist/src/extend/resources.js +31 -31
- package/dist/src/extend/setting-layers.js +4 -4
- package/dist/src/extend/settings.js +38 -37
- package/dist/src/extend/workspace-commands.js +43 -42
- package/dist/src/fold/calls.js +5 -5
- package/dist/src/fold/checkpoint.js +11 -11
- package/dist/src/fold/code.d.ts +1 -2
- package/dist/src/fold/code.js +1 -1
- package/dist/src/fold/commit.d.ts +0 -4
- package/dist/src/fold/commit.js +16 -16
- package/dist/src/fold/draft.js +4 -4
- package/dist/src/fold/fold.js +7 -7
- package/dist/src/fold/paths.js +5 -5
- package/dist/src/fold/project.d.ts +3 -1
- package/dist/src/fold/project.js +8 -6
- package/dist/src/fold/reads.js +5 -5
- package/dist/src/fold/seen.js +19 -19
- package/dist/src/fold/view.d.ts +1 -1
- package/dist/src/fold/view.js +20 -20
- package/dist/src/fold/watch.js +15 -15
- package/dist/src/harness.d.ts +3 -1
- package/dist/src/harness.js +75 -70
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.js +5 -3
- package/dist/src/server.js +70 -65
- package/dist/src/store/inspect.js +4 -4
- package/dist/src/store/log.d.ts +0 -2
- package/dist/src/store/log.js +2 -2
- package/dist/src/store/memory-store.js +5 -5
- package/dist/src/store/migrations.js +3 -3
- package/dist/src/store/model-state.d.ts +6 -1
- package/dist/src/store/model-state.js +14 -4
- package/dist/src/store/parts.js +5 -5
- package/dist/src/store/refs.d.ts +6 -5
- package/dist/src/store/refs.js +11 -1
- package/dist/src/store/session-index.js +2 -2
- package/dist/src/store/session.d.ts +3 -1
- package/dist/src/store/session.js +5 -3
- package/dist/src/store.d.ts +1 -1
- package/dist/src/store.js +11 -7
- package/dist/src/testing.d.ts +2 -0
- package/dist/src/testing.js +83 -70
- package/package.json +4 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LOCAL2,
|
|
3
3
|
CORE_CONTEXT2
|
|
4
|
-
} from "./compose-
|
|
4
|
+
} from "./compose-5z835ej2.js";
|
|
5
5
|
import {
|
|
6
6
|
decodeRunRecord2,
|
|
7
7
|
decodeCallRecord2
|
|
8
|
-
} from "./compose-
|
|
8
|
+
} from "./compose-gxjc6vz9.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionRef2,
|
|
11
11
|
inboxRef2,
|
|
12
12
|
runRef2,
|
|
13
13
|
endedRunRef2,
|
|
14
14
|
liveRef2
|
|
15
|
-
} from "./compose-
|
|
15
|
+
} from "./compose-cqpjcx2t.js";
|
|
16
16
|
import {
|
|
17
17
|
MAIN2,
|
|
18
18
|
STALE2,
|
|
@@ -25,36 +25,36 @@ import {
|
|
|
25
25
|
put2,
|
|
26
26
|
attempt2,
|
|
27
27
|
sessionEvent2
|
|
28
|
-
} from "./compose-
|
|
28
|
+
} from "./compose-vn7b7fdj.js";
|
|
29
29
|
import {
|
|
30
30
|
failedParts2
|
|
31
|
-
} from "./compose-
|
|
31
|
+
} from "./compose-d95fwwvw.js";
|
|
32
32
|
import {
|
|
33
33
|
wokenIndex2
|
|
34
34
|
} from "./compose-0wq555bd.js";
|
|
35
35
|
import {
|
|
36
36
|
commit2
|
|
37
|
-
} from "./compose-
|
|
37
|
+
} from "./compose-bbhk8vnr.js";
|
|
38
38
|
import {
|
|
39
39
|
withFold2,
|
|
40
40
|
liveParts2,
|
|
41
41
|
readRunEnd2
|
|
42
|
-
} from "./compose-
|
|
42
|
+
} from "./compose-xhtgytrh.js";
|
|
43
43
|
import {
|
|
44
44
|
waitFor2
|
|
45
|
-
} from "./compose-
|
|
45
|
+
} from "./compose-bz70g01d.js";
|
|
46
46
|
import {
|
|
47
47
|
FENCED2,
|
|
48
48
|
stopRun2
|
|
49
|
-
} from "./compose-
|
|
49
|
+
} from "./compose-w6zb11k1.js";
|
|
50
50
|
import {
|
|
51
51
|
send2
|
|
52
|
-
} from "./compose-
|
|
52
|
+
} from "./compose-t9fcqtby.js";
|
|
53
53
|
|
|
54
54
|
// src/engine/runs.ts
|
|
55
55
|
import { asId, isJsonObject, SdkError } from "@nyte-ai/schema";
|
|
56
56
|
var REPORT_LIMIT = 4096;
|
|
57
|
-
async function newRun2(store, session, head, origin, configuration) {
|
|
57
|
+
async function newRun2(store, session, head, origin, configuration, requires = []) {
|
|
58
58
|
const id = asId(crypto.randomUUID());
|
|
59
59
|
const startedAt = Date.now();
|
|
60
60
|
const view = { id, head, startedAt, attempt: 1, configuration, origin };
|
|
@@ -68,7 +68,8 @@ async function newRun2(store, session, head, origin, configuration) {
|
|
|
68
68
|
lastSnapshot: null,
|
|
69
69
|
usage: null,
|
|
70
70
|
requests: 0,
|
|
71
|
-
parked: []
|
|
71
|
+
parked: [],
|
|
72
|
+
requires: [...requires]
|
|
72
73
|
};
|
|
73
74
|
const target = await put2(store, "run", record, startedAt);
|
|
74
75
|
return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CORE_CONTEXT2,
|
|
3
3
|
PARTICIPANT_AUTHORITY2
|
|
4
|
-
} from "./compose-
|
|
4
|
+
} from "./compose-5z835ej2.js";
|
|
5
5
|
import {
|
|
6
6
|
decodePartRecord2
|
|
7
|
-
} from "./compose-
|
|
7
|
+
} from "./compose-gxjc6vz9.js";
|
|
8
8
|
import {
|
|
9
9
|
objectId2
|
|
10
10
|
} from "./compose-q6c7wswc.js";
|
|
11
11
|
import {
|
|
12
12
|
headRef2,
|
|
13
13
|
partRef2
|
|
14
|
-
} from "./compose-
|
|
14
|
+
} from "./compose-cqpjcx2t.js";
|
|
15
15
|
import {
|
|
16
16
|
MAIN2,
|
|
17
17
|
STALE2,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
attempt2,
|
|
24
24
|
toCommitObjectId2,
|
|
25
25
|
readCall2
|
|
26
|
-
} from "./compose-
|
|
26
|
+
} from "./compose-vn7b7fdj.js";
|
|
27
27
|
import {
|
|
28
28
|
convertJsonSchema2,
|
|
29
29
|
check2
|
|
@@ -32,19 +32,19 @@ import {
|
|
|
32
32
|
settle3,
|
|
33
33
|
release2,
|
|
34
34
|
storedAnswer2
|
|
35
|
-
} from "./compose-
|
|
35
|
+
} from "./compose-d95fwwvw.js";
|
|
36
36
|
import {
|
|
37
37
|
commit2
|
|
38
|
-
} from "./compose-
|
|
38
|
+
} from "./compose-bbhk8vnr.js";
|
|
39
39
|
import {
|
|
40
40
|
runAction2,
|
|
41
41
|
reserveRerun2,
|
|
42
42
|
openAction2,
|
|
43
43
|
recordAcquisition2
|
|
44
|
-
} from "./compose-
|
|
44
|
+
} from "./compose-byse0eqj.js";
|
|
45
45
|
import {
|
|
46
46
|
RESERVED_PART_KINDS2
|
|
47
|
-
} from "./compose-
|
|
47
|
+
} from "./compose-zaanjpb7.js";
|
|
48
48
|
import {
|
|
49
49
|
callable2
|
|
50
50
|
} from "./compose-ry29956g.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeCommitRecord2
|
|
3
|
-
} from "./compose-
|
|
3
|
+
} from "./compose-gxjc6vz9.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionRef2
|
|
6
|
-
} from "./compose-
|
|
6
|
+
} from "./compose-cqpjcx2t.js";
|
|
7
7
|
import {
|
|
8
8
|
toCommitObjectId2,
|
|
9
9
|
readCommit2
|
|
10
|
-
} from "./compose-
|
|
10
|
+
} from "./compose-vn7b7fdj.js";
|
|
11
11
|
|
|
12
12
|
// src/store/inspect.ts
|
|
13
13
|
import { asId, isJsonObject } from "@nyte-ai/schema";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LOCAL2
|
|
3
|
-
} from "./compose-
|
|
3
|
+
} from "./compose-5z835ej2.js";
|
|
4
4
|
import {
|
|
5
5
|
decodeRunRecord2
|
|
6
|
-
} from "./compose-
|
|
6
|
+
} from "./compose-gxjc6vz9.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionRef2,
|
|
9
9
|
runRef2
|
|
10
|
-
} from "./compose-
|
|
10
|
+
} from "./compose-cqpjcx2t.js";
|
|
11
11
|
import {
|
|
12
12
|
dev2
|
|
13
13
|
} from "./compose-n116fnmp.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
requireSession2,
|
|
18
18
|
put2,
|
|
19
19
|
attempt2
|
|
20
|
-
} from "./compose-
|
|
20
|
+
} from "./compose-vn7b7fdj.js";
|
|
21
21
|
import {
|
|
22
22
|
convertJsonSchema2,
|
|
23
23
|
check2
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
} from "./compose-84272xbk.js";
|
|
29
29
|
import {
|
|
30
30
|
commit2
|
|
31
|
-
} from "./compose-
|
|
31
|
+
} from "./compose-bbhk8vnr.js";
|
|
32
32
|
import {
|
|
33
33
|
modelInfo2,
|
|
34
34
|
withLimits2
|
|
35
|
-
} from "./compose-
|
|
35
|
+
} from "./compose-mdwr0er9.js";
|
|
36
36
|
|
|
37
37
|
// src/agent/request.ts
|
|
38
38
|
import { contentText } from "@nyte-ai/schema/model";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
inboxRef2,
|
|
7
7
|
receiptRef2,
|
|
8
8
|
callRef2
|
|
9
|
-
} from "./compose-
|
|
9
|
+
} from "./compose-cqpjcx2t.js";
|
|
10
10
|
import {
|
|
11
11
|
dev2
|
|
12
12
|
} from "./compose-n116fnmp.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readCall2,
|
|
28
28
|
coveredHere2,
|
|
29
29
|
guard2
|
|
30
|
-
} from "./compose-
|
|
30
|
+
} from "./compose-vn7b7fdj.js";
|
|
31
31
|
import {
|
|
32
32
|
traced2,
|
|
33
33
|
followTrace2,
|
|
@@ -35,18 +35,18 @@ import {
|
|
|
35
35
|
} from "./compose-sd0stm97.js";
|
|
36
36
|
import {
|
|
37
37
|
commit2
|
|
38
|
-
} from "./compose-
|
|
38
|
+
} from "./compose-bbhk8vnr.js";
|
|
39
39
|
import {
|
|
40
40
|
withFold2
|
|
41
|
-
} from "./compose-
|
|
41
|
+
} from "./compose-xhtgytrh.js";
|
|
42
42
|
import {
|
|
43
43
|
fence2,
|
|
44
44
|
finishFence2
|
|
45
|
-
} from "./compose-
|
|
45
|
+
} from "./compose-w6zb11k1.js";
|
|
46
46
|
import {
|
|
47
47
|
holdSummary2,
|
|
48
48
|
summarizedMove2
|
|
49
|
-
} from "./compose-
|
|
49
|
+
} from "./compose-tppkp915.js";
|
|
50
50
|
import {
|
|
51
51
|
refusalError2,
|
|
52
52
|
collectContributions2
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
settleReceipt2,
|
|
60
60
|
reserve2,
|
|
61
61
|
known2
|
|
62
|
-
} from "./compose-
|
|
62
|
+
} from "./compose-fnncnk81.js";
|
|
63
63
|
import {
|
|
64
64
|
landed2,
|
|
65
65
|
chooseSendSchedule2
|
|
@@ -223,7 +223,7 @@ async function admit(sending) {
|
|
|
223
223
|
position: inbox.messages.length
|
|
224
224
|
});
|
|
225
225
|
const outcome = await commit2(kernel, [
|
|
226
|
-
await admitted(kernel
|
|
226
|
+
await admitted(kernel, session, head, inbox, [...inbox.messages, message.id], message),
|
|
227
227
|
await pendingReceipt(kernel.store, session, id, digest, "absent")
|
|
228
228
|
]);
|
|
229
229
|
if (outcome.kind === "stale")
|
|
@@ -266,7 +266,7 @@ async function revise(sending, target, keyed) {
|
|
|
266
266
|
position
|
|
267
267
|
});
|
|
268
268
|
const outcome = await commit2(kernel, [
|
|
269
|
-
await admitted(kernel
|
|
269
|
+
await admitted(kernel, session, head, inbox, [...rest.slice(0, position), target, ...rest.slice(position)], message),
|
|
270
270
|
{
|
|
271
271
|
name: receiptRef2(session, id),
|
|
272
272
|
target: await put2(kernel.store, "receipt", {
|
|
@@ -357,7 +357,7 @@ async function editGated(sending, target, gated) {
|
|
|
357
357
|
expect: readRefExpectation2(checked.tip.ref),
|
|
358
358
|
events: [{ head, kind: "head", from: checked.tip.id, to: parent, reason: "moved" }]
|
|
359
359
|
},
|
|
360
|
-
await admitted(kernel
|
|
360
|
+
await admitted(kernel, session, head, checked.inbox, [...checked.inbox.messages, record.id], record),
|
|
361
361
|
await pendingReceipt(kernel.store, session, id, digest, "absent")
|
|
362
362
|
]);
|
|
363
363
|
dev2("admission", "edit", { session, head, target, outcome: outcome.kind });
|
|
@@ -390,7 +390,7 @@ async function editGated(sending, target, gated) {
|
|
|
390
390
|
updates: async ({ inbox, receipt, stopped }) => {
|
|
391
391
|
const record = await message(stopped, inbox.messages.length);
|
|
392
392
|
return [
|
|
393
|
-
await admitted(kernel
|
|
393
|
+
await admitted(kernel, session, head, inbox, [...inbox.messages, record.id], record),
|
|
394
394
|
{ name: receipt.ref.name, target: receipt.ref.target, expect: receipt.ref.revision }
|
|
395
395
|
];
|
|
396
396
|
}
|
|
@@ -438,7 +438,7 @@ async function admitDeciding2(kernel, session, first) {
|
|
|
438
438
|
position: 0
|
|
439
439
|
};
|
|
440
440
|
return [
|
|
441
|
-
await admitted(kernel
|
|
441
|
+
await admitted(kernel, session, MAIN2, await readInbox2(kernel.store, session, MAIN2), [message.id], message),
|
|
442
442
|
{
|
|
443
443
|
name: receiptRef2(session, id),
|
|
444
444
|
target: await put2(kernel.store, "receipt", {
|
|
@@ -489,7 +489,7 @@ async function readmitDeciding2(kernel, context, session, input, stop) {
|
|
|
489
489
|
position
|
|
490
490
|
});
|
|
491
491
|
const outcome = await commit2(kernel, [
|
|
492
|
-
await admitted(kernel
|
|
492
|
+
await admitted(kernel, session, MAIN2, inbox, inbox.messages, message)
|
|
493
493
|
]);
|
|
494
494
|
if (outcome.kind === "stale")
|
|
495
495
|
return STALE2;
|
|
@@ -604,7 +604,7 @@ async function resolve(sending, patch) {
|
|
|
604
604
|
return result;
|
|
605
605
|
throw refusalError2(result);
|
|
606
606
|
}
|
|
607
|
-
async function admitted(
|
|
607
|
+
async function admitted(kernel, session, head, inbox, messages, message) {
|
|
608
608
|
const input = message.source.kind === "user" && message.delivery !== "attach";
|
|
609
609
|
const pendingInput = [
|
|
610
610
|
...inbox.pendingInput.filter((id) => id !== message.id),
|
|
@@ -612,7 +612,7 @@ async function admitted(store, session, head, inbox, messages, message) {
|
|
|
612
612
|
];
|
|
613
613
|
return {
|
|
614
614
|
name: inboxRef2(session, head),
|
|
615
|
-
target: await put2(store, "inbox", { messages, pendingInput }),
|
|
615
|
+
target: await put2(kernel.store, "inbox", { messages, pendingInput }),
|
|
616
616
|
expect: readRefExpectation2(inbox.ref),
|
|
617
617
|
events: [
|
|
618
618
|
{
|
|
@@ -626,7 +626,8 @@ async function admitted(store, session, head, inbox, messages, message) {
|
|
|
626
626
|
schedule: message.schedule,
|
|
627
627
|
covered: message.covered,
|
|
628
628
|
configuration: message.configuration,
|
|
629
|
-
replaced: message.replaced
|
|
629
|
+
replaced: message.replaced,
|
|
630
|
+
requires: [...kernel.presence?.member.capabilities ?? []]
|
|
630
631
|
}
|
|
631
632
|
]
|
|
632
633
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
headRef2,
|
|
3
3
|
partRef2
|
|
4
|
-
} from "./compose-
|
|
4
|
+
} from "./compose-cqpjcx2t.js";
|
|
5
5
|
import {
|
|
6
6
|
EMPTY_REVISION2,
|
|
7
7
|
STALE2,
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
walkCommitPath2,
|
|
14
14
|
toCommitObjectId2,
|
|
15
15
|
guard2
|
|
16
|
-
} from "./compose-
|
|
16
|
+
} from "./compose-vn7b7fdj.js";
|
|
17
17
|
import {
|
|
18
18
|
commit2
|
|
19
|
-
} from "./compose-
|
|
19
|
+
} from "./compose-bbhk8vnr.js";
|
|
20
20
|
import {
|
|
21
21
|
withFold2
|
|
22
|
-
} from "./compose-
|
|
22
|
+
} from "./compose-xhtgytrh.js";
|
|
23
23
|
import {
|
|
24
24
|
fence2
|
|
25
|
-
} from "./compose-
|
|
25
|
+
} from "./compose-w6zb11k1.js";
|
|
26
26
|
|
|
27
27
|
// src/engine/branch-summary.ts
|
|
28
28
|
import { asId } from "@nyte-ai/schema";
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from "./compose-q6c7wswc.js";
|
|
5
5
|
import {
|
|
6
6
|
parseSessionRef2
|
|
7
|
-
} from "./compose-
|
|
7
|
+
} from "./compose-cqpjcx2t.js";
|
|
8
8
|
import {
|
|
9
9
|
admits2,
|
|
10
10
|
fenceNames2,
|
|
11
11
|
collectSessionEvents2,
|
|
12
12
|
loggedEvent2,
|
|
13
13
|
decodeObject2
|
|
14
|
-
} from "./compose-
|
|
14
|
+
} from "./compose-kwkna3cg.js";
|
|
15
15
|
import {
|
|
16
16
|
sessionIndexRef2,
|
|
17
17
|
projectSessionIndex2
|
|
18
|
-
} from "./compose-
|
|
18
|
+
} from "./compose-y6xgbg2h.js";
|
|
19
19
|
|
|
20
20
|
// src/store/memory-store.ts
|
|
21
21
|
import { asId, asSeq } from "@nyte-ai/schema";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
decodeReceiptRecord2,
|
|
8
8
|
decodeCallRecord2,
|
|
9
9
|
decodeKvValue2
|
|
10
|
-
} from "./compose-
|
|
10
|
+
} from "./compose-gxjc6vz9.js";
|
|
11
11
|
import {
|
|
12
12
|
dev2
|
|
13
13
|
} from "./compose-n116fnmp.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
inboxRef2,
|
|
18
18
|
receiptRef2,
|
|
19
19
|
callRef2
|
|
20
|
-
} from "./compose-
|
|
20
|
+
} from "./compose-cqpjcx2t.js";
|
|
21
21
|
|
|
22
22
|
// src/store/session.ts
|
|
23
23
|
import { asId, SdkError } from "@nyte-ai/schema";
|
|
@@ -72,6 +72,15 @@ async function liveRuns2(store, session) {
|
|
|
72
72
|
const runs = await Promise.all(refs.map((ref) => load2(store, ref, decodeRunRecord2)));
|
|
73
73
|
return runs.flatMap((run) => run === null ? [] : [run]);
|
|
74
74
|
}
|
|
75
|
+
async function threadStart2(store, session) {
|
|
76
|
+
const refs = await Promise.all([
|
|
77
|
+
store.refs.list(`${sessionRef2(session)}/runs/`),
|
|
78
|
+
store.refs.list(`${sessionRef2(session)}/ended/`)
|
|
79
|
+
]);
|
|
80
|
+
const runs = await Promise.all(refs.flat().map((ref) => load2(store, ref, decodeRunRecord2)));
|
|
81
|
+
const [first] = runs.flatMap((run) => run === null || run.record.snapshot === null ? [] : [run.record]).toSorted((left, right) => left.view.startedAt - right.view.startedAt);
|
|
82
|
+
return first?.snapshot ?? null;
|
|
83
|
+
}
|
|
75
84
|
async function liveRun3(store, session, head) {
|
|
76
85
|
return (await liveRuns2(store, session)).find((run) => run.record.view.head === head) ?? null;
|
|
77
86
|
}
|
|
@@ -253,4 +262,4 @@ async function readKv2(store, name) {
|
|
|
253
262
|
return ref === null || ref.target === null ? undefined : decodeKvValue2(await store.objects.get(ref.target));
|
|
254
263
|
}
|
|
255
264
|
|
|
256
|
-
export { MAIN2, EMPTY_REVISION2, START2, STALE2, load2, readSession2, requireSession2, readReceipt2, readTip2, readInbox2, inboxWithout2, liveRuns2, liveRun3, readRefExpectation2, sameRevision2, staleHead2, put2, attempt2, walkCommitPath2, readPositionCommit2, createPosition2, toCommitObjectId2, readCommit2, readCall2, readCalls2, covers2, listSessionRecords2, coveredSessions2, coveredHere2, coversRecord2, sessionEvent2, guard2, readKv2 };
|
|
265
|
+
export { MAIN2, EMPTY_REVISION2, START2, STALE2, load2, readSession2, requireSession2, readReceipt2, readTip2, readInbox2, inboxWithout2, liveRuns2, threadStart2, liveRun3, readRefExpectation2, sameRevision2, staleHead2, put2, attempt2, walkCommitPath2, readPositionCommit2, createPosition2, toCommitObjectId2, readCommit2, readCall2, readCalls2, covers2, listSessionRecords2, coveredSessions2, coveredHere2, coversRecord2, sessionEvent2, guard2, readKv2 };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeRunRecord2
|
|
3
|
-
} from "./compose-
|
|
3
|
+
} from "./compose-gxjc6vz9.js";
|
|
4
4
|
import {
|
|
5
5
|
inboxRef2,
|
|
6
6
|
runRef2,
|
|
7
7
|
liveRef2
|
|
8
|
-
} from "./compose-
|
|
8
|
+
} from "./compose-cqpjcx2t.js";
|
|
9
9
|
import {
|
|
10
10
|
STALE2,
|
|
11
11
|
load2,
|
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
put2,
|
|
18
18
|
attempt2,
|
|
19
19
|
readCall2
|
|
20
|
-
} from "./compose-
|
|
20
|
+
} from "./compose-vn7b7fdj.js";
|
|
21
21
|
import {
|
|
22
22
|
stoppedParts2
|
|
23
|
-
} from "./compose-
|
|
23
|
+
} from "./compose-d95fwwvw.js";
|
|
24
24
|
import {
|
|
25
25
|
commit2
|
|
26
|
-
} from "./compose-
|
|
26
|
+
} from "./compose-bbhk8vnr.js";
|
|
27
27
|
import {
|
|
28
28
|
liveParts2,
|
|
29
29
|
readRunEnd2
|
|
30
|
-
} from "./compose-
|
|
30
|
+
} from "./compose-xhtgytrh.js";
|
|
31
31
|
import {
|
|
32
32
|
readParkedWait2
|
|
33
|
-
} from "./compose-
|
|
33
|
+
} from "./compose-bz70g01d.js";
|
|
34
34
|
|
|
35
35
|
// src/engine/fence.ts
|
|
36
36
|
var FENCED2 = { class: "aborted", message: "Stopped." };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostPrincipalsRef2
|
|
3
|
-
} from "./compose-
|
|
3
|
+
} from "./compose-cqpjcx2t.js";
|
|
4
4
|
import {
|
|
5
5
|
sendReceipt2
|
|
6
|
-
} from "./compose-
|
|
6
|
+
} from "./compose-fnncnk81.js";
|
|
7
7
|
import {
|
|
8
8
|
move2
|
|
9
|
-
} from "./compose-
|
|
9
|
+
} from "./compose-matk94se.js";
|
|
10
10
|
import {
|
|
11
11
|
heldReceipt2,
|
|
12
12
|
applyBatch2
|
|
13
|
-
} from "./compose-
|
|
13
|
+
} from "./compose-2rha31fc.js";
|
|
14
14
|
import {
|
|
15
15
|
driveInProcess2
|
|
16
|
-
} from "./compose-
|
|
16
|
+
} from "./compose-8mkfr84d.js";
|
|
17
17
|
import {
|
|
18
18
|
redeemPairing2,
|
|
19
19
|
authenticateToken2
|
|
20
|
-
} from "./compose-
|
|
20
|
+
} from "./compose-jwy1gba9.js";
|
|
21
21
|
|
|
22
22
|
// src/api/server.ts
|
|
23
23
|
function createServerHost2(kernel) {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
liveRuns2,
|
|
3
|
+
threadStart2,
|
|
4
|
+
listSessionRecords2
|
|
5
|
+
} from "./compose-vn7b7fdj.js";
|
|
6
|
+
|
|
7
|
+
// src/env/session-changes.ts
|
|
8
|
+
import { asSeq } from "@nyte-ai/schema";
|
|
9
|
+
var LOG_PAGE = 256;
|
|
10
|
+
async function readAttributedPaths2(store, session, after = asSeq(0), charged = () => true) {
|
|
11
|
+
const through = await store.refs.tail(session);
|
|
12
|
+
const paths = new Set;
|
|
13
|
+
let cursor = after;
|
|
14
|
+
while (cursor < through) {
|
|
15
|
+
const events = await store.refs.log(session, cursor, LOG_PAGE);
|
|
16
|
+
for (const event of events)
|
|
17
|
+
if (event.seq <= through && event.kind === "call" && event.change === "settled" && charged(event))
|
|
18
|
+
for (const path of event.changes?.paths ?? [])
|
|
19
|
+
paths.add(path);
|
|
20
|
+
const last = events.at(-1);
|
|
21
|
+
if (last === undefined)
|
|
22
|
+
break;
|
|
23
|
+
cursor = last.seq;
|
|
24
|
+
}
|
|
25
|
+
return paths;
|
|
26
|
+
}
|
|
27
|
+
async function ownedChanges2(store, snapshots, session, to, extra = []) {
|
|
28
|
+
const [from, attributed] = await Promise.all([
|
|
29
|
+
threadStart2(store, session),
|
|
30
|
+
readAttributedPaths2(store, session)
|
|
31
|
+
]);
|
|
32
|
+
const owned = new Set([...attributed, ...extra]);
|
|
33
|
+
const changes = await snapshots.diff(from ?? to, to);
|
|
34
|
+
return {
|
|
35
|
+
...changes,
|
|
36
|
+
files: changes.files.filter((file) => owned.has(file.path) || file.from !== undefined && owned.has(file.from))
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async function anotherChatLive2(kernel, session) {
|
|
40
|
+
const records = await listSessionRecords2(kernel.store);
|
|
41
|
+
const parents = new Map(records.map((record) => [record.id, record.parent]));
|
|
42
|
+
const findRoot = (id) => {
|
|
43
|
+
const parent = parents.get(id);
|
|
44
|
+
return parent === null || parent === undefined ? id : findRoot(parent);
|
|
45
|
+
};
|
|
46
|
+
const workspace = records.find((record) => record.id === session)?.workspace;
|
|
47
|
+
if (workspace === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
const family = findRoot(session);
|
|
50
|
+
const others = new Set(records.flatMap((record) => record.workspace === workspace && findRoot(record.id) !== family ? [record.id] : []));
|
|
51
|
+
const working = kernel.jobs.list(workspace).some((entry) => entry.view.state.kind === "running" && entry.owner !== null && others.has(entry.owner.session));
|
|
52
|
+
if (working)
|
|
53
|
+
return true;
|
|
54
|
+
const runs = await Promise.all([...others].map((id) => liveRuns2(kernel.store, id)));
|
|
55
|
+
return runs.some((live) => live.length > 0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { readAttributedPaths2, ownedChanges2, anotherChatLive2 };
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
tool2,
|
|
5
5
|
compaction2,
|
|
6
6
|
branchSummary2
|
|
7
|
-
} from "./compose-
|
|
7
|
+
} from "./compose-fqsqjbrf.js";
|
|
8
8
|
|
|
9
9
|
// src/engine/part-definitions.ts
|
|
10
10
|
var RESERVED_PART_KINDS2 = new Set([text2, thinking2, tool2, compaction2, branchSummary2].map((definition) => definition.kind));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LOCAL2,
|
|
3
3
|
ALL_AUTHORITY2
|
|
4
|
-
} from "./compose-
|
|
4
|
+
} from "./compose-5z835ej2.js";
|
|
5
5
|
import {
|
|
6
6
|
forwarded2,
|
|
7
7
|
watchStore2
|
|
@@ -9,35 +9,35 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createWorkspaces2,
|
|
11
11
|
workspaceHandle2
|
|
12
|
-
} from "./compose-
|
|
12
|
+
} from "./compose-d1m94kzq.js";
|
|
13
13
|
import {
|
|
14
14
|
cover2,
|
|
15
15
|
advance2,
|
|
16
16
|
repair2
|
|
17
|
-
} from "./compose-
|
|
17
|
+
} from "./compose-8mkfr84d.js";
|
|
18
18
|
import {
|
|
19
19
|
gate2,
|
|
20
20
|
gated2,
|
|
21
21
|
createPrincipals2
|
|
22
|
-
} from "./compose-
|
|
22
|
+
} from "./compose-jwy1gba9.js";
|
|
23
23
|
import {
|
|
24
24
|
createSettingsApi2
|
|
25
|
-
} from "./compose-
|
|
25
|
+
} from "./compose-753gc057.js";
|
|
26
26
|
import {
|
|
27
27
|
readWorkspaceCatalog2,
|
|
28
28
|
runWorkspaceCommand2,
|
|
29
29
|
completeWorkspaceCommand2
|
|
30
|
-
} from "./compose-
|
|
30
|
+
} from "./compose-0m65m83c.js";
|
|
31
31
|
import {
|
|
32
32
|
inspect2
|
|
33
|
-
} from "./compose-
|
|
33
|
+
} from "./compose-smsafpqe.js";
|
|
34
34
|
import {
|
|
35
35
|
watchHost2
|
|
36
36
|
} from "./compose-xm52jghq.js";
|
|
37
37
|
import {
|
|
38
38
|
sessionHandle2,
|
|
39
39
|
createSessions2
|
|
40
|
-
} from "./compose-
|
|
40
|
+
} from "./compose-e9f6nrwp.js";
|
|
41
41
|
|
|
42
42
|
// src/api/connection.ts
|
|
43
43
|
import { SdkError } from "@nyte-ai/schema";
|