@locusai/sdk 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/task-executor.d.ts +0 -1
- package/dist/agent/task-executor.d.ts.map +1 -1
- package/dist/agent/worker.d.ts +0 -1
- package/dist/agent/worker.d.ts.map +1 -1
- package/dist/agent/worker.js +34 -18
- package/dist/core/indexer.d.ts.map +1 -1
- package/dist/index-node.js +34 -21
- package/dist/index.js +7 -0
- package/dist/modules/ai.d.ts +9 -1
- package/dist/modules/ai.d.ts.map +1 -1
- package/dist/orchestrator.d.ts +0 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/colors.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../src/agent/task-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../src/agent/task-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,KAAK,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,YAAY;IAGX,OAAO,CAAC,IAAI;IAFxB,OAAO,CAAC,aAAa,CAAgB;gBAEjB,IAAI,EAAE,gBAAgB;IAIpC,OAAO,CACX,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA2ClD"}
|
package/dist/agent/worker.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAsB5D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAsB5D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,WAAW;IAgBV,OAAO,CAAC,MAAM;IAf1B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAG3B,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IAGnC,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,YAAY,CAAU;gBAEV,MAAM,EAAE,YAAY;IAiDxC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAgB;YAe5D,eAAe;YAcf,WAAW;YAiBX,WAAW;IA6BnB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqF3B"}
|
package/dist/agent/worker.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
|
@@ -556,7 +563,15 @@ var colors = {
|
|
|
556
563
|
brightBlue: `${ESC}94m`,
|
|
557
564
|
brightMagenta: `${ESC}95m`,
|
|
558
565
|
brightCyan: `${ESC}96m`,
|
|
559
|
-
brightWhite: `${ESC}97m
|
|
566
|
+
brightWhite: `${ESC}97m`,
|
|
567
|
+
bgBlack: `${ESC}40m`,
|
|
568
|
+
bgRed: `${ESC}41m`,
|
|
569
|
+
bgGreen: `${ESC}42m`,
|
|
570
|
+
bgYellow: `${ESC}43m`,
|
|
571
|
+
bgBlue: `${ESC}44m`,
|
|
572
|
+
bgMagenta: `${ESC}45m`,
|
|
573
|
+
bgCyan: `${ESC}46m`,
|
|
574
|
+
bgWhite: `${ESC}47m`
|
|
560
575
|
};
|
|
561
576
|
var c = {
|
|
562
577
|
text: (text, ...colorNames) => {
|
|
@@ -572,11 +587,17 @@ var c = {
|
|
|
572
587
|
magenta: (t) => c.text(t, "magenta"),
|
|
573
588
|
cyan: (t) => c.text(t, "cyan"),
|
|
574
589
|
gray: (t) => c.text(t, "gray"),
|
|
590
|
+
white: (t) => c.text(t, "white"),
|
|
591
|
+
brightBlue: (t) => c.text(t, "brightBlue"),
|
|
592
|
+
bgBlue: (t) => c.text(t, "bgBlue", "white", "bold"),
|
|
575
593
|
success: (t) => c.text(t, "green", "bold"),
|
|
576
594
|
error: (t) => c.text(t, "red", "bold"),
|
|
577
595
|
warning: (t) => c.text(t, "yellow", "bold"),
|
|
578
596
|
info: (t) => c.text(t, "cyan", "bold"),
|
|
579
597
|
primary: (t) => c.text(t, "blue", "bold"),
|
|
598
|
+
secondary: (t) => c.text(t, "magenta", "bold"),
|
|
599
|
+
header: (t) => c.text(` ${t} `, "bgBlue", "white", "bold"),
|
|
600
|
+
step: (t) => c.text(` ${t} `, "bgCyan", "black", "bold"),
|
|
580
601
|
underline: (t) => c.text(t, "underline")
|
|
581
602
|
};
|
|
582
603
|
|
|
@@ -980,13 +1001,10 @@ class CodebaseIndexer {
|
|
|
980
1001
|
`);
|
|
981
1002
|
const newTreeHash = this.hashTree(treeString);
|
|
982
1003
|
const existingIndex = this.loadIndex();
|
|
983
|
-
if (!force && existingIndex?.treeHash === newTreeHash) {
|
|
984
|
-
onProgress?.("No file changes detected, skipping reindex");
|
|
985
|
-
return null;
|
|
986
|
-
}
|
|
987
1004
|
const currentHashes = this.computeFileHashes(currentFiles);
|
|
988
1005
|
const existingHashes = existingIndex?.fileHashes;
|
|
989
|
-
const
|
|
1006
|
+
const hasExistingContent = existingIndex && (Object.keys(existingIndex.symbols).length > 0 || Object.keys(existingIndex.responsibilities).length > 0);
|
|
1007
|
+
const canIncremental = !force && existingIndex && existingHashes && hasExistingContent;
|
|
990
1008
|
if (canIncremental) {
|
|
991
1009
|
onProgress?.("Performing incremental update");
|
|
992
1010
|
const { added, deleted, modified } = this.diffFiles(currentHashes, existingHashes);
|
|
@@ -1019,8 +1037,12 @@ class CodebaseIndexer {
|
|
|
1019
1037
|
}
|
|
1020
1038
|
}
|
|
1021
1039
|
onProgress?.("AI is analyzing codebase structure...");
|
|
1022
|
-
|
|
1023
|
-
|
|
1040
|
+
try {
|
|
1041
|
+
const index = await treeSummarizer(treeString);
|
|
1042
|
+
return this.applyIndexMetadata(index, currentHashes, newTreeHash);
|
|
1043
|
+
} catch (error) {
|
|
1044
|
+
throw new Error(`AI analysis failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1045
|
+
}
|
|
1024
1046
|
}
|
|
1025
1047
|
async getFileTree() {
|
|
1026
1048
|
const gitmodulesPath = import_node_path5.join(this.projectPath, ".gitmodules");
|
|
@@ -1513,16 +1535,12 @@ class TaskExecutor {
|
|
|
1513
1535
|
});
|
|
1514
1536
|
try {
|
|
1515
1537
|
let plan = null;
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
} else {
|
|
1519
|
-
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1520
|
-
const planningPrompt = `${basePrompt}
|
|
1538
|
+
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1539
|
+
const planningPrompt = `${basePrompt}
|
|
1521
1540
|
|
|
1522
1541
|
## Phase 1: Planning
|
|
1523
1542
|
Analyze and create a detailed plan for THIS SPECIFIC TASK. Do NOT execute changes yet.`;
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1543
|
+
plan = await this.deps.aiRunner.run(planningPrompt, true);
|
|
1526
1544
|
this.deps.log("Starting Execution...", "info");
|
|
1527
1545
|
let executionPrompt = basePrompt;
|
|
1528
1546
|
if (plan != null) {
|
|
@@ -1611,7 +1629,6 @@ class AgentWorker {
|
|
|
1611
1629
|
this.taskExecutor = new TaskExecutor({
|
|
1612
1630
|
aiRunner: this.aiRunner,
|
|
1613
1631
|
projectPath,
|
|
1614
|
-
skipPlanning: config.skipPlanning,
|
|
1615
1632
|
log
|
|
1616
1633
|
});
|
|
1617
1634
|
const providerLabel = provider === "codex" ? "Codex" : "Claude";
|
|
@@ -1742,8 +1759,7 @@ if (process.argv[1]?.includes("agent-worker") || process.argv[1]?.includes("work
|
|
|
1742
1759
|
if (value && !value.startsWith("--"))
|
|
1743
1760
|
i++;
|
|
1744
1761
|
config.provider = resolveProvider(value);
|
|
1745
|
-
}
|
|
1746
|
-
config.skipPlanning = true;
|
|
1762
|
+
}
|
|
1747
1763
|
}
|
|
1748
1764
|
if (!config.agentId || !config.workspaceId || !config.apiBase || !config.apiKey || !config.projectPath) {
|
|
1749
1765
|
console.error("Missing required arguments");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../src/core/indexer.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,yBAAyB,CAAe;gBAEpC,WAAW,EAAE,MAAM;IAK/B;;;;OAIG;IACG,KAAK,CACT,UAAU,CA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AAC,UAAU;CA8BnB"}
|
package/dist/index-node.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
|
@@ -556,7 +563,15 @@ var colors = {
|
|
|
556
563
|
brightBlue: `${ESC}94m`,
|
|
557
564
|
brightMagenta: `${ESC}95m`,
|
|
558
565
|
brightCyan: `${ESC}96m`,
|
|
559
|
-
brightWhite: `${ESC}97m
|
|
566
|
+
brightWhite: `${ESC}97m`,
|
|
567
|
+
bgBlack: `${ESC}40m`,
|
|
568
|
+
bgRed: `${ESC}41m`,
|
|
569
|
+
bgGreen: `${ESC}42m`,
|
|
570
|
+
bgYellow: `${ESC}43m`,
|
|
571
|
+
bgBlue: `${ESC}44m`,
|
|
572
|
+
bgMagenta: `${ESC}45m`,
|
|
573
|
+
bgCyan: `${ESC}46m`,
|
|
574
|
+
bgWhite: `${ESC}47m`
|
|
560
575
|
};
|
|
561
576
|
var c = {
|
|
562
577
|
text: (text, ...colorNames) => {
|
|
@@ -572,11 +587,17 @@ var c = {
|
|
|
572
587
|
magenta: (t) => c.text(t, "magenta"),
|
|
573
588
|
cyan: (t) => c.text(t, "cyan"),
|
|
574
589
|
gray: (t) => c.text(t, "gray"),
|
|
590
|
+
white: (t) => c.text(t, "white"),
|
|
591
|
+
brightBlue: (t) => c.text(t, "brightBlue"),
|
|
592
|
+
bgBlue: (t) => c.text(t, "bgBlue", "white", "bold"),
|
|
575
593
|
success: (t) => c.text(t, "green", "bold"),
|
|
576
594
|
error: (t) => c.text(t, "red", "bold"),
|
|
577
595
|
warning: (t) => c.text(t, "yellow", "bold"),
|
|
578
596
|
info: (t) => c.text(t, "cyan", "bold"),
|
|
579
597
|
primary: (t) => c.text(t, "blue", "bold"),
|
|
598
|
+
secondary: (t) => c.text(t, "magenta", "bold"),
|
|
599
|
+
header: (t) => c.text(` ${t} `, "bgBlue", "white", "bold"),
|
|
600
|
+
step: (t) => c.text(` ${t} `, "bgCyan", "black", "bold"),
|
|
580
601
|
underline: (t) => c.text(t, "underline")
|
|
581
602
|
};
|
|
582
603
|
|
|
@@ -980,13 +1001,10 @@ class CodebaseIndexer {
|
|
|
980
1001
|
`);
|
|
981
1002
|
const newTreeHash = this.hashTree(treeString);
|
|
982
1003
|
const existingIndex = this.loadIndex();
|
|
983
|
-
if (!force && existingIndex?.treeHash === newTreeHash) {
|
|
984
|
-
onProgress?.("No file changes detected, skipping reindex");
|
|
985
|
-
return null;
|
|
986
|
-
}
|
|
987
1004
|
const currentHashes = this.computeFileHashes(currentFiles);
|
|
988
1005
|
const existingHashes = existingIndex?.fileHashes;
|
|
989
|
-
const
|
|
1006
|
+
const hasExistingContent = existingIndex && (Object.keys(existingIndex.symbols).length > 0 || Object.keys(existingIndex.responsibilities).length > 0);
|
|
1007
|
+
const canIncremental = !force && existingIndex && existingHashes && hasExistingContent;
|
|
990
1008
|
if (canIncremental) {
|
|
991
1009
|
onProgress?.("Performing incremental update");
|
|
992
1010
|
const { added, deleted, modified } = this.diffFiles(currentHashes, existingHashes);
|
|
@@ -1019,8 +1037,12 @@ class CodebaseIndexer {
|
|
|
1019
1037
|
}
|
|
1020
1038
|
}
|
|
1021
1039
|
onProgress?.("AI is analyzing codebase structure...");
|
|
1022
|
-
|
|
1023
|
-
|
|
1040
|
+
try {
|
|
1041
|
+
const index = await treeSummarizer(treeString);
|
|
1042
|
+
return this.applyIndexMetadata(index, currentHashes, newTreeHash);
|
|
1043
|
+
} catch (error) {
|
|
1044
|
+
throw new Error(`AI analysis failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1045
|
+
}
|
|
1024
1046
|
}
|
|
1025
1047
|
async getFileTree() {
|
|
1026
1048
|
const gitmodulesPath = import_node_path5.join(this.projectPath, ".gitmodules");
|
|
@@ -1513,16 +1535,12 @@ class TaskExecutor {
|
|
|
1513
1535
|
});
|
|
1514
1536
|
try {
|
|
1515
1537
|
let plan = null;
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
} else {
|
|
1519
|
-
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1520
|
-
const planningPrompt = `${basePrompt}
|
|
1538
|
+
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1539
|
+
const planningPrompt = `${basePrompt}
|
|
1521
1540
|
|
|
1522
1541
|
## Phase 1: Planning
|
|
1523
1542
|
Analyze and create a detailed plan for THIS SPECIFIC TASK. Do NOT execute changes yet.`;
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1543
|
+
plan = await this.deps.aiRunner.run(planningPrompt, true);
|
|
1526
1544
|
this.deps.log("Starting Execution...", "info");
|
|
1527
1545
|
let executionPrompt = basePrompt;
|
|
1528
1546
|
if (plan != null) {
|
|
@@ -1611,7 +1629,6 @@ class AgentWorker {
|
|
|
1611
1629
|
this.taskExecutor = new TaskExecutor({
|
|
1612
1630
|
aiRunner: this.aiRunner,
|
|
1613
1631
|
projectPath,
|
|
1614
|
-
skipPlanning: config.skipPlanning,
|
|
1615
1632
|
log
|
|
1616
1633
|
});
|
|
1617
1634
|
const providerLabel = provider === "codex" ? "Codex" : "Claude";
|
|
@@ -1742,8 +1759,7 @@ if (process.argv[1]?.includes("agent-worker") || process.argv[1]?.includes("work
|
|
|
1742
1759
|
if (value && !value.startsWith("--"))
|
|
1743
1760
|
i++;
|
|
1744
1761
|
config.provider = resolveProvider(value);
|
|
1745
|
-
}
|
|
1746
|
-
config.skipPlanning = true;
|
|
1762
|
+
}
|
|
1747
1763
|
}
|
|
1748
1764
|
if (!config.agentId || !config.workspaceId || !config.apiBase || !config.apiKey || !config.projectPath) {
|
|
1749
1765
|
console.error("Missing required arguments");
|
|
@@ -1911,9 +1927,6 @@ ${c.success("✅ Orchestrator finished")}`);
|
|
|
1911
1927
|
if (this.config.provider) {
|
|
1912
1928
|
workerArgs.push("--provider", this.config.provider);
|
|
1913
1929
|
}
|
|
1914
|
-
if (this.config.skipPlanning) {
|
|
1915
|
-
workerArgs.push("--skip-planning");
|
|
1916
|
-
}
|
|
1917
1930
|
if (this.resolvedSprintId) {
|
|
1918
1931
|
workerArgs.push("--sprint-id", this.resolvedSprintId);
|
|
1919
1932
|
}
|
package/dist/index.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
package/dist/modules/ai.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatRequest, ChatResponse } from "@locusai/shared";
|
|
1
|
+
import { ChatRequest, ChatResponse, ShareChatRequest } from "@locusai/shared";
|
|
2
2
|
import { BaseModule } from "./base.js";
|
|
3
3
|
export declare class AIModule extends BaseModule {
|
|
4
4
|
/**
|
|
@@ -43,5 +43,13 @@ export declare class AIModule extends BaseModule {
|
|
|
43
43
|
* Delete a chat session.
|
|
44
44
|
*/
|
|
45
45
|
deleteSession(workspaceId: string, sessionId: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Toggle chat session sharing.
|
|
48
|
+
*/
|
|
49
|
+
shareSession(workspaceId: string, sessionId: string, body: ShareChatRequest): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a shared chat session (public).
|
|
52
|
+
*/
|
|
53
|
+
getSharedSession(sessionId: string): Promise<ChatResponse>;
|
|
46
54
|
}
|
|
47
55
|
//# sourceMappingURL=ai.d.ts.map
|
package/dist/modules/ai.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/modules/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/modules/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,qBAAa,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IASzE;;OAEG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAStE;;OAEG;IACG,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAC/C,OAAO,CAAC,YAAY,CAAC;IASxB;;OAEG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;QA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: string;
|
|
27
|
+
bgBlack: string;
|
|
28
|
+
bgRed: string;
|
|
29
|
+
bgGreen: string;
|
|
30
|
+
bgYellow: string;
|
|
31
|
+
bgBlue: string;
|
|
32
|
+
bgMagenta: string;
|
|
33
|
+
bgCyan: string;
|
|
34
|
+
bgWhite: string;
|
|
27
35
|
};
|
|
28
36
|
type ColorName = keyof typeof colors;
|
|
29
37
|
export declare const c: {
|
|
@@ -37,11 +45,17 @@ export declare const c: {
|
|
|
37
45
|
magenta: (t: string) => string;
|
|
38
46
|
cyan: (t: string) => string;
|
|
39
47
|
gray: (t: string) => string;
|
|
48
|
+
white: (t: string) => string;
|
|
49
|
+
brightBlue: (t: string) => string;
|
|
50
|
+
bgBlue: (t: string) => string;
|
|
40
51
|
success: (t: string) => string;
|
|
41
52
|
error: (t: string) => string;
|
|
42
53
|
warning: (t: string) => string;
|
|
43
54
|
info: (t: string) => string;
|
|
44
55
|
primary: (t: string) => string;
|
|
56
|
+
secondary: (t: string) => string;
|
|
57
|
+
header: (t: string) => string;
|
|
58
|
+
step: (t: string) => string;
|
|
45
59
|
underline: (t: string) => string;
|
|
46
60
|
};
|
|
47
61
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCX,CAAC;AAEF,KAAK,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC;AAErC,eAAO,MAAM,CAAC;iBACC,MAAM,iBAAiB,SAAS,EAAE;cAMrC,MAAM;aACP,MAAM;aACN,MAAM;eACJ,MAAM;gBACL,MAAM;cACR,MAAM;iBACH,MAAM;cACT,MAAM;cACN,MAAM;eAEL,MAAM;oBACD,MAAM;gBACV,MAAM;iBAGL,MAAM;eACR,MAAM;iBACJ,MAAM;cACT,MAAM;iBACH,MAAM;mBACJ,MAAM;gBACT,MAAM;cACR,MAAM;mBACD,MAAM;CACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"clean": "rm -rf node_modules"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@locusai/shared": "^0.7.
|
|
33
|
+
"@locusai/shared": "^0.7.1",
|
|
34
34
|
"axios": "^1.13.2",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
36
|
"globby": "^14.0.2"
|