@tapflowio/agent-core 0.1.0-alpha.8 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"AgentRegistry.d.ts","sourceRoot":"","sources":["../src/AgentRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAK3E,eAAO,MAAM,aAAa;uBACL,MAAM,cAAc,sBAAsB,GAAG,IAAI;kBAKtD,MAAM,GAAG,WAAW;aAWzB,IAAI;CAId,CAAA"}
1
+ {"version":3,"file":"AgentRegistry.d.ts","sourceRoot":"","sources":["../src/AgentRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAM3E,eAAO,MAAM,aAAa;uBACL,MAAM,cAAc,sBAAsB,GAAG,IAAI;kBAKtD,MAAM,GAAG,WAAW;aAWzB,IAAI;CAId,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { PlatformError } from './errors.js';
1
2
  const constructors = new Map();
2
3
  const instances = new Map();
3
4
  export const AgentRegistry = {
@@ -7,7 +8,7 @@ export const AgentRegistry = {
7
8
  },
8
9
  get(platform) {
9
10
  if (!constructors.has(platform)) {
10
- throw new Error(`No agent registered for platform: ${platform}`);
11
+ throw new PlatformError(`No agent registered for platform: ${platform}`);
11
12
  }
12
13
  if (!instances.has(platform)) {
13
14
  const AgentClass = constructors.get(platform);
@@ -1 +1 @@
1
- {"version":3,"file":"AgentRegistry.js","sourceRoot":"","sources":["../src/AgentRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkC,CAAA;AAC9D,MAAM,SAAS,GAAG,IAAI,GAAG,EAAuB,CAAA;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,CAAC,QAAgB,EA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AI,aAAa,CAAC,qCAAqC,QAAQ,EAAE,CAAC,CAAA;QAC1E,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAA;YAC9C,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,UAAU,EAAE,CAAC,CAAA;QAC3C,CAAC;QACD,OAAO,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAA;IACjC,CAAC;IAED,KAAK;QACH,YAAY,CAAC,KAAK,EAAE,CAAA;QACpB,SAAS,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ declare class TapflowError extends Error {
2
+ constructor(message: string, options?: ErrorOptions);
3
+ }
4
+ export declare class ValidationError extends TapflowError {
5
+ }
6
+ export declare class PlatformError extends TapflowError {
7
+ }
8
+ export declare class AuthError extends TapflowError {
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,cAAM,YAAa,SAAQ,KAAK;gBAClB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAKpD;AAED,qBAAa,eAAgB,SAAQ,YAAY;CAAG;AAEpD,qBAAa,aAAc,SAAQ,YAAY;CAAG;AAElD,qBAAa,SAAU,SAAQ,YAAY;CAAG"}
package/dist/errors.js ADDED
@@ -0,0 +1,14 @@
1
+ class TapflowError extends Error {
2
+ constructor(message, options) {
3
+ super(message, options);
4
+ this.name = new.target.name;
5
+ Object.setPrototypeOf(this, new.target.prototype);
6
+ }
7
+ }
8
+ export class ValidationError extends TapflowError {
9
+ }
10
+ export class PlatformError extends TapflowError {
11
+ }
12
+ export class AuthError extends TapflowError {
13
+ }
14
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,YAAa,SAAQ,KAAK;IAC9B,YAAY,OAAe,EAAE,OAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAA;QAC3B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IACnD,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,YAAY;CAAG;AAEpD,MAAM,OAAO,aAAc,SAAQ,YAAY;CAAG;AAElD,MAAM,OAAO,SAAU,SAAQ,YAAY;CAAG"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export type { Platform, DeviceStatus, Device, Point, AndroidButton, AgentResources } from './types.js';
2
2
  export type { DeviceAgent, DeviceAgentConstructor } from './DeviceAgent.js';
3
3
  export { AgentRegistry } from './AgentRegistry.js';
4
+ export { ValidationError, PlatformError, AuthError } from './errors.js';
4
5
  export type { Logger, LogLevel } from './logger.js';
5
6
  export { createLogger } from './logger.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACtG,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACtG,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { AgentRegistry } from './AgentRegistry.js';
2
+ export { ValidationError, PlatformError, AuthError } from './errors.js';
2
3
  export { createLogger } from './logger.js';
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapflowio/agent-core",
3
- "version": "0.1.0-alpha.8",
3
+ "version": "0.2.0",
4
4
  "description": "DeviceAgent interface, AgentRegistry, and shared utilities for tapflow agents",
5
5
  "keywords": [
6
6
  "tapflow",
@@ -24,12 +24,14 @@
24
24
  "types": "dist/index.d.ts",
25
25
  "exports": {
26
26
  ".": {
27
+ "types": "./src/index.ts",
27
28
  "source": "./src/index.ts",
28
29
  "tsx": "./src/index.ts",
29
30
  "import": "./dist/index.js",
30
31
  "default": "./dist/index.js"
31
32
  },
32
33
  "./utils": {
34
+ "types": "./src/utils/index.ts",
33
35
  "source": "./src/utils/index.ts",
34
36
  "tsx": "./src/utils/index.ts",
35
37
  "import": "./dist/utils/index.js",