@blockrun/franklin 3.8.35 → 3.8.36
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/README.md +1 -1
- package/dist/agent/commands.js +1 -1
- package/dist/agent/compact.js +1 -1
- package/dist/agent/loop.js +19 -0
- package/dist/agent/optimize.js +1 -0
- package/dist/agent/permissions.js +10 -1
- package/dist/agent/tokens.js +4 -0
- package/dist/agent/types.d.ts +22 -1
- package/dist/commands/balance.js +1 -1
- package/dist/commands/daemon.js +23 -16
- package/dist/commands/plugin.d.ts +1 -1
- package/dist/commands/plugin.js +10 -10
- package/dist/commands/stats.d.ts +1 -1
- package/dist/commands/stats.js +2 -2
- package/dist/index.js +2 -2
- package/dist/panel/server.js +7 -6
- package/dist/plugin-sdk/index.d.ts +2 -2
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/plugin.d.ts +4 -4
- package/dist/plugins/registry.d.ts +3 -3
- package/dist/plugins/registry.js +6 -6
- package/dist/pricing.js +1 -0
- package/dist/proxy/server.js +5 -3
- package/dist/router/index.js +3 -3
- package/dist/session/storage.js +2 -2
- package/dist/tools/imagegen.d.ts +14 -0
- package/dist/tools/imagegen.js +154 -22
- package/dist/tools/read.js +29 -2
- package/dist/tools/videogen.d.ts +14 -3
- package/dist/tools/videogen.js +161 -28
- package/dist/tools/webhook.js +2 -1
- package/dist/trading/providers/coingecko/client.js +2 -1
- package/dist/ui/app.js +12 -12
- package/dist/ui/model-picker.js +7 -4
- package/dist/wallet/index.d.ts +17 -0
- package/dist/wallet/index.js +22 -0
- package/package.json +7 -5
package/dist/ui/app.js
CHANGED
|
@@ -509,7 +509,7 @@ function RunCodeApp({ initialModel, workDir, walletAddress, walletBalance, chain
|
|
|
509
509
|
}, []);
|
|
510
510
|
// Expose event handler, balance updater, and permission bridge
|
|
511
511
|
useEffect(() => {
|
|
512
|
-
globalThis.
|
|
512
|
+
globalThis.__franklin_ui = {
|
|
513
513
|
updateModel: (model) => { setCurrentModel(model); },
|
|
514
514
|
updateBalance: (bal) => {
|
|
515
515
|
setBalance(bal);
|
|
@@ -703,7 +703,7 @@ function RunCodeApp({ initialModel, workDir, walletAddress, walletBalance, chain
|
|
|
703
703
|
setQueuedInputs((prev) => prev.slice(1));
|
|
704
704
|
// Small delay so React can flush the ready=true state first
|
|
705
705
|
setTimeout(() => {
|
|
706
|
-
const fn = globalThis.
|
|
706
|
+
const fn = globalThis.__franklin_submit;
|
|
707
707
|
if (typeof fn === 'function')
|
|
708
708
|
fn(queued);
|
|
709
709
|
}, 50);
|
|
@@ -713,12 +713,12 @@ function RunCodeApp({ initialModel, workDir, walletAddress, walletBalance, chain
|
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
};
|
|
716
|
-
globalThis.
|
|
716
|
+
globalThis.__franklin_submit = (msg) => {
|
|
717
717
|
handleSubmit(msg);
|
|
718
718
|
};
|
|
719
719
|
return () => {
|
|
720
|
-
delete globalThis.
|
|
721
|
-
delete globalThis.
|
|
720
|
+
delete globalThis.__franklin_ui;
|
|
721
|
+
delete globalThis.__franklin_submit;
|
|
722
722
|
};
|
|
723
723
|
}, [handleSubmit, commitResponse, showStatus]);
|
|
724
724
|
// ── Render ──
|
|
@@ -781,7 +781,7 @@ export function launchInkUI(opts) {
|
|
|
781
781
|
let pendingInput = null; // Queue for inputs that arrive before waitForInput
|
|
782
782
|
let exiting = false;
|
|
783
783
|
let abortCallback = null;
|
|
784
|
-
const instance = render(_jsx(RunCodeApp, { initialModel: opts.model, workDir: opts.workDir, walletAddress: opts.walletAddress || 'not set — run:
|
|
784
|
+
const instance = render(_jsx(RunCodeApp, { initialModel: opts.model, workDir: opts.workDir, walletAddress: opts.walletAddress || 'not set — run: franklin setup', walletBalance: opts.walletBalance || 'unknown', chain: opts.chain || 'base', startWithPicker: opts.showPicker, onSubmit: (value) => {
|
|
785
785
|
if (resolveInput) {
|
|
786
786
|
resolveInput(value);
|
|
787
787
|
resolveInput = null;
|
|
@@ -799,19 +799,19 @@ export function launchInkUI(opts) {
|
|
|
799
799
|
} }));
|
|
800
800
|
return {
|
|
801
801
|
handleEvent: (event) => {
|
|
802
|
-
const ui = globalThis.
|
|
802
|
+
const ui = globalThis.__franklin_ui;
|
|
803
803
|
ui?.handleEvent(event);
|
|
804
804
|
},
|
|
805
805
|
updateModel: (model) => {
|
|
806
|
-
const ui = globalThis.
|
|
806
|
+
const ui = globalThis.__franklin_ui;
|
|
807
807
|
ui?.updateModel(model);
|
|
808
808
|
},
|
|
809
809
|
updateBalance: (bal) => {
|
|
810
|
-
const ui = globalThis.
|
|
810
|
+
const ui = globalThis.__franklin_ui;
|
|
811
811
|
ui?.updateBalance(bal);
|
|
812
812
|
},
|
|
813
813
|
onTurnDone: (cb) => {
|
|
814
|
-
const ui = globalThis.
|
|
814
|
+
const ui = globalThis.__franklin_ui;
|
|
815
815
|
ui?.onTurnDone(cb);
|
|
816
816
|
},
|
|
817
817
|
waitForInput: () => {
|
|
@@ -828,11 +828,11 @@ export function launchInkUI(opts) {
|
|
|
828
828
|
onAbort: (cb) => { abortCallback = cb; },
|
|
829
829
|
cleanup: () => { mouse.disable(); instance.unmount(); },
|
|
830
830
|
requestPermission: (toolName, description) => {
|
|
831
|
-
const ui = globalThis.
|
|
831
|
+
const ui = globalThis.__franklin_ui;
|
|
832
832
|
return ui?.requestPermission(toolName, description) ?? Promise.resolve('no');
|
|
833
833
|
},
|
|
834
834
|
requestAskUser: (question, options) => {
|
|
835
|
-
const ui = globalThis.
|
|
835
|
+
const ui = globalThis.__franklin_ui;
|
|
836
836
|
return ui?.requestAskUser(question, options) ?? Promise.resolve('(no response)');
|
|
837
837
|
},
|
|
838
838
|
};
|
package/dist/ui/model-picker.js
CHANGED
|
@@ -19,9 +19,11 @@ export const MODEL_SHORTCUTS = {
|
|
|
19
19
|
'opus-4.6': 'anthropic/claude-opus-4.6',
|
|
20
20
|
haiku: 'anthropic/claude-haiku-4.5-20251001',
|
|
21
21
|
// OpenAI
|
|
22
|
-
gpt
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
// `gpt` / `gpt5` / `gpt-5` follow the gateway's flagship — currently 5.5.
|
|
23
|
+
gpt: 'openai/gpt-5.5',
|
|
24
|
+
gpt5: 'openai/gpt-5.5',
|
|
25
|
+
'gpt-5': 'openai/gpt-5.5',
|
|
26
|
+
'gpt-5.5': 'openai/gpt-5.5',
|
|
25
27
|
'gpt-5.4': 'openai/gpt-5.4',
|
|
26
28
|
'gpt-5.4-pro': 'openai/gpt-5.4-pro',
|
|
27
29
|
'gpt-5.3': 'openai/gpt-5.3',
|
|
@@ -107,7 +109,8 @@ export const PICKER_CATEGORIES = [
|
|
|
107
109
|
{ id: 'anthropic/claude-opus-4.7', shortcut: 'opus', label: 'Claude Opus 4.7', price: '$5/$25', highlight: true },
|
|
108
110
|
{ id: 'anthropic/claude-sonnet-4.6', shortcut: 'sonnet', label: 'Claude Sonnet 4.6', price: '$3/$15' },
|
|
109
111
|
{ id: 'anthropic/claude-opus-4.6', shortcut: 'opus-4.6', label: 'Claude Opus 4.6', price: '$5/$25' },
|
|
110
|
-
{ id: 'openai/gpt-5.
|
|
112
|
+
{ id: 'openai/gpt-5.5', shortcut: 'gpt', label: 'GPT-5.5', price: '$5/$30', highlight: true },
|
|
113
|
+
{ id: 'openai/gpt-5.4', shortcut: 'gpt-5.4', label: 'GPT-5.4', price: '$2.5/$15' },
|
|
111
114
|
{ id: 'openai/gpt-5.4-pro', shortcut: 'gpt-5.4-pro', label: 'GPT-5.4 Pro', price: '$30/$180' },
|
|
112
115
|
{ id: 'google/gemini-2.5-pro', shortcut: 'gemini', label: 'Gemini 2.5 Pro', price: '$1.25/$10' },
|
|
113
116
|
{ id: 'google/gemini-3.1-pro', shortcut: 'gemini-3', label: 'Gemini 3.1 Pro', price: '$2/$12' },
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public wallet surface for `@blockrun/franklin/wallet`.
|
|
3
|
+
*
|
|
4
|
+
* Thin pass-through over Franklin's wallet/manager helpers plus the
|
|
5
|
+
* lower-level primitives from `@blockrun/llm` that downstream code
|
|
6
|
+
* typically needs (setup, address, load/save, funding messages, types).
|
|
7
|
+
*
|
|
8
|
+
* Modelled after the flat wallet surface in `@blockrun/clawrouter` —
|
|
9
|
+
* but exposed under a subpath because Franklin's `.` entry is a CLI
|
|
10
|
+
* (side-effectful shebang) and can't double as a library.
|
|
11
|
+
*/
|
|
12
|
+
export { walletExists, setupWallet, setupSolanaWallet, getAddress, } from './manager.js';
|
|
13
|
+
export { getOrCreateWallet, getOrCreateSolanaWallet, setupAgentWallet, setupAgentSolanaWallet, createWallet, createSolanaWallet, } from '@blockrun/llm';
|
|
14
|
+
export { getWalletAddress, scanWallets, scanSolanaWallets, loadWallet, loadSolanaWallet, saveWallet, saveSolanaWallet, } from '@blockrun/llm';
|
|
15
|
+
export { formatWalletCreatedMessage, formatNeedsFundingMessage, formatFundingMessageCompact, getEip681Uri, getPaymentLinks, } from '@blockrun/llm';
|
|
16
|
+
export { WALLET_DIR_PATH, WALLET_FILE_PATH, SOLANA_WALLET_FILE_PATH, } from '@blockrun/llm';
|
|
17
|
+
export type { WalletInfo, SolanaWalletInfo, PaymentLinks, } from '@blockrun/llm';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public wallet surface for `@blockrun/franklin/wallet`.
|
|
3
|
+
*
|
|
4
|
+
* Thin pass-through over Franklin's wallet/manager helpers plus the
|
|
5
|
+
* lower-level primitives from `@blockrun/llm` that downstream code
|
|
6
|
+
* typically needs (setup, address, load/save, funding messages, types).
|
|
7
|
+
*
|
|
8
|
+
* Modelled after the flat wallet surface in `@blockrun/clawrouter` —
|
|
9
|
+
* but exposed under a subpath because Franklin's `.` entry is a CLI
|
|
10
|
+
* (side-effectful shebang) and can't double as a library.
|
|
11
|
+
*/
|
|
12
|
+
export { walletExists, setupWallet, setupSolanaWallet, getAddress, } from './manager.js';
|
|
13
|
+
// ─── Re-exports from @blockrun/llm ────────────────────────────────────────
|
|
14
|
+
// So callers only need one import: `@blockrun/franklin/wallet`.
|
|
15
|
+
// Setup / create
|
|
16
|
+
export { getOrCreateWallet, getOrCreateSolanaWallet, setupAgentWallet, setupAgentSolanaWallet, createWallet, createSolanaWallet, } from '@blockrun/llm';
|
|
17
|
+
// Query / load / save
|
|
18
|
+
export { getWalletAddress, scanWallets, scanSolanaWallets, loadWallet, loadSolanaWallet, saveWallet, saveSolanaWallet, } from '@blockrun/llm';
|
|
19
|
+
// Funding / payment link helpers
|
|
20
|
+
export { formatWalletCreatedMessage, formatNeedsFundingMessage, formatFundingMessageCompact, getEip681Uri, getPaymentLinks, } from '@blockrun/llm';
|
|
21
|
+
// File-system paths (useful for dotfiles / migration scripts)
|
|
22
|
+
export { WALLET_DIR_PATH, WALLET_FILE_PATH, SOLANA_WALLET_FILE_PATH, } from '@blockrun/llm';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/franklin",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.36",
|
|
4
4
|
"description": "Franklin — The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
"types": "./dist/plugin-sdk/index.d.ts",
|
|
13
13
|
"default": "./dist/plugin-sdk/index.js"
|
|
14
14
|
},
|
|
15
|
+
"./wallet": {
|
|
16
|
+
"types": "./dist/wallet/index.d.ts",
|
|
17
|
+
"default": "./dist/wallet/index.js"
|
|
18
|
+
},
|
|
15
19
|
"./package.json": "./package.json"
|
|
16
20
|
},
|
|
17
21
|
"bin": {
|
|
18
|
-
"franklin": "dist/index.js"
|
|
19
|
-
"runcode": "dist/index.js"
|
|
22
|
+
"franklin": "dist/index.js"
|
|
20
23
|
},
|
|
21
24
|
"files": [
|
|
22
25
|
"dist",
|
|
@@ -47,8 +50,7 @@
|
|
|
47
50
|
"ai-marketing",
|
|
48
51
|
"ai-trading",
|
|
49
52
|
"crypto-native",
|
|
50
|
-
"blockrun"
|
|
51
|
-
"runcode"
|
|
53
|
+
"blockrun"
|
|
52
54
|
],
|
|
53
55
|
"license": "Apache-2.0",
|
|
54
56
|
"repository": {
|