@fatagnus/dink-sdk 2.3.0 → 2.4.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.
|
@@ -11,10 +11,6 @@ declare class MethodBuilder {
|
|
|
11
11
|
* Add AI context to this method.
|
|
12
12
|
*/
|
|
13
13
|
withAI(aiContext: MethodAIContext): MethodBuilder;
|
|
14
|
-
/**
|
|
15
|
-
* Add a code example to this method.
|
|
16
|
-
*/
|
|
17
|
-
withExample(language: string, code: string, description?: string): MethodBuilder;
|
|
18
14
|
/**
|
|
19
15
|
* Add another method to the service (returns to service builder context).
|
|
20
16
|
*/
|
|
@@ -72,10 +68,6 @@ export declare class ServiceBuilder {
|
|
|
72
68
|
* Add AI context to the service.
|
|
73
69
|
*/
|
|
74
70
|
withAI(aiContext: ServiceAIContext): ServiceBuilder;
|
|
75
|
-
/**
|
|
76
|
-
* Add a code example to the service.
|
|
77
|
-
*/
|
|
78
|
-
withExample(language: string, code: string, description?: string): ServiceBuilder;
|
|
79
71
|
/**
|
|
80
72
|
* Add a related service.
|
|
81
73
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-builder.d.ts","sourceRoot":"","sources":["../../src/edge/service-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,aAAa,CAAC;AAErE;;GAEG;AACH,cAAM,aAAa;IACjB,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAQtE;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa;IAKjD;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"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,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa;IASzD;;OAEG;IACH,KAAK,IAAI,iBAAiB;IAa1B;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,cAAc,GAAG;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE;CAmC1H"}
|
|
@@ -18,16 +18,6 @@ class MethodBuilder {
|
|
|
18
18
|
this.methodDescriptor.ai_context = aiContext;
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Add a code example to this method.
|
|
23
|
-
*/
|
|
24
|
-
withExample(language, code, description) {
|
|
25
|
-
if (!this.methodDescriptor.code_examples) {
|
|
26
|
-
this.methodDescriptor.code_examples = [];
|
|
27
|
-
}
|
|
28
|
-
this.methodDescriptor.code_examples.push({ language, code, description });
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
21
|
/**
|
|
32
22
|
* Add another method to the service (returns to service builder context).
|
|
33
23
|
*/
|
|
@@ -102,16 +92,6 @@ export class ServiceBuilder {
|
|
|
102
92
|
this.descriptor.ai_context = aiContext;
|
|
103
93
|
return this;
|
|
104
94
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Add a code example to the service.
|
|
107
|
-
*/
|
|
108
|
-
withExample(language, code, description) {
|
|
109
|
-
if (!this.descriptor.code_examples) {
|
|
110
|
-
this.descriptor.code_examples = [];
|
|
111
|
-
}
|
|
112
|
-
this.descriptor.code_examples.push({ language, code, description });
|
|
113
|
-
return this;
|
|
114
|
-
}
|
|
115
95
|
/**
|
|
116
96
|
* Add a related service.
|
|
117
97
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-builder.js","sourceRoot":"","sources":["../../src/edge/service-builder.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,aAAa;IACT,gBAAgB,CAAmB;IACnC,MAAM,CAAiB;IAE/B,YAAY,MAAsB,EAAE,IAAY,EAAE,WAAoB;QACpE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,gBAAgB,GAAG;YACtB,IAAI;YACJ,WAAW;SACZ,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAA0B;QAC/B,IAAI,CAAC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"service-builder.js","sourceRoot":"","sources":["../../src/edge/service-builder.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,aAAa;IACT,gBAAgB,CAAmB;IACnC,MAAM,CAAiB;IAE/B,YAAY,MAAsB,EAAE,IAAY,EAAE,WAAoB;QACpE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,gBAAgB,GAAG;YACtB,IAAI;YACJ,WAAW;SACZ,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAA0B;QAC/B,IAAI,CAAC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY,EAAE,WAAoB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,IAAyD;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF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AG,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC;gBACpC,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/introspect.d.ts
CHANGED
|
@@ -3,17 +3,6 @@
|
|
|
3
3
|
* These types match the Go struct definitions in pkg/types/introspect.go
|
|
4
4
|
* Property names use snake_case to match Go JSON tags for wire compatibility.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* CodeExample provides a code sample in a specific language.
|
|
8
|
-
*/
|
|
9
|
-
export interface CodeExample {
|
|
10
|
-
/** Programming language of the example (e.g., 'typescript', 'go', 'python') */
|
|
11
|
-
language: string;
|
|
12
|
-
/** The code snippet */
|
|
13
|
-
code: string;
|
|
14
|
-
/** Optional description of what the example demonstrates */
|
|
15
|
-
description?: string;
|
|
16
|
-
}
|
|
17
6
|
/**
|
|
18
7
|
* MethodAIContext provides AI-specific guidance for understanding and using a method.
|
|
19
8
|
*/
|
|
@@ -30,6 +19,8 @@ export interface MethodAIContext {
|
|
|
30
19
|
side_effects?: string[];
|
|
31
20
|
/** Names of related methods that may be useful */
|
|
32
21
|
related_methods?: string[];
|
|
22
|
+
/** Scenarios describing when to use this method */
|
|
23
|
+
scenarios?: string[];
|
|
33
24
|
}
|
|
34
25
|
/**
|
|
35
26
|
* ServiceAIContext provides AI-specific guidance for understanding a service.
|
|
@@ -55,14 +46,10 @@ export interface MethodDescriptor {
|
|
|
55
46
|
input_schema?: Record<string, unknown>;
|
|
56
47
|
/** JSON Schema describing the output */
|
|
57
48
|
output_schema?: Record<string, unknown>;
|
|
58
|
-
/** Code examples demonstrating method usage */
|
|
59
|
-
examples?: CodeExample[];
|
|
60
49
|
/** Tags for categorization and filtering */
|
|
61
50
|
tags?: string[];
|
|
62
51
|
/** AI-specific context for this method */
|
|
63
52
|
ai_context?: MethodAIContext;
|
|
64
|
-
/** Additional code examples */
|
|
65
|
-
code_examples?: CodeExample[];
|
|
66
53
|
}
|
|
67
54
|
/**
|
|
68
55
|
* ServiceDescriptor provides complete metadata about a service for introspection
|
|
@@ -81,7 +68,5 @@ export interface ServiceDescriptor {
|
|
|
81
68
|
ai_context?: ServiceAIContext;
|
|
82
69
|
/** Names of related services */
|
|
83
70
|
related_services?: string[];
|
|
84
|
-
/** Code examples demonstrating service usage */
|
|
85
|
-
code_examples?: CodeExample[];
|
|
86
71
|
}
|
|
87
72
|
//# sourceMappingURL=introspect.d.ts.map
|
package/dist/introspect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../src/introspect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../src/introspect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM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