graphlit-client 1.0.20260404002 → 1.0.20260405002
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/client.js
CHANGED
|
@@ -6885,6 +6885,10 @@ class Graphlit {
|
|
|
6885
6885
|
});
|
|
6886
6886
|
// Clear stuck intervention after it's been included
|
|
6887
6887
|
pendingStuckIntervention = undefined;
|
|
6888
|
+
// Merge caller-provided instructions with harness instructions
|
|
6889
|
+
const mergedInstructions = [options?.instructions, turnInstructions]
|
|
6890
|
+
.filter(Boolean)
|
|
6891
|
+
.join("\n\n") || undefined;
|
|
6888
6892
|
// 4. Budget warning callback
|
|
6889
6893
|
if (options?.onBudgetWarning && turnsRemaining <= windDownTurns * 2) {
|
|
6890
6894
|
const snapshot = {
|
|
@@ -6899,7 +6903,7 @@ class Graphlit {
|
|
|
6899
6903
|
options.onBudgetWarning(snapshot);
|
|
6900
6904
|
}
|
|
6901
6905
|
// 5. Decide execution path: bare continuation vs formatted
|
|
6902
|
-
const useBareContinuation = turn > 0 && !
|
|
6906
|
+
const useBareContinuation = turn > 0 && !mergedInstructions;
|
|
6903
6907
|
let loopMessages;
|
|
6904
6908
|
let budgetTracker;
|
|
6905
6909
|
if (useBareContinuation && cachedTokenLimit) {
|
|
@@ -6914,7 +6918,7 @@ class Graphlit {
|
|
|
6914
6918
|
}
|
|
6915
6919
|
else {
|
|
6916
6920
|
// Formatted path: call formatConversation
|
|
6917
|
-
const formatResponse = await this.formatConversation(turn === 0 ? prompt : "Continue.", conversationId, agentSpec, allTools, undefined, true, options?.correlationId, options?.persona,
|
|
6921
|
+
const formatResponse = await this.formatConversation(turn === 0 ? prompt : "Continue.", conversationId, agentSpec, allTools, undefined, true, options?.correlationId, options?.persona, mergedInstructions, agentScratchpad, options?.skills);
|
|
6918
6922
|
const formattedMessage = formatResponse.formatConversation?.message;
|
|
6919
6923
|
const conversationHistory = formatResponse.formatConversation?.details?.messages;
|
|
6920
6924
|
const formatDetails = formatResponse.formatConversation?.details;
|
|
@@ -79,6 +79,7 @@ export const GetAgent = gql `
|
|
|
79
79
|
description
|
|
80
80
|
specification {
|
|
81
81
|
id
|
|
82
|
+
name
|
|
82
83
|
}
|
|
83
84
|
trigger {
|
|
84
85
|
types
|
|
@@ -324,6 +325,7 @@ export const QueryAgents = gql `
|
|
|
324
325
|
description
|
|
325
326
|
specification {
|
|
326
327
|
id
|
|
328
|
+
name
|
|
327
329
|
}
|
|
328
330
|
trigger {
|
|
329
331
|
types
|
|
@@ -149,8 +149,8 @@ export type Agent = {
|
|
|
149
149
|
schedulePolicy?: Maybe<AgentSchedulePolicy>;
|
|
150
150
|
/** The agent scratchpad, for storing harness working memory. */
|
|
151
151
|
scratchpad?: Maybe<Scalars['String']['output']>;
|
|
152
|
-
/** The specification
|
|
153
|
-
specification?: Maybe<
|
|
152
|
+
/** The LLM specification used by this agent. */
|
|
153
|
+
specification?: Maybe<Specification>;
|
|
154
154
|
/** The state of the agent (i.e. created, finished). */
|
|
155
155
|
state: EntityState;
|
|
156
156
|
/** The agent timeout. */
|
|
@@ -25349,8 +25349,9 @@ export type GetAgentQuery = {
|
|
|
25349
25349
|
id: string;
|
|
25350
25350
|
} | null;
|
|
25351
25351
|
specification?: {
|
|
25352
|
-
__typename?: '
|
|
25352
|
+
__typename?: 'Specification';
|
|
25353
25353
|
id: string;
|
|
25354
|
+
name: string;
|
|
25354
25355
|
} | null;
|
|
25355
25356
|
trigger?: {
|
|
25356
25357
|
__typename?: 'AgentTriggerFilter';
|
|
@@ -25659,8 +25660,9 @@ export type QueryAgentsQuery = {
|
|
|
25659
25660
|
id: string;
|
|
25660
25661
|
};
|
|
25661
25662
|
specification?: {
|
|
25662
|
-
__typename?: '
|
|
25663
|
+
__typename?: 'Specification';
|
|
25663
25664
|
id: string;
|
|
25665
|
+
name: string;
|
|
25664
25666
|
} | null;
|
|
25665
25667
|
trigger?: {
|
|
25666
25668
|
__typename?: 'AgentTriggerFilter';
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export interface RunAgentOptions {
|
|
|
148
148
|
onStreamEvent?: (event: AgentStreamEvent) => void;
|
|
149
149
|
abortSignal?: AbortSignal;
|
|
150
150
|
contextStrategy?: ContextStrategy;
|
|
151
|
+
instructions?: string;
|
|
151
152
|
correlationId?: string;
|
|
152
153
|
qualityAssessment?: boolean;
|
|
153
154
|
qualityAssessmentSpecification?: EntityReferenceInput;
|