@almadar/std 13.6.0 → 13.8.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/behaviors/registry/agent/atoms/std-agent-activity-log.orb +69 -69
- package/behaviors/registry/agent/atoms/std-agent-chat-thread.orb +120 -120
- package/behaviors/registry/agent/atoms/std-agent-classifier.orb +114 -114
- package/behaviors/registry/agent/atoms/std-agent-completion.orb +124 -114
- package/behaviors/registry/agent/atoms/std-agent-context-window.orb +410 -395
- package/behaviors/registry/agent/atoms/std-agent-conversation.orb +93 -93
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +67 -117
- package/behaviors/registry/agent/atoms/std-agent-provider.orb +149 -134
- package/behaviors/registry/agent/atoms/std-agent-search.orb +64 -64
- package/behaviors/registry/agent/atoms/std-agent-session.orb +106 -106
- package/behaviors/registry/agent/atoms/std-agent-step-progress.orb +194 -189
- package/behaviors/registry/agent/atoms/std-agent-token-gauge.orb +360 -355
- package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +69 -69
- package/behaviors/registry/agent/molecules/std-agent-fix-loop.orb +204 -199
- package/behaviors/registry/agent/molecules/std-agent-learner.orb +174 -174
- package/behaviors/registry/agent/molecules/std-agent-planner.orb +125 -125
- package/behaviors/registry/agent/molecules/std-agent-rag.orb +127 -109
- package/behaviors/registry/agent/molecules/std-agent-tool-loop.orb +190 -185
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +1209 -1155
- package/behaviors/registry/agent/organisms/std-agent-builder.orb +3021 -3001
- package/behaviors/registry/agent/organisms/std-agent-pipeline.orb +2184 -2249
- package/behaviors/registry/agent/organisms/std-agent-reviewer.orb +1029 -1050
- package/behaviors/registry/agent/organisms/std-agent-tutor.orb +842 -804
- package/behaviors/registry/app/organisms/std-cms.orb +547 -547
- package/behaviors/registry/core/atoms/std-browse.orb +36 -36
- package/behaviors/registry/core/atoms/std-cache-aside.orb +111 -111
- package/behaviors/registry/core/atoms/std-calendar.orb +56 -51
- package/behaviors/registry/core/atoms/std-circuit-breaker.orb +202 -187
- package/behaviors/registry/core/atoms/std-confirmation.orb +24 -27
- package/behaviors/registry/core/atoms/std-display.orb +2 -2
- package/behaviors/registry/core/atoms/std-drawer.orb +58 -58
- package/behaviors/registry/core/atoms/std-filter.orb +6 -9
- package/behaviors/registry/core/atoms/std-gallery.orb +46 -46
- package/behaviors/registry/core/atoms/std-graphs.orb +24 -24
- package/behaviors/registry/core/atoms/std-modal.orb +19 -19
- package/behaviors/registry/core/atoms/std-pagination.orb +14 -14
- package/behaviors/registry/core/atoms/std-push.orb +48 -90
- package/behaviors/registry/core/atoms/std-rate-limiter.orb +205 -190
- package/behaviors/registry/core/atoms/std-related.orb +31 -31
- package/behaviors/registry/core/atoms/std-search.orb +3 -3
- package/behaviors/registry/core/atoms/std-selection.orb +102 -102
- package/behaviors/registry/core/atoms/std-stats.orb +64 -64
- package/behaviors/registry/core/atoms/std-tabs.orb +18 -18
- package/behaviors/registry/core/molecules/std-cart.orb +64 -64
- package/behaviors/registry/core/molecules/std-dashboard.orb +46 -46
- package/behaviors/registry/core/molecules/std-filtered-list.orb +21 -21
- package/behaviors/registry/core/molecules/std-form-advanced.orb +172 -127
- package/behaviors/registry/core/molecules/std-list.orb +63 -63
- package/behaviors/registry/core/molecules/std-wizard-form.orb +145 -130
- package/behaviors/registry/game/atoms/std-dialogue-box.orb +25 -25
- package/behaviors/registry/game/atoms/std-game-canvas2d.orb +42 -42
- package/behaviors/registry/game/atoms/std-overworld.orb +57 -57
- package/behaviors/registry/game/atoms/std-physics2d.orb +74 -74
- package/behaviors/registry/game/atoms/std-quest.orb +137 -137
- package/behaviors/registry/game/atoms/std-timer.orb +291 -291
- package/behaviors/registry/probes/molecules/std-source-scope-probe.orb +31 -31
- package/behaviors/registry/service/atoms/std-service-custom-bearer.orb +93 -78
- package/behaviors/registry/service/atoms/std-service-email.orb +91 -76
- package/behaviors/registry/service/atoms/std-service-github.orb +103 -83
- package/behaviors/registry/service/atoms/std-service-llm.orb +117 -112
- package/behaviors/registry/service/atoms/std-service-oauth.orb +131 -126
- package/behaviors/registry/service/atoms/std-service-redis.orb +123 -108
- package/behaviors/registry/service/atoms/std-service-storage.orb +125 -105
- package/behaviors/registry/service/atoms/std-service-stripe.orb +113 -103
- package/behaviors/registry/service/atoms/std-service-twilio.orb +102 -92
- package/behaviors/registry/service/atoms/std-service-youtube.orb +119 -114
- package/behaviors/registry/service/organisms/std-service-marketplace.orb +985 -873
- package/behaviors/registry/service/organisms/std-service-research-assistant.orb +1027 -972
- package/dist/behaviors/behaviors-registry.json +2913 -322
- package/dist/behaviors/registry/agent/atoms/std-agent-activity-log.orb +69 -69
- package/dist/behaviors/registry/agent/atoms/std-agent-chat-thread.orb +120 -120
- package/dist/behaviors/registry/agent/atoms/std-agent-classifier.orb +114 -114
- package/dist/behaviors/registry/agent/atoms/std-agent-completion.orb +124 -114
- package/dist/behaviors/registry/agent/atoms/std-agent-context-window.orb +410 -395
- package/dist/behaviors/registry/agent/atoms/std-agent-conversation.orb +93 -93
- package/dist/behaviors/registry/agent/atoms/std-agent-memory.orb +67 -117
- package/dist/behaviors/registry/agent/atoms/std-agent-provider.orb +149 -134
- package/dist/behaviors/registry/agent/atoms/std-agent-search.orb +64 -64
- package/dist/behaviors/registry/agent/atoms/std-agent-session.orb +106 -106
- package/dist/behaviors/registry/agent/atoms/std-agent-step-progress.orb +194 -189
- package/dist/behaviors/registry/agent/atoms/std-agent-token-gauge.orb +360 -355
- package/dist/behaviors/registry/agent/atoms/std-agent-tool-call.orb +69 -69
- package/dist/behaviors/registry/agent/molecules/std-agent-fix-loop.orb +204 -199
- package/dist/behaviors/registry/agent/molecules/std-agent-learner.orb +174 -174
- package/dist/behaviors/registry/agent/molecules/std-agent-planner.orb +125 -125
- package/dist/behaviors/registry/agent/molecules/std-agent-rag.orb +127 -109
- package/dist/behaviors/registry/agent/molecules/std-agent-tool-loop.orb +190 -185
- package/dist/behaviors/registry/agent/organisms/std-agent-assistant.orb +1209 -1155
- package/dist/behaviors/registry/agent/organisms/std-agent-builder.orb +3021 -3001
- package/dist/behaviors/registry/agent/organisms/std-agent-pipeline.orb +2184 -2249
- package/dist/behaviors/registry/agent/organisms/std-agent-reviewer.orb +1029 -1050
- package/dist/behaviors/registry/agent/organisms/std-agent-tutor.orb +842 -804
- package/dist/behaviors/registry/app/organisms/std-cms.orb +547 -547
- package/dist/behaviors/registry/core/atoms/std-browse.orb +36 -36
- package/dist/behaviors/registry/core/atoms/std-cache-aside.orb +111 -111
- package/dist/behaviors/registry/core/atoms/std-calendar.orb +56 -51
- package/dist/behaviors/registry/core/atoms/std-circuit-breaker.orb +202 -187
- package/dist/behaviors/registry/core/atoms/std-confirmation.orb +24 -27
- package/dist/behaviors/registry/core/atoms/std-display.orb +2 -2
- package/dist/behaviors/registry/core/atoms/std-drawer.orb +58 -58
- package/dist/behaviors/registry/core/atoms/std-filter.orb +6 -9
- package/dist/behaviors/registry/core/atoms/std-gallery.orb +46 -46
- package/dist/behaviors/registry/core/atoms/std-graphs.orb +24 -24
- package/dist/behaviors/registry/core/atoms/std-modal.orb +19 -19
- package/dist/behaviors/registry/core/atoms/std-pagination.orb +14 -14
- package/dist/behaviors/registry/core/atoms/std-push.orb +48 -90
- package/dist/behaviors/registry/core/atoms/std-rate-limiter.orb +205 -190
- package/dist/behaviors/registry/core/atoms/std-related.orb +31 -31
- package/dist/behaviors/registry/core/atoms/std-search.orb +3 -3
- package/dist/behaviors/registry/core/atoms/std-selection.orb +102 -102
- package/dist/behaviors/registry/core/atoms/std-stats.orb +64 -64
- package/dist/behaviors/registry/core/atoms/std-tabs.orb +18 -18
- package/dist/behaviors/registry/core/molecules/std-cart.orb +64 -64
- package/dist/behaviors/registry/core/molecules/std-dashboard.orb +46 -46
- package/dist/behaviors/registry/core/molecules/std-filtered-list.orb +21 -21
- package/dist/behaviors/registry/core/molecules/std-form-advanced.orb +172 -127
- package/dist/behaviors/registry/core/molecules/std-list.orb +63 -63
- package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +145 -130
- package/dist/behaviors/registry/game/atoms/std-dialogue-box.orb +25 -25
- package/dist/behaviors/registry/game/atoms/std-game-canvas2d.orb +42 -42
- package/dist/behaviors/registry/game/atoms/std-overworld.orb +57 -57
- package/dist/behaviors/registry/game/atoms/std-physics2d.orb +74 -74
- package/dist/behaviors/registry/game/atoms/std-quest.orb +137 -137
- package/dist/behaviors/registry/game/atoms/std-timer.orb +291 -291
- package/dist/behaviors/registry/probes/molecules/std-source-scope-probe.orb +31 -31
- package/dist/behaviors/registry/service/atoms/std-service-custom-bearer.orb +93 -78
- package/dist/behaviors/registry/service/atoms/std-service-email.orb +91 -76
- package/dist/behaviors/registry/service/atoms/std-service-github.orb +103 -83
- package/dist/behaviors/registry/service/atoms/std-service-llm.orb +117 -112
- package/dist/behaviors/registry/service/atoms/std-service-oauth.orb +131 -126
- package/dist/behaviors/registry/service/atoms/std-service-redis.orb +123 -108
- package/dist/behaviors/registry/service/atoms/std-service-storage.orb +125 -105
- package/dist/behaviors/registry/service/atoms/std-service-stripe.orb +113 -103
- package/dist/behaviors/registry/service/atoms/std-service-twilio.orb +102 -92
- package/dist/behaviors/registry/service/atoms/std-service-youtube.orb +119 -114
- package/dist/behaviors/registry/service/organisms/std-service-marketplace.orb +985 -873
- package/dist/behaviors/registry/service/organisms/std-service-research-assistant.orb +1027 -972
- package/dist/behaviors-registry.json +2913 -322
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -13
- package/dist/index.js.map +1 -1
- package/dist/modules/agent.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/array.js +16 -8
- package/dist/modules/array.js.map +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +6 -3
- package/dist/modules/core.js.map +1 -1
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +26 -13
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/object.js +4 -2
- package/dist/modules/object.js.map +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +26 -13
- package/dist/registry.js.map +1 -1
- package/dist/{types-D7dG8fBF.d.ts → types-CdSN5hnD.d.ts} +43 -0
- package/package.json +1 -1
|
@@ -18,6 +18,40 @@ type BasicReturnType = 'number' | 'boolean' | 'string' | 'any' | 'void' | 'array
|
|
|
18
18
|
/**
|
|
19
19
|
* Base metadata for an operator.
|
|
20
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* For operators whose actual return type depends on input expressions
|
|
23
|
+
* rather than being a fixed primitive (gap #24's family in
|
|
24
|
+
* `docs/Almadar_Std_Verification.md`). The static `returnType` is kept
|
|
25
|
+
* for back-compat with consumers that don't reason about input-dependent
|
|
26
|
+
* types; the validator (L2) reads `returnSemantics` first to derive the
|
|
27
|
+
* concrete type from the call site's argument expressions.
|
|
28
|
+
*
|
|
29
|
+
* - `'first-truthy-of-args'` — returns the first truthy argument's value
|
|
30
|
+
* (`or` semantics, NOT a boolean). Trips arithmetic-context misuse.
|
|
31
|
+
* - `'last-truthy-of-args'` — returns the last truthy argument's value
|
|
32
|
+
* when all are truthy, else first falsy (`and` short-circuit).
|
|
33
|
+
* - `'first-non-null-of-args'` — returns the first non-null arg's type
|
|
34
|
+
* (`coalesce` / `default` / `??`-style).
|
|
35
|
+
* - `'branch-union'` — return type is union of branch result types
|
|
36
|
+
* (`if cond X Y` → `X | Y`).
|
|
37
|
+
* - `'element-of-arg<N>'` — returns element type of arg at index N
|
|
38
|
+
* (`array/first arr` → element of `arr`, `array/get arr i` → element
|
|
39
|
+
* of `arr`). Suffix `?` (e.g. `'element-of-arg<0>?'`) marks
|
|
40
|
+
* nullable-when-missing (`array/find` → `T | undefined`).
|
|
41
|
+
* - `'lambda-result'` — return type is the lambda's body result, with
|
|
42
|
+
* the result possibly wrapped in an array (`array/map` →
|
|
43
|
+
* `Array<ReturnTypeOf<lambda>>`, `array/reduce` →
|
|
44
|
+
* `ReturnTypeOf<lambda>` / type of `init`).
|
|
45
|
+
* - `'object-key-lookup'` — return type depends on the input object
|
|
46
|
+
* shape and the literal key (`object/get`, `object/pick`).
|
|
47
|
+
* - `'identity-of-arg<N>'` — return type matches the input arg at index N
|
|
48
|
+
* (`tap`, `pipe-through`).
|
|
49
|
+
*
|
|
50
|
+
* Operators NOT listed here keep the fixed `returnType` semantics —
|
|
51
|
+
* arithmetic, math, comparisons, aggregations (`array/sum`/`avg`/`len`),
|
|
52
|
+
* type coercions, all effects.
|
|
53
|
+
*/
|
|
54
|
+
type ReturnSemantics = 'first-truthy-of-args' | 'last-truthy-of-args' | 'first-non-null-of-args' | 'branch-union' | 'element-of-arg<0>' | 'element-of-arg<0>?' | 'element-of-arg<1>' | 'lambda-result' | 'object-key-lookup' | 'identity-of-arg<0>';
|
|
21
55
|
interface OperatorMeta {
|
|
22
56
|
/** Operator category */
|
|
23
57
|
category: OperatorCategory;
|
|
@@ -31,6 +65,15 @@ interface OperatorMeta {
|
|
|
31
65
|
hasSideEffects: boolean;
|
|
32
66
|
/** Return type hint - basic types for core operators, extended types for std modules */
|
|
33
67
|
returnType: string;
|
|
68
|
+
/**
|
|
69
|
+
* For operators whose actual return type is determined at the call site
|
|
70
|
+
* (input-dependent), tag with the appropriate semantics so the L2
|
|
71
|
+
* validator can derive the concrete type from argument expressions.
|
|
72
|
+
* Omitted when `returnType` is the fixed truth (most operators).
|
|
73
|
+
* See {@link ReturnSemantics} for the catalog and gap #24 in the std
|
|
74
|
+
* verification doc.
|
|
75
|
+
*/
|
|
76
|
+
returnSemantics?: ReturnSemantics;
|
|
34
77
|
}
|
|
35
78
|
/**
|
|
36
79
|
* Standard library module names.
|