@cotal-ai/workspace 0.116.4 → 0.117.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/build/Release/darwin-arm64/build.json +1 -1
- package/build/Release/darwin-x64/build.json +1 -1
- package/build/Release/win32-arm64/build.json +1 -1
- package/build/Release/win32-x64/build.json +1 -1
- package/dist/provenance.d.ts +3 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +18 -15
- package/dist/provenance.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "darwin",
|
|
4
4
|
"arch": "arm64",
|
|
5
5
|
"nodeApi": 8,
|
|
6
|
-
"source": "
|
|
6
|
+
"source": "b32cee3fe80247e3820cd0072741f4ba2e886145",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"native/win32-process.c": "889b215135b60dd3a45096737a3219ce114bc424e4b6cce42624f0913f8447dc",
|
|
9
9
|
"native/win32-system-id.cpp": "2dd51f24425e8239aeac1aae01e67f43264f04f09cd9097a12d288be7a84e074",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "darwin",
|
|
4
4
|
"arch": "x64",
|
|
5
5
|
"nodeApi": 8,
|
|
6
|
-
"source": "
|
|
6
|
+
"source": "b32cee3fe80247e3820cd0072741f4ba2e886145",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"native/win32-process.c": "889b215135b60dd3a45096737a3219ce114bc424e4b6cce42624f0913f8447dc",
|
|
9
9
|
"native/win32-system-id.cpp": "2dd51f24425e8239aeac1aae01e67f43264f04f09cd9097a12d288be7a84e074",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "win32",
|
|
4
4
|
"arch": "arm64",
|
|
5
5
|
"nodeApi": 8,
|
|
6
|
-
"source": "
|
|
6
|
+
"source": "b32cee3fe80247e3820cd0072741f4ba2e886145",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"native/win32-process.c": "889b215135b60dd3a45096737a3219ce114bc424e4b6cce42624f0913f8447dc",
|
|
9
9
|
"native/win32-system-id.cpp": "2dd51f24425e8239aeac1aae01e67f43264f04f09cd9097a12d288be7a84e074",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "win32",
|
|
4
4
|
"arch": "x64",
|
|
5
5
|
"nodeApi": 8,
|
|
6
|
-
"source": "
|
|
6
|
+
"source": "b32cee3fe80247e3820cd0072741f4ba2e886145",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"native/win32-process.c": "889b215135b60dd3a45096737a3219ce114bc424e4b6cce42624f0913f8447dc",
|
|
9
9
|
"native/win32-system-id.cpp": "2dd51f24425e8239aeac1aae01e67f43264f04f09cd9097a12d288be7a84e074",
|
package/dist/provenance.d.ts
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* would let one call announce a second act the command never made, or a carriage return overwrite
|
|
10
10
|
* the act it did make. So every control character and Unicode line separator in the line is shown
|
|
11
11
|
* as a `\uXXXX` escape instead. On a terminal a long line wraps at spaces like the CLI's other
|
|
12
|
-
* notices, each continuation line under the text after the arrow
|
|
13
|
-
*
|
|
12
|
+
* notices, each continuation line under the text after the arrow. The source, such as a path, is one
|
|
13
|
+
* word however many spaces it holds: when it does not fit after the label it keeps a line of its own,
|
|
14
|
+
* wider than the line if it must be, and is never split. To a pipe or a file it stays one line.
|
|
14
15
|
*
|
|
15
16
|
* Failure policy: a line reports an act that already happened, so a fault on stderr must neither
|
|
16
17
|
* fail that act nor drop the line unsaid. When the stderr write throws or fails (EPIPE, ENOSPC,
|
package/dist/provenance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,UAAU;IACrB,0FAA0F;eAC/E,MAAM,UAAU,MAAM,GAAG,IAAI;IAGxC,sFAAsF;gBAC1E,MAAM,QAAQ,MAAM,GAAG,IAAI;IAGvC;;yGAEqG;kBACvF,MAAM,QAAQ,MAAM,GAAG,IAAI;CAG1C,CAAC"}
|
package/dist/provenance.js
CHANGED
|
@@ -11,8 +11,9 @@ import { terminalWidth, wrapWords } from "./text-wrap.js";
|
|
|
11
11
|
* would let one call announce a second act the command never made, or a carriage return overwrite
|
|
12
12
|
* the act it did make. So every control character and Unicode line separator in the line is shown
|
|
13
13
|
* as a `\uXXXX` escape instead. On a terminal a long line wraps at spaces like the CLI's other
|
|
14
|
-
* notices, each continuation line under the text after the arrow
|
|
15
|
-
*
|
|
14
|
+
* notices, each continuation line under the text after the arrow. The source, such as a path, is one
|
|
15
|
+
* word however many spaces it holds: when it does not fit after the label it keeps a line of its own,
|
|
16
|
+
* wider than the line if it must be, and is never split. To a pipe or a file it stays one line.
|
|
16
17
|
*
|
|
17
18
|
* Failure policy: a line reports an act that already happened, so a fault on stderr must neither
|
|
18
19
|
* fail that act nor drop the line unsaid. When the stderr write throws or fails (EPIPE, ENOSPC,
|
|
@@ -31,17 +32,17 @@ import { terminalWidth, wrapWords } from "./text-wrap.js";
|
|
|
31
32
|
export const provenance = {
|
|
32
33
|
/** `→ using <what>: <source>` — the source that WON resolution (say which layer/path). */
|
|
33
34
|
read(what, source) {
|
|
34
|
-
say(`using ${what}
|
|
35
|
+
say(`using ${what}:`, source);
|
|
35
36
|
},
|
|
36
37
|
/** `→ wrote <what>: <dest>` — announce every file the command created or replaced. */
|
|
37
38
|
wrote(what, dest) {
|
|
38
|
-
say(`wrote ${what}
|
|
39
|
+
say(`wrote ${what}:`, dest);
|
|
39
40
|
},
|
|
40
41
|
/** `→ removed <what>: <dest>`: announce every file or directory the command DELETED. A silent
|
|
41
42
|
* delete is worse than a silent write, because the write at least leaves the thing it made while
|
|
42
43
|
* the delete leaves nothing to notice. Destructive steps get the one line the additive ones get. */
|
|
43
44
|
removed(what, dest) {
|
|
44
|
-
say(`removed ${what}
|
|
45
|
+
say(`removed ${what}:`, dest);
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
let unsaid = false;
|
|
@@ -50,18 +51,20 @@ let watching = false;
|
|
|
50
51
|
const waiting = new Set();
|
|
51
52
|
/** Streams whose `error` event is absorbed: without a listener Node exits 1 on it. */
|
|
52
53
|
const absorbed = new Set();
|
|
53
|
-
/** Write one provenance line, the arrow and `
|
|
54
|
-
* on stdout with the stderr error named, else counted as unsaid. The
|
|
55
|
-
* the rest, since a thrown value's message can carry a newline too. */
|
|
56
|
-
function say(
|
|
57
|
-
send(process.stderr, shown(
|
|
58
|
-
send(process.stdout, shown(
|
|
54
|
+
/** Write one provenance line, the arrow, `label` and `source`, under the failure policy above: on
|
|
55
|
+
* stderr, else on stdout with the stderr error named after the source, else counted as unsaid. The
|
|
56
|
+
* failure name is escaped with the rest, since a thrown value's message can carry a newline too. */
|
|
57
|
+
function say(label, source) {
|
|
58
|
+
send(process.stderr, shown(process.stderr, label, source), (failure) => {
|
|
59
|
+
send(process.stdout, shown(process.stdout, label, source, `(stderr failed: ${nameOf(failure)})`), lost);
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
/** `
|
|
62
|
-
* each continuation line under the text, as one write.
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
/** `label`, `source` and `note` after the arrow with their control characters escaped, wrapped to
|
|
63
|
+
* `stream`'s terminal and each continuation line under the text, as one write. The label and the
|
|
64
|
+
* note break at their spaces; the source is one word. */
|
|
65
|
+
function shown(stream, label, source, note) {
|
|
66
|
+
const words = (text) => oneLine(text).split(" ");
|
|
67
|
+
const lines = wrapWords([...words(label), oneLine(source), ...(note === undefined ? [] : words(note))], terminalWidth(stream) - 2);
|
|
65
68
|
return `${lines.map((line, i) => `${i === 0 ? "→" : " "} ${line}`).join("\n")}\n`;
|
|
66
69
|
}
|
|
67
70
|
/** A thrown value need not be an Error (`throw null`), and naming one must not throw, since that
|
package/dist/provenance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,0FAA0F;IAC1F,IAAI,CAAC,IAAY,EAAE,MAAc;QAC/B,GAAG,CAAC,SAAS,IAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,sFAAsF;IACtF,KAAK,CAAC,IAAY,EAAE,IAAY;QAC9B,GAAG,CAAC,SAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD;;yGAEqG;IACrG,OAAO,CAAC,IAAY,EAAE,IAAY;QAChC,GAAG,CAAC,WAAW,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;CACF,CAAC;AAEF,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,sGAAsG;AACtG,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkC,CAAC;AAC1D,sFAAsF;AACtF,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE/C;;qGAEqG;AACrG,SAAS,GAAG,CAAC,KAAa,EAAE,MAAc;IACxC,IAAI,CAAC,O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C,MAAM,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;SAAM,IAAI,MAAM,CAAC,cAAc,GAAG,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,SAAS,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,sCAAsC;AACtC,SAAS,IAAI;IACX,MAAM,GAAG,IAAI,CAAC;IACd,SAAS,EAAE,CAAC;AACd,CAAC;AAED;;;;4DAI4D;AAC5D,SAAS,SAAS;IAChB,IAAI,QAAQ;QAAE,OAAO;IACrB,QAAQ,GAAG,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QAC1B,KAAK,MAAM,CAAC,IAAI,OAAO;YAAE,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,GAAG,CAAC;gBAAE,MAAM,GAAG,IAAI,CAAC;QACxE,IAAI,MAAM,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/workspace",
|
|
3
3
|
"description": "Cotal machine-local workstation layer: the ~/.cotal mesh registry, target resolution, preflight, on-disk auth-path I/O, and the command-copy renderer — operator concerns over a local checkout, kept separate from the wire protocol in @cotal-ai/core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.117.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@cotal-ai/core": "0.
|
|
25
|
+
"@cotal-ai/core": "0.117.0",
|
|
26
26
|
"ajv": "^8.20.0",
|
|
27
27
|
"string-width": "^8.2.1",
|
|
28
28
|
"yaml": "^2.9.0",
|