@sjawhar/pi-legion 19.27.0 → 19.28.0
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/dist/legion.js
CHANGED
|
@@ -29195,6 +29195,7 @@ function truncateUtf8(text, max) {
|
|
|
29195
29195
|
}
|
|
29196
29196
|
return text.slice(0, end);
|
|
29197
29197
|
}
|
|
29198
|
+
var LABELED_WORD = String.raw`(?:[^ "'\\)\]}>,;:.!?]|[\\)\]}>,;:.!?]+[^ "'\\)\]}>,;:.!?])+`;
|
|
29198
29199
|
var CREDENTIAL_RULES = [
|
|
29199
29200
|
[/(?<![a-z0-9+.-])([0-9+.-]*[a-z][a-z0-9+.-]*:\/\/)[^ /?#]+@/gi, "$1***@"],
|
|
29200
29201
|
[
|
|
@@ -29210,17 +29211,14 @@ var CREDENTIAL_RULES = [
|
|
|
29210
29211
|
"$1$2$3$4***"
|
|
29211
29212
|
],
|
|
29212
29213
|
[
|
|
29213
|
-
new RegExp(String.raw`((?:api-key|application-key|ocp-apim-subscription-key|x-subscription-token)\\?["']?[ \ufffe\uffff]*[:=][ \ufffe\uffff]*\\?["']?)
|
|
29214
|
+
new RegExp(String.raw`((?:api-key|application-key|ocp-apim-subscription-key|x-subscription-token)\\?["']?[ \ufffe\uffff]*[:=][ \ufffe\uffff]*\\?["']?)${LABELED_WORD}`, "gi"),
|
|
29214
29215
|
"$1***"
|
|
29215
29216
|
],
|
|
29216
29217
|
[
|
|
29217
29218
|
/(\\?["'](?:api_key|access_token)\\?["'][ \ufffe\uffff]*:[ \ufffe\uffff]*\\?["'])[^"'\\]+/gi,
|
|
29218
29219
|
"$1***"
|
|
29219
29220
|
],
|
|
29220
|
-
[
|
|
29221
|
-
new RegExp(String.raw`\b(bearer[ \ufffe\uffff]+)(?:[A-Za-z0-9._~+/=*-]|${HELD_SEQUENCE})+`, "gi"),
|
|
29222
|
-
"$1***"
|
|
29223
|
-
],
|
|
29221
|
+
[new RegExp(String.raw`\b(bearer[ \ufffe\uffff]+)${LABELED_WORD}`, "gi"), "$1***"],
|
|
29224
29222
|
[
|
|
29225
29223
|
new RegExp(String.raw`\b(gh[pousr]_|github_pat_)(?:[A-Za-z0-9._-]|${HELD_SEQUENCE}){20,}`, "g"),
|
|
29226
29224
|
"$1***"
|
|
@@ -29722,7 +29720,7 @@ import { logger as logger3 } from "@oh-my-pi/pi-utils";
|
|
|
29722
29720
|
// package.json
|
|
29723
29721
|
var package_default = {
|
|
29724
29722
|
name: "@sjawhar/pi-legion",
|
|
29725
|
-
version: "19.
|
|
29723
|
+
version: "19.28.0",
|
|
29726
29724
|
license: "Apache-2.0",
|
|
29727
29725
|
type: "module",
|
|
29728
29726
|
omp: {
|
|
@@ -29734,7 +29732,7 @@ var package_default = {
|
|
|
29734
29732
|
]
|
|
29735
29733
|
},
|
|
29736
29734
|
legion: {
|
|
29737
|
-
daemonApiVersion:
|
|
29735
|
+
daemonApiVersion: 144
|
|
29738
29736
|
},
|
|
29739
29737
|
repository: {
|
|
29740
29738
|
type: "git",
|
|
@@ -31248,7 +31246,7 @@ var PHASE_OP_SENTENCES = {
|
|
|
31248
31246
|
};
|
|
31249
31247
|
var STALE_ENTRY_INSTRUCTION = "End this turn without completing. The task of the entry the phase is on is owed to this claim, and the daemon sends it by itself. " + "That task is work of its own: do what it asks at the head it names and complete it with a handoff of its own, never this completion's " + "record, commit or verdict";
|
|
31250
31248
|
function legionToolDescription(host) {
|
|
31251
|
-
return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "or a role's first completion of the phase it left, which it records and which moves nothing, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet). A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads from Dispatch the newest record of the phase your role works or, once the issue has moved on, of the phase it left, " + "and reports it with `commit`, the head that record's body names " + "(`head`, the 40-character lower-case commit the work it reports was done against); in implementing, the implementer's must be the commit its " + "workspace stands on, `@-`, pushed to `legion/<issue>@origin`, so push the branch first; retro, the merger's completion and a phase you left with no record, or with an implement record naming no head, report the commit the workspace stands on. It " + "refuses, posting nothing, a phase you work with no record, a Dispatch that does not answer, and, in implementing, an implement record naming no head, an " + "implementer's `@-` not yet on `legion/<issue>@origin`, or an implement record whose head is not that pushed `@-`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first. The daemon replaces the pod and its disk when the round ends: at the moment the message names, or earlier when every " + "role has answered and no turn runs. No answer delays that moment, and the end of a turn is no answer. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
|
|
31249
|
+
return "Perform the workflow operation the Legion daemon assigned this role. The daemon advances phases; this tool cannot spawn workers. " + (host.before ?? "") + "handoff_complete (phase workers and sub-architects; the daemon accepts a completion only from the role working the issue's current phase, " + "or a role's first completion of the phase it left, which it records and which moves nothing, " + "and the checking role's report on a look of its closed issue's production check) reports this phase complete: `summary` (two sentences for the " + "architect), `verdict` pass|fail from the tester alone on a phase completion (the daemon refuses a verdict from " + "any other role there) and pass|pending|fail on a production check report (pending: production does not carry the merge " + "yet, or carries it with a requirement only the deploy can show still unobserved and a look still to follow). " + "A planning, implementing, testing or reviewing phase ends with a handoff record on the " + "Dispatch issue: write it with `dispatch handoff-write --issue <issue> --phase <plan|implement|test|review> --body-file <file>` before " + "calling. This call reads from Dispatch the newest record of the phase your role works or, once the issue has moved on, of the phase it left, " + "and reports it with `commit`, the head that record's body names " + "(`head`, the 40-character lower-case commit the work it reports was done against); in implementing, the implementer's must be the commit its " + "workspace stands on, `@-`, pushed to `legion/<issue>@origin`, so push the branch first; retro, the merger's completion and a phase you left with no record, or with an implement record naming no head, report the commit the workspace stands on. It " + "refuses, posting nothing, a phase you work with no record, a Dispatch that does not answer, and, in implementing, an implement record naming no head, an " + "implementer's `@-` not yet on `legion/<issue>@origin`, or an implement record whose head is not that pushed `@-`, each naming the remedy. A production check report " + "(the task whose first line is `Production check of <KEY>`, handed once the merge closed the issue to the role the check records) needs no " + "handoff and no commit: it carries its verdict and summary alone. A pending report also names `wake_at`, an RFC 3339 time: when you want the " + "next look. A pass, a fail, and a pending on the check's last look end the check, so none of them carries `wake_at` " + "(CHECK_WAKE_UNEXPECTED), and a pending on any other look is refused without one (CHECK_WAKE_REQUIRED). A report on an issue whose check is " + "closed or never opened is refused (CHECK_NOT_OPEN), and so is one from a role the check does not record (CHECK_ROLE_MISMATCH). " + "The daemon refuses " + "HANDOFF_SESSION_MISMATCH (another session wrote the record), HANDOFF_NOT_NEW (the record is the one you named for your previous phase: " + "write this phase's handoff), " + "HANDOFF_STALE_ENTRY (this completion is of a phase entry behind the one your role's phases row names, because the phase was entered " + `again while your turn ran, and nothing was recorded. ${STALE_ENTRY_INSTRUCTION}), the implementer's completion of implementing with no open ` + "pull request on `legion/<issue>` and none recorded " + "merged (HANDOFF_NO_PULL_REQUEST: open it; one naming a closed pull request is the architect's to decide); a refused completion changed " + "nothing, so fix what it names and complete again. " + "ready_for_update answers the daemon's update message on this issue's pod: `round` is the round id that message names, and the " + "daemon takes your answer for that round alone. Push every commit you want kept to the issue branch " + "first. The daemon replaces the pod and its disk when the round ends: at the moment the message names, or earlier when every " + "role has answered and no turn runs. No answer delays that moment, and the end of a turn is no answer. The call ends no phase. The " + "daemon holds your next task until your process comes back on the new pod, in this same session. " + (host.after ?? "") + `What a later phase needs goes in your handoff; a question for another live role goes to its role topic with ${host.envoyPublish}.`;
|
|
31252
31250
|
}
|
|
31253
31251
|
async function mintClaimGrant(daemon, claim) {
|
|
31254
31252
|
const { grantId } = await daemon.grant({
|
|
@@ -9,7 +9,12 @@ binary; and when a test fails in your pod. Every path it cites is in cybermonkla
|
|
|
9
9
|
## What runs in your pod, and what runs on the pull request
|
|
10
10
|
|
|
11
11
|
An issue pod runs no heavy build and no whole test suite. The pod's six roles share one memory
|
|
12
|
-
limit
|
|
12
|
+
limit. Near that limit the launcher's memory guard, where the deployment runs it (it is on by
|
|
13
|
+
default), stops, with SIGKILL, the largest process that is neither Legion's own nor an agent's own,
|
|
14
|
+
which in practice is a command an agent ran: a build, a test binary, a Python or JavaScript kernel.
|
|
15
|
+
It then tells that process's role why, in a message on the role's topic. The command fails and the
|
|
16
|
+
turn goes on. A command that fills the memory faster than the guard can stop it still takes the pod
|
|
17
|
+
past its limit, and that ends every role's turn, not only yours.
|
|
13
18
|
|
|
14
19
|
In the pod you compile and test the packages your change touches, build the program a check of
|
|
15
20
|
your issue drives (`go build ./cmd/legion`), vet the module you changed (`go vet -tags e2e ./...`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/pi-legion",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.28.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"omp": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"legion": {
|
|
15
|
-
"daemonApiVersion":
|
|
15
|
+
"daemonApiVersion": 144
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|