@felan-ai/ext-output-style 0.1.0 → 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.
- package/README.md +22 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,8 +13,17 @@ import { createOutputStyleExtension } from '@felan-ai/ext-output-style';
|
|
|
13
13
|
const extension = createOutputStyleExtension('explanatory');
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Felan declares the style as `extensionConfig.outputStyle.style`. The local TUI,
|
|
17
|
+
CLI, `/settings`, and Agent Core consumers all resolve this setting before
|
|
18
|
+
activating the extension for root and child sessions.
|
|
19
|
+
|
|
20
|
+
## Package boundary and requirements
|
|
21
|
+
|
|
22
|
+
The package owns the supported style names, their fixed instructions,
|
|
23
|
+
validation, and prompt-section formatting. A host owns style selection,
|
|
24
|
+
built-in enablement, and session lifecycle. The package requires a compatible
|
|
25
|
+
`@felan-ai/agent-core` peer and does not read settings, prompt files, or ambient
|
|
26
|
+
resources itself.
|
|
18
27
|
|
|
19
28
|
## Development
|
|
20
29
|
|
|
@@ -27,3 +36,14 @@ pnpm --filter @felan-ai/ext-output-style build
|
|
|
27
36
|
pnpm --filter @felan-ai/ext-output-style type-check
|
|
28
37
|
pnpm --filter @felan-ai/ext-output-style test
|
|
29
38
|
```
|
|
39
|
+
|
|
40
|
+
## Related documentation
|
|
41
|
+
|
|
42
|
+
- [Configuration](../../docs/user-guide/configuration.md#output-style)
|
|
43
|
+
- [Extension catalog](../../docs/reference/extension-catalog.md)
|
|
44
|
+
- [Architecture](../../docs/concepts/architecture.md)
|
|
45
|
+
|
|
46
|
+
## Attribution
|
|
47
|
+
|
|
48
|
+
This package is original Felan project code. See [NOTICE](NOTICE) and
|
|
49
|
+
[LICENSE](LICENSE).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FelanExtension } from '@felan-ai/agent-core';
|
|
2
2
|
export declare const OUTPUT_STYLES: readonly ["concise", "explanatory"];
|
|
3
3
|
export type OutputStyle = typeof OUTPUT_STYLES[number];
|
|
4
4
|
export declare const DEFAULT_OUTPUT_STYLE: OutputStyle;
|
|
5
|
+
export declare const OUTPUT_STYLE_CONFIG: import("@felan-ai/agent-core").ExtensionConfigDefinition<{
|
|
6
|
+
readonly style: import("@felan-ai/agent-core").ExtensionConfigField<"concise" | "explanatory">;
|
|
7
|
+
}>;
|
|
5
8
|
export declare function parseOutputStyle(value?: unknown): OutputStyle;
|
|
6
9
|
export declare function formatOutputStyleSection(style: OutputStyle): string;
|
|
7
10
|
export declare function createOutputStyleExtension(value?: unknown): FelanExtension;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,cAAc,EAA0B,MAAM,sBAAsB,CAAC;AAEjJ,eAAO,MAAM,aAAa,qCAAsC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,oBAAoB,EAAE,WAAuB,CAAC;AAC3D,eAAO,MAAM,mBAAmB;;EAU9B,CAAC;AAkBH,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,OAA8B,GAAG,WAAW,CAKnF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAQnE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,GAAE,OAA8B,GAAG,cAAc,CAShG;AAED,QAAA,MAAM,oBAAoB,EAAE,cAEtB,CAAC;AAGP,eAAe,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { associateExtensionConfig, configField, defineExtensionConfig } from '@felan-ai/agent-core';
|
|
1
2
|
export const OUTPUT_STYLES = ['concise', 'explanatory'];
|
|
2
3
|
export const DEFAULT_OUTPUT_STYLE = 'concise';
|
|
4
|
+
export const OUTPUT_STYLE_CONFIG = defineExtensionConfig({
|
|
5
|
+
id: 'outputStyle',
|
|
6
|
+
title: 'Output style',
|
|
7
|
+
fields: {
|
|
8
|
+
style: configField.enum(['concise', 'explanatory'], {
|
|
9
|
+
default: DEFAULT_OUTPUT_STYLE,
|
|
10
|
+
description: 'Response detail and explanation style',
|
|
11
|
+
cliName: 'output-style',
|
|
12
|
+
}),
|
|
13
|
+
},
|
|
14
|
+
});
|
|
3
15
|
const OUTPUT_STYLE_START = '<output_style>';
|
|
4
16
|
const OUTPUT_STYLE_END = '</output_style>';
|
|
5
17
|
const STYLE_INSTRUCTIONS = {
|
|
@@ -38,6 +50,7 @@ export function createOutputStyleExtension(value = DEFAULT_OUTPUT_STYLE) {
|
|
|
38
50
|
});
|
|
39
51
|
};
|
|
40
52
|
}
|
|
41
|
-
const outputStyleExtension = createOutputStyleExtension();
|
|
53
|
+
const outputStyleExtension = ((pi) => createOutputStyleExtension(pi.config?.style ?? DEFAULT_OUTPUT_STYLE)(pi));
|
|
54
|
+
associateExtensionConfig(outputStyleExtension, OUTPUT_STYLE_CONFIG);
|
|
42
55
|
export default outputStyleExtension;
|
|
43
56
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,qBAAqB,E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C,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,QAAiB,oBAAoB;IAC9E,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEhD,OAAO,CAAC,EAAE,EAAE,EAAE;QACZ,EAAE,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE;YACpC,OAAO,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,YAAY,OAAO,OAAO,EAAE,EAAE,CAAC;QACjE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,oBAAoB,GAAmB,CAAC,CAAC,EAAqB,EAAE,EAAE,CAAC,0BAA0B,CACjG,EAAE,CAAC,MAAM,EAAE,KAAK,IAAI,oBAAoB,CACzC,CAAC,EAAE,CAAC,CAAC,CAAC;AACP,wBAAwB,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;AAEpE,eAAe,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@felan-ai/ext-output-style",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Portable output-style system prompt extension for Felan",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@felan-ai/agent-core": "^0.
|
|
28
|
+
"@felan-ai/agent-core": "^0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@felan-ai/agent-core": "0.
|
|
31
|
+
"@felan-ai/agent-core": "0.5.0"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public",
|