@granular-software/sdk 0.4.62 → 0.4.64
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 +2 -2
- package/dist/agent-evals.d.ts +2 -2
- package/dist/agent-evals.js +81 -38
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +81 -38
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +113 -60
- package/dist/{client-Bx5jIDGB.d.ts → client-BziqnDTl.d.ts} +3 -1
- package/dist/{client-Dg0I_5B_.d.mts → client-IQeOoPnO.d.mts} +3 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +81 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -38
- package/dist/index.mjs.map +1 -1
- package/dist/{spend-C8OQnF6E.d.mts → spend-CDLmk-KW.d.mts} +22 -7
- package/dist/{spend-C8OQnF6E.d.ts → spend-CDLmk-KW.d.ts} +22 -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}`);
|
|
@@ -14039,8 +14048,12 @@ external_exports.union([
|
|
|
14039
14048
|
external_exports.array(external_exports.string()),
|
|
14040
14049
|
external_exports.object({
|
|
14041
14050
|
values: external_exports.array(external_exports.string()),
|
|
14051
|
+
labels: external_exports.array(external_exports.string().min(1)).optional(),
|
|
14042
14052
|
message: external_exports.string().optional()
|
|
14043
|
-
}).strict()
|
|
14053
|
+
}).strict().refine(
|
|
14054
|
+
(rule) => !rule.labels || rule.labels.length === rule.values.length,
|
|
14055
|
+
{ message: "Enum labels must match enum values one-for-one" }
|
|
14056
|
+
)
|
|
14044
14057
|
]);
|
|
14045
14058
|
external_exports.union([
|
|
14046
14059
|
external_exports.boolean(),
|
|
@@ -14068,7 +14081,7 @@ var StateMachineStateSchema = external_exports.union([
|
|
|
14068
14081
|
external_exports.string(),
|
|
14069
14082
|
external_exports.object({
|
|
14070
14083
|
name: external_exports.string().min(1),
|
|
14071
|
-
label: external_exports.string().optional(),
|
|
14084
|
+
label: external_exports.string().min(1).optional(),
|
|
14072
14085
|
description: external_exports.string().optional(),
|
|
14073
14086
|
isFinal: external_exports.boolean().optional()
|
|
14074
14087
|
}).strict()
|
|
@@ -14857,18 +14870,24 @@ function normalizeEnumInput(enumSpec) {
|
|
|
14857
14870
|
(value) => typeof value === "string" && value.length > 0
|
|
14858
14871
|
);
|
|
14859
14872
|
if (values.length === 0) return null;
|
|
14860
|
-
|
|
14873
|
+
const labels = Array.isArray(config.labels) && config.labels.length === values.length ? config.labels : values;
|
|
14874
|
+
return {
|
|
14875
|
+
values,
|
|
14876
|
+
labels,
|
|
14877
|
+
...config.message ? { message: config.message } : {}
|
|
14878
|
+
};
|
|
14861
14879
|
}
|
|
14862
14880
|
function buildEnumFieldMutations(fieldPath, enumSpec) {
|
|
14863
14881
|
const normalized = normalizeEnumInput(enumSpec);
|
|
14864
14882
|
if (!normalized) return [];
|
|
14865
14883
|
const messageArg = normalized.message ? `, message: ${JSON.stringify(normalized.message)}` : "";
|
|
14884
|
+
const labelsArg = normalized.labels ? `, labels: ${JSON.stringify(normalized.labels)}` : "";
|
|
14866
14885
|
return [
|
|
14867
14886
|
{
|
|
14868
14887
|
label: `set enum on ${fieldPath}`,
|
|
14869
14888
|
query: `mutation { at(path: ${JSON.stringify(fieldPath)}) { set_enum(values: ${JSON.stringify(
|
|
14870
14889
|
normalized.values
|
|
14871
|
-
)}${messageArg}) { values } } }`
|
|
14890
|
+
)}${labelsArg}${messageArg}) { values labels } } }`
|
|
14872
14891
|
}
|
|
14873
14892
|
];
|
|
14874
14893
|
}
|
|
@@ -14878,7 +14897,7 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14878
14897
|
fieldRows: [
|
|
14879
14898
|
{
|
|
14880
14899
|
key: "enum",
|
|
14881
|
-
description: 'Allowed values.
|
|
14900
|
+
description: 'Allowed values. Use `{ "values": [...], "labels": [...] }` for authored display labels; otherwise each unchanged value is its display fallback.'
|
|
14882
14901
|
}
|
|
14883
14902
|
]
|
|
14884
14903
|
},
|
|
@@ -14888,6 +14907,7 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14888
14907
|
type EnumMetamodel {
|
|
14889
14908
|
model: Model!
|
|
14890
14909
|
values: [String!]!
|
|
14910
|
+
labels: [String!]!
|
|
14891
14911
|
message: String
|
|
14892
14912
|
}
|
|
14893
14913
|
|
|
@@ -14896,7 +14916,7 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14896
14916
|
}
|
|
14897
14917
|
|
|
14898
14918
|
extend type ModelMutation {
|
|
14899
|
-
set_enum(values: [String!]!, message: String): EnumMetamodel
|
|
14919
|
+
set_enum(values: [String!]!, labels: [String!], message: String): EnumMetamodel
|
|
14900
14920
|
}
|
|
14901
14921
|
`
|
|
14902
14922
|
],
|
|
@@ -14905,15 +14925,19 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14905
14925
|
EnumMetamodel: {
|
|
14906
14926
|
model: (value) => value.model,
|
|
14907
14927
|
values: (value) => value.values,
|
|
14928
|
+
labels: (value) => value.labels || [],
|
|
14908
14929
|
message: (value) => value.message || null
|
|
14909
14930
|
},
|
|
14910
14931
|
Model: {
|
|
14911
14932
|
enum_rule: async (ant) => await run(ant.enum_rule())
|
|
14912
14933
|
},
|
|
14913
14934
|
ModelMutation: {
|
|
14914
|
-
set_enum: async (ant, { values, message }) => {
|
|
14915
|
-
const
|
|
14916
|
-
|
|
14935
|
+
set_enum: async (ant, { values, labels, message }) => {
|
|
14936
|
+
const resolvedLabels = Array.isArray(labels) && labels.length === values.length ? labels : values;
|
|
14937
|
+
const model = await run(
|
|
14938
|
+
ant.set_enum(values, resolvedLabels, message)
|
|
14939
|
+
);
|
|
14940
|
+
return { model, values, labels: resolvedLabels, message };
|
|
14917
14941
|
}
|
|
14918
14942
|
}
|
|
14919
14943
|
};
|
|
@@ -14926,7 +14950,7 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14926
14950
|
},
|
|
14927
14951
|
summary: {
|
|
14928
14952
|
selections: {
|
|
14929
|
-
propertyFields: [`enum_rule { values message }`]
|
|
14953
|
+
propertyFields: [`enum_rule { values labels message }`]
|
|
14930
14954
|
},
|
|
14931
14955
|
readPropertySummary(rawProperty) {
|
|
14932
14956
|
const values = Array.isArray(rawProperty.enum_rule?.values) ? rawProperty.enum_rule.values.filter(
|
|
@@ -14934,8 +14958,15 @@ var enumMetamodelPackage = defineMetamodelPackage({
|
|
|
14934
14958
|
) : [];
|
|
14935
14959
|
if (values.length === 0) return { enumRule: null };
|
|
14936
14960
|
const message = typeof rawProperty.enum_rule?.message === "string" ? rawProperty.enum_rule.message : null;
|
|
14961
|
+
const labels = Array.isArray(rawProperty.enum_rule?.labels) ? rawProperty.enum_rule.labels.filter(
|
|
14962
|
+
(label) => typeof label === "string" && label.length > 0
|
|
14963
|
+
) : [];
|
|
14937
14964
|
return {
|
|
14938
|
-
enumRule:
|
|
14965
|
+
enumRule: {
|
|
14966
|
+
values,
|
|
14967
|
+
...labels.length === values.length ? { labels } : {},
|
|
14968
|
+
...message ? { message } : {}
|
|
14969
|
+
}
|
|
14939
14970
|
};
|
|
14940
14971
|
}
|
|
14941
14972
|
},
|
|
@@ -16843,7 +16874,7 @@ ${effectMetamodelTable}
|
|
|
16843
16874
|
| \`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. |
|
|
16844
16875
|
| \`graphql(query, variables?)\` | **GraphQL** \u2014 see dedicated subsection below. |
|
|
16845
16876
|
| \`defineRelationship\`, \`getRelationships\`, \`attach\`, \`detach\`, \`listRelated\` | Imperative relationship operations (same ideas as manifest \`defineRelationship\`). |
|
|
16846
|
-
| \`sessions.list({ status?, sessionScope?, limit?,
|
|
16877
|
+
| \`sessions.list({ status?, sessionScope?, limit?, cursor? })\`, \`sessions.create({ sessionScope? })\`, \`sessions.connect()\`, \`sessions.reopen()\`, \`sessions.close()\` | Scoped, bounded session history and lifecycle for this environment. |
|
|
16847
16878
|
|
|
16848
16879
|
### \`Session\` (live runtime connection)
|
|
16849
16880
|
|
|
@@ -16892,7 +16923,7 @@ Use \`environment.graphql(query, variables?)\` when you need **query/mutation ac
|
|
|
16892
16923
|
| \`granular simulate\` | Open simulator in browser. |
|
|
16893
16924
|
| \`granular simulate --print-url\` | Print a deep-linkable simulator URL without opening the browser. |
|
|
16894
16925
|
| \`granular connect test --json\` | Verify auth and environment connectivity with a real session. |
|
|
16895
|
-
| \`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 \`--
|
|
16926
|
+
| \`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. |
|
|
16896
16927
|
| \`granular graphql --query '...' --json\` | Run a GraphQL query or mutation against the live graph. |
|
|
16897
16928
|
| \`granular effects list/diff --json\` | Inspect declared versus live ready effects. |
|
|
16898
16929
|
| \`granular job run --file ./job.ts --json\` | Execute a real runtime job from the terminal or CI. |
|
|
@@ -17573,7 +17604,7 @@ Use this for command execution, environment setup, and shipping flows.
|
|
|
17573
17604
|
| \`granular effects list --json\` | Inspect declared and live effects for an environment |
|
|
17574
17605
|
| \`granular effects diff --json\` | Compare declared effects to live ready handlers |
|
|
17575
17606
|
| \`granular session create --session-scope <scope> --json\` | Create a fresh, application-scoped session for an environment |
|
|
17576
|
-
| \`granular session list --session-scope <scope> --limit 25 --
|
|
17607
|
+
| \`granular session list --session-scope <scope> --limit 25 --json\` | List one bounded page of indexed sessions; use the returned cursor for the next page |
|
|
17577
17608
|
| \`granular session heap --json\` | Inspect session heap |
|
|
17578
17609
|
| \`granular session doc --json\` | Inspect the Automerge-backed session document |
|
|
17579
17610
|
| \`granular job run --file ./job.ts\` | Execute a real job against the ontology runtime |
|
|
@@ -17657,7 +17688,7 @@ Use this for runtime debugging after the ontology builds but behavior does not m
|
|
|
17657
17688
|
| Goal | Preferred path |
|
|
17658
17689
|
| --- | --- |
|
|
17659
17690
|
| Create or rotate a session | \`granular session create --session-scope <scope> --json\` |
|
|
17660
|
-
| List known sessions | \`granular session list --session-scope <scope> --limit 25 --
|
|
17691
|
+
| List known sessions | \`granular session list --session-scope <scope> --limit 25 --json\` |
|
|
17661
17692
|
| Inspect heap | \`granular session heap --json\` |
|
|
17662
17693
|
| Inspect full document | \`granular session doc --json\` |
|
|
17663
17694
|
| Verify connectivity | \`granular connect test\` |
|
|
@@ -23721,7 +23752,7 @@ function resolveHandlerForMode(effectMap, effect, request) {
|
|
|
23721
23752
|
if (mode === "artifactOptions") {
|
|
23722
23753
|
if (!effect.artifactOptionsHandler) {
|
|
23723
23754
|
throw new Error(
|
|
23724
|
-
`Artifact
|
|
23755
|
+
`Artifact field options are not supported for ${request.effectKey}`
|
|
23725
23756
|
);
|
|
23726
23757
|
}
|
|
23727
23758
|
return {
|
|
@@ -24233,7 +24264,6 @@ function buildEffectMetamodelMutations(toolPath, spec) {
|
|
|
24233
24264
|
// src/client.ts
|
|
24234
24265
|
var DEFAULT_CONVERSATION_SESSION_LIST_LIMIT = 100;
|
|
24235
24266
|
var MAX_CONVERSATION_SESSION_LIST_LIMIT = 500;
|
|
24236
|
-
var MAX_CONVERSATION_SESSION_LIST_OFFSET = 1e5;
|
|
24237
24267
|
function requireUserEnvironmentSequence(value, field) {
|
|
24238
24268
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) {
|
|
24239
24269
|
throw new Error(
|
|
@@ -24613,6 +24643,10 @@ var Environment = class _Environment {
|
|
|
24613
24643
|
get sessions() {
|
|
24614
24644
|
return {
|
|
24615
24645
|
list: async (options = {}) => this.listSessions(options),
|
|
24646
|
+
page: async (options = {}) => this.granular.listSessionsPage({
|
|
24647
|
+
...options,
|
|
24648
|
+
environmentId: this.environmentId
|
|
24649
|
+
}),
|
|
24616
24650
|
create: async (options) => this.createSession(options),
|
|
24617
24651
|
connect: async (sessionId, options) => this.connectSession(sessionId, options),
|
|
24618
24652
|
reopen: async (sessionId, options) => this.reopenSession(sessionId, options),
|
|
@@ -24868,7 +24902,6 @@ var Environment = class _Environment {
|
|
|
24868
24902
|
headers: {
|
|
24869
24903
|
Authorization: `Bearer ${this._apiKey}`,
|
|
24870
24904
|
"Content-Type": "application/json",
|
|
24871
|
-
Connection: "close",
|
|
24872
24905
|
...options.headers
|
|
24873
24906
|
}
|
|
24874
24907
|
});
|
|
@@ -26392,8 +26425,7 @@ var EnvironmentSession = class extends Session {
|
|
|
26392
26425
|
method: "POST",
|
|
26393
26426
|
headers: {
|
|
26394
26427
|
"Content-Type": "application/json",
|
|
26395
|
-
Authorization: `Bearer ${this.environment.authToken}
|
|
26396
|
-
Connection: "close"
|
|
26428
|
+
Authorization: `Bearer ${this.environment.authToken}`
|
|
26397
26429
|
},
|
|
26398
26430
|
body: JSON.stringify({
|
|
26399
26431
|
reason: "sdk_disconnect_http_fallback",
|
|
@@ -27095,6 +27127,21 @@ var Granular = class _Granular {
|
|
|
27095
27127
|
* List indexed sessions using ownership filters and bounded pagination.
|
|
27096
27128
|
*/
|
|
27097
27129
|
async listSessions(options) {
|
|
27130
|
+
const items = [];
|
|
27131
|
+
let cursor = options.cursor?.trim() || void 0;
|
|
27132
|
+
let pageCount = 0;
|
|
27133
|
+
do {
|
|
27134
|
+
const page = await this.listSessionsPage({ ...options, cursor });
|
|
27135
|
+
items.push(...page.items);
|
|
27136
|
+
cursor = page.nextCursor || void 0;
|
|
27137
|
+
pageCount += 1;
|
|
27138
|
+
if (pageCount > 1e4) {
|
|
27139
|
+
throw new Error("Session pagination exceeded the safe page limit");
|
|
27140
|
+
}
|
|
27141
|
+
} while (cursor);
|
|
27142
|
+
return items;
|
|
27143
|
+
}
|
|
27144
|
+
async listSessionsPage(options) {
|
|
27098
27145
|
const environmentId = options.environmentId?.trim();
|
|
27099
27146
|
const sandboxId = options.sandboxId?.trim();
|
|
27100
27147
|
const subjectId = options.subjectId?.trim();
|
|
@@ -27122,17 +27169,14 @@ var Granular = class _Granular {
|
|
|
27122
27169
|
1,
|
|
27123
27170
|
MAX_CONVERSATION_SESSION_LIST_LIMIT
|
|
27124
27171
|
);
|
|
27125
|
-
const
|
|
27126
|
-
|
|
27127
|
-
"
|
|
27128
|
-
|
|
27129
|
-
0,
|
|
27130
|
-
MAX_CONVERSATION_SESSION_LIST_OFFSET
|
|
27131
|
-
);
|
|
27172
|
+
const cursor = options.cursor?.trim();
|
|
27173
|
+
if (options.cursor !== void 0 && !cursor) {
|
|
27174
|
+
throw new Error("Session list cursor must be a non-empty string.");
|
|
27175
|
+
}
|
|
27132
27176
|
const query = new URLSearchParams({
|
|
27133
|
-
limit: String(limit)
|
|
27134
|
-
offset: String(offset)
|
|
27177
|
+
limit: String(limit)
|
|
27135
27178
|
});
|
|
27179
|
+
if (cursor) query.set("cursor", cursor);
|
|
27136
27180
|
if (environmentId) query.set("environmentId", environmentId);
|
|
27137
27181
|
if (sandboxId) query.set("sandboxId", sandboxId);
|
|
27138
27182
|
if (subjectId) query.set("userId", subjectId);
|
|
@@ -27140,11 +27184,13 @@ var Granular = class _Granular {
|
|
|
27140
27184
|
query.set("sessionScope", options.sessionScope.trim());
|
|
27141
27185
|
}
|
|
27142
27186
|
if (status !== "all") query.set("status", status);
|
|
27143
|
-
const res = await this.request(
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
|
|
27147
|
-
|
|
27187
|
+
const res = await this.request(`/control/sessions?${query.toString()}`);
|
|
27188
|
+
const items = Array.isArray(res.items) ? res.items.map((row) => this.normalizeConversationSession(row)) : [];
|
|
27189
|
+
const nextCursor = res.nextCursor ?? null;
|
|
27190
|
+
if (nextCursor === cursor) {
|
|
27191
|
+
throw new Error("Session pagination cursor did not advance");
|
|
27192
|
+
}
|
|
27193
|
+
return { items, nextCursor };
|
|
27148
27194
|
}
|
|
27149
27195
|
/**
|
|
27150
27196
|
* List active (open) sessions for an environment.
|
|
@@ -27171,9 +27217,6 @@ var Granular = class _Granular {
|
|
|
27171
27217
|
if (typeof options.limit === "number") {
|
|
27172
27218
|
query.set("limit", String(options.limit));
|
|
27173
27219
|
}
|
|
27174
|
-
if (typeof options.offset === "number") {
|
|
27175
|
-
query.set("offset", String(options.offset));
|
|
27176
|
-
}
|
|
27177
27220
|
const state = await this.request(
|
|
27178
27221
|
`/sdk/user-environment-state?${query.toString()}`
|
|
27179
27222
|
);
|
|
@@ -28107,10 +28150,20 @@ var Granular = class _Granular {
|
|
|
28107
28150
|
get environments() {
|
|
28108
28151
|
return {
|
|
28109
28152
|
list: async (sandboxId) => {
|
|
28110
|
-
const
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
|
|
28153
|
+
const environments = [];
|
|
28154
|
+
let cursor = null;
|
|
28155
|
+
do {
|
|
28156
|
+
const query = cursor ? `?limit=100&cursor=${encodeURIComponent(cursor)}` : "";
|
|
28157
|
+
const result = await this.request(
|
|
28158
|
+
`/control/sandboxes/${sandboxId}/environments${query}`
|
|
28159
|
+
);
|
|
28160
|
+
environments.push(...result.items.map(normalizeEnvironmentData));
|
|
28161
|
+
if (result.nextCursor && result.nextCursor === cursor) {
|
|
28162
|
+
throw new Error("Environment pagination cursor did not advance");
|
|
28163
|
+
}
|
|
28164
|
+
cursor = result.nextCursor;
|
|
28165
|
+
} while (cursor);
|
|
28166
|
+
return environments;
|
|
28114
28167
|
},
|
|
28115
28168
|
get: async (environmentId) => {
|
|
28116
28169
|
return normalizeEnvironmentData(
|
|
@@ -28320,7 +28373,6 @@ var Granular = class _Granular {
|
|
|
28320
28373
|
headers: {
|
|
28321
28374
|
Authorization: `Bearer ${this.apiKey}`,
|
|
28322
28375
|
"Content-Type": "application/json",
|
|
28323
|
-
Connection: "close",
|
|
28324
28376
|
...options.headers
|
|
28325
28377
|
}
|
|
28326
28378
|
});
|
|
@@ -28708,13 +28760,13 @@ async function resolveEnvironmentData(granular, options) {
|
|
|
28708
28760
|
return await granular.environments.get(connection.environmentId);
|
|
28709
28761
|
}
|
|
28710
28762
|
async function listSessionsForEnvironment(granular, environmentId, options) {
|
|
28711
|
-
return granular.
|
|
28763
|
+
return granular.listSessionsPage({
|
|
28712
28764
|
environmentId,
|
|
28713
28765
|
status: options.status,
|
|
28714
28766
|
sessionScope: options.sessionScope,
|
|
28715
28767
|
subjectId: options.subjectId,
|
|
28716
28768
|
limit: options.limit,
|
|
28717
|
-
|
|
28769
|
+
cursor: options.cursor
|
|
28718
28770
|
});
|
|
28719
28771
|
}
|
|
28720
28772
|
async function connectRuntime(options) {
|
|
@@ -28829,9 +28881,9 @@ async function connectTestCommand(options) {
|
|
|
28829
28881
|
|
|
28830
28882
|
// src/cli/commands/session.ts
|
|
28831
28883
|
function parseSessionListInteger(value, name) {
|
|
28832
|
-
const fallback2 =
|
|
28833
|
-
const minimum =
|
|
28834
|
-
const maximum =
|
|
28884
|
+
const fallback2 = 25;
|
|
28885
|
+
const minimum = 1;
|
|
28886
|
+
const maximum = 500;
|
|
28835
28887
|
if (value === void 0 || value === "") return fallback2;
|
|
28836
28888
|
const parsed = typeof value === "number" ? value : Number.parseInt(value.trim(), 10);
|
|
28837
28889
|
if (!Number.isInteger(parsed) || String(parsed) !== String(value).trim() || parsed < minimum || parsed > maximum) {
|
|
@@ -28980,7 +29032,7 @@ async function sessionListCommand(options) {
|
|
|
28980
29032
|
);
|
|
28981
29033
|
}
|
|
28982
29034
|
const limit = parseSessionListInteger(options.limit, "limit");
|
|
28983
|
-
const
|
|
29035
|
+
const cursor = options.cursor?.trim() || void 0;
|
|
28984
29036
|
const requestedEnvironment = options.environment ?? "dev";
|
|
28985
29037
|
if (!emitJson) {
|
|
28986
29038
|
printHeader();
|
|
@@ -28993,7 +29045,7 @@ async function sessionListCommand(options) {
|
|
|
28993
29045
|
subjectId: options.subjectId,
|
|
28994
29046
|
createIfMissing: false
|
|
28995
29047
|
});
|
|
28996
|
-
const
|
|
29048
|
+
const page = await listSessionsForEnvironment(
|
|
28997
29049
|
granular,
|
|
28998
29050
|
environmentData.environmentId,
|
|
28999
29051
|
{
|
|
@@ -29001,9 +29053,10 @@ async function sessionListCommand(options) {
|
|
|
29001
29053
|
sessionScope: options.sessionScope?.trim() || void 0,
|
|
29002
29054
|
subjectId: options.subjectId?.trim() || void 0,
|
|
29003
29055
|
limit,
|
|
29004
|
-
|
|
29056
|
+
cursor
|
|
29005
29057
|
}
|
|
29006
29058
|
);
|
|
29059
|
+
const items = page.items;
|
|
29007
29060
|
const payload = {
|
|
29008
29061
|
ontologyId: environmentData.sandboxId,
|
|
29009
29062
|
environmentId: environmentData.environmentId,
|
|
@@ -29012,10 +29065,10 @@ async function sessionListCommand(options) {
|
|
|
29012
29065
|
sessionScope: options.sessionScope?.trim() || null,
|
|
29013
29066
|
page: {
|
|
29014
29067
|
limit,
|
|
29015
|
-
|
|
29068
|
+
cursor: cursor ?? null,
|
|
29016
29069
|
returned: items.length,
|
|
29017
|
-
|
|
29018
|
-
|
|
29070
|
+
hasNextPage: page.nextCursor !== null,
|
|
29071
|
+
nextCursor: page.nextCursor
|
|
29019
29072
|
},
|
|
29020
29073
|
items
|
|
29021
29074
|
};
|
|
@@ -29040,7 +29093,7 @@ async function sessionListCommand(options) {
|
|
|
29040
29093
|
])
|
|
29041
29094
|
);
|
|
29042
29095
|
info(
|
|
29043
|
-
`Showing ${items.length} session${items.length === 1 ? "" : "s"}
|
|
29096
|
+
`Showing ${items.length} session${items.length === 1 ? "" : "s"}.` + (page.nextCursor ? ` Use --cursor ${page.nextCursor} for the next page.` : "")
|
|
29044
29097
|
);
|
|
29045
29098
|
console.log();
|
|
29046
29099
|
}
|
|
@@ -29988,7 +30041,7 @@ session.command("list").description("List one bounded page of indexed sessions f
|
|
|
29988
30041
|
"--status <status>",
|
|
29989
30042
|
"Session status: active|closed|expired|failed|timeout|all",
|
|
29990
30043
|
"active"
|
|
29991
|
-
).option("--limit <count>", "Rows to return (1-500)", "25").option("--
|
|
30044
|
+
).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(
|
|
29992
30045
|
async (options) => {
|
|
29993
30046
|
try {
|
|
29994
30047
|
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-CDLmk-KW.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
|
*/
|
|
@@ -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-CDLmk-KW.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
|
*/
|
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-IQeOoPnO.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-CDLmk-KW.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-CDLmk-KW.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-BziqnDTl.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-CDLmk-KW.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-CDLmk-KW.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';
|