stelo 1.0.1
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 +184 -0
- package/README.md +853 -0
- package/dist/accessibility.d.ts +227 -0
- package/dist/accessibility.d.ts.map +1 -0
- package/dist/accessibility.js +602 -0
- package/dist/accessibility.js.map +1 -0
- package/dist/agent.d.ts +870 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +1107 -0
- package/dist/agent.js.map +1 -0
- package/dist/audio-stream.d.ts +114 -0
- package/dist/audio-stream.d.ts.map +1 -0
- package/dist/audio-stream.js +167 -0
- package/dist/audio-stream.js.map +1 -0
- package/dist/clipboard.d.ts +99 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +352 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/config.d.ts +183 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +477 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +213 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +387 -0
- package/dist/context.js.map +1 -0
- package/dist/cortex.d.ts +548 -0
- package/dist/cortex.d.ts.map +1 -0
- package/dist/cortex.js +1479 -0
- package/dist/cortex.js.map +1 -0
- package/dist/errors.d.ts +133 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +278 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +227 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +429 -0
- package/dist/events.js.map +1 -0
- package/dist/executor.d.ts +212 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +545 -0
- package/dist/executor.js.map +1 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/integration.d.ts +159 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +533 -0
- package/dist/integration.js.map +1 -0
- package/dist/keyboard.d.ts +276 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +404 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/logger.d.ts +198 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +516 -0
- package/dist/logger.js.map +1 -0
- package/dist/middleware.d.ts +183 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +493 -0
- package/dist/middleware.js.map +1 -0
- package/dist/monitor.d.ts +136 -0
- package/dist/monitor.d.ts.map +1 -0
- package/dist/monitor.js +341 -0
- package/dist/monitor.js.map +1 -0
- package/dist/mouse.d.ts +290 -0
- package/dist/mouse.d.ts.map +1 -0
- package/dist/mouse.js +466 -0
- package/dist/mouse.js.map +1 -0
- package/dist/plugin.d.ts +157 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +409 -0
- package/dist/plugin.js.map +1 -0
- package/dist/process.d.ts +106 -0
- package/dist/process.d.ts.map +1 -0
- package/dist/process.js +326 -0
- package/dist/process.js.map +1 -0
- package/dist/recorder.d.ts +100 -0
- package/dist/recorder.d.ts.map +1 -0
- package/dist/recorder.js +258 -0
- package/dist/recorder.js.map +1 -0
- package/dist/safety.d.ts +59 -0
- package/dist/safety.d.ts.map +1 -0
- package/dist/safety.js +98 -0
- package/dist/safety.js.map +1 -0
- package/dist/scheduler.d.ts +152 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +615 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/screen.d.ts +96 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +154 -0
- package/dist/screen.js.map +1 -0
- package/dist/session.d.ts +209 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +479 -0
- package/dist/session.js.map +1 -0
- package/dist/stream.d.ts +168 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +298 -0
- package/dist/stream.js.map +1 -0
- package/dist/telemetry.d.ts +223 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +433 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types.d.ts +165 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/bezier.d.ts +51 -0
- package/dist/utils/bezier.d.ts.map +1 -0
- package/dist/utils/bezier.js +117 -0
- package/dist/utils/bezier.js.map +1 -0
- package/dist/utils/helpers.d.ts +90 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +143 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/validation.d.ts +254 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +478 -0
- package/dist/validation.js.map +1 -0
- package/dist/vision.d.ts +719 -0
- package/dist/vision.d.ts.map +1 -0
- package/dist/vision.js +1197 -0
- package/dist/vision.js.map +1 -0
- package/dist/window.d.ts +80 -0
- package/dist/window.d.ts.map +1 -0
- package/dist/window.js +170 -0
- package/dist/window.js.map +1 -0
- package/dist/workflow.d.ts +224 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +578 -0
- package/dist/workflow.js.map +1 -0
- package/index.d.ts +840 -0
- package/index.js +495 -0
- package/package.json +91 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Stelo — The Most Advanced Universal Automation Framework
|
|
4
|
+
// ============================================================================
|
|
5
|
+
//
|
|
6
|
+
// ▄▄▄ ██ ██ ██ ███████
|
|
7
|
+
// ██ ██ ██ ██ ██ ██
|
|
8
|
+
// ███████ ████ ██ ███████
|
|
9
|
+
// ██ ██ ██ ██ ██ ██
|
|
10
|
+
// ██ ██ ██ ██ ██ ███████
|
|
11
|
+
//
|
|
12
|
+
// Cross-platform mouse, keyboard, screen, window automation
|
|
13
|
+
// Built with Rust + napi-rs for native performance
|
|
14
|
+
//
|
|
15
|
+
// ============================================================================
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RecoveryHints = exports.retryWithBackoff = exports.withErrorHandlingSync = exports.withErrorHandling = exports.wrapError = exports.ErrorCode = exports.SteloError = exports.unwrap = exports.err = exports.ok = exports.ValidationError = exports.RateLimiter = exports.security = exports.validate = exports.getCircuitBreakers = exports.CircuitBreaker = exports.telemetry = exports.customProvider = exports.openAIRealtimeProvider = exports.geminiLiveProvider = exports.createCortex = exports.Cortex = exports.waitForHotkey = exports.onHotkey = exports.onRegionChange = exports.watchRegion = exports.waitForTextAndClick = exports.waitForText = exports.clickText = exports.findText = exports.ocr = exports.interleave = exports.nativeParallel = exports.createCursorStream = exports.parallel = exports.sequence = exports.ActionSequence = exports.agent = exports.createAgentVision = exports.AgentVision = exports.vision = exports.audioStream = exports.stream = exports.safety = exports.recorder = exports.window = exports.appWindow = exports.screen = exports.keyboard = exports.mouse = void 0;
|
|
18
|
+
exports.batch = exports.waitUntil = exports.retry = exports.delay = exports.bezier = exports.integration = exports.plugin = exports.session = exports.scheduler = exports.accessibility = exports.monitor = exports.process_manager = exports.clipboard = exports.workflow = exports.transformMiddleware = exports.retryMiddleware = exports.loggingMiddleware = exports.cooldownPolicy = exports.ratePolicy = exports.boundaryPolicy = exports.middleware = exports.background = exports.urgent = exports.enqueue = exports.createExecutor = exports.getDefaultExecutor = exports.Executor = exports.context = exports.config = exports.ChildLogger = exports.SpanContext = exports.TraceContext = exports.CallbackTransport = exports.MemoryTransport = exports.ConsoleTransport = exports.logger = exports.events = void 0;
|
|
19
|
+
exports.getPlatform = getPlatform;
|
|
20
|
+
exports.getVersion = getVersion;
|
|
21
|
+
exports.getNativeBindings = getNativeBindings;
|
|
22
|
+
// ── Core Modules ──────────────────────────────────────────────────────────────
|
|
23
|
+
var mouse_1 = require("./mouse");
|
|
24
|
+
Object.defineProperty(exports, "mouse", { enumerable: true, get: function () { return mouse_1.mouse; } });
|
|
25
|
+
var keyboard_1 = require("./keyboard");
|
|
26
|
+
Object.defineProperty(exports, "keyboard", { enumerable: true, get: function () { return keyboard_1.keyboard; } });
|
|
27
|
+
var screen_1 = require("./screen");
|
|
28
|
+
Object.defineProperty(exports, "screen", { enumerable: true, get: function () { return screen_1.screen; } });
|
|
29
|
+
var window_1 = require("./window");
|
|
30
|
+
Object.defineProperty(exports, "appWindow", { enumerable: true, get: function () { return window_1.appWindow; } });
|
|
31
|
+
Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.appWindow; } });
|
|
32
|
+
var recorder_1 = require("./recorder");
|
|
33
|
+
Object.defineProperty(exports, "recorder", { enumerable: true, get: function () { return recorder_1.recorder; } });
|
|
34
|
+
var safety_1 = require("./safety");
|
|
35
|
+
Object.defineProperty(exports, "safety", { enumerable: true, get: function () { return safety_1.safety; } });
|
|
36
|
+
var stream_1 = require("./stream");
|
|
37
|
+
Object.defineProperty(exports, "stream", { enumerable: true, get: function () { return stream_1.stream; } });
|
|
38
|
+
var audio_stream_1 = require("./audio-stream");
|
|
39
|
+
Object.defineProperty(exports, "audioStream", { enumerable: true, get: function () { return audio_stream_1.audioStream; } });
|
|
40
|
+
// ── Vision & Agent Primitives ─────────────────────────────────────────────────
|
|
41
|
+
var vision_1 = require("./vision");
|
|
42
|
+
Object.defineProperty(exports, "vision", { enumerable: true, get: function () { return vision_1.vision; } });
|
|
43
|
+
Object.defineProperty(exports, "AgentVision", { enumerable: true, get: function () { return vision_1.AgentVision; } });
|
|
44
|
+
Object.defineProperty(exports, "createAgentVision", { enumerable: true, get: function () { return vision_1.createAgentVision; } });
|
|
45
|
+
var agent_1 = require("./agent");
|
|
46
|
+
Object.defineProperty(exports, "agent", { enumerable: true, get: function () { return agent_1.agent; } });
|
|
47
|
+
Object.defineProperty(exports, "ActionSequence", { enumerable: true, get: function () { return agent_1.ActionSequence; } });
|
|
48
|
+
Object.defineProperty(exports, "sequence", { enumerable: true, get: function () { return agent_1.sequence; } });
|
|
49
|
+
Object.defineProperty(exports, "parallel", { enumerable: true, get: function () { return agent_1.parallel; } });
|
|
50
|
+
Object.defineProperty(exports, "createCursorStream", { enumerable: true, get: function () { return agent_1.createCursorStream; } });
|
|
51
|
+
Object.defineProperty(exports, "nativeParallel", { enumerable: true, get: function () { return agent_1.nativeParallel; } });
|
|
52
|
+
Object.defineProperty(exports, "interleave", { enumerable: true, get: function () { return agent_1.interleave; } });
|
|
53
|
+
Object.defineProperty(exports, "ocr", { enumerable: true, get: function () { return agent_1.ocr; } });
|
|
54
|
+
Object.defineProperty(exports, "findText", { enumerable: true, get: function () { return agent_1.findText; } });
|
|
55
|
+
Object.defineProperty(exports, "clickText", { enumerable: true, get: function () { return agent_1.clickText; } });
|
|
56
|
+
Object.defineProperty(exports, "waitForText", { enumerable: true, get: function () { return agent_1.waitForText; } });
|
|
57
|
+
Object.defineProperty(exports, "waitForTextAndClick", { enumerable: true, get: function () { return agent_1.waitForTextAndClick; } });
|
|
58
|
+
Object.defineProperty(exports, "watchRegion", { enumerable: true, get: function () { return agent_1.watchRegion; } });
|
|
59
|
+
Object.defineProperty(exports, "onRegionChange", { enumerable: true, get: function () { return agent_1.onRegionChange; } });
|
|
60
|
+
Object.defineProperty(exports, "onHotkey", { enumerable: true, get: function () { return agent_1.onHotkey; } });
|
|
61
|
+
Object.defineProperty(exports, "waitForHotkey", { enumerable: true, get: function () { return agent_1.waitForHotkey; } });
|
|
62
|
+
// ── Cortex — Real-Time Agent Nervous System ───────────────────────────────────
|
|
63
|
+
var cortex_1 = require("./cortex");
|
|
64
|
+
Object.defineProperty(exports, "Cortex", { enumerable: true, get: function () { return cortex_1.Cortex; } });
|
|
65
|
+
Object.defineProperty(exports, "createCortex", { enumerable: true, get: function () { return cortex_1.createCortex; } });
|
|
66
|
+
Object.defineProperty(exports, "geminiLiveProvider", { enumerable: true, get: function () { return cortex_1.geminiLiveProvider; } });
|
|
67
|
+
Object.defineProperty(exports, "openAIRealtimeProvider", { enumerable: true, get: function () { return cortex_1.openAIRealtimeProvider; } });
|
|
68
|
+
Object.defineProperty(exports, "customProvider", { enumerable: true, get: function () { return cortex_1.customProvider; } });
|
|
69
|
+
// ── Enterprise Utilities ──────────────────────────────────────────────────────
|
|
70
|
+
var telemetry_1 = require("./telemetry");
|
|
71
|
+
Object.defineProperty(exports, "telemetry", { enumerable: true, get: function () { return telemetry_1.telemetry; } });
|
|
72
|
+
Object.defineProperty(exports, "CircuitBreaker", { enumerable: true, get: function () { return telemetry_1.CircuitBreaker; } });
|
|
73
|
+
Object.defineProperty(exports, "getCircuitBreakers", { enumerable: true, get: function () { return telemetry_1.getCircuitBreakers; } });
|
|
74
|
+
var validation_1 = require("./validation");
|
|
75
|
+
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validation_1.validate; } });
|
|
76
|
+
Object.defineProperty(exports, "security", { enumerable: true, get: function () { return validation_1.security; } });
|
|
77
|
+
Object.defineProperty(exports, "RateLimiter", { enumerable: true, get: function () { return validation_1.RateLimiter; } });
|
|
78
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_1.ValidationError; } });
|
|
79
|
+
Object.defineProperty(exports, "ok", { enumerable: true, get: function () { return validation_1.ok; } });
|
|
80
|
+
Object.defineProperty(exports, "err", { enumerable: true, get: function () { return validation_1.err; } });
|
|
81
|
+
Object.defineProperty(exports, "unwrap", { enumerable: true, get: function () { return validation_1.unwrap; } });
|
|
82
|
+
var errors_1 = require("./errors");
|
|
83
|
+
Object.defineProperty(exports, "SteloError", { enumerable: true, get: function () { return errors_1.SteloError; } });
|
|
84
|
+
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return errors_1.ErrorCode; } });
|
|
85
|
+
Object.defineProperty(exports, "wrapError", { enumerable: true, get: function () { return errors_1.wrapError; } });
|
|
86
|
+
Object.defineProperty(exports, "withErrorHandling", { enumerable: true, get: function () { return errors_1.withErrorHandling; } });
|
|
87
|
+
Object.defineProperty(exports, "withErrorHandlingSync", { enumerable: true, get: function () { return errors_1.withErrorHandlingSync; } });
|
|
88
|
+
Object.defineProperty(exports, "retryWithBackoff", { enumerable: true, get: function () { return errors_1.retryWithBackoff; } });
|
|
89
|
+
Object.defineProperty(exports, "RecoveryHints", { enumerable: true, get: function () { return errors_1.RecoveryHints; } });
|
|
90
|
+
// ── Foundation Layer ──────────────────────────────────────────────────────────
|
|
91
|
+
var events_1 = require("./events");
|
|
92
|
+
Object.defineProperty(exports, "events", { enumerable: true, get: function () { return events_1.events; } });
|
|
93
|
+
var logger_1 = require("./logger");
|
|
94
|
+
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
|
|
95
|
+
Object.defineProperty(exports, "ConsoleTransport", { enumerable: true, get: function () { return logger_1.ConsoleTransport; } });
|
|
96
|
+
Object.defineProperty(exports, "MemoryTransport", { enumerable: true, get: function () { return logger_1.MemoryTransport; } });
|
|
97
|
+
Object.defineProperty(exports, "CallbackTransport", { enumerable: true, get: function () { return logger_1.CallbackTransport; } });
|
|
98
|
+
Object.defineProperty(exports, "TraceContext", { enumerable: true, get: function () { return logger_1.TraceContext; } });
|
|
99
|
+
Object.defineProperty(exports, "SpanContext", { enumerable: true, get: function () { return logger_1.SpanContext; } });
|
|
100
|
+
Object.defineProperty(exports, "ChildLogger", { enumerable: true, get: function () { return logger_1.ChildLogger; } });
|
|
101
|
+
var config_1 = require("./config");
|
|
102
|
+
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
|
|
103
|
+
var context_1 = require("./context");
|
|
104
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function () { return context_1.context; } });
|
|
105
|
+
// ── Execution Engine ──────────────────────────────────────────────────────────
|
|
106
|
+
var executor_1 = require("./executor");
|
|
107
|
+
Object.defineProperty(exports, "Executor", { enumerable: true, get: function () { return executor_1.Executor; } });
|
|
108
|
+
Object.defineProperty(exports, "getDefaultExecutor", { enumerable: true, get: function () { return executor_1.getDefaultExecutor; } });
|
|
109
|
+
Object.defineProperty(exports, "createExecutor", { enumerable: true, get: function () { return executor_1.createExecutor; } });
|
|
110
|
+
Object.defineProperty(exports, "enqueue", { enumerable: true, get: function () { return executor_1.enqueue; } });
|
|
111
|
+
Object.defineProperty(exports, "urgent", { enumerable: true, get: function () { return executor_1.urgent; } });
|
|
112
|
+
Object.defineProperty(exports, "background", { enumerable: true, get: function () { return executor_1.background; } });
|
|
113
|
+
var middleware_1 = require("./middleware");
|
|
114
|
+
Object.defineProperty(exports, "middleware", { enumerable: true, get: function () { return middleware_1.middleware; } });
|
|
115
|
+
Object.defineProperty(exports, "boundaryPolicy", { enumerable: true, get: function () { return middleware_1.boundaryPolicy; } });
|
|
116
|
+
Object.defineProperty(exports, "ratePolicy", { enumerable: true, get: function () { return middleware_1.ratePolicy; } });
|
|
117
|
+
Object.defineProperty(exports, "cooldownPolicy", { enumerable: true, get: function () { return middleware_1.cooldownPolicy; } });
|
|
118
|
+
Object.defineProperty(exports, "loggingMiddleware", { enumerable: true, get: function () { return middleware_1.loggingMiddleware; } });
|
|
119
|
+
Object.defineProperty(exports, "retryMiddleware", { enumerable: true, get: function () { return middleware_1.retryMiddleware; } });
|
|
120
|
+
Object.defineProperty(exports, "transformMiddleware", { enumerable: true, get: function () { return middleware_1.transformMiddleware; } });
|
|
121
|
+
var workflow_1 = require("./workflow");
|
|
122
|
+
Object.defineProperty(exports, "workflow", { enumerable: true, get: function () { return workflow_1.workflow; } });
|
|
123
|
+
// ── Platform Modules ──────────────────────────────────────────────────────────
|
|
124
|
+
var clipboard_1 = require("./clipboard");
|
|
125
|
+
Object.defineProperty(exports, "clipboard", { enumerable: true, get: function () { return clipboard_1.clipboard; } });
|
|
126
|
+
var process_1 = require("./process");
|
|
127
|
+
Object.defineProperty(exports, "process_manager", { enumerable: true, get: function () { return process_1.process_manager; } });
|
|
128
|
+
var monitor_1 = require("./monitor");
|
|
129
|
+
Object.defineProperty(exports, "monitor", { enumerable: true, get: function () { return monitor_1.monitor; } });
|
|
130
|
+
var accessibility_1 = require("./accessibility");
|
|
131
|
+
Object.defineProperty(exports, "accessibility", { enumerable: true, get: function () { return accessibility_1.accessibility; } });
|
|
132
|
+
// ── Enterprise Platform ───────────────────────────────────────────────────────
|
|
133
|
+
var scheduler_1 = require("./scheduler");
|
|
134
|
+
Object.defineProperty(exports, "scheduler", { enumerable: true, get: function () { return scheduler_1.scheduler; } });
|
|
135
|
+
var session_1 = require("./session");
|
|
136
|
+
Object.defineProperty(exports, "session", { enumerable: true, get: function () { return session_1.session; } });
|
|
137
|
+
var plugin_1 = require("./plugin");
|
|
138
|
+
Object.defineProperty(exports, "plugin", { enumerable: true, get: function () { return plugin_1.plugin; } });
|
|
139
|
+
var integration_1 = require("./integration");
|
|
140
|
+
Object.defineProperty(exports, "integration", { enumerable: true, get: function () { return integration_1.integration; } });
|
|
141
|
+
// ── Utility Re-exports ───────────────────────────────────────────────────────
|
|
142
|
+
var bezier_1 = require("./utils/bezier");
|
|
143
|
+
Object.defineProperty(exports, "bezier", { enumerable: true, get: function () { return bezier_1.bezier; } });
|
|
144
|
+
var helpers_1 = require("./utils/helpers");
|
|
145
|
+
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return helpers_1.delay; } });
|
|
146
|
+
Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return helpers_1.retry; } });
|
|
147
|
+
Object.defineProperty(exports, "waitUntil", { enumerable: true, get: function () { return helpers_1.waitUntil; } });
|
|
148
|
+
Object.defineProperty(exports, "batch", { enumerable: true, get: function () { return helpers_1.batch; } });
|
|
149
|
+
// ── Native Bindings (advanced / escape hatch) ────────────────────────────────
|
|
150
|
+
const native = require('../index.js');
|
|
151
|
+
/** Returns the current platform: 'windows' | 'macos' | 'linux' */
|
|
152
|
+
function getPlatform() {
|
|
153
|
+
return native.getPlatform();
|
|
154
|
+
}
|
|
155
|
+
/** Returns the Stelo native library version */
|
|
156
|
+
function getVersion() {
|
|
157
|
+
return native.getVersion();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Access the raw native bindings directly.
|
|
161
|
+
* Use this only when you need low-level control not exposed through the
|
|
162
|
+
* high-level API.
|
|
163
|
+
*/
|
|
164
|
+
function getNativeBindings() {
|
|
165
|
+
return native;
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2DAA2D;AAC3D,+EAA+E;AAC/E,EAAE;AACF,gCAAgC;AAChC,4BAA4B;AAC5B,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,EAAE;AACF,6DAA6D;AAC7D,oDAAoD;AACpD,EAAE;AACF,+EAA+E;;;;AAiT/E,kCAEC;AAGD,gCAEC;AAOD,8CAEC;AA/TD,iFAAiF;AAEjF,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AAEd,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAA0D;AAAjD,mGAAA,SAAS,OAAA;AAAE,gGAAA,SAAS,OAAU;AACvC,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AAEpB,iFAAiF;AAEjF,mCAAkE;AAAzD,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAE/C,iCAAsO;AAA7N,8FAAA,KAAK,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAE,mGAAA,UAAU,OA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gB,iBAAiB;IAC/B,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export interface WebhookConfig {
|
|
2
|
+
/** Unique webhook ID */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Webhook URL */
|
|
5
|
+
url: string;
|
|
6
|
+
/** HTTP method. Default: 'POST' */
|
|
7
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
8
|
+
/** Custom headers */
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
/** Events to trigger the webhook (e.g., 'session.end', 'workflow.*') */
|
|
11
|
+
events: string[];
|
|
12
|
+
/** Secret for payload signing */
|
|
13
|
+
secret?: string;
|
|
14
|
+
/** Enabled? Default: true */
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
/** Retry on failure? Default: true */
|
|
17
|
+
retry?: boolean;
|
|
18
|
+
/** Max retry attempts. Default: 3 */
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
/** Timeout in ms. Default: 10000 */
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
/** Transform payload before sending */
|
|
23
|
+
transform?: (payload: any) => any;
|
|
24
|
+
}
|
|
25
|
+
export interface WebhookDelivery {
|
|
26
|
+
webhookId: string;
|
|
27
|
+
event: string;
|
|
28
|
+
status: 'success' | 'failed' | 'pending';
|
|
29
|
+
statusCode?: number;
|
|
30
|
+
timestamp: string;
|
|
31
|
+
durationMs: number;
|
|
32
|
+
error?: string;
|
|
33
|
+
attempt: number;
|
|
34
|
+
}
|
|
35
|
+
export interface HttpRequestOptions {
|
|
36
|
+
/** URL */
|
|
37
|
+
url: string;
|
|
38
|
+
/** HTTP method */
|
|
39
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
|
|
40
|
+
/** Request headers */
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
/** Request body (will be JSON-stringified if object) */
|
|
43
|
+
body?: any;
|
|
44
|
+
/** Timeout in ms. Default: 30000 */
|
|
45
|
+
timeoutMs?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface HttpResponse {
|
|
48
|
+
/** HTTP status code */
|
|
49
|
+
status: number;
|
|
50
|
+
/** Response headers */
|
|
51
|
+
headers: Record<string, string>;
|
|
52
|
+
/** Response body as string */
|
|
53
|
+
body: string;
|
|
54
|
+
/** Response body parsed as JSON (null if not valid JSON) */
|
|
55
|
+
json: any | null;
|
|
56
|
+
/** Duration of the request in ms */
|
|
57
|
+
durationMs: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ExternalToolConfig {
|
|
60
|
+
/** Tool name */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Command to run */
|
|
63
|
+
command: string;
|
|
64
|
+
/** Arguments */
|
|
65
|
+
args?: string[];
|
|
66
|
+
/** Working directory */
|
|
67
|
+
cwd?: string;
|
|
68
|
+
/** Environment variables */
|
|
69
|
+
env?: Record<string, string>;
|
|
70
|
+
/** Timeout in ms. Default: 30000 */
|
|
71
|
+
timeoutMs?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface PipelineStage {
|
|
74
|
+
/** Stage name */
|
|
75
|
+
name: string;
|
|
76
|
+
/** Stage function */
|
|
77
|
+
fn: (input: any) => any | Promise<any>;
|
|
78
|
+
/** Optional: skip this stage if condition returns false */
|
|
79
|
+
when?: (input: any) => boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare const integration: {
|
|
82
|
+
/**
|
|
83
|
+
* Make an HTTP request.
|
|
84
|
+
*/
|
|
85
|
+
http(options: HttpRequestOptions): Promise<HttpResponse>;
|
|
86
|
+
/** HTTP GET shorthand */
|
|
87
|
+
get(url: string, headers?: Record<string, string>): Promise<HttpResponse>;
|
|
88
|
+
/** HTTP POST shorthand */
|
|
89
|
+
post(url: string, body: any, headers?: Record<string, string>): Promise<HttpResponse>;
|
|
90
|
+
/** HTTP PUT shorthand */
|
|
91
|
+
put(url: string, body: any, headers?: Record<string, string>): Promise<HttpResponse>;
|
|
92
|
+
/** HTTP DELETE shorthand */
|
|
93
|
+
delete(url: string, headers?: Record<string, string>): Promise<HttpResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Register a webhook to be called on specific events.
|
|
96
|
+
*/
|
|
97
|
+
registerWebhook(config: WebhookConfig): void;
|
|
98
|
+
/**
|
|
99
|
+
* Remove a webhook.
|
|
100
|
+
*/
|
|
101
|
+
removeWebhook(id: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* List registered webhooks.
|
|
104
|
+
*/
|
|
105
|
+
listWebhooks(): WebhookConfig[];
|
|
106
|
+
/**
|
|
107
|
+
* Get webhook delivery history.
|
|
108
|
+
*/
|
|
109
|
+
getDeliveryHistory(webhookId?: string): WebhookDelivery[];
|
|
110
|
+
/**
|
|
111
|
+
* Test a webhook by sending a test payload.
|
|
112
|
+
*/
|
|
113
|
+
testWebhook(webhookId: string): Promise<WebhookDelivery>;
|
|
114
|
+
/**
|
|
115
|
+
* Run an external tool/command and capture output.
|
|
116
|
+
*/
|
|
117
|
+
runTool(config: ExternalToolConfig): Promise<{
|
|
118
|
+
exitCode: number;
|
|
119
|
+
stdout: string;
|
|
120
|
+
stderr: string;
|
|
121
|
+
durationMs: number;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Run a PowerShell command (Windows).
|
|
125
|
+
*/
|
|
126
|
+
runPowerShell(script: string, timeoutMs?: number): Promise<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Run a shell command (cross-platform).
|
|
129
|
+
*/
|
|
130
|
+
runShell(command: string, timeoutMs?: number): Promise<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Create and execute a data transformation pipeline.
|
|
133
|
+
*/
|
|
134
|
+
pipeline<T = any>(input: any, stages: PipelineStage[]): Promise<T>;
|
|
135
|
+
/**
|
|
136
|
+
* Convert data to CSV string.
|
|
137
|
+
*/
|
|
138
|
+
toCSV(data: Record<string, any>[], options?: {
|
|
139
|
+
delimiter?: string;
|
|
140
|
+
includeHeader?: boolean;
|
|
141
|
+
}): string;
|
|
142
|
+
/**
|
|
143
|
+
* Parse CSV string to data objects.
|
|
144
|
+
*/
|
|
145
|
+
fromCSV(csv: string, options?: {
|
|
146
|
+
delimiter?: string;
|
|
147
|
+
hasHeader?: boolean;
|
|
148
|
+
}): Record<string, any>[];
|
|
149
|
+
/**
|
|
150
|
+
* Send a desktop notification (Windows toast / macOS notification center).
|
|
151
|
+
*/
|
|
152
|
+
notify(title: string, message: string, options?: {
|
|
153
|
+
icon?: string;
|
|
154
|
+
sound?: boolean;
|
|
155
|
+
}): Promise<void>;
|
|
156
|
+
/** Reset the integration module */
|
|
157
|
+
reset(): void;
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../ts/integration.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAClC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,wEAAwE;IACxE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;CACnC;AAED,MAAM,WAAW,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