@granular-software/sdk 0.4.34 → 0.4.35
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 +1 -1
- package/dist/agent-evals.d.ts +1 -1
- package/dist/agent-evals.js +188 -33
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +188 -33
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/agent-harness.js +15 -6
- package/dist/agent-harness.js.map +1 -1
- package/dist/agent-harness.mjs +15 -6
- package/dist/agent-harness.mjs.map +1 -1
- package/dist/cli/index.js +173 -27
- package/dist/{client-iw76FL_8.d.mts → client-Cq8onk2D.d.mts} +51 -1
- package/dist/{client-iw76FL_8.d.ts → client-Cq8onk2D.d.ts} +51 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +188 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +188 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -20304,6 +20304,38 @@ function normalizeUser(user) {
|
|
|
20304
20304
|
permissions: Array.isArray(user.permissions) ? user.permissions : []
|
|
20305
20305
|
};
|
|
20306
20306
|
}
|
|
20307
|
+
function normalizeEnvironmentSetupSummary(setup) {
|
|
20308
|
+
if (!setup) {
|
|
20309
|
+
return null;
|
|
20310
|
+
}
|
|
20311
|
+
const queuedRecords = Number(setup.queuedRecords || 0);
|
|
20312
|
+
const processingRecords = Number(setup.processingRecords || 0);
|
|
20313
|
+
return {
|
|
20314
|
+
...setup,
|
|
20315
|
+
setupRunId: String(setup.setupRunId || ""),
|
|
20316
|
+
environmentId: String(setup.environmentId || ""),
|
|
20317
|
+
sandboxId: String(setup.sandboxId || ""),
|
|
20318
|
+
subjectId: String(setup.subjectId || ""),
|
|
20319
|
+
triggerReason: setup.triggerReason === "fresh_after_version_update" ? "fresh_after_version_update" : "new_environment",
|
|
20320
|
+
lifecycleStatus: setup.lifecycleStatus === "completed" || setup.lifecycleStatus === "failed" ? setup.lifecycleStatus : "running",
|
|
20321
|
+
stage: typeof setup.stage === "string" ? setup.stage : null,
|
|
20322
|
+
totalObjectsToImport: Number(setup.totalObjectsToImport || 0),
|
|
20323
|
+
totalImports: Number(setup.totalImports || 0),
|
|
20324
|
+
activeImports: Number(setup.activeImports || 0),
|
|
20325
|
+
totalRecords: Number(setup.totalRecords || 0),
|
|
20326
|
+
queuedRecords,
|
|
20327
|
+
processingRecords,
|
|
20328
|
+
completedRecords: Number(setup.completedRecords || 0),
|
|
20329
|
+
failedRecords: Number(setup.failedRecords || 0),
|
|
20330
|
+
canceledRecords: Number(setup.canceledRecords || 0),
|
|
20331
|
+
awaitingRecords: Number(setup.awaitingRecords || 0) || queuedRecords + processingRecords,
|
|
20332
|
+
errorMessage: typeof setup.errorMessage === "string" ? setup.errorMessage : null,
|
|
20333
|
+
startedAt: Number(setup.startedAt || Date.now()),
|
|
20334
|
+
hookCompletedAt: setup.hookCompletedAt == null ? null : Number(setup.hookCompletedAt),
|
|
20335
|
+
finishedAt: setup.finishedAt == null ? null : Number(setup.finishedAt),
|
|
20336
|
+
updatedAt: Number(setup.updatedAt || Date.now())
|
|
20337
|
+
};
|
|
20338
|
+
}
|
|
20307
20339
|
function normalizeEnvironmentData(environment) {
|
|
20308
20340
|
const buildPolicy = environment.buildPolicy || environment.tracking || (environment.tagId ? { mode: "tag", tagId: environment.tagId } : {
|
|
20309
20341
|
mode: "pinned",
|
|
@@ -20317,7 +20349,8 @@ function normalizeEnvironmentData(environment) {
|
|
|
20317
20349
|
envName: environmentName,
|
|
20318
20350
|
environment: environmentName,
|
|
20319
20351
|
buildPolicy,
|
|
20320
|
-
tracking: environment.tracking || buildPolicy
|
|
20352
|
+
tracking: environment.tracking || buildPolicy,
|
|
20353
|
+
setup: normalizeEnvironmentSetupSummary(environment.setup)
|
|
20321
20354
|
};
|
|
20322
20355
|
}
|
|
20323
20356
|
var Environment = class {
|
|
@@ -20375,6 +20408,10 @@ var Environment = class {
|
|
|
20375
20408
|
get updateState() {
|
|
20376
20409
|
return this.envData.updateState;
|
|
20377
20410
|
}
|
|
20411
|
+
/** The latest setup/import run summary for this environment, when available. */
|
|
20412
|
+
get setup() {
|
|
20413
|
+
return this.envData.setup || null;
|
|
20414
|
+
}
|
|
20378
20415
|
/** Convenience flag for whether this environment trails the current tag target */
|
|
20379
20416
|
get isOutdated() {
|
|
20380
20417
|
return this.envData.updateState === "update_available";
|
|
@@ -20395,6 +20432,9 @@ var Environment = class {
|
|
|
20395
20432
|
get runtimeBaseUrl() {
|
|
20396
20433
|
return this.getRuntimeBaseUrl();
|
|
20397
20434
|
}
|
|
20435
|
+
syncEnvironmentData(envData) {
|
|
20436
|
+
this.envData = normalizeEnvironmentData(envData);
|
|
20437
|
+
}
|
|
20398
20438
|
get sessions() {
|
|
20399
20439
|
return {
|
|
20400
20440
|
list: async (options) => this.listSessions(options?.status || "active"),
|
|
@@ -21340,7 +21380,8 @@ var Environment = class {
|
|
|
21340
21380
|
method: "POST",
|
|
21341
21381
|
body: JSON.stringify({
|
|
21342
21382
|
records,
|
|
21343
|
-
batchSize: options.batchSize
|
|
21383
|
+
batchSize: options.batchSize,
|
|
21384
|
+
setupRunId: options.setupRunId
|
|
21344
21385
|
})
|
|
21345
21386
|
}
|
|
21346
21387
|
);
|
|
@@ -21488,18 +21529,12 @@ var EnvironmentSession = class extends Session {
|
|
|
21488
21529
|
}
|
|
21489
21530
|
get messages() {
|
|
21490
21531
|
return {
|
|
21491
|
-
list: (options = {}) => this.sessionDataRequest(
|
|
21492
|
-
"/messages",
|
|
21493
|
-
options
|
|
21494
|
-
)
|
|
21532
|
+
list: (options = {}) => this.sessionDataRequest("/messages", options)
|
|
21495
21533
|
};
|
|
21496
21534
|
}
|
|
21497
21535
|
get timeline() {
|
|
21498
21536
|
return {
|
|
21499
|
-
list: (options = {}) => this.sessionDataRequest(
|
|
21500
|
-
"/timeline",
|
|
21501
|
-
options
|
|
21502
|
-
)
|
|
21537
|
+
list: (options = {}) => this.sessionDataRequest("/timeline", options)
|
|
21503
21538
|
};
|
|
21504
21539
|
}
|
|
21505
21540
|
get jobs() {
|
|
@@ -21516,10 +21551,7 @@ var EnvironmentSession = class extends Session {
|
|
|
21516
21551
|
get heap() {
|
|
21517
21552
|
return {
|
|
21518
21553
|
entries: {
|
|
21519
|
-
list: (options = {}) => this.sessionDataRequest(
|
|
21520
|
-
"/heap/entries",
|
|
21521
|
-
options
|
|
21522
|
-
),
|
|
21554
|
+
list: (options = {}) => this.sessionDataRequest("/heap/entries", options),
|
|
21523
21555
|
get: (path6) => this.sessionDataRequest(
|
|
21524
21556
|
`/heap/entries/${encodeURIComponent(path6)}`
|
|
21525
21557
|
)
|
|
@@ -21563,10 +21595,7 @@ var EnvironmentSession = class extends Session {
|
|
|
21563
21595
|
const heap = normalizeHeapSnapshot({
|
|
21564
21596
|
entriesByPath: Object.fromEntries(
|
|
21565
21597
|
entries.map((entry) => {
|
|
21566
|
-
return entry?.path ? [
|
|
21567
|
-
entry.path,
|
|
21568
|
-
entry
|
|
21569
|
-
] : null;
|
|
21598
|
+
return entry?.path ? [entry.path, entry] : null;
|
|
21570
21599
|
}).filter(
|
|
21571
21600
|
(entry) => Boolean(entry)
|
|
21572
21601
|
)
|
|
@@ -21732,6 +21761,15 @@ var OntologyHandle = class {
|
|
|
21732
21761
|
disconnect: async () => this.granular.disconnectEffects(this.ontologyNameOrId)
|
|
21733
21762
|
};
|
|
21734
21763
|
}
|
|
21764
|
+
get importer() {
|
|
21765
|
+
return {
|
|
21766
|
+
onEnvironmentCreate: (handler) => this.granular.registerEnvironmentImporter(
|
|
21767
|
+
this.ontologyNameOrId,
|
|
21768
|
+
handler
|
|
21769
|
+
),
|
|
21770
|
+
clear: () => this.granular.clearEnvironmentImporter(this.ontologyNameOrId)
|
|
21771
|
+
};
|
|
21772
|
+
}
|
|
21735
21773
|
};
|
|
21736
21774
|
var Granular = class _Granular {
|
|
21737
21775
|
apiKey;
|
|
@@ -21748,6 +21786,10 @@ var Granular = class _Granular {
|
|
|
21748
21786
|
sandboxEffectHosts = /* @__PURE__ */ new Map();
|
|
21749
21787
|
/** In-flight host connection promises to avoid duplicate concurrent connects */
|
|
21750
21788
|
sandboxEffectHostPromises = /* @__PURE__ */ new Map();
|
|
21789
|
+
/** Ontology-bound environment importer hooks keyed by the caller's ontology identifier. */
|
|
21790
|
+
ontologyImporters = /* @__PURE__ */ new Map();
|
|
21791
|
+
/** Resolved importer hooks keyed by sandboxId for fast lookups during openEnvironment(). */
|
|
21792
|
+
sandboxImporters = /* @__PURE__ */ new Map();
|
|
21751
21793
|
/**
|
|
21752
21794
|
* Create a new Granular client
|
|
21753
21795
|
* @param options - Client configuration
|
|
@@ -21773,6 +21815,18 @@ var Granular = class _Granular {
|
|
|
21773
21815
|
ontology(ontologyNameOrId) {
|
|
21774
21816
|
return new OntologyHandle(this, ontologyNameOrId);
|
|
21775
21817
|
}
|
|
21818
|
+
registerEnvironmentImporter(ontologyNameOrId, handler) {
|
|
21819
|
+
this.ontologyImporters.set(ontologyNameOrId, handler);
|
|
21820
|
+
if (ontologyNameOrId.startsWith("sbx_")) {
|
|
21821
|
+
this.sandboxImporters.set(ontologyNameOrId, handler);
|
|
21822
|
+
}
|
|
21823
|
+
}
|
|
21824
|
+
clearEnvironmentImporter(ontologyNameOrId) {
|
|
21825
|
+
this.ontologyImporters.delete(ontologyNameOrId);
|
|
21826
|
+
if (ontologyNameOrId.startsWith("sbx_")) {
|
|
21827
|
+
this.sandboxImporters.delete(ontologyNameOrId);
|
|
21828
|
+
}
|
|
21829
|
+
}
|
|
21776
21830
|
/**
|
|
21777
21831
|
* Records/upserts a user and prepares them for sandbox connections
|
|
21778
21832
|
*
|
|
@@ -21889,11 +21943,13 @@ var Granular = class _Granular {
|
|
|
21889
21943
|
* ```
|
|
21890
21944
|
*/
|
|
21891
21945
|
async openEnvironment(options) {
|
|
21892
|
-
const
|
|
21946
|
+
const resolved = await this.resolveOpenEnvironmentData(
|
|
21893
21947
|
options,
|
|
21894
21948
|
"openEnvironment"
|
|
21895
21949
|
);
|
|
21896
|
-
|
|
21950
|
+
const environment = this.bindEnvironmentHandle(resolved.environment);
|
|
21951
|
+
await this.maybeRunEnvironmentImporter(resolved, environment);
|
|
21952
|
+
return environment;
|
|
21897
21953
|
}
|
|
21898
21954
|
/**
|
|
21899
21955
|
* Deprecated compatibility alias for `openEnvironment()`.
|
|
@@ -21980,7 +22036,12 @@ var Granular = class _Granular {
|
|
|
21980
22036
|
)
|
|
21981
22037
|
);
|
|
21982
22038
|
if (currentMatches.length > 0) {
|
|
21983
|
-
return
|
|
22039
|
+
return {
|
|
22040
|
+
environment: currentMatches[0],
|
|
22041
|
+
requestedOntology: ontology,
|
|
22042
|
+
sandboxId: sandbox.sandboxId,
|
|
22043
|
+
subjectId: user.granularId
|
|
22044
|
+
};
|
|
21984
22045
|
}
|
|
21985
22046
|
const outdatedMatches = this.sortEnvironmentsByRecency(
|
|
21986
22047
|
userEnvironments.filter(
|
|
@@ -21988,14 +22049,25 @@ var Granular = class _Granular {
|
|
|
21988
22049
|
)
|
|
21989
22050
|
);
|
|
21990
22051
|
if (outdatedMatches.length > 0 && options.createFreshIfOutdated !== true) {
|
|
21991
|
-
return
|
|
22052
|
+
return {
|
|
22053
|
+
environment: outdatedMatches[0],
|
|
22054
|
+
requestedOntology: ontology,
|
|
22055
|
+
sandboxId: sandbox.sandboxId,
|
|
22056
|
+
subjectId: user.granularId
|
|
22057
|
+
};
|
|
21992
22058
|
}
|
|
21993
|
-
return
|
|
22059
|
+
return {
|
|
22060
|
+
environment: await this.environments.create(sandbox.sandboxId, {
|
|
22061
|
+
subjectId: user.granularId,
|
|
22062
|
+
environment: this.buildManagedEnvironmentName(tagName, targetVersionId),
|
|
22063
|
+
tagId: tag2.tagId,
|
|
22064
|
+
permissionProfileId: null
|
|
22065
|
+
}),
|
|
22066
|
+
requestedOntology: ontology,
|
|
22067
|
+
sandboxId: sandbox.sandboxId,
|
|
21994
22068
|
subjectId: user.granularId,
|
|
21995
|
-
|
|
21996
|
-
|
|
21997
|
-
permissionProfileId: null
|
|
21998
|
-
});
|
|
22069
|
+
setupTriggerReason: outdatedMatches.length > 0 ? "fresh_after_version_update" : "new_environment"
|
|
22070
|
+
};
|
|
21999
22071
|
}
|
|
22000
22072
|
/**
|
|
22001
22073
|
* List active (open) sessions for an environment — each session is one agent conversation thread.
|
|
@@ -22112,6 +22184,80 @@ var Granular = class _Granular {
|
|
|
22112
22184
|
});
|
|
22113
22185
|
return this.connectSession({ sessionId, clientId: options?.clientId });
|
|
22114
22186
|
}
|
|
22187
|
+
resolveEnvironmentImporter(requestedOntology, sandboxId) {
|
|
22188
|
+
const resolved = this.sandboxImporters.get(sandboxId) || this.ontologyImporters.get(requestedOntology);
|
|
22189
|
+
if (resolved && !this.sandboxImporters.has(sandboxId) && this.ontologyImporters.get(requestedOntology) === resolved) {
|
|
22190
|
+
this.sandboxImporters.set(sandboxId, resolved);
|
|
22191
|
+
}
|
|
22192
|
+
return resolved;
|
|
22193
|
+
}
|
|
22194
|
+
async maybeRunEnvironmentImporter(resolved, environment) {
|
|
22195
|
+
if (!resolved.setupTriggerReason) {
|
|
22196
|
+
return;
|
|
22197
|
+
}
|
|
22198
|
+
const importer = this.resolveEnvironmentImporter(
|
|
22199
|
+
resolved.requestedOntology,
|
|
22200
|
+
resolved.sandboxId
|
|
22201
|
+
);
|
|
22202
|
+
if (!importer) {
|
|
22203
|
+
return;
|
|
22204
|
+
}
|
|
22205
|
+
const setupRun = await this.request(
|
|
22206
|
+
`/control/environments/${environment.environmentId}/setup-runs`,
|
|
22207
|
+
{
|
|
22208
|
+
method: "POST",
|
|
22209
|
+
body: JSON.stringify({
|
|
22210
|
+
triggerReason: resolved.setupTriggerReason
|
|
22211
|
+
})
|
|
22212
|
+
}
|
|
22213
|
+
);
|
|
22214
|
+
const setupRunId = setupRun.setupRunId;
|
|
22215
|
+
const updateSetupRun = async (patch) => {
|
|
22216
|
+
await this.request(
|
|
22217
|
+
`/control/environment-setup-runs/${setupRunId}`,
|
|
22218
|
+
{
|
|
22219
|
+
method: "PATCH",
|
|
22220
|
+
body: JSON.stringify(patch)
|
|
22221
|
+
}
|
|
22222
|
+
);
|
|
22223
|
+
};
|
|
22224
|
+
const importerContext = {
|
|
22225
|
+
environmentId: environment.environmentId,
|
|
22226
|
+
sandboxId: environment.sandboxId,
|
|
22227
|
+
subjectId: environment.subjectId,
|
|
22228
|
+
reason: resolved.setupTriggerReason,
|
|
22229
|
+
incrementTotalObjectsToImportCount: async (n) => {
|
|
22230
|
+
const safeIncrement = Math.max(0, Math.trunc(n));
|
|
22231
|
+
if (safeIncrement <= 0) {
|
|
22232
|
+
return;
|
|
22233
|
+
}
|
|
22234
|
+
await updateSetupRun({
|
|
22235
|
+
incrementTotalObjectsToImportCount: safeIncrement
|
|
22236
|
+
});
|
|
22237
|
+
},
|
|
22238
|
+
setStage: async (stage) => {
|
|
22239
|
+
await updateSetupRun({ stage });
|
|
22240
|
+
},
|
|
22241
|
+
importRecords: async (records, options) => environment.enqueueRecordImport(records, {
|
|
22242
|
+
batchSize: options?.batchSize,
|
|
22243
|
+
setupRunId
|
|
22244
|
+
})
|
|
22245
|
+
};
|
|
22246
|
+
try {
|
|
22247
|
+
await importer(importerContext);
|
|
22248
|
+
await updateSetupRun({ markHookCompleted: true });
|
|
22249
|
+
const refreshedEnvironment = await this.environments.get(
|
|
22250
|
+
environment.environmentId
|
|
22251
|
+
);
|
|
22252
|
+
environment.syncEnvironmentData(refreshedEnvironment);
|
|
22253
|
+
} catch (error2) {
|
|
22254
|
+
await updateSetupRun({
|
|
22255
|
+
status: "failed",
|
|
22256
|
+
errorMessage: error2 instanceof Error ? error2.message : String(error2)
|
|
22257
|
+
}).catch(() => void 0);
|
|
22258
|
+
throw error2;
|
|
22259
|
+
}
|
|
22260
|
+
}
|
|
22115
22261
|
bindEnvironmentHandle(envData) {
|
|
22116
22262
|
const graphqlEndpoint = `${this.httpUrl}/orchestrator/graphql`;
|
|
22117
22263
|
return new Environment(this, envData, this.apiKey, graphqlEndpoint);
|
|
@@ -313,6 +313,7 @@ interface EnvironmentData {
|
|
|
313
313
|
tag?: VersionTag | null;
|
|
314
314
|
tracking?: BuildPolicy;
|
|
315
315
|
buildPolicy: BuildPolicy;
|
|
316
|
+
setup?: EnvironmentSetupSummary | null;
|
|
316
317
|
updateState?: "up_to_date" | "update_available" | "upgrading" | "failed";
|
|
317
318
|
createdAt: number;
|
|
318
319
|
updatedAt: number;
|
|
@@ -1105,6 +1106,7 @@ interface RecordImport {
|
|
|
1105
1106
|
environmentId: string;
|
|
1106
1107
|
sandboxId: string;
|
|
1107
1108
|
subjectId: string;
|
|
1109
|
+
setupRunId?: string | null;
|
|
1108
1110
|
status: RecordImportStatus;
|
|
1109
1111
|
batchSize: number;
|
|
1110
1112
|
errorMessage: string | null;
|
|
@@ -1121,6 +1123,37 @@ interface EnvironmentRecordImportSummary extends RecordImportStats {
|
|
|
1121
1123
|
activeImports: number;
|
|
1122
1124
|
updatedAt: number;
|
|
1123
1125
|
}
|
|
1126
|
+
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update";
|
|
1127
|
+
type EnvironmentSetupLifecycleStatus = "running" | "completed" | "failed";
|
|
1128
|
+
interface EnvironmentSetupSummary extends RecordImportStats {
|
|
1129
|
+
setupRunId: string;
|
|
1130
|
+
environmentId: string;
|
|
1131
|
+
sandboxId: string;
|
|
1132
|
+
subjectId: string;
|
|
1133
|
+
triggerReason: EnvironmentSetupTriggerReason;
|
|
1134
|
+
lifecycleStatus: EnvironmentSetupLifecycleStatus;
|
|
1135
|
+
stage: string | null;
|
|
1136
|
+
totalObjectsToImport: number;
|
|
1137
|
+
totalImports: number;
|
|
1138
|
+
activeImports: number;
|
|
1139
|
+
errorMessage: string | null;
|
|
1140
|
+
startedAt: number;
|
|
1141
|
+
hookCompletedAt: number | null;
|
|
1142
|
+
finishedAt: number | null;
|
|
1143
|
+
updatedAt: number;
|
|
1144
|
+
}
|
|
1145
|
+
interface EnvironmentImporterImportOptions {
|
|
1146
|
+
batchSize?: number;
|
|
1147
|
+
}
|
|
1148
|
+
interface EnvironmentImporter {
|
|
1149
|
+
environmentId: string;
|
|
1150
|
+
sandboxId: string;
|
|
1151
|
+
subjectId: string;
|
|
1152
|
+
reason: EnvironmentSetupTriggerReason;
|
|
1153
|
+
incrementTotalObjectsToImportCount: (n: number) => Promise<void>;
|
|
1154
|
+
setStage: (stage: string | null) => Promise<void>;
|
|
1155
|
+
importRecords: (records: RecordObjectOptions[], options?: EnvironmentImporterImportOptions) => Promise<RecordImport>;
|
|
1156
|
+
}
|
|
1124
1157
|
/**
|
|
1125
1158
|
* Property specification in a manifest operation
|
|
1126
1159
|
*/
|
|
@@ -1577,6 +1610,7 @@ declare class Session {
|
|
|
1577
1610
|
private checkForToolChanges;
|
|
1578
1611
|
}
|
|
1579
1612
|
|
|
1613
|
+
type EnvironmentImporterHandler = (importer: EnvironmentImporter) => Promise<void> | void;
|
|
1580
1614
|
/**
|
|
1581
1615
|
* Environment is the sessionless handle for one resolved ontology environment.
|
|
1582
1616
|
*
|
|
@@ -1612,6 +1646,8 @@ declare class Environment {
|
|
|
1612
1646
|
get buildPolicy(): BuildPolicy;
|
|
1613
1647
|
/** The current update state relative to the followed tag */
|
|
1614
1648
|
get updateState(): EnvironmentData["updateState"];
|
|
1649
|
+
/** The latest setup/import run summary for this environment, when available. */
|
|
1650
|
+
get setup(): EnvironmentSetupSummary | null;
|
|
1615
1651
|
/** Convenience flag for whether this environment trails the current tag target */
|
|
1616
1652
|
get isOutdated(): boolean;
|
|
1617
1653
|
/** The followed tag name when this environment is tag-tracked */
|
|
@@ -1622,6 +1658,7 @@ declare class Environment {
|
|
|
1622
1658
|
get authToken(): string;
|
|
1623
1659
|
/** Base runtime URL derived from the GraphQL endpoint */
|
|
1624
1660
|
get runtimeBaseUrl(): string;
|
|
1661
|
+
syncEnvironmentData(envData: EnvironmentData): void;
|
|
1625
1662
|
get sessions(): {
|
|
1626
1663
|
list: (options?: {
|
|
1627
1664
|
status?: "active" | "closed" | "all";
|
|
@@ -1926,6 +1963,7 @@ declare class Environment {
|
|
|
1926
1963
|
*/
|
|
1927
1964
|
enqueueRecordImport(records: RecordObjectOptions[], options?: {
|
|
1928
1965
|
batchSize?: number;
|
|
1966
|
+
setupRunId?: string;
|
|
1929
1967
|
}): Promise<RecordImport>;
|
|
1930
1968
|
/**
|
|
1931
1969
|
* List queued or completed record imports for this environment.
|
|
@@ -2081,6 +2119,10 @@ declare class OntologyHandle {
|
|
|
2081
2119
|
clear: () => Promise<void>;
|
|
2082
2120
|
disconnect: () => Promise<void>;
|
|
2083
2121
|
};
|
|
2122
|
+
get importer(): {
|
|
2123
|
+
onEnvironmentCreate: (handler: EnvironmentImporterHandler) => void;
|
|
2124
|
+
clear: () => void;
|
|
2125
|
+
};
|
|
2084
2126
|
}
|
|
2085
2127
|
declare class Granular {
|
|
2086
2128
|
private apiKey;
|
|
@@ -2097,6 +2139,10 @@ declare class Granular {
|
|
|
2097
2139
|
private sandboxEffectHosts;
|
|
2098
2140
|
/** In-flight host connection promises to avoid duplicate concurrent connects */
|
|
2099
2141
|
private sandboxEffectHostPromises;
|
|
2142
|
+
/** Ontology-bound environment importer hooks keyed by the caller's ontology identifier. */
|
|
2143
|
+
private ontologyImporters;
|
|
2144
|
+
/** Resolved importer hooks keyed by sandboxId for fast lookups during openEnvironment(). */
|
|
2145
|
+
private sandboxImporters;
|
|
2100
2146
|
/**
|
|
2101
2147
|
* Create a new Granular client
|
|
2102
2148
|
* @param options - Client configuration
|
|
@@ -2106,6 +2152,8 @@ declare class Granular {
|
|
|
2106
2152
|
* Return an ontology-scoped handle for effects and other ontology-level APIs.
|
|
2107
2153
|
*/
|
|
2108
2154
|
ontology(ontologyNameOrId: string): OntologyHandle;
|
|
2155
|
+
registerEnvironmentImporter(ontologyNameOrId: string, handler: EnvironmentImporterHandler): void;
|
|
2156
|
+
clearEnvironmentImporter(ontologyNameOrId: string): void;
|
|
2109
2157
|
/**
|
|
2110
2158
|
* Records/upserts a user and prepares them for sandbox connections
|
|
2111
2159
|
*
|
|
@@ -2204,6 +2252,8 @@ declare class Granular {
|
|
|
2204
2252
|
reopenSession(sessionId: string, options?: {
|
|
2205
2253
|
clientId?: string;
|
|
2206
2254
|
}): Promise<EnvironmentSession>;
|
|
2255
|
+
private resolveEnvironmentImporter;
|
|
2256
|
+
private maybeRunEnvironmentImporter;
|
|
2207
2257
|
private bindEnvironmentHandle;
|
|
2208
2258
|
private bindWebSocketEnvironmentSession;
|
|
2209
2259
|
private activateEnvironment;
|
|
@@ -2349,4 +2399,4 @@ declare class Granular {
|
|
|
2349
2399
|
private request;
|
|
2350
2400
|
}
|
|
2351
2401
|
|
|
2352
|
-
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type
|
|
2402
|
+
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type EnvironmentImporterImportOptions as a$, type ResolvedEffectPostCondition as a0, type ResolvedEffectDryRun as a1, type ResolvedEffectReverse as a2, type ResolvedEffectApprovalRequired as a3, type EffectInvocationMode as a4, type EffectInvocationMetadata as a5, type EffectSchema as a6, type EffectWithHandler as a7, type PublishEffectsResult as a8, type EffectVersionSelector as a9, type SessionJobListOptions as aA, type SessionCollectionListResult as aB, type WSDisconnectInfo as aC, type WSReconnectErrorInfo as aD, type WSClientOptions as aE, type RPCRequest as aF, type RPCResponse as aG, type SyncMessage as aH, type RPCRequestFromServer as aI, type ToolInvokeParams as aJ, type ToolResultParams as aK, type ModelRef as aL, type RelationshipInfo as aM, type DefineRelationshipOptions as aN, type RecordObjectOptions as aO, type RecordObjectResult as aP, type RecordObjectsChunkInfo as aQ, type RecordObjectsOptions as aR, type RecordImportStatus as aS, type RecordImportItemStatus as aT, type RecordImportStats as aU, type RecordImportItem as aV, type RecordImport as aW, type EnvironmentRecordImportSummary as aX, type EnvironmentSetupTriggerReason as aY, type EnvironmentSetupLifecycleStatus as aZ, type EnvironmentSetupSummary as a_, type ToolInfo as aa, type EffectInfo as ab, type ToolsChangedEvent as ac, type EffectsChangedEvent as ad, type EffectHandler as ae, type InstanceEffectHandler as af, type JobStatus as ag, type JobFeedbackSentiment as ah, type JobFeedbackToolCall as ai, type JobFeedbackMetadata as aj, type JobFeedbackInput as ak, type JobFeedbackRecord as al, type EnvironmentFeedbackRecord as am, type JobSubmitResult as an, type Job as ao, type ConversationMessageShowRefs as ap, type ConversationMessageInput as aq, type ConversationAppendResult as ar, type SessionConversationMessage as as, type SessionTimelineEvent as at, type SessionJobRecord as au, type SessionHeapFieldType as av, type SessionHeapFieldValue as aw, type SessionHeapVariable as ax, type SessionDocumentResult as ay, type SessionCollectionListOptions as az, type SessionHeapList as b, type EnvironmentImporter as b0, type ManifestPropertySpec as b1, type ManifestValidationOperator as b2, type ManifestEnumRuleSpec as b3, type ManifestFilterBySpec as b4, type ManifestValidationRuleSpec as b5, type ManifestStateMachineStateSpec as b6, type ManifestStateMachineTransitionSpec as b7, type ManifestStateMachineSpec as b8, type ManifestPostConditionSpec as b9, type ManifestDryRunSpec as ba, type ManifestReverseSpec as bb, type ManifestApprovalRequiredSpec as bc, type ManifestRelationshipDef as bd, type ManifestEffectSchema as be, type ManifestEffectDeclaration as bf, type ManifestEventTypeDef as bg, type ManifestEventStreamDef as bh, type ManifestOperation as bi, type ManifestImport as bj, type ManifestVolume as bk, type ManifestContent as bl, type GraphQLResult as bm, type APIError as bn, type DeleteResponse as bo, type StreamEvent as bp, type StreamSubscription as bq, type StreamStats as br, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, EnvironmentSession as f, Session as g, type ToolSchema as h, type PublishToolsResult as i, type ToolHandler as j, type GranularOptions as k, type GranularAuth as l, type RecordUserOptions as m, type Subject as n, type OpenEnvironmentOptions as o, type CreateSessionOptions as p, type ConversationSessionInfo as q, type Sandbox as r, type CreateSandboxData as s, type SandboxListResponse as t, type PermissionRules as u, type PermissionProfile as v, type CreatePermissionProfileData as w, type PermissionProfileListResponse as x, type Assignment as y, type AssignmentListResponse as z };
|
|
@@ -313,6 +313,7 @@ interface EnvironmentData {
|
|
|
313
313
|
tag?: VersionTag | null;
|
|
314
314
|
tracking?: BuildPolicy;
|
|
315
315
|
buildPolicy: BuildPolicy;
|
|
316
|
+
setup?: EnvironmentSetupSummary | null;
|
|
316
317
|
updateState?: "up_to_date" | "update_available" | "upgrading" | "failed";
|
|
317
318
|
createdAt: number;
|
|
318
319
|
updatedAt: number;
|
|
@@ -1105,6 +1106,7 @@ interface RecordImport {
|
|
|
1105
1106
|
environmentId: string;
|
|
1106
1107
|
sandboxId: string;
|
|
1107
1108
|
subjectId: string;
|
|
1109
|
+
setupRunId?: string | null;
|
|
1108
1110
|
status: RecordImportStatus;
|
|
1109
1111
|
batchSize: number;
|
|
1110
1112
|
errorMessage: string | null;
|
|
@@ -1121,6 +1123,37 @@ interface EnvironmentRecordImportSummary extends RecordImportStats {
|
|
|
1121
1123
|
activeImports: number;
|
|
1122
1124
|
updatedAt: number;
|
|
1123
1125
|
}
|
|
1126
|
+
type EnvironmentSetupTriggerReason = "new_environment" | "fresh_after_version_update";
|
|
1127
|
+
type EnvironmentSetupLifecycleStatus = "running" | "completed" | "failed";
|
|
1128
|
+
interface EnvironmentSetupSummary extends RecordImportStats {
|
|
1129
|
+
setupRunId: string;
|
|
1130
|
+
environmentId: string;
|
|
1131
|
+
sandboxId: string;
|
|
1132
|
+
subjectId: string;
|
|
1133
|
+
triggerReason: EnvironmentSetupTriggerReason;
|
|
1134
|
+
lifecycleStatus: EnvironmentSetupLifecycleStatus;
|
|
1135
|
+
stage: string | null;
|
|
1136
|
+
totalObjectsToImport: number;
|
|
1137
|
+
totalImports: number;
|
|
1138
|
+
activeImports: number;
|
|
1139
|
+
errorMessage: string | null;
|
|
1140
|
+
startedAt: number;
|
|
1141
|
+
hookCompletedAt: number | null;
|
|
1142
|
+
finishedAt: number | null;
|
|
1143
|
+
updatedAt: number;
|
|
1144
|
+
}
|
|
1145
|
+
interface EnvironmentImporterImportOptions {
|
|
1146
|
+
batchSize?: number;
|
|
1147
|
+
}
|
|
1148
|
+
interface EnvironmentImporter {
|
|
1149
|
+
environmentId: string;
|
|
1150
|
+
sandboxId: string;
|
|
1151
|
+
subjectId: string;
|
|
1152
|
+
reason: EnvironmentSetupTriggerReason;
|
|
1153
|
+
incrementTotalObjectsToImportCount: (n: number) => Promise<void>;
|
|
1154
|
+
setStage: (stage: string | null) => Promise<void>;
|
|
1155
|
+
importRecords: (records: RecordObjectOptions[], options?: EnvironmentImporterImportOptions) => Promise<RecordImport>;
|
|
1156
|
+
}
|
|
1124
1157
|
/**
|
|
1125
1158
|
* Property specification in a manifest operation
|
|
1126
1159
|
*/
|
|
@@ -1577,6 +1610,7 @@ declare class Session {
|
|
|
1577
1610
|
private checkForToolChanges;
|
|
1578
1611
|
}
|
|
1579
1612
|
|
|
1613
|
+
type EnvironmentImporterHandler = (importer: EnvironmentImporter) => Promise<void> | void;
|
|
1580
1614
|
/**
|
|
1581
1615
|
* Environment is the sessionless handle for one resolved ontology environment.
|
|
1582
1616
|
*
|
|
@@ -1612,6 +1646,8 @@ declare class Environment {
|
|
|
1612
1646
|
get buildPolicy(): BuildPolicy;
|
|
1613
1647
|
/** The current update state relative to the followed tag */
|
|
1614
1648
|
get updateState(): EnvironmentData["updateState"];
|
|
1649
|
+
/** The latest setup/import run summary for this environment, when available. */
|
|
1650
|
+
get setup(): EnvironmentSetupSummary | null;
|
|
1615
1651
|
/** Convenience flag for whether this environment trails the current tag target */
|
|
1616
1652
|
get isOutdated(): boolean;
|
|
1617
1653
|
/** The followed tag name when this environment is tag-tracked */
|
|
@@ -1622,6 +1658,7 @@ declare class Environment {
|
|
|
1622
1658
|
get authToken(): string;
|
|
1623
1659
|
/** Base runtime URL derived from the GraphQL endpoint */
|
|
1624
1660
|
get runtimeBaseUrl(): string;
|
|
1661
|
+
syncEnvironmentData(envData: EnvironmentData): void;
|
|
1625
1662
|
get sessions(): {
|
|
1626
1663
|
list: (options?: {
|
|
1627
1664
|
status?: "active" | "closed" | "all";
|
|
@@ -1926,6 +1963,7 @@ declare class Environment {
|
|
|
1926
1963
|
*/
|
|
1927
1964
|
enqueueRecordImport(records: RecordObjectOptions[], options?: {
|
|
1928
1965
|
batchSize?: number;
|
|
1966
|
+
setupRunId?: string;
|
|
1929
1967
|
}): Promise<RecordImport>;
|
|
1930
1968
|
/**
|
|
1931
1969
|
* List queued or completed record imports for this environment.
|
|
@@ -2081,6 +2119,10 @@ declare class OntologyHandle {
|
|
|
2081
2119
|
clear: () => Promise<void>;
|
|
2082
2120
|
disconnect: () => Promise<void>;
|
|
2083
2121
|
};
|
|
2122
|
+
get importer(): {
|
|
2123
|
+
onEnvironmentCreate: (handler: EnvironmentImporterHandler) => void;
|
|
2124
|
+
clear: () => void;
|
|
2125
|
+
};
|
|
2084
2126
|
}
|
|
2085
2127
|
declare class Granular {
|
|
2086
2128
|
private apiKey;
|
|
@@ -2097,6 +2139,10 @@ declare class Granular {
|
|
|
2097
2139
|
private sandboxEffectHosts;
|
|
2098
2140
|
/** In-flight host connection promises to avoid duplicate concurrent connects */
|
|
2099
2141
|
private sandboxEffectHostPromises;
|
|
2142
|
+
/** Ontology-bound environment importer hooks keyed by the caller's ontology identifier. */
|
|
2143
|
+
private ontologyImporters;
|
|
2144
|
+
/** Resolved importer hooks keyed by sandboxId for fast lookups during openEnvironment(). */
|
|
2145
|
+
private sandboxImporters;
|
|
2100
2146
|
/**
|
|
2101
2147
|
* Create a new Granular client
|
|
2102
2148
|
* @param options - Client configuration
|
|
@@ -2106,6 +2152,8 @@ declare class Granular {
|
|
|
2106
2152
|
* Return an ontology-scoped handle for effects and other ontology-level APIs.
|
|
2107
2153
|
*/
|
|
2108
2154
|
ontology(ontologyNameOrId: string): OntologyHandle;
|
|
2155
|
+
registerEnvironmentImporter(ontologyNameOrId: string, handler: EnvironmentImporterHandler): void;
|
|
2156
|
+
clearEnvironmentImporter(ontologyNameOrId: string): void;
|
|
2109
2157
|
/**
|
|
2110
2158
|
* Records/upserts a user and prepares them for sandbox connections
|
|
2111
2159
|
*
|
|
@@ -2204,6 +2252,8 @@ declare class Granular {
|
|
|
2204
2252
|
reopenSession(sessionId: string, options?: {
|
|
2205
2253
|
clientId?: string;
|
|
2206
2254
|
}): Promise<EnvironmentSession>;
|
|
2255
|
+
private resolveEnvironmentImporter;
|
|
2256
|
+
private maybeRunEnvironmentImporter;
|
|
2207
2257
|
private bindEnvironmentHandle;
|
|
2208
2258
|
private bindWebSocketEnvironmentSession;
|
|
2209
2259
|
private activateEnvironment;
|
|
@@ -2349,4 +2399,4 @@ declare class Granular {
|
|
|
2349
2399
|
private request;
|
|
2350
2400
|
}
|
|
2351
2401
|
|
|
2352
|
-
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type
|
|
2402
|
+
export { type SemanticVersionDiff as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type VersionTag as F, Granular as G, type EnvironmentData as H, type InstanceToolHandler as I, type CreateEnvironmentData as J, type EnvironmentListResponse as K, type Manifest as L, type ManifestEffectMetamodelSpec as M, type ManifestListResponse as N, OntologyHandle as O, type Prompt as P, type BuildStatus as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type Build as X, type Version as Y, type BuildListResponse as Z, type SemanticVersionDiffEntry as _, type EffectHandlerContext as a, type EnvironmentImporterImportOptions as a$, type ResolvedEffectPostCondition as a0, type ResolvedEffectDryRun as a1, type ResolvedEffectReverse as a2, type ResolvedEffectApprovalRequired as a3, type EffectInvocationMode as a4, type EffectInvocationMetadata as a5, type EffectSchema as a6, type EffectWithHandler as a7, type PublishEffectsResult as a8, type EffectVersionSelector as a9, type SessionJobListOptions as aA, type SessionCollectionListResult as aB, type WSDisconnectInfo as aC, type WSReconnectErrorInfo as aD, type WSClientOptions as aE, type RPCRequest as aF, type RPCResponse as aG, type SyncMessage as aH, type RPCRequestFromServer as aI, type ToolInvokeParams as aJ, type ToolResultParams as aK, type ModelRef as aL, type RelationshipInfo as aM, type DefineRelationshipOptions as aN, type RecordObjectOptions as aO, type RecordObjectResult as aP, type RecordObjectsChunkInfo as aQ, type RecordObjectsOptions as aR, type RecordImportStatus as aS, type RecordImportItemStatus as aT, type RecordImportStats as aU, type RecordImportItem as aV, type RecordImport as aW, type EnvironmentRecordImportSummary as aX, type EnvironmentSetupTriggerReason as aY, type EnvironmentSetupLifecycleStatus as aZ, type EnvironmentSetupSummary as a_, type ToolInfo as aa, type EffectInfo as ab, type ToolsChangedEvent as ac, type EffectsChangedEvent as ad, type EffectHandler as ae, type InstanceEffectHandler as af, type JobStatus as ag, type JobFeedbackSentiment as ah, type JobFeedbackToolCall as ai, type JobFeedbackMetadata as aj, type JobFeedbackInput as ak, type JobFeedbackRecord as al, type EnvironmentFeedbackRecord as am, type JobSubmitResult as an, type Job as ao, type ConversationMessageShowRefs as ap, type ConversationMessageInput as aq, type ConversationAppendResult as ar, type SessionConversationMessage as as, type SessionTimelineEvent as at, type SessionJobRecord as au, type SessionHeapFieldType as av, type SessionHeapFieldValue as aw, type SessionHeapVariable as ax, type SessionDocumentResult as ay, type SessionCollectionListOptions as az, type SessionHeapList as b, type EnvironmentImporter as b0, type ManifestPropertySpec as b1, type ManifestValidationOperator as b2, type ManifestEnumRuleSpec as b3, type ManifestFilterBySpec as b4, type ManifestValidationRuleSpec as b5, type ManifestStateMachineStateSpec as b6, type ManifestStateMachineTransitionSpec as b7, type ManifestStateMachineSpec as b8, type ManifestPostConditionSpec as b9, type ManifestDryRunSpec as ba, type ManifestReverseSpec as bb, type ManifestApprovalRequiredSpec as bc, type ManifestRelationshipDef as bd, type ManifestEffectSchema as be, type ManifestEffectDeclaration as bf, type ManifestEventTypeDef as bg, type ManifestEventStreamDef as bh, type ManifestOperation as bi, type ManifestImport as bj, type ManifestVolume as bk, type ManifestContent as bl, type GraphQLResult as bm, type APIError as bn, type DeleteResponse as bo, type StreamEvent as bp, type StreamSubscription as bq, type StreamStats as br, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, EnvironmentSession as f, Session as g, type ToolSchema as h, type PublishToolsResult as i, type ToolHandler as j, type GranularOptions as k, type GranularAuth as l, type RecordUserOptions as m, type Subject as n, type OpenEnvironmentOptions as o, type CreateSessionOptions as p, type ConversationSessionInfo as q, type Sandbox as r, type CreateSandboxData as s, type SandboxListResponse as t, type PermissionRules as u, type PermissionProfile as v, type CreatePermissionProfileData as w, type PermissionProfileListResponse as x, type Assignment as y, type AssignmentListResponse as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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 './client-
|
|
2
|
-
export {
|
|
1
|
+
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 './client-Cq8onk2D.mjs';
|
|
2
|
+
export { bn as APIError, A as AccessTokenProvider, y as Assignment, z as AssignmentListResponse, X as Build, Z as BuildListResponse, B as BuildPolicy, Q as BuildStatus, C as ConnectOptions, ar as ConversationAppendResult, aq as ConversationMessageInput, ap as ConversationMessageShowRefs, q as ConversationSessionInfo, J as CreateEnvironmentData, w as CreatePermissionProfileData, s as CreateSandboxData, p as CreateSessionOptions, aN as DefineRelationshipOptions, bo as DeleteResponse, D as DomainState, ae as EffectHandler, ab as EffectInfo, a5 as EffectInvocationMetadata, a4 as EffectInvocationMode, a6 as EffectSchema, a9 as EffectVersionSelector, a7 as EffectWithHandler, ad as EffectsChangedEvent, e as Environment, H as EnvironmentData, am as EnvironmentFeedbackRecord, b0 as EnvironmentImporter, a$ as EnvironmentImporterImportOptions, K as EnvironmentListResponse, aX as EnvironmentRecordImportSummary, f as EnvironmentSession, aZ as EnvironmentSetupLifecycleStatus, a_ as EnvironmentSetupSummary, aY as EnvironmentSetupTriggerReason, G as Granular, l as GranularAuth, k as GranularOptions, bm as GraphQLResult, af as InstanceEffectHandler, I as InstanceToolHandler, ao as Job, ak as JobFeedbackInput, aj as JobFeedbackMetadata, al as JobFeedbackRecord, ah as JobFeedbackSentiment, ai as JobFeedbackToolCall, ag as JobStatus, an as JobSubmitResult, L as Manifest, bc as ManifestApprovalRequiredSpec, bl as ManifestContent, ba as ManifestDryRunSpec, bf as ManifestEffectDeclaration, be as ManifestEffectSchema, b3 as ManifestEnumRuleSpec, bh as ManifestEventStreamDef, bg as ManifestEventTypeDef, b4 as ManifestFilterBySpec, bj as ManifestImport, N as ManifestListResponse, bi as ManifestOperation, b9 as ManifestPostConditionSpec, b1 as ManifestPropertySpec, bd as ManifestRelationshipDef, bb as ManifestReverseSpec, b8 as ManifestStateMachineSpec, b6 as ManifestStateMachineStateSpec, b7 as ManifestStateMachineTransitionSpec, b2 as ManifestValidationOperator, b5 as ManifestValidationRuleSpec, bk as ManifestVolume, aL as ModelRef, O as OntologyHandle, o as OpenEnvironmentOptions, v as PermissionProfile, x as PermissionProfileListResponse, u as PermissionRules, a8 as PublishEffectsResult, i as PublishToolsResult, aF as RPCRequest, aI as RPCRequestFromServer, aG as RPCResponse, aW as RecordImport, aV as RecordImportItem, aT as RecordImportItemStatus, aU as RecordImportStats, aS as RecordImportStatus, aO as RecordObjectOptions, aP as RecordObjectResult, aQ as RecordObjectsChunkInfo, aR as RecordObjectsOptions, m as RecordUserOptions, aM as RelationshipInfo, a3 as ResolvedEffectApprovalRequired, a1 as ResolvedEffectDryRun, a0 as ResolvedEffectPostCondition, a2 as ResolvedEffectReverse, r as Sandbox, t as SandboxListResponse, $ as SemanticVersionDiff, _ as SemanticVersionDiffEntry, g as Session, az as SessionCollectionListOptions, aB as SessionCollectionListResult, as as SessionConversationMessage, ay as SessionDocumentResult, av as SessionHeapFieldType, aw as SessionHeapFieldValue, ax as SessionHeapVariable, aA as SessionJobListOptions, au as SessionJobRecord, at as SessionTimelineEvent, bp as StreamEvent, br as StreamStats, bq as StreamSubscription, n as Subject, aH as SyncMessage, j as ToolHandler, aa as ToolInfo, aJ as ToolInvokeParams, aK as ToolResultParams, h as ToolSchema, ac as ToolsChangedEvent, U as User, Y as Version, F as VersionTag, V as VersionTracking, W as WSClient, aE as WSClientOptions, aC as WSDisconnectInfo, aD as WSReconnectErrorInfo } from './client-Cq8onk2D.mjs';
|
|
3
3
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.mjs';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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 './client-
|
|
2
|
-
export {
|
|
1
|
+
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 './client-Cq8onk2D.js';
|
|
2
|
+
export { bn as APIError, A as AccessTokenProvider, y as Assignment, z as AssignmentListResponse, X as Build, Z as BuildListResponse, B as BuildPolicy, Q as BuildStatus, C as ConnectOptions, ar as ConversationAppendResult, aq as ConversationMessageInput, ap as ConversationMessageShowRefs, q as ConversationSessionInfo, J as CreateEnvironmentData, w as CreatePermissionProfileData, s as CreateSandboxData, p as CreateSessionOptions, aN as DefineRelationshipOptions, bo as DeleteResponse, D as DomainState, ae as EffectHandler, ab as EffectInfo, a5 as EffectInvocationMetadata, a4 as EffectInvocationMode, a6 as EffectSchema, a9 as EffectVersionSelector, a7 as EffectWithHandler, ad as EffectsChangedEvent, e as Environment, H as EnvironmentData, am as EnvironmentFeedbackRecord, b0 as EnvironmentImporter, a$ as EnvironmentImporterImportOptions, K as EnvironmentListResponse, aX as EnvironmentRecordImportSummary, f as EnvironmentSession, aZ as EnvironmentSetupLifecycleStatus, a_ as EnvironmentSetupSummary, aY as EnvironmentSetupTriggerReason, G as Granular, l as GranularAuth, k as GranularOptions, bm as GraphQLResult, af as InstanceEffectHandler, I as InstanceToolHandler, ao as Job, ak as JobFeedbackInput, aj as JobFeedbackMetadata, al as JobFeedbackRecord, ah as JobFeedbackSentiment, ai as JobFeedbackToolCall, ag as JobStatus, an as JobSubmitResult, L as Manifest, bc as ManifestApprovalRequiredSpec, bl as ManifestContent, ba as ManifestDryRunSpec, bf as ManifestEffectDeclaration, be as ManifestEffectSchema, b3 as ManifestEnumRuleSpec, bh as ManifestEventStreamDef, bg as ManifestEventTypeDef, b4 as ManifestFilterBySpec, bj as ManifestImport, N as ManifestListResponse, bi as ManifestOperation, b9 as ManifestPostConditionSpec, b1 as ManifestPropertySpec, bd as ManifestRelationshipDef, bb as ManifestReverseSpec, b8 as ManifestStateMachineSpec, b6 as ManifestStateMachineStateSpec, b7 as ManifestStateMachineTransitionSpec, b2 as ManifestValidationOperator, b5 as ManifestValidationRuleSpec, bk as ManifestVolume, aL as ModelRef, O as OntologyHandle, o as OpenEnvironmentOptions, v as PermissionProfile, x as PermissionProfileListResponse, u as PermissionRules, a8 as PublishEffectsResult, i as PublishToolsResult, aF as RPCRequest, aI as RPCRequestFromServer, aG as RPCResponse, aW as RecordImport, aV as RecordImportItem, aT as RecordImportItemStatus, aU as RecordImportStats, aS as RecordImportStatus, aO as RecordObjectOptions, aP as RecordObjectResult, aQ as RecordObjectsChunkInfo, aR as RecordObjectsOptions, m as RecordUserOptions, aM as RelationshipInfo, a3 as ResolvedEffectApprovalRequired, a1 as ResolvedEffectDryRun, a0 as ResolvedEffectPostCondition, a2 as ResolvedEffectReverse, r as Sandbox, t as SandboxListResponse, $ as SemanticVersionDiff, _ as SemanticVersionDiffEntry, g as Session, az as SessionCollectionListOptions, aB as SessionCollectionListResult, as as SessionConversationMessage, ay as SessionDocumentResult, av as SessionHeapFieldType, aw as SessionHeapFieldValue, ax as SessionHeapVariable, aA as SessionJobListOptions, au as SessionJobRecord, at as SessionTimelineEvent, bp as StreamEvent, br as StreamStats, bq as StreamSubscription, n as Subject, aH as SyncMessage, j as ToolHandler, aa as ToolInfo, aJ as ToolInvokeParams, aK as ToolResultParams, h as ToolSchema, ac as ToolsChangedEvent, U as User, Y as Version, F as VersionTag, V as VersionTracking, W as WSClient, aE as WSClientOptions, aC as WSDisconnectInfo, aD as WSReconnectErrorInfo } from './client-Cq8onk2D.js';
|
|
3
3
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentReferentBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.js';
|
|
4
4
|
import '@automerge/automerge';
|
|
5
5
|
import '@automerge/automerge/slim';
|