@alwith/module-store 0.1.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/LICENSE +94 -0
- package/README.md +20 -0
- package/THIRD_PARTY_NOTICES.md +17 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
ALwith Developer and Redistribution License, Version 1.0
|
|
2
|
+
Copyright 2026 ALWITHAI PTE. LTD. All rights reserved, except as expressly granted below.
|
|
3
|
+
|
|
4
|
+
1. Scope
|
|
5
|
+
This license applies only to ALWITHAI PTE. LTD.'s ("ALwith") own material in
|
|
6
|
+
the npm package accompanying this license (the "Software"). It is a proprietary
|
|
7
|
+
license, not an open-source license. Third-party material is governed by its
|
|
8
|
+
respective licenses, as described in THIRD_PARTY_NOTICES.md. No restriction here
|
|
9
|
+
reduces rights granted by those licenses or by mandatory applicable law.
|
|
10
|
+
|
|
11
|
+
2. Permission to develop and distribute applications
|
|
12
|
+
Subject to this license, ALwith grants you a worldwide, non-exclusive, royalty-free
|
|
13
|
+
copyright license to use, reproduce, integrate and modify the supplied Software
|
|
14
|
+
to develop, test, host and operate your own applications, including WorkBuddy
|
|
15
|
+
applications, for personal, internal business or commercial use. You may brand,
|
|
16
|
+
sell and distribute those applications, including the Software embedded in them,
|
|
17
|
+
to your customers and end users. No per-application registration, approval or
|
|
18
|
+
royalty is required by this software license.
|
|
19
|
+
|
|
20
|
+
You may bundle, minify, transform and otherwise adapt the supplied JavaScript,
|
|
21
|
+
styles and declarations for those applications. You may include the supplied
|
|
22
|
+
Software in an application source distribution when necessary to build or use
|
|
23
|
+
that application, provided it remains separately identified under this license.
|
|
24
|
+
You may combine it with separately licensed application code, including MPL-2.0
|
|
25
|
+
code, while complying with both licenses. Your own independent code remains yours;
|
|
26
|
+
this license does not require disclosure of your application source code.
|
|
27
|
+
|
|
28
|
+
Recipients may use the embedded Software to run the application and exercise the
|
|
29
|
+
permissions above under this same license. You may allow your contractors and
|
|
30
|
+
hosting providers to use it for those purposes. You must supply this license and
|
|
31
|
+
all applicable third-party notices with each redistribution (for example in an
|
|
32
|
+
included licenses directory or an accessible legal-notices page), identify your
|
|
33
|
+
modifications, and not impose terms that purport to change ALwith's license.
|
|
34
|
+
|
|
35
|
+
3. Rights reserved
|
|
36
|
+
No right to ALwith's unpublished source code, private repositories, trademarks,
|
|
37
|
+
or separately distributed Runtime binaries, modules or services is granted here.
|
|
38
|
+
You may not relicense the Software as your own framework or redistribute it as
|
|
39
|
+
a standalone SDK/package for others, except for private development/build caches
|
|
40
|
+
used for applications permitted by Section 2. No restriction is imposed on
|
|
41
|
+
independently developed competing applications or on third-party licensed code.
|
|
42
|
+
You must not misrepresent authorship or imply ALwith endorses your application.
|
|
43
|
+
|
|
44
|
+
4. Accounts and services
|
|
45
|
+
This license does not supply platform credentials, paid entitlements, hosting,
|
|
46
|
+
support, updates or a service-availability guarantee. Use of ALwith accounts,
|
|
47
|
+
pets, relay or other hosted services is separately subject to the applicable
|
|
48
|
+
service terms and authorization. Do not bypass service access controls or use
|
|
49
|
+
another person's credentials without authorization. Choosing or replacing an
|
|
50
|
+
authentication provider for your own application is not prohibited by this
|
|
51
|
+
software license. Distributing an Auth client does not authorize its recipients
|
|
52
|
+
to access another user's account, data or entitlements.
|
|
53
|
+
|
|
54
|
+
5. Lawful use and independent responsibility
|
|
55
|
+
You must not use the Software to commit or knowingly facilitate unlawful acts.
|
|
56
|
+
You are responsible for your application's operation, permissions, business
|
|
57
|
+
practices, data processing, content and compliance with applicable law. You must
|
|
58
|
+
not make warranties or commitments on ALwith's behalf. ALwith does not endorse
|
|
59
|
+
your application merely because it uses the Software or connects to ALwith.
|
|
60
|
+
These allocations do not remove either party's own mandatory legal obligations.
|
|
61
|
+
|
|
62
|
+
6. Disclaimer and limitation of liability
|
|
63
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED
|
|
64
|
+
"AS IS" AND "AS AVAILABLE", WITHOUT EXPRESS OR IMPLIED WARRANTIES, INCLUDING
|
|
65
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ACCURACY,
|
|
66
|
+
SECURITY OR UNINTERRUPTED OPERATION. AI OUTPUTS AND AUTOMATED ACTIONS MAY BE
|
|
67
|
+
INCORRECT OR HARMFUL; YOU MUST DETERMINE APPROPRIATE REVIEW AND SAFEGUARDS.
|
|
68
|
+
|
|
69
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, ALWITH AND ITS CONTRIBUTORS
|
|
70
|
+
ARE NOT LIABLE FOR DAMAGES ARISING FROM USE, MODIFICATION OR DISTRIBUTION OF
|
|
71
|
+
THE SOFTWARE, INCLUDING LOST PROFITS, LOST DATA, BUSINESS INTERRUPTION AND
|
|
72
|
+
INDIRECT OR CONSEQUENTIAL LOSS. NOTHING EXCLUDES OR LIMITS LIABILITY THAT
|
|
73
|
+
CANNOT LAWFULLY BE EXCLUDED OR LIMITED, INCLUDING APPLICABLE MANDATORY CONSUMER
|
|
74
|
+
RIGHTS AND LIABILITY FOR FRAUD, WILLFUL MISCONDUCT OR GROSS NEGLIGENCE WHERE
|
|
75
|
+
SUCH EXCLUSION OR LIMITATION IS PROHIBITED. THIS LICENSE DOES NOT EXCLUDE
|
|
76
|
+
CRIMINAL OR REGULATORY RESPONSIBILITY IMPOSED BY LAW.
|
|
77
|
+
|
|
78
|
+
7. Duration and termination
|
|
79
|
+
The grant for this version continues while you comply with this license. If
|
|
80
|
+
ALwith gives written notice of a material breach, your rights terminate if you
|
|
81
|
+
do not cure it within 30 days; no cure period authorizes continuing unlawful
|
|
82
|
+
conduct. On termination, cease new use and distribution of ALwith's proprietary
|
|
83
|
+
Software except as required by law. Independently compliant recipients retain
|
|
84
|
+
their own grants. Sections concerning reserved rights, notices, disclaimers and
|
|
85
|
+
mandatory-law exceptions survive as applicable. Third-party licenses are not
|
|
86
|
+
terminated by this provision.
|
|
87
|
+
|
|
88
|
+
8. Versions and severability
|
|
89
|
+
This license governs the accompanying version. A later license or publication
|
|
90
|
+
of source code does not retroactively replace this grant or revoke rights in
|
|
91
|
+
earlier lawfully obtained versions. Any additional open-source license must be
|
|
92
|
+
expressly identified by ALwith. If a provision is unenforceable, the remaining
|
|
93
|
+
provisions continue to the extent permitted by law. A separate written agreement
|
|
94
|
+
signed by you and ALwith may expressly override these terms for its stated scope.
|
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @alwith/module-store
|
|
2
|
+
|
|
3
|
+
TypeScript side of alwith-store, distributed under the accompanying proprietary license.
|
|
4
|
+
createStoreClient binds Desktop's existing named-store API to a supplied StorePort.
|
|
5
|
+
The app selects its connection and persistence backend; this package never opens a
|
|
6
|
+
Runtime or chooses data directories. Each client owns its own store-handle cache.
|
|
7
|
+
|
|
8
|
+
The port is storage-only: no QA, editor or Desktop business types. Existing change
|
|
9
|
+
events identify store/key, not scope; that transport limitation is unchanged.
|
|
10
|
+
No user data or preferences are migrated by this extraction.
|
|
11
|
+
|
|
12
|
+
## License and redistribution
|
|
13
|
+
|
|
14
|
+
See [LICENSE](LICENSE) and [third-party notices](THIRD_PARTY_NOTICES.md).
|
|
15
|
+
ALwith-owned code is proprietary, not open source. You may build, customize, host,
|
|
16
|
+
charge for and distribute your own WorkBuddy applications under the included
|
|
17
|
+
license, without per-application registration. This does not grant hosted-service
|
|
18
|
+
access or rights to separately distributed Rust libraries or Runtime binaries.
|
|
19
|
+
The npm artifact includes compiled/minified JS, declarations and necessary assets,
|
|
20
|
+
not the private TS/TSX implementation or source maps. Minification is not encryption.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Third-party notices — @alwith/module-store
|
|
2
|
+
|
|
3
|
+
ALwith's proprietary license applies only to its own material. Third-party
|
|
4
|
+
material retains its original license and rights; the package license does not
|
|
5
|
+
replace or restrict those rights. Preserve applicable notices when redistributing.
|
|
6
|
+
|
|
7
|
+
## External direct dependencies and peers
|
|
8
|
+
|
|
9
|
+
These are external imports, not bundled dependency implementations in this npm
|
|
10
|
+
artifact. Versions below record the local release-preparation inventory; declared
|
|
11
|
+
ranges can resolve to different versions. Keep the notices from the versions
|
|
12
|
+
actually distributed by your application, including transitive dependencies.
|
|
13
|
+
|
|
14
|
+
| Package | Inspected version | License | Included license copy |
|
|
15
|
+
| --- | --- | --- | --- |
|
|
16
|
+
|
|
17
|
+
No external direct runtime dependencies or peers are declared in this package.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface AlwithStore {
|
|
2
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
3
|
+
set(key: string, value: unknown): Promise<void>;
|
|
4
|
+
has(key: string): Promise<boolean>;
|
|
5
|
+
delete(key: string): Promise<void>;
|
|
6
|
+
keys(): Promise<string[]>;
|
|
7
|
+
values<T>(): Promise<T[]>;
|
|
8
|
+
entries<T>(): Promise<[key: string, value: T][]>;
|
|
9
|
+
clear(): Promise<void>;
|
|
10
|
+
reload(): Promise<void>;
|
|
11
|
+
length(): Promise<number>;
|
|
12
|
+
onKeyChange<T>(key: string, listener: (value: T | undefined) => void): Promise<() => void>;
|
|
13
|
+
onChange<T>(listener: (key: string, value: T | undefined) => void): Promise<() => void>;
|
|
14
|
+
}
|
|
15
|
+
export type StoreScope = "data" | "cache";
|
|
16
|
+
export interface StorePort {
|
|
17
|
+
storeEntries(scope: StoreScope, store: string): Promise<Record<string, unknown>>;
|
|
18
|
+
storeSet(scope: StoreScope, store: string, key: string, value: unknown): Promise<void>;
|
|
19
|
+
storeDelete(scope: StoreScope, store: string, key: string): Promise<void>;
|
|
20
|
+
storeClear(scope: StoreScope, store: string): Promise<void>;
|
|
21
|
+
storeReload(scope: StoreScope, store: string): Promise<void>;
|
|
22
|
+
onStoreChanged(handler: (change: {
|
|
23
|
+
store: string;
|
|
24
|
+
key: string;
|
|
25
|
+
value: unknown;
|
|
26
|
+
}) => void): Promise<() => void>;
|
|
27
|
+
}
|
|
28
|
+
export declare function createStoreClient(createHostPort: () => StorePort): {
|
|
29
|
+
openStore: (name: string, scope?: StoreScope) => AlwithStore;
|
|
30
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(s){class i{scope;name;constructor(e,t){this.scope=e,this.name=t}entriesObject(){return s().storeEntries(this.scope,this.name)}async get(e){return(await this.entriesObject())[e]}async set(e,t){await s().storeSet(this.scope,this.name,e,t)}async has(e){return Object.hasOwn(await this.entriesObject(),e)}async delete(e){await s().storeDelete(this.scope,this.name,e)}async keys(){return Object.keys(await this.entriesObject())}async values(){return Object.values(await this.entriesObject())}async clear(){await s().storeClear(this.scope,this.name)}async reload(){await s().storeReload(this.scope,this.name)}async entries(){return Object.entries(await this.entriesObject())}async length(){return Object.keys(await this.entriesObject()).length}onKeyChange(e,t){return this.onChange((n,a)=>{if(n===e)t(a)})}onChange(e){return s().onStoreChanged((t)=>{if(t.store===this.name)e(t.key,t.value)})}}let r=new Map;function h(e,t="data"){let n=`${t}:${e}`,a=r.get(n);if(a)return a;let c=new i(t,e);return r.set(n,c),c}return{openStore:h}}export{o as createStoreClient};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alwith/module-store",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"THIRD_PARTY_NOTICES.md",
|
|
18
|
+
"licenses"
|
|
19
|
+
],
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"typescript": "^7.0.2"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "bun test src",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"build": "bun ../../../scripts/build-npm.ts",
|
|
27
|
+
"prepack": "bun run build"
|
|
28
|
+
},
|
|
29
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"registry": "https://registry.npmjs.org/"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/ALwith-ai/alwith-modules.git",
|
|
37
|
+
"directory": "crates/store/guest-js"
|
|
38
|
+
}
|
|
39
|
+
}
|