@slopus/happy-agent-client 0.0.85 → 0.0.87
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 +48 -1
- package/dist/HappyAgentClient.d.ts +14 -0
- package/dist/HappyAgentClient.d.ts.map +1 -1
- package/dist/HappyAgentClient.js +52 -3
- package/dist/HappyAgentClient.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol/bootstrap.d.ts +10 -0
- package/dist/protocol/bootstrap.d.ts.map +1 -1
- package/dist/protocol/bootstrap.js +6 -0
- package/dist/protocol/bootstrap.js.map +1 -1
- package/dist/protocol/common.d.ts +17 -3
- package/dist/protocol/common.d.ts.map +1 -1
- package/dist/protocol/common.js +13 -3
- package/dist/protocol/common.js.map +1 -1
- package/dist/protocol/events.d.ts +15 -1
- package/dist/protocol/events.d.ts.map +1 -1
- package/dist/protocol/events.js +9 -0
- package/dist/protocol/events.js.map +1 -1
- package/dist/protocol/messages.d.ts +107 -1
- package/dist/protocol/messages.d.ts.map +1 -1
- package/dist/protocol/messages.js +48 -1
- package/dist/protocol/messages.js.map +1 -1
- package/dist/protocol/slashCommands.d.ts +8 -3
- package/dist/protocol/slashCommands.d.ts.map +1 -1
- package/dist/protocol/userSettings.d.ts +99 -0
- package/dist/protocol/userSettings.d.ts.map +1 -0
- package/dist/protocol/userSettings.js +72 -0
- package/dist/protocol/userSettings.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slashCommands.d.ts","sourceRoot":"","sources":["../../sources/protocol/slashCommands.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,KAAK,EAAE,KA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,kDAAkD;;EAKpD,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB;;;;QAR3B,kDAAkD;;;;IAgBlD,mDAAmD;;EAMrD,CAAC;AAEH,mEAAmE;AACnE,eAAO,MAAM,yBAAyB;;;;QAzBlC,kDAAkD;;;;IAgBlD,mDAAmD;;GAWrD,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAI1C,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACvE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC7D,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAEvF,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAChC,aAAa,EAAE,YAAY,EAAE,CAAC;CACjC;AAED,sDAAsD;AACtD,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB,EAAE,mBAAmB;IACxF,KAAK,EAAE,KAAK,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,YAAY,CAAC;IACtB,sEAAsE;IACtE,MAAM,EAAE,WAAW,CAAC;CACvB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User settings: one person's opaque key-value preferences, kept on the daemon so they follow that
|
|
3
|
+
* person from device to device. The daemon checks only the shape and size of keys and values.
|
|
4
|
+
*/
|
|
5
|
+
import { type Static } from "@sinclair/typebox";
|
|
6
|
+
export declare const MAX_USER_SETTING_KEY_LENGTH = 128;
|
|
7
|
+
/** A value's limit as compact UTF-8 JSON. */
|
|
8
|
+
export declare const MAX_USER_SETTING_VALUE_BYTES = 65536;
|
|
9
|
+
/** How deeply a value's arrays and objects may nest. */
|
|
10
|
+
export declare const MAX_USER_SETTING_VALUE_DEPTH = 32;
|
|
11
|
+
/** Keys holding a value, per person. */
|
|
12
|
+
export declare const MAX_USER_SETTING_KEYS = 1000;
|
|
13
|
+
/** Keys and their compact JSON values together, per person, counted in UTF-8. */
|
|
14
|
+
export declare const MAX_USER_SETTING_TOTAL_BYTES = 1048576;
|
|
15
|
+
/** The most recent clears the daemon keeps per person; older ones become a stale-write horizon. */
|
|
16
|
+
export declare const MAX_USER_SETTING_RETAINED_CLEARS = 1000;
|
|
17
|
+
/** Letters, digits, `.`, `_`, and `-`, starting with a letter or digit; never percent-encoded. */
|
|
18
|
+
export declare const userSettingKeySchema: import("@sinclair/typebox").TString;
|
|
19
|
+
export type UserSettingKey = Static<typeof userSettingKeySchema>;
|
|
20
|
+
/** Any JSON value; `null` means the key holds no value. */
|
|
21
|
+
export declare const userSettingValueSchema: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
22
|
+
export type UserSettingValue = Static<typeof userSettingValueSchema>;
|
|
23
|
+
/** A key the daemon holds an entry for: a value, or a retained clear with `value: null`. */
|
|
24
|
+
export declare const storedUserSettingSchema: import("@sinclair/typebox").TObject<{
|
|
25
|
+
key: import("@sinclair/typebox").TString;
|
|
26
|
+
value: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
27
|
+
/** The last applied change's time, which last-write-wins compares. */
|
|
28
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
29
|
+
/** Minted when that change applied; greater than every earlier version of this person's. */
|
|
30
|
+
version: import("@sinclair/typebox").TString;
|
|
31
|
+
}>;
|
|
32
|
+
export type StoredUserSetting = Static<typeof storedUserSettingSchema>;
|
|
33
|
+
/** A key the daemon holds nothing for: never written, or its clear was forgotten. */
|
|
34
|
+
export declare const unsetUserSettingSchema: import("@sinclair/typebox").TObject<{
|
|
35
|
+
key: import("@sinclair/typebox").TString;
|
|
36
|
+
value: import("@sinclair/typebox").TNull;
|
|
37
|
+
updatedAt: import("@sinclair/typebox").TNull;
|
|
38
|
+
version: import("@sinclair/typebox").TNull;
|
|
39
|
+
}>;
|
|
40
|
+
export type UnsetUserSetting = Static<typeof unsetUserSettingSchema>;
|
|
41
|
+
/** The setting object. */
|
|
42
|
+
export declare const userSettingSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
43
|
+
key: import("@sinclair/typebox").TString;
|
|
44
|
+
value: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
45
|
+
/** The last applied change's time, which last-write-wins compares. */
|
|
46
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
47
|
+
/** Minted when that change applied; greater than every earlier version of this person's. */
|
|
48
|
+
version: import("@sinclair/typebox").TString;
|
|
49
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
50
|
+
key: import("@sinclair/typebox").TString;
|
|
51
|
+
value: import("@sinclair/typebox").TNull;
|
|
52
|
+
updatedAt: import("@sinclair/typebox").TNull;
|
|
53
|
+
version: import("@sinclair/typebox").TNull;
|
|
54
|
+
}>]>;
|
|
55
|
+
export type UserSetting = Static<typeof userSettingSchema>;
|
|
56
|
+
/** `GET /v0/user-settings` — every held key in ascending key order, clears included. */
|
|
57
|
+
export declare const userSettingsResponseSchema: import("@sinclair/typebox").TObject<{
|
|
58
|
+
/** Captured before the settings were read; follow events after it. */
|
|
59
|
+
cursor: import("@sinclair/typebox").TString;
|
|
60
|
+
settings: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
61
|
+
key: import("@sinclair/typebox").TString;
|
|
62
|
+
value: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
63
|
+
/** The last applied change's time, which last-write-wins compares. */
|
|
64
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
65
|
+
/** Minted when that change applied; greater than every earlier version of this person's. */
|
|
66
|
+
version: import("@sinclair/typebox").TString;
|
|
67
|
+
}>>;
|
|
68
|
+
}>;
|
|
69
|
+
export type UserSettingsResponse = Static<typeof userSettingsResponseSchema>;
|
|
70
|
+
/** `GET` and `PUT /v0/user-settings/:key` — the authoritative entry. */
|
|
71
|
+
export declare const userSettingResponseSchema: import("@sinclair/typebox").TObject<{
|
|
72
|
+
setting: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
73
|
+
key: import("@sinclair/typebox").TString;
|
|
74
|
+
value: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
75
|
+
/** The last applied change's time, which last-write-wins compares. */
|
|
76
|
+
updatedAt: import("@sinclair/typebox").TInteger;
|
|
77
|
+
/** Minted when that change applied; greater than every earlier version of this person's. */
|
|
78
|
+
version: import("@sinclair/typebox").TString;
|
|
79
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
80
|
+
key: import("@sinclair/typebox").TString;
|
|
81
|
+
value: import("@sinclair/typebox").TNull;
|
|
82
|
+
updatedAt: import("@sinclair/typebox").TNull;
|
|
83
|
+
version: import("@sinclair/typebox").TNull;
|
|
84
|
+
}>]>;
|
|
85
|
+
}>;
|
|
86
|
+
export type UserSettingResponse = Static<typeof userSettingResponseSchema>;
|
|
87
|
+
/** `PUT /v0/user-settings/:key` */
|
|
88
|
+
export declare const saveUserSettingRequestSchema: import("@sinclair/typebox").TObject<{
|
|
89
|
+
mutationId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
90
|
+
/** The JSON value to store, or `null` to clear the key. */
|
|
91
|
+
value: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
|
|
92
|
+
/**
|
|
93
|
+
* When the person made this change. A write older than the stored entry is ignored; a time
|
|
94
|
+
* ahead of the daemon's clock counts as its current time. Omitted, the write always applies.
|
|
95
|
+
*/
|
|
96
|
+
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
97
|
+
}>;
|
|
98
|
+
export type SaveUserSettingRequest = Static<typeof saveUserSettingRequestSchema>;
|
|
99
|
+
//# sourceMappingURL=userSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userSettings.d.ts","sourceRoot":"","sources":["../../sources/protocol/userSettings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAItD,eAA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B;;;;QA7BlC,sEAAsE;;QAEtE,4FAA4F;;;;;;;;EA2BZ,CAAC;AACrF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE3E,mCAAmC;AACnC,eAAO,MAAM,4BAA4B;;IAErC,2DAA2D;;IAE3D;;;OAGG;;EAEL,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User settings: one person's opaque key-value preferences, kept on the daemon so they follow that
|
|
3
|
+
* person from device to device. The daemon checks only the shape and size of keys and values.
|
|
4
|
+
*/
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
import { eventCursorSchema, mutationIdSchema, resourceVersionSchema } from "./common.js";
|
|
7
|
+
export const MAX_USER_SETTING_KEY_LENGTH = 128;
|
|
8
|
+
/** A value's limit as compact UTF-8 JSON. */
|
|
9
|
+
export const MAX_USER_SETTING_VALUE_BYTES = 65_536;
|
|
10
|
+
/** How deeply a value's arrays and objects may nest. */
|
|
11
|
+
export const MAX_USER_SETTING_VALUE_DEPTH = 32;
|
|
12
|
+
/** Keys holding a value, per person. */
|
|
13
|
+
export const MAX_USER_SETTING_KEYS = 1_000;
|
|
14
|
+
/** Keys and their compact JSON values together, per person, counted in UTF-8. */
|
|
15
|
+
export const MAX_USER_SETTING_TOTAL_BYTES = 1_048_576;
|
|
16
|
+
/** The most recent clears the daemon keeps per person; older ones become a stale-write horizon. */
|
|
17
|
+
export const MAX_USER_SETTING_RETAINED_CLEARS = 1_000;
|
|
18
|
+
/** Letters, digits, `.`, `_`, and `-`, starting with a letter or digit; never percent-encoded. */
|
|
19
|
+
export const userSettingKeySchema = Type.String({
|
|
20
|
+
maxLength: MAX_USER_SETTING_KEY_LENGTH,
|
|
21
|
+
minLength: 1,
|
|
22
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._-]*$",
|
|
23
|
+
});
|
|
24
|
+
/** Any JSON value; `null` means the key holds no value. */
|
|
25
|
+
export const userSettingValueSchema = Type.Recursive((value) => Type.Union([
|
|
26
|
+
Type.String(),
|
|
27
|
+
Type.Number(),
|
|
28
|
+
Type.Boolean(),
|
|
29
|
+
Type.Null(),
|
|
30
|
+
Type.Array(value),
|
|
31
|
+
Type.Record(Type.String(), value),
|
|
32
|
+
]));
|
|
33
|
+
/** Epoch milliseconds a write may carry for last-write-wins. */
|
|
34
|
+
const userSettingTimestampSchema = Type.Integer({ maximum: Number.MAX_SAFE_INTEGER, minimum: 0 });
|
|
35
|
+
/** A key the daemon holds an entry for: a value, or a retained clear with `value: null`. */
|
|
36
|
+
export const storedUserSettingSchema = Type.Object({
|
|
37
|
+
key: userSettingKeySchema,
|
|
38
|
+
value: userSettingValueSchema,
|
|
39
|
+
/** The last applied change's time, which last-write-wins compares. */
|
|
40
|
+
updatedAt: userSettingTimestampSchema,
|
|
41
|
+
/** Minted when that change applied; greater than every earlier version of this person's. */
|
|
42
|
+
version: resourceVersionSchema,
|
|
43
|
+
});
|
|
44
|
+
/** A key the daemon holds nothing for: never written, or its clear was forgotten. */
|
|
45
|
+
export const unsetUserSettingSchema = Type.Object({
|
|
46
|
+
key: userSettingKeySchema,
|
|
47
|
+
value: Type.Null(),
|
|
48
|
+
updatedAt: Type.Null(),
|
|
49
|
+
version: Type.Null(),
|
|
50
|
+
});
|
|
51
|
+
/** The setting object. */
|
|
52
|
+
export const userSettingSchema = Type.Union([storedUserSettingSchema, unsetUserSettingSchema]);
|
|
53
|
+
/** `GET /v0/user-settings` — every held key in ascending key order, clears included. */
|
|
54
|
+
export const userSettingsResponseSchema = Type.Object({
|
|
55
|
+
/** Captured before the settings were read; follow events after it. */
|
|
56
|
+
cursor: eventCursorSchema,
|
|
57
|
+
settings: Type.Array(storedUserSettingSchema),
|
|
58
|
+
});
|
|
59
|
+
/** `GET` and `PUT /v0/user-settings/:key` — the authoritative entry. */
|
|
60
|
+
export const userSettingResponseSchema = Type.Object({ setting: userSettingSchema });
|
|
61
|
+
/** `PUT /v0/user-settings/:key` */
|
|
62
|
+
export const saveUserSettingRequestSchema = Type.Object({
|
|
63
|
+
mutationId: Type.Optional(mutationIdSchema),
|
|
64
|
+
/** The JSON value to store, or `null` to clear the key. */
|
|
65
|
+
value: userSettingValueSchema,
|
|
66
|
+
/**
|
|
67
|
+
* When the person made this change. A write older than the stored entry is ignored; a time
|
|
68
|
+
* ahead of the daemon's clock counts as its current time. Omitted, the write always applies.
|
|
69
|
+
*/
|
|
70
|
+
updatedAt: Type.Optional(userSettingTimestampSchema),
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=userSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userSettings.js","sourceRoot":"","sources":["../../sources/protocol/userSettings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AACnD,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAC/C,wCAAwC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAC3C,iFAAiF;AACjF,MAAM,CAAC,MAAM,4BAA4B,GAAG,SAAS,CAAC;AACtD,mGAAmG;AACnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,CAAC;AAEtD,kGAAkG;AAClG,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,8BA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