@terminals-tech/sdk 1.0.0-rc.1

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/LICENSE ADDED
@@ -0,0 +1,92 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: Intuition Labs LLC
6
+ Licensed Work: Terminals Platform
7
+ The Licensed Work is (c) 2024-2026 Intuition Labs LLC
8
+ Additional Use Grant: You may make use of the Licensed Work, provided that
9
+ you may not use the Licensed Work for a Competing Use.
10
+ A "Competing Use" means making the Licensed Work available
11
+ to third parties as a commercial hosted or managed service
12
+ that substitutes for the Licensed Work.
13
+ Change Date: Four years from the date the Licensed Work is published.
14
+ Change License: Apache License, Version 2.0
15
+
16
+ For information about alternative licensing arrangements for the Licensed Work,
17
+ please contact: legal@terminals.tech
18
+
19
+ Notice
20
+
21
+ The Business Source License (this document, or the "License") is not an Open
22
+ Source license. However, the Licensed Work will eventually be made available
23
+ under an Open Source License, as stated in this License.
24
+
25
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
26
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
27
+
28
+ Terms
29
+
30
+ The Licensor hereby grants you the right to copy, modify, create derivative
31
+ works, redistribute, and make non-production use of the Licensed Work. The
32
+ Licensor may make an Additional Use Grant, above, permitting limited production
33
+ use.
34
+
35
+ Effective on the Change Date, or the fourth anniversary of the first publicly
36
+ available distribution of a specific version of the Licensed Work under this
37
+ License, whichever comes first, the Licensor hereby grants you rights under the
38
+ terms of the Change License, and the rights granted in the paragraph above
39
+ terminate.
40
+
41
+ If your use of the Licensed Work does not comply with the requirements currently
42
+ in effect as described in this License, you must purchase a commercial license
43
+ from the Licensor, its affiliated entities, or authorized resellers, or you must
44
+ refrain from using the Licensed Work.
45
+
46
+ All copies of the original and modified Licensed Work, and derivative works of
47
+ the Licensed Work, are subject to this License. This License applies separately
48
+ for each version of the Licensed Work and the Change Date may vary for each
49
+ version of the Licensed Work released by Licensor.
50
+
51
+ You must conspicuously display this License on each original or modified copy of
52
+ the Licensed Work. If you receive the Licensed Work in original or modified form
53
+ from a third party, the terms and conditions set forth in this License apply to
54
+ your use of that work.
55
+
56
+ Any use of the Licensed Work in violation of this License will automatically
57
+ terminate your rights under this License for the current and all other versions
58
+ of the Licensed Work.
59
+
60
+ This License does not grant you any right in any trademark or logo of Licensor
61
+ or its affiliates (provided that you may use a trademark or logo of Licensor as
62
+ expressly required by this License).
63
+
64
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
65
+ "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
66
+ OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY,
67
+ FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
68
+
69
+ MariaDB hereby grants you permission to use this License's text to license your
70
+ works, and to refer to it using the trademark "Business Source License", as long
71
+ as you comply with the Covenants of Licensor below.
72
+
73
+ Covenants of Licensor
74
+
75
+ In consideration of the right to use this License's text and the "Business
76
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
77
+ other recipients of the licensed work to be provided by Licensor:
78
+
79
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
80
+ or a license that is compatible with GPL Version 2.0 or a later version,
81
+ where "compatible" means that software provided under the Change License can
82
+ be included in a program with software provided under GPL Version 2.0 or a
83
+ later version. Licensor may specify additional Change Licenses without
84
+ limitation.
85
+
86
+ 2. To either: (a) specify an additional grant of rights to use that does not
87
+ impose any additional restriction on the right granted in this License, as
88
+ the Additional Use Grant; or (b) insert the text "None".
89
+
90
+ 3. To specify a Change Date.
91
+
92
+ 4. Not to modify this License in any other way.
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ # @terminals-tech/sdk
2
+
3
+ Terminals OS SDK — publish-safe facades and primitives for building observable, coherence-aware software.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @terminals-tech/sdk
9
+ ```
10
+
11
+ ## Quickstart
12
+
13
+ ```typescript
14
+ import { SDK_VERSION, Brain, L0, calculateCoherence, createAxonBus } from "@terminals-tech/sdk";
15
+
16
+ // 1. The L0 Engine: Think of a Sematon as a "smart data envelope"
17
+ // It holds your payload but also guarantees it can be mathematically transformed.
18
+ const mySematon = L0.createSematon({
19
+ kind: "custom",
20
+ payload: { message: "Hello Terminals!" },
21
+ witness: { R: 1.0, activationEntropy: 0, converged: true, step: 1 },
22
+ });
23
+
24
+ console.log("Is my payload constructive?", mySematon.constructive); // true!
25
+
26
+ // 2. The L4 Brain: Measure how aligned things are
27
+ const metrics = calculateCoherence({
28
+ output: "Execution is observable, coherence-aware, and locally steerable.",
29
+ groundTruth: ["Execution is observable."],
30
+ });
31
+
32
+ console.log("Coherence:", metrics.overall);
33
+ ```
34
+
35
+ ## Architecture
36
+
37
+ The published package exposes a curated surface oriented around stable facades and runtime-safe primitives:
38
+
39
+ | Surface | Namespace / Export | Coverage |
40
+ | ---------- | ----------------------------- | ---------------------------------------------------------------- |
41
+ | Foundation | `L0` | Core engine math, Sematons, and Deterministic Constructor traces |
42
+ | Terminal | `Terminal` | interaction lifecycle, surface identity, platform types |
43
+ | Core | `Core` | result types, validation, DAG, registry, retry/event primitives |
44
+ | Mesh | `Mesh` | signals, action bus, delegation helpers |
45
+ | Brain | `Brain`, `calculateCoherence` | coherence metrics and phase primitives |
46
+ | Protocol | `Protocol`, `createAxonBus` | delegation helpers and the AXON protocol bridge |
47
+
48
+ ## ELI5: The L0 Foundation (Sematons & Constructors)
49
+
50
+ **What is a Sematon?**
51
+ Imagine you're baking a cake. You have the ingredients (your `payload`). A Sematon is an unbreakable box that holds your ingredients, along with a "stamp of approval" (`witness`) saying these ingredients are perfectly mixed. The engine looks at this box and says: "Yes, this is a **Constructor**—I can guarantee that if I bake this, it will turn out exactly the same every single time, anywhere in the universe."
52
+
53
+ Developers use `L0` primitives to make sure complex AI workflows behave predictably, shielding you from the heavy math (like p-adic addresses or Kuramoto order parameters) while giving you the structural power of deterministic execution.
54
+
55
+ ## Usage
56
+
57
+ ```typescript
58
+ import {
59
+ Brain,
60
+ Core,
61
+ Mesh,
62
+ Protocol,
63
+ calculateCoherence,
64
+ createAxonBus,
65
+ } from "@terminals-tech/sdk";
66
+
67
+ const bus = createAxonBus();
68
+ const metrics = calculateCoherence({
69
+ output: "The mesh is synchronized and the route is clear.",
70
+ groundTruth: ["The mesh is synchronized.", "Routing remains observable."],
71
+ });
72
+ const phases = Brain.kuramotoStep([0, Math.PI / 4], 0, 0.8, undefined, 0.1);
73
+
74
+ await bus.publishSDK({
75
+ type: "sdk.demo.pulse",
76
+ source: { protocol: "axon", address: "demo:source" },
77
+ target: { protocol: "axon", address: "demo:target" },
78
+ payload: { coherence: metrics.overall, nextPhase: phases[0] },
79
+ });
80
+
81
+ console.log({ Core, Mesh, Protocol });
82
+ ```
83
+
84
+ ## Local verification
85
+
86
+ From the monorepo root:
87
+
88
+ ```bash
89
+ npm run sdk:publish:check
90
+ ```
91
+
92
+ This builds the package, validates the packed artifact list, and smoke-tests both ESM and CJS installs from the generated tarball.
93
+
94
+ Package-only dry run:
95
+
96
+ ```bash
97
+ npm run -w @terminals-tech/sdk pack:dry-run
98
+ ```
99
+
100
+ ## Release workflow
101
+
102
+ 1. Confirm the IP gate is open for SDK publication
103
+ 2. Run `npm run sdk:publish:check`
104
+ 3. Inspect the dry-run tarball summary
105
+ 4. Publish when ready with `npm publish --workspace @terminals-tech/sdk`
106
+
107
+ ## License
108
+
109
+ BUSL-1.1 — Patent Pending. (c) 2026 Intuition Labs LLC.