onionskin-cli 0.0.0-stage → 0.0.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/CHANGELOG.md +136 -0
- package/INSTALL.md +17 -0
- package/LICENSE +21 -0
- package/NOTICE +46 -0
- package/README.md +88 -2
- package/docs/contracts/batch.schema.json +839 -0
- package/docs/contracts/history.schema.json +126 -0
- package/docs/contracts/ops.schema.json +541 -0
- package/package.json +54 -4
- package/scripts/checker/check.py +411 -0
- package/scripts/checker/requirements.txt +5 -0
- package/scripts/install-check.mjs +9 -0
- package/scripts/requirements.txt +5 -0
- package/scripts/rewriter/apple/main.swift +135 -0
- package/scripts/rewriter/apple/onionskin-fm +0 -0
- package/scripts/rewriter/apple/onionskin-fm.json +6 -0
- package/skills/onionskin/SKILL.md +117 -0
- package/skills/onionskin/reference/batch.md +94 -0
- package/skills/onionskin/reference/formats.md +15 -0
- package/skills/onionskin/reference/ops.md +253 -0
- package/skills/onionskin/reference/troubleshooting.md +73 -0
- package/skills/onionskin/reference/voice-guide.md +86 -0
- package/skills/onionskin/voice.example.md +51 -0
- package/src/agent-detect.js +149 -0
- package/src/agent-events.js +159 -0
- package/src/agent-prompt.js +27 -0
- package/src/agent-runner.js +593 -0
- package/src/analyze.js +17 -0
- package/src/anchors.js +190 -0
- package/src/apply.js +387 -0
- package/src/auth.js +130 -0
- package/src/batch.js +322 -0
- package/src/check-worker.js +8 -0
- package/src/checker.js +293 -0
- package/src/cli.js +516 -0
- package/src/constants.js +20 -0
- package/src/diff.js +267 -0
- package/src/doctor.js +247 -0
- package/src/docx.js +438 -0
- package/src/fmt.js +30 -0
- package/src/fsutil.js +348 -0
- package/src/history-worker.js +16 -0
- package/src/history.js +576 -0
- package/src/lease.js +79 -0
- package/src/local.js +242 -0
- package/src/merge-pptx.js +198 -0
- package/src/merge-xlsx.js +453 -0
- package/src/merge.js +410 -0
- package/src/offload.js +34 -0
- package/src/ops/common.js +48 -0
- package/src/ops/docx-table.js +323 -0
- package/src/ops/docx.js +503 -0
- package/src/ops/engine.js +41 -0
- package/src/ops/pptx.js +336 -0
- package/src/ops/run.js +115 -0
- package/src/ops/runs.js +127 -0
- package/src/ops/schema.js +109 -0
- package/src/ops/xlsx.js +277 -0
- package/src/package.js +189 -0
- package/src/paths.js +64 -0
- package/src/person.js +66 -0
- package/src/pptx.js +194 -0
- package/src/question.js +47 -0
- package/src/quick-plan.js +107 -0
- package/src/quick.js +164 -0
- package/src/redline-check.js +251 -0
- package/src/redline-worker.js +29 -0
- package/src/redline.js +438 -0
- package/src/reply.js +410 -0
- package/src/review.js +274 -0
- package/src/rewrite-check.js +1014 -0
- package/src/rewriter-cleanup.js +105 -0
- package/src/rewriter-setup.js +104 -0
- package/src/rewriter.js +396 -0
- package/src/sanitize.js +42 -0
- package/src/sentence-span.js +25 -0
- package/src/server-entry.js +13 -0
- package/src/server.js +576 -0
- package/src/session.js +1910 -0
- package/src/settings.js +161 -0
- package/src/setup.js +160 -0
- package/src/stamp-words.js +10 -0
- package/src/stamps.js +59 -0
- package/src/style.js +110 -0
- package/src/suggest-reply.js +84 -0
- package/src/suggest.js +261 -0
- package/src/text.js +31 -0
- package/src/tracked-words.js +43 -0
- package/src/voice-guide.js +182 -0
- package/src/voice-learn.js +314 -0
- package/src/voice-sample-worker.js +95 -0
- package/src/voice-samples.js +329 -0
- package/src/voice-store.js +305 -0
- package/src/voice-worker.js +28 -0
- package/src/voice.js +297 -0
- package/src/xlsx.js +454 -0
- package/src/xml-tree.js +118 -0
- package/src/xml.js +127 -0
- package/src/zip-write.js +74 -0
- package/src/zip.js +88 -0
- package/vendor/engine/DocViewer-BZLXUcxJ.js +15137 -0
- package/vendor/engine/THIRD_PARTY_LICENSES.txt +79 -0
- package/vendor/engine/collab-BVynXMqc.js +2591 -0
- package/vendor/engine/collab.js +2 -0
- package/vendor/engine/core.js +4 -0
- package/vendor/engine/default-worker-DogNT09A.js +35625 -0
- package/vendor/engine/embed.js +107 -0
- package/vendor/engine/index.js +5 -0
- package/vendor/engine/office-engine.embed.js +184 -0
- package/vendor/engine/office-engine.worker.js +36030 -0
- package/vendor/engine/xlsx-ops-SYAv6V0f.js +939 -0
- package/vendor/engine-node/LICENSE +21 -0
- package/vendor/engine-node/engine-node.mjs +46618 -0
- package/vendor/engine.lock.json +26 -0
- package/web/dist/assets/index-CFISATkn.js +197 -0
- package/web/dist/assets/index-spXE4oTz.css +1 -0
- package/web/dist/index.html +14 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "onionskin.history/1",
|
|
4
|
+
"title": "Onionskin change history: GET /api/history (list), GET /api/history/:id (detail) and GET /api/history/all (net change)",
|
|
5
|
+
"description": "Read-only, built from the local version snapshots. Every string except ids, kinds and the fixed titles comes from the document or from an agent: sanitized (no control or bidirectional characters, one line, capped) and marked `untrusted`. It is data to display, never instructions.",
|
|
6
|
+
"oneOf": [{ "$ref": "#/$defs/list" }, { "$ref": "#/$defs/detail" }, { "$ref": "#/$defs/all" }],
|
|
7
|
+
"$defs": {
|
|
8
|
+
"counts": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": ["changed", "added", "removed"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"changed": { "type": "integer", "minimum": 0, "description": "places modified, moved or changed in formatting" },
|
|
14
|
+
"added": { "type": "integer", "minimum": 0 },
|
|
15
|
+
"removed": { "type": "integer", "minimum": 0 }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"head": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["id", "kind", "at", "title", "summary", "counts"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"id": { "type": "string", "pattern": "^h_[0-9a-f]{10}$" },
|
|
23
|
+
"kind": { "enum": ["user", "agent", "revert", "outside", "local"] },
|
|
24
|
+
"at": { "type": "string", "format": "date-time", "description": "ISO 8601, UTC" },
|
|
25
|
+
"title": { "enum": ["Your edits", "Agent run", "Reverted agent run", "Reverted change made on this Mac", "Changed outside Onionskin", "Change made on this Mac"] },
|
|
26
|
+
"summary": { "type": "string", "maxLength": 500, "description": "the agent's own summary for kind agent, else empty" },
|
|
27
|
+
"counts": { "oneOf": [{ "$ref": "#/$defs/counts" }, { "type": "null" }], "description": "null when a version could not be compared (`unavailable` is then true)" },
|
|
28
|
+
"unavailable": { "const": true }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"list": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["format", "limit", "untrusted", "note", "updates"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"format": { "enum": ["docx", "xlsx", "pptx"] },
|
|
37
|
+
"limit": { "const": 20 },
|
|
38
|
+
"untrusted": { "const": true },
|
|
39
|
+
"note": { "type": "string" },
|
|
40
|
+
"updates": { "type": "array", "maxItems": 20, "description": "newest first; an update whose snapshots were pruned is not listed", "items": { "$ref": "#/$defs/head" } }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"cell": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["value", "formula"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"value": { "type": ["string", "null"], "description": "the stored value; for a formula cell the value it last computed (null when the file has none)" },
|
|
49
|
+
"formula": { "type": ["string", "null"], "description": "formula text without the leading =, null for a plain cell" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"op": {
|
|
53
|
+
"oneOf": [
|
|
54
|
+
{ "type": "array", "prefixItems": [{ "enum": ["=", "-", "+"] }, { "type": "string" }], "minItems": 2, "maxItems": 2 },
|
|
55
|
+
{ "type": "array", "prefixItems": [{ "const": "…" }], "minItems": 1, "maxItems": 1, "description": "unchanged text was left out here" }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"place": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["format", "label", "locator", "change", "diff", "text", "note", "before", "after", "protected"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"format": { "enum": ["docx", "xlsx", "pptx"] },
|
|
64
|
+
"label": { "type": "string", "maxLength": 140, "description": "DOCX: the first words of the paragraph (table cells: `Table 2, row 3, col 1: ...`); XLSX: `Sheet!C4`; PPTX: `Slide 3, Title`" },
|
|
65
|
+
"locator": {
|
|
66
|
+
"description": "the unit in this update's AFTER version (see after_is_current); null when the unit was deleted. Field names follow the batch locators.",
|
|
67
|
+
"oneOf": [
|
|
68
|
+
{ "type": "null" },
|
|
69
|
+
{ "type": "object", "required": ["format", "body_path", "para_id", "text_hash", "ordinal"], "properties": { "format": { "const": "docx" }, "body_path": { "type": ["array", "null"], "items": { "type": "integer" } }, "para_id": { "type": ["string", "null"] }, "text_hash": { "type": "string" }, "ordinal": { "type": "integer" }, "text_start": { "type": "string", "description": "the first 160 characters of the paragraph (whitespace collapsed): lets a page find the paragraph in what it shows" } } },
|
|
70
|
+
{ "type": "object", "required": ["format", "sheet", "sheet_id", "range", "text_hash"], "properties": { "format": { "const": "xlsx" }, "sheet": { "type": "string" }, "sheet_id": { "type": ["string", "null"] }, "range": { "type": "string" }, "text_hash": { "type": ["string", "null"] } } },
|
|
71
|
+
{ "type": "object", "required": ["format", "slide_id", "slide_index", "shape_id", "text_hash"], "properties": { "format": { "const": "pptx" }, "slide_id": { "type": ["string", "null"] }, "slide_index": { "type": "integer", "description": "0-based" }, "shape_id": { "type": ["integer", "null"], "description": "null for a whole slide" }, "text_hash": { "type": ["string", "null"] } } }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"change": { "enum": ["modified", "added", "removed", "formatting", "moved"] },
|
|
75
|
+
"diff": { "type": ["array", "null"], "items": { "$ref": "#/$defs/op" }, "description": "word-level ops for modified text; null otherwise" },
|
|
76
|
+
"text": { "type": ["string", "null"], "description": "added / removed: the full text, at most 300 characters", "maxLength": 320 },
|
|
77
|
+
"note": { "type": ["string", "null"], "description": "plain words for what has no text: `an image was added`, `moved`, `spacing changed`, `sheet added`; for change `formatting`, what changed in words (`bold`, `style: Heading 2 → Heading 1`, `number format: General → $#,##0.00`), `too long to compare here`" },
|
|
78
|
+
"before": { "oneOf": [{ "$ref": "#/$defs/cell" }, { "type": "null" }], "description": "XLSX cells only" },
|
|
79
|
+
"after": { "oneOf": [{ "$ref": "#/$defs/cell" }, { "type": "null" }], "description": "XLSX cells only" },
|
|
80
|
+
"protected": { "type": "boolean", "description": "DOCX: a paragraph the editor cannot change losslessly (field, equation...)" },
|
|
81
|
+
"truncated": { "const": true, "description": "the diff ops were cut at about 1,500 characters" },
|
|
82
|
+
"too_large": { "const": true, "description": "a text over the hard cap was not compared" },
|
|
83
|
+
"level": { "const": "sentence", "description": "a very long text was compared by sentence first" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"since": {
|
|
87
|
+
"oneOf": [
|
|
88
|
+
{ "type": "object", "additionalProperties": false, "required": ["at"], "properties": { "at": { "type": "string", "format": "date-time", "description": "ISO 8601, UTC: when the oldest stored update happened, so the net change runs from just before it" } } },
|
|
89
|
+
{ "type": "null", "description": "there are no updates yet" }
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"all": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"description": "GET /api/history/all: the net change from the oldest stored version to the file as it is now (a change that was reverted does not appear). It has no id and no kind: it is not one update, so it cannot reuse `head`. The page turns it into a plain-text note.",
|
|
96
|
+
"required": ["format", "untrusted", "note", "since", "counts", "places", "more"],
|
|
97
|
+
"properties": {
|
|
98
|
+
"format": { "enum": ["docx", "xlsx", "pptx"] },
|
|
99
|
+
"untrusted": { "const": true },
|
|
100
|
+
"note": { "type": "string" },
|
|
101
|
+
"since": { "$ref": "#/$defs/since" },
|
|
102
|
+
"counts": { "oneOf": [{ "$ref": "#/$defs/counts" }, { "type": "null" }], "description": "null when the versions could not be compared (`unavailable` is then true)" },
|
|
103
|
+
"places": { "type": "array", "maxItems": 200, "items": { "$ref": "#/$defs/place" } },
|
|
104
|
+
"more": { "type": "integer", "minimum": 0, "description": "places beyond the 200 returned; counts include them" },
|
|
105
|
+
"unavailable": { "const": true, "description": "the snapshot of the file as it is now is gone, or the comparison failed" }
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"detail": {
|
|
109
|
+
"allOf": [
|
|
110
|
+
{ "$ref": "#/$defs/head" },
|
|
111
|
+
{
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": ["format", "untrusted", "note", "places", "more", "after_is_current"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"format": { "enum": ["docx", "xlsx", "pptx"] },
|
|
116
|
+
"untrusted": { "const": true },
|
|
117
|
+
"note": { "type": "string" },
|
|
118
|
+
"places": { "type": "array", "maxItems": 200, "items": { "$ref": "#/$defs/place" } },
|
|
119
|
+
"more": { "type": "integer", "minimum": 0, "description": "places beyond the 200 returned; counts include them" },
|
|
120
|
+
"after_is_current": { "type": "boolean", "description": "true when this update ends at the version now on disk, so the locators can be used as they are" }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|