@treeseed/sdk 0.1.1
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 +565 -0
- package/dist/cli-tools.js +44 -0
- package/dist/content-store.js +237 -0
- package/dist/d1-store.js +549 -0
- package/dist/frontmatter.js +33 -0
- package/dist/git-runtime.js +67 -0
- package/dist/index.js +12 -0
- package/dist/model-registry.js +164 -0
- package/dist/runtime.js +36 -0
- package/dist/scripts/.ts-run-1775616845195-odh4xzphk3l.js +22 -0
- package/dist/scripts/.ts-run-1775616848931-9386s6kwrl.js +126 -0
- package/dist/scripts/assert-release-tag-version.d.ts +1 -0
- package/dist/scripts/assert-release-tag-version.js +23 -0
- package/dist/scripts/build-dist.d.ts +1 -0
- package/dist/scripts/build-dist.js +114 -0
- package/dist/scripts/package-tools.d.ts +15 -0
- package/dist/scripts/package-tools.js +76 -0
- package/dist/scripts/publish-package.d.ts +1 -0
- package/dist/scripts/publish-package.js +20 -0
- package/dist/scripts/release-verify.d.ts +1 -0
- package/dist/scripts/release-verify.js +49 -0
- package/dist/scripts/run-ts.js +45 -0
- package/dist/scripts/test-smoke.d.ts +1 -0
- package/dist/scripts/test-smoke.js +77 -0
- package/dist/sdk-filters.js +77 -0
- package/dist/sdk-types.js +24 -0
- package/dist/sdk.js +232 -0
- package/dist/src/cli-tools.d.ts +3 -0
- package/dist/src/content-store.d.ts +24 -0
- package/dist/src/d1-store.d.ts +108 -0
- package/dist/src/frontmatter.d.ts +6 -0
- package/dist/src/git-runtime.d.ts +16 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/model-registry.d.ts +4 -0
- package/dist/src/runtime.d.ts +1 -0
- package/dist/src/sdk-filters.d.ts +4 -0
- package/dist/src/sdk-types.d.ts +285 -0
- package/dist/src/sdk.d.ts +109 -0
- package/dist/src/stores/cursor-store.d.ts +10 -0
- package/dist/src/stores/envelopes.d.ts +116 -0
- package/dist/src/stores/helpers.d.ts +12 -0
- package/dist/src/stores/lease-store.d.ts +18 -0
- package/dist/src/stores/message-store.d.ts +12 -0
- package/dist/src/stores/run-store.d.ts +10 -0
- package/dist/src/stores/subscription-store.d.ts +9 -0
- package/dist/src/types/agents.d.ts +100 -0
- package/dist/src/types/cloudflare.d.ts +32 -0
- package/dist/src/wrangler-d1.d.ts +25 -0
- package/dist/stores/cursor-store.js +158 -0
- package/dist/stores/envelopes.js +219 -0
- package/dist/stores/helpers.js +42 -0
- package/dist/stores/lease-store.js +183 -0
- package/dist/stores/message-store.js +249 -0
- package/dist/stores/run-store.js +166 -0
- package/dist/stores/subscription-store.js +171 -0
- package/dist/test/test-fixture.d.ts +1 -0
- package/dist/test/utils/envelopes.test.d.ts +1 -0
- package/dist/test/utils/sdk.test.d.ts +1 -0
- package/dist/types/agents.js +40 -0
- package/dist/types/cloudflare.js +0 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/wrangler-d1.js +84 -0
- package/package.json +130 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { SqliteStoreBase, toSqlValue } from "./helpers.js";
|
|
2
|
+
import { createSubscriptionEnvelope, subscriptionEntityFromEnvelope, TRESEED_ENVELOPE_SCHEMA_VERSION } from "./envelopes.js";
|
|
3
|
+
function subscriptionFromRow(row) {
|
|
4
|
+
return {
|
|
5
|
+
id: row.id !== void 0 ? Number(row.id) : void 0,
|
|
6
|
+
email: String(row.email ?? ""),
|
|
7
|
+
name: row.name !== void 0 && row.name !== null ? String(row.name) : null,
|
|
8
|
+
status: String(row.status ?? "active"),
|
|
9
|
+
source: row.source !== void 0 && row.source !== null ? String(row.source) : void 0,
|
|
10
|
+
consent_at: row.consent_at !== void 0 && row.consent_at !== null ? String(row.consent_at) : void 0,
|
|
11
|
+
created_at: row.created_at !== void 0 && row.created_at !== null ? String(row.created_at) : void 0,
|
|
12
|
+
updated_at: row.updated_at !== void 0 && row.updated_at !== null ? String(row.updated_at) : void 0,
|
|
13
|
+
ip_hash: row.ip_hash !== void 0 && row.ip_hash !== null ? String(row.ip_hash) : void 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function buildFilterSql(filters = []) {
|
|
17
|
+
return filters?.length ? `WHERE ${filters.map((filter) => {
|
|
18
|
+
switch (filter.op) {
|
|
19
|
+
case "eq":
|
|
20
|
+
return `${filter.field} = ${toSqlValue(filter.value)}`;
|
|
21
|
+
case "in":
|
|
22
|
+
return `${filter.field} IN (${(Array.isArray(filter.value) ? filter.value : [filter.value]).map(toSqlValue).join(", ")})`;
|
|
23
|
+
case "updated_since":
|
|
24
|
+
return `${filter.field} >= ${toSqlValue(filter.value)}`;
|
|
25
|
+
default:
|
|
26
|
+
return `${filter.field} LIKE ${toSqlValue(`%${String(filter.value ?? "")}%`)}`;
|
|
27
|
+
}
|
|
28
|
+
}).join(" AND ")}` : "";
|
|
29
|
+
}
|
|
30
|
+
class SubscriptionStore extends SqliteStoreBase {
|
|
31
|
+
async usesEnvelopeTable() {
|
|
32
|
+
return this.tableExists("runtime_records");
|
|
33
|
+
}
|
|
34
|
+
async getByKey(key) {
|
|
35
|
+
if (await this.usesEnvelopeTable()) {
|
|
36
|
+
const row2 = await this.selectFirst(
|
|
37
|
+
`SELECT * FROM runtime_records WHERE record_type = 'subscription' AND (record_key = ${toSqlValue(key)} OR lookup_key = ${toSqlValue(key)} OR id = ${toSqlValue(key)}) LIMIT 1`
|
|
38
|
+
);
|
|
39
|
+
if (row2) {
|
|
40
|
+
return subscriptionEntityFromEnvelope(row2);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const field = key.includes("@") ? "email" : "id";
|
|
44
|
+
const row = await this.selectFirst(`SELECT * FROM subscriptions WHERE ${field} = ${toSqlValue(key)} LIMIT 1`);
|
|
45
|
+
return row ? subscriptionFromRow(row) : null;
|
|
46
|
+
}
|
|
47
|
+
async search(request) {
|
|
48
|
+
if (await this.usesEnvelopeTable()) {
|
|
49
|
+
const sql2 = [
|
|
50
|
+
"SELECT * FROM runtime_records WHERE record_type = 'subscription'",
|
|
51
|
+
buildEnvelopeFilterSql(request.filters),
|
|
52
|
+
request.sort?.length ? `ORDER BY ${request.sort.map((entry) => `${subscriptionSortColumn(entry.field)} ${entry.direction === "asc" ? "ASC" : "DESC"}`).join(", ")}` : "ORDER BY updated_at DESC",
|
|
53
|
+
request.limit ? `LIMIT ${request.limit}` : ""
|
|
54
|
+
].filter(Boolean).join(" ");
|
|
55
|
+
const rows2 = await this.selectAll(sql2);
|
|
56
|
+
return rows2.map(subscriptionEntityFromEnvelope);
|
|
57
|
+
}
|
|
58
|
+
const sql = [
|
|
59
|
+
"SELECT * FROM subscriptions",
|
|
60
|
+
buildFilterSql(request.filters),
|
|
61
|
+
request.sort?.length ? `ORDER BY ${request.sort.map((entry) => `${entry.field} ${entry.direction === "asc" ? "ASC" : "DESC"}`).join(", ")}` : "",
|
|
62
|
+
request.limit ? `LIMIT ${request.limit}` : ""
|
|
63
|
+
].filter(Boolean).join(" ");
|
|
64
|
+
const rows = await this.selectAll(sql);
|
|
65
|
+
return rows.map(subscriptionFromRow);
|
|
66
|
+
}
|
|
67
|
+
async create(request) {
|
|
68
|
+
const data = request.data;
|
|
69
|
+
if (await this.usesEnvelopeTable()) {
|
|
70
|
+
const envelope = createSubscriptionEnvelope({
|
|
71
|
+
email: String(data.email ?? ""),
|
|
72
|
+
name: data.name !== void 0 && data.name !== null ? String(data.name) : null,
|
|
73
|
+
status: typeof data.status === "string" ? data.status : "active",
|
|
74
|
+
source: typeof data.source === "string" ? data.source : "sdk",
|
|
75
|
+
consentAt: typeof data.consent_at === "string" ? data.consent_at : (/* @__PURE__ */ new Date()).toISOString(),
|
|
76
|
+
ipHash: typeof data.ip_hash === "string" ? data.ip_hash : ""
|
|
77
|
+
});
|
|
78
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
79
|
+
await this.execute(
|
|
80
|
+
`INSERT INTO runtime_records (record_type, record_key, lookup_key, status, schema_version, created_at, updated_at, payload_json, meta_json) VALUES ('subscription', ${toSqlValue(envelope.payload.email)}, ${toSqlValue(envelope.payload.email)}, ${toSqlValue(envelope.status)}, ${TRESEED_ENVELOPE_SCHEMA_VERSION}, ${toSqlValue(now)}, ${toSqlValue(now)}, ${toSqlValue(JSON.stringify(envelope.payload))}, ${toSqlValue(JSON.stringify(envelope.meta))})`
|
|
81
|
+
);
|
|
82
|
+
return this.getByKey(envelope.payload.email);
|
|
83
|
+
}
|
|
84
|
+
await this.execute(
|
|
85
|
+
`INSERT INTO subscriptions (email, name, status, source, consent_at, created_at, updated_at, ip_hash) VALUES (${toSqlValue(data.email)}, ${toSqlValue(data.name ?? null)}, ${toSqlValue(data.status ?? "active")}, ${toSqlValue(data.source ?? "sdk")}, ${toSqlValue(data.consent_at ?? (/* @__PURE__ */ new Date()).toISOString())}, ${toSqlValue(data.created_at ?? (/* @__PURE__ */ new Date()).toISOString())}, ${toSqlValue(data.updated_at ?? (/* @__PURE__ */ new Date()).toISOString())}, ${toSqlValue(data.ip_hash ?? "")})`
|
|
86
|
+
);
|
|
87
|
+
return this.getByKey(String(data.email));
|
|
88
|
+
}
|
|
89
|
+
async update(request) {
|
|
90
|
+
const key = String(request.id ?? request.key ?? request.data.email ?? "");
|
|
91
|
+
const existing = await this.getByKey(key);
|
|
92
|
+
if (!existing) {
|
|
93
|
+
throw new Error(`No subscription found for "${key}".`);
|
|
94
|
+
}
|
|
95
|
+
const next = {
|
|
96
|
+
...existing,
|
|
97
|
+
...request.data,
|
|
98
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
99
|
+
};
|
|
100
|
+
if (await this.usesEnvelopeTable()) {
|
|
101
|
+
const envelope = createSubscriptionEnvelope({
|
|
102
|
+
email: existing.email,
|
|
103
|
+
name: next.name ?? null,
|
|
104
|
+
status: String(next.status ?? "active"),
|
|
105
|
+
source: typeof next.source === "string" ? next.source : "sdk",
|
|
106
|
+
consentAt: typeof next.consent_at === "string" ? next.consent_at : null,
|
|
107
|
+
ipHash: typeof next.ip_hash === "string" ? next.ip_hash : "",
|
|
108
|
+
meta: { legacyId: existing.id }
|
|
109
|
+
});
|
|
110
|
+
await this.execute(
|
|
111
|
+
`UPDATE runtime_records SET status = ${toSqlValue(envelope.status)}, updated_at = ${toSqlValue(String(next.updated_at))}, payload_json = ${toSqlValue(JSON.stringify(envelope.payload))}, meta_json = ${toSqlValue(JSON.stringify(envelope.meta))} WHERE record_type = 'subscription' AND record_key = ${toSqlValue(existing.email)}`
|
|
112
|
+
);
|
|
113
|
+
return this.getByKey(existing.email);
|
|
114
|
+
}
|
|
115
|
+
await this.execute(
|
|
116
|
+
`UPDATE subscriptions SET name = ${toSqlValue(next.name ?? null)}, status = ${toSqlValue(next.status)}, source = ${toSqlValue(next.source ?? "sdk")}, consent_at = ${toSqlValue(next.consent_at ?? null)}, updated_at = ${toSqlValue(next.updated_at ?? (/* @__PURE__ */ new Date()).toISOString())}, ip_hash = ${toSqlValue(next.ip_hash ?? "")} WHERE email = ${toSqlValue(existing.email)}`
|
|
117
|
+
);
|
|
118
|
+
return this.getByKey(existing.email);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function buildEnvelopeFilterSql(filters = []) {
|
|
122
|
+
if (!filters?.length) return "";
|
|
123
|
+
const clauses = filters.map((filter) => {
|
|
124
|
+
const field = subscriptionFilterColumn(filter.field);
|
|
125
|
+
switch (filter.op) {
|
|
126
|
+
case "eq":
|
|
127
|
+
return `${field} = ${toSqlValue(filter.value)}`;
|
|
128
|
+
case "in":
|
|
129
|
+
return `${field} IN (${(Array.isArray(filter.value) ? filter.value : [filter.value]).map(toSqlValue).join(", ")})`;
|
|
130
|
+
case "updated_since":
|
|
131
|
+
return `updated_at >= ${toSqlValue(filter.value)}`;
|
|
132
|
+
default:
|
|
133
|
+
return `${field} LIKE ${toSqlValue(`%${String(filter.value ?? "")}%`)}`;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
return clauses.length > 0 ? `AND ${clauses.join(" AND ")}` : "";
|
|
137
|
+
}
|
|
138
|
+
function subscriptionFilterColumn(field) {
|
|
139
|
+
switch (field) {
|
|
140
|
+
case "email":
|
|
141
|
+
return "lookup_key";
|
|
142
|
+
case "status":
|
|
143
|
+
return "status";
|
|
144
|
+
case "updated_at":
|
|
145
|
+
case "updatedAt":
|
|
146
|
+
return "updated_at";
|
|
147
|
+
case "created_at":
|
|
148
|
+
case "createdAt":
|
|
149
|
+
return "created_at";
|
|
150
|
+
default:
|
|
151
|
+
return `json_extract(payload_json, '$.${field}')`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function subscriptionSortColumn(field) {
|
|
155
|
+
switch (field) {
|
|
156
|
+
case "email":
|
|
157
|
+
return "lookup_key";
|
|
158
|
+
case "status":
|
|
159
|
+
return "status";
|
|
160
|
+
case "created_at":
|
|
161
|
+
case "createdAt":
|
|
162
|
+
return "created_at";
|
|
163
|
+
case "updated_at":
|
|
164
|
+
case "updatedAt":
|
|
165
|
+
default:
|
|
166
|
+
return "updated_at";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export {
|
|
170
|
+
SubscriptionStore
|
|
171
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sdkFixtureRoot: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const AGENT_TRIGGER_KINDS = ["schedule", "message", "follow", "startup"];
|
|
2
|
+
const AGENT_PERMISSION_OPERATIONS = [
|
|
3
|
+
"get",
|
|
4
|
+
"read",
|
|
5
|
+
"search",
|
|
6
|
+
"follow",
|
|
7
|
+
"pick",
|
|
8
|
+
"create",
|
|
9
|
+
"update"
|
|
10
|
+
];
|
|
11
|
+
const AGENT_MESSAGE_STATUSES = [
|
|
12
|
+
"pending",
|
|
13
|
+
"claimed",
|
|
14
|
+
"completed",
|
|
15
|
+
"failed",
|
|
16
|
+
"dead_letter"
|
|
17
|
+
];
|
|
18
|
+
const AGENT_RUN_STATUSES = ["running", "completed", "failed", "waiting"];
|
|
19
|
+
const AGENT_HANDLER_KINDS = [
|
|
20
|
+
"planner",
|
|
21
|
+
"architect",
|
|
22
|
+
"engineer",
|
|
23
|
+
"notifier",
|
|
24
|
+
"researcher",
|
|
25
|
+
"reviewer",
|
|
26
|
+
"releaser"
|
|
27
|
+
];
|
|
28
|
+
const AGENT_CLI_ALLOW_TOOLS = [
|
|
29
|
+
"shell(git)",
|
|
30
|
+
"shell(npm)",
|
|
31
|
+
"web"
|
|
32
|
+
];
|
|
33
|
+
export {
|
|
34
|
+
AGENT_CLI_ALLOW_TOOLS,
|
|
35
|
+
AGENT_HANDLER_KINDS,
|
|
36
|
+
AGENT_MESSAGE_STATUSES,
|
|
37
|
+
AGENT_PERMISSION_OPERATIONS,
|
|
38
|
+
AGENT_RUN_STATUSES,
|
|
39
|
+
AGENT_TRIGGER_KINDS
|
|
40
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
const execFileAsync = promisify(execFile);
|
|
4
|
+
function toSqlValue(value) {
|
|
5
|
+
if (value === null || value === void 0) {
|
|
6
|
+
return "NULL";
|
|
7
|
+
}
|
|
8
|
+
if (typeof value === "number") {
|
|
9
|
+
return String(value);
|
|
10
|
+
}
|
|
11
|
+
if (typeof value === "boolean") {
|
|
12
|
+
return value ? "1" : "0";
|
|
13
|
+
}
|
|
14
|
+
return `'${String(value).replace(/'/g, "''")}'`;
|
|
15
|
+
}
|
|
16
|
+
function interpolateBindings(query, values) {
|
|
17
|
+
let result = query;
|
|
18
|
+
for (const value of values) {
|
|
19
|
+
result = result.replace(/\?/, toSqlValue(value));
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
class WranglerD1PreparedStatement {
|
|
24
|
+
constructor(databaseName, cwd, persistTo, query = "") {
|
|
25
|
+
this.databaseName = databaseName;
|
|
26
|
+
this.cwd = cwd;
|
|
27
|
+
this.persistTo = persistTo;
|
|
28
|
+
this.query = query;
|
|
29
|
+
}
|
|
30
|
+
databaseName;
|
|
31
|
+
cwd;
|
|
32
|
+
persistTo;
|
|
33
|
+
query;
|
|
34
|
+
bindings = [];
|
|
35
|
+
bind(...values) {
|
|
36
|
+
this.bindings = values;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
async execute() {
|
|
40
|
+
const args = ["d1", "execute", this.databaseName, "--json", "--command", interpolateBindings(this.query, this.bindings)];
|
|
41
|
+
if (this.persistTo) {
|
|
42
|
+
args.splice(3, 0, "--local", "--persist-to", this.persistTo);
|
|
43
|
+
}
|
|
44
|
+
const { stdout } = await execFileAsync("wrangler", args, {
|
|
45
|
+
cwd: this.cwd,
|
|
46
|
+
env: process.env
|
|
47
|
+
});
|
|
48
|
+
const parsed = JSON.parse(stdout);
|
|
49
|
+
return Array.isArray(parsed) ? parsed : [parsed];
|
|
50
|
+
}
|
|
51
|
+
async run() {
|
|
52
|
+
return this.execute();
|
|
53
|
+
}
|
|
54
|
+
async all() {
|
|
55
|
+
const results = await this.execute();
|
|
56
|
+
return {
|
|
57
|
+
results: results.flatMap((entry) => entry.results ?? [])
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async first() {
|
|
61
|
+
const { results } = await this.all();
|
|
62
|
+
return results[0] ?? null;
|
|
63
|
+
}
|
|
64
|
+
async raw() {
|
|
65
|
+
const { results } = await this.all();
|
|
66
|
+
return results.map((entry) => Object.values(entry));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class WranglerD1Database {
|
|
70
|
+
constructor(databaseName, cwd, persistTo) {
|
|
71
|
+
this.databaseName = databaseName;
|
|
72
|
+
this.cwd = cwd;
|
|
73
|
+
this.persistTo = persistTo;
|
|
74
|
+
}
|
|
75
|
+
databaseName;
|
|
76
|
+
cwd;
|
|
77
|
+
persistTo;
|
|
78
|
+
prepare(query) {
|
|
79
|
+
return new WranglerD1PreparedStatement(this.databaseName, this.cwd, this.persistTo, query);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
WranglerD1Database
|
|
84
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@treeseed/sdk",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Shared Treeseed SDK for content-backed and D1-backed object models.",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/treeseed-ai/sdk.git",
|
|
9
|
+
"directory": "."
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://treeseed.ai",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/treeseed-ai/sdk/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=20"
|
|
18
|
+
},
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"README.md",
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"setup": "npm install",
|
|
29
|
+
"setup:ci": "npm ci",
|
|
30
|
+
"build": "npm run build:dist",
|
|
31
|
+
"build:dist": "node ./scripts/run-ts.mjs ./scripts/build-dist.ts",
|
|
32
|
+
"prepare": "npm run build:dist",
|
|
33
|
+
"prepack": "npm run build:dist",
|
|
34
|
+
"test": "npm run test:unit",
|
|
35
|
+
"test:unit": "vitest run --config ./vitest.config.ts",
|
|
36
|
+
"test:smoke": "node ./scripts/run-ts.mjs ./scripts/test-smoke.ts",
|
|
37
|
+
"verify": "npm run release:verify",
|
|
38
|
+
"release:setup": "npm run setup:ci",
|
|
39
|
+
"release:check-tag": "node ./scripts/run-ts.mjs ./scripts/assert-release-tag-version.ts",
|
|
40
|
+
"release:verify": "node ./scripts/run-ts.mjs ./scripts/release-verify.ts",
|
|
41
|
+
"release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"esbuild": "^0.28.0",
|
|
45
|
+
"typescript": "^5.9.3",
|
|
46
|
+
"yaml": "^2.8.1"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^24.6.0",
|
|
50
|
+
"vitest": "^4.1.2"
|
|
51
|
+
},
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"types": "./dist/index.d.ts",
|
|
55
|
+
"default": "./dist/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./sdk": {
|
|
58
|
+
"types": "./dist/sdk.d.ts",
|
|
59
|
+
"default": "./dist/sdk.js"
|
|
60
|
+
},
|
|
61
|
+
"./content-store": {
|
|
62
|
+
"types": "./dist/content-store.d.ts",
|
|
63
|
+
"default": "./dist/content-store.js"
|
|
64
|
+
},
|
|
65
|
+
"./d1-store": {
|
|
66
|
+
"types": "./dist/d1-store.d.ts",
|
|
67
|
+
"default": "./dist/d1-store.js"
|
|
68
|
+
},
|
|
69
|
+
"./frontmatter": {
|
|
70
|
+
"types": "./dist/frontmatter.d.ts",
|
|
71
|
+
"default": "./dist/frontmatter.js"
|
|
72
|
+
},
|
|
73
|
+
"./git-runtime": {
|
|
74
|
+
"types": "./dist/git-runtime.d.ts",
|
|
75
|
+
"default": "./dist/git-runtime.js"
|
|
76
|
+
},
|
|
77
|
+
"./models": {
|
|
78
|
+
"types": "./dist/model-registry.d.ts",
|
|
79
|
+
"default": "./dist/model-registry.js"
|
|
80
|
+
},
|
|
81
|
+
"./sdk-filters": {
|
|
82
|
+
"types": "./dist/sdk-filters.d.ts",
|
|
83
|
+
"default": "./dist/sdk-filters.js"
|
|
84
|
+
},
|
|
85
|
+
"./cli-tools": {
|
|
86
|
+
"types": "./dist/cli-tools.d.ts",
|
|
87
|
+
"default": "./dist/cli-tools.js"
|
|
88
|
+
},
|
|
89
|
+
"./types": {
|
|
90
|
+
"types": "./dist/sdk-types.d.ts",
|
|
91
|
+
"default": "./dist/sdk-types.js"
|
|
92
|
+
},
|
|
93
|
+
"./types/agents": {
|
|
94
|
+
"types": "./dist/types/agents.d.ts",
|
|
95
|
+
"default": "./dist/types/agents.js"
|
|
96
|
+
},
|
|
97
|
+
"./types/cloudflare": {
|
|
98
|
+
"types": "./dist/types/cloudflare.d.ts",
|
|
99
|
+
"default": "./dist/types/cloudflare.js"
|
|
100
|
+
},
|
|
101
|
+
"./wrangler-d1": {
|
|
102
|
+
"types": "./dist/wrangler-d1.d.ts",
|
|
103
|
+
"default": "./dist/wrangler-d1.js"
|
|
104
|
+
},
|
|
105
|
+
"./stores/cursor-store": {
|
|
106
|
+
"types": "./dist/stores/cursor-store.d.ts",
|
|
107
|
+
"default": "./dist/stores/cursor-store.js"
|
|
108
|
+
},
|
|
109
|
+
"./stores/helpers": {
|
|
110
|
+
"types": "./dist/stores/helpers.d.ts",
|
|
111
|
+
"default": "./dist/stores/helpers.js"
|
|
112
|
+
},
|
|
113
|
+
"./stores/lease-store": {
|
|
114
|
+
"types": "./dist/stores/lease-store.d.ts",
|
|
115
|
+
"default": "./dist/stores/lease-store.js"
|
|
116
|
+
},
|
|
117
|
+
"./stores/message-store": {
|
|
118
|
+
"types": "./dist/stores/message-store.d.ts",
|
|
119
|
+
"default": "./dist/stores/message-store.js"
|
|
120
|
+
},
|
|
121
|
+
"./stores/run-store": {
|
|
122
|
+
"types": "./dist/stores/run-store.d.ts",
|
|
123
|
+
"default": "./dist/stores/run-store.js"
|
|
124
|
+
},
|
|
125
|
+
"./stores/subscription-store": {
|
|
126
|
+
"types": "./dist/stores/subscription-store.d.ts",
|
|
127
|
+
"default": "./dist/stores/subscription-store.js"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|