cognitive-modules 0.6.1__tar.gz → 2.2.0__tar.gz

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.
Files changed (31) hide show
  1. {cognitive_modules-0.6.1/src/cognitive_modules.egg-info → cognitive_modules-2.2.0}/PKG-INFO +1 -106
  2. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/README.md +0 -105
  3. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/pyproject.toml +1 -1
  4. cognitive_modules-2.2.0/src/cognitive/runner.py +654 -0
  5. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0/src/cognitive_modules.egg-info}/PKG-INFO +1 -106
  6. cognitive_modules-0.6.1/src/cognitive/runner.py +0 -1348
  7. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/LICENSE +0 -0
  8. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/setup.cfg +0 -0
  9. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/__init__.py +0 -0
  10. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/cli.py +0 -0
  11. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/loader.py +0 -0
  12. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/mcp_server.py +0 -0
  13. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/migrate.py +0 -0
  14. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/providers/__init__.py +0 -0
  15. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/registry.py +0 -0
  16. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/server.py +0 -0
  17. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/subagent.py +0 -0
  18. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/templates.py +0 -0
  19. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive/validator.py +0 -0
  20. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive_modules.egg-info/SOURCES.txt +0 -0
  21. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive_modules.egg-info/dependency_links.txt +0 -0
  22. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive_modules.egg-info/entry_points.txt +0 -0
  23. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive_modules.egg-info/requires.txt +0 -0
  24. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/src/cognitive_modules.egg-info/top_level.txt +0 -0
  25. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_cli.py +0 -0
  26. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_loader.py +0 -0
  27. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_migrate.py +0 -0
  28. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_registry.py +0 -0
  29. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_runner.py +0 -0
  30. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_subagent.py +0 -0
  31. {cognitive_modules-0.6.1 → cognitive_modules-2.2.0}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognitive-modules
3
- Version: 0.6.1
3
+ Version: 2.2.0
4
4
  Summary: Structured LLM task runner with schema validation, confidence scoring, and subagent orchestration
5
5
  Author: ziel-io
6
6
  License: MIT
@@ -69,32 +69,6 @@ English | [中文](README_zh.md)
69
69
 
70
70
  Cognitive Modules is an AI task definition specification designed for generation tasks that require **strong constraints, verifiability, and auditability**.
71
71
 
72
- ## What's New in v2.5
73
-
74
- | Feature | Description |
75
- |---------|-------------|
76
- | **Streaming Response** | Real-time chunk-based output for better UX |
77
- | **Multimodal Support** | Native image, audio, and video input/output |
78
- | **Backward Compatible** | v2.2 modules run without modification |
79
- | **Level 4 Conformance** | Extended conformance level for v2.5 features |
80
-
81
- ```yaml
82
- # module.yaml - v2.5 example
83
- name: image-analyzer
84
- version: 2.5.0
85
- tier: decision
86
-
87
- # v2.5: Enable streaming
88
- response:
89
- mode: streaming
90
- chunk_type: delta
91
-
92
- # v2.5: Enable multimodal
93
- modalities:
94
- input: [text, image]
95
- output: [text]
96
- ```
97
-
98
72
  ## What's New in v2.2
99
73
 
100
74
  | Feature | Description |
@@ -355,83 +329,6 @@ my-module/
355
329
  | `decision` | Judgment/evaluation/classification | medium | Enabled |
356
330
  | `exploration` | Exploration/research/inspiration | low | Enabled |
357
331
 
