@polpo-ai/core 0.3.2 → 0.3.4
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-prompt.d.ts +19 -0
- package/dist/agent-prompt.d.ts.map +1 -0
- package/dist/agent-prompt.js +76 -0
- package/dist/agent-prompt.js.map +1 -0
- package/dist/filesystem.d.ts +13 -2
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/model-spec.d.ts +30 -0
- package/dist/model-spec.d.ts.map +1 -0
- package/dist/model-spec.js +107 -0
- package/dist/model-spec.js.map +1 -0
- package/package.json +7 -6
- package/LICENSE +0 -21
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the identity/personality section of an agent's system prompt.
|
|
3
|
+
*
|
|
4
|
+
* Pure logic — no runtime dependencies (Node.js, pi-ai, filesystem).
|
|
5
|
+
* Used by both self-hosted (src/adapters/engine.ts) and cloud (handler.ts).
|
|
6
|
+
*
|
|
7
|
+
* This builds the "who you are" part of the prompt. Shell-specific concerns
|
|
8
|
+
* (skills, tool descriptions, cwd, sandbox paths) are appended by the caller.
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentConfig } from "./types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Build the core system prompt for an agent: preamble + identity + responsibilities +
|
|
13
|
+
* communication style + personality + hierarchy + custom systemPrompt.
|
|
14
|
+
*
|
|
15
|
+
* Does NOT include: skills, tool descriptions, cwd, output dir, sandbox paths.
|
|
16
|
+
* Those are shell-specific and appended by the caller.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildAgentSystemPrompt(agent: AgentConfig): string;
|
|
19
|
+
//# sourceMappingURL=agent-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../src/agent-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAkEjE"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the core system prompt for an agent: preamble + identity + responsibilities +
|
|
3
|
+
* communication style + personality + hierarchy + custom systemPrompt.
|
|
4
|
+
*
|
|
5
|
+
* Does NOT include: skills, tool descriptions, cwd, output dir, sandbox paths.
|
|
6
|
+
* Those are shell-specific and appended by the caller.
|
|
7
|
+
*/
|
|
8
|
+
export function buildAgentSystemPrompt(agent) {
|
|
9
|
+
const parts = [
|
|
10
|
+
`You are ${agent.name}, a ${agent.role ?? "helpful assistant"} managed by Polpo, an AI agent orchestrator.`,
|
|
11
|
+
"Complete your assigned task autonomously. Make reasonable decisions and proceed without asking questions.",
|
|
12
|
+
"",
|
|
13
|
+
"Your task description may include context tags:",
|
|
14
|
+
"- <shared-memory> — persistent shared knowledge from previous sessions, visible to all agents",
|
|
15
|
+
"- <agent-memory> — your private memory from previous sessions (specific to you)",
|
|
16
|
+
"- <system-context> — standing instructions from the project owner",
|
|
17
|
+
"- <plan-context> — the plan goal and other tasks being worked on in parallel",
|
|
18
|
+
"Use this context to make better decisions, but focus on YOUR assigned task.",
|
|
19
|
+
];
|
|
20
|
+
// Identity block
|
|
21
|
+
if (agent.identity) {
|
|
22
|
+
parts.push("", "## Your Identity");
|
|
23
|
+
if (agent.identity.displayName)
|
|
24
|
+
parts.push(`- Name: ${agent.identity.displayName}`);
|
|
25
|
+
if (agent.identity.title)
|
|
26
|
+
parts.push(`- Title: ${agent.identity.title}`);
|
|
27
|
+
if (agent.identity.company)
|
|
28
|
+
parts.push(`- Company: ${agent.identity.company}`);
|
|
29
|
+
if (agent.identity.email)
|
|
30
|
+
parts.push(`- Email: ${agent.identity.email}`);
|
|
31
|
+
if (agent.identity.bio)
|
|
32
|
+
parts.push(`- Bio: ${agent.identity.bio}`);
|
|
33
|
+
if (agent.identity.timezone)
|
|
34
|
+
parts.push(`- Timezone: ${agent.identity.timezone}`);
|
|
35
|
+
if (agent.identity.socials && Object.keys(agent.identity.socials).length > 0) {
|
|
36
|
+
const entries = Object.entries(agent.identity.socials).map(([k, v]) => `${k}: ${v}`).join(", ");
|
|
37
|
+
parts.push(`- Socials: ${entries}`);
|
|
38
|
+
}
|
|
39
|
+
parts.push("Use this identity when communicating externally (emails, messages, etc.).");
|
|
40
|
+
}
|
|
41
|
+
// Responsibilities
|
|
42
|
+
if (agent.identity?.responsibilities?.length) {
|
|
43
|
+
parts.push("", "## Your Responsibilities");
|
|
44
|
+
for (const r of agent.identity.responsibilities) {
|
|
45
|
+
if (typeof r === "string") {
|
|
46
|
+
parts.push(`- ${r}`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const prio = r.priority ? ` [${r.priority}]` : "";
|
|
50
|
+
parts.push(`- **${r.area}**${prio}: ${r.description}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
parts.push("Focus on these responsibilities. Escalate if something falls outside your scope.");
|
|
54
|
+
}
|
|
55
|
+
// Communication tone
|
|
56
|
+
if (agent.identity?.tone) {
|
|
57
|
+
parts.push("", "## Communication Style");
|
|
58
|
+
parts.push(agent.identity.tone);
|
|
59
|
+
}
|
|
60
|
+
// Personality
|
|
61
|
+
if (agent.identity?.personality) {
|
|
62
|
+
parts.push("", "## Personality");
|
|
63
|
+
parts.push(agent.identity.personality);
|
|
64
|
+
}
|
|
65
|
+
// Hierarchy
|
|
66
|
+
if (agent.reportsTo) {
|
|
67
|
+
parts.push("", "## Organization");
|
|
68
|
+
parts.push(`You report to: ${agent.reportsTo}`);
|
|
69
|
+
parts.push("If you encounter blockers or decisions outside your authority, escalate to your manager.");
|
|
70
|
+
}
|
|
71
|
+
// Custom system prompt
|
|
72
|
+
if (agent.systemPrompt)
|
|
73
|
+
parts.push("", agent.systemPrompt);
|
|
74
|
+
return parts.join("\n");
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=agent-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-prompt.js","sourceRoot":"","sources":["../src/agent-prompt.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkB;IACvD,MAAM,KAAK,GAAG;QACZ,WAAW,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,IAAI,mBAAmB,8CAA8C;QAC3G,2GAA2G;QAC3G,EAAE;QACF,iDAAiD;QACjD,+FAA+F;QAC/F,iFAAiF;QACjF,mEAAmE;QACnE,8EAA8E;QAC9E,6EAA6E;KAC9E,CAAC;IAEF,iBAAiB;IACjB,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;QACpF,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;QACzE,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,cAAc,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;QACzE,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG;YAAE,KAAK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,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;IACjG,CAAC;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,cAAc;IACd,IAAI,KAAK,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED,YAAY;IACZ,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,0FAA0F,CAAC,CAAC;IACzG,CAAC;IAED,uBAAuB;IACvB,IAAI,KAAK,CAAC,YAAY;QAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/filesystem.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FileSystem abstraction for agent tools.
|
|
2
|
+
* FileSystem abstraction for agent tools and server routes.
|
|
3
3
|
*
|
|
4
4
|
* Decouples tools from node:fs so they can work on any backend:
|
|
5
5
|
* - NodeFileSystem: node:fs (self-hosted, default)
|
|
@@ -14,8 +14,10 @@ export interface FileSystem {
|
|
|
14
14
|
writeFile(path: string, content: string): Promise<void>;
|
|
15
15
|
/** Check if a path exists. */
|
|
16
16
|
exists(path: string): Promise<boolean>;
|
|
17
|
-
/** List entries in a directory. */
|
|
17
|
+
/** List entries in a directory (names only). */
|
|
18
18
|
readdir(path: string): Promise<string[]>;
|
|
19
|
+
/** List entries in a directory with type metadata. */
|
|
20
|
+
readdirWithTypes?(path: string): Promise<FileEntry[]>;
|
|
19
21
|
/** Create a directory (recursive). */
|
|
20
22
|
mkdir(path: string): Promise<void>;
|
|
21
23
|
/** Delete a file or directory. */
|
|
@@ -24,6 +26,15 @@ export interface FileSystem {
|
|
|
24
26
|
stat(path: string): Promise<FileStat>;
|
|
25
27
|
/** Rename/move a file or directory. */
|
|
26
28
|
rename(oldPath: string, newPath: string): Promise<void>;
|
|
29
|
+
/** Read file as raw bytes (for binary files: images, PDFs, audio, etc.). */
|
|
30
|
+
readFileBuffer?(path: string): Promise<Uint8Array>;
|
|
31
|
+
/** Write raw bytes to a file (for uploads, binary content). */
|
|
32
|
+
writeFileBuffer?(path: string, data: Uint8Array): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface FileEntry {
|
|
35
|
+
name: string;
|
|
36
|
+
isDirectory: boolean;
|
|
37
|
+
isFile: boolean;
|
|
27
38
|
}
|
|
28
39
|
export interface FileStat {
|
|
29
40
|
size: number;
|
package/dist/filesystem.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAExC,8DAA8D;IAC9D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE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AEnD,+DAA+D;IAC/D,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB"}
|
package/dist/filesystem.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,12 @@ export type { TeamStore } from "./team-store.js";
|
|
|
18
18
|
export type { AgentStore } from "./agent-store.js";
|
|
19
19
|
export type { VaultStore } from "./vault-store.js";
|
|
20
20
|
export type { PlaybookStore } from "./playbook-store.js";
|
|
21
|
-
export type { FileSystem, FileStat } from "./filesystem.js";
|
|
21
|
+
export type { FileSystem, FileEntry, FileStat } from "./filesystem.js";
|
|
22
22
|
export type { Shell, ShellOptions, ShellResult } from "./shell.js";
|
|
23
23
|
export type { Spawner, SpawnResult } from "./spawner.js";
|
|
24
|
+
export { buildAgentSystemPrompt } from "./agent-prompt.js";
|
|
25
|
+
export { parseModelSpec, PROVIDER_ENV_MAP } from "./model-spec.js";
|
|
26
|
+
export type { ParsedModelSpec } from "./model-spec.js";
|
|
24
27
|
export type { EventBus } from "./event-bus.js";
|
|
25
28
|
export type { CheckpointStore, CheckpointState } from "./checkpoint-store.js";
|
|
26
29
|
export type { DelayStore, DelayState } from "./delay-store.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC;AAG5B,OAAO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AGxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EACV,sBAAsB,EACtB,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5N,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG/E,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,kBAAkB,IAAI,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC5I,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5H,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACzJ,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,10 @@ export * from "./schemas.js";
|
|
|
9
9
|
// ── Hooks ────────────────────────────────────────────────────────────────
|
|
10
10
|
export { HookRegistry } from "./hooks.js";
|
|
11
11
|
export { agentMemoryScope } from "./memory-store.js";
|
|
12
|
+
// ── Agent Prompt Builder ────────────────────────────────────────────────
|
|
13
|
+
export { buildAgentSystemPrompt } from "./agent-prompt.js";
|
|
14
|
+
// ── Model Spec Parsing ─────────────────────────────────────────────────
|
|
15
|
+
export { parseModelSpec, PROVIDER_ENV_MAP } from "./model-spec.js";
|
|
12
16
|
// ── Cron (pure) ─────────────────────────────────────────────────────────
|
|
13
17
|
export { parseCron, matchesCron, nextCronOccurrence, isCronExpression } from "./cron.js";
|
|
14
18
|
// ── Core Managers ───────────────────────────────────────────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAE3B,4EAA4E;AAC5E,cAAc,aAAa,CAAC;AAE5B,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,4EAA4E;AAC5E,cAAc,cAAc,CAAC;AAE7B,4EAA4E;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAE3B,4EAA4E;AAC5E,cAAc,aAAa,CAAC;AAE5B,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,4EAA4E;AAC5E,cAAc,cAAc,CAAC;AAE7B,4EAA4E;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkBrD,2EAA2E;AAC3E,OAAO,EAAE,sBAAsB,EAA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,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5H,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAA+B,MAAM,yBAAyB,CAAC;AACzJ,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAqB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model spec parsing — pure logic, no runtime dependencies.
|
|
3
|
+
*
|
|
4
|
+
* Parses "provider:model" or "provider/model" strings into { provider, modelId }.
|
|
5
|
+
* Auto-infers provider from well-known model prefixes.
|
|
6
|
+
* Used by both self-hosted (src/llm/pi-client.ts) and cloud (handler.ts).
|
|
7
|
+
*/
|
|
8
|
+
export interface ParsedModelSpec {
|
|
9
|
+
provider: string;
|
|
10
|
+
modelId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Parse a model spec string into { provider, modelId }.
|
|
14
|
+
*
|
|
15
|
+
* Supported formats:
|
|
16
|
+
* "provider:model" — explicit (e.g. "anthropic:claude-opus-4-6")
|
|
17
|
+
* "provider/model" — slash format (e.g. "anthropic/claude-opus-4-6")
|
|
18
|
+
* "model-id" — auto-inferred from prefix map
|
|
19
|
+
*
|
|
20
|
+
* @param spec - Model spec string. Falls back to `fallback` if not provided.
|
|
21
|
+
* @param fallback - Optional fallback spec (e.g. from env var or config).
|
|
22
|
+
* @throws If no spec is available or provider cannot be inferred.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseModelSpec(spec?: string, fallback?: string): ParsedModelSpec;
|
|
25
|
+
/**
|
|
26
|
+
* Map of known providers → environment variable name for API keys.
|
|
27
|
+
* Used by both self-hosted and cloud for BYOK resolution.
|
|
28
|
+
*/
|
|
29
|
+
export declare const PROVIDER_ENV_MAP: Record<string, string>;
|
|
30
|
+
//# sourceMappingURL=model-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-spec.d.ts","sourceRoot":"","sources":["../src/model-spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAuChF;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwBnD,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model spec parsing — pure logic, no runtime dependencies.
|
|
3
|
+
*
|
|
4
|
+
* Parses "provider:model" or "provider/model" strings into { provider, modelId }.
|
|
5
|
+
* Auto-infers provider from well-known model prefixes.
|
|
6
|
+
* Used by both self-hosted (src/llm/pi-client.ts) and cloud (handler.ts).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Well-known model prefixes → provider mapping.
|
|
10
|
+
* Used for auto-inference when the spec doesn't include "provider:".
|
|
11
|
+
*/
|
|
12
|
+
const PREFIX_MAP = [
|
|
13
|
+
// Anthropic
|
|
14
|
+
["claude-", "anthropic"],
|
|
15
|
+
// OpenAI
|
|
16
|
+
["gpt-", "openai"],
|
|
17
|
+
["o1-", "openai"],
|
|
18
|
+
["o3-", "openai"],
|
|
19
|
+
["o4-", "openai"],
|
|
20
|
+
["chatgpt-", "openai"],
|
|
21
|
+
["codex-", "openai"],
|
|
22
|
+
// Google
|
|
23
|
+
["gemini-", "google"],
|
|
24
|
+
// Mistral
|
|
25
|
+
["mistral-", "mistral"],
|
|
26
|
+
["codestral-", "mistral"],
|
|
27
|
+
["devstral-", "mistral"],
|
|
28
|
+
// Groq
|
|
29
|
+
["llama-", "groq"],
|
|
30
|
+
["llama3", "groq"],
|
|
31
|
+
// xAI
|
|
32
|
+
["grok-", "xai"],
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* Parse a model spec string into { provider, modelId }.
|
|
36
|
+
*
|
|
37
|
+
* Supported formats:
|
|
38
|
+
* "provider:model" — explicit (e.g. "anthropic:claude-opus-4-6")
|
|
39
|
+
* "provider/model" — slash format (e.g. "anthropic/claude-opus-4-6")
|
|
40
|
+
* "model-id" — auto-inferred from prefix map
|
|
41
|
+
*
|
|
42
|
+
* @param spec - Model spec string. Falls back to `fallback` if not provided.
|
|
43
|
+
* @param fallback - Optional fallback spec (e.g. from env var or config).
|
|
44
|
+
* @throws If no spec is available or provider cannot be inferred.
|
|
45
|
+
*/
|
|
46
|
+
export function parseModelSpec(spec, fallback) {
|
|
47
|
+
const s = spec || fallback;
|
|
48
|
+
if (!s) {
|
|
49
|
+
throw new Error('No model configured. Use "provider:model" format (e.g. "anthropic:claude-sonnet-4-5").');
|
|
50
|
+
}
|
|
51
|
+
// Explicit "provider:model" format
|
|
52
|
+
const colonIdx = s.indexOf(":");
|
|
53
|
+
if (colonIdx > 0) {
|
|
54
|
+
const provider = s.slice(0, colonIdx);
|
|
55
|
+
const modelId = s.slice(colonIdx + 1);
|
|
56
|
+
if (!provider.includes("/") && !provider.includes("\\")) {
|
|
57
|
+
return { provider, modelId };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Explicit "provider/model" format (OpenAI Gateway style)
|
|
61
|
+
const slashIdx = s.indexOf("/");
|
|
62
|
+
if (slashIdx > 0) {
|
|
63
|
+
const provider = s.slice(0, slashIdx);
|
|
64
|
+
const modelId = s.slice(slashIdx + 1);
|
|
65
|
+
if (!provider.includes(":") && !provider.includes("\\")) {
|
|
66
|
+
return { provider, modelId };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Auto-infer from prefix map
|
|
70
|
+
const lower = s.toLowerCase();
|
|
71
|
+
for (const [prefix, provider] of PREFIX_MAP) {
|
|
72
|
+
if (lower.startsWith(prefix)) {
|
|
73
|
+
return { provider, modelId: s };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
throw new Error(`Cannot infer provider for model "${s}". Use "provider:model" format (e.g. "anthropic:${s}").`);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Map of known providers → environment variable name for API keys.
|
|
80
|
+
* Used by both self-hosted and cloud for BYOK resolution.
|
|
81
|
+
*/
|
|
82
|
+
export const PROVIDER_ENV_MAP = {
|
|
83
|
+
openai: "OPENAI_API_KEY",
|
|
84
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
85
|
+
google: "GEMINI_API_KEY",
|
|
86
|
+
groq: "GROQ_API_KEY",
|
|
87
|
+
xai: "XAI_API_KEY",
|
|
88
|
+
openrouter: "OPENROUTER_API_KEY",
|
|
89
|
+
cerebras: "CEREBRAS_API_KEY",
|
|
90
|
+
mistral: "MISTRAL_API_KEY",
|
|
91
|
+
"vercel-ai-gateway": "AI_GATEWAY_API_KEY",
|
|
92
|
+
zai: "ZAI_API_KEY",
|
|
93
|
+
minimax: "MINIMAX_API_KEY",
|
|
94
|
+
"minimax-cn": "MINIMAX_CN_API_KEY",
|
|
95
|
+
huggingface: "HF_TOKEN",
|
|
96
|
+
opencode: "OPENCODE_API_KEY",
|
|
97
|
+
"opencode-go": "OPENCODE_API_KEY",
|
|
98
|
+
"kimi-coding": "KIMI_API_KEY",
|
|
99
|
+
"azure-openai-responses": "AZURE_OPENAI_API_KEY",
|
|
100
|
+
"github-copilot": "COPILOT_GITHUB_TOKEN",
|
|
101
|
+
"amazon-bedrock": "AWS_ACCESS_KEY_ID",
|
|
102
|
+
"google-vertex": "GOOGLE_CLOUD_PROJECT",
|
|
103
|
+
"openai-codex": "OPENAI_API_KEY",
|
|
104
|
+
"google-gemini-cli": "GEMINI_API_KEY",
|
|
105
|
+
"google-antigravity": "GEMINI_API_KEY",
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=model-spec.js.map
|
|
@@ -0,0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,aAAa;IAClB,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,iBAAiB;IAC1B,mBAAmB,EAAE,oBAAoB;IACzC,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,oBAAoB;IAClC,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,kBAAkB;IAC5B,aAAa,EAAE,kBAAkB;IACjC,aAAa,EAAE,cAAc;IAC7B,wBAAwB,EAAE,sBAAsB;IAChD,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,mBAAmB;IACrC,eAAe,EAAE,sBAAsB;IACvC,cAAc,EAAE,gBAAgB;IAChC,mBAAmB,EAAE,gBAAgB;IACrC,oBAAoB,EAAE,gBAAgB;CACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polpo-ai/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Pure business logic, types, schemas, and store interfaces for the Polpo AI agent orchestration platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -192,6 +192,11 @@
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
"sideEffects": false,
|
|
195
|
+
"scripts": {
|
|
196
|
+
"build": "tsc",
|
|
197
|
+
"dev": "tsc --watch",
|
|
198
|
+
"prepublishOnly": "tsc"
|
|
199
|
+
},
|
|
195
200
|
"dependencies": {
|
|
196
201
|
"nanoid": "^5.1.2",
|
|
197
202
|
"zod": "^4.3.6"
|
|
@@ -226,9 +231,5 @@
|
|
|
226
231
|
"homepage": "https://github.com/lumea-labs/polpo/tree/main/packages/core",
|
|
227
232
|
"bugs": {
|
|
228
233
|
"url": "https://github.com/lumea-labs/polpo/issues"
|
|
229
|
-
},
|
|
230
|
-
"scripts": {
|
|
231
|
-
"build": "tsc",
|
|
232
|
-
"dev": "tsc --watch"
|
|
233
234
|
}
|
|
234
|
-
}
|
|
235
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 OpenPolpo Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|