@pellux/goodvibes-errors 1.1.0 → 1.3.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.
|
@@ -17,6 +17,23 @@ export declare const DaemonErrorCategory: {
|
|
|
17
17
|
readonly UNKNOWN: "unknown";
|
|
18
18
|
};
|
|
19
19
|
export type DaemonErrorSource = 'provider' | 'tool' | 'transport' | 'config' | 'permission' | 'runtime' | 'render' | 'acp' | 'unknown';
|
|
20
|
+
/**
|
|
21
|
+
* The `code` a memory route sets on a 404 whose body means "the addressed RECORD
|
|
22
|
+
* does not exist" — the route ran, the store simply had no such id. This is the
|
|
23
|
+
* ONE 404 disposition a memory wire consumer may fold to `null` ("no such
|
|
24
|
+
* record").
|
|
25
|
+
*
|
|
26
|
+
* It exists to be distinguishable from a route-not-found 404: an older daemon
|
|
27
|
+
* that never registered an extended memory route answers the terminal 404 with
|
|
28
|
+
* `code: 'NOT_FOUND'` (see the daemon HTTP router's final fallthrough), NOT this
|
|
29
|
+
* code. That difference is the runtime signal the memory-spine wire discriminator
|
|
30
|
+
* keys on — a `MEMORY_RECORD_NOT_FOUND` 404 is a genuine record-miss (→ null),
|
|
31
|
+
* while ANY other 404 (route-not-found, or a bare legacy 404 with no code) means
|
|
32
|
+
* "this daemon does not serve this verb" and must reject honestly, never silently
|
|
33
|
+
* null. Emitted by daemon-sdk's memory record handlers; consumed by the
|
|
34
|
+
* memory-spine wire discriminator.
|
|
35
|
+
*/
|
|
36
|
+
export declare const MEMORY_RECORD_NOT_FOUND_CODE = "MEMORY_RECORD_NOT_FOUND";
|
|
20
37
|
export interface StructuredDaemonErrorBody {
|
|
21
38
|
readonly error: string;
|
|
22
39
|
readonly hint?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-error-contract.d.ts","sourceRoot":"","sources":["../src/daemon-error-contract.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,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,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C"}
|
|
@@ -15,3 +15,20 @@ export const DaemonErrorCategory = {
|
|
|
15
15
|
INTERNAL: 'internal',
|
|
16
16
|
UNKNOWN: 'unknown',
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* The `code` a memory route sets on a 404 whose body means "the addressed RECORD
|
|
20
|
+
* does not exist" — the route ran, the store simply had no such id. This is the
|
|
21
|
+
* ONE 404 disposition a memory wire consumer may fold to `null` ("no such
|
|
22
|
+
* record").
|
|
23
|
+
*
|
|
24
|
+
* It exists to be distinguishable from a route-not-found 404: an older daemon
|
|
25
|
+
* that never registered an extended memory route answers the terminal 404 with
|
|
26
|
+
* `code: 'NOT_FOUND'` (see the daemon HTTP router's final fallthrough), NOT this
|
|
27
|
+
* code. That difference is the runtime signal the memory-spine wire discriminator
|
|
28
|
+
* keys on — a `MEMORY_RECORD_NOT_FOUND` 404 is a genuine record-miss (→ null),
|
|
29
|
+
* while ANY other 404 (route-not-found, or a bare legacy 404 with no code) means
|
|
30
|
+
* "this daemon does not serve this verb" and must reject honestly, never silently
|
|
31
|
+
* null. Emitted by daemon-sdk's memory record handlers; consumed by the
|
|
32
|
+
* memory-spine wire discriminator.
|
|
33
|
+
*/
|
|
34
|
+
export const MEMORY_RECORD_NOT_FOUND_CODE = 'MEMORY_RECORD_NOT_FOUND';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DaemonErrorCategory, DaemonErrorSource, StructuredDaemonErrorBody } from './daemon-error-contract.js';
|
|
2
2
|
import { SDKErrorCodes, isErrorCode, isKnownErrorCode, type SDKErrorCode } from './error-codes.js';
|
|
3
3
|
export type { DaemonErrorSource, StructuredDaemonErrorBody, } from './daemon-error-contract.js';
|
|
4
|
-
export { DaemonErrorCategory } from './daemon-error-contract.js';
|
|
4
|
+
export { DaemonErrorCategory, MEMORY_RECORD_NOT_FOUND_CODE } from './daemon-error-contract.js';
|
|
5
5
|
export { SDKErrorCodes, isErrorCode, isKnownErrorCode, type SDKErrorCode };
|
|
6
6
|
/**
|
|
7
7
|
* `'contract'` is an SDK-internal category used when the daemon returns
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEnG,YAAY,EACV,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEnG,YAAY,EACV,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,MAAM,a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8CjB"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDKErrorCodes, isErrorCode, isKnownErrorCode } from './error-codes.js';
|
|
2
|
-
export { DaemonErrorCategory } from './daemon-error-contract.js';
|
|
2
|
+
export { DaemonErrorCategory, MEMORY_RECORD_NOT_FOUND_CODE } from './daemon-error-contract.js';
|
|
3
3
|
// Re-exported unchanged from error-codes.ts (split out to stay under the file's
|
|
4
4
|
// 800-line cap — see that file's header comment).
|
|
5
5
|
export { SDKErrorCodes, isErrorCode, isKnownErrorCode };
|