hronika 0.0.0-stage → 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JigJoy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,50 @@
1
- # Temporary Holding Version
1
+ # Hronika
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Version control for AI agents. Hronika persists each inference and tool call in a loop, and lets you return that loop to a past checkpoint.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install hronika
9
+ ```
10
+
11
+ Set `HRONIKA_API` to the Hronika API URL. `createHronika()` reads it from the environment.
12
+
13
+ ```bash
14
+ export HRONIKA_API=https://your-hronika-api.example.com
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { createHronika } from "hronika"
21
+
22
+ const hronika = createHronika()
23
+ const { loopId } = await hronika.init()
24
+
25
+ await hronika.save({
26
+ loopId,
27
+ type: "inference_request",
28
+ parameters: {
29
+ model: "gpt-5.4",
30
+ input: "What is the capital of France?",
31
+ },
32
+ })
33
+
34
+ await hronika.save({
35
+ loopId,
36
+ type: "inference_result",
37
+ result: { output_text: "Paris." },
38
+ })
39
+
40
+ const request = await hronika.undo(loopId) // back to the inference request
41
+ const result = await hronika.redo(loopId) // forward to the recorded result
42
+ ```
43
+
44
+ A checkpoint is one of `inference_request`, `tool_call_request`, `inference_result`, or `tool_call_result`. Requests store `parameters`. Results store `result`.
45
+
46
+ Failed requests throw a `HronikaError` with the HTTP `status` and the API's error message.
47
+
48
+ ## License
49
+
50
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ HronikaError: () => HronikaError,
24
+ createHronika: () => createHronika
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+ var HronikaError = class extends Error {
28
+ status;
29
+ constructor(message, status) {
30
+ super(message);
31
+ this.name = "HronikaError";
32
+ this.status = status;
33
+ }
34
+ };
35
+ function createHronika(options = {}) {
36
+ const baseUrl = process.env.HRONIKA_API;
37
+ if (!baseUrl) {
38
+ throw new Error("HRONIKA_API is not set");
39
+ }
40
+ const root = baseUrl.replace(/\/$/, "");
41
+ const fetchImpl = options.fetch ?? fetch;
42
+ async function request(path, init) {
43
+ const response = await fetchImpl(`${root}${path}`, {
44
+ ...init,
45
+ headers: {
46
+ accept: "application/json",
47
+ ...init?.body ? { "content-type": "application/json" } : {}
48
+ }
49
+ });
50
+ const body = await readBody(response);
51
+ if (!response.ok) {
52
+ throw new HronikaError(errorMessage(body, response.statusText), response.status);
53
+ }
54
+ return body;
55
+ }
56
+ return {
57
+ init() {
58
+ return request("/loops", { method: "POST" });
59
+ },
60
+ save(input) {
61
+ const { loopId, ...checkpoint } = input;
62
+ return request(`/loops/${encodeURIComponent(loopId)}/checkpoints`, {
63
+ method: "POST",
64
+ body: JSON.stringify(checkpoint)
65
+ });
66
+ },
67
+ get(input) {
68
+ return request(
69
+ `/loops/${encodeURIComponent(input.loopId)}/checkpoints/${encodeURIComponent(input.checkpointId)}`
70
+ );
71
+ },
72
+ current(loopId) {
73
+ return request(`/loops/${encodeURIComponent(loopId)}/checkpoints/current`);
74
+ },
75
+ undo(loopId) {
76
+ return request(`/loops/${encodeURIComponent(loopId)}/undo`, { method: "POST" });
77
+ },
78
+ redo(loopId) {
79
+ return request(`/loops/${encodeURIComponent(loopId)}/redo`, { method: "POST" });
80
+ }
81
+ };
82
+ }
83
+ async function readBody(response) {
84
+ const text = await response.text();
85
+ if (!text) return null;
86
+ try {
87
+ return JSON.parse(text);
88
+ } catch {
89
+ return null;
90
+ }
91
+ }
92
+ function errorMessage(body, fallback) {
93
+ if (body && typeof body === "object" && "error" in body && typeof body.error === "string") {
94
+ return body.error;
95
+ }
96
+ return fallback;
97
+ }
98
+ // Annotate the CommonJS export names for ESM import in node:
99
+ 0 && (module.exports = {
100
+ HronikaError,
101
+ createHronika
102
+ });
103
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type Instruction =\n\t| {\n\t\t\ttype: \"inference_request\" | \"tool_call_request\"\n\t\t\tparameters: unknown\n\t }\n\t| {\n\t\t\ttype: \"inference_result\" | \"tool_call_result\"\n\t\t\tresult: unknown\n\t }\n\nexport type Checkpoint = Instruction & {\n\tid: string\n\tagentState?: unknown\n\tcreatedAt: string\n}\n\nexport type CheckpointInput = Instruction & {\n\tloopId: string\n\tagentState?: unknown\n}\n\nexport type Loop = {\n\tloopId: string\n}\n\nexport type CreateHronikaOptions = {\n\tfetch?: typeof fetch\n}\n\nexport class HronikaError extends Error {\n\treadonly status: number\n\n\tconstructor(message: string, status: number) {\n\t\tsuper(message)\n\t\tthis.name = \"HronikaError\"\n\t\tthis.status = status\n\t}\n}\n\nexport function createHronika(options: CreateHronikaOptions = {}) {\n\tconst baseUrl = process.env.HRONIKA_API\n\tif (!baseUrl) {\n\t\tthrow new Error(\"HRONIKA_API is not set\")\n\t}\n\n\tconst root = baseUrl.replace(/\\/$/, \"\")\n\tconst fetchImpl = options.fetch ?? fetch\n\n\tasync function request<T>(path: string, init?: RequestInit): Promise<T> {\n\t\tconst response = await fetchImpl(`${root}${path}`, {\n\t\t\t...init,\n\t\t\theaders: {\n\t\t\t\taccept: \"application/json\",\n\t\t\t\t...(init?.body ? { \"content-type\": \"application/json\" } : {}),\n\t\t\t},\n\t\t})\n\n\t\tconst body = await readBody(response)\n\t\tif (!response.ok) {\n\t\t\tthrow new HronikaError(errorMessage(body, response.statusText), response.status)\n\t\t}\n\n\t\treturn body as T\n\t}\n\n\treturn {\n\t\tinit(): Promise<Loop> {\n\t\t\treturn request(\"/loops\", { method: \"POST\" })\n\t\t},\n\n\t\tsave(input: CheckpointInput): Promise<Checkpoint> {\n\t\t\tconst { loopId, ...checkpoint } = input\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/checkpoints`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: JSON.stringify(checkpoint),\n\t\t\t})\n\t\t},\n\n\t\tget(input: { loopId: string; checkpointId: string }): Promise<Checkpoint> {\n\t\t\treturn request(\n\t\t\t\t`/loops/${encodeURIComponent(input.loopId)}/checkpoints/${encodeURIComponent(input.checkpointId)}`,\n\t\t\t)\n\t\t},\n\n\t\tcurrent(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/checkpoints/current`)\n\t\t},\n\n\t\tundo(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/undo`, { method: \"POST\" })\n\t\t},\n\n\t\tredo(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/redo`, { method: \"POST\" })\n\t\t},\n\t}\n}\n\nasync function readBody(response: Response): Promise<unknown> {\n\tconst text = await response.text()\n\tif (!text) return null\n\n\ttry {\n\t\treturn JSON.parse(text)\n\t} catch {\n\t\treturn null\n\t}\n}\n\nfunction errorMessage(body: unknown, fallback: string): string {\n\tif (body && typeof body === \"object\" && \"error\" in body && typeof body.error === \"string\") {\n\t\treturn body.error\n\t}\n\n\treturn fallback\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BO,IAAM,eAAN,cAA2B,MAAM;AAAA,EAC9B;AAAA,EAET,YAAY,SAAiB,QAAgB;AAC5C,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EACf;AACD;AAEO,SAAS,cAAc,UAAgC,CAAC,GAAG;AACjE,QAAM,UAAU,QAAQ,IAAI;AAC5B,MAAI,CAAC,SAAS;AACb,UAAM,IAAI,MAAM,wBAAwB;AAAA,EACzC;AAEA,QAAM,OAAO,QAAQ,QAAQ,OAAO,EAAE;AACtC,QAAM,YAAY,QAAQ,SAAS;AAEnC,iBAAe,QAAW,MAAc,MAAgC;AACvE,UAAM,WAAW,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,IAAI;AAAA,MAClD,GAAG;AAAA,MACH,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,GAAI,MAAM,OAAO,EAAE,gBAAgB,mBAAmB,IAAI,CAAC;AAAA,MAC5D;AAAA,IACD,CAAC;AAED,UAAM,OAAO,MAAM,SAAS,QAAQ;AACpC,QAAI,CAAC,SAAS,IAAI;AACjB,YAAM,IAAI,aAAa,aAAa,MAAM,SAAS,UAAU,GAAG,SAAS,MAAM;AAAA,IAChF;AAEA,WAAO;AAAA,EACR;AAEA,SAAO;AAAA,IACN,OAAsB;AACrB,aAAO,QAAQ,UAAU,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC5C;AAAA,IAEA,KAAK,OAA6C;AACjD,YAAM,EAAE,QAAQ,GAAG,WAAW,IAAI;AAClC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,gBAAgB;AAAA,QAClE,QAAQ;AAAA,QACR,MAAM,KAAK,UAAU,UAAU;AAAA,MAChC,CAAC;AAAA,IACF;AAAA,IAEA,IAAI,OAAsE;AACzE,aAAO;AAAA,QACN,UAAU,mBAAmB,MAAM,MAAM,CAAC,gBAAgB,mBAAmB,MAAM,YAAY,CAAC;AAAA,MACjG;AAAA,IACD;AAAA,IAEA,QAAQ,QAAqC;AAC5C,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,sBAAsB;AAAA,IAC1E;AAAA,IAEA,KAAK,QAAqC;AACzC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,SAAS,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC/E;AAAA,IAEA,KAAK,QAAqC;AACzC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,SAAS,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC/E;AAAA,EACD;AACD;AAEA,eAAe,SAAS,UAAsC;AAC7D,QAAM,OAAO,MAAM,SAAS,KAAK;AACjC,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI;AACH,WAAO,KAAK,MAAM,IAAI;AAAA,EACvB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AAEA,SAAS,aAAa,MAAe,UAA0B;AAC9D,MAAI,QAAQ,OAAO,SAAS,YAAY,WAAW,QAAQ,OAAO,KAAK,UAAU,UAAU;AAC1F,WAAO,KAAK;AAAA,EACb;AAEA,SAAO;AACR;","names":[]}
@@ -0,0 +1,39 @@
1
+ type Instruction = {
2
+ type: "inference_request" | "tool_call_request";
3
+ parameters: unknown;
4
+ } | {
5
+ type: "inference_result" | "tool_call_result";
6
+ result: unknown;
7
+ };
8
+ type Checkpoint = Instruction & {
9
+ id: string;
10
+ agentState?: unknown;
11
+ createdAt: string;
12
+ };
13
+ type CheckpointInput = Instruction & {
14
+ loopId: string;
15
+ agentState?: unknown;
16
+ };
17
+ type Loop = {
18
+ loopId: string;
19
+ };
20
+ type CreateHronikaOptions = {
21
+ fetch?: typeof fetch;
22
+ };
23
+ declare class HronikaError extends Error {
24
+ readonly status: number;
25
+ constructor(message: string, status: number);
26
+ }
27
+ declare function createHronika(options?: CreateHronikaOptions): {
28
+ init(): Promise<Loop>;
29
+ save(input: CheckpointInput): Promise<Checkpoint>;
30
+ get(input: {
31
+ loopId: string;
32
+ checkpointId: string;
33
+ }): Promise<Checkpoint>;
34
+ current(loopId: string): Promise<Checkpoint>;
35
+ undo(loopId: string): Promise<Checkpoint>;
36
+ redo(loopId: string): Promise<Checkpoint>;
37
+ };
38
+
39
+ export { type Checkpoint, type CheckpointInput, type CreateHronikaOptions, HronikaError, type Instruction, type Loop, createHronika };
@@ -0,0 +1,39 @@
1
+ type Instruction = {
2
+ type: "inference_request" | "tool_call_request";
3
+ parameters: unknown;
4
+ } | {
5
+ type: "inference_result" | "tool_call_result";
6
+ result: unknown;
7
+ };
8
+ type Checkpoint = Instruction & {
9
+ id: string;
10
+ agentState?: unknown;
11
+ createdAt: string;
12
+ };
13
+ type CheckpointInput = Instruction & {
14
+ loopId: string;
15
+ agentState?: unknown;
16
+ };
17
+ type Loop = {
18
+ loopId: string;
19
+ };
20
+ type CreateHronikaOptions = {
21
+ fetch?: typeof fetch;
22
+ };
23
+ declare class HronikaError extends Error {
24
+ readonly status: number;
25
+ constructor(message: string, status: number);
26
+ }
27
+ declare function createHronika(options?: CreateHronikaOptions): {
28
+ init(): Promise<Loop>;
29
+ save(input: CheckpointInput): Promise<Checkpoint>;
30
+ get(input: {
31
+ loopId: string;
32
+ checkpointId: string;
33
+ }): Promise<Checkpoint>;
34
+ current(loopId: string): Promise<Checkpoint>;
35
+ undo(loopId: string): Promise<Checkpoint>;
36
+ redo(loopId: string): Promise<Checkpoint>;
37
+ };
38
+
39
+ export { type Checkpoint, type CheckpointInput, type CreateHronikaOptions, HronikaError, type Instruction, type Loop, createHronika };
package/dist/index.js ADDED
@@ -0,0 +1,77 @@
1
+ // src/index.ts
2
+ var HronikaError = class extends Error {
3
+ status;
4
+ constructor(message, status) {
5
+ super(message);
6
+ this.name = "HronikaError";
7
+ this.status = status;
8
+ }
9
+ };
10
+ function createHronika(options = {}) {
11
+ const baseUrl = process.env.HRONIKA_API;
12
+ if (!baseUrl) {
13
+ throw new Error("HRONIKA_API is not set");
14
+ }
15
+ const root = baseUrl.replace(/\/$/, "");
16
+ const fetchImpl = options.fetch ?? fetch;
17
+ async function request(path, init) {
18
+ const response = await fetchImpl(`${root}${path}`, {
19
+ ...init,
20
+ headers: {
21
+ accept: "application/json",
22
+ ...init?.body ? { "content-type": "application/json" } : {}
23
+ }
24
+ });
25
+ const body = await readBody(response);
26
+ if (!response.ok) {
27
+ throw new HronikaError(errorMessage(body, response.statusText), response.status);
28
+ }
29
+ return body;
30
+ }
31
+ return {
32
+ init() {
33
+ return request("/loops", { method: "POST" });
34
+ },
35
+ save(input) {
36
+ const { loopId, ...checkpoint } = input;
37
+ return request(`/loops/${encodeURIComponent(loopId)}/checkpoints`, {
38
+ method: "POST",
39
+ body: JSON.stringify(checkpoint)
40
+ });
41
+ },
42
+ get(input) {
43
+ return request(
44
+ `/loops/${encodeURIComponent(input.loopId)}/checkpoints/${encodeURIComponent(input.checkpointId)}`
45
+ );
46
+ },
47
+ current(loopId) {
48
+ return request(`/loops/${encodeURIComponent(loopId)}/checkpoints/current`);
49
+ },
50
+ undo(loopId) {
51
+ return request(`/loops/${encodeURIComponent(loopId)}/undo`, { method: "POST" });
52
+ },
53
+ redo(loopId) {
54
+ return request(`/loops/${encodeURIComponent(loopId)}/redo`, { method: "POST" });
55
+ }
56
+ };
57
+ }
58
+ async function readBody(response) {
59
+ const text = await response.text();
60
+ if (!text) return null;
61
+ try {
62
+ return JSON.parse(text);
63
+ } catch {
64
+ return null;
65
+ }
66
+ }
67
+ function errorMessage(body, fallback) {
68
+ if (body && typeof body === "object" && "error" in body && typeof body.error === "string") {
69
+ return body.error;
70
+ }
71
+ return fallback;
72
+ }
73
+ export {
74
+ HronikaError,
75
+ createHronika
76
+ };
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type Instruction =\n\t| {\n\t\t\ttype: \"inference_request\" | \"tool_call_request\"\n\t\t\tparameters: unknown\n\t }\n\t| {\n\t\t\ttype: \"inference_result\" | \"tool_call_result\"\n\t\t\tresult: unknown\n\t }\n\nexport type Checkpoint = Instruction & {\n\tid: string\n\tagentState?: unknown\n\tcreatedAt: string\n}\n\nexport type CheckpointInput = Instruction & {\n\tloopId: string\n\tagentState?: unknown\n}\n\nexport type Loop = {\n\tloopId: string\n}\n\nexport type CreateHronikaOptions = {\n\tfetch?: typeof fetch\n}\n\nexport class HronikaError extends Error {\n\treadonly status: number\n\n\tconstructor(message: string, status: number) {\n\t\tsuper(message)\n\t\tthis.name = \"HronikaError\"\n\t\tthis.status = status\n\t}\n}\n\nexport function createHronika(options: CreateHronikaOptions = {}) {\n\tconst baseUrl = process.env.HRONIKA_API\n\tif (!baseUrl) {\n\t\tthrow new Error(\"HRONIKA_API is not set\")\n\t}\n\n\tconst root = baseUrl.replace(/\\/$/, \"\")\n\tconst fetchImpl = options.fetch ?? fetch\n\n\tasync function request<T>(path: string, init?: RequestInit): Promise<T> {\n\t\tconst response = await fetchImpl(`${root}${path}`, {\n\t\t\t...init,\n\t\t\theaders: {\n\t\t\t\taccept: \"application/json\",\n\t\t\t\t...(init?.body ? { \"content-type\": \"application/json\" } : {}),\n\t\t\t},\n\t\t})\n\n\t\tconst body = await readBody(response)\n\t\tif (!response.ok) {\n\t\t\tthrow new HronikaError(errorMessage(body, response.statusText), response.status)\n\t\t}\n\n\t\treturn body as T\n\t}\n\n\treturn {\n\t\tinit(): Promise<Loop> {\n\t\t\treturn request(\"/loops\", { method: \"POST\" })\n\t\t},\n\n\t\tsave(input: CheckpointInput): Promise<Checkpoint> {\n\t\t\tconst { loopId, ...checkpoint } = input\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/checkpoints`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: JSON.stringify(checkpoint),\n\t\t\t})\n\t\t},\n\n\t\tget(input: { loopId: string; checkpointId: string }): Promise<Checkpoint> {\n\t\t\treturn request(\n\t\t\t\t`/loops/${encodeURIComponent(input.loopId)}/checkpoints/${encodeURIComponent(input.checkpointId)}`,\n\t\t\t)\n\t\t},\n\n\t\tcurrent(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/checkpoints/current`)\n\t\t},\n\n\t\tundo(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/undo`, { method: \"POST\" })\n\t\t},\n\n\t\tredo(loopId: string): Promise<Checkpoint> {\n\t\t\treturn request(`/loops/${encodeURIComponent(loopId)}/redo`, { method: \"POST\" })\n\t\t},\n\t}\n}\n\nasync function readBody(response: Response): Promise<unknown> {\n\tconst text = await response.text()\n\tif (!text) return null\n\n\ttry {\n\t\treturn JSON.parse(text)\n\t} catch {\n\t\treturn null\n\t}\n}\n\nfunction errorMessage(body: unknown, fallback: string): string {\n\tif (body && typeof body === \"object\" && \"error\" in body && typeof body.error === \"string\") {\n\t\treturn body.error\n\t}\n\n\treturn fallback\n}\n"],"mappings":";AA6BO,IAAM,eAAN,cAA2B,MAAM;AAAA,EAC9B;AAAA,EAET,YAAY,SAAiB,QAAgB;AAC5C,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EACf;AACD;AAEO,SAAS,cAAc,UAAgC,CAAC,GAAG;AACjE,QAAM,UAAU,QAAQ,IAAI;AAC5B,MAAI,CAAC,SAAS;AACb,UAAM,IAAI,MAAM,wBAAwB;AAAA,EACzC;AAEA,QAAM,OAAO,QAAQ,QAAQ,OAAO,EAAE;AACtC,QAAM,YAAY,QAAQ,SAAS;AAEnC,iBAAe,QAAW,MAAc,MAAgC;AACvE,UAAM,WAAW,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,IAAI;AAAA,MAClD,GAAG;AAAA,MACH,SAAS;AAAA,QACR,QAAQ;AAAA,QACR,GAAI,MAAM,OAAO,EAAE,gBAAgB,mBAAmB,IAAI,CAAC;AAAA,MAC5D;AAAA,IACD,CAAC;AAED,UAAM,OAAO,MAAM,SAAS,QAAQ;AACpC,QAAI,CAAC,SAAS,IAAI;AACjB,YAAM,IAAI,aAAa,aAAa,MAAM,SAAS,UAAU,GAAG,SAAS,MAAM;AAAA,IAChF;AAEA,WAAO;AAAA,EACR;AAEA,SAAO;AAAA,IACN,OAAsB;AACrB,aAAO,QAAQ,UAAU,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC5C;AAAA,IAEA,KAAK,OAA6C;AACjD,YAAM,EAAE,QAAQ,GAAG,WAAW,IAAI;AAClC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,gBAAgB;AAAA,QAClE,QAAQ;AAAA,QACR,MAAM,KAAK,UAAU,UAAU;AAAA,MAChC,CAAC;AAAA,IACF;AAAA,IAEA,IAAI,OAAsE;AACzE,aAAO;AAAA,QACN,UAAU,mBAAmB,MAAM,MAAM,CAAC,gBAAgB,mBAAmB,MAAM,YAAY,CAAC;AAAA,MACjG;AAAA,IACD;AAAA,IAEA,QAAQ,QAAqC;AAC5C,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,sBAAsB;AAAA,IAC1E;AAAA,IAEA,KAAK,QAAqC;AACzC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,SAAS,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC/E;AAAA,IAEA,KAAK,QAAqC;AACzC,aAAO,QAAQ,UAAU,mBAAmB,MAAM,CAAC,SAAS,EAAE,QAAQ,OAAO,CAAC;AAAA,IAC/E;AAAA,EACD;AACD;AAEA,eAAe,SAAS,UAAsC;AAC7D,QAAM,OAAO,MAAM,SAAS,KAAK;AACjC,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI;AACH,WAAO,KAAK,MAAM,IAAI;AAAA,EACvB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AAEA,SAAS,aAAa,MAAe,UAA0B;AAC9D,MAAI,QAAQ,OAAO,SAAS,YAAY,WAAW,QAAQ,OAAO,KAAK,UAAU,UAAU;AAC1F,WAAO,KAAK;AAAA,EACb;AAEA,SAAO;AACR;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
- "name": "hronika",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "hronika",
3
+ "version": "0.1.0",
4
+ "description": "Version control for AI agents.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/jigjoy-ai/hronika.git"
8
+ },
9
+ "homepage": "https://github.com/jigjoy-ai/hronika#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/jigjoy-ai/hronika/issues"
12
+ },
13
+ "type": "module",
14
+ "main": "./dist/index.cjs",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "import": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
22
+ },
23
+ "require": {
24
+ "types": "./dist/index.d.cts",
25
+ "default": "./dist/index.cjs"
26
+ }
27
+ }
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "dev": "tsup --watch",
35
+ "prepublishOnly": "npm run build"
36
+ },
37
+ "engines": {
38
+ "node": ">=18"
39
+ },
40
+ "license": "MIT",
41
+ "devDependencies": {
42
+ "@types/node": "^26.6.11",
43
+ "tsup": "^8.5.1",
44
+ "typescript": "^5.9.3"
45
+ }
46
+ }