@granular-software/sdk 0.4.61 → 0.4.63
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 +8 -0
- package/dist/agent-evals.d.mts +2 -2
- package/dist/agent-evals.d.ts +2 -2
- package/dist/agent-evals.js +98 -44
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +98 -44
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +130 -66
- package/dist/{client-BzgQvNyG.d.ts → client-KqJIH7WE.d.ts} +8 -4
- package/dist/{client-DSkGcmmX.d.mts → client-lk-dmdKR.d.mts} +8 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +98 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -44
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-CNe-Ff6U.d.mts → spend-DtsHRNb5.d.mts} +25 -7
- package/dist/{spend-CNe-Ff6U.d.ts → spend-DtsHRNb5.d.ts} +25 -7
- 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
|
@@ -7809,7 +7809,6 @@ var ApiClient = class {
|
|
|
7809
7809
|
headers: {
|
|
7810
7810
|
Authorization: `Bearer ${this.apiKey}`,
|
|
7811
7811
|
"Content-Type": "application/json",
|
|
7812
|
-
Connection: "close",
|
|
7813
7812
|
...options.headers
|
|
7814
7813
|
}
|
|
7815
7814
|
});
|
|
@@ -7863,10 +7862,20 @@ var ApiClient = class {
|
|
|
7863
7862
|
}
|
|
7864
7863
|
// ── Manifests ──
|
|
7865
7864
|
async listManifests(sandboxId) {
|
|
7866
|
-
const
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7865
|
+
const manifests = [];
|
|
7866
|
+
let cursor = null;
|
|
7867
|
+
do {
|
|
7868
|
+
const query = cursor ? `?limit=100&cursor=${encodeURIComponent(cursor)}` : "";
|
|
7869
|
+
const result = await this.request(
|
|
7870
|
+
`/control/sandboxes/${sandboxId}/manifests${query}`
|
|
7871
|
+
);
|
|
7872
|
+
manifests.push(...result.items);
|
|
7873
|
+
if (result.nextCursor && result.nextCursor === cursor) {
|
|
7874
|
+
throw new Error("Manifest pagination cursor did not advance");
|
|
7875
|
+
}
|
|
7876
|
+
cursor = result.nextCursor;
|
|
7877
|
+
} while (cursor);
|
|
7878
|
+
return manifests;
|
|
7870
7879
|
}
|
|
7871
7880
|
async getManifest(manifestId) {
|
|
7872
7881
|
return this.request(`/control/manifests/${manifestId}`);
|
|
@@ -15902,6 +15911,15 @@ var stateMachineMetamodelPackage = defineMetamodelPackage({
|
|
|
15902
15911
|
is_final: Boolean!
|
|
15903
15912
|
history: [StateMachineTransitionEvent!]!
|
|
15904
15913
|
instances_in_state(state: String!): [Model!]!
|
|
15914
|
+
instance_population(state: String!, page: Int = 1, per_page: Int = 50): StateMachineInstancePopulation!
|
|
15915
|
+
}
|
|
15916
|
+
|
|
15917
|
+
type StateMachineInstancePopulation {
|
|
15918
|
+
count: Int!
|
|
15919
|
+
instances: [Model!]!
|
|
15920
|
+
page: Int!
|
|
15921
|
+
per_page: Int!
|
|
15922
|
+
has_more: Boolean!
|
|
15905
15923
|
}
|
|
15906
15924
|
|
|
15907
15925
|
type StateMachineState {
|
|
@@ -16110,6 +16128,13 @@ var stateMachineMetamodelPackage = defineMetamodelPackage({
|
|
|
16110
16128
|
value.model.target || value.model,
|
|
16111
16129
|
value.name,
|
|
16112
16130
|
state
|
|
16131
|
+
),
|
|
16132
|
+
instance_population: async (value, { state, page, per_page }) => await stateMachines.instancePopulation(
|
|
16133
|
+
value.model.target || value.model,
|
|
16134
|
+
value.name,
|
|
16135
|
+
state,
|
|
16136
|
+
page,
|
|
16137
|
+
per_page
|
|
16113
16138
|
)
|
|
16114
16139
|
}
|
|
16115
16140
|
};
|
|
@@ -16827,7 +16852,7 @@ ${effectMetamodelTable}
|
|
|
16827
16852
|
| \`enqueueRecordImport\`, \`listRecordImports\`, \`getRecordImport\`, \`getRecordImportSummary\`, \u2026 | **Async** bulk import (worker queue + aggregate progress). Prefer when loads are huge, returning an \`importId\` is enough up front, and background processing is acceptable. |
|
|
16828
16853
|
| \`graphql(query, variables?)\` | **GraphQL** \u2014 see dedicated subsection below. |
|
|
16829
16854
|
| \`defineRelationship\`, \`getRelationships\`, \`attach\`, \`detach\`, \`listRelated\` | Imperative relationship operations (same ideas as manifest \`defineRelationship\`). |
|
|
16830
|
-
| \`sessions.list({ status?, sessionScope?, limit?,
|
|
16855
|
+
| \`sessions.list({ status?, sessionScope?, limit?, cursor? })\`, \`sessions.create({ sessionScope? })\`, \`sessions.connect()\`, \`sessions.reopen()\`, \`sessions.close()\` | Scoped, bounded session history and lifecycle for this environment. |
|
|
16831
16856
|
|
|
16832
16857
|
### \`Session\` (live runtime connection)
|
|
16833
16858
|
|
|
@@ -16876,7 +16901,7 @@ Use \`environment.graphql(query, variables?)\` when you need **query/mutation ac
|
|
|
16876
16901
|
| \`granular simulate\` | Open simulator in browser. |
|
|
16877
16902
|
| \`granular simulate --print-url\` | Print a deep-linkable simulator URL without opening the browser. |
|
|
16878
16903
|
| \`granular connect test --json\` | Verify auth and environment connectivity with a real session. |
|
|
16879
|
-
| \`granular session create/list/heap/doc --json\` | Create, enumerate, and inspect real session state. \`session list\` defaults to 25 rows; use \`--session-scope\`, \`--subject-id\`, \`--limit\`, and \`--
|
|
16904
|
+
| \`granular session create/list/heap/doc --json\` | Create, enumerate, and inspect real session state. \`session list\` defaults to 25 rows; use \`--session-scope\`, \`--subject-id\`, \`--limit\`, and the returned \`--cursor\` for deterministic paging. |
|
|
16880
16905
|
| \`granular graphql --query '...' --json\` | Run a GraphQL query or mutation against the live graph. |
|
|
16881
16906
|
| \`granular effects list/diff --json\` | Inspect declared versus live ready effects. |
|
|
16882
16907
|
| \`granular job run --file ./job.ts --json\` | Execute a real runtime job from the terminal or CI. |
|
|
@@ -17557,7 +17582,7 @@ Use this for command execution, environment setup, and shipping flows.
|
|
|
17557
17582
|
| \`granular effects list --json\` | Inspect declared and live effects for an environment |
|
|
17558
17583
|
| \`granular effects diff --json\` | Compare declared effects to live ready handlers |
|
|
17559
17584
|
| \`granular session create --session-scope <scope> --json\` | Create a fresh, application-scoped session for an environment |
|
|
17560
|
-
| \`granular session list --session-scope <scope> --limit 25 --
|
|
17585
|
+
| \`granular session list --session-scope <scope> --limit 25 --json\` | List one bounded page of indexed sessions; use the returned cursor for the next page |
|
|
17561
17586
|
| \`granular session heap --json\` | Inspect session heap |
|
|
17562
17587
|
| \`granular session doc --json\` | Inspect the Automerge-backed session document |
|
|
17563
17588
|
| \`granular job run --file ./job.ts\` | Execute a real job against the ontology runtime |
|
|
@@ -17641,7 +17666,7 @@ Use this for runtime debugging after the ontology builds but behavior does not m
|
|
|
17641
17666
|
| Goal | Preferred path |
|
|
17642
17667
|
| --- | --- |
|
|
17643
17668
|
| Create or rotate a session | \`granular session create --session-scope <scope> --json\` |
|
|
17644
|
-
| List known sessions | \`granular session list --session-scope <scope> --limit 25 --
|
|
17669
|
+
| List known sessions | \`granular session list --session-scope <scope> --limit 25 --json\` |
|
|
17645
17670
|
| Inspect heap | \`granular session heap --json\` |
|
|
17646
17671
|
| Inspect full document | \`granular session doc --json\` |
|
|
17647
17672
|
| Verify connectivity | \`granular connect test\` |
|
|
@@ -24217,7 +24242,6 @@ function buildEffectMetamodelMutations(toolPath, spec) {
|
|
|
24217
24242
|
// src/client.ts
|
|
24218
24243
|
var DEFAULT_CONVERSATION_SESSION_LIST_LIMIT = 100;
|
|
24219
24244
|
var MAX_CONVERSATION_SESSION_LIST_LIMIT = 500;
|
|
24220
|
-
var MAX_CONVERSATION_SESSION_LIST_OFFSET = 1e5;
|
|
24221
24245
|
function requireUserEnvironmentSequence(value, field) {
|
|
24222
24246
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) {
|
|
24223
24247
|
throw new Error(
|
|
@@ -24597,6 +24621,10 @@ var Environment = class _Environment {
|
|
|
24597
24621
|
get sessions() {
|
|
24598
24622
|
return {
|
|
24599
24623
|
list: async (options = {}) => this.listSessions(options),
|
|
24624
|
+
page: async (options = {}) => this.granular.listSessionsPage({
|
|
24625
|
+
...options,
|
|
24626
|
+
environmentId: this.environmentId
|
|
24627
|
+
}),
|
|
24600
24628
|
create: async (options) => this.createSession(options),
|
|
24601
24629
|
connect: async (sessionId, options) => this.connectSession(sessionId, options),
|
|
24602
24630
|
reopen: async (sessionId, options) => this.reopenSession(sessionId, options),
|
|
@@ -24852,7 +24880,6 @@ var Environment = class _Environment {
|
|
|
24852
24880
|
headers: {
|
|
24853
24881
|
Authorization: `Bearer ${this._apiKey}`,
|
|
24854
24882
|
"Content-Type": "application/json",
|
|
24855
|
-
Connection: "close",
|
|
24856
24883
|
...options.headers
|
|
24857
24884
|
}
|
|
24858
24885
|
});
|
|
@@ -26376,8 +26403,7 @@ var EnvironmentSession = class extends Session {
|
|
|
26376
26403
|
method: "POST",
|
|
26377
26404
|
headers: {
|
|
26378
26405
|
"Content-Type": "application/json",
|
|
26379
|
-
Authorization: `Bearer ${this.environment.authToken}
|
|
26380
|
-
Connection: "close"
|
|
26406
|
+
Authorization: `Bearer ${this.environment.authToken}`
|
|
26381
26407
|
},
|
|
26382
26408
|
body: JSON.stringify({
|
|
26383
26409
|
reason: "sdk_disconnect_http_fallback",
|
|
@@ -26905,11 +26931,16 @@ var Granular = class _Granular {
|
|
|
26905
26931
|
`${methodName}() requires at least one permission so the SDK can ensure assignments for new users.`
|
|
26906
26932
|
);
|
|
26907
26933
|
}
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26934
|
+
const permissionProfileIds = [];
|
|
26935
|
+
for (const profileReference of user.permissions) {
|
|
26936
|
+
permissionProfileIds.push(
|
|
26937
|
+
await this.ensurePermissionProfile(
|
|
26938
|
+
sandbox.sandboxId,
|
|
26939
|
+
profileReference
|
|
26940
|
+
)
|
|
26912
26941
|
);
|
|
26942
|
+
}
|
|
26943
|
+
for (const profileId of permissionProfileIds) {
|
|
26913
26944
|
await this.ensureAssignment(
|
|
26914
26945
|
user.granularId,
|
|
26915
26946
|
sandbox.sandboxId,
|
|
@@ -27074,6 +27105,21 @@ var Granular = class _Granular {
|
|
|
27074
27105
|
* List indexed sessions using ownership filters and bounded pagination.
|
|
27075
27106
|
*/
|
|
27076
27107
|
async listSessions(options) {
|
|
27108
|
+
const items = [];
|
|
27109
|
+
let cursor = options.cursor?.trim() || void 0;
|
|
27110
|
+
let pageCount = 0;
|
|
27111
|
+
do {
|
|
27112
|
+
const page = await this.listSessionsPage({ ...options, cursor });
|
|
27113
|
+
items.push(...page.items);
|
|
27114
|
+
cursor = page.nextCursor || void 0;
|
|
27115
|
+
pageCount += 1;
|
|
27116
|
+
if (pageCount > 1e4) {
|
|
27117
|
+
throw new Error("Session pagination exceeded the safe page limit");
|
|
27118
|
+
}
|
|
27119
|
+
} while (cursor);
|
|
27120
|
+
return items;
|
|
27121
|
+
}
|
|
27122
|
+
async listSessionsPage(options) {
|
|
27077
27123
|
const environmentId = options.environmentId?.trim();
|
|
27078
27124
|
const sandboxId = options.sandboxId?.trim();
|
|
27079
27125
|
const subjectId = options.subjectId?.trim();
|
|
@@ -27101,17 +27147,14 @@ var Granular = class _Granular {
|
|
|
27101
27147
|
1,
|
|
27102
27148
|
MAX_CONVERSATION_SESSION_LIST_LIMIT
|
|
27103
27149
|
);
|
|
27104
|
-
const
|
|
27105
|
-
|
|
27106
|
-
"
|
|
27107
|
-
|
|
27108
|
-
0,
|
|
27109
|
-
MAX_CONVERSATION_SESSION_LIST_OFFSET
|
|
27110
|
-
);
|
|
27150
|
+
const cursor = options.cursor?.trim();
|
|
27151
|
+
if (options.cursor !== void 0 && !cursor) {
|
|
27152
|
+
throw new Error("Session list cursor must be a non-empty string.");
|
|
27153
|
+
}
|
|
27111
27154
|
const query = new URLSearchParams({
|
|
27112
|
-
limit: String(limit)
|
|
27113
|
-
offset: String(offset)
|
|
27155
|
+
limit: String(limit)
|
|
27114
27156
|
});
|
|
27157
|
+
if (cursor) query.set("cursor", cursor);
|
|
27115
27158
|
if (environmentId) query.set("environmentId", environmentId);
|
|
27116
27159
|
if (sandboxId) query.set("sandboxId", sandboxId);
|
|
27117
27160
|
if (subjectId) query.set("userId", subjectId);
|
|
@@ -27119,11 +27162,13 @@ var Granular = class _Granular {
|
|
|
27119
27162
|
query.set("sessionScope", options.sessionScope.trim());
|
|
27120
27163
|
}
|
|
27121
27164
|
if (status !== "all") query.set("status", status);
|
|
27122
|
-
const res = await this.request(
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
|
|
27126
|
-
|
|
27165
|
+
const res = await this.request(`/control/sessions?${query.toString()}`);
|
|
27166
|
+
const items = Array.isArray(res.items) ? res.items.map((row) => this.normalizeConversationSession(row)) : [];
|
|
27167
|
+
const nextCursor = res.nextCursor ?? null;
|
|
27168
|
+
if (nextCursor === cursor) {
|
|
27169
|
+
throw new Error("Session pagination cursor did not advance");
|
|
27170
|
+
}
|
|
27171
|
+
return { items, nextCursor };
|
|
27127
27172
|
}
|
|
27128
27173
|
/**
|
|
27129
27174
|
* List active (open) sessions for an environment.
|
|
@@ -27150,9 +27195,6 @@ var Granular = class _Granular {
|
|
|
27150
27195
|
if (typeof options.limit === "number") {
|
|
27151
27196
|
query.set("limit", String(options.limit));
|
|
27152
27197
|
}
|
|
27153
|
-
if (typeof options.offset === "number") {
|
|
27154
|
-
query.set("offset", String(options.offset));
|
|
27155
|
-
}
|
|
27156
27198
|
const state = await this.request(
|
|
27157
27199
|
`/sdk/user-environment-state?${query.toString()}`
|
|
27158
27200
|
);
|
|
@@ -27914,25 +27956,37 @@ var Granular = class _Granular {
|
|
|
27914
27956
|
}
|
|
27915
27957
|
}
|
|
27916
27958
|
/**
|
|
27917
|
-
*
|
|
27918
|
-
*
|
|
27919
|
-
*
|
|
27959
|
+
* Resolve an existing permission profile by exact name or ID.
|
|
27960
|
+
*
|
|
27961
|
+
* `allow-all` is the sole compatibility profile that the SDK may provision
|
|
27962
|
+
* automatically. Every other missing reference fails closed so a typo or
|
|
27963
|
+
* untrusted role value cannot become an allow-default profile.
|
|
27920
27964
|
*/
|
|
27921
|
-
async ensurePermissionProfile(sandboxId,
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27965
|
+
async ensurePermissionProfile(sandboxId, profileReference) {
|
|
27966
|
+
const normalizedReference = typeof profileReference === "string" ? profileReference.trim() : "";
|
|
27967
|
+
if (!normalizedReference) {
|
|
27968
|
+
throw new Error(
|
|
27969
|
+
"Permission profile references must be non-empty names or IDs."
|
|
27970
|
+
);
|
|
27971
|
+
}
|
|
27972
|
+
const profiles = await this.permissionProfiles.list(sandboxId);
|
|
27973
|
+
const existing = profiles.find(
|
|
27974
|
+
(profile) => profile.name === normalizedReference || profile.permissionProfileId === normalizedReference
|
|
27975
|
+
);
|
|
27976
|
+
if (existing) {
|
|
27977
|
+
return existing.permissionProfileId;
|
|
27978
|
+
}
|
|
27979
|
+
if (normalizedReference !== "allow-all") {
|
|
27980
|
+
throw new Error(
|
|
27981
|
+
`Permission profile "${normalizedReference}" was not found in sandbox ${sandboxId}. Provision it with granular build or granular deploy before calling openEnvironment(). Only the reserved "allow-all" profile can be created automatically.`
|
|
27982
|
+
);
|
|
27929
27983
|
}
|
|
27930
27984
|
const created = await this.permissionProfiles.create(sandboxId, {
|
|
27931
|
-
name:
|
|
27985
|
+
name: normalizedReference,
|
|
27932
27986
|
rules: {
|
|
27933
27987
|
schemaVersion: 1,
|
|
27934
|
-
name:
|
|
27935
|
-
description:
|
|
27988
|
+
name: normalizedReference,
|
|
27989
|
+
description: "Every declared action is visible unless a manifest policy denies it.",
|
|
27936
27990
|
defaults: { actionPolicy: "allow" },
|
|
27937
27991
|
actions: []
|
|
27938
27992
|
}
|
|
@@ -28074,10 +28128,20 @@ var Granular = class _Granular {
|
|
|
28074
28128
|
get environments() {
|
|
28075
28129
|
return {
|
|
28076
28130
|
list: async (sandboxId) => {
|
|
28077
|
-
const
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28131
|
+
const environments = [];
|
|
28132
|
+
let cursor = null;
|
|
28133
|
+
do {
|
|
28134
|
+
const query = cursor ? `?limit=100&cursor=${encodeURIComponent(cursor)}` : "";
|
|
28135
|
+
const result = await this.request(
|
|
28136
|
+
`/control/sandboxes/${sandboxId}/environments${query}`
|
|
28137
|
+
);
|
|
28138
|
+
environments.push(...result.items.map(normalizeEnvironmentData));
|
|
28139
|
+
if (result.nextCursor && result.nextCursor === cursor) {
|
|
28140
|
+
throw new Error("Environment pagination cursor did not advance");
|
|
28141
|
+
}
|
|
28142
|
+
cursor = result.nextCursor;
|
|
28143
|
+
} while (cursor);
|
|
28144
|
+
return environments;
|
|
28081
28145
|
},
|
|
28082
28146
|
get: async (environmentId) => {
|
|
28083
28147
|
return normalizeEnvironmentData(
|
|
@@ -28287,7 +28351,6 @@ var Granular = class _Granular {
|
|
|
28287
28351
|
headers: {
|
|
28288
28352
|
Authorization: `Bearer ${this.apiKey}`,
|
|
28289
28353
|
"Content-Type": "application/json",
|
|
28290
|
-
Connection: "close",
|
|
28291
28354
|
...options.headers
|
|
28292
28355
|
}
|
|
28293
28356
|
});
|
|
@@ -28675,13 +28738,13 @@ async function resolveEnvironmentData(granular, options) {
|
|
|
28675
28738
|
return await granular.environments.get(connection.environmentId);
|
|
28676
28739
|
}
|
|
28677
28740
|
async function listSessionsForEnvironment(granular, environmentId, options) {
|
|
28678
|
-
return granular.
|
|
28741
|
+
return granular.listSessionsPage({
|
|
28679
28742
|
environmentId,
|
|
28680
28743
|
status: options.status,
|
|
28681
28744
|
sessionScope: options.sessionScope,
|
|
28682
28745
|
subjectId: options.subjectId,
|
|
28683
28746
|
limit: options.limit,
|
|
28684
|
-
|
|
28747
|
+
cursor: options.cursor
|
|
28685
28748
|
});
|
|
28686
28749
|
}
|
|
28687
28750
|
async function connectRuntime(options) {
|
|
@@ -28796,9 +28859,9 @@ async function connectTestCommand(options) {
|
|
|
28796
28859
|
|
|
28797
28860
|
// src/cli/commands/session.ts
|
|
28798
28861
|
function parseSessionListInteger(value, name) {
|
|
28799
|
-
const fallback2 =
|
|
28800
|
-
const minimum =
|
|
28801
|
-
const maximum =
|
|
28862
|
+
const fallback2 = 25;
|
|
28863
|
+
const minimum = 1;
|
|
28864
|
+
const maximum = 500;
|
|
28802
28865
|
if (value === void 0 || value === "") return fallback2;
|
|
28803
28866
|
const parsed = typeof value === "number" ? value : Number.parseInt(value.trim(), 10);
|
|
28804
28867
|
if (!Number.isInteger(parsed) || String(parsed) !== String(value).trim() || parsed < minimum || parsed > maximum) {
|
|
@@ -28947,7 +29010,7 @@ async function sessionListCommand(options) {
|
|
|
28947
29010
|
);
|
|
28948
29011
|
}
|
|
28949
29012
|
const limit = parseSessionListInteger(options.limit, "limit");
|
|
28950
|
-
const
|
|
29013
|
+
const cursor = options.cursor?.trim() || void 0;
|
|
28951
29014
|
const requestedEnvironment = options.environment ?? "dev";
|
|
28952
29015
|
if (!emitJson) {
|
|
28953
29016
|
printHeader();
|
|
@@ -28960,7 +29023,7 @@ async function sessionListCommand(options) {
|
|
|
28960
29023
|
subjectId: options.subjectId,
|
|
28961
29024
|
createIfMissing: false
|
|
28962
29025
|
});
|
|
28963
|
-
const
|
|
29026
|
+
const page = await listSessionsForEnvironment(
|
|
28964
29027
|
granular,
|
|
28965
29028
|
environmentData.environmentId,
|
|
28966
29029
|
{
|
|
@@ -28968,9 +29031,10 @@ async function sessionListCommand(options) {
|
|
|
28968
29031
|
sessionScope: options.sessionScope?.trim() || void 0,
|
|
28969
29032
|
subjectId: options.subjectId?.trim() || void 0,
|
|
28970
29033
|
limit,
|
|
28971
|
-
|
|
29034
|
+
cursor
|
|
28972
29035
|
}
|
|
28973
29036
|
);
|
|
29037
|
+
const items = page.items;
|
|
28974
29038
|
const payload = {
|
|
28975
29039
|
ontologyId: environmentData.sandboxId,
|
|
28976
29040
|
environmentId: environmentData.environmentId,
|
|
@@ -28979,10 +29043,10 @@ async function sessionListCommand(options) {
|
|
|
28979
29043
|
sessionScope: options.sessionScope?.trim() || null,
|
|
28980
29044
|
page: {
|
|
28981
29045
|
limit,
|
|
28982
|
-
|
|
29046
|
+
cursor: cursor ?? null,
|
|
28983
29047
|
returned: items.length,
|
|
28984
|
-
|
|
28985
|
-
|
|
29048
|
+
hasNextPage: page.nextCursor !== null,
|
|
29049
|
+
nextCursor: page.nextCursor
|
|
28986
29050
|
},
|
|
28987
29051
|
items
|
|
28988
29052
|
};
|
|
@@ -29007,7 +29071,7 @@ async function sessionListCommand(options) {
|
|
|
29007
29071
|
])
|
|
29008
29072
|
);
|
|
29009
29073
|
info(
|
|
29010
|
-
`Showing ${items.length} session${items.length === 1 ? "" : "s"}
|
|
29074
|
+
`Showing ${items.length} session${items.length === 1 ? "" : "s"}.` + (page.nextCursor ? ` Use --cursor ${page.nextCursor} for the next page.` : "")
|
|
29011
29075
|
);
|
|
29012
29076
|
console.log();
|
|
29013
29077
|
}
|
|
@@ -29955,7 +30019,7 @@ session.command("list").description("List one bounded page of indexed sessions f
|
|
|
29955
30019
|
"--status <status>",
|
|
29956
30020
|
"Session status: active|closed|expired|failed|timeout|all",
|
|
29957
30021
|
"active"
|
|
29958
|
-
).option("--limit <count>", "Rows to return (1-500)", "25").option("--
|
|
30022
|
+
).option("--limit <count>", "Rows to return (1-500)", "25").option("--cursor <cursor>", "Opaque cursor returned by the previous page").option("--json", "Print machine-readable JSON").action(
|
|
29959
30023
|
async (options) => {
|
|
29960
30024
|
try {
|
|
29961
30025
|
await sessionListCommand(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cO as WSClientOptions, Y as SessionFeedApi, b0 as GranularQuotaProgress, T as ToolWithHandler, g as PublishToolsResult, bQ as Job, h as ToolHandler, I as InstanceToolHandler, bT as UserMessageInput, bU as UserMessageAppendResult, bD as EffectInfo, P as Prompt, bC as ToolInfo, bF as EffectsChangedEvent, bE as ToolsChangedEvent, D as DomainState, $ as FeedListTransport, aI as GranularOptions, dk as EnvironmentImporter, aL as RecordUserOptions, aK as User, aN as OpenEnvironmentOptions, bd as EnvironmentData, ba as BuildPolicy, dh as EnvironmentSetupSummary, aT as ConversationSessionListOptions, aR as ConversationSessionInfo, aU as ConversationSessionListResponse, aQ as CreateSessionOptions, cY as RecordObjectOptions, d3 as RecordObjectResult, d5 as RecordObjectsOptions, dc as RecordImport, d8 as RecordImportStatus, db as RecordImportItem, dd as EnvironmentRecordImportSummary, bO as EnvironmentFeedbackRecord, d as SessionHeapSnapshot, cC as SessionDocumentResult, bV as AssistantReplyPublicationInput, bW as AssistantReplyPublicationResult, cD as SessionCollectionListOptions, cF as SessionCollectionListResult, bZ as SessionTimelineEvent, cE as SessionJobListOptions, cv as SessionJobRecord, c6 as SessionArtifactListOptions, c5 as SessionArtifactRecord, c8 as SessionArtifactRelationshipOptionsInput, ca as SessionArtifactRelationshipOptionsResult, cb as SessionArtifactRelationshipCreateInput, c7 as SessionArtifactValidationResult, cd as SessionArtifactExecutionOptions, cc as SessionArtifactExecutionResult, ce as SessionArtifactApprovalOptions, co as RecordManualActionInput, cq as ManualActionRecordResult, cr as ManualActionListOptions, cp as ManualActionOccurrence, ct as ManualActionSuggestionOptions, cs as ManualActionSuggestion, ch as ArtifactApprovalTaskListOptions, cg as ArtifactApprovalTask, ci as ArtifactApprovalDecisionInput, cj as ArtifactApprovalDecisionResult, c1 as SessionFileRecord, cu as SessionFileUploadOptions, S as SessionHeapEntry, b as SessionHeapList, cy as SessionHeapVariable, e as SessionTranscriptEntry, dP as GraphQLResult, cA as RecordSearchOptions, cz as RecordSearchResult, cB as RecordMentionInput, cX as DefineRelationshipOptions, cW as RelationshipInfo, cV as ModelRef, dO as ManifestContent, d0 as EnvironmentStateUpdateInput, c_ as EnvironmentStateTarget, d2 as EnvironmentStateProxy, d7 as RecordImportOptions, cK as UserEnvironmentStateOptions, cJ as UserEnvironmentState, cL as MarkUserEnvironmentReadOptions, aO as AdoptEnvironmentOptions, aP as ConnectOptions, df as RunEnvironmentImporterOptions, au as OpenAIUsageSpendEvent, at as GranularSpendContext, aw as RecordOpenAIUsageSpendResult, b3 as SandboxListResponse, b1 as Sandbox, b2 as CreateSandboxData, dR as DeleteResponse, b5 as PermissionProfile, b6 as CreatePermissionProfileData, be as CreateEnvironmentData, dS as StreamEvent, dT as StreamSubscription, dU as StreamStats, aM as Subject, b9 as AssignmentListResponse } from './spend-DtsHRNb5.js';
|
|
2
2
|
import * as Automerge from '@automerge/automerge';
|
|
3
3
|
import { Doc } from '@automerge/automerge/slim';
|
|
4
4
|
|
|
@@ -360,6 +360,7 @@ declare class Environment {
|
|
|
360
360
|
syncEnvironmentData(envData: EnvironmentData): void;
|
|
361
361
|
get sessions(): {
|
|
362
362
|
list: (options?: Omit<ConversationSessionListOptions, "environmentId" | "sandboxId" | "subjectId">) => Promise<ConversationSessionInfo[]>;
|
|
363
|
+
page: (options?: Omit<ConversationSessionListOptions, "environmentId" | "sandboxId" | "subjectId">) => Promise<ConversationSessionListResponse>;
|
|
363
364
|
create: (options?: CreateSessionOptions) => Promise<EnvironmentSession>;
|
|
364
365
|
connect: (sessionId: string, options?: {
|
|
365
366
|
clientId?: string;
|
|
@@ -1087,6 +1088,7 @@ declare class Granular {
|
|
|
1087
1088
|
* List indexed sessions using ownership filters and bounded pagination.
|
|
1088
1089
|
*/
|
|
1089
1090
|
listSessions(options: ConversationSessionListOptions): Promise<ConversationSessionInfo[]>;
|
|
1091
|
+
listSessionsPage(options: ConversationSessionListOptions): Promise<ConversationSessionListResponse>;
|
|
1090
1092
|
/**
|
|
1091
1093
|
* List active (open) sessions for an environment.
|
|
1092
1094
|
*/
|
|
@@ -1190,9 +1192,11 @@ declare class Granular {
|
|
|
1190
1192
|
*/
|
|
1191
1193
|
private findOrCreateSandbox;
|
|
1192
1194
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1195
|
+
* Resolve an existing permission profile by exact name or ID.
|
|
1196
|
+
*
|
|
1197
|
+
* `allow-all` is the sole compatibility profile that the SDK may provision
|
|
1198
|
+
* automatically. Every other missing reference fails closed so a typo or
|
|
1199
|
+
* untrusted role value cannot become an allow-default profile.
|
|
1196
1200
|
*/
|
|
1197
1201
|
private ensurePermissionProfile;
|
|
1198
1202
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cO as WSClientOptions, Y as SessionFeedApi, b0 as GranularQuotaProgress, T as ToolWithHandler, g as PublishToolsResult, bQ as Job, h as ToolHandler, I as InstanceToolHandler, bT as UserMessageInput, bU as UserMessageAppendResult, bD as EffectInfo, P as Prompt, bC as ToolInfo, bF as EffectsChangedEvent, bE as ToolsChangedEvent, D as DomainState, $ as FeedListTransport, aI as GranularOptions, dk as EnvironmentImporter, aL as RecordUserOptions, aK as User, aN as OpenEnvironmentOptions, bd as EnvironmentData, ba as BuildPolicy, dh as EnvironmentSetupSummary, aT as ConversationSessionListOptions, aR as ConversationSessionInfo, aU as ConversationSessionListResponse, aQ as CreateSessionOptions, cY as RecordObjectOptions, d3 as RecordObjectResult, d5 as RecordObjectsOptions, dc as RecordImport, d8 as RecordImportStatus, db as RecordImportItem, dd as EnvironmentRecordImportSummary, bO as EnvironmentFeedbackRecord, d as SessionHeapSnapshot, cC as SessionDocumentResult, bV as AssistantReplyPublicationInput, bW as AssistantReplyPublicationResult, cD as SessionCollectionListOptions, cF as SessionCollectionListResult, bZ as SessionTimelineEvent, cE as SessionJobListOptions, cv as SessionJobRecord, c6 as SessionArtifactListOptions, c5 as SessionArtifactRecord, c8 as SessionArtifactRelationshipOptionsInput, ca as SessionArtifactRelationshipOptionsResult, cb as SessionArtifactRelationshipCreateInput, c7 as SessionArtifactValidationResult, cd as SessionArtifactExecutionOptions, cc as SessionArtifactExecutionResult, ce as SessionArtifactApprovalOptions, co as RecordManualActionInput, cq as ManualActionRecordResult, cr as ManualActionListOptions, cp as ManualActionOccurrence, ct as ManualActionSuggestionOptions, cs as ManualActionSuggestion, ch as ArtifactApprovalTaskListOptions, cg as ArtifactApprovalTask, ci as ArtifactApprovalDecisionInput, cj as ArtifactApprovalDecisionResult, c1 as SessionFileRecord, cu as SessionFileUploadOptions, S as SessionHeapEntry, b as SessionHeapList, cy as SessionHeapVariable, e as SessionTranscriptEntry, dP as GraphQLResult, cA as RecordSearchOptions, cz as RecordSearchResult, cB as RecordMentionInput, cX as DefineRelationshipOptions, cW as RelationshipInfo, cV as ModelRef, dO as ManifestContent, d0 as EnvironmentStateUpdateInput, c_ as EnvironmentStateTarget, d2 as EnvironmentStateProxy, d7 as RecordImportOptions, cK as UserEnvironmentStateOptions, cJ as UserEnvironmentState, cL as MarkUserEnvironmentReadOptions, aO as AdoptEnvironmentOptions, aP as ConnectOptions, df as RunEnvironmentImporterOptions, au as OpenAIUsageSpendEvent, at as GranularSpendContext, aw as RecordOpenAIUsageSpendResult, b3 as SandboxListResponse, b1 as Sandbox, b2 as CreateSandboxData, dR as DeleteResponse, b5 as PermissionProfile, b6 as CreatePermissionProfileData, be as CreateEnvironmentData, dS as StreamEvent, dT as StreamSubscription, dU as StreamStats, aM as Subject, b9 as AssignmentListResponse } from './spend-DtsHRNb5.mjs';
|
|
2
2
|
import * as Automerge from '@automerge/automerge';
|
|
3
3
|
import { Doc } from '@automerge/automerge/slim';
|
|
4
4
|
|
|
@@ -360,6 +360,7 @@ declare class Environment {
|
|
|
360
360
|
syncEnvironmentData(envData: EnvironmentData): void;
|
|
361
361
|
get sessions(): {
|
|
362
362
|
list: (options?: Omit<ConversationSessionListOptions, "environmentId" | "sandboxId" | "subjectId">) => Promise<ConversationSessionInfo[]>;
|
|
363
|
+
page: (options?: Omit<ConversationSessionListOptions, "environmentId" | "sandboxId" | "subjectId">) => Promise<ConversationSessionListResponse>;
|
|
363
364
|
create: (options?: CreateSessionOptions) => Promise<EnvironmentSession>;
|
|
364
365
|
connect: (sessionId: string, options?: {
|
|
365
366
|
clientId?: string;
|
|
@@ -1087,6 +1088,7 @@ declare class Granular {
|
|
|
1087
1088
|
* List indexed sessions using ownership filters and bounded pagination.
|
|
1088
1089
|
*/
|
|
1089
1090
|
listSessions(options: ConversationSessionListOptions): Promise<ConversationSessionInfo[]>;
|
|
1091
|
+
listSessionsPage(options: ConversationSessionListOptions): Promise<ConversationSessionListResponse>;
|
|
1090
1092
|
/**
|
|
1091
1093
|
* List active (open) sessions for an environment.
|
|
1092
1094
|
*/
|
|
@@ -1190,9 +1192,11 @@ declare class Granular {
|
|
|
1190
1192
|
*/
|
|
1191
1193
|
private findOrCreateSandbox;
|
|
1192
1194
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1195
|
+
* Resolve an existing permission profile by exact name or ID.
|
|
1196
|
+
*
|
|
1197
|
+
* `allow-all` is the sole compatibility profile that the SDK may provision
|
|
1198
|
+
* automatically. Every other missing reference fails closed so a typo or
|
|
1199
|
+
* untrusted role value cannot become an allow-default profile.
|
|
1196
1200
|
*/
|
|
1197
1201
|
private ensurePermissionProfile;
|
|
1198
1202
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, F as FeedPublishTransport, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as FeedItem, d as SessionHeapSnapshot, P as Prompt, e 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-lk-dmdKR.mjs';
|
|
2
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, F as FeedPublishTransport, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as FeedItem, d as SessionHeapSnapshot, P as Prompt, e as SessionTranscriptEntry } from './spend-DtsHRNb5.mjs';
|
|
3
|
+
export { dQ as APIError, aH as AccessTokenProvider, C as ActionSuggestionFeedItem, aO as AdoptEnvironmentOptions, ci as ArtifactApprovalDecisionInput, cj as ArtifactApprovalDecisionResult, cg as ArtifactApprovalTask, ch as ArtifactApprovalTaskListOptions, cf as ArtifactApprovalTaskStatus, A as ArtifactFeedItem, bx as ArtifactOptionsHandler, b8 as Assignment, b9 as AssignmentListResponse, bV as AssistantReplyPublicationInput, bW as AssistantReplyPublicationResult, bj as Build, bl as BuildListResponse, ba as BuildPolicy, bi as BuildStatus, aD as ConditionIR, aP as ConnectOptions, aR as ConversationSessionInfo, aT as ConversationSessionListOptions, aU as ConversationSessionListResponse, aS as ConversationSessionListStatus, be as CreateEnvironmentData, b6 as CreatePermissionProfileData, b2 as CreateSandboxData, aQ as CreateSessionOptions, cX as DefineRelationshipOptions, dR as DeleteResponse, D as DomainState, bt as EffectArtifactOptionsInvocation, bv as EffectArtifactRelationshipOption, bw as EffectArtifactRelationshipOptionsResult, bG as EffectHandler, bD as EffectInfo, bu as EffectInvocationMetadata, bs as EffectInvocationMode, by as EffectSchema, bB as EffectVersionSelector, bz as EffectWithHandler, bF as EffectsChangedEvent, bd as EnvironmentData, bO as EnvironmentFeedbackRecord, dk as EnvironmentImporter, dj as EnvironmentImporterImportOptions, bf as EnvironmentListResponse, dd as EnvironmentRecordImportSummary, di as EnvironmentSetupImporterClaim, dg as EnvironmentSetupLifecycleStatus, dh as EnvironmentSetupSummary, de as EnvironmentSetupTriggerReason, d1 as EnvironmentStateMachineProxy, c$ as EnvironmentStateObservationInput, d2 as EnvironmentStateProxy, c_ as EnvironmentStateTarget, d0 as EnvironmentStateUpdateInput, a1 as FeedDiagnostic, a2 as FeedDiagnosticListener, a9 as FeedDocumentState, l as FeedFeedbackTone, z as FeedFileSource, k as FeedIconToken, p as FeedItemBase, n as FeedItemKind, U as FeedListOptions, $ as FeedListTransport, s as FeedObjectReference, V as FeedPage, ak as FeedPublisher, Q as FeedSnapshot, a0 as FeedSnapshotRegressionReason, j as FeedSource, i as FeedSourceActor, W as FeedSubscribeOptions, X as FeedSubscriptionChange, t as FeedTableCell, u as FeedTableColumn, x as FeedTableProjection, w as FeedTableRow, v as FeedTableRowReference, o as FeedTarget, m as FeedTransientFeedbackTone, r as FeedbackFeedItem, B as FileFeedItem, a3 as GRANULAR_FEED_DIAGNOSTIC_EVENT, aJ as GranularAuth, aI as GranularOptions, a$ as GranularQuotaPolicy, b0 as GranularQuotaProgress, at as GranularSpendContext, dP as GraphQLResult, bH as InstanceEffectHandler, I as InstanceToolHandler, bQ as Job, bM as JobFeedbackInput, bL as JobFeedbackMetadata, bN as JobFeedbackRecord, bJ as JobFeedbackSentiment, bK as JobFeedbackToolCall, bI as JobStatus, bP as JobSubmitResult, bg as Manifest, dE as ManifestApprovalRequiredSpec, dO as ManifestContent, dF as ManifestCreatesSpec, dC as ManifestDryRunSpec, dI as ManifestEffectDeclaration, dH as ManifestEffectSchema, dn as ManifestEnumRuleSpec, dK as ManifestEventStreamDef, dJ as ManifestEventTypeDef, dp as ManifestFilterBySpec, dM as ManifestImport, bh as ManifestListResponse, dL as ManifestOperation, dB as ManifestPostConditionSpec, dl as ManifestPropertySpec, dG as ManifestRelationshipDef, dD as ManifestReverseSpec, dA as ManifestStateMachineSpec, dr as ManifestStateMachineStateSpec, dz as ManifestStateMachineTransitionSpec, dt as ManifestStateTransitionActionSpec, du as ManifestStateTransitionAssigneeSpec, dy as ManifestStateTransitionExpectedOutcomeSpec, ds as ManifestStateTransitionInputBinding, dx as ManifestStateTransitionPermissionSpec, dv as ManifestStateTransitionRelatedStateRequirementSpec, dw as ManifestStateTransitionRequirementsSpec, dm as ManifestValidationOperator, dq as ManifestValidationRuleSpec, dN as ManifestVolume, cr as ManualActionListOptions, cp as ManualActionOccurrence, cq as ManualActionRecordResult, cn as ManualActionRelatedRecord, cl as ManualActionSource, ck as ManualActionStatus, cs as ManualActionSuggestion, ct as ManualActionSuggestionOptions, cm as ManualActionTarget, cL as MarkUserEnvironmentReadOptions, aG as MatchedPolicy, q as MessageFeedItem, cV as ModelRef, an as NormalizedOpenAIUsage, N as NormalizedSuggestedArtifact, ap as OPENAI_MODEL_PRICING_USD_PER_MILLION, O as ObjectsFeedItem, am as OpenAIModelPricing, ao as OpenAITokenSpend, au as OpenAIUsageSpendEvent, aN as OpenEnvironmentOptions, b5 as PermissionProfile, b7 as PermissionProfileListResponse, b4 as PermissionRules, aC as PolicyOperator, aE as PolicyOrigin, aB as PolicyPredicateSource, aF as PolicyRuleIR, aA as PolicySource, G as PromptFeedItem, bA as PublishEffectsResult, ag as PublishFeedbackOptions, g as PublishToolsResult, ah as PublishTransientFeedbackOptions, a_ as QuotaLineItemFilter, aX as QuotaPeriod, aW as QuotaScopeType, aY as QuotaStatus, cP as RPCRequest, cS as RPCRequestFromServer, cQ as RPCResponse, dc as RecordImport, db as RecordImportItem, d9 as RecordImportItemStatus, d7 as RecordImportOptions, da as RecordImportStats, d8 as RecordImportStatus, d6 as RecordImportWriteMode, co as RecordManualActionInput, cB as RecordMentionInput, cY as RecordObjectOptions, d3 as RecordObjectResult, cZ as RecordObjectStateValue, d4 as RecordObjectsChunkInfo, d5 as RecordObjectsOptions, av as RecordOpenAIUsageSpendOptions, aw as RecordOpenAIUsageSpendResult, cA as RecordSearchOptions, cz as RecordSearchResult, aL as RecordUserOptions, cW as RelationshipInfo, br as ResolvedEffectApprovalRequired, bp as ResolvedEffectDryRun, bo as ResolvedEffectPostCondition, bq as ResolvedEffectReverse, df as RunEnvironmentImporterOptions, b1 as Sandbox, b3 as SandboxListResponse, bn as SemanticVersionDiff, bm as SemanticVersionDiffEntry, ce as SessionArtifactApprovalOptions, c4 as SessionArtifactAutonomyPolicy, cd as SessionArtifactExecutionOptions, cc as SessionArtifactExecutionResult, c3 as SessionArtifactKind, c6 as SessionArtifactListOptions, c5 as SessionArtifactRecord, cb as SessionArtifactRelationshipCreateInput, c9 as SessionArtifactRelationshipOption, c8 as SessionArtifactRelationshipOptionsInput, ca as SessionArtifactRelationshipOptionsResult, c2 as SessionArtifactStatus, c7 as SessionArtifactValidationResult, cD as SessionCollectionListOptions, cF as SessionCollectionListResult, cC as SessionDocumentResult, Y as SessionFeedApi, af as SessionFeedController, a8 as SessionFeedControllerOptions, b$ as SessionFileKind, c1 as SessionFileRecord, b_ as SessionFileSource, c0 as SessionFileStatus, cu as SessionFileUploadOptions, cw as SessionHeapFieldType, cx as SessionHeapFieldValue, cy as SessionHeapVariable, cE as SessionJobListOptions, cv as SessionJobRecord, bZ as SessionTimelineEvent, bX as SessionTranscriptActionSuggestion, bY as SessionTranscriptShowRefs, ai as SettleTransientFeedbackOptions, cR as SnapshotResetMessage, aV as SpendLineItemType, aZ as SpendSummary, dS as StreamEvent, dU as StreamStats, dT as StreamSubscription, aM as Subject, y as TableFeedItem, h as ToolHandler, bC as ToolInfo, cT as ToolInvokeParams, cU as ToolResultParams, f as ToolSchema, bE as ToolsChangedEvent, L as TransientFeedItem, H as TransientFeedItemBase, K as TransientFeedbackFeedItem, aj as TransientFeedbackHandle, J as TransientMessageFeedItem, aK as User, cH as UserEnvironmentMessagePreview, cG as UserEnvironmentPrompt, cI as UserEnvironmentSessionState, cJ as UserEnvironmentState, cK as UserEnvironmentStateOptions, bU as UserMessageAppendResult, bT as UserMessageInput, bR as UserMessageShowRefs, bS as UserMessageTarget, bk as Version, bc as VersionTag, bb as VersionTracking, cO as WSClientOptions, cM as WSDisconnectInfo, cN as WSReconnectErrorInfo, ay as buildOpenAISpendEventId, as as calculateOpenAITokenSpend, al as createFeedPublisher, a7 as emitFeedDiagnostic, a6 as emitFeedDiagnosticToDefaultSink, aa as emptyFeedSnapshot, aq as getOpenAIModelPricing, ab as hasCanonicalSessionFeedActivation, ac as isCanonicalSessionFeedDocument, Z as mergeFeedItemsBySequence, a5 as normalizeFeedDiagnostic, a4 as normalizeFeedDiagnosticKind, ae as normalizeFeedPage, ar as normalizeOpenAIUsage, _ as orderTransientFeedItems, ad as readSessionFeedSnapshot, az as recordOpenAIUsageSpend, ax as toGranularHttpBase } from './spend-DtsHRNb5.mjs';
|
|
4
4
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentManualActionMemorySuggestion, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessRenderedContinuation, HarnessRenderedPrompt, HarnessTemplate, HarnessTemplateManifest, HarnessTemplateSelectionOptions, HarnessTemplateStatus, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildContinuationInstructionFromTemplate, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentFileBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentManualActionBlock, buildGranularAgentManualActionMemorySummary, buildGranularAgentReferentBlock, buildGranularAgentRuntimeImportsBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentSystemPromptFromTemplate, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getDefaultHarnessTemplateId, getExclusivePromptTarget, hasOpenPrompt, hashHarnessTemplateValue, listHarnessTemplates, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectSessionFileSummary, projectWorkflowFocus, projectWorkflowSummary, renderContinuationInstructionFromTemplate, renderGranularAgentSystemPromptFromTemplate, resolveHarnessTemplate, reviewGeneratedJobCode, stripGranularReasoningTrace, validateHarnessTemplateManifest } from './agent-harness.mjs';
|
|
5
5
|
import '@automerge/automerge';
|
|
6
6
|
import '@automerge/automerge/slim';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, F as FeedPublishTransport, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as FeedItem, d as SessionHeapSnapshot, P as Prompt, e 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-KqJIH7WE.js';
|
|
2
|
+
import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, F as FeedPublishTransport, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as FeedItem, d as SessionHeapSnapshot, P as Prompt, e as SessionTranscriptEntry } from './spend-DtsHRNb5.js';
|
|
3
|
+
export { dQ as APIError, aH as AccessTokenProvider, C as ActionSuggestionFeedItem, aO as AdoptEnvironmentOptions, ci as ArtifactApprovalDecisionInput, cj as ArtifactApprovalDecisionResult, cg as ArtifactApprovalTask, ch as ArtifactApprovalTaskListOptions, cf as ArtifactApprovalTaskStatus, A as ArtifactFeedItem, bx as ArtifactOptionsHandler, b8 as Assignment, b9 as AssignmentListResponse, bV as AssistantReplyPublicationInput, bW as AssistantReplyPublicationResult, bj as Build, bl as BuildListResponse, ba as BuildPolicy, bi as BuildStatus, aD as ConditionIR, aP as ConnectOptions, aR as ConversationSessionInfo, aT as ConversationSessionListOptions, aU as ConversationSessionListResponse, aS as ConversationSessionListStatus, be as CreateEnvironmentData, b6 as CreatePermissionProfileData, b2 as CreateSandboxData, aQ as CreateSessionOptions, cX as DefineRelationshipOptions, dR as DeleteResponse, D as DomainState, bt as EffectArtifactOptionsInvocation, bv as EffectArtifactRelationshipOption, bw as EffectArtifactRelationshipOptionsResult, bG as EffectHandler, bD as EffectInfo, bu as EffectInvocationMetadata, bs as EffectInvocationMode, by as EffectSchema, bB as EffectVersionSelector, bz as EffectWithHandler, bF as EffectsChangedEvent, bd as EnvironmentData, bO as EnvironmentFeedbackRecord, dk as EnvironmentImporter, dj as EnvironmentImporterImportOptions, bf as EnvironmentListResponse, dd as EnvironmentRecordImportSummary, di as EnvironmentSetupImporterClaim, dg as EnvironmentSetupLifecycleStatus, dh as EnvironmentSetupSummary, de as EnvironmentSetupTriggerReason, d1 as EnvironmentStateMachineProxy, c$ as EnvironmentStateObservationInput, d2 as EnvironmentStateProxy, c_ as EnvironmentStateTarget, d0 as EnvironmentStateUpdateInput, a1 as FeedDiagnostic, a2 as FeedDiagnosticListener, a9 as FeedDocumentState, l as FeedFeedbackTone, z as FeedFileSource, k as FeedIconToken, p as FeedItemBase, n as FeedItemKind, U as FeedListOptions, $ as FeedListTransport, s as FeedObjectReference, V as FeedPage, ak as FeedPublisher, Q as FeedSnapshot, a0 as FeedSnapshotRegressionReason, j as FeedSource, i as FeedSourceActor, W as FeedSubscribeOptions, X as FeedSubscriptionChange, t as FeedTableCell, u as FeedTableColumn, x as FeedTableProjection, w as FeedTableRow, v as FeedTableRowReference, o as FeedTarget, m as FeedTransientFeedbackTone, r as FeedbackFeedItem, B as FileFeedItem, a3 as GRANULAR_FEED_DIAGNOSTIC_EVENT, aJ as GranularAuth, aI as GranularOptions, a$ as GranularQuotaPolicy, b0 as GranularQuotaProgress, at as GranularSpendContext, dP as GraphQLResult, bH as InstanceEffectHandler, I as InstanceToolHandler, bQ as Job, bM as JobFeedbackInput, bL as JobFeedbackMetadata, bN as JobFeedbackRecord, bJ as JobFeedbackSentiment, bK as JobFeedbackToolCall, bI as JobStatus, bP as JobSubmitResult, bg as Manifest, dE as ManifestApprovalRequiredSpec, dO as ManifestContent, dF as ManifestCreatesSpec, dC as ManifestDryRunSpec, dI as ManifestEffectDeclaration, dH as ManifestEffectSchema, dn as ManifestEnumRuleSpec, dK as ManifestEventStreamDef, dJ as ManifestEventTypeDef, dp as ManifestFilterBySpec, dM as ManifestImport, bh as ManifestListResponse, dL as ManifestOperation, dB as ManifestPostConditionSpec, dl as ManifestPropertySpec, dG as ManifestRelationshipDef, dD as ManifestReverseSpec, dA as ManifestStateMachineSpec, dr as ManifestStateMachineStateSpec, dz as ManifestStateMachineTransitionSpec, dt as ManifestStateTransitionActionSpec, du as ManifestStateTransitionAssigneeSpec, dy as ManifestStateTransitionExpectedOutcomeSpec, ds as ManifestStateTransitionInputBinding, dx as ManifestStateTransitionPermissionSpec, dv as ManifestStateTransitionRelatedStateRequirementSpec, dw as ManifestStateTransitionRequirementsSpec, dm as ManifestValidationOperator, dq as ManifestValidationRuleSpec, dN as ManifestVolume, cr as ManualActionListOptions, cp as ManualActionOccurrence, cq as ManualActionRecordResult, cn as ManualActionRelatedRecord, cl as ManualActionSource, ck as ManualActionStatus, cs as ManualActionSuggestion, ct as ManualActionSuggestionOptions, cm as ManualActionTarget, cL as MarkUserEnvironmentReadOptions, aG as MatchedPolicy, q as MessageFeedItem, cV as ModelRef, an as NormalizedOpenAIUsage, N as NormalizedSuggestedArtifact, ap as OPENAI_MODEL_PRICING_USD_PER_MILLION, O as ObjectsFeedItem, am as OpenAIModelPricing, ao as OpenAITokenSpend, au as OpenAIUsageSpendEvent, aN as OpenEnvironmentOptions, b5 as PermissionProfile, b7 as PermissionProfileListResponse, b4 as PermissionRules, aC as PolicyOperator, aE as PolicyOrigin, aB as PolicyPredicateSource, aF as PolicyRuleIR, aA as PolicySource, G as PromptFeedItem, bA as PublishEffectsResult, ag as PublishFeedbackOptions, g as PublishToolsResult, ah as PublishTransientFeedbackOptions, a_ as QuotaLineItemFilter, aX as QuotaPeriod, aW as QuotaScopeType, aY as QuotaStatus, cP as RPCRequest, cS as RPCRequestFromServer, cQ as RPCResponse, dc as RecordImport, db as RecordImportItem, d9 as RecordImportItemStatus, d7 as RecordImportOptions, da as RecordImportStats, d8 as RecordImportStatus, d6 as RecordImportWriteMode, co as RecordManualActionInput, cB as RecordMentionInput, cY as RecordObjectOptions, d3 as RecordObjectResult, cZ as RecordObjectStateValue, d4 as RecordObjectsChunkInfo, d5 as RecordObjectsOptions, av as RecordOpenAIUsageSpendOptions, aw as RecordOpenAIUsageSpendResult, cA as RecordSearchOptions, cz as RecordSearchResult, aL as RecordUserOptions, cW as RelationshipInfo, br as ResolvedEffectApprovalRequired, bp as ResolvedEffectDryRun, bo as ResolvedEffectPostCondition, bq as ResolvedEffectReverse, df as RunEnvironmentImporterOptions, b1 as Sandbox, b3 as SandboxListResponse, bn as SemanticVersionDiff, bm as SemanticVersionDiffEntry, ce as SessionArtifactApprovalOptions, c4 as SessionArtifactAutonomyPolicy, cd as SessionArtifactExecutionOptions, cc as SessionArtifactExecutionResult, c3 as SessionArtifactKind, c6 as SessionArtifactListOptions, c5 as SessionArtifactRecord, cb as SessionArtifactRelationshipCreateInput, c9 as SessionArtifactRelationshipOption, c8 as SessionArtifactRelationshipOptionsInput, ca as SessionArtifactRelationshipOptionsResult, c2 as SessionArtifactStatus, c7 as SessionArtifactValidationResult, cD as SessionCollectionListOptions, cF as SessionCollectionListResult, cC as SessionDocumentResult, Y as SessionFeedApi, af as SessionFeedController, a8 as SessionFeedControllerOptions, b$ as SessionFileKind, c1 as SessionFileRecord, b_ as SessionFileSource, c0 as SessionFileStatus, cu as SessionFileUploadOptions, cw as SessionHeapFieldType, cx as SessionHeapFieldValue, cy as SessionHeapVariable, cE as SessionJobListOptions, cv as SessionJobRecord, bZ as SessionTimelineEvent, bX as SessionTranscriptActionSuggestion, bY as SessionTranscriptShowRefs, ai as SettleTransientFeedbackOptions, cR as SnapshotResetMessage, aV as SpendLineItemType, aZ as SpendSummary, dS as StreamEvent, dU as StreamStats, dT as StreamSubscription, aM as Subject, y as TableFeedItem, h as ToolHandler, bC as ToolInfo, cT as ToolInvokeParams, cU as ToolResultParams, f as ToolSchema, bE as ToolsChangedEvent, L as TransientFeedItem, H as TransientFeedItemBase, K as TransientFeedbackFeedItem, aj as TransientFeedbackHandle, J as TransientMessageFeedItem, aK as User, cH as UserEnvironmentMessagePreview, cG as UserEnvironmentPrompt, cI as UserEnvironmentSessionState, cJ as UserEnvironmentState, cK as UserEnvironmentStateOptions, bU as UserMessageAppendResult, bT as UserMessageInput, bR as UserMessageShowRefs, bS as UserMessageTarget, bk as Version, bc as VersionTag, bb as VersionTracking, cO as WSClientOptions, cM as WSDisconnectInfo, cN as WSReconnectErrorInfo, ay as buildOpenAISpendEventId, as as calculateOpenAITokenSpend, al as createFeedPublisher, a7 as emitFeedDiagnostic, a6 as emitFeedDiagnosticToDefaultSink, aa as emptyFeedSnapshot, aq as getOpenAIModelPricing, ab as hasCanonicalSessionFeedActivation, ac as isCanonicalSessionFeedDocument, Z as mergeFeedItemsBySequence, a5 as normalizeFeedDiagnostic, a4 as normalizeFeedDiagnosticKind, ae as normalizeFeedPage, ar as normalizeOpenAIUsage, _ as orderTransientFeedItems, ad as readSessionFeedSnapshot, az as recordOpenAIUsageSpend, ax as toGranularHttpBase } from './spend-DtsHRNb5.js';
|
|
4
4
|
export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentManualActionMemorySuggestion, GranularAgentPromptCapabilities, GranularAgentReferentFocus, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, GranularReasoningTraceChunkResult, GranularReasoningTraceOptions, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessRenderedContinuation, HarnessRenderedPrompt, HarnessTemplate, HarnessTemplateManifest, HarnessTemplateSelectionOptions, HarnessTemplateStatus, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, ReviewGeneratedJobCodeOptions, buildContinuationInstruction, buildContinuationInstructionFromTemplate, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentFileBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentManualActionBlock, buildGranularAgentManualActionMemorySummary, buildGranularAgentReferentBlock, buildGranularAgentRuntimeImportsBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentSystemPromptFromTemplate, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, consumeGranularReasoningOnlyChunk, consumeGranularReasoningTraceChunk, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getDefaultHarnessTemplateId, getExclusivePromptTarget, hasOpenPrompt, hashHarnessTemplateValue, listHarnessTemplates, projectConversationReferentFocus, projectConversationReferentSummary, projectHeapSummary, projectLoopSummary, projectSessionFileSummary, projectWorkflowFocus, projectWorkflowSummary, renderContinuationInstructionFromTemplate, renderGranularAgentSystemPromptFromTemplate, resolveHarnessTemplate, reviewGeneratedJobCode, stripGranularReasoningTrace, validateHarnessTemplateManifest } from './agent-harness.js';
|
|
5
5
|
import '@automerge/automerge';
|
|
6
6
|
import '@automerge/automerge/slim';
|