@bluewombat/runtime 0.1.0 → 0.1.1

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/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluewombat/runtime",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "The mason process: listen, admit, run Conductor, report. Loads one FeatureManager plugin.",
6
6
  "keywords": [
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "types": "./dist/index.d.ts",
27
27
  "bin": {
28
- "mason": "./dist/cli.js"
28
+ "mason": "dist/cli.js"
29
29
  },
30
30
  "files": [
31
31
  "dist",
@@ -46,21 +46,21 @@
46
46
  "build": "tsc -p tsconfig.build.json"
47
47
  },
48
48
  "dependencies": {
49
- "@bluewombat/conductor": "^0.1.0",
50
- "@bluewombat/feature-breakdown": "^0.1.0",
51
- "@bluewombat/manager-kit": "^0.1.0",
52
- "@bluewombat/implementer": "^0.1.0",
53
- "@bluewombat/integrator": "^0.1.0",
54
- "@bluewombat/isolation-copy": "^0.1.0",
55
- "@bluewombat/isolation-git": "^0.1.0",
56
- "@bluewombat/isolator": "^0.1.0",
57
- "@bluewombat/slots": "^0.1.0",
58
- "@bluewombat/work-ledger": "^0.1.0",
59
- "@bluewombat/persist-fs": "^0.1.0"
49
+ "@bluewombat/conductor": "^0.1.1",
50
+ "@bluewombat/feature-breakdown": "^0.1.1",
51
+ "@bluewombat/manager-kit": "^0.1.1",
52
+ "@bluewombat/implementer": "^0.1.1",
53
+ "@bluewombat/integrator": "^0.1.1",
54
+ "@bluewombat/isolation-copy": "^0.1.1",
55
+ "@bluewombat/isolation-git": "^0.1.1",
56
+ "@bluewombat/isolator": "^0.1.1",
57
+ "@bluewombat/slots": "^0.1.1",
58
+ "@bluewombat/work-ledger": "^0.1.1",
59
+ "@bluewombat/persist-fs": "^0.1.1"
60
60
  },
61
61
  "devDependencies": {
62
- "@bluewombat/manager-fake": "^0.1.0",
63
- "@bluewombat/manager-github": "^0.1.0",
64
- "@bluewombat/persist-sqlite": "^0.1.0"
62
+ "@bluewombat/manager-fake": "^0.1.1",
63
+ "@bluewombat/manager-github": "^0.1.1",
64
+ "@bluewombat/persist-sqlite": "^0.1.1"
65
65
  }
66
66
  }
@@ -1,34 +0,0 @@
1
- import type { PassSpec } from "../config/types.js";
2
- /**
3
- * What the feature's commit says — and the pull request with it — is the
4
- * Project's decision, not Host's: a team has conventions, and an agent can
5
- * read the diff and follow them. The Message slot is where that lives. Host
6
- * spawns it once per feature, in the feature workspace where the whole diff
7
- * is, tells it what was asked, and takes one JSON line back:
8
- * `{ subject, body? }`. Subtask commits are never asked about: they are
9
- * squashed away, and words spent on them are words wasted.
10
- *
11
- * A slot that fails — cannot run, answers nothing readable, subject empty —
12
- * is not a reason to lose the fold: the caller keeps the message it would
13
- * have written anyway, and the journal says the slot was skipped.
14
- */
15
- export type MessageInput = {
16
- id: string;
17
- /** The issue's title, as the human wrote it. */
18
- title: string;
19
- /** The issue's body, as the human wrote it. */
20
- intention: string;
21
- /** The work line the change will land on, so the slot can diff against it. */
22
- target: string;
23
- /** The feature workspace; the slot may read its diff. */
24
- cwd: string;
25
- };
26
- export type MessageAnswer = {
27
- ok: true;
28
- message: string;
29
- } | {
30
- ok: false;
31
- detail: string;
32
- };
33
- export declare function askMessage(slot: PassSpec, input: MessageInput): MessageAnswer;
34
- //# sourceMappingURL=message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/loop/message.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,GAAG,aAAa,CAkC7E"}
@@ -1,48 +0,0 @@
1
- import { spawnSync } from "node:child_process";
2
- export function askMessage(slot, input) {
3
- const [command, ...rest] = slot.cmd;
4
- if (command === undefined) {
5
- return { ok: false, detail: "the Message slot has no command" };
6
- }
7
- const run = spawnSync(command, [
8
- ...rest,
9
- "--id",
10
- input.id,
11
- "--title",
12
- input.title,
13
- "--intention",
14
- input.intention,
15
- "--target",
16
- input.target,
17
- ], { cwd: input.cwd, encoding: "utf8", timeout: slot.timeoutMs });
18
- if (run.error !== undefined) {
19
- return { ok: false, detail: `Message slot could not run: ${run.error.message}` };
20
- }
21
- const answer = lastJsonLine(run.stdout ?? "");
22
- if (answer === undefined) {
23
- const detail = `${run.stderr ?? ""}`.trim().slice(-500);
24
- return { ok: false, detail: `Message slot stdout is not a JSON object. ${detail}`.trim() };
25
- }
26
- const subject = typeof answer.subject === "string" ? answer.subject.trim() : "";
27
- if (subject.length === 0) {
28
- return { ok: false, detail: "Message slot answered no subject." };
29
- }
30
- const body = typeof answer.body === "string" ? answer.body.trim() : "";
31
- return { ok: true, message: body.length === 0 ? subject : `${subject}\n\n${body}` };
32
- }
33
- function lastJsonLine(stdout) {
34
- const lines = stdout.split("\n").filter((line) => line.trim().length > 0);
35
- for (let i = lines.length - 1; i >= 0; i--) {
36
- try {
37
- const parsed = JSON.parse(lines[i] ?? "");
38
- if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) {
39
- return parsed;
40
- }
41
- }
42
- catch {
43
- // not this line
44
- }
45
- }
46
- return undefined;
47
- }
48
- //# sourceMappingURL=message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/loop/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA8B/C,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,KAAmB;IAC5D,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;IACpC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,iCAAiC,EAAE,CAAC;IAClE,CAAC;IACD,MAAM,GAAG,GAAG,SAAS,CACnB,OAAO,EACP;QACE,GAAG,IAAI;QACP,MAAM;QACN,KAAK,CAAC,EAAE;QACR,SAAS;QACT,KAAK,CAAC,KAAK;QACX,aAAa;QACb,KAAK,CAAC,SAAS;QACf,UAAU;QACV,KAAK,CAAC,MAAM;KACb,EACD,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,CAC9D,CAAC;IACF,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,+BAA+B,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;IACnF,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC9C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAA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