@gizai/cli 1.0.1 → 1.2.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/README.md +133 -4
- package/cli/codex-relay.mjs +46 -0
- package/cli/computer-identity.mjs +76 -0
- package/cli/engine.mjs +58 -0
- package/cli/giz.mjs +602 -249
- package/package.json +10 -6
- package/skills/giz/SKILL.md +68 -4
- package/skills/giz/references/operations.md +9 -6
- package/skills/giz/references/slides.md +95 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gizai/cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Giz CLI, MCP installer,
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Giz CLI, MCP installer, OpenAI-compatible models, Drive, and Computer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"giz": "cli/giz.mjs"
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=20"
|
|
15
|
+
"node": ">=20.12"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
19
|
+
"proper-lockfile": "4.1.2"
|
|
16
20
|
},
|
|
17
21
|
"keywords": [
|
|
18
22
|
"giz",
|
|
@@ -27,13 +31,13 @@
|
|
|
27
31
|
"homepage": "https://www.giz.ai/mcp/",
|
|
28
32
|
"repository": {
|
|
29
33
|
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/
|
|
31
|
-
"directory": "apps/
|
|
34
|
+
"url": "git+https://github.com/GizAI/giz.git",
|
|
35
|
+
"directory": "apps/giz/external"
|
|
32
36
|
},
|
|
33
37
|
"publishConfig": {
|
|
34
38
|
"access": "public"
|
|
35
39
|
},
|
|
36
40
|
"scripts": {
|
|
37
|
-
"check": "node --check cli/giz.mjs"
|
|
41
|
+
"check": "node --check cli/giz.mjs && node --test test/*.test.mjs"
|
|
38
42
|
}
|
|
39
43
|
}
|
package/skills/giz/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: giz
|
|
3
|
-
description: Use Giz
|
|
3
|
+
description: Use Giz text, image, video, audio, speech, embedding, reranking, Drive, and Computer capabilities from an AI agent. Trigger when the user asks to run an AI model through Giz, generate or transform media, embed or rerank content, inspect or modify Giz Drive files, operate a Giz Computer or terminal, or discover live Giz models and their parameters.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Giz
|
|
@@ -11,10 +11,10 @@ Use the `giz` CLI or the configured Giz MCP server. Prefer MCP when available an
|
|
|
11
11
|
|
|
12
12
|
1. Run `model_list` before selecting an unfamiliar media model.
|
|
13
13
|
2. Run `model_get` and treat its live input schema as the source of truth.
|
|
14
|
-
3. Call `model_run` with the exact model ID and supported inputs.
|
|
14
|
+
3. Call `model_run` with the exact model ID and supported inputs.
|
|
15
15
|
4. Generation returns a durable job. Poll `job_get`; do not resubmit while it is queued or processing.
|
|
16
16
|
5. Preserve completed Drive URLs and paths. Use Drive tools to inspect or organize results.
|
|
17
|
-
6. Use
|
|
17
|
+
6. Use `giz_computer_exec` for commands; it runs outside persistent terminals and has a bounded deadline. Use `terminal_list`, `terminal_observe`, and `terminal_send` only to inspect or interact with an existing visible session. Pass a known exact Computer name, slug, or ID directly as `computer`; use `computer_list` only when the target is unknown or ambiguous.
|
|
18
18
|
7. Ask for explicit confirmation immediately before destructive Drive removal, Computer runtime changes, or commands with material side effects.
|
|
19
19
|
|
|
20
20
|
## CLI
|
|
@@ -33,6 +33,12 @@ giz model get MODEL_ID
|
|
|
33
33
|
giz model run MODEL_ID --input '{"prompt":"..."}'
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
Use the OpenAI-compatible chat boundary:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
giz chat gpt-5-6-luna "..."
|
|
40
|
+
```
|
|
41
|
+
|
|
36
42
|
Upload local media into an exact model field:
|
|
37
43
|
|
|
38
44
|
```bash
|
|
@@ -52,9 +58,67 @@ Pass `--json` for machine output. Use `GIZ_TOKEN` only in ephemeral automation.
|
|
|
52
58
|
## Boundaries
|
|
53
59
|
|
|
54
60
|
- Do not guess model ids, parameter names, enum values, or costs.
|
|
55
|
-
- Do not use text-generation models; this integration intentionally exposes non-LLM models only.
|
|
56
61
|
- Do not turn argv arrays into shell strings.
|
|
57
62
|
- Do not read binary Drive content unless the task needs it; prefer returned URLs and metadata.
|
|
58
63
|
- Do not retry failed generations blindly. Report the provider or contract error.
|
|
59
64
|
|
|
60
65
|
Read [references/operations.md](references/operations.md) when MCP discovery is unavailable or when choosing between Drive and Computer tools.
|
|
66
|
+
|
|
67
|
+
App 변경은 `giz app list`에서 확인한 `revision`을 명시적으로 전달합니다.
|
|
68
|
+
`run`, `publish`, `delete`에는 `--expected-revision REVISION`이 필요합니다.
|
|
69
|
+
`create`/`save`의 `--input`에는 `id`와 `expectedRevision`을 넣습니다(새 앱은 0).
|
|
70
|
+
목록을 다시 읽어 개정 번호를 자동 대체하지 않으므로, 검토 뒤 다른 변경이 생기면 서버가 충돌을 거부합니다.
|
|
71
|
+
|
|
72
|
+
아래 표는 CLI 디스패처와 도구 item에서 생성합니다. 갱신 명령:
|
|
73
|
+
`GIZ_UPDATE_CLI_SURFACE=1 pnpm --filter giz-app-giz test --runInBand --runTestsByPath server/external/cli-surface.spec.ts`.
|
|
74
|
+
일반 CI 실행은 문서를 쓰지 않고 표의 차이를 실패로 보고합니다.
|
|
75
|
+
|
|
76
|
+
<!-- cli-surface:start -->
|
|
77
|
+
| CLI 명령 | 도구 ID | MCP 이름 | 필수 입력 | scope | Agent 발견 |
|
|
78
|
+
| --- | --- | --- | --- | --- | --- |
|
|
79
|
+
| model list | model.list | model_list | - | giz.read | model.list |
|
|
80
|
+
| model get | model.get | model_get | model | giz.read | model.get |
|
|
81
|
+
| model run | model.run | model_run | model, input | giz.inference | model.run |
|
|
82
|
+
| generate image | generateImage | generateImage | prompt | giz.write | generateImage |
|
|
83
|
+
| generate video | generateVideo | generateVideo | prompt | giz.write | generateVideo |
|
|
84
|
+
| generate music | generateMusic | generateMusic | prompt | giz.write | generateMusic |
|
|
85
|
+
| generate talking-head | generateTalkingHead | generateTalkingHead | prompt, references | giz.write | generateTalkingHead |
|
|
86
|
+
| generate audio | generateAudio | generateAudio | purpose | giz.write | generateAudio |
|
|
87
|
+
| job list | job.list | job_list | - | giz.read | server job |
|
|
88
|
+
| job get | job.get | job_get | job | giz.read | server job |
|
|
89
|
+
| job wait | job.get | job_get | job | giz.read | server job |
|
|
90
|
+
| job cancel | job.cancel | job_cancel | job | giz.destructive | server job |
|
|
91
|
+
| drive ls | drive.list | drive_list | - | giz.read | drive.list |
|
|
92
|
+
| drive list | drive.list | drive_list | - | giz.read | drive.list |
|
|
93
|
+
| drive search | drive.search | drive_search | query | giz.read | drive.search |
|
|
94
|
+
| drive read | drive.readFile | drive_readFile | path | giz.read | drive.readFile |
|
|
95
|
+
| drive write | drive.writeFile | drive_writeFile | path, content | giz.write | drive.writeFile |
|
|
96
|
+
| drive mkdir | drive.makeDirectory | drive_makeDirectory | path | giz.write | drive.makeDirectory |
|
|
97
|
+
| drive move | drive.movePath | drive_movePath | from, to | giz.write | drive.movePath |
|
|
98
|
+
| drive delete | drive.deletePath | drive_deletePath | path | giz.destructive | drive.deletePath |
|
|
99
|
+
| table list | workspace.objects | workspace_objects | - | giz.read | workspace.objects |
|
|
100
|
+
| table get | workspace.objects | workspace_objects | - | giz.read | workspace.objects |
|
|
101
|
+
| table read | table.readRows | table_readRows | table | giz.read | table.readRows |
|
|
102
|
+
| table write | table.writeRows | table_writeRows | table | giz.write | table.writeRows |
|
|
103
|
+
| table action | workspace.executeAction | workspace_executeAction | view, action | giz.execute | workspace.executeAction |
|
|
104
|
+
| computer list | computer.list | computer_list | - | giz.read | computer.list |
|
|
105
|
+
| computer get | computer.get | computer_get | - | giz.read | external only |
|
|
106
|
+
| computer start | computer.start | computer_start | - | giz.execute | external only |
|
|
107
|
+
| computer stop | computer.stop | computer_stop | - | giz.destructive | external only |
|
|
108
|
+
| computer exec | computer.exec | giz_computer_exec | - | giz.execute | computer.exec |
|
|
109
|
+
| app list | app.list | app_list | - | giz.read | app.list |
|
|
110
|
+
| app create | app.save | app_save | id, expectedRevision | giz.execute | app.save |
|
|
111
|
+
| app save | app.save | app_save | id, expectedRevision | giz.execute | app.save |
|
|
112
|
+
| app run | app.run | app_run | id, expectedRevision | giz.execute | app.run |
|
|
113
|
+
| app publish | app.publish | app_publish | id, expectedRevision, visibility | giz.write | app.publish |
|
|
114
|
+
| app open | app.open | app_open | id | giz.read | app.open |
|
|
115
|
+
| app delete | app.delete | app_delete | id, expectedRevision | giz.destructive | app.delete |
|
|
116
|
+
| capability list | capability.status | capability_status | - | giz.read | capability.status |
|
|
117
|
+
| capability search | capability.catalog | capability_catalog | kind, query | giz.read | capability.catalog |
|
|
118
|
+
| capability install | capability.install | capability_install | id, kind, query | giz.execute | capability.install |
|
|
119
|
+
| capability update | capability.manage | capability_manage | id, operation | giz.destructive | capability.manage |
|
|
120
|
+
| capability remove | capability.manage | capability_manage | id, operation | giz.destructive | capability.manage |
|
|
121
|
+
| agent start | agent.start | agent_start | agentId, prompt | giz.execute | external only |
|
|
122
|
+
| agent status | agent.status | agent_status | turnId | giz.read | agent.status |
|
|
123
|
+
| agent cancel | agent.cancel | agent_cancel | turnId | giz.execute | agent.cancel |
|
|
124
|
+
<!-- cli-surface:end -->
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
|---|---|
|
|
5
5
|
| Discover non-LLM models and fields | `model_list`, `model_get` |
|
|
6
6
|
| Run any live non-LLM model | `model_run` |
|
|
7
|
-
| Generate common media with automatic routing | `generate_image`, `generate_video`, `generate_audio`, `generate_music`, `generate_talking_head` |
|
|
8
7
|
| Track durable generation | `job_list`, `job_get`, `job_cancel` |
|
|
9
|
-
| List, search,
|
|
10
|
-
| Create or change Drive content | `drive_writeFile`, `drive_makeDirectory`, `drive_movePath`, `drive_importUrl
|
|
8
|
+
| List, search, or read Drive | `drive_list`, `drive_search`, `drive_readFile` |
|
|
9
|
+
| Create or change Drive content | `drive_writeFile`, `drive_makeDirectory`, `drive_movePath`, `drive_importUrl` |
|
|
11
10
|
| Move Drive content to Trash | `drive_deletePath` |
|
|
12
|
-
|
|
|
13
|
-
|
|
|
11
|
+
| Read a table's fields and rows | `table_readRows` |
|
|
12
|
+
| Create, update or remove table rows (one undoable change per call) | `table_writeRows` |
|
|
13
|
+
| Turn rows into a new table | `table_createFromRows` |
|
|
14
|
+
| Discover and control Computers | `computer_list`, `computer_start`, `computer_stop` |
|
|
15
|
+
| Run a Computer command | `giz_computer_exec` |
|
|
16
|
+
| Find, inspect, or interact with an existing terminal | `terminal_list`, `terminal_observe`, `terminal_send` |
|
|
14
17
|
| Inspect or transform media | `media_probe`, `media_process` |
|
|
15
18
|
|
|
16
|
-
Always prefer the live `tools/list` result over this map. Streamable HTTP MCP is `/api/mcp`; ChatGPT OpenAPI is `/api/openapi.json`; the authenticated HTTP manifest is `/api/tools`.
|
|
19
|
+
Always prefer the live `tools/list` result over this map. Streamable HTTP MCP is `/api/mcp`; ChatGPT OpenAPI is `/api/openapi.json`; the authenticated HTTP manifest is `/api/tools`. `giz_computer_exec` accepts an exact Computer name, slug, or ID as `computer`, argv `command`, optional `stdin`, `cwd`, and `deadlineMs`; do not send `timeoutMs`, `yieldMs`, `sessionId`, or shell command strings. Omit `computer` for the default Computer and use `computer_list` only when the target is unknown or ambiguous.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Giz Presentation & Slide Authoring
|
|
2
|
+
|
|
3
|
+
The requested deliverable is a presentation: editable PPTX and, when requested,
|
|
4
|
+
PDF. Choose the design workflow from the user's intent. Image-designed proposals
|
|
5
|
+
start with complete slide images; direct SVG authoring remains an option.
|
|
6
|
+
`slides.create/read/edit/inspect/export` share one Drive document for reconstruction
|
|
7
|
+
and subsequent edits. The SVG is an intermediate representation and live preview;
|
|
8
|
+
it must not dictate or simplify the image model's design.
|
|
9
|
+
|
|
10
|
+
## Image-designed proposals
|
|
11
|
+
|
|
12
|
+
1. Read the source material and reference pages. Establish the audience, narrative,
|
|
13
|
+
approved wording, numbers and sources. Retain this content separately from image
|
|
14
|
+
recognition: generated pixels do not override approved facts.
|
|
15
|
+
2. Discover the requested image model with `model.list/model.get`. Use its actual
|
|
16
|
+
quality, size and reference-image contract. Honor the requested model; report a
|
|
17
|
+
failure instead of silently substituting the default or a cheaper model. Use
|
|
18
|
+
`model.run` with the exact retrieved input schema for model-specific quality or
|
|
19
|
+
variant controls, including subsequent reference-image cleanup.
|
|
20
|
+
3. Generate **complete slide designs**, including typography, headings, body copy,
|
|
21
|
+
diagrams, cards and artwork, through the existing image generation tools. Match
|
|
22
|
+
the reference's visual ambition, information density and aspect ratio. Pass reference images
|
|
23
|
+
to maintain composition and consistent design across pages. Save the finished
|
|
24
|
+
slide images in Drive; they are the visual targets for conversion.
|
|
25
|
+
4. Inspect each target at readable resolution. Inventory all visible components,
|
|
26
|
+
including icons and decorative marks, before cleanup; account for every one in
|
|
27
|
+
the reconstructed layers. Reconstruct its actual composition,
|
|
28
|
+
text bounds, line breaks, hierarchy, colors, borders and grouping in reference
|
|
29
|
+
pixel coordinates. Do not redesign it as a generic template. Native text uses
|
|
30
|
+
the approved source wording even where the image misspells or changes a number.
|
|
31
|
+
5. Extract photographs, logos and complex artwork with `assets` pixel crops.
|
|
32
|
+
Where editable labels overlap artwork, edit the original image through
|
|
33
|
+
the same image model and quality settings with that reference. Remove only the
|
|
34
|
+
labels and preserve the composition. Inspect the cleaned pixels for leftover glyphs and unwanted design
|
|
35
|
+
changes. Cropping alone does not clean text; flat masks cannot restore complex
|
|
36
|
+
backgrounds. Rebuild simple cards, lines, arrows and labels as native objects.
|
|
37
|
+
If retaining a background layer, remove those editable objects from its pixels
|
|
38
|
+
too: moving a card or text box must not leave its original raster version behind.
|
|
39
|
+
6. Compose the reconstructed layers in one SVG document. Match the actual reference
|
|
40
|
+
dimensions on every page, preserve stable object IDs and logical `g` groups,
|
|
41
|
+
and use visible `text`/`tspan` with explicit line baselines and page fonts.
|
|
42
|
+
Do not outline glyphs or use invisible text over full-slide screenshots.
|
|
43
|
+
Preserve notes/citations and the original design image Drive path in each page's
|
|
44
|
+
`desc` so future edits can repeat the same reference comparison. Match the
|
|
45
|
+
reference typography and geometry; do not shrink body copy merely to hide an incorrect reconstruction.
|
|
46
|
+
7. Run `slides.inspect` with `previewPages` and corresponding `referenceImages`.
|
|
47
|
+
This renders the deck once through PPTX and LibreOffice and returns each
|
|
48
|
+
original image beside its exported counterpart in the observation sequence.
|
|
49
|
+
Compare composition, artwork, typography, line breaks, content and cleanliness.
|
|
50
|
+
`info.export.textBounds` gives measured rendered lines in SVG coordinates;
|
|
51
|
+
use them to correct placement through `slides.read/edit`, then inspect again.
|
|
52
|
+
The technical `passed` flag does not measure similarity to the reference.
|
|
53
|
+
8. Export the exact inspected revision with `slides.export`. Deliver the PPTX/PDF,
|
|
54
|
+
retain the original design images and editable source, and disclose raster-only
|
|
55
|
+
areas or unresolved differences. LibreOffice rendering does not establish pixel
|
|
56
|
+
identity in Microsoft PowerPoint.
|
|
57
|
+
|
|
58
|
+
## Direct SVG authoring
|
|
59
|
+
|
|
60
|
+
When direct vector authoring suits the request, create native text, shapes, groups
|
|
61
|
+
and optional artwork directly, then use the same inspection and export path.
|
|
62
|
+
This option does not replace a requested image-model design workflow. The live
|
|
63
|
+
SVG editor and PowerPoint use different text renderers.
|
|
64
|
+
|
|
65
|
+
## Canonical source and asset placement
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"path": "Proposals/inventory.svg",
|
|
70
|
+
"content": "<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"deck\" viewBox=\"0 0 1920 1080\"><svg data-slide=\"true\" id=\"slide-1\" viewBox=\"0 0 1920 1080\"><title>Inventory</title><rect width=\"1920\" height=\"1080\" fill=\"#FFFFFF\"/><image id=\"hero\" x=\"1000\" y=\"100\" width=\"800\" height=\"600\"/><g id=\"value\"><rect x=\"80\" y=\"160\" width=\"840\" height=\"320\" rx=\"16\" fill=\"#EEF4FA\"/><text id=\"headline\" x=\"120\" y=\"250\" font-family=\"Noto Sans CJK KR\" font-size=\"48\" fill=\"#123456\">재고를 한눈에 확인</text></g></svg></svg>",
|
|
71
|
+
"assets": {
|
|
72
|
+
"hero": { "path": "Proposals/artwork.png", "crop": { "left": 620, "top": 70, "width": 800, "height": 600 } }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Asset paths are relative to the Drive root. A plain string embeds the whole image;
|
|
78
|
+
`{path,crop}` extracts exact pixels after EXIF orientation, without resizing.
|
|
79
|
+
SVG geometry controls placement. Out-of-bounds crops fail before saving. The same
|
|
80
|
+
asset map works for creation and element edits; an existing image requires its
|
|
81
|
+
replacement fingerprint. Embedded bytes make the saved document self-contained.
|
|
82
|
+
|
|
83
|
+
`slides.read` returns a compact outline. Selected text/shapes return exact XML and
|
|
84
|
+
opaque `before` values. Images and groups containing images return attributes and
|
|
85
|
+
`imageIds` instead of embedded bytes. Use `changes:[{id,before,attributes:{x:"80"}}]`
|
|
86
|
+
to change geometry without resending content; `null` removes an attribute. Use
|
|
87
|
+
`attributes:{}` together with `assets` to replace artwork. Attribute changes and
|
|
88
|
+
`after` XML replacements are mutually exclusive and share the same fingerprint/CAS.
|
|
89
|
+
Read individual child IDs when changing the contents of a group. Insert a page under the root with `slides.edit.inserts`; preserve
|
|
90
|
+
unrelated objects. Whole-document replacement requires `expectedRevision`.
|
|
91
|
+
|
|
92
|
+
Inspection example: `slides.inspect({path:"Proposals/inventory.svg", expectedRevision,
|
|
93
|
+
previewPages:[1], referenceImages:[{page:1,path:"Proposals/design-1.png"}], language:"ko-KR"})`. Export requires `path`, `expectedRevision`, `format` (`pptx` or
|
|
94
|
+
`pdf`) and a new `outputPath`. Set `language:"ko-KR"` for Korean. `reversePages`
|
|
95
|
+
changes export page order only when requested for the actual printing workflow.
|