@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 +97 -99
- package/dist/bin/siglume.cjs +43 -285
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +43 -285
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +43 -285
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +0 -67
- package/dist/cli/index.d.ts +0 -67
- package/dist/cli/index.js +43 -285
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +3 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -111
- package/dist/index.d.ts +1 -111
- package/dist/index.js +3 -133
- package/dist/index.js.map +1 -1
- package/package.json +58 -58
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
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
`
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
`
|
|
97
|
-
|
|
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.
|