@granular-software/sdk 0.4.38 → 0.4.40
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/dist/agent-evals.d.mts +4 -3
- package/dist/agent-evals.d.ts +4 -3
- package/dist/agent-evals.js +730 -49
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +730 -50
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.d.mts +9 -2
- package/dist/agent-harness.d.ts +9 -2
- package/dist/agent-harness.js +273 -5
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +271 -6
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +168 -32
- package/dist/{client-BNbWA9jQ.d.ts → client-BZ8NuQ_e.d.ts} +17 -1
- package/dist/{client-HDJgcJC5.d.mts → client-CBQFvuKf.d.mts} +17 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +441 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +439 -38
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-rzS1rlFr.d.mts → spend-tAz2a16I.d.mts} +35 -1
- package/dist/{spend-rzS1rlFr.d.ts → spend-tAz2a16I.d.ts} +35 -1
- package/dist/spend.d.mts +1 -1
- package/dist/spend.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -14865,6 +14865,9 @@ var filterByMetamodelPackage = defineMetamodelPackage({
|
|
|
14865
14865
|
propertyFields: [`filter_by { scalar_type operators }`]
|
|
14866
14866
|
},
|
|
14867
14867
|
readPropertySummary(rawProperty) {
|
|
14868
|
+
if (rawProperty.filterBy === false || rawProperty.filter_by_disabled === true) {
|
|
14869
|
+
return { filterBy: false };
|
|
14870
|
+
}
|
|
14868
14871
|
const operators = Array.isArray(rawProperty.filter_by?.operators) ? rawProperty.filter_by.operators.filter(
|
|
14869
14872
|
(value) => typeof value === "string" && value.length > 0
|
|
14870
14873
|
) : [];
|
|
@@ -14877,7 +14880,7 @@ var filterByMetamodelPackage = defineMetamodelPackage({
|
|
|
14877
14880
|
},
|
|
14878
14881
|
domain: {
|
|
14879
14882
|
applyToPropertyIR(propertyIR, propertySummary) {
|
|
14880
|
-
const operators = propertySummary.filterBy
|
|
14883
|
+
const operators = propertySummary.filterBy && typeof propertySummary.filterBy === "object" ? propertySummary.filterBy.operators || [] : [];
|
|
14881
14884
|
if (operators.length === 0) return propertyIR;
|
|
14882
14885
|
return {
|
|
14883
14886
|
...propertyIR,
|
|
@@ -18991,7 +18994,10 @@ var WSClient = class {
|
|
|
18991
18994
|
if (!expiresAt) {
|
|
18992
18995
|
return;
|
|
18993
18996
|
}
|
|
18994
|
-
const refreshInMs = Math.max(
|
|
18997
|
+
const refreshInMs = Math.max(
|
|
18998
|
+
1e3,
|
|
18999
|
+
expiresAt - Date.now() - TOKEN_REFRESH_LEEWAY_MS
|
|
19000
|
+
);
|
|
18995
19001
|
const delay = Math.min(refreshInMs, MAX_TIMER_DELAY_MS);
|
|
18996
19002
|
this.tokenRefreshTimer = setTimeout(() => {
|
|
18997
19003
|
void this.refreshTokenInBackground();
|
|
@@ -19037,7 +19043,10 @@ var WSClient = class {
|
|
|
19037
19043
|
return refreshedToken;
|
|
19038
19044
|
} catch (error2) {
|
|
19039
19045
|
if (expiresAt > Date.now()) {
|
|
19040
|
-
console.warn(
|
|
19046
|
+
console.warn(
|
|
19047
|
+
"[Granular] Token refresh failed, using current token:",
|
|
19048
|
+
error2
|
|
19049
|
+
);
|
|
19041
19050
|
return this.token;
|
|
19042
19051
|
}
|
|
19043
19052
|
throw error2;
|
|
@@ -19064,7 +19073,9 @@ var WSClient = class {
|
|
|
19064
19073
|
}
|
|
19065
19074
|
}
|
|
19066
19075
|
if (!WebSocketClass) {
|
|
19067
|
-
throw new Error(
|
|
19076
|
+
throw new Error(
|
|
19077
|
+
'No WebSocket implementation found. If using Node.js, please install "ws" and pass the constructor to the SDK options: { WebSocketCtor: WebSocket }.'
|
|
19078
|
+
);
|
|
19068
19079
|
}
|
|
19069
19080
|
return new Promise((resolve2, reject) => {
|
|
19070
19081
|
try {
|
|
@@ -19196,7 +19207,10 @@ var WSClient = class {
|
|
|
19196
19207
|
try {
|
|
19197
19208
|
this.options.onUnexpectedClose(info2);
|
|
19198
19209
|
} catch (callbackError) {
|
|
19199
|
-
console.error(
|
|
19210
|
+
console.error(
|
|
19211
|
+
"[Granular] onUnexpectedClose callback failed:",
|
|
19212
|
+
callbackError
|
|
19213
|
+
);
|
|
19200
19214
|
}
|
|
19201
19215
|
}
|
|
19202
19216
|
this.reconnectTimer = setTimeout(() => {
|
|
@@ -19213,7 +19227,10 @@ var WSClient = class {
|
|
|
19213
19227
|
try {
|
|
19214
19228
|
this.options.onReconnectError(reconnectInfo);
|
|
19215
19229
|
} catch (callbackError) {
|
|
19216
|
-
console.error(
|
|
19230
|
+
console.error(
|
|
19231
|
+
"[Granular] onReconnectError callback failed:",
|
|
19232
|
+
callbackError
|
|
19233
|
+
);
|
|
19217
19234
|
}
|
|
19218
19235
|
}
|
|
19219
19236
|
});
|
|
@@ -19222,7 +19239,10 @@ var WSClient = class {
|
|
|
19222
19239
|
}
|
|
19223
19240
|
handleMessage(message) {
|
|
19224
19241
|
if (typeof message !== "object" || message === null) return;
|
|
19225
|
-
debugWs(
|
|
19242
|
+
debugWs(
|
|
19243
|
+
"[Granular DEBUG] Received message:",
|
|
19244
|
+
JSON.stringify(message).slice(0, 500)
|
|
19245
|
+
);
|
|
19226
19246
|
if ("type" in message && message.type === "sync") {
|
|
19227
19247
|
const syncMessage = message;
|
|
19228
19248
|
let bytes;
|
|
@@ -19252,21 +19272,39 @@ var WSClient = class {
|
|
|
19252
19272
|
this.syncState = newSyncState;
|
|
19253
19273
|
const docAny = this.doc;
|
|
19254
19274
|
if (docAny.catalog) {
|
|
19255
|
-
debugWs(
|
|
19256
|
-
|
|
19275
|
+
debugWs(
|
|
19276
|
+
"[Granular DEBUG] Doc catalog sync applied. Keys in catalog:",
|
|
19277
|
+
Object.keys(docAny.catalog || {})
|
|
19278
|
+
);
|
|
19279
|
+
debugWs(
|
|
19280
|
+
"[Granular DEBUG] RawToolCatalogs:",
|
|
19281
|
+
Object.keys(docAny.catalog.rawToolCatalogs || {})
|
|
19282
|
+
);
|
|
19257
19283
|
} else {
|
|
19258
|
-
debugWs(
|
|
19284
|
+
debugWs(
|
|
19285
|
+
"[Granular DEBUG] Doc synced but no catalog yet. Keys in doc:",
|
|
19286
|
+
Object.keys(docAny)
|
|
19287
|
+
);
|
|
19259
19288
|
}
|
|
19260
19289
|
this.emit("sync", this.doc);
|
|
19261
19290
|
} catch (e) {
|
|
19262
19291
|
try {
|
|
19263
|
-
debugWs(
|
|
19292
|
+
debugWs(
|
|
19293
|
+
"[Granular DEBUG] receiveSyncMessage failed, trying applyChanges..."
|
|
19294
|
+
);
|
|
19264
19295
|
const [newDoc] = Automerge__namespace.applyChanges(this.doc, [bytes]);
|
|
19265
19296
|
this.doc = newDoc;
|
|
19266
19297
|
this.emit("sync", this.doc);
|
|
19267
|
-
debugWs(
|
|
19298
|
+
debugWs(
|
|
19299
|
+
"[Granular DEBUG] applyChanges succeeded. Doc:",
|
|
19300
|
+
JSON.stringify(Automerge__namespace.toJS(this.doc))
|
|
19301
|
+
);
|
|
19268
19302
|
} catch (applyError) {
|
|
19269
|
-
console.warn(
|
|
19303
|
+
console.warn(
|
|
19304
|
+
"[Granular] Failed to apply sync message (both sync & applyChanges)",
|
|
19305
|
+
e,
|
|
19306
|
+
applyError
|
|
19307
|
+
);
|
|
19270
19308
|
}
|
|
19271
19309
|
}
|
|
19272
19310
|
return;
|
|
@@ -19275,10 +19313,16 @@ var WSClient = class {
|
|
|
19275
19313
|
const snapshotMessage = message;
|
|
19276
19314
|
try {
|
|
19277
19315
|
const bytes = new Uint8Array(snapshotMessage.data);
|
|
19278
|
-
debugWs(
|
|
19316
|
+
debugWs(
|
|
19317
|
+
"[Granular DEBUG] Loading Automerge session snapshot bytes:",
|
|
19318
|
+
bytes.length
|
|
19319
|
+
);
|
|
19279
19320
|
this.doc = Automerge__namespace.load(bytes);
|
|
19280
19321
|
this.emit("sync", this.doc);
|
|
19281
|
-
debugWs(
|
|
19322
|
+
debugWs(
|
|
19323
|
+
"[Granular DEBUG] Automerge session snapshot loaded. Doc:",
|
|
19324
|
+
JSON.stringify(Automerge__namespace.toJS(this.doc))
|
|
19325
|
+
);
|
|
19282
19326
|
} catch (e) {
|
|
19283
19327
|
console.warn("[Granular] Failed to load snapshot message", e);
|
|
19284
19328
|
}
|
|
@@ -19290,6 +19334,7 @@ var WSClient = class {
|
|
|
19290
19334
|
const bytes = new Uint8Array(changeMessage.data);
|
|
19291
19335
|
const [newDoc] = Automerge__namespace.applyChanges(this.doc, [bytes]);
|
|
19292
19336
|
this.doc = newDoc;
|
|
19337
|
+
this.emit("change", changeMessage);
|
|
19293
19338
|
this.emit("sync", this.doc);
|
|
19294
19339
|
} catch (e) {
|
|
19295
19340
|
console.warn("[Granular] Failed to apply change message", e);
|
|
@@ -19302,12 +19347,16 @@ var WSClient = class {
|
|
|
19302
19347
|
if (pending) {
|
|
19303
19348
|
if (response.type === "rpc_error") {
|
|
19304
19349
|
pending.reject(
|
|
19305
|
-
new Error(
|
|
19350
|
+
new Error(
|
|
19351
|
+
`RPC error: ${response.error?.message || "Unknown error"}`
|
|
19352
|
+
)
|
|
19306
19353
|
);
|
|
19307
19354
|
} else {
|
|
19308
19355
|
pending.resolve(response.result);
|
|
19309
19356
|
}
|
|
19310
|
-
this.messageQueue = this.messageQueue.filter(
|
|
19357
|
+
this.messageQueue = this.messageQueue.filter(
|
|
19358
|
+
(q) => q.id !== response.id
|
|
19359
|
+
);
|
|
19311
19360
|
}
|
|
19312
19361
|
return;
|
|
19313
19362
|
}
|
|
@@ -21096,9 +21145,10 @@ function normalizeShowRefs(value) {
|
|
|
21096
21145
|
const show = {
|
|
21097
21146
|
entryPaths: normalizeRefs(record.entryPaths),
|
|
21098
21147
|
listNames: normalizeRefs(record.listNames),
|
|
21099
|
-
variableNames: normalizeRefs(record.variableNames)
|
|
21148
|
+
variableNames: normalizeRefs(record.variableNames),
|
|
21149
|
+
fileIds: normalizeRefs(record.fileIds)
|
|
21100
21150
|
};
|
|
21101
|
-
return show.entryPaths || show.listNames || show.variableNames ? show : void 0;
|
|
21151
|
+
return show.entryPaths || show.listNames || show.variableNames || show.fileIds ? show : void 0;
|
|
21102
21152
|
}
|
|
21103
21153
|
function stringifyTranscriptValue(value, fallback2 = "") {
|
|
21104
21154
|
if (typeof value === "string") {
|
|
@@ -21306,7 +21356,10 @@ function buildJobCodeEntry(jobId, job2) {
|
|
|
21306
21356
|
jobId,
|
|
21307
21357
|
code,
|
|
21308
21358
|
jobStatus,
|
|
21309
|
-
jobResultPreview: stringifyTranscriptValue(
|
|
21359
|
+
jobResultPreview: stringifyTranscriptValue(
|
|
21360
|
+
job2.result,
|
|
21361
|
+
"No job result recorded."
|
|
21362
|
+
),
|
|
21310
21363
|
error: error2,
|
|
21311
21364
|
source: "job_code"
|
|
21312
21365
|
};
|
|
@@ -21315,12 +21368,16 @@ function buildSessionTranscript(input) {
|
|
|
21315
21368
|
const liveDoc = input.liveDoc || null;
|
|
21316
21369
|
const sessionHeap = input.sessionHeap || EMPTY_HEAP;
|
|
21317
21370
|
const transcript = [];
|
|
21318
|
-
const conversationMessages = asArray(
|
|
21371
|
+
const conversationMessages = asArray(
|
|
21372
|
+
asRecord3(liveDoc?.conversation)?.messages
|
|
21373
|
+
).map((message) => normalizeConversationMessage(message)).filter((message) => Boolean(message));
|
|
21319
21374
|
const conversationPromptIds = new Set(
|
|
21320
21375
|
conversationMessages.map((message) => message.promptId).filter((promptId) => Boolean(promptId))
|
|
21321
21376
|
);
|
|
21322
21377
|
const assistantConversationJobIds = new Set(
|
|
21323
|
-
conversationMessages.filter(
|
|
21378
|
+
conversationMessages.filter(
|
|
21379
|
+
(message) => message.role === "assistant" && Boolean(message.jobId)
|
|
21380
|
+
).map((message) => message.jobId)
|
|
21324
21381
|
);
|
|
21325
21382
|
transcript.push(...conversationMessages);
|
|
21326
21383
|
const jobsById = asRecord3(asRecord3(liveDoc?.jobs)?.byId) || {};
|
|
@@ -21338,7 +21395,10 @@ function buildSessionTranscript(input) {
|
|
|
21338
21395
|
...normalizePromptEntries(jobId, job2.prompts, conversationPromptIds)
|
|
21339
21396
|
);
|
|
21340
21397
|
if (!assistantConversationJobIds.has(jobId)) {
|
|
21341
|
-
const agentEntries = normalizeAgentMessageEntries(
|
|
21398
|
+
const agentEntries = normalizeAgentMessageEntries(
|
|
21399
|
+
jobId,
|
|
21400
|
+
job2.agentMessages
|
|
21401
|
+
);
|
|
21342
21402
|
if (agentEntries.length > 0) {
|
|
21343
21403
|
transcript.push(...agentEntries);
|
|
21344
21404
|
} else {
|
|
@@ -21691,6 +21751,25 @@ var LOCAL_CONTROL_REQUEST_RETRY_DELAY_MS = 500;
|
|
|
21691
21751
|
var SESSION_DATA_REQUEST_RETRY_COUNT = 4;
|
|
21692
21752
|
var SESSION_DATA_REQUEST_RETRY_DELAY_MS = 500;
|
|
21693
21753
|
var EFFECT_HOST_CONNECT_TIMEOUT_MS = 15e3;
|
|
21754
|
+
function filenameFromUploadBody(body) {
|
|
21755
|
+
const maybe = body;
|
|
21756
|
+
return typeof maybe.name === "string" && maybe.name.trim() ? maybe.name.trim() : null;
|
|
21757
|
+
}
|
|
21758
|
+
function contentTypeFromUploadBody(body) {
|
|
21759
|
+
const maybe = body;
|
|
21760
|
+
return typeof maybe.type === "string" && maybe.type.trim() ? maybe.type.trim() : null;
|
|
21761
|
+
}
|
|
21762
|
+
function bodyInitFromSessionFileUpload(body) {
|
|
21763
|
+
if (typeof body === "string") return body;
|
|
21764
|
+
if (body instanceof ArrayBuffer) return body;
|
|
21765
|
+
if (ArrayBuffer.isView(body)) {
|
|
21766
|
+
return body.buffer.slice(
|
|
21767
|
+
body.byteOffset,
|
|
21768
|
+
body.byteOffset + body.byteLength
|
|
21769
|
+
);
|
|
21770
|
+
}
|
|
21771
|
+
return body;
|
|
21772
|
+
}
|
|
21694
21773
|
var EFFECT_CATALOG_SYNC_TIMEOUT_MS = 3e4;
|
|
21695
21774
|
var EFFECT_CATALOG_SYNC_RETRY_COUNT = 3;
|
|
21696
21775
|
var EFFECT_CATALOG_SYNC_RETRY_DELAY_MS = 1e3;
|
|
@@ -23175,7 +23254,7 @@ var EnvironmentSession = class extends Session {
|
|
|
23175
23254
|
const doc = this.document;
|
|
23176
23255
|
return normalizeHeapSnapshot(doc?.heap);
|
|
23177
23256
|
}
|
|
23178
|
-
|
|
23257
|
+
buildSessionDataUrl(path7, query) {
|
|
23179
23258
|
const searchParams = new URLSearchParams();
|
|
23180
23259
|
for (const [key, value] of Object.entries(query || {})) {
|
|
23181
23260
|
if (value !== null && typeof value !== "undefined" && value !== "") {
|
|
@@ -23183,20 +23262,21 @@ var EnvironmentSession = class extends Session {
|
|
|
23183
23262
|
}
|
|
23184
23263
|
}
|
|
23185
23264
|
const queryString = searchParams.toString();
|
|
23186
|
-
|
|
23187
|
-
|
|
23265
|
+
return `${this.environment.runtimeBaseUrl}${this.sessionDataRoutePrefix}/${encodeURIComponent(this.sessionId)}${path7}${queryString ? `?${queryString}` : ""}`;
|
|
23266
|
+
}
|
|
23267
|
+
async sessionDataFetch(path7, query, init2 = {}) {
|
|
23268
|
+
const url = this.buildSessionDataUrl(path7, query);
|
|
23188
23269
|
for (let attempt = 1; attempt <= SESSION_DATA_REQUEST_RETRY_COUNT; attempt += 1) {
|
|
23189
23270
|
try {
|
|
23271
|
+
const headers = new Headers(init2.headers);
|
|
23272
|
+
headers.set("Authorization", `Bearer ${this.environment.authToken}`);
|
|
23190
23273
|
const response = await fetch(url, {
|
|
23191
23274
|
method: init2.method || "GET",
|
|
23192
|
-
headers
|
|
23193
|
-
|
|
23194
|
-
"Content-Type": "application/json"
|
|
23195
|
-
},
|
|
23196
|
-
...typeof body === "undefined" ? {} : { body }
|
|
23275
|
+
headers,
|
|
23276
|
+
...typeof init2.body === "undefined" ? {} : { body: init2.body }
|
|
23197
23277
|
});
|
|
23198
23278
|
if (response.ok) {
|
|
23199
|
-
return response
|
|
23279
|
+
return response;
|
|
23200
23280
|
}
|
|
23201
23281
|
const errorText = await response.text();
|
|
23202
23282
|
const error2 = new Error(
|
|
@@ -23217,6 +23297,15 @@ var EnvironmentSession = class extends Session {
|
|
|
23217
23297
|
}
|
|
23218
23298
|
throw new Error(`Session data API Error: exhausted retries for ${url}`);
|
|
23219
23299
|
}
|
|
23300
|
+
async sessionDataRequest(path7, query, init2 = {}) {
|
|
23301
|
+
const body = typeof init2.body === "undefined" ? void 0 : JSON.stringify(init2.body);
|
|
23302
|
+
const response = await this.sessionDataFetch(path7, query, {
|
|
23303
|
+
method: init2.method || "GET",
|
|
23304
|
+
headers: { "Content-Type": "application/json" },
|
|
23305
|
+
...typeof body === "undefined" ? {} : { body }
|
|
23306
|
+
});
|
|
23307
|
+
return response.json();
|
|
23308
|
+
}
|
|
23220
23309
|
async collectAllSessionItems(listPage) {
|
|
23221
23310
|
const items = [];
|
|
23222
23311
|
let cursor = null;
|
|
@@ -23257,6 +23346,53 @@ var EnvironmentSession = class extends Session {
|
|
|
23257
23346
|
)
|
|
23258
23347
|
};
|
|
23259
23348
|
}
|
|
23349
|
+
get files() {
|
|
23350
|
+
return {
|
|
23351
|
+
list: (options = {}) => this.sessionDataRequest(
|
|
23352
|
+
"/files",
|
|
23353
|
+
options
|
|
23354
|
+
),
|
|
23355
|
+
get: (fileId) => this.sessionDataRequest(
|
|
23356
|
+
`/files/${encodeURIComponent(fileId)}`
|
|
23357
|
+
),
|
|
23358
|
+
upload: async (body, options = {}) => {
|
|
23359
|
+
const headers = new Headers({
|
|
23360
|
+
"Content-Type": options.contentType || contentTypeFromUploadBody(body) || "application/octet-stream",
|
|
23361
|
+
"x-granular-filename": options.filename || filenameFromUploadBody(body) || "upload",
|
|
23362
|
+
"x-granular-file-source": options.source || "sdk"
|
|
23363
|
+
});
|
|
23364
|
+
if (options.parentFileIds?.length) {
|
|
23365
|
+
headers.set(
|
|
23366
|
+
"x-granular-parent-file-ids",
|
|
23367
|
+
JSON.stringify(options.parentFileIds)
|
|
23368
|
+
);
|
|
23369
|
+
}
|
|
23370
|
+
if (options.metadata) {
|
|
23371
|
+
headers.set(
|
|
23372
|
+
"x-granular-file-metadata",
|
|
23373
|
+
JSON.stringify(options.metadata)
|
|
23374
|
+
);
|
|
23375
|
+
}
|
|
23376
|
+
const response = await this.sessionDataFetch("/files", void 0, {
|
|
23377
|
+
method: "POST",
|
|
23378
|
+
headers,
|
|
23379
|
+
body: bodyInitFromSessionFileUpload(body)
|
|
23380
|
+
});
|
|
23381
|
+
return response.json();
|
|
23382
|
+
},
|
|
23383
|
+
download: async (fileId) => {
|
|
23384
|
+
const response = await this.sessionDataFetch(
|
|
23385
|
+
`/files/${encodeURIComponent(fileId)}/content`
|
|
23386
|
+
);
|
|
23387
|
+
return response.arrayBuffer();
|
|
23388
|
+
},
|
|
23389
|
+
delete: (fileId) => this.sessionDataRequest(
|
|
23390
|
+
`/files/${encodeURIComponent(fileId)}`,
|
|
23391
|
+
void 0,
|
|
23392
|
+
{ method: "DELETE" }
|
|
23393
|
+
)
|
|
23394
|
+
};
|
|
23395
|
+
}
|
|
23260
23396
|
get heap() {
|
|
23261
23397
|
return {
|
|
23262
23398
|
entries: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b0 as WSClientOptions, L as GranularQuotaProgress, T as ToolWithHandler, f as PublishToolsResult, aE as Job, g as ToolHandler, I as InstanceToolHandler, aG as ConversationMessageInput, aH as ConversationAppendResult, ar as EffectInfo, P as Prompt, aq as ToolInfo, at as EffectsChangedEvent, as as ToolsChangedEvent, D as DomainState, q as GranularOptions, br as EnvironmentImporter, u as RecordUserOptions, U as User, w as OpenEnvironmentOptions, a5 as EnvironmentData, a2 as BuildPolicy, bp as EnvironmentSetupSummary, y as ConversationSessionInfo, x as CreateSessionOptions, ba as RecordObjectOptions, bb as RecordObjectResult, bd as RecordObjectsOptions, bk as RecordImport, bg as RecordImportStatus, bl as EnvironmentRecordImportSummary, aC as EnvironmentFeedbackRecord, c as SessionHeapSnapshot, aW as SessionDocumentResult, aX as SessionCollectionListOptions, aZ as SessionCollectionListResult, aI as SessionConversationMessage, aJ as SessionTimelineEvent, aY as SessionJobListOptions, aP as SessionJobRecord, aN as SessionFileRecord, aO as SessionFileUploadOptions, S as SessionHeapEntry, b as SessionHeapList, aS as SessionHeapVariable, d as SessionTranscriptEntry, bN as GraphQLResult, aU as RecordSearchOptions, aT as RecordSearchResult, aV as RecordMentionInput, b9 as DefineRelationshipOptions, b8 as RelationshipInfo, b7 as ModelRef, bM as ManifestContent, bf as RecordImportOptions, C as ConnectOptions, bn as RunEnvironmentImporterOptions, l as OpenAIUsageSpendEvent, G as GranularSpendContext, o as RecordOpenAIUsageSpendResult, X as SandboxListResponse, V as Sandbox, W as CreateSandboxData, bP as DeleteResponse, Z as PermissionProfile, _ as CreatePermissionProfileData, a6 as CreateEnvironmentData, bQ as StreamEvent, bR as StreamSubscription, bS as StreamStats, v as Subject, a1 as AssignmentListResponse } from './spend-tAz2a16I.js';
|
|
2
2
|
import * as Automerge from '@automerge/automerge';
|
|
3
3
|
import { Doc } from '@automerge/automerge/slim';
|
|
4
4
|
|
|
@@ -251,6 +251,7 @@ declare class Session {
|
|
|
251
251
|
private checkForToolChanges;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
type SessionFileUploadBody = Blob | ArrayBuffer | Uint8Array | string;
|
|
254
255
|
type EnvironmentImporterHandler = (importer: EnvironmentImporter) => Promise<void> | void;
|
|
255
256
|
/**
|
|
256
257
|
* Environment is the sessionless handle for one resolved ontology environment.
|
|
@@ -670,6 +671,8 @@ declare class EnvironmentSession extends Session {
|
|
|
670
671
|
* Return a plain JS copy of the synced session heap.
|
|
671
672
|
*/
|
|
672
673
|
getHeap(): SessionHeapSnapshot;
|
|
674
|
+
private buildSessionDataUrl;
|
|
675
|
+
private sessionDataFetch;
|
|
673
676
|
private sessionDataRequest;
|
|
674
677
|
private collectAllSessionItems;
|
|
675
678
|
/**
|
|
@@ -689,6 +692,19 @@ declare class EnvironmentSession extends Session {
|
|
|
689
692
|
list: (options?: SessionJobListOptions) => Promise<SessionCollectionListResult<SessionJobRecord>>;
|
|
690
693
|
get: (jobId: string) => Promise<SessionJobRecord>;
|
|
691
694
|
};
|
|
695
|
+
get files(): {
|
|
696
|
+
list: (options?: SessionCollectionListOptions & {
|
|
697
|
+
status?: string | null;
|
|
698
|
+
source?: string | null;
|
|
699
|
+
}) => Promise<SessionCollectionListResult<SessionFileRecord>>;
|
|
700
|
+
get: (fileId: string) => Promise<SessionFileRecord>;
|
|
701
|
+
upload: (body: SessionFileUploadBody, options?: SessionFileUploadOptions) => Promise<SessionFileRecord>;
|
|
702
|
+
download: (fileId: string) => Promise<ArrayBuffer>;
|
|
703
|
+
delete: (fileId: string) => Promise<{
|
|
704
|
+
deleted: boolean;
|
|
705
|
+
fileId: string;
|
|
706
|
+
}>;
|
|
707
|
+
};
|
|
692
708
|
get heap(): {
|
|
693
709
|
entries: {
|
|
694
710
|
list: (options?: SessionCollectionListOptions) => Promise<SessionCollectionListResult<SessionHeapEntry>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b0 as WSClientOptions, L as GranularQuotaProgress, T as ToolWithHandler, f as PublishToolsResult, aE as Job, g as ToolHandler, I as InstanceToolHandler, aG as ConversationMessageInput, aH as ConversationAppendResult, ar as EffectInfo, P as Prompt, aq as ToolInfo, at as EffectsChangedEvent, as as ToolsChangedEvent, D as DomainState, q as GranularOptions, br as EnvironmentImporter, u as RecordUserOptions, U as User, w as OpenEnvironmentOptions, a5 as EnvironmentData, a2 as BuildPolicy, bp as EnvironmentSetupSummary, y as ConversationSessionInfo, x as CreateSessionOptions, ba as RecordObjectOptions, bb as RecordObjectResult, bd as RecordObjectsOptions, bk as RecordImport, bg as RecordImportStatus, bl as EnvironmentRecordImportSummary, aC as EnvironmentFeedbackRecord, c as SessionHeapSnapshot, aW as SessionDocumentResult, aX as SessionCollectionListOptions, aZ as SessionCollectionListResult, aI as SessionConversationMessage, aJ as SessionTimelineEvent, aY as SessionJobListOptions, aP as SessionJobRecord, aN as SessionFileRecord, aO as SessionFileUploadOptions, S as SessionHeapEntry, b as SessionHeapList, aS as SessionHeapVariable, d as SessionTranscriptEntry, bN as GraphQLResult, aU as RecordSearchOptions, aT as RecordSearchResult, aV as RecordMentionInput, b9 as DefineRelationshipOptions, b8 as RelationshipInfo, b7 as ModelRef, bM as ManifestContent, bf as RecordImportOptions, C as ConnectOptions, bn as RunEnvironmentImporterOptions, l as OpenAIUsageSpendEvent, G as GranularSpendContext, o as RecordOpenAIUsageSpendResult, X as SandboxListResponse, V as Sandbox, W as CreateSandboxData, bP as DeleteResponse, Z as PermissionProfile, _ as CreatePermissionProfileData, a6 as CreateEnvironmentData, bQ as StreamEvent, bR as StreamSubscription, bS as StreamStats, v as Subject, a1 as AssignmentListResponse } from './spend-tAz2a16I.mjs';
|
|
2
2
|
import * as Automerge from '@automerge/automerge';
|
|
3
3
|
import { Doc } from '@automerge/automerge/slim';
|
|
4
4
|
|
|
@@ -251,6 +251,7 @@ declare class Session {
|
|
|
251
251
|
private checkForToolChanges;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
type SessionFileUploadBody = Blob | ArrayBuffer | Uint8Array | string;
|
|
254
255
|
type EnvironmentImporterHandler = (importer: EnvironmentImporter) => Promise<void> | void;
|
|
255
256
|
/**
|
|
256
257
|
* Environment is the sessionless handle for one resolved ontology environment.
|
|
@@ -670,6 +671,8 @@ declare class EnvironmentSession extends Session {
|
|
|
670
671
|
* Return a plain JS copy of the synced session heap.
|
|
671
672
|
*/
|
|
672
673
|
getHeap(): SessionHeapSnapshot;
|
|
674
|
+
private buildSessionDataUrl;
|
|
675
|
+
private sessionDataFetch;
|
|
673
676
|
private sessionDataRequest;
|
|
674
677
|
private collectAllSessionItems;
|
|
675
678
|
/**
|
|
@@ -689,6 +692,19 @@ declare class EnvironmentSession extends Session {
|
|
|
689
692
|
list: (options?: SessionJobListOptions) => Promise<SessionCollectionListResult<SessionJobRecord>>;
|
|
690
693
|
get: (jobId: string) => Promise<SessionJobRecord>;
|
|
691
694
|
};
|
|
695
|
+
get files(): {
|
|
696
|
+
list: (options?: SessionCollectionListOptions & {
|
|
697
|
+
status?: string | null;
|
|
698
|
+
source?: string | null;
|
|
699
|
+
}) => Promise<SessionCollectionListResult<SessionFileRecord>>;
|
|
700
|
+
get: (fileId: string) => Promise<SessionFileRecord>;
|
|
701
|
+
upload: (body: SessionFileUploadBody, options?: SessionFileUploadOptions) => Promise<SessionFileRecord>;
|
|
702
|
+
download: (fileId: string) => Promise<ArrayBuffer>;
|
|
703
|
+
delete: (fileId: string) => Promise<{
|
|
704
|
+
deleted: boolean;
|
|
705
|
+
fileId: string;
|
|
706
|
+
}>;
|
|
707
|
+
};
|
|
692
708
|
get heap(): {
|
|
693
709
|
entries: {
|
|
694
710
|
list: (options?: SessionCollectionListOptions) => Promise<SessionCollectionListResult<SessionHeapEntry>>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { E as Environment, a as EnvironmentSession, G as Granular, O as OntologyHandle, S as Session, W as WSClient } from './client-
|
|
2
|
-
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './spend-
|
|
3
|
-
export {
|
|
1
|
+
export { E as Environment, a as EnvironmentSession, G as Granular, O as OntologyHandle, S as Session, W as WSClient } from './client-CBQFvuKf.mjs';
|
|
2
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './spend-tAz2a16I.mjs';
|
|
3
|
+
export { bO as APIError, A as AccessTokenProvider, a0 as Assignment, a1 as AssignmentListResponse, ab as Build, ad as BuildListResponse, a2 as BuildPolicy, aa as BuildStatus, C as ConnectOptions, aH as ConversationAppendResult, aG as ConversationMessageInput, aF as ConversationMessageShowRefs, y as ConversationSessionInfo, a6 as CreateEnvironmentData, _ as CreatePermissionProfileData, W as CreateSandboxData, x as CreateSessionOptions, b9 as DefineRelationshipOptions, bP as DeleteResponse, D as DomainState, au as EffectHandler, ar as EffectInfo, al as EffectInvocationMetadata, ak as EffectInvocationMode, am as EffectSchema, ap as EffectVersionSelector, an as EffectWithHandler, at as EffectsChangedEvent, a5 as EnvironmentData, aC as EnvironmentFeedbackRecord, br as EnvironmentImporter, bq as EnvironmentImporterImportOptions, a7 as EnvironmentListResponse, bl as EnvironmentRecordImportSummary, bo as EnvironmentSetupLifecycleStatus, bp as EnvironmentSetupSummary, bm as EnvironmentSetupTriggerReason, s as GranularAuth, q as GranularOptions, K as GranularQuotaPolicy, L as GranularQuotaProgress, G as GranularSpendContext, bN as GraphQLResult, av as InstanceEffectHandler, I as InstanceToolHandler, aE as Job, aA as JobFeedbackInput, az as JobFeedbackMetadata, aB as JobFeedbackRecord, ax as JobFeedbackSentiment, ay as JobFeedbackToolCall, aw as JobStatus, aD as JobSubmitResult, a8 as Manifest, bD as ManifestApprovalRequiredSpec, bM as ManifestContent, bB as ManifestDryRunSpec, bG as ManifestEffectDeclaration, bF as ManifestEffectSchema, bu as ManifestEnumRuleSpec, bI as ManifestEventStreamDef, bH as ManifestEventTypeDef, bv as ManifestFilterBySpec, bK as ManifestImport, a9 as ManifestListResponse, bJ as ManifestOperation, bA as ManifestPostConditionSpec, bs as ManifestPropertySpec, bE as ManifestRelationshipDef, bC as ManifestReverseSpec, bz as ManifestStateMachineSpec, bx as ManifestStateMachineStateSpec, by as ManifestStateMachineTransitionSpec, bt as ManifestValidationOperator, bw as ManifestValidationRuleSpec, bL as ManifestVolume, b7 as ModelRef, N as NormalizedOpenAIUsage, i as OPENAI_MODEL_PRICING_USD_PER_MILLION, O as OpenAIModelPricing, h as OpenAITokenSpend, l as OpenAIUsageSpendEvent, w as OpenEnvironmentOptions, Z as PermissionProfile, $ as PermissionProfileListResponse, Y as PermissionRules, ao as PublishEffectsResult, f as PublishToolsResult, J as QuotaLineItemFilter, B as QuotaPeriod, Q as QuotaScopeType, F as QuotaStatus, b1 as RPCRequest, b4 as RPCRequestFromServer, b2 as RPCResponse, bk as RecordImport, bj as RecordImportItem, bh as RecordImportItemStatus, bf as RecordImportOptions, bi as RecordImportStats, bg as RecordImportStatus, be as RecordImportWriteMode, aV as RecordMentionInput, ba as RecordObjectOptions, bb as RecordObjectResult, bc as RecordObjectsChunkInfo, bd as RecordObjectsOptions, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, aU as RecordSearchOptions, aT as RecordSearchResult, u as RecordUserOptions, b8 as RelationshipInfo, aj as ResolvedEffectApprovalRequired, ah as ResolvedEffectDryRun, ag as ResolvedEffectPostCondition, ai as ResolvedEffectReverse, bn as RunEnvironmentImporterOptions, V as Sandbox, X as SandboxListResponse, af as SemanticVersionDiff, ae as SemanticVersionDiffEntry, aX as SessionCollectionListOptions, aZ as SessionCollectionListResult, aI as SessionConversationMessage, aW as SessionDocumentResult, aL as SessionFileKind, aN as SessionFileRecord, aK as SessionFileSource, aM as SessionFileStatus, aO as SessionFileUploadOptions, aQ as SessionHeapFieldType, aR as SessionHeapFieldValue, aS as SessionHeapVariable, aY as SessionJobListOptions, aP as SessionJobRecord, aJ as SessionTimelineEvent, z as SpendLineItemType, H as SpendSummary, bQ as StreamEvent, bS as StreamStats, bR as StreamSubscription, v as Subject, b3 as SyncMessage, g as ToolHandler, aq as ToolInfo, b5 as ToolInvokeParams, b6 as ToolResultParams, e as ToolSchema, as as ToolsChangedEvent, U as User, ac as Version, a4 as VersionTag, a3 as VersionTracking, b0 as WSClientOptions, a_ as WSDisconnectInfo, a$ as WSReconnectErrorInfo, p as buildOpenAISpendEventId, k as calculateOpenAITokenSpend, j as getOpenAIModelPricing, n as normalizeOpenAIUsage, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-tAz2a16I.mjs';
|
|
4
4
|
export { ConditionIR, ConditionalPolicySpec, LimitPolicySpec, MatchedPolicy, PermissionActionSpec, PermissionPolicySpec, PermissionProfileFile, PolicyDecision, PolicyEvaluationContext, PolicyOutcome, PolicyRuleIR } from '@granular-software/policy-engine';
|
|
5
|
-
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode, stripGranularReasoningTrace } from './agent-harness.mjs';
|
|
5
|
+
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentFileBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentRuntimeImportsBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectSessionFileSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode, stripGranularReasoningTrace } from './agent-harness.mjs';
|
|
6
6
|
import '@automerge/automerge';
|
|
7
7
|
import '@automerge/automerge/slim';
|
|
8
8
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { E as Environment, a as EnvironmentSession, G as Granular, O as OntologyHandle, S as Session, W as WSClient } from './client-
|
|
2
|
-
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './spend-
|
|
3
|
-
export {
|
|
1
|
+
export { E as Environment, a as EnvironmentSession, G as Granular, O as OntologyHandle, S as Session, W as WSClient } from './client-BZ8NuQ_e.js';
|
|
2
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './spend-tAz2a16I.js';
|
|
3
|
+
export { bO as APIError, A as AccessTokenProvider, a0 as Assignment, a1 as AssignmentListResponse, ab as Build, ad as BuildListResponse, a2 as BuildPolicy, aa as BuildStatus, C as ConnectOptions, aH as ConversationAppendResult, aG as ConversationMessageInput, aF as ConversationMessageShowRefs, y as ConversationSessionInfo, a6 as CreateEnvironmentData, _ as CreatePermissionProfileData, W as CreateSandboxData, x as CreateSessionOptions, b9 as DefineRelationshipOptions, bP as DeleteResponse, D as DomainState, au as EffectHandler, ar as EffectInfo, al as EffectInvocationMetadata, ak as EffectInvocationMode, am as EffectSchema, ap as EffectVersionSelector, an as EffectWithHandler, at as EffectsChangedEvent, a5 as EnvironmentData, aC as EnvironmentFeedbackRecord, br as EnvironmentImporter, bq as EnvironmentImporterImportOptions, a7 as EnvironmentListResponse, bl as EnvironmentRecordImportSummary, bo as EnvironmentSetupLifecycleStatus, bp as EnvironmentSetupSummary, bm as EnvironmentSetupTriggerReason, s as GranularAuth, q as GranularOptions, K as GranularQuotaPolicy, L as GranularQuotaProgress, G as GranularSpendContext, bN as GraphQLResult, av as InstanceEffectHandler, I as InstanceToolHandler, aE as Job, aA as JobFeedbackInput, az as JobFeedbackMetadata, aB as JobFeedbackRecord, ax as JobFeedbackSentiment, ay as JobFeedbackToolCall, aw as JobStatus, aD as JobSubmitResult, a8 as Manifest, bD as ManifestApprovalRequiredSpec, bM as ManifestContent, bB as ManifestDryRunSpec, bG as ManifestEffectDeclaration, bF as ManifestEffectSchema, bu as ManifestEnumRuleSpec, bI as ManifestEventStreamDef, bH as ManifestEventTypeDef, bv as ManifestFilterBySpec, bK as ManifestImport, a9 as ManifestListResponse, bJ as ManifestOperation, bA as ManifestPostConditionSpec, bs as ManifestPropertySpec, bE as ManifestRelationshipDef, bC as ManifestReverseSpec, bz as ManifestStateMachineSpec, bx as ManifestStateMachineStateSpec, by as ManifestStateMachineTransitionSpec, bt as ManifestValidationOperator, bw as ManifestValidationRuleSpec, bL as ManifestVolume, b7 as ModelRef, N as NormalizedOpenAIUsage, i as OPENAI_MODEL_PRICING_USD_PER_MILLION, O as OpenAIModelPricing, h as OpenAITokenSpend, l as OpenAIUsageSpendEvent, w as OpenEnvironmentOptions, Z as PermissionProfile, $ as PermissionProfileListResponse, Y as PermissionRules, ao as PublishEffectsResult, f as PublishToolsResult, J as QuotaLineItemFilter, B as QuotaPeriod, Q as QuotaScopeType, F as QuotaStatus, b1 as RPCRequest, b4 as RPCRequestFromServer, b2 as RPCResponse, bk as RecordImport, bj as RecordImportItem, bh as RecordImportItemStatus, bf as RecordImportOptions, bi as RecordImportStats, bg as RecordImportStatus, be as RecordImportWriteMode, aV as RecordMentionInput, ba as RecordObjectOptions, bb as RecordObjectResult, bc as RecordObjectsChunkInfo, bd as RecordObjectsOptions, m as RecordOpenAIUsageSpendOptions, o as RecordOpenAIUsageSpendResult, aU as RecordSearchOptions, aT as RecordSearchResult, u as RecordUserOptions, b8 as RelationshipInfo, aj as ResolvedEffectApprovalRequired, ah as ResolvedEffectDryRun, ag as ResolvedEffectPostCondition, ai as ResolvedEffectReverse, bn as RunEnvironmentImporterOptions, V as Sandbox, X as SandboxListResponse, af as SemanticVersionDiff, ae as SemanticVersionDiffEntry, aX as SessionCollectionListOptions, aZ as SessionCollectionListResult, aI as SessionConversationMessage, aW as SessionDocumentResult, aL as SessionFileKind, aN as SessionFileRecord, aK as SessionFileSource, aM as SessionFileStatus, aO as SessionFileUploadOptions, aQ as SessionHeapFieldType, aR as SessionHeapFieldValue, aS as SessionHeapVariable, aY as SessionJobListOptions, aP as SessionJobRecord, aJ as SessionTimelineEvent, z as SpendLineItemType, H as SpendSummary, bQ as StreamEvent, bS as StreamStats, bR as StreamSubscription, v as Subject, b3 as SyncMessage, g as ToolHandler, aq as ToolInfo, b5 as ToolInvokeParams, b6 as ToolResultParams, e as ToolSchema, as as ToolsChangedEvent, U as User, ac as Version, a4 as VersionTag, a3 as VersionTracking, b0 as WSClientOptions, a_ as WSDisconnectInfo, a$ as WSReconnectErrorInfo, p as buildOpenAISpendEventId, k as calculateOpenAITokenSpend, j as getOpenAIModelPricing, n as normalizeOpenAIUsage, r as recordOpenAIUsageSpend, t as toGranularHttpBase } from './spend-tAz2a16I.js';
|
|
4
4
|
export { ConditionIR, ConditionalPolicySpec, LimitPolicySpec, MatchedPolicy, PermissionActionSpec, PermissionPolicySpec, PermissionProfileFile, PolicyDecision, PolicyEvaluationContext, PolicyOutcome, PolicyRuleIR } from '@granular-software/policy-engine';
|
|
5
|
-
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode, stripGranularReasoningTrace } from './agent-harness.js';
|
|
5
|
+
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentFileBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentRuntimeImportsBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectSessionFileSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode, stripGranularReasoningTrace } from './agent-harness.js';
|
|
6
6
|
import '@automerge/automerge';
|
|
7
7
|
import '@automerge/automerge/slim';
|
|
8
8
|
|