@openfn/language-claude 1.0.24 → 1.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/ast.json +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -335,6 +335,49 @@
|
|
|
335
335
|
},
|
|
336
336
|
"valid": true
|
|
337
337
|
},
|
|
338
|
+
{
|
|
339
|
+
"name": "combine",
|
|
340
|
+
"params": [
|
|
341
|
+
"operations"
|
|
342
|
+
],
|
|
343
|
+
"docs": {
|
|
344
|
+
"description": "Combines two operations into one",
|
|
345
|
+
"tags": [
|
|
346
|
+
{
|
|
347
|
+
"title": "public",
|
|
348
|
+
"description": null,
|
|
349
|
+
"type": null
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"title": "function",
|
|
353
|
+
"description": null,
|
|
354
|
+
"name": null
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"title": "example",
|
|
358
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"title": "param",
|
|
362
|
+
"description": "Operations to be performed.",
|
|
363
|
+
"type": {
|
|
364
|
+
"type": "NameExpression",
|
|
365
|
+
"name": "Operations"
|
|
366
|
+
},
|
|
367
|
+
"name": "operations"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"title": "returns",
|
|
371
|
+
"description": null,
|
|
372
|
+
"type": {
|
|
373
|
+
"type": "NameExpression",
|
|
374
|
+
"name": "Operation"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
"valid": true
|
|
380
|
+
},
|
|
338
381
|
{
|
|
339
382
|
"name": "field",
|
|
340
383
|
"params": [
|
|
@@ -574,6 +617,55 @@
|
|
|
574
617
|
]
|
|
575
618
|
},
|
|
576
619
|
"valid": false
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "log",
|
|
623
|
+
"params": [
|
|
624
|
+
"args"
|
|
625
|
+
],
|
|
626
|
+
"docs": {
|
|
627
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
628
|
+
"tags": [
|
|
629
|
+
{
|
|
630
|
+
"title": "public",
|
|
631
|
+
"description": null,
|
|
632
|
+
"type": null
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"title": "function",
|
|
636
|
+
"description": null,
|
|
637
|
+
"name": null
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"title": "example",
|
|
641
|
+
"description": "log('Patient List::', $.patients);",
|
|
642
|
+
"caption": "Log values from state"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"title": "example",
|
|
646
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
647
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"title": "param",
|
|
651
|
+
"description": "A value or message to display in the logs",
|
|
652
|
+
"type": {
|
|
653
|
+
"type": "NameExpression",
|
|
654
|
+
"name": "any"
|
|
655
|
+
},
|
|
656
|
+
"name": "args"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"title": "returns",
|
|
660
|
+
"description": null,
|
|
661
|
+
"type": {
|
|
662
|
+
"type": "NameExpression",
|
|
663
|
+
"name": "Operation"
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
"valid": true
|
|
577
669
|
}
|
|
578
670
|
]
|
|
579
671
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -25,6 +25,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
25
25
|
// src/index.js
|
|
26
26
|
var src_exports = {};
|
|
27
27
|
__export(src_exports, {
|
|
28
|
+
combine: () => import_language_common2.combine,
|
|
28
29
|
createClient: () => createClient,
|
|
29
30
|
cursor: () => import_language_common2.cursor,
|
|
30
31
|
dataPath: () => import_language_common2.dataPath,
|
|
@@ -37,6 +38,7 @@ __export(src_exports, {
|
|
|
37
38
|
fields: () => import_language_common2.fields,
|
|
38
39
|
fn: () => import_language_common2.fn,
|
|
39
40
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
41
|
+
log: () => import_language_common2.log,
|
|
40
42
|
merge: () => import_language_common2.merge,
|
|
41
43
|
prompt: () => prompt,
|
|
42
44
|
setMockClient: () => setMockClient,
|
|
@@ -47,6 +49,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
47
49
|
// src/Adaptor.js
|
|
48
50
|
var Adaptor_exports = {};
|
|
49
51
|
__export(Adaptor_exports, {
|
|
52
|
+
combine: () => import_language_common2.combine,
|
|
50
53
|
createClient: () => createClient,
|
|
51
54
|
cursor: () => import_language_common2.cursor,
|
|
52
55
|
dataPath: () => import_language_common2.dataPath,
|
|
@@ -58,6 +61,7 @@ __export(Adaptor_exports, {
|
|
|
58
61
|
fields: () => import_language_common2.fields,
|
|
59
62
|
fn: () => import_language_common2.fn,
|
|
60
63
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
64
|
+
log: () => import_language_common2.log,
|
|
61
65
|
merge: () => import_language_common2.merge,
|
|
62
66
|
prompt: () => prompt,
|
|
63
67
|
setMockClient: () => setMockClient,
|
|
@@ -115,6 +119,7 @@ function prompt(message, opts) {
|
|
|
115
119
|
var src_default = Adaptor_exports;
|
|
116
120
|
// Annotate the CommonJS export names for ESM import in node:
|
|
117
121
|
0 && (module.exports = {
|
|
122
|
+
combine,
|
|
118
123
|
createClient,
|
|
119
124
|
cursor,
|
|
120
125
|
dataPath,
|
|
@@ -126,6 +131,7 @@ var src_default = Adaptor_exports;
|
|
|
126
131
|
fields,
|
|
127
132
|
fn,
|
|
128
133
|
lastReferenceValue,
|
|
134
|
+
log,
|
|
129
135
|
merge,
|
|
130
136
|
prompt,
|
|
131
137
|
setMockClient,
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
// src/Adaptor.js
|
|
8
8
|
var Adaptor_exports = {};
|
|
9
9
|
__export(Adaptor_exports, {
|
|
10
|
+
combine: () => combine,
|
|
10
11
|
createClient: () => createClient,
|
|
11
12
|
cursor: () => cursor,
|
|
12
13
|
dataPath: () => dataPath,
|
|
@@ -18,6 +19,7 @@ __export(Adaptor_exports, {
|
|
|
18
19
|
fields: () => fields,
|
|
19
20
|
fn: () => fn,
|
|
20
21
|
lastReferenceValue: () => lastReferenceValue,
|
|
22
|
+
log: () => log,
|
|
21
23
|
merge: () => merge,
|
|
22
24
|
prompt: () => prompt,
|
|
23
25
|
setMockClient: () => setMockClient,
|
|
@@ -30,15 +32,17 @@ import {
|
|
|
30
32
|
import Anthropic from "@anthropic-ai/sdk";
|
|
31
33
|
import { expandReferences } from "@openfn/language-common/util";
|
|
32
34
|
import {
|
|
35
|
+
combine,
|
|
36
|
+
cursor,
|
|
33
37
|
dataPath,
|
|
34
38
|
dataValue,
|
|
35
39
|
dateFns,
|
|
36
|
-
cursor,
|
|
37
40
|
each,
|
|
38
41
|
field,
|
|
39
42
|
fields,
|
|
40
43
|
fn,
|
|
41
44
|
lastReferenceValue,
|
|
45
|
+
log,
|
|
42
46
|
merge,
|
|
43
47
|
sourceValue
|
|
44
48
|
} from "@openfn/language-common";
|
|
@@ -89,6 +93,7 @@ function prompt(message, opts) {
|
|
|
89
93
|
// src/index.js
|
|
90
94
|
var src_default = Adaptor_exports;
|
|
91
95
|
export {
|
|
96
|
+
combine,
|
|
92
97
|
createClient,
|
|
93
98
|
cursor,
|
|
94
99
|
dataPath,
|
|
@@ -101,6 +106,7 @@ export {
|
|
|
101
106
|
fields,
|
|
102
107
|
fn,
|
|
103
108
|
lastReferenceValue,
|
|
109
|
+
log,
|
|
104
110
|
merge,
|
|
105
111
|
prompt,
|
|
106
112
|
setMockClient,
|
package/package.json
CHANGED
package/types/Adaptor.d.ts
CHANGED
|
@@ -28,4 +28,4 @@ export function prompt(message: string, opts: PromptOptions): operation;
|
|
|
28
28
|
* Options provided to Chat Completions Create (https://docs.anthropic.com/en/api/messages)
|
|
29
29
|
*/
|
|
30
30
|
export type PromptOptions = any;
|
|
31
|
-
export { dataPath, dataValue, dateFns,
|
|
31
|
+
export { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|