@olane/o-lane 0.7.18 → 0.7.19
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/src/capabilities/enums/o-capability.type-enum.d.ts +1 -0
- package/dist/src/capabilities/enums/o-capability.type-enum.d.ts.map +1 -1
- package/dist/src/capabilities/enums/o-capability.type-enum.js +1 -0
- package/dist/src/capabilities/index.d.ts +2 -1
- package/dist/src/capabilities/index.d.ts.map +1 -1
- package/dist/src/capabilities/index.js +2 -1
- package/dist/src/capabilities/interfaces/{o-capability.config.d.ts → o-capability.config-interface.d.ts} +5 -4
- package/dist/src/capabilities/interfaces/o-capability.config-interface.d.ts.map +1 -0
- package/dist/src/capabilities/interfaces/o-capability.result-interface.d.ts +1 -2
- package/dist/src/capabilities/interfaces/o-capability.result-interface.d.ts.map +1 -1
- package/dist/src/capabilities/o-capability.config.d.ts +24 -0
- package/dist/src/capabilities/o-capability.config.d.ts.map +1 -0
- package/dist/src/capabilities/o-capability.config.js +25 -0
- package/dist/src/capabilities/o-capability.d.ts +9 -5
- package/dist/src/capabilities/o-capability.d.ts.map +1 -1
- package/dist/src/capabilities/o-capability.intelligence.d.ts.map +1 -1
- package/dist/src/capabilities/o-capability.intelligence.js +4 -18
- package/dist/src/capabilities/o-capability.js +4 -5
- package/dist/src/capabilities/o-capability.result.d.ts +6 -12
- package/dist/src/capabilities/o-capability.result.d.ts.map +1 -1
- package/dist/src/capabilities/o-capability.result.js +2 -10
- package/dist/src/capabilities-all/o-capability.all.d.ts +2 -3
- package/dist/src/capabilities-all/o-capability.all.d.ts.map +1 -1
- package/dist/src/capabilities-all/o-capability.all.js +6 -8
- package/dist/src/capabilities-configure/interfaces/o-capability.configure-config.d.ts +2 -2
- package/dist/src/capabilities-configure/interfaces/o-capability.configure-config.d.ts.map +1 -1
- package/dist/src/capabilities-configure/o-capability.configure.d.ts +0 -15
- package/dist/src/capabilities-configure/o-capability.configure.d.ts.map +1 -1
- package/dist/src/capabilities-configure/o-capability.configure.js +61 -47
- package/dist/src/capabilities-evaluate/o-capability.evaluate.d.ts +1 -0
- package/dist/src/capabilities-evaluate/o-capability.evaluate.d.ts.map +1 -1
- package/dist/src/capabilities-evaluate/o-capability.evaluate.js +17 -2
- package/dist/src/capabilities-execute/execute.capability.d.ts +13 -0
- package/dist/src/capabilities-execute/execute.capability.d.ts.map +1 -0
- package/dist/src/capabilities-execute/execute.capability.js +111 -0
- package/dist/src/capabilities-execute/interfaces/o-capability.configure-config.d.ts +8 -0
- package/dist/src/capabilities-execute/interfaces/o-capability.configure-config.d.ts.map +1 -0
- package/dist/src/capabilities-multiple-step/interfaces/o-capability.multiple-step-config.d.ts +1 -1
- package/dist/src/capabilities-multiple-step/interfaces/o-capability.multiple-step-config.d.ts.map +1 -1
- package/dist/src/capabilities-multiple-step/o-capability.multiple-step.d.ts.map +1 -1
- package/dist/src/capabilities-multiple-step/o-capability.multiple-step.js +0 -1
- package/dist/src/capabilities-search/interfaces/o-capability.search-config.d.ts +1 -1
- package/dist/src/capabilities-search/interfaces/o-capability.search-config.d.ts.map +1 -1
- package/dist/src/capabilities-search/o-capability.search.d.ts.map +1 -1
- package/dist/src/capabilities-search/o-capability.search.js +0 -4
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -2
- package/dist/src/interfaces/o-lane.config.d.ts +3 -0
- package/dist/src/interfaces/o-lane.config.d.ts.map +1 -1
- package/dist/src/o-lane.d.ts +6 -12
- package/dist/src/o-lane.d.ts.map +1 -1
- package/dist/src/o-lane.js +23 -180
- package/dist/src/o-lane.mixin.d.ts.map +1 -1
- package/dist/src/o-lane.mixin.js +9 -5
- package/dist/src/prompts/agent.prompt.d.ts +1 -12
- package/dist/src/prompts/agent.prompt.d.ts.map +1 -1
- package/dist/src/prompts/agent.prompt.js +80 -138
- package/dist/src/prompts/configure.prompt.d.ts +1 -8
- package/dist/src/prompts/configure.prompt.d.ts.map +1 -1
- package/dist/src/prompts/configure.prompt.js +68 -47
- package/dist/src/prompts/execute.prompt.d.ts +9 -0
- package/dist/src/prompts/execute.prompt.d.ts.map +1 -0
- package/dist/src/prompts/execute.prompt.js +47 -0
- package/dist/src/prompts/index.d.ts +3 -0
- package/dist/src/prompts/index.d.ts.map +1 -0
- package/dist/src/prompts/index.js +2 -0
- package/dist/src/prompts/interfaces/o-prompt.config.d.ts +8 -0
- package/dist/src/prompts/interfaces/o-prompt.config.d.ts.map +1 -0
- package/dist/src/prompts/interfaces/o-prompt.config.js +1 -0
- package/dist/src/prompts/o-prompt.d.ts +36 -0
- package/dist/src/prompts/o-prompt.d.ts.map +1 -0
- package/dist/src/prompts/o-prompt.js +92 -0
- package/dist/src/storage/default.prompt-loader.d.ts +14 -0
- package/dist/src/storage/default.prompt-loader.d.ts.map +1 -0
- package/dist/src/storage/default.prompt-loader.js +34 -0
- package/dist/src/storage/index.d.ts +1 -3
- package/dist/src/storage/index.d.ts.map +1 -1
- package/dist/src/storage/index.js +1 -5
- package/dist/src/storage/o-lane.storage-manager.d.ts +71 -0
- package/dist/src/storage/o-lane.storage-manager.d.ts.map +1 -0
- package/dist/src/storage/o-lane.storage-manager.js +208 -0
- package/dist/src/storage/prompt-loader.d.ts +10 -28
- package/dist/src/storage/prompt-loader.d.ts.map +1 -1
- package/dist/src/storage/prompt-loader.js +9 -112
- package/dist/test/index.d.ts +1 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +2 -0
- package/package.json +12 -10
- package/dist/src/capabilities/interfaces/o-capability.config.d.ts.map +0 -1
- package/dist/src/capabilities-task/interfaces/o-capability.task-config.d.ts +0 -16
- package/dist/src/capabilities-task/interfaces/o-capability.task-config.d.ts.map +0 -1
- package/dist/src/capabilities-task/o-capability.task-result.d.ts +0 -5
- package/dist/src/capabilities-task/o-capability.task-result.d.ts.map +0 -1
- package/dist/src/capabilities-task/o-capability.task-result.js +0 -3
- package/dist/src/capabilities-task/o-capability.task.d.ts +0 -20
- package/dist/src/capabilities-task/o-capability.task.d.ts.map +0 -1
- package/dist/src/capabilities-task/o-capability.task.js +0 -124
- package/dist/src/storage/prompt-schema.d.ts +0 -42
- package/dist/src/storage/prompt-schema.d.ts.map +0 -1
- package/dist/src/storage/prompt-schema.js +0 -29
- package/dist/src/storage/prompt-seeder.d.ts +0 -42
- package/dist/src/storage/prompt-seeder.d.ts.map +0 -1
- package/dist/src/storage/prompt-seeder.js +0 -141
- package/dist/src/storage/prompt-storage-provider.tool.d.ts +0 -99
- package/dist/src/storage/prompt-storage-provider.tool.d.ts.map +0 -1
- package/dist/src/storage/prompt-storage-provider.tool.js +0 -320
- package/dist/test/prompt-seeder.spec.d.ts +0 -2
- package/dist/test/prompt-seeder.spec.d.ts.map +0 -1
- package/dist/test/prompt-seeder.spec.js +0 -256
- package/dist/test/prompt-storage-provider.spec.d.ts +0 -2
- package/dist/test/prompt-storage-provider.spec.d.ts.map +0 -1
- package/dist/test/prompt-storage-provider.spec.js +0 -457
- /package/dist/src/capabilities/interfaces/{o-capability.config.js → o-capability.config-interface.js} +0 -0
- /package/dist/src/{capabilities-task/interfaces/o-capability.task-config.js → capabilities-execute/interfaces/o-capability.configure-config.js} +0 -0
package/dist/src/o-lane.mixin.js
CHANGED
|
@@ -4,6 +4,7 @@ import { oIntent } from './intent/index.js';
|
|
|
4
4
|
import { oLaneContext } from './o-lane.context.js';
|
|
5
5
|
import { oLaneManager } from './manager/o-lane.manager.js';
|
|
6
6
|
import { oCapabilityResult } from './capabilities/o-capability.result.js';
|
|
7
|
+
import { PromptLoaderDefault } from './storage/default.prompt-loader.js';
|
|
7
8
|
/**
|
|
8
9
|
* withLane mixin - adds lane execution capabilities to any tool base class
|
|
9
10
|
* This mixin pattern allows lane functionality to be composed with different
|
|
@@ -41,6 +42,9 @@ export function withLane(Base) {
|
|
|
41
42
|
type: oCapabilityType.HANDSHAKE,
|
|
42
43
|
});
|
|
43
44
|
}
|
|
45
|
+
getPromptLoader() {
|
|
46
|
+
return new PromptLoaderDefault();
|
|
47
|
+
}
|
|
44
48
|
/**
|
|
45
49
|
* Where all intents go to be resolved.
|
|
46
50
|
* @param request
|
|
@@ -48,14 +52,16 @@ export function withLane(Base) {
|
|
|
48
52
|
*/
|
|
49
53
|
async _tool_intent(request) {
|
|
50
54
|
this.logger.debug('Intent resolution called: ', request.params);
|
|
51
|
-
const { intent, context, streamTo, _isStreaming = false } = request.params;
|
|
55
|
+
const { intent, context, chatHistory, streamTo, _isStreaming = false } = request.params;
|
|
52
56
|
const pc = await this.manager.createLane({
|
|
53
57
|
intent: new oIntent({ intent: intent }),
|
|
54
58
|
currentNode: this,
|
|
55
59
|
caller: this.address,
|
|
56
60
|
streamTo: streamTo ? new oAddress(streamTo) : undefined,
|
|
57
61
|
useStream: _isStreaming,
|
|
62
|
+
chatHistory: chatHistory,
|
|
58
63
|
requestId: request.id, // Pass request ID for proper response correlation
|
|
64
|
+
promptLoader: this.getPromptLoader(),
|
|
59
65
|
onChunk: _isStreaming
|
|
60
66
|
? async (chunk) => {
|
|
61
67
|
if (chunk?._last ||
|
|
@@ -68,9 +74,7 @@ export function withLane(Base) {
|
|
|
68
74
|
}
|
|
69
75
|
: undefined,
|
|
70
76
|
context: context
|
|
71
|
-
? new oLaneContext([
|
|
72
|
-
`[Chat History Context Begin]\n${context}\n[Chat History Context End]`,
|
|
73
|
-
])
|
|
77
|
+
? new oLaneContext([])
|
|
74
78
|
: undefined,
|
|
75
79
|
});
|
|
76
80
|
// TODO: brendon experiment review
|
|
@@ -82,7 +86,6 @@ export function withLane(Base) {
|
|
|
82
86
|
response = await pc.execute();
|
|
83
87
|
const completeResponse = {
|
|
84
88
|
result: response?.result,
|
|
85
|
-
humanResult: response?.humanResult, // Full human-readable formatted result (AI-generated markdown)
|
|
86
89
|
summary: response?.config?.params?.summary, // Short 1-2 sentence summary
|
|
87
90
|
error: response?.error,
|
|
88
91
|
cycles: pc.sequence.length,
|
|
@@ -112,6 +115,7 @@ export function withLane(Base) {
|
|
|
112
115
|
intent: new oIntent({ intent: 'replay' }),
|
|
113
116
|
currentNode: this,
|
|
114
117
|
caller: this.address,
|
|
118
|
+
promptLoader: this.getPromptLoader(),
|
|
115
119
|
});
|
|
116
120
|
try {
|
|
117
121
|
const response = await lane.replay(cid);
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Cycle instructions for seeding - extracted from agent workflow
|
|
3
|
-
*/
|
|
4
|
-
export declare const CYCLE_INSTRUCTIONS_SEED = "\n Every Step Instructions:\n1. Review the provided user intent, context and agent history\n2. If you can complete the user intent, return the \"Stop Response\" using the [RETURN INSTRUCTIONS] steps\n3. If the intent is already completed in past cycles, return the \"Stop Response\" using the [RETURN INSTRUCTIONS] steps\n4. If you experience 3 similar errors in a row, return the \"Stop Response\" indicating an error and follow the [RETURN INSTRUCTIONS] steps\n5. Review the current step number and perform the instructions associated with that step\n6. Start with step 1\n\nStep 1 - Evaluate the intent\n1. A complex step means there are multiple actions required to complete the user's intent\n2. If the intent is not-complex, continue to step 2\n3. If the intent is complex, break it up into a list of simple concise intents. Return the \"Complex Intent Response\" using the [RETURN INSTRUCTIONS]\n\nStep 2 - Search for tools and context\n1. If all entities and tool addresses are known within the user intent, continue to step 4\n2. If you know the tool address to use to complete the user intent, continue to step 4\n3. If there are unknown tool addresses or entities within the user intent, generate search queries to resolve the unknown entities. \n4. Use the o://mcp search tool to find model context protocol servers (MCP servers) that can help you add tooling that could help you complete the user intent.\n5. If there is a placeholder address used (o://.../placeholder), do not extract the contents of the placeholder address unless necessary for completing the user intent.\n6. Use the search results data & tooling to help you resolve the unknown entities.\n7. Continue to step 3.\n\nStep 3 - Filter Search Results\n1. If all search results are relevant to the user intent resolution, continue to step 4.\n2. Filter the search results for information that may contain supporting data or tooling that can help complete the user intent.\n3. If you do not see anything that can help you. Return the \"Stop Response\" using the [RETURN INSTRUCTIONS]\n4. Continue to step 4\n\nStep 4 - Configure the target tool address use\n1. Identify the tool address that most likely will help you complete the user intent.\n2. Review the provided context for past cycles that contain configuration instructions for the target tool address.\n3. If there is no configuration instructions for the target tool address, return the \"Configure Response\" using the [RETURN INSTRUCTIONS]\n4. Identify if there are any missing parameter values for the target tool address and search for them if so.\n5. If the tool use configuration is already known including all parameter values, continue to step 5\n\nStep 5 - Use target tool address\n1. If the target tool address configuration is known, return the \"Use Tool Response\" using the [RETURN INSTRUCTIONS]\n2. If the target tool address with the same configuration has failed in the past cycles, return the \"Error Response\" using the [RETURN INSTRUCTIONS] steps to indicate the error.\n3. Using this filtered tool list, return the \"Use Tool Response\" using the [RETURN INSTRUCTIONS] steps to return a series of addresses and respective intents to align with the current user intent resolution goal\n4. Continue to step 6\n\nStep 6 - Review the tool use results\n1. Analyze each tool use result\n2. When formatting tool results for the user in a Stop Response, present as clean markdown:\n - For general contexts, present as clean markdown:\n * Use headings to organize different sections\n * Use lists for multiple items\n * Use bold for important values or labels\n * Use code blocks for addresses (e.g., `o://tool-address`)\n * Transform raw JSON into readable prose and structured lists\n3. In the summary field, provide a 1-2 sentence overview\n4. If it failed, clearly explain why in a user-friendly way\n\n\n ";
|
|
5
|
-
/**
|
|
6
|
-
* Output instructions for seeding - extracted from return format specifications
|
|
7
|
-
*/
|
|
8
|
-
export declare const OUTPUT_INSTRUCTIONS_SEED = "\n[RETURN INSTRUCTIONS BEGIN]\nThese are the types of cycle responses: \"Complex Intent Response\", \"Search Response\", \"Use Tool Response\", \"Stop Response\", \"Error Response\", \"Configure Response\".\n\nAll Return Step Instructions:\n1. Do not explain your reasoning process, just return the output in the correct format.\n2. Determine what type of results we have\n3. Output the respective results using the matching output type.\n4. Generate a reasoning key value pair for why this result was returned.\n5. The reasoning should be no longer than 1 sentence.\n6. The summary should be a short message used to inform the user of the result of the cycle. These updates should be insightful and concise and within 1-2 sentences.\n6. Do not include ```json or ``` in your output.\n\nComplex Intent Results:\n{\n \"intents\": [\n \"simple intent 1\",\n \"simple intent 2\",\n \"simple intent 3\",\n ],\n \"summary\": string,\n \"reasoning\": string,\n \"type\": \"multiple_step\",\n}\n\nConfigure Response:\n{\n \"intent\": string,\n \"toolAddress\": string,\n \"reasoning\": string,\n \"summary\": string,\n \"type\": \"configure\",\n}\n\nSearch Response:\n{\n \"queries\": [\n {\n \"query\": \"vector database query key terms to search for\",\n \"limit\": number,\n }\n ],\n \"isExternal\": boolean,\n \"reasoning\": string,\n \"summary\": string,\n \"type\": \"search\",\n}\n\nStop Response:\n{\n \"result\": string, // IMPORTANT: Format this as clean, readable markdown. Use headers (##, ###), lists (-, 1.), bold (**text**), and code blocks (`code`) to make the response easy to read. Structure tool outputs, search results, and data clearly. Focus on what the user needs to know, not raw data dumps.\n \"reasoning\": string,\n \"addresses_to_index\": [string], // COMMENT: If the results of a tool use include \"address_to_index\", list them in the \"addresses_to_index\" array.\n \"summary\": string, // A concise 1-2 sentence summary for the user\n \"type\": \"stop\",\n}\n\nError Response:\n{\n \"result\": \"string explaining the error\",\n \"summary\": string,\n \"reasoning\": string,\n \"type\": \"evaluate\",\n}\n\nUse Tool Response:\n{\n \"task\": {\n \"address\": string,\n \"payload\": { \"method\": string, \"params\": any }\n },\n \"summary\": string,\n \"type\": \"task\",\n}\n[RETURN INSTRUCTIONS END]\n\n ";
|
|
9
|
-
/**
|
|
10
|
-
* Runtime agent prompt function with parameter interpolation
|
|
11
|
-
*/
|
|
12
|
-
export declare const AGENT_PROMPT: (intent: string, context: string, agentHistory: string, extraInstructions: string) => string;
|
|
1
|
+
export declare const AGENT_PROMPT_TEMPLATE = "\nYou are an AI agent in the Olane OS graph network that deeply understands your <human> to help resolve the human\u2019s intent by looping through the <instructions> to complete the <intent> by following the <output> rules.\n\n<human>\n{{human_about}}\n</human>\n\n<agent:about>\n{{agent_about}}\n</agent:about>\n\n<context:global>\n{{context_global}}\n</context:global>\n\n<context:olane>\nOlane OS is a digital agentic world graph. Tools and data are contained within an Olane OS. Agents can explore all parts of the graph to discover tools, data, and anything else that might help an agent accomplish a task.\nEverything contained within Olane OS, is addressable. Agents use these addresses to interface with the primitives.\nOlane addresses look like this \u201Co://leader/auth/messaging\u201D. URL addresses are not tool addresses.\nDo NOT make up addresses. Only use addresses that you have discovered or the user has mentioned.\n</context:olane>\n\n<context:common_tools>\no://search = search for tools, data, knowledge, anything\no://human = if you need to talk to <human> for anything.\no://secure = secure storage to write/read sensitive data to\no://mcp = manage Model Context Protocol or MCP integrations here\n</context:common_tools>\n\n<output>\nGlobal output rules:\n\n1. Do not explain the answer, just return the output in the correct format below.\n2. Determine result type\n3. Generate a reasoning key value pair for why this output was generated. The reasoning should be no longer than 1-2 sentences.\n4. Generate a summary key value pair that your human can read. Use the <twin:*> information to influence this value.\n5. Construct the output using the matching result type\n6. Do not include `json or` in your output.\n\nUse Output:\n{\n\t\"task\": {\n\t\t\"address\": string,\n\t\t\"intent\": string, // Intent explaining what we want to do with the tool. Include all relevant information\n\t},\n\t\"summary\": string,\n\t\"reasoning\": string,\n\t\"type\": \"execute\",\n}\n\n\nStop Output:\n{\n\t\"result\": string, // IMPORTANT: Format this as clean, readable markdown. Use headers (##, ###), lists (-, 1.), bold (**text**), and code blocks (code) to make the response easy to read. Structure tool outputs, search results, and data clearly. Focus on what the user needs to know, not raw data dumps.\n\t\"reasoning\": string,\n\t\"addresses_to_index\": [string], // COMMENT: If the results of a tool use include \"address_to_index\", list them in the \"addresses_to_index\" array.\n\t\"summary\": string, // A concise 1-2 sentence summary for the user\n\t\"type\": \"stop\",\n}\n</output>\n\n<chat_history>\n{{chat_history}}\n</chat_history>\n\n<past_cycles>\n{{past_cycles}}\n</past_cycles>\n\n<instructions>\n\n1. If all requests are fulfilled from the intent, stop and answer the intent\n2. Create a list of unknowns from the intent\n3. Create a question to identify each unknown\nExample:\nintent: \"send a message to dillon\"\noutput: [\"What messaging services are available?\", \"who is dillon?\"]\n4. Create tool use commands\nExample:\nintent: \"send a message to dillon\"\nquestions and answers:\n\"What messaging services are available -> slack, email, iMessage\"\n\"Who is dillon -> Dillon is a close friend and work partner. Dillon information is here: o://leader/knowledge/dillon\"\n5. Go back to 1\n\n</instructions>";
|
|
13
2
|
//# sourceMappingURL=agent.prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/agent.prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/agent.prompt.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,myGAqFlB,CAAC"}
|
|
@@ -1,144 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Step 5 - Use target tool address
|
|
42
|
-
1. If the target tool address configuration is known, return the "Use Tool Response" using the [RETURN INSTRUCTIONS]
|
|
43
|
-
2. If the target tool address with the same configuration has failed in the past cycles, return the "Error Response" using the [RETURN INSTRUCTIONS] steps to indicate the error.
|
|
44
|
-
3. Using this filtered tool list, return the "Use Tool Response" using the [RETURN INSTRUCTIONS] steps to return a series of addresses and respective intents to align with the current user intent resolution goal
|
|
45
|
-
4. Continue to step 6
|
|
46
|
-
|
|
47
|
-
Step 6 - Review the tool use results
|
|
48
|
-
1. Analyze each tool use result
|
|
49
|
-
2. When formatting tool results for the user in a Stop Response, present as clean markdown:
|
|
50
|
-
- For general contexts, present as clean markdown:
|
|
51
|
-
* Use headings to organize different sections
|
|
52
|
-
* Use lists for multiple items
|
|
53
|
-
* Use bold for important values or labels
|
|
54
|
-
* Use code blocks for addresses (e.g., \`o://tool-address\`)
|
|
55
|
-
* Transform raw JSON into readable prose and structured lists
|
|
56
|
-
3. In the summary field, provide a 1-2 sentence overview
|
|
57
|
-
4. If it failed, clearly explain why in a user-friendly way
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
`;
|
|
61
|
-
/**
|
|
62
|
-
* Output instructions for seeding - extracted from return format specifications
|
|
63
|
-
*/
|
|
64
|
-
export const OUTPUT_INSTRUCTIONS_SEED = `
|
|
65
|
-
[RETURN INSTRUCTIONS BEGIN]
|
|
66
|
-
These are the types of cycle responses: "Complex Intent Response", "Search Response", "Use Tool Response", "Stop Response", "Error Response", "Configure Response".
|
|
67
|
-
|
|
68
|
-
All Return Step Instructions:
|
|
69
|
-
1. Do not explain your reasoning process, just return the output in the correct format.
|
|
70
|
-
2. Determine what type of results we have
|
|
71
|
-
3. Output the respective results using the matching output type.
|
|
72
|
-
4. Generate a reasoning key value pair for why this result was returned.
|
|
73
|
-
5. The reasoning should be no longer than 1 sentence.
|
|
74
|
-
6. The summary should be a short message used to inform the user of the result of the cycle. These updates should be insightful and concise and within 1-2 sentences.
|
|
75
|
-
6. Do not include \`\`\`json or \`\`\` in your output.
|
|
76
|
-
|
|
77
|
-
Complex Intent Results:
|
|
78
|
-
{
|
|
79
|
-
"intents": [
|
|
80
|
-
"simple intent 1",
|
|
81
|
-
"simple intent 2",
|
|
82
|
-
"simple intent 3",
|
|
83
|
-
],
|
|
84
|
-
"summary": string,
|
|
85
|
-
"reasoning": string,
|
|
86
|
-
"type": "multiple_step",
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
Configure Response:
|
|
1
|
+
export const AGENT_PROMPT_TEMPLATE = `
|
|
2
|
+
You are an AI agent in the Olane OS graph network that deeply understands your <human> to help resolve the human’s intent by looping through the <instructions> to complete the <intent> by following the <output> rules.
|
|
3
|
+
|
|
4
|
+
<human>
|
|
5
|
+
{{human_about}}
|
|
6
|
+
</human>
|
|
7
|
+
|
|
8
|
+
<agent:about>
|
|
9
|
+
{{agent_about}}
|
|
10
|
+
</agent:about>
|
|
11
|
+
|
|
12
|
+
<context:global>
|
|
13
|
+
{{context_global}}
|
|
14
|
+
</context:global>
|
|
15
|
+
|
|
16
|
+
<context:olane>
|
|
17
|
+
Olane OS is a digital agentic world graph. Tools and data are contained within an Olane OS. Agents can explore all parts of the graph to discover tools, data, and anything else that might help an agent accomplish a task.
|
|
18
|
+
Everything contained within Olane OS, is addressable. Agents use these addresses to interface with the primitives.
|
|
19
|
+
Olane addresses look like this “o://leader/auth/messaging”. URL addresses are not tool addresses.
|
|
20
|
+
Do NOT make up addresses. Only use addresses that you have discovered or the user has mentioned.
|
|
21
|
+
</context:olane>
|
|
22
|
+
|
|
23
|
+
<context:common_tools>
|
|
24
|
+
o://search = search for tools, data, knowledge, anything
|
|
25
|
+
o://human = if you need to talk to <human> for anything.
|
|
26
|
+
o://secure = secure storage to write/read sensitive data to
|
|
27
|
+
o://mcp = manage Model Context Protocol or MCP integrations here
|
|
28
|
+
</context:common_tools>
|
|
29
|
+
|
|
30
|
+
<output>
|
|
31
|
+
Global output rules:
|
|
32
|
+
|
|
33
|
+
1. Do not explain the answer, just return the output in the correct format below.
|
|
34
|
+
2. Determine result type
|
|
35
|
+
3. Generate a reasoning key value pair for why this output was generated. The reasoning should be no longer than 1-2 sentences.
|
|
36
|
+
4. Generate a summary key value pair that your human can read. Use the <twin:*> information to influence this value.
|
|
37
|
+
5. Construct the output using the matching result type
|
|
38
|
+
6. Do not include \`json or\` in your output.
|
|
39
|
+
|
|
40
|
+
Use Output:
|
|
90
41
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
42
|
+
"task": {
|
|
43
|
+
"address": string,
|
|
44
|
+
"intent": string, // Intent explaining what we want to do with the tool. Include all relevant information
|
|
45
|
+
},
|
|
46
|
+
"summary": string,
|
|
47
|
+
"reasoning": string,
|
|
48
|
+
"type": "execute",
|
|
96
49
|
}
|
|
97
50
|
|
|
98
|
-
Search Response:
|
|
99
|
-
{
|
|
100
|
-
"queries": [
|
|
101
|
-
{
|
|
102
|
-
"query": "vector database query key terms to search for",
|
|
103
|
-
"limit": number,
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"isExternal": boolean,
|
|
107
|
-
"reasoning": string,
|
|
108
|
-
"summary": string,
|
|
109
|
-
"type": "search",
|
|
110
|
-
}
|
|
111
51
|
|
|
112
|
-
Stop
|
|
52
|
+
Stop Output:
|
|
113
53
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
54
|
+
"result": string, // IMPORTANT: Format this as clean, readable markdown. Use headers (##, ###), lists (-, 1.), bold (**text**), and code blocks (code) to make the response easy to read. Structure tool outputs, search results, and data clearly. Focus on what the user needs to know, not raw data dumps.
|
|
55
|
+
"reasoning": string,
|
|
56
|
+
"addresses_to_index": [string], // COMMENT: If the results of a tool use include "address_to_index", list them in the "addresses_to_index" array.
|
|
57
|
+
"summary": string, // A concise 1-2 sentence summary for the user
|
|
58
|
+
"type": "stop",
|
|
119
59
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
60
|
+
</output>
|
|
61
|
+
|
|
62
|
+
<chat_history>
|
|
63
|
+
{{chat_history}}
|
|
64
|
+
</chat_history>
|
|
65
|
+
|
|
66
|
+
<past_cycles>
|
|
67
|
+
{{past_cycles}}
|
|
68
|
+
</past_cycles>
|
|
69
|
+
|
|
70
|
+
<instructions>
|
|
71
|
+
|
|
72
|
+
1. If all requests are fulfilled from the intent, stop and answer the intent
|
|
73
|
+
2. Create a list of unknowns from the intent
|
|
74
|
+
3. Create a question to identify each unknown
|
|
75
|
+
Example:
|
|
76
|
+
intent: "send a message to dillon"
|
|
77
|
+
output: ["What messaging services are available?", "who is dillon?"]
|
|
78
|
+
4. Create tool use commands
|
|
79
|
+
Example:
|
|
80
|
+
intent: "send a message to dillon"
|
|
81
|
+
questions and answers:
|
|
82
|
+
"What messaging services are available -> slack, email, iMessage"
|
|
83
|
+
"Who is dillon -> Dillon is a close friend and work partner. Dillon information is here: o://leader/knowledge/dillon"
|
|
84
|
+
5. Go back to 1
|
|
85
|
+
|
|
86
|
+
</instructions>`;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Configure instructions for seeding - extracted from configure capability
|
|
3
|
-
*/
|
|
4
|
-
export declare const CONFIGURE_INSTRUCTIONS_SEED = "\n Configure Request Instructions:\n1. Review the provided user intent and context\n2. If you can complete the user intent, return the answer using the [RETURN INSTRUCTIONS] steps\n3. If you experience an error trying to use a tool more than 2 times, stop here and follow the [RETURN INSTRUCTIONS] steps to indicate the error.\n3. Review the current step number and perform the instructions associated with that step.\n4. Start with step 1\n\nStep 1 - Validate the intent\n1. If the intent is not a configure request, continue to step 5\n2. If the context provided would suggest that the intent is already solved, continue to step 5\n2. Continue to step 2\n\nStep 2 - Choose Method\n1. Review the method options and metadata to determine the best method to resolve the user's intent.\n2. Choose the best method to resolve the user's intent.\n3. Continue to step 3\n\nStep 3 - Select Parameters\n1. Review the parameters for the selected best method.\n2. Extract the parameter values from the agent history, provided context and intent. Do NOT use a parameter value that is not mentioned previously.\n3. Do not use placeholder values for parameter values.\n4. Do not use parameter values that are not explicitly mentioned in the agent history, provided context or intent.\n3. Identify missing parameter values.\n4. If you have enough information to complete the configure request, go to step 5.\n5. Continue to step 4\n\nStep 4 - Search for missing parameter values\n1. Identify other methods that can be used to resolve the missing parameter values.\n2. Identify methods that can be used to resolve the missing parameter values.\n3. Continue to step 5\n\nStep 5 - Finish\n1. If the intent seems to be already solved, return answer results.\n1. If this is not a configure request, return an error.\n2. If you are missing parameter values, generate the intents for the \"Complex Intent\" results using other methods or search to help.\n2. If you have enough information to complete the configure request, follow the [RETURN INSTRUCTIONS] steps to return the \"configure results\".\n3. If you do not have enough information to complete the configure request, return an error.\n\n ";
|
|
5
|
-
/**
|
|
6
|
-
* Alias for backwards compatibility - runtime usage
|
|
7
|
-
*/
|
|
8
|
-
export declare const CONFIGURE_INSTRUCTIONS = "\n Configure Request Instructions:\n1. Review the provided user intent and context\n2. If you can complete the user intent, return the answer using the [RETURN INSTRUCTIONS] steps\n3. If you experience an error trying to use a tool more than 2 times, stop here and follow the [RETURN INSTRUCTIONS] steps to indicate the error.\n3. Review the current step number and perform the instructions associated with that step.\n4. Start with step 1\n\nStep 1 - Validate the intent\n1. If the intent is not a configure request, continue to step 5\n2. If the context provided would suggest that the intent is already solved, continue to step 5\n2. Continue to step 2\n\nStep 2 - Choose Method\n1. Review the method options and metadata to determine the best method to resolve the user's intent.\n2. Choose the best method to resolve the user's intent.\n3. Continue to step 3\n\nStep 3 - Select Parameters\n1. Review the parameters for the selected best method.\n2. Extract the parameter values from the agent history, provided context and intent. Do NOT use a parameter value that is not mentioned previously.\n3. Do not use placeholder values for parameter values.\n4. Do not use parameter values that are not explicitly mentioned in the agent history, provided context or intent.\n3. Identify missing parameter values.\n4. If you have enough information to complete the configure request, go to step 5.\n5. Continue to step 4\n\nStep 4 - Search for missing parameter values\n1. Identify other methods that can be used to resolve the missing parameter values.\n2. Identify methods that can be used to resolve the missing parameter values.\n3. Continue to step 5\n\nStep 5 - Finish\n1. If the intent seems to be already solved, return answer results.\n1. If this is not a configure request, return an error.\n2. If you are missing parameter values, generate the intents for the \"Complex Intent\" results using other methods or search to help.\n2. If you have enough information to complete the configure request, follow the [RETURN INSTRUCTIONS] steps to return the \"configure results\".\n3. If you do not have enough information to complete the configure request, return an error.\n\n ";
|
|
1
|
+
export declare const CONFIGURE_PROMPT_TEMPLATE = "\nYou are an AI agent in the Olane OS graph network that deeply understands your <human> to help configure using this address \"{{address}}\" by looping through the <instructions> to complete the <intent> by following the <output> rules.\n\n<human>\n{{human_about}}\n</human>\n\n<agent:about>\n{{agent_about}}\n</agent:about>\n\n<context:global>\n{{context_global}}\n</context:global>\n\n<context:olane>\n\nOlane OS is a digital agentic world graph. Tools and data are contained within an Olane OS. Agents can explore all parts of the graph to discover tools, data, and anything else that might help an agent accomplish a task.\nEverything contained within Olane OS, is addressable. Agents use these addresses to interface with the primitives.\nOlane addresses look like this \u201Co://leader/auth/messaging\u201D. URL addresses are not tool addresses.\nDo NOT make up addresses. Only use addresses that you have discovered or the user has mentioned.\n\n</context:olane>\n\n<output>\nGlobal output rules:\n\n1. Do not explain the answer, just return the output in the correct format below.\n2. Determine result type\n3. Generate a reasoning key value pair for why this output was generated. The reasoning should be no longer than 1-2 sentences.\n4. Generate a summary key value pair that your human can read. Use the <twin:*> information to influence this value.\n5. Construct the output using the matching result type\n6. Do not include `json or` in your output.\n\nConfigure Output:\n{\n \"task\": {\n \"address\": string,\n \"payload\": { \"method\": string, \"params\": any }\n },\n \"summary\": string,\n \"reasoning\": \n \"type\": \"task\",\n}\n\nError Output:\n{\n \"result\": \"string\", // explain the error\n \"summary\": string,\n \"reasoning\": string,\n \"type\": \"error\",\n}\n</output>\n\n<methods>\n{{methods}}\n</methods>\n\n<instructions>\nConfigure Request Instructions:\n\n1. Select the best method from <methods> using <intent> and <context:*> to help you choose\n2. Identify the required parameters from the selected method\n3. Extract parameter key, value pairs by only using the <intent>, <methods> and <context>. Do NOT generate values that you have not seen before in <intent>, <context> or <methods>\n4. If there are unknown required parameter values still, stop and output an error using <output>\n5. If you can complete the configure <intent>, stop and output the task using <output>\n</instructions>\n";
|
|
9
2
|
//# sourceMappingURL=configure.prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/configure.prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/configure.prompt.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,yBAAyB,s5EAmErC,CAAC"}
|
|
@@ -1,47 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
export const CONFIGURE_PROMPT_TEMPLATE = `
|
|
2
|
+
You are an AI agent in the Olane OS graph network that deeply understands your <human> to help configure using this address "{{address}}" by looping through the <instructions> to complete the <intent> by following the <output> rules.
|
|
3
|
+
|
|
4
|
+
<human>
|
|
5
|
+
{{human_about}}
|
|
6
|
+
</human>
|
|
7
|
+
|
|
8
|
+
<agent:about>
|
|
9
|
+
{{agent_about}}
|
|
10
|
+
</agent:about>
|
|
11
|
+
|
|
12
|
+
<context:global>
|
|
13
|
+
{{context_global}}
|
|
14
|
+
</context:global>
|
|
15
|
+
|
|
16
|
+
<context:olane>
|
|
17
|
+
|
|
18
|
+
Olane OS is a digital agentic world graph. Tools and data are contained within an Olane OS. Agents can explore all parts of the graph to discover tools, data, and anything else that might help an agent accomplish a task.
|
|
19
|
+
Everything contained within Olane OS, is addressable. Agents use these addresses to interface with the primitives.
|
|
20
|
+
Olane addresses look like this “o://leader/auth/messaging”. URL addresses are not tool addresses.
|
|
21
|
+
Do NOT make up addresses. Only use addresses that you have discovered or the user has mentioned.
|
|
22
|
+
|
|
23
|
+
</context:olane>
|
|
24
|
+
|
|
25
|
+
<output>
|
|
26
|
+
Global output rules:
|
|
27
|
+
|
|
28
|
+
1. Do not explain the answer, just return the output in the correct format below.
|
|
29
|
+
2. Determine result type
|
|
30
|
+
3. Generate a reasoning key value pair for why this output was generated. The reasoning should be no longer than 1-2 sentences.
|
|
31
|
+
4. Generate a summary key value pair that your human can read. Use the <twin:*> information to influence this value.
|
|
32
|
+
5. Construct the output using the matching result type
|
|
33
|
+
6. Do not include \`json or\` in your output.
|
|
34
|
+
|
|
35
|
+
Configure Output:
|
|
36
|
+
{
|
|
37
|
+
"task": {
|
|
38
|
+
"address": string,
|
|
39
|
+
"payload": { "method": string, "params": any }
|
|
40
|
+
},
|
|
41
|
+
"summary": string,
|
|
42
|
+
"reasoning":
|
|
43
|
+
"type": "task",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Error Output:
|
|
47
|
+
{
|
|
48
|
+
"result": "string", // explain the error
|
|
49
|
+
"summary": string,
|
|
50
|
+
"reasoning": string,
|
|
51
|
+
"type": "error",
|
|
52
|
+
}
|
|
53
|
+
</output>
|
|
54
|
+
|
|
55
|
+
<methods>
|
|
56
|
+
{{methods}}
|
|
57
|
+
</methods>
|
|
58
|
+
|
|
59
|
+
<instructions>
|
|
60
|
+
Configure Request Instructions:
|
|
61
|
+
|
|
62
|
+
1. Select the best method from <methods> using <intent> and <context:*> to help you choose
|
|
63
|
+
2. Identify the required parameters from the selected method
|
|
64
|
+
3. Extract parameter key, value pairs by only using the <intent>, <methods> and <context>. Do NOT generate values that you have not seen before in <intent>, <context> or <methods>
|
|
65
|
+
4. If there are unknown required parameter values still, stop and output an error using <output>
|
|
66
|
+
5. If you can complete the configure <intent>, stop and output the task using <output>
|
|
67
|
+
</instructions>
|
|
68
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execute instructions for seeding - extracted from execute capability
|
|
3
|
+
*/
|
|
4
|
+
export declare const EXECUTE_PROMPT_SEED = "\n Configure Request Instructions:\n1. Review the provided user intent and context\n2. If you can complete the user intent, return the answer using the [RETURN INSTRUCTIONS] steps\n3. If you experience an error trying to use a tool more than 2 times, stop here and follow the [RETURN INSTRUCTIONS] steps to indicate the error.\n3. Review the current step number and perform the instructions associated with that step.\n4. Start with step 1\n\nStep 1 - Validate the intent\n1. If the intent is not a configure request, continue to step 5\n2. If the context provided would suggest that the intent is already solved, continue to step 5\n2. Continue to step 2\n\nStep 2 - Choose Method\n1. Review the method options and metadata to determine the best method to resolve the user's intent.\n2. Choose the best method to resolve the user's intent.\n3. Continue to step 3\n\nStep 3 - Select Parameters\n1. Review the parameters for the selected best method.\n2. Extract the parameter values from the agent history, provided context and intent. Do NOT use a parameter value that is not mentioned previously.\n3. Do not use placeholder values for parameter values.\n4. Do not use parameter values that are not explicitly mentioned in the agent history, provided context or intent.\n3. Identify missing parameter values.\n4. If you have enough information to complete the configure request, go to step 5.\n5. Continue to step 4\n\nStep 4 - Search for missing parameter values\n1. Identify other methods that can be used to resolve the missing parameter values.\n2. Identify methods that can be used to resolve the missing parameter values.\n3. Continue to step 5\n\nStep 5 - Finish\n1. If the intent seems to be already solved, return answer results.\n1. If this is not a configure request, return an error.\n2. If you are missing parameter values, generate the intents for the \"Complex Intent\" results using other methods or search to help.\n2. If you have enough information to complete the configure request, follow the [RETURN INSTRUCTIONS] steps to return the \"configure results\".\n3. If you do not have enough information to complete the configure request, return an error.\n\n ";
|
|
5
|
+
/**
|
|
6
|
+
* Alias for backwards compatibility - runtime usage
|
|
7
|
+
*/
|
|
8
|
+
export declare const EXECUTE_PROMPT = "\n Configure Request Instructions:\n1. Review the provided user intent and context\n2. If you can complete the user intent, return the answer using the [RETURN INSTRUCTIONS] steps\n3. If you experience an error trying to use a tool more than 2 times, stop here and follow the [RETURN INSTRUCTIONS] steps to indicate the error.\n3. Review the current step number and perform the instructions associated with that step.\n4. Start with step 1\n\nStep 1 - Validate the intent\n1. If the intent is not a configure request, continue to step 5\n2. If the context provided would suggest that the intent is already solved, continue to step 5\n2. Continue to step 2\n\nStep 2 - Choose Method\n1. Review the method options and metadata to determine the best method to resolve the user's intent.\n2. Choose the best method to resolve the user's intent.\n3. Continue to step 3\n\nStep 3 - Select Parameters\n1. Review the parameters for the selected best method.\n2. Extract the parameter values from the agent history, provided context and intent. Do NOT use a parameter value that is not mentioned previously.\n3. Do not use placeholder values for parameter values.\n4. Do not use parameter values that are not explicitly mentioned in the agent history, provided context or intent.\n3. Identify missing parameter values.\n4. If you have enough information to complete the configure request, go to step 5.\n5. Continue to step 4\n\nStep 4 - Search for missing parameter values\n1. Identify other methods that can be used to resolve the missing parameter values.\n2. Identify methods that can be used to resolve the missing parameter values.\n3. Continue to step 5\n\nStep 5 - Finish\n1. If the intent seems to be already solved, return answer results.\n1. If this is not a configure request, return an error.\n2. If you are missing parameter values, generate the intents for the \"Complex Intent\" results using other methods or search to help.\n2. If you have enough information to complete the configure request, follow the [RETURN INSTRUCTIONS] steps to return the \"configure results\".\n3. If you do not have enough information to complete the configure request, return an error.\n\n ";
|
|
9
|
+
//# sourceMappingURL=execute.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/execute.prompt.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,woEAuC7B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,cAAc,woEAAsB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execute instructions for seeding - extracted from execute capability
|
|
3
|
+
*/
|
|
4
|
+
export const EXECUTE_PROMPT_SEED = `
|
|
5
|
+
Configure Request Instructions:
|
|
6
|
+
1. Review the provided user intent and context
|
|
7
|
+
2. If you can complete the user intent, return the answer using the [RETURN INSTRUCTIONS] steps
|
|
8
|
+
3. If you experience an error trying to use a tool more than 2 times, stop here and follow the [RETURN INSTRUCTIONS] steps to indicate the error.
|
|
9
|
+
3. Review the current step number and perform the instructions associated with that step.
|
|
10
|
+
4. Start with step 1
|
|
11
|
+
|
|
12
|
+
Step 1 - Validate the intent
|
|
13
|
+
1. If the intent is not a configure request, continue to step 5
|
|
14
|
+
2. If the context provided would suggest that the intent is already solved, continue to step 5
|
|
15
|
+
2. Continue to step 2
|
|
16
|
+
|
|
17
|
+
Step 2 - Choose Method
|
|
18
|
+
1. Review the method options and metadata to determine the best method to resolve the user's intent.
|
|
19
|
+
2. Choose the best method to resolve the user's intent.
|
|
20
|
+
3. Continue to step 3
|
|
21
|
+
|
|
22
|
+
Step 3 - Select Parameters
|
|
23
|
+
1. Review the parameters for the selected best method.
|
|
24
|
+
2. Extract the parameter values from the agent history, provided context and intent. Do NOT use a parameter value that is not mentioned previously.
|
|
25
|
+
3. Do not use placeholder values for parameter values.
|
|
26
|
+
4. Do not use parameter values that are not explicitly mentioned in the agent history, provided context or intent.
|
|
27
|
+
3. Identify missing parameter values.
|
|
28
|
+
4. If you have enough information to complete the configure request, go to step 5.
|
|
29
|
+
5. Continue to step 4
|
|
30
|
+
|
|
31
|
+
Step 4 - Search for missing parameter values
|
|
32
|
+
1. Identify other methods that can be used to resolve the missing parameter values.
|
|
33
|
+
2. Identify methods that can be used to resolve the missing parameter values.
|
|
34
|
+
3. Continue to step 5
|
|
35
|
+
|
|
36
|
+
Step 5 - Finish
|
|
37
|
+
1. If the intent seems to be already solved, return answer results.
|
|
38
|
+
1. If this is not a configure request, return an error.
|
|
39
|
+
2. If you are missing parameter values, generate the intents for the "Complex Intent" results using other methods or search to help.
|
|
40
|
+
2. If you have enough information to complete the configure request, follow the [RETURN INSTRUCTIONS] steps to return the "configure results".
|
|
41
|
+
3. If you do not have enough information to complete the configure request, return an error.
|
|
42
|
+
|
|
43
|
+
`;
|
|
44
|
+
/**
|
|
45
|
+
* Alias for backwards compatibility - runtime usage
|
|
46
|
+
*/
|
|
47
|
+
export const EXECUTE_PROMPT = EXECUTE_PROMPT_SEED;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"o-prompt.config.d.ts","sourceRoot":"","sources":["../../../../src/prompts/interfaces/o-prompt.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { oObject } from "@olane/o-core";
|
|
2
|
+
import { oPromptConfig } from "./interfaces/o-prompt.config.js";
|
|
3
|
+
import { oCapabilityType } from "../capabilities/index.js";
|
|
4
|
+
export declare class oPrompt extends oObject {
|
|
5
|
+
private readonly rawValue;
|
|
6
|
+
private readonly type;
|
|
7
|
+
private readonly provider;
|
|
8
|
+
private readonly params;
|
|
9
|
+
private compiledTemplate?;
|
|
10
|
+
constructor(config: oPromptConfig);
|
|
11
|
+
/**
|
|
12
|
+
* Extracts all template variables from the rawValue template
|
|
13
|
+
* @returns Array of variable names found in the template
|
|
14
|
+
*/
|
|
15
|
+
getRequiredVariables(): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Validates that all required template variables are present in params
|
|
18
|
+
* @throws Error if any required variables are missing
|
|
19
|
+
*/
|
|
20
|
+
validate(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Compiles the template with provided params
|
|
23
|
+
* @returns The compiled template string
|
|
24
|
+
* @throws Error if template variables are missing or compilation fails
|
|
25
|
+
*/
|
|
26
|
+
compile(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Alias for compile() for clearer semantics
|
|
29
|
+
*/
|
|
30
|
+
render(): string;
|
|
31
|
+
getRawValue(): string;
|
|
32
|
+
getType(): oCapabilityType;
|
|
33
|
+
getProvider(): string;
|
|
34
|
+
getParams(): any;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=o-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"o-prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/o-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,qBAAa,OAAQ,SAAQ,OAAO;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkB;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAM;IAC7B,OAAO,CAAC,gBAAgB,CAAC,CAA6B;gBAE1C,MAAM,EAAE,aAAa;IAajC;;;OAGG;IACH,oBAAoB,IAAI,MAAM,EAAE;IAgBhC;;;OAGG;IACH,QAAQ,IAAI,IAAI;IAgBhB;;;;OAIG;IACH,OAAO,IAAI,MAAM;IA2BjB;;OAEG;IACH,MAAM,IAAI,MAAM;IAKhB,WAAW,IAAI,MAAM;IAIrB,OAAO,IAAI,eAAe;IAI1B,WAAW,IAAI,MAAM;IAIrB,SAAS,IAAI,GAAG;CAGjB"}
|