@kennra/app-sdk 0.0.0 → 0.2.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 +21 -0
- package/README.md +50 -2
- package/dist/addresses.d.ts +12 -0
- package/dist/addresses.js +105 -0
- package/dist/admin-links.d.ts +17 -0
- package/dist/admin-links.js +22 -0
- package/dist/app.d.ts +190 -0
- package/dist/app.js +448 -0
- package/dist/capture-backfill.d.ts +95 -0
- package/dist/capture-backfill.js +198 -0
- package/dist/capture.d.ts +110 -0
- package/dist/capture.js +321 -0
- package/dist/client.d.ts +172 -0
- package/dist/client.js +300 -0
- package/dist/hosting.d.ts +56 -0
- package/dist/hosting.js +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -0
- package/dist/manifest.d.ts +618 -0
- package/dist/manifest.js +1094 -0
- package/dist/operations.d.ts +8 -0
- package/dist/operations.js +9 -0
- package/dist/protocol.d.ts +1105 -0
- package/dist/protocol.js +5 -0
- package/dist/signature.d.ts +69 -0
- package/dist/signature.js +108 -0
- package/dist/testing.d.ts +80 -0
- package/dist/testing.js +226 -0
- package/package.json +81 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persisted operation hashes (docs/23 §3.1). The hash is SHA-256 (hex) over the operation file
|
|
3
|
+
* without its `# @area …` lines: areas are catalog metadata, added after hashes were in use, so
|
|
4
|
+
* adding or changing an area never changes a hash. Everything else, `# @purpose` included,
|
|
5
|
+
* counts byte for byte. No dependencies: the API, the admin UI, the MCP server and apps share it.
|
|
6
|
+
*/
|
|
7
|
+
/** The text a persisted operation's hash is computed over. */
|
|
8
|
+
export declare const operationHashInput: (document: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persisted operation hashes (docs/23 §3.1). The hash is SHA-256 (hex) over the operation file
|
|
3
|
+
* without its `# @area …` lines: areas are catalog metadata, added after hashes were in use, so
|
|
4
|
+
* adding or changing an area never changes a hash. Everything else, `# @purpose` included,
|
|
5
|
+
* counts byte for byte. No dependencies: the API, the admin UI, the MCP server and apps share it.
|
|
6
|
+
*/
|
|
7
|
+
const AREA_LINE = /^#[ \t]*@area\b[^\n]*(?:\n|$)/gm;
|
|
8
|
+
/** The text a persisted operation's hash is computed over. */
|
|
9
|
+
export const operationHashInput = (document) => document.replace(AREA_LINE, '');
|