@siglume/api-sdk 0.10.8 → 1.0.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 CHANGED
@@ -1,99 +1,97 @@
1
- # @siglume/api-sdk
2
-
3
- TypeScript runtime for building, testing, and registering Siglume developer apps.
4
-
5
- This package is prepared in the public SDK repo and ships with the current v0.10.x release line.
6
-
7
- It also includes `draft_tool_manual()` and `fill_tool_manual_gaps()` with
8
- bundled `AnthropicProvider` and `OpenAIProvider` classes. Provide
9
- `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, then:
10
-
11
- ```ts
12
- import { AnthropicProvider, draft_tool_manual } from "@siglume/api-sdk";
13
-
14
- const result = await draft_tool_manual({
15
- capability_key: "currency-converter-jp",
16
- job_to_be_done: "Convert USD amounts to JPY with live rates",
17
- permission_class: "read_only",
18
- llm: new AnthropicProvider(),
19
- });
20
-
21
- console.log(result.quality_report.grade);
22
- ```
23
-
24
- Buyer-side discovery and export helpers are also included:
25
-
26
- ```ts
27
- import { SiglumeBuyerClient, to_anthropic_tool } from "@siglume/api-sdk";
28
-
29
- const buyer = new SiglumeBuyerClient({
30
- api_key: process.env.SIGLUME_API_KEY ?? "sig_mock_key",
31
- default_agent_id: process.env.SIGLUME_AGENT_ID,
32
- });
33
-
34
- const listing = await buyer.get_listing("currency-converter-v2");
35
- const anthropicTool = to_anthropic_tool(listing.tool_manual).schema;
36
- ```
37
-
38
- `SiglumeBuyerClient.invoke()` remains experimental and stays gated behind
39
- `allow_internal_execute: true` for privileged test environments until a public
40
- buyer execution route is available.
41
-
42
- See [`../docs/buyer-sdk.md`](../docs/buyer-sdk.md) and
43
- [`../examples/buyer_claude_agent_sdk.ts`](../examples/buyer_claude_agent_sdk.ts)
44
- for the current experimental limitations and the mocked integration example.
45
-
46
- You can also generate deterministic first-party owner-operation wrappers from
47
- the CLI without using an LLM:
48
-
49
- ```bash
50
- siglume init --list-operations
51
- siglume init --from-operation owner.charter.update ./my-charter-editor
52
- ```
53
-
54
- See [`../docs/template-generator.md`](../docs/template-generator.md) for the
55
- generated file layout, fallback behavior, and review samples.
56
-
57
- For API Store publishing, the recommended CLI flow is:
58
-
59
- ```bash
60
- siglume init --template price-compare
61
- siglume test .
62
- siglume score . --offline
63
-
64
- # Issue SIGLUME_API_KEY from Developer Portal -> CLI / API keys before production checks:
65
- siglume validate .
66
- siglume score . --remote
67
- siglume preflight . # checks blockers without creating a draft
68
- siglume register . # preflight + auto-register + confirm/publish
69
- siglume register . --draft-only # review-only draft staging
70
- siglume companies # list company publishers available to this key
71
- siglume register . --company company_123
72
- ```
73
-
74
- `siglume register` reads `tool_manual.json`, the local Git-ignored
75
- `runtime_validation.json`, and optional local Git-ignored
76
- `oauth_credentials.json`. Generated projects keep runtime validation and OAuth
77
- credential files Git-ignored because they can contain review keys and client
78
- secrets. SDK / HTTP automation can pass
79
- `source_url`, `source_context`, and `input_form_spec` directly to
80
- `auto-register`. The CLI runs preflight by default, then calls the same
81
- `auto-register` route used by SDK / automation clients and confirms publication
82
- unless `--draft-only` is set. Re-run the same `capability_key` to publish a
83
- non-material upgrade when checks pass. The server-side publish gate
84
- includes runtime checks, contract checks, seller OAuth checks, pricing / payout
85
- rules, and a mandatory fail-closed LLM legal review for law compliance plus
86
- public-order / morals compliance.
87
-
88
- Company-name publishing is founder-only in the Phase 2 MVP. Use
89
- `publisher_type: "company"` with `company_id` in `app_manifest.yaml`, or pass
90
- `--company <company_id>` to the CLI. Paid company listings require the
91
- company's verified settlement wallet; Siglume does not fall back to the
92
- registrant's personal payout wallet.
93
-
94
- Game APIs use the same publishing flow. To make a listing eligible for the
95
- dedicated Game API Store entry point, include explicit game-oriented
96
- `compatibility_tags` in the manifest, for example `["game", "unity",
97
- "realtime", "npc"]`. Use concrete tags such as `game`, `unity`, `unreal`,
98
- `godot`, `npc`, `matchmaking`, `multiplayer`, `realtime`, `ugc`, or
99
- `narrative`; do not send arbitrary registration `metadata` for store placement.
1
+ # @siglume/api-sdk
2
+
3
+ TypeScript runtime for building, testing, and registering Siglume developer apps.
4
+
5
+ This package is prepared in the public SDK repo and ships with the current v0.10.x release line.
6
+
7
+ It also includes `draft_tool_manual()` and `fill_tool_manual_gaps()` with
8
+ bundled `AnthropicProvider` and `OpenAIProvider` classes. Provide
9
+ `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, then:
10
+
11
+ ```ts
12
+ import { AnthropicProvider, draft_tool_manual } from "@siglume/api-sdk";
13
+
14
+ const result = await draft_tool_manual({
15
+ capability_key: "currency-converter-jp",
16
+ job_to_be_done: "Convert USD amounts to JPY with live rates",
17
+ permission_class: "read_only",
18
+ llm: new AnthropicProvider(),
19
+ });
20
+
21
+ console.log(result.quality_report.grade);
22
+ ```
23
+
24
+ Buyer-side discovery and export helpers are also included:
25
+
26
+ ```ts
27
+ import { SiglumeBuyerClient, to_anthropic_tool } from "@siglume/api-sdk";
28
+
29
+ const buyer = new SiglumeBuyerClient({
30
+ api_key: process.env.SIGLUME_API_KEY ?? "sig_mock_key",
31
+ default_agent_id: process.env.SIGLUME_AGENT_ID,
32
+ });
33
+
34
+ const listing = await buyer.get_listing("currency-converter-v2");
35
+ const anthropicTool = to_anthropic_tool(listing.tool_manual).schema;
36
+ ```
37
+
38
+ `SiglumeBuyerClient.invoke()` remains experimental and stays gated behind
39
+ `allow_internal_execute: true` for privileged test environments until a public
40
+ buyer execution route is available.
41
+
42
+ See [`../docs/buyer-sdk.md`](../docs/buyer-sdk.md) and
43
+ [`../examples/buyer_claude_agent_sdk.ts`](../examples/buyer_claude_agent_sdk.ts)
44
+ for the current experimental limitations and the mocked integration example.
45
+
46
+ You can also generate deterministic first-party owner-operation wrappers from
47
+ the CLI without using an LLM:
48
+
49
+ ```bash
50
+ siglume init --list-operations
51
+ siglume init --from-operation owner.charter.update ./my-charter-editor
52
+ ```
53
+
54
+ See [`../docs/template-generator.md`](../docs/template-generator.md) for the
55
+ generated file layout, fallback behavior, and review samples.
56
+
57
+ For API Store publishing, the recommended CLI flow is:
58
+
59
+ ```bash
60
+ siglume init --template price-compare
61
+ siglume test .
62
+ siglume score . --offline
63
+
64
+ # Issue SIGLUME_API_KEY from Developer Portal -> CLI / API keys before production checks:
65
+ siglume validate .
66
+ siglume score . --remote
67
+ siglume preflight . # checks blockers without creating a draft
68
+ siglume register . # preflight + auto-register + confirm/publish
69
+ siglume register . --draft-only # review-only draft staging
70
+ siglume companies # list company publishers available to this key
71
+ siglume register . --company company_123
72
+ ```
73
+
74
+ `siglume register` reads `tool_manual.json`, the local Git-ignored
75
+ `runtime_validation.json`. Generated projects keep runtime validation files
76
+ Git-ignored because they can contain review keys. SDK / HTTP automation can pass
77
+ `source_url`, `source_context`, and `input_form_spec` directly to
78
+ `auto-register`. The CLI runs preflight by default, then calls the same
79
+ `auto-register` route used by SDK / automation clients and confirms publication
80
+ unless `--draft-only` is set. Re-run the same `capability_key` to publish a
81
+ non-material upgrade when checks pass. The server-side publish gate
82
+ includes runtime checks, contract checks, external OAuth declaration checks, pricing / payout
83
+ rules, and a mandatory fail-closed LLM legal review for law compliance plus
84
+ public-order / morals compliance.
85
+
86
+ Company-name publishing is founder-only in the Phase 2 MVP. Use
87
+ `publisher_type: "company"` with `company_id` in `app_manifest.yaml`, or pass
88
+ `--company <company_id>` to the CLI. Paid company listings require the
89
+ company's verified settlement wallet; Siglume does not fall back to the
90
+ registrant's personal payout wallet.
91
+
92
+ Game APIs use the same publishing flow. To make a listing eligible for the
93
+ dedicated Game API Store entry point, include explicit game-oriented
94
+ `compatibility_tags` in the manifest, for example `["game", "unity",
95
+ "realtime", "npc"]`. Use concrete tags such as `game`, `unity`, `unreal`,
96
+ `godot`, `npc`, `matchmaking`, `multiplayer`, `realtime`, `ugc`, or
97
+ `narrative`; do not send arbitrary registration `metadata` for store placement.