feat: Add complete Agentic Compaction & Pipeline System
- Context Compaction System with token counting and summarization - Deterministic State Machine for flow control (no LLM decisions) - Parallel Execution Engine (up to 12 concurrent sessions) - Event-Driven Coordination via Event Bus - Agent Workspace Isolation (tools, memory, identity, files) - YAML Workflow Integration (OpenClaw/Lobster compatible) - Claude Code integration layer - Complete demo UI with real-time visualization - Comprehensive documentation and README Components: - agent-system/: Context management, token counting, subagent spawning - pipeline-system/: State machine, parallel executor, event bus, workflows - skills/: AI capabilities (LLM, ASR, TTS, VLM, image generation, etc.) - src/app/: Next.js demo application Total: ~100KB of production-ready TypeScript code
This commit is contained in:
37
skills/web-reader/scripts/web-reader.ts
Executable file
37
skills/web-reader/scripts/web-reader.ts
Executable file
@@ -0,0 +1,37 @@
|
||||
import ZAI from 'z-ai-web-dev-sdk';
|
||||
|
||||
interface PageReaderFunctionResult {
|
||||
code: number;
|
||||
data: {
|
||||
html: string;
|
||||
publishedTime?: string;
|
||||
title: string;
|
||||
url: string;
|
||||
usage: {
|
||||
tokens: number;
|
||||
};
|
||||
};
|
||||
meta: {
|
||||
usage: {
|
||||
tokens: number;
|
||||
};
|
||||
};
|
||||
status: number;
|
||||
}
|
||||
|
||||
async function main(url: string) {
|
||||
try {
|
||||
const zai = await ZAI.create();
|
||||
|
||||
const results: PageReaderFunctionResult = await zai.functions.invoke('page_reader', {
|
||||
url: url
|
||||
});
|
||||
|
||||
console.log('Web reader invocation succeeded. Results:');
|
||||
console.log(JSON.stringify(results, null, 2));
|
||||
} catch (err: any) {
|
||||
console.error('page_reader failed:', err?.message || err);
|
||||
}
|
||||
}
|
||||
|
||||
main('https://www.google.com');
|
||||
Reference in New Issue
Block a user