@ftai/plugin-host-api 0.0.0-stage → 2.3.0
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/LICENSE +21 -0
- package/README.md +4 -2
- package/lib/attachments.d.ts +149 -0
- package/lib/attachments.js +26 -0
- package/lib/capabilities.d.ts +99 -0
- package/lib/capabilities.js +21 -0
- package/lib/cmdline.d.ts +52 -0
- package/lib/cmdline.js +68 -0
- package/lib/credentials.d.ts +92 -0
- package/lib/credentials.js +41 -0
- package/lib/fs.d.ts +117 -0
- package/lib/fs.js +14 -0
- package/lib/generated.d.ts +4198 -0
- package/lib/generated.js +80 -0
- package/lib/index.d.ts +665 -0
- package/lib/index.js +151 -0
- package/lib/jobs.d.ts +88 -0
- package/lib/jobs.js +2 -0
- package/lib/llm.d.ts +255 -0
- package/lib/llm.js +144 -0
- package/lib/local-install.d.ts +38 -0
- package/lib/local-install.js +9 -0
- package/lib/permissions.d.ts +97 -0
- package/lib/permissions.js +11 -0
- package/lib/platform.d.ts +167 -0
- package/lib/platform.js +74 -0
- package/lib/porting.d.ts +51 -0
- package/lib/porting.js +752 -0
- package/lib/prompt.d.ts +117 -0
- package/lib/prompt.js +43 -0
- package/lib/runtime-context.d.ts +29 -0
- package/lib/runtime-context.js +6 -0
- package/lib/schedule-types.d.ts +333 -0
- package/lib/schedule-types.js +4 -0
- package/lib/session-events.d.ts +194 -0
- package/lib/session-events.js +2 -0
- package/lib/sessions.d.ts +246 -0
- package/lib/sessions.js +2 -0
- package/lib/settings.d.ts +86 -0
- package/lib/settings.js +13 -0
- package/lib/storage.d.ts +144 -0
- package/lib/storage.js +62 -0
- package/lib/subagents.d.ts +57 -0
- package/lib/subagents.js +17 -0
- package/lib/subprocess.d.ts +97 -0
- package/lib/subprocess.js +8 -0
- package/lib/tools.d.ts +212 -0
- package/lib/tools.js +2 -0
- package/lib/web.d.ts +192 -0
- package/lib/web.js +53 -0
- package/package.json +40 -3
package/lib/generated.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// 由 apps/rust-host/crates/ext 的扩展点表生成,不要手改:改表之后运行
|
|
2
|
+
// UPDATE_GENERATED=1 cargo test --manifest-path apps/rust-host/Cargo.toml -p ftai-ext
|
|
3
|
+
/** 扩展点名 → 交互方式与 SDK 是否另包一层,运行时按它把监听转发给宿主。 */
|
|
4
|
+
export const HOST_POINTS = {
|
|
5
|
+
'tools/pre-execute': { kind: 'waterfall', wrapped: true },
|
|
6
|
+
'tools/execute': { kind: 'waterfall', wrapped: true },
|
|
7
|
+
'tools/post-execute': { kind: 'waterfall', wrapped: true },
|
|
8
|
+
'tools/result': { kind: 'observe', wrapped: true },
|
|
9
|
+
'tools/change': { kind: 'observe', wrapped: false },
|
|
10
|
+
'agent/created': { kind: 'wait', wrapped: true },
|
|
11
|
+
'agent/assistant-stream': { kind: 'observe', wrapped: true },
|
|
12
|
+
'session/event': { kind: 'observe', wrapped: true },
|
|
13
|
+
'session/created': { kind: 'observe', wrapped: true },
|
|
14
|
+
'session/disposed': { kind: 'observe', wrapped: true },
|
|
15
|
+
'session/flush': { kind: 'wait', wrapped: true },
|
|
16
|
+
'agent/disposed': { kind: 'observe', wrapped: true },
|
|
17
|
+
'agent/status': { kind: 'observe', wrapped: true },
|
|
18
|
+
'agent/error': { kind: 'observe', wrapped: true },
|
|
19
|
+
'agent/inbox/inserted': { kind: 'observe', wrapped: true },
|
|
20
|
+
'agent/inbox/claimed': { kind: 'observe', wrapped: true },
|
|
21
|
+
'agent/inbox/discarded': { kind: 'observe', wrapped: true },
|
|
22
|
+
'agent/pre-step': { kind: 'waterfall', wrapped: true },
|
|
23
|
+
'agent/request': { kind: 'waterfall', wrapped: true },
|
|
24
|
+
'agent/request-error': { kind: 'waterfall', wrapped: true },
|
|
25
|
+
'system-prompt/assemble': { kind: 'waterfall', wrapped: true },
|
|
26
|
+
'system-prompt/change': { kind: 'observe', wrapped: false },
|
|
27
|
+
'llm/stream': { kind: 'stream', wrapped: true },
|
|
28
|
+
'llm/adapters-updated': { kind: 'observe', wrapped: false },
|
|
29
|
+
'agent/turn-stopping': { kind: 'wait', wrapped: true },
|
|
30
|
+
'fs/write-intent': { kind: 'waterfall', wrapped: true },
|
|
31
|
+
'fs/edit-intent': { kind: 'waterfall', wrapped: true },
|
|
32
|
+
'fs/observed': { kind: 'observe', wrapped: true },
|
|
33
|
+
'workspace/session-activity': { kind: 'waterfall', wrapped: false },
|
|
34
|
+
'workspace/session-stop': { kind: 'wait', wrapped: false },
|
|
35
|
+
'goal/changed': { kind: 'observe', wrapped: false },
|
|
36
|
+
'goal/activation-changed': { kind: 'observe', wrapped: false },
|
|
37
|
+
'schedule/changed': { kind: 'observe', wrapped: false },
|
|
38
|
+
'compaction/summary-error': { kind: 'waterfall', wrapped: false },
|
|
39
|
+
'subagent/start': { kind: 'observe', wrapped: false },
|
|
40
|
+
'subagent/end': { kind: 'observe', wrapped: false },
|
|
41
|
+
'user-questions/request': { kind: 'waterfall', wrapped: true },
|
|
42
|
+
'skills/change': { kind: 'observe', wrapped: false },
|
|
43
|
+
'commands/change': { kind: 'observe', wrapped: false },
|
|
44
|
+
'approval/request': { kind: 'waterfall', wrapped: true },
|
|
45
|
+
'permission-presets/catalog-changed': { kind: 'observe', wrapped: false },
|
|
46
|
+
};
|
|
47
|
+
/** 服务名 → SDK 是否另包一层、各方法的交互方式;运行时据此建代理与路由。 */
|
|
48
|
+
export const HOST_SERVICES = {
|
|
49
|
+
'tools': { wrapped: true, methods: { 'register': 'register', 'restrict': 'register', 'guard': 'register', 'get': 'call', 'schemas': 'call', 'executionMode': 'call', 'execute': 'call' } },
|
|
50
|
+
'systemPrompt': { wrapped: true, methods: { 'section': 'register', 'context': 'register', 'suppressRuntimeContext': 'register', 'tools': 'register', 'variable': 'register', 'assemble': 'call', 'refreshContext': 'call' } },
|
|
51
|
+
'pluginRemote': { wrapped: true, methods: { 'mount': 'register' } },
|
|
52
|
+
'sessions': { wrapped: true, methods: { 'appendPluginRecord': 'call', 'events': 'call', 'header': 'call', 'surface': 'call', 'seq': 'call', 'prepare': 'call', 'enter': 'call', 'announce': 'call', 'release': 'call', 'fork': 'call', 'flush': 'call', 'lifecycle': 'call', 'append': 'call', 'requestHeader': 'call', 'requestContext': 'call', 'deriveMessages': 'call', 'deriveEventMessage': 'call', 'registerMessageProjection': 'register' } },
|
|
53
|
+
'agents': { wrapped: true, methods: { 'create': 'call', 'resume': 'call', 'dispose': 'call', 'list': 'call', 'roots': 'call', 'isOwnedBy': 'call' } },
|
|
54
|
+
'turn': { wrapped: true, methods: { 'send': 'call', 'cancel': 'call', 'status': 'call', 'whenIdle': 'call', 'options': 'call', 'inbox': 'call', 'spliceInbox': 'call', 'removeFromInbox': 'call', 'replaceInInbox': 'call', 'clearInbox': 'call', 'maintain': 'stream' } },
|
|
55
|
+
'agentDefaultModel': { wrapped: false, methods: { 'currentSelection': 'call', 'saveSelection': 'call' } },
|
|
56
|
+
'fs': { wrapped: true, methods: { 'resolve': 'call', 'stat': 'call', 'readBytes': 'call', 'writeBytes': 'call', 'lstat': 'call', 'readText': 'call', 'readTextChunk': 'call', 'readByteRange': 'call', 'listDir': 'call', 'editText': 'call' } },
|
|
57
|
+
'fsWatch': { wrapped: true, methods: { 'watch': 'stream' } },
|
|
58
|
+
'attachments': { wrapped: true, methods: { 'imageLimits': 'call', 'validateImage': 'call', 'saveImages': 'call', 'saveImage': 'call', 'readImage': 'call', 'imageHostPath': 'call', 'readImageRequest': 'call', 'saveFile': 'call', 'uploadFile': 'stream', 'appendFile': 'call', 'finishFile': 'call', 'readFileChunk': 'call', 'fileHostPath': 'call' } },
|
|
59
|
+
'llm': { wrapped: true, methods: { 'registerRoute': 'register', 'registerAdapter': 'register', 'replaceAdapterRoutes': 'call', 'listProviders': 'call', 'listModels': 'call', 'registerConfigurableProviders': 'register', 'replaceConfigurableProviders': 'call', 'listConfigurableProviders': 'call', 'registerModelDiscovery': 'register', 'discoverModels': 'call', 'providerRetryPolicy': 'call', 'imageRequestPricing': 'call', 'fileRequestText': 'call', 'resolveCallConfig': 'call', 'bindCall': 'call', 'configureBoundCall': 'call', 'streamPrepared': 'stream', 'resolveModelInfo': 'call', 'stream': 'stream' } },
|
|
60
|
+
'approval': { wrapped: true, methods: { 'config': 'call', 'overrideOf': 'call', 'setPolicy': 'call', 'request': 'call' } },
|
|
61
|
+
'workingDirectory': { wrapped: false, methods: { 'get': 'call', 'ensure': 'call', 'set': 'call', 'defaultDirectory': 'call' } },
|
|
62
|
+
'workspaceRegistry': { wrapped: true, methods: { 'create': 'call', 'get': 'call', 'list': 'call', 'delete': 'call', 'insertBefore': 'call', 'archiveSession': 'call', 'unarchiveSession': 'call', 'pinSession': 'call', 'unpinSession': 'call', 'resolveByPath': 'call', 'archivedSessionIds': 'call', 'pinnedSessionIds': 'call' } },
|
|
63
|
+
'goals': { wrapped: true, methods: { 'get': 'call', 'create': 'call', 'edit': 'call', 'pause': 'call', 'resume': 'call', 'complete': 'call', 'block': 'call', 'clear': 'call', 'disarm': 'call' } },
|
|
64
|
+
'schedule': { wrapped: true, methods: { 'create': 'call', 'list': 'call', 'catalog': 'call', 'history': 'call', 'delete': 'call', 'update': 'call' } },
|
|
65
|
+
'compaction': { wrapped: true, methods: { 'compactNow': 'call', 'compactIfNeeded': 'call' } },
|
|
66
|
+
'subagents': { wrapped: true, methods: { 'list': 'call', 'startActivation': 'stream', 'disposeActivation': 'call', 'sendMessage': 'call', 'interrupt': 'call', 'listChildren': 'call', 'listDescendants': 'call', 'waitForChildren': 'call' } },
|
|
67
|
+
'jobs': { wrapped: true, methods: { 'start': 'stream', 'commit': 'call', 'append': 'call', 'updateProgress': 'call', 'reportSpill': 'call', 'finish': 'call', 'list': 'call', 'get': 'call', 'read': 'call', 'readAt': 'call', 'kill': 'call', 'wait': 'call', 'remove': 'call', 'events': 'stream' } },
|
|
68
|
+
'userQuestions': { wrapped: true, methods: { 'ask': 'stream', 'answer': 'call' } },
|
|
69
|
+
'web': { wrapped: true, methods: { 'fetch': 'call' } },
|
|
70
|
+
'webSearch': { wrapped: true, methods: { 'search': 'call' } },
|
|
71
|
+
'skills': { wrapped: true, methods: { 'list': 'call', 'snapshot': 'call', 'get': 'call', 'register': 'register' } },
|
|
72
|
+
'commands': { wrapped: true, methods: { 'register': 'register', 'list': 'call', 'find': 'call', 'execute': 'call' } },
|
|
73
|
+
'permissionPresets': { wrapped: false, methods: { 'names': 'call', 'catalog': 'call', 'defaultPreset': 'call', 'current': 'call', 'resolve': 'call', 'optionOf': 'call', 'set': 'call' } },
|
|
74
|
+
'sandboxPolicy': { wrapped: true, methods: { 'resolve': 'call', 'overrideOf': 'call', 'defaultMode': 'call', 'workspaceRoot': 'call' } },
|
|
75
|
+
'sandbox': { wrapped: true, methods: { 'confine': 'call' } },
|
|
76
|
+
'shell': { wrapped: true, methods: { 'resolve': 'call', 'execute': 'stream', 'readOutput': 'call', 'kill': 'call' } },
|
|
77
|
+
'credentials': { wrapped: true, methods: { 'resolve': 'call', 'describe': 'call', 'set': 'call', 'unset': 'call', 'readRecord': 'call', 'describeRecord': 'call', 'listRecords': 'call', 'modifyRecord': 'stream', 'commitRecord': 'call', 'deleteRecord': 'call', 'updates': 'stream' } },
|
|
78
|
+
'loader': { wrapped: false, methods: { 'list': 'call', 'setEnabled': 'call' } },
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=generated.js.map
|