@agentic-ops/engine-sdk 0.1.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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @agentops/engine-sdk
2
+
3
+ Thin facade for Tier-2 project workflows. See docs/authoring-project-workflows.md and examples/project-worker/.
@@ -0,0 +1,10 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ export {
9
+ __require
10
+ };
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/worker.ts
31
+ var worker_exports = {};
32
+ __export(worker_exports, {
33
+ createEngineWorker: () => createEngineWorker
34
+ });
35
+ module.exports = __toCommonJS(worker_exports);
36
+ var import_worker = require("@temporalio/worker");
37
+ function createEngineWorker(options) {
38
+ return import_worker.Worker.create({
39
+ connection: options.connection,
40
+ namespace: options.namespace,
41
+ taskQueue: options.taskQueue,
42
+ workflowsPath: options.workflowsPath,
43
+ activities: options.activities,
44
+ interceptors: {
45
+ activity: [
46
+ () => ({
47
+ inbound: {
48
+ async execute(input, next) {
49
+ return next(input);
50
+ }
51
+ }
52
+ })
53
+ ],
54
+ workflowModules: [(() => {
55
+ try {
56
+ return require.resolve("./workflow");
57
+ } catch {
58
+ return "./workflow";
59
+ }
60
+ })()]
61
+ // the workflow entry also exports interceptors but Temporal loads modules for outbound
62
+ }
63
+ });
64
+ }
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ createEngineWorker
68
+ });
@@ -0,0 +1,12 @@
1
+ import { NativeConnection, Worker } from '@temporalio/worker';
2
+
3
+ interface CreateEngineWorkerOptions {
4
+ taskQueue: string;
5
+ workflowsPath: string;
6
+ activities: Record<string, (...args: never[]) => Promise<unknown>>;
7
+ connection?: NativeConnection;
8
+ namespace?: string;
9
+ }
10
+ declare function createEngineWorker(options: CreateEngineWorkerOptions): Promise<Worker>;
11
+
12
+ export { type CreateEngineWorkerOptions, createEngineWorker };
@@ -0,0 +1,12 @@
1
+ import { NativeConnection, Worker } from '@temporalio/worker';
2
+
3
+ interface CreateEngineWorkerOptions {
4
+ taskQueue: string;
5
+ workflowsPath: string;
6
+ activities: Record<string, (...args: never[]) => Promise<unknown>>;
7
+ connection?: NativeConnection;
8
+ namespace?: string;
9
+ }
10
+ declare function createEngineWorker(options: CreateEngineWorkerOptions): Promise<Worker>;
11
+
12
+ export { type CreateEngineWorkerOptions, createEngineWorker };
package/dist/worker.js ADDED
@@ -0,0 +1,37 @@
1
+ import {
2
+ __require
3
+ } from "./chunk-3RG5ZIWI.js";
4
+
5
+ // src/worker.ts
6
+ import { Worker } from "@temporalio/worker";
7
+ function createEngineWorker(options) {
8
+ return Worker.create({
9
+ connection: options.connection,
10
+ namespace: options.namespace,
11
+ taskQueue: options.taskQueue,
12
+ workflowsPath: options.workflowsPath,
13
+ activities: options.activities,
14
+ interceptors: {
15
+ activity: [
16
+ () => ({
17
+ inbound: {
18
+ async execute(input, next) {
19
+ return next(input);
20
+ }
21
+ }
22
+ })
23
+ ],
24
+ workflowModules: [(() => {
25
+ try {
26
+ return __require.resolve("./workflow");
27
+ } catch {
28
+ return "./workflow";
29
+ }
30
+ })()]
31
+ // the workflow entry also exports interceptors but Temporal loads modules for outbound
32
+ }
33
+ });
34
+ }
35
+ export {
36
+ createEngineWorker
37
+ };