eve-hub 0.6.65 → 0.6.67
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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/world.mjs +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# eve-hub
|
|
2
2
|
|
|
3
|
+
## 0.6.67
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Failed turns: a bot's latest failure is its card until it posts, with Retry on any unresolved failure.
|
|
8
|
+
|
|
9
|
+
## 0.6.66
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- An upgrade of a workspace with no GitHub repo fails as a permanent `no-repo` kind: the card reads "Workspace cannot upgrade: No repository" with no Retry.
|
|
14
|
+
|
|
3
15
|
## 0.6.65
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-hub",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.67",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Bot-side code shared by every hub agent: registry tools, the roster hook, the eve channel, the host sandbox and browser, and model helpers.",
|
|
6
6
|
"type": "module",
|
package/world.mjs
CHANGED
|
@@ -20380,16 +20380,16 @@ var failureId = (trigger, bot) => `evt_fail_${trigger}_${bot}`;
|
|
|
20380
20380
|
var cardLog = (idSql, now, ...args) => s(`INSERT INTO log (thread_id, type, data, at) SELECT thread_id, 'message.updated', json_object('threadId', thread_id, 'messageId', id), ? FROM messages WHERE id = (${idSql}) AND changes() > 0`, now, ...args);
|
|
20381
20381
|
function failureStatements(t, now) {
|
|
20382
20382
|
if (!t.trigger) return [];
|
|
20383
|
-
const id = failureId(t.trigger, t.bot), detail = t.error ?? "unknown error";
|
|
20383
|
+
const id = failureId(t.trigger, t.bot), detail = t.error ?? "unknown error", failedAt = new Date(now).toISOString();
|
|
20384
20384
|
const turn = (status) => s("EXISTS (SELECT 1 FROM turns WHERE id = ? AND status = ?)", t.id, status);
|
|
20385
20385
|
const failed = turn("failed"), settled = (status, next) => {
|
|
20386
20386
|
const when = turn(status);
|
|
20387
20387
|
return [s(`UPDATE messages SET event = json_set(event, '$.state', ?) WHERE id = ? AND ${STATE2} = 'retrying' AND ${when.sql}`, next, id, ...when.args), cardLog("?", now, id)];
|
|
20388
20388
|
};
|
|
20389
20389
|
return [
|
|
20390
|
-
...eventStatements(t.threadId, { kind: "turn_failed", agent: t.bot, triggerId: t.trigger, state: "failed", retries: 0, turnId: t.id, detail }, `${t.bot}'s turn failed: ${detail}`, now, id, failed),
|
|
20391
|
-
s(`UPDATE messages SET text = ?, event = json_set(event, '$.state', 'failed', '$.detail', ?, '$.turnId', ?, '$.retries', json_extract(event, '$.retries') + 1)
|
|
20392
|
-
WHERE id = ? AND ${STATE2} = 'retrying' AND json_extract(event, '$.turnId') <> ? AND ${failed.sql}`, `${t.bot}'s turn failed: ${detail}`, detail, t.id, id, t.id, ...failed.args),
|
|
20390
|
+
...eventStatements(t.threadId, { kind: "turn_failed", agent: t.bot, triggerId: t.trigger, state: "failed", retries: 0, turnId: t.id, detail, failedAt }, `${t.bot}'s turn failed: ${detail}`, now, id, failed),
|
|
20391
|
+
s(`UPDATE messages SET text = ?, event = json_set(event, '$.state', 'failed', '$.detail', ?, '$.turnId', ?, '$.failedAt', ?, '$.retries', json_extract(event, '$.retries') + 1)
|
|
20392
|
+
WHERE id = ? AND ${STATE2} = 'retrying' AND json_extract(event, '$.turnId') <> ? AND ${failed.sql}`, `${t.bot}'s turn failed: ${detail}`, detail, t.id, failedAt, id, t.id, ...failed.args),
|
|
20393
20393
|
cardLog("?", now, id),
|
|
20394
20394
|
...settled("done", "resolved"),
|
|
20395
20395
|
...settled("cancelled", "failed")
|
|
@@ -26806,7 +26806,8 @@ var MessageEvent = object2({
|
|
|
26806
26806
|
/** "login" means signing in is the fix. */
|
|
26807
26807
|
action: maybe(string5()),
|
|
26808
26808
|
retries: maybe(int2()),
|
|
26809
|
-
|
|
26809
|
+
/** When the latest failure happened (ISO). */
|
|
26810
|
+
failedAt: maybe(string5())
|
|
26810
26811
|
}).meta({ id: "MessageEvent" });
|
|
26811
26812
|
var Attachment = object2({ id: string5(), name: string5() }).meta({ id: "Attachment" });
|
|
26812
26813
|
var Decision = object2({
|
|
@@ -27048,7 +27049,7 @@ var HostedUpdate = object2({
|
|
|
27048
27049
|
/** `updated`: the move was a commit that is not an update to the hub's release (a memory or instructions edit); `commit` is it. */
|
|
27049
27050
|
plain: boolean5().optional(),
|
|
27050
27051
|
/**
|
|
27051
|
-
* `kind`: sign-in (the owner signs in again) | github (the owner approves GitHub: the app asks `githubConsent` for a fresh link) | build (`url` is the failed build) | other. A failed build also carries
|
|
27052
|
+
* `kind`: sign-in (the owner signs in again) | github (the owner approves GitHub: the app asks `githubConsent` for a fresh link) | build (`url` is the failed build) | no-repo (permanent, no Retry) | other. A failed build also carries
|
|
27052
27053
|
* what Vercel says of it once the hub has read it: the `step` that failed, the `sha` it built, and the `log`'s last lines.
|
|
27053
27054
|
*/
|
|
27054
27055
|
error: maybe(object2({
|
|
@@ -27201,7 +27202,7 @@ var Upgrade = external_exports.object({
|
|
|
27201
27202
|
ref: external_exports.string().nullable().default(null),
|
|
27202
27203
|
deployment: external_exports.string().nullable().default(null),
|
|
27203
27204
|
at: external_exports.string(),
|
|
27204
|
-
error: external_exports.object({ kind: external_exports.enum(["sign-in", "github", "other"]), message: external_exports.string() }).nullable().default(null)
|
|
27205
|
+
error: external_exports.object({ kind: external_exports.enum(["sign-in", "github", "no-repo", "other"]), message: external_exports.string() }).nullable().default(null)
|
|
27205
27206
|
});
|
|
27206
27207
|
var Failure = external_exports.object({ step: external_exports.string().nullable(), message: external_exports.string().nullable(), log: external_exports.array(external_exports.string()) });
|
|
27207
27208
|
var Attempt = external_exports.object({ id: external_exports.string().nullable(), key: external_exports.string().nullable(), state: external_exports.string(), url: external_exports.string(), failure: Failure.nullable().default(null) });
|