@getpaseo/server 0.1.84 → 0.1.86
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/scripts/supervisor-entrypoint.js +1 -0
- package/dist/server/server/agent/agent-manager.d.ts +4 -0
- package/dist/server/server/agent/agent-manager.js +23 -0
- package/dist/server/server/agent/agent-metadata-generator.d.ts +9 -0
- package/dist/server/server/agent/agent-metadata-generator.js +11 -2
- package/dist/server/server/agent/agent-response-loop.d.ts +1 -1
- package/dist/server/server/agent/agent-response-loop.js +3 -13
- package/dist/server/server/agent/create-agent/create.d.ts +2 -0
- package/dist/server/server/agent/create-agent/create.js +7 -0
- package/dist/server/server/agent/create-agent-lifecycle-dispatch.js +0 -1
- package/dist/server/server/agent/import-sessions.d.ts +3 -0
- package/dist/server/server/agent/import-sessions.js +11 -0
- package/dist/server/server/agent/mcp-server.d.ts +0 -1
- package/dist/server/server/agent/mcp-server.js +0 -4
- package/dist/server/server/agent/providers/claude/agent.d.ts +2 -1
- package/dist/server/server/agent/providers/claude/agent.js +70 -0
- package/dist/server/server/agent/providers/claude/feature-definitions.d.ts +8 -0
- package/dist/server/server/agent/providers/claude/feature-definitions.js +36 -0
- package/dist/server/server/agent/providers/claude/models.js +19 -5
- package/dist/server/server/agent/providers/tool-call-detail-primitives.js +6 -3
- package/dist/server/server/agent/providers/tool-call-mapper-utils.d.ts +5 -0
- package/dist/server/server/agent/providers/tool-call-mapper-utils.js +62 -0
- package/dist/server/server/agent/structured-generation-providers.d.ts +29 -0
- package/dist/server/server/agent/structured-generation-providers.js +192 -0
- package/dist/server/server/auto-archive-on-merge/archive-if-safe.d.ts +0 -2
- package/dist/server/server/auto-archive-on-merge/archive-if-safe.js +0 -1
- package/dist/server/server/bootstrap.d.ts +7 -0
- package/dist/server/server/bootstrap.js +11 -2
- package/dist/server/server/config.js +1 -0
- package/dist/server/server/daemon-config-store.js +46 -6
- package/dist/server/server/daemon-worker.js +1 -0
- package/dist/server/server/file-explorer/service.js +4 -4
- package/dist/server/server/paseo-worktree-archive-service.d.ts +2 -6
- package/dist/server/server/paseo-worktree-archive-service.js +13 -33
- package/dist/server/server/persisted-config.d.ts +77 -22
- package/dist/server/server/persisted-config.js +13 -0
- package/dist/server/server/schedule/service.d.ts +1 -0
- package/dist/server/server/schedule/service.js +15 -0
- package/dist/server/server/session.d.ts +3 -2
- package/dist/server/server/session.js +77 -25
- package/dist/server/server/speech/providers/local/runtime.js +52 -133
- package/dist/server/server/speech/providers/local/sherpa/model-catalog.d.ts +9 -2
- package/dist/server/server/speech/providers/local/sherpa/model-catalog.js +7 -0
- package/dist/server/server/speech/providers/local/worker-bytes.d.ts +4 -0
- package/dist/server/server/speech/providers/local/worker-bytes.js +9 -0
- package/dist/server/server/speech/providers/local/worker-client.d.ts +80 -0
- package/dist/server/server/speech/providers/local/worker-client.js +438 -0
- package/dist/server/server/speech/providers/local/worker-process.d.ts +2 -0
- package/dist/server/server/speech/providers/local/worker-process.js +270 -0
- package/dist/server/server/speech/providers/local/worker-protocol.d.ts +95 -0
- package/dist/server/server/speech/providers/local/worker-protocol.js +2 -0
- package/dist/server/server/websocket-server.js +2 -0
- package/dist/server/server/worktree-branch-name-generator.d.ts +9 -0
- package/dist/server/server/worktree-branch-name-generator.js +11 -2
- package/dist/server/utils/worktree.d.ts +1 -1
- package/dist/server/utils/worktree.js +2 -2
- package/dist/src/server/persisted-config.js +13 -0
- package/package.json +5 -10
- package/dist/server/utils/branch-slug.d.ts +0 -14
- package/dist/server/utils/branch-slug.js +0 -49
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { StreamingTranscriptionCommittedEvent, StreamingTranscriptionEvent, TranscriptionResult } from "../../speech-provider.js";
|
|
2
|
+
import type { LocalSpeechWorkerBytes } from "./worker-bytes.js";
|
|
3
|
+
export interface LocalSpeechWorkerConfig {
|
|
4
|
+
modelsDir: string;
|
|
5
|
+
voiceSttModel: string;
|
|
6
|
+
dictationSttModel: string;
|
|
7
|
+
voiceTtsModel: string;
|
|
8
|
+
voiceTtsSpeakerId?: number;
|
|
9
|
+
voiceTtsSpeed?: number;
|
|
10
|
+
}
|
|
11
|
+
export type LocalSpeechSessionKind = "voiceStt" | "dictationStt" | "vad";
|
|
12
|
+
export type LocalSpeechWorkerRequest = {
|
|
13
|
+
type: "tts.synthesize";
|
|
14
|
+
requestId: string;
|
|
15
|
+
config: LocalSpeechWorkerConfig;
|
|
16
|
+
text: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: "stt.transcribe";
|
|
19
|
+
requestId: string;
|
|
20
|
+
config: LocalSpeechWorkerConfig;
|
|
21
|
+
model: "voice" | "dictation";
|
|
22
|
+
audio: LocalSpeechWorkerBytes;
|
|
23
|
+
format: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: "session.create";
|
|
26
|
+
requestId: string;
|
|
27
|
+
config: LocalSpeechWorkerConfig;
|
|
28
|
+
sessionId: string;
|
|
29
|
+
kind: LocalSpeechSessionKind;
|
|
30
|
+
} | {
|
|
31
|
+
type: "session.append";
|
|
32
|
+
requestId: string;
|
|
33
|
+
sessionId: string;
|
|
34
|
+
audio: LocalSpeechWorkerBytes;
|
|
35
|
+
} | {
|
|
36
|
+
type: "session.commit";
|
|
37
|
+
requestId: string;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "session.clear";
|
|
41
|
+
requestId: string;
|
|
42
|
+
sessionId: string;
|
|
43
|
+
} | {
|
|
44
|
+
type: "session.flush";
|
|
45
|
+
requestId: string;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "session.reset";
|
|
49
|
+
requestId: string;
|
|
50
|
+
sessionId: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: "session.close";
|
|
53
|
+
requestId: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
};
|
|
56
|
+
export type LocalSpeechWorkerResponse = {
|
|
57
|
+
type: "response";
|
|
58
|
+
requestId: string;
|
|
59
|
+
ok: true;
|
|
60
|
+
result?: unknown;
|
|
61
|
+
} | {
|
|
62
|
+
type: "response";
|
|
63
|
+
requestId: string;
|
|
64
|
+
ok: false;
|
|
65
|
+
error: string;
|
|
66
|
+
};
|
|
67
|
+
export type LocalSpeechWorkerEvent = {
|
|
68
|
+
type: "session.committed";
|
|
69
|
+
sessionId: string;
|
|
70
|
+
payload: StreamingTranscriptionCommittedEvent;
|
|
71
|
+
} | {
|
|
72
|
+
type: "session.transcript";
|
|
73
|
+
sessionId: string;
|
|
74
|
+
payload: StreamingTranscriptionEvent;
|
|
75
|
+
} | {
|
|
76
|
+
type: "session.speech_started";
|
|
77
|
+
sessionId: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: "session.speech_stopped";
|
|
80
|
+
sessionId: string;
|
|
81
|
+
} | {
|
|
82
|
+
type: "session.error";
|
|
83
|
+
sessionId: string;
|
|
84
|
+
error: string;
|
|
85
|
+
};
|
|
86
|
+
export type LocalSpeechWorkerToParentMessage = LocalSpeechWorkerResponse | LocalSpeechWorkerEvent;
|
|
87
|
+
export interface LocalSpeechCreateSessionResult {
|
|
88
|
+
requiredSampleRate: number;
|
|
89
|
+
}
|
|
90
|
+
export interface LocalSpeechTtsResult {
|
|
91
|
+
audio: LocalSpeechWorkerBytes;
|
|
92
|
+
format: string;
|
|
93
|
+
}
|
|
94
|
+
export type LocalSpeechTranscriptionResult = TranscriptionResult;
|
|
95
|
+
//# sourceMappingURL=worker-protocol.d.ts.map
|
|
@@ -719,6 +719,8 @@ export class VoiceAssistantWebSocketServer {
|
|
|
719
719
|
"terminal-restore-modes": true,
|
|
720
720
|
// COMPAT(rewind): added in v0.1.X, drop the gate when floor >= v0.1.X.
|
|
721
721
|
rewind: true,
|
|
722
|
+
// COMPAT(checkoutRefresh): added in v0.1.86, remove gate after 2026-11-29.
|
|
723
|
+
checkoutRefresh: true,
|
|
722
724
|
},
|
|
723
725
|
};
|
|
724
726
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { FirstAgentContext } from "@getpaseo/protocol/messages";
|
|
2
2
|
import type { AgentManager } from "./agent/agent-manager.js";
|
|
3
3
|
import { generateStructuredAgentResponseWithFallback } from "./agent/agent-response-loop.js";
|
|
4
|
+
import { type StructuredGenerationDaemonConfig } from "./agent/structured-generation-providers.js";
|
|
4
5
|
import type { WorkspaceGitService } from "./workspace-git-service.js";
|
|
6
|
+
import type { ProviderSnapshotManager } from "./agent/provider-snapshot-manager.js";
|
|
5
7
|
interface BranchNameGeneratorLogger {
|
|
6
8
|
info: (obj: object, msg?: string) => void;
|
|
7
9
|
warn: (obj: object, msg?: string) => void;
|
|
@@ -11,6 +13,13 @@ export interface GenerateBranchNameFromFirstAgentContextOptions {
|
|
|
11
13
|
agentManager: AgentManager;
|
|
12
14
|
cwd: string;
|
|
13
15
|
workspaceGitService?: Pick<WorkspaceGitService, "resolveRepoRoot">;
|
|
16
|
+
providerSnapshotManager?: Pick<ProviderSnapshotManager, "listProviders">;
|
|
17
|
+
daemonConfig?: StructuredGenerationDaemonConfig | null;
|
|
18
|
+
currentSelection?: {
|
|
19
|
+
provider?: string | null;
|
|
20
|
+
model?: string | null;
|
|
21
|
+
thinkingOptionId?: string | null;
|
|
22
|
+
};
|
|
14
23
|
firstAgentContext: FirstAgentContext | undefined;
|
|
15
24
|
logger: BranchNameGeneratorLogger;
|
|
16
25
|
deps?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { StructuredAgentFallbackError, StructuredAgentResponseError, generateStructuredAgentResponseWithFallback, } from "./agent/agent-response-loop.js";
|
|
3
|
+
import { resolveStructuredGenerationProviders, } from "./agent/structured-generation-providers.js";
|
|
3
4
|
import { buildAgentBranchNameSeed } from "./agent/prompt-attachments.js";
|
|
4
5
|
import { buildMetadataPrompt } from "../utils/build-metadata-prompt.js";
|
|
5
6
|
const BranchNameSchema = z.object({
|
|
@@ -27,6 +28,14 @@ export async function generateBranchNameFromFirstAgentContext(options) {
|
|
|
27
28
|
const generator = options.deps?.generateStructuredAgentResponseWithFallback ??
|
|
28
29
|
generateStructuredAgentResponseWithFallback;
|
|
29
30
|
try {
|
|
31
|
+
const providers = options.providerSnapshotManager
|
|
32
|
+
? await resolveStructuredGenerationProviders({
|
|
33
|
+
cwd: options.cwd,
|
|
34
|
+
providerSnapshotManager: options.providerSnapshotManager,
|
|
35
|
+
daemonConfig: options.daemonConfig,
|
|
36
|
+
currentSelection: options.currentSelection,
|
|
37
|
+
})
|
|
38
|
+
: [];
|
|
30
39
|
const result = await generator({
|
|
31
40
|
manager: options.agentManager,
|
|
32
41
|
cwd: options.cwd,
|
|
@@ -37,7 +46,7 @@ export async function generateBranchNameFromFirstAgentContext(options) {
|
|
|
37
46
|
schema: BranchNameSchema,
|
|
38
47
|
schemaName: "BranchName",
|
|
39
48
|
maxRetries: 2,
|
|
40
|
-
providers
|
|
49
|
+
providers,
|
|
41
50
|
persistSession: false,
|
|
42
51
|
logger: options.logger,
|
|
43
52
|
agentConfigOverrides: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, PaseoConfigSchema, type PaseoConfig, type PaseoConfigRaw, } from "@getpaseo/protocol/paseo-config-schema";
|
|
2
2
|
import { type PaseoConfig } from "@getpaseo/protocol/paseo-config-schema";
|
|
3
|
-
export { slugify, validateBranchSlug } from "
|
|
3
|
+
export { slugify, validateBranchSlug } from "@getpaseo/protocol/branch-slug";
|
|
4
4
|
export interface WorktreeConfig {
|
|
5
5
|
branchName: string;
|
|
6
6
|
worktreePath: string;
|
|
@@ -16,8 +16,8 @@ import { spawnProcess } from "./spawn.js";
|
|
|
16
16
|
import { resolvePaseoHome } from "../server/paseo-home.js";
|
|
17
17
|
import { createExternalProcessEnv } from "../server/paseo-env.js";
|
|
18
18
|
import { parseGitRevParsePath, resolveGitRevParsePath } from "./git-rev-parse-path.js";
|
|
19
|
-
import { validateBranchSlug } from "
|
|
20
|
-
export { slugify, validateBranchSlug } from "
|
|
19
|
+
import { validateBranchSlug } from "@getpaseo/protocol/branch-slug";
|
|
20
|
+
export { slugify, validateBranchSlug } from "@getpaseo/protocol/branch-slug";
|
|
21
21
|
const execFileAsync = promisify(execFile);
|
|
22
22
|
const READ_ONLY_GIT_ENV = {
|
|
23
23
|
GIT_OPTIONAL_LOCKS: "0",
|
|
@@ -112,6 +112,18 @@ const FeatureVoiceModeSchema = z
|
|
|
112
112
|
.optional(),
|
|
113
113
|
})
|
|
114
114
|
.strict();
|
|
115
|
+
const StructuredGenerationProviderConfigSchema = z
|
|
116
|
+
.object({
|
|
117
|
+
provider: z.string().min(1),
|
|
118
|
+
model: z.string().min(1).optional(),
|
|
119
|
+
thinkingOptionId: z.string().min(1).optional(),
|
|
120
|
+
})
|
|
121
|
+
.strict();
|
|
122
|
+
const AgentMetadataGenerationSchema = z
|
|
123
|
+
.object({
|
|
124
|
+
providers: z.array(StructuredGenerationProviderConfigSchema).optional(),
|
|
125
|
+
})
|
|
126
|
+
.strict();
|
|
115
127
|
const BUILTIN_PROVIDER_IDS = ["claude", "codex", "copilot", "opencode", "pi"];
|
|
116
128
|
function isLegacyProviderEntry(value) {
|
|
117
129
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -203,6 +215,7 @@ export const PersistedConfigSchema = z
|
|
|
203
215
|
agents: z
|
|
204
216
|
.object({
|
|
205
217
|
providers: z.preprocess(normalizeAgentProviders, ProviderOverridesSchema).optional(),
|
|
218
|
+
metadataGeneration: AgentMetadataGenerationSchema.optional(),
|
|
206
219
|
})
|
|
207
220
|
.strict()
|
|
208
221
|
.optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.86",
|
|
4
4
|
"description": "Paseo backend server",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/server",
|
|
@@ -22,11 +22,6 @@
|
|
|
22
22
|
"types": "./dist/server/utils/tool-call-parsers.d.ts",
|
|
23
23
|
"source": "./src/utils/tool-call-parsers.ts",
|
|
24
24
|
"default": "./dist/server/utils/tool-call-parsers.js"
|
|
25
|
-
},
|
|
26
|
-
"./utils/branch-slug": {
|
|
27
|
-
"types": "./dist/server/utils/branch-slug.d.ts",
|
|
28
|
-
"source": "./src/utils/branch-slug.ts",
|
|
29
|
-
"default": "./dist/server/utils/branch-slug.js"
|
|
30
25
|
}
|
|
31
26
|
},
|
|
32
27
|
"publishConfig": {
|
|
@@ -62,10 +57,10 @@
|
|
|
62
57
|
"dependencies": {
|
|
63
58
|
"@agentclientprotocol/sdk": "^0.17.1",
|
|
64
59
|
"@anthropic-ai/claude-agent-sdk": "^0.2.133",
|
|
65
|
-
"@getpaseo/client": "0.1.
|
|
66
|
-
"@getpaseo/highlight": "0.1.
|
|
67
|
-
"@getpaseo/protocol": "0.1.
|
|
68
|
-
"@getpaseo/relay": "0.1.
|
|
60
|
+
"@getpaseo/client": "0.1.86",
|
|
61
|
+
"@getpaseo/highlight": "0.1.86",
|
|
62
|
+
"@getpaseo/protocol": "0.1.86",
|
|
63
|
+
"@getpaseo/relay": "0.1.86",
|
|
69
64
|
"@isaacs/ttlcache": "^2.1.4",
|
|
70
65
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
71
66
|
"@opencode-ai/sdk": "1.14.46",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate that a string is a valid git branch name slug.
|
|
3
|
-
* Must be lowercase alphanumeric with hyphens and forward slashes only.
|
|
4
|
-
*/
|
|
5
|
-
export declare function validateBranchSlug(slug: string): {
|
|
6
|
-
valid: boolean;
|
|
7
|
-
error?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const MAX_SLUG_LENGTH = 50;
|
|
10
|
-
/**
|
|
11
|
-
* Convert a string to kebab-case for branch names.
|
|
12
|
-
*/
|
|
13
|
-
export declare function slugify(input: string): string;
|
|
14
|
-
//# sourceMappingURL=branch-slug.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate that a string is a valid git branch name slug.
|
|
3
|
-
* Must be lowercase alphanumeric with hyphens and forward slashes only.
|
|
4
|
-
*/
|
|
5
|
-
export function validateBranchSlug(slug) {
|
|
6
|
-
if (!slug || slug.length === 0) {
|
|
7
|
-
return { valid: false, error: "Branch name cannot be empty" };
|
|
8
|
-
}
|
|
9
|
-
if (slug.length > 100) {
|
|
10
|
-
return { valid: false, error: "Branch name too long (max 100 characters)" };
|
|
11
|
-
}
|
|
12
|
-
const validPattern = /^[a-z0-9-/]+$/;
|
|
13
|
-
if (!validPattern.test(slug)) {
|
|
14
|
-
return {
|
|
15
|
-
valid: false,
|
|
16
|
-
error: "Branch name must contain only lowercase letters, numbers, hyphens, and forward slashes",
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
if (slug.startsWith("-") || slug.endsWith("-")) {
|
|
20
|
-
return {
|
|
21
|
-
valid: false,
|
|
22
|
-
error: "Branch name cannot start or end with a hyphen",
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
if (slug.includes("--")) {
|
|
26
|
-
return { valid: false, error: "Branch name cannot have consecutive hyphens" };
|
|
27
|
-
}
|
|
28
|
-
return { valid: true };
|
|
29
|
-
}
|
|
30
|
-
export const MAX_SLUG_LENGTH = 50;
|
|
31
|
-
/**
|
|
32
|
-
* Convert a string to kebab-case for branch names.
|
|
33
|
-
*/
|
|
34
|
-
export function slugify(input) {
|
|
35
|
-
const slug = input
|
|
36
|
-
.toLowerCase()
|
|
37
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
38
|
-
.replace(/^-+|-+$/g, "");
|
|
39
|
-
if (slug.length <= MAX_SLUG_LENGTH) {
|
|
40
|
-
return slug;
|
|
41
|
-
}
|
|
42
|
-
const truncated = slug.slice(0, MAX_SLUG_LENGTH);
|
|
43
|
-
const lastHyphen = truncated.lastIndexOf("-");
|
|
44
|
-
if (lastHyphen > MAX_SLUG_LENGTH / 2) {
|
|
45
|
-
return truncated.slice(0, lastHyphen);
|
|
46
|
-
}
|
|
47
|
-
return truncated.replace(/-+$/, "");
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=branch-slug.js.map
|