@dxos/assistant-toolkit 0.8.4-main.1068cf700f
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/LICENSE +8 -0
- package/README.md +3 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +3708 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/testing/index.mjs +44 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/index.d.ts +3 -0
- package/dist/types/src/blueprints/design/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +3 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +8 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts +3 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/index.d.ts +3 -0
- package/dist/types/src/blueprints/markdown/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/markdown-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/markdown/markdown-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +3 -0
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/index.d.ts +3 -0
- package/dist/types/src/blueprints/research/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/research-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +10 -0
- package/dist/types/src/blueprints/testing.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts +27 -0
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +1 -0
- package/dist/types/src/chat/Chat.d.ts +31 -0
- package/dist/types/src/chat/Chat.d.ts.map +1 -0
- package/dist/types/src/chat/index.d.ts +2 -0
- package/dist/types/src/chat/index.d.ts.map +1 -0
- package/dist/types/src/crud/graph.d.ts +67 -0
- package/dist/types/src/crud/graph.d.ts.map +1 -0
- package/dist/types/src/crud/graph.test.d.ts +2 -0
- package/dist/types/src/crud/graph.test.d.ts.map +1 -0
- package/dist/types/src/crud/index.d.ts +2 -0
- package/dist/types/src/crud/index.d.ts.map +1 -0
- package/dist/types/src/experimental/feed.test.d.ts +2 -0
- package/dist/types/src/experimental/feed.test.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +5 -0
- package/dist/types/src/functions/agent/index.d.ts.map +1 -0
- package/dist/types/src/functions/agent/prompt.d.ts +76 -0
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -0
- package/dist/types/src/functions/discord/fetch-messages.d.ts +11 -0
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts +2 -0
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/functions/discord/index.d.ts +12 -0
- package/dist/types/src/functions/discord/index.d.ts.map +1 -0
- package/dist/types/src/functions/document/create.d.ts +6 -0
- package/dist/types/src/functions/document/create.d.ts.map +1 -0
- package/dist/types/src/functions/document/index.d.ts +30 -0
- package/dist/types/src/functions/document/index.d.ts.map +1 -0
- package/dist/types/src/functions/document/read.d.ts +14 -0
- package/dist/types/src/functions/document/read.d.ts.map +1 -0
- package/dist/types/src/functions/document/update.d.ts +13 -0
- package/dist/types/src/functions/document/update.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +174 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +2 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/index.d.ts +175 -0
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +38 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +37 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +58 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/index.d.ts +3 -0
- package/dist/types/src/functions/exa/data/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/exa.d.ts +5 -0
- package/dist/types/src/functions/exa/exa.d.ts.map +1 -0
- package/dist/types/src/functions/exa/index.d.ts +3 -0
- package/dist/types/src/functions/exa/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/mock.d.ts +5 -0
- package/dist/types/src/functions/exa/mock.d.ts.map +1 -0
- package/dist/types/src/functions/github/fetch-prs.d.ts +6 -0
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +8 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/linear/index.d.ts +9 -0
- package/dist/types/src/functions/linear/index.d.ts.map +1 -0
- package/dist/types/src/functions/linear/linear.test.d.ts +2 -0
- package/dist/types/src/functions/linear/linear.test.d.ts.map +1 -0
- package/dist/types/src/functions/linear/sync-issues.d.ts +12 -0
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +1 -0
- package/dist/types/src/functions/research/document-create.d.ts +9 -0
- package/dist/types/src/functions/research/document-create.d.ts.map +1 -0
- package/dist/types/src/functions/research/index.d.ts +21 -0
- package/dist/types/src/functions/research/index.d.ts.map +1 -0
- package/dist/types/src/functions/research/research-graph.d.ts +19 -0
- package/dist/types/src/functions/research/research-graph.d.ts.map +1 -0
- package/dist/types/src/functions/research/research.d.ts +14 -0
- package/dist/types/src/functions/research/research.d.ts.map +1 -0
- package/dist/types/src/functions/research/research.test.d.ts +2 -0
- package/dist/types/src/functions/research/research.test.d.ts.map +1 -0
- package/dist/types/src/functions/research/types.d.ts +6 -0
- package/dist/types/src/functions/research/types.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/index.d.ts +29 -0
- package/dist/types/src/functions/tasks/index.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/read.d.ts +14 -0
- package/dist/types/src/functions/tasks/read.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/task-list.d.ts +74 -0
- package/dist/types/src/functions/tasks/task-list.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/task-list.test.d.ts +2 -0
- package/dist/types/src/functions/tasks/task-list.test.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/update.d.ts +16 -0
- package/dist/types/src/functions/tasks/update.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/initiative/Initiative.d.ts +41 -0
- package/dist/types/src/initiative/Initiative.d.ts.map +1 -0
- package/dist/types/src/initiative/blueprint.d.ts +153 -0
- package/dist/types/src/initiative/blueprint.d.ts.map +1 -0
- package/dist/types/src/initiative/functions/addArtifact.d.ts +6 -0
- package/dist/types/src/initiative/functions/addArtifact.d.ts.map +1 -0
- package/dist/types/src/initiative/functions/agent.d.ts +62 -0
- package/dist/types/src/initiative/functions/agent.d.ts.map +1 -0
- package/dist/types/src/initiative/functions/getContext.d.ts +13 -0
- package/dist/types/src/initiative/functions/getContext.d.ts.map +1 -0
- package/dist/types/src/initiative/functions/index.d.ts +5 -0
- package/dist/types/src/initiative/functions/index.d.ts.map +1 -0
- package/dist/types/src/initiative/functions/qualifier.d.ts +60 -0
- package/dist/types/src/initiative/functions/qualifier.d.ts.map +1 -0
- package/dist/types/src/initiative/index.d.ts +6 -0
- package/dist/types/src/initiative/index.d.ts.map +1 -0
- package/dist/types/src/initiative/initiative.test.d.ts +2 -0
- package/dist/types/src/initiative/initiative.test.d.ts.map +1 -0
- package/dist/types/src/initiative/plan.d.ts +77 -0
- package/dist/types/src/initiative/plan.d.ts.map +1 -0
- package/dist/types/src/initiative/util.d.ts +29 -0
- package/dist/types/src/initiative/util.d.ts.map +1 -0
- package/dist/types/src/planning/blueprint.d.ts +18 -0
- package/dist/types/src/planning/blueprint.d.ts.map +1 -0
- package/dist/types/src/planning/functions/index.d.ts +2 -0
- package/dist/types/src/planning/functions/index.d.ts.map +1 -0
- package/dist/types/src/planning/functions/update-tasks.d.ts +9 -0
- package/dist/types/src/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/planning/index.d.ts +3 -0
- package/dist/types/src/planning/index.d.ts.map +1 -0
- package/dist/types/src/sync/index.d.ts +2 -0
- package/dist/types/src/sync/index.d.ts.map +1 -0
- package/dist/types/src/sync/sync.d.ts +15 -0
- package/dist/types/src/sync/sync.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/plugins.d.ts +19 -0
- package/dist/types/src/testing/plugins.d.ts.map +1 -0
- package/dist/types/src/toolkits/AssistantToolkit.d.ts +43 -0
- package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +2 -0
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +1 -0
- package/dist/types/src/toolkits/SystemToolkit.d.ts +99 -0
- package/dist/types/src/toolkits/SystemToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/index.d.ts +4 -0
- package/dist/types/src/toolkits/index.d.ts.map +1 -0
- package/dist/types/src/util/graphql.d.ts +22 -0
- package/dist/types/src/util/graphql.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +74 -0
- package/src/blueprints/design/design-blueprint.test.ts +100 -0
- package/src/blueprints/design/design-blueprint.ts +31 -0
- package/src/blueprints/design/index.ts +7 -0
- package/src/blueprints/discord/discord-blueprint.ts +32 -0
- package/src/blueprints/discord/index.ts +7 -0
- package/src/blueprints/index.ts +11 -0
- package/src/blueprints/linear/index.ts +7 -0
- package/src/blueprints/linear/linear-blueprint.ts +33 -0
- package/src/blueprints/markdown/index.ts +7 -0
- package/src/blueprints/markdown/markdown-blueprint.ts +24 -0
- package/src/blueprints/planning/index.ts +7 -0
- package/src/blueprints/planning/planning-blueprint.test.ts +120 -0
- package/src/blueprints/planning/planning-blueprint.ts +96 -0
- package/src/blueprints/research/index.ts +7 -0
- package/src/blueprints/research/research-blueprint.test.ts +7 -0
- package/src/blueprints/research/research-blueprint.ts +51 -0
- package/src/blueprints/testing.ts +30 -0
- package/src/blueprints/websearch/index.ts +9 -0
- package/src/blueprints/websearch/websearch-blueprint.ts +18 -0
- package/src/blueprints/websearch/websearch-toolkit.ts +8 -0
- package/src/chat/Chat.ts +45 -0
- package/src/chat/index.ts +5 -0
- package/src/crud/graph.test.ts +46 -0
- package/src/crud/graph.ts +380 -0
- package/src/crud/index.ts +5 -0
- package/src/experimental/feed.test.ts +106 -0
- package/src/functions/agent/index.ts +11 -0
- package/src/functions/agent/prompt.ts +116 -0
- package/src/functions/discord/fetch-messages.test.ts +54 -0
- package/src/functions/discord/fetch-messages.ts +252 -0
- package/src/functions/discord/index.ts +9 -0
- package/src/functions/document/create.ts +29 -0
- package/src/functions/document/index.ts +13 -0
- package/src/functions/document/read.ts +32 -0
- package/src/functions/document/update.ts +32 -0
- package/src/functions/entity-extraction/entity-extraction.conversations.json +1 -0
- package/src/functions/entity-extraction/entity-extraction.test.ts +74 -0
- package/src/functions/entity-extraction/entity-extraction.ts +181 -0
- package/src/functions/entity-extraction/index.ts +9 -0
- package/src/functions/exa/data/exa-search-1748337321991.ts +131 -0
- package/src/functions/exa/data/exa-search-1748337331526.ts +144 -0
- package/src/functions/exa/data/exa-search-1748337344119.ts +133 -0
- package/src/functions/exa/data/index.ts +11 -0
- package/src/functions/exa/exa.ts +37 -0
- package/src/functions/exa/index.ts +6 -0
- package/src/functions/exa/mock.ts +71 -0
- package/src/functions/github/fetch-prs.ts +31 -0
- package/src/functions/index.ts +11 -0
- package/src/functions/linear/index.ts +9 -0
- package/src/functions/linear/linear.test.ts +58 -0
- package/src/functions/linear/sync-issues.ts +191 -0
- package/src/functions/research/document-create.ts +73 -0
- package/src/functions/research/index.ts +14 -0
- package/src/functions/research/research-graph.ts +49 -0
- package/src/functions/research/research-instructions.tpl +106 -0
- package/src/functions/research/research.conversations.json +1 -0
- package/src/functions/research/research.test.ts +144 -0
- package/src/functions/research/research.ts +182 -0
- package/src/functions/research/types.ts +26 -0
- package/src/functions/tasks/index.ts +11 -0
- package/src/functions/tasks/read.ts +34 -0
- package/src/functions/tasks/task-list.test.ts +99 -0
- package/src/functions/tasks/task-list.ts +165 -0
- package/src/functions/tasks/update.ts +52 -0
- package/src/index.ts +12 -0
- package/src/initiative/Initiative.ts +61 -0
- package/src/initiative/blueprint.ts +60 -0
- package/src/initiative/functions/addArtifact.ts +41 -0
- package/src/initiative/functions/agent.ts +77 -0
- package/src/initiative/functions/getContext.ts +54 -0
- package/src/initiative/functions/index.ts +8 -0
- package/src/initiative/functions/qualifier.ts +98 -0
- package/src/initiative/index.ts +9 -0
- package/src/initiative/initiative.test.ts +584 -0
- package/src/initiative/plan.ts +107 -0
- package/src/initiative/util.ts +137 -0
- package/src/planning/blueprint.ts +14 -0
- package/src/planning/functions/index.ts +5 -0
- package/src/planning/functions/update-tasks.ts +168 -0
- package/src/planning/index.ts +6 -0
- package/src/sync/index.ts +5 -0
- package/src/sync/sync.ts +95 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/plugins.tsx +69 -0
- package/src/toolkits/AssistantToolkit.conversations.json +1 -0
- package/src/toolkits/AssistantToolkit.test.ts +72 -0
- package/src/toolkits/AssistantToolkit.ts +70 -0
- package/src/toolkits/SystemToolkit.ts +299 -0
- package/src/toolkits/WebToolkit.ts +34 -0
- package/src/toolkits/index.ts +7 -0
- package/src/typedefs.d.ts +8 -0
- package/src/util/graphql.ts +31 -0
- package/src/util/index.ts +5 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hierarchical Task List Manager.
|
|
3
|
+
*
|
|
4
|
+
* A framework for managing hierarchical task lists where each line is a task.
|
|
5
|
+
* Designed to work with language model agents that receive documents with line numbers.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MarkdownTasks {
|
|
8
|
+
private _lineEndings;
|
|
9
|
+
private _content;
|
|
10
|
+
constructor(initialContent?: string);
|
|
11
|
+
/**
|
|
12
|
+
* Get the current document content with line numbers prefixed.
|
|
13
|
+
*/
|
|
14
|
+
getNumberedContent(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get the raw document content without line numbers.
|
|
17
|
+
*/
|
|
18
|
+
getRawContent(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Insert a new task at the specified line number (1-based).
|
|
21
|
+
* Indentation level determines hierarchy (0, 2, 4, 6 spaces etc.)
|
|
22
|
+
*/
|
|
23
|
+
insertTask(lineNumber: number, taskText: string, completed?: boolean, indent?: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Delete a task at the specified line number (1-based).
|
|
26
|
+
*/
|
|
27
|
+
deleteTask(lineNumber: number): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Update the text of a task at the specified line number (1-based).
|
|
30
|
+
*/
|
|
31
|
+
updateTaskText(lineNumber: number, newText: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Mark a task as complete or incomplete at the specified line number (1-based).
|
|
34
|
+
*/
|
|
35
|
+
toggleTaskCompletion(lineNumber: number, completed?: boolean): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Change the indentation level of a task (for hierarchy).
|
|
38
|
+
*/
|
|
39
|
+
setTaskIndent(lineNumber: number, indent: number): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Get the total number of lines in the document.
|
|
42
|
+
*/
|
|
43
|
+
getLineCount(): number;
|
|
44
|
+
/**
|
|
45
|
+
* Apply multiple operations atomically.
|
|
46
|
+
*/
|
|
47
|
+
applyOperations(operations: TaskOperation[]): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Operation types for batch task updates.
|
|
51
|
+
*/
|
|
52
|
+
export type TaskOperation = {
|
|
53
|
+
type: 'insertTask';
|
|
54
|
+
lineNumber: number;
|
|
55
|
+
text: string;
|
|
56
|
+
completed?: boolean;
|
|
57
|
+
indent?: number;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'deleteTask';
|
|
60
|
+
lineNumber: number;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'updateTaskText';
|
|
63
|
+
lineNumber: number;
|
|
64
|
+
text: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'toggleTaskCompletion';
|
|
67
|
+
lineNumber: number;
|
|
68
|
+
completed?: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'setTaskIndent';
|
|
71
|
+
lineNumber: number;
|
|
72
|
+
indent: number;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=task-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-list.d.ts","sourceRoot":"","sources":["../../../../../src/functions/tasks/task-list.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAW;gBAEf,cAAc,GAAE,MAAW;IAMvC;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAM5B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI;IAOtG;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAQvC;;OAEG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAe5D;;OAEG;IACH,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO;IAkBtE;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAgB1D;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,eAAe,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI;CA4BnD;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-list.test.d.ts","sourceRoot":"","sources":["../../../../../src/functions/tasks/task-list.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("@dxos/functions").FunctionDefinition<{
|
|
2
|
+
readonly doc: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
3
|
+
readonly name?: string | undefined;
|
|
4
|
+
readonly description?: string | undefined;
|
|
5
|
+
readonly fallbackName?: string | undefined;
|
|
6
|
+
readonly content: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
7
|
+
readonly content: string;
|
|
8
|
+
}>;
|
|
9
|
+
}>;
|
|
10
|
+
readonly operations?: readonly any[] | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
readonly content: string;
|
|
13
|
+
readonly numberedContent: string;
|
|
14
|
+
}, import("@dxos/functions").FunctionServices>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../src/functions/tasks/update.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,wBAsCG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './blueprints';
|
|
2
|
+
export * from './chat';
|
|
3
|
+
export * from './crud';
|
|
4
|
+
export * from './functions';
|
|
5
|
+
export * as Initiative from './initiative';
|
|
6
|
+
export * from './sync';
|
|
7
|
+
export * from './toolkits';
|
|
8
|
+
export * as Planning from './planning';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
|
+
import { Queue } from '@dxos/echo-db';
|
|
4
|
+
/**
|
|
5
|
+
* Initiative schema definition.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Initiative: Type.Obj<{
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly queue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
10
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
readonly queue: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
13
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
14
|
+
}> | undefined;
|
|
15
|
+
readonly spec: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
16
|
+
readonly content: string;
|
|
17
|
+
}>;
|
|
18
|
+
readonly plan: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
19
|
+
readonly tasks: readonly {
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
22
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
23
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
24
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
25
|
+
readonly name?: string | undefined;
|
|
26
|
+
readonly queue: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
27
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
28
|
+
}> | undefined;
|
|
29
|
+
}[];
|
|
30
|
+
}>;
|
|
31
|
+
readonly artifacts: readonly {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly data: import("@dxos/echo/internal").Ref<any>;
|
|
34
|
+
}[];
|
|
35
|
+
readonly subscriptions: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
36
|
+
readonly useQualifyingAgent?: boolean | undefined;
|
|
37
|
+
readonly newChatOnEveryEvent?: boolean | undefined;
|
|
38
|
+
}, Schema.Struct.Fields>;
|
|
39
|
+
export interface Initiative extends Schema.Schema.Type<typeof Initiative> {
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=Initiative.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Initiative.d.ts","sourceRoot":"","sources":["../../../../src/initiative/Initiative.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOtC;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0CtB,CAAC;AACF,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC;CAAG"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get all initiative functions. This is a function to avoid circular dependency issues.
|
|
3
|
+
*/
|
|
4
|
+
export declare const getFunctions: () => (import("@dxos/functions").FunctionDefinition<{}, {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly spec: string;
|
|
8
|
+
readonly plan: string;
|
|
9
|
+
readonly artifacts: readonly {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly type?: string | undefined;
|
|
12
|
+
readonly dxn?: string | undefined;
|
|
13
|
+
}[];
|
|
14
|
+
}, import("@dxos/functions").FunctionServices> | import("@dxos/functions").FunctionDefinition<{
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly artifact: import("@dxos/echo/internal").Ref<any>;
|
|
17
|
+
}, void, import("@dxos/functions").FunctionServices> | import("@dxos/functions").FunctionDefinition<{
|
|
18
|
+
readonly prompt?: string | undefined;
|
|
19
|
+
readonly initiative: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly queue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
22
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
23
|
+
readonly name?: string | undefined;
|
|
24
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
25
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
26
|
+
}> | undefined;
|
|
27
|
+
readonly spec: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
28
|
+
readonly content: string;
|
|
29
|
+
}>;
|
|
30
|
+
readonly plan: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
31
|
+
readonly tasks: readonly {
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
34
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
35
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
36
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
37
|
+
readonly name?: string | undefined;
|
|
38
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
39
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
}>;
|
|
43
|
+
readonly artifacts: readonly {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly data: import("@dxos/echo/internal").Ref<any>;
|
|
46
|
+
}[];
|
|
47
|
+
readonly subscriptions: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
48
|
+
readonly useQualifyingAgent?: boolean | undefined;
|
|
49
|
+
readonly newChatOnEveryEvent?: boolean | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
readonly event?: {
|
|
52
|
+
readonly from: string;
|
|
53
|
+
readonly to: string;
|
|
54
|
+
readonly body: string;
|
|
55
|
+
readonly created: string;
|
|
56
|
+
readonly subject: string;
|
|
57
|
+
} | {
|
|
58
|
+
readonly queue: string;
|
|
59
|
+
readonly item: any;
|
|
60
|
+
readonly cursor: string;
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: string;
|
|
63
|
+
readonly subject: import("@dxos/echo/internal").Ref<any>;
|
|
64
|
+
readonly changedObjectId?: string | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
readonly tick: number;
|
|
67
|
+
} | {
|
|
68
|
+
readonly url: string;
|
|
69
|
+
readonly method: "GET" | "POST";
|
|
70
|
+
readonly headers: {
|
|
71
|
+
readonly [x: string]: string;
|
|
72
|
+
};
|
|
73
|
+
readonly bodyText: string;
|
|
74
|
+
} | undefined;
|
|
75
|
+
}, void, import("@dxos/functions").FunctionServices> | import("@dxos/functions").FunctionDefinition<{
|
|
76
|
+
readonly initiative: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
77
|
+
readonly name: string;
|
|
78
|
+
readonly queue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
79
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
80
|
+
readonly name?: string | undefined;
|
|
81
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
82
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
83
|
+
}> | undefined;
|
|
84
|
+
readonly spec: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
85
|
+
readonly content: string;
|
|
86
|
+
}>;
|
|
87
|
+
readonly plan: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
88
|
+
readonly tasks: readonly {
|
|
89
|
+
readonly title: string;
|
|
90
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
91
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
92
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
93
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
94
|
+
readonly name?: string | undefined;
|
|
95
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
96
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
97
|
+
}> | undefined;
|
|
98
|
+
}[];
|
|
99
|
+
}>;
|
|
100
|
+
readonly artifacts: readonly {
|
|
101
|
+
readonly name: string;
|
|
102
|
+
readonly data: import("@dxos/echo/internal").Ref<any>;
|
|
103
|
+
}[];
|
|
104
|
+
readonly subscriptions: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
105
|
+
readonly useQualifyingAgent?: boolean | undefined;
|
|
106
|
+
readonly newChatOnEveryEvent?: boolean | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
readonly event: {
|
|
109
|
+
readonly from: string;
|
|
110
|
+
readonly to: string;
|
|
111
|
+
readonly body: string;
|
|
112
|
+
readonly created: string;
|
|
113
|
+
readonly subject: string;
|
|
114
|
+
} | {
|
|
115
|
+
readonly queue: string;
|
|
116
|
+
readonly item: any;
|
|
117
|
+
readonly cursor: string;
|
|
118
|
+
} | {
|
|
119
|
+
readonly type: string;
|
|
120
|
+
readonly subject: import("@dxos/echo/internal").Ref<any>;
|
|
121
|
+
readonly changedObjectId?: string | undefined;
|
|
122
|
+
} | {
|
|
123
|
+
readonly tick: number;
|
|
124
|
+
} | {
|
|
125
|
+
readonly url: string;
|
|
126
|
+
readonly method: "GET" | "POST";
|
|
127
|
+
readonly headers: {
|
|
128
|
+
readonly [x: string]: string;
|
|
129
|
+
};
|
|
130
|
+
readonly bodyText: string;
|
|
131
|
+
};
|
|
132
|
+
}, void, import("@dxos/functions").FunctionServices>)[];
|
|
133
|
+
/**
|
|
134
|
+
* Creates the Initiative blueprint. This is a function to avoid circular dependency issues.
|
|
135
|
+
*/
|
|
136
|
+
export declare const makeBlueprint: () => import("@dxos/echo/Obj").Obj<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
137
|
+
readonly description?: string | undefined;
|
|
138
|
+
readonly name: string;
|
|
139
|
+
readonly key: string;
|
|
140
|
+
readonly instructions: {
|
|
141
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
142
|
+
readonly content: string;
|
|
143
|
+
}>;
|
|
144
|
+
readonly inputs?: readonly {
|
|
145
|
+
readonly function?: string | undefined;
|
|
146
|
+
readonly name: string;
|
|
147
|
+
readonly kind?: "function" | "value" | "pass-through" | "retriever" | "query" | "resolver" | "context" | "schema" | undefined;
|
|
148
|
+
readonly default?: any;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
};
|
|
151
|
+
readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
|
|
152
|
+
}>;
|
|
153
|
+
//# sourceMappingURL=blueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../src/initiative/blueprint.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAoD,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;uBA2CsI,CAAC;6BAA0C,CAAC;;yBAAkF,CAAC;4BAA6I,CAAC;;;;EADza,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("@dxos/functions").FunctionDefinition<{
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly artifact: import("@dxos/echo/internal").Ref<any>;
|
|
4
|
+
}, void, import("@dxos/functions").FunctionServices>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=addArtifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addArtifact.d.ts","sourceRoot":"","sources":["../../../../../src/initiative/functions/addArtifact.ts"],"names":[],"mappings":";;;;AAaA,wBA2BG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type Queue } from '@dxos/echo-db';
|
|
2
|
+
declare const _default: import("@dxos/functions").FunctionDefinition<{
|
|
3
|
+
readonly prompt?: string | undefined;
|
|
4
|
+
readonly initiative: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly queue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
7
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly queue: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
10
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly spec: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
13
|
+
readonly content: string;
|
|
14
|
+
}>;
|
|
15
|
+
readonly plan: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
16
|
+
readonly tasks: readonly {
|
|
17
|
+
readonly title: string;
|
|
18
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
19
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
20
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
21
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
22
|
+
readonly name?: string | undefined;
|
|
23
|
+
readonly queue: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
24
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
25
|
+
}> | undefined;
|
|
26
|
+
}[];
|
|
27
|
+
}>;
|
|
28
|
+
readonly artifacts: readonly {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly data: import("@dxos/echo/internal").Ref<any>;
|
|
31
|
+
}[];
|
|
32
|
+
readonly subscriptions: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
33
|
+
readonly useQualifyingAgent?: boolean | undefined;
|
|
34
|
+
readonly newChatOnEveryEvent?: boolean | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
readonly event?: {
|
|
37
|
+
readonly from: string;
|
|
38
|
+
readonly to: string;
|
|
39
|
+
readonly body: string;
|
|
40
|
+
readonly created: string;
|
|
41
|
+
readonly subject: string;
|
|
42
|
+
} | {
|
|
43
|
+
readonly queue: string;
|
|
44
|
+
readonly item: any;
|
|
45
|
+
readonly cursor: string;
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: string;
|
|
48
|
+
readonly subject: import("@dxos/echo/internal").Ref<any>;
|
|
49
|
+
readonly changedObjectId?: string | undefined;
|
|
50
|
+
} | {
|
|
51
|
+
readonly tick: number;
|
|
52
|
+
} | {
|
|
53
|
+
readonly url: string;
|
|
54
|
+
readonly method: "GET" | "POST";
|
|
55
|
+
readonly headers: {
|
|
56
|
+
readonly [x: string]: string;
|
|
57
|
+
};
|
|
58
|
+
readonly bodyText: string;
|
|
59
|
+
} | undefined;
|
|
60
|
+
}, void, import("@dxos/functions").FunctionServices>;
|
|
61
|
+
export default _default;
|
|
62
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../src/initiative/functions/agent.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS3C,wBAyDG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("@dxos/functions").FunctionDefinition<{}, {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly spec: string;
|
|
5
|
+
readonly plan: string;
|
|
6
|
+
readonly artifacts: readonly {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly type?: string | undefined;
|
|
9
|
+
readonly dxn?: string | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
}, import("@dxos/functions").FunctionServices>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=getContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getContext.d.ts","sourceRoot":"","sources":["../../../../../src/initiative/functions/getContext.ts"],"names":[],"mappings":";;;;;;;;;;;AAcA,wBAuCG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/initiative/functions/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: import("@dxos/functions").FunctionDefinition<{
|
|
2
|
+
readonly initiative: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly queue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
5
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
6
|
+
readonly name?: string | undefined;
|
|
7
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
8
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
9
|
+
}> | undefined;
|
|
10
|
+
readonly spec: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
11
|
+
readonly content: string;
|
|
12
|
+
}>;
|
|
13
|
+
readonly plan: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
14
|
+
readonly tasks: readonly {
|
|
15
|
+
readonly title: string;
|
|
16
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
17
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
18
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
19
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
20
|
+
readonly name?: string | undefined;
|
|
21
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
22
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
23
|
+
}> | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
readonly artifacts: readonly {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly data: import("@dxos/echo/internal").Ref<any>;
|
|
29
|
+
}[];
|
|
30
|
+
readonly subscriptions: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
31
|
+
readonly useQualifyingAgent?: boolean | undefined;
|
|
32
|
+
readonly newChatOnEveryEvent?: boolean | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
readonly event: {
|
|
35
|
+
readonly from: string;
|
|
36
|
+
readonly to: string;
|
|
37
|
+
readonly body: string;
|
|
38
|
+
readonly created: string;
|
|
39
|
+
readonly subject: string;
|
|
40
|
+
} | {
|
|
41
|
+
readonly queue: string;
|
|
42
|
+
readonly item: any;
|
|
43
|
+
readonly cursor: string;
|
|
44
|
+
} | {
|
|
45
|
+
readonly type: string;
|
|
46
|
+
readonly subject: import("@dxos/echo/internal").Ref<any>;
|
|
47
|
+
readonly changedObjectId?: string | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
readonly tick: number;
|
|
50
|
+
} | {
|
|
51
|
+
readonly url: string;
|
|
52
|
+
readonly method: "GET" | "POST";
|
|
53
|
+
readonly headers: {
|
|
54
|
+
readonly [x: string]: string;
|
|
55
|
+
};
|
|
56
|
+
readonly bodyText: string;
|
|
57
|
+
};
|
|
58
|
+
}, void, import("@dxos/functions").FunctionServices>;
|
|
59
|
+
export default _default;
|
|
60
|
+
//# sourceMappingURL=qualifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifier.d.ts","sourceRoot":"","sources":["../../../../../src/initiative/functions/qualifier.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,wBA+EG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Initiative } from './Initiative';
|
|
2
|
+
export { makeInitialized, resetChatHistory, getFromChatContext } from './util';
|
|
3
|
+
export { getFunctions, makeBlueprint } from './blueprint';
|
|
4
|
+
export * from './functions';
|
|
5
|
+
export * from './plan';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/initiative/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1D,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initiative.test.d.ts","sourceRoot":"","sources":["../../../../src/initiative/initiative.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Obj, Type } from '@dxos/echo';
|
|
3
|
+
export declare const TaskId: Schema.brand<typeof Schema.String, "@dxos/assistant-toolkit/TaskId">;
|
|
4
|
+
export type TaskId = Schema.Schema.Type<typeof TaskId>;
|
|
5
|
+
export declare const Task: Schema.Struct<{
|
|
6
|
+
/**
|
|
7
|
+
* Short task ID unique within the plan.
|
|
8
|
+
*/
|
|
9
|
+
id: Schema.brand<typeof Schema.String, "@dxos/assistant-toolkit/TaskId">;
|
|
10
|
+
title: Schema.SchemaClass<string, string, never>;
|
|
11
|
+
status: Schema.Literal<["todo", "in-progress", "done"]>;
|
|
12
|
+
/**
|
|
13
|
+
* Parent task ID.
|
|
14
|
+
*/
|
|
15
|
+
parent: Schema.optional<Schema.brand<typeof Schema.String, "@dxos/assistant-toolkit/TaskId">>;
|
|
16
|
+
/**
|
|
17
|
+
* Chat object that this task is associated with.
|
|
18
|
+
*/
|
|
19
|
+
chat: Schema.optional<import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
20
|
+
readonly name?: string | undefined;
|
|
21
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
22
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
23
|
+
}>>;
|
|
24
|
+
}>;
|
|
25
|
+
export interface Task extends Schema.Schema.Type<typeof Task> {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Hierarchical collection of tasks for humans and agents to track progress.
|
|
29
|
+
*/
|
|
30
|
+
export declare const Plan: Type.Obj<{
|
|
31
|
+
readonly tasks: readonly {
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
34
|
+
readonly status: "done" | "todo" | "in-progress";
|
|
35
|
+
readonly parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
36
|
+
readonly chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
37
|
+
readonly name?: string | undefined;
|
|
38
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
39
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
}, Schema.Struct.Fields>;
|
|
43
|
+
export interface Plan extends Schema.Schema.Type<typeof Plan> {
|
|
44
|
+
}
|
|
45
|
+
export declare const generateTaskId: (plan: Plan) => TaskId;
|
|
46
|
+
/**
|
|
47
|
+
* Add new tasks to a plan, generating IDs for new tasks.
|
|
48
|
+
* Use inside an `Obj.change` callback.
|
|
49
|
+
*/
|
|
50
|
+
export declare const addTasks: (plan: Obj.Mutable<Plan>, tasks: (Pick<Task, "title"> & Partial<Pick<Task, "status" | "parent" | "chat">>)[]) => {
|
|
51
|
+
id: import("@dxos/keys").ObjectId;
|
|
52
|
+
"~@dxos/echo/Kind": import("@dxos/echo/internal").EntityKind.Object;
|
|
53
|
+
tasks: {
|
|
54
|
+
title: string;
|
|
55
|
+
id: string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">;
|
|
56
|
+
status: "done" | "todo" | "in-progress";
|
|
57
|
+
parent?: (string & import("effect/Brand").Brand<"@dxos/assistant-toolkit/TaskId">) | undefined;
|
|
58
|
+
chat?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
59
|
+
readonly name?: string | undefined;
|
|
60
|
+
readonly queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>>;
|
|
61
|
+
readonly traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
|
|
62
|
+
}> | undefined;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
interface MakePlanProps {
|
|
66
|
+
tasks: {
|
|
67
|
+
title: string;
|
|
68
|
+
status?: 'todo' | 'in-progress' | 'done';
|
|
69
|
+
}[];
|
|
70
|
+
}
|
|
71
|
+
export declare const makePlan: (props: MakePlanProps) => Plan;
|
|
72
|
+
/**
|
|
73
|
+
* Formats plan to markdown format.
|
|
74
|
+
*/
|
|
75
|
+
export declare const formatPlan: (plan: Plan) => string;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/initiative/plan.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIvC,eAAO,MAAM,MAAM,sEAAqE,CAAC;AACzF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,IAAI;IACf;;OAEG;;;;IASH;;OAEG;;IAKH;;OAEG;;;;;;EAEH,CAAC;AACH,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhE;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;wBAOhB,CAAC;AACF,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhE,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAe3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GACnB,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EACvB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;CAOnF,CAAC;AAEF,UAAU,aAAa;IACrB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,MAAM,CAAC;KAC1C,EAAE,CAAC;CACL;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,KAAG,IAM/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,MAIvC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { AiContextService } from '@dxos/assistant';
|
|
3
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
4
|
+
import { Database, Obj, Ref } from '@dxos/echo';
|
|
5
|
+
import { type ObjectNotFoundError } from '@dxos/echo/Err';
|
|
6
|
+
import { QueueService } from '@dxos/functions';
|
|
7
|
+
import { Initiative } from './Initiative';
|
|
8
|
+
/**
|
|
9
|
+
* Creates a fully initialized Initiative with chat, queue, and context bindings.
|
|
10
|
+
*
|
|
11
|
+
* @param props - Initiative properties including spec, plan, blueprints, and context objects.
|
|
12
|
+
* @param blueprint - The blueprint to use for the initiative context.
|
|
13
|
+
* @returns An Effect that yields the initialized Initiative.
|
|
14
|
+
*/
|
|
15
|
+
export declare const makeInitialized: (props: Omit<Obj.MakeProps<typeof Initiative>, "spec" | "plan" | "artifacts" | "subscriptions" | "chat"> & Partial<Pick<Obj.MakeProps<typeof Initiative>, "artifacts" | "subscriptions">> & {
|
|
16
|
+
spec: string;
|
|
17
|
+
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
18
|
+
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
19
|
+
}, blueprint: Blueprint.Blueprint) => Effect.Effect<Initiative, never, QueueService | Database.Service>;
|
|
20
|
+
/**
|
|
21
|
+
* Resets the initiative chat history by rebuilding the chat context.
|
|
22
|
+
* Preserves the existing blueprints and objects from the current chat context.
|
|
23
|
+
*
|
|
24
|
+
* @param initiative - The initiative whose chat history should be reset. Must have an existing chat.
|
|
25
|
+
* @returns An Effect that resets the chat history.
|
|
26
|
+
*/
|
|
27
|
+
export declare const resetChatHistory: (initiative: Initiative) => Effect.Effect<void, ObjectNotFoundError, QueueService | Database.Service>;
|
|
28
|
+
export declare const getFromChatContext: Effect.Effect<Initiative, never, AiContextService>;
|
|
29
|
+
//# sourceMappingURL=util.d.ts.map
|