@cotal-ai/workspace 0.100.2 → 0.101.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 +20 -0
- package/build/Release/darwin-arm64/process.node +0 -0
- package/build/Release/darwin-x64/build.json +20 -0
- package/build/Release/darwin-x64/process.node +0 -0
- package/build/Release/win32-arm64/build.json +4 -3
- package/build/Release/win32-x64/build.json +4 -3
- package/dist/agent-grants.d.ts +21 -0
- package/dist/agent-grants.d.ts.map +1 -0
- package/dist/agent-grants.js +21 -0
- package/dist/agent-grants.js.map +1 -0
- package/dist/auth-paths.d.ts +34 -0
- package/dist/auth-paths.d.ts.map +1 -1
- package/dist/auth-paths.js +99 -3
- package/dist/auth-paths.js.map +1 -1
- package/dist/broker-display.d.ts +12 -0
- package/dist/broker-display.d.ts.map +1 -1
- package/dist/broker-display.js +14 -0
- package/dist/broker-display.js.map +1 -1
- package/dist/connect.d.ts +21 -7
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +152 -22
- package/dist/connect.js.map +1 -1
- package/dist/control-target.d.ts.map +1 -1
- package/dist/control-target.js +12 -10
- package/dist/control-target.js.map +1 -1
- package/dist/cotal-config.d.ts +7 -0
- package/dist/cotal-config.d.ts.map +1 -1
- package/dist/cotal-config.js +29 -2
- package/dist/cotal-config.js.map +1 -1
- package/dist/cotal-home.d.ts +23 -0
- package/dist/cotal-home.d.ts.map +1 -0
- package/dist/cotal-home.js +36 -0
- package/dist/cotal-home.js.map +1 -0
- package/dist/credential-actions.d.ts +17 -3
- package/dist/credential-actions.d.ts.map +1 -1
- package/dist/credential-actions.js +62 -10
- package/dist/credential-actions.js.map +1 -1
- package/dist/darwin-process.d.ts +20 -0
- package/dist/darwin-process.d.ts.map +1 -0
- package/dist/darwin-process.js +24 -0
- package/dist/darwin-process.js.map +1 -0
- package/dist/deprecated-daemon-entries.d.ts +3 -0
- package/dist/deprecated-daemon-entries.d.ts.map +1 -1
- package/dist/deprecated-daemon-entries.js +6 -1
- package/dist/deprecated-daemon-entries.js.map +1 -1
- package/dist/extensions.d.ts +4 -2
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +7 -2
- package/dist/extensions.js.map +1 -1
- package/dist/flags.d.ts +2 -0
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +1 -1
- package/dist/flags.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/join-target.d.ts +3 -1
- package/dist/join-target.d.ts.map +1 -1
- package/dist/join-target.js +15 -3
- package/dist/join-target.js.map +1 -1
- package/dist/maintenance.d.ts +61 -2
- package/dist/maintenance.d.ts.map +1 -1
- package/dist/maintenance.js +153 -14
- package/dist/maintenance.js.map +1 -1
- package/dist/manager-name.d.ts +15 -0
- package/dist/manager-name.d.ts.map +1 -0
- package/dist/manager-name.js +54 -0
- package/dist/manager-name.js.map +1 -0
- package/dist/mesh-registry.d.ts +39 -35
- package/dist/mesh-registry.d.ts.map +1 -1
- package/dist/mesh-registry.js +57 -36
- package/dist/mesh-registry.js.map +1 -1
- package/dist/mesh-target.d.ts +120 -3
- package/dist/mesh-target.d.ts.map +1 -1
- package/dist/mesh-target.js +319 -48
- package/dist/mesh-target.js.map +1 -1
- package/dist/official-connectors.d.ts +3 -0
- package/dist/official-connectors.d.ts.map +1 -1
- package/dist/official-connectors.js +5 -0
- package/dist/official-connectors.js.map +1 -1
- package/dist/output.d.ts +34 -6
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +38 -5
- package/dist/output.js.map +1 -1
- package/dist/pid.d.ts +42 -7
- package/dist/pid.d.ts.map +1 -1
- package/dist/pid.js +189 -26
- package/dist/pid.js.map +1 -1
- package/dist/preferences.d.ts +25 -3
- package/dist/preferences.d.ts.map +1 -1
- package/dist/preferences.js +77 -14
- package/dist/preferences.js.map +1 -1
- package/dist/preflight.d.ts +17 -5
- package/dist/preflight.d.ts.map +1 -1
- package/dist/preflight.js +22 -32
- package/dist/preflight.js.map +1 -1
- package/dist/prepared-spaces.d.ts +20 -2
- package/dist/prepared-spaces.d.ts.map +1 -1
- package/dist/prepared-spaces.js +90 -15
- package/dist/prepared-spaces.js.map +1 -1
- package/dist/present.d.ts +2 -12
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +24 -40
- package/dist/present.js.map +1 -1
- package/dist/protected-records.d.ts +22 -3
- package/dist/protected-records.d.ts.map +1 -1
- package/dist/protected-records.js +198 -27
- package/dist/protected-records.js.map +1 -1
- package/dist/registration-policy.d.ts +2 -1
- package/dist/registration-policy.d.ts.map +1 -1
- package/dist/render.d.ts +2 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +42 -11
- package/dist/render.js.map +1 -1
- package/dist/renewal.d.ts +4 -0
- package/dist/renewal.d.ts.map +1 -1
- package/dist/renewal.js +20 -1
- package/dist/renewal.js.map +1 -1
- package/dist/service-adapter.d.ts +1 -2
- package/dist/service-adapter.d.ts.map +1 -1
- package/dist/service-adapter.js +9 -4
- package/dist/service-adapter.js.map +1 -1
- package/dist/service-custody.js +2 -2
- package/dist/service-custody.js.map +1 -1
- package/dist/service-definition.d.ts +3 -0
- package/dist/service-definition.d.ts.map +1 -1
- package/dist/service-definition.js +56 -2
- package/dist/service-definition.js.map +1 -1
- package/dist/service-definition.schema.json +2 -1
- package/dist/service-identity.js +4 -4
- package/dist/service-identity.js.map +1 -1
- package/dist/service-stop.js +3 -3
- package/dist/service-stop.js.map +1 -1
- package/dist/service-target.d.ts.map +1 -1
- package/dist/service-target.js +9 -2
- package/dist/service-target.js.map +1 -1
- package/dist/signer-export.d.ts +1 -0
- package/dist/signer-export.d.ts.map +1 -1
- package/dist/signer-export.js +20 -4
- package/dist/signer-export.js.map +1 -1
- package/dist/space-streams.d.ts +18 -0
- package/dist/space-streams.d.ts.map +1 -0
- package/dist/space-streams.js +41 -0
- package/dist/space-streams.js.map +1 -0
- package/dist/space.d.ts +5 -0
- package/dist/space.d.ts.map +1 -1
- package/dist/space.js +5 -0
- package/dist/space.js.map +1 -1
- package/dist/store-entries.d.ts +6 -0
- package/dist/store-entries.d.ts.map +1 -0
- package/dist/store-entries.js +17 -0
- package/dist/store-entries.js.map +1 -0
- package/dist/system-rotation.d.ts +3 -1
- package/dist/system-rotation.d.ts.map +1 -1
- package/dist/system-rotation.js +19 -4
- package/dist/system-rotation.js.map +1 -1
- package/dist/text-wrap.d.ts +18 -0
- package/dist/text-wrap.d.ts.map +1 -0
- package/dist/text-wrap.js +60 -0
- package/dist/text-wrap.js.map +1 -0
- package/native/README.md +5 -3
- package/native/darwin-process.c +173 -0
- package/package.json +2 -2
- package/scripts/assert-shipped-natives.mjs +3 -3
- package/scripts/build-native.mjs +39 -25
- package/scripts/native-contract.mjs +36 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"official-connectors.js","sourceRoot":"","sources":["../src/official-connectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,MAAM,EAAE,iCAAiC;IACzC,QAAQ,EAAE,8BAA8B;IACxC,KAAK,EAAE,2BAA2B;IAClC,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE,2BAA2B;IAClC,EAAE,EAAE,cAAc;CACnB,CAAC;AAkBF,MAAM,CAAC,MAAM,iBAAiB,GAA8C;IAC1E,GAAI,MAAM,CAAC,WAAW,CACpB,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAC/F;IACrC,GAAG,EAAE,EAAE,GAAG,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,IAAY;IAC1C,OAAO,uFAAuF,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjH,CAAC"}
|
package/dist/output.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ import type { FlagSpec, OutputMode } from "@cotal-ai/core";
|
|
|
10
10
|
export type Outcome = "ok" | "no-op" | "refused" | "failed" | "partial" | "unknown";
|
|
11
11
|
/** How much of the read scope the result covers. It says nothing about whether the work succeeded. */
|
|
12
12
|
export type Completeness = "complete" | "partial" | "not-checked";
|
|
13
|
+
/** The most characters of an argument a message repeats through `boundedValue`: as many as the longest
|
|
14
|
+
* name a command accepts, so a value of valid length is shown whole. */
|
|
15
|
+
export declare const SHOWN_VALUE_MAX = 128;
|
|
13
16
|
/** Refusals of the declared input, before any effect: exit 1. */
|
|
14
17
|
export declare const USAGE_CODES: readonly ["USAGE_INVALID", "SCHEMA_INVALID"];
|
|
15
18
|
/** Refusals at a known boundary before any effect: exit 2. Denial, absence and outage stay distinct. */
|
|
@@ -64,32 +67,57 @@ export declare class CommandFailure extends Error {
|
|
|
64
67
|
readonly native?: NativeCause;
|
|
65
68
|
readonly target: unknown;
|
|
66
69
|
readonly changed?: readonly unknown[];
|
|
70
|
+
/** The message and remedy are the whole fix, as for a missing `--yes`, so a usage refusal prints
|
|
71
|
+
* them without the command's help. */
|
|
72
|
+
readonly selfContained?: true;
|
|
67
73
|
constructor(outcome: Exclude<Outcome, "ok" | "no-op">, code: ErrorCode, message: string, opts?: {
|
|
68
74
|
remedy?: string;
|
|
69
75
|
native?: NativeCause;
|
|
70
76
|
target?: unknown;
|
|
71
77
|
changed?: readonly unknown[];
|
|
72
78
|
cause?: unknown;
|
|
79
|
+
selfContained?: true;
|
|
73
80
|
});
|
|
74
81
|
/** The error detail an envelope carries. */
|
|
75
82
|
detail(): ErrorDetail;
|
|
76
83
|
}
|
|
84
|
+
/** A usage refusal for a missing `--yes` outside an interactive terminal. Its remedy names the
|
|
85
|
+
* confirmed or previewed command, so it prints without the command's help. */
|
|
86
|
+
export declare class ConfirmationRequired extends CommandFailure {
|
|
87
|
+
constructor(message: string, opts: {
|
|
88
|
+
remedy: string;
|
|
89
|
+
target?: unknown;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
77
92
|
export declare function isCommandFailure(e: unknown): e is CommandFailure;
|
|
78
|
-
/** The space one command run resolved, as {@link recordOperationSpace} set it,
|
|
79
|
-
* {@link
|
|
93
|
+
/** The space one command run resolved, as {@link recordOperationSpace} set it, the note
|
|
94
|
+
* {@link recordOperationSpaceNote} recorded on how it was chosen, and the warnings
|
|
95
|
+
* {@link recordOperationWarning} recorded. `quiet` keeps those warnings off stderr. */
|
|
80
96
|
export interface OperationScope {
|
|
81
97
|
space?: string;
|
|
98
|
+
spaceNote?: {
|
|
99
|
+
space: string;
|
|
100
|
+
text: string;
|
|
101
|
+
};
|
|
82
102
|
warnings?: OutputWarning[];
|
|
103
|
+
quiet?: boolean;
|
|
83
104
|
}
|
|
84
|
-
/** Run
|
|
85
|
-
|
|
105
|
+
/** Run `body` inside `scope`: one command, so the space it records there is readable after it
|
|
106
|
+
* throws, or the rendering of that command's failure, which then reads what the run recorded. */
|
|
107
|
+
export declare function runOperation<T>(scope: OperationScope, body: () => T): T;
|
|
86
108
|
/** Record the one space this command's operation resolved, as soon as it is resolved. A command
|
|
87
109
|
* that works across spaces, or on none, never calls this. Outside {@link runOperation} it does
|
|
88
110
|
* nothing. */
|
|
89
111
|
export declare function recordOperationSpace(space: string): void;
|
|
112
|
+
/** Record how this command's operation chose `space`, for its `Mesh:` heading to show under the
|
|
113
|
+
* name. Outside {@link runOperation} it does nothing. */
|
|
114
|
+
export declare function recordOperationSpaceNote(space: string, text: string): void;
|
|
115
|
+
/** The note this run recorded for `space`, if any. */
|
|
116
|
+
export declare function operationSpaceNote(space: string): string | undefined;
|
|
90
117
|
/** Record a warning about what this command's operation resolved. It is printed on stderr at once,
|
|
91
|
-
* before the command acts on it, and every envelope of the run carries it.
|
|
92
|
-
* recorded in this run is not repeated. Outside {@link runOperation} it does
|
|
118
|
+
* before the command acts on it, unless the scope is quiet, and every envelope of the run carries it.
|
|
119
|
+
* A warning already recorded in this run is not repeated. Outside {@link runOperation} it does
|
|
120
|
+
* nothing. */
|
|
93
121
|
export declare function recordOperationWarning(warning: OutputWarning): void;
|
|
94
122
|
/** The warnings this command run recorded so far, none outside {@link runOperation}. */
|
|
95
123
|
export declare function operationWarnings(): readonly OutputWarning[];
|
package/dist/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG3D;;;;;;GAMG;AAEH,mGAAmG;AACnG,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpF,sGAAsG;AACtG,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AAElE;yEACyE;AACzE,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,iEAAiE;AACjE,eAAO,MAAM,WAAW,8CAA+C,CAAC;AAExE,wGAAwG;AACxG,eAAO,MAAM,cAAc,yLAUjB,CAAC;AAEX,oFAAoF;AACpF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzF,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,CAAC;AAEvB,k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C,CAAC;AAE9D;+FAC+F;AAC/F,wBAAgB,6BAA6B,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAA;CAAE,GAAG,MAAM,EAAE,CAG1G;AAID,uFAAuF;AACvF,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C"}
|
package/dist/output.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { terminalWidth, wrapWords } from "./text-wrap.js";
|
|
3
|
+
/** The most characters of an argument a message repeats through `boundedValue`: as many as the longest
|
|
4
|
+
* name a command accepts, so a value of valid length is shown whole. */
|
|
5
|
+
export const SHOWN_VALUE_MAX = 128;
|
|
2
6
|
/** Refusals of the declared input, before any effect: exit 1. */
|
|
3
7
|
export const USAGE_CODES = ["USAGE_INVALID", "SCHEMA_INVALID"];
|
|
4
8
|
/** Refusals at a known boundary before any effect: exit 2. Denial, absence and outage stay distinct. */
|
|
@@ -58,6 +62,9 @@ export class CommandFailure extends Error {
|
|
|
58
62
|
native;
|
|
59
63
|
target;
|
|
60
64
|
changed;
|
|
65
|
+
/** The message and remedy are the whole fix, as for a missing `--yes`, so a usage refusal prints
|
|
66
|
+
* them without the command's help. */
|
|
67
|
+
selfContained;
|
|
61
68
|
constructor(outcome, code, message, opts = {}) {
|
|
62
69
|
super(message, opts.cause === undefined ? undefined : { cause: opts.cause });
|
|
63
70
|
const problem = outcomeCodeProblem(outcome, code);
|
|
@@ -70,6 +77,7 @@ export class CommandFailure extends Error {
|
|
|
70
77
|
this.native = opts.native;
|
|
71
78
|
this.target = opts.target ?? null;
|
|
72
79
|
this.changed = opts.changed;
|
|
80
|
+
this.selfContained = opts.selfContained;
|
|
73
81
|
}
|
|
74
82
|
/** The error detail an envelope carries. */
|
|
75
83
|
detail() {
|
|
@@ -81,12 +89,20 @@ export class CommandFailure extends Error {
|
|
|
81
89
|
};
|
|
82
90
|
}
|
|
83
91
|
}
|
|
92
|
+
/** A usage refusal for a missing `--yes` outside an interactive terminal. Its remedy names the
|
|
93
|
+
* confirmed or previewed command, so it prints without the command's help. */
|
|
94
|
+
export class ConfirmationRequired extends CommandFailure {
|
|
95
|
+
constructor(message, opts) {
|
|
96
|
+
super("refused", "USAGE_INVALID", message, { ...opts, selfContained: true });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
84
99
|
export function isCommandFailure(e) {
|
|
85
100
|
return typeof e === "object" && e !== null && e[FAILURE_BRAND] === true;
|
|
86
101
|
}
|
|
87
102
|
// Kept on a global key so two copies of this module share one scope, as the failure brand does.
|
|
88
103
|
const operationScope = (globalThis[Symbol.for("cotal.operationScope")] ??= new AsyncLocalStorage());
|
|
89
|
-
/** Run
|
|
104
|
+
/** Run `body` inside `scope`: one command, so the space it records there is readable after it
|
|
105
|
+
* throws, or the rendering of that command's failure, which then reads what the run recorded. */
|
|
90
106
|
export function runOperation(scope, body) {
|
|
91
107
|
return operationScope.run(scope, body);
|
|
92
108
|
}
|
|
@@ -98,15 +114,32 @@ export function recordOperationSpace(space) {
|
|
|
98
114
|
if (scope)
|
|
99
115
|
scope.space = space;
|
|
100
116
|
}
|
|
117
|
+
/** Record how this command's operation chose `space`, for its `Mesh:` heading to show under the
|
|
118
|
+
* name. Outside {@link runOperation} it does nothing. */
|
|
119
|
+
export function recordOperationSpaceNote(space, text) {
|
|
120
|
+
const scope = operationScope.getStore();
|
|
121
|
+
if (scope)
|
|
122
|
+
scope.spaceNote = { space, text };
|
|
123
|
+
}
|
|
124
|
+
/** The note this run recorded for `space`, if any. */
|
|
125
|
+
export function operationSpaceNote(space) {
|
|
126
|
+
const note = operationScope.getStore()?.spaceNote;
|
|
127
|
+
return note?.space === space ? note.text : undefined;
|
|
128
|
+
}
|
|
101
129
|
/** Record a warning about what this command's operation resolved. It is printed on stderr at once,
|
|
102
|
-
* before the command acts on it, and every envelope of the run carries it.
|
|
103
|
-
* recorded in this run is not repeated. Outside {@link runOperation} it does
|
|
130
|
+
* before the command acts on it, unless the scope is quiet, and every envelope of the run carries it.
|
|
131
|
+
* A warning already recorded in this run is not repeated. Outside {@link runOperation} it does
|
|
132
|
+
* nothing. */
|
|
104
133
|
export function recordOperationWarning(warning) {
|
|
105
134
|
const scope = operationScope.getStore();
|
|
106
135
|
if (!scope || scope.warnings?.some((w) => w.code === warning.code && w.message === warning.message))
|
|
107
136
|
return;
|
|
108
137
|
(scope.warnings ??= []).push(warning);
|
|
109
|
-
|
|
138
|
+
if (scope.quiet)
|
|
139
|
+
return;
|
|
140
|
+
// Wrapped to the terminal like the report it precedes, each continuation line under the text.
|
|
141
|
+
const lines = wrapWords(warning.message, terminalWidth(process.stderr) - 2);
|
|
142
|
+
process.stderr.write(`${lines.map((line, i) => `${i === 0 ? "!" : " "} ${line}`).join("\n")}\n`);
|
|
110
143
|
}
|
|
111
144
|
/** The warnings this command run recorded so far, none outside {@link runOperation}. */
|
|
112
145
|
export function operationWarnings() {
|
|
@@ -120,7 +153,7 @@ export function inOperationSpace(failure, space) {
|
|
|
120
153
|
if (space === undefined || target !== null && (typeof target !== "object" || Array.isArray(target) || Object.hasOwn(target, "space")))
|
|
121
154
|
return failure;
|
|
122
155
|
const fields = target === null ? {} : target;
|
|
123
|
-
const placed = new CommandFailure(failure.outcome, failure.code, failure.message, { remedy: failure.remedy, native: failure.native, changed: failure.changed, target: { space, ...fields }, cause: failure.cause });
|
|
156
|
+
const placed = new CommandFailure(failure.outcome, failure.code, failure.message, { remedy: failure.remedy, native: failure.native, changed: failure.changed, target: { space, ...fields }, cause: failure.cause, selfContained: failure.selfContained });
|
|
124
157
|
placed.stack = failure.stack;
|
|
125
158
|
return placed;
|
|
126
159
|
}
|
package/dist/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"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AED,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B,uFAAuF;AACvF,MAAM,UAAU,YAAY;IAC1B,aAAa,GAAG,IAAI,CAAC;AACvB,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,mBAAmB;IACjC,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/dist/pid.d.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* BY CONSTRUCTION, not by oversight; if they need this contract, the fix is a shared local-process
|
|
18
18
|
* module they may depend on, never a core export.
|
|
19
19
|
*/
|
|
20
|
+
import { type DarwinProcessBinding } from "./darwin-process.js";
|
|
20
21
|
/** A Node/POSIX-signalable pid: a positive INTEGER within the signed 32-bit range `process.kill`
|
|
21
22
|
* accepts (it throws `ERR_INVALID_ARG_TYPE`/`ERR_OUT_OF_RANGE` outside it). Anything else -
|
|
22
23
|
* fractional, non-numeric, non-positive, oversized - is undefined: UNATTRIBUTABLE, never a pid to
|
|
@@ -51,6 +52,23 @@ export type LivenessProbe = (pid: number) => "alive" | "dead" | "unknown";
|
|
|
51
52
|
* false-up. Reviewed against a repro that wedged three control-plane retries against an
|
|
52
53
|
* unreachable manager. */
|
|
53
54
|
export declare function probeLiveness(pid: number): "alive" | "dead" | "unknown";
|
|
55
|
+
/** Whether `pid` is stopped by a signal such as SIGSTOP, read from its `/proc` state, or on macOS from
|
|
56
|
+
* its kernel entry. Elsewhere this is `false`, and callers keep their unanswered-broker path. */
|
|
57
|
+
export declare function processStopped(pid: number): boolean;
|
|
58
|
+
/** The stopped process of this account that holds the listening socket a loopback `server` dials,
|
|
59
|
+
* or `undefined`. A stopped broker still takes connections, because the kernel completes them, and
|
|
60
|
+
* never greets, so a dial waits out its whole budget. Linux reads `/proc/net/tcp{,6}` and the
|
|
61
|
+
* stopped processes' descriptors; elsewhere this is `undefined`. */
|
|
62
|
+
export declare function stoppedLoopbackListener(server: string): number | undefined;
|
|
63
|
+
/** Every process of this account that listens where a loopback `server` dials, so a report can name
|
|
64
|
+
* what holds an address. Linux only; elsewhere, and for a host that is not loopback, none. */
|
|
65
|
+
export declare function loopbackListeners(server: string): number[];
|
|
66
|
+
/** The process group `pid` belongs to, or `undefined` when it is gone or this is neither Linux nor
|
|
67
|
+
* macOS. A macOS read that fails throws, so a group stop never narrows to one process unnoticed. */
|
|
68
|
+
export declare function processGroupOf(pid: number): number | undefined;
|
|
69
|
+
/** The live processes in process group `pgid`. A zombie has exited and holds nothing, so it is not
|
|
70
|
+
* one. Linux and macOS; elsewhere none. A macOS read that fails throws rather than read as empty. */
|
|
71
|
+
export declare function processGroupMembers(pgid: number): number[];
|
|
54
72
|
/** What was read about ONE pid's command line, three-valued for the same reason liveness is:
|
|
55
73
|
* "it is something else" and "I could not look" are different facts and only the first may be
|
|
56
74
|
* acted on. */
|
|
@@ -188,7 +206,8 @@ export declare function parseRecord(raw: string): ReadRecord;
|
|
|
188
206
|
export declare function formatRecord(record: ProcessIdentityRecord): string;
|
|
189
207
|
/**
|
|
190
208
|
* The creation-identity token of a live pid: on Linux `/proc/<pid>/stat` field 22 (starttime —
|
|
191
|
-
* ticks since boot, fixed for the life of the pid); on macOS
|
|
209
|
+
* ticks since boot, fixed for the life of the pid); on macOS its start time in microseconds, through
|
|
210
|
+
* the shipped Node-API binding; on other BSDs `ps -o lstart=`; on Windows
|
|
192
211
|
* the process creation FILETIME (GetProcessTimes through the shipped Node-API binding). A pid whose token is
|
|
193
212
|
* `undefined` can still be recorded — the record then carries no start pin, and teardown warns that
|
|
194
213
|
* it is proceeding without the identity check. That pid-only shape is for a record that predates
|
|
@@ -207,11 +226,18 @@ export declare function parseWin32CreationToken(raw: string): string | undefined
|
|
|
207
226
|
* The reader parameter exercises validation off Windows; native suites execute the real binding.
|
|
208
227
|
*/
|
|
209
228
|
export declare function win32ProcessCreationToken(pid: number, read?: ProcessStartTokenReader): string | undefined;
|
|
210
|
-
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
|
|
229
|
+
/**
|
|
230
|
+
* macOS start time in microseconds through the shipped Node-API binding. No subprocess is involved,
|
|
231
|
+
* and the second-precision `ps -o lstart=` text is not used. A process that cannot be read is
|
|
232
|
+
* unverified; a missing binding throws. The binding parameter exercises validation off macOS.
|
|
233
|
+
*/
|
|
234
|
+
export declare function darwinProcessStartToken(pid: number, binding?: () => Pick<DarwinProcessBinding, "processInfo">): string | undefined;
|
|
235
|
+
/** Identity's start-token reader: Linux uses the same `/proc` implementation as the advisory lock so
|
|
236
|
+
* launch and teardown cannot drift; win32 uses {@link win32ProcessCreationToken} instead of the
|
|
237
|
+
* lock's `undefined`, and macOS {@link darwinProcessStartToken} instead of the lock's second-precision
|
|
238
|
+
* `ps` text. `platform` is a parameter so the win32 and macOS branches are executable elsewhere: a
|
|
239
|
+
* mutation that returns `undefined` there must redden without that kernel. */
|
|
240
|
+
export declare function identityStartToken(pid: number, platform?: string, win32?: ProcessStartTokenReader, posix?: ProcessStartTokenReader, darwin?: ProcessStartTokenReader): string | undefined;
|
|
215
241
|
export declare function defaultStartToken(pid: number): string | undefined;
|
|
216
242
|
/** The start token for a pid THIS PROCESS is about to record. Prefer the reader passed by the
|
|
217
243
|
* caller (tests inject divergence), fall back to {@link defaultStartToken}. `undefined` (a
|
|
@@ -220,6 +246,10 @@ export declare function defaultStartToken(pid: number): string | undefined;
|
|
|
220
246
|
export declare function identityRecord(pid: number, tokenAt?: ProcessStartTokenReader): ProcessIdentityRecord | {
|
|
221
247
|
pid: number;
|
|
222
248
|
};
|
|
249
|
+
/** The reader that verifies a recorded start token. A macOS pin written before the native reader holds
|
|
250
|
+
* `ps -o lstart=` text, which no microsecond token equals, so the default reader verifies it with that
|
|
251
|
+
* same `ps` reader and it keeps the guarantee it was written with. A reader the caller passes is used as given. */
|
|
252
|
+
export declare function startTokenReaderFor(token: string, tokenAt?: ProcessStartTokenReader, platform?: string): ProcessStartTokenReader;
|
|
223
253
|
/** The verdict of {@link assertRecordIdentity}: does the live process behind `pid` still carry the
|
|
224
254
|
* start this record pinned? `unreadable` is deliberately NOT a variant: the reader signature
|
|
225
255
|
* returns `undefined` for "cannot look" and that folds into `unpinned` (refuse). This differs from
|
|
@@ -294,7 +324,9 @@ export interface RecordReplaceIo {
|
|
|
294
324
|
* line. After `publish-pin`, the NEW complete record. No state is torn and none drops to the unpinned
|
|
295
325
|
* legacy shape. A legacy old record (a pidfile with no pin) is carried as a {@link NO_START_TOKEN}
|
|
296
326
|
* line, so it stays legacy until the commit. An old pin that is torn or has no line for the old pid
|
|
297
|
-
* has nothing to carry, so until the commit it refuses as a torn pairing, as it already did.
|
|
327
|
+
* has nothing to carry, so until the commit it refuses as a torn pairing, as it already did. A
|
|
328
|
+
* pidfile that exists but cannot be read is not a first start: the publish throws before its first
|
|
329
|
+
* rename, leaving the record as it was.
|
|
298
330
|
*
|
|
299
331
|
* When `identityRecord` cannot establish a token (ps-less host, or a pid whose start could not be
|
|
300
332
|
* read - same rule as {@link writeIdentityPin}), the new line carries {@link NO_START_TOKEN} and
|
|
@@ -322,6 +354,8 @@ export declare function writePidPair(pidfilePath: string, pid: number, opts?: {
|
|
|
322
354
|
}): void;
|
|
323
355
|
/** What {@link verifyIdentityPin} found for one pidfile. */
|
|
324
356
|
export type PinVerdict = {
|
|
357
|
+
kind: "no-pid";
|
|
358
|
+
} | {
|
|
325
359
|
kind: "legacy";
|
|
326
360
|
} | {
|
|
327
361
|
kind: "match";
|
|
@@ -344,6 +378,7 @@ export type PinVerdict = {
|
|
|
344
378
|
/**
|
|
345
379
|
* THE open-verify step every teardown runs BEFORE signalling (#969). Read the pidfile's bare pid,
|
|
346
380
|
* then the sibling pin, and adjudicate the pairing:
|
|
381
|
+
* - no-pid -> no pid is recorded, so there is no process to verify or signal
|
|
347
382
|
* - legacy -> the caller warns and signals for upgrade compatibility
|
|
348
383
|
* - match -> safe to signal; the process behind the pid is the recorded one
|
|
349
384
|
* - gone -> ESRCH-proven dead; the caller may clear the record
|
package/dist/pid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pid.d.ts","sourceRoot":"","sources":["../src/pid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"pid.d.ts","sourceRoot":"","sources":["../src/pid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAMtF;;;wCAGwC;AACxC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxD;AAED;;;8EAG8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO5D;AAED;;;;;;;;sDAQsD;AACtD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAIxF;AAED;;;mGAGmG;AACnG,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E;;;;;;;2BAO2B;AAC3B,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAOvE;AAED;kGACkG;AAClG,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUnD;AAoCD;;;qEAGqE;AACrE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;+FAC+F;AAC/F,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1D;AAWD;qGACqG;AACrG,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI9D;AAED;sGACsG;AACtG,wBAAgB,mBAAmB,CAAC,IAAI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