@taskmagic/apps-hastewire 0.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/README.md +3 -0
- package/package.json +47 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +19 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/detect-text.d.ts +3 -0
- package/src/lib/actions/detect-text.js +36 -0
- package/src/lib/actions/detect-text.js.map +1 -0
- package/src/lib/actions/humanize-text.d.ts +4 -0
- package/src/lib/actions/humanize-text.js +50 -0
- package/src/lib/actions/humanize-text.js.map +1 -0
- package/src/lib/common/auth.d.ts +1 -0
- package/src/lib/common/auth.js +10 -0
- package/src/lib/common/auth.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@taskmagic/apps-hastewire",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@anthropic-ai/sdk": "0.33.1",
|
|
6
|
+
"@sinclair/typebox": "0.34.11",
|
|
7
|
+
"axios": "1.17.0",
|
|
8
|
+
"axios-retry": "4.4.1",
|
|
9
|
+
"deepmerge-ts": "7.1.0",
|
|
10
|
+
"mime-types": "2.1.35",
|
|
11
|
+
"nanoid": "3.3.8",
|
|
12
|
+
"openai": "4.67.1",
|
|
13
|
+
"replicate": "0.34.1",
|
|
14
|
+
"semver": "7.6.0",
|
|
15
|
+
"zod": "3.25.76",
|
|
16
|
+
"@taskmagic/pieces-common": "0.4.4",
|
|
17
|
+
"@taskmagic/pieces-framework": "0.7.46",
|
|
18
|
+
"@taskmagic/shared": "0.10.171",
|
|
19
|
+
"tslib": "1.14.1"
|
|
20
|
+
},
|
|
21
|
+
"overrides": {
|
|
22
|
+
"cross-spawn": "7.0.6",
|
|
23
|
+
"elliptic": "^6.6.1",
|
|
24
|
+
"fast-xml-parser": "^4.4.1",
|
|
25
|
+
"protobufjs": "^7.5.5",
|
|
26
|
+
"tmp": "^0.2.4",
|
|
27
|
+
"koa": "^2.16.4",
|
|
28
|
+
"picomatch": "^4.0.4",
|
|
29
|
+
"langsmith": "^0.6.0",
|
|
30
|
+
"serialize-javascript": "^6.0.2",
|
|
31
|
+
"elevenlabs": {
|
|
32
|
+
"form-data": "^4.0.4"
|
|
33
|
+
},
|
|
34
|
+
"@tryfabric/martian": {
|
|
35
|
+
"@notionhq/client": "$@notionhq/client"
|
|
36
|
+
},
|
|
37
|
+
"vite": {
|
|
38
|
+
"rollup": "npm:@rollup/wasm-node@^4.61.1"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"resolutions": {
|
|
42
|
+
"rollup": "npm:@rollup/wasm-node@^4.61.1"
|
|
43
|
+
},
|
|
44
|
+
"types": "./src/index.d.ts",
|
|
45
|
+
"main": "./src/index.js",
|
|
46
|
+
"type": "commonjs"
|
|
47
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hastewire: import("@taskmagic/pieces-framework").Piece<import("@taskmagic/pieces-framework").SecretTextProperty<true>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hastewire = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
5
|
+
const shared_1 = require("@taskmagic/shared");
|
|
6
|
+
const auth_1 = require("./lib/common/auth");
|
|
7
|
+
const detect_text_1 = require("./lib/actions/detect-text");
|
|
8
|
+
const humanize_text_1 = require("./lib/actions/humanize-text");
|
|
9
|
+
exports.hastewire = (0, pieces_framework_1.createPiece)({
|
|
10
|
+
displayName: 'Hastewire',
|
|
11
|
+
auth: auth_1.hastewireAuth,
|
|
12
|
+
categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
|
13
|
+
minimumSupportedRelease: '0.30.0',
|
|
14
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/hastewire.png',
|
|
15
|
+
authors: ['kishanprmr'],
|
|
16
|
+
actions: [detect_text_1.detectTextAction, humanize_text_1.humanizeTextAction],
|
|
17
|
+
triggers: [],
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/hastewire/src/index.ts"],"names":[],"mappings":";;;AAAA,kEAA0D;AAC1D,8CAAkD;AAClD,4CAAkD;AAClD,2DAA6D;AAC7D,+DAAiE;AAEpD,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,oBAAa;IACnB,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,CAAC,YAAY,CAAC;IACvB,OAAO,EAAE,CAAC,8BAAgB,EAAE,kCAAkB,CAAC;IAC/C,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectTextAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
8
|
+
exports.detectTextAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
name: 'detect-text',
|
|
10
|
+
auth: auth_1.hastewireAuth,
|
|
11
|
+
displayName: 'Detect Text',
|
|
12
|
+
description: 'Analyzes text and returns the likelihood of it being AI-generated or human-written.',
|
|
13
|
+
props: {
|
|
14
|
+
text: pieces_framework_1.Property.LongText({
|
|
15
|
+
displayName: 'Input Text',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
},
|
|
19
|
+
run(context) {
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
22
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
23
|
+
url: 'https://hastewire.com/api/v1/detect',
|
|
24
|
+
authentication: {
|
|
25
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
26
|
+
token: context.auth,
|
|
27
|
+
},
|
|
28
|
+
body: {
|
|
29
|
+
text: context.propsValue.text,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return response.body;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=detect-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-text.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hastewire/src/lib/actions/detect-text.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,yCAA+C;AAC/C,4DAAsF;AAEzE,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,qFAAqF;IAClG,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,qCAAqC;gBAC1C,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAc;iBAC9B;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;iBAC9B;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const humanizeTextAction: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
text: import("@taskmagic/pieces-framework").LongTextProperty<true>;
|
|
3
|
+
style: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
|
|
4
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.humanizeTextAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
8
|
+
exports.humanizeTextAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
name: 'humanize-text',
|
|
10
|
+
auth: auth_1.hastewireAuth,
|
|
11
|
+
displayName: 'Humanize Text',
|
|
12
|
+
description: 'Rephrases a given AI-generated text to be more human like.',
|
|
13
|
+
props: {
|
|
14
|
+
text: pieces_framework_1.Property.LongText({
|
|
15
|
+
displayName: 'Input Text',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
style: pieces_framework_1.Property.StaticDropdown({
|
|
19
|
+
displayName: 'Text Style',
|
|
20
|
+
required: false,
|
|
21
|
+
description: 'The desired writing style for the output.',
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{ label: 'formal', value: 'formal' },
|
|
26
|
+
{ label: 'standard', value: 'standard' },
|
|
27
|
+
{ label: 'academic', value: 'academic' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
run(context) {
|
|
33
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
35
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
36
|
+
url: 'https://hastewire.com/api/v1/humanize',
|
|
37
|
+
authentication: {
|
|
38
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
39
|
+
token: context.auth,
|
|
40
|
+
},
|
|
41
|
+
body: {
|
|
42
|
+
text: context.propsValue.text,
|
|
43
|
+
style: context.propsValue.style,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return response.body;
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=humanize-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanize-text.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hastewire/src/lib/actions/humanize-text.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,yCAA+C;AAC/C,4DAAsF;AAEzE,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,4DAA4D;IACzE,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;iBACzC;aACF;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,uCAAuC;gBAC5C,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAc;iBAC9B;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;iBAChC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hastewireAuth: import("@taskmagic/pieces-framework").SecretTextProperty<true>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hastewireAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
5
|
+
exports.hastewireAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
6
|
+
displayName: 'API Key',
|
|
7
|
+
required: true,
|
|
8
|
+
description: `You can obtain API key from [Settings](https://hastewire.com/humanizer/account/api-keys).`,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hastewire/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,kEAAwD;AAE3C,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,2FAA2F;CACzG,CAAC,CAAC"}
|