@4fu/arbor-prompt 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +187 -2
- package/blocks.d.ts +14 -0
- package/blocks.js +235 -0
- package/build.d.ts +119 -0
- package/build.js +247 -0
- package/first-input.d.ts +40 -0
- package/first-input.js +47 -0
- package/index.d.ts +19 -0
- package/index.js +19 -0
- package/memory.d.ts +15 -0
- package/memory.js +31 -0
- package/package.json +50 -4
- package/reminder.d.ts +34 -0
- package/reminder.js +63 -0
- package/render.d.ts +66 -0
- package/render.js +220 -0
- package/system.d.ts +28 -0
- package/system.js +78 -0
- package/text.d.ts +20 -0
- package/text.js +300 -0
- package/time.d.ts +9 -0
- package/time.js +17 -0
package/time.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one time format every block carries (docs/prompting.md#deliveries).
|
|
3
|
+
*
|
|
4
|
+
* A block's time is the instant it was written, formatted once here so no
|
|
5
|
+
* component writes its own. The format is fixed and UTC, so the same block
|
|
6
|
+
* always renders to the same bytes.
|
|
7
|
+
*/
|
|
8
|
+
/** `2026-11-05 07:42:35`, always UTC. */
|
|
9
|
+
export declare function formatTime(time: number): string;
|
package/time.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one time format every block carries (docs/prompting.md#deliveries).
|
|
3
|
+
*
|
|
4
|
+
* A block's time is the instant it was written, formatted once here so no
|
|
5
|
+
* component writes its own. The format is fixed and UTC, so the same block
|
|
6
|
+
* always renders to the same bytes.
|
|
7
|
+
*/
|
|
8
|
+
const PAD = 2;
|
|
9
|
+
function two(value) {
|
|
10
|
+
return String(value).padStart(PAD, "0");
|
|
11
|
+
}
|
|
12
|
+
/** `2026-11-05 07:42:35`, always UTC. */
|
|
13
|
+
export function formatTime(time) {
|
|
14
|
+
const date = new Date(time);
|
|
15
|
+
return (`${date.getUTCFullYear()}-${two(date.getUTCMonth() + 1)}-${two(date.getUTCDate())} ` +
|
|
16
|
+
`${two(date.getUTCHours())}:${two(date.getUTCMinutes())}:${two(date.getUTCSeconds())}`);
|
|
17
|
+
}
|