358
- ## v2.5 Streaming & Multimodal
359
-
360
- ### Streaming Response
361
-
362
- Enable real-time streaming for better UX:
363
-
364
- ```yaml
365
- # module.yaml
366
- response:
367
- mode: streaming # sync | streaming | both
368
- chunk_type: delta # delta | snapshot
369
- ```
370
-
371
- **JavaScript/TypeScript Usage:**
372
-
373
- ```typescript
374
- import { runModuleStream } from 'cognitive-modules-cli';
375
-
376
- // Stream execution
377
- for await (const chunk of runModuleStream(module, provider, { input })) {
378
- if ('delta' in chunk.chunk) {
379
- process.stdout.write(chunk.chunk.delta);
380
- } else if ('final' in chunk) {
381
- console.log('\nComplete:', chunk.data);
382
- }
383
- }
384
- ```
385
-
386
- **Python Usage:**
387
-
388
- ```python
389
- from cognitive import StreamingRunner
390
-
391
- runner = StreamingRunner()
392
- async for chunk in runner.execute_stream("image-analyzer", input_data):
393
- if chunk.get("chunk"):
394
- print(chunk["chunk"]["delta"], end="")
395
- elif chunk.get("final"):
396
- print("\nComplete:", chunk["data"])
397
- ```
398
-
399
- ### Multimodal Input
400
-
401
- Enable image/audio/video processing:
402
-
403
- ```yaml
404
- # module.yaml
405
- modalities:
406
- input: [text, image, audio]
407
- output: [text, image]
408
- ```
409
-
410
- **JavaScript/TypeScript Usage:**
411
-
412
- ```typescript
413
- const result = await runModule(module, provider, {
414
- input: {
415
- prompt: "Describe this image",
416
- images: [
417
- { type: "url", url: "https://example.com/image.jpg" },
418
- { type: "base64", media_type: "image/png", data: "iVBORw0K..." }
419
- ]
420
- }
421
- });
422
- ```
423
-
424
- **Python Usage:**
425
-
426
- ```python
427
- result = await runner.execute("image-analyzer", {
428
- "prompt": "Describe this image",
429
- "images": [
430
- {"type": "url", "url": "https://example.com/image.jpg"},
431
- {"type": "file", "path": "./local-image.png"}
432
- ]
433
- })
434
-
435
332
  ## Using with AI Tools
436
333
 
437
334
  ### Cursor / Codex CLI
@@ -557,8 +454,6 @@ Both versions share the same module format and v2.2 specification.
557
454
 
558
455
  | Document | Description |
559
456
  |----------|-------------|
560
- | [SPEC-v2.5.md](SPEC-v2.5.md) | v2.5 full specification (Streaming, Multimodal) |
561
- | [SPEC-v2.5_zh.md](SPEC-v2.5_zh.md) | v2.5 规范中文版 |
562
457
  | [SPEC-v2.2.md](SPEC-v2.2.md) | v2.2 full specification (Control/Data separation, Tier, Overflow) |
563
458
  | [SPEC-v2.2_zh.md](SPEC-v2.2_zh.md) | v2.2 规范中文版 |
564
459
  | [SPEC.md](SPEC.md) | v0.1 specification (context philosophy) |
@@ -11,32 +11,6 @@ English | [中文](README_zh.md)
11
11
 
12
12
  Cognitive Modules is an AI task definition specification designed for generation tasks that require **strong constraints, verifiability, and auditability**.
13
13
 
14
- ## What's New in v2.5
15
-
16
- | Feature | Description |
17
- |---------|-------------|
18
- | **Streaming Response** | Real-time chunk-based output for better UX |
19
- | **Multimodal Support** | Native image, audio, and video input/output |
20
- | **Backward Compatible** | v2.2 modules run without modification |
21
- | **Level 4 Conformance** | Extended conformance level for v2.5 features |
22
-
23
- ```yaml
24
- # module.yaml - v2.5 example
25
- name: image-analyzer
26
- version: 2.5.0
27
- tier: decision
28
-
29
- # v2.5: Enable streaming
30
- response:
31
- mode: streaming
32
- chunk_type: delta
33
-
34
- # v2.5: Enable multimodal
35
- modalities:
36
- input: [text, image]
37
- output: [text]
38
- ```
39
-
40
14
  ## What's New in v2.2
41
15
 
42
16
  | Feature | Description |
@@ -297,83 +271,6 @@ my-module/
297
271
  | `decision` | Judgment/evaluation/classification | medium | Enabled |
298
272
  | `exploration` | Exploration/research/inspiration | low | Enabled |
299
273
 
300
- ## v2.5 Streaming & Multimodal
301
-
302
- ### Streaming Response
303
-
304
- Enable real-time streaming for better UX:
305
-
306
- ```yaml
307
- # module.yaml
308
- response:
309
- mode: streaming # sync | streaming | both
310
- chunk_type: delta # delta | snapshot
311
- ```
312
-
313
- **JavaScript/TypeScript Usage:**
314
-
315
- ```typescript
316
- import { runModuleStream } from 'cognitive-modules-cli';
317
-
318
- // Stream execution
319
- for await (const chunk of runModuleStream(module, provider, { input })) {
320
- if ('delta' in chunk.chunk) {
321
- process.stdout.write(chunk.chunk.delta);
322
- } else if ('final' in chunk) {
323
- console.log('\nComplete:', chunk.data);
324
- }
325
- }
326
- ```
327
-
328
- **Python Usage:**
329
-
330
- ```python
331
- from cognitive import StreamingRunner
332
-
333
- runner = StreamingRunner()
334
- async for chunk in runner.execute_stream("image-analyzer", input_data):
335
- if chunk.get("chunk"):
336
- print(chunk["chunk"]["delta"], end="")
337
- elif chunk.get("final"):
338
- print("\nComplete:", chunk["data"])
339
- ```
340
-
341
- ### Multimodal Input
342
-
343
- Enable image/audio/video processing:
344
-
345
- ```yaml
346
- # module.yaml
347
- modalities:
348
- input: [text, image, audio]
349
- output: [text, image]
350
- ```
351
-
352
- **JavaScript/TypeScript Usage:**
353
-
354
- ```typescript
355
- const result = await runModule(module, provider, {
356
- input: {
357
- prompt: "Describe this image",
358
- images: [
359
- { type: "url", url: "https://example.com/image.jpg" },
360
- { type: "base64", media_type: "image/png", data: "iVBORw0K..." }
361
- ]
362
- }
363
- });
364
- ```
365
-
366
- **Python Usage:**
367
-
368
- ```python
369
- result = await runner.execute("image-analyzer", {
370
- "prompt": "Describe this image",
371
- "images": [
372
- {"type": "url", "url": "https://example.com/image.jpg"},
373
- {"type": "file", "path": "./local-image.png"}
374
- ]
375
- })
376
-
377
274
  ## Using with AI Tools
378
275
 
379
276
  ### Cursor / Codex CLI
@@ -499,8 +396,6 @@ Both versions share the same module format and v2.2 specification.
499
396
 
500
397
  | Document | Description |
501
398
  |----------|-------------|
502
- | [SPEC-v2.5.md](SPEC-v2.5.md) | v2.5 full specification (Streaming, Multimodal) |
503
- | [SPEC-v2.5_zh.md](SPEC-v2.5_zh.md) | v2.5 规范中文版 |
504
399
  | [SPEC-v2.2.md](SPEC-v2.2.md) | v2.2 full specification (Control/Data separation, Tier, Overflow) |
505
400
  | [SPEC-v2.2_zh.md](SPEC-v2.2_zh.md) | v2.2 规范中文版 |
506
401
  | [SPEC.md](SPEC.md) | v0.1 specification (context philosophy) |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cognitive-modules"
7
- version = "0.6.1"
7
+ version = "2.2.0"
8
8
  description = "Structured LLM task runner with schema validation, confidence scoring, and subagent orchestration"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}