@flue/client 0.0.14 → 0.0.16
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/index.d.mts +1 -4
- package/dist/index.mjs +6 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -76,10 +76,8 @@ declare function transformEvent(raw: any): FlueEvent | null;
|
|
|
76
76
|
interface FlueOptions {
|
|
77
77
|
/** OpenCode server URL (default: 'http://localhost:48765'). */
|
|
78
78
|
opencodeUrl?: string;
|
|
79
|
-
/** Working directory (the repo root
|
|
79
|
+
/** Working directory (the repo root). */
|
|
80
80
|
workdir: string;
|
|
81
|
-
/** Override working directory for OpenCode API calls (e.g. /workspace inside a Docker container). */
|
|
82
|
-
containerWorkdir?: string;
|
|
83
81
|
/** Working branch for commits. */
|
|
84
82
|
branch?: string;
|
|
85
83
|
/** Workflow arguments. */
|
|
@@ -139,7 +137,6 @@ declare class Flue {
|
|
|
139
137
|
/** Scoped secrets passed by the runner. */
|
|
140
138
|
readonly secrets: Record<string, string>;
|
|
141
139
|
private readonly workdir;
|
|
142
|
-
private readonly containerWorkdir;
|
|
143
140
|
private readonly model?;
|
|
144
141
|
private readonly client;
|
|
145
142
|
constructor(options: FlueOptions);
|
package/dist/index.mjs
CHANGED
|
@@ -90,12 +90,12 @@ function transformEvent(raw) {
|
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
92
|
if (part.type === "text") {
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
93
|
+
const text = raw.properties?.delta ?? part.text;
|
|
94
|
+
if (text) return {
|
|
95
95
|
timestamp: now,
|
|
96
96
|
sessionId,
|
|
97
97
|
type: "text",
|
|
98
|
-
text
|
|
98
|
+
text
|
|
99
99
|
};
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
@@ -446,7 +446,6 @@ var Flue = class {
|
|
|
446
446
|
/** Scoped secrets passed by the runner. */
|
|
447
447
|
secrets;
|
|
448
448
|
workdir;
|
|
449
|
-
containerWorkdir;
|
|
450
449
|
model;
|
|
451
450
|
client;
|
|
452
451
|
constructor(options) {
|
|
@@ -454,11 +453,10 @@ var Flue = class {
|
|
|
454
453
|
this.args = options.args ?? {};
|
|
455
454
|
this.secrets = options.secrets ?? {};
|
|
456
455
|
this.workdir = options.workdir;
|
|
457
|
-
this.containerWorkdir = options.containerWorkdir ?? options.workdir;
|
|
458
456
|
this.model = options.model;
|
|
459
457
|
this.client = createOpencodeClient({
|
|
460
458
|
baseUrl: options.opencodeUrl ?? "http://localhost:48765",
|
|
461
|
-
directory: this.
|
|
459
|
+
directory: this.workdir
|
|
462
460
|
});
|
|
463
461
|
}
|
|
464
462
|
async skill(name, options) {
|
|
@@ -470,7 +468,7 @@ var Flue = class {
|
|
|
470
468
|
} : void 0,
|
|
471
469
|
model: options?.model ?? this.model
|
|
472
470
|
};
|
|
473
|
-
return runSkill(this.client, this.
|
|
471
|
+
return runSkill(this.client, this.workdir, name, mergedOptions);
|
|
474
472
|
}
|
|
475
473
|
async prompt(promptText, options) {
|
|
476
474
|
const mergedOptions = {
|
|
@@ -478,7 +476,7 @@ var Flue = class {
|
|
|
478
476
|
model: options?.model ?? this.model,
|
|
479
477
|
prompt: promptText
|
|
480
478
|
};
|
|
481
|
-
return runSkill(this.client, this.
|
|
479
|
+
return runSkill(this.client, this.workdir, "__inline__", mergedOptions);
|
|
482
480
|
}
|
|
483
481
|
/** Execute a shell command with scoped environment variables. */
|
|
484
482
|
async shell(command, options) {
|