@jush-agent/sdk 0.2.6342 → 0.2.6346
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 +126 -6
- package/dist/index.d.mts +224 -8
- package/dist/index.mjs +176 -18
- package/package.json +7 -7
- package/release/commands/jush-browser/descriptor.json +13 -13
- package/release/commands/jush-fetch/descriptor.json +12 -12
- package/release/commands/jush-file/descriptor.json +12 -12
- package/release/commands/jush-mobile/descriptor.json +13 -13
- package/release/commands/jush-subscription-cli/descriptor.json +13 -13
package/dist/index.mjs
CHANGED
|
@@ -160,7 +160,13 @@ const queuedMessageSchema = z.object({
|
|
|
160
160
|
*/
|
|
161
161
|
schedule: scheduleMarkSchema.optional(),
|
|
162
162
|
/** Who sent it, which its `user` block keeps. */
|
|
163
|
-
senderId: z.string().min(1).max(255).optional()
|
|
163
|
+
senderId: z.string().min(1).max(255).optional(),
|
|
164
|
+
/**
|
|
165
|
+
* The assignment it is part of, which its `user` block keeps: its own id
|
|
166
|
+
* for one that opens one, the work's for one that continues it; absent
|
|
167
|
+
* when it names none.
|
|
168
|
+
*/
|
|
169
|
+
assignmentId: z.string().min(1).optional()
|
|
164
170
|
});
|
|
165
171
|
/** What an `abort` stopped, and whether another `abort` would stop more. */
|
|
166
172
|
const abortResultSchema = z.object({
|
|
@@ -737,7 +743,13 @@ const agentMessageSchema = z.object({
|
|
|
737
743
|
* the message that asked for it named. Absent for any other message,
|
|
738
744
|
* and when no one was named.
|
|
739
745
|
*/
|
|
740
|
-
senderId: z.string().min(1).max(255).nullable().optional()
|
|
746
|
+
senderId: z.string().min(1).max(255).nullable().optional(),
|
|
747
|
+
/**
|
|
748
|
+
* The assignment the work the message hands or tells of is part of, by
|
|
749
|
+
* the id of the message that opened it, as `sender_id` names whom it is
|
|
750
|
+
* for; absent when it names none.
|
|
751
|
+
*/
|
|
752
|
+
assignmentId: z.string().min(1).nullable().optional()
|
|
741
753
|
});
|
|
742
754
|
/** How the video an edit or an extension changes went to the vendor. */
|
|
743
755
|
const sentSourceSchema = z.discriminatedUnion("type", [
|
|
@@ -1051,7 +1063,12 @@ const commandReportSchema = z.object({
|
|
|
1051
1063
|
* it, which its record keeps; absent when that call's work was for no
|
|
1052
1064
|
* one named.
|
|
1053
1065
|
*/
|
|
1054
|
-
senderId: z.string().min(1).max(255).optional()
|
|
1066
|
+
senderId: z.string().min(1).max(255).optional(),
|
|
1067
|
+
/**
|
|
1068
|
+
* The assignment of the call that started it, which its record keeps; absent
|
|
1069
|
+
* when that call's turn named none.
|
|
1070
|
+
*/
|
|
1071
|
+
assignmentId: z.string().min(1).optional()
|
|
1055
1072
|
});
|
|
1056
1073
|
/** Where a vendor's step is. */
|
|
1057
1074
|
const opaqueStatusSchema = z.enum([
|
|
@@ -1480,7 +1497,16 @@ const blockSchema = z.discriminatedUnion("type", [
|
|
|
1480
1497
|
* Who sent the message, by the id the program that sent it gave
|
|
1481
1498
|
* ([`SENDER_ID_LIMIT`]); absent when it named no one.
|
|
1482
1499
|
*/
|
|
1483
|
-
senderId: z.string().min(1).max(255).optional()
|
|
1500
|
+
senderId: z.string().min(1).max(255).optional(),
|
|
1501
|
+
/**
|
|
1502
|
+
* The assignment the message is part of, by the id of the message that
|
|
1503
|
+
* opened it: its own for one the program, the user or a schedule sent,
|
|
1504
|
+
* the turn's that made it for a run of a schedule an agent made, and its
|
|
1505
|
+
* parent's for a subagent's. Absent when it names none, as the work it
|
|
1506
|
+
* continues named none, and in a block written before assignments were
|
|
1507
|
+
* kept.
|
|
1508
|
+
*/
|
|
1509
|
+
assignmentId: z.string().min(1).optional()
|
|
1484
1510
|
}),
|
|
1485
1511
|
z.object({
|
|
1486
1512
|
type: z.literal("context"),
|
|
@@ -1561,7 +1587,12 @@ const blockSchema = z.discriminatedUnion("type", [
|
|
|
1561
1587
|
*/
|
|
1562
1588
|
comments: z.array(messageCommentSchema).optional(),
|
|
1563
1589
|
/** Who sent it, as a `user` block names its sender. */
|
|
1564
|
-
senderId: z.string().min(1).max(255).optional()
|
|
1590
|
+
senderId: z.string().min(1).max(255).optional(),
|
|
1591
|
+
/**
|
|
1592
|
+
* The assignment of the turn that read it, which it joins; absent when that
|
|
1593
|
+
* turn named none.
|
|
1594
|
+
*/
|
|
1595
|
+
assignmentId: z.string().min(1).optional()
|
|
1565
1596
|
}),
|
|
1566
1597
|
z.object({
|
|
1567
1598
|
type: z.literal("agent_message"),
|
|
@@ -3141,7 +3172,12 @@ const jobCallerSchema = z.object({
|
|
|
3141
3172
|
* command's call to a vendor is counted for; none when no one was
|
|
3142
3173
|
* named.
|
|
3143
3174
|
*/
|
|
3144
|
-
senderId: z.string().nullable().optional()
|
|
3175
|
+
senderId: z.string().nullable().optional(),
|
|
3176
|
+
/**
|
|
3177
|
+
* The assignment the call's agent worked in, which a command's call to a
|
|
3178
|
+
* vendor is counted in; none when its turn named none.
|
|
3179
|
+
*/
|
|
3180
|
+
assignmentId: z.string().min(1).nullable().optional()
|
|
3145
3181
|
});
|
|
3146
3182
|
/** The ids of a call's relayed pipes. */
|
|
3147
3183
|
const relayedPipesSchema = z.object({
|
|
@@ -4002,10 +4038,14 @@ z.discriminatedUnion("kind", [
|
|
|
4002
4038
|
kind: z.literal("debug"),
|
|
4003
4039
|
resume: z.string().nullable().optional()
|
|
4004
4040
|
}),
|
|
4005
|
-
z.strictObject({
|
|
4041
|
+
z.strictObject({
|
|
4042
|
+
kind: z.literal("starter"),
|
|
4043
|
+
version: z.string().nullable().optional()
|
|
4044
|
+
}),
|
|
4006
4045
|
z.strictObject({
|
|
4007
4046
|
kind: z.literal("plugin"),
|
|
4008
|
-
plugin: z.string()
|
|
4047
|
+
plugin: z.string(),
|
|
4048
|
+
version: z.string().nullable().optional()
|
|
4009
4049
|
})
|
|
4010
4050
|
]);
|
|
4011
4051
|
/** A point of the picture, in its coordinates. */
|
|
@@ -5952,6 +5992,7 @@ const patchFieldSchema = z.enum([
|
|
|
5952
5992
|
"browser_profile",
|
|
5953
5993
|
"system_prompt",
|
|
5954
5994
|
"commands",
|
|
5995
|
+
"plugin_versions",
|
|
5955
5996
|
"target"
|
|
5956
5997
|
]);
|
|
5957
5998
|
/**
|
|
@@ -6033,6 +6074,14 @@ const conversationPatchSchema = z.strictObject({
|
|
|
6033
6074
|
* agent's next command; null for every command.
|
|
6034
6075
|
*/
|
|
6035
6076
|
commands: z.array(z.string()).nullable().optional(),
|
|
6077
|
+
/**
|
|
6078
|
+
* The versions it runs on of the program's plugins, each by its
|
|
6079
|
+
* plugin's id, in place of those it named: its agents' commands, and
|
|
6080
|
+
* every request of the conversation, go to them from now on; a call
|
|
6081
|
+
* sent already goes on where it is. `{}` returns it to the current
|
|
6082
|
+
* versions.
|
|
6083
|
+
*/
|
|
6084
|
+
pluginVersions: z.record(z.string(), z.string()).optional(),
|
|
6036
6085
|
/** A switch of the conversation's execution target. */
|
|
6037
6086
|
target: conversationTargetSchema.optional()
|
|
6038
6087
|
});
|
|
@@ -6582,6 +6631,66 @@ const commandEndSchema = z.discriminatedUnion("kind", [
|
|
|
6582
6631
|
}),
|
|
6583
6632
|
z.object({ kind: z.literal("unrecorded") })
|
|
6584
6633
|
]);
|
|
6634
|
+
/** How a command ended, or why a call started none. */
|
|
6635
|
+
const commandHistoryEndSchema = z.discriminatedUnion("kind", [
|
|
6636
|
+
z.object({
|
|
6637
|
+
kind: z.literal("exited"),
|
|
6638
|
+
exitCode: z.int().min(-2147483648).max(2147483647)
|
|
6639
|
+
}),
|
|
6640
|
+
z.object({ kind: z.literal("stopped") }),
|
|
6641
|
+
z.object({
|
|
6642
|
+
kind: z.literal("lost"),
|
|
6643
|
+
reason: z.string()
|
|
6644
|
+
}),
|
|
6645
|
+
z.object({
|
|
6646
|
+
kind: z.literal("not_started"),
|
|
6647
|
+
reason: z.string()
|
|
6648
|
+
})
|
|
6649
|
+
]);
|
|
6650
|
+
/**
|
|
6651
|
+
* A command an agent's `shell` call started, as it ended, or a call that
|
|
6652
|
+
* started none.
|
|
6653
|
+
*/
|
|
6654
|
+
const commandHistoryEntrySchema = z.object({
|
|
6655
|
+
conversation: z.string().regex(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "u")),
|
|
6656
|
+
/**
|
|
6657
|
+
* The number its conversation knows the call's agent by, 0 for the
|
|
6658
|
+
* main agent; none for a side question's.
|
|
6659
|
+
*/
|
|
6660
|
+
agent: z.int().min(0).nullable().optional(),
|
|
6661
|
+
/** None for a call that started no command. */
|
|
6662
|
+
command: z.string().min(1).nullable().optional(),
|
|
6663
|
+
/** The device it ran on; none for a call that started no command. */
|
|
6664
|
+
device: z.string().min(1).nullable().optional(),
|
|
6665
|
+
/** The turn of the call. */
|
|
6666
|
+
turn: z.string().min(1).nullable().optional(),
|
|
6667
|
+
/** Whom the call's work was for, by the id the program gave its sender. */
|
|
6668
|
+
sender: z.string().nullable().optional(),
|
|
6669
|
+
/** The assignment the call's work was part of. */
|
|
6670
|
+
assignment: z.string().min(1).nullable().optional(),
|
|
6671
|
+
title: z.string(),
|
|
6672
|
+
script: z.string(),
|
|
6673
|
+
/**
|
|
6674
|
+
* When its call started it, a wait for its device to come online
|
|
6675
|
+
* included; none for a call that started no command, and for a
|
|
6676
|
+
* command that ended before its start was recorded.
|
|
6677
|
+
*/
|
|
6678
|
+
startedAt: z.iso.datetime({ precision: 3 }).nullable().optional(),
|
|
6679
|
+
endedAt: z.iso.datetime({ precision: 3 }),
|
|
6680
|
+
end: commandHistoryEndSchema
|
|
6681
|
+
});
|
|
6682
|
+
/** A page of the history. */
|
|
6683
|
+
const commandHistorySchema = z.object({
|
|
6684
|
+
commands: z.array(commandHistoryEntrySchema),
|
|
6685
|
+
/**
|
|
6686
|
+
* Where the page ends, which `after` takes to read on: its last row's
|
|
6687
|
+
* place; for an empty page, the `after` given, the newest row's when
|
|
6688
|
+
* nothing ended at `from` or after, or the place before the first row.
|
|
6689
|
+
*/
|
|
6690
|
+
next: z.string(),
|
|
6691
|
+
/** Whether rows were written after the page. */
|
|
6692
|
+
more: z.boolean()
|
|
6693
|
+
});
|
|
6585
6694
|
/**
|
|
6586
6695
|
* `GET /conversations/:id/commands/:commandId`: where the `shell` call that
|
|
6587
6696
|
* started a command lies, which a report's title brings into view.
|
|
@@ -6917,6 +7026,11 @@ const conversationMetadataSchema = z.object({
|
|
|
6917
7026
|
*/
|
|
6918
7027
|
commands: z.array(z.string()).nullable(),
|
|
6919
7028
|
/**
|
|
7029
|
+
* The versions it runs on of the program's plugins, each by its
|
|
7030
|
+
* plugin's id; the current one of a plugin it names none of.
|
|
7031
|
+
*/
|
|
7032
|
+
pluginVersions: z.record(z.string(), z.string()),
|
|
7033
|
+
/**
|
|
6920
7034
|
* The directory the conversation's work runs in, resolved by the backend
|
|
6921
7035
|
* for every kind of target, so the web app never derives it.
|
|
6922
7036
|
*/
|
|
@@ -8191,6 +8305,11 @@ z.strictObject({
|
|
|
8191
8305
|
*/
|
|
8192
8306
|
commands: z.array(z.string()).optional(),
|
|
8193
8307
|
/**
|
|
8308
|
+
* The versions it runs on of the program's plugins, each by its
|
|
8309
|
+
* plugin's id; the current one of a plugin it names none of.
|
|
8310
|
+
*/
|
|
8311
|
+
pluginVersions: z.record(z.string(), z.string()).optional(),
|
|
8312
|
+
/**
|
|
8194
8313
|
* The message the conversation starts with, as the socket's `send`
|
|
8195
8314
|
* frame carries it.
|
|
8196
8315
|
*/
|
|
@@ -10610,6 +10729,11 @@ z.object({
|
|
|
10610
10729
|
replyBlocks: z.array(replyBlockFactsSchema).optional()
|
|
10611
10730
|
});
|
|
10612
10731
|
z.strictObject({
|
|
10732
|
+
/**
|
|
10733
|
+
* Its id, which names the assignment it opens, and which a retry
|
|
10734
|
+
* repeats so the side question takes it once; one is made when none.
|
|
10735
|
+
*/
|
|
10736
|
+
id: z.string().min(1).nullable().optional(),
|
|
10613
10737
|
/** A message's content, as a frame names it. */
|
|
10614
10738
|
content: z.array(clientContentSchema),
|
|
10615
10739
|
/** Who sent it, as a message's sender. */
|
|
@@ -11067,11 +11191,13 @@ const usageCostsSchema = z.object({
|
|
|
11067
11191
|
*/
|
|
11068
11192
|
const usageReportGroupSchema = z.object({
|
|
11069
11193
|
conversation: z.string().nullable().optional(),
|
|
11194
|
+
agent: z.int().min(0).nullable().optional(),
|
|
11070
11195
|
sender: z.string().nullable().optional(),
|
|
11071
11196
|
model: z.string().nullable().optional(),
|
|
11072
11197
|
provider: z.string().nullable().optional(),
|
|
11073
11198
|
account: z.string().nullable().optional(),
|
|
11074
11199
|
turn: z.string().nullable().optional(),
|
|
11200
|
+
assignment: z.string().nullable().optional(),
|
|
11075
11201
|
purpose: z.string().nullable().optional(),
|
|
11076
11202
|
calls: z.int().min(0),
|
|
11077
11203
|
inputTokens: z.int().min(0),
|
|
@@ -11092,20 +11218,26 @@ const usageReportGroupSchema = z.object({
|
|
|
11092
11218
|
*/
|
|
11093
11219
|
unpricedCalls: z.int().min(0)
|
|
11094
11220
|
});
|
|
11095
|
-
/** One hour or day of a report, and its calls' groups. */
|
|
11221
|
+
/** One minute, hour or day of a report, and its calls' groups. */
|
|
11096
11222
|
const usageBucketSchema = z.object({
|
|
11097
11223
|
start: z.iso.datetime({ precision: 3 }),
|
|
11098
11224
|
end: z.iso.datetime({ precision: 3 }),
|
|
11099
11225
|
groups: z.array(usageReportGroupSchema)
|
|
11100
11226
|
});
|
|
11101
|
-
z.enum([
|
|
11227
|
+
z.enum([
|
|
11228
|
+
"minute",
|
|
11229
|
+
"hour",
|
|
11230
|
+
"day"
|
|
11231
|
+
]);
|
|
11102
11232
|
z.enum([
|
|
11103
11233
|
"conversation",
|
|
11104
11234
|
"model",
|
|
11105
11235
|
"provider",
|
|
11106
11236
|
"turn",
|
|
11237
|
+
"agent",
|
|
11107
11238
|
"sender",
|
|
11108
11239
|
"account",
|
|
11240
|
+
"assignment",
|
|
11109
11241
|
"purpose"
|
|
11110
11242
|
]);
|
|
11111
11243
|
/**
|
|
@@ -14404,7 +14536,8 @@ function sideQuestions(routes, id) {
|
|
|
14404
14536
|
id: question.id ?? randomUUID(),
|
|
14405
14537
|
question: content(question.question)
|
|
14406
14538
|
}),
|
|
14407
|
-
followUp: (side, input, options = {}) => routes.send("POST", `${one(side)}/messages`, {
|
|
14539
|
+
followUp: (side, input, messageId = randomUUID(), options = {}) => routes.send("POST", `${one(side)}/messages`, {
|
|
14540
|
+
id: messageId,
|
|
14408
14541
|
content: content(input),
|
|
14409
14542
|
senderId: options.senderId
|
|
14410
14543
|
}),
|
|
@@ -14968,11 +15101,23 @@ function usage$1(routes) {
|
|
|
14968
15101
|
to: options.to.toISOString(),
|
|
14969
15102
|
bucket: options.bucket,
|
|
14970
15103
|
timeZone: options.timeZone,
|
|
14971
|
-
groupBy: options.groupBy !== void 0 && options.groupBy.length > 0 ? options.groupBy.join(",") : void 0
|
|
15104
|
+
groupBy: options.groupBy !== void 0 && options.groupBy.length > 0 ? options.groupBy.join(",") : void 0,
|
|
15105
|
+
conversations: options.conversations?.join(","),
|
|
15106
|
+
agents: options.agents?.join(",")
|
|
14972
15107
|
})}`, usageReportSchema)
|
|
14973
15108
|
};
|
|
14974
15109
|
}
|
|
14975
15110
|
//#endregion
|
|
15111
|
+
//#region src/commands.ts
|
|
15112
|
+
/** The commands a core's agents ran, as the core's command history keeps them. */
|
|
15113
|
+
function commands(routes) {
|
|
15114
|
+
return { history: (options = {}) => routes.json("GET", `/commands/history${query({
|
|
15115
|
+
after: options.after,
|
|
15116
|
+
from: options.from?.toISOString(),
|
|
15117
|
+
limit: options.limit
|
|
15118
|
+
})}`, commandHistorySchema) };
|
|
15119
|
+
}
|
|
15120
|
+
//#endregion
|
|
14976
15121
|
//#region src/organize.ts
|
|
14977
15122
|
/** How a core's conversations are organized: workspaces and projects. */
|
|
14978
15123
|
function workspaces(routes) {
|
|
@@ -15455,11 +15600,14 @@ var Core = class {
|
|
|
15455
15600
|
plugins;
|
|
15456
15601
|
models;
|
|
15457
15602
|
usage;
|
|
15603
|
+
commands;
|
|
15458
15604
|
workspaces;
|
|
15459
15605
|
projects;
|
|
15460
15606
|
portForwards;
|
|
15461
15607
|
routes;
|
|
15462
15608
|
connection;
|
|
15609
|
+
/** The version the program's plugins are; none for their current one. */
|
|
15610
|
+
pluginVersion;
|
|
15463
15611
|
stateRead;
|
|
15464
15612
|
stateListeners = /* @__PURE__ */ new Set();
|
|
15465
15613
|
notify = null;
|
|
@@ -15471,6 +15619,7 @@ var Core = class {
|
|
|
15471
15619
|
this.id = opening.id;
|
|
15472
15620
|
this.dir = opening.dir;
|
|
15473
15621
|
this.connection = new PageConnection(processConnection(opening.process, `/cores/${segment(opening.id)}/api/connect`));
|
|
15622
|
+
this.pluginVersion = opening.pluginVersion;
|
|
15474
15623
|
this.connection.start();
|
|
15475
15624
|
this.routes = new CoreRoutes(opening.process, opening.id, this.connection);
|
|
15476
15625
|
this.conversations = new Conversations(this.routes, () => this.stateRead);
|
|
@@ -15482,6 +15631,7 @@ var Core = class {
|
|
|
15482
15631
|
this.plugins = corePlugins(this.routes);
|
|
15483
15632
|
this.models = models(this.routes);
|
|
15484
15633
|
this.usage = usage$1(this.routes);
|
|
15634
|
+
this.commands = commands(this.routes);
|
|
15485
15635
|
this.workspaces = workspaces(this.routes);
|
|
15486
15636
|
this.projects = projects(this.routes);
|
|
15487
15637
|
this.portForwards = portForwards(this.routes);
|
|
@@ -15643,7 +15793,10 @@ var Core = class {
|
|
|
15643
15793
|
}
|
|
15644
15794
|
openStarter() {
|
|
15645
15795
|
if (this.closed || this.starter !== null) return;
|
|
15646
|
-
const lane = this.connection.openLane({
|
|
15796
|
+
const lane = this.connection.openLane({
|
|
15797
|
+
kind: "starter",
|
|
15798
|
+
version: this.pluginVersion
|
|
15799
|
+
}, "starter lane");
|
|
15647
15800
|
this.starter = lane;
|
|
15648
15801
|
lane.addEventListener("message", (message) => {
|
|
15649
15802
|
const parsed = starterRequestSchema.safeParse(JSON.parse(message.data));
|
|
@@ -15669,7 +15822,8 @@ var Core = class {
|
|
|
15669
15822
|
if (this.closed) return;
|
|
15670
15823
|
const lane = this.connection.openLane({
|
|
15671
15824
|
kind: "plugin",
|
|
15672
|
-
plugin: plugin.manifest.id
|
|
15825
|
+
plugin: plugin.manifest.id,
|
|
15826
|
+
version: this.pluginVersion
|
|
15673
15827
|
}, `plugin lane of ${plugin.manifest.id}`);
|
|
15674
15828
|
servePlugin(plugin, lane, (error) => process.emitWarning(error));
|
|
15675
15829
|
lane.addEventListener("close", () => {
|
|
@@ -16327,6 +16481,7 @@ function pathListSeparator() {
|
|
|
16327
16481
|
var Jush = class Jush {
|
|
16328
16482
|
process;
|
|
16329
16483
|
declared;
|
|
16484
|
+
pluginVersion;
|
|
16330
16485
|
addresses;
|
|
16331
16486
|
runner;
|
|
16332
16487
|
owned;
|
|
@@ -16335,9 +16490,10 @@ var Jush = class Jush {
|
|
|
16335
16490
|
/** The plugins' sign-ins, as the program's server takes their returns. */
|
|
16336
16491
|
plugins;
|
|
16337
16492
|
cores = /* @__PURE__ */ new Map();
|
|
16338
|
-
constructor(process, declared, addresses, runner, owned) {
|
|
16493
|
+
constructor(process, declared, pluginVersion, addresses, runner, owned) {
|
|
16339
16494
|
this.process = process;
|
|
16340
16495
|
this.declared = declared;
|
|
16496
|
+
this.pluginVersion = pluginVersion;
|
|
16341
16497
|
this.addresses = addresses;
|
|
16342
16498
|
this.runner = runner;
|
|
16343
16499
|
this.owned = owned;
|
|
@@ -16351,7 +16507,7 @@ var Jush = class Jush {
|
|
|
16351
16507
|
executable: found.core,
|
|
16352
16508
|
release: found.release
|
|
16353
16509
|
});
|
|
16354
|
-
return Jush.greeted(new Jush(process, options.plugins ?? [], options.addresses, () => found.runner, true));
|
|
16510
|
+
return Jush.greeted(new Jush(process, options.plugins ?? [], options.pluginVersion, options.addresses, () => found.runner, true));
|
|
16355
16511
|
}
|
|
16356
16512
|
/**
|
|
16357
16513
|
* Connects to a process that runs on its own, and declares the program's
|
|
@@ -16365,7 +16521,7 @@ var Jush = class Jush {
|
|
|
16365
16521
|
url: connection.url,
|
|
16366
16522
|
token: connection.token
|
|
16367
16523
|
});
|
|
16368
|
-
return Jush.greeted(new Jush(process, connection.plugins ?? [], connection.addresses, () => binaries().runner, false));
|
|
16524
|
+
return Jush.greeted(new Jush(process, connection.plugins ?? [], connection.pluginVersion, connection.addresses, () => binaries().runner, false));
|
|
16369
16525
|
}
|
|
16370
16526
|
/**
|
|
16371
16527
|
* `jush` once it greeted its process; a greeting the process refused,
|
|
@@ -16398,6 +16554,7 @@ var Jush = class Jush {
|
|
|
16398
16554
|
id,
|
|
16399
16555
|
dir: path,
|
|
16400
16556
|
plugins: this.declared,
|
|
16557
|
+
pluginVersion: this.pluginVersion,
|
|
16401
16558
|
runner: this.runner
|
|
16402
16559
|
}, async () => {
|
|
16403
16560
|
this.cores.delete(id);
|
|
@@ -16456,7 +16613,8 @@ var Jush = class Jush {
|
|
|
16456
16613
|
*/
|
|
16457
16614
|
async greet(fetch) {
|
|
16458
16615
|
if (this.addresses !== void 0) await (await this.call("PUT", "/addresses", this.addresses, fetch)).body?.cancel();
|
|
16459
|
-
|
|
16616
|
+
const version = this.pluginVersion === void 0 ? "" : `/versions/${segment(this.pluginVersion)}`;
|
|
16617
|
+
for (const plugin of this.declared) await (await this.call("PUT", `/plugins/${segment(plugin.manifest.id)}${version}`, plugin.manifest, fetch)).body?.cancel();
|
|
16460
16618
|
for (const core of this.cores.values()) await (await this.call("POST", "/cores", { dir: core.dir }, fetch)).body?.cancel();
|
|
16461
16619
|
}
|
|
16462
16620
|
async call(method, path, body, fetch = (request) => this.process.fetch(request)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jush-agent/sdk",
|
|
3
3
|
"description": "Jush's agents in a program: its cores, conversations, providers, devices and plugins, in a process of the program's own.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6346",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"homepage": "https://github.com/jush-ai/jush/tree/main/packages/sdk#readme",
|
|
36
36
|
"bugs": "https://github.com/jush-ai/jush/issues",
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@jush-agent/sdk-darwin-arm64": "0.2.
|
|
39
|
-
"@jush-agent/sdk-darwin-x64": "0.2.
|
|
40
|
-
"@jush-agent/sdk-linux-arm64": "0.2.
|
|
41
|
-
"@jush-agent/sdk-linux-x64": "0.2.
|
|
42
|
-
"@jush-agent/sdk-win32-arm64": "0.2.
|
|
43
|
-
"@jush-agent/sdk-win32-x64": "0.2.
|
|
38
|
+
"@jush-agent/sdk-darwin-arm64": "0.2.6346",
|
|
39
|
+
"@jush-agent/sdk-darwin-x64": "0.2.6346",
|
|
40
|
+
"@jush-agent/sdk-linux-arm64": "0.2.6346",
|
|
41
|
+
"@jush-agent/sdk-linux-x64": "0.2.6346",
|
|
42
|
+
"@jush-agent/sdk-win32-arm64": "0.2.6346",
|
|
43
|
+
"@jush-agent/sdk-win32-x64": "0.2.6346"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "jush.browser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6346",
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"operations": [
|
|
6
6
|
"browser.tab.new",
|
|
@@ -60,28 +60,28 @@
|
|
|
60
60
|
],
|
|
61
61
|
"targets": {
|
|
62
62
|
"aarch64-apple-darwin": {
|
|
63
|
-
"sha256": "
|
|
64
|
-
"size":
|
|
63
|
+
"sha256": "cc5814637b3a61161ef5c5c44984ca5ce197b12a6d666be5ac90148438865746",
|
|
64
|
+
"size": 29056752
|
|
65
65
|
},
|
|
66
66
|
"aarch64-pc-windows-msvc": {
|
|
67
|
-
"sha256": "
|
|
68
|
-
"size":
|
|
67
|
+
"sha256": "99ea0f5707429e2919f328a46c940a42aed1fd578826b012e054308721280b7b",
|
|
68
|
+
"size": 26422272
|
|
69
69
|
},
|
|
70
70
|
"aarch64-unknown-linux-musl": {
|
|
71
|
-
"sha256": "
|
|
72
|
-
"size":
|
|
71
|
+
"sha256": "087a7514d48985af58d28fd0978a140b01d85efd80076408dc7f4bdffe2f047f",
|
|
72
|
+
"size": 24910704
|
|
73
73
|
},
|
|
74
74
|
"x86_64-apple-darwin": {
|
|
75
|
-
"sha256": "
|
|
76
|
-
"size":
|
|
75
|
+
"sha256": "bc4bb6867ff3a4aaaad2d6c37b9e84cb47be0c8024987ab1a03b57aa9ca72fb3",
|
|
76
|
+
"size": 29653872
|
|
77
77
|
},
|
|
78
78
|
"x86_64-pc-windows-msvc": {
|
|
79
|
-
"sha256": "
|
|
80
|
-
"size":
|
|
79
|
+
"sha256": "aea08b55d459e59df28747db0fd84a7b6f97faa3ab894fc261eac30a7cbd0d3f",
|
|
80
|
+
"size": 29412864
|
|
81
81
|
},
|
|
82
82
|
"x86_64-unknown-linux-musl": {
|
|
83
|
-
"sha256": "
|
|
84
|
-
"size":
|
|
83
|
+
"sha256": "d070e07582f879ff537d90c82f048aaf32c7f2a1d269734d638670fcf603347b",
|
|
84
|
+
"size": 27373176
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "jush.fetch",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6346",
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"operations": [
|
|
6
6
|
"fetch.get"
|
|
7
7
|
],
|
|
8
8
|
"targets": {
|
|
9
9
|
"aarch64-apple-darwin": {
|
|
10
|
-
"sha256": "
|
|
11
|
-
"size":
|
|
10
|
+
"sha256": "b2da66f33d750f328bef48ed856aa8c56fa21cec00ea2292a4a32dc8ad43c05a",
|
|
11
|
+
"size": 7165792
|
|
12
12
|
},
|
|
13
13
|
"aarch64-pc-windows-msvc": {
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "cade2b86624afc567b0af3d66c8935a7e25a19fd1739060e24011a63fede1ce9",
|
|
15
15
|
"size": 6523392
|
|
16
16
|
},
|
|
17
17
|
"aarch64-unknown-linux-musl": {
|
|
18
|
-
"sha256": "
|
|
19
|
-
"size":
|
|
18
|
+
"sha256": "a805ce4e3eb08b0d9fa0fd1afdb93f4ab2dd80472831f35520f355d2a51bf1cd",
|
|
19
|
+
"size": 6529968
|
|
20
20
|
},
|
|
21
21
|
"x86_64-apple-darwin": {
|
|
22
|
-
"sha256": "
|
|
23
|
-
"size":
|
|
22
|
+
"sha256": "0d00c35745908fdada1dc0e6192685633ec74d289f7bf904b6332e1e85160ecf",
|
|
23
|
+
"size": 7280480
|
|
24
24
|
},
|
|
25
25
|
"x86_64-pc-windows-msvc": {
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "a7d2f5eb1bee7e6e4452e822b872d73deab6caeb333cc1dd38720a284dc00567",
|
|
27
|
+
"size": 7002112
|
|
28
28
|
},
|
|
29
29
|
"x86_64-unknown-linux-musl": {
|
|
30
|
-
"sha256": "
|
|
31
|
-
"size":
|
|
30
|
+
"sha256": "9161a7f93399ed7e327df0ab323cc0af866028bdf141003bfe85655ce2f38bd4",
|
|
31
|
+
"size": 7022256
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "jush.file",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6346",
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"operations": [
|
|
6
6
|
"file.view",
|
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
],
|
|
10
10
|
"targets": {
|
|
11
11
|
"aarch64-apple-darwin": {
|
|
12
|
-
"sha256": "
|
|
13
|
-
"size":
|
|
12
|
+
"sha256": "63d1e91cf7d0e89f95e52f66f65318f7411711b22c33e7d156e969ac59de39bb",
|
|
13
|
+
"size": 4930560
|
|
14
14
|
},
|
|
15
15
|
"aarch64-pc-windows-msvc": {
|
|
16
|
-
"sha256": "
|
|
17
|
-
"size":
|
|
16
|
+
"sha256": "c882863d9fb94ca20ffa06e77402a6792ed6956ffc36213edf69ba53e2eff9a9",
|
|
17
|
+
"size": 4368384
|
|
18
18
|
},
|
|
19
19
|
"aarch64-unknown-linux-musl": {
|
|
20
|
-
"sha256": "
|
|
21
|
-
"size":
|
|
20
|
+
"sha256": "cad180f16a712a88e3b75830b0814bd09e3ea08801b120eaa47a8f8b214379a0",
|
|
21
|
+
"size": 4472896
|
|
22
22
|
},
|
|
23
23
|
"x86_64-apple-darwin": {
|
|
24
|
-
"sha256": "
|
|
25
|
-
"size":
|
|
24
|
+
"sha256": "f58a4c3978f5e8ed4b3a80b936dadf5fff7dcd52599d56fbc5a4e0e63ccddbff",
|
|
25
|
+
"size": 4811048
|
|
26
26
|
},
|
|
27
27
|
"x86_64-pc-windows-msvc": {
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "b586c1d87e522f4e00aa83a50471fa10bd7315dc2d3fbde1cf861e537805160b",
|
|
29
29
|
"size": 4674048
|
|
30
30
|
},
|
|
31
31
|
"x86_64-unknown-linux-musl": {
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "61c003ef1b41790b90d4933a7bbd512beb40a9f6d1c8f26a9f7cc8632ee9cb09",
|
|
33
|
+
"size": 4696192
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "jush.mobile",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6346",
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"operations": [
|
|
6
6
|
"mobile.list",
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
27
|
"aarch64-apple-darwin": {
|
|
28
|
-
"sha256": "
|
|
29
|
-
"size":
|
|
28
|
+
"sha256": "3b009539f379a23ba80cbbd250f6ee8318fa83e3288cee188db3ba0e7a57e65f",
|
|
29
|
+
"size": 22429552
|
|
30
30
|
},
|
|
31
31
|
"aarch64-pc-windows-msvc": {
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "b164ddd1e9d5ccd528bd1e49075cd7d43c297b85ca0b0d3134753ac4da91647e",
|
|
33
|
+
"size": 17919488
|
|
34
34
|
},
|
|
35
35
|
"aarch64-unknown-linux-musl": {
|
|
36
|
-
"sha256": "
|
|
37
|
-
"size":
|
|
36
|
+
"sha256": "77e7102c52b3ccbcb85c42bb2ae7ce318c448ce577956894608e1e619757f101",
|
|
37
|
+
"size": 17344560
|
|
38
38
|
},
|
|
39
39
|
"x86_64-apple-darwin": {
|
|
40
|
-
"sha256": "
|
|
41
|
-
"size":
|
|
40
|
+
"sha256": "f15816f7bff75b5a3f505eff0250e1bbca109ff5a53c26e984a4bff61bf16981",
|
|
41
|
+
"size": 21523208
|
|
42
42
|
},
|
|
43
43
|
"x86_64-pc-windows-msvc": {
|
|
44
|
-
"sha256": "
|
|
45
|
-
"size":
|
|
44
|
+
"sha256": "12492f10639220c1ef9fc5547f41a111f7a3c02395f063474918b62cc528043f",
|
|
45
|
+
"size": 20923904
|
|
46
46
|
},
|
|
47
47
|
"x86_64-unknown-linux-musl": {
|
|
48
|
-
"sha256": "
|
|
49
|
-
"size":
|
|
48
|
+
"sha256": "889cce48412de1eeed3c6a8ccfa2a2ef4a80d25d85a8224e129e718c7cbab7ac",
|
|
49
|
+
"size": 19935936
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|