@excitedjs/dreamux-utils 0.5.2-beta.241 → 0.6.0-alpha.g2c3ef6556fa8
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/README.md +56 -14
- package/dist/activity-error.d.ts +25 -0
- package/dist/activity-error.d.ts.map +1 -0
- package/dist/activity-error.js +22 -0
- package/dist/activity-error.js.map +1 -0
- package/dist/activity-scan.d.ts +6 -0
- package/dist/activity-scan.d.ts.map +1 -1
- package/dist/activity-scan.js +8 -0
- package/dist/activity-scan.js.map +1 -1
- package/dist/completion-body.d.ts.map +1 -1
- package/dist/completion-body.js.map +1 -1
- package/dist/config-validate.d.ts +10 -13
- package/dist/config-validate.d.ts.map +1 -1
- package/dist/config-validate.js +11 -28
- package/dist/config-validate.js.map +1 -1
- package/dist/error-info.d.ts +13 -0
- package/dist/error-info.d.ts.map +1 -0
- package/dist/error-info.js +17 -0
- package/dist/error-info.js.map +1 -0
- package/dist/fs.d.ts +25 -8
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +63 -31
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/json-invoke.d.ts +21 -5
- package/dist/json-invoke.d.ts.map +1 -1
- package/dist/json-invoke.js.map +1 -1
- package/dist/json-shape.d.ts +13 -0
- package/dist/json-shape.d.ts.map +1 -0
- package/dist/json-shape.js +20 -0
- package/dist/json-shape.js.map +1 -0
- package/dist/redaction.d.ts +94 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +242 -0
- package/dist/redaction.js.map +1 -0
- package/dist/socket-budget.d.ts.map +1 -1
- package/dist/socket-budget.js.map +1 -1
- package/dist/transactional-store.d.ts +74 -0
- package/dist/transactional-store.d.ts.map +1 -0
- package/dist/transactional-store.js +153 -0
- package/dist/transactional-store.js.map +1 -0
- package/dist/unsupported-feature.d.ts.map +1 -1
- package/dist/unsupported-feature.js +2 -2
- package/dist/unsupported-feature.js.map +1 -1
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -7,23 +7,65 @@ claude-code, and feishu-channel packages and the host core; consolidating them
|
|
|
7
7
|
removes the duplication while keeping the provider packages free of any
|
|
8
8
|
dependency on `@excitedjs/dreamux` core.
|
|
9
9
|
|
|
10
|
-
This package depends on `@excitedjs/dreamux
|
|
11
|
-
`@excitedjs/dreamux
|
|
10
|
+
This package depends on nothing: not on `@excitedjs/dreamux` core, and not on
|
|
11
|
+
`@excitedjs/dreamux-types`, which is the type set external providers compile
|
|
12
|
+
against.
|
|
12
13
|
|
|
13
14
|
## Exports
|
|
14
15
|
|
|
15
|
-
- **
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
- **json-shape** — generic JSON-shape primitives with no error-message
|
|
17
|
+
vocabulary (`isPlainObject`, `asString`, `nonEmptyString`).
|
|
18
|
+
- **error-info** — reading an arbitrary thrown value (`errorMessage`,
|
|
19
|
+
`errorInfo`, `ErrorInfo`).
|
|
20
|
+
- **config-validate** — neutral config-validation primitives that produce
|
|
21
|
+
`dreamux config error in <file>: ...` messages (`readNonEmptyString`,
|
|
22
|
+
`readStringArray`, …), built on `json-shape`.
|
|
23
|
+
- **os** — platform/filesystem primitives (`isProcessAlive`,
|
|
24
|
+
`isProcessGroupAlive`, `killProcessGroup`, `ensureOwnerOnlyDir`,
|
|
25
|
+
`removeEmptyLogFile`, `pathExists`). These are generic OS helpers, not
|
|
26
|
+
Dreamux layout/path contracts.
|
|
27
|
+
- **fs** — atomic-write primitives, one per publish semantic
|
|
28
|
+
(`publishFileExclusive` for create-only, `writeFileAtomic` for overwrite).
|
|
21
29
|
- **completion-body** — bounded teammate-completion resolution: inline a short
|
|
22
30
|
result, spill an over-budget result to an owner-only file under a
|
|
23
31
|
host-supplied spill directory (`resolveCompletionBody`,
|
|
24
|
-
`completionInlineBudget`, `
|
|
25
|
-
`
|
|
26
|
-
- **
|
|
27
|
-
|
|
28
|
-
(`
|
|
29
|
-
`
|
|
32
|
+
`completionInlineBudget`, `COMPLETION_INLINE_BUDGET_DEFAULT`,
|
|
33
|
+
`COMPLETION_INLINE_BUDGET_MAX`).
|
|
34
|
+
- **socket-budget** — Unix-domain socket path-budget primitives so a rendezvous
|
|
35
|
+
socket path fits the kernel's `sun_path` limit on every platform
|
|
36
|
+
(`DREAMUX_UNIX_SOCKET_PATH_MAX_BYTES`, `unixSocketPathFitsBudget`,
|
|
37
|
+
`assertUnixSocketPathBudget`).
|
|
38
|
+
- **supervised-child** — spawn or fork a child process and track its exit under
|
|
39
|
+
one shape (`SupervisedChild`, `SupervisedChildLaunch`,
|
|
40
|
+
`SupervisedChildOptions`, `SupervisedChildExit`).
|
|
41
|
+
- **activity-scan** — neutral scan mechanism shared by provider-owned Activity
|
|
42
|
+
readers: bounded positional reads, digests, path containment, and a scan
|
|
43
|
+
budget, with no native history layout or record shape of its own
|
|
44
|
+
(`createScanBudget`, `readBytesAt`, `isPathWithin`, `scanDigest`,
|
|
45
|
+
`isScanDigest`, `activityQueryFingerprint`, `SCAN_DISCOVERY_MAX_ENTRIES`,
|
|
46
|
+
`SCAN_DISCOVERY_MAX_ELAPSED_MS`).
|
|
47
|
+
- **activity-error** — the error a provider-owned Activity reader throws and
|
|
48
|
+
catches for its own control flow, with a `reason` that projects across the
|
|
49
|
+
provider seam (`ActivityError`, `ActivityErrorDetail`,
|
|
50
|
+
`ActivityErrorReason`).
|
|
51
|
+
- **unsupported-feature** — the structural error shape a runtime returns when a
|
|
52
|
+
caller asks for a neutral feature it cannot serve
|
|
53
|
+
(`unsupportedFeatureError`, `isUnsupportedFeatureError`,
|
|
54
|
+
`UnsupportedAgentRuntimeFeatureError`).
|
|
55
|
+
- **runtime-state-fence** — the provider-local fatal path for authoritative
|
|
56
|
+
state writes: a write failure or a revoked lease closes the fence, tears the
|
|
57
|
+
native runtime down once, and stops any restart loop
|
|
58
|
+
(`RuntimeStateFence`, `RuntimeStateFencedError`, `isStateLeaseRevoked`,
|
|
59
|
+
`STATE_LEASE_REVOKED_ERROR_NAME`, `RuntimeStateFenceReason`).
|
|
60
|
+
- **json-invoke** — the failure boundary for a one-request/one-result JSON
|
|
61
|
+
invocation: a marker a deep implementation can throw, and a runner that
|
|
62
|
+
turns exactly that marker into a settled `ok: false` answer
|
|
63
|
+
(`settleJsonInvoke`, `PublicInvokeFailure`, `SettledInvoke`).
|
|
64
|
+
- **redaction** — what a conversation, a log line, and a printed config must
|
|
65
|
+
not publish verbatim, by text shape or by field name
|
|
66
|
+
(`redactText`, `redactJson`, `isSecretKeyName`, `redactSecretKeyValues`,
|
|
67
|
+
`RedactedText`, `JsonValue`).
|
|
68
|
+
- **transactional-store** — the generic shape behind every persisted runtime
|
|
69
|
+
store: one file, one owner-supplied loader, one committed in-memory value,
|
|
70
|
+
and one serialized queue for every change (`TransactionalStore`,
|
|
71
|
+
`TransactionalStoreOptions`).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The error a provider-owned Activity reader throws and catches for its own
|
|
3
|
+
* internal control flow. `detail` is native-granularity vocabulary private to
|
|
4
|
+
* one reader; `reason` is the neutral projection that crosses the provider
|
|
5
|
+
* seam.
|
|
6
|
+
*
|
|
7
|
+
* The `reason` values duplicate `AgentActivityError['reason']` from
|
|
8
|
+
* `@excitedjs/dreamux-types` by value, not by type reference: this package
|
|
9
|
+
* depends on nothing, including `@excitedjs/dreamux-types`, so it cannot
|
|
10
|
+
* import that type. Core's Activity reader recognizes this shape structurally
|
|
11
|
+
* (`error.name === 'AgentActivityError'` plus a known `reason` string), not
|
|
12
|
+
* via `instanceof`, so this class needs no compile-time link to that
|
|
13
|
+
* interface — only value-sync with the four reasons `dreamux-types` declares.
|
|
14
|
+
*/
|
|
15
|
+
export type ActivityErrorDetail = 'not_found' | 'session_mismatch' | 'locator_outside_root' | 'unreadable' | 'invalid' | 'scan_unsupported' | 'cursor_invalid' | 'cursor_query_mismatch' | 'cursor_stale';
|
|
16
|
+
export type ActivityErrorReason = 'session_unavailable' | 'cursor_invalid' | 'activity_corrupt' | 'provider_failure';
|
|
17
|
+
export declare class ActivityError extends Error {
|
|
18
|
+
readonly detail: ActivityErrorDetail;
|
|
19
|
+
readonly name = "AgentActivityError";
|
|
20
|
+
readonly reason: ActivityErrorReason;
|
|
21
|
+
constructor(detail: ActivityErrorDetail, message: string, options?: {
|
|
22
|
+
cause?: unknown;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=activity-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-error.d.ts","sourceRoot":"","sources":["../src/activity-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,kBAAkB,GAClB,sBAAsB,GACtB,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,gBAAgB,GAChB,uBAAuB,GACvB,cAAc,CAAC;AAEnB,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,CAAC;AAcvB,qBAAa,aAAc,SAAQ,KAAK;IAMpC,QAAQ,CAAC,MAAM,EAAE,mBAAmB;IALtC,QAAQ,CAAC,IAAI,wBAAwB;IAErC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;gBAG1B,MAAM,EAAE,mBAAmB,EACpC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO;CAKpC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const PUBLIC_REASON = {
|
|
2
|
+
not_found: 'session_unavailable',
|
|
3
|
+
session_mismatch: 'session_unavailable',
|
|
4
|
+
locator_outside_root: 'session_unavailable',
|
|
5
|
+
unreadable: 'session_unavailable',
|
|
6
|
+
invalid: 'activity_corrupt',
|
|
7
|
+
scan_unsupported: 'provider_failure',
|
|
8
|
+
cursor_invalid: 'cursor_invalid',
|
|
9
|
+
cursor_query_mismatch: 'cursor_invalid',
|
|
10
|
+
cursor_stale: 'cursor_invalid',
|
|
11
|
+
};
|
|
12
|
+
export class ActivityError extends Error {
|
|
13
|
+
detail;
|
|
14
|
+
name = 'AgentActivityError';
|
|
15
|
+
reason;
|
|
16
|
+
constructor(detail, message, options = {}) {
|
|
17
|
+
super(message, options);
|
|
18
|
+
this.detail = detail;
|
|
19
|
+
this.reason = PUBLIC_REASON[detail];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=activity-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-error.js","sourceRoot":"","sources":["../src/activity-error.ts"],"names":[],"mappings":"AA+BA,MAAM,aAAa,GAAqD;IACtE,SAAS,EAAE,qBAAqB;IAChC,gBAAgB,EAAE,qBAAqB;IACvC,oBAAoB,EAAE,qBAAqB;IAC3C,UAAU,EAAE,qBAAqB;IACjC,OAAO,EAAE,kBAAkB;IAC3B,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,qBAAqB,EAAE,gBAAgB;IACvC,YAAY,EAAE,gBAAgB;CAC/B,CAAC;AAEF,MAAM,OAAO,aAAc,SAAQ,KAAK;IAM3B;IALF,IAAI,GAAG,oBAAoB,CAAC;IAE5B,MAAM,CAAsB;IAErC,YACW,MAA2B,EACpC,OAAe,EACf,UAA+B,EAAE;QAEjC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAJf,WAAM,GAAN,MAAM,CAAqB;QAKpC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACF"}
|
package/dist/activity-scan.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export interface PositionalReader {
|
|
|
18
18
|
}
|
|
19
19
|
export declare function scanDigest(value: string | Uint8Array): string;
|
|
20
20
|
export declare function isScanDigest(value: unknown): value is string;
|
|
21
|
+
/**
|
|
22
|
+
* Digest of the query shape a cursor was issued for, so a reader can reject a
|
|
23
|
+
* cursor minted under a different query (e.g. a different `includeTools`)
|
|
24
|
+
* instead of silently reinterpreting its position against the wrong records.
|
|
25
|
+
*/
|
|
26
|
+
export declare function activityQueryFingerprint(includeTools: boolean): string;
|
|
21
27
|
export declare function createScanBudget(input: {
|
|
22
28
|
maxEntries?: number;
|
|
23
29
|
maxElapsedMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-scan.d.ts","sourceRoot":"","sources":["../src/activity-scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;;GAMG;AAEH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,6BAA6B,OAAQ,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CACF,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAE7D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE5D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,KAAK,CAAC;CACzB,GAAG,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GAAG,OAAO,CAMrE"}
|
package/dist/activity-scan.js
CHANGED
|
@@ -16,6 +16,14 @@ export function scanDigest(value) {
|
|
|
16
16
|
export function isScanDigest(value) {
|
|
17
17
|
return typeof value === 'string' && /^[A-Za-z0-9_-]{43}$/.test(value);
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Digest of the query shape a cursor was issued for, so a reader can reject a
|
|
21
|
+
* cursor minted under a different query (e.g. a different `includeTools`)
|
|
22
|
+
* instead of silently reinterpreting its position against the wrong records.
|
|
23
|
+
*/
|
|
24
|
+
export function activityQueryFingerprint(includeTools) {
|
|
25
|
+
return scanDigest(JSON.stringify({ include_tools: includeTools }));
|
|
26
|
+
}
|
|
19
27
|
export function createScanBudget(input) {
|
|
20
28
|
const maxEntries = input.maxEntries ?? SCAN_DISCOVERY_MAX_ENTRIES;
|
|
21
29
|
const now = input.now ?? Date.now;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-scan.js","sourceRoot":"","sources":["../src/activity-scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEtD;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AACjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAenD,MAAM,UAAU,UAAU,CAAC,KAA0B;IACnD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxE,CAA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K,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;QAC5E,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;YACrC,IAAI,CAAC,SAAS,GAAG,CAAC;YAClB,IAAI,CAAC,SAAS,GAAG,SAAS,EAC1B,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,KAAK,CAAC;YAAE,MAAM;QAChC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,SAAiB;IAC1D,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,CACL,KAAK,KAAK,EAAE;QACZ,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACxE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-body.d.ts","sourceRoot":"","sources":["../src/completion-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,QAAS,CAAC;AACvD,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAGpD,MAAM,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"completion-body.d.ts","sourceRoot":"","sources":["../src/completion-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,QAAS,CAAC;AACvD,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAGpD,MAAM,MAAM,sBAAsB,GAChC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AACD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,GAAE,MAAM,CAAC,UAAmC,GAC9C,MAAM,CAUR;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,mBAAmB,EAC/B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,CAAC,CA6BjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-body.js","sourceRoot":"","sources":["../src/completion-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC;AACvD,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AACpD,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"completion-body.js","sourceRoot":"","sources":["../src/completion-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,M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AAE,CAAC;QAChD,uEAAuE;QACvE,oEAAoE;QACpE,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,cAAc,UAAU,EAAE,SAAS,CAAC,CAAC;QACjE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7C,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBACvC,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;oBAAS,CAAC;gBACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;YACvB,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;QACtE,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Shared JSON-shape validation helpers for Dreamux config readers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* and produce `dreamux config error in <file>: ...` messages.
|
|
4
|
+
* Any code that reads a config block validates it with these: each provider
|
|
5
|
+
* package's own `config.ts` for its provider's block, and the host's config
|
|
6
|
+
* module and plugin loader for theirs. They are runtime-agnostic — they know
|
|
7
|
+
* only JSON shapes — and every rejection they throw is a
|
|
8
|
+
* `dreamux config error in <file>: ...` message.
|
|
10
9
|
*/
|
|
11
|
-
export declare function isPlainObject(v: unknown): v is Record<string, unknown>;
|
|
12
10
|
export declare function describeType(v: unknown): string;
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function requireNonEmptyString(obj: Record<string, unknown>, key: string, file: string, prefix?: string): string;
|
|
11
|
+
export declare function readNonEmptyString(obj: Record<string, unknown>, key: string, file: string, prefix?: string): string;
|
|
15
12
|
export declare function readOptionalString(obj: Record<string, unknown>, key: string, file: string, prefix?: string): string | null;
|
|
16
13
|
export declare function readOptionalBoolean(obj: Record<string, unknown>, key: string, fallback: boolean, file: string, prefix?: string): boolean;
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
14
|
+
export declare function readStringArray(obj: Record<string, unknown>, key: string, fallback: string[], file: string, prefix?: string): string[];
|
|
15
|
+
export declare function readStringRecord(obj: Record<string, unknown>, key: string, fallback: Record<string, string>, file: string, prefix?: string): Record<string, string>;
|
|
16
|
+
export declare function readPositiveInt(obj: Record<string, unknown>, key: string, fallback: number, file: string, prefix?: string): number;
|
|
20
17
|
export declare function readProviderConfigObject(rawConfig: unknown, file: string, name: string, options?: {
|
|
21
18
|
allowMissing?: boolean;
|
|
22
19
|
}): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-validate.d.ts","sourceRoot":"","sources":["../src/config-validate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config-validate.d.ts","sourceRoot":"","sources":["../src/config-validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAI/C;AAuBD,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,MAAM,SAAK,GACV,MAAM,CAMR;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,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
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* and produce `dreamux config error in <file>: ...` messages.
|
|
4
|
+
* Any code that reads a config block validates it with these: each provider
|
|
5
|
+
* package's own `config.ts` for its provider's block, and the host's config
|
|
6
|
+
* module and plugin loader for theirs. They are runtime-agnostic — they know
|
|
7
|
+
* only JSON shapes — and every rejection they throw is a
|
|
8
|
+
* `dreamux config error in <file>: ...` message.
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
return v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
13
|
-
}
|
|
10
|
+
import { isPlainObject } from './json-shape.js';
|
|
14
11
|
export function describeType(v) {
|
|
15
12
|
if (v === null)
|
|
16
13
|
return 'null';
|
|
@@ -18,20 +15,6 @@ export function describeType(v) {
|
|
|
18
15
|
return 'array';
|
|
19
16
|
return typeof v;
|
|
20
17
|
}
|
|
21
|
-
export function rejectUnknownKeys(obj, allowed, file, prefix) {
|
|
22
|
-
for (const key of Object.keys(obj)) {
|
|
23
|
-
if (allowed.has(key))
|
|
24
|
-
continue;
|
|
25
|
-
const name = `${prefix}${key}`;
|
|
26
|
-
if (/^dispatchers\[\d+\]\.$/.test(prefix) && (key === 'feishu' || key === 'codex')) {
|
|
27
|
-
throw new Error(`dreamux config error in ${file}: ${name} is not supported by the providerized config v2 schema.\n` +
|
|
28
|
-
'Dreamux 0.x does not silently migrate operator-owned config. Rebuild this dispatcher with ' +
|
|
29
|
-
'dispatchers[].channels[] for the channel and a named agents[] entry referenced via ' +
|
|
30
|
-
'dispatchers[].agentRuntime for the runtime, then restart.');
|
|
31
|
-
}
|
|
32
|
-
throw new Error(`dreamux config error in ${file}: ${name} is not supported by the providerized config v2 schema`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
18
|
function ensureString(v, key, file) {
|
|
36
19
|
if (typeof v !== 'string') {
|
|
37
20
|
throw new Error(`dreamux config error in ${file}: ${key} must be a string (got ${describeType(v)})`);
|
|
@@ -44,7 +27,7 @@ function requireString(obj, key, fallback, file, prefix = '') {
|
|
|
44
27
|
return fallback;
|
|
45
28
|
return ensureString(v, `${prefix}${key}`, file);
|
|
46
29
|
}
|
|
47
|
-
export function
|
|
30
|
+
export function readNonEmptyString(obj, key, file, prefix = '') {
|
|
48
31
|
const value = requireString(obj, key, '', file, prefix);
|
|
49
32
|
if (value.trim() !== '')
|
|
50
33
|
return value;
|
|
@@ -64,7 +47,7 @@ export function readOptionalBoolean(obj, key, fallback, file, prefix = '') {
|
|
|
64
47
|
return v;
|
|
65
48
|
throw new Error(`dreamux config error in ${file}: ${prefix}${key} must be a boolean (got ${describeType(v)})`);
|
|
66
49
|
}
|
|
67
|
-
export function
|
|
50
|
+
export function readStringArray(obj, key, fallback, file, prefix = '') {
|
|
68
51
|
const v = obj[key];
|
|
69
52
|
if (v === undefined)
|
|
70
53
|
return fallback;
|
|
@@ -78,7 +61,7 @@ export function requireStringArray(obj, key, fallback, file, prefix = '') {
|
|
|
78
61
|
return item;
|
|
79
62
|
});
|
|
80
63
|
}
|
|
81
|
-
export function
|
|
64
|
+
export function readStringRecord(obj, key, fallback, file, prefix = '') {
|
|
82
65
|
const v = obj[key];
|
|
83
66
|
if (v === undefined)
|
|
84
67
|
return { ...fallback };
|
|
@@ -102,7 +85,7 @@ function readInt(obj, key, file, prefix) {
|
|
|
102
85
|
return v;
|
|
103
86
|
throw new Error(`dreamux config error in ${file}: ${prefix}${key} must be an integer (got ${describeType(v)})`);
|
|
104
87
|
}
|
|
105
|
-
export function
|
|
88
|
+
export function readPositiveInt(obj, key, fallback, file, prefix = '') {
|
|
106
89
|
const n = readInt(obj, key, file, prefix);
|
|
107
90
|
if (n === null)
|
|
108
91
|
return fallback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-validate.js","sourceRoot":"","sources":["../src/config-validate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config-validate.js","sourceRoot":"","sources":["../src/config-validate.ts"],"names":[],"mappings":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,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAC3D,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,KAAK,MAAM,GAAG,GAAG,4BAA4B,YAAY,CAAC,CAAC,CAAC,GAAG,CAC/F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,GAA4B,EAC5B,GAAW,EACX,QAAgB,EAChB,IAAY,EACZ,MAAM,GAAG,EAAE;IAEX,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,QAAQ,CAAC;IAChC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,KAAK,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,CAC1E,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,SAAkB,EAClB,IAAY,EACZ,IAAY,EACZ,UAAsC,EAAE;IAExC,IAAI,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IACxE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,KAAK,IAAI,2BAA2B,YAAY,CAAC,SAAS,CAAC,GAAG,CAC9F,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading an arbitrary thrown value, which TypeScript types as `unknown` and
|
|
3
|
+
* may not be an `Error` at all. Shared across the host and every provider
|
|
4
|
+
* package instead of each one carrying its own copy.
|
|
5
|
+
*/
|
|
6
|
+
export interface ErrorInfo {
|
|
7
|
+
message: string;
|
|
8
|
+
stack?: string;
|
|
9
|
+
}
|
|
10
|
+
/** The message of an arbitrary thrown value, for wrapping into a typed error. */
|
|
11
|
+
export declare function errorMessage(error: unknown): string;
|
|
12
|
+
export declare function errorInfo(error: unknown): ErrorInfo;
|
|
13
|
+
//# sourceMappingURL=error-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-info.d.ts","sourceRoot":"","sources":["../src/error-info.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAKnD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading an arbitrary thrown value, which TypeScript types as `unknown` and
|
|
3
|
+
* may not be an `Error` at all. Shared across the host and every provider
|
|
4
|
+
* package instead of each one carrying its own copy.
|
|
5
|
+
*/
|
|
6
|
+
/** The message of an arbitrary thrown value, for wrapping into a typed error. */
|
|
7
|
+
export function errorMessage(error) {
|
|
8
|
+
return error instanceof Error ? error.message : String(error);
|
|
9
|
+
}
|
|
10
|
+
export function errorInfo(error) {
|
|
11
|
+
if (!(error instanceof Error))
|
|
12
|
+
return { message: String(error) };
|
|
13
|
+
return error.stack === undefined
|
|
14
|
+
? { message: error.message }
|
|
15
|
+
: { message: error.message, stack: error.stack };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=error-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-info.js","sourceRoot":"","sources":["../src/error-info.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACjE,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS;QAC9B,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;QAC5B,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/fs.d.ts
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Filesystem write helpers shared across Dreamux providers and host.
|
|
3
3
|
*
|
|
4
|
-
* Domain note: these are
|
|
5
|
-
*
|
|
6
|
-
* `@excitedjs/dreamux` — do not add them here.
|
|
4
|
+
* Domain note: these are atomic-write primitives, one per publish semantic
|
|
5
|
+
* (create-only vs. overwrite). Dreamux host-owned path/layout contracts live
|
|
6
|
+
* in `@excitedjs/dreamux` — do not add them here.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Publish a complete file without ever replacing an existing target: write
|
|
10
|
+
* the full contents to a sibling temp file, then `link()` it into place.
|
|
11
|
+
* `link()` either creates the destination name or fails — there is no window
|
|
12
|
+
* where a reader can see a partial file, and no window where two concurrent
|
|
13
|
+
* publishers can both "win". A collision surfaces as `EEXIST`, reported here
|
|
14
|
+
* as `false` rather than thrown, because "someone else already published this
|
|
15
|
+
* path" is the expected outcome of a no-clobber create, not an I/O failure.
|
|
13
16
|
*/
|
|
14
|
-
export declare function
|
|
17
|
+
export declare function publishFileExclusive(path: string, data: string, options?: {
|
|
18
|
+
mode?: number;
|
|
19
|
+
}): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Write a complete file to `path`, replacing whatever is already there: the
|
|
22
|
+
* full contents land in a sibling temp file first, then `rename()` swaps it
|
|
23
|
+
* over the target. A reader never observes a partial write, and a write that
|
|
24
|
+
* fails partway leaves the previous file, if any, untouched. This is the
|
|
25
|
+
* overwrite counterpart to `publishFileExclusive` above — same tmp+publish
|
|
26
|
+
* shape, but `rename()` replaces an existing target instead of `link()`
|
|
27
|
+
* refusing one.
|
|
28
|
+
*/
|
|
29
|
+
export declare function writeFileAtomic(path: string, data: string, options?: {
|
|
30
|
+
mode?: number;
|
|
31
|
+
}): Promise<void>;
|
|
15
32
|
//# sourceMappingURL=fs.d.ts.map
|
package/dist/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsBH;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
package/dist/fs.js
CHANGED
|
@@ -1,50 +1,82 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Filesystem write helpers shared across Dreamux providers and host.
|
|
3
3
|
*
|
|
4
|
-
* Domain note: these are
|
|
5
|
-
*
|
|
6
|
-
* `@excitedjs/dreamux` — do not add them here.
|
|
4
|
+
* Domain note: these are atomic-write primitives, one per publish semantic
|
|
5
|
+
* (create-only vs. overwrite). Dreamux host-owned path/layout contracts live
|
|
6
|
+
* in `@excitedjs/dreamux` — do not add them here.
|
|
7
7
|
*/
|
|
8
8
|
import { randomBytes } from 'node:crypto';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { link, mkdir, rename, rm, writeFile } from 'node:fs/promises';
|
|
10
|
+
import { dirname } from 'node:path';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* Both publish primitives below write to this sibling path with `wx`
|
|
13
|
+
* (create, exclusive) before moving the result into place, so a collision on
|
|
14
|
+
* the random suffix throws instead of one in-flight writer silently
|
|
15
|
+
* clobbering another's temp file.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
function tempSiblingPath(path) {
|
|
18
18
|
const suffix = process.pid.toString(16) +
|
|
19
19
|
'-' +
|
|
20
20
|
Date.now().toString(36) +
|
|
21
21
|
'-' +
|
|
22
22
|
randomBytes(4).toString('hex');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
return `${path}.tmp-${suffix}`;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Publish a complete file without ever replacing an existing target: write
|
|
27
|
+
* the full contents to a sibling temp file, then `link()` it into place.
|
|
28
|
+
* `link()` either creates the destination name or fails — there is no window
|
|
29
|
+
* where a reader can see a partial file, and no window where two concurrent
|
|
30
|
+
* publishers can both "win". A collision surfaces as `EEXIST`, reported here
|
|
31
|
+
* as `false` rather than thrown, because "someone else already published this
|
|
32
|
+
* path" is the expected outcome of a no-clobber create, not an I/O failure.
|
|
33
|
+
*/
|
|
34
|
+
export async function publishFileExclusive(path, data, options = {}) {
|
|
35
|
+
const dir = dirname(path);
|
|
36
|
+
await mkdir(dir, { recursive: true });
|
|
37
|
+
const tmp = tempSiblingPath(path);
|
|
29
38
|
try {
|
|
30
|
-
|
|
31
|
-
await fd.writeFile(data);
|
|
32
|
-
await fd.close();
|
|
33
|
-
fd = null;
|
|
34
|
-
await rename(tmp, final);
|
|
35
|
-
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
if (fd) {
|
|
38
|
-
try {
|
|
39
|
-
await fd.close();
|
|
40
|
-
}
|
|
41
|
-
catch { /* swallow */ }
|
|
42
|
-
}
|
|
39
|
+
await writeFile(tmp, data, { flag: 'wx', mode: options.mode ?? 0o600 });
|
|
43
40
|
try {
|
|
44
|
-
await
|
|
41
|
+
await link(tmp, path);
|
|
42
|
+
return true;
|
|
45
43
|
}
|
|
46
|
-
catch {
|
|
44
|
+
catch (err) {
|
|
45
|
+
if (isEexist(err))
|
|
46
|
+
return false;
|
|
47
|
+
throw err;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
await rm(tmp, { force: true }).catch(() => undefined);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Write a complete file to `path`, replacing whatever is already there: the
|
|
56
|
+
* full contents land in a sibling temp file first, then `rename()` swaps it
|
|
57
|
+
* over the target. A reader never observes a partial write, and a write that
|
|
58
|
+
* fails partway leaves the previous file, if any, untouched. This is the
|
|
59
|
+
* overwrite counterpart to `publishFileExclusive` above — same tmp+publish
|
|
60
|
+
* shape, but `rename()` replaces an existing target instead of `link()`
|
|
61
|
+
* refusing one.
|
|
62
|
+
*/
|
|
63
|
+
export async function writeFileAtomic(path, data, options = {}) {
|
|
64
|
+
const dir = dirname(path);
|
|
65
|
+
await mkdir(dir, { recursive: true });
|
|
66
|
+
const tmp = tempSiblingPath(path);
|
|
67
|
+
try {
|
|
68
|
+
await writeFile(tmp, data, { flag: 'wx', mode: options.mode ?? 0o600 });
|
|
69
|
+
await rename(tmp, path);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
await rm(tmp, { force: true }).catch(() => undefined);
|
|
47
73
|
throw err;
|
|
48
74
|
}
|
|
49
75
|
}
|
|
76
|
+
function isEexist(err) {
|
|
77
|
+
return (typeof err === 'object' &&
|
|
78
|
+
err !== null &&
|
|
79
|
+
'code' in err &&
|
|
80
|
+
err.code === 'EEXIST');
|
|
81
|
+
}
|
|
50
82
|
//# sourceMappingURL=fs.js.map
|
package/dist/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;GAKG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,MAAM,MAAM,GACV,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,GAAG;QACH,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,GAAG;QACH,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,GAAG,IAAI,QAAQ,MAAM,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAA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KAAK,EAAE,CAAC,CAAC;QACxE,MAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACtD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,GAAY;IAC5B,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,MAAM,IAAI,GAAG;QACZ,GAA0B,CAAC,IAAI,KAAK,QAAQ,CAC9C,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
export * from './config-validate.js';
|
|
2
|
+
export * from './json-shape.js';
|
|
3
|
+
export * from './error-info.js';
|
|
2
4
|
export * from './os.js';
|
|
3
5
|
export * from './fs.js';
|
|
4
6
|
export * from './completion-body.js';
|
|
5
7
|
export * from './socket-budget.js';
|
|
6
8
|
export * from './supervised-child.js';
|
|
7
9
|
export * from './activity-scan.js';
|
|
10
|
+
export * from './activity-error.js';
|
|
8
11
|
export * from './unsupported-feature.js';
|
|
9
12
|
export * from './runtime-state-fence.js';
|
|
10
13
|
export * from './json-invoke.js';
|
|
14
|
+
export * from './redaction.js';
|
|
15
|
+
export * from './transactional-store.js';
|
|
11
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
|